diff --git a/Programs/CosmOS/Apps/Play.asm b/Programs/CosmOS/Apps/Play.asm index ba27cd0..ad2e7b4 100644 --- a/Programs/CosmOS/Apps/Play.asm +++ b/Programs/CosmOS/Apps/Play.asm @@ -113,9 +113,23 @@ tickLoop: BRI tickLoop finished: - ; Let the last note ring rather than cutting it off, then give the timer back - stopped - ; before the handler goes away, because an interrupt with nothing to catch it is a fault. - INIB 0d8 + ; ---- Let the last note finish, and MEASURE how long that takes ---- + ; + ; The gates all went down on the tick the tracks ended, but a gate down is a note released + ; rather than a note stopped: the oboe and the strings have a release to run. Rendered and + ; measured, the tail dies out eight tenths of a second after the last event, and eight ticks + ; of ring is one second - which sounds like enough and is two tenths short of it. + ; + ; A program that exits with sound still in the air leaves nothing able to end it: the + ; program is gone and cannot drop a gate. What that turns into depends on the front end - + ; behind a window the tail simply finishes, and on a terminal EMULATED TIME STOPS while the + ; machine blocks on a key, so the tail freezes and comes out a snippet per keystroke. + ; + ; Twelve ticks is a second and a half, which covers the measured tail with room over. It is + ; a number about THESE FOUR INSTRUMENTS, and a patch with a longer release would want more - + ; the general answer is for the system to quieten the device when a program stops, the way + ; it puts the screen back, and that is not built. + INIB 0d12 lastRing: WAIT DECB