LANGUAGE + CLI TOOLCHAIN

MusicScript

A domain-specific language for music production. Write beats, melodies, vocals, and full arrangements in plain text — then run them in the studio.

Files use the .gms extension. Compose in Desktop, Web Studio or the standalone CLI; choose the supported runtime for your score.

Choose your next step

Desktop can schedule a finite MusicScript score against Go Meow Server. The CLI’s local session protocol does not automatically join that server, and network synchronization adds no new language keyword.

QUICK START

Start with an editable score

// MusicScript — GoMeow Studio
// Drop into code and make it bang

project "My Beat" {
  bpm:   140
  key:   Dm
  time:  4/4
  swing: 0.1
}

beat main {
  kick:  [X . . . X . . . X . . . X . . .]
  snare: [. . X . . . X . . . X . . . X .]
  hihat: [X 7 X 7 X 7 X 7 X 7 X 7 X 7 X 7]
  808:   [D1:8 . . . F1:4 . . A1:2 . . . . . . . .]
}

melody hook {
  instrument: juno106
  notes: [D4:2 . F4:2 A4:4 G4:2 . F4:2 D4:8]
  fx: [reverb(0.35) delay(1/8, 0.5)]
  velocity: 0.75
}

section verse {
  bars: 8
  play: [main hook]
}

structure [
  verse x4
]

From a sketch to an export

The standalone CLI checks and formats scores, supports editor language services and an interactive REPL, and renders through the native engine. Reusable composition modules expand into editable scores. Video uses a separate picture plan, and game exports include middleware handoff files.

gms capabilities --engine native
gms check song.gms --engine native --target export
gms video plan song.gms

Browser and native engine support differs. Plugin hosting, MPE, recording takes and surround routing are Studio features; they are not MusicScript declarations.

REFERENCE

Language constructs

Video

videovideo name { fps aspect framing clip "file" { at length } caption "text" { at length } }

Separate local picture plan: at/length/fades/crossfade use quarter notes; offset_seconds uses source seconds. CLI video export and desktop video import consume it; ordinary audio IR omits it.

example
video promo {
  fps: 29.97
  aspect: portrait
  framing: cover
  clip "media/clip.mp4" { at: 0 length: 4 fade_out: 1 }
  caption "Make some noise" { at: 0 length: 2 }
}

Theme

themetheme name { notes: [steps] }

Reusable melodic material referenced by section.play. Composition modules can transform theme note lists as well as melodies.

example
theme motif { notes: [C4:2 .:2 E4:4] }

Named effects

fx_chainfx_chain name { effect(...) ... }

A named effect chain referenced from section.fx. Native audio resolves chains; validate selected engine and target before rendering.

example
fx_chain room {
  reverb(0.3)
  delay(0.25, 0.2)
}

Parsed variables

letlet name = value

Parsed and preserved, but current output engines do not resolve variables and reject let declarations. For reusable parameterized compositions, use a .gmsmodule.json template.

example
let amount = 4

Composition modules

.gmsmodule.jsonJSON template → MODULE / gms module instantiate → ordinary .gms

External JSON format, not a .gms declaration or executable function. Bounded numeric parameters drive transpose, stretch, reverse, rotate and velocity transformations of melody/theme notes. Create an editable instance in desktop MODULE or the CLI.

example
{
  "version": 1,
  "name": "Motif",
  "source": "melody lead { notes: [C4:2 .:2 E4:4] } section hook { bars: 1 play: [lead] } structure [hook]",
  "parameters": {
    "shift": {
      "default": 0,
      "min": -12,
      "max": 12
    }
  },
  "transforms": [
    {
      "target": "lead",
      "transpose": {
        "parameter": "shift"
      }
    }
  ]
}

Project

projectproject "Title" { bpm key time swing humanize bars }

Global timing and metadata. humanize is a deterministic maximum timing offset in seconds (0–0.05).

example
project "Brooklyn Nights" {
  bpm:      140
  key:      Dm
  time:     4/4
  swing:    0.12
  humanize: 0.006
}

Beat

beatbeat name { track: [steps] }

One bar divided evenly by expanded step count. X = hit, . = rest, 0-9 = velocity; Note:len adds a pitched hit and len−1 padding rests. Maximum 4096 steps per grid and 65536 beat steps per program.

