Compare commits

...

2 Commits

Author SHA1 Message Date
Nico 289673a249 4-channel polyphony 2021-06-19 16:36:36 +01:00
Nico 0fde3823b6 half-working polyphony 2021-06-18 20:39:33 +01:00
1 changed files with 14 additions and 1 deletions

View File

@ -93,7 +93,13 @@
#0002 .Audio0/length DEO2
#0180 .Audio1/adsr DEO2
;wave .Audio1/addr DEO2
#0002 .Audio1/length DEO2
#0002 .Audio1/length DEO2
#0180 .Audio2/adsr DEO2
;wave .Audio2/addr DEO2
#0002 .Audio2/length DEO2
#0180 .Audio3/adsr DEO2
;wave .Audio3/addr DEO2
#0002 .Audio3/length DEO2
( drawing properties )
#0010 .Draw/pattern-x STZ2
@ -409,8 +415,15 @@ RTN
PTN_LEN .Playback/position LDZ2 NEQ2 ,&continue JCN ( if we're at the end of the pattern, reset the counter )
#0000 .Playback/position STZ2
&continue
( TODO make this more proper, currently a PoC of polyphony )
.Playback/position LDZ2 PTN_WIDTH MUL2 .Channel0/pattern-addr LDZ2 ADD2 ( put pattern line address on the stack )
.Audio0 ;play-line JSR2
.Playback/position LDZ2 PTN_WIDTH MUL2 .Channel1/pattern-addr LDZ2 ADD2 ( put pattern line address on the stack )
.Audio1 ;play-line JSR2
.Playback/position LDZ2 PTN_WIDTH MUL2 .Channel2/pattern-addr LDZ2 ADD2 ( put pattern line address on the stack )
.Audio2 ;play-line JSR2
.Playback/position LDZ2 PTN_WIDTH MUL2 .Channel3/pattern-addr LDZ2 ADD2 ( put pattern line address on the stack )
.Audio3 ;play-line JSR2
#0001 .Playback/position LDZ2 ADD2 .Playback/position STZ2
;draw-playhead JSR2 ( update the playhead position )
RTN