[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:59:41 PDT 2007


Patch reviewed. Almost there. Just two comments:

- For composing the labels (getLabel) you still use the parent (that's the 
frame time not the frequency!), so use the new members. And add the offset.

- You call several times to project.GetAttributeScheme(scope,name). Make the 
code faster and more readable by keeping a reference to such object within 
that method.
const CLAM_Annotator::SchemaAttribute & attribute = 
project.GetAttributeScheme(scope,name);

We should try the labels, try to add a label at some point of the bars, just 
to test it. And make the screenshot relevant.


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)?  So getLabel
> now returns bin*binGap if the bin does not have a label, which should be
> the starting frequency of the bin.
>
>
> 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.
>
> 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.  Is there supposed to be a close
> widget on them or am I missing something?  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.
>
> OK, hope this patch helps...
> B






More information about the clam-devel mailing list