FretboardDrawer
Draw fretboard structure
Installation
Add this line to your application's Gemfile:
gem 'fretboard_drawer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fretboard_drawer
Usage
FretboardDrawer.number_of_frets = 6
FretboardDrawer.draw
3 5
e|-----|-----|-----|-----|-----|-----|
b|-----|-----|-----|-----|-----|-----|
g|-----|-----|-----|-----|-----|-----|
d|-----|-----|-----|-----|-----|-----|
a|-----|-----|-----|-----|-----|-----|
e|-----|-----|-----|-----|-----|-----|
sounds = { 1 => { 3 => "g" }, 6 => { 5 => "a" } }
FretboardDrawer.draw(sounds)
3 5
e|-----|-----|--g--|-----|-----|-----|
b|-----|-----|-----|-----|-----|-----|
g|-----|-----|-----|-----|-----|-----|
d|-----|-----|-----|-----|-----|-----|
a|-----|-----|-----|-----|-----|-----|
e|-----|-----|-----|-----|--a--|-----|
Config
FretboardDrawer::Config.number_of_strings # 6
FretboardDrawer::Config.number_of_frets # 20
FretboardDrawer::Config.use_stdout # true
By default FretboardDrawer.draw use puts to draw to stdout, to disable it:
FretboardDrawer::Config.use_stdout = false
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request