Jump to content
Sign in to follow this  
opmo

How to extend the system with your own functions

Recommended Posts

The first thing you need to do is to create a source file (.opmo or .lisp).
Give the file a name eg. Custom functions.opmo.
This file will now be the source file for your functions, make sure the functions are working and that there are no errors.
Save the file into the ~/Opusmodus/Extensions folder.

 

 

ext-folder.png

 

 

The next step is to document the functions that you have created.
Go to the ~/Opusmodus/System Library folder and create a new folder for example Custom Function.


This folder is where you will place your (TextEdit) .rtfd system library documents (the best way to create a new document is to copy the contents of one of the System Library’s documents and paste it into the newly created .rtfd file).

 

Now replace the function name i.e. variables, values etc… with your own examples and documentation. Each function must have its own document. Place the documents into the ~/Opusmodus/System Library/Custom Function folder.

 

sys-folder.png

 

The last step is to create a new file that must be named contents.opmo and place it into the same folder.
The form of the contents.opmo file should be written as follows:

 

;;; Custom functions
(foo1 "here you write short note about the foo1 function")
(foo2 "here you write short note about the foo2 function")


The next time you start the application you should be able to use and see your function documents in the ’System Library’ utilities panel.

Share this post


Link to post
Share on other sites
JJR    0

Thanks, 

It worked but there is a slight problem. In the utilities panel, system functions, it says: no content entry for...

But the popup window is working.

 

Thanks again

 

Jad

Share this post


Link to post
Share on other sites

Here is an example of one of the Opusmodus contents.opmo files.

;;; Filters/Generate
(gen-filter-ambitus "Finds and removes any pitch outside the range with symbols 0 replacing the others with 1 internally and create a map.")
(gen-filter-anacrusis "Finds and preserves the end of a series of repeated items and replacing the others.")
(gen-filter-change "Finds repeated items and replacing them with (0) internally, and create a map.")
(gen-filter-remove "Returns a list of 0 and 1 internally and create a map.")

As you can see the short description of the function is in a string:

(function-name "short description in a string")

Each folder needs to have its own contents.opmo file.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×