LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time audio processing with NI myDAQ

Hello,

 

We are trying to make a virtual mixer. to read audio in and change the volume of specified frequencies doesn't seem to be a problem. The problem occurs when we try to get the signal to an output. The system works well until we change the volume, then the following error(can be found in attachments) occurs. We think it has something to do with the sample rate or the buffer. We allready played around with changing the sample rate and samples to write at the input and output.

 

Our project can also be found below.

 

Thanks in advance!

0 Kudos
Message 1 of 2
(2,195 Views)

Learn LabVIEW.  Understand the Principle of Data Flow, which (among other things) says that a Loop cannot proceed until everything inside it has run.

 

So what's inside your loop?  A bunch of Express VIs, including the Dreaded DAQ Assistant (DDA) and its Evil Twin, the Dynamic Data Wire (those black-and-white checkerboard wires on your Block Diagram).  Let's ignore this for now, and concentrate on what you are asking LabVIEW to do.  You want to acquire sound data from something, say 10k samples at a sampling rate of 25 kHz.  How long does this take?  Now you want to process tmhis using some algorithm.  Let's say this take 1 msec (or some other trivial time).  Now you want to output it, again 10k samples at 25 kHz.  How long does this take?  So how long does the entire loop take?  Do you see a problem here?

 

I'm assuming you are taking a class in LabVIEW, and that this is Week 2 of the Class.  Suggest to your Instructor that "some guy on the LabVIEW Forum suggested that he spend Week 2 on discussing Data Acquisition and Control (DAQ) using MAX and DAQmx, and suggest that he (or she) read "Learn 10 Functions in NI DAQmx and Handle 80 Percent of your Data Acquisition Applications" (it's on the Web), and banish the DDA (and banish twice the Dynamic Data Wire).

 

In my second Paragraph, I tried to show you that the Principle of Data Flow makes your program fail (do you understand why?).  The same Principle also provides the Solution -- do two things at the same time, acquire and simultaneously (rather than sequentially) process the data.  Ever heard of "parallel" computing?  LabVIEW can do it.

 

Bob Schor

0 Kudos
Message 2 of 2
(2,163 Views)