LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto generate SoundFile

Solved!
Go to solution

Hi there,

 

I'm using Labview 8.2.1, and trying to create a sound file  (*.wav) without ask de user the location and name of the destination file, this event will occur when the user latch one button or by a trigger generated by analyse the sound waveform.

 

I already make a sound acquisition by a generic usb sound card, and I was able to make the acquisition and generate the file but not automatically. I only was able to start a acquisition and recording, but I never was able to make a continuous acquisition and recording some sound in the middle.

 

Can anyone help me?

 

Thanks

Hugo Guerreiro

0 Kudos
Message 1 of 13
(4,044 Views)

Hello Hugo,

 

Thank you for posting on National Instruments forum.

 

I am not sure to well understand your trouble. In fact you build a VI to acquire a sound and you would like  to have a button which allow to record what you are acquiring when click on it?

But you do not want to record your acquisition?

Is that right?

 

Have a nice day,

Regards

Flo

0 Kudos
Message 2 of 13
(4,022 Views)

Hello Florent,

 

 

I want to built a vi that can continuously acquiring sound without stop, and recording into a (*.wav) file sometimes in the middle of the acquisition, without prompting the user.

 

 

Thanks for your time

Best Regards

Hugo Guerreiro

0 Kudos
Message 3 of 13
(4,010 Views)

If you don't want to continuously prompt the user for a file name, remove the File Dialog function you have there. Create the file name dynamically.

 

The use of the for loop around the acquire and write is silly. Why don't you simply use a case statement? You should also consider moving the sound file Open, Sound Input Config, Soudn Input Clear and Sound File close to outside the main while loop. No reason to call those each and every iteration.

Message 4 of 13
(4,007 Views)

Hi,

 

 

You where right, I just thougth that I need the file dialog somehow.

Now I can create the wave file dynamically , but I still can't create as many files as I want without stopping the acquisition.

 

 

Thanks in advance

Hugo Guerreiro

0 Kudos
Message 5 of 13
(3,999 Views)
Sorry, I may have given some bad advice. I'm not sure if the Sound File Write appends data each time it is called or whether it overwrites the previous data. You may have to do the write when the inner loop finishes. There is a function on the Waveform palette to append one waveform to another and you would pass the appended waveform out through the loop.
Message 6 of 13
(3,995 Views)

No, you gave me a good advice.

Now I'm able to generate a different wave file each time I want, because I'm already generating a dynamic filename.

 

By now my only problem is that I don't want to stop the acquisition. I need to perform some eye analysis during the acquisition, and I can't see the waveform graph without recording it.

 

 

Best Regards

Hugo Guerreiro

0 Kudos
Message 7 of 13
(3,988 Views)

I think I understand what you are doing. You are a trainee for FBI. And they want you to make a Labview based surveillance system. They plan to listen in all the time. But then they hear something useful, they press record. A new file with some predefined automatic naming system will be created. Then the rerecording is stopped the file will be closed.

Well perhaps not true about the FBI thingSmiley Very Happy But I guess the principals are correct;)



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 8 of 13
(3,971 Views)

 Yes,

Is exactly that what I intend to do... Can you help me?

You are also true, I'm a secret agent from FBI.... Now I have to kill you!! LOL Smiley Wink But first give me some info... Smiley Wink

 

 Thanks

Hugo Guerreiro (NI secret agent)

0 Kudos
Message 9 of 13
(3,945 Views)

Hello there,

 

 

I can't find a way of make this work...

Plese give some ideas.

 

 

 

 

Thanks

Hugo Guerreiro

Download All
0 Kudos
Message 10 of 13
(3,899 Views)