1j01 / guitar

🎸 Online guitar toy and tablature recorder/player
https://1j01.github.io/guitar/
MIT License
104 stars 18 forks source link

Transcribe MIDI to tablature automatically / semi-interactively #26

Open 1j01 opened 1 month ago

1j01 commented 1 month ago

Scope

For a first pass, audio transcription can be left to other tools that convert audio to MIDI, like Basic Pitch. That said, Basic Pitch is open source, so it could be integrated directly, eventually (especially if tensorflow.js is supported for in-browser inference; I think it requires a Python backend currently).

Problem Statement

I feel like the fundamental shortcoming of transcription systems is their all-or-nothing/once-off approach to automation. Transcription tools are either are all manual (a digital equivalent of writing sheet music by hand) or they are a one-off process that you can trigger, but which isn't interactive.

With automatic transcription systems that aren't interactive, if the result isn't quite right, you can go back and change settings (if there are any) and try again, but the settings don't necessarily work well across the whole song, especially if it has tempo changes, and if the measures don't line up properly, usually none of the note and rest durations chosen during quantization will make sense.

Also, with fretted instrument transcription, most programs seem to output tablature that is impossible to play, not really taking into consideration hand geometry. In general, a MIDI file may indeed be impossible to play, but, it feels like they're not even trying, idk.

Solution Strategy

1j01 commented 4 weeks ago

Tempo changes (and even tuning changes) can be gradual, so support for curves could be useful, but that's pretty advanced. That said, when designing the "change events" system, it may be better to go ahead and design it as a "curve editor", since it would need some sort of timeline anyway.

If the curve editor UI would be complicated to use enough that a simplified event list UI would be useful to have as well, that negates the notion that implementing a curve editor UI right off the bat would save effort compared to implementing an event list UI first. That said, I like the mojs curve editor. It would be nice to have an excuse to use it. Although it might not be extensible enough. I'd want labels like note names on some axes for tuning automation, for instance. Could probably show all the strings in one graph, since they usually shouldn't be tuned the same as each other. (An exception is a 12 string guitar, but that just uses 6 string tablature, with pairs of strings typically tuned in unison.) Which mojs curve editor wouldn't support. Hm, there's also an experimental mojs-timeline-editor, but probably rolling a new implementation would be the way to go, to fit in with the UI, and undo system (if any), etc.