We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Help! Alternative FFT implementation for live use
Page Index Toggle Pages: 1
Help! Alternative FFT implementation for live use? (Read 812 times)
Help! Alternative FFT implementation for live use?
Oct 10th, 2007, 8:01am
 


Hi there. I am new to Processing and programming in general, and would much appreciate your help. I have made a few nifty things like a music keyboard that plays music for example, so I am not entirely ignorant.

I have an idea for a kind a live use for processing. The idea is to play a 3 or 4 minute video (series of frames using the loop function), but have them hidden via a black screen so you can see them.

Using FFT analysis, I would like to reveal parts of the images based on music that is coming from a live performance (electronic music & hardware, ableton live, etc). Like a traditional frequency spectrum graph, this would simply have low frequency content to high frequency content laid out from left to right on a horizontal line. I would like to use about 50 "bins", that is to say divide the frequency range up into 50 frequency chunks but instead of just representing the level (volume/amplitude) of each bin with a vertical bar I would like to use 5 boxes stacked vertically. So when the level of a bin/frequency is low it may only reveal the background images through 1 box, when it is at its highest it will reveal the images through 5 boxes.

Effectively, the "bins" or frequency levels from lowest to highest will only be represented by 5 discrete visual values. I then want to mirror these 5 boxes below the horizontal axis as well so that it creates a nice visual representation of the music.

firstly, will processing handle this in live performance? It sounds a little intense as far as computation.

What kind of library would be best? Probably mac based, using a line level input from the real world.

Can you give me some tips on how to isolate the "bin" values of an FFT so that I can use them to trigger the boxes? Also what kind of function/command do you think would be best and the most efficient for creating this?

Help! more or less. If anyone is located in Sydney, and could help me material such a project I will happily pay for tuition. I am having a tough time grasping this on my own.
Re: Help! Alternative FFT implementation for live
Reply #1 - Oct 10th, 2007, 12:49pm
 
i use the minim library for this stuff, but others are available (ess, sonia)

http://code.compartmental.net/tools/minim

i find the problem isn't the drawing speed (processor is not really troubled by the processing involved, framerate is ok) but there is some kind of lag somewhere so the pictures don't really reflect what you're hearing. but this may be something to do with the linux audio system.
Re: Help! Alternative FFT implementation for live
Reply #2 - Oct 11th, 2007, 3:03am
 


Is the delay true for all libraries, and regardless of how sound is used? For example, would simply loading and running a 1 minute loop of audio within processing still have a delay (as opposed to processing live audio)?

I'd love to use minim, but I am very depend on examples and references which minim has very little of.
Re: Help! Alternative FFT implementation for live
Reply #3 - Oct 11th, 2007, 10:52am
 
i have created a tool for live performances and the best lib available in processing for live performance is Sonia.
it does respond immediately or with a really small amount. give it a try.
for other purposes other than live i used Ess.
works pretty well for me
Re: Help! Alternative FFT implementation for live
Reply #4 - Oct 11th, 2007, 12:31pm
 
DISCERN wrote on Oct 11th, 2007, 3:03am:
Is the delay true for all libraries, and regardless of how sound is used For example, would simply loading and running a 1 minute loop of audio within processing still have a delay (as opposed to processing live audio)


the aforementioned delay may not be as bad as i make out on your hardware - might be a linux thing. might be specifically my distro as well. haven't looked into processing and Jack (low latency sound server for linux). sonia uses jsyn plugin which just wouldn't work under (64bit) linux.

Quote:
I'd love to use minim, but I am very depend on examples and references which minim has very little of.


did you download minim or just use the webpage webpage is pretty scant but the download contains examples for everything you mention.
Page Index Toggle Pages: 1