08-03-2017 03:37 PM - edited 08-03-2017 03:37 PM
@austin2017 wrote:
Thank you for ur answer. Actually my qestion is convert a txt file( i convert signal which showing in labview graph to txt file )which include numbers convert to sound file or just signal convert to audio file in labview. Is that possible?
thank yiu
Well... you're the one who encoded it. I suppose it's up to you to decode it now. If all you did was convert the raw values into human-readable text, there's no reason you can't reverse the process. It should be as simple as reading all the values into a byte array and writing it to a file. Read up on what a wave file header is if you want audio players to know what to do with it.
08-03-2017 03:52 PM
yes. I checked the Sound palette that was mentioned earlier. all the example are read sound file and write sound file. I tried to read txt file write to sound file, and then I tried directly read the input signal and write to sound file. but both failed, the program can not run.
08-03-2017 03:56 PM
So you've got step 1 and step 3 of what I wrote done.
Sounds like you forgot to do step 2.
08-03-2017 03:57 PM
I have waveform . Sorry i did not mentioned that
08-03-2017 03:59 PM
Then send the waveform to the VI I told you about.
If you are still having problems, we can't help without seeing your code. Attach a VI.
08-03-2017 04:36 PM
sorry. I am a beginner . I attached labview file. the input is a signal from data acquisition. I want to write it to sound file.
08-03-2017 04:45 PM
the waveform lokk like the attached picture
08-03-2017 05:00 PM
Is there a reason you are saving the data as an excel file? It would be a lot easier if you just saved it directly, without making any kind of intermediate file. According to your waveform though, you may have clipping, since it seems you will have numbers outside the range of +/- 1.0.
08-03-2017 08:16 PM
@austin2017 wrote:
sorry. I am a beginner . I attached labview file. the input is a signal from data acquisition. I want to write it to sound file.
When I open your VI, I see a broken run arrow. So to figure out what is wrong, I click on it. It gives me a list of all the errors. Then I read it and fix the problems.
Did you do that?
I see one error about the Sound Write .VI missing a required input.
If you open context help and hover over that VI, it will show you which inputs are required. (The terminal is shown in bold.) You can open detailed help and learn even more about that function, VI. In this case, your Sound refnum needs to be wired.