CLAM-Development  1.4.0
SampleMetadata.hxx
Go to the documentation of this file.
1 #ifndef _SampleMetadata_
2 #define _SampleMetadata_
3 
4 #include "IndexArray.hxx"
5 #include "Processing.hxx"
6 #include "Err.hxx"
7 #include "SDIFInConfig.hxx"
8 #include "Filename.hxx"
9 #include "SimpleLoopMetadata.hxx"
10 #include <vector>
11 
12 namespace CLAM
13 {
14 
15 #define SAMPLE_METADATA_PITCH_INDEX 1
16 #define SAMPLE_METADATA_AMPLITUDE_INDEX 2
17 
30 {
31 public:
34  DYN_ATTRIBUTE(SAMPLE_METADATA_PITCH_INDEX, public, double, Pitch);
35  DYN_ATTRIBUTE(SAMPLE_METADATA_AMPLITUDE_INDEX,public, double, Amplitude);
36  DYN_ATTRIBUTE(3,public, int, SortIndex);
37  DYN_ATTRIBUTE(4,public, int, StartSteadyState);
38  DYN_CONTAINER_ATTRIBUTE(5, public, std::vector<SimpleLoopMetadata>, ListOfLoops, Loop);
39 
40 // DYN_ATTRIBUTE(3,public, EnvelopeStage, EnvelopeStage);
41  void DefaultInit();
42  // when the object is restored from XML, after it is read it only has those
43  // attributes which are defined in the XML file. so, we need to add some
44  // more attributes to it which will be used later by other algorithms
45  // such as the SortIndex
46  void ConfigureAfterRestore();
47  bool operator<(const SampleMetadata& argSampleMetadata) const;
48  bool operator>(const SampleMetadata& argSampleMetadata) const;
49  bool operator==(const SampleMetadata& argSampleMetadata) const;
50 
51 };
52 
53 } // end namespace CLAM
54 
55 #endif
56