mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 21:45:12 +00:00
parent
805c3ba7ac
commit
d5776e02bb
3 changed files with 29 additions and 11 deletions
|
@ -468,6 +468,17 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
|
||||||
drumActivated[c.chan-6]=true;
|
drumActivated[c.chan-6]=true;
|
||||||
if (c.value!=DIV_NOTE_NULL) {
|
if (c.value!=DIV_NOTE_NULL) {
|
||||||
if (chan[c.chan].state.opllPreset==16 && chan[c.chan].state.fixedDrums) {
|
if (chan[c.chan].state.opllPreset==16 && chan[c.chan].state.fixedDrums) {
|
||||||
|
if (fixedAll) {
|
||||||
|
chan[6].fixedFreq=(chan[c.chan].state.kickFreq&511)<<(chan[c.chan].state.kickFreq>>9);
|
||||||
|
chan[7].fixedFreq=(chan[c.chan].state.snareHatFreq&511)<<(chan[c.chan].state.snareHatFreq>>9);
|
||||||
|
chan[8].fixedFreq=(chan[c.chan].state.tomTopFreq&511)<<(chan[c.chan].state.tomTopFreq>>9);
|
||||||
|
chan[9].fixedFreq=(chan[c.chan].state.tomTopFreq&511)<<(chan[c.chan].state.tomTopFreq>>9);
|
||||||
|
chan[10].fixedFreq=(chan[c.chan].state.snareHatFreq&511)<<(chan[c.chan].state.snareHatFreq>>9);
|
||||||
|
|
||||||
|
chan[7].freqChanged=true;
|
||||||
|
chan[8].freqChanged=true;
|
||||||
|
chan[9].freqChanged=true;
|
||||||
|
} else {
|
||||||
switch (c.chan) {
|
switch (c.chan) {
|
||||||
case 6:
|
case 6:
|
||||||
chan[c.chan].fixedFreq=(chan[c.chan].state.kickFreq&511)<<(chan[c.chan].state.kickFreq>>9);
|
chan[c.chan].fixedFreq=(chan[c.chan].state.kickFreq&511)<<(chan[c.chan].state.kickFreq>>9);
|
||||||
|
@ -479,6 +490,7 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
|
||||||
chan[c.chan].fixedFreq=(chan[c.chan].state.tomTopFreq&511)<<(chan[c.chan].state.tomTopFreq>>9);
|
chan[c.chan].fixedFreq=(chan[c.chan].state.tomTopFreq&511)<<(chan[c.chan].state.tomTopFreq>>9);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value);
|
chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value);
|
||||||
}
|
}
|
||||||
|
@ -1076,6 +1088,7 @@ void DivPlatformOPLL::setFlags(const DivConfig& flags) {
|
||||||
oscBuf[i]->rate=rate/2;
|
oscBuf[i]->rate=rate/2;
|
||||||
}
|
}
|
||||||
noTopHatFreq=flags.getBool("noTopHatFreq",false);
|
noTopHatFreq=flags.getBool("noTopHatFreq",false);
|
||||||
|
fixedAll=flags.getBool("fixedAll",false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformOPLL::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
int DivPlatformOPLL::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class DivPlatformOPLL: public DivDispatch {
|
||||||
|
|
||||||
bool useYMFM;
|
bool useYMFM;
|
||||||
bool crapDrums;
|
bool crapDrums;
|
||||||
bool properDrums, properDrumsSys, noTopHatFreq;
|
bool properDrums, properDrumsSys, noTopHatFreq, fixedAll;
|
||||||
bool vrc7;
|
bool vrc7;
|
||||||
|
|
||||||
unsigned char patchSet;
|
unsigned char patchSet;
|
||||||
|
|
|
@ -395,6 +395,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
int clockSel=flags.getInt("clockSel",0);
|
int clockSel=flags.getInt("clockSel",0);
|
||||||
int patchSet=flags.getInt("patchSet",0);
|
int patchSet=flags.getInt("patchSet",0);
|
||||||
bool noTopHatFreq=flags.getBool("noTopHatFreq",false);
|
bool noTopHatFreq=flags.getBool("noTopHatFreq",false);
|
||||||
|
bool fixedAll=flags.getBool("fixedAll",false);
|
||||||
|
|
||||||
ImGui::Text("Clock rate:");
|
ImGui::Text("Clock rate:");
|
||||||
ImGui::Indent();
|
ImGui::Indent();
|
||||||
|
@ -441,6 +442,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
if (ImGui::Checkbox("Ignore top/hi-hat frequency changes",&noTopHatFreq)) {
|
if (ImGui::Checkbox("Ignore top/hi-hat frequency changes",&noTopHatFreq)) {
|
||||||
altered=true;
|
altered=true;
|
||||||
}
|
}
|
||||||
|
if (ImGui::Checkbox("Apply fixed frequency to all drums at once",&fixedAll)) {
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (altered) {
|
if (altered) {
|
||||||
|
@ -450,6 +454,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
flags.set("patchSet",patchSet);
|
flags.set("patchSet",patchSet);
|
||||||
}
|
}
|
||||||
flags.set("noTopHatFreq",noTopHatFreq);
|
flags.set("noTopHatFreq",noTopHatFreq);
|
||||||
|
flags.set("fixedAll",fixedAll);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue