Refer to the Audio Analyzer (NI-DAQmx) (Sound and Vibration) sample project available from the Create Project dialog box.
This sample project is installed to …\LabVIEW 2012\ProjectTemplates\Source\Sound and Vibration\Audio Analyzer\...
- Application Development Environment: LabVIEW Full or Pro
- Driver Software: DAQmx 9.5.5 or later
- Dependencies: GXML 1.4.0 or later
The sample project is designed to be used with analog input devices. Supported modes of data acquisition are:
- Finite (one shot)
- Finite (one shot) with analog reference trigger
- Continuous (repeated) with analog reference trigger
The Audio Analyzer sample project acquires data and performs measurements for channel characterization and distortion analysis. The top-level VI executes three loops in parallel:
- Graphical User Interface (GUI)—The Event Handling Loop that produces messages based on front panel events, such as the user clicking Start or Settings. This loop also registers for user events sent from the other parallel loops and updates the UI.
- Data Acquisition (DAQ) and Continuous Processing—The Action Engine and Data Producer Loop that configures the hardware acquisition settings and triggers DAQmx task state transitions. This loop acquires data, applies specified time-domain filtering, and implements software analog reference triggering. This loop is also a Block Data Producer. Data Blocks are (lossy) enqueued for further processing.
- Block Processing and Display Updates—The Block Data Consumer Loop that applies specified spectral analysis and feature measurements.
Running this Example
- In the Project Explorer window, open and run NI_Audio Analyzer.vi.
- Click Configure. The DAQmx Configuration dialog box appears.
- Configure the hardware and triggering parameters and click OK.
- Press Run. The program begins acquiring data.
Modifying this Example
To create your own copy of this sample project, select the Audio Analyzer (NI-DAQmx) (Sound and Vibration) sample project available from the Create Project dialog box.
If the default logging behavior does not meet the needs of your application, you can modify this sample project in the following ways:
To change most common configuration parameters, use the toolbar at the top of the application.
To change DAQmx channel configuration while the application is running, stop the acquisition and configure the hardware by clicking Stop, then Configure.
To change measurement-specific configuration, feature units, and table formatting, expand the Measurements area of the toolbar. Click OK to commit changes and Cancel to revert changes.
To add or change the computation of a result, modify Audio Measurements.vi. Use built-in LabVIEW, Sound and Vibration, or custom VIs to compute features to include in the Results table. Then use Set Feature Attributes for Variants.vi to configure features for display. Each feature is treated as an array with one element per channel.
Add feature values to the list by appending or inserting into the existing feature table as shown below:
© 2012 National Instruments. All rights reserved.
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.
National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.
End-User License Agreements and Third-Party Legal Notices
You can find end-user license agreements (EULAs) and third-party legal notices in the following locations:
- Notices are located in the <National Instruments>\_Legal Information and <National Instruments> directories.
- EULAs are located in the <National Instruments>\Shared\MDF\Legal\license directory.
- Review <National Instruments>\_Legal Information.txt for information on including legal information in installers built with NI products.
LabVIEW, National Instruments, NI, ni.com, the National Instruments corporate logo, and the Eagle logo are trademarks of National Instruments Corporation. Refer to the Trademark Information at ni.com/trademarks for other National Instruments trademarks.
Other product and company names mentioned herein are trademarks or trade names of their respective companies.
For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.