mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
Add separate NRPN coarse/fine adjustment for WildMidi
This commit is contained in:
parent
7f44bc6d0e
commit
88beae55bd
1 changed files with 28 additions and 18 deletions
|
@ -1794,9 +1794,19 @@ static void do_control_data_decrement(struct _mdi *mdi,
|
||||||
mdi->channel[ch].pitch_range--;
|
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) {
|
struct _event_data *data) {
|
||||||
unsigned char ch = data->channel;
|
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;
|
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 64: do_control_channel_hold(mdi, &ev); break;
|
||||||
case 96: do_control_data_increment(mdi, &ev); break;
|
case 96: do_control_data_increment(mdi, &ev); break;
|
||||||
case 97: do_control_data_decrement(mdi, &ev); break;
|
case 97: do_control_data_decrement(mdi, &ev); break;
|
||||||
case 98:
|
case 98: do_control_non_registered_param_fine(mdi, &ev); break;
|
||||||
case 99: do_control_non_registered_param(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 100: do_control_registered_param_fine(mdi, &ev); break;
|
||||||
case 101: do_control_registered_param_course(mdi, &ev); break; // [sic]
|
case 101: do_control_registered_param_course(mdi, &ev); break; // [sic]
|
||||||
case 120: do_control_channel_sound_off(mdi, &ev); break;
|
case 120: do_control_channel_sound_off(mdi, &ev); break;
|
||||||
|
|
Loading…
Reference in a new issue