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