| 273 | } |
| 274 | |
| 275 | float 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) |
| 285 | const char* Chord::getRootName() const { |