MCPcopy Create free account
hub / github.com/FastLED/FastLED / Chord

Class Chord

src/fl/audio/detector/chord.h:31–46  ·  view source on GitHub ↗

Detected chord information

Source from the content-addressed store, hash-verified

29
30// Detected chord information
31struct 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
48class ChordDetector : public Detector {
49public:

Callers 3

updateMethod · 0.70
resetMethod · 0.70
detectChordMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected