You are here

Add new comment

Hey Rui,

so ok (after some days of holiday): Here you can find my first tries to implement the so called "MidiControllerMap". Please be aware that this is only a fast try to get into it. Unfortunately it is based on sources from 0.4.1 but I think, that's ok for a discussion about how to go on. I think you have to add the new class to the makefiles .... i just added them by hand...

So here's what I did (or better: What I wanted to do *g*):
I created a class "qtractorMidiController" (which should be renamed to "qtractorMidiControllerMap"). It includes a MidiControllerMap which maps Midi CC messages to functions with its parameters. This is something like they did in hydrogen. At the moment, this map has no gui, so I create the map in the constructor by hand. At the moment, I am configuring 8 channels with PAN, LEVEL and MUTE functionality.

One of the biggest problems is, that at the moment, the COMMANDs do all the updates of the GUI and other things. Thats why I added a call to MidiControllerMap for all the TrackGainCommands, TrackButtonCommands and TrackPanCommands, I think, the commands should only update the model data, and then, the observer pattern could be used, to update the GUI and all the other stuff. My "MidiController" would then be another subscriber of the model data. What do you think?

The function "resendControllersOut" is used, to actualize all the outside controllers, but at the moment, the data is not initialized when loading a session. I think, this will also be fixed with the observer-pattern.

The last thing, is, that I did not manage to build the right converting function from MIDI CC messages with its ranges to the db values of the TrackGains .... but that's another issue....

It would be great if you could have a look at the code and maybe test the functions (just connect the BCF to the dedicated control ports of qtractor)... and then, give me some instructions... as far as you think that I am able to help you....

regards,
mathias alias gizzmo