example
beat main {
  kick:  [X . . . X . . . X . . . X . . .]
  snare: [. . X . . . X . . . X . . . X .]
  hihat: [X 7 X 7 X 7 X 7 X 7 X 7 X 7 X 7]
  808:   [D1:8 . . F1:4 . . A1:2 . . . . . . . .]
}

Melody

melodymelody name { instrument notes chords arp fx velocity }

Pitch:Length:Velocity:Expression; lengths are sixteenth notes and .:2 is a two-step rest. Octave -1 is supported (C-1 = MIDI 0). Expressions: accent, ghost, staccato, legato, tie, slide, cresc, decresc. Check engine/target support before output.

example
melody hook {
  instrument: juno106
  notes: [D4:2:0.7:accent F4:2:1:slide A4:4:0.8:legato]
  arp: up rate: 1/16
  fx: [reverb(wet: 0.4) delay(time: 0.25, feedback: 0.5)]
  velocity: 0.8
}
chordschords: [Root Quality:len]

Chord progression. Quality: m m7 maj7 7 dim aug sus2 sus4

example
chords: [Dm:4 Am:4 Gm:4 Bb:4]

Vocal

vocalvocal name { text voice asset pitch timing fx }

Portable rendered vocal audio. text and voice are host generation hooks; native rendering consumes asset.

example
vocal hook_vox {
  text:  "from Marcy to the world"
  voice: hip_hop_male
  asset: "vocals/hook.wav"
  pitch: -2
  timing: bar(1)
  fx: [reverb(wet: 0.3)]
}

Sample

samplesample name { file pitch volume loop chop }

Load project-relative audio without traversal or URLs. chop selects ordered normalized ranges (0–1). Events/MIDI cannot represent sample audio.

example
sample stab {
  file:  "samples/horn.wav"
  pitch: +2
  chop:  [0:0.5, 0.5:1.0]
}

Section

sectionsection name { bars bpm play fx automate }

A named time block. bpm can be absolute (140) or relative (+5, -10).

example
section chorus {
  bars: 8
  bpm:  +5
  play: [main hook hook_vox]
  fx:   [reverb(0.5)]
}

Structure

structurestructure [ section xN ... ]

Song arrangement. Each item is a section name with optional repeat count.

example
structure [
  intro   x1
  verse   x2
  chorus  x2
  bridge  x1
  chorus  x4
]

LFO

lfolfo { target shape rate depth }

Native audio supports channel.volume and channel.pan; effect-parameter targets fail validation. Web live/offline support differs. Shapes: sine, triangle, square, sawtooth. Rate accepts note-time (4n) or Hz.

example
lfo {
  target: lead.pan
  shape:  sine
  rate:   4n
  depth:  0.2
}

Effects

reverbreverb(wet)

Room reverb.

example
reverb(0.4)
delaydelay(time, feedback)

Feedback delay.

example
delay(1/8, 0.5)
filterfilter(type, freq)

lpf | hpf | bandpass.

example
filter(lpf, 2000)
compresscompress(ratio:1, threshold)

Dynamics compression.

example
compress(4:1, -18db)
eqeq(low: Ndb, mid: Ndb, high: Ndb)

3-band EQ.

example
eq(low: +3db, mid: -2db)
distortdistort(amount)

Waveshaper distortion.

example
distort(0.4)
autotuneautotune(key)

Recognized syntax; current audio capability checks reject it. Use an explicitly processed vocal asset.

example
autotune(Dm)
choruschorus(rate, depth, wet)

Chorus (rate, depth, wet). Implemented on web and native.

example
chorus(1.5, 0.3, 0.25)
lofilofi()

BitCrusher + warmth.

example
lofi()

Mix

mixmix { channel: level(Ndb) pan(N) send(bus, Ndb) }

Stereo channel and bus mix. Define buses as bus.name; master accepts lufs(-14) and limiter(-0.3db).

example
mix {
  bus.room:   level(-3db) pan(0.2)
  main.kick:  level(-4db) pan(-0.4) send(room, -12db)
  hook:       level(-10db) pan(0.2)
  master: lufs(-14) limiter(-0.3db)
}

Instruments

instrumentsinstrument: name

Instrument presets for melody blocks. A theme declares notes only; it has no instrument property.

example
juno106  tb303  jupiter8  sh101  dx7  glide  wave
piano  pad  organ  bass  synth  lead  pocket  chop  talk

Ready to write some heat?

Open the studio and drop into the MusicScript editor. Your browser is the runtime.

Open Studio