Skip to content

scottmacphersonmusic/music_theory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MusicTheory

Learn Music through Ruby!

Based on my presentation at MtnWest Ruby Conference. Slides/link to come.

Installation

Add this line to your application's Gemfile:

gem 'music_theory'

And then execute:

$ bundle

Or install it yourself as:

$ gem install music_theory

Usage

Play any of the sample songs by running them with ruby

ruby samples/arpeggios.rb
require 'music_theory'

Make new notes

MusicTheory::Note.new

Play Notes

MusicTheory::Note.new.play

Create scales

MusicTheory::Scale.new

Play Scales

MusicTheory::Scale.new.play

Play chords

MusicTheory::Scale.new.chord.play

Play third

MusicTheory::Scale.new.third.play

Play arpeggios

MusicTheory::Scale.new.arpeggio.play

Contributing

  1. Fork it ( https://github.com/[my-github-username]/music_theory/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Thanks

  1. URUG community
  2. Alex Speller (for indirect inspiration)

About

Music Theory in Ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.7%
  • Shell 0.3%