You are on page 1of 6

Algorithmische Komposition

Sergi Puig

VI. L-System

BASICS

To use L-System in OpenMusic, I have performed the following steps:

First, I have marked an example of what my main rules might be.

The first point was to investigate the basic tools for implementing the L-System in OpenMusic.

For this I worked with the first example:

The note that has to be tested: D.

If it matches the other note, the program automatically generates F#.

If not, something else appears.

I have used the OMIF function for this purpose:

This function has 3 inputs. (IF) for what we want to test,


(THEN) the result in case the operation is true, and (ELSE) if we
want to add a possibility in case the operation is false.

1
Algorithmische Komposition Sergi Puig

For the example, I chose the first note that acts as the first rule.

If that note matches the other note (via the OM= function), then OMIF interprets the "true" option.

In case the two notes do not match, OMIF interprets the option “false".

2
Algorithmische Komposition Sergi Puig

Next step is to construct all the rules and variables that I have prepared in the first image.

To compile and analyse different variables, OpenMusic uses the "Conditional" function.

After creating all the variables, we see how OpenMusic reacts depending on the value of the
tested note.

3
Algorithmische Komposition Sergi Puig

The last step is to join this OMIF function with the OMLOOP.

The OMLOOP is an internal function that the user must create at will through an internal patch.

I have created the following patch inside OMLOOP.

"Flat" converts lists of lists into simple or flat lists. It is used to work between the "NOTE" and
"CHORD" or "CHORD-SEQ" functions that generate different types of lists.

The important thing is the objects "listloop" and "collect".

Here is a brief explanation of what they do:

4
Algorithmische Komposition Sergi Puig

Basically the tested note goes through "listloop" and then through the whole process we have
seen before, which I have compressed into a sub-patch called "pitch-testing".

This is compiled into "collect" and then repeated and converted back into a list of values.

5
Algorithmische Komposition Sergi Puig

The output is as follows. OMLOOP I have renamed it to "l-system" with the internal sub-patch we
have seen before.

When this is played once, it matches the first variable (D=F#)

To start the L-System, we duplicate the process, feeding back to the


OMLOOP itself, and we can see the possibilities of each variable.

———————————————

You might also like