LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read Sound That Is Playing Through Laptop Speakers

Hey guys,

 

I'm making a laser show that is controlled from the sound that my laptop is playing, so I'd like to continously read volume and frequency (from the sound card?).

 

I tried using the examaple file "Continuous Sound Input" but I couldn't find a correct Device ID and it only shows 1 graph.

 

If anyone knows how to accomplish this, I would really appreciate some pointers. I am pretty new to LabView so I'm unsure of how to go about doing this.

 

Thanks

0 Kudos
Message 1 of 6
(3,562 Views)

Hi Haybor,

 

use the mentioned example VI, it usually works nicely using the PCs mic input. Then wire the sound output back to mic input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,555 Views)

As Gerd said, wiring the sound output to the microphone input is the simplest solution. Input Sound is connected to the microphone input and can't be easily connected to the sound output. For that one would have to dig deep into DirectSound and configure your own filter graph with a T filter that splits the sound output into another virtual sound input channel. This is not something the LabVIEW Sound VIs allow and even most other DirectSound related applications wouldn't normally support such a configuration option.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 6
(3,540 Views)

Hmm, ok. I was worried it wouldn't be possible without a lot of digging. This will be running at a party that will most likely be too loud to get accurate readings from the laptop's microphone.

 

However, when I do run the example, I get an error that says "Selected Device is Invalid." I went in to the device manager and it says the microphone is at location 0, so I kept the device ID 0. Any idea on how to find get the device ID?

0 Kudos
Message 4 of 6
(3,507 Views)

Hi Haybor,

 

I wasn't referring to the laptop's built in microphone, but the mic input of the sound-card. Usually it is located next to the headphone output…

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,501 Views)

Hey Gerd,

 

I'm sorry, I don't really understand what you mean. Where are you saying the mic input is next to the headphone output? In device manager? Also, I'm not sure what you are instructing me to do. I really appreciate the help, I hope we can get this working!

 

Haybur

0 Kudos
Message 6 of 6
(3,488 Views)