{"id":443,"date":"2010-11-10T22:48:18","date_gmt":"2010-11-10T21:48:18","guid":{"rendered":"http:\/\/www.abumarkub.net\/abublog\/?p=443"},"modified":"2014-07-08T13:13:00","modified_gmt":"2014-07-08T12:13:00","slug":"stresstesting-the-midibridge-with-chopin","status":"publish","type":"post","link":"https:\/\/abumarkub.net\/abublog\/?p=443","title":{"rendered":"Stresstesting the midibridge with Chopin"},"content":{"rendered":"<p>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.<\/p>\n<p>He used a commandline Java program to play back the midi file, you can download the code at Java Sound Resources:<\/p>\n<p><a href=\"http:\/\/www.jsresources.org\/examples\/midi_io.html\" rel=\"abumarkub midibridge java applet command line flash AIR2.0 MIDI\" title=\"Java commandline midi playback\" target=\"blank\">http:\/\/www.jsresources.org\/examples\/midi_io.html<\/a><\/p>\n<p>I have made a screencast of a stresstest with <a href=\"http:\/\/www.piano-midi.de\/chopin.htm\" rel=\"abumarkub midibridge java applet command line flash AIR2.0 MIDI\" title=\"more midi files of Chopin's music\" target=\"blank\" >Chopin<\/a>&#8216;s etude No.2 Opus 25; this etude has a lot of really fast notes, so very suitable for stresstesting.<\/p>\n<p><!--more--><\/p>\n<p><object width=\"640\" height=\"385\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/U3h4Jv6_DKo?fs=1&amp;hl=en_US\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><param name=\"allowscriptaccess\" value=\"always\"><\/param><embed src=\"http:\/\/www.youtube.com\/v\/U3h4Jv6_DKo?fs=1&amp;hl=en_US\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"640\" height=\"385\"><\/embed><\/object><\/p>\n<p>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 <a href=\"http:\/\/nerds.de\/en\/loopbe30.html\" target=\"blank\" rel=\"abumarkub midibridge java applet command line flash AIR2.0 MIDI\" title=\"abumarkub midibridge LoopBe30\">LoopBe30<\/a>.<\/p>\n<p>If you are on a Mac, you can simply add some more ports to your <a href=\"http:\/\/www.abumarkub.net\/abublog\/?page_id=399#iac\">IAC Driver<\/a>, and if you are on Linux you should have 4 virtual ports if you have enabled <a href=\"http:\/\/www.abumarkub.net\/abublog\/?page_id=399#virmidi\">VirMidi<\/a>.<\/p>\n<p>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:<\/p>\n<p><code>java MidiPlayer -d '1. Internal MIDI' -D path\/to\/chpn_op25_e2.mid<\/code><\/p>\n<p>With the option -d you specify the midi out port, and with -D you specify the midi file that you want to play.<\/p>\n<p>Schematically the setup is now as follows:<\/p>\n<p>midi file player -> virtual midi port 1 -> midibridge ->  virtual midi port 2 -> pianoteq<\/p>\n<p>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 <a href=\"http:\/\/pianoteq.com\/\" rel=\"abumarkub midibridge java applet command line flash AIR2.0 MIDI\" title=\"abumarkub midibridge Pianoteq\" target=\"_blank\">Pianoteq<\/a>.<\/p>\n<p>My computer is an almost 3 years old Quadcore Q6600 with 8GB RAM and i&#8217;m running Windows 7 64bits.<\/p>\n<p>If you do this test yourself on your computer, please let me know the results and your hardware specs.<\/p>\n<p>-> update 11\/11\/10 i did a test with the Air version on my 5 year old MacBook Pro as well:<\/p>\n<p><object width=\"480\" height=\"385\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/2ZAgV0PCulA?fs=1&amp;hl=en_US\"><\/param><param name=\"allowFullScreen\" value=\"true\"><\/param><param name=\"allowscriptaccess\" value=\"always\"><\/param><embed src=\"http:\/\/www.youtube.com\/v\/2ZAgV0PCulA?fs=1&amp;hl=en_US\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"480\" height=\"385\"><\/embed><\/object><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-443","post","type-post","status-publish","format-standard","hentry","category-java","category-midi"],"_links":{"self":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=443"}],"version-history":[{"count":1,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/443\/revisions"}],"predecessor-version":[{"id":933,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=\/wp\/v2\/posts\/443\/revisions\/933"}],"wp:attachment":[{"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abumarkub.net\/abublog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}