ecole Posted November 23, 2015 Share Posted November 23, 2015 Hello! Is there a way to do a simple conversion from integer (representing scale degree) to pitch (via a Tonality)? map-to-tonality assumes that the integer input is a chromatic pitch class. Thank you! Elliot Quote Link to comment Share on other sites More sharing options...
opmo Posted November 23, 2015 Share Posted November 23, 2015 (integer-to-pitch '(1 2 3 4 5)) => (cs4 d4 eb4 e4 f4) Do check the Conversions 'System Library' section. Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted November 23, 2015 Share Posted November 23, 2015 also you may be interested by this example: ;; An example of diatonic transposition ;; ie. using tonality degree for tonality mapping. ;; degree selection (setf degr '(1 4 2 5 1 6 4 2 5)) ;; remove 1 from each degree for use as transposition ;; inside tonality for diatonic transposition (setf trsp (mapcar (lambda(x) (- x 1)) degr)) ;;; some material (setf arps1 (gen-repeat (length degr) '((s c4 e4 g4 c5 e5 g5 c6 g5 e5 c5 g4 e4)))) ;; apply diatonic transposition (inside tonality) (setf arps.map (tonality-map '(major :root d4) (pitch-transpose trsp arps1))) SB. hujairi 1 Quote Link to comment Share on other sites More sharing options...
ecole Posted December 18, 2015 Author Share Posted December 18, 2015 Neither of these do quite the simple conversion I'm asking. (integer-to-pitch) only speaks chromatic pitch-class, not diatonic scale degree. I may not understand the second fully yet, but a more transparent test shows its limitation: ;; An example of diatonic transposition ;; ie. using tonality degree for tonality mapping. ;; degree selection (setf degr '(1 2 3 4 5)) ;; remove 1 from each degree for use as transposition ;; inside tonality for diatonic transposition (setf trsp (mapcar (lambda(x) (- x 1)) degr)) ;;; some material (setf arps1 (gen-repeat (length degr) '((s c4 d4 e4 f4 g4)))) ;; apply diatonic transposition (inside tonality) (setf arps.map (tonality-map '(major :root c4) (pitch-transpose trsp arps1))) The result is C D E F G D F G G A (when a true diatonic transposition would be D E F G A) D D F G A (should be E F G A B) etc. I'm getting a handle on LISP and think I'll be able to write my own function, but I do suggest that this is basic musical task that many people would use if it were in the library. Thanks for your help, Elliot Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted December 18, 2015 Share Posted December 18, 2015 You can utilize :shift optional keywords parameters and :closest 'down etc... TONALITY-MAP have a lot of optional possibilities. SB. 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.