* [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
@ 2008-05-08 20:53 maximilian attems
2008-05-09 7:33 ` Clemens Ladisch
0 siblings, 1 reply; 4+ messages in thread
From: maximilian attems @ 2008-05-08 20:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, maximilian attems, uwe_debbug
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.
The attached patch fixes this problem by analysing the value (0 or 127)
of the midi control event and resetting the effect register in case of a
release event. I'm not 100% sure if the code to reset the register is
correct but at least it works.
Original patch from "Uwe KrÃ#ger" <uwe_debbug@arcor.de>
Submitted to http://bugs.debian.org/474312
Cc: uwe_debbug@arcor.de
Signed-off-by: maximilian attems <max@stro.at>
---
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..f81e081 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)
case MIDI_CTL_SOFT_PEDAL:
#ifdef SNDRV_EMUX_USE_RAW_EFFECT
/* FIXME: this is an emulation */
- snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
+ if (chan->control[type])
+ snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
EMUX_FX_FLAG_ADD);
+ else
+ snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
+ EMUX_FX_FLAG_OFF);
#endif
break;
--
1.5.5.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
2008-05-08 20:53 [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event maximilian attems
@ 2008-05-09 7:33 ` Clemens Ladisch
0 siblings, 0 replies; 4+ messages in thread
From: Clemens Ladisch @ 2008-05-09 7:33 UTC (permalink / raw)
To: maximilian attems; +Cc: Takashi Iwai, alsa-devel, uwe_debbug
maximilian attems wrote:
> The attached patch fixes this problem by analysing the value (0 or 127)
> of the midi control event and resetting the effect register in case of a
> release event.
> ...
> + if (chan->control[type])
Boolean MIDI controls should interpret 0..63 as false and 64..127 as
true, i.e.:
+ if (chan->control[type] >= 64)
Regards,
Clemens
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
@ 2008-05-09 8:44 maximilian attems
2008-05-09 10:48 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: maximilian attems @ 2008-05-09 8:44 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Clemens Ladisch, alsa-devel, maximilian attems, uwe_debbug
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@arcor.de>
Submitted to http://bugs.debian.org/474312
Signed-off-by: maximilian attems <max@stro.at>
Cc: uwe_debbug@arcor.de
Cc: Clemens Ladisch <clemens@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)
case MIDI_CTL_SOFT_PEDAL:
#ifdef SNDRV_EMUX_USE_RAW_EFFECT
/* 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,
EMUX_FX_FLAG_ADD);
+ else
+ snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
+ EMUX_FX_FLAG_OFF);
#endif
break;
--
1.5.5.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event
2008-05-09 8:44 maximilian attems
@ 2008-05-09 10:48 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2008-05-09 10:48 UTC (permalink / raw)
To: maximilian attems; +Cc: alsa-devel, Clemens Ladisch, uwe_debbug
At Fri, 9 May 2008 10:44:54 +0200,
maximilian attems wrote:
>
> 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@arcor.de>
> Submitted to http://bugs.debian.org/474312
>
> Signed-off-by: maximilian attems <max@stro.at>
> Cc: uwe_debbug@arcor.de
> Cc: Clemens Ladisch <clemens@ladisch.de>
> ---
> sound/synth/emux/emux_synth.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
Thanks, applied to ALSA tree now.
Takashi
>
> 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)
> case MIDI_CTL_SOFT_PEDAL:
> #ifdef SNDRV_EMUX_USE_RAW_EFFECT
> /* 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,
> EMUX_FX_FLAG_ADD);
> + else
> + snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
> + EMUX_FX_FLAG_OFF);
> #endif
> break;
>
> --
> 1.5.5.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-09 10:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-08 20:53 [PATCH] emux midi synthesizer doesn't honor SOFT_PEDAL-release event maximilian attems
2008-05-09 7:33 ` Clemens Ladisch
-- strict thread matches above, loose matches on Subject: below --
2008-05-09 8:44 maximilian attems
2008-05-09 10:48 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.