mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
Fix FM layout in "Compact" mode, Prepare for per-operator on/off control on FM (possibly controllable with phase reset macro?)
This commit is contained in:
parent
b167034e06
commit
518841c17e
2 changed files with 18 additions and 10 deletions
|
@ -81,6 +81,7 @@ struct DivInstrumentFM {
|
||||||
unsigned char am, ar, dr, mult, rr, sl, tl, dt2, rs, dt, d2r, ssgEnv;
|
unsigned char am, ar, dr, mult, rr, sl, tl, dt2, rs, dt, d2r, ssgEnv;
|
||||||
unsigned char dam, dvb, egt, ksl, sus, vib, ws, ksr; // YMU759/OPL/OPZ
|
unsigned char dam, dvb, egt, ksl, sus, vib, ws, ksr; // YMU759/OPL/OPZ
|
||||||
Operator():
|
Operator():
|
||||||
|
enable(false),
|
||||||
am(0),
|
am(0),
|
||||||
ar(0),
|
ar(0),
|
||||||
dr(0),
|
dr(0),
|
||||||
|
|
|
@ -109,6 +109,10 @@ enum FMParams {
|
||||||
#define FM_NAME(x) fmParamNames[settings.fmNames][x]
|
#define FM_NAME(x) fmParamNames[settings.fmNames][x]
|
||||||
#define FM_SHORT_NAME(x) fmParamShortNames[settings.fmNames][x]
|
#define FM_SHORT_NAME(x) fmParamShortNames[settings.fmNames][x]
|
||||||
|
|
||||||
|
const char* fmOperatorBits[5]={
|
||||||
|
"op1", "op3", "op2", "op4", NULL
|
||||||
|
};
|
||||||
|
|
||||||
const char* c64ShapeBits[5]={
|
const char* c64ShapeBits[5]={
|
||||||
"triangle", "saw", "pulse", "noise", NULL
|
"triangle", "saw", "pulse", "noise", NULL
|
||||||
};
|
};
|
||||||
|
@ -1846,8 +1850,6 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
op.am=amOn;
|
op.am=amOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
|
||||||
|
|
||||||
int maxTl=127;
|
int maxTl=127;
|
||||||
if (ins->type==DIV_INS_OPLL) {
|
if (ins->type==DIV_INS_OPLL) {
|
||||||
if (i==1) {
|
if (i==1) {
|
||||||
|
@ -1867,6 +1869,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
bool susOn=op.sus; // don't you make fun of this one
|
bool susOn=op.sus; // don't you make fun of this one
|
||||||
unsigned char ssgEnv=op.ssgEnv&7;
|
unsigned char ssgEnv=op.ssgEnv&7;
|
||||||
if (ins->type!=DIV_INS_OPL && ins->type!=DIV_INS_OPZ) {
|
if (ins->type!=DIV_INS_OPL && ins->type!=DIV_INS_OPZ) {
|
||||||
|
ImGui::SameLine();
|
||||||
if (ImGui::Checkbox((ins->type==DIV_INS_OPLL)?FM_NAME(FM_EGS):"SSG On",&ssgOn)) { PARAMETER
|
if (ImGui::Checkbox((ins->type==DIV_INS_OPLL)?FM_NAME(FM_EGS):"SSG On",&ssgOn)) { PARAMETER
|
||||||
op.ssgEnv=(op.ssgEnv&7)|(ssgOn<<3);
|
op.ssgEnv=(op.ssgEnv&7)|(ssgOn<<3);
|
||||||
}
|
}
|
||||||
|
@ -1878,6 +1881,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ins->type==DIV_INS_OPL) {
|
if (ins->type==DIV_INS_OPL) {
|
||||||
|
ImGui::SameLine();
|
||||||
if (ImGui::Checkbox(FM_NAME(FM_SUS),&susOn)) { PARAMETER
|
if (ImGui::Checkbox(FM_NAME(FM_SUS),&susOn)) { PARAMETER
|
||||||
op.sus=susOn;
|
op.sus=susOn;
|
||||||
}
|
}
|
||||||
|
@ -1995,6 +1999,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("%s",FM_NAME(FM_DT2));
|
ImGui::Text("%s",FM_NAME(FM_DT2));
|
||||||
|
|
||||||
|
if (ins->type==DIV_INS_FM) { // OPN only
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
|
@ -2004,6 +2009,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("%s",FM_NAME(FM_SSG));
|
ImGui::Text("%s",FM_NAME(FM_SSG));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPZ) {
|
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPZ) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
|
@ -2066,6 +2072,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
NORMAL_MACRO(ins->std.ex2Macro,0,127,"ex2","PM Depth",128,ins->std.ex2Macro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[7],0,127,NULL,false);
|
NORMAL_MACRO(ins->std.ex2Macro,0,127,"ex2","PM Depth",128,ins->std.ex2Macro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[7],0,127,NULL,false);
|
||||||
NORMAL_MACRO(ins->std.ex3Macro,0,255,"ex3","LFO Speed",128,ins->std.ex3Macro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[8],0,255,NULL,false);
|
NORMAL_MACRO(ins->std.ex3Macro,0,255,"ex3","LFO Speed",128,ins->std.ex3Macro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[8],0,255,NULL,false);
|
||||||
NORMAL_MACRO(ins->std.waveMacro,0,3,"wave","LFO Shape",48,ins->std.waveMacro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_WAVE],mmlString[9],0,3,¯oLFOWaves,false);
|
NORMAL_MACRO(ins->std.waveMacro,0,3,"wave","LFO Shape",48,ins->std.waveMacro.open,false,NULL,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_WAVE],mmlString[9],0,3,¯oLFOWaves,false);
|
||||||
|
NORMAL_MACRO(ins->std.phaseResetMacro,0,4,"phaseReset","Operator On/Off",128,ins->std.phaseResetMacro.open,true,fmOperatorBits,false,NULL,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[10],0,4,NULL,false);
|
||||||
}
|
}
|
||||||
MACRO_END;
|
MACRO_END;
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
|
|
Loading…
Reference in a new issue