-
Notifications
You must be signed in to change notification settings - Fork 8
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
Does "tsw.load" work? #28
Comments
Oh, let me look into it. Maybe the documentation isn't right. It currently works as in the tests: https://github.com/stuartmemo/theresas-sound-world/blob/master/tests/tests.js Starts line 352. Saying that, would love your feedback on what syntax you prefer on loading files. I'm not 100% on what I've done. |
Hi Stuart, I did see your tests.js file -- it appears that you're testing the tsw.load function with only two arguments:
Though the documentation http://theresassoundworld.com/#load allows for three args (the second being "path"): tsw.load( Being able to define a path may be helpful, though not essential. As far as syntax is concerned, I like what you've designed but I'm currently unclear how I can access the buffers after they're loaded -- that is, I'm not currently understanding how I can pass buffers to tsw.play() when I'm not inside the successCallback function. I think I should want access to an array of buffers that are available in the current audioContext -- maybe you've already implemented something this and I simply need to study more. I have something like this in mind (totally over-simplified, please forgive me): // on DOMContentLoaded I'd like to load some buffers like: // at any time, I'd like to be able to add new buffers, maybe like: // at any time, I'd like to be able to control all or individual buffers - somewhat like audio objects (gain, etc.), and somewhat like an array (push, splice, pop, etc), maybe like: PLEASE don't heed my input too much though. I have more trust in your JavaScript knowledge than my own. |
Ooh, that's a really good idea regarding the buffers. Currently you have to create a buffer using But like you say if buffers was a special array that converted a file into a playable buffer automatically then that'd be pretty nice! |
Calling tsw.load as described here http://theresassoundworld.com/#load doesn't appear to work. The arguments are not parsed into arrays and objects which are compatible with the loadFile function.
For example, at line 589 ("number_of_files = Object.keys(files).length;"), the number_of_files will always equal 1 (if isArray(files) === true).
My REAL question: is tsw.load known to actually work currently? If so, I'll debug MY code -- if not, I'll debug tsw.load and submit a pull request.
The text was updated successfully, but these errors were encountered: