Hi @Martin!
I understand that the 9 is functionally the ii, etc. My concern comes from a practical standpoint, rather than theoretical. In lots of music, jazz in particular, the 9, 11, and 13 are regularly notated in chords, etc. When I’m creating my own “notation” for arpeggios, I want to be able to outline a pattern that is, say, [1, 3, 5, 7, 9], or something like that. It makes sense in my head and it’s the way I’d like to be able to notate things.
The other concern is that the “degree” function is limited to an octave, so even if I were to use 2 in place of 9, or 4 in place of 11, I have to change the octave as well to achieve the note I want. It adds an extra step.
To respond to @Bubo’s point – making the “degree” function chromatic would defeat its purpose. The reason I want to use it is so that I can make sure to stay within the given scale by calling out degrees. However, it does raise a good point - could there be a way to force a chromatic change, like adding a flat or a sharp to a degree, if the situation called for it?
Here are some of the functions I’m building. They’re essentially a list of patterns that I can call up by index, as well as specifying the number of steps in the pattern.
define :arp do |idx, deg = 1, num_notes = 0| #arpeggiator patterns
num_patterns = 3
assert idx >= 0 && idx < num_patterns, "First argument must be between 0 and #{num_patterns - 1}"
ptrn = [1, 3, 5, 7] if idx == 0
ptrn = [1, 5, 3, 7, 5] if idx == 1
ptrn = [1, 3, 5, 6] if idx == 2
# off = (deg - 2).to_i
if num_notes == 0
steps = ptrn.length
else
steps = num_notes
end
arpeg = ptrn.ring.take(steps)
# arpplus = arpeg + off
# arp = arpplus.map {|n| n.to_i}
return arpeg
end
define :rtm do |idx, num_steps = 0| #rhythm patterns
num_patterns = 13
assert idx >= 0 && idx < num_patterns, "First argument must be between 0 and #{num_patterns - 1}"
ptrn = (bools 1, 0, 0, 0) if idx == 0
ptrn = (bools 1, 0, 1, 0) if idx == 1
ptrn = (bools 1, 1, 1, 1) if idx == 2
ptrn = (bools 1, 1, 1, 0) if idx == 3
ptrn = (bools 1, 1, 0, 1) if idx == 4
ptrn = (bools 1, 0, 1, 1) if idx == 5
ptrn = (bools 1, 1, 0, 0) if idx == 6
ptrn = (bools 1, 0, 0, 1) if idx == 7
ptrn = (bools 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) if idx == 8 #Son Clave 2/3
ptrn = (bools 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0) if idx == 9 #Son Clave 3/2
ptrn = (bools 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1) if idx == 10 #Rhumba Clave 2/3
ptrn = (bools 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0) if idx == 11 #Rhumba Clave 3/2
ptrn = (bools 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0) if idx == 12 #Chitlins Con Carne
if num_steps == 0
steps = ptrn.length
else
steps = num_steps
end
patrn = ptrn.take(steps)
return patrn
end
define :prg do |idx, num_chords = 0| #chord progressions
num_patterns = 14
assert idx >= 0 && idx < num_patterns, "First argument must be between 0 and #{num_patterns - 1}"
ptrn = [1, 4, 5] if idx == 0
ptrn = [1, 5, 6, 4] if idx == 1
ptrn = [1, 6, 4, 5] if idx == 2
ptrn = [6, 4, 1, 5] if idx == 3
ptrn = [1, 4, 6, 5] if idx == 4
ptrn = [1, 4, 5, 4] if idx == 5
ptrn = [1, 4, 1, 5] if idx == 6
ptrn = [1, 5, 6, 3, 4, 1, 4, 5] if idx == 7 #pachelbel
ptrn = [4, 5, 6, 1] if idx == 8
ptrn = [4, 5, 6] if idx == 9
ptrn = [1, 5, 4] if idx == 10
ptrn = [6, 1, 4, 5] if idx == 11
ptrn = [6, 2, 4, 5] if idx == 12
ptrn = [4, 3, 2, 3] if idx == 13
if num_chords == 0
steps = ptrn.length
else
steps = num_chords
end
prog = ptrn.ring.take(steps)
return prog
end