diff --git a/docs/_static/audio/acid_house.wav b/docs/_static/audio/acid_house.wav new file mode 100644 index 0000000..7394fd4 Binary files /dev/null and b/docs/_static/audio/acid_house.wav differ diff --git a/docs/_static/audio/articulations.wav b/docs/_static/audio/articulations.wav new file mode 100644 index 0000000..da93572 Binary files /dev/null and b/docs/_static/audio/articulations.wav differ diff --git a/docs/_static/audio/bossa_nova.wav b/docs/_static/audio/bossa_nova.wav new file mode 100644 index 0000000..3e5e7f2 Binary files /dev/null and b/docs/_static/audio/bossa_nova.wav differ diff --git a/docs/_static/audio/djembe.wav b/docs/_static/audio/djembe.wav new file mode 100644 index 0000000..00c046e Binary files /dev/null and b/docs/_static/audio/djembe.wav differ diff --git a/docs/_static/audio/dub_reggae.wav b/docs/_static/audio/dub_reggae.wav new file mode 100644 index 0000000..a9b49a8 Binary files /dev/null and b/docs/_static/audio/dub_reggae.wav differ diff --git a/docs/_static/audio/dynamics.wav b/docs/_static/audio/dynamics.wav new file mode 100644 index 0000000..7d467b8 Binary files /dev/null and b/docs/_static/audio/dynamics.wav differ diff --git a/docs/_static/audio/ensemble.wav b/docs/_static/audio/ensemble.wav new file mode 100644 index 0000000..009df28 Binary files /dev/null and b/docs/_static/audio/ensemble.wav differ diff --git a/docs/_static/audio/filter_ramp.wav b/docs/_static/audio/filter_ramp.wav new file mode 100644 index 0000000..aa5b578 Binary files /dev/null and b/docs/_static/audio/filter_ramp.wav differ diff --git a/docs/_static/audio/jazz_ballad.wav b/docs/_static/audio/jazz_ballad.wav new file mode 100644 index 0000000..e014c03 Binary files /dev/null and b/docs/_static/audio/jazz_ballad.wav differ diff --git a/docs/_static/audio/march_snare.wav b/docs/_static/audio/march_snare.wav new file mode 100644 index 0000000..374a537 Binary files /dev/null and b/docs/_static/audio/march_snare.wav differ diff --git a/docs/_static/audio/piano_hold.wav b/docs/_static/audio/piano_hold.wav new file mode 100644 index 0000000..7a1bbb5 Binary files /dev/null and b/docs/_static/audio/piano_hold.wav differ diff --git a/docs/_static/audio/playback_basic.wav b/docs/_static/audio/playback_basic.wav new file mode 100644 index 0000000..ee40178 Binary files /dev/null and b/docs/_static/audio/playback_basic.wav differ diff --git a/docs/_static/audio/quickstart.wav b/docs/_static/audio/quickstart.wav new file mode 100644 index 0000000..7bcbe88 Binary files /dev/null and b/docs/_static/audio/quickstart.wav differ diff --git a/docs/_static/audio/rock_beat.wav b/docs/_static/audio/rock_beat.wav new file mode 100644 index 0000000..98cd17a Binary files /dev/null and b/docs/_static/audio/rock_beat.wav differ diff --git a/docs/_static/audio/salsa_layered.wav b/docs/_static/audio/salsa_layered.wav new file mode 100644 index 0000000..3950520 Binary files /dev/null and b/docs/_static/audio/salsa_layered.wav differ diff --git a/docs/_static/audio/sequencing_bossa.wav b/docs/_static/audio/sequencing_bossa.wav new file mode 100644 index 0000000..2e56691 Binary files /dev/null and b/docs/_static/audio/sequencing_bossa.wav differ diff --git a/docs/_static/audio/song_sections.wav b/docs/_static/audio/song_sections.wav new file mode 100644 index 0000000..9cdc4b3 Binary files /dev/null and b/docs/_static/audio/song_sections.wav differ diff --git a/docs/_static/audio/strum.wav b/docs/_static/audio/strum.wav new file mode 100644 index 0000000..a5cafcd Binary files /dev/null and b/docs/_static/audio/strum.wav differ diff --git a/docs/_static/audio/swell.wav b/docs/_static/audio/swell.wav new file mode 100644 index 0000000..87145b1 Binary files /dev/null and b/docs/_static/audio/swell.wav differ diff --git a/docs/_static/audio/tabla.wav b/docs/_static/audio/tabla.wav new file mode 100644 index 0000000..8a1d670 Binary files /dev/null and b/docs/_static/audio/tabla.wav differ diff --git a/docs/_templates/audio.html b/docs/_templates/audio.html new file mode 100644 index 0000000..66214d7 --- /dev/null +++ b/docs/_templates/audio.html @@ -0,0 +1,4 @@ + diff --git a/docs/generate_audio.py b/docs/generate_audio.py new file mode 100644 index 0000000..6ee6fb6 --- /dev/null +++ b/docs/generate_audio.py @@ -0,0 +1,440 @@ +"""Generate audio samples for documentation. + +Renders code examples from the docs as WAV files so they can be +embedded as + Dub Reggae with Delay Madness ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -443,6 +447,10 @@ Sparse notes into infinite echo: play_score(score) +.. raw:: html + + + Jazz Ballad with Humanize ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -480,6 +488,10 @@ The difference between a robot and a musician: play_score(score) +.. raw:: html + + + Song with Sections ~~~~~~~~~~~~~~~~~~~ @@ -513,6 +525,10 @@ Define once, arrange freely: play_score(score) score.save_midi("my_song.mid") +.. raw:: html + + + Export Everything to MIDI ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/guide/drums.rst b/docs/guide/drums.rst index 2455bdc..af5275f 100644 --- a/docs/guide/drums.rst +++ b/docs/guide/drums.rst @@ -249,6 +249,10 @@ Playing Patterns play_pattern(Pattern.preset("salsa"), repeats=4, bpm=180) play_pattern(Pattern.preset("afrobeat"), repeats=8, bpm=110) +.. raw:: html + + + Fills ----- @@ -339,6 +343,10 @@ drum pattern and all named parts are mixed together by ``play_score()``: play_score(score) +.. raw:: html + + + World Percussion ---------------- @@ -458,6 +466,10 @@ West African-style break). score = Score("4/4", bpm=120) score.drums("djembe", repeats=8, fill="djembe call", fill_every=4) +.. raw:: html + + + Metal Kit ~~~~~~~~~ @@ -548,6 +560,10 @@ voice with per-player timing tendencies and micro pitch drift. # Or use patterns score.drums("drumline", repeats=4) +.. raw:: html + + + **Sympathetic resonance:** The marching snare builds up snare wire buzz as hits accumulate, and the buzz decays during rests — just like a real drum. diff --git a/docs/guide/playback.rst b/docs/guide/playback.rst index a409cd0..c669c55 100644 --- a/docs/guide/playback.rst +++ b/docs/guide/playback.rst @@ -66,6 +66,10 @@ the mix louder and punchier: chords.add(Chord.from_symbol(sym), Duration.WHOLE) play_score(score) +.. raw:: html + + + The render pipeline respects the Score's ``temperament`` and ``reference_pitch`` settings, so Baroque or microtonal scores play back at the correct tuning: diff --git a/docs/guide/quickstart.rst b/docs/guide/quickstart.rst index 06a8a9b..f6b14c7 100644 --- a/docs/guide/quickstart.rst +++ b/docs/guide/quickstart.rst @@ -185,6 +185,10 @@ chords, melody, bass, each with their own synth and effects: play_score(score) +.. raw:: html + + + Export to Your DAW ------------------ diff --git a/docs/guide/sequencing.rst b/docs/guide/sequencing.rst index 3b178be..0149689 100644 --- a/docs/guide/sequencing.rst +++ b/docs/guide/sequencing.rst @@ -392,6 +392,10 @@ rhodes, triangle lead, and filtered bass: play_score(score) +.. raw:: html + + + Velocity -------- @@ -431,6 +435,10 @@ Pass ``articulation=`` to ``Part.add()``: piano.add("G4", Duration.QUARTER, articulation="accent") # louder piano.add("C5", Duration.HALF, articulation="fermata") # held longer +.. raw:: html + + + What each articulation does: - **staccato** — plays ~40% of the note duration with a quick fade-out. Short and detached. @@ -467,6 +475,10 @@ of notes instead of setting each one manually. piano.dynamics(["C4","E4","G4","C5"], Duration.QUARTER, velocities=[50, 80, 110, 90]) +.. raw:: html + + + Four methods: - **crescendo()** — linear velocity ramp from ``start_vel`` to ``end_vel``. @@ -548,6 +560,12 @@ Each ensemble voice gets a consistent timing personality (some rush, some drag) plus small per-note wobble, and slightly different tuning. The result sounds like a real section — together but alive. +Solo snare, then an 8-player section plays the same pattern: + +.. raw:: html + + + Swing and Groove ---------------- @@ -663,6 +681,10 @@ Four interpolation curves: # Smooth reverb wash fading in and settling pad.ramp(over=Duration.WHOLE * 4, curve="ease_in_out", reverb=0.6) +.. raw:: html + + + ``ramp()`` generates automation points every quarter-beat by default. Set ``resolution=0.125`` for smoother curves (every 32nd note), or ``resolution=1.0`` for lighter automation (every beat).