[Clam-devel] [PATCH] Hacking ClamExtractorExample (incomplete)

bennett kolasinski bennett.kolasinski at gmail.com
Fri Jun 29 08:14:44 PDT 2007


OK-- i've attached a revised patch that in theory at least extracts the
spectrum data in ClamExtractorExample and contains the UpdateData patch.
 Only problem is it is taking quite a long time to extract features from one
song now (it's been running for a good 5 minutes and still isn't done)--
maybe it will be faster on someone else's big fast linux box :)
Any speedup suggestions would be appreciated!

B

On 6/29/07, David García Garzón <dgarcia at iua.upf.edu> wrote:
>
> Yes it is pretty close to a final patch. There are just three points
> there:
>
> 1- For sure the Spectrum has not just 50 bins. Execute the extractor just
> by
> printing the SpectralRange and the Size of the first frame in order to
> know
> the right parameters. First bin in spectrums is always 0 and the
> InterBinGap
> is SpectralRange/Size.
>
> 2- The proper spectrum attribute is MagBuffer not Mag. It is a CLAM::Array
> so
> you should assign it in a different way.
>
> 3- The Spectrum object has a nasty complexity that we would like to remove
> but
> until them we should cope with it. Spectrum contains several
> representations
> such as mag/phase, complex... which might be present or not and, when
> added,
> they need to be synced. So check whether the first frame spectrum
> HasMagBuffer. If it has, don't hesitate, if it has not, then we'll talk
> about
> how to add and sync.
>
> The UpdateData patch is ok. Indeed we should apply it. What is longer for
> you,
> sending a separate patch for this issue or sending the full patch?
>
>
> On Friday 29 June 2007 05:33:44 bennett kolasinski wrote:
> > (Sending this patch to the list for the sake of open communication with
> my
> > GSoC mentor even though it is INCOMPLETE-- please do not apply to your
> > sandboxen!)
> >
> > David-- I have been modifying ClamExtractorExample and I think I'm
> pretty
> > close to a complete patch for this step, but I'm not sure what attribute
> to
> > add for the SpectrumMagnitude WritePool (as per your suggestion of
> > populating the WritePool in MFCC2Pool).  I was thinking something along
> the
> > lines of spectrum.GetMag but I don't think that's right.  Line 597 of
> > ClamExtractorExample.cxx (after applying my patch) is the one i'm
> > questioning.  (This code compiles and runs but doesn't do anything
> > interesting).  Suggestions?
> >
> > BTW-- I had to call schemaAttribute.UpdateData() after adding the new
> > properties but before populating them or else I get a crash when running
> > the extractor, so that's in this patch too.
> >
> > Thanks!
> > B
> >
> > On 6/28/07, David García Garzón <dgarcia at iua.upf.edu> wrote:
> > > On Wednesday 27 June 2007 20:11:01 bennett kolasinski wrote:
> > > > Incorporated some of David's comments into my earlier patch and
> > > > trickled new features into SchemaBrowser... please disregard patch
> from
> > > > earlier today! B
> > >
> > > Commit r10295
> > > Thanks, Bennett.
> > >
> > > Next step, make the ClamExtractorExample generate such kind of
> > > FloatArray: * On BuildSchema, add a call to add
> > > 'Frame::SpectrumMagnitude', guess or invent the bin gap and offset.
> > > * On MFCC2Pool get the write pool for such attribute and fill it.
> > > * Regenarate the example pool data
> > >
> > > Further step, make feasible to visualize such FloatArray attributes,
> in
> > > PoolFloatArrayDataSource (PFADS) and InstantViewPlugin:
> > > * PFADS::nBins() should be taken from the new attribute property NBins
> if
> > > available, if not, from the labels size as it is done now.
> > > * PFADS::getLabel should return:
> > > ** The binLabel if bin<_binLabel size.
> > > ** A numeric representation if the needed attribute properties is
> > > available
> > > ** Empty string or 'ERR' if not
> > > * For BarGraph filter FloatArrays without binLabels AND without NBins
> > > * Adapt all the InstantViewPlugins to use the NBins when available.
> > > * Run the Annotator, add a BarGraph for SpectrumMagnitude and send a
> > > development screenshot to the wiki ;-)
> > >
> > > Very further step: Add a view for temporal evolution of FloatArrays
> > >
> > > Consider to put this todos on the wiki, modify them as you feel or as
> > > problems
> > > emerge, and check them when done.
> > >
> > > David.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070629/722c1ffe/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClamEEUpdate1.patch
Type: application/octet-stream
Size: 1663 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070629/722c1ffe/attachment-0003.obj>


More information about the clam-devel mailing list