Time-stretching without changing pitch
Hi, For a video installation I need to create a module to do interactive time-stretching without changing pitch. This will use a WAV file as input but the speed will change interactively based on an OSC parameter. But to make it simpler let's say the playback speed depends on the mouse speed. I understand there are two ways to achieve this: FFT and Granular Synthesis. The granular synthesis example that comes with Max/MSP almost does this out-of-the-box, but I would like to try to avoid and use ChucK instead. But, even though I've read the manual and understood some of the examples, I'm still very Chuck-ignorant and have no experience whatsoever. Since now ChucK is able to do FFT I was wondering how easy it is to implement this on ChucK using FFT. On the other side, some documentation I've read on time-stretching suggests that the simple FFT process creates lots of artifacts and there has been a lot of research on this and several improved methods were proposed. This scares me because I would like to melt my brain learning all the details, since that Max/MSP patch already does something quite close to what I need. Has anyone done (or knows how to do) time-stretching on ChucK? Should I go for FFT or Granular Synthesis? Any help is welcome. Thanks in advance! Nuno
Any help is welcome.
Hi, Nuno! FFT is certainly a option but I think I'd start by trying LiSa. LiSa (LIve SAmpling) is a new Ugen that's not in the manual yet but is documented in /examples/special/ in your ChucK dir. She (LiSa is a female Ugen, I feel) is quite capable of granulating and I think one of the examples there covers this. If there isn't one for some unforseen reason we need one, I think. Any time-streching or pitch-shifting will create artefacts so the trick is picking one that suits your material and perhaps fine-tuning it but generally speaking LiSa can do this kind of thing if provided with a bit of frame-work. Hope that gets you started. If push comes to shove we could try using FFT to detect the most prominent frequency in the source material and use that to set the grain length and/or rate, that might be a interesting strategy if you'd run into artefacts and this is suitable for the material. Yours, Kas.
Hey Kassen,
I'm looking at the examples... This is quite interesting. I think
you've mentioned LiSa a few times on this list before. Could you
maybe give a high-level overview of her for the uninitiated?
Cheers,
Michael
On Sat, Apr 26, 2008 at 9:00 PM, Kassen
Any help is welcome.
Hi, Nuno!
FFT is certainly a option but I think I'd start by trying LiSa. LiSa (LIve SAmpling) is a new Ugen that's not in the manual yet but is documented in /examples/special/ in your ChucK dir. She (LiSa is a female Ugen, I feel) is quite capable of granulating and I think one of the examples there covers this. If there isn't one for some unforseen reason we need one, I think.
Any time-streching or pitch-shifting will create artefacts so the trick is picking one that suits your material and perhaps fine-tuning it but generally speaking LiSa can do this kind of thing if provided with a bit of frame-work.
Hope that gets you started. If push comes to shove we could try using FFT to detect the most prominent frequency in the source material and use that to set the grain length and/or rate, that might be a interesting strategy if you'd run into artefacts and this is suitable for the material.
Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- urls is coming...
mike clemow wrote:
I'm looking at the examples... This is quite interesting. I think you've mentioned LiSa a few times on this list before. Could you maybe give a high-level overview of her for the uninitiated?
Basically a programmable tape recorder with variable playback rate. I just implemented a reverse-delay, by having 2 LiSas alternately record and playback (with rate = -1). -- peace, love & harmony Atte http://atte.dk | http://myspace.com/attejensen http://anagrammer.dk | http://modlys.dk
2008/4/27 mike clemow
Hey Kassen,
I'm looking at the examples... This is quite interesting. I think you've mentioned LiSa a few times on this list before.
Oh, yes, I'm sure I did !
Could you maybe give a high-level overview of her for the uninitiated?
Sure. Atte is right in that she's basically a recorder with a variable playback rate. There's a bit more going on as well. LiSa can record incoming material which can then be played back. Playback can happen while recording. She can also play back the same material with multiple voices. All of these voices can have a attack and decay slope and have loops as well in addition to their own start offsets and loop-points and now even volume. Oh, and you can have feed-back. That's may sound like the spec-sheet of a modest sampler (which is cool already) but actually because we can code around her it's enough for granulation, for delays, for convolution, pitch-shifting, time-streching, you could do a slap-back echo.... So; a insanely versatile little Ugen. Dan Trueman made LiSa and he hasn't gotten round yet to making a manual entry BUT there is a set of examples that takes you through the basics up to more advanced techniques and ends with "readme-2" which lists all of the member functions. I feel this is actually very good documentation, more elaborate then some of the Ugens which do have a manual entry and it's very practical. It's no secret that I'm a fan of the examples dir as a way to get started with anything in ChucK. A fairly large section of these examples deals with techniques to avoid clicks. If that's a issue for you you may also like to look up my post to this list about using a SndBuf to record to LiSa while detecting and indexing positive zero-crossings which can be used as another technique to avoid clicks and other artefacts (with different strengths and downsides, as always). That should be enough to get you started, I think? There is of course no substitute for simply spending a evening with her ;¬). Yours, Kas. PS; in the interest of equal oportunities; Dyno is a guy, he's large and green and friendly but he likes to squash things. We need more Ugens with names that sound like individuals. This approach is 100% official and definitely *should* be used in university cources ;¬).
A fairly large section of these examples deals with techniques to avoid clicks. If that's a issue for you you may also like to look up my post to this list about using a SndBuf to record to LiSa while detecting and indexing positive zero-crossings which can be used as another technique to avoid clicks and other artefacts (with different strengths and downsides, as always).
I will definitely check these out. A lot of my research right now has
to do with granulation and wavelet resynthesis.
Thanks Atte and Kassen for your quick descriptions of LiSa!
Cheers,
Michael
On Sun, Apr 27, 2008 at 6:47 AM, Kassen
2008/4/27 mike clemow
: Hey Kassen,
I'm looking at the examples... This is quite interesting. I think you've mentioned LiSa a few times on this list before.
Oh, yes, I'm sure I did !
Could you maybe give a high-level overview of her for the uninitiated?
Sure. Atte is right in that she's basically a recorder with a variable playback rate. There's a bit more going on as well.
LiSa can record incoming material which can then be played back. Playback can happen while recording. She can also play back the same material with multiple voices. All of these voices can have a attack and decay slope and have loops as well in addition to their own start offsets and loop-points and now even volume. Oh, and you can have feed-back.
That's may sound like the spec-sheet of a modest sampler (which is cool already) but actually because we can code around her it's enough for granulation, for delays, for convolution, pitch-shifting, time-streching, you could do a slap-back echo....
So; a insanely versatile little Ugen. Dan Trueman made LiSa and he hasn't gotten round yet to making a manual entry BUT there is a set of examples that takes you through the basics up to more advanced techniques and ends with "readme-2" which lists all of the member functions. I feel this is actually very good documentation, more elaborate then some of the Ugens which do have a manual entry and it's very practical. It's no secret that I'm a fan of the examples dir as a way to get started with anything in ChucK.
A fairly large section of these examples deals with techniques to avoid clicks. If that's a issue for you you may also like to look up my post to this list about using a SndBuf to record to LiSa while detecting and indexing positive zero-crossings which can be used as another technique to avoid clicks and other artefacts (with different strengths and downsides, as always).
That should be enough to get you started, I think? There is of course no substitute for simply spending a evening with her ;¬).
Yours, Kas.
PS; in the interest of equal oportunities; Dyno is a guy, he's large and green and friendly but he likes to squash things. We need more Ugens with names that sound like individuals. This approach is 100% official and definitely *should* be used in university cources ;¬).
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (4)
-
Atte André Jensen
-
Kassen
-
mike clemow
-
Nuno Godinho