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

Method chromaDistance

src/fl/audio/detector/chord.cpp.hpp:275–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275float ChordDetector::chromaDistance(const float* a, const float* b) {
276 float dist = 0.0f;
277 for (int i = 0; i < 12; i++) {
278 float diff = a[i] - b[i];
279 dist += diff * diff;
280 }
281 return fl::sqrt(dist);
282}
283
284// Out-of-line definitions for Chord methods (needed for linking with unity builds)
285const char* Chord::getRootName() const {

Callers

nothing calls this directly

Calls 1

sqrtFunction · 0.85

Tested by

no test coverage detected