impurist / coltrane

🎹🎸A musical querying library/interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coltrane

A musical abacus written in ruby.

Coltrane

More info, story and purpose of the library here.

CLI (Command Line Interface)

$ gem install coltrane

When you install the gem on your system, you automatically gain access to the CLI.

It allows you to query for notes and chords and display them on your favorite instrument. No sheet music reading skills needed. It also allows you to find scales with a chord and find chords shared between two scales (that is actually the main goal when I did this project).

Some screenshot examples: Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot

As a library

Add this line to your application's Gemfile:

gem 'coltrane'

And then execute:

$ bundle

The whole library will be available under the Coltrane module. The CLI code won't be imported to your application as default. Here's a quick example on how to use it:

require 'coltrane'

puts Coltrane::Scale.major('C').sevenths.map(&:name)
# => ["CM7", "Dm7", "Em7", "FM7", "G7", "Am7", "Bm7b5"]

puts Coltrane::Scale.having_chord('Cmaj7').scales.map(&:name)
# => ["C Major", "G Major", "E Natural Minor", "A Natural Minor", "E Harmonic Minor", "B Flamenco"]

Roadmap

There's a lot of things that need to be done on this library, specially on the CLI:

  • Separate into 2 gems: coltrane and coltrane-cli
  • Make all output more colorful
  • Refactor the CLI into a more succinct and elegantly organized architecture
  • Amplify the test coverage
  • Move Scale#chords method to NoteSet
  • Write tests for the caching
  • Write up a caching cleaning command
  • Include CLI commands to output chord progressions
  • Include a command to output a pretty HTML document containing the query

Contributing

Install the test suite (RSpec) by running good old bundle command

Fork the code, make your changes and maybe write a test or two. Then run:

Then run:

bundle exec rspec spec

Make sure the specs pass and submit a PR.

License

The gem is available as open source under the terms of the MIT License.

About

🎹🎸A musical querying library/interface

License:MIT License


Languages

Language:Ruby 99.8%Language:Shell 0.2%