Guitar2EigenTab is an application for converting ASCII Guitar Tab into an ASCII Tab form for the Eigenharp - one of the most awesome and expressive electronic instruments you're ever likely to play.
This is a BETA which has some restrictions on ASCII Tab input and only has full Tau and Alpha keyboards (no keygroups). It is intended to be for feedback about the algorithm/EigenTab format.
This UI is a 'quick' implementation for testing and verification. Please forgive it. If the feedback is positive on the content, I will clean up the UI
Feedback to John S. Nolan Twitter:@johnsnolan . Feel free to send me examples of Guitar tab that fail
One-minute tutorial (you can do the following actions with this Help Box open):
- Find some ASCII Guitar Tab and copy it into the Guitar Tab Input text area (see later restrictions on content)
- Click 'Process' button
- Click on Root/Scale box
- If there are no root/scales shown, this means it is not possible to play the Guitar Tab on the selected Instrument/Group
- Select a root/scale and a key heat-map for the device and the EigenTab will display below
- Note: the '+0' or '+1' at the end indicates the octave shift that needs to be applied (i.e.+0 means no shift, +1 means up an octave)
- The heat-map shows which keys will be played and how often. Red is hot, yellow is cool. Grey blocks connecting keys shows where slides are required. This gives you an idea of whether a piece is one- or two-handed and a way of picturing a comfortable position to play.
- Click on the Instrument/Keygroup to change the device and keygroup to use
The EigenTab output format is based on the conventions of ASCII guitar tab :
Restictions On GuitarTab Input:
- Each line represents a course on the EigenHarp - lowest tone at the bottom
- The numbers indicate the rank of the key to hit in the row (e.g. 5 means press the fifth key in the course)
- Numbers shown on different ranks at the same 'time' must be played together.
- Numbers on a rank shown with + signs between must be played together (i.e. 5+7 means play the fifth and seventh keys on the rank together)
- Guitar Tab convention for slides (/ or \), hammer-on (h), pull-off (p), etc is used for information
- Note: The algorithm keeps combinations connected with these symbols on the same rank to try and mimic/optimize play
The parsing of Guitar Tab is relatively simplisitic in this version. If the following rules are not complied with you may not get output.
- Lines can only contain GuitarTab or be blank (i.e. no lyrics, chords, comments)
- Guitar Tab lines MUST start with the tuning for the string (e.g. E, A, D, etc)
- NB: Open or unusual tunings will work
- Remove as many 'unconventional' notations as possible in the ASCII tab (e.g. . or x or 'strum' comments)
- Vertical bars are OK and will appear as bar marks
Here is an example of compliant input (the opening bar of Stairway To Heaven (has to be done ;-) )
Notes On The Conversion Algorithm
- Complex overlapping expressions sometimes give bad output (e.g. 8h9p7 on one string 7h8 on another with the 8's at the same time)
Converting Guitar tab to EigenTab is an interesting algorithmic challenge. I'm sure some of you have questions about how its done, so here's a basic description of the approach
- ASCII guitar tab is parsed into a model of notes (simple single notes and complex multi-note phrases)
- An analysis is then done to figure out which root/scale/octave combinations on the instrument can be used to play the song. These are shown in the pulldown from which the user selects.
- When the user selects a root/scale/octave the key-playing algorithm is invoked:
- for each note/expression in the model the possible keys are calculated. For each of these a weighting algorithm is used to calculate the most comfortable combinations to play if there are multiple notes at a single point in time. (this eliminates silly reaches)
- for each of the possible starting positions, a sequence is calculated based on a weighting algorithm for the easiest transition between notes/expressions (essentially closest move)
- for each of the possible sequences a weighting algorithm is used to figure out which sequence is the most self-similar (i.e. has the most repetitive patterns - meaning you have to remeber less moves)
- The best sequence is rendered as EigenTab
This empirically gives a good result, which is essentailly a very 'low change' way of playing. It does mean that you may well play the same note in several different positions on the EigenHarp - but this is no different to the Guitar and is taking maximum advantage of the instrument
If you wonder why I don't just do a brute force 'best-playing' algorithm? Consider that any note may have 4 possible keys on the Eigenharp and lets say we have a song with 3 notes per time slot and 30 slots. Not big, but this results in over 1.5x10^54 combinations. That's more than the number of atoms in the Earth. It would take some time to calculate.
Things I'm thinking about:
- adding the other tau and alpha keyboard splits and making this a released product if people find it useful
- how to do Pico. I think I'd need to add something about moving up/down octaves using the bottom two buttons - but its a lot of work and still might result in limited number of songs that can be played. Need to do some analysis.
- better weighting algorithms based on specific hand positions rather than a simple (but effective) distance measures
- weighting models for left- and right-hands, so I can also suggest which hand plays what
- Calculating optimal keyboard layouts for playing rather than sticking to standard layouts and scales (and providing autoconfigure).
Please give me feedback on what else might be useful or any bugs/irritations you find. Thanks - John S. Nolan
Thanks for trying Guitar2EigenTab by Stigmergist
- BETA V1.7 : Fixed bug that meant long slides were giving bad weightings and added notes to keys in heat-map
- BETA V1.6 : Added slide information to heat-map
- BETA V1.5 : Added heat-map for device
- BETA V1.4 : Added extra keygroups and scales
- BETA V1.3 : Fixed overshoot of tab lines
- BETA V1.2 : Added Alpha keyboard
- BETA V1.1 : Removed restriction on not having leading chars like p12 /6
- BETA V1.0 : Initial release