~rabbits/zombie

e8aaa889dbac21e4975635068e30f5a48bcbe0a1 — Devine Lu Linvega 1 year, 9 months ago a4fd22f
Connected env knobs
1 files changed, 45 insertions(+), 11 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +45 -11
@@ 81,8 81,8 @@
	;left-txt ;print-str JSR2

	( setup synth )
	#ff .Audio0/volume DEO
	#ff .Audio1/volume DEO
	#fd .Audio0/volume DEO
	#df .Audio1/volume DEO
	#ff .Audio2/volume DEO
	#ff .Audio3/volume DEO



@@ 248,9 248,40 @@ BRK

	.Mouse/x DEI2 #03 SFT2 NIP #02 SUB SWP

	OVR #03 LTH ,&on-chan JCN
	OVR #03 LTH ;&on-chan JCN2

	POP2
	( adsr ) #00 .sel/chan LDZ #30 SFT ;song/piano-env ADD2 STH2
	POP
	#04 SUB #01 SFT
	DUP #00 NEQ ,&no-a JCN
		STH2kr LDA2
			( a ) DUP2 #0fff AND2 SWP2
			( b ) #f000 AND2 #1000 ADD2 #f000 AND2 ADD2
				 STH2kr STA2
		&no-a
	DUP #01 NEQ ,&no-d JCN
		STH2kr LDA2
			( a ) DUP2 #f0ff AND2 SWP2
			( b ) #0f00 AND2 #0100 ADD2 #0f00 AND2 ADD2
				 STH2kr STA2
		&no-d
	DUP #02 NEQ ,&no-s JCN
		STH2kr LDA2
			( a ) DUP2 #ff0f AND2 SWP2
			( b ) #00f0 AND2 #0010 ADD2 #00f0 AND2 ADD2
				 STH2kr STA2
		&no-s
	DUP #03 NEQ ,&no-r JCN
		STH2kr LDA2
			( a ) DUP2 #fff0 AND2 SWP2
			( b ) #000f AND2 #0001 ADD2 #000f AND2 ADD2
				 STH2kr STA2
		&no-r
	POP
	POP2r

	;draw-controls JSR2
	#00 .Mouse/state DEO

BRK



@@ 749,18 780,21 @@ JMP2r
	#00f0 .Screen/y DEO2
	;env-txt ;draw-str JSR2 POP2

	#0030 #00f8 #00 ;draw-knob JSR2
	#0040 #00f8 #0a ;draw-knob JSR2
	#0050 #00f8 #02 ;draw-knob JSR2
	#0060 #00f8 #07 ;draw-knob JSR2
	.sel/chan LDZ ;print/byte JSR2 #0a18 DEO

	#00 .sel/chan LDZ #30 SFT ;song/piano-env ADD2 LDA2 SWP STH2
	#0030 #00f8 STHkr #04 SFT ;draw-knob JSR2
	#0040 #00f8 STHr #0f AND ;draw-knob JSR2
	#0050 #00f8 STHkr #04 SFT ;draw-knob JSR2
	#0060 #00f8 STHr #0f AND ;draw-knob JSR2

	( bal )
	#0078 .Screen/x DEO2 
	#0080 .Screen/x DEO2 
	#00f0 .Screen/y DEO2
	;bal-txt ;draw-str JSR2 POP2

	#0078 #00f8 #08 ;draw-knob JSR2
	#0088 #00f8 #08 ;draw-knob JSR2
	#0080 #00f8 #08 ;draw-knob JSR2
	#0090 #00f8 #08 ;draw-knob JSR2

	( waveform )
	#00b0 .Screen/x DEO2