Instructables

How to Make LEDs Flash to Music with an Arduino

This is a guide to make an LED flashing circuit that "beats" to an mp3 file on your computer, which can add an awesome effect to any sound-related device, or even your room (if you extend the concept with LED drivers or plenty of resistors/transistors).

The LED flashing circuit makes use of the Minim audio library and the Arduino program Processing to analyze sound, producing a response based on a snare drum hit, a bass drum hit, and a hi-hat hit from the percussion of the audio file.

 
Remove these adsRemove these ads by Signing Up

Step 1: Parts/Tools Needed

Picture of Parts/Tools Needed
Here is what you'll need to make the LED beat flashing circuit:

Hardware:
1. An Arduino microcontroller board. There are many versions of the Arduino, but I would recommend the Arduino Duemilanove. You can buy one online for around $20.
2. Three LEDs (different colors preferred, so you can see the difference in beats easier - I used a red, yellow, and green LED)
3. Three resistors (depending on your LEDs, the resistor value will be different - check the ratings on the LEDs to see what resistance corresponds to their maximum brightness, without burning them out)
4. A solderless breadboard
5. Some wire, to use as leads from the Arduino to the LEDs/resistors on the breadboard
6. A computer
7. A USB cable (A to B)

Software:
1. Arduino Software Environment
2. Processing Software Environment
3. The "arduino" library for Processing
4. The BeatWrite / BeatListener code from the minim JavaSound library examples

Download links for the software will follow in Step 3.

1-40 of 133Next »
rmoorjani1 year ago
Hey guys, I fixed the "the package "cc" does not exist. you might be missing a library." error! ITS SUPER SIMPLE! Just go to /libraries/arduino/library/ and rename the Arduino.jar to arduino.jar with a lowercase :)

Thanks... But wt abt this?

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.

OpenGL error 1280 at bot beginDraw(): invalid enumerant

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)

at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)

at processing.core.PApplet.run(PApplet.java:2256)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

at BeatWrite.setup(BeatWrite.java:56)

at processing.core.PApplet.handleDraw(PApplet.java:2361)

at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)

at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)

at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Could not run the sketch (Target VM failed to initialize).

For more information, read revisions.txt and Help ? Troubleshooting.

I have this error and this did not help
bbulldog11 months ago
Help! Hope someone is looking at this. Worked on an error all day. Can't get it. When the file BeatWrite is started, get the error, "import does not name type." Appreciate any help you can give me.

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.

OpenGL error 1280 at bot beginDraw(): invalid enumerant

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)

at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)

at processing.core.PApplet.run(PApplet.java:2256)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

at BeatWrite.setup(BeatWrite.java:56)

at processing.core.PApplet.handleDraw(PApplet.java:2361)

at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)

at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)

at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Could not run the sketch (Target VM failed to initialize).

For more information, read revisions.txt and Help ? Troubleshooting.

jcupof11 months ago
(removed by author or community request)
jcupof jcupof11 months ago
I solved my previous issue, and now have this:
I am on a mac 10.9.x
- java.lang.NullPointerException
at processing.app.Library.getClassPath(Library.java:315)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:406)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:185)
at processing.mode.java.JavaBuild.build(JavaBuild.java:144)
at processing.mode.java.JavaBuild.build(JavaBuild.java:123)
at processing.mode.java.JavaMode.handleRun(JavaMode.java:120)
at processing.mode.java.JavaEditor$18.run(JavaEditor.java:468)
at java.lang.Thread.run(Thread.java:744)

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.

OpenGL error 1280 at bot beginDraw(): invalid enumerant

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)

at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)

at processing.core.PApplet.run(PApplet.java:2256)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

at BeatWrite.setup(BeatWrite.java:56)

at processing.core.PApplet.handleDraw(PApplet.java:2361)

at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)

at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)

at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Could not run the sketch (Target VM failed to initialize).

For more information, read revisions.txt and Help ? Troubleshooting.

vansh20013 months ago

I need help. My led won't light up.I hear the music in the processing. I checked and made sure they led are working. How do i use processing to connect with arduino

Me too.

Hi. Does anyone know how I can extend the length of time each LED is on for? I am trying to hook the outputs to a relay module and feed it to a traffic light. The period of each pulse is way too fast at the moment and I am looking to reduce it.

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.

OpenGL error 1280 at bot beginDraw(): invalid enumerant

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)

at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)

at processing.core.PApplet.run(PApplet.java:2256)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

at BeatWrite.setup(BeatWrite.java:56)

at processing.core.PApplet.handleDraw(PApplet.java:2361)

at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)

at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)

at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Could not run the sketch (Target VM failed to initialize).

For more information, read revisions.txt and Help ? Troubleshooting.

For peeps who dis does not work for try useing the simpledigitalfirmata

Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.

OpenGL error 1280 at bot beginDraw(): invalid enumerant

java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)

at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)

at processing.core.PApplet.run(PApplet.java:2256)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1

at BeatWrite.setup(BeatWrite.java:56)

