diff --git a/TODO.md b/TODO.md index 5b55743e..3b354a90 100644 --- a/TODO.md +++ b/TODO.md @@ -1,11 +1,13 @@ # to-do for 0.6pre1 - MSM6258 pitch and clock select -- Game Boy envelope macro/sequence - rewrite the system name detection function anyway -- volume commands should work on Game Boy - add another FM editor layout - if macros have release, note off should release them - add ability to move selection by dragging - find and replace -- (maybe) add default patch selection + +# to-do for 0.6pre2 (as this requires new data structures) + +- Game Boy envelope macro/sequence +- volume commands should work on Game Boy \ No newline at end of file diff --git a/src/gui/doAction.cpp b/src/gui/doAction.cpp index a83c646d..5b3020d2 100644 --- a/src/gui/doAction.cpp +++ b/src/gui/doAction.cpp @@ -536,6 +536,9 @@ void FurnaceGUI::doAction(int what) { if (curIns==-1) { showError("too many instruments!"); } else { + if (settings.blankIns) { + memset(&e->song.ins[curIns]->fm,0,sizeof(DivInstrumentFM)); + } wantScrollList=true; MARK_MODIFIED; wavePreviewInit=true; diff --git a/src/gui/gui.h b/src/gui/gui.h index 705f6827..60d49263 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -951,6 +951,7 @@ class FurnaceGUI { int effectCellSpacing; int effectValCellSpacing; int doubleClickColumn; + int blankIns; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -1051,6 +1052,7 @@ class FurnaceGUI { effectCellSpacing(0), effectValCellSpacing(0), doubleClickColumn(1), + blankIns(0), maxUndoSteps(100), mainFontPath(""), patFontPath(""), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 10e93743..18490ad9 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -465,6 +465,11 @@ void FurnaceGUI::drawSettings() { ImGui::SetTooltip("saves power by lowering the frame rate to 2fps when idle.\nmay cause issues under Mesa drivers!"); } + bool blankInsB=settings.blankIns; + if (ImGui::Checkbox("New instruments are blank",&blankInsB)) { + settings.blankIns=blankInsB; + } + ImGui::Text("Note preview behavior:"); if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) { settings.notePreviewBehavior=0; @@ -2029,7 +2034,8 @@ void FurnaceGUI::syncSettings() { settings.insCellSpacing=e->getConfInt("insCellSpacing",0); settings.volCellSpacing=e->getConfInt("volCellSpacing",0); settings.effectCellSpacing=e->getConfInt("effectCellSpacing",0); - settings.doubleClickColumn=e->getConfInt("doubleClickColumn",0); + settings.doubleClickColumn=e->getConfInt("doubleClickColumn",1); + settings.blankIns=e->getConfInt("blankIns",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -2114,6 +2120,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.effectCellSpacing,0,32); clampSetting(settings.effectValCellSpacing,0,32); clampSetting(settings.doubleClickColumn,0,1); + clampSetting(settings.blankIns,0,1); settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys","")); if (settings.initialSys.size()<4) { @@ -2247,6 +2254,7 @@ void FurnaceGUI::commitSettings() { e->setConf("effectCellSpacing",settings.effectCellSpacing); e->setConf("effectValCellSpacing",settings.effectValCellSpacing); e->setConf("doubleClickColumn",settings.doubleClickColumn); + e->setConf("blankIns",settings.blankIns); // colors for (int i=0; i