KEYnote

A Linux JUCE application that extracts the peak FTT bin from a live audio recording and reports the closest note

Screenshot is highlighting the major 3rd of an A chord: 440, 550 and 660Hz. Note the FFT bin is not a precise pitch so the closest concert pitch is displayed. See the source on GitHub. Note mapping #include <iostream> #include <map> #include <vector> const std::map<double, std::string> notes{ // Catch all for lower bound search {0.0, "Bx"}, // All the notes we're interested in. At the low end a single Fourier bin // will map to multiple notes. [Read More]

Parsing WAV files

In alternative languages

What does a WAV header look like? Inspect the hex with xxd, a WAV header is 42 bytes and is then followed by the sample data. xxd example.wav | head -10 00000000: 5249 4646 2400 0080 5741 5645 666d 7420 RIFF$...WAVEfmt 00000010: 1000 0000 0100 0100 d007 0000 a00f 0000 ................ 00000020: 0100 1000 6461 7461 0000 0080 0000 4582 ....data......E. 00000030: e2d0 126c 9e57 c4b4 308c d41f be7f 0a10 . [Read More]