Euclidean Pattern Generator 1.2

EPG 1.2

Euclidean Pattern Generator 1.2

This is the final version of the Euclidean Pattern Generator as a Java desktop application. I built this version five years ago, but never quite finished it. Now I want to get it out of the way to make a fresh start with a new online Javascript Euclidean patterns app that runs in the browser.

New in this last Java version is MIDI note triggering of patterns. That means individual patterns can be started and stopped by external MIDI Note On and Note Off messages. A drawback of earlier versions was that all patterns always played. There was just one button to start or stop all of them. I wanted to control patterns individually so that I could more easily make some sort of song arrangement.

I decided that the easiest way to do this was to rely on an external MIDI sequencer to create the arrangement with, and to have it interface with the Euclidean Patterns app through MIDI notes. That saved me the work of building an internal song mode, which would never have been as user friendly and full featured as existing MIDI sequencers like Ableton Live or Cubase.

Triggering patterns with MIDI notes

To use the new feature a few steps must be taken to set things up.

First some preferences must be set. This can be done by opening the preferences panel with the button in the header bar or from the Edit menu. In the Preferences panel:

  • Tick the ‘MIDI In’ checkbox and select a MIDI input port from the dropdown next to it. Now the app can receive external MIDI.
  • Tick the ‘Trigger by MIDI note’ checkbox under the dropdown. This lets the app listen to MIDI Note On and Note Off messages.
Preferences panel

Preferences panel

That’s it for the preferences, the panel can be closed.

If you have selected a pattern in the window’s main area, or create one by double clicking on the area’s background, you’ll see a ‘MIDI In’ section in the Settings panel on the right. Here the settings for individual patterns can be changed:

  • Tick the ‘Trigger by Note On / Off’ checkbox to bring the pattern under external note control. This makes it possible to have that pattern triggered by external notes while others run continuously.
  • Use the sliders to select a MIDI channel and note pitch. The pattern will be controlled by MIDI notes on that channel with that specific pitch. This way it’s possible to control 128 different patterns on just one MIDI channel!
EPG MIDI in settings

MIDI in settings

To graphically indicate that the pattern is triggered by MIDI notes you will notice that the shape of the pattern’s pointer has changed. Instead of a triangle it’s a diamond type of shape. Initially the pointer is short, just like when a pattern is muted. When a Note On message is received it the pointer will change to full length to indicate the pattern plays, until it’s followed by a Note Off message.

pattern pointers

Pattern pointers

Using the new pattern trigger feature

I’ve tested the MIDI note control with Ableton Live.

On one MIDI track one clip holds the whole arrangement. It contains all the MIDI notes that start and stop the patterns. So the clip is in fact a six minute long song arrangement. The track sends its MIDI messages on channel 1 to the Euclidean Pattern Generator.

Ableton MIDI clip

Ableton MIDI clip

In the Euclidean Pattern Generator all patterns are set to listen to channel 1, but each pattern is triggered by a different pitch.

The rhythms that are generated by the Euclidean patterns in the app are also MIDI notes. They are sent back to Ableton Live on different MIDI channels. The MIDI channels trigger instruments on various tracks within Ableton live.

So in a way you could see the Euclidean Pattern Generator used here as an external MIDI effect for Ableton Live: It receives MIDI data, processes it and sends the resulting data back to Ableton. Much like an insert effect on a mixer would, but with MIDI data instead of audio.

Here’s the result of the test, a completed track on SoundCloud:

Download the application

The Euclidean Pattern Generator is free and open source. Download the Java JAR file here or, if you’ll run it on a Mac, an APP application bundle.

Download zipped Java jar file.
Download zipped Mac app file.

The source files are available on GitHub, where you can also find older versions by using the repository’s tags.

Euclidean Pattern Generator 1.2 repository on GitHub

As it’s written in Java, it requires the Java Runtime Environment to be installed on your computer. If you haven’t already, the app should ask you to do so. On my Macbook running OS X 1.11 (El Capitan) I had to downgrade to an older JRE version.

I hope you can run the app successfully, and if not please let me know in the comments or through the Contact page.



Yes, unfortunately. I noticed that too but didn’t know how to solve it. By now I don’t maintain the app anymore.

Andres Quintero,

Nice App!
after 2-3 minutes, the app turns off through the java sound synthesizer. the only way to make it works again is restart the app


