-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tone.connect
does not seem to work
#740
Comments
As long as that context is wrapped in the standardized-audio-context wrapper (so don't take the private property If you'd like to connect things up in the latter way, then you'd have to use Tone.setContext(yourNativeAudioContext), but you'd lose all of the benefits of standardized-audio-context's cross-browser compatibility. so to modify your code so that it works would look like this: const toneNativeAudioContext = Tone.getContext().rawContext;
const nativeGain = toneNativeAudioContext.createGain()
console.log(nativeGain instanceof AudioNode)
Tone.connect(nativeGain, new Tone.Gain());
|
Thanks for the answer. My use case involves an I see that tone solves this problem with https://tonejs.github.io/docs/14.7.39/Context#createAudioWorkletNode. However, I'm using a custom Edit 1 I guess it is supported by doing this: Edit 2 Yeah that doesn't work, I thought Edit 3
This works. @tambien Do you think that Edit 4 If you think that exposing |
I think Edit 3 is the approach that i'd recommend. Here's a small example which is working well for me and seems to be pretty readable. |
@tambien As I said, Edit 3 will work, as long as the |
The
Tone.connect
method isn't listed in the doc. However I did find the method doc by navigating to the url directly (https://tonejs.github.io/docs/14.7.39/fn/connect).As you can see in this fiddle, I can't seem to connect a native gain node to a Tone gain. If I understand, the
Tone.connect
method's purpose is to connect a native audio node to a tone node, right?The text was updated successfully, but these errors were encountered: