[PD] Looping samples with tabread4~
fbar at footils.org
Thu May 17 18:35:51 CEST 2007
Matteo Sisti Sette hat gesagt: // Matteo Sisti Sette wrote:
> And yes, when looping there's no advantage of rpole over phasor. For the
> first cycle that only plays once however, or for the case of playing a
> sample with variable pitch but without loop, the advantage of rpole is IMHO
> simplicity: you don't have to scale the input and output depending on sample
> length as with phasor.
Unfortunatly also rpole~ is quantized to blocks, when it comes to
setting it's internal state through messages. See attached patch.
Otherwise it would be a useful vline~ replacement. But as such it
really requires working completely in the signal domain.
> >Show us the code! ;)
> Of course I will, as soon as I try it.
> >This may work, but indeed would be very complicated. Also I assume,
> >that changing the frequency of the phasor~ before you've reached the
> >loop area would completely mess up the caluclations of phase and/or
> >frequency of the second phasor~, especially as you can only set the
> >phase of a phasor~ once every block.
> Not totally sure until i try and code it, but I think the phase of the
> phasor(s) (and the scaling factors) only need to be set up at the very
> beginning, and changing the frequency at any moment won't mess up anything
> since the frequency feeds both phasors (or both the phasor and the rpole) at
> the same time.
Hm, yes, that's right! Changing the frequency of the looping phasor~ B
as well as that of phasor~ A should still let them both end at LB at
the same time, at least if my considerations below are correct:
To meet at LB the phase difference between both phasors (in samples)
d = (LB - SS) mod (LE - LB)
which gets a bit simpler if SS is assumed to be 0:
d = LB mod (LE - LB)
Anyway the frequency of the phasor doesn't even show up in this
formula, so the calculation is independent from frequency and thus
should hold true for any changes in phasor frequency as well.
Frank Barknecht _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1116 bytes
Desc: not available
More information about the Pd-list