Add to Expression Maps: Note Length conditions by the duration in ms, given the current tempo

In some ways it is a bit vague and in other ways not.

They are described in the documentation (which I have reworded here for clarity):

  • Very short: Any note 0.1875 seconds or shorter
  • Short: Any note longer than “very short” and no more than 0.375 seconds in length
  • Medium: Any note longer than “short” and no more than 0.75 seconds in length
  • Long: Any note longer “medium” and no more than 1.5 seconds in length
  • Very long: Any note longer than 1.5 seconds in length

These number of seconds correspond with the duration of a dotted sixteenth, dotted eighth, dotted quarter, and dotted half note at 120bpm respectively.

The grouping is quite simple becuase it can be understood as an enumerated type, integers 0-4 of 5 different categories, and each note only has to fall into one category. Limiting things to 5 integers (one of those 5 categories) would minimize processing overhead.

I expect allowing exact durations in note length conditions might have some negative performance impact, as otherwise they probably would have done it from the beginning. I don’t have any inside knowledge of course but I do have some programming experience, and breaking things into categories with enumerated types means you’re doing integer operations instead of floating point, so lower cost.

This was previously requested here: Expression Maps Condition Ranges

And possibly one other time as well, I don’t recall exactly.