<?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"
	>

<channel>
	<title>joeberkovitz.com &#187; Music</title>
	<atom:link href="http://joeberkovitz.com/blog/category/music/feed/" rel="self" type="application/rss+xml" />
	<link>http://joeberkovitz.com/blog</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Tue, 30 Dec 2008 15:57:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Live (or not so live) on The Flex Show</title>
		<link>http://joeberkovitz.com/blog/2008/12/19/live-or-not-so-live-on-the-flex-show/</link>
		<comments>http://joeberkovitz.com/blog/2008/12/19/live-or-not-so-live-on-the-flex-show/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 01:48:35 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://joeberkovitz.com/blog/?p=127</guid>
		<description><![CDATA[Starting today, you can catch me on episode 63 of The Flex Show, in which the effervescent John Wilker and Jeffry Houser interview yours truly about Noteflight, Flex, and I forget what else &#8212; it was taped a few weeks ago, which feels more like several years given the wealth of activity that was packed [...]]]></description>
			<content:encoded><![CDATA[<p>Starting today, you can catch me on <a href="http://www.theflexshow.com/blog/index.cfm/2008/12/17/Flex-Show-Episode-63-Interview-with-Joe-Berkovitz-of-Noteflightcom">episode 63 of The Flex Show</a>, in which the effervescent John Wilker and Jeffry Houser interview yours truly about Noteflight, Flex, and I forget what else &#8212; it was taped a few weeks ago, which feels more like several years given the wealth of activity that was packed into it.  I think I might take a listen right now, to find out the exact manner in which I embarrassed myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/12/19/live-or-not-so-live-on-the-flex-show/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Controlling Audio Latency in Flash 10</title>
		<link>http://joeberkovitz.com/blog/2008/10/15/controlling-audio-latency-in-flash-10/</link>
		<comments>http://joeberkovitz.com/blog/2008/10/15/controlling-audio-latency-in-flash-10/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 20:04:47 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2008/10/15/controlling-audio-latency-in-flash-10/</guid>
		<description><![CDATA[Adobe threw a slight curve ball with the long-awaited release of Flash Player 10 today.  The release itself wasn&#8217;t the curve ball (although not everyone expected it to happen on thisdate).  The surprise was the audio latency using the new dynamic sound generation APIs.
Audio latency, for programs that synthesize sound on the fly, is roughly [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe threw a slight curve ball with the long-awaited release of Flash Player 10 today.  The release itself wasn&#8217;t the curve ball (although not everyone expected it to happen on thisdate).  The surprise was the audio latency using the new dynamic sound generation APIs.</p>
<p>Audio latency, for programs that synthesize sound on the fly, is roughly defined as the amount of time between the program creating a sound and the computer&#8217;s audio output actually playing that same sound.  Latency is important because it affects the user experience.  If a user hits a &#8220;play&#8221; button and waits 1 second before hearing anything, that can be annoying.  If a user types a note into a music notation editor and has to wait 1 second before hearing anything, that&#8217;s downright maddening.</p>
<p>Latency isn&#8217;t all bad, though.  The higher the latency, the more &#8220;give&#8221; the sound output pipeline has, and the more resistant it is to disruption by other processes running in your browser and on your computer.  Ideally you want to strike a balance between latency and robustness in your sound output.</p>
<p>In Noteflight, the latency on Mac OS X had been at a comfortable 30 milliseconds &#8212; about a 30th of a second &#8212; using the Flash 10 beta.  But in the released production version, Noteflight&#8217;s audio latency suddenly jumped to about 850 milliseconds.  Other folks with audio synthesis apps reported other numbers, all of them different.  Whoa!  What happened?  (Before going further, let me say that our latency is now back at 250 milliseconds, so things aren&#8217;t as bad as they first seemed.)</p>
<p>Adobe introduced a new behavior into the released player, where the latency depends on the number of samples you provide to SampleDataEvent.  If you provide 2048 samples per callback, your latency will be the minimum available on the platform (30 ms on Mac, ~250 on Windows).  If you provide 8192 samples per callback, on the other hand, your latency will be in the neighborhood 1000 milliseconds.  The amount of latency for in-between sample block sizes is a complex function of this number.  Tinic Uro will hopefully publish more information about that function, which apparently involves a power-law nonlinear function of the block size combined with the native sound driver buffer size, but experimentally I have seen these numbers on Mac OS X:</p>
<p>block size      latency (ms)<br />
2048            30<br />
3072            170<br />
4096            250<br />
8192            850</p>
<p>This is good stuff to know, and it&#8217;s something of a surprise to us all.  I notched the sample size in Noteflight back down to 4096 in a hurry, and latency is acceptable once again.  Or, semi-acceptable.  I&#8217;d like to get it even lower, but I don&#8217;t want to do that in too much of a hurry without adequate testing and tuning of the synthesis pipeline.</p>
<p>[<strong>Important footnote (10/16/08)</strong>:  You might think that by adjusting the sample block size dynamically, you can change the latency on the fly for a single Sound object that is streaming samples.  The answer is... sort of, but not in a useful way.  You can make the latency increase by making the sample block size larger, but if you make it smaller again, the latency will not go back down: it will stay at the higher value.  What is reported to work, but I haven't tried it yet, is to output sound using more than one Sound object, each with its own block size (and hence its own latency value).  The usefulness of that approach is also not clear.]</p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/10/15/controlling-audio-latency-in-flash-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Noteflight: An Online Music Notation Editor</title>
		<link>http://joeberkovitz.com/blog/2008/10/06/introducing-noteflight/</link>
		<comments>http://joeberkovitz.com/blog/2008/10/06/introducing-noteflight/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:46:39 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2008/10/06/introducing-noteflight/</guid>
		<description><![CDATA[It&#8217;s my great pleasure to make an introduction: Noteflight, please say hello to the world.  World, there&#8217;s something I&#8217;d like you to meet: Noteflight.  I&#8217;m really pleased to be able to finally write this, because it&#8217;s been a long journey to get to this point!
Noteflight is a new kind of tool for musicians, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s my great pleasure to make an introduction: Noteflight, please say hello to the world.  World, there&#8217;s something I&#8217;d like you to meet: <a href="http://www.noteflight.com">Noteflight</a>.  I&#8217;m really pleased to be able to finally write this, because it&#8217;s been a long journey to get to this point!</p>
<p>Noteflight is a new kind of tool for musicians, composers and educators: an online music notation editor. With Noteflight, anyone can create, share and publish musical scores using nothing more than a web browser.  This ease of editing, sharing and publishing are what make Noteflight so different from other notation editors: music notation can finally be used on the Web in as natural and flexible a way as text, images or videos.</p>
<p>Here&#8217;s an example of a score that was created in Noteflight, shared, and embedded in this post:</p>
<p><object height="316" width="440"><param name="movie" value="http://www.noteflight.com/scores/embed"></param><param name="FlashVars" value="id=ca3a1593ed6236c9bb56971b89d80f23a105f5c4&amp;scale=1"></param><embed src="http://www.noteflight.com/scores/embed" type="application/x-shockwave-flash" flashvars="id=ca3a1593ed6236c9bb56971b89d80f23a105f5c4&amp;scale=1" height="316" width="440"></embed></object></p>
<p>This isn&#8217;t just a picture of music, but an interactive music display; for example, you can select and listen to individual notes and measures.  Click the logo to see the full-page score, which can be printed.  To get a sense of how the score above was created using the Noteflight score editor, please watch this video:</p>
<p><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/S1BrFc1Qjog&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/S1BrFc1Qjog&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" height="344" width="425"></embed></object></p>
<p>Scores are saved on the Noteflight server, so you and anyone you share them with can access them from anywhere on the Web.  The music can be heard as well as seen: Noteflight has its own integrated audio playback, that sounds consistent on every computer.  And Noteflight keeps track of all the past versions of your scores, so you can always go back and see where you&#8217;ve been.</p>
<p>The Noteflight beta is free and we&#8217;re accepting signups.  As with all beta software, Noteflight is constantly being improved and extended; this blog is the best place to find out what&#8217;s happening (and what&#8217;s going to happen next) with Noteflight.   Besides filling out the score editing features of Noteflight, we are planning additional services and capabilities for sharing music and organizing content.</p>
<p>There will be more posts coming up here about the development and internals of Noteflight &#8212; I&#8217;ve had to wait on many of those because the product wasn&#8217;t officially launched yet!  A few quick techie observations:</p>
<ul>
<li>The Noteflight score editor was built with Adobe Flex 3.0.1 and Flash CS3</li>
<li>The Noteflight server side was built with Ruby on Rails 2, Apache and MySQL and is hosted on Amazon EC2 and S3.</li>
<li>The Moccasin open-source editing framework (see previous post) is a distillation of many of the music-independent aspects of the Noteflight score editor.</li>
<li>The StandingWave audio library, previously discussed here (but not yet open-source), is used by the music synthesizer internal to Noteflight.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/10/06/introducing-noteflight/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Inflection Point</title>
		<link>http://joeberkovitz.com/blog/2008/07/17/my-inflection-point/</link>
		<comments>http://joeberkovitz.com/blog/2008/07/17/my-inflection-point/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 03:26:09 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2008/07/17/my-inflection-point/</guid>
		<description><![CDATA[Let&#8217;s get nerdy for a second.  Just one second.  As Wikipedia would have it:
In differential calculus, an inflection point, or point of inflection (or inflexion) is a point on a curve at which the curvature changes sign. The curve changes from being concave upwards (positive curvature) to concave downwards (negative curvature), or vice [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s get nerdy for a second.  Just one second.  As Wikipedia would have it:</p>
<blockquote><p>In differential calculus, an inflection point, or point of inflection (or inflexion) is a point on a curve at which the curvature changes sign. The curve changes from being concave upwards (positive curvature) to concave downwards (negative curvature), or vice versa. If one imagines driving a vehicle along the curve, it is a point at which the steering-wheel is momentarily &#8220;straight&#8221;, being turned from left to right or vice versa.</p></blockquote>
<p>My steering wheel is turning, for darn sure.  I have recently left the wonderful company for which I have been working, Allurent, to start my own business.  It&#8217;s an exciting change and one that I didn&#8217;t quite see coming until it had almost occurred by itself.  This was a decision that felt like it happened to me, not a decision that I consciously made.  I have an idea that I am absolutely passionate about, and must work on, as disruptive as the consequences may be. It&#8217;s as simple as that.</p>
<p>I will be talking much more about my company &#8212; called <a href="http://noteflight.com">Noteflight</a> &#8212; quite soon.  Noteflight is an online platform for creating, sharing, viewing and hearing music.  It&#8217;s a serious application, aimed at people who perform, compose, study, teach or collect musical content.  Expect some very substantial posts from me in the next month or two.</p>
<p>I am also working with the crack Boston development shop <a href="http://www.infrared5.com">Infrared5</a>.  To say these are smart folks is a huge  understatement; go take a look at their site, their team and their achievements.  Besides being smart, they&#8217;re also really nice folks, and I&#8217;m very pumped about the work we&#8217;ll do together, and are already doing now.  Plus&#8230; they have some great dogs hanging around the office.  I mean, how can you beat that?</p>
<p>Lastly, one more bit o&#8217; news: I&#8217;ll be speaking at the <a href="http://www.flashontap.com/fot/index.html">Flash on Tap</a> conference in Boston this year.  Hope you can come!</p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/07/17/my-inflection-point/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Audio-enabled Physics Engine Example</title>
		<link>http://joeberkovitz.com/blog/2008/06/09/audio-enabled-physics-engine-example/</link>
		<comments>http://joeberkovitz.com/blog/2008/06/09/audio-enabled-physics-engine-example/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 12:16:34 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2008/06/09/audio-enabled-physics-engine-example/</guid>
		<description><![CDATA[I thought I&#8217;d put up a fun demo SWF from my &#8220;Flash Bang&#8221; talk of a couple of weeks ago.  This is an example of what can be done with the new FlashPlayer 10 (&#8221;Astro&#8221;) Sound API; it synthesizes sounds on the fly that are synchronized with colliding objects in a simple physical simulation. [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d put up a fun demo SWF from my &#8220;Flash Bang&#8221; talk of a couple of weeks ago.  This is an example of what can be done with the new FlashPlayer 10 (&#8221;Astro&#8221;) Sound API; it synthesizes sounds on the fly that are synchronized with colliding objects in a simple physical simulation.  The volume and pitch of the sounds are controlled by the collision force and the nature of the colliding objects.</p>
<p>To run this demo, get hold of the FP10 standalone player, then use it to open this URL:</p>
<p>http://www.joeberkovitz.com/projects/StandingWave/physicalSound/physicalSound.swf</p>
<p>(If you try this with FP9, you&#8217;ll get a runtime error dialog, or the app won&#8217;t open.  And at some point soon the FP10 API will probably change, invalidating this app and obliging me to rebuild it, so in the near future YMMV.)</p>
<p>The sync between the sounds and the visuals is quite delicate and if it is off by even a little bit, the results look terrible.  On my MacBook Pro, the auto-calculation of the audio latency is near perfect, but on Windows the player API&#8217;s <tt>Sound.position</tt> property seems to be off  by about 150 msec, enough to ruin everything.  You can play around with the latency in this example by moving the slider.</p>
<p>I didn&#8217;t post source because I am using a proprietary library, but the sound code in the example is not very interesting or complex actually.  The trickiness in this app is all in the audio/visual synchronization.  I am actually running <em>two</em> identical physical simulations, one of which runs ahead of the other, generating each collision sound exactly the right time interval before the other simulation displays the same collision.  You can see both simulations by clicking the checkbox in the upper left of the example.</p>
<p>I used an open source physics engine called APE (Actionscript Physics Engine) available, at <a href="http://www.cove.org/ape/index.htm">http://www.cove.org/ape/index.htm</a>.  I picked it because it was very easy to modify the collision detection mechanism to add audio hooks, but I haven&#8217;t done enough research to compare it to other engines for this purpose.</p>
<p>Here&#8217;s a screenshot (without sound of course!):</p>
<p><img src="/projects/StandingWave/physicalSound/physicalSound.png" alt="screenshot" width="366" height="227"/></p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/06/09/audio-enabled-physics-engine-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;Flash Bang&#8221;: upcoming talk on Flash audio synthesis</title>
		<link>http://joeberkovitz.com/blog/2008/05/25/flash-audio-bfpug-talk/</link>
		<comments>http://joeberkovitz.com/blog/2008/05/25/flash-audio-bfpug-talk/#comments</comments>
		<pubDate>Sun, 25 May 2008 14:01:18 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2008/05/25/flash-audio-bfpug-talk/</guid>
		<description><![CDATA[This Wednesday evening (5/28), I am giving a talk on bleeding-edge Flash audio and music synthesis at the Boston Flash Platform Users Group .  Jeez Louise, I must be about the worst self-publicist ever&#8230; I&#8217;ve been so busy that I forgot to blog my own speaking event.  Anyway, the meeting is at the [...]]]></description>
			<content:encoded><![CDATA[<p>This Wednesday evening (5/28), I am giving a talk on bleeding-edge Flash audio and music synthesis at the <a href="http://www.bfpug.com/">Boston Flash Platform Users Group </a>.  Jeez Louise, I must be about the worst self-publicist ever&#8230; I&#8217;ve been so busy that <u>I forgot to blog my own speaking event</u>.  Anyway, the meeting is at the NEIA Annex building, 303 Boylston Street, Brookline MA at 7 pm.</p>
<p>I think this will be a fun one &#8212; my computer will be making a lot of noise and playing some tunes.  Some of the highlights include:</p>
<ul>
<li>The strange and scary things you have to do to synthesize audio in Flash 9</li>
<li>The big audio improvements in Flash 10 (code and demos will be shown!)</li>
<li>Architectural approaches to dealing with latency and synchronization</li>
<li>Adding simulated sound to a physics engine</li>
<li>The brave new world of Flash applications for creating music, not just playing it back</li>
</ul>
<p>Hope you can make it!</p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2008/05/25/flash-audio-bfpug-talk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>StandingWave: Live Musical Audio Synthesis in AS3</title>
		<link>http://joeberkovitz.com/blog/2007/12/04/standingwave-live-musical-audio-synthesis-in-as3/</link>
		<comments>http://joeberkovitz.com/blog/2007/12/04/standingwave-live-musical-audio-synthesis-in-as3/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 03:16:42 +0000</pubDate>
		<dc:creator>joe</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/2007/12/04/standingwave-live-musical-audio-synthesis-in-as3/</guid>
		<description><![CDATA[I&#8217;ve been working on a funky new homebrew software project called StandingWave: a musical audio processing engine built entirely in Flash.  My goal in doing this is to explore a world of online interactive music applications in which audio is not merely played back, but generated on the fly &#8212; performed, in fact &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a funky new homebrew software project called <strong>StandingWave</strong>: a musical audio processing engine built entirely in Flash.  My goal in doing this is to explore a world of online interactive music applications in which audio is not merely played back, but generated on the fly &#8212; performed, in fact &#8212; from an underlying representation of musical events.  Such applications might range from a traditional music notation editor to game-like music composition environments to&#8230; knows?</p>
<p>Computer music performance is hardly something new, of course.  But embedding the capability in Flash, at this point in the world, can make musical applications accessible on the web and amenable to community use in a way that&#8217;s never been possible before.  Think about what applications like Buzzword and Google Spreadsheets are doing for traditional &#8220;productivity apps&#8221;.</p>
<p>I&#8217;ve started with the audio engine because it&#8217;s an interesting technical challenge, although I&#8217;m working on some of the other pieces concurrently.  I&#8217;ve put up an <a href="http://joeberkovitz.com/projects/StandingWave/demo1/AudioTest.html">initial crude example</a> that demonstrates sample-based waveform synthesis.  This toy application can play back single notes, a chromatic scale and a sample MIDI file at various transpositions, tempos and volumes, and all of this is accomplished by actually synthesizing digital audio signals on the fly, starting from a set of recorded guitar samples and applying gain envelopes, frequency shifting and mixing.  Musically, it&#8217;s hardly exciting, but it&#8217;s a start on the capabilities needed to concretely deliver music in the Flash Player with no external add-ons, and without leaning on the crappy, highly variable MIDI playback delivered by the browser&#8217;s native OS.</p>
<p>There&#8217;s no waveform audio output API in Flash, so how is this done?  Read on&#8230;</p>
<p><span id="more-64"></span></p>
<p>The basic idea is as follows: write a SWF file into a ByteArray in memory as raw bytecodes that encode an audio stream as an embedded sound asset.  This byte array is exactly what would be produced if, in the Flash IDE, one imported a sound into the Library and exported it for runtime ActionScript usage.  Then, use <code>Loader.loadBytes()</code> to load this in-memory SWF.  Once loaded, use <code>getDefinitionByName()</code> on the loaded SWF to instantiate the exported asset as a <code>Sound</code> object, at which point it can be played directly via the Flash media API.</p>
<p>There&#8217;s more to StandingWave than that, of course.   Internally, there is a pipeline of objects representing music sources, audio sources, filters, mixers and performance objects.  WAV and MIDI formats need to be handled.  There are abstract notions of pitch, rhythm, tempo and temperament.  The audio is processed in small chunks to avoid tying up the main event loop, and there are some very non-obvious tricks required to start audio chunks at the correct time, so that they are played successively with reasonable time synchronization.   (Consider that the Flash Player doesn&#8217;t ever guarantee that some chunk of code will be run at any exact point in time, whether you&#8217;re listening for Timer events or enterFrame.)  Although playback is almost flawless on my Mac, I&#8217;m still having some issues on Windows at the beginning of a playback sequence.  There is lots more work to do.</p>
<p>(I came up with the audio-output trick independently, but I&#8217;m not the first one to think of it.  The <a href="http://code.google.com/p/popforge/">Popforge</a> open source project is one earlier realization, and there may be others.  Popforge is geared more to audio streaming than to musical event processing, and I think I&#8217;ve improved on its approach by not attempting to maintain a continuous digital audio output stream, but instead overlapping audio chunks that always start cleanly with a new musical event.    The same engine (or rough approach) appears to power the recently announced <a href="http://www.splicemusic.com/">Splice Music</a> site which exhibits some of the same characteristics as the kind of apps I&#8217;m interested in building.)</p>
<p>Anyway, more to come, but I thought I&#8217;d get something initial out there as food for thought, while I continue to make progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeberkovitz.com/blog/2007/12/04/standingwave-live-musical-audio-synthesis-in-as3/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
