Skip to content

Instantly share code, notes, and snippets.

View pitosalas's full-sized avatar

Pito Salas pitosalas

View GitHub Profile
@rbnpi
rbnpi / romanchordprogressions.rb
Last active November 22, 2015 15:24
romanchordprogressions.rb (revision 3) This program explores the use of chord progressions notated using Roman numerals. A range of symbols are defined and two routines defined to parse these and produce the required chords. Works on SP 2.7. Sound File at https://soundcloud.com/rbnman/romanchordprogressions
#playing with chord progressions and their syntax by Robin Newman, November 2015 (rev 3)
#recently I've been reading up on chord progressions, and representing them with a Roman notation.
#This code is the result!
#revision 2. (Removed some extranous development stuff)
#revison 3. (reallocated synths for arpeglinear, typo correction, changed amp: setting for arpeg random)
#first set up hashes of symbols, giving offsets for their base note
DU= {:I=> 0,:II=> 2,:III=> 4,:IV=> 5,:V=> 7,:VI=> 9,:VII=> 11} #capitals for Major chords
DU7= {:I7=> 0,:II7=> 2,:III7=> 4,:IV7=> 5,:V7=> 7,:VI7=> 9,:VII7=> 11} # 7th Major
DUA= {:Ia=> 0,:IIa=> 2,:IIIa=> 4,:IVa=> 5,:Va=> 7,:VIa=> 9,:VIIa=> 11} #Major augmented