The warning's trill, and why it only sometimes came out
An LFO belongs to the DEVICE and not to a channel. There are two of them against four voices, and a patch carries LFO settings the way it carries everything else - so whichever patch was loaded last owns both of them, for every voice at once. The warning's trill is a saw LFO on the pitch. The patches on channel three, the bang and the latch, carry an LFO that is switched off, and they load at the moment they are used. So the first landing, docking or crash of a run took the trill away and left a plain tone, and it was right again next time the machine started. Correct until something unrelated plays is the worst shape a fault can have. The same thing had already happened silently at startup: the instruments were set up in order, so the warning's LFO settings, written last, sat on top of the rumble's and the rumble never had its own at all. So nothing is set up once any more. Each sound loads its patch immediately before its note - forty-odd writes at a moment already making a sound - and is then whatever its patch says, whatever played before it. Measured after a landing: 1056, 660, 516 hertz, then up to 1698 and down again. Two sweeps of the saw, which is the trill. What it does not fix, because it cannot: two sounds overlapping still share the LFOs, so a warning going off mid-burn re-tunes the rumble for as long as it lasts. With two between four that is the device. Three checks at the device level, where the trap can be stated exactly: a routed LFO bends a pitch (184 Hz against the 262 the note asked for), another channel's patch takes it away (272, the note itself), and saying it again gets it back (184). Written up in the Programming Manual beside the LFO mode, since the next program to want two sounds will meet it too.
This commit is contained in:
@@ -80,8 +80,6 @@ start:
|
||||
CALL putLander
|
||||
CALL putGauge
|
||||
CALL putOrbital
|
||||
CALL putThrust ; The instruments, once, the way the tiles are.
|
||||
CALL putAlarm
|
||||
|
||||
INIA 0x01
|
||||
OUTA 0x02 ; Key mode.
|
||||
@@ -2796,20 +2794,28 @@ runPend:
|
||||
BNA runPend
|
||||
RET
|
||||
|
||||
; ---- The thruster, which is a bang and then a rumble ----
|
||||
; ---- Why every sound loads its patch at the moment it plays ----
|
||||
;
|
||||
; Both on their own channels because one is struck and the other is HELD: the rumble's note
|
||||
; goes on when a thruster lights and its gate does not come up until every thruster is out.
|
||||
putThrust:
|
||||
RSTA
|
||||
OUTA 0x41
|
||||
SETD.0 ThrustOnPatch
|
||||
CALL playPatch
|
||||
INIA 0x01
|
||||
OUTA 0x41
|
||||
SETD.0 ThrustHoldPatch
|
||||
CALL playPatch
|
||||
RET
|
||||
; THE LFOs BELONG TO THE DEVICE AND NOT TO A CHANNEL. There are two of them against four
|
||||
; voices, and a patch carries LFO settings the way it carries everything else - so whichever
|
||||
; patch was loaded last owns them, for every channel at once.
|
||||
;
|
||||
; That is what made the low fuel warning sound right sometimes and not others. Its trill is a
|
||||
; saw LFO on the pitch, and the patches on channel three - the bang and the latch - carry an
|
||||
; LFO that is switched OFF. Those load at the moment they are used, so the first landing,
|
||||
; docking or crash of a run took the warning's trill away and left a plain tone. Before any of
|
||||
; them it was right, which is exactly the shape an intermittent fault has.
|
||||
;
|
||||
; It also meant the rumble never had its own LFO at all: the instruments were set up in order
|
||||
; at startup and the warning's settings, written last, sat on top of the rumble's.
|
||||
;
|
||||
; So nothing is set up once any more. Each sound loads immediately before its note, which
|
||||
; costs fifty writes at a moment already doing more than that, and means a sound is what its
|
||||
; patch says whatever played before it.
|
||||
;
|
||||
; What that does not fix, because it cannot: two sounds overlapping still share one pair of
|
||||
; LFOs, so a warning going off mid-burn re-tunes the rumble's LFO for as long as it lasts.
|
||||
; With two between four, that is in the nature of the device.
|
||||
|
||||
; ---- Lit or not, and only the CHANGES matter ----
|
||||
;
|
||||
@@ -2852,6 +2858,8 @@ thrustHaveSet:
|
||||
BRQ thrustNoPop ; Nothing newly lit, whatever else is still burning.
|
||||
RSTA
|
||||
OUTA 0x41
|
||||
SETD.0 ThrustOnPatch
|
||||
CALL playPatch
|
||||
INIA 0d36
|
||||
OUTA 0x44 ; The bang of it catching.
|
||||
thrustNoPop:
|
||||
@@ -2870,6 +2878,8 @@ thrustNoPop:
|
||||
INIA 0x01
|
||||
STA.0
|
||||
OUTA 0x41
|
||||
SETD.0 ThrustHoldPatch
|
||||
CALL playPatch ; After the pop's, so the held sound owns the LFO while it runs.
|
||||
INIA 0d60
|
||||
OUTA 0x44 ; Held, until the gate comes up.
|
||||
BRI thrustRemember
|
||||
@@ -2965,16 +2975,11 @@ watchFuelDone:
|
||||
; Effects count down from the top: the bang has three and this has two. They are separate
|
||||
; channels rather than one reused, because a crash while the warning is still sounding should
|
||||
; not cut it off - and on a machine with four voices there is no reason to be clever about it.
|
||||
putAlarm:
|
||||
INIA 0x02
|
||||
OUTA 0x41
|
||||
SETD.0 AlarmPatch
|
||||
CALL playPatch
|
||||
RET
|
||||
|
||||
alarm:
|
||||
INIA 0x02
|
||||
OUTA 0x41
|
||||
SETD.0 AlarmPatch
|
||||
CALL playPatch ; Its own LFO back, whatever the last sound left there.
|
||||
INIA 0d72 ; An octave over middle C, which is where a warning lives.
|
||||
OUTA 0x44
|
||||
RET
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user