at processing.core.PApplet.handleDraw(PApplet.java:2361)

at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)

at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)

at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$200(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Could not run the sketch (Target VM failed to initialize).

For more information, read revisions.txt and Help ? Troubleshooting.

hyperhitesh23 days ago
Framebuffer error (framebuffer unsupported), rendering will probably not work as expected Read http://wiki.processing.org/w/OpenGL_Issues for help.
OpenGL error 1280 at bot beginDraw(): invalid enumerant
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1
at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
at javax.media.opengl.Threading.invoke(Threading.java:191)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)
at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at BeatWrite.setup(BeatWrite.java:56)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)
at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)
at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.HELP ME PLEASE!!!!!

Hey, would this be possible with a microphone?

jeffmodell1 month ago

I got it working but is there any ideas on getting it to play with live streaming audio from either a player or line in

Narendrababuk2 months ago

i wnn auduino code for displaying single led light,,,, in led display32*16 nd i hv to display only 4*4 leds in that display only

RaresP2 months ago

Thank you dude for the project it is awesome :)

vansh20013 months ago

I got through all the set up as mentioned but for some resin my led won't light up to the beat. 2 of the them are constantly lit( input 12 and 8). How do i fix this

H2oSecReT5 months ago

i'm encountering another problem again how ti fix this:

==== JavaSound Minim Error ====

==== Don't know the ID3 code WOAF

==== JavaSound Minim Error ====

==== Don't know the ID3 code WOAR

==== JavaSound Minim Error ====

==== Don't know the ID3 code WOAS

==== JavaSound Minim Error ====

==== Don't know the ID3 code APIC

please help sir

the song is already playing but the led are not flashing

H2oSecReT5 months ago

i got an error like this:

java.lang.RuntimeException: java.lang.NullPointerException

at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)

at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100)

at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)

at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)

at javax.media.opengl.Threading.invoke(Threading.java:191)

at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)

at processing.opengl.PGL.requestDraw(PGL.java:1149)

at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1604)

at processing.core.PApplet.run(PApplet.java:2176)

at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.NullPointerException

at ddf.minim.javasound.JSMinim.getAudioRecordingStream(Unknown Source)

at ddf.minim.Minim.loadFile(Unknown Source)

at BeatWrite.setup(BeatWrite.java:58)

at processing.core.PApplet.handleDraw(PApplet.java:2280)

at processing.opengl.PGL$PGLListener.display(PGL.java:2601)

at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:588)

at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572)

at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)

at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034)

at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909)

at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)

at java.awt.EventQueue.access$400(EventQueue.java:81)

at java.awt.EventQueue$2.run(EventQueue.java:627)

at java.awt.EventQueue$2.run(EventQueue.java:625)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

mondherr6 months ago

you for all
the information

according
to which the LEDs are lit

What is a
`three code isKick isSnare isHat

sampling is made or not

algorithm program

help me pleasethank

mondherr6 months ago

ayou for all
the information

according
to which the LEDs are lit

What is a
`three code isKick isSnare isHat

sampling is made or not

algorithm program

aide
moi pleasethank

mondherr6 months ago

thank you for all the information

I do not understand by what the LEDs light

how we selected three part audio buffer according to intensity or frequency

as do the three codes isKick isSnare isHat

algorithm program

thank you

nerfitz6 months ago

i have been trying to get this software to works for the past couple days now and it keeps saying "the package "cc" does not exist...

I understand that the libraries have to be within the sketchbook folders for the program to find them but i guess i don't know which file is missing or exactly how it is supposed to go if someone (hopefully the poster?) could screenshot the folders and how they are supposed to look or describe the order of files within files that would be awesome. I've been moving things around for a while and i have already tried renaming Arduino to arduino, no luck.

halp.jpg
rbeserra6 months ago
emceecabias7 months ago

Hello there!
Can I change the music into one of the songs of SKRILLEX like the CINEMA or the Rock and Roll song? and also how will I code it if I'm going to use that song. Thanks :-)

wahahahaha7 months ago

what to do?..im getting this error

java.lang.NullPointerException

at processing.mode.java.runner.Runner.findException(Runner.java:926)

at processing.mode.java.runner.Runner.reportException(Runner.java:871)

at processing.mode.java.runner.Runner.exceptionEvent(Runner.java:797)

at processing.mode.java.runner.Runner$2.run(Runner.java:686)

edecoux9 months ago

i'm getting this error

==== JavaSound Minim Error ====

==== Don't know the ID3 code TXXX

==== JavaSound Minim Error ====

==== Don't know the ID3 code TXXX

==== JavaSound Minim Error ====

==== Don't know the ID3 code TXXX

==== JavaSound Minim Error ====

==== Don't know the ID3 code TDEN

==== JavaSound Minim Error ====

==== Don't know the ID3 code TSSE

