audio and movement synch. 2 songs at the same time

barbarian:
i took my song and panned the guitar to the left channel and the voice to the right channel. that'S how i can controll mouth- an guitararmservos seperatly. and it works.

Well, first a question. Is it your song so you can so easily divide between voice and guitar?
If you recorded it you could actually have various easy solutions.

  1. use 4 channel non compressed audio (mp3 does not support 4 channels, and audio surround is not really supported) or (I guess is much better as a solution)
  2. create a metafile format (this can be automated) which you can synchronize to an mp3 players timecode information. If you use the Rogue MP3 player it is quite easy to do. Save a file for each song with he same name that contains the servo movements, on start you open that additional file. You can make that as easy as using a sparse array with fixed time slots for, let's say every 100ms a slot so you have 10 servo events per second (more than enough I guess). You just need to seek to the position in the file and read the data and send to the servos (some synchronizing and calculations have to be done as the player will give you seconds resolution so you have to fill in the 1/10th of the second by resync and interpolation).

Also using the Midi SysEx or ControlChange format in this case is quite common by saving the data in an SMF, but is a bit more tricky for reading and sync. It would give you the flexibility to scale your program to support also a light show for the guitar voice performance synced to the rest.