Quote:
Originally Posted by IXix
|
EDIT: Thanks, IXix, for the template. It saved me a great deal of wailing and gnashing of teeth. But the thrill of figuring out what stupid thing I'd done overwhelmed my sense of decency and good manners, and I forgot to note that originally.
Because I've been watching variables until my eyeballs are ready to bleed, might I suggest some small changes and/or additional commentary in lines 273-278 regarding dynamic note and velocity values?
If line 274 is changed to e.g.
Code:
velocity = rand(90)+30;
note is stomped upon.
Code:
velocity = (rand(90)+30) & 127;
avoids this unpleasant and time-consuming circumstance. And if the expression for note is likewise masked in line 273
Code:
note = (rand(36)+36) & 127;
for example, then lines 277 & 278 become redundant. Trust me; I know these things to be true. Now, at least…
Here's hoping this helps some other intrepid JS novice,
m.