LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is wrong with my VI.?

hello guys
 
im trying to calculate the pitch period of a sound wave using the cepstrum algorithm.that part im pretty sure i got correct because i already tested my results with Matlab and they are the same.now what i am trying to do is to compare my cepstrum results with the autocorrelation function as a period estimator.im getting some reasonable results but im not sure if the x-axis of my autocorrelation function is correct.
can someone tell/suggest what i might be doing wrong here?i have attached my vi with a sample wave sound file in a zip file for testing.
for the program to work correct, the sound has to be loaded and then match the sampling frequency and bps from the sound format display with the controls on the right.
any help/tip would be much appreciated.
 
kind regards
madgreek
0 Kudos
Message 1 of 5
(2,622 Views)
Hi Madgreek,

firstly you should add some logic. Use an event case to wait on the start button, so you can browse for the path inside the program.

Secondly read the sound format from the wave file and use that to decide which stream to use and which sample frequency.

Now about the Rxx x-axis, you should now that the autocorrelation always (always) tops at zero (the help showed that)
In my attachment I have programmed that.

The only thing you have to do (and do that since it will raise your grade), is make the program wait on a start button (no not the run button) OR lauches a browser window that will browse for *.wav files only.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 5
(2,612 Views)
hello Ton
first of all thanks for all the help.i appreciate your effort and time.
im kinda more confused now than before 🙂
from what i understood from your first 2 suggestions is that how to try and make my program more user friendly somehow?is it this what you were trying to tell me or i missunderstood the whole thing?
you are right about how autocorrelation tops at zero and that is a 2-sided spectrum.i understood what you did with the programming there.i did the changes you made in the attachment you sent but i am missing something somewhere which i cant figure out.im not getting the same results for the correct part of my progrma as before (cepstrum).can you send me the vi so i can run it myself the way you suggesting it should be?what are the small red dots on some subvis?
im sorry if im asking something nonsense.
 
0 Kudos
Message 3 of 5
(2,583 Views)
Hello Madgreek,

Yes that were some pointers to user friendly (and forum friendly) development.
Now I have done nothing on the cepstrum routine, only the dt can be different because I read that from the .wav file
The only thing I have done is setting the dt of the rxx waveform

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 5
(2,545 Views)
Ton thanks for all your help and suggestions
0 Kudos
Message 5 of 5
(2,518 Views)