< Back to IRCAM Forum

Random selection of voices

Dear fellow OM users and programmers, pardon my newbie question.

I have several rhythm cells (1 measure each) made with different voices.
How can I select randomly the voices and concatenate them into a new long voice?

thanks!
Giorgio

here is my problem
in the picture you can see 6 rhythm cells, each one made with one voice object.
In my patch I’ve used CONCATENATE to concatenate the cells into one single voice.
I need to choose randomly (without repetition) the cells and then concatenate them into a single voice, but I’m having troubles finding a way to do this.

Screen-Shot-2014-03-29-at-6.47.05-PM.png

Hi Giorigio

You can use permut-random.
And by the way there’s a simpler way to concat without using n-concats (c.f attachment).

Best
K

voices2voice.omp (32.9 KB)

many thanks Karim!

Karim, the concat into OM-loop is perfect, I suppose that I must use permut-random into OM-loop as well, right?

Ah I’ve found the answer, it must be placed between x-append and OM-loop.
:slight_smile:

Yes indeed.
You can also check out posn-order. This is in the case you want to order out measures according to a determined sequence.

Best
K

Karim, a final question (pardon me), what if I want a n number of random cells?
if I have a total of 66 cells and want to select randomly just five, what is the correct procedure?

many many thanks
Giorgio

Hi Giorigio,

I think this is the most simple way to do it (c.f attachment).

Best
K

first-n-random-no-repeat.omp (1.55 KB)

Great. Thank you so much!

Kindest regards
Giorgio

Karim, if I want to use the Merger function to merge measures, instead of concatenate, what would be best to do?
I’ve tried substituting concatenate with merger inside voice2voices, but it does not work…

again thanks so much for your patience and valuable help

oh… now it works