Browser based loop maker
What is it ?
Or what was it, rather. One Bar Loop (OBL) was an in-browser, Flash based application in which users could create a piece of music of exactly one bar/measure in length. To generate sound, OBL did not use samples but would synthesize audio on-the-fly.
Users could shape their synthesizer sounds, apply an effects chain and share their stored creations online, having the ability to vote on the loops made by others.
While OBL had its own website at www.onebarloop.com, there was also a shadow version hosted on Newgrounds (communicating with the main site keeping the content of the two in sync).
Wait... just one measure ?
Yep. Users had access to three instrument channels, multiple oscillator waveforms, eight octave polyphonic range, adjustable tempo, multiple stereo effects modules... but could only write one measure of music per song.
Most computer centered musicians compose their ideas while repeating a single pattern, repeatedly adding new layers while polishing up the initial spark of inspiration. Entire tracks are built around the ideas that were spawned from this single basic groove.
One Bar Loop existed to discover what kind of music could be created with such a severe limitation. Is there magic to be had in a single repetitive idea, often a handful of seconds in duration ?
Adobe Flash ? Why not HTML5 ?
Because the year was 2010. While the term "HTML5" had been coined, it would take another two years for the standard to "finalize". Furthermore, JavaScript in the browser lacked all-important features like Web Workers, WASM and most importantly, the ability to write to an audio stream.
With the advent of Flash Player 10, Flash gained the SampleDataEvent-class which basically provided you with the means to write data into an audio buffer that would be enqueued for live playback.
It would be another few years before "HTML5" and JavaScript would offer features that Flash Player had offered years before (Workers, GL, WASM and... the Web Audio API). It would take even longer before the average user would a have browser capable of supporting all of this.
OK. So this SampleDataEvent made it work ?
Yes... but it needed considerable help. Whereas the Web Audio API today offers satisfactory-to-great performance on the average device, the latency of audio in Flash was high. Also the single threaded nature of Flash required doing all the math to generate the sound on the same thread that would also be rendering the UI, handling events, etc. In other words: you needed to take extreme care to prevent stuttering sound and UI response.
To overcome this, a toolkit known as Alchemy (later known as CrossBridge) was used. Alchemy basically allowed porting C/C++ code to run inside the Flash Player, offering a performance boost of up to 10 x compared to the execution of ActionScript. Where possible, "mission critical" routines would be moved to Alchemy.
And then it worked ?
Sorta... even then it needed more help. Instead of recalculating what would be deterministic code, rendered audio could be written to and read from a cache. This greatly alleviated the stress on the CPU and even made the application run satisfactory on tablets supporting Flash Player (this was a different era after all).
In retrospect, the caching might have made matters worse in the sense that tweaking an audio signal on the fly would require invalidation of the cache, re-rendering the audio and writing it into a new cache. All of which is fine, but not as cleanly executed as it should have been. This led to changes in signal flow to pop a "caching audio" progress bar often (though existing audio content kept playing).
Further more, a lot of the DSP implementations were quite naive and DC offset problems were ubiquitous. As it stands, OBL was the first real application in which I used audio synthesis, and buggy as it was, it was the jumping board which eventually led to other apps, most of them listed on this website and available for use today.
As a community in which people (mostly onboarded through Newgrounds) would continually write loops, share their work and critique others, it was great fun.
Languages and technologies used:
ActionScript 3, Alchemy, JavaScript, PHP, MySQL.
DSP / synthesis-related
The core framework and audio code is archived but available to this day on GitHub.
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.