lilchip10 months ago
please help I keep getting the following error I am trying to run this project on the raspberry pi
java.io.IOException: Cannot run program "/home/pi/processing-2.1/java/bin/java": java.io.IOException: error=2. no such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:488)
lilchip10 months ago
I am trying to run this project from a raspberry pi please help error code above
lilchip10 months ago
java.io.IOException: Cannot run program "/home/pi/processing-2.1/java" : java.io.IOException: error=2. No such file or directory
at java.lang.ProcessBuilder.start.(ProcessBuilder.;java:488)
dan55510 months ago
Hi I Was wondering if you are able to add more channels to the program so you are capable off having 8 leds flashing away
jabelone11 months ago
I have tried so many different ways to do this and was just about to buy a pre built kit and yours worked!! Because I couldn't get the pre built kit here in time I needed something as proof of concept. Thanks heaps!!
mine highlights this:
arduino = new Arduino(this, Arduino.list()[0], 57600);

and wrote that they could not register dispose + 0 for processing.
anyone knows what went wrong?
tchatow1 year ago
Here is my code:

/**
* This sketch demonstrates how to use the BeatDetect object in FREQ_ENERGY mode.

* You can use isKick, isSnare, isHat, isRange,
* and isOnset(int) to track whatever kind of beats you are looking to track, they will report
* true or false based on the state of the analysis. To "tick" the analysis you must call detect
* with successive buffers of audio. You can do this inside of draw, but you are likely to miss some
* audio buffers if you do this. The sketch implements an AudioListener called BeatListener
* so that it can call detect on every buffer of audio processed by the system without repeating a buffer
* or missing one.
*


* This sketch plays an entire song so it may be a little slow to load.
*/

import processing.serial.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import cc.arduino.*;

Minim minim;
AudioPlayer song;
BeatDetect beat;
BeatListener bl;
Arduino arduino;

int ledPin = 12; // LED connected to digital pin 12
int ledPin2 = 8; // LED connected to digital pin 1
int ledPin3 = 2; // LED connected to digital pin 0

float kickSize, snareSize, hatSize;

void setup() {
println(Arduino.list()[0]);
}

void draw() {
background(0);
fill(255);
if(beat.isKick()) {
arduino.digitalWrite(ledPin, Arduino.HIGH); // set the LED on
kickSize = 32;
}
if(beat.isSnare()) {
arduino.digitalWrite(ledPin2, Arduino.HIGH); // set the LED on
snareSize = 32;
}
if(beat.isHat()) {
arduino.digitalWrite(ledPin3, Arduino.HIGH); // set the LED on
hatSize = 32;
}
arduino.digitalWrite(ledPin, Arduino.LOW); // set the LED off
arduino.digitalWrite(ledPin2, Arduino.LOW); // set the LED off
arduino.digitalWrite(ledPin3, Arduino.LOW); // set the LED off
textSize(kickSize);
text("KICK", width/4, height/2);
textSize(snareSize);
text("SNARE", width/2, height/2);
textSize(hatSize);
text("HAT", 3*width/4, height/2);
kickSize = constrain(kickSize * 0.95, 16, 32);
snareSize = constrain(snareSize * 0.95, 16, 32);
hatSize = constrain(hatSize * 0.95, 16, 32);
}

void stop() {
// always close Minim audio classes when you are finished with them
song.close();
// always stop Minim before exiting
minim.stop();
// this closes the sketch
super.stop();
}





I get an error on this line: if(beat.isKick()) {

Here is the error: NullPointerException
BobThAK1 year ago
I'm getting this. lol

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No framebuffer objects available
at processing.opengl.PGL$PGLListener.init(PGL.java:3255)
at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:532)
at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:552)
at javax.media.opengl.awt.GLCanvas$5.run(GLCanvas.java:1032)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1019)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:896)
at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1060)
at javax.media.opengl.Threading.invoke(Threading.java:193)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:461)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:516)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:308)
at java.awt.Component.dispatchEventImpl(Component.java:4736)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:641)
at java.awt.EventQueue$3.run(EventQueue.java:639)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Animation Thread" java.lang.RuntimeException: java.lang.RuntimeException: Processing cannot run because GLSL shaders are not available.
at jogamp.common.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:99)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
at javax.media.opengl.Threading.invoke(Threading.java:191)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:461)
at processing.opengl.PGL.requestDraw(PGL.java:1195)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1550)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Processing cannot run because GLSL shaders are not available.
at processing.opengl.PGraphicsOpenGL.getGLParameters(PGraphicsOpenGL.java:6077)
at processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1580)
at processing.core.PApplet.handleDraw(PApplet.java:2219)
at processing.opengl.PGL$PGLListener.display(PGL.java:3240)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:573)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:558)
at javax.media.opengl.awt.GLCanvas$6.run(GLCanvas.java:1049)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1021)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:896)
at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1060)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:627)
at java.awt.EventQueue$2.run(EventQueue.java:625)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
my best settings came as:

beat.setSensitivity(1);
kickSize = snareSize = hatSize = 500

time to rig it up to some bridge rectifiers, isolators and some A/C lights
Iraz1 year ago
It says serial does not run in 64-bit mode? Can anyone help me?
1-40 of 133Next »