From d353d64298a6b1b1c4555c8e87f0b12311f376f2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 29 Mar 2026 10:49:49 -0400 Subject: [PATCH] Add Polyphonic Hold section with audio example to sequencing docs Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/guide/sequencing.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/guide/sequencing.rst b/docs/guide/sequencing.rst index 0149689..85c9099 100644 --- a/docs/guide/sequencing.rst +++ b/docs/guide/sequencing.rst @@ -244,6 +244,31 @@ Chords and Tone objects work the same way: for note in ["A2", "C3", "E3", "A2", "D2", "F2", "A2", "D2"]: bass.add(note, Duration.QUARTER) +Polyphonic Hold +--------------- + +``Part.hold()`` adds a note without advancing the beat position — +the next note starts at the *same* time. This enables polyphonic +overlap on a single part: piano sustain, sitar drone under melody, +guitar strum texture. + +.. code-block:: python + + piano = score.part("piano", instrument="piano", reverb=0.3) + + # Hold a C major chord for 8 beats + piano.hold("C3", Duration.WHOLE * 2, velocity=60) + piano.hold("E3", Duration.WHOLE * 2, velocity=55) + piano.hold("G3", Duration.WHOLE * 2, velocity=55) + + # Melody plays simultaneously on top + for n in ["E4", "G4", "C5", "G4", "E4", "D4", "C4", "E4"]: + piano.add(n, Duration.QUARTER, velocity=80) + +.. raw:: html + + + Arpeggiator ------------