Example Code

Acquire and Filter Sound from PC's Sound Board in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview
This example VI demonstrates how to acquire sounds from the PC's sound board, filter it and output the filtered signal back to the PC's sound board.


Description
In LabVIEW you are able to acquire signal from your own PC's sound board, then you can filter it using the numerous functions already present in the development environment and finally output the signal using easy-to-use LabVIEW APIs. In this example a Producer - Consumer design pattern is used to transfer stream data from the acquisition loop to the ouput loop, while native LabVIEW APIs are used to interact with the sound board of the PC. 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached files to your computer
  2. Open the VI "Acquire and Filter Sound from PC LV2012 NI Verified.vi"
  3. Modify the Sound Configuration and Filter Specifications clusters based on the type of processing needed
  4. Set the wait time of the producer's loop
  5. Run the program

 

Additional Information or References

VI Block Diagram

Acquire and Filter Sound from PC LV2012 NI Verified.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Francisco Arellano

National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.