Skip to content

The note sequence syntax used by voice.create and voice.append to describe pitches, durations, chords, ties, articulations, and per-note velocity.

Note Syntax

voice.create and voice.append accept a note sequence: whitespace-separated tokens, one per note or chord.

bash
C4/q D4/q E4/h

Each token is pitch/duration, with optional suffixes for ties, articulations, and per-note velocity.

Pitches

Standard scientific pitch notation: note name, optional accidental, octave number.

less
C4    D#3    Bb5    Eb4    F#2

Middle C is C4 (MIDI 60). Octave numbers follow Scientific Pitch Notation.

Rests

Replace the pitch with r:

css
r/q    r/h    r/e    r/w

Duration codes

CodeValue
wwhole
hhalf
qquarter
eeighth
ssixteenth
dhdotted half
dqdotted quarter
dedotted eighth
h3half-note triplet (⅓ whole)
q3quarter-note triplet (⅙ whole)
e3eighth-note triplet (1/12 whole)
s3sixteenth-note triplet (1/24 whole)

Chords

Wrap simultaneous pitches in angle brackets, followed by /duration:

bash
<C4 E4 G4>/q          → C major triad, quarter note
<Eb3 G3 Bb3>/h        → Eb major triad, half note
<D3 F3 A3 C4>/q       → Dm7 chord, quarter note

Use chords for pad stabs, gospel organ, jazz voicings, or any simultaneous pitches.

Ties

Append ~tie to extend a note into the next note of the same pitch:

bash
C4/h~tie C4/q          → C4 sounds for a dotted half total
G4/q~tie G4/e          → G4 quarter + eighth tied together

Ties are useful for durations that cross bar lines or that can't be expressed as a single rhythmic value.

Articulations

Append ~code after the duration:

SuffixArticulationMIDI effect
~stacstaccato50% duration
~accaccentnormal duration
~tentenutofull duration
~marcmarcato75% duration
~leglegatofull duration
bash
C4/q~stac D4/q E4/h       → staccato C, normal D and E
<C4 E4 G4>/q~acc           → accented chord stab

To apply an articulation to an entire voice at once, use voice.set_articulation.

Per-note velocity

Append ~vel:N (0–127) to override the voice-level dynamic for a single note:

bash
C4/q~vel:100 D4/q E4/q~vel:40     → loud C, default D, quiet E
G4/h~vel:120~tie G4/q              → very loud tied note

This takes precedence over voice.set_dynamics. Use it to shape phrase peaks, pull back resolutions, or accent approach tones.

Examples

bash
C4/q D4/q E4/q F4/q                     → four quarter notes
E4/e F#4/e G4/q r/q                     → eighths + quarter + rest
C4/dq D4/e E4/h                         → dotted quarter + eighth + half
<Eb3 G3 Bb3>/q <Ab3 C4 Eb4>/q          → two chord stabs
C4/q~stac D4/q~stac r/e E4/e F4/q      → staccato melody
C4/e3 D4/e3 E4/e3                       → eighth-note triplet