[Clam-devel] [PATCH] segmentation in chord extractor as a seperate class
Roman Goj
roman.goj at gmail.com
Thu Jul 19 02:42:34 PDT 2007
Hi!
I've started working on chord segmentation - starting offline in
ChordExtractor. The first step, suggested by David: separating the
code responsible for segmentation, so that it is all in a separate
class.
In short:
Changelog:
* Most of the segmentation code in ChordExtractor is now in a seperate
class called ChordExtractorSegmentation
This patch is a "blind man's approach" to the problem - the simplest
first patch I could think of... I just took the biggest chunk of code
responsible for segmentation, put it into the doIt of a new class and
added the constructor. Then I added some other code to doIt, so that
every variable necessary for the copy/pasted chunk to work has the
same value as it had in the previous code (basically copy/pasting some
other lines from the code, without changing them)... then I struglled
with the "which variable needs to be a reference, which a
pointer"-mess... ;) And then finally I started getting identical
results from the old ChordExtractor and the new "improved and much
more messy" one.
TODO:
* Clean up! There is some repetitive code now, probably completely
unnecessary (also - the old code isn't deleted, it's just commented
out for now). I decided to post the patch without the cleanup, so
that, if I'm doing something really fundamentaly wrong, someone can
notice now :)
* Quite a few variables are now passed to the constructor, probably
completely unnecessary (like _lastChord), this needs to change
* there is also some code in the destructor of
ChordExtractorDescriptionDumper, this needs to go into the new class
* lots more :)
cheers,
roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChordExtractorSegmentation-new-class.patch
Type: text/x-diff
Size: 2823 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070719/be547387/attachment-0004.patch>
More information about the clam-devel
mailing list