[PD] Looping samples with tabread4~
Frank Barknecht
fbar at footils.org
Thu May 17 14:15:23 CEST 2007
Hallo,
Matteo Sisti Sette hat gesagt: // Matteo Sisti Sette wrote:
> Frank Barknecht wrote:
>
> >> 4. Simply using a vline~ object and ?loop it? with a different
> >> start position the second time onwards.
>
> >I'd simply do 4).
>
> That's ok if you're not gonna change the pitch while playing the sample.
Yes, my suggestion is for a one-shot sampler with a looping end and
constant pitch.
> Suppose for a moment that you don't need a sample start point different from
> the loop start point, i.e. the begin and end point don't change from the
> first to the second time.
> The phasor solution (which is trivial in this case) allows you to have a
> signal as an input to the phasor, thus allowing to change the pitch of the
> sampler in real time and smoothly. This is not possible (afaics) with the
> vline~ solution.
For one-shot sampler phasor~ is not good IMO because of the
quantiztion of the phase-inlet. phasor~ samplers would be terrible for
drum-samplers.
Also because of the phasor~ quantization it's hard to start playing with
vline~ and then switch to looping phasor, unless you do a crossfade.
(But a crossfade would work.)
> One solution for reproducing a sample with a signal pitch input without
> using a phasor is:
>
> (input pitch ~)
> |
> [rpole 1]
> |
> [tabread4~]
>
> (sending a [clear( to the rpole when starting playing)
Puh, wouldn't [rpole~ 1] maybe be dangerous? Anyway I don't see any
advantage in rpole~ over phasor~.
> However, the only way I can think of in order to switch from this to the
> phasor (or to jump to a given point of the sample) at the correct time
> independently of pitch history, is to use a [threshold~]; but that wouldn't
> be accurate because it's block-quantized.
>
> Any other idea?
>
>
> Hey!!! I just had one. But I would like anybody to suggest a simpler or more
> elegant one.
>
> I may use 2 phasors (or an rpole and a phasor), both fed with the same pitch
> input.
>
> Let's suppose this is the sample:
> |-----SS-----LB-----LE------|
> where:
> SS= sample start (where we want the sample to start playing the first time)
> LB= loop begin
> LE= loop end
>
> With appropriate calculations, the two phasors can be adjusted so that:
> 1) Phasor A reproduces the sample the first time from SS to LE in its first
> cycle. In subsequent cycles it would do the same but it will be muted so we
> don't mind.
> 2) Phasor B reproduces the loop region; its initial phase is calculated in
> such a way that at the beginning, when it is muted, it will be producing
> garbage, but when phasor A will reach point LB for the first time, phasor B
> will also be on LB, so that, during ONE cycle of phasor B, the two phasors
> will be reproducing *exactly* the same portion LB-LE synchronously.
Show us the code! ;)
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.
> Any simpler idea?
susloop~
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list