Go Down

Topic: Is there a simple way to run a file when a different file is run? (Read 3957 times) previous topic - next topic

TECH GEEK

Is there a simple way to run a file when a different file is run?

I'm trying to add some effects using an arduino uno that run each time a  .ogg sound file is played. I have windows 7 Professional 64-bit if that info is usefull...
As always... Thanks for posting!!!

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

TECH GEEK

I need to have a serial message sent to an arduino every time a file is run.
Not sure how to explain it more.
As always... Thanks for posting!!!

robtillaart

what you mean with "a file is run",
what is that file? is it an MP3, video, or an Arduino application aka sketch ?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

TECH GEEK

As always... Thanks for posting!!!

PaulS

Quote
It is an .0gg sound file

0gg sound files do not play themselves. Some application is responsible for that. If that application can also write to the Serial port, then it can tell the Arduino that the file being played changed/is/whatever.

TECH GEEK

I realize that. Also the application cannot do anything more than tell the .Ogg file to play.
As always... Thanks for posting!!!

robtillaart

You can connect a microphone to the Arduino and recognize the transition from silence to non-silence.
That could also trigger something, but it would not be able to recognize silent pauses in a song...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

TECH GEEK

I've been thinking about this for a week now and think I have an idea.

What If I split the audio output, into two identical lines. One line goes directly to the (powered) speakers and sub woofer, the other to a infrared Led. I would then edit the beginning of each .ogg file to have a very short 38kHz square wave. Each .ogg file would have a unique pattern for an arduino with one of these to detect and decode.  Based on which pattern it decodes, it would do the desired effect.

What are your thoughts?
As always... Thanks for posting!!!

robtillaart

what is the name of the application you use to start the ogg files?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

TECH GEEK

As always... Thanks for posting!!!

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

TECH GEEK

Not sure. I play it by clicking the .exe & can play it without a internet connection.
As always... Thanks for posting!!!

robtillaart

What you could do is to monitor the process table of the PC - http://technet.microsoft.com/en-us/sysinternals/ -
and search for your exe and the associated files.
The OGG file played should be one of the open files, so if that changes you could send a command to Arduino.

Far from trivial but here is a starting point - http://www.codeproject.com/Articles/18975/Listing-Used-Files -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up