Author |
Message |
Eva_platinum
Joined: Aug 19, 2005 Posts: 19 Location: Leeds
|
Posted: Wed Mar 28, 2007 6:05 am Post subject:
Spectrum stretcher Audiounit |
 |
|
Hi, I'm new to the whole audiounits development or any software plug ins development for that matter...
I decided to start with creating a frequency stretcher using sonic birth (its interface is fairly easy for me to understand more or less) but I don't seem to find the right functions to do it...
Any one has any idea ???
By Frequency stretcher I don't mean pitch shifter... It's a tool Trevor Wishart used on some songs thanks to his Composer Desktop Project software... and I'm trying to recreate the same effect as a audiounit... |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Wed Mar 28, 2007 4:02 pm Post subject:
|
 |
|
What exactly do you mean by Frequency Stretcher? If it involves spectral manipulation, like stretching out the spectrum, then using the FFT modules is a possibility.
DJ
-- |
|
Back to top
|
|
 |
Eva_platinum
Joined: Aug 19, 2005 Posts: 19 Location: Leeds
|
Posted: Tue Apr 03, 2007 6:09 am Post subject:
|
 |
|
Yeah THat is what I meant... I'll have a look into the FFT
Thanks |
|
Back to top
|
|
 |
Eva_platinum
Joined: Aug 19, 2005 Posts: 19 Location: Leeds
|
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Wed Apr 04, 2007 6:09 am Post subject:
|
 |
|
I couldn't get that URL to work, and I didn't find anything relevant straight away at their forum. If you fix that URL, I'll have a look.
DJ
-- |
|
Back to top
|
|
 |
Eva_platinum
Joined: Aug 19, 2005 Posts: 19 Location: Leeds
|
Posted: Wed Apr 18, 2007 1:23 pm Post subject:
|
 |
|
Link working now apparently thank you!! |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Wed Apr 18, 2007 2:56 pm Post subject:
|
 |
|
maybe I should have bumped the thread after fixing the link ... _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Sat Apr 21, 2007 6:25 am Post subject:
|
 |
|
I browsed through most of that thread. It seemed to revolve mainly around the practicalities of using the Max/MSP fft modules. You could always get an evaluation version of Max/MSP and try out the patches they've been posting there.
As long as you want to stretch the entire spectrum, the simplest solution is a remapping of the fft bins (harmonics). A refinement of this would be to allow the mapping, or stretching, to be variable, say using linear interpolation to pick amplitudes when filling in the output spectrum. The most precise method would be to resynthesize the output by properly transposing each single harmonic. This would involve adjusting the phases of each harmonic since it might not come from and/or land in a fft bin that represents the precise transposed frequency. The first method is simple to do in a graphical modular environment, the second and third methods may not be feasible as it would use an inordinate amount of modules.
If the stretching is wanted while retaining the fundamental frequency, then we get the added problem of pitch estimation, since we would only want to space out the harmonics that lies above the fundamental.
I'm sorry that I can't give more practical advice, neither a Max/MSP or Audiounits user. I just have a general interest in things like this. I'd recommend reading about the "phase vocoder" which is basically a way of using ffts (and also linear prediction and oscillator banks) to achieve various types of effects like pitch shifting, time stretching, vocoding, resynthesis etc..
DJ
-- |
|
Back to top
|
|
 |
dewdrop_world

Joined: Aug 28, 2006 Posts: 858 Location: Guangzhou, China
Audio files: 4
|
Posted: Sat Apr 28, 2007 1:36 pm Post subject:
|
 |
|
I guess I should have posted earlier... this is pretty easy to do in SuperCollider.
This example uses a stock soundfile supplied with SC. You can use any input signal.
Code: | // Soundfile buffer
b = Buffer.readAndQuery(s, "sounds/a11wlk01.wav");
// buffer for FFT processing
c = Buffer.alloc(s, 2048, 1);
// quick and dirty synth
// move the mouse left and right for transposition, up and down for spectral shifting
a = {
var sig = PlayBuf.ar(1, b.bufnum, BufRateScale.kr(b.bufnum), loop:1),
fftchain = FFT(c.bufnum, sig);
fftchain = PV_BinShift(fftchain, MouseX.kr(0.125, 8.0, \exponential), MouseY.kr(-70, 70));
IFFT(fftchain) ! 2
}.play;
// when you're bored
a.free; |
The really fun bit is, a chap called Gerald devised a way to run SC inside an audiounit. Not a bad way to prototype. I haven't tried it myself but there are a few threads on the list archives.
There's some other tool that lets you write simple code that gets compiled into an AU, but I don't remember its name or if it's free. (SC is free, but also GPL so if you want to do this for release, you would not be able to release it closed source using SC.)
EDIT: Oh, duh, you already mentioned that tool in the first post - Sonic Birth. Well, it's pretty cool in SC anyway
James _________________ ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net |
|
Back to top
|
|
 |
|