Using the midibridge made easy

Deprecated, please use Chris Wilson’s WebMIDIAPI Shim The newest version of the midibridge allows you to add midi functionality to your website with just one line of code:

midiBridge.init(function(midiEvent) { yourCoolFunction(midiEvent); });

Also, you only have to add one single minified javascript file of less then 5K to your html page:

Only native Javascript is used, so you can use it conflict-free together with any Javascript framework. Code is available at GitHub and a minified production version can be downloaded from Google Code Check the quickstart guide!

Midibridge supports multiple midi connections

Deprecated, please use Chris Wilson’s WebMIDIAPI Shim

Jonathan El-Bizri gave me the brilliant idea to add support for multiple midi connections to the midibridge. I made a very basic implementation of this functionality, see overhere: The code will be available on GitHub in the coming few days. Open the midi configuration and click ‘add midi connection’. You can add as many midi connections as you like (only limited by the amount of RAM on your computer). Once created, you can change the in- and/or outport of a midi connection. If you create 2 identical midi connections, only the one you created first will be effective. Identical midi connections are connections that have the same midi in- and outport. You can also filter types of midi events per connection. Currently i have only added ‘control change’, ‘program change’ and ‘pitch bend’, but all types can be filtered out: it is just a matter of adding more checkboxes. If a checkbox is checked, the related type of midi event will not be sent to the midi outport. Continue reading ‘Midibridge supports multiple midi connections’

Color Piano sample app on Canvas

Being heavily inspired by the beautiful Color Piano Theory experiment by Michael Deal of Mudcube, i decided to make a color piano sample client for the midi bridge. You can find it here:

I have used the canvas element and it runs fine in all modern browsers.

Click on “open midi configuration” first to connect a keyboard and a midi output, then click “close midi configuration” and play your keys: enjoy the beautiful rainbow colors while playing!

For more information and links about the colors and music see this blog.

Note for Internet Explorer 7 and 8 users: to support the Canvas element in older browsers i use Googles Explorer Canvas, and thus VML. Because VML is quite slow, you can run the app in Internet Explorer 7 and 8, but it is actually too sluggish for real time animations like this.

Javascript only version of the midibridge

Deprecated, please use Chris Wilson’s WebMIDIAPI Shim I have started to port the midibridge to a Javascript only version. Over here you can find a proof of concept: In the midi inputs dropdown menu you’ll find the option “Regular Computer Keyboard”. If you choose this option, you can play notes C4 to C5 (diatonic) with the keys A, S, D, F, G, H, J and K. It is a very simple implementation only meant to show you the idea. Please note that this version uses a slightly different version of the midibridge applet. You can *not* interchange the applets of the Actionscript and Javascript version! The way the applet is embedded has been completely rewritten and is now fully HTML5 compliant. In due course i will update the Actionscript version as well.

Interactive Animated Score, a proof of concept

Inspired by the brilliant videos of Stephen Malinowski on his YouTube channel i decided to make an interactive version of such an animated score.

Tho still in an early stage, you can see a proof of concept overhere:

I used a midi file from and exported it into a mp3 file. Then i parsed the same midifile to an XML file with a small Java program that i wrote. Flash reads in this XML file and plots the notes to stage. The position of the plotted notes is conducted by the position of the mp3 version of the song.

It is still a proof of concept: the performance has to be improved and the animation could be somewhat more spectacular.

Java and Actionscript code will be available soon.

Update 010111: i have added note info popups and a color scheme per track.

Stresstesting the midibridge with Chopin

James Yanli Lei is a flashdeveloper from Singapore who showed me a brilliant way to stresstest the midibridge: he played a midi file through the brigde.

He used a commandline Java program to play back the midi file, you can download the code at Java Sound Resources:

I have made a screencast of a stresstest with Chopin‘s etude No.2 Opus 25; this etude has a lot of really fast notes, so very suitable for stresstesting.

Continue reading ‘Stresstesting the midibridge with Chopin’

web and air version merged

Deprecated, please use Chris Wilson’s WebMIDIAPI Shim Today i have released a new version of the midibridge where the web and the Air version are part of the same package. This applies to both the Flash and the Java end. It makes the code much easier to maintain on the one hand, and on the other hand enables you to develop your project for both targets with effectively the same code. Particulary the applet has a lot of improvements and is much more stable than the earlier versions. You can start and stop the applet from the configuration panel in Flash and devices that are already in use by other processes don’t show up as available devices anymore. Also the naming of classes and packages is more consistent and intuitive. I have avoided the term “bridge” because in fact all classes together make up the bridge. I have started to document the code as well, and i will continue to do this the coming days and weeks, so please check back the repositories every now and then. Code is available at GitHub and Google Code:

air version with standalone midibridge

Deprecated, please use Chris Wilson’s WebMIDIAPI Shim I have built a command line version of the midibridge applet. It is not a socket server, it is a plain and lightweight command line program written in Java that connects to the midi system on your computer. You can communicate with the program via its standard in- and outport. The Air app launches the program on the command line as a NativeProcess and starts listening for midi events on the standard output. Requests from the Air app such as selecting another midi in- or outport or sending in AS3 generated midi events, are written to the standard input of the program. Code is available at GitHub: Or as a zip download at Google Code: The functionality is the same as the bi-directional web version with soundfont support.

bi-directional version of the midibridge with soundfonts 2.0 support

Deprecated, please Chris Wilson’s WebMIDIAPI Shim

The new version allows you to generate midi events in AS3. The applet translates the AS3 midi events in to midi messages that can be sent to your midi hardware or software.

Also the Alchemy version of Fluidsynth from Yoann Huiban has been implemented. This makes it possible to use your own soundfonts in your app so you don’t have to rely anymore on the often quite poor midi sounds that ship with your soundcard.

You can check out the new version over here:

Code has been published to GitHub, see:

Or as a zip download at Google Code:

Continue reading ‘bi-directional version of the midibridge with soundfonts 2.0 support’

installing flashplayer 10.1 debugger on linux 64bits

Player 10.1 beta 3 was released on February 23, 2010.

If you want to install the debugger version of this release on a 64 bits Linux box you have to install a current 64-bits non-debugger version first.

After that you can replace the installed by a 32 bits debugger version of this file.

This also applies if you want to install the debugger version of the current release, see note2 below.

This is how i did it on 64bits Kubuntu 9.10:

Continue reading ‘installing flashplayer 10.1 debugger on linux 64bits’