Page 1 of 5

sound freezer

Posted: Sun Feb 23, 2014 2:51 pm
by tester
From time to time I'm moving back to play with "Paul's Extreme Sound Stretch" engine, and always the same question comes back. Is it possible to make it in FS?

http://hypermammut.sourceforge.net/paulstretch/
http://sourceforge.net/projects/hyperma ... ulstretch/
https://github.com/paulnasca/paulstretch_cpp

From what I can say, the source code is free.

But just yesterday something more came to my mind, and maybe it's related to the engine above. I'm looking for a "sound freezer", i.e. something that will allow to capture a snapshot of input sound, and loop it. But I don't mean itchy glitchy harsh loops, I mean something that sounds smooth and clean, like it can sound (depending on window size) processed in PESS.

My guess is, that it is a matter of capturing smaller or longer portion of sound (fraction of a second to 15 seconds?), and to do some sort of progresive crossfade on such loop. But a lot of parameters seem to be in the game. So my question is - anyone did and could share a good quality sound freezer?

Re: sound freezer

Posted: Tue Feb 25, 2014 6:37 pm
by tester
I'm looking at this schematic, while thinking on the subject. There is something I don't understand here.

Why the FFT/iFFT steps?

From what I understand, I just
- take shorter or longer portions of audio (let say that I'd like to freeze the sound, not do the stretching),
- add envelope (modulate the portion through triangle, to make fade in/out?)
- and play 2+ mixed streams with looped fragment, with appropriate phase difference (delays) between streams.
- eventually, per each playback of that loop - I push the looped sound through some sort of allpass filter, to alter the phase settings (within the sound) randomly.
- eventually I use different modulation shape for fade in/out envelope (like sine or power sine).

Is my thinking going into the right direction or I just don't understand something?

Because surely FFT/iFFT will have limited resolution here, and in some cases - over 10 second long windowing is required in PS.

Re: sound freezer

Posted: Tue Feb 25, 2014 8:07 pm
by KG_is_back
You cannot get to that degree of randomness in phase without high order allpass filters (even arrays of them) like with FFT->iFFT. However you can try. The phase randomness is there to prevent the boundary "comb filtering" artifacts that occurs when you window and time shift/crossfade-loop the windows. With random phase the boundary cancellations are no longer comb filtering, but random canceling.

Re: sound freezer

Posted: Wed Feb 26, 2014 7:07 pm
by MegaHurtz
I remember years ago my DSP teacher did a reaaly dope one in Csound.
Like a one button FFT version.

Re: sound freezer

Posted: Thu Feb 27, 2014 12:04 am
by tester
I guess I will check Trogs FFT/iFFT (the one updated by Martin and MyCo) module on that, but it would be good to make it simpler way too. Currently pitch tracking and 20 harmonic filters I use - eats about 40% of a core, which is a lot. That FFT/iFFT monster would eat the same size as far I remember.

Re: sound freezer

Posted: Thu Feb 27, 2014 9:45 am
by martinvicanek
For single pitched material you could get away with a lighter algo entirely in the time domain (you would need a pitch detector, though). For polyphonic sounds, however, I think that the phase vocoder FFT/iFFT implementation is the way to go. I have been experimenting in that direction but got no convincing results yet. Seems that there is more to it than just randomize the phases.

Re: sound freezer

Posted: Thu Feb 27, 2014 10:59 am
by tester
Generally I was thinking about vocals, like this. I'm building a small tool for learning that. Ah, yes, it's real pure vocal, no post-processing, no effects. What I'd like to get is a good way of freezing such sound points, so you can listen it back more carefully, or see the parameters of your expression.

Re: sound freezer

Posted: Fri Feb 28, 2014 8:32 am
by martinvicanek
tester wrote:vocals, like this

This guy is amazing, apparently he can turn his vocal tract into a self-oscillating filter! :o
Anyway, here is a setup for freezing single-pitched sound. Basically it records the incoming audio in a ring buffer. Upon pressing the Freeze button, it stops recording and proceeds playing back the last two wave cycles in a pitch-synchronous, cross-faded leapfrog scheme. It sounds a bit sterile so you might want to add some modulation to the "frozen" playback for musical effect.
Have fun!

Re: sound freezer

Posted: Fri Feb 28, 2014 12:03 pm
by tester
I can do such things too. I probably post some tutorials on YT at some point. Generally, using western techniques, it's possible to filter harmonics from 2nd or 3rd up to 12th or 16th, literally like notes. Good singer can get up to 24dB difference between amplified harmonic and damped neighbours. Mongolian stuff operates in similar way, but it doubles the sharpnes through 16+ ranges.

Check this - around 7th minute.

Thanks!

Re: sound freezer

Posted: Fri Feb 28, 2014 2:27 pm
by KG_is_back
I've just got an idea. How about shifting phase of the second chuck in a way, that the chunks are in phase at the boundaries. I mean if the two FFT windows overlap 50% at the output, then put phases of the second one to be 50% further form the first one. This can actually be done in the moment you click freeze and put the two FFT results to a wave table. you therefore do not need stream FFT.