scrime-u-bordeaux / web-midifile-performer

a web version of the midifile performer software
0 stars 0 forks source link

Conserve velocity between perform and play #31

Closed rblard closed 1 year ago

rblard commented 1 year ago

The idea would be that, when playing at a certain velocity, it becomes the reference for playing afterwards. To do this, we would change the passive playback chord strategy from none to clipped scale, and render using a command that has the last stored velocity from the user (instead of 127).

Choosing the strategy to set on play would depend, not on the value of the stored velocity (which may well be 127 itself), but on a flag. This flag must be reset, as well as the stored velocity, when a new file is uploaded.

rblard commented 1 year ago

(In fact, there is no need to reset the stored velocity, because when the strategy is none, whether the velocity is 1 or 127 has no impact at all.)

rblard commented 1 year ago

Actually, we need to maintain a velocity profile across the loaded file to trigger different velocities for different sections, or else the velocity variations across the file are lost.