Live data from Hacker News

Show HN: Generate guitar tablature using a constraint solver

github.com

1–10 of 28 posts

Re: Show HN: Generate guitar tablature using a constraint solver

#2
Pretty cool. It’s nice that computing the good fingerings takes a while, makes my brain feel less ‘out of a job’ that it can do that nearly real-time. Would be good to see some harmony and how the solver would deal with multiple notes at once.

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.

Re: Show HN: Generate guitar tablature using a constraint solver

#3

Pretty cool. It’s nice that computing the good fingerings takes a while, makes my brain feel less ‘out of a job’ that it can do that nearly real-time. Would be good to see some harmony and how the solver would deal with multiple notes at once. 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…

I think I understand what you mean. A trained guitar player would not need such a tool, and a beginner should probably avoid using it :). My original idea was to explore how I could rapidly get playable tablatures of jazz solos from available sheet music that I still cannot read fluently.

> 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.

Re: Show HN: Generate guitar tablature using a constraint solver

#4
Author here. TablaZinc is a proof-of-concept tablature generator for fretted string instruments -- such as the guitar, bass, mandolin, banjo, etc.

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.

Re: Show HN: Generate guitar tablature using a constraint solver

#5

Pretty cool. It’s nice that computing the good fingerings takes a while, makes my brain feel less ‘out of a job’ that it can do that nearly real-time. Would be good to see some harmony and how the solver would deal with multiple notes at once. 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…

I think in one of the algorithm lectures by Eric Demaine he outlines the idea of making a dynamic programming algorithm for good finger positions for chord progressions. Although you have to carefully design your cost function (moving the finger from one place to another is costly)

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

Re: Show HN: Generate guitar tablature using a constraint solver

#6
You can also formulate the problem as a dynamic programming problem.

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

Re: Show HN: Generate guitar tablature using a constraint solver

#7
If you’re looking for a more practical algorithm: this problem can be formulated as a shortest path problem on the graph whose vertices are (n, fret, finger, string) tuples. A simple dynamic programming solution is to fill out a distance table whose entry distance[n, fret, finger, string] is the optimal cost of the prefix of the melody ending at note n, which can be computed as 0 if n = 1, or in terms of the entries for note n − 1 if n ≥ 2.

Re: Show HN: Generate guitar tablature using a constraint solver

#8
post #4

Author here. TablaZinc is a proof-of-concept tablature generator for fretted string instruments -- such as the guitar, bass, mandolin, banjo, etc. 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…

Some time ago I transcribed Solfegiato into python script and converted to MIDI notes. Then printed it as TAB where each note is shown on all strings if the fret number is in range. I spent a lot of time choosing strings and fingerings to make it playable. It was plainly obvious that a constraint solver (or wave function collapse) would be a great way to select options for a playing style (alternating vs sweep picking for example). I didn't get that far. Congrats on doing the interesting part!

Re: Show HN: Generate guitar tablature using a constraint solver

#9

If you’re looking for a more practical algorithm: this problem can be formulated as a shortest path problem on the graph whose vertices are (n, fret, finger, string) tuples. A simple dynamic programming solution is to fill out a distance table whose entry distance[n, fret, finger, string] is the optimal cost of the prefix of the melody ending at note n, which can be computed as 0 if n = 1, or in terms of the entries…

[deleted]
Post reply on HN