Re: Web Audio API ambient drone

Mmm,  the music of perception.
... I want to insert a John Cage quote here, but anyway, "we learn by
repitition", as Ezra Buchla sings.

-Roby

PS:  Couldn't resist looking one up: "If something is boring after two
minutes, try it for four. If still boring, then eight. Then sixteen.
Then thirty-two. Eventually one discovers that it is not boring at
all. " - John Cage

On Thu, Jul 19, 2012 at 1:28 PM, Matt Diamond <mdiamond@jhu.edu> wrote:
> Sorry for the confusion... I'm pretty sure the perceptual looping effect was
> what Lonce described, not a bug.
>
> Matt
>
>
> On Thu, Jul 19, 2012 at 6:51 AM, Chris Wilson <cwilso@google.com> wrote:
>>
>> No, I knew that - Matt had said when he looped it previously, he could
>> hear a perceptual looping effect.
>>
>> On Jul 19, 2012 6:32 AM, "lonce wyse" <lonce.wyse@zwhome.org> wrote:
>>>
>>>
>>> Hello,
>>>
>>>     I don't think anything is broken.
>>>     If you listen to his drone (with non-looping noise) you can hear a
>>> slow evolution of timbre. This is due to the subtle differences in frequency
>>> content being generated by the different noise sources over time, combined
>>> with his extremely narrow filters on each source.
>>>     If you can hear the slow variation in time given his original
>>> algorithm, then it is clear that using 2-second looping noise sources
>>> (assuming they all had the same loop durations) would create an audible
>>> 2-second repeating pattern.
>>>     No need to fix anything!
>>>
>>> - lonce
>>> --
>>> Lonce Wyse, Associate Professor
>>> Communications and New Media
>>> Director, IDMI Arts and Creativity Lab
>>> National University of Singapore
>>> www.anclab.org
>>>
>>>
>>> On 17/7/2012 12:49 AM, Chris Wilson wrote:
>>>
>>> Hmm.  If there is a perceptible looping effect, that's broken and should
>>> be fixed.  (I used looped noise in the web audio vocoder
>>> (webaudiovocoder.appspot.com, needs Chrome Dev channel or better), and never
>>> noticed a problem.)  If you happen to run across it again, could you forward
>>> me a repro case?
>>>
>>> -C
>>>
>>>
>>> On Sun, Jul 15, 2012 at 1:06 PM, Matt Diamond <mdiamond@jhu.edu> wrote:
>>>>
>>>> Thanks for the tip! An earlier version of this did in fact use
>>>> pre-computed noise buffers, but I felt there was a vaguely perceptible
>>>> "looping" effect because of the looping noise sample (it was a cool effect
>>>> though). Another reason was that I was presenting a version of this script
>>>> at a meetup, and felt like utilizing a JavaScriptAudioNode for real-time
>>>> noise generation would be more interesting to demonstrate... but yes, it
>>>> certainly takes a bit of a toll, and running a bunch of AudioBufferSource
>>>> nodes would probably be much less taxing.
>>>>
>>>> Still, I'm pretty impressed that the API is able to handle so much, even
>>>> if it's only on higher-end machines (I'm running it on a year-old MacBook
>>>> Pro).
>>>>
>>>> Matt
>>>>
>>>>
>>>> On Sun, Jul 15, 2012 at 8:03 AM, Chris Wilson <cwilso@google.com> wrote:
>>>>>
>>>>> Hey Matt-
>>>>>
>>>>> Neat!  I like the apparent pitch generated by bandpass filter.
>>>>>
>>>>> One comment - instead of continually generating noise via
>>>>> JavaScriptAudioNodes, you'd probably find it much more performant to
>>>>> pre-generate a couple of seconds (to avoid any detectable periodicity) of
>>>>> noise in a Buffer and playing it as an AudioNode.  That would probably be a
>>>>> bit more performant than continually calling Math.random for each sample.
>>>>>
>>>>> var lengthInSamples =  2 * audioContext.sampleRate;
>>>>> var noiseBuffer = audioContext.createBuffer(1, lengthInSamples,
>>>>> audioContext.sampleRate);
>>>>> var bufferData = noiseBuffer.getChannelData(0);
>>>>> for (var i = 0; i < lengthInSamples; ++i) {
>>>>>     bufferData[i] = (2*Math.random() - 1);
>>>>> }
>>>>>
>>>>> On Sat, Jul 14, 2012 at 12:26 PM, Matt Diamond <mdiamond@jhu.edu>
>>>>> wrote:
>>>>>>
>>>>>> Hey all,
>>>>>>
>>>>>> Put together a little experiment in synthesizing an ambient sound
>>>>>> texture using the Web Audio API:
>>>>>>
>>>>>> http://matt-diamond.com/drone.html
>>>>>>
>>>>>> Matt
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>>
>

Received on Saturday, 21 July 2012 07:15:15 UTC