0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-19 12:25:11 +00:00
uxn/projects/examples/dev.audio.usm

516 lines
15 KiB
Text
Raw Normal View History

2021-04-02 18:50:37 +00:00
( a blank file )
%RTN { JMP2r }
%8+ { #0008 ADD2 } %8- { #0008 SUB2 }
2021-04-03 18:44:22 +00:00
%8* { #0008 MUL2 } %8/ { #0008 DIV2 }
2021-04-03 02:19:31 +00:00
%++ { #0001 ADD2 }
2021-04-02 18:50:37 +00:00
%MOD { DUP2 DIV MUL SUB }
2021-04-03 18:40:26 +00:00
%TRACK { ,track.ch1 #00 ~track.active #0020 MUL2 ADD2 }
2021-04-02 18:50:37 +00:00
( variables )
;pointer { x 2 y 2 }
;color { byte 1 }
2021-04-03 02:19:31 +00:00
;rect { x1 2 y1 2 x2 2 y2 2 }
2021-04-03 16:52:56 +00:00
;trkframe { x1 2 y1 2 x2 2 y2 2 }
;chnframe { x1 2 y1 2 x2 2 y2 2 }
;ctlframe { x1 2 y1 2 x2 2 y2 2 }
2021-04-03 02:19:31 +00:00
;label { x 2 y 2 color 1 addr 2 }
;knob { x 2 y 2 value 1 }
;head { pos 1 }
2021-04-03 16:52:56 +00:00
;track { active 1 ch1 20 ch2 20 ch3 20 ch4 20 }
2021-04-02 18:50:37 +00:00
( devices )
|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
|0110 ;Console { pad 8 char 1 byte 1 short 2 }
|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
|0140 ;Controller { buttons 1 }
|0150 ;Keys { key 1 }
2021-04-05 20:14:37 +00:00
|0160 ;Mouse { vector 2 x 2 y 2 state 1 chord 1 }
|0170 ;File { pad 8 name 2 length 2 load 2 save 2 }
|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 }
2021-04-02 18:50:37 +00:00
( vectors )
|0200 @RESET
2021-04-02 18:50:37 +00:00
2021-04-03 03:40:53 +00:00
( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b
( vectors ) ,FRAME =Screen.vector
2021-04-03 02:19:31 +00:00
2021-04-03 18:40:26 +00:00
~Screen.width #0002 DIV2 DUP2 #0080 SUB2 =trkframe.x1
#0080 ADD2 =trkframe.x2
~Screen.height #0002 DIV2 DUP2 #0038 SUB2 #0010 SUB2 =trkframe.y1
#0038 ADD2 #0010 SUB2 =trkframe.y2
2021-04-02 18:50:37 +00:00
2021-04-03 16:52:56 +00:00
~trkframe.x1 =chnframe.x1 ~trkframe.y2 =chnframe.y1
~chnframe.x1 #0030 ADD2 =chnframe.x2 ~chnframe.y1 #0030 ADD2 =chnframe.y2
2021-04-03 02:50:20 +00:00
2021-04-03 16:52:56 +00:00
~chnframe.x2 =ctlframe.x1 ~chnframe.y1 =ctlframe.y1
~trkframe.x2 =ctlframe.x2 ~chnframe.y2 =ctlframe.y2
2021-04-02 18:50:37 +00:00
2021-04-04 00:17:40 +00:00
( default settings )
#048c =Audio.ch1adsr #88 =Audio.ch1vol
#159d =Audio.ch2adsr #88 =Audio.ch2vol
#26ae =Audio.ch3adsr #88 =Audio.ch3vol
2021-04-03 03:40:53 +00:00
2021-04-03 16:52:56 +00:00
,draw-timeline JSR2
,draw-controls JSR2
,draw-channels JSR2
2021-04-03 03:40:53 +00:00
2021-04-02 18:50:37 +00:00
BRK
@FRAME
2021-04-03 02:19:31 +00:00
2021-04-02 18:50:37 +00:00
,draw-cursor JSR2
2021-04-03 02:19:31 +00:00
,move-head JSR2
~head.pos #08 MOD #00 NEQ ^$skip JNZ
,bang JSR2
$skip
~Mouse.state #00 EQU ,$click-end JNZ2
2021-04-03 16:52:56 +00:00
~Mouse.x ~trkframe.x1 GTH2 ~Mouse.x ~trkframe.x2 LTH2 #0101 EQU2
~Mouse.y ~trkframe.y1 GTH2 ~Mouse.y ~trkframe.y2 LTH2 #0101 EQU2
2021-04-03 18:24:23 +00:00
#0101 EQU2 ,touch-trk JNZ2
2021-04-03 16:52:56 +00:00
~Mouse.x ~chnframe.x1 GTH2 ~Mouse.x ~chnframe.x2 LTH2 #0101 EQU2
2021-04-03 18:44:22 +00:00
~Mouse.y ~chnframe.y1 8+ GTH2 ~Mouse.y ~chnframe.y2 8- LTH2 #0101 EQU2
2021-04-03 18:24:23 +00:00
#0101 EQU2 ,touch-chn JNZ2
~Mouse.x ~ctlframe.x1 GTH2 ~Mouse.x ~ctlframe.x2 LTH2 #0101 EQU2
2021-04-03 18:44:22 +00:00
~Mouse.y ~ctlframe.y1 8+ GTH2 ~Mouse.y ~ctlframe.y2 8- LTH2 #0101 EQU2
2021-04-03 18:24:23 +00:00
#0101 EQU2 ,touch-ctl JNZ2
2021-04-03 02:19:31 +00:00
$click-end
2021-04-02 18:50:37 +00:00
BRK
2021-04-03 18:24:23 +00:00
@touch-trk ( -- )
,clear-notes JSR2
( get note )
#0e ~Mouse.y ~trkframe.y1 SUB2 SWP POP #08 DIV SUB
2021-04-03 18:40:26 +00:00
~Mouse.state #10 NEQ ^$no-erase JNZ POP #00 $no-erase
( edit note )
TRACK #00 ~Mouse.x ~trkframe.x1 SUB2 SWP POP #08 DIV ADD2 POK2
2021-04-03 18:24:23 +00:00
( release ) #00 =Mouse.state
,draw-notes JSR2
BRK
@touch-chn ( -- )
,clear-notes JSR2
2021-04-03 18:40:26 +00:00
( save ) ~Mouse.y ~chnframe.y1 SUB2 SWP POP #08 DIV #01 SUB =track.active
2021-04-03 18:24:23 +00:00
( release ) #00 =Mouse.state
,draw-channels JSR2
,draw-notes JSR2
,draw-controls JSR2
BRK
@touch-ctl ( -- )
2021-04-03 18:44:22 +00:00
~Mouse.x ~ctlframe.x1 SUB2 8- 8/ SWP POP #02 DIV
2021-04-03 18:40:26 +00:00
DUP #00 NEQ ^$no-a JNZ
2021-04-03 18:24:23 +00:00
,Audio #00 ~track.active #02 MUL ADD2 PEK2
2021-04-04 00:17:40 +00:00
#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
,Audio #00 ~track.active #02 MUL ADD2 POK2 $no-a
2021-04-03 18:40:26 +00:00
DUP #01 NEQ ^$no-d JNZ
2021-04-03 18:24:23 +00:00
,Audio #00 ~track.active #02 MUL ADD2 PEK2
2021-04-03 19:05:13 +00:00
DUP #f0 AND STH #01 ~Mouse.state #10 EQU #0e MUL ADD ADD #0f AND STHr ADD
2021-04-03 18:40:26 +00:00
,Audio #00 ~track.active #02 MUL ADD2 POK2 $no-d
DUP #02 NEQ ^$no-s JNZ
2021-04-03 18:44:22 +00:00
,Audio #00 ~track.active #02 MUL ADD2 ++ PEK2
2021-04-04 00:17:40 +00:00
#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
,Audio #00 ~track.active #02 MUL ADD2 ++ POK2 $no-s
2021-04-03 18:40:26 +00:00
DUP #03 NEQ ^$no-r JNZ
2021-04-03 18:44:22 +00:00
,Audio #00 ~track.active #02 MUL ADD2 ++ PEK2
2021-04-03 19:05:13 +00:00
DUP #f0 AND STH #01 ~Mouse.state #10 EQU #0e MUL ADD ADD #0f AND STHr ADD
2021-04-03 18:44:22 +00:00
,Audio #00 ~track.active #02 MUL ADD2 ++ POK2 $no-r
2021-04-04 00:17:40 +00:00
DUP #05 NEQ ^$no-left JNZ
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 PEK2
2021-04-04 00:17:40 +00:00
#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 POK2 $no-left
2021-04-04 00:17:40 +00:00
DUP #06 NEQ ^$no-right JNZ
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 PEK2
2021-04-04 00:17:40 +00:00
DUP #f0 AND STH #01 ~Mouse.state #10 EQU #0e MUL ADD ADD #0f AND STHr ADD
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 POK2 $no-right
2021-04-03 18:40:26 +00:00
POP
2021-04-03 18:24:23 +00:00
( release ) #00 =Mouse.state
,draw-controls JSR2
BRK
2021-04-03 02:19:31 +00:00
@bang ( -- )
2021-04-03 02:50:20 +00:00
,track.ch1 #00 ~head.pos #08 DIV ADD2 PEK2
#01 SUB
2021-04-03 16:52:56 +00:00
DUP #ff NEQ ^$skip1 JNZ
POP ^$listen2 JMP
$skip1
#00 SWP ,notes ADD2 PEK2 =Audio.ch1pitch
2021-04-03 16:52:56 +00:00
$listen2
,track.ch2 #00 ~head.pos #08 DIV ADD2 PEK2
#01 SUB
DUP #ff NEQ ^$skip2 JNZ
POP ^$listen3 JMP
$skip2
#00 SWP ,notes ADD2 PEK2 =Audio.ch2pitch
2021-04-03 16:52:56 +00:00
$listen3
,track.ch3 #00 ~head.pos #08 DIV ADD2 PEK2
#01 SUB
DUP #ff NEQ ^$skip3 JNZ
POP ^$end JMP
$skip3
#00 SWP ,notes ADD2 PEK2 =Audio.ch3pitch
2021-04-03 16:52:56 +00:00
$end
2021-04-03 02:19:31 +00:00
RTN
@move-head ( -- )
( clear )
2021-04-03 18:44:22 +00:00
~trkframe.y1 8- =Sprite.y
2021-04-03 16:52:56 +00:00
~trkframe.x1 #00 ~head.pos ADD2 =Sprite.x
2021-04-03 02:19:31 +00:00
,head_icn =Sprite.addr
#00 =Sprite.color
( incr ) ~head.pos #01 ADD =head.pos
2021-04-03 16:52:56 +00:00
~trkframe.x1 #00 ~head.pos ADD2 =Sprite.x
2021-04-03 18:40:26 +00:00
,head_icn =Sprite.addr
#01 ( if note ) TRACK #00 ~head.pos #08 DIV ADD2 PEK2 #00 NEQ ADD =Sprite.color
2021-04-03 02:19:31 +00:00
RTN
@clear-notes ( -- )
#00 #20
$loop
2021-04-03 18:40:26 +00:00
( load ) OVR #00 SWP TRACK ADD2 PEK2
2021-04-03 18:44:22 +00:00
DUP STH #00 SWP #0e SWP SUB 8* ~trkframe.y1 ADD2 =Sprite.y
OVR #00 SWP 8* ~trkframe.x1 ADD2 =Sprite.x
2021-04-03 16:52:56 +00:00
STHr #00 EQU ^$skip JNZ
#00 =Sprite.color
$skip
2021-04-03 02:19:31 +00:00
( incr ) SWP #01 ADD SWP
DUP2 LTH ^$loop JNZ
POP2
RTN
@draw-notes ( -- )
#00 #20
$notes-loop
2021-04-03 18:40:26 +00:00
( load ) OVR #00 SWP TRACK ADD2 PEK2
2021-04-03 18:44:22 +00:00
DUP STH #00 SWP #0e SWP SUB 8* ~trkframe.y1 ADD2 =Sprite.y
OVR #00 SWP 8* ~trkframe.x1 ADD2 =Sprite.x
2021-04-03 18:24:23 +00:00
,note_icn =Sprite.addr
2021-04-03 16:52:56 +00:00
STHr #00 EQU ^$skip JNZ
#05 =Sprite.color
$skip
2021-04-03 02:19:31 +00:00
( incr ) SWP #01 ADD SWP
DUP2 LTH ^$notes-loop JNZ
POP2
2021-04-03 16:52:56 +00:00
,draw-bars JSR2
2021-04-03 02:19:31 +00:00
RTN
2021-04-02 18:50:37 +00:00
@draw-bars ( -- )
2021-04-03 02:19:31 +00:00
2021-04-03 16:52:56 +00:00
~trkframe.x1 ~trkframe.y1 ~trkframe.x2 ~trkframe.y2 #01 ,line-rect JSR2
2021-04-02 18:50:37 +00:00
2021-04-03 02:19:31 +00:00
( grid )
2021-04-03 16:52:56 +00:00
~trkframe.y1 #0010 SUB2 =Sprite.y
2021-04-02 18:50:37 +00:00
,font_hex =Sprite.addr
#0000 #0100
$loop
OVR2 SWP POP #02 DIV #0f AND #00 NEQ ^$skip JNZ
2021-04-03 16:52:56 +00:00
OVR2 ~trkframe.x1 ADD2 =Sprite.x
2021-04-03 18:24:23 +00:00
#02 =Sprite.color
2021-04-02 18:50:37 +00:00
~Sprite.addr 8+ =Sprite.addr
2021-04-03 18:44:22 +00:00
OVR2 ~trkframe.x1 ADD2 ~trkframe.y1 ++ ~trkframe.y2 #01 ,line-vertical-dotted JSR2
2021-04-02 18:50:37 +00:00
$skip
2021-04-03 16:52:56 +00:00
OVR2 ~trkframe.x1 ADD2 ~trkframe.y1 ~trkframe.y2 #01 ,line-vertical-dotted JSR2
2021-04-03 18:44:22 +00:00
SWP2 8+ SWP2
2021-04-02 18:50:37 +00:00
OVR2 OVR2 LTH2 ^$loop JNZ
POP2
POP2
2021-04-03 18:44:22 +00:00
~trkframe.x1 ~trkframe.x2 ~trkframe.y1 8- #0040 ADD2 #01 ,line-horizontal-dotted JSR2
2021-04-03 02:19:31 +00:00
2021-04-02 18:50:37 +00:00
RTN
@draw-octave ( x y -- )
=Sprite.y
=Sprite.x
,octave_icn =Sprite.addr
~Sprite.y ~Sprite.y #0038 ADD2
$loop
OVR2 =Sprite.y
#01 =Sprite.color
~Sprite.addr 8+ =Sprite.addr
~Sprite.x 8+ =Sprite.x
#01 =Sprite.color
~Sprite.addr 8+ =Sprite.addr
~Sprite.x 8- =Sprite.x
2021-04-03 18:44:22 +00:00
SWP2 8+ SWP2
2021-04-02 18:50:37 +00:00
OVR2 OVR2 LTH2 ^$loop JNZ
POP2
POP2
RTN
@draw-octaves ( -- )
2021-04-03 18:40:26 +00:00
~trkframe.x1 #0018 SUB2 DUP2 ~trkframe.y1 ,draw-octave JSR2
~trkframe.y1 #0038 ADD2 ,draw-octave JSR2
2021-04-03 16:52:56 +00:00
~trkframe.x1 #0028 SUB2 =Sprite.x
~trkframe.y1 =Sprite.y
2021-04-02 18:50:37 +00:00
,font_hex #0060 ADD2 =Sprite.addr
2021-04-03 18:24:23 +00:00
#03 =Sprite.color
2021-04-03 16:52:56 +00:00
~trkframe.x1 #0030 SUB2 =Sprite.x
2021-04-03 02:19:31 +00:00
,font_hex #0020 ADD2 =Sprite.addr
2021-04-03 18:24:23 +00:00
#03 =Sprite.color
2021-04-03 16:52:56 +00:00
~trkframe.x1 #0028 SUB2 =Sprite.x
~trkframe.y1 #0038 ADD2 =Sprite.y
2021-04-02 18:50:37 +00:00
,font_hex #0060 ADD2 =Sprite.addr
2021-04-03 18:24:23 +00:00
#03 =Sprite.color
2021-04-03 16:52:56 +00:00
~trkframe.x1 #0030 SUB2 =Sprite.x
2021-04-03 02:19:31 +00:00
,font_hex #0018 ADD2 =Sprite.addr
2021-04-03 18:24:23 +00:00
#03 =Sprite.color
2021-04-02 18:50:37 +00:00
RTN
@draw-timeline ( -- )
,draw-bars JSR2
,draw-octaves JSR2
RTN
2021-04-03 02:19:31 +00:00
@draw-knob ( x* y* value -- )
2021-04-02 18:50:37 +00:00
2021-04-03 18:40:26 +00:00
( load ) =knob.value =knob.y =knob.x
2021-04-03 02:19:31 +00:00
~knob.x =Sprite.x
2021-04-03 18:24:23 +00:00
~knob.y =Sprite.y ,knob_icns =Sprite.addr #01 =Sprite.color
~knob.x 8+ =Sprite.x ,knob_icns 8+ =Sprite.addr #01 =Sprite.color
~knob.y 8+ =Sprite.y ,knob_icns #0018 ADD2 =Sprite.addr #01 =Sprite.color
~knob.x =Sprite.x ,knob_icns #0010 ADD2 =Sprite.addr #01 =Sprite.color
~knob.x #00 #00 ~knob.value ,knob_offsetx ADD2 PEK2 ADD2 =Sprite.x
~knob.y #00 #00 ~knob.value ,knob_offsety ADD2 PEK2 ADD2 =Sprite.y
2021-04-03 02:19:31 +00:00
,knob_icns #0020 ADD2 =Sprite.addr
#05 =Sprite.color
~knob.x #0004 ADD2 =Sprite.x
~knob.y #0010 ADD2 =Sprite.y
,font_hex #00 ~knob.value #08 MUL ADD2 =Sprite.addr
#01 =Sprite.color
RTN
@draw-controls ( -- )
2021-04-03 16:52:56 +00:00
~ctlframe.x1 ~ctlframe.y1 ~ctlframe.x2 ~ctlframe.y2 #01 ,line-rect JSR2
2021-04-04 00:17:40 +00:00
( env )
2021-04-03 18:44:22 +00:00
~ctlframe.x1 8+ ~ctlframe.y1 8+ #02 ,env_txt ,draw-label JSR2
~ctlframe.x1 8+ ~ctlframe.y1 #0010 ADD2
2021-04-03 18:24:23 +00:00
,Audio #00 ~track.active #02 MUL ADD2 PEK2 #04 SFT
2021-04-03 18:40:26 +00:00
,draw-knob JSR2
2021-04-03 18:24:23 +00:00
~ctlframe.x1 #0018 ADD2 ~ctlframe.y1 #0010 ADD2
,Audio #00 ~track.active #02 MUL ADD2 PEK2 #0f AND
2021-04-03 18:40:26 +00:00
,draw-knob JSR2
2021-04-03 18:24:23 +00:00
~ctlframe.x1 #0028 ADD2 ~ctlframe.y1 #0010 ADD2
2021-04-03 18:44:22 +00:00
,Audio #00 ~track.active #02 MUL ADD2 ++ PEK2 #04 SFT
2021-04-03 18:40:26 +00:00
,draw-knob JSR2
2021-04-03 18:24:23 +00:00
~ctlframe.x1 #0038 ADD2 ~ctlframe.y1 #0010 ADD2
2021-04-03 18:44:22 +00:00
,Audio #00 ~track.active #02 MUL ADD2 ++ PEK2 #0f AND
2021-04-03 18:40:26 +00:00
,draw-knob JSR2
2021-04-04 00:17:40 +00:00
( vol )
~ctlframe.x1 #0058 ADD2 ~ctlframe.y1 8+ #02 ,vol_txt ,draw-label JSR2
~ctlframe.x1 #0058 ADD2 ~ctlframe.y1 #0010 ADD2
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 PEK2 #04 SFT
2021-04-04 00:17:40 +00:00
,draw-knob JSR2
~ctlframe.x1 #0068 ADD2 ~ctlframe.y1 #0010 ADD2
2021-04-04 03:29:00 +00:00
,Audio 8+ #00 ~track.active #02 MUL ADD2 PEK2 #0f AND
2021-04-04 00:17:40 +00:00
,draw-knob JSR2
2021-04-03 16:52:56 +00:00
RTN
@draw-channels
~chnframe.x1 ~chnframe.y1 ~chnframe.x2 ~chnframe.y2 #01 ,line-rect JSR2
2021-04-03 18:44:22 +00:00
~chnframe.x1 8+ ~chnframe.y1 8+ #01 ~track.active #00 EQU #07 MUL ADD ,ch1_txt ,draw-label JSR2
~chnframe.x1 8+ ~chnframe.y1 #0010 ADD2 #01 ~track.active #01 EQU #07 MUL ADD ,ch2_txt ,draw-label JSR2
~chnframe.x1 8+ ~chnframe.y1 #0018 ADD2 #01 ~track.active #02 EQU #07 MUL ADD ,ch3_txt ,draw-label JSR2
~chnframe.x1 8+ ~chnframe.y1 #0020 ADD2 #01 ~track.active #03 EQU #07 MUL ADD ,ch4_txt ,draw-label JSR2
2021-04-02 18:50:37 +00:00
RTN
@draw-cursor ( -- )
( clear last cursor )
,clear_icn =Sprite.addr
~pointer.x =Sprite.x
~pointer.y =Sprite.y
#10 =Sprite.color
( record pointer positions )
~Mouse.x =pointer.x ~Mouse.y =pointer.y
( draw new cursor )
,cursor_icn =Sprite.addr
~pointer.x =Sprite.x
~pointer.y =Sprite.y
2021-04-03 03:40:53 +00:00
#12 ~Mouse.state #00 NEQ ADD =Sprite.color
2021-04-02 18:50:37 +00:00
RTN
2021-04-03 02:19:31 +00:00
( generics )
@draw-label ( x y color addr -- )
( load ) =label.addr =label.color =Sprite.y =Sprite.x
~label.addr
$loop
2021-04-03 18:44:22 +00:00
( draw ) DUP2 PEK2 #00 SWP 8* ,font ADD2 =Sprite.addr ~label.color =Sprite.color
( incr ) ++
( incr ) ~Sprite.x 8+ =Sprite.x
2021-04-03 02:19:31 +00:00
DUP2 PEK2 #00 NEQ ^$loop JNZ
POP2
RTN
@line-vertical-dotted ( x y0 y1 color -- )
=color STH2 SWP2 =Screen.x STH2r OVR2 =Screen.y
$draw-ver
( draw ) ~color =Screen.color
( incr ) SWP2 #0002 ADD2 DUP2 =Screen.y SWP2
OVR2 OVR2 LTH2 ^$draw-ver JNZ
POP2 POP2
RTN
@line-horizontal-dotted ( x0 x1 y color -- )
=color =Screen.y OVR2 =Screen.x
$draw-hor
( draw ) ~color =Screen.color
( incr ) SWP2 #0002 ADD2 DUP2 =Screen.x SWP2
OVR2 OVR2 LTH2 ^$draw-hor JNZ
POP2 POP2
RTN
@line-rect ( x1 y1 x2 y2 color )
( load ) =color =rect.y2 =rect.x2 DUP2 =Screen.y =rect.y1 DUP2 =Screen.x =rect.x1
$hor
( incr ) ~Screen.x ++ =Screen.x
( draw ) ~rect.y1 =Screen.y ~color =Screen.color
( draw ) ~rect.y2 =Screen.y ~color =Screen.color
~Screen.x ~rect.x2 LTH2 ^$hor JNZ
~rect.y1 =Screen.y
$ver
( draw ) ~rect.x1 =Screen.x ~color =Screen.color
( draw ) ~rect.x2 =Screen.x ~color =Screen.color
( incr ) ~Screen.y ++ =Screen.y
~Screen.y ~rect.y2 ++ LTH2 ^$ver JNZ
RTN
2021-04-03 16:52:56 +00:00
@ch1_txt [ CHN0 00 ]
@ch2_txt [ CHN1 00 ]
@ch3_txt [ CHN2 00 ]
2021-04-03 18:24:23 +00:00
@ch4_txt [ ---- 00 ]
2021-04-03 03:40:53 +00:00
@env_txt [ Envelope 00 ]
2021-04-03 02:19:31 +00:00
@vol_txt [ Volume 00 ]
2021-04-03 18:40:26 +00:00
@clear_icn [ 0000 0000 0000 0000 ]
@cursor_icn [ 80c0 e0f0 f8e0 1000 ]
@note_icn [ 0000 1c3e 3e3e 1c00 ]
@head_icn [ 0018 1818 7e3c 1800 ]
2021-04-03 02:19:31 +00:00
@notes [
3c 3e 40 41 43 45 47
48 4a 4c 4d 4f 51 53
2021-04-03 02:19:31 +00:00
]
@knob_icns [
0003 0c10 2020 4040
00c0 3008 0404 0202
4040 2020 100c 0300
0202 0404 0830 c000
0000 183c 3c18 0000
]
2021-04-02 18:50:37 +00:00
@octave_icn [
ff00 0000 fefe fffe
ff01 0101 0102 fc00
fffe fc00 fefe fffe
ff01 0101 0102 fc00
fffe fc00 fefe fffe
ff01 0101 0102 fc00
fffe fc00 0000 ff00
ff01 0101 0102 fc00
ff00 0000 fefe fffe
ff01 0101 0102 fc00
fffe fc00 fefe fffe
ff01 0101 0102 fc00
fffe fc00 0000 ff00
ff01 0101 0102 fc00
]
2021-04-03 18:40:26 +00:00
@knob_offsetx [
04 05 06 07 08 07 06 05
04 04 03 02 01 00 01 02
2021-04-03 18:24:23 +00:00
]
2021-04-03 18:40:26 +00:00
@knob_offsety [
00 01 02 03 04 05 06 07
08 07 06 05 04 04 03 02
2021-04-03 18:24:23 +00:00
]
2021-04-02 18:50:37 +00:00
@font_hex ( 0-F )
[
007c 8282 8282 827c 0030 1010 1010 1010
007c 8202 7c80 80fe 007c 8202 1c02 827c
000c 1424 4484 fe04 00fe 8080 7c02 827c
007c 8280 fc82 827c 007c 8202 1e02 0202
007c 8282 7c82 827c 007c 8282 7e02 827c
007c 8202 7e82 827e 00fc 8282 fc82 82fc
007c 8280 8080 827c 00fc 8282 8282 82fc
007c 8280 f080 827c 007c 8280 f080 8080
]
2021-04-03 02:19:31 +00:00
@font ( spectrum-zx font )
[
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
007e 4242 4242 7e00 0000 1824 2418 0000 0018 2442 4224 1800 001e 063a 4a48 3000
0038 446c 107c 1000 000c 0808 0838 3800 003e 2222 2266 6600 0000 0822 0022 0800
0000 1018 1c18 1000 0000 0818 3818 0800 0008 1c00 001c 0800 0028 2828 2800 2800
003e 4a4a 3a0a 0a00 000c 3046 620c 3000 0000 0000 0000 ffff 0010 3800 3810 0038
0008 1c2a 0808 0800 0008 0808 2a1c 0800 0000 0804 7e04 0800 0000 1020 7e20 1000
0000 4040 7e00 0000 0000 0024 6624 0000 0000 1038 7c00 0000 0000 007c 3810 0000
0000 0000 0000 0000 0008 0808 0800 0800 0014 1400 0000 0000 0024 7e24 247e 2400
0008 1e28 1c0a 3c08 0042 0408 1020 4200 0030 4832 4c44 3a00 0008 1000 0000 0000
0004 0808 0808 0400 0010 0808 0808 1000 0000 1408 3e08 1400 0000 0808 3e08 0800
0000 0000 0008 0810 0000 0000 3c00 0000 0000 0000 0000 0800 0000 0204 0810 2000
003c 464a 5262 3c00 0018 2808 0808 3e00 003c 4202 3c40 7e00 003c 421c 0242 3c00
0008 1828 487e 0800 007e 407c 0242 3c00 003c 407c 4242 3c00 007e 0204 0810 1000
003c 423c 4242 3c00 003c 4242 3e02 3c00 0000 0008 0000 0800 0000 0800 0008 0810
0000 0810 2010 0800 0000 003e 003e 0000 0000 1008 0408 1000 003c 4202 0c00 0800
003c 425a 5442 3c00 0018 2442 7e42 4200 007c 427c 4242 7c00 003c 4240 4042 3c00
0078 4442 4244 7800 007e 407c 4040 7e00 003e 4040 7c40 4000 003c 4240 4e42 3c00
0042 427e 4242 4200 003e 0808 0808 3e00 0002 0202 4242 3c00 0044 4870 4844 4200
0040 4040 4040 7e00 0042 665a 4242 4200 0042 6252 4a46 4200 003c 4242 4242 3c00
007c 4242 7c40 4000 003c 4242 524a 3c00 007c 4242 7c44 4200 003c 403c 0242 3c00
00fe 1010 1010 1000 0042 4242 4242 3c00 0042 4242 4224 1800 0042 4242 5a66 4200
0042 2418 1824 4200 0082 4428 1010 1000 007e 0408 1020 7e00 000c 0808 0808 0c00
0040 2010 0804 0200 0018 0808 0808 1800 0008 1422 0000 0000 0000 0000 0000 7e00
0008 0400 0000 0000 0000 1c02 1e22 1e00 0020 203c 2222 3c00 0000 1e20 2020 1e00
0002 021e 2222 1e00 0000 1c22 3c20 1e00 000c 101c 1010 1000 0000 1c22 221e 021c
0020 202c 3222 2200 0008 0018 0808 0400 0008 0008 0808 4830 0020 2428 3028 2400
0010 1010 1010 0c00 0000 6854 5454 5400 0000 5864 4444 4400 0000 3844 4444 3800
0000 7844 4478 4040 0000 3c44 443c 0406 0000 2c30 2020 2000 0000 3840 3804 7800
0010 103c 1010 0c00 0000 4444 4444 3800 0000 4444 2828 1000 0000 4454 5454 2800
0000 4428 1028 4400 0000 4444 443c 0438 0000 7c08 1020 7c00 000c 0810 1008 0c00
0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c
]