Discussion:
[fluid-dev] MIDI piano + sustain pedal realism
S.
2018-08-04 01:01:41 UTC
Permalink
Hi everyone,

I'm new to the world of MIDI, although I've used Linux for a really long time. Anything that I do with a computer I pretty much require that it works with Linux or else I'm not interested. I've played piano most of my life and I've recently been looking into a fairly realistic and inexpensive way to go digital. So I recently bought a slightly used M-AUDIO 88es at a great price, and I connected it to an old laptop running openSUSE Leap 15.0 . Basically, I was able to plugin in the controller/keyboard and connect it to a software synthesizer via qjackctl, and I am able to play music. So that's the important part. :-) Now there are just a few oddities and bugs I'm running into, mostly relating to the naturalness of the sustain pedal behavior with anything that uses FluidSynth (qsynth or SF2 Player in LMMS):

1. The sustain pedal works, but not like a real piano. After hitting some keys, releasing the keys, and then immediately depressing the sustain pedal while there is still residual resonant sound, it does not sustain the resonant sound. At least, it normally doesn't-- but for a short period I was constantly switching back and forth between qsampler and qsynth and restarting Jack, and at some point the sustain pedal starting acting like a real piano under qsynth, sustaining the resonant sound after releasing keys. ?!?!?! But I can't repeat it now.

2. I really like the Yamaha Salamander soundfont from SoundFonts4U, but it appears that FluidSynth doesn't reproduce the sustain pedal release noises that some of the instruments have there, which I would really like to have. Is this an SF2 format limitation or a FluidSynth limitation?

Any other options or tips or workarounds? Thanks in advance!
Aere Greenway
2018-08-04 01:33:40 UTC
Permalink
Post by S.
Hi everyone,
I'm new to the world of MIDI, although I've used Linux for a really
long time. Anything that I do with a computer I pretty much require
that it works with Linux or else I'm not interested. I've played piano
most of my life and I've recently been looking into a fairly realistic
and inexpensive way to go digital. So I recently bought a slightly
used M-AUDIO 88es at a great price, and I connected it to an old
laptop running openSUSE Leap 15.0 . Basically, I was able to plugin in
the controller/keyboard and connect it to a software synthesizer via
qjackctl, and I am able to play music. So that's the important part.
:-) Now there are just a few oddities and bugs I'm running into,
mostly relating to the naturalness of the sustain pedal behavior with
1. The sustain pedal works, but not like a real piano. After hitting
some keys, releasing the keys, and then immediately depressing the
sustain pedal while there is still residual resonant sound, it does
not sustain the resonant sound. At least, it normally doesn't-- but
for a short period I was constantly switching back and forth between
qsampler and qsynth and restarting Jack, and at some point the sustain
pedal starting acting like a real piano under qsynth, sustaining the
resonant sound after releasing keys. ?!?!?! But I can't repeat it now.
2. I really like the Yamaha Salamander soundfont from SoundFonts4U,
but it appears that FluidSynth doesn't reproduce the sustain pedal
release noises that some of the instruments have there, which I would
really like to have. Is this an SF2 format limitation or a FluidSynth
limitation?
Any other options or tips or workarounds? Thanks in advance!
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
From using different sustain pedals, I have gotten the impression that
some of them use different polarities for pedal-down, versus pedal-up. 
I think it assumes that whatever the state of the sustain-pedal is when
the MIDI software initializes, is 'pedal-released'.

I also saw once, a friend of mine was sure the sustain pedal wasn't
working, when what actually happened, is he (absent-mindedly) had his
foot on the pedal when he started up his MIDI software (he was using
Rosegarden), in response to which, the pedal from that point forward,
acted the opposite way he expected it to (pedal-down = pedal-release,
and pedal-up = pedal-engage).

Hopefully, something like the above is not confusing the issue for you.

By the way, I use an M-Audio KeyStation-88, and it has worked very well
for me.  I have not only a sustain-pedal on it, but also a volume-pedal
(which has its own set of pit-falls you have to be careful about).

I have also encountered a sustain-pedal for a Yamaha S90-es, that if you
released the sustain-pedal half-way, it was supposed to have a different
effect on that synthesizer, though I never observed it to work as the
manual claimed.
--
Sincerely,
Aere
Aere Greenway
2018-08-04 01:46:04 UTC
Permalink
Post by S.
The sustain pedal works, but not like a real piano. After hitting some
keys, releasing the keys, and then immediately depressing the sustain
pedal while there is still residual resonant sound, it does not
sustain the resonant sound. At least, it normally doesn't
With a physical piano, when you hit a key, the damper-pad for that note
raises up, so the string will make the sound of the note, and when you
release the key, the damper-pad for that note will come down against the
string, damping (ending) the sound of the note.

I think, if after playing a note, you very quickly pressed the sustain
pedal (before the note has completely died) the remaining sound of the
note will then resonate with the strings of other notes, since the
sustain pedal raises all the damper pads off of the strings for all of
the notes.

As far as I know, MIDI doesn't work that way.  Any notes that are still
playing (a note-on, but not yet a note-off) when the sustain pedal is
pressed, will be sustained (keep playing, even after a note-off for the
note is received), until you release the sustain pedal.

Hopefully, you are not actually talking about the sostenuto (middle)
pedal, which does something very different from the sustain-pedal.
--
Sincerely,
Aere
S.
2018-08-04 02:14:47 UTC
Permalink
Hi Aere, thanks a lot for the reply.
Hopefully, you are not actually talking about the sostenuto (middle) pedal, which does something very different from the sustain-pedal.
Nope, just the regular sustain pedal.
I think, if after playing a note, you very quickly pressed the sustain pedal (before the note has completely died) the remaining sound of the note will then resonate with the strings of other notes, since the sustain pedal raises all the damper pads off of the strings for all of the notes.
Hmm, yes, that must be the actual technical behavior that I'm thinking of. But just functionally speaking, a real piano doesn't have hard binary on/off cuts, you can always sustain the "resonant sound" before the note completely dies off.
As far as I know, MIDI doesn't work that way.
Interestingly, LinuxSampler does. It truly feels like a real piano in that sense. For example, I can play a forte single note or chord on my keyboard, completely release the keys, and then immediately press the sustain pedal, and it sustains the resonant sound. Quite impressive. Or alternately, I can press the sustain pedal, play a forte note or chord and release the key(s), and then release and immediately depress again the sustain pedal, and it continues to sustain the leftover resonance. If you give LinuxSampler a try I suspect you'll see what I mean. It's impressive in that sense, but for other reasons I don't really like LinuxSampler (poor SF2 support, and not as good GUI options).
I also saw once, a friend of mine was sure the sustain pedal wasn't working, when what actually happened, is he (absent-mindedly) had his foot on the pedal when he started up his MIDI software (he was using Rosegarden), in response to which, the pedal from that point forward, acted the opposite way he expected it to (pedal-down = pedal-release, and pedal-up = pedal-engage).
Interesting, I just tried this on purpose, and it does indeed behave as you described. But that's not what normally happens to me. With FluidSynth, the sustain pedal works "normally / correctly", it just feels a lot more synthetic and digital than LinuxSampler.
S.
2018-08-04 18:58:00 UTC
Permalink
OK, that's good to know, so it's an SF2 thing (limitation in my opinion).
Post by Tom M.
The site lists at least four soundfonts containing the names Yahama
and Salamander. Please be more specific.
1) Salamander, Steinways and Upright Pianos"
https://drive.google.com/file/d/0B3zFERJ2rMQpVUJfMWRqUGRtc3M/view?usp=sharing
Tom M.
2018-08-04 19:44:07 UTC
Permalink
Post by S.
OK, that's good to know, so it's an SF2 thing (limitation in my opinion).
You could use modulators to manipulate (i.e. increase in your case)
the release time of the volume envelope depending on CC64. Not sure if
it works, never did this myself before. And the shorter the default
release time of the instrument is, the more difficult it will be to
actually time CC64 correctly so that there is enough sound remaining
for being played elongated. You'll need to have a more detailed look
into SF2 modulators and editors in case.

Thanks for the file. Will test it when I have a proper internet
connection again.

Tom
Tom M.
2018-08-04 15:29:29 UTC
Permalink
Post by S.
The sustain pedal works, but not like a real piano.
Ofc. It works exactly as requested by the SF2 spec:

