chord_finder

A ruby gem for printing guitar chord charts.

Install

gem install chord_finder

Displaying Chord Charts

To display two C chord positions between the 1st and 3rd frets:

finder = ChordFinder.new
finder.display "C", low_fret: 1, high_fret: 3, limit: 2

Result:

 X     O   O
 -----------
 | | | | ● |
 -----------
 | | ● | | |
 -----------
 | ● | | | |
 -----------
 E A D G B E
      C     

 X     O    
 -----------
 | | | | ● |
 -----------
 | | ● | | |
 -----------
 | ● | | | ●
 -----------
 E A D G B E
     C
# => "Notes: C E G"

For a minimalistic display, set the 'simple' option to true:

finder.display "C", low_fret: 1, high_fret: 3, simple: true

Result:

x32010
x32013
332010
332013

You can also put the guitar in a different tuning than the default standard:

finder = ChordFinder.new(:CGCFCE)
finder.display "C", low_fret: 1, high_fret: 3, limit: 2, simple: true

Result:

xx0200
000200

Finding Chord Notes

chord = Chord.new "Dmajor7"
chord.to_s
# => "D F# A C#"

Specs

To run rspec specs:

rake

To Do

  • Rank chord positions by difficulty
  • Support more chord types
  • Refactor chord rules to use regex