Sync commands to music/mp3 (Dance project)

Hi all,

regarding my Tron Dance Project (the RF part is all done), I need to sync commands (in this case the "send" commands to the suits) to the song but it needs to happen simultaneously. E.g. after exactly 3 seconds suit 1 needs to be "on" and so on

Any ideas how to solve that? The song is a simple .mp3

Thanks
Jan

It only takes a couple of ms to send a command and the human eye can't perceive such small differences. "Simultaneously" in an Arduino can easily mean "everything done < 50ms" (or more). Have you tried sending the commands out sequentially and noticed any differences?

I haven't tried to send them out sequentially, because I have no idea how to start the song and the arduino command sequence at the same time.

Let's say I use a simple audio player (e.g. Audacity) to play the song. How can I start the song in audacity and the sequence? So my idea was to combine the arduino command sequence and the song

Is it just the song start that you need to communicate to the Arduino i.e. is everything after that simply timed?

Or do you need to sync changes to specific points in the music using some sort of markers? I've done that with MIDI but not with plain audio.

Steve

That's the question. I would like to try the first possibility, it will be much easier I think. How would you do this? Are there any software soultions where I could communicate to the Arduino for the start?

slipstick:
Is it just the song start that you need to communicate to the Arduino i.e. is everything after that simply timed?

So basically, yes

There are probably dozens of different ways of doing that but one that springs to mind, provided you can run your suit controlling code on a Leonardo/Pro MicroDue etc, is just to use the basic HID capability over USB to send whatever keystrokes to the PC you need to start the song playing in whatever MP3 program you're using. So the Arduino is in control of the start timing.

One advantage of doing it that way should be that you don't need to write any special code to run on the PC. Just use any normal music player.

Steve

Thanks, sounds good! Might be the best solution, I will try

slipstick:
[...] controlling code on a Leonardo/Pro MicroDue etc, is just to use the basic HID capability over USB [...]

Sounds like the UNO is not able to do HID over USB? Searched for that, looks like it's not so easy (need to change firmware etc.) If this is correct, I will buy a Leonardo

Thanks a lot
Jan

Edit: Found it, the UNO is not able to to HDI over USB without flashing bootloader and firmware