Hey Sean:
[email protected] ("Noel Lairson") Wed, 20 Aug 2003 20:00:04 -0700
| Newsgroups | perl.midi |
|---|---|
| Message-ID | <000701c36790$52107e30$b6e5fea9@fido> |
I've been meaning to point this out since I found it - it drove me crazy
until I figured it out.
In an 'n' or 'noop' call, you can call every parameter EXCEPT velocity
without quotes:
#these work:
n 64, d96, c2;
noop c5;
{$vel = 100; n 64, c1, d192, 'v'.$vel;}
#but these do not:
noop c2, v100;
n 64, c1, d192, v100;
#both lines yield an "Unknown note/rest option: " (i.e. from the 'sub
_parse_options' function from MIDI::Simple.)
#in order to get MIDI::Simple to accept a straight-text value for 'v', you
need to use single quotes:
noop c2, 'v100';
#or:
n 64, c1, d192, 'v100';
I'm sure the "proper" answer is "you need to use single quotes around your
parameters", but given that this is inconsistent between parameter types, I
thought I would bring it to your attention...
Noel