Currently I have solved it this way: APC Mini sends Midi notes → Script converts Midi notes to PC → PC switches Rackspaces → In each Rackspace there is a Midi Out. This sends a Midi Note on to the APC Mini, which corresponds to the pressed button. The remaining button LEDs are switched off with a Note on Velocity 00 command.
This works very well, but it is very complex to program. I can copy and paste the midi out to any rackspace, but there are a few problems:
To turn off an LED, the midi out must be set to note on vel 00. Note off does not work. When I open the configuration of the Midi Out to adjust the settings, the set values are displayed correctly in the lower right window. But when I open the editor to adjust the values ALL velocity values are set to 64! This means that I have to set 256 velocity values manually for switching 16 rackspaces. This should be more elegant to solve.
These commands are received by the APC Mini
Button No = Note No
Note on [Button No] Vel 00 switches LED off
Note on [Button No] Vel 01 switches LED green
Note on [Button No] Vel 02 switches LED green flashing
Note on [Button No] Vel 03 switches LED red
Note on [Button No] Vel 04 switches LED red flashing
Note on [Button No] Vel 05 switches LED yellow
Note on [Button No] Vel 06 switches LED yellow flashing
I think I will leave the array like this, because maybe later I will rearrange the function groups on the APC Mini in columns (that would be 56, 48, 40, 32 …). Also the switching off of the LEDs I will have to do individually, since a loop then also no longer works.
As I said, I have no idea about programming…
Are the previous and the current Rackstate “Numbers” automatically stored here?
On Rackspace(oldRackspaceIndex : integer, newRackspaceIndex : integer)
I then just add the following line to the above example:
SendNowToMidiOutDevice("IAC Driver Bus 1", MakeNoteMessage(oldRackspaceIndex, 0)).
Is that correct?
Where can I find the “string format of the port name”?