Add separate NRPN coarse/fine adjustment for WildMidi

This commit is contained in:
Randy Heit 2016-01-11 19:15:27 -06:00
parent 7f44bc6d0e
commit 88beae55bd

View file

@ -1794,9 +1794,19 @@ static void do_control_data_decrement(struct _mdi *mdi,
mdi->channel[ch].pitch_range--;
}
}
static void do_control_non_registered_param(struct _mdi *mdi,
static void do_control_non_registered_param_fine(struct _mdi *mdi,
struct _event_data *data) {
unsigned char ch = data->channel;
mdi->channel[ch].reg_data = (mdi->channel[ch].reg_data & 0x3F80)
| data->data;
mdi->channel[ch].reg_non = 1;
}
static void do_control_non_registered_param_course(struct _mdi *mdi,
struct _event_data *data) {
unsigned char ch = data->channel;
mdi->channel[ch].reg_data = (mdi->channel[ch].reg_data & 0x7F)
| (data->data << 7);
mdi->channel[ch].reg_non = 1;
}
@ -2923,8 +2933,8 @@ void WildMidi_Renderer::ShortEvent(int status, int parm1, int parm2)
case 64: do_control_channel_hold(mdi, &ev); break;
case 96: do_control_data_increment(mdi, &ev); break;
case 97: do_control_data_decrement(mdi, &ev); break;
case 98:
case 99: do_control_non_registered_param(mdi, &ev); break;
case 98: do_control_non_registered_param_fine(mdi, &ev); break;
case 99: do_control_non_registered_param_course(mdi, &ev); break; // [sic]
case 100: do_control_registered_param_fine(mdi, &ev); break;
case 101: do_control_registered_param_course(mdi, &ev); break; // [sic]
case 120: do_control_channel_sound_off(mdi, &ev); break;