Status of Legato
I worked the last days on legato. I first added sample based volume envelopes to Fluidsynth and then started tweaking parameters a bit and fighting some bugs ;)
Before I explain more I want you to show some examples. I created this example score:
The red slurs are the ones rendered with the new legato feature the black one are without it. I general changed the note duration during a slur to 110% so that there is a little overlap between notes.
And rendered it with several standard sound that made sense to me (yes for some it is probably not the right octave and I don't know if it is the best example in the world, but I hope you get an idea ;))
Clarinet (oh my good that sound really needs tweaking the higher notes are horribly distorted - but I think there is a forum thread about it ;))
At first I think just having a overlap between the notes makes the sound a lot better compared to 100% note length (I'll move the start point later). What I'm doing with legato right now is setting the sample start point to the loop start and have a crossfade with about 1200 Samples between the notes. Because that is a fixed value it doesn't sound very good in all circumstances. It might made sense to have that as a parameter. Maybe we can use the value byte of CC68 to change that via Midi. Like 1 means 120 samples and 127 means 1200 samples or something similar. Another possibility would be to have it as a Soundfont parameter but I don't know if it is worth to change specification - but maybe there is a field we could use for that. It would also make sense to have that parameter adapted to key - because you need less crossfade on higher notes and a little bit more on longer notes (that is also the reason I put the fast notes quite low, because it sounds better in this octave ;))
I hope you get an idea and I cannot wait to hear your feedback about this sound!