Lines Matching +full:0 +full:- +full:127
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
15 /* NRPN / CC -> Emu8000 parameter converter */
24 #define FX_CUTOFF 0
44 for (i = 0; i < num_tables; i++) { in send_converted_effect()
52 return 0; in send_converted_effect()
96 #define fx_env1_delay fx_delay /* [0,5900] 4msec */
97 #define fx_env1_attack fx_attack /* [0,5940] 1msec */
98 #define fx_env1_hold fx_hold /* [0,8191] 1msec */
99 #define fx_env1_decay fx_decay /* [0,5940] 4msec */
100 #define fx_env1_release fx_decay /* [0,5940] 4msec */
101 #define fx_env1_sustain fx_the_value /* [0,127] 0.75dB */
102 #define fx_env1_pitch fx_the_value /* [-127,127] 9.375cents */
103 #define fx_env1_cutoff fx_the_value /* [-127,127] 56.25cents */
105 #define fx_env2_delay fx_delay /* [0,5900] 4msec */
106 #define fx_env2_attack fx_attack /* [0,5940] 1msec */
107 #define fx_env2_hold fx_hold /* [0,8191] 1msec */
108 #define fx_env2_decay fx_decay /* [0,5940] 4msec */
109 #define fx_env2_release fx_decay /* [0,5940] 4msec */
110 #define fx_env2_sustain fx_the_value /* [0,127] 0.75dB */
112 #define fx_lfo1_delay fx_delay /* [0,5900] 4msec */
113 #define fx_lfo1_freq fx_twice_value /* [0,127] 84mHz */
114 #define fx_lfo1_volume fx_twice_value /* [0,127] 0.1875dB */
115 #define fx_lfo1_pitch fx_the_value /* [-127,127] 9.375cents */
116 #define fx_lfo1_cutoff fx_twice_value /* [-64,63] 56.25cents */
118 #define fx_lfo2_delay fx_delay /* [0,5900] 4msec */
119 #define fx_lfo2_freq fx_twice_value /* [0,127] 84mHz */
120 #define fx_lfo2_pitch fx_the_value /* [-127,127] 9.375cents */
122 #define fx_init_pitch fx_conv_pitch /* [-8192,8192] cents */
123 #define fx_chorus fx_the_value /* [0,255] -- */
124 #define fx_reverb fx_the_value /* [0,255] -- */
125 #define fx_cutoff fx_twice_value /* [0,127] 62Hz */
126 #define fx_filterQ fx_conv_Q /* [0,127] -- */
150 return (unsigned short)(val & 0xff); in fx_the_value()
155 return (unsigned short)((val * 2) & 0xff); in fx_twice_value()
165 return (unsigned short)((val / 8) & 0xff); in fx_conv_Q()
171 { 0, EMUX_FX_LFO1_DELAY, fx_lfo1_delay},
211 return (val - 64) * gs_sense[FX_CUTOFF] / 50; in gs_cutoff()
214 /* resonance: 0 to 15(max) */
217 return (val - 64) * gs_sense[FX_RESONANCE] / 50; in gs_filterQ()
223 return -(val - 64) * gs_sense[FX_ATTACK] / 50; in gs_attack()
229 return -(val - 64) * gs_sense[FX_RELEASE] / 50; in gs_decay()
235 return -(val - 64) * gs_sense[FX_RELEASE] / 50; in gs_release()
241 return (val - 64) * gs_sense[FX_VIBRATE] / 50; in gs_vib_rate()
244 /* vibrato depth: max=127, 1 octave */
247 return (val - 64) * gs_sense[FX_VIBDEPTH] / 50; in gs_vib_depth()
250 /* vibrato delay: -0.725msec step */
253 return -(val - 64) * gs_sense[FX_VIBDELAY] / 50; in gs_vib_delay()
282 if (chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 127 && in snd_emux_nrpn()
283 chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB] <= 26) { in snd_emux_nrpn()
287 val = (chan->control[MIDI_CTL_MSB_DATA_ENTRY] << 7) | in snd_emux_nrpn()
288 chan->control[MIDI_CTL_LSB_DATA_ENTRY]; in snd_emux_nrpn()
289 val -= 8192; in snd_emux_nrpn()
292 port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB], in snd_emux_nrpn()
297 if (port->chset.midi_mode == SNDRV_MIDI_MODE_GS && in snd_emux_nrpn()
298 chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 1) { in snd_emux_nrpn()
302 val = chan->control[MIDI_CTL_MSB_DATA_ENTRY]; in snd_emux_nrpn()
305 port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB], in snd_emux_nrpn()
319 return (val - 64) * xg_sense[FX_CUTOFF] / 64; in xg_cutoff()
322 /* resonance: 0(open) to 15(most nasal) */
325 return (val - 64) * xg_sense[FX_RESONANCE] / 64; in xg_filterQ()
331 return -(val - 64) * xg_sense[FX_ATTACK] / 64; in xg_attack()
337 return -(val - 64) * xg_sense[FX_RELEASE] / 64; in xg_release()
354 chan->control[param], in snd_emux_xg_control()
371 emu = port->emu; in snd_emux_sysex()
378 if (emu->ops.sysex) in snd_emux_sysex()
379 emu->ops.sysex(emu, buf, len, parsed, chset); in snd_emux_sysex()