Created
March 29, 2021 13:27
-
-
Save interstar/1682e45f752062e29aca951973c043d2 to your computer and use it in GitHub Desktop.
Sonic Pi Chords. The same as the Cheat Sheet, but not using MIDI. Plays them directly in Sonic Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chord Sequence only in Sonic Pi | |
# (no MIDI or need for external DAW) | |
define :chordSeq do | tonic, mode, degs | | |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim] | |
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M] | |
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished] | |
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7] | |
cs = [] | |
degs.each { | deg | | |
case deg | |
when 1..7 | |
root = degree(deg,tonic,mode) | |
lookup = (mode == "major") ? majorKeyTriads : minorKeyTriads | |
when 71..77 | |
deg = deg - 70 | |
root = degree(deg,tonic,mode) | |
lookup = (mode == "major") ? majorKey7s : minorKey7s | |
end | |
theChord = chord(root,lookup[deg-1]) | |
cs.append [tonic,mode,theChord] | |
} | |
cs | |
end | |
use_bpm 120 | |
with_fx :reverb do | |
with_synth :piano do | |
live_loop :piano do | |
cs = chordSeq(:C3,"minor",[1,76,4,75, 5,7,74,5, | |
1,76,4,75, 5,7,74,1]) | |
cs.each {| xs | | |
tonic,mode,c = xs | |
play c, amp: 0.6, decay: 3 | |
sleep 2 | |
play scale(tonic,mode).choose+24, amp: 0.6 | |
sleep 1 | |
play scale(tonic,mode).choose+24, amp: 0.6 | |
sleep 1 | |
} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment