< Back to IRCAM Forum

Editing and viewing objects (classses) inside a sub-patch?

Dear community,

I hope you are all well.

I have created a series of sub-patches that should allow me to to control different stages of processes and/or its parameters. I know that, if a sub-patch has inputs, it can’t be evaluated inside itself. (If I open a sub-patch (that has inputs) any change inside the sub-patch will be calculated only at its output, but the changes will not be displayed in OM-class-objects inside a sub-patch.) In order to solve this problem I am using some kind of “remote messaging” by sending the incoming value(s) to the sub-patch via lisp functions set-value -> eval, what enables me to view and edit om-class-objects inside a sub-patch. Yet, this way is very annoying for the workflow, since I have to evaluate manually set-function each time the incoming value changes. (Sometimes there is a series of sub-patches controlling different parameters of the same process, what requires a lot of manual evaluations and so enhances the possibility of false inputs to calculations.)
Although I am aware that OM (since being based on Lisp) is not a data-flow working program, still I am wondering is there a better solution that would enable automatic reset of set-function by each change of the incoming value, or perhaps a completely different solution to this problem (enable inside evaluation of certain sub-patches, creating new classes instead of creating a control sub-patches, or…?).
In order to make my question(s) more clear, I am sending an example patch:
controling patch example.omp (460.3 KB)
So the questions are:

  • Is it yet somehow possible to edit and view class objects inside s sub-patch with inputs?
  • Is it possible to automatically trigger the evaluation of the set-function by each change of the incoming value (for the purpose of automatizing the “remote messaging”)?
  • Is there a better way to create control surfaces using class-objects?

I would appreciate answers and ideas!

All the best!

Aliser

Dear Aliser,

Maybe this can help:

You can also use global variables instead of set / eval

http://support.ircam.fr/docs/om/om6-manual/co/GlobalVariables.html

Jean

Dear Jean,

Thank you very much for your answer. The reactive mode is really something new to me and it is a very useful innovation in OM. Thank you for making it!
It can work as some kind of remote messaging between first and second-order program (patch and sub-patch). The difference between “normal” and reactive mode is that each change of the incoming data to function set will produce a corresponding change at the output of eval function (where by both functions have to be in reactive mode. (In “normal” mode after each change of the incoming value the set-function has to be re-evaluated manually before sending a new value to the eval-function.) Yet, for the first setting of the set-funtion, it has to be evaluated manually. In other words, each time I open the patch I have to (re)evaluate the set-function. (The same is with functions OM-send -> OM-receive.)
S my question is:
Is it possible to invoke (trigger) the evaluation of a set-function by opening a patch itself?
(I know it seems a little bit too demanding, but in some more complex patches I use multiple set-functions and sometimes I simply miss to (re)evaluate some of it. It is about simplifying the workflow in OM.)

The version of making “remote messaging” by using global variables is too laborious (or I don’t know how to make it simpler).

Thank you once more for your answer and this wonderful reactive innovation of OM!

All the best and stay well!

Aliser

Not really. Opening the patch doesn’t trigger anyting in the program.

You can use tricks with the reactive system (for instance trigger a sequence object that evaluates the “set-function”), but only if the patch is already open.

Screenshot 2020-03-31 at 18.08.21