<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abumarkub</title>
	<atom:link href="http://www.abumarkub.net/abublog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.abumarkub.net/abublog</link>
	<description></description>
	<lastBuildDate>Tue, 10 Aug 2010 15:04:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>installing flashplayer 10.1 debugger on linux 64bits</title>
		<link>http://www.abumarkub.net/abublog/?p=225</link>
		<comments>http://www.abumarkub.net/abublog/?p=225#comments</comments>
		<pubDate>Mon, 05 Apr 2010 17:54:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=225</guid>
		<description><![CDATA[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 libflashplayer.so by a 32 bits debugger version of this file. This [...]]]></description>
			<content:encoded><![CDATA[<p>Player 10.1 beta 3 was released on February 23, 2010. </p>
<p>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. </p>
<p>After that you can replace the installed <code>libflashplayer.so</code> by a 32 bits debugger version of this file.</p>
<p>This also applies if you want to install the debugger version of the current release, see <a href="http://www.abumarkub.net/abublog/?p=225#note2" >note2</a> below.</p>
<p>This is how i did it on 64bits Kubuntu 9.10:</p>
<p><span id="more-225"></span></p>
<p>First install the non-debugger non-free version:</p>
<p><code>sudo apt-get install flashplugin-nonfree</code></p>
<p>Check if the flashplayer is installed by typing <code>about:plugins</code> in the address bar of your browser. You should see something like:</p>
<p><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2010/04/flashplugin-kubuntu-non-debug.jpeg" alt="flashplugin-kubuntu-non-debug" title="flashplugin-kubuntu-non-debug" width="500" height="185" class="alignnone size-full wp-image-236" /></p>
<p>The installer should have made a folder <code>/usr/lib/flashplugin-installer/</code>, go into this folder by typing:</p>
<p><code>cd /usr/lib/flashplugin-installer/</code></p>
<p>In this folder you&#8217;ll find libflashplayer.so, this is the 64bits non-debug version. You are going to replace this version by the 32bits 10.1 beta release debugger version, so in order not to loose this file lets rename it:</p>
<p><code>mv libflashplayer.so libflashplayer.non-debug-64</code></p>
<p>Now download the 10.1 beta 3 version from adobe into your tmp directory:</p>
<p><code>cd /tmp</code><br />
<code>wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_p3_debug_linux_022310.tar.gz</code></p>
<p>Untar the tar ball:</p>
<p><code>tar xvzf flashplayer10_1_p3_debug_linux_022310.tar.gz</code></p>
<p>Now you should find a file libflashplayer.so in your tmp directory, this is the 32 bits debugger version. Move it to the flashplugin-installer directory. You have to be superuser to get this done:</p>
<p><code>sudo mv libflashplayer.so /usr/lib/flashplugin-installer/libflashplayer.so</code></p>
<p>Now the debugger version is installed! Type <code>about:plugins</code> in the address bar of your browser and you should see something like:</p>
<p><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2010/04/flashplugin-kubuntu-debugger.jpeg" alt="flashplugin-kubuntu-debugger" title="flashplugin-kubuntu-debugger" width="500" height="180" class="alignnone size-full wp-image-235" /></p>
<p>Note1: Firefox shows both the non-debugger version and the debugger version. Sometimes you have to scroll down to the bottom of the <code>about:plugins</code> page to see the debugger version listed.</p>
<p><a name="note2">Note2</a>: You can follow the same steps as described above if you want to install the current version of the flashplayer debugger version. You can download this version from the <a href="http://download.macromedia.com/pub/flashplayer/updaters/10/flash_player_10_linux_dev.tar.gz" onclick="javascript:pageTracker._trackPageview('/outbound/article/download.macromedia.com');" rel="abumarkub install flashplayer debugger on linux 64 bits" title="abumarkub install flashplayer debugger on linux 64 bits">adobe site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=225</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new version of midibridge supports midi out</title>
		<link>http://www.abumarkub.net/abublog/?p=190</link>
		<comments>http://www.abumarkub.net/abublog/?p=190#comments</comments>
		<pubDate>Mon, 15 Feb 2010 21:59:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[midi]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=190</guid>
		<description><![CDATA[The midi bridge has been updated and midi out has been added. This version works on all platforms. Windows: No known issues OSX: Only Safari is supported. If you are on 10.5 please install Java update 6, if you are on 10.6 install Java update 1. You don&#8217;t need Humatic mmj anymore. More info on [...]]]></description>
			<content:encoded><![CDATA[<p>The midi bridge has been updated and midi out has been added. This version works on all platforms.</p>
<p>Windows: No known issues</p>
<p>OSX: Only Safari is supported. If you are on 10.5 please install <a href="http://support.apple.com/kb/DL971" onclick="javascript:pageTracker._trackPageview('/outbound/article/support.apple.com');" target="_blank">Java update 6</a>, if you are on 10.6 install <a href="http://support.apple.com/kb/DL972" onclick="javascript:pageTracker._trackPageview('/outbound/article/support.apple.com');" target="_blank">Java update 1</a>. You don&#8217;t need Humatic mmj anymore. More info on <a href="http://www.humatic.de/htools/mmj.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.humatic.de');" target="_blank">humatic.de</a> and on <a href="http://developer.apple.com/mac/library/releasenotes/CrossPlatform/JavaSnowLeopardUpdate1LeopardUpdate6RN/ResolvedIssues/ResolvedIssues.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.apple.com');" target="_blank">apple&#8217;s developer site</a>, scroll down to Java Sound.</p>
<p>Linux: Konqueror is not supported</p>
<p>I made a sample app that you can see over here:</p>
<p><a href="http://abumarkub.net/bridge-1"  target="_blank">http://abumarkub.net/bridge-1</a></p>
<p>Code is available in several versions:</p>
<ul>
<li><a href="http://abumarkub.net/bridge-1/src/flashmidi_2010-15022010-2.rar"  target="_blank">FDT project</a></li>
<li><a href="http://abumarkub.net/bridge-fb4/srcview/index.html"  target="_blank">FlashBuilder 4 project</a></li>
<li><a href="http://abumarkub.net/bridge-1/src/flashmidi_2010_27032010_cs4"  target="_blank">Flash CS4 project</a></li>
</ul>
<p>Please report back to me if it doesn&#8217;t work on your system.</p>
<p><span id="more-190"></span></p>
<p><strong>About midi out</strong></p>
<p>Now that you can select a midi out device, the problem with latency arises. Unless you&#8217;re on a Mac. On a Mac you can just select a default midi synthesizer (Java Sound Synthesizer) and start playing with no noticeable latency.</p>
<p>If you&#8217;re on Windows or Linux, the latency of the Java Sound Synthesizer makes it almost impossible to play. On Windows you can also choose the Microsoft GS Wavetable Synth and with some soundcards you may get a decent latency (i was told the Realtek AC97 perfoms pretty well).</p>
<p>Latency is caused by both the drivers of your soundcard and the way your synthesizer works. Most modern softsynths hardly cause any latency, but even with the latest M-Audio pro cards you&#8217;ll experience latency when using the Java Sound Synthesizer or the Microsoft GS Wavetable Synth.</p>
<p>So we need to be able to connect to some real softsynths like <a href="http://www.pianoteq.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pianoteq.com');" target="_blank">Pianoteq</a> or <a href="http://www.applied-acoustics.com/products/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.applied-acoustics.com');" target="_blank">Lounge Lizard</a> and for this we need a virtual midi driver. </p>
<p>If you&#8217;re on a Mac, you&#8217;re lucky again because such a thing is already installed on your machine. It is called IAC Driver and you&#8217;ll find it if you open the Audio MIDI Setup in your Applications folder.</p>
<p>If you are on Windows you can download LoopBe1 from <a href="http://www.nerds.de" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.nerds.de');" target="_blank">nerds.de</a> and Linux users can check <a href="http://alsa.opensrc.org/index.php/VirMidi" onclick="javascript:pageTracker._trackPageview('/outbound/article/alsa.opensrc.org');" target="_blank">VirMidi</a></p>
<p>Below i&#8217;ll give a brief explanation for every driver. </p>
<p><strong>LoopBe1</strong></p>
<p>Download it from <a href="http://nerds.de/en/download.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/nerds.de');" target="_blank">nerds.de</a> and run the installer. After the installation has finished LoopBe is up and running and will automatically start with Windows (if you don&#8217;t want this, run msconfig and remove the LoopBe startup service). </p>
<p>Now if you refresh or load my sample <a href="http://abumarkub.net/bridge-1/"  target="_blank">application</a> you should see LoopBe Internal MIDI appearing in both the midi inputs drop-down box as well as the midi outputs drop-down box. Choose your favorite keyboard for input device and LoopBe Internal MIDI for output.</p>
<p>Now open your favorite softsynth and go to the midi settings and set your synth&#8217;s midi input to LoopBe Internal MIDI. Here is a screendump of what this looks like in Pianteq:</p>
<p><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2010/02/Pianoteq-LoopBe-Abumarkub-midibridge.jpg" alt="Pianoteq-LoopBe-Abumarkub-midibridge" title="Pianoteq-LoopBe-Abumarkub-midibridge" width="597" height="680" class="alignnone size-full wp-image-193" /></p>
<p>You should now be able to play your softsynth while midi data is passing thru the midibridge, and dependent on your soundcard&#8217;s driver, with very low latency.</p>
<p>Please notice that LoopBe1 is only free for non-commercial use. For commercial use you need to acquire a license after a 30-day evolution period. But for only € 11,90 inc VAT it&#8217;s really a bargain. Check <a href="http://nerds.de/en/order.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/nerds.de');" target="_blank">here</a>.</p>
<p><strong>IAC</strong></p>
<p>Open Audio MIDI Setup from your Applications folder. You should see an icon named IAC Driver. IAC stands for Inter-Application Communication, and that is exactly what it does. </p>
<p>If the icon is greyed out double click it and in the popup that appears check the box “Device is online”. See screenshot:</p>
<p><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2010/02/Picture-4.png" alt="IAC-Driver-Abumarkub-midibridge" title="IAC-Driver-Abumarkub-midibridge" width="504" height="534" class="alignnone size-full wp-image-194" /></p>
<p>Don&#8217;t worry if looks a little different on your machine. You should see at least 1 port in the “Ports” part of the screen. If not, simply click the plus sign to add a port.</p>
<p>Now close this popup and the Audio MIDI Setup and refresh or load my sample <a href="http://abumarkub.net/bridge-1/"  target="_blank">application</a>. You should see LoopBe Internal MIDI appearing in both the midi inputs drop-down box and the midi outputs drop-down box. </p>
<p>Choose your favorite keyboard for input device and LoopBe Internal MIDI for output. Open your favorite softsynth and go to the midi settings and set your synth&#8217;s midi input to LoopBe  Internal MIDI. Here is a screendump of what this looks like in Lounge Lizard:</p>
<p><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2010/02/Picture-7.png" alt="Lounge-Lizard-IAC-input-Abumarkub-midibridge" title="Lounge-Lizard-IAC-input-Abumarkub-midibridge" width="866" height="482" class="alignnone size-full wp-image-195" /></p>
<p>Now you can play your softsynth while midi data is passing thru the midibridge.</p>
<p><strong>VirMidi</strong></p>
<p>I haven&#8217;t had the time to figure this out, i&#8217;ll get back to you as soon as I have it up and running. Pianoteq is also available for both 32 and 64 bits Linux, so if you want to try it yourself you can download a demo version <a href="http://pianoteq.com/try" onclick="javascript:pageTracker._trackPageview('/outbound/article/pianoteq.com');" target="_blank">over here</a>.</p>
<p><strong>Onwards</strong></p>
<p>Unfortunately the bridge won&#8217;t work on Konqueror until this browser supports Live Connect; communication between Java applets and Javascript and Flash applets and Javascript.</p>
<p>On OSX, browsers that rely on the Java Embedding Plugin such as Firefox, Camino and Seamonkey are not supported either. This is because of something really weird. In Firefox an applet gets loaded twice and therefor (or for some other reason) JSObject.getWindow(this); returns &#8216;null&#8217; so the connection between Java and Javascript is cut off.</p>
<p>I am gonna look into this asap but should you have and suggestions please mail me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=190</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>animated gif generator</title>
		<link>http://www.abumarkub.net/abublog/?p=168</link>
		<comments>http://www.abumarkub.net/abublog/?p=168#comments</comments>
		<pubDate>Sun, 31 May 2009 23:37:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=168</guid>
		<description><![CDATA[Thibault Imbert has created numerous amazing AS3 libraries! Last year i used his AS3 PDF generation library, and now i used his AS3 GIF Animation Encoding Library for an online gif89a generator. It is built for player 10 so you can load local files directly in to the player, you can also capture images from [...]]]></description>
			<content:encoded><![CDATA[<p>Thibault Imbert has created numerous amazing AS3 libraries! Last year i used his <a href="http://www.bytearray.org/?p=107" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.bytearray.org');">AS3 PDF generation library</a>, and now i used his <a href="http://www.bytearray.org/?p=93" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.bytearray.org');">AS3 GIF Animation Encoding Library</a> for an online gif89a generator.</p>
<p>It is built for player 10 so you can load local files directly in to the player, you can also capture images from your webcam. You can find it here:</p>
<p><a href="http://abumarkub.net/animatedgifmaker/" >http://abumarkub.net/animatedgifmaker/</a></p>
<p><a href="http://abumarkub.net/animatedgifmaker/" ><img src="http://www.abumarkub.net/abublog/wp-content/uploads/2009/06/gif89amaker2_small.jpg" alt="gif89a_maker" title="gif89amaker2_small" width="512" height="401" class="alignnone size-full wp-image-182" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=168</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>midi bridge support for osx and vista 64bit</title>
		<link>http://www.abumarkub.net/abublog/?p=97</link>
		<comments>http://www.abumarkub.net/abublog/?p=97#comments</comments>
		<pubDate>Wed, 11 Mar 2009 00:26:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[midi]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=97</guid>
		<description><![CDATA[A new version of the bridge has been released, check here Mac OSX and Vista 64bit are now supported, check the example! For OSX Please download mmj first and place mmj.jar and libmmj.jnilib in your /Library/Java/Extensions directory. Because the applet is loading the mmj library from your local system, the applet has to be signed [...]]]></description>
			<content:encoded><![CDATA[<p><font color='#ff0000'><strong>A new version of the bridge has been released, check <a href="http://www.abumarkub.net/abublog/?p=190" >here</a></strong></font></p>
<p>Mac OSX and Vista 64bit are now supported, check the <a href="http://www.abumarkub.net/midi/fp10/"  target="blank">example</a>!</p>
<p><strong>For OSX</strong><br />
Please download <a href="http://www.humatic.de/htools/mmj.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.humatic.de');">mmj</a> first and place mmj.jar and libmmj.jnilib in your /Library/Java/Extensions directory.</p>
<p>Because the applet is loading the mmj library from your local system, the applet has to be signed and you have to trust it before it can run.</p>
<p><strong>For Vista 64bit</strong><br />
Please go to Control Panel -&gt; View 32-bit Control Panel Items -&gt; Java -&gt; Advanced -&gt; Java Plug-in and deselect &#8216;Enable the next-generation Java Plug-in&#8217;.</p>
<p><strong>In general</strong><br />
If the midi bridge loses its connection to your midi device, or the bridge isn&#8217;t responding at all anymore, please close your browser(s) completely. That means: close all running browser windows of all browsers that have been running the applet. This is to ensure that you kill the Java Plug-in process completely.</p>
<p>All midi bridge examples are updated and your platform should be detected automatically, so go ahead and test the bridge on your machine with the links in <a href="http://www.abumarkub.net/abublog/?p=9"  target="_self">this post</a> or in <a href="http://www.abumarkub.net/abublog/?p=40"  target="_self">this post</a>. </p>
<p>Please let me <a href="mailto:abudaan@gmail.com">know</a> if it doesn&#8217;t work on your system. </p>
<p>You can find the code <a href="http://code.google.com/p/miditoflash/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="blank">overhere</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=97</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>midi bridge code updated</title>
		<link>http://www.abumarkub.net/abublog/?p=40</link>
		<comments>http://www.abumarkub.net/abublog/?p=40#comments</comments>
		<pubDate>Sun, 15 Feb 2009 22:43:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[midi]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=40</guid>
		<description><![CDATA[A new version of the bridge has been released, check here As developers started to use the midi-to-flash bridge i realized that the organization of code was not flexible enough. So i rearranged the code rather drastically. The code is now split up into two pieces: the midi bridge and the midi client. The midi [...]]]></description>
			<content:encoded><![CDATA[<p><font color='#ff0000'><strong>A new version of the bridge has been released, check <a href="http://www.abumarkub.net/abublog/?p=190" >here</a></strong></font></p>
<p>As developers started to use the midi-to-flash bridge i realized that the organization of code was not flexible enough. So i rearranged the code rather drastically. The <a href="http://code.google.com/p/miditoflash/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="_blank">code</a> is now split up into two pieces: the midi bridge and the midi client. The midi bridge comprises 3 parts: </p>
<ul>
<li>a Java applet that receives the midi data from your system</li>
<li>some JavaScript code that enables 2-way communication between Java and Flash</li>
<li>a small Flash application that broadcasts the midi data to other Flash applications thru a LocalConnection</li>
</ul>
<p>See the generated <a href="http://abumarkub.net/midibridge/asdoc/"  target="_blank">asdocs</a>.</p>
<p>This is a <a href="http://abumarkub.net/midibridge/bridge2.html?bridgeId=device1&#038;deviceId=0"  target="_blank">sample</a> of a midi bridge. You can set the bridge id and select the midi device that you want to connect to the midi bridge. These parameters can also be set as flashvars in the containing html file.</p>
<p>You can run multiple instances of a midi bridge at the same time, and you can connect each instance to different midi device.</p>
<p>Because a midi client receives midi data thru a LocalConnection it can be any type of Flash application: a swf running in a browser or in a standalone player, a projector or an AIR application. </p>
<p><span id="more-40"></span></p>
<p>For a midi client to receive midi data from a midi bridge, you need to create an instance of the MidiClient class in your code and pass it a midi bridge id. If a bridge with the same bridge id is running, this will get your client automatically connected to desired bridge at runtime:<span style="text-align:left;font-size:small"><code class="prettyprint"><br />
var bridgeId:String = stage.loaderInfo.parameters["midiBridgeId"];<br />
bridgeId = bridgeId == null ? "_device1" : bridgeId;<br />
_midiClient = new MidiClient(bridgeId,false);<br />
_midiClient.addEventListener(MidiDataEvent.CONNECTED, handleMidiDataEvent);<br />
_midiClient.addEventListener(MidiDataEvent.MIDI_DATA, handleMidiDataEvent);</code></span></p>
<p>Subsequently you have to implement event listeners and actually do something with the received midi data. In the package you&#8217;ll find some handy and efficient midi data parse utilities; these might help you kick-start writing your own code.</p>
<p>You can connect as many midi clients to a midi bridge as you like, and you can disconnect and reconnect them at any time. You can also set up a single client to receive midi data from several bridges, or let your client connect to different midi bridges successively.</p>
<p>This can be very handy if you create an installation with multiple monitors, or if your application has to run on a huge plasma screen. </p>
<p>You can find a sample of a very simple midi client <a href="http://abumarkub.net/midibridge/client2.html?bridgeId=device1"  target="_blank">overhere</a>, go ahead and open and close as many clients as you like. Don&#8217;t forget to start up the <a href="http://abumarkub.net/midibridge/bridge2.html?bridgeId=device1&#038;deviceId=0"  target="_blank">midi bridge</a> first.</p>
<p><strong>multi bridge scenario&#8217;s</strong></p>
<p>It is advisable that you have 2 midi devices attached to your computer to test the multi bridge scenario. This is how you set it up:</p>
<ul>
<li>open a <a href="http://abumarkub.net/midibridge/bridge2.html"  target="_blank">bridge</a>, give it an id and press &#8216;ok&#8217;</li>
<li>open another <a href="http://abumarkub.net/midibridge/bridge2.html"  target="_blank">bridge</a>, give it a different id and press &#8216;ok&#8217;</li>
<li>choose a midi device that you wish to connect to this bridge, play some notes to check connectivity</li>
<li>switch to the other bridge and select a different midi device, play some notes or move some controllers to check connectivity</li>
<li>open a <a href="http://abumarkub.net/midibridge/client2.html"  target="_blank">client</a> and enter either of the 2 bridge ids you have used above and press &#8216;ok&#8217;</li>
<li>play some notes on the midi device that is connected to the chosen bridge and you&#8217;ll see the data appearing in the client</li>
<li>repeat last 2 steps for another client and connect this one to the other bridge</li>
<li>connect as many clients as you like to either of the 2 bridges</li>
</ul>
<p>Obviously, you can make set ups with more than 2 bridges as well.</p>
<p><br/></p>
<p>
<br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>midi-to-flash code published in google code</title>
		<link>http://www.abumarkub.net/abublog/?p=15</link>
		<comments>http://www.abumarkub.net/abublog/?p=15#comments</comments>
		<pubDate>Sat, 25 Oct 2008 21:31:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[dynamic sound generation]]></category>
		<category><![CDATA[flashplayer 10]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[midi]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=15</guid>
		<description><![CDATA[A new version of the bridge has been released, check here Recently i have been asked several times for the code of the midi-to-flash bridge. It has always been my plan to publish the code but i could not find the time to do it. Finally today i have uploaded the code to Google Code, [...]]]></description>
			<content:encoded><![CDATA[<p><font color='#ff0000'><strong>A new version of the bridge has been released, check <a href="http://www.abumarkub.net/abublog/?p=190" >here</a></strong></font></p>
<p>Recently i have been asked several times for the code of the midi-to-flash bridge. It has always been my plan to publish the code but i could not find the time to do it. Finally today i have uploaded the code to Google Code, you can find the repository over here:</p>
<p><a href="http://code.google.com/p/miditoflash/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="_blank">http://code.google.com/p/miditoflash/</a></p>
<p>It is published under new BSD license. Though this is a non-reciprocal license, it would be nice if you update me about your improvements.</p>
<p>See the generated <a href="http://abumarkub.net/midibridge/asdoc/"  target="_blank">asdocs</a>.</p>
<p>You can compile the code with <a href="http://www.adobe.com/products/flex/flexdownloads/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">Flex SDK</a> and with Adobe&#8217;s Flash IDE. Read more about compiling with the Flash IDE <a href="http://code.google.com/p/miditoflash/wiki/FlashIDE" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="blank">here</a>.</p>
<p>The code of the Chord Finder app uses the net.abumarkub.harmony package and has only been uploaded partly; currently i am busy implementing more chords and modi. In the code chords and modi are represented as 12 bits numbers to get the smallest possible response time when you play a chord on your keyboard. I&#8217;ll go into further detail in a future post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>audio/video sequencer</title>
		<link>http://www.abumarkub.net/abublog/?p=13</link>
		<comments>http://www.abumarkub.net/abublog/?p=13#comments</comments>
		<pubDate>Tue, 19 Aug 2008 00:22:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[dynamic sound generation]]></category>
		<category><![CDATA[popforge]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[sequencer]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=13</guid>
		<description><![CDATA[Pipslab is a very successful collective of multimedia artists and through Tim Hudson of Flashclub they have asked me to port a kind of audio/video sequencer from Director to Flash. Though Director has a rather steady internal timer, on older processors you&#8217;ll notice the same kind of sluggishness as the ENTER_FRAME event in Flash. So [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.myspace.com/pipslab" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.myspace.com');" target="_blank">Pipslab</a> is a very successful collective of multimedia artists and through Tim Hudson of <a href="http://www.flashclub.nl" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.flashclub.nl');">Flashclub</a> they have asked me to port a kind of audio/video sequencer from Director to Flash. Though Director has a rather steady internal timer, on older processors you&#8217;ll notice the same kind of sluggishness as the ENTER_FRAME event in Flash. So the challenge was to create a steady clock in Flash to sync both audio and video to.</p>
<p><span id="more-13"></span></p>
<p>I started by looking into the SOUND_COMPLETE event. When using a loop of 2048 or less samples, the exactness of this event varies roughly between 25 and 100 ms whereas it should be a steady 46 ms (1000/44100 * 2048 ≈ 46). So i used an old trick by adding some ms of silence in front of the actual sound. Whenever a SOUND_COMPLETE occurs i calculate the deviation compared to theoretical (multiple of) 46 ms and i compensate this by starting the sound earlier or later dependent on the offset:</p>
<p><code>sound.play(offset,1);</code></p>
<p>Although this works pretty well in the standalone player, in a browser on slower processors the beat is very unstable and i experienced hiccups and fall outs. So i started studying the <a href="http://code.google.com/p/popforge/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="_blank">Popforge library</a> renowned for its steady beats.</p>
<p>I took me quite some time to grasp how it actually works but i became gradually clear to me after i had made a visualization of the principle. Below you can create a pattern and by clicking on start the sequencer starts.</p>
<p>Next, the red bars that appear demark the audio buffers and the green bars set apart the beats. If you increase the tempo you&#8217;ll notice that more beats fit in a single buffer.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="720" height="170" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="FlashVars" value="contentId=f9ed3e66a9a0cb69f7533c4373bb2ff0" /><param name="src" value="http://www.abumarkub.net/seq/swf/seq_test.swf" /><embed type="application/x-shockwave-flash" width="720" height="170" src="http://www.abumarkub.net/seq/swf/seq_test.swf" flashvars="contentId=f9ed3e66a9a0cb69f7533c4373bb2ff0" wmode="window"></embed></object></p>
<p>As you can see, sometimes a single sample is split up and spread over 2 buffers. Because the buffers are seamlessly glued after each other you don&#8217;t hear the joints.</p>
<p>The indicator on top of the pattern-edit grid is not very precise, and if you increase the tempo it gets even lesser accurate. <a href="http://void.andre-michelle.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/void.andre-michelle.com');">André Michelle</a> made an online version of the <a href="http://lab.andre-michelle.com/fl-909" onclick="javascript:pageTracker._trackPageview('/outbound/article/lab.andre-michelle.com');">Roland TR909</a> and if you look closely at this implementation of Popforge, you&#8217;ll notice that the leds above the pattern buttons aren&#8217;t very exactly either. But as the emphasis of the Popforge library lies on sound, this is perfectly valid.</p>
<p>However, in my case i had to deal with a video aspect as well. After some fruitless experiments i came up with a rather quick and dirty trick: i adapted the tempo as one beat to match exactly with the length of a buffer.</p>
<p>Downside of course is that i am tied to a very limited set of tempos. Buffersize 8192 (4 times 2048) boils down to 1000/(8192*1000/44100) * 60/4 ≈ 81 bpm. In the example above i use a buffer of 12288 bytes (6 times 2048) so a tempo of approx 54 bpm will align one beat to one buffer.</p>
<p>Anyway the <a href="http://abumarkub.net/onitsuka"  target="blank">result</a> feels rather synced and steady and it performs way better than the version in Director. I am still left with an unanswered question though: the engine that glues the subsequent buffers after each other is the SOUND_COMPLETE event that is fired by a dedicated sync sound.</p>
<p>This sync sound is just an array of &#8216;silent bytes&#8217; with a length that matches the buffersize (minus one). As soon as the application is initialized the sync sound starts silently playing. Whenever the SOUND_COMPLETE event arises the AudioBuffer class checks if any sample data is prepared in the buffer. If so, the data is played back and you actually hear something. In any case the sync sounds starts playing again, resulting in an endless sync stream.</p>
<p>Because the SOUND_COMPLETE event isn&#8217;t very steady, even at higher framerates (80 &#8211; 120 fps), i would expect to hear gaps and pops because a deviation of say 20 ms of the theoretical interval between 2 subsequent SOUND_COMPLETE events should be audible, and this deviation is not compensated somehow or other in the Popforge library.</p>
<p>In theory the first method i tried should give the same result as the Popforge library, if even better, because of the compensation of the deviation (the offset, see above), but it doesn&#8217;t.</p>
<p>However, if i test the swf above on a rather old processor (AMD Turion 64 ML28 1,6 GHz), Popforge starts stammering at and above 66 bpm, whereas the <a href="http://lab.andre-michelle.com/fl-909" onclick="javascript:pageTracker._trackPageview('/outbound/article/lab.andre-michelle.com');" target="_blank">FL909</a> works like a charm at any tempo.</p>
<p>Since drawing the waveform is rather CPU intensive, i guess it causes the ENTER_FRAME event to become such instable that the SOUND_COMPLETE event can&#8217;t be taken care of in time, resulting in gaps between the sample slices. When using a buffer of 12288 bytes, the framerate must be at least 1000/(12288 * 1000/44100) ≈ 3,58, say 4 fps, and apparently with heavy drawing duty, the flashplayer sometimes drops below.</p>
<p>I have tried to compensate this with the offset trick described above, but until now without success. Still busting my brains on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>midi in flash: a proof of concept</title>
		<link>http://www.abumarkub.net/abublog/?p=9</link>
		<comments>http://www.abumarkub.net/abublog/?p=9#comments</comments>
		<pubDate>Wed, 23 Jul 2008 23:38:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[dynamic sound generation]]></category>
		<category><![CDATA[flashplayer 10]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[midi]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.abumarkub.net/abublog/?p=9</guid>
		<description><![CDATA[I have made a flash movie that is able to receive midi data from a midi device that is connected to your computer. This is accomplished by using a Java applet. The Java applet is receiving the midi data and passes it on to JavaScript and JavaScript sends it to flash via the ExternalInterface. A [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I have made a flash movie that is able to receive midi data from a midi device that is connected to your computer. This is accomplished by using a Java applet. The Java applet is receiving the midi data and passes it on to JavaScript and JavaScript sends it to flash via the ExternalInterface.</p>
<p><font color='#ff0000'><strong>A new version of the bridge has been released, check <a href="http://www.abumarkub.net/abublog/?p=190" >here</a></strong></font></p>
<p style="text-align: justify;">You can find a proof of concept <a href="http://abumarkub.net/midi/sample/"  target="blank">overhere</a>. You will need to have <a href="http://labs.adobe.com/downloads/flashplayer10.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="blank">flashplayer 10</a> installed because i use the dynamic sound generation possibilities of player 10 for producing sounds when midi note-on data is received.</p>
<p style="text-align: justify;"><span style="text-decoration: line-through;">If you don&#8217;t want the hassle of installing flashplayer 10 you can find a flashplayer 9 version <a href="http://www.abumarkub.net/midi/fp9"  target="blank">overhere</a>. You won&#8217;t be able to enjoy the beautiful warm sinus tone generated by flash but you can see flash responding to your midi keyboard.</span> The Release version of Flash Player 10 is now available from the <a href="http://www.adobe.com/go/getflashplayer" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">Flash Player Download Center</a>. However, the flashplayer 9 version is still <a href="http://abumarkub.net/midi/fp9"  target="_blank">online</a>.</p>
<p style="text-align: justify;"><span id="more-9"></span></p>
<p style="text-align: justify;"><strong>connecting flash to a midi device</strong></p>
<p style="text-align: justify;">When the page has fully loaded, flash asks the Java-applet to investigate your midi setup and displays the result in the yellow part on the top right corner. If a midi in port is detected and available, it will automatically be connected to the flash interface. If not, you can click on one of the other detected devices: you need to look for a midi in port. If Java was not able to detect the kind of midi device (midi in, midi out, synth, sequencer), it will be displayed as &#8216;device&#8217;. A red bullet indicates a successful connection.</p>
<p style="text-align: justify;">So now if you press a key or move a slider on your midi keyboard you should see this represented in the little pink square on the lower right corner. If you play 3 or more notes simultaneously, the purple square on the upper left corner will try to find out what cord you are playing (see below).</p>
<p style="text-align: justify;"><strong>the keyboard and velocity sensitivity<br />
</strong></p>
<p style="text-align: justify;">At the center bottom, the matching piano keys will light up on the software keyboard while playing your hardware keyboard. You can also play on this keyboard by clicking the keys with your mouse, but the software keyboard isn&#8217;t (yet) velocity sensitive, as opposed to your hardware keyboard. That is: if you have a velocity sensitive keyboard connected.</p>
<p style="text-align: justify;">Because velocity sensitivity of hardware keyboards is supported, i divide the volume of the sound channel by 10. Otherwise the sound might be distorted when you play 2 notes at maximal velocity. By dividing it by 10 this could still happen if you play more than 10 notes at maximum velocity but i assume that you have 10 fingers and won&#8217;t use you forearm to play clusters <img src='http://www.abumarkub.net/abublog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: justify;">I have to find another solution though once sustain pedal support is implemented.</p>
<p style="text-align: justify;"><strong>pitch bend</strong></p>
<p style="text-align: justify;">In the lower left corner you can set the amount of bend that is used by your pitch bend wheel. You can either pick an interval with the drop down box (from a minor 2nd up to an octave), or choose any value in between using the slider.</p>
<p style="text-align: justify;"><strong>the &#8216;color organ&#8217;</strong></p>
<p style="text-align: justify;">I have also implemented a very rudimentary form of a color organ which you&#8217;ll find in the black square above the keyboard. You can assign midi controllers or notes to the RGB channels represented by the 3 little accordingly colored squares.</p>
<p style="text-align: justify;">It works like a regular midi-learn/midi-forget toggle that you can find in many offline midi programs: click on the software controller, move the hardware controller, press &#8216;ok&#8217; and you&#8217;re done.</p>
<p style="text-align: justify;">If you connect a note, the velocity is used to change the value of the channel and all notes with the same name in other octaves will be connected as well. This can be interesting: i have experimented a little with assigning specific tonic, subdominant and dominant notes to the channels, like for instance in key of C the note C to the green channel, the note B to the red channel and the note A to the blue channel.</p>
<p style="text-align: justify;">Now when you play you&#8217;ll see that colors are more or less matched to harmonic functions: dominant chords will always be a little reddish. The color of a Dmin7 will be, dependent on how hard you play the C and the A, beautifully aquamarine. Cmaj7 is yellow, but if you play the seventh very loud, it will turn more orange.</p>
<p style="text-align: justify;">I have to think up more refined and intelligent ways of connecting tones to harmonies, but i wanted to put this simple color organ in my proof of concept to show as an interesting possibility of a flash midi connection.</p>
<p style="text-align: justify;"><strong>the chord finder</strong></p>
<p style="text-align: justify;">This is in fact the reason why started this project: i wanted to create a decent online chord finder. The chords are related to scales and are presented as modi of all scales they fit in. Not all scales are implemented yet, so there are also missing chords.</p>
<p style="text-align: justify;">Only major, minor, minor harmonic and -melodic scales are implemented. Also, only the most common keys are used: C, F, Bb, Eb, Ab, Db, Gb, B, E, A, D, and G. This implies that if you play Db-F-Ab the chord finder will say Db major, but if you lower the third to Fb the chordfinder will enharmonise it to C#-E-G# and thus tell you it is C# minor. This is perfectly sound because C# minor (E major) is far more common then the minor parallel key of Fb (!).</p>
<p style="text-align: justify;">Also this part needs some good reworking because i am not completely happy with the order in which the modi are displayed.</p>
<p style="text-align: justify;"><strong>more to come</strong></p>
<p style="text-align: justify;">I am still working on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abumarkub.net/abublog/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
	</channel>
</rss>
