mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
Merge pull request #176 from FluidSynth/drum_bank
allow bank changes on drum channels
This commit is contained in:
commit
8630762b9c
3 changed files with 5 additions and 3 deletions
|
@ -482,6 +482,7 @@ The following table provides details on all the settings used by the synthesizer
|
||||||
<li>xg: CC32 becomes the bank number, CC0 is ignored.</li>
|
<li>xg: CC32 becomes the bank number, CC0 is ignored.</li>
|
||||||
<li>mma: bank is calculated as CC0*128+CC32.</li>
|
<li>mma: bank is calculated as CC0*128+CC32.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Note: Drum channels are initialized to \c DRUM_INST_BANK (==128). Since 1.1.7 mma mode also allows the bank of drum channels to be changed the same way as for melodic channels.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ fluid_channel_set_bank_msb(fluid_channel_t* chan, int bankmsb)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (style == FLUID_BANK_STYLE_GM ||
|
if (style == FLUID_BANK_STYLE_GM ||
|
||||||
chan->channel_type == CHANNEL_TYPE_DRUM)
|
(chan->channel_type == CHANNEL_TYPE_DRUM && style != FLUID_BANK_STYLE_MMA))
|
||||||
return; /* ignored */
|
return; /* ignored */
|
||||||
|
|
||||||
oldval = chan->sfont_bank_prog;
|
oldval = chan->sfont_bank_prog;
|
||||||
|
|
|
@ -1945,7 +1945,8 @@ fluid_synth_program_change(fluid_synth_t* synth, int chan, int prognum)
|
||||||
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
|
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
|
||||||
|
|
||||||
channel = synth->channel[chan];
|
channel = synth->channel[chan];
|
||||||
if (channel->channel_type == CHANNEL_TYPE_DRUM)
|
if (channel->channel_type == CHANNEL_TYPE_DRUM &&
|
||||||
|
chan->synth->bank_select != FLUID_BANK_STYLE_MMA)
|
||||||
banknum = DRUM_INST_BANK;
|
banknum = DRUM_INST_BANK;
|
||||||
else
|
else
|
||||||
fluid_channel_get_sfont_bank_prog(channel, NULL, &banknum, NULL);
|
fluid_channel_get_sfont_bank_prog(channel, NULL, &banknum, NULL);
|
||||||
|
|
Loading…
Reference in a new issue