< Back to IRCAM Forum

Iterations / variables

Hello,

I have started to use OM for my music and I have often the same issue with OMloop:
I can’t find the way to change the input of each iteration. For example :

OMloop
2 inputs : i1 (ex : 2) i2 (ex : A=(6000 6400 6500 6700 7100))
For 0 to i1
i2 -> f(A)=B -> f(B)=C -> F©=D
Output : (B C D)
Where f() is an internal patch.

For simple operations accum works fine but for lists or list of lists and more complexes fonctions it does not work for me.
I have tried to use accum with my internal patch in lambda mode but it does not work. And in all the other cases it will give me (f(i1) f(i1) f(i1)) as the output.
Do someone know if there is somme other way ?
Thank you,
Tom

Yes, but first, either explicit what you want to do clearly, and send a patch for debugging.
Your explanation is rather obscure and doesn’t help at all to know what you need and want to do.

Best

Okay sure, here is what i want to do :

I have a system of scales based on pentatonic chapes, 5 notes per scale. In this system there are 14*12 =168 different scales.
With these scales I generate melodic and harmonic sequences to use in my compositions using a rhythmic system based on claves.

I have created a patch (modulation) to find at a given scale the other scales that share 4 notes in common with the given scale.
My goal is now to create a patch that can iterate the modulation patch in order to generate sequences with a given number of modulations.
So in my previous example, A is a given scale, F(A) would be another scale of the system that shares 4 notes in common with A.
Here are the patch :

modulation-une-note-de-diff-v2.omp (338 KB)

Okay sure, here is what i want to do :

I have a system of scales based on pentatonic chapes, 5 notes per scale. In this system there are 14*12 =168 different scales.
With these scales I generate melodic and harmonic sequences to use in my compositions using a rhythmic system based on claves.

I have created a patch (modulation) to find at a given scale the other scales that share 4 notes in common with the given scale.
My goal is now to create a patch that can iterate the modulation patch in order to generate sequences with a given number of modulations.
So in my previous example, A is a given scale, F(A) would be another scale of the system that shares 4 notes in common with A.
Here are the patch :
thank you for your help

modulation-une-note-de-diff-v2.omp (338 KB)

Hi,

Ok i have a hint on what you want to but i am sorry don’t have much time patching all this up -> The patches you have sent have many dead functions (patches ?) not included. Anyhow, i can give you a hint if you want to figure it out by yourself :

In your patch “modulations-ouvertes1”, your accum is not correctly set. accum MUST have it’s function (in the third input) as a binary function, even if ti needs only on argument. (cf. screenshot). You can take a look on om tutorial-37 for more explanation about omloop’s accum.

Best
K

Screenshot_2018-08-31_21-19-33.png