MIDI CC64 Sustain - ACTIVE when greater than or equal to 64. When the
sustain function is active, all notes in the key-on state remain in
the key-on state regardless of whether a key-off command for the note
arrives. The key-off commands are stored, and when sustain becomes
inactive, all stored key-off commands are executed.

Which means that any notes that just received a note-off event and are
still playing in release phase, are **not** being sustained when the
pedal is depressed.
Post by S.
the Yamaha Salamander soundfont from SoundFonts4U [...] doesn't reproduce the sustain pedal release noises
The site lists at least four soundfonts containing the names Yahama
and Salamander. Please be more specific.

Tom
Tom M.
2018-08-14 14:23:07 UTC
Permalink
Post by S.
2. I really like the Yamaha Salamander soundfont from SoundFonts4U, but it appears that FluidSynth doesn't reproduce the sustain pedal release noises that some of the instruments have there, which I would really like to have. Is this an SF2 format limitation or a FluidSynth limitation?
I cant find anything like a "sustain pedal release noise" in the soundfont itself. I dont know what you expect to happen or when/how this is supposed to play. At least the SF2 spec doesnt say anything about a noise being played when CC64 goes <64. Whereever you've heard that, it's probably a custom feature.

Tom
S.
2018-08-18 15:02:01 UTC
Permalink
Post by Tom M.
I cant find anything like a "sustain pedal release noise" in the soundfont
itself. I dont know what you expect to happen or when/how this is supposed to
play. At least the SF2 spec doesnt say anything about a noise being played when
CC64 goes <64. Whereever you've heard that, it's probably a custom feature.
Hi Tom, it looks like you're right, at least the SF2 files available from Soundfonts4U do not have pedal release noises.

So my only valid complaint in this thread is regarding sustaining the residual resonant sounds after immediate pedal release-depress. But it also appears that the current behavior of FluidSynth conforms to the SF2 spec, so probably no hope to change that either. What I've been doing is converting the SF2 files to SFZ with Polyphone (polyphone-soundfonts.com/en/download), and running those in LinuxSampler. This gives me the very realistic sustain pedal behavior I prefer.
Ceresa Jean-Jacques
2018-08-22 16:43:53 UTC
Permalink
Post by S.
So my only valid complaint in this thread is regarding sustaining the residual resonant sounds after immediate pedal release-depress.
I you wish to get this sound shape effect  you have to add this yourself by adding instructions in the soundfont (as proposzd by Tom's answer).

What you hear from a real piano after doing an immediat release-depress is the natural resonnant of the most recent notes being free to decay slowly.

 

 
Post by S.
But it also appears that the current behavior of FluidSynth conforms to the SF2 spec, so probably no hope to change that either.
This is a default behaviour for piano. This is not a default behaviour for many others instruments without large body. So it couldn't be the default behaviour

of the sound engine of a sf2 syntesizer.

However any sound designer is free to add custom real time sound shape by described this in the soundfont. for sf2 soundfont theses description

have to be made via the concept of "modulators".

I you wish to get this "decay" effect (after immediate sustain pedal depresse) you have to add this yourself by adding  in the soundfont (as proposed by Tom's answer).

I feel you should add a modulator with CC 64 (sustain) on input and Release generator on output. The amount of modulator must be adjusted to augment the release time to the value

proposed for the "decay time generator".

 

 
Post by S.
Message du 18/08/18 17:09
De : "S."
A : "FluidSynth mailing list"
Objet : Re: [fluid-dev] MIDI piano + sustain pedal realism
Post by Tom M.
I cant find anything like a "sustain pedal release noise" in the soundfont
itself. I dont know what you expect to happen or when/how this is supposed to
play. At least the SF2 spec doesnt say anything about a noise being played when
CC64 goes <64. Whereever you've heard that, it's probably a custom feature.
Hi Tom, it looks like you're right, at least the SF2 files available from Soundfonts4U do not have pedal release noises.
So my only valid complaint in this thread is regarding sustaining the residual resonant sounds after immediate pedal release-depress. But it also appears that the current behavior of FluidSynth conforms to the SF2 spec, so probably no hope to change that either. What I've been doing is converting the SF2 files to SFZ with Polyphone (polyphone-soundfonts.com/en/download), and running those in LinuxSampler. This gives me the very realistic sustain pedal behavior I prefer.
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Loading...