• Profile picture of Karim
  • Profile picture of Jean


Groupe Public active 2 days et 12 hours ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

the size and position of the accidentals

Auteur 2 Utilisateurs souscrits |
Profile photo of JialinLiu

Dear friends,

I am curiously that where could I modify the size of the accidentals and the distance between the notehead and the accidental?
I have try to search them in the code of extra-obj but not found. Or is there some global variable to use?

The reason to do that is to use the chord-seq directly for the space notation.
Now the distance between accidentals and noteheads are relatively large, so that it can result in the collisions between the accidentals and the notes before, if the music is very fast and subtil.

Thank you for your help in advance!


Juin 27, 2018 à 22:56 #26881
Profile photo of JialinLiu

Dear all,

Problem solved!
The way to do that is:

make a box named “draw-object”, type “e” and double click the option with “xxxx…grap-note…xxxx”, you are now in the lisp file of this box.

Add a variable *alt-pos-offset* to the end of 6. line of this function, like this:

(round (- (+ realrealpos (* (- (alteration self) 1) (/ size 3))) (* (/ size 4) (delta-head self)) *alt-pos-offset*))

And then set the variable *alt-pos-offset* outside, like (setf *alt-pos-offset* -9).

The value from -9 to -6 is quite good.

Best regards,

Juin 28, 2018 à 03:00 #26886
Profile photo of Jean

Note that this will not work again at startup if the modified code remains in the sources of the distributed OM version.
In order to get code loaded at startup, copy-paste it in a new .lisp file — don’t forget the (in-package :om) at the top of it — and put this file in your workspace’s “user” folder.

  • Cette réponse a été modifiée 8 months et 3 weeks ago par Profile photo of Jean Jean.
Juin 28, 2018 à 07:29 #26891
Profile photo of JialinLiu

Thank you Jean, for the help and information!
It saves a lot of time and energy. Have a nice day!


Juin 28, 2018 à 07:38 #26893

Vous devez être connecté pour répondre à ce sujet.

Log in now