LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Play a Chirp signal (sound) through multiple speaker individually at at a time

Hello All

Currently I have a setup where I play the chirp signal sound to a speaker connected to the laptop via pre-amp. I am very new with the acoustic testing. 

I would like to extend this setup to multiple speakers (preferably eight ) connected to the laptop and play the chirp signal through one at a time instead of through all speakers at a time.

What would be the best approach to achieve this and what hardware/software do I require to achieve this ? [ Like splitter , mixer] and I would like to select the speaker in the vi through which I would like to play the sound.

Pre-amp Used for single speaker : https://www.amazon.com/Kinter-K3118-Instruments-Digital-Amplifier/dp/B0787BRQ2F/ref=asc_df_B0787BRQ2...

Speaker : https://www.digikey.com/en/products/detail/pui-audio,-inc./AS04004MR-N50-WP-R/10286075?utm_adgroup=G...

0 Kudos
Message 1 of 8
(2,644 Views)

LabVIEW contains some Sound I/O functions that (I believe) use the PC's Sound card.  There is a parameter in Sound Output Configure called "Device ID", which NI says should usually be set to 0 (which I'm pretty sure corresponds to the PC's (only) Sound card.  However, I do know that when doing a Teams call, you can direct the Audio out to speakers, headphones, and if you have a camera that has speakers, possibly the camera's speakers, but I'm not sure how this correlates (if at all) with the Device ID in Sound Output Configure.  And I'm pretty sure most PC Sound cards don't support 8 selectable outputs.

 

I haven't played much with Audio, particularly not in the way you describe.  Is there a simple audio amplifier that can accept a 3 or 4-bit digital signal to "switch" the Audio in to one of 8 (or 16) Audio outs?  [The answer to this question is well outside my area of expertise ...].

 

Bob Schor

Message 2 of 8
(2,588 Views)

You can use this simple code to find out how many sound output devices are present.

so.png

But I don't know how to find any info about the individual devices.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 8
(2,575 Views)

This gets some info about audio devices, but I don't know what to do with it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 8
(2,565 Views)

Hi,

 

maybe you will have to look into the Dolby surround (7/9 + 1; or Athmos) algorithm. The algorithm should have the ability to communicate with individual speakers as channels (not in a LV sense). But I have never worked with sound, and I have no idea is LabVIEW supports this. 

0 Kudos
Message 5 of 8
(2,560 Views)

How much DIY should be involved?

 

A 8 channel usb soundcard with cinch out interface

https://www.thomann.de/de/esi_gigaport_ex.htm

plus 8 amps  is one way .... IF LabVIEW can adress it.

(I had trouble 10 years ago trying to adress the 5 channels of a soundcard individually .. LabVIEW on Wndows and soundcard .. always has been a sad story ... NI want to sell DACs not use cheap buildin ones ...)

 

And there are USB to 8 relay boxes you can search in the web. Usually you can command them via VISA serial, you need to check that, some need to call a C dll, so you need to write a LabVIEW driver (unless someone else already wrote one) . Use one them to switch the speakers.  (if the relays are SPDT only three are needed )  

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 8
(2,547 Views)

Paul,

     Where did you get the names/descriptions of the "Sound Device" whatchacallit?  It looks like a Microsoft-invented parameter whose meaning we should be able to "look up" if we knew where to look ...  I have seen, when running a "Connect your PC to the Web for a meeting", things that ask me to "Setup my audio" and show more than one input (Microphone, Headphone, sometimes Camera), and I usually fumble around until someone says "I can hear you now".  

 

Bob Schor

0 Kudos
Message 7 of 8
(2,500 Views)

@Prabagar wrote:

Hello All

Currently I have a setup where I play the chirp signal sound to a speaker connected to the laptop via pre-amp. I am very new with the acoustic testing. 

I would like to extend this setup to multiple speakers (preferably eight ) connected to the laptop and play the chirp signal through one at a time instead of through all speakers at a time.

What would be the best approach to achieve this and what hardware/software do I require to achieve this ? [ Like splitter , mixer] and I would like to select the speaker in the vi through which I would like to play the sound.

Pre-amp Used for single speaker : https://www.amazon.com/Kinter-K3118-Instruments-Digital-Amplifier/dp/B0787BRQ2F/ref=asc_df_B0787BRQ2...

Speaker : https://www.digikey.com/en/products/detail/pui-audio,-inc./AS04004MR-N50-WP-R/10286075?utm_adgroup=G...


I took a quick glance at the Windows Sound APIs (e.g. https://learn.microsoft.com/en-us/windows/win32/coreaudio/enumerating-audio-devices and https://learn.microsoft.com/en-us/dotnet/api/system.media.soundplayer.play?view=dotnet-plat-ext-8.0 and https://stackoverflow.com/questions/57778069/how-can-i-programmatically-set-the-default-input-and-ou...) and it seems like trying to set this up in a programmatic way through LabVIEW would not be a rewarding exercise. Basically, you want to do a sliding tackle on Windows' multimedia entertainment system. I guess Microsoft has no incentive to make this easy, and would rather not let any old program mess up the user experience.

 

If you want to go the software route, maybe autohotkey or other user input simulators can help you. Most of them should have a command line interface or API that you could use with LabVIEW.

 

I would recommend using some kind of multiplexer after the output - for example a device like this: https://www.amazon.com/Switcher-Selector-Splitter-Controller%EF%BC%884-Out%EF%BC%89-MC41/dp/B09KLH5G... - I'm sure you could find one of these devices that can be remote controlled (e.g. https://hackaday.com/tag/audio-multiplexer/)

0 Kudos
Message 8 of 8
(2,458 Views)