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

This entry was posted in Java, MIDI and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

107 Comments

  1. Posted May 23, 2011 at 08:59 | Permalink

    Awesome Wouter! Sounds like you still are having fun!! :-)

    See you soon!

  2. Posted May 24, 2011 at 11:26 | Permalink

    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

  3. Posted May 25, 2011 at 17:33 | Permalink

    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

  4. Posted May 25, 2011 at 17:35 | Permalink

    Congratulations!

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

    Lovely,

    Thank you very much

    Jose

  5. Posted May 25, 2011 at 17:38 | Permalink

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

  6. Cody Loyd
    Posted May 25, 2011 at 17:42 | Permalink

    this is awesome and inspiring

    thanks

  7. Benjamen Dorrell
    Posted May 25, 2011 at 18:50 | Permalink

    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?

  8. Posted May 25, 2011 at 18:51 | Permalink

    @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.

  9. Posted May 25, 2011 at 19:19 | Permalink

    Very cool! I’m looking forward to playing around with this. Thanks for sharing this!

  10. Posted May 25, 2011 at 20:29 | Permalink

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

  11. Posted May 25, 2011 at 20:30 | Permalink

    @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.

  12. Scott
    Posted May 25, 2011 at 21:06 | Permalink

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

  13. Eddy
    Posted May 25, 2011 at 22:28 | Permalink

    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!

  14. Posted May 25, 2011 at 22:29 | Permalink

    @Eddy: Sounds like you set up everything correct. Strange. Maybe run MIDI Monitor (http://www.snoize.com/MIDIMonitor) to see what MIDI data goes through the IAC Bus.

  15. Posted May 25, 2011 at 22:30 | Permalink

    this is really great !
    thank you!

  16. Joe
    Posted May 25, 2011 at 22:51 | Permalink

    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.

  17. Posted May 25, 2011 at 22:52 | Permalink

    @Joe: Sorry, no idea yet. If I find an explanation I’ll send you an email.

  18. victor fortuna
    Posted May 26, 2011 at 03:32 | Permalink

    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 !!!!

  19. Martijn Lina
    Posted May 26, 2011 at 09:58 | Permalink

    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 :-)

  20. Posted May 26, 2011 at 09:59 | Permalink

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

  21. anselm
    Posted May 26, 2011 at 10:44 | Permalink

    Hi Wouter,

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

  22. Posted May 26, 2011 at 10:45 | Permalink

    @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.

  23. john zalewski
    Posted May 26, 2011 at 11:13 | Permalink

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

  24. Posted May 26, 2011 at 11:45 | Permalink

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

    thank you

  25. stellan0r
    Posted May 26, 2011 at 15:28 | Permalink

    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 :)

  26. Posted May 26, 2011 at 15:29 | Permalink

    @StellanOr: A Max4Live plugin already exists, made by Robin Price: “Euclidean sequencer max4live version now here!”. I don’t think there are VST or AU versions yet.

  27. Posted May 26, 2011 at 16:27 | Permalink

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

  28. Shinobii
    Posted May 26, 2011 at 17:18 | Permalink

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

  29. Posted May 26, 2011 at 18:11 | Permalink

    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?

  30. Posted May 26, 2011 at 18:12 | Permalink

    @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
    :-)

  31. Enrico de Trizio
    Posted May 26, 2011 at 18:29 | Permalink

    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 ^_^

  32. Posted May 26, 2011 at 18:30 | Permalink

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

  33. Sakkosekk
    Posted May 26, 2011 at 21:39 | Permalink

    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

  34. Posted May 26, 2011 at 21:40 | Permalink

    @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.

  35. Baron_Karza
    Posted May 26, 2011 at 23:58 | Permalink

    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!!

  36. Posted May 26, 2011 at 23:59 | Permalink

    @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.

  37. Posted May 27, 2011 at 03:33 | Permalink

    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?

  38. Posted May 27, 2011 at 03:34 | Permalink

    @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.

  39. GhostofJohnToad
    Posted May 27, 2011 at 04:02 | Permalink

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

  40. Posted May 27, 2011 at 04:03 | Permalink

    @GhostofJohnToad: Cool, good to know.

  41. mjr
    Posted May 27, 2011 at 09:27 | Permalink

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

  42. Tzvika
    Posted May 27, 2011 at 09:51 | Permalink

    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 :)

  43. Posted May 27, 2011 at 09:52 | Permalink

    @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?

  44. jamesho
    Posted May 27, 2011 at 13:27 | Permalink

    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.

  45. klacke
    Posted May 27, 2011 at 13:54 | Permalink

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

  46. Scott
    Posted May 27, 2011 at 16:50 | Permalink

    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?

  47. Posted May 27, 2011 at 18:02 | Permalink

    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!

  48. khz
    Posted May 27, 2011 at 18:33 | Permalink

    realy cool \o/
    THX

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

  49. Posted May 27, 2011 at 18:34 | Permalink

    @khz: I really don’t know because I have no experience with Linux.

  50. Lorenzo
    Posted May 27, 2011 at 23:05 | Permalink

    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 :)

9 Trackbacks

  1. [...] Lots of detail and documentation on how to use the tool on Wouter’s updated blog post from earlier this week: Euclidean MIDI Patterns [...]

  2. By Music of Sound » Detritus 102 on May 25, 2011 at 21:23

    [...] euclid via cdm [...]

  3. [...] este outro vídeo aqui, que usa um gerador de escalas Euclidianas e transfere isso para o Ableton Live, pronto para executar o groove criado. Sem usar partitura ou [...]

  4. [...] video serves as an illustration for an article about the software. Read it here: http://www.hisschemoller.com/2011/euclidean-midi-patterns Like [...]

  5. [...] download in Java .jar and Mac .app format. Java source files are also available.More information: Wouter Hisschemöller No Comments Share/Save var a2a_config = a2a_config || {}; a2a_config.linkname="Wouter [...]

  6. [...] Hisschemöller released the free java app Euclidean MIDI Patterns. Its a really amazing java application that generates midi notes in realtime, or how the developer [...]

  7. [...] Hisschemöller veröffentlicht die kostenlose Java App Euclidean MIDI Patterns. Diese App erzeugt Midi Noten/Sequenzen in echtzeit. Ich finde die Idee wirklich [...]

  8. [...] Hisschemöller heeft de Euclidean Rythm Generator (ERG) uitgebracht voor Java 1.6. Met deze midi-generator kun je verrassende drum- en percussieloops [...]

  9. By music web toys part 1 | pulvereus on August 6, 2011 at 01:56

    [...] EUCLIDEAN SEQUENCER: It’s just not a web toy, but it is funny too. An explaination  can be found here. The sequencer was programmed by Wouter Hisschemöller : http://www.hisschemoller.com/2011/euclidean-midi-patterns/  [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>