Hey all,
I'm new to the list and midi in general.
I'm actually a 3D artist who got carried away with a project and ended up
coding c++ plugins for my 3D app... go figure:D So I apologize for any... how
shall I put this mildly... stupid questions I may ask:D But basically my
plugin lets users use HID devices, and of course the moment I released it I got
a bunch of requests for midi support (I guess more 3d artists are tech savvy
musicians than gamers lol).
My main concern is with Pm_MessageData1 (figures it has to be one of the
undocumented items in the documentation lol). Maybe it's just the device I'm
testing with (a Korg nanoKontrol). I'm assuming that's supposed to be the ID
for each control. If I'm correct in that assessment, I'm seeing an odd
behavior where they're not being indexed properly. I'm running the test
executable for my tests ( I changed all outputs to int values because I hate
having to read hex values). This device has 9 sliders, 9 dials and 18 buttons
(plus some media control buttons). Problem is, they're not being indexed
properly and it's kind of bumming me out:
Slides:
1 = 2? (what happened to 1?)
2 = 3
3 = 4
4 = 5
5 = 6
6 = 8?
7 = 9
8 = 12?
9 = 13
Buttons and dials generally follow a nice continuous pattern... however,
there's also a "scene" button, which always registers with an ID of 0 and never
registers a "pressed state" (it sends a message, but pressed outputs 0 and
un-pressed outputs 0... I guess that's ok as it's main purpose seems to be
changing the behavior of the rest of the controls... but I digress). Now, if I
press this button (which changes an led to different scene states 1-4), the
control ID's of the dials/sliders/buttons all change! Even the odd jumps in
control ID's change, and not in a consistent way (partly due to the fact that
the ID's of those media controls never change).
All the outputs and their ranges are consistent (sliders/dials output 0-127 and
buttons either 0 or 127... more or less a bool). But I also need to get
consistent ID's for each control and I'm finding that to be almost impossible.
I need to be able to map these controls to specific variables in my plugin.
Also, this is for users of a 3d program, so I can't even begin to guess the
multitude of different devices that may be used with it and the necessity for
consistent and predictable device mapping can't be understated. Preferably,
I'd like these ID's to be mapped from 1 continuously to whatever the max number
of control surfaces on the device are, but if I can at least find a pattern
then I should be able to adjust (as long as that pattern is pretty consistent
over a wide range of devices).
Any help would be much appreciated.
btw, I'm on OS X 10.6.4
Thanks in advance,
Kevin
_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api