LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to segment this?

Hi
 
The following graph displays the voiced sections of a signal (y-axis = # of samples of period length, x-axis = # of segments) that has already broken down into segments of i.e. 512 samples.
How can i segment each voiced section to the number of samples is represented with? i.e. if a section is 1200 samples long, and its period length is 30 samples, how to break down that section into pieces of 30 samples long while unvoiced ones should remain the same?
0 Kudos
Message 1 of 46
(3,723 Views)
Hello,

The graph it's empty. Please make sure that you do "make current values default".


Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 46
(3,670 Views)
Sorry about that
here it is again
0 Kudos
Message 3 of 46
(3,663 Views)
i forgot to correct the x and y axis....here it is...sorry for that
0 Kudos
Message 4 of 46
(3,658 Views)

Hi madgreek,

      This sounds like an interesting puzzle - but I confess to not understanding the graph or description.

@ x=2, y=30, does this mean that 30 samples (in the second [time(?)] segment of 512 samples) were found to be "voiced"?  Does this mean that, always, Y <= segment-size (as measured in samples)?

What are the units of a single sample?

If "period-length" = "sample"s, and "y-axis = # of samples of period length", this seems to imply: y-axis = # of samples of samples.

Sorry, I'm confused!

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 5 of 46
(3,644 Views)
Hi
 
 What exactly the graph means is...i.e. at x=2 (3rd segment) the period present in that segment is 30 samples long or if you like (30* dT=in seconds). This is a part of a bigger code i am building. What i have done is this...i am segmenting the input sound into segments of i.e. 512 samples long and calculating the pitch period present in every segment (if its voiced). The array i have attached earlier shows which segments are voiced (the numbered ones) and therefore the pitch period present in it in samples, and which ones are unvoiced (zero-valued ones). That is what the graph shows.
 
What i want to do now is whatever segments are voiced to segment them again according to their pitch period present in them, while unvoiced ones stay the same (no modification to them). The graph shows the segments in sections i.e. the 2nd voiced section has 13 segments of 512 samples each and has a mean period present of 31 samples....i want that section to be segmented again into pieces of 31 samples long ((13*512)/31).
 
I dont know if i made it easier for you with this description. If you have any other questions please feel free to let me know, or if you want to see the rest of my code let me know so i can put it here
 
Thank you in advance
0 Kudos
Message 6 of 46
(3,626 Views)

Hi madgreek,

      I did some homework and learned the meaning of "Pitch Period" - the smallest repeating unit of a signal or, in voiced signals, the time between two "Glottal Closure Instances" (AKA GCI)  (I know you understand the concepts, the links are for anyone else who might be interested! Smiley Happy)  So, you've started with an analog waveform like one might obtain from a microphone (acquiring at, say, 100KHz), divided the waveform into same-sized-segments, then assigned a value to each segment based on the voice "pitch" (if any) present in the segment.  The value assigned to each segment is the "Pitch Period" (as measured in DAQ samples.)

If this is correct...


What i want to do now is whatever segments are voiced to segment them again according to their pitch period present in them, while unvoiced ones stay the same (no modification to them).

When you say "segment them again", what do you want to see? Can you describe it or show an example?

In the example attached, I started with your original graph and added "ticks" 31 samples apart - but only for the voiced section.  Is this what you want?

I hope we're getting closer!Smiley Wink

Message Edited by tbd on 03-07-2007 11:54 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 7 of 46
(3,603 Views)

hi tbd

the first part of your post is absolutely correct Smiley Wink

as for the second i didnt quite get it, although it sounds close to what i want.

i tried to draw something, maybe it will be easier to visualize it

lets say, the first voiced section in the attached graph is made up of 2 segments of 512 samples each with a mean pitch period of 32 samples long. i want that 1024 samples long section to be broken down into smaller segments of 32 samples long each , that is ((2*512)/32=32 segments) and same again for the next voiced section. i think this can be done (and i say i think Smiley Wink) since we know where each voiced section starts and where it ends.

one problem i am seeing is with any remainder (i.e. 512/40=12.8) but i think only the starting index of each voiced section matters and the number of its segments...

thank you though for your time and help up to now

kind regards

madgreek

0 Kudos
Message 8 of 46
(3,598 Views)
Madgreek,
      Nice Pic!
On the chart, a "coarse-pitch-section" (my term) is delineated by two transitions, one from 0 to X (a pitch-period value) and the other X to 0.  To re-draw one of the coarse-pitch-sections as a sequence of narrow sections (pulses?) implys creating a data-set with 0 (zeros) in-between your pitch values.  Is that OK?  Would you like to see each "pulse" as a square-wave with a 50% "duty-cycle"?  So, within in a section where PP=31, we'd create a series of pulses with 15.5 samples HI and 15.5 samples low?   This can be done!  It may involve taking the input array of N samples and expanding it into a N*512 sample (or 2*N*512 sample) array with the voiced sections re-drawn as described.  Though doable, it seems non-trivial.  If no-one else steps in, I'll write the routine about 10 hours from now. Smiley Wink
 
Cheers!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 9 of 46
(3,586 Views)
Hey tbd
 
That was a quick responce Smiley Happy
 
I am attaching my code with the sound file, if it will just save you even a few minutes by not creating something from scratch (arrays etc). The array of the signal and of the pitch periods that you have already seen in earlier posts can be found at the further right bottom of my code, outside the for loop.
 
I am wondering though about the zeroes between the "pulses" as you call them, isnt this going to change my original signal to a bigger size? My ultimate goal is to take all the segments later on (voiced and unvoiced) and by a suitable modification to be able to change the pitch or speed of my original signal by repeating or deleting certain number of the segments, but i guess this is something that i can worry later on  Smiley Happy
 
As for now, i want to thank you again for all your time and effort
 
Regards
Madgreek
Download All
0 Kudos
Message 10 of 46
(3,580 Views)