diff --git a/projects/examples/demos/drum-rack.tal b/projects/examples/demos/drum-rack.tal index 1c6d540..dbb2f6a 100644 --- a/projects/examples/demos/drum-rack.tal +++ b/projects/examples/demos/drum-rack.tal @@ -1,8 +1,4 @@ -( drum rack - - TODO - - When selecting a pad, should highlight note in octave -) +( drum rack ) %+ { ADD } %- { SUB } %* { MUL } %/ { DIV } %< { LTH } %> { GTH } %= { EQU } %! { NEQ } @@ -24,6 +20,7 @@ ( devices ) |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] +|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 ] |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] |40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ] @@ -67,6 +64,7 @@ ;on-control .Controller/vector DEO2 ;on-mouse .Mouse/vector DEO2 ;on-frame .Screen/vector DEO2 + ;on-message .Console/vector DEO2 ( channel defaults ) #dd .Audio0/volume DEO @@ -151,6 +149,12 @@ BRK +@on-message ( -> ) + + .Console/read DEI #10 MOD ;play-pad JSR2 + +BRK + @on-frame ( -> ) ( update VU monitors ) @@ -298,8 +302,8 @@ BRK BRK -@play-pad ( note pad -- ) - +@play-pad ( pad -- ) + ( unselect last ) .pads/last LDZ #01 ;draw-pad JSR2 DUP .pads/last STZ