Example Code

How To Combine Two WAV Files 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

Code and Documents

Attachment

Overview

This example demonstrates how to merge the sound from two WAV files together and display the resulting new signal in LabVIEW.

 

Description

The example VI is built on the community example How to Play a WAV File in LabVIEW. Two WAV files are first opened and then the information of them is extracted by the Sound File Read functions. We then combine the information from the both WAV files and write the resulting sound to the Sound Output Write function to play it.

 

Requirements

  • LabVIEW 2012 (or compatible), A speaker

 

Steps to Implement or Execute Code

  1. Download the attached file (Play Two Sounds 2012 NIVerified.zip)
  2. Enter the correct paths of the two WAV. files you just downloaded in the VI front panel
  3. Run Play Two Sounds 2012 NIVerified.vi to hear the chord. 

 

Additional Information or References

VI Block Diagram

 2-286.png

 

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

 

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