[linux-audio-dev] Correct sustain pedal emulation (midi hold controller) ?

Benno Senoner sbenno at gardena.net
Mon Oct 27 11:44:45 UTC 2003


Hi,
I was wondering what's the correct way to handle the sustain pedal when
implementing a MIDI sound generating module.

from the MIDI specs:
-----------
Hold Pedal, controller number: 64:
When on, this holds (ie, sustains) notes that are playing, even if the 
musician releases the notes. (ie, The Note Off effect is postponed until 
the musician switches the Hold Pedal off). If a MultiTimbral device, 
then each Part usually has its own Hold Pedal setting.
Note: When on, this also postpones any All Notes Off controller message 
on the same channel.
Value Range: 0 (to 63) is off. 127 (to 64) is on.
--------------

My question is about ".... holds (ie, sustains) notes that are playing, 
even if the musician releases the notes."

Assume I play a chord, press the hold pedal, which causes the notes to 
be sustained. When I play new notes those are sustained too.
So far so good.
The question arises when I press the same key two times.
Assume no sustain pedal for now.
When I press C2 I hear the note. When I release it the sound does not 
vanish immediately but takes a small amout of time to decay due to the 
release envelope. If after releasing C2 I immediately press C2 again I 
hear two C2 notes for a brief time.

Now same situation as above but with the sustain pedal pressed.
You hear the first C2, release it (the corresponding note-off is 
postponed) and then press C2 again.
In that case is it correct that you must hear two sustained C2 notes.
Or must the first C2 be forced to get faded out  / muted ?
If not (eg you hear two sustained C2 notes), how far can this go ?
Can there be 3, 4 etc sustained notes on the same key too ?

While I am not a piano player,common sense says me thatpiano has only 
one string per key so IMHO it would sound unnatural to play two
notes on the same key.

As you might have guessed I ask this stuff because we want to add
support of sustain in linuxsampler.

thanks for your infos.

PS: a new CVS repository for linuxsampler is up: cvs.linuxsampler.org
interested developers and users please check it out and give us feedback
via our mailing list.
(subscription infos at http://www.linuxsampler.org ).


cheers,
Benno
http://www.linuxsampler.org




More information about the Linux-audio-dev mailing list