electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
Spectrum stretcher Audiounit
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Eva_platinum



Joined: Aug 19, 2005
Posts: 19
Location: Leeds

PostPosted: Wed Mar 28, 2007 6:05 am    Post subject: Spectrum stretcher Audiounit Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message AIM Address MSN Messenger
DrJustice



Joined: Sep 13, 2004
Posts: 2054
Location: Morokulien
Audio files: 3

PostPosted: Wed Mar 28, 2007 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Eva_platinum



Joined: Aug 19, 2005
Posts: 19
Location: Leeds

PostPosted: Tue Apr 03, 2007 6:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah THat is what I meant... I'll have a look into the FFT

Thanks
Back to top
View user's profile Send private message AIM Address MSN Messenger
Eva_platinum



Joined: Aug 19, 2005
Posts: 19
Location: Leeds

PostPosted: Tue Apr 03, 2007 9:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Some people are trying to do the same thing using Max/MSP unfortunately I don't understand anything to MAX/MSP nor their explanations on how to do it... Crying or Very sad

http://www.cycling74.com/forums/forums.html?t=msg&th=23411&rid=0&S=0a5a278c0c899d14cf8037724a7490d1

[Edit: made the link work, Blue Hell]
Back to top
View user's profile Send private message AIM Address MSN Messenger
DrJustice



Joined: Sep 13, 2004
Posts: 2054
Location: Morokulien
Audio files: 3

PostPosted: Wed Apr 04, 2007 6:09 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Eva_platinum



Joined: Aug 19, 2005
Posts: 19
Location: Leeds

PostPosted: Wed Apr 18, 2007 1:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Link working now apparently thank you!!
Back to top
View user's profile Send private message AIM Address MSN Messenger
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20730
Location: The Netherlands, Enschede
Audio files: 158
G2 patch files: 318

PostPosted: Wed Apr 18, 2007 2:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Embarassed maybe I should have bumped the thread after fixing the link ...
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2054
Location: Morokulien
Audio files: 3

PostPosted: Sat Apr 21, 2007 6:25 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Sat Apr 28, 2007 1:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Embarassed

James

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use