Write music as code and hear it as MIDI. Code Sequencer is an editor for patterns, chord progressions, generated melodies and multi-track songs, written in Symbolic Cycle, Maru's own pattern language. Each part plays on its own MIDI channel, so you can hear it on the built-in voice, send it to instruments in a rack, or export it as a MIDI file.
The idea
Symbolic Cycle follows the TidalCycles and Strudel tradition of short, looping patterns written in mini-notation, and adds musical values that stay abstract until the last moment: chord symbols, Roman numerals in a key, scale steps, pitch-class sets and drum names. Seeded generators draft progressions, melodies and basslines that vary between seeds but loop exactly.
const chords = roman("<i III VI VII>").key("E:minor").phrase(4)
export const keys = chords.velocity(0.5)
export const lead = generateMelody({ over: chords, rhythm: "x x ~ x", seed: 2 })Each named part becomes a track, with its own colour in the MIDI roll and its own channel. Drums play on channel 10.
Working in the editor
- Preview plays the code. Edits are checked after a short pause and, while playing, take over at the next cycle boundary at the same position, so nothing drops out or jumps back. An invalid edit leaves the last working pattern playing. ββ΅ or Ctrl+Enter applies an edit; β. or Ctrl+. stops.
- Click a value in the code to edit it with a control: a seed with dice, a note range, a rhythm step grid, a pitch-class clock, a key or a scale. The edit is written back into the code in your own spelling.
- Render replaces a generator call with the literal notes it produced, keeping the original as a comment.
- The MIDI roll shows every part, with mute and solo, a scrolling view for long songs, and an Analysis view for rhythm and chord study. Export MIDI downloads a type 1 MIDI file with one track per part, or drag the button straight into a DAW.
- Problems lists errors and what the code had to assume, and the Reference panel lists every name in the language with an example to insert.
- Tempo follows the host by default, or set your own BPM.




