Hi guys. I'm still checking a few APIs and I came across a little problem with Web Audio. I can't make the delay node work. I created the source, connected the source to the delay node and the not to the destination. I also connected the source to the destination to here both sounds, but the sound with the delay never gets to the speakers. I tries the same pattern in two different application. In http://ykifle.github.com/audiograph/ it doesn't work like in my script (once you set the delay to something different than 0 you only get silence). And at http://webaudioplayground.appspot.com, the delay works, but it can't be set for more than 1 second.
Apparently there is a way to make it work, but I can't find the way. Here is my play() function:
function play(mybuffer){ var sourceNode = context.createBufferSource(); sourceNode.buffer = mybuffer;
Hey JD -
From the symptoms, I'm presuming you're getting a script error somewhere.
Can you either send me the full code, or (better yet) point me to a web
address where it's posted?
(I wrote the Web Audio Playground, BTW - the delay being limited to 1.0
second there is only a UI limit. It was hard to select small "echo"-style
delay values easily otherwise.)
On Sun, Nov 11, 2012 at 3:43 PM, macrojd <macr...@yahoo.com.ar> wrote:
> Hi guys. I'm still checking a few APIs and I came across a little problem
> with Web Audio. I can't make the delay node work. I created the source,
> connected the source to the delay node and the not to the destination. I
> also connected the source to the destination to here both sounds, but the
> sound with the delay never gets to the speakers. I tries the same pattern
> in two different application. In http://ykifle.github.com/audiograph/ it
> doesn't work like in my script (once you set the delay to something
> different than 0 you only get silence). And at
> http://webaudioplayground.appspot.com, the delay works, but it can't be
> set for more than 1 second.
> Apparently there is a way to make it work, but I can't find the way. Here
> is my play() function:
> function play(mybuffer){
> var sourceNode = context.createBufferSource();
> sourceNode.buffer = mybuffer;
Hi Chris. Sure I know who you are, I first learned the API thanks to your video from Google I/O!
Here is the link to my script. It was extremely simplified because is an example I'm preparing for my book and the examples are always minimized for didactic purposes.
The script doesn't return any error, but probably the construction is wrong because it is my first try with delays. I tried the same construction at http://ykifle.github.com/audiograph/ and it doesn't work either, so I suppose he is having the same problem I have.
On Monday, November 12, 2012 8:30:45 AM UTC-8, Chris Wilson wrote:
> Hey JD - > From the symptoms, I'm presuming you're getting a script error somewhere. > Can you either send me the full code, or (better yet) point me to a web > address where it's posted?
> (I wrote the Web Audio Playground, BTW - the delay being limited to 1.0 > second there is only a UI limit. It was hard to select small "echo"-style > delay values easily otherwise.)
> -C
> On Sun, Nov 11, 2012 at 3:43 PM, macrojd <mac...@yahoo.com.ar<javascript:> > > wrote:
>> Hi guys. I'm still checking a few APIs and I came across a little problem >> with Web Audio. I can't make the delay node work. I created the source, >> connected the source to the delay node and the not to the destination. I >> also connected the source to the destination to here both sounds, but the >> sound with the delay never gets to the speakers. I tries the same pattern >> in two different application. In http://ykifle.github.com/audiograph/ it >> doesn't work like in my script (once you set the delay to something >> different than 0 you only get silence). And at >> http://webaudioplayground.appspot.com, the delay works, but it can't be >> set for more than 1 second.
>> Apparently there is a way to make it work, but I can't find the way. Here >> is my play() function:
>> function play(mybuffer){ >> var sourceNode = context.createBufferSource(); >> sourceNode.buffer = mybuffer;
On Monday, November 12, 2012 12:49:09 PM UTC-8, macrojd wrote:
> Hi Chris. Sure I know who you are, I first learned the API thanks to your > video from Google I/O!
> Here is the link to my script. It was extremely simplified because is an > example I'm preparing for my book and the examples are always minimized for > didactic purposes.
> The script doesn't return any error, but probably the construction is > wrong because it is my first try with delays. I tried the same construction > at http://ykifle.github.com/audiograph/ and it doesn't work either, so I > suppose he is having the same problem I have.
> On Monday, November 12, 2012 8:30:45 AM UTC-8, Chris Wilson wrote:
>> Hey JD - >> From the symptoms, I'm presuming you're getting a script error somewhere. >> Can you either send me the full code, or (better yet) point me to a web >> address where it's posted?
>> (I wrote the Web Audio Playground, BTW - the delay being limited to 1.0 >> second there is only a UI limit. It was hard to select small "echo"-style >> delay values easily otherwise.)
>> -C
>> On Sun, Nov 11, 2012 at 3:43 PM, macrojd <mac...@yahoo.com.ar> wrote:
>>> Hi guys. I'm still checking a few APIs and I came across a little >>> problem with Web Audio. I can't make the delay node work. I created the >>> source, connected the source to the delay node and the not to the >>> destination. I also connected the source to the destination to here both >>> sounds, but the sound with the delay never gets to the speakers. I tries >>> the same pattern in two different application. In >>> http://ykifle.github.com/audiograph/ it doesn't work like in my script >>> (once you set the delay to something different than 0 you only get >>> silence). And at http://webaudioplayground.appspot.com, the delay >>> works, but it can't be set for more than 1 second.
>>> Apparently there is a way to make it work, but I can't find the way. >>> Here is my play() function:
>>> function play(mybuffer){ >>> var sourceNode = context.createBufferSource(); >>> sourceNode.buffer = mybuffer;
Heh. I sent mail internally one minute before you did.
It doesn't seem to be that file alone; I replicated it with another audio
file. However, when I converted the file to mono, it worked correctly. It
appears to be getting cut off (that is, the delay node stops producing
audio) when the original buffer source ends.
On Mon, Nov 12, 2012 at 3:56 PM, macrojd <macr...@yahoo.com.ar> wrote:
> Hi Chris. Well, I found out that the problem is only with that particular
> file (gunshot.wav). I replaced the file by another one and it worked!
> I'll try with more files to check if it was a corrupt file or something
> like that.
> JD
> On Monday, November 12, 2012 12:49:09 PM UTC-8, macrojd wrote:
>> Hi Chris. Sure I know who you are, I first learned the API thanks to your
>> video from Google I/O!
>> Here is the link to my script. It was extremely simplified because is an
>> example I'm preparing for my book and the examples are always minimized for
>> didactic purposes.
>> The script doesn't return any error, but probably the construction is
>> wrong because it is my first try with delays. I tried the same construction
>> at http://ykifle.github.com/**audiograph/<http://ykifle.github.com/audiograph/> and
>> it doesn't work either, so I suppose he is having the same problem I have.
>> On Monday, November 12, 2012 8:30:45 AM UTC-8, Chris Wilson wrote:
>>> Hey JD -
>>> From the symptoms, I'm presuming you're getting a script error
>>> somewhere. Can you either send me the full code, or (better yet) point me
>>> to a web address where it's posted?
>>> (I wrote the Web Audio Playground, BTW - the delay being limited to 1.0
>>> second there is only a UI limit. It was hard to select small "echo"-style
>>> delay values easily otherwise.)
>>> -C
>>> On Sun, Nov 11, 2012 at 3:43 PM, macrojd <mac...@yahoo.com.ar> wrote:
>>>> Hi guys. I'm still checking a few APIs and I came across a little
>>>> problem with Web Audio. I can't make the delay node work. I created the
>>>> source, connected the source to the delay node and the not to the
>>>> destination. I also connected the source to the destination to here both
>>>> sounds, but the sound with the delay never gets to the speakers. I tries
>>>> the same pattern in two different application. In
>>>> http://ykifle.github.com/**audiograph/<http://ykifle.github.com/audiograph/>it doesn't work like in my script (once you set the delay to something
>>>> different than 0 you only get silence). And at
>>>> http://webaudioplayground.**appspot.com<http://webaudioplayground.appspot.com>,
>>>> the delay works, but it can't be set for more than 1 second.
>>>> Apparently there is a way to make it work, but I can't find the way.
>>>> Here is my play() function:
>>>> function play(mybuffer){
>>>> var sourceNode = context.createBufferSource();
>>>> sourceNode.buffer = mybuffer;