Archived: Filtering music with the EMONA myDSP digital filter

Publish Date: Nov 13, 2017 | 0 Ratings | 0.00 out of 5 | Print | Submit your review


This document has been archived and is no longer updated by National Instruments.

In the past, music has always been processed in the studio by analog processing elements. In this tutorial you will dive right into creating your own digital fiter and listening to the effects of various digital filters on that music. You will:

  • Input and output music from an NI myDAQ
  • Implement digital filters and listen to the effects of DSP
  • View time and spectrum displays to better understand the processing

Download the example program and follow the tutorial to recreate the experiment in your lab or dorm

Table of Contents

  1. Background
  2. What is EMONA myDSP
  3. Understanding the connections on the EMONA myDSP
  4. Setting up the experiment
  5. Running the experiment
  6. Challenge
  7. Resources

1. Background


The cost of digital systems is now so low and the flexibility they offer is so high that it is critical to understand how they work so as to be able to use them when necessary. The EMONA myDSP is supplied with an Experiment manual which takes you from introductory concepts through to real world implementation of digital signal processing systems.

In this tutorial you will implement digital filters by designing the specifications of the filter and having the LabVIEW Digital Filter Design toolkit blocks carry out the laborious calculations for you in the myDSP Instrument SFP.

Operating at this “design level” will quickly let you see how powerful digital filter specifications are whilst at the same time allowing you to “peep under the bonnet” and see the math that operates in the background of such systems.


Back to Top

2. What is EMONA myDSP

EMONA myDSP is a single channel, audio band, DSP-based digital filter board which can implement up to and including 10th order filters of LPF, HPF, BPF and Bandstop type in real time hardware, primarily for educational purposes.

It can be used alongside other myDAQ miniSystems to process their signals, and/or with the extensive Experiment manual supplied, as a complete “Introduction to Signals & Systems” as well as DSP course.


Back to Top

3. Understanding the connections on the EMONA myDSP

Here are descriptions of the I/O connections including myDAQ channels used. A quick snapshot of the connections between the myDSP and myDAQ in table form:


EMONA myDSP myDAQ connection
Dig 7-0 outputs Dig 7-0


All other myDAQ signals are passed through and available at the output connector


Back to Top

4. Setting up the experiment

You will need:


- Elenco myProtoboard or Combicon screw terminal connector

- 3.5mm stereo jack with leads

- portable source of music such as an MP3 player

- stereo ear buds or headphones with 3.5mm plug

- stereo lead with 3.5mm stereo male plugs at each end (supplied with myDAQ)

-patching leads (supplied with myDSP and myProtoboard)


Plug the myDSP into the myDAQ, and then plug the myProtoboard into the myDSP output connector.



Make connections as shown in the photo above. Follow the patching diagram below.

Plug headphones into AUDIO OUT of myDAQ and the music source  via the stereo cable into the 3.5 mm jack.

Notice that you have the anti-aliasing filter included by selecting “YES”, and also notice that you are taking your output from the Filtered DAC output.





Back to Top

5. Running the experiment

  1. Download the ‘EMONA myDSP *.zip’ from, and extract all the contents onto your computer.
  2. Run the ‘EMONA myDSP.exe” code. This requires LabVIEW Runtime Engine 2012.
  3. Open the ‘EMONA myDSP Audio in-out Spectrum monitor.VI’. This is written in LV2012 and so will require at least LV2012 or later to open.
  4. Running this code will automatically detect the myDAQ you have connected and will display the selection on the front panel as shown in the example immediately below.





  1. Run the VI and observe the displayed active signals in both the time and frequency domain. For more information about “time and frequency domains” please refer to, and complete the Experiments in the EMONA myDSP Experiment Manual.

The myDSP powers up with a default filter of LPF type, with passband corner frequency of 1kHz, and a sampling rate of 5kHz. The unfiltered input signal is blue and the filtered output signal is red in all displays on the front panel.

  1. Play some music from your MP3 player and listen to the stereo earbuds one at a time.
  2. Note that one channel will be the original music, whilst the other channel will be the filtered music. You may find it easier to listen to one earbud at a time.
  3. Try changing the filter design on the “myDSP SFP” to remain as a Lowpass, but with fpass1 = 200, and fstop1 = 800. This will also be a 4th order filter running at 5kHz. Press “EXTRACT” to compute the filter coefficients, and then press” LOAD myDSP” to transfer the implementation coefficients to the hardware. You will now hear that most high pitched sounds have reduced and mainly low frequency sounds are output…as expected according to your design specifications.

The “spectrum monitor” program displays the spectrum of the processed signal and for further insights into this spectrum please refer to, and complete the Experiments in the EMONA myDSP Experiment Manual.

  1. Finally change the filter type to Highpass. Enter a fpass1=2000, and fstop1=1000. Leave sampling frequency as is at 5kHz. Switch to the ‘manual gains entry mode’ tab and review the selections there. Extract the hardware gains, and download to the myDSP. Listen to the high frequencies remaining in your music, and notice how much energy is present in the low frequencies and how noticeable it is when this is removed.

The myDSP SFP setup for the Highpass filter is pictured below:



The signal monitor front panel will appear similar to below:



There are several interesting things to notice in this display.

Notice how little signal level is remaining in the output signal.

In the red display showing the zoomed FFT of the output you notice the response ramps up as expected for the highpass filter designed, but then ramps back down. This lowpass effect is due to either the anti-aliasing or reconstruction filters on the myDSP, which aim to limit the bandwidth of the signal being processed.

As well, in the “ai 1 magn complete spectrum” display you can see the images created due to sampling at 5ksps. These images are repeated on either side of the 5kHz point and need to be eliminated by the reconstruction filters on the output of the DAC. The myDSP has 4th order reconstruction filters and these will give approximately a 4 x 6 db attenuation per octave, so we expect the output signal to be 24 dB down at 6kHz as compared to at the cutoff frequency of 3kHz. Better input and output filters make for better recovered signals.These issues are covered in more detail in the Experiment manual.


Back to Top

6. Challenge

To gain an understanding as to how to create your own custom filters, complete the Experiments in the Experiment Manual. This will introduce you to all the fundamental concepts behind implementing DSP filters.

Experiment with different filter types and specifications and listen to the effects. Remember to  keep your designs within the capabilities of the myDSP hardware. You will need to refer to both the User Manual and the Experiment manual for help with this.

Using real hardware will expose you to many of the real world issues involved in implementing digital filters in hardware.

Enjoy exploring, and remember to aim to relate your findings back to the theory.


Back to Top

7. Resources

Get the EMONA myDSP for NI myDAQ

What Is an NI miniSystem?

What Is NI myDAQ?


Back to Top

Bookmark & Share


Rate this document

Answered Your Question?
Yes No