View Single Post
Old 03-26-2014, 10:50 AM   #80
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Finally got around to playing with this a bit tonight.

One small thing that has been bothering me for at least one and a half cups of coffee: I kept getting this error message:
Quote:
Originally Posted by OSCII-bot
Warning: line '@input OSCfromREAPER OSC "192.168.1.2:9000”' (and possibly more)' are not in valid section and may be ignored
As it turns out, the culprit were the 'fancy' quote marks at the end, which somehow got into my test script. So, if you see this error, watch out for this one, and make sure to use ugly straight quote characters.

The next thing bothering me, was that OSCII-bot didn't seem to see any of my MIDI devices (I'm on OS X, btw). While, for example, my Behringer BCR-2000 is named "BEHRINGER - BCR2000 - Port 1" in REAPER, making OSCII-bot look for "BEHRINGER" or "BCR2000" didn't work. As it turns out, what *did* work, was using "Port 1". (I got a clue from looking at the names of MIDI devices in Snoize's MIDI Monitor app, which showed only the last part of some device names.)

So, after two cups of coffee, I got Jeffos' MIDI to OSC conversion script working for OSCII-bot v0.2 on my Mac. Here is my adapted version: MIDI2OSC-II. This took just a few trivial edits, but hopefully it will be useful for some others who'd like to get started hacking with this. For convenience, I combined Jeffos' script with Justin's notes for general OSCII-bot usage. Much thanks to Justin and Jeffos - the MIDI parsing example is *very* useful!

I'm thinking it would be *really* nice to have more sophisticated MIDI parsing functionality built into OSCII-bot itself, btw - much like it would be an awesome addition to JS. It's not much fun having to do all the boilerplate stuff of composing different types of MIDI messages manually. I'd love to see some more specific commands like sendmidicc(device_index, controller_number, control_value) or sendmidinrpn(device_index, nrpn_number, control_value), to make scripting (much) less tedious and difficult (= more fun).

Off for a third cup, trying to make a companion OSC2MIDI script doing the reverse thing, so we have a generic bidirectional conversion utility between OSC <--> MIDI. I already have a tiny bit of test code working, yay!
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote