Example Code

Adding a Flanger Effect to an Audio File

Code and Documents

Attachment

Overview
This VI takes a dry (not effected) audio input, implements this simple flanger algorithm, writes the effected audio to file and plays sound clip.


Description

Flanging is defined as an audio effect produced by mixing two identical signals together where one is delayed by a small and periodically changing time. A Simple flanger effect can be modeled by the following equation: Y(t) = x(t) + A * X(t - d(t)), where x(t) is the original signal and A is the level of the flanger effect. Flanger 2012 NIVerified.VI takes a dry (not effected) audio input, implements this simple flanger algorithm, writes the effected audio to file and plays sound clip. This example highlights several important components of non real-time audio signal processing using LabVIEW including the following:

                - Usage of the Simple Sound File Read, Write and Play VIs

                - Reading and writing individual elements of an array using the Index Array and Replace Array Subset VIs

                - Implementing a simple flanging algorithm
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached file to your computer
  2. Open the VI " Flanger 2012 NIVerified.vi"
  3. Run the program

 

Additional Information or References
VI Snippet

Block Diagram.png

 

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

 

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments

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