Detected chord information
| 29 | |
| 30 | // Detected chord information |
| 31 | struct Chord { |
| 32 | int rootNote; // MIDI note number (0-11 for C-B) |
| 33 | ChordType type; // Chord type |
| 34 | float confidence; // Detection confidence (0.0-1.0) |
| 35 | u32 timestamp; // When detected |
| 36 | |
| 37 | Chord() FL_NOEXCEPT : rootNote(-1), type(ChordType::UNKNOWN), confidence(0.0f), timestamp(0) {} |
| 38 | Chord(int root, ChordType t, float conf, u32 ts) |
| 39 | : rootNote(root), type(t), confidence(conf), timestamp(ts) {} |
| 40 | |
| 41 | bool isValid() const { return rootNote >= 0 && rootNote < 12; } |
| 42 | |
| 43 | // Declared here, defined in chord.cpp |
| 44 | const char* getRootName() const; |
| 45 | const char* getTypeName() const; |
| 46 | }; |
| 47 | |
| 48 | class ChordDetector : public Detector { |
| 49 | public: |
no outgoing calls
no test coverage detected