Hello! I am trying to do a project with flashing lights on the arduino and a sound playing from the computer that is in sync with the flashing lights. However, I can't seem to find a way to play the sound from the computer by triggering it inside the arduino code. I tried to connect to processing and play the sound that way, but it became too out of sync. Since I don't have an Arduino speaker I can't use the tone function. I don't have a solder so I cannot solder headphones and connect them to Arduino. When searching I found that you can use a program to trigger the computers own media player and play the sound but I think the delay would be too big if done this way.
Is there a way to play a sound from the computer that is triggered somewhere specifically in the arduino code, similarly as to how you can do it in processing?
This sounds like a big computer programming project and a small Arduino project.
And if would be easier if to send just send the lighting-control messages from the computer to the Arduino so the Arduino doesn't have anything to do with the music.
don't have a solder so I cannot solder headphones and connect them to Arduino.
There are ways to make connections without soldering but if you're going to build electronic projects it really helps if you can solder.
If you want to make some sound-activated lights (rather than "programmed" lights) you can cut-up some audio cables and/or use a connector [u]like this[/u].
klanna123:
Hello! I am trying to do a project with flashing lights on the arduino and a sound playing from the computer that is in sync with the flashing lights. However, I can't seem to find a way to play the sound from the computer by triggering it inside the arduino code. I tried to connect to processing and play the sound that way, but it became too out of sync.
Post the code you used, both Arduino and Processing, this may be fixable.