Introduction
The attached VI uses the Audio Input Jack on the myDAQ to acquire a stereo audio signal from an iPod or other audio player, alters the signal in software, and then outputs the signal to the Audio Output Jack on the myDAQ. The effect on the audio signal can be changed by sliding the volume and level sliders on the front panel. Alternatively, white noise may be chosen as the signal source so that the effects of the equalizer can be observed and heard in the absence of a music audio source.
As seen in the block diagram below, a DAQ Assistant VI is used to acquire the audio signal from the Left and Right audio channels on the myDAQ. After the signal is acquired, it is passed to three Filter Express VI's that separate the audio channels into bass, midtone, and treble waveforms. After the signal is split up, the three audio components are multiplied by the corresponding controls on the front panel. The signals are then added together and multiplied by the volume control on the front panel. Finally, a second DAQ Assistant Express VI is used to output the final left and right audio streams to the Audio Out Jack.
The Audio Input? slector allows the user to switch between the Uniform White Noise source and the DAQ Assistant audio input.
Steps to Complete
To use this VI, you will need:
An NI myDAQ
An audio source such as an mp3 player
A cable to connect the audio source to the audio input of the myDAQ
Headphones or powered speakers to connect to the audio output of the myDAQ
With these materials, follow the following steps:
Connect the myDAQ to your PC and set it up as DEV1 in Measurement & Automation Explorer
Connect the output of the MP3 player or audio source the the Audio In Jack on the myDAQ
Connect the headphones or speakers to the Audio Out Jack on the myDAQ
Download the myDAQ Equalizer VI file attached at the bottom of this page
- Press play on the MP3 player or other audio source
- Run the myDAQ Equalizer VI
- Move the sliders on the front panel and listen to the audio change!
Additional Notes
Note that while this VI runs fine on most systems, it does require a large amount of CPU time. If other programs are running on the PC at the same time, it greatly increases the chance of this program stopping and throwing errors.
Note that the stereo Jacks on the myDAQ are configured to measure and output from -2 V to 2 V. If connecting an audio source that supplies move than 2V, an error will be thrown.