OK, I'll fix right away-- so should I update my sandbox before making the changes?<br><br><div><span class="gmail_quote">On 7/5/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">Bennet i committed most of it but it needs urgent fixes.<br><br>First of all PoolFloatArrayDataSource:
:updateData takes FirstBinOffset and<br>BinGap from the parent attribute instead of the attribute you are addressing.<br>The parent attribute is the FrameDivision, it is an attribute that says how<br>the frames are placed along time, which uses a similar description in time (a
<br>FirstBinOffset and a BinGap) than the spectrum distribution in frequency.<br><br>So, instead of taking them on 'updateData', you should take such attributes on<br>PoolFloatArrayDataSource::setDataSource method, the method where the schema
<br>is set, and take them as we currently take the bin labels.<br><br>setDataSource: The source pool has changed, the schema must be updated<br>updateData: The data (or current frame) has changed, data must be updated<br>
<br>Besides that, such members of PFADS class (FirstBinOffset and BinGap) are<br>pointers to values that exist outside of the object. That's very dangerous as<br>the external object may change its structure. Keep a copy of the value
<br>instead. If it is not present, then set a default value (0 and 1 are a nice<br>guess) and if you need to know whether they are set (HasX) then use a bool<br>member.<br><br>So many errors should have ended in something noticeable but in fact we are
<br>not having any error because we are not using them. They should be used on<br>PoolFloatArrayDataSource::getLabel, but now it is computing the label by<br>returning the string formatting of NBins, instead the string formatting of
<br>offset+i*bingap.<br><br>And just for keeping the code clear, all the code to get the nBins at<br>BarGraphPlugin::ConfigureDialog is useless. We need it on the other plugins<br>as we also filter by the number of bins (12 for the Tonnetz and 24 for the
<br>KeySpace). But that's not the case here. I'll remove that code before<br>committing it. That might cause a svn conflict on you sandbox. Try to fix the<br>rest.<br><br><br>David.<br><br><br>On Thursday 05 July 2007 06:16:02 bennett kolasinski wrote:
<br>> Attached is an update to ClamExtractorExample that incorporates your<br>> suggestions from this email and IRC discussion as well as changes to<br>> InstantViewPlugin.  I'm not seeing SpectrumMagnitude as one of the
<br>> attributes that can be visualized using BarGraph-- I'll look more into it<br>> in the morning-- but as far as I can tell everything else is working fine.<br>><br>> B<br>><br>> On 7/4/07, David García Garzón <
<a href="mailto:dgarcia@iua.upf.edu">dgarcia@iua.upf.edu</a>> wrote:<br>> > On Wednesday 04 July 2007 07:40:40 bennett kolasinski wrote:<br>> > > Hi David-<br>> > > Adding SpectrumMagnitude to ClamExtractorExample seems to really blow
<br>> > > things up.  First off, ClamExtractorExample seems to be hanging on the<br>> ><br>> > call<br>> ><br>> > > to restoring the XML file now (with the last patch I sent):<br>> > > CLAM::XMLStorage::Restore
(toValidadDescription, poolFile);<br>> > ><br>> > > I'm not sure if it's actually hung or just taking a really long time to<br>> > > write what appears to be a 40.2 MB pool for a 3mb MP3 file.  Actually,
<br>> > > looking at the file that was allocated, it looks like it hasn't been<br>> > > touched since it was initially written-- maybe the file has been<br>> ><br>> > written?<br>> >
<br>> > > do you have any reason to believe why XMLStorage::Restore() would hang<br>> > > (maybe because it's such a large XML file)?  I just set it to run with<br>> ><br>> > the<br>> >
<br>> > > 'time' command and will see if it finishes up (and how long it takes)<br>> > > by the time I wake up in a few hours.  Interestingly the pool file that<br>> > > was allocated on my hard drive was the same size whether I ran it with
<br>> > > 512<br>> ><br>> > bins<br>> ><br>> > > or 10 bins.<br>> ><br>> > Suspicious. Take a look to the actual content of the xml.<br>> ><br>> > > Have you had a chance to run the patched ClamExtractorExample?  Am I
<br>> > > running it correctly by simply passing the desired audio file into it?<br>> > ><br>> > > ./ClamExtractorExample mp3file.mp3<br>> > ><br>> > > ClamExtractorExample -s produces what appears to be a valid schema...
<br>> > ><br>> > > BTW, I believe the code changes to PoolFloatArrayDataSource that you<br>> > > suggested are complete, but I don't want to send that patch until I get<br>> ><br>> > a
<br>> ><br>> > > fresh look at it in the morning.<br>> ><br>> > Well, if you send it, we could help you more on giving you an<br>> ><br>> > > Any ideas would be appreciated!  Is SpectrumMagnitude too... 'dense'
<br>> > > (?) for Annotator?  Do we need a more efficient way of storing it than<br>> > > a plaintext file?<br>> ><br>> > Yes we should have a more efficient way, but, the short goal now is not
<br>> > storing spectrums but having FloatArrays with numeric bin labels and<br>> > being able to represent them. So a smaller array should do the work. So,<br>> > keep your<br>> > focus and minimize distractions from it.
<br>> ><br>> > BTW, the TODO wiki is a nice tool set such focus. I would recommend you<br>> > to mark your current task and subtasks in a special way. Also, writting<br>> > down all<br>> > those tasks you see but that go away from your current focus is a good
<br>> > practice as let you take them out of your mind. Also to marking done task<br>> > with [[Image:done.png]] helps you to have the sensation of progress which<br>> > can<br>> > motivate you a lot.
<br>> ><br>> > David.<br><br><br></blockquote></div><br>