I copied the code from Tap.ar. PlayBuf has loop:1 here, so
startOffset is wrapped internally. Using .wrap has no effect on result.
It seems to be something to do with when the buffer is updated. In
the first example this always happens straight away, in the second it
seems to sometimes wait for a control frame duration. I want to use
this for internal single-sample feedback, but there is no way I can
get that to work. As soon as I try to route the delayed into the
recordbuf the same distortion problems start showing up as in the
second example. Really, can't SC do single-sample feedback? The
example in the examples folder only does it at Demand rate. As soon
as I mix in audio signals there again the same problems as in the
example below start showing up.. help welcome here..
cheers,
Wouter
Op 15-mei-2008, om 17:04 heeft nonprivate het volgende geschreven:
> startPos in the PlayBuf is negative, is it supposed to be like that?
> interesting effect to play with, using different values.
>
> Wouter Snoei wrote:
>> Hi all,
>>
>> can any of you explain why:
>>
>> b=Buffer.alloc(s, 128, 1);
>>
>> (
>> SynthDef(\tryDelay, {|bufnum, delay = 1|
>> var source, capture, delayed;
>> source= SinOsc.ar( SinOsc.ar(2).range(400,500), 0, 0.125 );
>> capture = RecordBuf.ar( source, bufnum );
>>
>> delayed = PlayBuf.ar(1, bufnum, 1, 0,
>> (delay/SampleRate.ir) * SampleRate.ir.neg,
>> 1);
>>
>> Out.ar(0, delayed);
>>
>> }).send(s);
>> )
>>
>> x=Synth(\tryDelay,[\bufnum, b]);
>>
>> /*
>> works but
>> */
>>
>> (
>> SynthDef(\tryDelay, {|bufnum, delay = 1|
>> var source, capture, delayed;
>> source= SinOsc.ar( SinOsc.ar(2).range(400,500), 0, 0.125 );
>> capture = RecordBuf.ar( source, bufnum );
>>
>> delayed = PlayBuf.ar(1, bufnum, 1, 0,
>> delay.neg, // simplified
>> 1);
>>
>> Out.ar(0, delayed);
>>
>> }).send(s);
>> )
>>
>>
>> x=Synth(\tryDelay,[\bufnum, b]);
>>
>> /*
>> doesn't work? I get distorted sound with the second one.. Buffer size
>> doesn't seem to matter, although at <64 samples I get distorted sound
>> on both examples.
>> */
>>
>>
>> cheers & thanks,
>> Wouter
>>
>>
>>
>>
>> Wouter Snoei
>>
>>
info@...
>>
http://www.woutersnoei.nl>>
>> _______________________________________________
>> sc-users mailing list
>>
sc-users@...
>>
http://lists.create.ucsb.edu/mailman/listinfo/sc-users>>
>>
>
> _______________________________________________
> sc-users mailing list
>
sc-users@...
>
http://lists.create.ucsb.edu/mailman/listinfo/sc-usersWouter Snoei
info@...
http://www.woutersnoei.nl_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users