< Back to IRCAM Forum

Processing patch names for sequencing

Hi everyone,

Is it possible to get the name of an internal patch for further processing ?

This would be useful when working with musical objects databases.

Here is a picture showing the explicit context of how I would like to get the name of an individual database entry.

patch-picture-1

Currently, I create a database by setting two separate lists : a list of names and a list of internal patches.

I then write the names to form sequences of musical objects.

When inserting, deleting or renaming the internal patches, i have to repeat the operation in the names list. I often make errors (especially when working with a large database).

Being able to get the patches names with lisp code would remove the need for the maintenance of a names list.

patch-picture-3

Thanks in advance,

Kreso

Hi Kreso,

You can obtain the name of an internal patch with one “heavy” condition:
You should put the patch in “itself” mode and evaluate it with name:
Screenshot_2020-04-22_18-19-22

But this will not let you use it as a patch.
If you send us A MWE of your patch, maybe there is an easier solution to your problem, not knowing what is there in your internal patches, and what your lisp function really do.

Best
K

Thank you Karim.

What is A MWE ?

Kreso

Here is the MWE.

I would like to simplify this :

To this :

Here enclosed is the .omp file.

Kreso

mwe.zip (2.0 KB)

(ps: the internal patches are constructors that output eventmidi-seq objects. To simplify, I removed the construction process and output chord-seq objects for better visualization.)

Hi Kreso,

MWE stands for Minimum Working Example.

Ok i am sending you a a patch with two solutions.

  1. You don’t need to encapsulate your chord-seqs into a patch in order to give them names. You can name them using cmd+i. Then retreive their names as shown im solution 1

  2. Even more simpler, you can generate indexes (1, 2 , 3 …) for your list of chord-seqs and then select them by these.

Best
K
mwe1.omp (46.1 KB)

…even simpler, using position-match…
Screenshot_2020-04-23_14-17-53

1 Like

Thank you Karim.

(1) won’t work for me because my internal patches output a customized eventmidi-seq class.
(2) indexing works well with a small number of objects. With large sets, i need to label the objects with meaningful names for easier sequence writing.

I’ll stick with my current set-up. The errors are sometimes annoying, but it works.

Many thanks for the chord-seq naming tip ! I didn’t know this was possible. I have other patches where it will be useful.

Kreso

Possible solution:

What about naming your internal customized eventmidi-seq class the same name (or “label”) of your red patch and that way you will be able to retrieve the name.

Best
K

Bingo !

I’ve set the name input right outside the red patch, and the patch itself is named with an invisible space.

I can now easily modify the names. Inserting and deleting objects is also much easier.

Many thanks Karim !

Kreso

patch