I added the output name of the chord.
tnx to tune5b

CommentFileSizeAuthor
0-2-2-1-0-0.png738 bytestopy
3-2-0-0-0-3.png771 bytestopy
x-x-0-2-3-1.png835 bytestopy
guitar_diagram.test8.76 KBtopy

Comments

topy’s picture

Issue tags: +number of string

You can see my result here
PS I added number of string and rotate the image (like guitarists likes)
PPS sorry for my English

floretan’s picture

Adding the chord name inside of the image is nice, but it has the following disadvantages:

1. You need to modify the image generation function in order to modify the appearance. Adding the chord name as text after the image (by overriding the theme function) lets you use CSS and all of its possibilities.

2. Chord diagram images have their filename based on the finger positions only. However, the same chord can have two different names. For example, [x,1,3,3,3,1] could be either Bb or A# major.

However, the option to add a background color to the fretboard and rotating the image to display the strings horizontally is interesting and would be a nice feature to have. If you have a patch to add such functionality I'd be happy to integrate it into the module.

topy’s picture

I can't write the patch, but can describe you how i did it.

Thus:

1. I took the code from here (thanks to tune5b) to get the background color.
2. I added $im = imagerotate($im, 90, 0); before "Create the image file" sting.

Thank you for your nice job.