I need the development of a C++ application, which compiles and works on Linux, that has the following functionality:
1) Joystick to Midi
a) Creates a MIDI device output (Alsa or JACK via configuration) (The midi device name could be passed via parameter)
b) Pools the configured analog controls and buttons values of a joystick in the background
c) When the value of of the maped controls changes, or a button is pressed, it sends the corresponding midi control values over the created device
For the analog mapping, the program should interpolate the specified input range (For example -256 to 256) to the output range (Normally 0 to 128)
The calibration and mapping of the controls should be configurable via a simple text file.
Example configuration:
_ _ _ _ _ _ _ [login to view URL] snippet:_ _ _ _ _
js_1:
js_control_map: midi_axis_id min_input_value max_input_value min_output_value max_output_value
button_map: js_control button_number note_triggered
...
js_2:
...
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
For the implementation, the RtMidi library seems appropriate for the MIDI part, and gainput for the joystick part.
Please provide clean good OO code, a cmake script or equivalent configuration file is also needed to compile the project.
Thanks.