Closed prkirby closed 3 years ago
Hi @prkirby -- thanks for reporting this and sending a PR. I'm review and test it this weekend. Cheers!
I've merged the PR, and will update the docs and guide. This fix should be in the next release (v0.10) in a few days. Thanks again!
@williamngan Awesome! Thanks for the quick response. Let me know if you want help with any other issues, I'm really impressed with this library. I just stumbled across it a few days ago, but its been a pleasure to learn. I'm pretty interested in potentially using a library like this in a node environment to control some midi or serial output to connect to other interfaces. Would be more than happy to help collab.
Thank you so much @prkirby. I'm glad to hear that you're enjoying the library. If you encounter bugs or have questions, please continue to file issues here.
Would love to hear your thoughts on using Pts in node environment to connect to midi devices. I don't have enough knowledge in midi and procedural audio so I'm not sure if I can give you relevant feedbacks. But if you've created a sound library that works with Pts, let me know and I'll be happy to add it to Pts website.
There's currently a bug that prevented using Pts in node which should be fixed in next release. Thanks again!
Awesome, will do. I was thinking in a more generic midi output interface, to connect with hardware or other software. However that would likely need to be supported by another 3rd party library. I will look into it, see what creating another Space abstraction would look like for something like that. Thanks again.
Currently,
Sound.connect
is provided to add an AudioNode to the node generated. However,Sound.start
andSound.stop
do not account for this, and always connect or disconnect the Sound's _node directly to the AudioContext.destination.This can result in adding something simple like a GainNode to a loaded audio track, and banging your head against the desk trying to figure out why its not doing anything. I suggest creating a function that allows you to update the Sound instances 'output node', (last AudioNode in the chain that you've connected), and reference that in the start and stop functions.
@williamngan would you like me to open a PR for this? It shouldn't be too hard to fix. lmk.
Code that was failing for reference:
Hacky workaround: