From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I play an audio signal using DAQ or other way?

I'm designing a Voltage control amplifier. as shown in the attachment, I have a speaker connected to the power amplifier but all i have is noise. I like to know how can I put an simple audio to my circuit. My audio input is generated by the function generator. I only have a simple labview program which control my voltage input as attached.

Download All
0 Kudos
Message 1 of 12
(5,652 Views)

bump. helpp

0 Kudos
Message 2 of 12
(5,615 Views)

i like to know how can i generate an audio input to my circuit. just a simple program will do. thanks

0 Kudos
Message 3 of 12
(5,609 Views)

Can't you just use the WAV output VIs in the Sound palette and use your PCs sound card output?  Look in the examples if you need to see how sound output is done but playing a short wave file is pretty easy.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 12
(5,600 Views)

hi, thanks for your reply. 

I'm new to labview and actually i dont get what you mean. i have learn how to Retrieve an Audio Signal from a .wav File from this website. http://cnx.org/content/m14771/latest/ but how do i actually output the audio signal to the device NI ELVISII?  can you guide me along or show me the link?
thank you! really appericate your help!

0 Kudos
Message 5 of 12
(5,586 Views)

The last example is similar to what I was talking about.  It sends a generated waveform out through the sound card output of your PC that you can wire to your circuit input.  A better choice would be the Generate Sound VI found in the Example Finder > Hardware IO > Sound.  It's basically a simple function generator that outputs from you sound card.

 

If you want to use a DAQ card (Is that what ELVIS is?  I've never used it.), look at the Voltage Continuous Output.vi example (Hardware IO > DAQmx > Analog Out).  That one is like a signal generator that outputs from your DAQ cards analog out.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 6 of 12
(5,549 Views)

hi thanks for your reply.

just to comfirm, can i play a music signal file wav using the examples you show me? 

anyway i will be trying out them tmr.. thank very for your help! cheer!

0 Kudos
Message 7 of 12
(5,534 Views)

Sure you can.  Are you even looking at the examples???  There is one called Sound Player.vi in the Sound folder.  It takes a path to a wav file and plays it throught the sound card.

 

I just noticed I have a Sound File Play VI in my Sound palette (using LabVIEW2012).  That makes it even easier to output wav files but inside is just a DLL call so you won't learn as much as looking through some examples.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 12
(5,525 Views)
Sorry sorry, I didn't complete my sentence. I know how to play a wav file but not very sure how to output to my circuit board. Sorry to ask Stupid Q.
0 Kudos
Message 9 of 12
(5,514 Views)

No problem, your questions are not stupid. I just want to be sure you're digging into the examples and learning from them (they're a great resource).  

 

The sound card outputs should be good enough to drive your circuit.  Most cheap cards or built-in audio chips have a jack for line out and headphones (which is just the line signal through a buffer amp so you have volume control).  Either on should work for your purpose.  The line out should give you a volt or more at reasonable current levels. There also MIGHT be a low frequency filter on the output meaning that you won't be able to output DC levels or very slow (<20Hz) AC.

 

The jacks themselves usually have the signals (Left and Right) on the center conductors and the return is the barrel but you might want to look up your card's specs or probe the outputs before you connect anything to your circuit.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 12
(5,503 Views)