mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
Implement Phase Reset Timer macro for Sound Unit (#573)
* Implement Phase Reset Timer Macro * And make the macro actually work * Delete ex4Max variable
This commit is contained in:
parent
623c0efbba
commit
8011e7adc7
2 changed files with 8 additions and 0 deletions
|
@ -187,6 +187,13 @@ void DivPlatformSoundUnit::tick(bool sysTick) {
|
||||||
chan[i].control=chan[i].std.ex3.val&15;
|
chan[i].control=chan[i].std.ex3.val&15;
|
||||||
writeControl(i);
|
writeControl(i);
|
||||||
}
|
}
|
||||||
|
if (chan[i].std.ex4.had) {
|
||||||
|
chan[i].syncTimer=chan[i].std.ex4.val&65535;
|
||||||
|
chan[i].timerSync=(chan[i].syncTimer>0);
|
||||||
|
chWrite(i,0x1e,chan[i].syncTimer&0xff);
|
||||||
|
chWrite(i,0x1f,chan[i].syncTimer>>8);
|
||||||
|
writeControlUpper(i);
|
||||||
|
}
|
||||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||||
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SU);
|
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SU);
|
||||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||||
|
|
|
@ -3678,6 +3678,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
if (ins->type==DIV_INS_SU) {
|
if (ins->type==DIV_INS_SU) {
|
||||||
macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex3Macro,0,4,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,suControlBits));
|
macroList.push_back(FurnaceGUIMacroDesc("Control",&ins->std.ex3Macro,0,4,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,suControlBits));
|
||||||
|
macroList.push_back(FurnaceGUIMacroDesc("Phase Reset Timer",&ins->std.ex4Macro,0,65535,160,uiColors[GUI_COLOR_MACRO_OTHER])); // again reuse code from resonance macro but use ex4 instead
|
||||||
}
|
}
|
||||||
|
|
||||||
drawMacros(macroList);
|
drawMacros(macroList);
|
||||||
|
|
Loading…
Reference in a new issue