< Back to IRCAM Forum

Port-list to chord-seq?

Hi to all!
How do I input a list of ports to a chord-seq?

Since I am using different soft-synths (samplers) for OM playback, I need to assign different ports to the notes in a chord-seq.
In other words, I need to be able to manipulate port-list as any other parametric list in chord-seq (lmidic, lonset,ldur,…).
The existing function set-port assigns one port per chord-seq, but I need to assign a list of ports to chord-seq.

I am using OM 6.9 on Macbook. (I didn’t have time to learn about the midi-settings in the newer OM versions. Also I had some problems with installation of newer versions, so I postpone my OM update for later.)

Please, can anybody help me here? (I am running for deadline :slight_smile:

All the best!

Aliser

Hi Aliser!

You can map the function #'set-port over the content (ie: 'inside) of the chord-seq, and a list of ports, to assign individual ports to individual chords. Check the screenshot.

Good luck with your deadline!

-anders

Skjermdump-fra-2019-02-12-14-07-36.png

Dear Anders,

Thank you very much! It functions.

(The lisp function “inside” is new to me, so all my previous attempts to solve this were futile.)

All the best!

Aliser

btw, i guess you’re aware of that you can change the port of individual chords/notes ‘manually’ from inside the chord-seq editor?

Just select “port” from the drop-down menu down at the left, select the chord(s) you wish to assign a certain port to, and change the value in the value-box at the bottom.

-anders

For the record… (just updated my local sources here), Jean recently added a method for #'set-port to allow a list of ports as second input. Ie. next release will support this directly, just using #'set-port.

Dear Anders,

Yes, I know about the possibility to change the ports individually by hand in a chord-seq, but this is not practical solution. Hence I was looking for the way to automatize the port manipulation.

The solution (patch) you have send to me can handle only single nested lists of ports. In other words it can assign ports for melodic sequences. I can’t find the way to assign different ports to different notes of an internal chord in a chord-seq. Do you, perhaps know the solution?

I still think that it would be more practical to add a new port-slot to the chord-seq, that would enable full manipulation of ports as it is the case with other parametric slots.

Thanks you once more!

All the best!

Aliser

Hi Aliser.

You can check the #'inside of the chords in the chord-seq, and for those consisting of multiple notes assign a port to each of these.

The easiest for you atm. would be to add this method:

(defmethod! set-port ((self container) (port list) &optional (copy nil))  
  (let ((obj (if copy (clone self) self)))  
    (loop for item in (inside obj)   
          for p in port do   
          (set-port item p nil))  
    obj))

and use the example i set up earlier, but with a list of ports like '(4 (3 2) 1) - ie. a sublist for each chord with multiple notes.

I still think that it would be more practical to add a new port-slot to the chord-seq, that would enable full manipulation of ports as it is the case with other parametric slots.

In your particular case yes. But each chord-instance inside a chord-seq has 21 slots, the chord-seq as such has 23 slots, not something an average user would like to be exposed for in a gui.

You could make your own subclass of the chord-seq class with an ‘lport’-button added:

(defclass* chord-seq-w-port (chord-seq)     
  ((Lport :initform '((0)) :accessor Lport :initarg :Lport :type t :documentation "ports: list or list of lists"))  
  (:icon 138)  
  (:documentation "A subclass of chord-seq display a ports-button"))

Skjermdump-fra-2019-02-13-11-34-29.png

Dear Anders,

Thank you very much for suggestions and codes! They are very helpful to me.

(My only frustration is that after 10 years of working in OM, there are still very important things that I don’t know about many features (eg. the internal ports in a chord-seq).)

All the best!

Aliser

:slight_smile: I think of this as a feature, really. OM is an advanced programming language designed to look somewhat like a musical application.

after 10 years of working in OM, there are still very important things that I don’t know

If you turn that observation around: if there’s something useful in composers workflows you start looking for, it’s probably available somewhere in OM, or if not already, not to difficult to implement.

-anders

Hi Anders and everybody interested in topic of port-inheritance for score objects in OM!

I am refreshing this topic because I tried all the versions suggested in previous mails on this topic, and none of them really works. It seems to be impossible to send a double nested list of ports (in order to assign different ports to different tones of a chord) to a chord-seq. (Chord-seq simply gets stacked and it can not be opened after the evaluation.)

I also tried to split the channels (and ports) in to a list of chord-seqs and assign new channel and port to each chord-seq, whereafter I tried to merge the list to a new chord-seq, but it seems that merger function does not pass the port data. (All the channels of a merged chord-seq are set to OM default port 0.)

Please does anybody has any solution for this?

I’m using OM12

All the best!

Dear Aliser,

Ander’s solution he proposed above works. If you need this port issue, you should use this new class chord-seq-w-port. If you have problems please do report.

Best
K

Dear Karim, I also know that the Anders’s patches should principally work, yet after the evaluation of the last chord-seq I get the error message:17%20PM When I open the last chord-seg it displays different ports in a strange way. 55%20PM and there is no playback for the notes on ports other then 0. Even more, after the evaluation, all the chord-seqs in the line display the same error. After I used playback (getting the error message) and close the chord-seqs I can not reopen it again.
Here a patch Patch 3.omp (12.8 KB) and the method for chord-seq-w-list lisp-file (the patch contains this method and I keep it in the patches folder of OM6.12 which am I using.)
It seems that set-port does not support double-nested lists in any of the solutions. (For a consequence it provokes global error message in playback of score objects. Hence I have to restart the OM to have normal playback again.)
Please, check if the patch is working on your system because I would like to know if this is a problem only in my system or this really does not work in OM!
Of course, if you have any solution for this problem, I would be very grateful for your help!

Many greetings and all the best!

Ališer

Dear Aliser,

It works for me, here is the proof:

I believe your problems comes from an outdated version of OM. Please do use the latest one (6.16) that you will find here:

Notice, if you wish to keep the old version it is ok you can install a new one and keep along the old.

Best
K

You’re right, the port is assigned per note in the chord, so the list-of-ports should be specified accordingly, ie: ((4) (3) (2 1 0) 7)) for both the approaches above:
Skjermbilde%20fra%202020-02-29%2023-16-32

Skjermbilde%20fra%202020-02-29%2023-20-12

Hope this helps.

-anders

Dear Karim, dear Anders,

Thank you for your replies! I followed your advices and now it is working (in both cases).
Many greetings and all the best!

Ališer