NoemiDocsLiveCode

Sources

LiveCode

LiveCode

The LiveCode node is a text-based pattern generator inspired by TidalCycles and Strudel. Type patterns using a mini-notation syntax and hear them play back in real-time.

MINI-NOTATION BASICS

  • Space-separated elements divide one cycle evenly:
  • c e g -- 3 notes, each 1/3 of a cycle
  • Square brackets subdivide a slot:
  • c [e g] -- c gets half, e and g share the other half
  • Tilde for rest:
  • c ~ e ~ -- notes with rests between them
  • Asterisk for repeat:
  • c*4 -- c repeated 4 times
  • Forward slash for stretch:
  • c/2 -- c stretched over 2 cycles

OPERATORS

  • <a b c> - Alternation: pick one element per cycle
  • [a,b,c] - Stack: play simultaneously (chords)
  • a(3,8) - Euclidean: 3 hits distributed over 8 steps
  • a?0.5 - Probability: 50% chance of playing
  • a|b|c - Random Choice: pick one randomly
  • a:0.3 - Velocity: set velocity to 0.3 (0-1)
  • a@2 - Elongation: 2 weighted time slots

PATTERN TRANSFORMATIONS

  • rev - Reverse the pattern
  • fast 2 - Double the speed
  • slow 2 - Half the speed
  • off 0.5 - Offset by half a cycle (creates echo/canon)
  • degrade 0.3 - Randomly drop 30% of events
  • every 4 rev - Apply reverse every 4th cycle

CONTINUOUS FUNCTIONS

  • sine, saw, square, tri, rand, perlin
  • These generate continuous value streams useful for modulating velocity or other parameters.

SLICER MODE

Toggle between Notes mode (MIDI pitches) and Slices mode (slice indices for triggering a connected Slicer node).

MULTI-STATE

LiveCode supports up to 8 states with the State Selector. Each state stores a different pattern text. Use a Sequencer to automate state switching.

PARAMETERS

  • Cycle Length - Duration of one cycle in beats (0.25-16)
  • Transpose - Pitch offset in semitones (-24 to +24)
  • Velocity - Velocity scale (0.0-1.0)
  • Swing - Swing amount (0.0-1.0)

SNIPPET LIBRARY

Click the book icon to access 80+ categorized pattern examples that you can insert into your code.