mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 10:32:40 +00:00
standlalone cutoff macro (with correct relative mode)
This commit is contained in:
parent
006f0d6f48
commit
0f760a365e
2 changed files with 22 additions and 0 deletions
|
@ -173,6 +173,19 @@ void DivPlatformC64::tick(bool sysTick) {
|
|||
willUpdateFilter=true;
|
||||
}
|
||||
}
|
||||
if (chan[i].std.alg.had) { //new cutoff macro!
|
||||
DivInstrument* ins = parent->getIns(chan[i].ins, DIV_INS_C64);
|
||||
if (ins->c64.filterIsAbs) {
|
||||
filtCut = MIN(2047, chan[i].std.alg.val);
|
||||
}
|
||||
else {
|
||||
filtCut += ((signed char)chan[i].std.alg.val) * 7; //new macro should not be executed in inverted way when in relative mode jesus
|
||||
if (filtCut > 2047) filtCut = 2047;
|
||||
if (filtCut < 0) filtCut = 0;
|
||||
}
|
||||
willUpdateFilter = true;
|
||||
}
|
||||
|
||||
if (NEW_ARP_STRAT) {
|
||||
chan[i].handleArp();
|
||||
} else if (chan[i].std.arp.had) {
|
||||
|
|
|
@ -6437,6 +6437,15 @@ void FurnaceGUI::drawInsEdit() {
|
|||
}
|
||||
if (ex1Max>0) {
|
||||
if (ins->type==DIV_INS_C64) {
|
||||
int cutoffmin = -64;
|
||||
int cutoffmax = 64;
|
||||
|
||||
if (ins->c64.filterIsAbs) {
|
||||
ins->std.algMacro.vZoom = -1;
|
||||
cutoffmin = 0;
|
||||
cutoffmax = 2047;
|
||||
}
|
||||
macroList.push_back(FurnaceGUIMacroDesc("Filter Cutoff", &ins->std.algMacro, cutoffmin, cutoffmax, 160, uiColors[GUI_COLOR_MACRO_OTHER]));
|
||||
macroList.push_back(FurnaceGUIMacroDesc("Filter Mode",&ins->std.ex1Macro,0,ex1Max,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,filtModeBits));
|
||||
} else if (ins->type==DIV_INS_SAA1099) {
|
||||
macroList.push_back(FurnaceGUIMacroDesc("Envelope",&ins->std.ex1Macro,0,ex1Max,160,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,saaEnvBits));
|
||||
|
|
Loading…
Reference in a new issue