MyRIO Audio Analyzer
The MyRIO Audio Analyzer is an
example program for the MyRIO hardware that acquires and filters
two channels of audio data. The features of this program
include:
Overview: This project acquires audio data on the
MyRIO, applies filters and effects, uses Network Streams to
send the
data to the Host, records data on the host, and displays data
on the Host.
Requirements: LabVIEW FPGA Module, Network Streams
software on the NI myRIO RT target.
Instructions:
1. Make sure the Target IP Address is set correctly on the
Audio Analyzer Desktop.vi to point to the MyRIO hardware.
2. Connect a microphone to the audio input jack. Connect
headphones or a speaker to the audio output jack.
3. Run the MyRIO Audo Analyzer RT.vi on the myRIO target and
the Audio Analyzer Desktop.vi on the Host, in
either order.
4. Adjust the Filter Selector and Effects controls as
desired. Press the Record button to save data to a
file. Press the Play
button to send the live, filtered or raw data to the MyRIO
audio output.
The MyRIO Audio Analyzer program was based
on the MyRIO Voice Recorder application created by National
Instruments. However, numerous changes have been made to
optimize it for this application. Note that the Voice
Recorder used FPGA Control Read functions to acquire the
data. This data transfer mechanism requires significant
overhead and is not appropriate for moving large amounts of
data between platforms. Thus the MyRIO Audio Analyzer
has implemented DMA-based transfer of the audio data.
This allows the program to successfully transfer more channels
at a higher sample rate than could be accomplished with the
Control Read functions.
Another difference between this application
and the NI example is that the FGPA code for the MyRIO Audio
Analyzer has been customized and recompiled. Much of the
MyRIO functionality that is included by NI in most examples
has been removed. This allows for additional
functionality to be added to the MyRIO Audio Analyzer at the
FPGA level in the future, as more filtering options and other
audio analysis tools are added.
The MyRIO Audio Analyzer project also uses
Shared Variables to communicate commands between the host and
RT modules. Compared to the NI example, communication
has also been improved with additional logic added around the
Network Streams connections to allow the RT and Desktop
programs to be launched in any order and connect as necessary.