[HN Gopher] Show HN: Convert from MIDI file to ASCII tablature (...
___________________________________________________________________
Show HN: Convert from MIDI file to ASCII tablature (and more)
Hi folks, About seven months ago, via HN, I got nerdsniped into a
silly guitar transcription problem and made a bunch of really
senseless code but what came out of it was what I thought at the
time could potentially be pretty useful - a guitar fretboard mapper
and fingering scoring algorithm. So as of yesterday morning I've
finally put those bits of code to "good" use, creating gtrsnipe to
convert between MIDI files (.mid) and ASCII tab (as well as VexTab
and ABC notation) and any combination/direction among the set of
formats. gtrsnipe tries to intelligently find the best neck and
fingering positions using a note to fretboard mapper and a scoring
algorithm that is unavoidably shaped by my subjective opinions and
skills as a player but it does its best to avoid objectively
impossible fingerings. See the example tabs and usage in the
README and please, try your own transcriptions from MIDI and if you
love or hate the arrangement it gives you, I'd love to hear about
it so I can further refine the scoring algorithm. Thanks!
Author : ycombiredd
Score : 33 points
Date : 2025-07-27 00:35 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| robbomacrae wrote:
| Nice! This reminds me of my PhD research! I built some similar
| tools to go the other way (for comparing similarity with scores)
| but probably nowhere near as reliable as this. QQ How do you
| handle repeat segments? I remember having to extrapolate the x2's
| etc but in your you could detect patterns and do the reverse for
| compactness.
| omoikane wrote:
| If I read it correctly, the mapper will score fingering based on
| how many frets the hand needs to stretch:
|
| https://github.com/scottvr/gtrsnipe/blob/4cae149e1dac766c3c3...
|
| But this doesn't seem to account for other shape concerns. The
| bit I am most interested in is whether this mapper can avoid
| barre chords where possible.
|
| Related, I think there should also be an option to take capo into
| account.
| jmkr wrote:
| Awesome OP. I'll give it a shot because I've been considering
| doing something similar for chord charts. Glad to see abc
| notation support.
| nartho wrote:
| Looks interesting, too bad it's limited to 6 strings and 3
| tunings, that excludes a lot of music
| westurner wrote:
| I looked for similar tools;
|
| Looks like tayuya is also written in Python, on mido and music21.
| It has a "get all notes to play" feature, mentions LilyPond tab
| output as a todo, and has a get_key(midi) method built on
| music21: https://github.com/vipul-sharma20/tayuya#get-all-notes-
| to-pl...
|
| tayuya.tabs:note_nearest_to_fret: https://github.com/vipul-
| sharma20/tayuya/blob/master/tayuya/...
|
| Kord has a fretboard visualizer tool:
| https://github.com/synestematic/kord#fretboard-tool
|
| Textual is another way to create CLIs for Python scripts.
|
| What about tab playback and CLI-based scrubbing?
|
| There was a post a week or so ago about an LWN article about
| spotify/pedalboard, which is written in Python and built on JUCE
| (C++) and supports VST3 and LV2 plugins like a MIDI player or a
| wavetable synth and a Guitarix effects rack:
| https://news.ycombinator.com/item?id=44604024#44648290
| jarmitage wrote:
| Hi @ycombiredd, could this be used to turn MIDI into
| http://strudel.cc mini-notation?
|
| Previous effort:
| https://github.com/TylerMclaughlin/midi_to_tidalcycles
___________________________________________________________________
(page generated 2025-07-30 23:01 UTC)