importScriptsso I cannot use TinyRave functions I've made here. Is there a workaround?
(repost where I solved the pitch problem)
Does your code look like this? (the output audio pitch goes higher when you decrease the sampleRate and vice versa):
sampleRate=44100; //inside the audio processor (input is buffer data) time+=input.length/sampleRate;
Did you know that you can't change the audioContext's sampleRate? The default is 48000Hz (but not for all browsers probably) so you should do this instead:
Make sure you do
time+(sample/audioContext.sampleRate) for the DSP output data.
Hi! I'm pretty new to this but i've been trying to use tinyrave in Atom. I've installed the package and can make a sine wave to sound but when adding certain types of example code I get this error:
Uncaught TypeError: Cannot read property 'remove' of undefined
Show Stack Trace
The error was thrown from the TinyRave package. You can help by creating an issue. Please explain what actions triggered this error.
Once I get this error tinyrave doesn't work at all in Atom until I quit and restart again. This seems really cool so I'd love to be able to get some help. Thanks in advance for your time.
return Math.sin(Math.PI*2*440*time);you'll notice that it's a bit higher than it's supposed to be.
var SAMPLE_RATE = 44100;and
var SAMPLE_RATE = audioCtx.sampleRate;or
var time = tr_samplesGenerated / audioCtx.sampleRate;. Please fix it.
sampleRateis read-only and cannot be changed.