32 band fft hack in modul8
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    32 band fft hack in modul8

    by pls » Wed Feb 11, 2009 6:17 am

    with processing, OSCulator and of course m8

    this is a little workaround to get modul8 doing this funky kind of frequency analysis also known as fft..

    for those who want to get deeper in this stuff, check out..
    http://en.wikipedia.org/wiki/Fast_Fourier_transform

    first of all get processing.. its for free.. everybody should have it anyway.. also installation is pretty straight forward cause java is already preinstalled on your mac..
    http://www.processing.org/
    http://www.processing.org/download/index.html
    fft is done here..

    but doesn't work unless you install some extra libraries..
    sonia which does the frequency analysis mumbo jumbo..
    http://sonia.pitaru.com/
    and needs itself an extra plugin which can be installed here..
    http://www.softsynth.com/jsyn/plugins/
    there's another audio library called ess which is also very versatile but i read somewhere in the forum it's not as speedy like sonia..so we go with this..

    and oscP5.. which transform the data to OSC protocol
    http://www.sojamo.de/libraries/oscP5/
    as well as controlP5 which is from the same guy and provides some gui elements in processing which i implemented for better adjustment of the sound data..
    http://www.sojamo.de/libraries/controlP5/

    the processing libraries go as default to Documents/Processing/libraries.. this libraries folder has to be created by hand.. by you.
    for those who had been using processing in the past.. attention this is new to version p1.0.1.. anyway the processing sketch should also work in older versions.. but to keep it uptodate

    most stuff concerning processing and its libraries is very well documented.. so don't hesitate.. just google for it..

    now if everythings done properly the .pde should work.. open it up with processing.. but dont forget to provide some incoming sound.. or just route it with soundflower..

    ok..so far.. half way done..

    get a test version of OSCulator.. midi conversion could also be done in processing itself but looking in the future i decided to do it with osc
    actually i got OSCulator for playing around with my new iphone and touchOSC/OSCemote but this great piece of software really convinced me.. big thanks and huggin to camille and his great support..
    and last but not least osc could be easily sent over network..yepyep.. so. go for it..
    http://www.osculator.net/wiki/
    http://www.osculator.net/wiki/Main/Download

    start OSCulator with the provided .oscd

    and check the midi data.. maybe with
    http://www.snoize.com/MIDIMonitor/
    this is free again..

    now start modul8.. do rescan midi devices.. and start to map the midi values
    last step is a little annoying.. cause you should uncheck all values from the node except one.. go to m8.. map this one.. uncheck it and activate the next one..
    if there are 2 or more midi values coming when you are in mapping mode they are immediately assigned to the same control.. unfortunately there is no undo function in m8's mapping mode..

    actually i wanted to provide a m8 project file as well.. but after transfering it to another computer i discovered that midi assignments are not saved within the .md8

    hmm.. everything said..
    at the moment the kit is for routing to the same machine.. ip is set in processing to 127.0.0.1 and port 8002..as well as in the OSCulator file.. sound data is converted to 32 bands.. this could also be changed in the processing file to higher values.. in steps to 64, 128, 256..

    for the coders among you..
    if there are any improvements.. just contact me..

    last word.. i didn't used the osc module in m8 cause therefore keywords must already be contained in the osc message.. which makes everything a little inflexible.. i can't decide before when i want to use which value.. so with midi data seems the better way to go cause i can make changes during runtime..

    also so it's open to use it in conjunction with other software.. yes there is other software then modul8..

    enjoy..
    at least 2.6 comes.. hmm.. was anounced for january..

    greetz

    plus

    download..
    http://www.shadovisuals.com/download/m8_fft32.zip


    shado loves you . . .
  • oozi
    junior Member
    Posts: 7
    Joined: Mon Jan 12, 2009 9:55 pm
    Location: Eindhoven

    by oozi » Wed Feb 11, 2009 11:32 pm

    (..first post on this board..)
    Hi there!

    I'm not entirely sure I get what this does but it sounds very interesting.. could you post a demo-clip of what can be done with this and what the results look like?
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    some eyecandy..

    by pls » Fri Feb 20, 2009 5:54 am

    here's a little movie showing a simple example..

    http://vimeo.com/3291046
    actually this had been my first screen capture..

    i should also mention that this workaround is more a proof of concept.. i startet some years before with snack and tkinter which are libraries for sound analysis for python.. but had to realize that tkinter isn't supported by the python used by the system (and by m8)
    tried this stuff again when 10.4 and m8 2.5 came out but nothing changed..

    if its really useful when working live is doubtful cause midi and OSCulator setup is quite time consuming..

    a real improvement could be if m8's midi assignment could be done manually.. meaning i can determine the midi note by typing - instead of pressing some button or moving some controller..

    or even better midi assignment by script..
  • jockety
    activ8 member
    Posts: 72
    Joined: Fri Nov 21, 2008 3:08 pm

    by jockety » Mon Apr 27, 2009 7:27 pm

    pls said:
    if there are 2 or more midi values coming when you are in mapping mode they are immediately assigned to the same control.. unfortunately there is no undo function in m8's mapping mode..


    I discovered the other day that a midi assignment can be removed by using the backspace key.
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    by pls » Tue Apr 28, 2009 2:29 pm

    that's quite cool.. thanks for the hint..

    greetz

    plus
  • OxC
    junior Member
    Posts: 3
    Joined: Sat Nov 07, 2009 11:44 pm
    Contact:

    JSyn & Snowleopard....

    by OxC » Tue Mar 09, 2010 12:42 am

    Hi,

    Thank's for this tutorial, look great, but....
    I have snowleopard and processing say :

    .....Could not load native library for JSyn V142
    com.softsynth.jsyn.SynthException: JSyn error: Could not access JSyn synthesis engine. - JSyn not properly installed, or web page is not calling smart_embed_jsyn.js!, 0x0=0, 0x0=0......


    Have you a solution please ?

    Regards,
    Olivier

    http://www.oliviercrouzel.fr
  • Vibber
    super8 member
    Posts: 166
    Joined: Tue Sep 20, 2005 1:02 pm

    by Vibber » Tue Mar 09, 2010 11:16 pm

    Looks very cool but even more cool would be beat detection - automatic BPM from the sound input. Does the fft kit make this possible?
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    by pls » Wed Mar 10, 2010 2:22 am

    actually i never tried processing in conjunction with the sonia library since my upgrade..
    but yes.. you are right.. it doesn't work anymore..

    i found this thread..
    http://www.softsynth.com/jsyn/support/bugs.html

    seems the guys from softsynth who developed jsyn are aware of this bug..
    but status's still open..

    so let's hope they get it solved soon..

    maybe i'll do a workaround using the ess library.. but at the moment i'm a little bit busy..
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    by pls » Wed Mar 10, 2010 3:02 am

    and concerning the beat detection..

    nope.

    i started several month ago testing some beat detection scripts with processing using the ess library, but had small problems getting the osc data formatted properly..

    and if you really want a reliable beat detection it's not as easy cause algorithms dealing with this are quite complex..
    even professional software like native instruments traktor gets sometimes in trouble and is unsure in its calculations..

    anyway.. here are some links for more knowledge..
    http://www.gamedev.net/reference/programming/features/beatdetection/
    http://moads.wordpress.com/2007/06/24/beat-detection-in-processing/
    http://amassingham.blogspot.com/2007/09/audio-analysis-and-beat-detection.html

    greetz

    plus
  • 1000errors
    member
    Posts: 13
    Joined: Sun Mar 21, 2010 3:05 pm

    snow leopard issue

    by 1000errors » Mon Mar 29, 2010 3:10 pm

    hello, i have the same problem as oliver regarding snow leopard, i know you are busy but do you plan to write a work around in the future, thanks very much!
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    by pls » Fri Apr 02, 2010 6:52 pm

    ok.. here you are guys..

    this one is working with 10.6
    at the moment it just works with processing 1.0.6 and below (i think?)
    and uses the ess library instead of sonia and jsyn..
    http://www.tree-axis.com/Ess/

    actually at http://www.processing.org 1.0.6 isn't available for download anymore..
    this is why i included it also as compiled .app..

    http://www.sinsynplus.de/project/liveInput_fft32osc_ess04.zip
    it should provide 64 average values or 128 spectrum values..
    and 4 beat values..

    enjoy..

    credits and inspiration..
    http://processing.org/discourse/yabb2/YaBB.pl?board=Sound;action=display;num=1173460535
    http://code.compartmental.net/beat/

    greetz

    plus
  • 1000errors
    member
    Posts: 13
    Joined: Sun Mar 21, 2010 3:05 pm

    by 1000errors » Fri Apr 02, 2010 8:43 pm

    awesome! thanks a zillion, i was just about to go back to using leopard again just for this, much appreciated! =)
  • User avatar
    pls
    member
    Posts: 32
    Joined: Sun Mar 12, 2006 4:45 pm
    Location: munich | germany
    Contact:

    by pls » Tue Apr 06, 2010 11:40 pm

    you're welcome.. in reworking the stuff i could finally debug my beat detect beta..

    also i think it's even faster now..
    actually i should have done a new thread for this.. anyway you can consider yourself as beta tester now..

    so if you have any suggestions..

    greetz

    plus

Who is online

Users browsing this forum: No registered users and 40 guests