They will allow you to do the extraction in a modular and incremental way taking from other projects the parts you are interested in and adding your own descriptors in a incremental way.
This module intends to implement the system described on http://www.iua.upf.es/mtg/clam/devel/doc/descriptors/Descriptors.html but there is still some way to achieve the full functionality described in there.
CLAM::DescriptionScheme scheme; scheme.AddAttribute <CLAM::TData> ("AudioSample", "SignalLevel"); scheme.AddAttribute <CLAM::TData> ("AudioSample", "FilteredSignal"); scheme.AddAttribute <SamplePosition> ("Frame", "Center"); scheme.AddAttribute <CLAM::TData> ("Frame", "Energy"); scheme.AddAttribute <CLAM::TData> ("Frame", "RMS"); scheme.AddAttribute <CLAM::Spectrum> ("Frame", "SpectralDistribution"); scheme.AddAttribute <FramePosition> ("Note", "Onset"); scheme.AddAttribute <CLAM::Pitch> ("Note", "Pitch");
The description scheme only specifies the attribute organization. The real values are hold into the data pool (CLAM::DescriptionDataPool). An instance of a DescriptionDataPool will hold the attributes extracted from a single description source (ie, an audio). It take the structure defined by the description scheme.
CLAM::DescriptionDataPool pool(scheme);
So, summarizing:
The scope provides interface to:
pool.SetNumberOfContexts("Note",60);
CLAM::Pitch * pitches = pool.GetWritePool<CLAM::Pitch>("Note","Pitch");
const CLAM::Pitch * pitches = pool.GetReadPool<CLAM::Pitch>("Note","Pitch");
// Storing a description in XML CLAM::XmlStorage::Dump(pool, "DescriptionPool", "mysong.xml");
// Recovering an XML description CLAM::XmlStorage::Restore(pool, "mysong.xml");
So, this part of the module is work on progress but there are some parts already implemented and usable. By now, what we have is some kinds of hook binding. Current implemented binding operations are bindings on the same context, and indirection, that is, using an attribute to point another one even on a different scope.
By now, there is no such abstract CLAM::Extractor but you can take a look to some Extractors CLAMTest::CharCopierExtractor and CLAMTest::CharJoinExtractor. Also you can see how binding is done by looking at the ExtractorTest.cxx file.
Classes | |
class | CLAM::AttributePool |
A container for the values for a single attribute along the scope. More... | |
class | CLAM::AbstractAttribute |
Defines the interface for an Attribute definition in a DescriptionScheme. More... | |
class | CLAM::Attribute< AttributeType > |
This class is the concrete implementation for AbstractAttribute for a given type of attributes. More... | |
class | CLAM::DescriptionScheme |
The description scheme defines the set of attributes (Attribute) to be used for feature extraction systems. More... | |
class | CLAM::SchemaError |
A description scope defines a set of attributes which have the same ocurrences. More... | |
class | CLAM::Hook< AttributeType > |
class | CLAM::ReadHook< AttributeType > |
class | CLAM::ReadRangedHook< AttributeType > |
class | CLAM::WriteHook< AttributeType > |
class | CLAM::DescriptionDataPool |
Contains the extracted data for a given description process. More... | |
class | CLAM::ScopePool |
A container for the attributes values along the differents contexts of a single scope. More... |