LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to segment this?


madgreek wrote:

BTW, there's a major piece of code for you to supply - Filter.Process.vi takes the raw-data for a specific same-PP Section and outputs an  "expanded" output array...

what do you mean?


I mean:

The values that should appear in the output array should still be the same values that we get from the original signal (the ones from the input signal array posted earlier).

I haven't copied the "values that we get from the original signal" into the output array.  If it's as simple as that, then it seems the output array will be essentially, the raw input array?Smiley Surprised 
I'm trying to accommodate previous assertions, such as:

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...

Ok, we've broken the voiced section into pieces.  Do you want to pass the 'pieces" to another process?  If so, then instead of building a 1D output array of numbers.  Maybe we want to build a 1D output array of "pieces" where the "pieces" are 1D arrays (or 2D arrays)?
 
Smiley Happy

Message Edited by Support on 03-13-2007 02:28 PM

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

... then again, maybe we're done for now!(?)  Having identified the "pieces" also referred to (in previous posts) as "sections", maybe we can move-on to fun stuff like displaying and "characterize"-ing the data?  Your pic (below) shows a ribbon of color for each PP - do you want to present the data this way?  The colors are different from one PP to the next - what rules is the program to follow for choosing colors while "rendering" a section?  Note too, that your pic shows the PP-31 section completely colored, but 31 isn't a divisor of 1024.  The last 1 sample would be zero, right?

Message Edited by tbd on 03-10-2007 04:36 PM

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

Hey tbd

Sorry for not getting back at you sooner. i just got home. let me go through the 2 posts you posted here and i will get back at you as soon as i can. just to give you some time to breathe or something you know Smiley Wink

0 Kudos
Message 33 of 46
(1,363 Views)
 hey tbd Smiley Happy
 
you really got into this whole thing aren't you Smiley Happy.... first of all about the picture...its my mistake....and you are right about it...it should be 0 the last segment....although it was supposed to be 32 instead of 31.anyways now about the rest
 
 
i tried to implement your code into mine and use the actual signal values im getting from my code but something didnt work right. i am 100% sure i am doing something wrong here or i didnt correctly understood the way your vi works. i did try and load the signal values but nothing.
i can get those values from 2 places in my vi shown in red circles in the attachment below. the first one  (inside the for loop) can give us the values in a 1-d array  (512 for each incoming segment after each iteration of the vi...actually its 256 because of the FFT size that i am using only half the spectrum ) and the other as a 2-d array that shows all the segments together outside the for loop.
 
did you have a chance to run my TD-PSOLA  vi i posted earlier with the sound file?Can you please do so and tell me where i am wrong here....because I KNOW I AM WRONG....
 
Ok, we've broken the voiced section into pieces.  Do you want to pass the 'pieces" to another process?  If so, then instead of building a 1D output array of numbers.  Maybe we want to build a 1D output array of "pieces" where the "pieces" are 1D arrays (or 2D arrays)?
 
Yes the pieces have to pass into another process later on (windowing) and what you suggesting about the 1-d array of  1-D array pieces sounds the most logical thing to do.
 
Kind regards
Madgreek
 
p.s  i am feeling lost...if i forgot to answer something im sorry..or if i am saying/asking too much nonsense things Smiley Sad
0 Kudos
Message 34 of 46
(1,354 Views)

We posted at practically the same time Smiley Wink

While I read your post, here are some more thoughts...:

In one of your first posts, the attached VI had a 2D array called "Input Signal"

Q. "Input Signal", that's raw data, right?

The dimensions of "Input Signal" are 70 rows/256 columns.  Does this correlate to 70 "Segments" of 256 samples?

The 1D array (same post) called "indexed periods length (samples)" is 50 elementsSmiley Surprised - I'd have thought it would be 70, one for each Segment...

"Filter.vi" needs to know how "Input Signal" is structured...

 

Message Edited by tbd on 03-10-2007 07:45 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 35 of 46
(1,355 Views)
yes it means 70 segments of 256 samples each one....i checked my earlier posts  and all of them display 70 elements. maybe i missed one?your way of thinking though is correct.one element for each segment.
 
just to be in sync though i will repost my whole TD-PSOLA vi, the one that we can base our observations on with a smaller signal to analyze too.
 
cheers
 
 
p.s   good luck on the prius : )
0 Kudos
Message 36 of 46
(1,348 Views)

No need to repost!  It was my fault - yes 70 elements.

...

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 37 of 46
(1,343 Views)
yea...i forgot to attach the TD-PSOLA...it happens sometimes ....actually alot lately
Download All
0 Kudos
Message 38 of 46
(1,344 Views)
Hi madgreek,
      Please hold-off using Filter.vi - it wasn't complete - not knowing exactly what you wanted, I left part for you to fill-in.

did you have a chance to run my TD-PSOLA  vi i posted earlier with the sound file?Can you please do so and tell me where i am wrong here...

      TestingTD-PSOLAAlgo.vi runs (cute wave 🙂 ), but I don't know how to tell it's not working.Smiley Tongue
      What should I be looking at? 
     
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 39 of 46
(1,336 Views)
Hey tbd
 
The very last TD-PSOLA with the "Hijacked" sound file works. First you load the wave file. Then you run the vi. even if it works (i think it should by default) make sure to check the sampling frequency and bits per sample  at the right upper corner to match the ones in the "sound format" display. Then just choose the length of the segment you want it to be segmented down to (384,448,512) and hit run. Dont forget though that i only display half of what size you choose because of the FFT (i.e if you choose 512, you will only see 256 samples) 
 
 After its been iterated, you will be able to see the pitch periods of the whole signal in the first array and in the one below the mean averaged pitch periods of it. The graph below the arrays shows these pitch periods (you can choose in the block diagram which periods to see...averaged or not averaged and also if you want to see them displayed in number of samples or  in time msecs)
 
You can also change the way the vi runs so you can see each segment being iterated and displayed in the Cepstrum graph by right clicking the run button, going to mechanical action and choosing latch when pressed. Like that you can actually see the voiced/unvoiced segments passing through (pitch peak).
 
 
 
0 Kudos
Message 40 of 46
(1,328 Views)