Hello. I have trouble running this app on MacOS Mojave 10.14.3.
I installed old Java version. “”Euclidian Pattern Generator” is damaged, move app to trash” error occurring every time I try to run app. It was working on El Capitan, I upgraded and now can not use the app. Do you have any suggestions?
BTW thanks for your work. Great app.


Hi Matthew, Yes, the preference settings should be stored immediately. The ‘Trigger by MIDI Note’ probably doesn’t because the error prevents it to. I don’t develop the app anymore, so I’m sorry to say that I won’t fix any errors anymore. A new version is on its way, but still in testing phase. Irregular updates of the online version appear here:

Matthew Rubenstein,

Er, maybe it doesn’t work on Ubuntu 18.10. When I select the MIDI In and Out ports in Preferences the selections don’t persist after closing the Preferences dialog. There’s no “Save” button or similar in that dialog, maybe the selections are immediate. The “Sync to MIDI In Clock” selection persists but the “Trigger by MIDI Note” selection does not, and toggling it throws an NPE at MidiInClockSource.(

Matthew Rubenstein,

Hi. The JAR ran just fine on an up-to-date Ubuntu 18.10 notebook. Where can I find some sample projects to kickstart my experiments?


Hallo Sjoerd, Ja, ik geloof dat ik dat ook wel eens had. Één reden die ik nog weet is dat het kan gebeuren als de lengte van de noten langer is dan de tijd tot de volgende noot. Dat de volgende dus al begint voor de vorige afgelopen is, en ze elkaar overlappen. Je zou kunnen proberen de lengte korter te maken. Met de ‘Note length’ slider.

Een andere oorzaak kan zijn dat twee patronen dezelfde noten op hetzelfde kanaal spelen. Dan krijg je ook overlap.

Iets anders weet ik zo gauw niet. Het kan ook een bug in de software zijn natuurlijk.

Ik hoop dat dit iets kan helpen,


Hi Wouter,

Leuke tool dit! Ik gebruik hem om externe hardware synths aan te sturen en het nadeel wat ik ervaar is dat noten vaak blijven hangen (alsin: de release gaat zomaar volledig openstaan). Heb jij hier zelf ook last van of misschien een idee hoe ik dat kan voorkomen?



Hi Jacob, thanks! I’m sure the app will stop working at some point in the future. The problem in that it needs an older version of the Java runtime, and with OS and Java updates it will unfortunately get increasingly difficult to downgrade to older Java versions.


I am using this app (which is great btw) on a Mac with 10.13…

I didn’t have to do anything with the upgrade but I was already running it with the instructions regarding Java previously on this computer…but I hope it doesn’t stop working with future OS updates…



Very interested in trying this, but when I try to run the file, I get an alert saying ““Euclidean-Pattern-Generator” is damaged and can’t be opened. You should move it to the Trash.”

Any ideas? Thanks so much!


Hi Slatva, Unfortunately I think the app might be too old by now. I tried some time ago on a Macbook with Sierra (I think) and couldn’t downgrade Java enough anymore. I didn’t try very hard though because I’m almost finished with a new version of the app that doesn’t rely on old Java runtimes anymore. I hope to find time to have a working version early 2018.


Is there a way to get this working on mac os x 10.12?
I tried to install latest JRE and the downgraded version as well but neither didn’t work.


Hi Denis, yes, you need an internal MIDI connection to connect the MIDI input of one program to the output of another. As you have FL Studio I suppose you use a Windows computer. MIDI-Ox is a free virtual MIDI bus for Windows that has been around for years, but I read it doesn’t run on Win10 anymore. I see that there are a lot more virtual MIDI apps now, like VirtualMIDI, loopMIDI and LoopBe. I have no experience with those, but they are small utility apps that should be easy to install and use.


Do you have any suggestions on how I can run this through FL Studio? I run your app, run FL Studio, but I see no way to connect them together — adding a MidiOut in FL Studio doesn’t seem to hook up your app. Any thoughts?


Hi GsfO, it should run on Windows. Maybe with an older Java runtime though. I tried this latest version on a Windows computer, but I’m not sure anymore exactly which Windows and Java version were installed.


Love this app! Did anyone manage to get it running on windows? I wanna run it on my studio computer :)


Hé hallo Eric, dank je! Ik ben nou in Javascript een nieuwe versie aan het maken. Tot ooit weer eens bij LBi?


I got this error on os-x 10.11.6 with
Euclidean-Pattern-Generator” is damaged and can’t be opened. You should move it to the Trash.

Leave a Reply

Your email address will not be published. Required fields are marked *

11 + eleven =