Sample stream mixer
Hello.
I tried to go as far as I could in a reasonable amount of time, and now I am submitting myself to you for judgement.
I am trying to write my own simple mixer, but got stuck when trying to use the sample stream from Chip's vocaltract.
I looked through stereospatializer and copied bits for the timing, but it is still not going right.
I think it isn't synced and is reading from the hub as the hub is being written to. There is bad digital noise, even when it is supposed to be silent.
If that is the case, how do I sync the mixer and vocaltract?
Thanks for any help you can provide.
I tried to go as far as I could in a reasonable amount of time, and now I am submitting myself to you for judgement.
I am trying to write my own simple mixer, but got stuck when trying to use the sample stream from Chip's vocaltract.
I looked through stereospatializer and copied bits for the timing, but it is still not going right.
I think it isn't synced and is reading from the hub as the hub is being written to. There is bad digital noise, even when it is supposed to be silent.
If that is the case, how do I sync the mixer and vocaltract?
VAR
long samples, cnt_
PUB start (addy)
samples := addy
cnt_ := clkfreq / 20_000
cognew(@mixer, @samples)
DAT
org 0
mixer mov temp1, par
rdlong temp1, temp1
mov temp2, #6
shl temp2, #26
add temp2, #15
mov ctra, temp2
mov dira, #1
shl dira, #15
mov t1, par
add t1, #4
rdlong cnt_ticks,t1 'get cnt ticks
mov cnt_value,cnt 'prepare for initial waitcnt
add cnt_value,cnt_ticks
:loop waitcnt cnt_value,cnt_ticks
rdlong frqa, temp1
jmp #:loop
temp1 res
temp2 res
t1 res
cnt_ticks res
cnt_value res
Thanks for any help you can provide.

Comments
mov t1,x 'update duty cycle output for pin driving [color="red"]add t1,h80000000 mov frqb,t1[/color] mov t1,par 'update sample receiver in main memory add t1,#1*4 [color="blue"]wrlong x,t1[/color]