Jump to content

How to work with scales and relative pitches?

Recommended Posts

Hi Stephane,

I looked at tonality-map as you suggested. It is a powerful function, but it is not clear that it matches my requirement. I need to generate a set of pitches within a given scale. And if I change the scale, the pitches must change too. This was straightforward in SCOM. 

Are there any examples where something like this is done in opusmodus (sorry, I can't follow French)? Another related question: how do I access the different built in scales? A search for "tonality" gives a result that has the names of all tonalities, but I do not know how to use them.

Thanks for your help.




Link to comment
Share on other sites

Hi Rangarajan,

you can apply a tonality to some pitches like this:

(setf my-pitches '(c4 d4 e4 f4 a4 g4 e5 d5 c5 b5 g5))
(setf my-pitches-mapped (tonality-map '(acoustic-scale) my-pitches))

;; apply more than one tonality on several lists of pitches
(setf my-pitches2 (gen-repeat 8 '((c4 d4 f4 e4 a4 d5 c5 g5) (f5 e5 c5 a4 g4 d4 e4 c4))))

;; create a serie of tonality changes
(setf my-scales-path (tonality-series '(acoustic-scale
                                      :root '(d4 f4 e4 a4)))

(setf my-pitch-mapped2 (tonality-map my-scales-path my-pitches2))

;; it works also directly with OMN
(setf some-omn-stuff (make-omn
                      :pitch (integer-to-pitch (rnd-number 8 0 16))
                      :length (gen-tuplet 1 1 '? '? 'w '(3 7 5 6 4 11))
                      :velocity '((pp) (f) (mf) (mp))
                      :articulation '((stacc) (nil) (marc) (nil))

(setf omn-stuff-remapped (tonality-map my-scales-path some-omn-stuff))

;; it is just a very small example
;; but the tonality-map and tonality-series functions
;; have lot of more possibility, really. It is a whole universe of possibility.
;; You can have a look to the docs of both of this functions.




Link to comment
Share on other sites

Hi Stephane,

Thanks very much for the detailed example. I am looking for functionality as follows:

(tonality-map '(major :root c4) '(0 1 2 3))
=> (c4 d4 e4 f4)

(tonality-map '(natural-minor :root c4) '(0 1 2 3))
=> (c4 d4 eb4 f4)


At present TONALITY-MAP works only with absolute pitches (as I understand). I think it would be useful to apply it on integer sequence as I have outlined. Is there a way to do the above at present?



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.

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...