music parts come in and out

This commit is contained in:
~d6 2024-08-03 23:58:22 -04:00
parent 7388a00a52
commit 707e611319
1 changed files with 12 additions and 8 deletions

View File

@ -456,17 +456,21 @@
@start-audio ( -> )
#0000 .audio/pos #01 .audio STZ STZ2 !play-audio
@play-track ( pos* track* dev^ -> )
@play-track ( pos* track* dev^ mute^ -> )
?&muted
STH ADD2 LDA DUP #ff EQU ?{ STHr #0f ORA DEO JMP2r } POP POPr JMP2r
&muted #0f ORA #00 SWP DEO POP2 POP2 JMP2r
@muted ( k^ div^ pos* -> bool^ )
#06 SFT2 NIP SWP DIVk MUL SUB EQU JMP2r
@play-audio ( -> )
.audio/pos LDZ2 ( pos* )
DUP2 ;track-1 .Audio1 play-track ( pos* )
DUP2 ;track-2 .Audio2 play-track ( pos* )
DUP2 ;track-3 .Audio3 play-track ( pos* )
DUP2 ;track-4 .Audio4 play-track ( pos* )
INC2 #003f AND2 ( [pos+1]%64 )
.audio/pos STZ2 JMP2r ( )
.audio/pos LDZ2 STH2k #003f AND2 ( pos* [orig*] )
DUP2 ;track-1 .Audio1 #040b STH2kr muted play-track ( pos* [orig*] )
DUP2 ;track-2 .Audio2 #0203 STH2kr muted play-track ( pos* [orig*] )
DUP2 ;track-3 .Audio3 #0305 STH2kr muted play-track ( pos* [orig*] )
;track-4 .Audio4 #090b STH2kr muted play-track ( [orig*] )
STH2r INC2 .audio/pos STZ2 JMP2r ( )
@on-audio ( -> brk )
.audio LDZ ?{ BRK } play-audio BRK