aconstlink / motor

Software Framework for Audio/Visual/Interactive Real-Time Applications
MIT License
2 stars 0 forks source link

Tagging Midi Devices #82

Open aconstlink opened 6 months ago

aconstlink commented 6 months ago

Integrating the MIDI module (#76) and figuring out how to insert any midi device into the system led to a refactoring of the device( now controls) layer.

Due to the compile-time layout strategy used with devices it was not possible to easily insert any midi device with a known layout because the layout was tight to the device at compile-time.

So the refactoring also included the separation of the layout from the device so some instance can easily just add components.

Problem: Still there is no way to determine which concrete layout is used. Any midi device can be recognized by the user by using the midi device: motor::contols::midi_device_t

That device though only contains the controls depending on what filled the device with components.

Solution:

  1. By knowing what actual hardware midi device is present some sort of order need to be implied so that the user can choose the control on the hardware to be mapped to some UI for example. This could be done through a tag system that is included in the midi device only.
  2. If no tag is used to determine the hardware only trail and error can aid the user in order to determine the actual compoment on the device. This is necessary because the device system uses components like buttons, knobs, sliders, legs and so forth. A midi device would consist of such components and the concrete type is required in order to set/get the actual device component values.