< Back to IRCAM Forum

OM vs LISP function

Hello again,

Is there any practical difference between the mathematical functions prefaced with “om” and those that can be invoked with just the mathematical symbol?

For example “om*” vs “*”

I see that the LISP function can have any number of inlets added to it that will then calculate whereas the “om” function is fixed.

Additionally, what is the name of the function created when using “p” as the argument in a blank box? It creates the inlets wanting SEQ, TEXT, and MAIN. I cannot seem to find any documentation online for this one.

Best,

Austin

Dear Austin,

The difference is quite notable, and it is very important to differentiate between the two:
Let us take for instance the + operator. If you type just + you will have a compiled lisp function for arithmetic addition. The extra inputs will “apply” the addition for each elt (here numbers) as for (+ 1 2 3 4) will give 10. One important thing is that here you CANNOT use but only numbers (integers, ratios, floats) but NOT Lists!

Now the om+, is a METHOD, meaning that it has some “intelligence” [ :slight_smile: ] and will know how to deal with numbers or/and lists. For further info, select om+ and type ‘t’ as for tutorial:

Hope this helps.

Now concerning your last question, sorry didn’t got it. Can you tell me more about the blank box and the p issue?

Best
K

Aha! I knew that there had to be a reason for it being its own “OM” object. Thank you for providing the terminology that it is a ‘method.’

I have somewhat presumptuously been using lists into the om methods without a second thought - thank you for clarifying that. I will go forth appreciating the intelligence of the om methods. :wink:

Regarding the ‘p’ function, I have attached a screencap of the object in a patch. It can be called by typing a letter p in the empty (tty) box that appears on a double-click. Annotated above are the tooltips for the three default inlets. Curiously I have also found a ‘w’ object as well.

LISP-mystery objects

Ok
so regarding p and w, you can of course ignore these. I can reproduce the w thing but NOT the p. This last one must be related to a loaded library you have running in your session. Note: about these “strange things” you type and get in a tty box, they could be anything starting from existing Class “slots” or variables to really existing functions and methods. However i discourage there use if you don’t know what they are. It is not dangerous, but you can ignore them.

Best
K