< Back to IRCAM Forum

Creation libraries trivial question

Hi All,

I am updating my XXth Composition Technique library, I should have a trivial question: each time I add some new code I must restart OM to make it effective. If I discharge my library and recharge it from inside an OM open session it does not run. Is there any way to fasten this process, that is to make effective new code without to have to restart OM?

In PWGL it was possible, if I remember good, so I suppose (and hope) it could be the same on OM.

Thank You in advance, ciao

Fabio

Hi Fabio,

Well it depends om many things.
First of all, if you add a new library, you call reload it without quiting OM through the OM Packages Library->File->Refresh Library Package.

You may of course run into trouble on whatever environment you are using (PW, PWGL or OMs), if for instance you areredefining a lisp method and changing the number of arguments… You need for this to undefine it in order to change it. So the answer is not that easy.

Now if you are working on Lisp code, ie changing code in your library, it is easy to load without quiting Om:
On a lisp file, if you need to load the code just type ctrl/cmd+ y. This will load all the page. If it is just a lisp expressio ( a selection) ctrl/cmd + e

Hope this helps

Best
K
PS: By the way your question is far being trivial :slight_smile:

Dear Karim,

Thank you very much for fast reply.

I am adding some code to my library. I think I have followed your indications, but it does not resolve. I try to explain myself in a better way. I am working on new functions about Messiaen’s composition techniques. I have added all the new menu items in my FDSDB_XXth_CT.lisp file, and specifically I am adding now new code to my Serial-Post serial Music.lisp file. For example now I have just added this portion of simple code:

(om::defmethod! rhythmic-ped ((dur-list list) (repetitions number))
:initvals '(nil nil) ; an initial values list
:indoc '(“Duration series (ms.)” “Number of repetitions”) ; an string list with short docs
:icon 120 ; the icon
:doc “”

(make-instance 'voice :tree ( om::om/ (flat (om::repeat-n dur-list repetitions)) 4000)))

I have loaded the file inside the LIsp editor in OM, and updated it both saving the file and using ctl/Y (I am working on Linux).

However if I open an empty patch and try to put the new rhythmic-ped function I can not retrieve it into library menu. If I close and restart OM I have the new menu item and new running corresponding function.

I would like to know if there is some procedure to avoid to close and restart OM all the times I add a new code, if possible, just for saving some time: I am a lazy fellow…

Thank you in advance, ciao

Fabio

Hi Fabio,

Maybe you should try to reconsider evaluating also the .lisp main loading file library. Try this, it should work. However, sometimes i know it fails. But anyhow, you can still call your function/method by doubleclicking in the patch and copy/pasting directly the name of the evaluated function/method. No?

Best
K

Hi Karim,

I have done some test: it is not necessary to evaluate also main .lisp file (I have tryed, too), once I have evaluated new code it is at disposal by double click and writing the name of the function. Initially it is loaded with a wrong icon, but at successive restart it loads correct icon and figures into the menu.

So your suggestion functions, thank you again.

Ciao

Fabio

Yes Fabio,

The icon issue is normal since these depend on local/general variables. You need indeed, to reload Om in this case. But it is just temporary. ie if you build a patch with icons not reloaded, once you reload om and the lib, everything should be in place.

Best
K

Yes Karim, I confirm, thank you.

Fabio