Challenge
Given a list a notes, you must return the corresponding tablature.
Notes
The notes must be in the range of A to G inclusive and the octave range being 2 to 6 inclusive. The format is note-octave with #
representing a sharp and b
representing a flat. E.g: A7
or F#3
.
Tabs
Tablature is a method of writing music, by diagrammatically representing the instrument. It is usually represented as five lines with numbers on them.
The numbers that are written on the lines represent the fret used to obtain the desired pitch. For example, the number 3 written on the top line of the staff indicates that the player should press down at the third fret on the high E (first string). Number 0 denotes the nut — that is, an open string.
Fret numbers may not be greater than 22 and the guitar is six string.
The tablature must be in the standard ASCII format. You must not include any technique indicators (hammer on, slide etc.). Separate each note by five dashes. In the case of double digits, reduce the number of dashes to four.
The beginning of the tab should look like this:
e |-----
B |-----
G |-----
D |-----
A |-----
E |-----
And the end should look like:
-----|
for all lines.
(source: justinguitar.com)
Example
Input: C3 C3 D3 E3 F3
Output:
e |-----------------------------------|
B |-----------------------------------|
G |-----------------------------------|
D |-----------------0-----2-----3-----|
A |-----3-----3-----------------------|
E |-----------------------------------|
Winning
The shortest code wins