I posted an article <Play the music with your DAQ card> some days ago. It saves you when you have no sound card but only a data acquisition card to play the music (and you’re welcome:)). Now what if you have no speaker but only a Jacob’s Ladder? We borrowed a Jacob’s Ladder from the physics department and had a play with it. Using the electric arc we are able to play the tunes!
This is the video I uploaded in youtube, please help yourself:)
For the people who are not convinient to browse youtube, you can also find it in this link (tudou.com, a video server in China).
Sorry I didn’t edit this phone recorded video, and you have to rotate your head to the left to view it. So we converted the sound file to a sequence of train pulses in LabVIEW, which triggers the Jacob’s Ladder to genenrate sparks. By changing the duty cycle and the frequency of the pulses, we are able to change the volumes and tunes.
P.S. We are not playing all the music, for the tune and pace range of the Jacob’s Ladder is very limited. It only makes the sound when the electric arc appears.
These days my supervisor and I have been working on some amazing (and silly) things. Briefly, using LabVIEW to synchronize a movie, a piece of music and a Jacob’s Ladder. The goal is to demo an interesting show to the school kids. And I would like to share a piece (cause it’s not done yet) of the LabVIEW code, which loads the music and plays it.
So what you need is a data acquisition card (analog output rate greater than 44k Hz, at least 2 AO channels if you like stereo), a speaker or an earphone, LabVIEW and your music. In LabVIEW we read the music file and send the waveform file to 2 analog output channels. If you chop your earphone and connect the three (L, R and ground) lines to the corresponding AO ports, you will hear the sound.
What’s the point of doing that rather than inserting the earphone straightly to your laptop? Because WE CAN.
Note: 1. In my test, reading a block of music won’t slow down your DAQ loop, since the AO task is only 44.1k Hz. I used a Producer/Consumer loop just to make it scalable.
2. To prevent the music from section repeated, I selected ‘Do not allow regeneration‘ mode.
3. Enable ‘auto start’ for ‘Analog write‘ VI.
4. Future work can be done on stopping the AO task automaticly once the music is over. To do this, we can simply bundle the ‘end of file?‘ state of ‘sound file read.vi‘ to the queue element, and use the state to stop the consumer loop.
5. Tell me if you really have done this. 🙂