Still working on my MIDI step sequencer, I want to use an array to let the user draw velocity values for each of the steps in the sequence. Is there any way to prevent the user from drawing outside the boundary of the array? The array is defined to have a lower limit of 0 and an upper limit of 127 (the valid range of values for velocity in a MIDI note msg). I can clip the values, of course, to fall within the range of 0 to 127, but it would be nice if I could prevent invalid values from being drawn in the first place.


