-
Notifications
You must be signed in to change notification settings - Fork 160
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
Created a SoundIterator Object #112
Conversation
Hey, thanks for submitting this PR. I haven't had much time to test it yet, but it looks good so far. My only thought at the moment, is that it seems like another way to group multiple wads together, but polywads already sort of do that. Do you think it would be feasible to adapt the polywad interface to do what you need to do? |
PolyWads are meant to have wads playing together. This is meant to have wads playing one after another. This could be used if you wanted to group polywads together in an arpeggio that was either random or always in the same order.
|
This is very much a utility class, and the times I've thought when it would be useful are:
With a little more code, it could run a song comprised of Wad objects, but currently the timing functionality is not there, just the ordering. It's really just an iterator that removes the boilerplate from the above functions. I use it in most of my projects. |
This looks great, thanks for contributing! You briefly mentioned some timing functionality that could be useful? How are you imagining that would work? I've actually been thinking about adding timing features to Wad. |
How I would do it is: This would require:
Then there could be syntactic sugar for adding notes, like having an oscillator Wad object, and pass it into a createSequence method on the SoundIterator object that has the arguments: oscillator, |
I added one file: src/sound_iterator.js
I also added the tests to the bottom of the html file. I updated webpack because it wouldn't run on my machine with the old version, but I'm not exactly sure how to remove that from the PR.