Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

sound freezer

DSP related issues, mathematics, processing and techniques

sound freezer

Postby tester » Sun Feb 23, 2014 2:51 pm

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?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: sound freezer

Postby tester » Tue Feb 25, 2014 6:37 pm

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.
Attachments
paulstretch_steps.zip
(208.47 KiB) Downloaded 1414 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: sound freezer

Postby KG_is_back » Tue Feb 25, 2014 8:07 pm

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: sound freezer

Postby MegaHurtz » Wed Feb 26, 2014 7:07 pm

I remember years ago my DSP teacher did a reaaly dope one in Csound.
Like a one button FFT version.
192k @ 8ms
User avatar
MegaHurtz
 
Posts: 105
Joined: Mon Aug 11, 2008 6:29 pm
Location: Eindhoven/Nederland

Re: sound freezer

Postby tester » Thu Feb 27, 2014 12:04 am

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.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: sound freezer

Postby martinvicanek » Thu Feb 27, 2014 9:45 am

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.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: sound freezer

Postby tester » Thu Feb 27, 2014 10:59 am

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.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: sound freezer

Postby martinvicanek » Fri Feb 28, 2014 8:32 am

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!
Attachments
SinglePitchFreeze.fsm
(175.73 KiB) Downloaded 1406 times
Last edited by martinvicanek on Mon Mar 03, 2014 9:52 am, edited 1 time in total.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: sound freezer

Postby tester » Fri Feb 28, 2014 12:03 pm

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!
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: sound freezer

Postby KG_is_back » Fri Feb 28, 2014 2:27 pm

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Next

Return to DSP

Who is online

Users browsing this forum: No registered users and 32 guests