I don't understand this requirement for a separate midi device. Since you already have an environment object doing whatever it is doing, can't you just transform the keyswitch octave on the main keyboard controller into a CC number and then feed that to a smart control that converts it to the articulationID?
For instance, in the following image, a transformer is converting octave C0..B0 into CC100,0..CC100,11. Then your smart control can convert the CC100 values into the articulationID.