progression = (ring
(chord :a, 'minor'),
(chord :f, 'major'),
( ring :c4, :f4, :a4, :d5 ), # we can create our own chords
( ring :d4, :g4, :a4, :d5 )
)
use_bpm 120
live_loop :progression do
current = progression.tick
4.times do
play current
sleep 0.5
end
end
And, just to add to everything else that’s been discussed. You can also make composite chords from those already named in SPi
#Composite A major 7
a = (chord :a3, :major, invert: 0)
b = (chord :cs4, :minor, invert: 2)
# Composite A minor 9
c = (chord :a3, :minor, invert: 0)
d = (chord :c4, :major7, invert: 2)
live_loop :partchords do
8.times do
play a + b, release: 0.4
sleep 0.5
end
8.times do
play c + d, release: 0.4
sleep 0.5
end
end
Or as a composite of fifths, or any other interval you care to use:
#Composite of fifths
e = (chord :a3, '5')
f = (chord :c4, '5')
g = (chord :e4, '5')
h = (chord :g4, '5')
play e + f + g + h
sleep 2.0
play_pattern_timed e + f + g + h, 0.25
Use invert to make some variations:
#Composites of fifths
e = (chord :a3, '5')
f = (chord :c4, '5', invert: 2)
g = (chord :e4, '5', invert: 1)
h = (chord :g4, '5')
8.times do
play_pattern_timed e + f + g + h, 0.125
end
Obviously this is a quick and dirty version to illustrate.
@GWB70 a lot of those chords are already named in the library, so it’s a question of identifying the ones you want. My suggestions is that you can also approach chords of this type as part chords or exploit bi-tonality such as F#/C as two distinct triads. As ever, there are lots of ways to solve a problem, just that we have to identify the ‘right’ one at that time.
You might also want to look at knit as a means of joining lists together.
My favorite way to play chords
in Sonic Pi (derived from the 1st example):
# PLAY CHORD
use_debug false
use_bpm 86
define :cho do |note|
play note
end
use_synth_defaults amp: 1,release: 0.8
use_synth :pluck
live_loop :chord do
density 1 do
cho([:a3,:c4,:e4])
sleep 1
cho([:a3,:b3,:d4])
sleep 1
end
end