Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 7 hours, 51 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Remote messaging in OM?

Author 4 Subscribed Users |
Profile photo of aliser


I am making a patch with lot of subpaches. The subpatches should allow me to to control different stages of calculation. If a subpatch has inputs, it can”t be evaluated inside itself. (If I open a subpatch (that has inputs) any change inside the subpatch will be calculated only at its output, but the changes will not be displayed in OM-class-objects inside a subpatch.) Is it possible in OM to have some kind of remote messaging (like Max has)? In other words: is it possible to send certain data from a patch, and then to receive it inside a subpatch without making a direct cord connection, in order to enable the evaluation of OM-classes inside a subpatch?
(Perhaps the way to enable the evaluation of classes inside a subpatch is to temporarily store the information and then to retrieve it in a subpatch? Anyway, I don’t know how to do it.)
So my basic question is how to enable evaluation of classes inside a subpatch that receives data from the outside?

Can anybody help me here please?

All the best!

December 18, 2017 at 12:46 #24676
Profile photo of anders

Hi Aliser

OM tends to suggest a purely functional paradigm while patching interactively. But, being Lisp, there are of course many ways to achieve what you prescribe. I’ve attached screenshots of two suggestions.

Currently both these approaches manipulate symbols in the :om package, and there’s no check whether you overwrite anything important…. [changed in the updated version of the Patterns library]

The ‘get/set-pval’ is from the ‘Patterns’ library ( These will establish and look up named symbols which can store any value, and be retrieved anywhere later in the same heap. I’ll update the lib to use it’s own namespace under the hood when i get some time, to make sure nothing important get’s clobbered.

Another way is to build expressions and call ‘eval on them.

  • This reply was modified 1 month ago by Profile photo of anders anders.
  • This reply was modified 4 weeks, 1 day ago by Profile photo of anders anders.
  1. Skjermdump-fra-2017-12-18-13-30-02


  2. Skjermdump-fra-2017-12-18-13-43-06


December 18, 2017 at 13:49 #24677
Profile photo of anders

There’s an updated version of ‘Patterns’, v. 0.99.3, available at which protects the names used in ‘pval’, ‘get-pval’, ‘set-pval’ from clobbering any built-in symbols.


December 18, 2017 at 15:38 #24683
Profile photo of fdsdb

Hi Anders,

Thank you for update. Patterns 0.99.3 have given me the same problem on OM 6.13 (OsX 10.8.5) and OM 6-12 (Linux Fedora 20): on loading the library the error message was “The variable |0.99.3| is unbound”.
I have resolved it modifying the utils.lisp file in sources folder. In second line of code there is not a quote before the version number. That is I have modified from

(defparameter *pattern-version* 0.99.3)


(defparameter *pattern-version* ‘0.99.3)

and library loads regularly (I have still not tested everything, but I think there should be no further errors). I hope this is useful.



December 18, 2017 at 16:37 #24687
Profile photo of aliser

Dear Anders,
Thank you very much for your answer! It is very useful library!
Also, thanks to Fabio for his intervention!

I wish you all the best!

December 18, 2017 at 21:41 #24692
Profile photo of Jean

ps. note: instead of using (eval (list setq aa 12)) in Anders’ example [which is necessary because setq is considered a ‘special’ function] you can probably just use the function SET.

set sets the value-cell of a given symbol, which probably works for what you want to do.

Another option is to use OM’s “global variables”, but it’s kind of more compicate…

December 19, 2017 at 00:38 #24694
Profile photo of anders

Fabio, thanks for the bug-report! I’ve updated the lib at the download site with the quoted version number.


December 19, 2017 at 10:34 #24695
Profile photo of fdsdb

Hi Anders,

It has been a pleasure, thank you for your work!



December 19, 2017 at 22:23 #24722

You must be logged in to reply to this topic.

Log in now