Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 15 hours, 53 minutes ago

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

score-object port inheritance

Author 2 Subscribed Users |
Profile photo of aliser

Hi to Karim, Jean and others,

In order to manipulate ports and to enable inheritance of ports between two score-objects I use the Karim’s function “my-set-port”. (The port information from one to another chord-seq is inherited only through self-input/output connection which is not applicable in many cases, hence the port info is getting lost.) Yet, the function “my-set-port” at its second input does not receive a list (list of lists) of ports. In other words I can assign only one port per chord. Is there any possibility to add a new method to the function which would enable input of a list of ports?

My idea is to manipulate ports by assigning a port to each internal chord of a chord-seq and therefore I would need a “my-set-port” function that would accept also a list of ports (E.g. from the output of get-port function) .

Since this may be sensitive case, I am not daring to make it by myself.

Can anybody help me with this issue?

Many greetings and all the best!


January 14, 2019 at 12:35 #28857
Profile photo of aliser

Hi to all again!

Since I have not received any answer to my question, I’ll try this time to be more specific.
I would like to be able to manipulate ports as lists in chord-seq. Since there is no specific lport slot in a chord-seq, is there a way to do it at all?

E.g. with function “get-port” connected to self input of a chord-seq I get the list of lists of ports. How can I input a list of lists of ports to a chord-seq? (The in-built function “set-port”, or Karim’s “my-set-port” enable to set only one port per chord-seq, but not a list of lists of ports.) In other words I would like to be able to manipulate ports in the same way I can do it with other parameters/slots of the chord-seq (lmidic, lonset, ldur…etc).

Please, can anybody give me an answer?

All the best!


January 20, 2019 at 13:25 #28895
Profile photo of Jean

Hi Aliser,

What does my-set-port do different than the “normal” set-port function ?
Could you rather try to use it and add this fix patch.
It’s just a method for this function to handle containers+list.


January 20, 2019 at 16:04 #28896
Profile photo of aliser

Dear Jean,
Thank you for your answer!

Karim”s patch “my-set-port” sets a port to a container, hence it returns container (e.g. chord-seq self).
Here the function:

(defun my-set-port (container port)
(loop for item in (inside container) do (set-port item port))

The “normal” set-port modifies the input but does not return it.

As you have remarked in one of our previous Forum communications (, it would be “more logical (in order to respect the data-flow paradigm and not to produce side effects) to return a modified copy of the object.”

I’ve added the fix patch you have send to me to the patches folder, but than I can’t open my workspace receiving error message. (I am sending the screenshot of the error message attached.)

Please, can you give me a hint how to solve this problem?

Thank you once more and I wish you all the best!


  1. Screen-Shot-2019-01-20-at-9.13.32-PM


  2. Screen-Shot-2019-01-20-at-9.13.32-PM


January 20, 2019 at 21:52 #28914
Profile photo of Jean

ok — this is all related. I have changed the set-port function in OM after the previous forum discussion in order to make what we said: get it to return the object, and added an optional input in order to chose whether a copy of the object should be returned, or just the modified input object.

I think this is already included since around OM 6.12, so I guess you might be using an older version ?

January 21, 2019 at 05:23 #28917

You must be logged in to reply to this topic.

Log in now