PPQ playing problem
Posted: Sun Jun 26, 2016 10:08 am
Hi,
I build a complex seq synthesizer and i use the PPQ sync for the counter. It is work but only if i play from the zero point in the timeline. If i start from other position, i see the PPQ is work with Poly readout but the counter into the float array point isn't work. I tested it on StudioOne. I don't know, maybe somethings wrong with the ASM code? I'm not too good in Assembler.
I build a complex seq synthesizer and i use the PPQ sync for the counter. It is work but only if i play from the zero point in the timeline. If i start from other position, i see the PPQ is work with Poly readout but the counter into the float array point isn't work. I tested it on StudioOne. I don't know, maybe somethings wrong with the ASM code? I'm not too good in Assembler.
Code: Select all
streamin PPQ;
streamin Div;
streamin Mult;
streamin Reset;
streamout Pulse;
streamout Ramp;
float negHalf=-0.5; float One=1;
float Count=0;
float LastPulse=0;
float LastReset=0;
//Faster clock
movaps xmm0,PPQ;
mulps xmm0,Div;
//Remove Integer Part
movaps xmm1,xmm0;
addps xmm1,negHalf;
cvtps2dq xmm1,xmm1;
cvtdq2ps xmm1,xmm1;
subps xmm0,xmm1;
movaps Pulse,xmm0;
//Count zero crossings
movaps xmm1,xmm0;
cmpps xmm0,LastPulse,1;
andps xmm0,One;
addps xmm0,Count;
movaps LastPulse,xmm1; //xmm0=count xmm1=pulse
movaps xmm2,xmm0;
cmpps xmm2,Mult,1;
movaps xmm3,Reset;
movaps xmm4,xmm3;
cmpps xmm3,LastReset,2;
andps xmm2,xmm3;
andps xmm0,xmm2;
movaps Count,xmm0;
movaps xmm4,LastReset;
//Totaliser
addps xmm0,xmm1;
movaps Ramp,xmm0;