Page 1 of 1

Ppq / Beats / Bars -aware sample loop player.

Posted: Wed May 22, 2019 12:38 am
by lalalandsynth
I am working on a sample loop player ,so far I have managed to have it sync to tempo regardless of original tempo.

I am wondering if it would be possible to - say I start 2 beats into a bar in the DAW that the loop would be aware of that and start playing two beats in ?

I might also start playing at a random spot in the bar and would like it to either sync up at the next beat or preferably start playing at the right spot no matter where in the bar i push play.

Now the loop is currently played with a 64 bit precision counter and I wonder how I could approach this .

The loop length in samples and DAW bpm is known so I am thinking If I could somehow Offset the precision counters start point ..I do have a start point input the the counter , but unsure how to get the PPQ position and translate that into the initial start position offset .

Or Maybe I am thinking this all wrong and there is a way to have sample accurate ramp to control this somehow ?
I do have a synced Ramp that would work but unsure how to translate that value to play the index for the wave reader. If i could somehow translate that 0-1 ramp to play the 4 bar 176400 sample (in this particular case) then I guess that would work.

Am I making sense ?

Re: Ppq / Beats / Bars -aware sample loop player.

Posted: Wed May 22, 2019 1:48 am
by lalalandsynth
I think I might have solved this.
will report when I have verified.

Re: Ppq / Beats / Bars -aware sample loop player.

Posted: Wed May 22, 2019 12:38 pm
by wlangfor@uoguelph.ca
So, like a randomizing feature? like slide.. or? Anyways, I was going to make an 808 vsti so I look forward to seeing what You come up with.

Re: Ppq / Beats / Bars -aware sample loop player.

Posted: Wed May 22, 2019 2:55 pm
by lalalandsynth
No essentially I wanted to make sure that the loop would start playing at beat 2 if I start playing at beat 2 in the daw.

Re: Ppq / Beats / Bars -aware sample loop player.

Posted: Thu May 23, 2019 3:23 pm
by wlangfor@uoguelph.ca
Oh, yes of Course. It's a shame that some of the DAW releated stuff from synthmaker no longer seems effective. Like playing. Though I suppose a mono float instance is relevant enough assuming You're not accommodating dc.