I've turned the B14.rockafella audio example into an abstraction where [phasor~] has been replaced by a [line~] for triggering the sample reading, the abstraction and a test patch is attached.
Once the soundfile has been loaded into a table we just need to set the original tempo of the soundfile, and the tempo at which we want the soundfile to be played.
If we want the soundfile to be played in loop mode, we just have to trig again when the sample reading is over, by using [del] for example, or [qlist].
The stretch works good but something very strange is happening, let me try to explain,
when the read point reaches the middle of the soundfile a noise is appearing, and I couldn't determine why, it sounds like a buffer overflow, or a little distortion. this is happening when both tempo have the same amount.
Maybe the method for reading a soundfile is different when using [line~]?
I wouldn't like to use the vocoder method because it takes a lot of cpu and artifacts comes whenever the sound is stretched or not.
On Tue, 17 May 2011, Patrice Colet wrote:
The stretch works good but something very strange is happening, let me try to explain, when the read point reaches the middle of the soundfile a noise is appearing, and I couldn't determine why, it sounds like a buffer overflow, or a little distortion. this is happening when both tempo have the same amount. Maybe the method for reading a soundfile is different when using [line~]?
Is it because [line~] reaches 1 for a little time before being reset to 0 ? Thus when multiplied by the number of elements, it generates an out-of-range index, used several times. Combined with a cos(something) that doesn't give exactly zero anymore (because the out-of-range can last up to 63 or 64 samples), this might allow the click to be heard ?
(I haven't thought about it in detail, though.)
BTW where is the corrected patch that you said you made using [phasor~] ?
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC