I'm about to build a MIDI data query tool if it doesn't already exist. I need a simple tool that brute-force searches midi clips from public domain datasets. For example, I want to say my progression is in `C - 4/4 - Am7-Am7-G7-Dm7` And the system offers midi clips that match that exact criteria.<p>ps - I'm fully aware of generative music AIs (in fact I maintain one: https://signalsandsorcery.org/ , but in this case I'm interested in brute-force searching datasets.
The crucial step is extracting the (best) harmony progression from each midi. Look at Chordino [1] with the vamp Python wrapper [2]<p>[1] <a href="https://code.soundsoftware.ac.uk/projects/nnls-chroma" rel="nofollow">https://code.soundsoftware.ac.uk/projects/nnls-chroma</a><p>[2] <a href="https://pypi.org/project/vamp/" rel="nofollow">https://pypi.org/project/vamp/</a>
A little manual, but music21[0] can do the analysis!<p>[0]: <a href="http://web.mit.edu/music21/" rel="nofollow">http://web.mit.edu/music21/</a>
there is also midicsv that unlocks all the excel macros on midi data. And SQL/OLAP if you are so inclined.<p><a href="https://www.fourmilab.ch/webtools/midicsv/" rel="nofollow">https://www.fourmilab.ch/webtools/midicsv/</a>
Just to follow up: I started building a python CLI tool. I'm only 2 days in but the 'happy path' is working: <a href="https://github.com/shiehn/midi_query">https://github.com/shiehn/midi_query</a>
midi2tones [1] can generate a streem of note sequences which can be awk/grep'd/reg-expression searched.<p>Midi 2 Nyquest[2] dumped to python AI used to visual identify requested cord progression (aka automate what a human reading a musical score would do) would be pretty cool (get location & stats of where progression occures)<p>------<p>[1] nyquest : <a href="https://en.wikipedia.org/wiki/Nyquist" rel="nofollow">https://en.wikipedia.org/wiki/Nyquist</a><p>[2] midi2tones : <a href="https://github.com/MLXXXp/midi2tones/blob/master/midi2tones.c">https://github.com/MLXXXp/midi2tones/blob/master/midi2tones....</a>
Some combination/variation from command line of grep/sed/awk script(s) using regular expressions & local file(s)/db containing relevant dataset(s) to search.<p>example unix shell command line:<p><pre><code> cat midi.data.file | grep 'C - 4/4 - Am7-Am7-G7-Dm7'
</code></pre>
Pearl / python / ruby / go / lisp shell etc. make for easier paring with gui & on-line use of public domain datasets (vs. downloading dataset file/db)