< Back to IRCAM Forum

Modifying OM's alterations system for 1/12 tones

I’d like to modify my version of OM to implement a different system of alterations (aka accidentals) for 1/12 tones.

Specifically, it’s a combination of Extended Helmholtz-Ellis and half-sharp/half-flat symbols.

Unfortunately, the OM accidentals font (omicron.ttf) does not contain all the required glyphs. For this reason, I will need to

  1. Add the extra glyphs (to unused unicode slots) to the relevant OM font (omicron.ttf) and resave it as a ttf file. (I have some experience modifying fonts).
  2. Remap the relevant code-char references in omicron.lisp to the new char codes.
  3. If required, edit the ‘alteration-list’ in scales.lisp (under ‘12-tone-chromatic-scale’).

Is there anything else that I need to be aware of when making these changes?

Hi socha,

Yes this should be ok. But becarefull while changing the font in omicron.ttf, you are supposed to reload the font, and therefore restart OM.
I don’t think if you replace the desired font in omicron.lisp, that you have to do anything in scales.lisp

Best
K

Thank you for your quick response, Karim.

Before modifying the font, I decided make a small change to omicron.lisp to see if this method works as expected.

I replaced (defun t-1/12 () (code-char 107)) with (defun t-1/12 () (code-char 45)). This means that the alteration symbol displayed in front of a pitch with a midicent value of 6017 (C4 plus a 1/12 tone) should be character 45 (a double sharp, ‘x’).

As you’ll see in my attachments and images, it didn’t work as expected. Would appreciate your help!

scratchpad.omp (6.7 KB)
omicron.lisp (7.7 KB)



Dear Socha,

Yes, sorry it is not that straightforward thing here.
Here is a file to be placed in either (for global change): in your init folder of your Application OpenMusic folder (Program Files (x86)), or local change, in your user folder of your workspace.

The content:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;PUT THIS FILE IN YOUR INIT FOLDER (IN YOUR APPLICATION FODLER
;;;OR IN YOUR USER FOLDER IN YOUR WORKSPACE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package :om)


;change your character code here:
(defun t-1/12 () (code-char 45))



;re-set your desired scale
(setf *12-tone-chromatic-scale*
    (make-instance 'scale
      :alteration-list
      (list  nil (t-1/12) (t-2/12) (t-3/12) (t-4/12) (t-5/12) (t-6/12) (t-7/12) (t-8/12) (t-9/12) (t-10/12) (t-11/12)
             nil (t-1/12) (t-2/12) (t-3/12) (t-4/12) (t-5/12) (t-6/12) (t-7/12) (t-8/12) (t-9/12) (t-10/12) (t-11/12)
             nil (t-1/12) (t-2/12) (t-3/12) (t-4/12) (t-5/12) nil (t-1/12)  (t-2/12) (t-3/12) (t-4/12) (t-5/12)
             #\# (t-7/12) (t-8/12) (t-9/12) (t-10/12) (t-11/12) nil (t-1/12)  (t-2/12) (t-3/12) (t-4/12) (t-5/12)
             #\# (t-7/12) (t-8/12) (t-9/12) (t-10/12) (t-11/12) nil (t-1/12)  (t-2/12) (t-3/12) (t-4/12) (t-5/12)
             #\# (t-7/12) (t-8/12) (t-9/12) (t-10/12) (t-11/12) nil (t-1/12)  (t-2/12) (t-3/12) (t-4/12) (t-5/12))
      :lines-list (list  0 0 0 0 0 0 0 0 0 0 0 0
                         1 1 1 1 1 1 1 1 1 1 1 1
                         2 2 2 2 2 2 3 3 3 3 3 3
                         3 3 3 3 3 3 4 4 4 4 4 4
                         4 4 4 4 4 4 5 5 5 5 5 5
                         5 5 5 5 5 5 6 6 6 6 6 6)
      :approx-factor 200/12))


;;;From here nothing to change, just eval

;re-initialize instance
(defmethod initialize-instance :after ((self scaleeditor) &rest l)
  (declare (ignore l))
  (setf (obj-mode (panel self)) 'note)
  (change-editor-tone (panel self) (approx2tone (approx-factor (object self))))
  (change-editor-mode (panel self) 3)
  (update-panel (panel self))
  )


;redefine all scales-list
(defparameter *scales-list* (list 
                             (list 1   *1-tone-chromatic-scale*  "1")
                             (list 1.0 *1#-tone-chromatic-scale* "1#")
                             (list 2   *current-1/2-scale* "1/2")
                             (list 3   *3-tone-chromatic-scale* "1/3")
                             (list 3.0 *3#-tone-chromatic-scale* "1/3#")
                             (list 4   *current-1/4-scale* "1/4")
                             (list 5   *5-tone-chromatic-scale* "1/5")
                             (list 5.0 *5#-tone-chromatic-scale* "1/5#")
                             (list 6   *6-tone-chromatic-scale*  "1/6")
                             (list 7   *7-tone-chromatic-scale*  "1/7")
                             (list 7.0 *7#-tone-chromatic-scale* "1/7#")
                             (list 8   *current-1/8-scale* "1/8")
                             (list 10   *10-tone-chromatic-scale* "1/10")
                             (list 12   *12-tone-chromatic-scale*  "1/12")
                             (list 14   *14-tone-chromatic-scale*  "1/14")
                             (list 16   *16-tone-chromatic-scale* "1/16")
                             ))

You just have to change your line at the begining of your file, no chnages elsewhere.

Here is the file:

Mymods.lisp (3.0 KB)

Tell me if this works for you.

Best
K

This works perfectly - thank you Karim!

One last (separate but related) thing: how do I change the behaviour of the enharmonic respelling menu?

In the attached example, I’d like to be able to respell B+ as Cd.

Dear Socha,

Unfortunately, this is not (yet) implemented. When you try to edit a “microtonal” scale, you get this in the listener:

OM > "Microtonal scales can not be modified!"

But this can be done eventually. So i can consider it and note this as a request.

Best
K

No problem - thank you for considering, Karim.