-
Notifications
You must be signed in to change notification settings - Fork 16
Example for playing multiple sounds and/or tracks #16
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
Comments
As a side note, if I've got more than ten different sounds I'd like to trigger, is it better to concatenate them into one file, then play using |
Create on node only, and put all your audio processing code inside that single node, just like in the examples. To support multiple simultaneous sounds, just create that many AdvancedAudioPlayers. |
I'm still having trouble with this. The problem lies with the processAudio function. Without it, I just get a loud noise. With it... well, I don't know how to process multiple tracks at once. I'm using your time stretching example: https://gist.github.com/designbyadrian/5ecb91fe3cc2cac49911dc178d1fef36 |
@designbyadrian i'm into the same situation. things are fine with just one player. Thanks |
@logesh2496 No, I'm clueless. In my humble opinion, more examples should be provided for developers who don't come from iOS/Android. |
@designbyadrian agree. And if you are still stuck with processStereo for multiple player, perhaps i can help you:
|
@logesh2496 I had a non-working example using a similar check, but I had messed up the part where I write zeroes to the output buffer. Here's a working example using 8 short MP3 files here: https://github.com/designbyadrian/web-audio-javascript-webassembly-SDK-interactive-audio/tree/example/multiple/example_multiple |
Hello,
Is there any example you could provide for playing multiple simultaneous sounds and/or tracks? Something that looks like a mini piano would be really helpful!
I'm trying to have one global audio context, then connecting multiple audio nodes to it. Each process has its own player object. I get no errors, but also no sound.
If you're curious about where I'm doing something wrong, here's the gist of it (pun intended): https://gist.github.com/designbyadrian/947d4090bea34b4aff498cf09f0d7711
The text was updated successfully, but these errors were encountered: