Jump to content

Tab optimizer


SwiftPengu

Recommended Posts

When playing some songs in Rocksmith, I was sometimes annoyed by the fact that some passages sometimes become unplayable due to weird tabbing. Sometimes this is done to reflect how the original guitar player plays the piece, but sometimes it is just the result of a bad transcription to tabs.

 

This annoyance let me start on a project to create an algorithm which optimizes tabs based on certain properties (for instance, minimize the amount of position shifts).

 

The project also serves as an experimenting ground where I try out various standard problem solving algorithms. I also used this project to try out the new JVM based language Kotlin.

 

Currently, I managed to generate at least one useful tab for a part of a song (still in 5 minutes on an i5, so there's still room for improvement).

 

Improved tab for the intro of Ferrum Aeternum by Ensiferum (thanks to Chlipouni for making the CDLC):

https://gist.github.com/anonymous/997f8bcd8da95215423c

 

 

Link to the project: https://bitbucket.org/hnhindriks/tabhelper

 

 

 

Things I am going to work on:

Short term:

-Import arbitrary tabs

-Support stretching of the left hand

-Support more guitar techniques (for instance barre chords, two-finger tapped)

-Create more useful tests

 

Long(er) term:

-Try out different optimization properties (for instance finger movement, or picking difficulty)

-Frontend or commandline interface

-Importing/exporting to CDLC

 

Done:

-Try out some simple genetic algorithms

  • Like 8
Link to comment
Share on other sites

So I started messing around with some very dumb genetic algorithms, and while the speed is ok, the solutions are not really good (even the greedy algorithm has better results).

Maybe I will look into a combination with learning algorithms, but I'let the genetic algorithms rest for now.

 

Edit:

I fixed a bug where my tab input was processed on the wrong strings, this is the new tab for Ferrum Aeternum:

https://gist.github.com/anonymous/720b6ad17929dd35e95a

Link to comment
Share on other sites

I am a computer science student, and I took up this project for fun/practice, and because of the annoyance of weird tabs.

 

The algorithm is currently far from perfect though, the tab works fine for Ferrum Aeternum, but I tried generating tabs for other songs, but their playability isn't improved by blindly optimizing shifting.

 

I became interested in genetic algorithms, because they sound fancy, but their implementation seem like guesswork vaguely related to evolution principles (survival of the fittest namely). I have heard of some combinations with neural networks (which I have to look into) have been used to generate good results in different areas (not my work btw):

 

As for now, the best algorithm yet is a slightly modified Depth-First Search, which is a very basic search algorithm.

 

Maybe I'll post some calculations on the computational complexity of this problem soon.

Link to comment
Share on other sites

  • Administrator

It's clear that neural network system would be best to treat those kind of complicated task where experience can help shape the final result. But those are some real complicated pieces from what i know with my limited knowledge.

 

My question on this topic is : Do you have already premade exemple of the bad tab and the good tab that you are trying to get out of the code?

 

And that also relate to how knowledgeable you are on guitar technique and specifics cases that can help forge the basics of the algorythm before trying to apply it to a bigger scale.

Firekorn's workshop
In Flames Discography

#FirekornHasDoneNothingForTheCommunity

Link to comment
Share on other sites

It's clear that neural network system would be best to treat those kind of complicated task where experience can help shape the final result. But those are some real complicated pieces from what i know with my limited knowledge.

 

My question on this topic is : Do you have already premade exemple of the bad tab and the good tab that you are trying to get out of the code?

 

And that also relate to how knowledgeable you are on guitar technique and specifics cases that can help forge the basics of the algorythm before trying to apply it to a bigger scale.

 

I do not have two examples, maybe the old Ferrum Aeternum tab (which has recently been updated) and the old one are examples of small improvements.

 

Currently I let my algorithm optimize a cost function (where the cost function currently calculates the amount of shifts needed to accomplish the suggested hand positions). Because minimizing shifting is not always better (ie I think that running my current algorithm on the intro of Thunderstruck by AC/DC, which is played on a single string, will generate some quite unplayable tabs), I have to adapt this cost function.

 

At some point, however, this will come up to personal preferences. I am therefore thinking of including a 'Mother of all Cost functions', which consists of the weighted sum of some cost functions.

 

My idea for the genetic algorithm was to let one gene determine part of the structure of a neural network, and a different gene the weights.

 

You have a point about the guitar technique part, I have been playing guitar for some time, but only picked up electric guitar when the first Rocksmith game came out. I'd consider myself to be of intermediate level, I am able to score 90%+ on almost all songs I play, and the only technique I encounter which I don't know how to perform is sweep picking. I am not very knowledgable on music theory.

  • Like 2
Link to comment
Share on other sites

  • 5 months later...

After a really long radio silence, I remembered I had created this project, and resumed work on it again. This project will certainly take a while, as I am still as busy as the past 6 months.

 

I managed to implement a better performing version of my current algorithm (which shares some silmilarities with the A* algorithm), which is able to generate the 'optimal' tab for Ferrum Aeternum in 500ms instead of 6 seconds.

I also took a course on machine learning, and I think I will drop the genetic algorithm component as I am certainly lacking training data (as mentioned by firekorn). Anyhow, the current algorithm is fast enough for most purposes.

 

The areas I will focus on in the near future:

-Implement a graphical interface to allow people other than me to use the software

-Support more techniques:

--Slides

--HOPOs

--Two-finger tapping??

-Redesign the internal mechanism for representing notes and applied playing techniques

 

In the long run I have a wholly different heuristic in mind, where the algorithm tries to minimize the movement of all fingers. This will likely require time between notes to be taken into account. There are some sequences of notes which are easier to play than the current algorithm suggests (for instance HOPOs on a single string, such as Thunderstruck, without picking ofc), which means that the current heuristic is probably too simple.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I was attempting something like this through Shreddage II , kontakt, and mixcraft

 

You define max and min fret preferance, string preference ect, and it shows the song being played on a virtual guitar with your settings, but it doesn't save the modified tabs when you save

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. - Privacy Policy