Show HN: Generate guitar tablature using a constraint solver
github.com
github.com
It is a week-end project that I started for two reasons:
* As a software developer, I was looking for an original case study to learn constraint programming.
* As a guitar player whot is not fluent reading sheet music, I was interested in a tool to rapidly convert existing transcriptions of jazz solos into playable guitar tablatures.
TablaZinc is written in the MiniZinc language. https://www.minizinc.org Feedback from advanced users of MiniZinc and experts in constraint programming will be welcome.
As a side note, while MiniZinc uses Gecode for the optimization this is not actually anything special built-in to Gecode, it is just a usage of the library.
As explained in the first comment, one of the motivations for the project was to learn constraint programming. The tablature generator could be a nice example to compare different paradigms and algorithms.
Here's a Java repo I made back in college solving the simpler problem: given a tab, what's the easiest fingering to play it? https://github.com/twschiller/optimal-guitar.
It works by modeling the (1) the difficulty of hand positions, and (2) transitions
If you’re seriously writing out tabs and need some software, I’ve been using Dorico and it’s pretty damn good. It gives you a medium grade solve and then you hit a few keys to move a note between the strings where it is currently playable.
> It’s nice that computing the good fingerings takes a while
Actually, a few tweaks and the use of optimization options allowed to dramatically reduce the execution time for my 20-note example.
> Would be good to see some harmony and how the solver would deal with multiple notes at once.
Yes. I think it would take some effort to adapt the current set of constraints but it should be feasible.
> If you’re seriously writing out tabs and need some software, I’ve been using Dorico and it’s pretty damn good
Thanks for the tip. They don't seem to offer a Linux version though.
I did implement the one for normal notes and the extension to chords shouldn't be that difficult but the execution is instantaneous because the sequence is not that long.
edit: https://www.youtube.com/watch?v=tp4_UXaVyx8 this lecture
Which is to say: this sounds fun, but the expressivity of a guitar is rarely captured by a MIDI file, which makes it hard to get this “right”.
E---1
B-1--
G----
D----
A----
E----
But there are TONS of people in the comments saying it should be: E----
B---6
G-5--
D----
A----
E----
Both are going to play C F, but there's so much fighting over which one is correct, and while I know due to the different thickness of the strings, there's going to be a very subtle difference between them, but I bet most untrained ears won't be able to tell, especially without having the two of them played back-to-back.As a guitar noob, I know I'd be more inclined to play the 1-1 version over the 5-6 version. It's going to be a lot easier to finger.
[0] https://youtu.be/hTWKbfoikeg?t=17
[1] https://tabs.ultimate-guitar.com/tab/nirvana/smells-like-tee...
I suspect an experienced guitarist would probably opt for 56, though for the exact same reason: it fits your hand shape. Sometimes what’s easy changes with experience. :)
I need to play more Rocksmith. I want to know how to play, but learning just feels so tedious.