GD::Tab::Guitar - Guitar tab image generator.
use GD::Tab::Guitar; my $gtr = GD::Tab::Guitar->new; # print png image print $gtr->chord('D#sus4')->png; # get GD::Image instance my $im = $gtr->chord('C'); print $im->png; # other tab generate $gtr->generate('G7',[1,0,0,0,2,3])->png; # above fret style (1st string to 6th string) is unfamiliar to most guitarists. # you can also specify the reversed and familiar style like this: $gtr->generate('G7', '320001')->png; # if you want to specify some mute strings, put "x" character. $gtr->generate('D7', 'x00212')->png; # set color $gtr->color(255, 0, 0); # set background-color and no interlace $gtr->bgcolor(200, 200, 200); $gtr->interlaced(0); # all tabs image save to file. use IO::File; for my $chord (@{$gtr->all_chords}) { (my $filename = $chord) =~ s/M/Maj/; # for case-insensitive filesystem my $file = IO::File->new("images/$filename.png", 'w'); $file->print($gtr->chord($chord)->png); }
GD::Tab::Guitar generates guitar tab scores. This module is inspired by GD::Tab::Ukulele, and it's almost its copy.
Koichi Taniguchi <taniguchi@livedoor.jp>
Thanks to Yuichi Tateno.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
GD, GD::Tab::Ukulele
To install GD::Tab::Guitar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GD::Tab::Guitar
CPAN shell
perl -MCPAN -e shell install GD::Tab::Guitar
For more information on module installation, please visit the detailed CPAN module installation guide.