OM# Documentation

Lisp-Function Box

OM# “Lisp function” boxes are specific types of abstractions written directly in Lisp as a lambda expression. Like a patch-abstraction, they can be internal (created inside a patch editor) or global (stored as a separate file).

Lisp functions can be created with the File/New/ menu.
They are saved as .olsp files which can be used as global abstractions.

Internal Lisp functions can be created from the Box/Add Box… menu or typing lisp in the same text field you would use to type a function or class name (displayed with double-click or using the N keyboard shortcut).

Lambda expression

A lambda expression is just the way of defining a function in Common Lisp, without binding it to a specific name.

The basic syntax is :

(lambda (arg1 arg2 ...) 
   ; ... do things
   return-value)

In the Lisp function editor the usual syntax of Common Lisp applies.
Lines starting with ; are comments (ignored).

arg1, arg2, … are the “arguments” or parameters of the function. They will correspond to the inputs of the abstraction box. The return-value will be read from the box output (Lisp-function boxes can have only one output).