[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default midi velocity
Re: default midi velocity
Sun, 05 Apr 2009 23:04:09 +0200
Thunderbird 188.8.131.52 (X11/20090320)
( My mail client is doing strange things ... this is another attempt to
send my message to the mailing list )
On Sat, Apr 04, 2009 at 08:05:17PM -0600, Carl D. Sorensen wrote:
> >> Anybody willing to take this on as a patch? It shouldn't be too
> >> hard, but I imagine it'll take some time grepping through the
> >> source files.
> > If we agree that it's just a case of changing the default velocity,
> > then this is ideally suited to a Frog; on the other hand, it would be
> > great to be able to set the default volume in a \midi block, but that
> > looks much more complicated.
> I agree.
> But the specific request was to have the default value be mf, which I
> should be a not-too-difficult task.
I patched my copy of lilypond and now have a default velocity of 90
instead of 127 (patch attached). I like this better.
But I also discovered things are a bit more complicated. In MIDI there
are 2 totally different ways to control dynamics:
1. Midi Control Change #7 ( Volume control )
2. Note On Velocity
Option 1 is used by lilypond to translate \pp \mf \cresendo etcetera.
Option 2 is set to 127 by default.
If I record playing my digital piano in a midi sequencer my dynamics are
written in midi velocity values. This sounds different than using
Control Change messages. I can explain this: If I hit the keys harder,
not only the volume changes but also the brightness of the tone. This is
accomplished using different sample layers and/or filters in a digital
piano to mimic the sound of a real piano. This effect is re-produced
using the Velocity values in the MIDI information.
A Midi Volume Control Change can be compared to turning the volume knob
or using the sliders on a mixing console: The volume changes, but
without the effect of the changing color of the sound.
That is why dynamics that are written in a MIDI file produced directly
by lilypond don't sound as natural and realistic as is possible using
MIDI. Imagine recording a piano player who plays everything ff, and the
recording engineer takes care of the dynamics using the sliders of the
mixing console. Not quite the real thing ;-)
Just some thoughts about MIDI.
Now let's make beautiful scores again using Lilypond.
If you want a default velocity of 90 instead of 127: patch attached.
diff -ur lilypond-2.13.0.orig/lily/midi-item.cc
--- lilypond-2.13.0.orig/lily/midi-item.cc 2009-04-05 21:11:25.000000000
+++ lilypond-2.13.0/lily/midi-item.cc 2009-04-05 21:17:43.000000000 +0200
@@ -169,7 +169,8 @@
Midi_note::Midi_note (Audio_note *a)
audio_ = a;
- dynamic_byte_ = 0x7f;
+ dynamic_byte_ = 0x5a;
+ // dynamic_byte_ = 0x7f;
Re: default midi velocity,
Martin Tarenskeen <=