rserota / wad

Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
MIT License
1.89k stars 160 forks source link

detune #79

Closed nbrosowsky closed 6 years ago

nbrosowsky commented 6 years ago

Hello,

I've just started playing around with wad but really like what I'm seeing so far!

I'm having some trouble getting the detune functions to work properly.

for example, the following code does not play the sound clip detuned:

test = new Wad({source : '/sounds/guitar_E4.mp3', detune: -500});
test.play()

However, I can change while it's playing:

test = new Wad({source : '/sounds/guitar_E4.mp3'})
test.play()
test.setDetune(-500)

Playing it while simultaneously changing detune also works:

test = new Wad({source : '/sounds/guitar_E4.mp3'})
test.play().soundSource.detune.value = -500;

Any thoughts?

Thanks, Nick

rserota commented 6 years ago

Hi Nick,

Thanks for raising this issue. Previously, most of the code for setting up detune was specific to oscillators, not audio clips. I moved some code around so that now audio clips should work with detune the way you'd expect them to.

Thanks for your interest in Wad.js.

Best, Raphael