[PD] extremely stupid question: playing sample
Claude Heiland-Allen
claudiusmaximus at goto10.org
Fri Jul 4 00:46:44 CEST 2008
hard off wrote:
> phasor~ doesn't allow speed change at samplerate either. it allows speed
> change at block rate.
Err, yes it does support samplerate control of speed - the left inlet is
a signal inlet, and I checked the source code to confirm it:
// d_osc.c
static t_int *phasor_perform(t_int *w) {
t_phasor *x = (t_phasor *)(w[1]);
t_float *in = (t_float *)(w[2]); // (1)
t_float *out = (t_float *)(w[3]);
// snip weirdness
while (n--)
{
tf.tf_i[HIOFFSET] = normhipart;
dphase += *in++ * conv; // (2)
*out++ = tf.tf_d - UNITBIT32;
tf.tf_d = dphase;
}
// snip boring bits
}
The line marked (1) gets a signal vector from the dsp graph, and the
line marked (2) increments the phase by each signal element.
Claude
--
http://claudiusmaximus.goto10.org
More information about the Pd-list
mailing list