seqbind: specify MIDI CCs explicitly

This commit is contained in:
derselbst 2017-09-16 21:57:49 +02:00
parent 1d1208efd9
commit 7f3515e136

View file

@ -157,7 +157,7 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
break; break;
case FLUID_SEQ_ALLNOTESOFF: case FLUID_SEQ_ALLNOTESOFF:
fluid_synth_cc(synth, fluid_event_get_channel(evt), 0x7B, 0); fluid_synth_cc(synth, fluid_event_get_channel(evt), ALL_NOTES_OFF, 0);
break; break;
case FLUID_SEQ_BANKSELECT: case FLUID_SEQ_BANKSELECT:
@ -169,8 +169,11 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
break; break;
case FLUID_SEQ_PROGRAMSELECT: case FLUID_SEQ_PROGRAMSELECT:
fluid_synth_program_select(synth, fluid_event_get_channel(evt), fluid_event_get_sfont_id(evt), fluid_synth_program_select(synth,
fluid_event_get_bank(evt), fluid_event_get_program(evt)); fluid_event_get_channel(evt),
fluid_event_get_sfont_id(evt),
fluid_event_get_bank(evt),
fluid_event_get_program(evt));
break; break;
case FLUID_SEQ_ANYCONTROLCHANGE: case FLUID_SEQ_ANYCONTROLCHANGE:
@ -190,72 +193,47 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
break; break;
case FLUID_SEQ_MODULATION: case FLUID_SEQ_MODULATION:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), MODULATION_MSB, fluid_event_get_value(evt));
short ctrl = 0x01; // MODULATION_MSB
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_SUSTAIN: case FLUID_SEQ_SUSTAIN:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), SUSTAIN_SWITCH, fluid_event_get_value(evt));
short ctrl = 0x40; // SUSTAIN_SWITCH
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_PAN: case FLUID_SEQ_PAN:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), PAN_MSB, fluid_event_get_value(evt));
short ctrl = 0x0A; // PAN_MSB
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_VOLUME: case FLUID_SEQ_VOLUME:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), VOLUME_MSB, fluid_event_get_value(evt));
short ctrl = 0x07; // VOLUME_MSB
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_REVERBSEND: case FLUID_SEQ_REVERBSEND:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), EFFECTS_DEPTH1, fluid_event_get_value(evt));
short ctrl = 0x5B; // EFFECTS_DEPTH1
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_CHORUSSEND: case FLUID_SEQ_CHORUSSEND:
{ fluid_synth_cc(synth, fluid_event_get_channel(evt), EFFECTS_DEPTH3, fluid_event_get_value(evt));
short ctrl = 0x5D; // EFFECTS_DEPTH3
fluid_synth_cc(synth, fluid_event_get_channel(evt), ctrl, fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_CHANNELPRESSURE: case FLUID_SEQ_CHANNELPRESSURE:
{
fluid_synth_channel_pressure(synth, fluid_event_get_channel(evt), fluid_event_get_value(evt)); fluid_synth_channel_pressure(synth, fluid_event_get_channel(evt), fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_KEYPRESSURE: case FLUID_SEQ_KEYPRESSURE:
{ fluid_synth_key_pressure(synth,
fluid_synth_key_pressure(synth, fluid_event_get_channel(evt), fluid_event_get_channel(evt),
fluid_event_get_key(evt), fluid_event_get_key(evt),
fluid_event_get_value(evt)); fluid_event_get_value(evt));
}
break; break;
case FLUID_SEQ_SYSTEMRESET: case FLUID_SEQ_SYSTEMRESET:
{
fluid_synth_system_reset(synth); fluid_synth_system_reset(synth);
}
break; break;
case FLUID_SEQ_UNREGISTERING: /* free ourselves */ case FLUID_SEQ_UNREGISTERING: /* free ourselves */
{
seqbind->client_id = -1; /* avoid recursive call to fluid_sequencer_unregister_client */ seqbind->client_id = -1; /* avoid recursive call to fluid_sequencer_unregister_client */
delete_fluid_seqbind(seqbind); delete_fluid_seqbind(seqbind);
}
break; break;
case FLUID_SEQ_TIMER: case FLUID_SEQ_TIMER: