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.

* 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

128 Comments

Frederic,

hey,

could you send me the latest version of your great euclidean pattern generator? (ver. 1.2?) ..would be great..as I have no IAC output and I cannot close the app and always need to force it :D
you can also email me: fredericlindemann (at) yahoo (dot) de

thanks and best
Frederic

Bubblegun,

this is amazing work, thanks so much for sharing!

i would be very thankful for a short explication on how you did the timing part, as i am building an arduino-based hardware sequencer inspired by doepfer’s dark time and roland’s system 100m.
been looking for so long now for a solution of running different clocks at the same time but didnt find it out till now. it should be possible to either run two (or more) sequencer lines polymetric or polyrhythmic. the first thing is already running but i dont know how to divide the clock to get the polyrhythms.
since i dont really understand java and those pd-patches didnt make it for me neither, maybe you could give me some hints!

looking forward to some updates on your side as well.

keep this up, very cool project

Don’t DJ Interview | King Friday,

[…] It was made using Euclidean sequencing software. I am not going to explain it all here, since there are other people out there who did it better already – most notably Godfried T. Toussaint who was the one to discover in 2005, that the Euclidean algorithm for computing the greatest common divisor of two integers also generates almost all classic world-music rhythms. He published his discovery in this short but influential paper “The Euclidean Algorithm Generates Traditional Musical Rhythms”. I used different implementations of that algorithm, but mostly this one. […]

Multi Grooves,

Brilliant work. I’ve not tried it personally but I have the same drum machine and I’m salivating at the prospect of trying this- especially if it saves me having to buy a eurorack sequencer specifically for this. Cartesian sequencer I come!

jez,

hi all,

did anyone get to the bottom of the empty grey screen? I’m running Java1.6 0n OS X 10.6.8

would love to get to the bottom of waht’s going wrong!

amazing app BTW – things like this make wish I could program!!

Ritch,

Do you know any way to unlock the input, I’d love to slave it to Ableton, would be great as a live sequencer. Is it possible?

Joshua Barker,

Would you be open to making this open-source and allowing it to be converted into an iPad app?

Nathan C,

I love your application. It is great for techno and minimal. I hope you develop this app further. And let me know if you do. Some suggestions to add to future updates would be. Add a swing slide bar. And to some how be able to sink it to a DAW. Preferably have that work in Logic for thats what I use. But anyways keep up the good work.

Cheers,
Nathan C

Moullinex Interview on They Make Music,

[…] uncommon structures. I don’t have anything recorded though, but we’ve been using this Euclidean MIDI pattern generator, that takes euclidean geometry theory to generate rhythm patterns. I think there’s a lot of […]

xoxone,

This is a great compositional tool, thanks for sharing this! +1 on the MIDI sync… I am using this with some of my students and would make things a lot easier to incorporate into their current compositions.

Olof Schröder,

This would make a awesome Android app! There is to few sequencers for android.

Anyway, thanks for great work! Will use this together with my hardware setup!

Ben,

I’ve made a set of icons in a .icns file as there doesn’t seem to be one in the OSX app. http://quaestor.us/images/icon.icns
The images are taken from (screenshots of) the app, so this should go without saying, but you know how lawyers are…
If you want to use the icons for any purpose whatsoever, you are free to do so; I hereby relinquish all rights into the public domain.
There, done :)

Johnny,

This is a fun tool. Midi clock sync would be wonderful.

Thanks for sharing.

steveo,

Has anyone found a solution to the IAC driver not showing up in the Midi out of the application? I am running mac osx 10.5. I had to install soylatte to get java 1.6 on my mac which was a bit of a hack having to edit my PATH & JAVA_PATH variables. As a consequence I am not running the mac java.app version i am executing the jar via the terminal with “java -jar MIDI Sequencer 001.jar” from the command line but it runs. Its just giving the IAC option for the midi out.

Wouter,

Hi Douglas,
Just now reading these comments. (A bit late). We already mailed and your version works great and is much neater.
It will be in the next (1.2) update.

Cheers!

Douglas,

I found some bugs in the generator 2 impl. I fixed them.

Email me if you’d like me to send you my version.

Douglas,

Just found this.. Awesome.

I’m digging into to the code now.

Couple questions
1) Which version of the generator are you using? What’s the differences between them the impls, I noticed one is using a Vector while the other is an ArrayList.
2) Did you end up fixing the bug that was mentioned in the flash version? What was the cause of that?

Wouter,

@Nigel: Thanks! Yes, sometimes notes hang. The newer 1.1 version has an ‘All Notes Off’ button for this problem.

Nigel,

Pretty cool! Got this working on Windows XP without any effort using midiyoke, and passing the midi to Nanostudio. Only comment is that it “sticks” on the note being played when it is stopped – it may not be sending midi note off commands, perhaps? Otherwise this is a cool generative tool :) Thank heaps!

Gary Lawrence,

I have been dreaming of this type of sequencer for 3 years. No version for Java 1.5?
Please.
I want to find the shortest path to a beat, not to the apple store.
I said please..
-Gary

p.s.
Please!

Brian Tuley,

This would be an awesome Java Port into Max4Live device! All sync issues would be eliminated. I’m good with Max but no good with Java. The Java objects in Max would likely make this a realizable device.

Wouter,

@Jan: Unfortunately I don’t have Cubase so I’m afraid I can’t be of any help with that application.
As you’ll have seen in the video Ableton has an option to choose the MIDI channel a track listens to. I’d expect Cubase to have that option too. Else there might be a MIDI plugin that lets you filter out unwanted MIDI data. As far as I know Cubase is a lot more advanced in MIDI options. Good luck.

jan,

thx for the lovely app.
I tried it with Cubase5 but I could not manage it to make the channelbutton work.

In your video in Ableton your signals come to separate midi channels,
in my case it sends on all midi channels, doesnt matter which one I choose .

Any help with this?
I use Loopbe30 as virtual midi cable

Thx in advance

Jan

Joseph,

I love this thing and can’t wait it’s midi input is fully functional.

piff,

This is excellent. wish i had a Mac – i’m guessing it will not run on a 33MHz Moto board using OS 7…

Kyle,

Nevermind my last comment! Lorenzo was right, restarted my computer and everything worked! This is great thank you so much!

Kyle,

in the top right corner of Ableton i see the yellow square flashing on and off in sync with the euclidian rhythm in the sequencer. however, I am not getting any sound to come from my track. the three little dots next to “Ch. 1” in my track are not showing any activity, just black. does anybody have any suggestions? i don’t know what’s wrong and feel like there is a simple solution. any help would be greatly appreciated.

markap,

I’ve managed to get it working with Ableton 8.2 by using Midi-Yoke. I have yet to see an IAC bus.

Phil Redmon,

This is excellent. Using it with LoopBe1 to run a drum sampler in Reaper. Great job, very fun!

Wouter,

@Phil Archer: Wow, cool. I just downloaded it to have a look. Very interesting, I see it has a step sequencer with pitch, velocity and duration as well. That makes for some great extra possibilities.

Also, I don’t see a start / stop button. I suppose there needs to be MIDI clock on the MIDI in to run the patterns?

And I didn’t even know you can export standalone versions from MAX/MSP.

Cheers,
Wouter

phil archer,

thanks wouter! yeah, it’s a shame max4live is so expensive.

i think the only things i added were the direction settings and an option for how many bars the dial takes to complete its cycle. the setting that plays the sequence forwards and then backwards makes some nice patterns.

i’ve updated my page so there’s a standalone app on there now which lets you route midi in and out manually and trigger the sequences using midi note on messages.

http://philarcher.net/main/downloads.html

Wouter,

@Alexander: Sorry but I can’t be more exact than that you have to make sure you have the right Java runtime (v1.6). There seem to be problems on some computers while it works on similar other computers. I don’t really know why this is.

Alexander,

Hello,
can not make it work on win xp..could You please write the exact procedure?
Cheers!

Wouter,

@SiUnit: Yes, swing, it crossed my mind. Maybe in an update. Not sure how to implement it yet.

SiUnit,

Wow! this is a great program, thanks for sharing it (and the source).

I do have a feature request: swing! I have been generating some awesome tech house but it doesn’t feel right without swing.

Thanks again, and keep up the good work :)

Shahab,

Amazing work! excellent results! only if it could send start/stop/timing data to the DAW… right now recording/jamming to this amazing sequencer is pretty much impossible…

Wouter,

@Seb: My last Windows experience is with XP. I used MIDI Yoke (http://www.midiox.com/myoke.htm) which is a software MIDI connection similar to IAC Bus on Mac OS X. It always worked well and is free. Don’t know if it’s compatible with newer versions of Windows.

Seb,

hi wouter, great tool!

have you any idea how to set up a midi connection between the euclidean sequencer and any DAW on windows 7?
i only get the microsoft midi mapper as output

Wouter,

@Michael: Hi Michael,
It would be great if you could add OSC support. I sent you an email.
Cheers.

Michael,

Hello Wouter,

I’ve been having fun with this for a few days! My setup is OSC- rather than MIDI-based so I was wondering if you’d be interested in collaborating on adding OSC support. I have started on such, but don’t see a software license on your code, and thought I should ask before getting too far.

My initial thought was just to send


/eu/pattern{index}/, iiiii

OSC messages with 1 for noteOn/0 for noteOff, channel, pitch, and velocity from the MIDI event.

Wouter,

@Phil Archer: Hi Phil, that Max4Live device looks very good. Unfortunately I don’t have Max4Live so I can’t try it. I see some very interesting additions like the possibility to play patterns in reverse. Might add that to my app as well.

phil archer,

hi wouter, great work!

i read about your sequencers on create digital music and decided to try and make a version for max for live. my efforts aren’t as elegant as yours, but it was fun having a project to get my teeth into.

if anyone wants to take a look you can download the max for live devices from my website here:

http://philarcher.net/main/downloads.html

cheers,

phil

Wouter,

@Louis R: No synchronization possible, sorry. The MIDI In box isn’t used yet. I should have probably left it out to avoid confusion.

louis r.,

amazing app.

is there any way to sync this with start/stop on a DAW?
I see there is a grey-out MIDI option… can one route an incoming IAC bus driver “into” this app to make it start and stop slaved to the DAW?

for recording sequences this would be amazing.

great work!!!

Wouter,

@Derrick: At the moment there’s no way to sync start / stop with another MIDI sequencer. Hopefully I’ll figure out how to do that in an update.

derrick,

is there any way to sync the start/stop to slave to Ableton?

great tool

Bitbit,

This would be absolutely perfect as an iPad app with core midi support. Any plans for that?

Lorenzo,

edit: a simple restart did the job.
now working !

is it possible to link the “start” command to the DAW ?
here s no happening….even with IAC driver set as MIDI remote in Ableton preferences.

Thanx :)

Wouter,

@Dan & markap & Claudio: This seems to happen more often: IAC Bus active but not showing up in the app. It works fine on both my Macs so it’s difficult to solve an error I can’t recreate myself. I hope I’ll find an answer.

Dan,

Thanks so much, this looks great, I really look forward to laying. Unfortunately for me there is no IAC option to select in the midi out tab.

I can see the IAC drivers in Ableton and I have played with the settings in Audi Midi Setup on OSX but only Real Time Sequencer and Java Sound Synthesizer is available. Please let me know if anyone has suggestions to get IAC appearing.

OSX 10.6.7

markap,

can’t get the software to communicate with an instrument loaded in Live? Have followed video instructions. The software opens on the desktop but I can’t find it in Midi In on the Ableton channel, so no midi signal is available. What am I doing wrong?

Joshua,

This is an amazing tool! Thank you so much for sharing it.

Dekkard,

I am running OSX 10.6.7
Java SE 6 on an macbook pro

I downloaded the file and nothing shows up….

my friends computer is the same and it works fine

any solutions?

this is super weird

Claudio,

I also checked with the midi monitor, and it has the iac driver as midi source, but I still don’t see the bus in the scroll menu of the app…

Claudio,

Hey Wouter,

I have 2 macs, same model, same OX, same IAC Drivers configuration, but in one I can see the port in your app and therefore use, while in the other the application doesn’t show the IAC driver. Any idea?

Wouter,

@Lorenzo: I’m afraid I don’t know. Seems like everything is set up as it should be. Any sign of incoming MIDI in Ableton (the little square at the right top)?

Lorenzo,

Same problem as Benjamen Dorrel here :)
I can see the IAC driver in Ableton, MIDI Monitor shows correct data transfers (note on, note off, on selected channels), tracks armed in Ableton 8.2.1, but no sound coming out.
Any hint ????
thanx, look like a great program :)

khz,

realy cool \o/
THX

Is it possible to bridge the latter to an alsa MIDI or a jack MIDI port (linux)?

Rich,

Great work. Worked on the first try… really cool. I’m going to see if I can take it from Reich territory more into pop drums sounds. Thanks!

Scott,

Port this to an iPhone/iPad app (touch screen integration) with TouchOSC midi output, charge a few $, and you could make a good bit of money?

klacke,

This looks amazing, I cant wait until I’ll get back home and can start to play around with it.
Thanks

jamesho,

How come I cannot find the IAC bus in my Midi out selection? Only real time and java sequencer. I turned it online in my midi setting. This is gonna be so much fun. Please help. Great work!! Thanks.

Wouter,

@Tzvika: I’m sorry, no idea why the program won’t run. Where is says “error: the following requiered field is missing from the launch file “, does it say what that required field is?

Tzvika,

Can anyone tell me what i’m doing wrong? I installed the latest Java version (JRE 6), associated the file with the javaws.exe file and it shows an error message saying “unable to launch the application” and when i click on detailes it says – error: the following requiered field is missing from the launch file

Thanks in advance for any help, and pleeeeeease make an EXE file for us windows user :)

mjr,

Thanks for making this. Please keep developing it. I’m already using the program to develop songs.

GhostofJohnToad,

Very cool tool! Just to let you know, the jar file is currently working with Linux as well, in a manner of sorts.
Thanks!

Wouter,

@Gary: Yes, I will add more features. There are some good ideas in these comments. But I can’t promise it will be the very near future. I’ll do my best.

Gary,

thanks for this, wish i knew java so i could add a bit to it, have you any plans to add any more features to this in the near future?

Wouter,

@Baron_Karza: Yes I experienced as well that it’s useful to have more steps. And the greater tempo range is easy to implement. The triplets option will be more work. I will look into that. Thanks for the suggestions.

Baron_Karza,

Great idea!

Please could we have 24 steps bars, so we could do 16th triplets?
Or at least a greater tempo range (up to 300) so we could do half bars with 16th triplets? that would be really awesome :)

Thanks a lot!!

Wouter,

@Sakkosekk: Thanks! The IAC (Inter Application Communication) Bus is used to send MIDI from one application to another. It’s part op OS X so nothing needs to be installed. I don’t remember if it’s switched on by default. Go to applications/utilities and run Audio MIDI Setup.app. Go to the MIDI tab and you’ll see all your MIDI devices as icons. One of them is IAC Bus 1. Double click the icon to open it’s properties. Check “Device is online” to activate it. Then it should appear in Live as a MIDI port. Might need a restart of Live.

Sakkosekk,

Hi and thanks for making this wonderful tool. I’ve tried to get it working with Live on a mac but I’m not sure how to make an IAC Midi bus. Could you elaborate? Thanks

Wouter,

@Enrico de Trizio: MIDI panic button, that’s an excellent idea. It’s on my list for the next version.

Enrico de Trizio,

Beautiful release, Wouter! I’m sure this will be one of my favorite production tools soon.
If I may suggest something, a “midi panic” button would be extremely helpful, I’m sure you know what I’m referring to.

Thank you very much! Enrico ^_^

Wouter,

@Benny:
1) I’m not sure I understand what the min and max velocity slider should do?
2) Yes, note names shouldn’t be too difficult.
3) Not really, and I will definitely increase that number in the next update.
Jazeker, ik spreek en schrijf ook Nederlands.
Ok, Nedelrands
:-)

Benny,

I tested your Euclidian rhythm app and have some suggestions:

1) The velocity is now static. Can you create a min and max velocity slider? This way I could use it to add some random velocity variation to the drum patterns

2) The pitch slider shows the midi note number; can you add an option to show the note name?

3) Is there a reason why step is limited to 16?

Oh, and I downloaded your source and noticed that there are some Dutch commends in there; spreekt gij dan Nedelrands?

Shinobii,

anyone else getting a gray screen upon running the .jar file? i’m on a mac snow leopard. what am i doing wrong?

kfractal,

super! i noodle around with generative midi generation and i’m interested in playing around with your pattern generator. cheers!

stellan0r,

Thank you Wouter!
This is extremely awesome. Keep up the good work – and if you happen to make a VST or AU or a Max4Live PlugIn.. people would probably buy it :)

noizefield,

great. this is really amazing :)
i´ve not tried your tool but i already love the idea and the concept.

thank you

john zalewski,

beautiful and lively app.
i really like it’s feel.

Wouter,

@Anselm: OS X 10.5.6’s standard installed Java runtime is an older version. You can find an explanation of this issue in my post above. It sounds like you may have to upgrade the Java runtime.

anselm,

Hi Wouter,

Looks great but the app does not work on my Intel Mac. Mac OS 10.5.6

Wouter,

@Martijn Lina: Hey Martijn, thanks, looking forward to hear your set tonight at Studio 80.

Martijn Lina,

Great stuff!!

It works (almost) out of the box on Ubuntu Linux 11.04 too. Just right click on the jar file, choose “Properties”, in “Permissions” check “Allow executing file as program”, set “Open With” to “OpenJDK Java 6 Runtime”, close the properties window and double click the jar file.

Keep on coding Wouter, as long as you don’t forget to make music :-)

victor fortuna,

wow!!!
i´m a drummer ,producer and a designer and this sure combine all of these ! every time i see some kind of geometric controller-generator i want one !
hey, a suggestion: could we combine-generate solid geometric forms like a geodesic to melt even more polyrhythms patterns ?
anyway,just tripping…great,great work !!!!

Joe,

Hi,
Awesome App, congrats !!

But on my mac 10.6 I can’t see the interface just a grey panel…
java is upgraded. Maybe I miss something..

Thanks in advance.

Eddy,

Hi there,

Amazing work! Watching the video gets me excited to dig in and use the app. I’m on a Mac and I’m trying to connect the Euclidean sequencer to Live 8.2 via the IAC bus, but I can’t seem to get any midi signals in Live. I have the sequencer playing and have tracks in Live setup with drumracks on them just as I see in the video, and I’ve set the Live to track the input of IAC bus in the preferences, but still nothing.

Hope I can figure it out soon, been trying to mess around with it for a half hour now to no avail.

Thanks!

Scott,

fantastic, absolutely love it, A page to share patterns would be cool?

Wouter,

@Alexandre: Quoted from Martijn Lina’s comment: “It works (almost) out of the box on Ubuntu Linux 11.04 too. Just right click on the jar file, choose “Properties”, in “Permissions” check “Allow executing file as program”, set “Open With” to “OpenJDK Java 6 Runtime”, close the properties window and double click the jar file.”
Hope that helps.

Alexandre,

Sadly, it doesn’t do anything useful on Linux. It runs, yes — but doesn’t create any MIDI ports :(

Wouter,

@Benjamen Dorrell: If you see the IAC Bus in Ableton’s MIDI preferences it must be switched on, and then the Java app should find it as well. I don’t understand how this situation can occur. Sorry. The only advice I can give is to open the Audio MIDI Setup utility and doubleclick the IAC Bus icon and check if all the settings are ok.
Good luck.

Benjamen Dorrell,

I’m not getting my IAC driver in the drop down.. I’ve had it properly set up for Ableton for a while now, but haven’t used it. hmmm?

plurgid,

Wow, thanks! This is really really neat.
I’m going to have fun playing with this for sure.

Jose Maria Marin,

Congratulations!

It’s a fantastic tool. Very clean and beautiful. Simplicity and complexity playing math games together!

Lovely,

Thank you very much

Jose

mat,

Great!
seen your work on CDM. Nice and simple interface and really lovely music!
I am very into polyrhythmic stuff too (see my stepsequencers) but not into euclidean distances. Anyway – result is potentially the same…although I use polyrhythmics to rare, but your work is inspiring!
best*mat

Sidney de Koning,

HI Wouter,

Looks and sounds realy good! I love the soundcloud tracks :-)
Onwards with the JAVA experiment, when is the Android app coming? ;-)

Take care,

Sid

Comments are closed.