LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sound Card Question

I have been using sound cards and LabView 6 for some time now with
great success.
I have an Audiophile 2496 sound card that I have just bought which has
4 inputs and 4 outputs. I was wondering how I can use this in LabVIEW?
Normally I use I read a stereo input in a 2D array and split it into 2
1D arrays for processing.
Here I will have two stereo inputs - can LabVIEW deal with this or
does it need special drivers?Not worried about output as it will be
mono.

Thanks a lot
0 Kudos
Message 1 of 8
(4,190 Views)
Hello!

To use your Audiophile 2496 sound card with LabVIEW the first thing you are going to need is a driver from the manufacturer. Most manufacturers already have a driver that works with LabVIEW or at least a driver written in C that then you can call from LabVIEW using Call Library Function Nodes.

To store the two stereo inputs you can keep using 2D arrays. This time you will have two, one for each stereo input. Another option is to use a 3D array where you will be able to switch between stereo inputs (first dimension), left and right (second dimension), and different samples (third dimension).

Regards,

Sylvia Vences
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,189 Views)
Sylvia V wrote:

> To use your Audiophile 2496 sound card with LabVIEW the first thing
> you are going to need is a driver from the manufacturer. Most
> manufacturers already have a driver that works with LabVIEW or at
> least a driver written in C that then you can call from LabVIEW using
> Call Library Function Nodes.

A specific driver from sound card manufacturers for LabVIEW? Can you
show me some cards which have that?

The two possibilities I see are the standard Sound VIs in LabVIEW to
interface the Multimedia Windows driver for that card.

Alternatingly ASIO could be interesting but I haven't seen an ASIO
interface library for LabVIEW yet, although I was thinking about writing
one some time ago.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 8
(4,189 Views)
Sylvia V wrote in message news:<50650000000500000058890100-1079395200000@exchange.ni.com>...
> Hello!
>
> To use your Audiophile 2496 sound card with LabVIEW the first thing
> you are going to need is a driver from the manufacturer. Most
> manufacturers already have a driver that works with LabVIEW or at
> least a driver written in C that then you can call from LabVIEW using
> Call Library Function Nodes.
>
> To store the two stereo inputs you can keep using 2D arrays. This time
> you will have two, one for each stereo input. Another option is to use
> a 3D array where you will be able to switch between stereo inputs
> (first dimension), left and right (second dimension), and different
> samples (third dimension).
>
> Regards,
>
> Sylv
ia Vences
> Applications Engineer
> National Instruments

That's a great help Sylvia but I am unsure how to call a library C
function?
I assume it is compiled in some way - how do I call this? Also I am
unsure what you mean by using two 2D arrays. The setup I have at
present is with an ordinary sound card and the 2D array comes out
naturally from the .vi - SI Read.
Will this still be the case or will teh two 2D arrays come from the
library call you mention?I saw this on the web from NI

http://www.ltrpub.com/currentissue/

which mentions the Audiophile 2496 but even the .vis look different
from LabVIEW 6.(In Figure 1 SO has a slightly different icon from
normal and he only uses two inputs and outputs but does not say how he
chose the correct two out of the four? Any suggestions?

Thanks
0 Kudos
Message 4 of 8
(4,189 Views)
Love a Sheep wrote:

> That's a great help Sylvia but I am unsure how to call a library C
> function?
> I assume it is compiled in some way - how do I call this?

A manufacturere of hardware often delivers a so called DLL. You can use
the LabVIEw Call Library Node to call functions in a DLL. But without at
least some basic knowledge about C programming this is getting fast
quite difficult to understand and deal with.

In the case of Audio cards manufacturers usually do not provide
customized DLLs to call directly but instead drivers which plug into
standard system interfaces such as the Windows Multimedia API or for
more professional applications an ASIO interface.

> http://www.ltrpub.com/currentissue/
>
> which mentions the Audiophile 249
6 but even the .vis look different
> from LabVIEW 6.(In Figure 1 SO has a slightly different icon from
> normal and he only uses two inputs and outputs but does not say how he
> chose the correct two out of the four? Any suggestions?

This VI SO Set Num Buffers.vi is part of LabVIEW 7.0. LabVIEWs sound VIs
have been somewhat improved in LabVIEW 7.0. I think the library will
most probably select the two first channels automatically (also in 6.0).
The current Sound VI interface has no means to select specific channels.
At the time it was developed sound cards had a stereo input and output only.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 8
(4,189 Views)
sheepshaggerx@yahoo.co.uk (Love a Sheep) wrote in message news:<264c4ea4.0405212353.505ee07a@posting.google.com>...
> Sylvia V wrote in message news:<50650000000500000058890100-1079395200000@exchange.ni.com>...
> > Hello!
> >
> > To use your Audiophile 2496 sound card with LabVIEW the first thing
> > you are going to need is a driver from the manufacturer. Most
> > manufacturers already have a driver that works with LabVIEW or at
> > least a driver written in C that then you can call from LabVIEW using
> > Call Library Function Nodes.
> >
> > To store the two stereo inputs you can keep using 2D arrays. This time
> > you will have two, one for each stereo input. Another option is to use
> > a 3D array where you will be able to sw
itch between stereo inputs
> > (first dimension), left and right (second dimension), and different
> > samples (third dimension).
> >
> > Regards,
> >
> > Sylvia Vences
> > Applications Engineer
> > National Instruments
>
> That's a great help Sylvia but I am unsure how to call a library C
> function?
> I assume it is compiled in some way - how do I call this? Also I am
> unsure what you mean by using two 2D arrays. The setup I have at
> present is with an ordinary sound card and the 2D array comes out
> naturally from the .vi - SI Read.
> Will this still be the case or will teh two 2D arrays come from the
> library call you mention?I saw this on the web from NI
>
> http://www.ltrpub.com/currentissue/
>
> which mentions the Audiophile 2496 but even the .vis look different
> from LabVIEW 6.(In Figure 1 SO has a slightly different icon from
> normal and he only uses two inputs and outputs but does not say how he
> chose the correct two out of the four? Any suggestions?
>
> Thanks



I have been told by the manufacturers...

Virtually all audio software on the PC uses one of the standard driver
protocols, which include MME, WDM, and ASIO.

Does that mean that it will work under LabVIEW?
0 Kudos
Message 6 of 8
(4,189 Views)
Love a Sheep wrote:

> I have been told by the manufacturers...
>
> Virtually all audio software on the PC uses one of the standard driver
> protocols, which include MME, WDM, and ASIO.
>
> Does that mean that it will work under LabVIEW?

The WDM driver is the kernel mode device driver accessing the hardware.
The MME driver I would assume provides the Multimedia API interface and
this is what the Sound VIs will access.

The ASIO is only provided for high end cards which have potential for
professional Audio use. There is no ASIO interface for LabVIEW that I'm
aware off. Writing one would involve external C code development.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 8
(4,189 Views)
I am interested too to get to the data from my Maudio FW410. There are some free libraries like openasio but they do not export header info so the call library function does not see what functions are available and how to call them.

there is a comment at
http://www.audiomulch.com/~rossb/code/calliasio/
where they seem to have fixed that, but I have not tried it yet.
0 Kudos
Message 8 of 8
(3,983 Views)