[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] PlayBuf Reverse Payback Help
You need to define loop true in the backwards version because you are
playing from the beginning of the buffer.
Or reposition the buffer pointer to the end of the buffer to play without
loop:true
Alistair
On 11/05/09 2:51 AM, "Saman Badakhshan" <sb334@xxxxxxxxxxxx> wrote:
> I want to use PlayBuff to play sounds in reverse. As far as I can see
> from the help file, all you have to do is pass the rate argument a
> negative value between 0 and -1 for reverse playback. But for some
> reason my code is only playing back sound when I pass in posative rate
> values.
>
> (
> SynthDef(\play, { arg out = 0, bufnum = 0, loop = 0.0, startPos = 0.0,
> trig = 1.0, rate = 1.0;
> Out.ar(out,
> PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum)*rate, trig,
> startPos, loop)
> )
> }).load(s);
> )
>
> (
> var buf;
> buf = Buffer.read(s,"sounds/a11wlk01.wav");
>
> //Forward rate.
> Synth(\play, [\out, 0, \bufnum, buf.bufnum, \rate, 1.0]);
>
> //Backwards rate, but this line wont play any sound.
> Synth(\play, [\out, 0, \bufnum, buf.bufnum, \rate, -1.0]);
> )
>
>
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.):
> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/