codingNoteEffect
Write JavaScript in the piano-roll Code tab to generate notes and CC programmatically. Original notes are treated as raw material, and your code emits new notes — a separation that lets you build scales, chords, Euclidean rhythms, and LFOs entirely from code.
Start here: read the overview for the mental model and a minimal example, then try the intro tutorial to run it yourself.
Overview Mental model of the three tabs (PianoRoll / Code / Render) and a minimal 4-beat arpeggio example. Quick can-do/can't-do table.
Lifecycle Execution order — lib load → compile → top-level → onInit → onBeat → onNote → onCc — and the behavior of globals like CLIP_BEAT.
Host API setNote / setCc to emit, events / ccLanes to read inputs, on* to hook each phase, seed for reproducible randomness.
Helpers
Section titled “Helpers” Rhythm euclid / every / sometimes / degrade — Euclidean rhythms and probabilistic note thinning.
Music theory scale / chord / degree / transpose — work with scales, chords, and degrees for harmonies and scale-snap.
Numeric, random, modulation LFO / envelope / drunk walk / Max-style generators — continuous values for CC automation.
In practice
Section titled “In practice” Recipes 15+ copy-paste-ready samples: octave doubling, fifth harmony, scale-snap, Euclidean arpeggios, and more.
Troubleshooting Compile vs. runtime error classes and typical cases, plus what to do when Render doesn't update.
Related
Section titled “Related”- Tutorial: generate notes with code (intro) — your first run
- Guide: libs/codes (shared JS libraries) — add and share your own helpers