Re: [Libxtract-devel] libxtract, SC UGens and FFT
Status: Alpha
Brought to you by:
postlude
From: Jamie B. <ja...@po...> - 2007-03-20 08:12:11
|
On Fri, 2007-03-16 at 16:56 +0000, Dan Stowell wrote: > A couple more MFCC questions, hope you don't mind: > > Windowing: the xtract_mfcc method takes time-domain data in but doesn't > seem to do any windowing, so I guess the windowing is expected to be > handled before the data reaches libxtract. Is that right? It's possible > that the filters somehow have the windowing implicit, but I'm guessing not. > Actually there was an error in the docs which I have now fixed. For xtract_mfcc() *data should point to an array of spectral magnitudes. The assumption throughout libxtract is that windowing and/or pre-filtering will be done by some external function. > Alloc'ing: I can see in the PD example how you're allocating memory for > the mel filter, assuming "getbytes" is a PD realtime-malloc-type-thing. > (Is t_float something PD-specific, or just the same as float?) > It's just a float, included (I think) for portability reasons. > One thing that I'm wondering about is the malloc in the xtract_mfcc() > method. I'm not sure why you malloc some new space to copy the data into > - you don't seem to do anything there except read the data. Would it be > safe to get rid of that malloc/memcpy/free? It might be a hangover from > an older way of doing things. > Yes, I think it's a hangover. I've removed it. > Similarly there's a malloc in the DCT routine, not sure why that's > needed. Maybe there's a reason for these that I've missed (thread safety?). > I've removed that too. I've haven't even started considering things like thread safety yet. best, Jamie |