This is a simple sketch to show basic behavior and to check that things work. The code described here could plausibly by ported to work with other MIDI libraries so long as they support two features: The ability to connect and listen to events from multiple MIDI devices, and callbacks that are invoked on events from any of the connected devices.įor this article go install the MidiBus library if you do not already have it. I wish I could give you some useful details as to why, but I honestly do not remember. One is proMIDI, the other is the MidiBus. There are two MIDI libraries for Processing that seem to come up quite often. There are, however, some Java MIDI libraries that have been packaged for use with Processing, which can make some things easier. Under the hood Processing is Java so any Java MIDI library should work well with Processing. Processing, all on its own, does not know anything about MIDI. These specifics are not essential to the use of MIDI, but the effect is good so it's used it here. In addition to the glitched images there were animated drawings created using a different set of distortions. The images weren't still they were run through some glitching code to generate a series of different distortions and the images were combined into videos. The idea was to take images of circa 1979 Lower Manhattan and position them in time to the music. If you have Renoise (there's a free demo version you can grab) you can use the demo track used here.Ī version of this code was created by Neurogami to drive a music video for by song by James Britt, "TR3". More than one would be ideal, but is not required to play along. I also assume you have some means of sending MIDI messages. I will assume you already know something about Processing and have it installed. Here's a video of what it looks like when all is assembled:Ī Temporary Lattice (beta v1) Getting started That repo includes the Processing code covered here, the graphics used by the sketch, and a version of a track by Neurogami, "A Temporary Lattice." Parts of it will look somewhat different from what is shown here because it kept evolving as this was written. The complete source code can be found on Neurogami's GitHub. However, all this should help in understanding the bigger picture. This article is ostensibly about writing code to drive a Processing sketch from a MIDI stream, but along the way it touches on creating a configuration class for Processing, ways to structure code for the draw loop, dynamically calling methods given some text, and organizing code when you are still largely experimenting.Īs happens when writing about code, the code evolved during the writing, so in some ways it's something like a travelogue, with some minor detours and false turns on the way to the final destination. This means you can use a music program such as Renoise or Ableton Live to control a Processing sketch both in time to music and on-the-fly. The MIDI messages can come from not just some standard MIDI keyboard, but from other applications.Įven better: Your sketch is not limited to listening to only one MIDI source. Processing is perhaps best known as a generator of sound and graphics, but your sketches cannot only create MIDI messages but listen for them as well. Note: This is the article that was originally posted over on Instructables March 2014 Scripting Processing with MIDI using Renoise
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |