Hello everyone
I’d like to formally report a bug that I identified in the middle of this monster thread I wrote last year. This particular bug may have got lost in the noise from other issues I was investigating, and I can see that it hasn’t been addressed yet in Dorico 5.1.51, which I am currently on.
In short, the Velocity used for VST Playback and Audio Export is not always the same as the Velocity used for MIDI Export; any Velocity less than or equal to 84 will have 1 subtracted before going to VST Playback or Audio Export. It doesn’t matter whether the Velocity is assigned automatically, manually or via an Expression Map.
I can demonstrate the bug with this Dorico file. It contains three instruments playing the same 14-note passage of music; the first uses dynamic markings to assign Velocity automatically, the second has the Velocity assigned manually in the Key Editor, and the third has the Velocity assigned through an Expression Map named EM Velocity.
In the image below, I’ll write in the Velocities that have been assigned under the notes in blue. Click to enlarge.
Each of these instruments is being sent to a separate instance of HALion Sonic 7, each of which has 14 programs of Acoustic Grand Piano with a restricted velocity (matching with the assignments in Dorico), all on channel 1.
So in theory, each note should sound because every Velocity in Dorico matches with one of the programs in HALion Sonic 7. However, when you initiate playback, only the following notes sound.
This proves that some of the Velocity values are being changed before they make it to the VST.
I have discovered, during my deep-dive investigations, that any Velocity ≤ 84 has 1 subtracted from it before going to the VST, and in these examples (in which I deliberately set the Velocity gaps to be more than 1), no program is available to create a sound for the notes in which the Velocity has been changed. Only notes with Velocity > 84 are correct.
Here is an image of the waveform produced from an Audio Export alongside the score, to demonstrate that this produces the same result.
However, on MIDI Export, I have independently verified that all Velocity values are correct, regardless of whether Velocity ≤ 84 or Velocity > 84.
In my previous post, I attempted to guess as to why this bug might have occured.
As it happens, I’m a mathematician in my other life, so I would be very happy to help the Dorico team identify the source of this numerical error if someone could show me the line(s) of code that performs these Velocity calculations.
Anyway, I understand that in most cases, any differences between the Audio Export and MIDI Export because of this bug would be too small to be noticed audibly. The reason why I picked up on this is that I’m working with a VST that uses specific Velocity values to trigger specific samples, so having the correct Velocity values sent to the VST is very important in my case.
In any event, I feel as though Dorico’s output should be identical in principle, regardless of whether Audio Export or MIDI Export are used.
Thank you for your time.