Showing results for 
Search instead for 
Did you mean: 

Play Waveform Express VI

Hello, I am using a "Simple Read" VI to acquire a .wav file and the "Play Waveform" Express VI to play it and everything works perfectly (i.e. I can actually hear the file playing). However, when I pass the signal through a low-pass filter and connect the output to the same Express VI, I get an error. Could someone take a look at the attached VI and give me a hint of what I am doing wrong??? Thank you in advance!!!
0 Kudos
Message 1 of 10
Hello Argon,
I believe this approach is not working because the Filter VI you've used accepts Array data and not Waveform data.  An array does not carry a dt value, so the filter loses this information, which I think the sound VI requires to know what the sampling rate of your data is.
The good news is I've got an easy suggestion for you.  Try the Filter Express VI.  You should be able to configure it with a configuration page like the others in your VI.  It also requires no conversion nodes - just wire your input type up to the express VI, and its output goes to the play waveform.  I tested this on my machine with a sample WAV file and it worked pretty well.  It even sounded kind of cool.  🙂
Good luck,
0 Kudos
Message 2 of 10
Thanks for your help, it does work using the express VI. The only problem is that I need to control the cutoff frequencies on the front panel and the express VI does not allow me to do this. Is there any other way to do this?
0 Kudos
Message 3 of 10

You can convert the Express VI to a regular VI by right clicking and selecting Open Front Panel. It can then be modified. You can also provide the sampling frequency to the filter function you originally had.

Message Edited by Dennis Knutson on 03-12-2007 01:17 PM

0 Kudos
Message 4 of 10
Hello, I provided the sampling frequency to the filter function I originally had, attached VI, but I still get the same error. Is is possible to add inputs to the Filter Express VI so I can control the Filter type, cut-off frequencies, etc. on the front panel? Thanks for your help!!!
0 Kudos
Message 5 of 10

One thing I forgot to do was to re-create the waveform data type on the output of the filter. On the same palette as Get Waveform components is the Build Waveform. You can use that to create the input. Also, you are getting an array of waveforms out of the play sound. You should feed this into a for loop with the filter inside and process each.

Message Edited by Dennis Knutson on 03-12-2007 06:46 PM

0 Kudos
Message 6 of 10
Thank you so much for your help. I was not able to play the output of the filter though. The only way everything works is by using the Filter Express VI which is not what I need because I want to control the filter topology and cut-off frequencies from the front panel. Anyways, thanks for responding so fast to all my questions.
0 Kudos
Message 7 of 10
I don't have 8.2 on this pc so the icon for the filter looks a little different but this is what  was talking about to correct the original example I posted. If this doesn't work, could you provide the error code that you get?

Message Edited by Dennis Knutson on 03-12-2007 08:31 PM

0 Kudos
Message 8 of 10
Thanks a lot. I finally got it to work. I was not making the right connections inside the "For Loop". I really appreciate your help and patience!!!
0 Kudos
Message 9 of 10

Incidentally, the Filter Express VI has inputs that will allow you to control the cutoff frequencies from controls on your VI's front panel.  There (in this case) seems to be no need to open its front panel to convert it to a regular VI, or use the lower-level Filter VIs, but either approach should be equally effective.

Update: I read the rest of the thread, and saw you wanted to be able to change the topology from the front panel, which you wouldn't be able to do directly using the Express VI.  Only the cutoff frequencies are exposed to for programmatic control.

Message Edited by Jeff B on 03-13-2007 08:16 AM

0 Kudos
Message 10 of 10