Skip to content

beneggett/music_theory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MusicTheory

Learn Music through Ruby!

Based on my presentation at MtnWest Ruby Conference.

Slides on SpeakerDeck

Recording on Confreaks.tv

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

Make sure that you have mplayer installed as well, as output requires it:

brew install mplayer

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

Contributors 4

  •  
  •  
  •  
  •  

Languages