LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to analyze (break down) a waveform?

hello
 
the waveform below is a small speech signal after being analyzed by my code that displays what sections are voiced and which are not. its divided into 26 segments of same size (512 samples each or 20 msecs).
now how can i segment the (3) voiced sections only accordingly to the pitch periods estimated for each section letting the unvoiced ones unaltered (keep their size)? lets say first section has a period of 8 msecs, the second 9 msecs and the third one 10 msecs. how can i do that programmatically since the size and number of my segments will not always be the same?  
 
 
0 Kudos
Message 1 of 9
(3,421 Views)

Hi madgreek,

Can you determine the number of samples of which each section is comprised?  If you can, you can use this number as the input to the count terminal on the for loop, and create an array within this for loop.  You can then surround this code by another for loop that runs 3 times, one for each section.

If this is not what you are looking for, can you please clarify the problem statement?  I'm not sure that I fully understand what you are trying to do.

Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 2 of 9
(3,371 Views)
Hi Ching
 
i didnt quite get what you were trying to tell me because i think i was not quite clear in my last post.
 
My code breaks the signal into a number of segments of length 20msecs lets say, and estimates the pitch periods of them.  An array at the far right of my code displays these pitch periods (0 means unvoiced segments while the rest are the pitch periods of the voiced segments in msecs) as in i.e. 0,0,0,0,8,8,9,9,10,10,0,0,0....each number (which represents a segment) has a length of 20 msecs or 512 samples lets say.
 What i want to do is the voiced (numbered) segments of initial length 512 samples lets say to be segmented again according to the length of the pitch period found for that segment (i.e. 60 samples or 8 msecs). I dont know if i made it more clear for you this time 🙂
 
i have attached my vi with my sound if you want to give it a look
 
Kind regards
Madgreek
Download All
0 Kudos
Message 3 of 9
(3,368 Views)

Hi madgreek,

I'm not sure if I understand you correctly, but are you trying to get a subset of the original array that has only the non-zero elements in it?  I believe that you are trying to get this non-zero array, then process it like you processed your original waveform.  If my assumption is correct, then the following screenshot should give you a starting point.  The picture below shows you how to create a VI that will extract only non-zero elements from an array and build a new one.



Please let me know if this was not what you were looking for, and I'll be more than happy to help you out.  Best of luck on your application, and have a great day!!

Message Edited by cphuong on 02-27-2007 09:20 PM

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 4 of 9
(3,353 Views)
Hello Ching
 
No i am not trying to get only the non-zero elements of my initial array.
 
Each element of that array represents a segment of my signal. A zero-valued element  means that segment is unvoiced (no period present in it) while the non-zero element
in the array shows the period present in that specific segment. All of those segments are of the same size (i.e. 20 msecs).
I want the non-zero segments to be segmented again to the period present in that segment. For example the 6th segment has a period of 10 msecs, i want that 6th segment (of initial length 20 msecs) to break down into 2 (two) 10 msec segments and so on for the rest. Zero-value segments should stay the same size (no modification). I dont know if i made it more clear now.
 
(I am working on something now to solve my problem but its not ready yet so dont pay too much attention to it.  If you want give it a look and you might get an idea of what im trying to do or the worse thing that can happen is i might confuse you even more Smiley Wink
 
kind regards
Madgreek
0 Kudos
Message 5 of 9
(3,346 Views)

Hi madgreek,

I took a look at your code, and I think the issue is that since you have an index of 0,  you are always getting data that starts at the same location in the array.  You are always getting data from the beginning of the array, instead of the next section of the array that you would like to analyze. 

I have to admit, I am still a bit confused, but I hope that my observation of the issue can help you.  Maybe a simple example of what you are trying to do, in very general terms (not using voiced and unvoiced signals) may help me better understand.  I apologize for not being able to help you more, but please feel free to let me know if you have any further questions.

Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 6 of 9
(3,330 Views)

Dear Ching

Please dont feel bad that you are a bit confused still Smiley Wink believe me i know the feeling...and its my mistake that i cant explain my problem better

i tried to do what i want diagrammatically...maybe it will be easier for you to look at it

as far as the indexing that starts from 0 i think "i am correct" there since i am checking my input signal segment by segment therefore it has to start from 0...and i say i think Smiley Wink

 

Regards

Madgreek

0 Kudos
Message 7 of 9
(3,327 Views)
Hi madgreek,

How are things going on this?  I hope you are making progress.  I had a quick question for you though.  Please take a look at the diagram below.  Thanks!!


Message Edited by cphuong on 03-01-2007 07:51 PM

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 8 of 9
(3,304 Views)
Hey Ching
 
How are you?
 
About your question....i dont know exactly why i am doing that ...i thought it would be the correct approach to take...
Right now what i am doing is trying to build my program in a more "manual" way...its getting too confusing for me Smiley Wink...i will let you know how its moving on....
 
also i would like to thank you for all your time and help you provided to me...i appreciate it...and it also deserves 5 stars
 
thank you
Madgreek
0 Kudos
Message 9 of 9
(3,290 Views)