linux/sound/synth/emux/emux_nrpn.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  NRPN / SYSEX callbacks for Emu8k/Emu10k1
 *
 *  Copyright (c) 1999-2000 Takashi Iwai <[email protected]>
 */

#include "emux_voice.h"
#include <sound/asoundef.h>

/*
 * conversion from NRPN/control parameters to Emu8000 raw parameters
 */

/* NRPN / CC -> Emu8000 parameter converter */
struct nrpn_conv_table {};

/* effect sensitivity */

#define FX_CUTOFF
#define FX_RESONANCE
#define FX_ATTACK
#define FX_RELEASE
#define FX_VIBRATE
#define FX_VIBDEPTH
#define FX_VIBDELAY
#define FX_NUMS

/*
 * convert NRPN/control values
 */

static int send_converted_effect(const struct nrpn_conv_table *table,
				 int num_tables,
				 struct snd_emux_port *port,
				 struct snd_midi_channel *chan,
				 int type, int val, int mode)
{}

#define DEF_FX_CUTOFF
#define DEF_FX_RESONANCE
#define DEF_FX_ATTACK
#define DEF_FX_RELEASE
#define DEF_FX_VIBRATE
#define DEF_FX_VIBDEPTH
#define DEF_FX_VIBDELAY

/* effect sensitivities for GS NRPN:
 *  adjusted for chaos 8MB soundfonts
 */
static const int gs_sense[] =;

/* effect sensitivities for XG controls:
 * adjusted for chaos 8MB soundfonts
 */
static const int xg_sense[] =;


/*
 * AWE32 NRPN effects
 */

static int fx_delay(int val);
static int fx_attack(int val);
static int fx_hold(int val);
static int fx_decay(int val);
static int fx_the_value(int val);
static int fx_twice_value(int val);
static int fx_conv_pitch(int val);
static int fx_conv_Q(int val);

/* function for each NRPN */		/* [range]  units */
#define fx_env1_delay
#define fx_env1_attack
#define fx_env1_hold
#define fx_env1_decay
#define fx_env1_release
#define fx_env1_sustain
#define fx_env1_pitch
#define fx_env1_cutoff

#define fx_env2_delay
#define fx_env2_attack
#define fx_env2_hold
#define fx_env2_decay
#define fx_env2_release
#define fx_env2_sustain

#define fx_lfo1_delay
#define fx_lfo1_freq
#define fx_lfo1_volume
#define fx_lfo1_pitch
#define fx_lfo1_cutoff

#define fx_lfo2_delay
#define fx_lfo2_freq
#define fx_lfo2_pitch

#define fx_init_pitch
#define fx_chorus
#define fx_reverb
#define fx_cutoff
#define fx_filterQ

static int fx_delay(int val)
{}

static int fx_attack(int val)
{}

static int fx_hold(int val)
{}

static int fx_decay(int val)
{}

static int fx_the_value(int val)
{}

static int fx_twice_value(int val)
{}

static int fx_conv_pitch(int val)
{}

static int fx_conv_Q(int val)
{}


static const struct nrpn_conv_table awe_effects[] =;


/*
 * GS(SC88) NRPN effects; still experimental
 */

/* cutoff: quarter semitone step, max=255 */
static int gs_cutoff(int val)
{}

/* resonance: 0 to 15(max) */
static int gs_filterQ(int val)
{}

/* attack: */
static int gs_attack(int val)
{}

/* decay: */
static int gs_decay(int val)
{}

/* release: */
static int gs_release(int val)
{}

/* vibrato freq: 0.042Hz step, max=255 */
static int gs_vib_rate(int val)
{}

/* vibrato depth: max=127, 1 octave */
static int gs_vib_depth(int val)
{}

/* vibrato delay: -0.725msec step */
static int gs_vib_delay(int val)
{}

static const struct nrpn_conv_table gs_effects[] =;


/*
 * NRPN events
 */
void
snd_emux_nrpn(void *p, struct snd_midi_channel *chan,
	      struct snd_midi_channel_set *chset)
{}


/*
 * XG control effects; still experimental
 */

/* cutoff: quarter semitone step, max=255 */
static int xg_cutoff(int val)
{}

/* resonance: 0(open) to 15(most nasal) */
static int xg_filterQ(int val)
{}

/* attack: */
static int xg_attack(int val)
{}

/* release: */
static int xg_release(int val)
{}

static const struct nrpn_conv_table xg_effects[] =;

int
snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
		    int param)
{}

/*
 * receive sysex
 */
void
snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed,
	       struct snd_midi_channel_set *chset)
{}