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
add ability to access raw wave file #16
Conversation
Wasn't it possible to use
I think something like this would make more sense:
So the above usage could be simplified to:
|
Although, naming it |
BTW. you can already use AudioContext directly:
|
Hello, I did try to use jsfx.Sound directly with Thank you for your I'll try to create a little demo app that reproduces the problem this weekend and get back to you. I'd love SoundData to be something I can use! Thank you for your help! McKenna |
Thanks for your help--I was able to use jsfx.Node directly with AudioContext, so that was good. The problem with it though is that My use case is that I'm building a game that uses sound effects generated by jsfx. I'd like to generate the sound effects once when the app loads and be able to replay them on demand. I could use the Also, I tried using adding a Let me know if I can provide any other info. If it doesn't make sense to you to add a Thank you! McKenna |
I'm guessing instead of FloatArray it would need to use AudioBuffer. If we can't get the SoundBuffer version working then I'm fine with |
Hi, I've finally had some time to look at this. This should work now:
|
Thank you! Just was able to try this out today, and it worked perfectly. Thank you for taking the time to add this feature. Would you also be willing to update the package on NPM? Thank you! |
Hello! I'd like to be able to get the raw wave data from jsfx so I can pass it through it an audio context to play later. Something like this:
You already had the ability to return a Uint8Array, so in this commit, I exposed that function. I also moved some common logic into its own function. Do you think exposing this method makes sense?
Thank you!
McKenna