Notes on, off and all notes off are for a specified midi channel. ( See http://www.indiana.edu/~emusic/etext/MIDI/chapter3_MIDI.shtml for good overview of midi commands and operation. ) As each division would normally have its own midi channel, these commands work per division.
Some keyboard encoders will send all notes off periodically when no key is depressed.
Iain