Mapping Note Length to Velocity in Custom Expression Maps

@Richard_Lanyon, I’m happy to report it was a false alarm; my VST wasn’t quite playing the sounds I expected.

However, I’ve identified the reason I suspected a problem in the first place. There is a minor discrepancy in Velocities set by Expression Maps between MIDI Exports and what a VST receives.

  • Velocities set in Expression Maps between 1 and 84 inclusive have 1 subtracted from them before heading to a VST, but are left as they are in a MIDI Export.
  • Velocities set in Expression Maps between 85 and 127 inclusive are unaltered for both a VST and MIDI Export.

I would argue that this is probably not ideal; with the MIDI Export not identical to the internal MIDI in Dorico. In most cases the difference would be negligible, but probably not in all cases.

I’ve tried to work out why this happens at 84 and 85. My best guess is that this is the result of a rounding error, as the fractions 84/127 and 85/127 are suspiciously close to the fraction 2/3 (≈0.6614 and ≈0.6693 respectively), which is often incorrectly rounded to 0.66 rather than 0.67.

Anyway, I leave that with you. :slight_smile: