⌂ Adding a Special Post Event Function to Implement Precise MIDI Velocity Value Control
This is a small hack to output MIDI file with precise velocity value control. This snippet adds a post event function \vel which enables you to set MIDI velocity value directly on any note event. This is accomplished by overriding score.dynamicAbsoluteVolumeFunction
This hack causes some warning messages to show when rendering scores because lilypond cannot find any proper engraver for numeric values which are supposed to be markup objects but this is ignorable.