Open assertchris opened 7 years ago
The ability to fade like this is amazing! Dynamics are very important in music :). I'm don't feel like the way Band.js is built allows for plugins. I'm actually in the middle of rewriting the whole thing using RxJS. I can build in the concept of plugins at that point as well.
If you want, you could build the fading ability straight into the core of the app, rather than making it a plugin. What do you think about that?
BTW, by steps, do you mean how many notes go by? Usually in music, you see the crecendo or decrecendo lines the length of notes. So it might be better to say for how long the fade should go, i.e. half, quarter, whole, etc. What do you think?
What do you think about that?
Sounds cool. Lemme know where I can find the Rx version/send pull requests to :)
i.e. half, quarter, whole, etc. What do you think?
I think it's a good idea to support the musically correct way of describing a fade in/out, but I must confess I know even less of music theory than I do of the internals of this library. The easiest way I could figure to fake the fade was to adjust volume between instrument.note
/instrument.rest
calls (which is what the example demonstrates).
I was even working on a variation of the fade function, to inspect the source of the callback, and count the number of calls to note
and rest
, so that I could remove the steps
parameter, but that complicated multiple instruments inside the fade block (so I removed that code).
I was wondering what your thoughts are on plugins (as part of the core library). For instance, I've created a fade in/out plugin (function), and thought it might be a cool idea to bundle it like:
I could create a pull request, for this, if you think it's a good idea...