Hi, I was looking at some videos on degrees, and building chords in scales.
There’s a video that talks about the modes, and applying this to different scales, which got me thinking how this could be done in SP.
The 7 Strange Scales Nobody Talks About - YouTube
It looks like sp’s degree function is for note resolution.
I tried to get at the known interval sequences in the Scale class, but not sure if that’s even possible…
SCALE = lambda{
ionian_sequence = [2, 2, 1, 2, 2, 2, 1]
hex_sequence = [2, 2, 1, 2, 2, 3]
pentatonic_sequence = [3, 2, 2, 3, 2]
then I reviewed a few related topics. Whilst I didn’t see anything that seemed identical to this, I’d be surprised if this is the first!
First version simply produces the notes for a given scale and mode by rotating.
define :stm do |s = :major, t = 0, m = 1|
scale_steps = []
(Array scale t, s).to_a.each_cons(2) { |a, b| scale_steps << b - a }
scale_steps.rotate!(m-1)
notes = [t] #v1
scale_steps.each_with_index {|s,i| notes << notes[i]+s}
return notes
end
puts stm :major, 60, 2
puts scale :c, :dorian
To make the method return the scale at given mode I added a start_pos variable, which I’m decrementing like with the mode indexer m
I thought it seemed to work a bit before “breaking” where the tonic stops climbing…
I tried to compare notes, but don’t think I’m quite there yet, with developing dorian functions and stuff like this
#WIP
define :stm do |s = :major, t = 0, m = 1, start_pos = 1|
scale_steps = []
(Array scale t, s).to_a.each_cons(2) { |a, b| scale_steps << b - a }
scale_steps.rotate!(m-1)
n = start_pos - 1
scale_steps.first(n).each {|s| t += s}
notes = [t] #v1
scale_steps.each_with_index {|s,i| notes << notes[i]+s}
return notes
end
a test-loop
uncomment do
live_loop :scaling, init: 1 do |i|
use_synth :piano
tonic = :d
##| scale :c, :melodic_minor
scl = :major
current_scale = stm scl, tonic, i, i
puts current_scale, i
play_pattern_timed current_scale, 0.25
wait 1
i+=1
end
end
Optional-tags: this doesn't work yet! buggy!! scales idea! pre-creation WIP
Just putting this out there for feedback and stuff