uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit fc88ab0421d76a23772792b5c088e2ed45823495
parent eb3026cde0522ef0eb1326a396db7f33e9b1848a
Author: neauoire <aliceffekt@gmail.com>
Date:   Fri,  2 Apr 2021 19:50:20 -0700

Playing works in the daw

Diffstat:
Mprojects/examples/dev.audio.usm | 23++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/projects/examples/dev.audio.usm b/projects/examples/dev.audio.usm @@ -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,11 +89,17 @@ 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 @move-head ( -- ) @@ -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 [