Euclidean MIDI Patterns

Euclidean MIDI patterns screenshot

Screenshot

In January I posted a Euclidean rhythm generator in Flash. Polyrhythms generated by a mathematical algorithm. I wanted the next version to be able to send MIDI, so I could use it with software like Ableton Live and hardware music machines like my Elektron Machinedrum.

Since Flash doesn’t do MIDI I spent the last few months learning Java and rebuilt the pattern generator to add MIDI capabilities.

Running the application

The Java app doesn’t run in the browser, so I can’t show it embedded on the web page like I’m used to with Flash projects. Instead you’ll have to download the Java .jar file and run it on your computer like you would any regular desktop application. For Mac users there’s a OS X .app file as well.
I haven’t looked into creating an .exe file for Windows users yet, but double clicking the .jar file should start up the program just like an .exe.

Download Java JAR file. *
Download Mac OS X APP file.
Download Java source files (Eclipse project), JAR and APP, all in one ZIP file.

* The JAR file needs the runtime for Java v1.6 (also known as Java SE 6) to be installed. On Mac this version is automatically installed with OS X 10.6 (Snow Leopard), but OS X 10.5 (Leopard) has the older Java v1.5 (or J2SE 5.0). I tested on Windows XP with Java v1.6 and that runs fine. You can test your Java version by opening Command Prompt (Windows) or Terminal (OS X) and typing “java -version” (without the quatation marks and press return after typing).

To compensate for the lack of an embedded app here’s a video with a short overview of what the Euclidean Pattern Sequencer does:

Features

The features are basic in this first version:

  • Double click anywhere in the lower panel to generate a new pattern. A new pattern is 16 steps with 4 notes by default.
  • Click a pattern’s center circle to select the pattern. A selected pattern shows a double center ring and it’s settings are displayed on the panel at the right.
  • Drag a pattern’s center circle to move the pattern. So you can visually reorganize your screen when there’s a lot of patterns.
  • All patterns with their settings and location can be saved in a file. This is a regular XML text file. The File menu has the familiar New, Open, Save and Save As options. The project tempo is saved in the file as well.
Pattern generator control bar

Pattern generator control bar

Pattern and MIDI Settings

Pattern Settings Panel

On top are the main controls: Start / stop playback, a slider and input field to set the tempo in BPM and a combobox to choose a MIDI out port. The MIDI In port is not used at the moment.

Once a pattern is selected it’s settings can be edited:

  • The Steps and Fills sliders determine the pattern. Each time one of them changes the algorithm is recalculated.
  • Rotate rotates the pattern. As you’ll note when you play with the Steps and Fills sliders, a pattern always starts with a note on the first step. To overcome this limitation you can rotate the pattern with this slider.
  • MIDI settings Channel, Pitch and Velocity are parts of the MIDI Note On and Note Off messages that the pattern sends to the MIDI port.
  • Length is the duration of the note. Once the end of a note is reached a MIDI Note Off message is sent to the MIDI port. The length of a note can be 16 steps maximum. At the moment length is measured in the internal sequencer resolution, which is 24 PPQN. Because one step is seen as a 16th note, the maximum slider value is ( 16 steps / 4 ) * 24 PPQN = 96. Not very intuitive, I know. I’ll think of something better in an update.
  • Mute, Solo and Delete do what you’d expect them to do.

Examples

Here are two pieces of music I’ve already made with the app. I tried to get them to be a bit more like finished track than just demos of layered polyrhythms.

The first one is the same setup as in the video above but with more patterns. About sixteen of them sending MIDI to sixteen tracks in Ableton Live with mainly samples being played. I recorded the MIDI patterns in Live, did some arranging and automation and exported the result as audio.

Euclidean Patterns Demo 1 by Wouter Hisschemöller

The second one are patterns sending MIDI notes to a hardware drum machine via the soundcard’s MIDI output. This is my new Machinedrum UW that plays samples as well as synthesizing drum sounds. All sounds are the Machinedrum’s sixteen tracks playing and recorded on the computer.

Euclidean Patterns Demo 2 by Wouter Hisschemöller