Empty variable names on the lhs of a rule
Open Sound Control to/from JACK MIDI Bridge for Linux
Brought to you by:
ssj71
According to the documentation in default.omm, variable names on the left-hand side of a rule can be omitted if they aren't used anywhere. So if I'm not mistaken then the following should work:
/1/xy1 ff, val, : controlchange( 1, 1, 127*val ); /1/xy1 ff, , val : controlchange( 1, 2, 127*val );
But it yields:
$ osc2midi -v -m test.omm Using map file test.omm pair created: /1/xy1 ff, a, x2 : controlchange( 1, 1, 127.00*a ) pair created: /1/xy1 ff, x1, x2 : controlchange( 1, 2, y3 )
The first pair looks all right, but note the unbound variable y3 in the second pair. There's clearly something wrong there. (I've attached this example as test.omm below.)
In contrast, using the dummy variable _
instead of an empty variable:
/1/xy1 ff, val, _ : controlchange( 1, 1, 127*val ); /1/xy1 ff, _, val : controlchange( 1, 2, 127*val );
This gives the intended result:
$ osc2midi -v -m test.omm Using map file test.omm pair created: /1/xy1 ff, a, x2 : controlchange( 1, 1, 127.00*a ) pair created: /1/xy1 ff, x1, b : controlchange( 1, 2, 127.00*b )
resolved in commit 246a612
Works great, thanks!