Sustain pedals - SOLVED

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
Post Reply
varpa
User
Posts: 63
Joined: Thu Dec 09, 2010 8:15 pm

Sustain pedals - SOLVED

Post by varpa » Thu Dec 09, 2010 9:00 pm

...Scroll down for resolution of the problem

I'm a new Linuxsampler user, using LS on AVLinux 4.1. I built LS from CVS so I could have SFZ support so I could play the Salamander piano. Kudos to the developer of Samander piano - it sounds fantastic! (Also thanks to LS being able to play it!). My question is that LS does not seem to make use of my sustain pedal, though I read that sustain pedals should be supported. I have also tried Pianoteq (commercial piano simulation program) and it does use my sustain pedal, so I know that my keyboard is sending the sustain pedal information. Any suggestions about how to get the sustain pedal working with LS?

Later on ... I notice that pushing the sustain pedal causes a slight increase in volume rather than sustain. Also noticed the "FX Sends" and created one for "[64] Damper pedal on/off sustain". This did nothing. Also tried the "Maestro" piano (gig format) - still no sustain.

Thanks.
Last edited by varpa on Thu Mar 03, 2011 6:37 pm, edited 1 time in total.

Alex
Moderator
Posts: 316
Joined: Wed Jan 23, 2008 9:08 pm

Re: Sustain pedals

Post by Alex » Sat Dec 11, 2010 10:30 am

Varpa, have you included a sustain CC line in the SFZ file?

I don't use SFZ at the moment, but from my brief experiments, the file does what it says on the tin. You have to specify which CC commands the SFZ will respond to.

And, are you setting the correct CC in FX sends? Midi is often designated as 1-128, but also responds to 0-127 dependent on what you've designated as the range default.

Alex.

varpa
User
Posts: 63
Joined: Thu Dec 09, 2010 8:15 pm

Re: Sustain pedals

Post by varpa » Tue Dec 21, 2010 5:22 am

Thank you for your response. I infer from your answer that perhaps I need to enable the sustain pedal in the SFZ file and/or LinuxSampler via "FX sends". Here is what I have done so far:

o I used kmidimon to confirm that my keyboard sends the standard midi CC value 64 with 127/0 (on/off)

o In LinuxSampler I added an "FX send" selecting Midi controller 64 sustain pedal. I see that when I press the sustain pedal the Level in FX send goes from left to right, which I assume means that my pedal signal is being received by LinuxSampler. However, the pedal does not make the notes sustain. Instead the volume is increased slightly when the pedal is depressed. (I am a little confused why receiving a signal from the keyboard would be a "send", but maybe I do not understand an "FX send" is actually doing)

o I tried some other piano sounds in LinuxSampler: Maestro Concert Grand(gig), and CGM4LS-Bank1(gig) and an SF2 piano. In all I configured an "FX send" for midi controller 64, and again there is no sustain when the pedal is used, but the volume increases slightly.

So maybe be the issue is that none of these piano sounds have the sustain pedal implemented in the instrument file? This would seem a bit strange for a piano sound not to implement a sustain pedal. In the SFZ file I see this section concerning pedals:

//pedalAction

<group> group=1 hikey=-1 lokey=-1 on_locc64=64 on_hicc64=127 off_by=2 volume=-24

<region> lorand=0 hirand=0.499 sample=44.1khz16bit\pedalD1.wav
<region> lorand=0.500 hirand=1 sample=44.1khz16bit\pedalD2.wav

<group> hikey=-1 lokey=-1 on_locc64=0 on_hicc64=63 group=2 volume=-23

<region> lorand=0 hirand=0.499 sample=44.1khz16bit\pedalU1.wav
<region> lorand=0.500 hirand=1 sample=44.1khz16bit\pedalU2.wav

This looks like it might be configuring for midi cc 64 since I see thing like on_locc64, but I'm not sure what it is really doing.

Well, I remain rather puzzled why it is so hard to get a sustain pedal working. Suggestions welcome.

varpa
User
Posts: 63
Joined: Thu Dec 09, 2010 8:15 pm

Re: Sustain pedals

Post by varpa » Tue Dec 21, 2010 7:45 am

Aha, I have got the sustain pedal working now. I discovered that the sustain pedal works as long as one key is held down. If you remove the last note, the sound stops, even if the pedal is held down. So, to get the sustain pedal working in a normal fashion one has to make sure one key is always down, which I achieve by putting a weight on the lowest note of my keyboard. Not the most elegant solution, but works. I find the sustain works for all instruments (at least the few pianos I mentioned above), and no "FX send" need be set. This behavior seems like a bit of a bug to me, but what do I know.

varpa
User
Posts: 63
Joined: Thu Dec 09, 2010 8:15 pm

Re: Sustain pedals - SOLVED

Post by varpa » Thu Mar 03, 2011 6:32 pm

I finally found out what my real problem is with sustain pedals. I have an old midi keyboard (Roland RD300s from 1989), which puts out a control 123 "All Notes Off" whenever all notes have been released. This "All Notes Off" turns of off the sustain. I have fixed by problem by running my midi stream through a mididings script which removes this control signal. Mididings creates an Alsa midi device with input and output connections so I just route my keyboard through mididings before I send it to LS (I'm using Linux). Here is my mididings script:

#!/usr/bin/python
from mididings import *
run( Filter(CTRL) % ~CtrlFilter(123) )

Post Reply