Posted February 9, 20169 yr Hi, Is there a direct way to get the pitches of a scale represented as, say, '(d4 major)? This representation of scale is well supported in HARMONIC-PROGRESSION function, but I want to get only the pitches in the scale, not the chord or progression. The following works: (expand-chord-name 'major :type :pitch) => (c4 d4 e4 f4 g4 a4 b4) But I want the root to be also specified as part of the scale such as '(d4 minor). The function should ideally be called "expand-scale" or something similar, but I do not find such a function in the library (I may be missing it!) Regards, Rangarajan
February 9, 20169 yr Author OK, I have written the following function to solve my problem. Is it the correct approach? ;; E.g: (expand-scale '(c4 major)) => (c4 d4 e4 f4 g4 a4 b4) ;; E.g: (expand-scale '(d4 phrygian-greek)) => (d4 e4 f4 g4 a4 b4 c5) (defun expand-scale (root-and-mode-name-pair) (pitch-transpose (first root-and-mode-name-pair) (expand-chord-name (second root-and-mode-name-pair) :type :pitch))) Regards, Rangarajan
February 9, 20169 yr EXPAND-CHORD solution: (melodize (expand-chord '(c4 major))) => (c4 d4 e4 f4 g4 a4 b4) (melodize (expand-chord '(d4 phrygian-greek))) => (d4 e4 f4 g4 a4 b4 c5) I will change the name of the function to EXPAND-TONALITY and will add few more options :-) Example: (expand-tonality '(c4 major)) => (c4 d4 e4 f4 g4 a4 b4) (expand-tonality '(d4 phrygian-greek) :type :integer) => (2 4 5 7 9 11 12) (expand-tonality '((c4 major) (d4 phrygian-greek)) :type :interval) => ((2 2 1 2 2 2) (-9 2 1 2 2 2 1)) (expand-tonality '(c4 phrygian-greek :add '(1 3) :variant '? :seed 67)) => (as4 ds4 cs4 b4 a4 d4 g4 c4)
February 9, 20169 yr Author I did not know about "melodize". Thanks a lot! As always, your generalisation is very good. Regards, Rangarajan Just now noticed that "melodize" is not documented. Intentional? Regards, Rangarajan
February 9, 20169 yr PITCH-MELODIZE is the main function. (pitch-melodize (expand-chord '(c4 major)))
Create an account or sign in to comment