Converting audio (music) to notes
I have an idea for a program I wish to write, but it requires a way to convert musical audio (single guitar, at first approximation) to notes (e.g., OCR/speech-recognition for music).
Google found IntelliScore, but although it advertises more power that I need (several instruments), it is proprietary, and I’m looking for something that is free and GPL-compatible.
Are there any free/GPL programs or libraries that can do this?
Solution 1:
There’s Notey. It can detect notes and transcribe them on screen. It’s GPL, so you should be able to extract and adapt the detection/conversion routines.
Another options is music scribe kit which:
Is a toolkit for transcribing a music audio file to common music notation. This is done by manually annotating a spectrogram or something similar and converting it to a MIDI file and to a abc music notation file.
The proprietary program Transcribe! has an extensive list of other music-transcription tools, including some that are open-source. You can also check SourceForge for other open-source music-transcription programs.
Solution 2:
Google recommended waon
.
Originally on http://waon.sourceforge.net/ I had it compile on Xubuntu 18.04, including gtk-based gui.
What is waon
WaoN is a Wave-to-Notes transcriber, that is, the inverse of timidity by Tuukka Toivonen (and its descendants timidity++). (...) My original intention is to pick up voicing of harmony from sound of my favorite pianists. (...)
Currently, WaoN contains three programs:
waon: transcriber (wav-to-mid converter) pv: phase vocoder for time-streching and pitch-shifting gwaon: GUI for waon and pv
WaoN is released under the GNU General Public License.
Where to find source code
CVS is dated and sourceforge is phasing out. I converted the CVS-based history to git and re-hosted it on https://github.com/fidergo-stephane-gourichon/waon .
Any options?
Here the summary of options the excutable provides.
./waon --help
WaoN - a Wave-to-Notes transcriber, Version 0.10
Copyright (C) 1998-2007 Kengo Ichiki <[email protected]>
Web: http://waon.sourceforge.net/
WaoN is a Wave-to-Notes transcriber,
that is, a converter from sound file to midi file.
Usage: ./waon [option ...]
Options:
-h --help print this help.
-v, --version print version information.
OPTIONS FOR FILES
-i --input input wav file (default: stdin)
-o --output output mid file (default: 'output.mid')
options -i and -o have argument '-' as stdin/stdout
-p --patch patch file (default: no patch)
FFT OPTIONS
-n sampling number from WAV in 1 step (default: 2048)
-w --window 0 no window
1 parzen window
2 welch window
3 hanning window (default)
4 hamming window
5 blackman window
6 steeper 30-dB/octave rolloff window
READING WAV OPTIONS
-s --shift shift number from WAV in 1 step
(default: 1/4 of the value in -n option)
PHASE-VOCODER OPTIONS
-nophase don't use phase diff to improve freq estimation.
(default: use the correction)
NOTE SELECTION OPTIONS
-c --cutoff log10 of cut-off ratio to scale velocity of note
(default: -5.0)
-r --relative log10 of cut-off ratio relative to the average.
(default: no relative cutoff
= absolute cutoff with the value in -c option)
-k --peak peak threshold for note-on, which ranges [0,127]
(default: 128 = no peak-search = search only first on-event)
-t --top top note [midi #] (default: 103 = G7)
-b --bottom bottom note [midi #] (default: 28 = E1)
Here middle C (261 Hz) = C4 = midi 60. Midi # ranges [0,127].
-a --adjust adjust-pitch param, which is suggested by WaoN after analysis.
unit is half-note, that is, +1 is half-note up,
and -0.5 is quater-note down. (default: 0)
DRUM-REMOVAL OPTIONS
-psub-n number of averaging bins in one side.
that is, for n, (i-n,...,i,...,i+n) are averaged
(default: 0)
-psub-f factor to the average, where the power is modified as
p[i] = (sqrt(p[i]) - f * sqrt(ave[i]))^2
(default: 0.0)
OCTAVE-REMOVAL OPTIONS
-oct factor to the octave removal, where the power is modified as
p[i] = (sqrt(p[i]) - f * sqrt(oct[i]))^2
(default: 0.0)