Playing works in the daw

This commit is contained in:
neauoire 2021-04-02 19:50:20 -07:00
parent eb3026cde0
commit fc88ab0421
1 changed files with 16 additions and 7 deletions

View File

@ -25,6 +25,7 @@
|0140 ;Keys { key 1 }
|0150 ;Mouse { x 2 y 2 state 1 chord 1 }
|0160 ;File { pad 8 name 2 length 2 load 2 save 2 }
|0170 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1pitch 1 ch1vol 1 ch2pitch 1 ch2vol 1 ch3pitch 1 ch3vol 1 ch4pitch 1 ch4vol 1 }
|01F0 ;System { pad 8 r 2 g 2 b 2 }
( vectors )
@ -42,6 +43,8 @@
~Screen.width #0002 DIV2 #0080 ADD2 =frame.x2
~Screen.height #0002 DIV2 #0038 ADD2 =frame.y2
#0438 =Audio.ch1adsr
,draw-timeline JSR2
,draw-controls JSR2
@ -86,10 +89,16 @@ BRK
BRK
@bang ( -- )
(
~head.pos #08 DIV =Console.byte
,track.ch1 #00 ~head.pos #08 DIV ADD2 PEK2 =Console.byte
)
( load )
,track.ch1 #00 ~head.pos #08 DIV ADD2 PEK2
#01 SUB
DUP #ff NEQ ^$skip JNZ
POP RTN
$skip
#00 SWP ,notes ADD2 PEK2
#0c #03 MUL SUB =Audio.ch1pitch
#44 =Audio.ch1vol
RTN
@ -360,8 +369,8 @@ RTN
@vol_txt [ Volume 00 ]
@notes [
60 61 62 63 64 65 66
67 68 69 6a 6b 6c 6d
60 62 64 65 67 69 71
72 74 76 77 79 81 83
]
@knob_icns [