< Back to IRCAM Forum

Generic Function?

I created some simple patches that I want to use recurrently. They make some simple operations like given in a single evaluation a max and a min value of a given list, for example. I don’t know how to write in LISP. I did this connecting different objects in subpatches with its in and outputs. In this case creating a subpatch with an input conected in a list-mi and list-max objects, both connected in a list object, connected in an output. The problem is that I have to “comand C” and “comand V” whenever I want to use them. How could I transform this subpatches in new objects with particular names and icons? Would it be possible doing like this or is it only possible to do that writing in common LISP?

Thanks!

Hi,

You can do so using the outdated / unmaintained user package interface.
Open your workspace, open the library window (Windows -> Library), double click on the “user” package name, then File->New Generic Function.
Type the name you want and it opens a patch where you can work.
Then you can call this function in your patches.

Hey Bouche, thank you very much! That was exactly what I need it!
If its not to much to ask, how could I export this patches/objects as a new library? Is it possible to do so? My concern is to save this new objects somewhere so I don’t loose all this work. If I install the next version of OM, for example, how could I access this material?

Again, thank you very much!

All the best

If you want to buid your own custom library, here’s a tutorial : http://repmus.ircam.fr/openmusic/dev-resources/userlib
If you just want to save the new functions you built, go to your workspace folder, then the “user” folder.
Your functions should be displayed as “.ome” files.
Save these files and copy them within the “user” folder of any workspace.
Should work with the last version of OM.

Cheers