Example Code

Secting a File *.WAV 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 VI exemplifies how to manipulate a .wav file and cut it.

 

Description

This VI uses the Sound Files VIs to open an existing .wav file and cut it to the desired time specified by the user and generate a new file. This could be useful to separate the data into sections depending on the user needs. It also calculates how many iterations of the new trimmed section of the audio file are necessary to cover the original duration time.

 

Requirements
LabVIEW Base Development System.
DirectX 8.0 or higher.

 

Steps to Implement or Execute Code
1. Open the attached VI "Trimmed WAV file LV 2012 - NI Verified.vi".
2. Run the VI.
3. Open the destination path.
4. Play the file named trimmed.wav


Additional Information or References

 Snippet 4701.png

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

Arturo Gómez | Applications Engineering
Certified LabVIEW Associated Developer

National Instruments Latin America
01-800-010-0793
ni.com/support

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