AM Posted March 22, 2017 Share Posted March 22, 2017 here is a little "sketched" function STEP-TO-PITCH , perhaps OM could further develop the function... ;;; FUNCTION (defun step-to-pitch (&key steps pitches start) (let ((pos (car (position-item start pitches)))) (append (list (nth pos pitches)) (loop for i in steps ;; setting pos by add the step to pos do (setf pos (+ pos i)) ;; when pitch-range to small then reset to lowest pitch+step ;; could be a more intelligent solution when (> pos (length pitches)) do (setf pos (+ 0 i)) collect (nth pos pitches))))) ;;; EXAMPLES (step-to-pitch :steps '(1 1 -1 2 2 -1) :pitches '(c4 d4 e4 f4 g4 a4) :start 'c4) ;; => (c4 d4 e4 d4 f4 a4 g4) (step-to-pitch :steps '(1 1 -1 2 2 -1) :pitches (expand-tonality '(c4 chromatic)) :start 'c4) ;; => (c4 cs4 d4 cs4 ds4 f4 e4) (step-to-pitch :steps '(1 1 -1 2 2 -1 5) :pitches (expand-tonality '(c4 messiaen-mode6)) :start 'c4) ;; => (c4 d4 e4 d4 f4 gs4 fs4 gs4) Quote Link to comment Share on other sites More sharing options...
opmo Posted March 22, 2017 Share Posted March 22, 2017 This is how the new function TONALITY-STEP will work: tonality-step (scale step &key start ambitus (sort t)) (tonality-step '(c4 d4 e4 g4 a4 f4) '(1 1 -1 2 2 -1)) => (c4 d4 e4 d4 f4 a4 g4) (tonality-step '(c4 d4 e4 g4 a4 f4) '(1 1 -1 2 2 -1 5 3 2 3 -2 -2 1 1)) => (c4 d4 e4 d4 f4 a4 g4 f5 c6 e6 a6 f6 d6 e6 f6) (tonality-step '(c4 chromatic) '(1 1 -1 2 2 -1)) => (c4 cs4 d4 cs4 eb4 f4 e4) (tonality-step '(c4 messiaen-mode6) '(1 1 -1 2 2 -1 5)) => (c4 d4 e4 d4 f4 gs4 fs4 d5) (tonality-step '(c4 messiaen-mode6) '(1 1 -1 2 2 -1 5 3 2 3 -2 -2 1 1)) => (c4 d4 e4 d4 f4 gs4 fs4 d5 fs5 bb5 d6 b5 gs5 bb5 b5) (tonality-step '(c4 messiaen-mode6) '(1 2 -1 2 2 -1 5 3 2 3 -2 -2 1 1) :ambitus 'scale) => (c4 d4 f4 e4 fs4 bb4 gs4 e4 gs4 b4 e4 c4 bb4 b4 c4) (tonality-step '(c4 messiaen-mode6) '(1 2 -1 2 2 -1 5 3 2 3 -2 -2 1 1) :ambitus '(c3 a4)) => (c4 d4 f4 e4 fs4 bb3 gs4 e4 gs4 b3 e4 c4 bb3 b3 c4) (tonality-step '((c4d4e4g4a4f4) (c3 messiaen-mode6) (c4d4e4g4a4f4)) '((1 1 -1 2 2 -1) (5 3 2 3 -2 -2 1 1) (2 -1 3 2 3 -2 -2 1 1))) => ((c4 d4 e4 d4 f4 a4 g4) (c3 gs3 c4 e4 gs4 f4 d4 e4 f4) (c4 e4 d4 g4 c5 f5 d5 a4 c5 d5)) Stephane Boussuge, torstenanders and AM 3 Quote Link to comment Share on other sites More sharing options...
AM Posted March 22, 2017 Author Share Posted March 22, 2017 great!!! Quote Link to comment Share on other sites More sharing options...
opmo Posted March 22, 2017 Share Posted March 22, 2017 Will be part of the next update. torstenanders, Stephane Boussuge and AM 3 Quote Link to comment Share on other sites More sharing options...
AM Posted March 22, 2017 Author Share Posted March 22, 2017 extended idea: would be nice to do it with chords => instead of a scale, a sequence with chords... thanx a lot for such a quick developing/implementation!! Quote Link to comment Share on other sites More sharing options...
opmo Posted March 22, 2017 Share Posted March 22, 2017 The scale can be anything even omn bar: (tonality-step '(h fs5a5b3 e4b3) '(1 1 -1 2 2 -1)) => (b3 b3 e4 b3 fs5 b4 a5) (tonality-step '(h fs5a5b3 e4b3) '(1 1 -1 2 2 -1) :sort nil) => (fs5 a5 b3 a5 e4 fs6 b3) Stephane Boussuge 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted March 22, 2017 Share Posted March 22, 2017 Example with start: (tonality-step '(c4d4e4f4g4a4) '(1 1 -1 2 2 -1) :start -2) => (g3 a3 c4 a3 d4 f4 e4) Stephane Boussuge and torstenanders 2 Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted March 22, 2017 Share Posted March 22, 2017 Great !! SB. Quote Link to comment Share on other sites More sharing options...
AM Posted March 22, 2017 Author Share Posted March 22, 2017 is it also possible to start at a specific pitch? (tonality-step '(c4 d4 e4 g4 a4 f4) '(1 1 -1 2 2 -1) :start 'e4) Quote Link to comment Share on other sites More sharing options...
opmo Posted March 23, 2017 Share Posted March 23, 2017 Just to let you know the TONALITY-MAP with :map 'shift is doing the same thing already (tonality-step '(c4 messiaen-mode6) '(1 1 -1 (2 2 -1) 5 3 (2 3 -2) -2 1 1)) => (c4 d4 e4 d4 f4gs4fs4 d5 fs5 bb5d6b5 gs5 bb5 b5) (tonality-map '(messiaen-mode6 :map shift) (interval-to-pitch '(1 1 -1 (2 2 -1) 5 3 (2 3 -2) -2 1 1))) => (c4 d4 e4 d4 f4gs4fs4 d5 fs5 bb5d6b5 gs5 bb5 b5) AM 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.