< Back to IRCAM Forum

Octave displacement

Hello all,

I’m trying to make an OpenMusic patch to randomly octave-displace the members of the chords in a chord-seq. I tried using omloop to do this, but I was only able to octave displace chords in bulk and not the individual notes inside the chords. Attached is an image of an example:

Many thanks,
Justin

Hi Justin,

Here is some solution.

The loop will operate on each chord of the chord-seq (inside chord-seq are the chords):

And then comes the operation on the lmidics of each chord:

03

Of course, being a random octaviation, the result is not the same :slight_smile:
Here is the patch:
octave-displacement.omp (10.7 KB)

Best
K

Thank you, this works beautifully! Can you explain a little bit how “inside” and “lmidic” work, and the leftmost inlet on the abstraction “random-oct”?

Hi Justin

A fast answer:
inside is a hidden slot of score classes that returns a list of objects hierarchiccly lower than the main object:

inside chord → list of note obj
inside chord-seq ->list of chord obj
etc.

lmidic is the slot of chord (second ouput/input) of chord obj returns a list of midics

random-oct is in lambda mode therefore all empty inlrt refers to seciond and rest oinputs of mapcar.
macar applies the lambda function on each member ofthe list (secind entry of mapcar)

best
k

Great, thanks for your help!