Play loads a patch per channel before a note is played: an oboe for the
melody, strings under it, a square wave for the bass and a kalimba for
the arpeggio. It reads a count and that many parameter and value pairs -
the format SoundPatch writes - and understands nothing else about them,
which keeps SoundPatch the only thing that knows what soundThing's JSON
means.
FOUR PATCHES CAN BE UP AT ONCE, and that is the whole rung. It is the
first use of d361ea1: before it the LFOs belonged to the whole device, so
whichever patch loaded last owned them for every voice. Kalimba has LFO 0
switched off and the other three have it on, so on the old device this
piece would have played all four parts with the arpeggio's setting -
which is exactly the fault that stopped Lunar Porter's low fuel warning
trilling after the first landing of a run.
The eight patches are the user's, brought over from soundThing; four are
used here and the rest are a palette for the next piece.
The test now asks BOTH VOICES FOR NOTE 60 and gets an octave, because
their patches differ in one parameter and the lower is loaded first. A
device where a patch was global would have the second overwrite the first
and the two would answer in unison. Verified with break.sh: loading both
patches onto one channel flips the octave onto the wrong voice and the
ratio inverts to 0.499.
The test patches carry a release, and that was measured rather than
assumed: without one the first voice's note was still fading into the
second voice's window, which read 634 hertz - not a note, not an octave,
and a reminder that a crossing counter given two notes answers with
neither.
Play.sbx went 379 -> 740 bytes, which is four patches of 47 pairs each,
and is why ten recordings moved. makedisks.sh needed the Sounds include
path that Lander's line already had.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
56 lines
2.2 KiB
NASM
56 lines
2.2 KiB
NASM
; KalimbaPatch, converted from Programs/Sounds/Kalimba.json by SoundPatch.
|
|
; Designed in soundThing, where it can be heard. Do not edit the numbers
|
|
; here: change the patch and convert it again.
|
|
|
|
#Data
|
|
|
|
KalimbaPatch:
|
|
0d47 ; how many pairs follow
|
|
0x00 0d0 ; oscillator 0, waveform
|
|
0x01 0d255 ; gain
|
|
0x02 0d128 ; duty
|
|
0x03 0d128 ; detune, in cents
|
|
0x04 0d129 ; octave
|
|
0x05 0d1 ; on
|
|
0x06 0d0 ; what moves its width
|
|
0x07 0d128 ; and how far
|
|
0x08 0d0 ; what moves its pitch
|
|
0x09 0d128 ; and how far
|
|
0x0A 0d0 ; what moves its gain
|
|
0x0B 0d128 ; and how far
|
|
0x10 0d0 ; oscillator 1, waveform
|
|
0x11 0d218 ; gain
|
|
0x12 0d128 ; duty
|
|
0x13 0d129 ; detune, in cents
|
|
0x14 0d130 ; octave
|
|
0x15 0d1 ; on
|
|
0x16 0d0 ; what moves its width
|
|
0x17 0d128 ; and how far
|
|
0x18 0d0 ; what moves its pitch
|
|
0x19 0d128 ; and how far
|
|
0x1A 0d0 ; what moves its gain
|
|
0x1B 0d128 ; and how far
|
|
0x20 0d4 ; amplitude envelope, attack
|
|
0x21 0d99 ; decay
|
|
0x22 0d0 ; sustain
|
|
0x23 0d40 ; release
|
|
0x30 0d4 ; modulation envelope, attack
|
|
0x31 0d40 ; decay
|
|
0x32 0d0 ; sustain
|
|
0x33 0d18 ; release
|
|
0x40 0d1 ; filter, on
|
|
0x41 0d0 ; type: 0 low, 1 high, 2 band
|
|
0x42 0d185 ; cutoff, in hertz
|
|
0x43 0d21 ; resonance
|
|
0x44 0d0 ; what moves the cutoff
|
|
0x45 0d128 ; and how far, in hertz
|
|
0x46 0d0 ; what moves the resonance
|
|
0x47 0d128 ; and how far
|
|
0x60 0d0 ; LFO 0, on
|
|
0x61 0d0 ; waveform
|
|
0x62 0d127 ; rate, in hertz
|
|
0x70 0d0 ; LFO 1, on
|
|
0x71 0d0 ; waveform
|
|
0x72 0d127 ; rate, in hertz
|
|
0x50 0d1 ; what shapes the level, which this patch predates
|