Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chord_finder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chord_finder

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 31 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc