November 21, 2024, 05:08:08 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Synchronize data and sound from one device

Started by tds234, March 12, 2009, 10:16:32 PM

Previous topic - Next topic

tds234

Has anyone come up with a way to synchronize data and sound from the same source.
I.e. if it were a simple on off you could put a 17Khz tone over a sound file and then using a technique like scary terry with a tone decoder you could decode the tone in real time (of course filtering it out of the audio for listening) and use this for single bit on/off. One could do various tones to get various results within a few on/off options.

However, I want to have the ability to specify a group of bytes (up to say 16) that will get transmitted as the audio plays ( and the bytes differ through time to signal to slave controllers that different events should be fired.) So I want a synchronized data and (at least stereo) audio streams. I thought about using a multi-track file and putting all the control in a non-audio channel and using the tone control method but the audio editing portion to drop different tones on the track is heinous.

I could also simply track the audio time and send commands based upon which track and what part of the audio track is playing but many players cannot report the actual audio timing with enough accuracy for this to work well. Rogue robotics can and I have a few of those but they seem to be the only one and I don't want to depend upon a single source.

I'd really like this to be some sort of editable file that can be easily manipulated/edited and then hopefully stored or retrieved from flash memory...Just to be clear, I'm not talking the basic case here but really a show system that can be built on to do anything...more than happy to share designs and programs with anyone if this matures.

Ohh, and maybe I'm an idiot, or stubborn, but I don't want to use a PC and something like vixen. If it's the only way I may relent but I was looking for something self contained.

Any ideas?


JonnyMac

You could, in theory, do an advanced version of S/T's project using one tone for the mark and the other for the space; that said, you'd have a very slow comm rate and you'd need a "smart" device on both ends.  It's doable -- just not without some effort.
Jon McPhalen
EFX-TEK Hollywood Office

tds234

 I thought about doing that or different tones for different values, but both seem iffy (and low baud rate as you mentioned)for the type of control I want.

I know in the past people have used various tracks on analog tape to control the channels (and I saw that Disney footage where they use some kind of disk like a cam to control movement. I was really hoping someone had a good idea how to do it in the digital domain other than using a specialized PC based program.

Freshly Doug

tds234

Ok, my plan is now to simply use VMusic players and poll to get the time and use that + a real time clock to track fractions of seconds. A show will be a set of data that lists a set of tracks and inter-track delays. While a track is playing I will pull specific data 'packets' from eeprom and send them from the master node to the slave nodes using simple networking. This will allow one controller to synchronize the complex actions of complex props( such as those with multiple servos, lights and pneumatics) without actually knowing all the details. As I mention elsewhere this will be somewhat vixen but at the controller level with a computer running it. The programming will be much simpler in regards to the data files ( albeit much harder to visualize than something with a good interface like Vixen).. No criticism of Vixen; I'm just going a different way....Although I might start with a program running on a computer as the master node to simplify things a bit,...

JonnyMac

Keep in mind that when the VMUSIC is playing it automatically sends to the track timing.  It will be some work but with buffered serial and zippy code you can filter this out and keep track of where you are in the file. 

Good thing you're starting now -- this is a very serious project. ;D

Have you upgraded your SX/B compiler to 2.00.16? -- please do, as any examples I provide will be using 2.00.16; it has a couple nice updates that simply sending parameters to subs and funcs.
Jon McPhalen
EFX-TEK Hollywood Office