zgomot is a Ruby DSL for composing music as programs. Programs generate MIDI streams that are rendered by audio software such as GarageBand and Ableton Live. It provides abstractions that easily allow programming of algorithmic music. This includes using Roman Numeral Notation to represent a melody and applying sequences of transformations to produce notes.
Writing a program that goes through scales is easy.
Install
gem install zgomot
Configure
# zgomot.yml
time_signature: 4/4
beats_per_minute: 120
resolution: 1/64
Code
# mytune.rb
require 'rubygems'
require 'zgomot'
str 'scales' do
ch << [np([:C,5]),
np([:C,5]).reverse!.shift,
n(:R)]
end
play
Run
ruby mytune.rb
Enable IAC Driver
The IAC Driver must be enabled for programs to communicate with the digital audio software used to render used to render the generated MIDI stream.
To enable the IAC Driver open Audio MIDI Setup. Under the Window menu item select
Show MIDI Window. Find the IAC Driver, double click it and be sure Device is online is selected
and at least one port exists.
Start Digital Audio Software
Start Garage Band, Logic, Abelton Live or any other Digital Audio Workstation software and select an instrument.

