Categories
java midi

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:

http://www.jsresources.org/examples/midi_io.html

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.

The first thing to do was to create the necessary virtual midi ports. LoopBe1 provides only 1 virtual port, so i bought a copy of LoopBe30.

If you are on a Mac, you can simply add some more ports to your IAC Driver, and if you are on Linux you should have 4 virtual ports if you have enabled VirMidi.

After that i have set the midi input of the Flash app to the first virtual midi port, and the output to the second virtual midi port. I connected the second virtual midi port to the midi input of Pianoteq and then i started the playback of the midi file to the first virtual midi port:

java MidiPlayer -d '1. Internal MIDI' -D path/to/chpn_op25_e2.mid

With the option -d you specify the midi out port, and with -D you specify the midi file that you want to play.

Schematically the setup is now as follows:

midi file player -> virtual midi port 1 -> midibridge -> virtual midi port 2 -> pianoteq

And as you can see in the screencast, the Flash animation plays really smooth and the virtual keyboard of the Flash app keeps exactly in sync with the virtual keyboard of Pianoteq.

My computer is an almost 3 years old Quadcore Q6600 with 8GB RAM and i’m running Windows 7 64bits.

If you do this test yourself on your computer, please let me know the results and your hardware specs.

-> update 11/11/10 i did a test with the Air version on my 5 year old MacBook Pro as well:

One reply on “Stresstesting the midibridge with Chopin”

Hi Abudaan,

Thank you for credit me in your blog, my simple version could get 1-3% of CPU resource. So far did the NativeProcess give you any issue after some minutes?