[Clam-devel] Re: [PATCH] Re: adding spectrum magnitude to annotator discussion

David García Garzón dgarcia at iua.upf.edu
Thu Jul 5 10:46:56 PDT 2007


On Thursday 05 July 2007 19:25:53 bennett kolasinski wrote:
> Patch attached with fixes.  Couple questions:
>
> So many errors should have ended in something noticeable but in fact we are
>
> > not having any error because we are not using them. They should be used
> > on PoolFloatArrayDataSource::getLabel, but now it is computing the label
> > by returning the string formatting of NBins, instead the string
> > formatting of offset+i*bingap.
>
> I updated PFADS::getLabel but I'm not sure what you mean by offset-- you
> mean the starting frequency (which, the more i think about it, might not be
> a necessary attribute at all since you said it's always 0)?  

Not for the spectrum but that's not always the case.

> So getLabel 
> now returns bin*binGap if the bin does not have a label, which should be
> the starting frequency of the bin.

Add the offset.

> also- PFADS::setCurrentTime uses binLabels but I'm not sure of the purpose
> of the function so I'm not sure what to do about removing them.  The code
> shouldn't crash but I think a call to setCurrentTime with no binLabels
> assigned will set the _frameData attribute to 0... hmm maybe that is bad.

BinLabels is used there to know the NBins. So... maybe we should store as 
member or accessor that computed nBins we took considering both 
BinLabels.size and NBins attribute.

> and finally-- ok, I'm not sure if it's my mac quirks or me still needing to
> work out how to use Annotator well... but I can't figure out how to get rid
> of views in Annotator after I add them.

Edit the project and delete them at <InstantViews>

> Is there supposed to be a close 
> widget on them or am I missing something?  

That might be a TODO.

> And the first bin of the MFCC 
> bar view when I've been running it always seems to be at its max value,
> which I think is causing the view of the other bins to be scaled and thus
> be pretty small.

Yes. That's totally true and normal.

> OK, hope this patch helps...

Of course. I'll take it a look but i will be busy or disconnected until 
Monday. So no commit guaranties.







More information about the clam-devel mailing list