contains method
Checks if the region covers the given key and velocity. Arg: The key of a note. Arg: The velocity of a note. Retursn true if the region covers the given key and velocity.
Implementation
bool contains(int key, int velocity) {
bool containsKey = keyRangeStart() <= key && key <= keyRangeEnd();
bool containsVelocity =
velocityRangeStart() <= velocity && velocity <= velocityRangeEnd();
return containsKey && containsVelocity;
}