Jump to content

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.

 

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.

 

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.

Link to comment
Share on other sites

  • opmo unfeatured this topic
  • 1 year later...

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.

 

 

Link to comment
Share on other sites

  • 2 months later...
On 10/22/2015 at 5:42 PM, opmo said:

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.

 

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.

 

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.

 

Here is the answer for my last question. Best Julio 

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy