Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 14 hours, 45 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Numbers rotated but minus on every second number

Author 3 Subscribed Users |
Profile photo of Dagfinn Koch

Hello! I’m looking for a more elegant solution to what I’ve done here.

Intervalls are rotated:

1 2 3 4 2 3 4 1 3 4 1 2 4 1 2 3

To get a zig-zag pattern I add minus at every second number:

1 -2 3 -4 2 -3 4 -1 3 -4 1 -2 4 -1 2 -3

In Row A every rotation begins on the next note in the contour.

In Row B every rotation begins on the first note in the contour.

Best, Dagfinn

  1. Innskanning-3


  2. Innskanning-3


  1. Zwei-Gedichte-2.omp
  2. Zwei-Gedichte-2.omp
April 4, 2018 at 10:20 #26141
Profile photo of anders

Hi Dagfinn.

Using the omloop factory you can do what you want. Whether you consider that elegant is a matter of personal taste.

But situations like these are where the Patterns lib shines, setting up and combining streams of arbitrary data of arbitrary lengths. Here you’ll want to combine two streams: your data to be rotated: (1 2 3 4), and modulation of these, the ‘signums’ ‘(1 -1) to cycle through. I’ve included an example patch showing how to achieve what you want using the Patterns lib.


April 4, 2018 at 12:24 #26146
Profile photo of Karim

Dear Dagfinn,

Here is a patch using loop macro and mapcar for both options (rows…) and without any extra library.
You can also make it more compact using a red patch. But left it as is for clarity.
We may also have another option by rotating the (1 -1 1 ) intervals if you need so. This would be interesting if your have even notes


April 4, 2018 at 15:08 #26150

You must be logged in to reply to this topic.

Log in now