Adding in Music to Ada light

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
ConUO
 
Posts: 1
Joined: Wed Jan 11, 2012 5:07 pm

Adding in Music to Ada light

Post by ConUO »

So I recently finished making the Ada Light:
http://www.ladyada.net/make/adalight/

I remember see a tutorial somewhere where I could re purpose the lights as a music visualizer. Something like
http://www.youtube.com/watch?v=OgiEAk2C66Q

Does anyone have a link or if you could provide me with a quick help guide on how to achieve something like that?

Thank you!

misake
 
Posts: 14
Joined: Sun Nov 06, 2011 2:52 pm

Re: Adding in Music to Ada light

Post by misake »

Hi,
I recently looked into doing something similar,
there seems to be a lot of information around regarding music visualisations, particularly look into FFT (fast Fourier transforms).
They are useful for analysing frequencies in audio signals.

A quick search of doing this in processing pointed me to the Minim lib, it contains a lot of audio tools, including FFTs.

I suggest you look at the InputMixer example code, I have attached a version updated to work with Minim 2.0.2 and ControlP5 0.7.5
Attachments
sketch_audio_test.txt
InputMixer example, rename .pde
(2.34 KiB) Downloaded 216 times

misake
 
Posts: 14
Joined: Sun Nov 06, 2011 2:52 pm

Re: Adding in Music to Ada light

Post by misake »

Attached as proof of concept, is the crude mutant child of the Adalight colour swirl script and the inputMixer demo.

Looks kinda cool with some slow dubstep or anything else without too much going on at one time.

My next attempt will make use of FFTs.
Attachments
audio_adalight.txt
Audio Adalight proof of concept. REname .pde
(4.77 KiB) Downloaded 241 times

misake
 
Posts: 14
Joined: Sun Nov 06, 2011 2:52 pm

Re: Adding in Music to Ada light

Post by misake »

FFT example attached, now in stereo.

Next step to do something more appropriate with the colours.
Perhaps change colour rather than brightness based on intensity, green to red?

Also to experiment with other settings available, and conceive some new patterns.
Attachments
fft_adalight.txt
FFT music vis. rename to .pde
(5.36 KiB) Downloaded 289 times

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Adding in Music to Ada light

Post by adafruit »

Coool - can you post a video of this when you get it going? its a really smart idea!

Ronin
 
Posts: 2
Joined: Mon Apr 01, 2013 11:07 am

Re: Adding in Music to Ada light

Post by Ronin »

Can someone help me? I'm getting this error with the files above:

ControlP5 2.0.4 infos, comments, questions at http://www.sojamo.de/libraries/controlP5
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
No glyph found for the Ä (\u00C4) character
Average frames/sec: 0, bytes/sec: 0
Average frames/sec: 0, bytes/sec: 0
User chose Mixers
Using mixer info Primärer Soundtreiber
==== JavaSound Minim Error ====
==== Unable to return a TargetDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

=== Minim Error ===
=== Minim.getLineIn: attempt failed, could not secure an AudioInput.

01.04.2013 20:58:34 controlP5.ControlBroadcaster printMethodError
SCHWERWIEGEND: An error occured while forwarding a Controller event, please check your code at controlEvent
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
at controlP5.ControlBroadcaster.broadcast(Unknown Source)
at controlP5.ListBox.controlEvent(Unknown Source)
at controlP5.Controller.broadcast(Unknown Source)
at controlP5.Button.setValue(Unknown Source)
at controlP5.Button.activate(Unknown Source)
at controlP5.Button.mouseReleased(Unknown Source)
at controlP5.Controller.setMousePressed(Unknown Source)
at controlP5.ControllerGroup.setMousePressed(Unknown Source)
at controlP5.ControllerGroup.setMousePressed(Unknown Source)
at controlP5.ControlWindow.mouseReleasedEvent(Unknown Source)
at controlP5.ControlWindow.mouseEvent(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1123)
at processing.core.PApplet.handleMethods(PApplet.java:1318)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2700)
at processing.core.PApplet.dequeueEvents(PApplet.java:2603)
at processing.core.PApplet.handleDraw(PApplet.java:2277)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at music_pde.controlEvent(music_pde.java:202)
... 27 more

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”