Added NIP to piano

This commit is contained in:
neauoire 2021-08-15 13:59:56 -07:00
parent 107a59affa
commit 2ea0425c47
1 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
%RTN { JMP2r }
%TOS { #00 SWP } %TOB { SWP POP }
%TOS { #00 SWP }
%MOD { DUP2 / * - }
%LTS2 { #8000 ++ SWP2 #8000 ++ >> }
%GTS2 { #8000 ++ SWP2 #8000 ++ << }
@ -183,8 +183,8 @@ BRK
@on-touch-octave-view ( -> )
.Mouse/x DEI2 .octave-view/x1 LDZ2 -- 8// TOB #09 ! ,&no-mod JCN
.Mouse/y DEI2 .octave-view/y1 LDZ2 -- 8// TOB
.Mouse/x DEI2 .octave-view/x1 LDZ2 -- 8// NIP #09 ! ,&no-mod JCN
.Mouse/y DEI2 .octave-view/y1 LDZ2 -- 8// NIP
DUP #00 ! ,&no-incr JCN
.octave LDZ #03 = ,&no-incr JCN
.octave LDZ #01 + .octave STZ &no-incr
@ -197,7 +197,7 @@ BRK
BRK
&no-mod
.Mouse/x DEI2 .octave-view/x1 LDZ2 -- 8// TOB #06 > ,&no-key JCN
.Mouse/x DEI2 .octave-view/x1 LDZ2 -- 8// NIP #06 > ,&no-key JCN
.Mouse/x DEI2 .octave-view/x1 LDZ2 -- 8// ;notes ++ LDA .octave LDZ #0c * + ;play JSR2
( release ) #00 .Mouse/state DEO
;draw-octave JSR2
@ -207,7 +207,7 @@ BRK
@on-touch-adsr-view ( -> )
.Mouse/x DEI2 .adsr-view/x1 LDZ2 -- 8// TOB #03 /
.Mouse/x DEI2 .adsr-view/x1 LDZ2 -- 8// NIP #03 /
DUP #00 ! ,&no-a JCN
.Audio0/adsr DEI
#10 .Mouse/state DEI #10 = #e0 * + +
@ -357,7 +357,7 @@ RTN
TOS 4// .wave-view/y1 LDZ2 ++ .Screen/y DEO2
.Screen/x DEI2 #0001 ++ .Screen/x DEO2
( draw ) DUP
.Audio0/length DEI2 TOB >
.Audio0/length DEI2 NIP >
.Audio0/length DEI2 #0100 !! #0101 == #02 * #01 + .Screen/pixel DEO
#01 + GTHk ,&loop JCN
POP2