LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to segment this?



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?

I think so - if I understood your request to "segment voiced sections" you wanted to see a "segment", or pair of 0-X/X-0 transitions, for each PP.  To get a Chart to draw this picture, we need to feed it alternating X and 0 values.

The picture you provided appears to show a colored bar (instead of plotted 0/X/0) for each PP.  We can probably generate a similar picture with a picture-control.  Is it a graphical-depiction (for "the user") that's important here?

Fire just cropped-up - more later! Smiley Happy

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 11 of 46
(1,400 Views)
my goal is to be able to segment and characterize my input signal according to the pitch periods, thats why i first segmented it into same size pieces (512) so as to be easier now to distinguish what sections are voiced and which are not .
now i want those voiced sections to be broken down into pieces ( probably use the subarray function and be continuous with no transitions to o/x/o etc) of length equal to the pitch period. i dont want to look at the smaller segments going to zero, or not (if thats what you meant by graphical depiction). sorry if i confused you even more with this, but as you said, more later Smiley Happy
0 Kudos
Message 12 of 46
(1,399 Views)

Hi madgreek,

      Let's build a VI "Segment.vi" that does what you want.  Our "Segment.vi" function will have inputs and outputs.  Let's precisely define the datatypes of the inputs and outputs to Segment.vi

The inputs are easy (unless you've been playing with us) they are:

1) The integer array (of PPs) used to build the "voiced-sections" chart, and

2) The original "segment"-size (512)

Now it's your turn - please define the output(s) of Segment.vi.

Cheers!

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

BTW, "Testing TD-PSOLA Algo.vi" looks cool - nice comments and great coding style.

... "Quefrency"? Smiley Very Happy

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 14 of 46
(1,383 Views)
Hey tbd
 
i have been working on this thing for 12 hours straight and i think my brain right now is fried Smiley Very Happy.....i 'm kinda not communicating with the rest of the world Smiley Very Happy
 
you are saying to build a vi that does what i want right?we will define as inputs the

1) The integer array (of PPs) used to build the "voiced-sections" chart, and

2) The original "segment"-size (512)

as for the outputs of this vi we should be able to see the entire voiced sections divided into pieces of length equal to PP. Is this what you are reffering to or i have no clue at all?Smiley Wink ....please let me know if i m not getting it (i do that alot sometimes)

Cheers

 
p.s. quefrency is the anagram of frequency when you are working in the cepstral analysis, basically the spectrum of a spectrum, same as rahmonics, gamnitude etc.
i guess some people had some extra free time in their hands Smiley Very Happy
0 Kudos
Message 15 of 46
(1,379 Views)


@madgreek wrote:
as for the outputs of this vi we should be able to see...

I didn't ask what we should be able to see!  I asked what data-type will be used to hold the result of your "Segment" operation.  (Hint: is it a 1D array where each element is a number?  is it a 1D array where each element is a list of numbers?)

Please define the output(s) of Segment.vi!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 16 of 46
(1,373 Views)
it should be a 1-d array where each element is a number
0 Kudos
Message 17 of 46
(1,372 Views)

... OK, lets agree on how to translate the PPs array into the [new] 1D output array. Lets start with a very simple example.

Say the PPs array consisted of three elements: {0,3,3}; and the original segment size was 10 (instead of 512)

How do you want to translate the first element (0) from this PPs array into the output array?

   Please provide the list of numbers that will be in the output array after this translation.

The follow-up question will be, how do you want to translate the "voiced" section where PP=3 and spanning two original "Segments".

According to your previous posts, this is a "voiced" section and, in this example, represents 6.666 periods (20 original samples.)

   Please provide the list of numbers that will be in the output array after this translation.

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 18 of 46
(1,364 Views)
Hi
 
1) the first zero element should be represented in the new array with 10 values/samples (same size as the original segment i.e 10 samples), values that we get from the original incoming signal.(this is only if the PP array starts at zero)
 
2)about the next 2 voiced segments of length 20 samples and PP=3. I am thinking instead of having to deal with the remaining .666 of a period at the end of this section, the new array should only display the 6 periods of length 3 samples (ending at sample index 18 lets say), and if this is followed by another unvoiced segment/section, this unvoiced section should start at sample index 19 plus its length of lets say 10 (thus growing to 12) until the next voiced section/segment. 
 
is this is what you are asking me to answer?
0 Kudos
Message 19 of 46
(1,359 Views)

Hi madgreek,


is this is what you are asking me to answer?

Yes, that info. helps, though you didn't list the numeric values being output!Smiley Mad

Please confirm that in the simple example ({0,3,3}, SegSize=10) the output list (array) would look like this:
0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,0,0

But what if another voiced-section followed?  For Example {0,3,3,5}, SegSize=10 Will the output look like this?

0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,0,0, 5,5,5,5,5,5,5,5,5,5

I think we'll be able to write Segment.vi once you've described how to handle this case.  I'm particularly interested in whether you'll want to leave the 0,0 gap (essentially injecting a non-voiced section) between the 3s and 5s, fill it in with a partial pulse-period, or, perhaps "steal" one of the samples from PP5 to create a complete PP3

0,0,0,0,0,0,0,0,0,0, 3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,  3,5,5,5,5,5,5,5,5,5

 

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