Jump to content

Featured Replies

Posted

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

  • 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

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)

 

  • 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

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy