[Csnd] pvsbuffer/pvsreadbuf for time stretching
Date | 2009-05-02 01:25 |
From | Dave Seidel |
Subject | [Csnd] pvsbuffer/pvsreadbuf for time stretching |
I found Victor's cool "Developing Spectral Processing Applications" presentation[1], and would like to try using pvsbuffer/pvsbufread to to time stretching, but I don't know how to go about it. More specifically, the paper says "With fsigs, it is possible to use a buffer to write and then read (at different rates), to perform a (fake-)RT timestretching/compression[.]" But I have no idea how to change the read rate. Can anyone help explain? I have working code similar to the following: asig soundin "somefile.wav" fsig pvsanal asig, 1024, 256, 1024, 0 ihand, ktime pvsbuffer fsig, p3 fou pvsbufread ktime, ihand aout pvsynth fl So I'm guessing changing the read rate would involve changing ktime, but not sure. - Dave [1] http://music.nuim.ie/music/sites/cpaneltest.nuim.ie.music/files/documents/spectral-processing2.pdf -- ~DaveSeidel = [ http://mysterybear.net, http://daveseidel.tumblr.com, http://twitter.com/DaveSeidel ]; |
Date | 2009-05-02 13:38 |
From | victor |
Subject | [Csnd] Re: pvsbuffer/pvsreadbuf for time stretching |
ktime is the current time of writing into the buffer, so you can just scale it: |
Date | 2009-05-02 13:57 |
From | David Mooney/Maxine Heller |
Subject | [Csnd] Re: pvsbuffer/pvsreadbuf for time stretching |
Try this: ihand pvsbuffer fsig,ival ktime line 0,ival,1 fsig2 pvsbufread ktime,ihand ival is the desired end length time, the stretch time (may or may not be p3). I don't find that this works well for complex time stretching (stretching different parts of the original sound at different rates), but for a simple stretch this works quite well. --David At 08:25 PM 5/1/2009, you wrote: >I found Victor's cool "Developing Spectral Processing Applications" >presentation[1], and would like to try using pvsbuffer/pvsbufread to >to time stretching, but I don't know how to go about it. More >specifically, the paper says > >"With fsigs, it is possible to use a buffer to write and >then read (at different rates), to perform a (fake-)RT >timestretching/compression[.]" > >But I have no idea how to change the read rate. Can anyone help >explain? I have working code similar to the following: > >asig soundin "somefile.wav" >fsig pvsanal asig, 1024, 256, 1024, 0 >ihand, ktime pvsbuffer fsig, p3 >fou pvsbufread ktime, ihand >aout pvsynth fl > >So I'm guessing changing the read rate would involve changing ktime, >but not sure. > >- Dave > >[1] >http://music.nuim.ie/music/sites/cpaneltest.nuim.ie.music/files/documents/spectral-processing2.pdf > >-- >~DaveSeidel = [ > http://mysterybear.net, > http://daveseidel.tumblr.com, > http://twitter.com/DaveSeidel >]; > > > >Send bugs reports to this list. >To unsubscribe, send email sympa@lists.bath.ac.uk with body >"unsubscribe csound" Maxine Heller: mheller@city-net.com David Mooney: dmooney@city-net.com www.city-net.com/~moko/ |
Date | 2009-05-02 13:57 |
From | Dave Seidel |
Subject | [Csnd] Re: Re: pvsbuffer/pvsreadbuf for time stretching |
Aha! Thanks, Victor! - Dave victor wrote: > ktime is the current time of writing into the buffer, so you can just > scale it: > > |
Date | 2009-05-02 14:22 |
From | Dave Seidel |
Subject | [Csnd] Re: Re: pvsbuffer/pvsreadbuf for time stretching |
Thanks, David. However, this produced a compilation error: error: illegal no of output args, line 140: ihand pvsbuffer fsig, p3 Apparently (at least in Csound 5.10), it insists on using both return values for pvsbuffer. Victor's suggestion of scaling the ktime value is working quite well: ihand, ktime pvsbuffer fsig, p3 fsig2 pvsbufread ktime*0.1, ihand A combined approach also works: ihand,ktime pvsbuffer fsig, p3 kfac line 0, p3, 1 fsig2 pvsbufread ktime*kfac, ihand Though in my particular case, I'm looking for a simple, unvarying scalar, so I'll probably stick with using a constant. But it's great to understand the range of possibilities! - Dave David Mooney/Maxine Heller wrote: > Try this: > > ihand pvsbuffer fsig,ival > ktime line 0,ival,1 > fsig2 pvsbufread ktime,ihand > > ival is the desired end length time, the stretch time (may or may not be > p3). I don't find that this works well for complex time stretching > (stretching different parts of the original sound at different rates), > but for a simple stretch this works quite well. > > --David > > At 08:25 PM 5/1/2009, you wrote: >> I found Victor's cool "Developing Spectral Processing Applications" >> presentation[1], and would like to try using pvsbuffer/pvsbufread to >> to time stretching, but I don't know how to go about it. More >> specifically, the paper says >> >> "With fsigs, it is possible to use a buffer to write and >> then read (at different rates), to perform a (fake-)RT >> timestretching/compression[.]" >> >> But I have no idea how to change the read rate. Can anyone help >> explain? I have working code similar to the following: >> >> asig soundin "somefile.wav" >> fsig pvsanal asig, 1024, 256, 1024, 0 >> ihand, ktime pvsbuffer fsig, p3 >> fou pvsbufread ktime, ihand >> aout pvsynth fl >> >> So I'm guessing changing the read rate would involve changing ktime, >> but not sure. >> >> - Dave >> >> [1] >> http://music.nuim.ie/music/sites/cpaneltest.nuim.ie.music/files/documents/spectral-processing2.pdf >> >> >> -- >> ~DaveSeidel = [ >> http://mysterybear.net, >> http://daveseidel.tumblr.com, >> http://twitter.com/DaveSeidel >> ]; >> >> >> >> Send bugs reports to this list. >> To unsubscribe, send email sympa@lists.bath.ac.uk with body >> "unsubscribe csound" > > Maxine Heller: mheller@city-net.com > David Mooney: dmooney@city-net.com > www.city-net.com/~moko/ > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > -- ~DaveSeidel = [ http://mysterybear.net, http://daveseidel.tumblr.com, http://twitter.com/DaveSeidel ]; |