mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-25 14:05:12 +00:00
OPLL: add effect to change patch
10xx
This commit is contained in:
parent
30cf8ff00b
commit
9e1b43f401
3 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,7 @@ the YM2413 is equipped with the following features:
|
|||
|
||||
## effects
|
||||
|
||||
- `10xx`: **change patch.**
|
||||
- `11xx`: **set feedback of channel.**
|
||||
- `12xx`: **set operator 1 level.**
|
||||
- `13xx`: **set operator 2 level.**
|
||||
|
|
|
@ -692,6 +692,13 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
|
|||
chan[c.chan].freqChanged=true;
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_WAVE: {
|
||||
if (c.chan>=6 && (crapDrums || properDrums)) break;
|
||||
if (c.chan>=9) break;
|
||||
chan[c.chan].state.opllPreset=c.value&15;
|
||||
rWrite(0x30+c.chan,((15-VOL_SCALE_LOG_BROKEN(chan[c.chan].outVol,15-chan[c.chan].state.op[1].tl,15))&15)|(chan[c.chan].state.opllPreset<<4));
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_FM_FB: {
|
||||
if (c.chan>=9 && !properDrums) return 0;
|
||||
//DivInstrumentFM::Operator& mod=chan[c.chan].state.op[0];
|
||||
|
|
|
@ -550,6 +550,7 @@ void DivEngine::registerSystems() {
|
|||
});
|
||||
|
||||
EffectHandlerMap fmOPLLPostEffectHandlerMap={
|
||||
{0x10, {DIV_CMD_WAVE, "10xx: Set patch (0 to F)"}},
|
||||
{0x11, {DIV_CMD_FM_FB, "11xx: Set feedback (0 to 7)"}},
|
||||
{0x12, {DIV_CMD_FM_TL, "12xx: Set level of operator 1 (0 highest, 3F lowest)", constVal<0>, effectVal}},
|
||||
{0x13, {DIV_CMD_FM_TL, "13xx: Set level of operator 2 (0 highest, 3F lowest)", constVal<1>, effectVal}},
|
||||
|
|
Loading…
Reference in a new issue