[alsa-devel] [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event

maximilian attems max at stro.at
Fri May 9 10:44:54 CEST 2008

When the hardware wavetable synthesizer of an Creative SB Audigy or SB
Live! card (with emu10k chip) receives the MIDI SOFT_PEADAL-press event
(?? 67 127) the appropriate voice is attenuted. Unfortunately when the
pedal is released (event ?? 67 0) the voice does not get it's original
volume again.

Boolean MIDI controls should interpret 0..63 as false and 64..127 as true.
Thanks to Clemens Ladisch for review and correction.

Original patch from "Uwe KrÃ#ger" <uwe_debbug at arcor.de>
Submitted to http://bugs.debian.org/474312

Signed-off-by: maximilian attems <max at stro.at>
Cc: uwe_debbug at arcor.de
Cc: Clemens Ladisch <clemens at ladisch.de>
 sound/synth/emux/emux_synth.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
index 478369b..b343818 100644
--- a/sound/synth/emux/emux_synth.c
+++ b/sound/synth/emux/emux_synth.c
@@ -341,8 +341,12 @@ snd_emux_control(void *p, int type, struct snd_midi_channel *chan)
 		/* FIXME: this is an emulation */
-		snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
+		if (chan->control[type] >= 64)
+			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
+		else
+			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
+				     EMUX_FX_FLAG_OFF);

More information about the Alsa-devel mailing list