DEV Community

Cover image for For Ruby developers who love guitar and music
Anton
Anton

Posted on

For Ruby developers who love guitar and music

Some time ago I really needed to have sets of guitar tunings on hand with a visual layout on the guitar fretboard. Without thinking twice, I decided to write my own solution, which would be convenient to use. Through this post I want to share this solution with you.

I tried to collect all the guitar tunings in one gem: https://github.com/afuno/fretboard

By installing it you will have easy access to this information through the console.

To get the entire list of guitar tunings known for the library, run this command:

fretboard --tunings-list
Enter fullscreen mode Exit fullscreen mode

Then, having selected the required guitar tuning, execute the command, passing the necessary code into it:

fretboard --draw-tuning standard
Enter fullscreen mode Exit fullscreen mode

As a result, you will get a table like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| № | 0 | 1     | 2     | 3     | 4     | 5 | 6     | 7     | 8     | 9     | 10 | 11    | 12 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 | E | F     | F#/Gb | G     | G#/Ab | A | A#/Bb | B     | C     | C#/Db | D  | D#/Eb | E  |
| 2 | B | C     | C#/Db | D     | D#/Eb | E | F     | F#/Gb | G     | G#/Ab | A  | A#/Bb | B  |
| 3 | G | G#/Ab | A     | A#/Bb | B     | C | C#/Db | D     | D#/Eb | E     | F  | F#/Gb | G  |
| 4 | D | D#/Eb | E     | F     | F#/Gb | G | G#/Ab | A     | A#/Bb | B     | C  | C#/Db | D  |
| 5 | A | A#/Bb | B     | C     | C#/Db | D | D#/Eb | E     | F     | F#/Gb | G  | G#/Ab | A  |
| 6 | E | F     | F#/Gb | G     | G#/Ab | A | A#/Bb | B     | C     | C#/Db | D  | D#/Eb | E  |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter fullscreen mode Exit fullscreen mode

The repository page contains more information on working with obtaining information.

Top comments (0)