danomatika / ofxMidi

(maintained) Midi addon for openFrameworks
Other
262 stars 72 forks source link

How to get initial midi values on first connection? #80

Closed kassianh closed 3 years ago

kassianh commented 3 years ago

Great library, everything is doing exactly what I need except for one thing:

I am connecting to a midi DJ controller with a lot of rotary knobs and sliders. I would like to get the initial value of all of these without having to manually make minimal adjustments on first connecting to the controller. Is there a way to do this?

Thank you.

danomatika commented 3 years ago

I've not personally used this library with more advanced MIDI controllers, but I can say it would depend on the device. If the controls are all endless, ie. rotary knobs with start/stop, and you can send CC values, then you can basically init those controls when you start the application since they have relative positioning. Otherwise, you would need some way to query the device's state and have it send all current values back to your application on start. There is nothing built in to do this as it would be highly device-dependent.

kassianh commented 3 years ago

Okay, thanks for the quick response. I'll have a look into querying the device's state.