ssj71 / OSC2MIDI

A highly flexible and configurable OSC to JACK MIDI (and back) bridge
GNU General Public License v3.0
45 stars 7 forks source link

Bugfix, left-factoring of mapping rules. #17

Closed agraef closed 9 years ago

agraef commented 9 years ago

Commit 308b45b fixes a rather awful bug which probably got unveiled by commit 0d895bc, causing osc_map fields to remain uninitialized. I'd say that this is critical enough to warrant a new point release.

As a bonus, commit ee3ec6b lets you leave out the left-hand side osc message of a rule if it's the same as for the previous rule. This saves a lot of typing in cases where a single osc message maps to an entire collection of different midi messages. E.g.,

/multi/{i} ff, touch,x,y : controlchange( channel, touch, x*127);
/multi/{i} ff, touch,x,y : controlchange( channel, touch+10, y*127);

may now be written as:

/multi/{i} ff, touch,x,y : controlchange( channel, touch, x*127);
                         : controlchange( channel, touch+10, y*127);

(The whitespace at the beginning of the second line is purely cosmetic, of course.)

I'd say that this is rather convenient. The only downside is that an osc message path may not start with a colon any more, but I consider this rather unlikely anyway. What do you think?

ssj71 commented 9 years ago

looks good. I'd thought about implementing left factoring but hadn't really come up with a good way to do it. Thanks!