Jump to content

How to get the pitches of a scale?


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy