Mass
Mass is a Ruby framework for building MIDI synthesizer controls.
Installation
On Linux, the libasound and libasound-dev are required for use.
Add this line to your application's Gemfile:
gem 'mass'
And then execute:
$ bundle
Or install it yourself:
$ gem install mass
Usage
To create a new pattern, use the DSL methods that Mass gives you upon mixing it into whatever namespace you're dealing with.
require 'mass'
include Mass
bpm 128
pattern bars: 4 do
note 4, pitch: 'C2'
note 4, pitch: 'C3'
note 4, pitch: 'C4'
note 4, pitch: 'C3'
end
You can also use this syntax to also name the sequence and keep it out of the main namespace:
MS20 = 'KORG INC. MS-20M Kit'
TEMPEST = 'Dave Smith Instruments Tempest'
Mass.sequence name: 'Your Love', bpm: 125, bars: 32 do
pattern name: 'Arpeggio', repeat: true, device: MS20 do
note 8, pitch: 'G4'
note 8, pitch: 'E4'
note 8, pitch: 'C4'
end
pattern name: 'Bass Line', repeat: true, device: TEMPEST do
note 8, pitch: 'G4'
note 4, pitch: 'E4'
note 8, pitch: 'C4'
note 4, pitch: 'C4'
note 4, pitch: 'C4'
end
end
This is useful for more complex patterns with names. Read the RDoc documentation for more information on each component and what each DSL method does.
Development
Mass was created by Tom Scott and is published under the MIT License. All contributions are welcome as long as they are submitted via pull request, include tests that describe your change and prove what you did works, and do not break the CI build.
To get started with contributing, clone down this repo and run the following command within its root directory:
$ bin/setup
If you need to install this gem onto your local machine, run:
$ bin/rake install
To release a new version, update the version number in
lib/mass/version.rb, then run the following command to create a Git
tag for the release, push all commits & tags to the repo, and upload the
newly built .gem
file to RubyGems:
$ bin/rake release