diff --git a/demos/arcade/Physics_Exam_TaitoArcade.fur b/demos/arcade/Physics_Exam_TaitoArcade.fur new file mode 100644 index 000000000..5cb97e54f Binary files /dev/null and b/demos/arcade/Physics_Exam_TaitoArcade.fur differ diff --git a/demos/arcade/physics_exam.fur b/demos/arcade/physics_exam.fur deleted file mode 100644 index b26e3f6e4..000000000 Binary files a/demos/arcade/physics_exam.fur and /dev/null differ diff --git a/demos/genesis/inside_the_computer.fur b/demos/genesis/inside_the_computer.fur index b26820194..b3bd29c0f 100644 Binary files a/demos/genesis/inside_the_computer.fur and b/demos/genesis/inside_the_computer.fur differ diff --git a/demos/misc/teddy_bear_midnight_jam_ted.fur b/demos/misc/teddy_bear_midnight_jam_ted.fur new file mode 100644 index 000000000..7ee9d067c Binary files /dev/null and b/demos/misc/teddy_bear_midnight_jam_ted.fur differ diff --git a/doc/6-sample/README.md b/doc/6-sample/README.md index 66d35479a..9f5a6cf86 100644 --- a/doc/6-sample/README.md +++ b/doc/6-sample/README.md @@ -33,15 +33,15 @@ the following sound chips have sample support: - Yamaha PCMD8/YMZ280B - MMC5 (last channel only) -## compatible sample mode +## compatible sample mode (LEGACY) -effect `17xx` enables/disables compatible sample mode whether supported (e.g. on Sega Genesis or PC Engine). +**use of this mode is discouraged in favor of Sample type instruments.** + +effect `17xx` enables/disables compatible sample mode where supported (e.g. on Sega Genesis or PC Engine). in this mode, samples are mapped to notes in an octave from C to B, allowing you to use up to 12 samples. if you need to use more samples, you may change the sample bank using effect `EBxx`. -use of this mode is discouraged in favor of Sample type instruments. - ## notes due to limitations in some of those sound chips, some restrictions exist: diff --git a/doc/7-systems/pce.md b/doc/7-systems/pce.md index 03727cfb8..308d42e46 100644 --- a/doc/7-systems/pce.md +++ b/doc/7-systems/pce.md @@ -18,8 +18,8 @@ furthermore, it has some PCM and LFO! - `03`: LFO enabled, shift 8. - when LFO is enabled, channel 2 is muted and its output is passed to channel 1's frequency. - `13xx`: **set LFO speed.** -- `17xx`: **toggle PCM mode.** - - _this effect is here for compatibility reasons_; it is otherwise recommended to use Sample type instruments (which automatically enable PCM mode when used). +- `17xx`: **toggle LEGACY sample mode.** + - **this effect exists only for compatibility reasons! its use is NOT recommented. use Sample type instruments instead.** # info diff --git a/doc/7-systems/vrc6.md b/doc/7-systems/vrc6.md index ea85469af..ba6df1d2a 100644 --- a/doc/7-systems/vrc6.md +++ b/doc/7-systems/vrc6.md @@ -15,7 +15,8 @@ Furnace supports this routine for PCM playback, but it consumes a lot of CPU tim these effects only are effective in the pulse channels. - `12xx`: **set duty cycle.** range is `0` to `7`. -- `17xx`: **toggle PCM mode.** +- `17xx`: **toggle LEGACY sample mode.** + - **this effect exists only for compatibility reasons! its use is NOT recommented. use Sample type instruments instead.** # info diff --git a/doc/7-systems/x1-010.md b/doc/7-systems/x1-010.md index 7e0bea875..e4836cf8f 100644 --- a/doc/7-systems/x1-010.md +++ b/doc/7-systems/x1-010.md @@ -27,7 +27,8 @@ in Furnace, you can enable the envelope shape split mode. when it is set, its wa - `10xx`: **change wave.** - `11xx`: **change envelope shape.** also wavetable. -- `17xx`: **toggle PCM mode.** +- `17xx`: **toggle LEGACY sample mode.** + - **this effect exists only for compatibility reasons! its use is NOT recommented. use Sample type instruments instead.** - `20xx`: **set PCM frequency.** range is `1` to `FF`. - PCM frequency formula: `step * (clock / 8192)`. - range is 1.95KHz to 498KHz if the chip clock is 16MHz. diff --git a/doc/7-systems/ym2612.md b/doc/7-systems/ym2612.md index b245b1ac2..7804984eb 100644 --- a/doc/7-systems/ym2612.md +++ b/doc/7-systems/ym2612.md @@ -16,8 +16,9 @@ as of Furnace 0.6pre5, Furnace offers DualPCM, a Z80 driver that splits channel - `16xy`: **set multiplier of operator.** - `x` is the operator (1-4). - `y` is the multiplier. -- `17xx`: **enable PCM channel.** +- `17xx`: **toggle LEGACY sample mode.** - this only works on channel 6. + - **this effect exists only for compatibility reasons! its use is NOT recommented. use Sample type instruments instead.** - `18xx`: **toggle extended channel 3 mode.** - 0 disables it and 1 enables it. - only in extended channel 3 chip. @@ -86,4 +87,4 @@ CSM is beyond the scope of this documentation. for more information, see this [b ## DualPCM -thanks to the Z80 sound CPU, DualPCM can play two samples at once! this mode splits channel 6 into two individual PCM channels with variable pitch. these are mixed together in software and streamed to channel 6 with a mix rate of 13750 Hz. VGM export requires the "direct stream mode" option to be enabled, and resulting files will be very large. \ No newline at end of file +thanks to the Z80 sound CPU, DualPCM can play two samples at once! this mode splits channel 6 into two individual PCM channels with variable pitch. these are mixed together in software and streamed to channel 6 with a mix rate of 13750 Hz. VGM export requires the "direct stream mode" option to be enabled, and resulting files will be very large. diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index d27b6a57e..8c6c8a386 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -107,7 +107,7 @@ const char* DivEngine::getEffectDesc(unsigned char effect, int chan, bool notNul case 0xea: return "EAxx: Legato"; case 0xeb: - return "EBxx: Set sample bank"; + return "EBxx: Set LEGACY sample mode bank"; case 0xec: return "ECxx: Note cut"; case 0xed: diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index f999a2d6f..08ed8f4f5 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -451,7 +451,7 @@ void DivEngine::registerSystems() { EffectHandlerMap fmOPN2EffectHandlerMap(fmEffectHandlerMap); fmOPN2EffectHandlerMap.insert({ - {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode"}}, + {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (LEGACY)"}}, {0xdf, {DIV_CMD_SAMPLE_DIR, "DFxx: Set sample playback direction (0: normal; 1: reverse)"}}, }); @@ -681,7 +681,7 @@ void DivEngine::registerSystems() { {0x11, {DIV_CMD_STD_NOISE_MODE, "11xx: Toggle noise mode"}}, {0x12, {DIV_CMD_PCE_LFO_MODE, "12xx: Setup LFO (0: disabled; 1: 1x depth; 2: 16x depth; 3: 256x depth)"}}, {0x13, {DIV_CMD_PCE_LFO_SPEED, "13xx: Set LFO speed"}}, - {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode"}} + {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (LEGACY)"}} } ); @@ -939,7 +939,7 @@ void DivEngine::registerSystems() { {DIV_INS_AMIGA, DIV_INS_AMIGA, DIV_INS_NULL}, { {0x12, {DIV_CMD_STD_NOISE_MODE, "12xx: Set duty cycle (pulse: 0 to 7)"}}, - {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (pulse channel)"}}, + {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (LEGACY)"}}, } ); @@ -1182,7 +1182,7 @@ void DivEngine::registerSystems() { {0x11, {DIV_CMD_STD_NOISE_MODE, "11xx: Setup noise mode (0: disabled; 1-8: enabled/tap)"}}, {0x12, {DIV_CMD_WS_SWEEP_TIME, "12xx: Setup sweep period (0: disabled; 1-20: enabled/period)"}}, {0x13, {DIV_CMD_WS_SWEEP_AMOUNT, "13xx: Set sweep amount"}}, - {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode"}}, + {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (LEGACY)"}}, } ); @@ -1497,7 +1497,7 @@ void DivEngine::registerSystems() { {0x10, {DIV_CMD_WAVE, "10xx: Set waveform"}}, {0x11, {DIV_CMD_X1_010_ENVELOPE_SHAPE, "11xx: Set envelope shape"}}, {0x12, {DIV_CMD_X1_010_SAMPLE_BANK_SLOT, "12xx: Set sample bank slot (0 to 7)"}}, - {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode"}}, + {0x17, {DIV_CMD_SAMPLE_MODE, "17xx: Toggle PCM mode (LEGACY)"}}, }, { {0x20, {DIV_CMD_SAMPLE_FREQ, "20xx: Set PCM frequency (1 to FF)"}}, diff --git a/src/gui/dataList.cpp b/src/gui/dataList.cpp index f9e2ab749..8e9bc33ec 100644 --- a/src/gui/dataList.cpp +++ b/src/gui/dataList.cpp @@ -407,13 +407,10 @@ void FurnaceGUI::sampleListItem(int i, int dir, int asset) { lastAssetType=2; } if (ImGui::IsItemHovered() && !mobileUI) { - ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]); - ImGui::SetTooltip("(legacy bank %d: %s)",i/12,sampleNote[i%12]); if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { sampleEditOpen=true; nextWindow=GUI_WINDOW_SAMPLE_EDIT; } - ImGui::PopStyleColor(); } if (sampleListDir || (settings.unifiedDataView && insListDir)) { DRAG_SOURCE(dir,asset,"FUR_SDIR"); diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index a262b9da2..3e3601af6 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1128,18 +1128,22 @@ void FurnaceGUI::stopPreviewNote(SDL_Scancode scancode, bool autoNote) { void FurnaceGUI::noteInput(int num, int key, int vol) { DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],true); + bool removeIns=false; prepareUndo(GUI_UNDO_PATTERN_EDIT); if (key==GUI_NOTE_OFF) { // note off pat->data[cursor.y][0]=100; pat->data[cursor.y][1]=0; + removeIns=true; } else if (key==GUI_NOTE_OFF_RELEASE) { // note off + env release pat->data[cursor.y][0]=101; pat->data[cursor.y][1]=0; + removeIns=true; } else if (key==GUI_NOTE_RELEASE) { // env release only pat->data[cursor.y][0]=102; pat->data[cursor.y][1]=0; + removeIns=true; } else { pat->data[cursor.y][0]=num%12; pat->data[cursor.y][1]=num/12; @@ -1165,6 +1169,14 @@ void FurnaceGUI::noteInput(int num, int key, int vol) { if (latchEffect!=-1) pat->data[cursor.y][4]=latchEffect; if (latchEffectVal!=-1) pat->data[cursor.y][5]=latchEffectVal; } + if (removeIns) { + if (settings.removeInsOff) { + pat->data[cursor.y][2]=-1; + } + if (settings.removeVolOff) { + pat->data[cursor.y][3]=-1; + } + } makeUndo(GUI_UNDO_PATTERN_EDIT); editAdvance(); curNibble=false; @@ -2100,6 +2112,7 @@ int FurnaceGUI::save(String path, int dmfVersion) { } int FurnaceGUI::load(String path) { + bool wasPlaying=e->isPlaying(); if (!path.empty()) { logI("loading module..."); FILE* f=ps_fopen(path.c_str(),"rb"); @@ -2176,6 +2189,12 @@ int FurnaceGUI::load(String path) { showWarning(e->getWarnings(),GUI_WARN_GENERIC); } pushRecentFile(path); + // do not auto-play a backup + if (path.find(backupPath)!=0) { + if (settings.playOnLoad==2 || (settings.playOnLoad==1 && wasPlaying)) { + play(); + } + } return 0; } @@ -6706,6 +6725,13 @@ bool FurnaceGUI::finish() { SDL_HapticClose(vibrator); } + for (int i=0; i +#include "../ta-log.h" +#include "../engine/filter.h" void FurnaceGUI::readOsc() { int writePos=e->oscWritePos; @@ -47,19 +49,52 @@ void FurnaceGUI::readOsc() { int winSize=e->getAudioDescGot().rate*(oscWindowSize/1000.0); int oscReadPos=(writePos-winSize)&0x7fff; - for (int i=0; i<512; i++) { - int pos=(oscReadPos+(i*winSize/512))&0x7fff; - oscValues[i]=0; - for (int j=0; jgetAudioDescGot().outChans; j++) { - oscValues[i]+=e->oscBuf[j][pos]; - } - oscValues[i]/=e->getAudioDescGot().outChans; - if (oscValues[i]>0.001f || oscValues[i]<-0.001f) { - WAKE_UP; + for (int ch=0; chgetAudioDescGot().outChans; ch++) { + if (oscValues[ch]==NULL) { + oscValues[ch]=new float[1024]; + } + memset(oscValues[ch],0,1024*sizeof(float)); + float* sincITable=DivFilterTables::getSincIntegralTable(); + + float posFrac=0.0; + int posInt=oscReadPos; + float factor=(float)oscWidth/(float)winSize; + for (int i=0; ioscBuf[ch][posInt&0x7fff]; + + posFrac+=1.0; + while (posFrac>=1.0) { + unsigned int n=((unsigned int)(posFrac*8192.0))&8191; + posFrac-=factor; + posInt++; + + float* t1=&sincITable[(8191-n)<<3]; + float* t2=&sincITable[n<<3]; + float delta=e->oscBuf[ch][posInt&0x7fff]-e->oscBuf[ch][(posInt-1)&0x7fff]; + + for (int j=0; j<8; j++) { + if (i-j>0) { + oscValues[ch][i-j]+=t1[j]*-delta; + } + if (i+j+10.001f || oscValues[ch][i]<-0.001f) { + WAKE_UP; + } } } + /*for (int i=0; igetAudioDescGot().outChans; i++) { peak[i]*=1.0-peakDecay; @@ -124,7 +159,7 @@ void FurnaceGUI::drawOsc() { ImDrawList* dl=ImGui::GetWindowDrawList(); ImGuiWindow* window=ImGui::GetCurrentWindow(); - ImVec2 waveform[512]; + ImVec2 waveform[1024]; ImVec2 size=ImGui::GetContentRegionAvail(); ImVec2 minArea=window->DC.CursorPos; @@ -211,22 +246,67 @@ void FurnaceGUI::drawOsc() { dpiScale ); - for (size_t i=0; i<512; i++) { - float x=(float)i/512.0f; - float y=oscValues[i]*oscZoom; - if (!settings.oscEscapesBoundary) { - if (y<-0.5f) y=-0.5f; - if (y>0.5f) y=0.5f; + oscWidth=round(inRect.Max.x-inRect.Min.x); + if (oscWidth<1) oscWidth=1; + if (oscWidth>1024) oscWidth=1024; + + ImDrawListFlags prevFlags=dl->Flags; + if (!settings.oscAntiAlias) { + dl->Flags&=~(ImDrawListFlags_AntiAliasedLines|ImDrawListFlags_AntiAliasedLinesUseTex); + } + + if (settings.oscMono) { + for (int i=0; igetAudioDescGot().outChans; j++) { + avg+=oscValues[j][i]; + } + avg/=e->getAudioDescGot().outChans; + + float y=avg*oscZoom; + if (!settings.oscEscapesBoundary) { + if (y<-0.5f) y=-0.5f; + if (y>0.5f) y=0.5f; + } + waveform[i]=ImLerp(inRect.Min,inRect.Max,ImVec2(x,0.5f-y)); + } + + if (settings.oscEscapesBoundary) { + dl->PushClipRectFullScreen(); + dl->AddPolyline(waveform,oscWidth,color,ImDrawFlags_None,dpiScale); + dl->PopClipRect(); + } else { + dl->AddPolyline(waveform,oscWidth,color,ImDrawFlags_None,dpiScale); } - waveform[i]=ImLerp(inRect.Min,inRect.Max,ImVec2(x,0.5f-y)); - } - if (settings.oscEscapesBoundary) { - dl->PushClipRectFullScreen(); - dl->AddPolyline(waveform,512,color,ImDrawFlags_None,dpiScale); - dl->PopClipRect(); } else { - dl->AddPolyline(waveform,512,color,ImDrawFlags_None,dpiScale); + for (int ch=0; chgetAudioDescGot().outChans; ch++) { + for (int i=0; i0.5f) y=0.5f; + } + waveform[i]=ImLerp(inRect.Min,inRect.Max,ImVec2(x,0.5f-y)); + } + + if (!isClipping) { + color=ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_WAVE_CH0+ch]); + } + + if (settings.oscEscapesBoundary) { + dl->PushClipRectFullScreen(); + dl->AddPolyline(waveform,oscWidth,color,ImDrawFlags_None,dpiScale); + dl->PopClipRect(); + } else { + dl->AddPolyline(waveform,oscWidth,color,ImDrawFlags_None,dpiScale); + } + } } + + dl->Flags=prevFlags; + if (settings.oscBorder) { dl->AddRect(inRect.Min,inRect.Max,borderColor,settings.oscRoundedCorners?(8.0f*dpiScale):0.0f,0,1.5f*dpiScale); } diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 7f582f6c8..564bebada 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -437,11 +437,26 @@ void FurnaceGUI::drawSettings() { ImGui::SetTooltip("do not report any issues arising from the use of this option!"); } + ImGui::Text("Play after opening song:"); + ImGui::Indent(); + if (ImGui::RadioButton("No##pol0",settings.playOnLoad==0)) { + settings.playOnLoad=0; + } + if (ImGui::RadioButton("Only if already playing##pol1",settings.playOnLoad==1)) { + settings.playOnLoad=1; + } + if (ImGui::RadioButton("Yes##pol0",settings.playOnLoad==2)) { + settings.playOnLoad=2; + } + ImGui::Unindent(); + ImGui::Text("Audio export loop/fade out time:"); + ImGui::Indent(); if (ImGui::RadioButton("Set to these values on start-up:##fot0",settings.persistFadeOut==0)) { settings.persistFadeOut=0; } ImGui::BeginDisabled(settings.persistFadeOut); + ImGui::Indent(); if (ImGui::InputInt("Loops",&settings.exportLoops,1,2)) { if (exportLoops<0) exportLoops=0; exportLoops=settings.exportLoops; @@ -450,10 +465,12 @@ void FurnaceGUI::drawSettings() { if (exportFadeOut<0.0) exportFadeOut=0.0; exportFadeOut=settings.exportFadeOut; } + ImGui::Unindent(); ImGui::EndDisabled(); if (ImGui::RadioButton("Remember last values##fot1",settings.persistFadeOut==1)) { settings.persistFadeOut=1; } + ImGui::Unindent(); // SUBSECTION CHIP CONFIG_SUBSECTION("Chip"); @@ -645,12 +662,14 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("When creating new song:"); + ImGui::Indent(); if (ImGui::RadioButton("Display system preset selector##NSB0",settings.newSongBehavior==0)) { settings.newSongBehavior=0; } if (ImGui::RadioButton("Start with initial system##NSB1",settings.newSongBehavior==1)) { settings.newSongBehavior=1; } + ImGui::Unindent(); bool restartOnFlagChangeB=settings.restartOnFlagChange; if (ImGui::Checkbox("Restart song when changing chip properties",&restartOnFlagChangeB)) { @@ -660,6 +679,7 @@ void FurnaceGUI::drawSettings() { // SUBSECTION START-UP CONFIG_SUBSECTION("Start-up"); ImGui::Text("Play intro on start-up:"); + ImGui::Indent(); if (ImGui::RadioButton("No##pis0",settings.alwaysPlayIntro==0)) { settings.alwaysPlayIntro=0; } @@ -672,6 +692,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Full (always)##pis3",settings.alwaysPlayIntro==3)) { settings.alwaysPlayIntro=3; } + ImGui::Unindent(); bool disableFadeInB=settings.disableFadeIn; if (ImGui::Checkbox("Disable fade-in during start-up",&disableFadeInB)) { @@ -1104,6 +1125,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Output mode:"); + ImGui::Indent(); if (ImGui::RadioButton("Off (use for TX81Z)",settings.midiOutMode==0)) { settings.midiOutMode=0; } @@ -1114,6 +1136,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Light Show (use for Launchpad)",settings.midiOutMode==2)) { settings.midiOutMode=2; }*/ + ImGui::Unindent(); bool midiOutProgramChangeB=settings.midiOutProgramChange; if (ImGui::Checkbox("Send Program Change",&midiOutProgramChangeB)) { @@ -1132,6 +1155,7 @@ void FurnaceGUI::drawSettings() { if (settings.midiOutTime) { ImGui::Text("Timecode frame rate:"); + ImGui::Indent(); if (ImGui::RadioButton("Closest to Tick Rate",settings.midiOutTimeRate==0)) { settings.midiOutTimeRate=0; } @@ -1147,6 +1171,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("NTSC non-drop (30fps)",settings.midiOutTimeRate==4)) { settings.midiOutTimeRate=4; } + ImGui::Unindent(); } END_SECTION; @@ -1615,6 +1640,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Play/edit controls layout:"); + ImGui::Indent(); if (ImGui::RadioButton("Classic##ecl0",settings.controlLayout==0)) { settings.controlLayout=0; } @@ -1627,8 +1653,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Split##ecl3",settings.controlLayout==3)) { settings.controlLayout=3; } + ImGui::Unindent(); ImGui::Text("Position of buttons in Orders:"); + ImGui::Indent(); if (ImGui::RadioButton("Top##obp0",settings.orderButtonPos==0)) { settings.orderButtonPos=0; } @@ -1638,6 +1666,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Right##obp2",settings.orderButtonPos==2)) { settings.orderButtonPos=2; } + ImGui::Unindent(); // SUBSECTION MOUSE CONFIG_SUBSECTION("Mouse"); @@ -1660,6 +1689,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Note preview behavior:"); + ImGui::Indent(); if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) { settings.notePreviewBehavior=0; } @@ -1672,8 +1702,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Always##npb3",settings.notePreviewBehavior==3)) { settings.notePreviewBehavior=3; } + ImGui::Unindent(); ImGui::Text("Allow dragging selection:"); + ImGui::Indent(); if (ImGui::RadioButton("No##dms0",settings.dragMovesSelection==0)) { settings.dragMovesSelection=0; } @@ -1683,8 +1715,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Yes (while holding Ctrl only)##dms2",settings.dragMovesSelection==2)) { settings.dragMovesSelection=2; } + ImGui::Unindent(); ImGui::Text("Toggle channel solo on:"); + ImGui::Indent(); if (ImGui::RadioButton("Right-click or double-click##soloA",settings.soloAction==0)) { settings.soloAction=0; } @@ -1694,6 +1728,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Double-click##soloD",settings.soloAction==2)) { settings.soloAction=2; } + ImGui::Unindent(); bool doubleClickColumnB=settings.doubleClickColumn; if (ImGui::Checkbox("Double click selects entire column",&doubleClickColumnB)) { @@ -1718,6 +1753,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Effect input behavior:"); + ImGui::Indent(); if (ImGui::RadioButton("Move down##eicb0",settings.effectCursorDir==0)) { settings.effectCursorDir=0; } @@ -1727,6 +1763,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Move to effect value/next effect and wrap around##eicb2",settings.effectCursorDir==2)) { settings.effectCursorDir=2; } + ImGui::Unindent(); bool effectDeletionAltersValueB=settings.effectDeletionAltersValue; if (ImGui::Checkbox("Delete effect value when deleting effect",&effectDeletionAltersValueB)) { @@ -1738,10 +1775,21 @@ void FurnaceGUI::drawSettings() { settings.absorbInsInput=absorbInsInputB; } + bool removeInsOffB=settings.removeInsOff; + if (ImGui::Checkbox("Remove instrument value when inserting note off/release",&removeInsOffB)) { + settings.removeInsOff=removeInsOffB; + } + + bool removeVolOffB=settings.removeVolOff; + if (ImGui::Checkbox("Remove volume value when inserting note off/release",&removeVolOffB)) { + settings.removeVolOff=removeVolOffB; + } + // SUBSECTION CURSOR MOVEMENT CONFIG_SUBSECTION("Cursor movement"); ImGui::Text("Wrap horizontally:"); + ImGui::Indent(); if (ImGui::RadioButton("No##wrapH0",settings.wrapHorizontal==0)) { settings.wrapHorizontal=0; } @@ -1751,8 +1799,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Yes, and move to next/prev row##wrapH2",settings.wrapHorizontal==2)) { settings.wrapHorizontal=2; } + ImGui::Unindent(); ImGui::Text("Wrap vertically:"); + ImGui::Indent(); if (ImGui::RadioButton("No##wrapV0",settings.wrapVertical==0)) { settings.wrapVertical=0; } @@ -1765,14 +1815,17 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Yes, and move to next/prev pattern (wrap around)##wrapV2",settings.wrapVertical==3)) { settings.wrapVertical=3; } + ImGui::Unindent(); ImGui::Text("Cursor movement keys behavior:"); + ImGui::Indent(); if (ImGui::RadioButton("Move by one##cmk0",settings.scrollStep==0)) { settings.scrollStep=0; } if (ImGui::RadioButton("Move by Edit Step##cmk1",settings.scrollStep==1)) { settings.scrollStep=1; } + ImGui::Unindent(); bool stepOnDeleteB=settings.stepOnDelete; if (ImGui::Checkbox("Move cursor by edit step on delete",&stepOnDeleteB)) { @@ -1798,6 +1851,7 @@ void FurnaceGUI::drawSettings() { CONFIG_SUBSECTION("Scrolling"); ImGui::Text("Change order when scrolling outside of pattern bounds:"); + ImGui::Indent(); if (ImGui::RadioButton("No##pscroll0",settings.scrollChangesOrder==0)) { settings.scrollChangesOrder=0; } @@ -1807,6 +1861,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Yes, and wrap around song##pscroll2",settings.scrollChangesOrder==2)) { settings.scrollChangesOrder=2; } + ImGui::Unindent(); bool cursorFollowsOrderB=settings.cursorFollowsOrder; if (ImGui::Checkbox("Cursor follows current order when moving it",&cursorFollowsOrderB)) { @@ -1856,6 +1911,7 @@ void FurnaceGUI::drawSettings() { ImGui::Text("Main font"); ImGui::SameLine(); ImGui::Combo("##MainFont",&settings.mainFont,mainFonts,7); + ImGui::Indent(); if (settings.mainFont==6) { ImGui::InputText("##MainFontPath",&settings.mainFontPath); ImGui::SameLine(); @@ -1867,9 +1923,11 @@ void FurnaceGUI::drawSettings() { if (settings.mainFontSize<3) settings.mainFontSize=3; if (settings.mainFontSize>96) settings.mainFontSize=96; } + ImGui::Unindent(); ImGui::Text("Header font"); ImGui::SameLine(); ImGui::Combo("##HeadFont",&settings.headFont,headFonts,7); + ImGui::Indent(); if (settings.headFont==6) { ImGui::InputText("##HeadFontPath",&settings.headFontPath); ImGui::SameLine(); @@ -1881,9 +1939,11 @@ void FurnaceGUI::drawSettings() { if (settings.headFontSize<3) settings.headFontSize=3; if (settings.headFontSize>96) settings.headFontSize=96; } + ImGui::Unindent(); ImGui::Text("Pattern font"); ImGui::SameLine(); ImGui::Combo("##PatFont",&settings.patFont,patFonts,7); + ImGui::Indent(); if (settings.patFont==6) { ImGui::InputText("##PatFontPath",&settings.patFontPath); ImGui::SameLine(); @@ -1895,6 +1955,7 @@ void FurnaceGUI::drawSettings() { if (settings.patFontSize<3) settings.patFontSize=3; if (settings.patFontSize>96) settings.patFontSize=96; } + ImGui::Unindent(); bool loadJapaneseB=settings.loadJapanese; if (ImGui::Checkbox("Display Japanese characters",&loadJapaneseB)) { @@ -1951,6 +2012,7 @@ void FurnaceGUI::drawSettings() { // SUBSECTION PROGRAM CONFIG_SUBSECTION("Program"); ImGui::Text("Title bar:"); + ImGui::Indent(); if (ImGui::RadioButton("Furnace##tbar0",settings.titleBarInfo==0)) { settings.titleBarInfo=0; updateWindowTitle(); @@ -1967,6 +2029,7 @@ void FurnaceGUI::drawSettings() { settings.titleBarInfo=3; updateWindowTitle(); } + ImGui::Unindent(); bool titleBarSysB=settings.titleBarSys; if (ImGui::Checkbox("Display system name on title bar",&titleBarSysB)) { @@ -1981,6 +2044,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Status bar:"); + ImGui::Indent(); if (ImGui::RadioButton("Cursor details##sbar0",settings.statusDisplay==0)) { settings.statusDisplay=0; } @@ -1993,6 +2057,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Nothing##sbar3",settings.statusDisplay==3)) { settings.statusDisplay=3; } + ImGui::Unindent(); // SUBSECTION ORDERS CONFIG_SUBSECTION("Orders"); @@ -2008,12 +2073,14 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Orders row number format:"); + ImGui::Indent(); if (ImGui::RadioButton("Decimal##orbD",settings.orderRowsBase==0)) { settings.orderRowsBase=0; } if (ImGui::RadioButton("Hexadecimal##orbH",settings.orderRowsBase==1)) { settings.orderRowsBase=1; } + ImGui::Unindent(); // SUBSECTION PATTERN CONFIG_SUBSECTION("Pattern"); @@ -2033,12 +2100,14 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Pattern row number format:"); + ImGui::Indent(); if (ImGui::RadioButton("Decimal##prbD",settings.patRowsBase==0)) { settings.patRowsBase=0; } if (ImGui::RadioButton("Hexadecimal##prbH",settings.patRowsBase==1)) { settings.patRowsBase=1; } + ImGui::Unindent(); ImGui::Text("Pattern view labels:"); ImGui::InputTextWithHint("Note off (3-char)","OFF",&settings.noteOffLabel); @@ -2093,6 +2162,7 @@ void FurnaceGUI::drawSettings() { CONFIG_SUBSECTION("Channel"); ImGui::Text("Channel style:"); + ImGui::Indent(); if (ImGui::RadioButton("Classic##CHS0",settings.channelStyle==0)) { settings.channelStyle=0; } @@ -2111,8 +2181,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Round border##CHS5",settings.channelStyle==5)) { settings.channelStyle=5; } + ImGui::Unindent(); ImGui::Text("Channel volume bar:"); + ImGui::Indent(); if (ImGui::RadioButton("None##CHV0",settings.channelVolStyle==0)) { settings.channelVolStyle=0; } @@ -2128,9 +2200,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Real (stereo)##CHV4",settings.channelVolStyle==4)) { settings.channelVolStyle=4; } + ImGui::Unindent(); ImGui::Text("Channel feedback style:"); - + ImGui::Indent(); if (ImGui::RadioButton("Off##CHF0",settings.channelFeedbackStyle==0)) { settings.channelFeedbackStyle=0; } @@ -2143,15 +2216,17 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Active##CHF3",settings.channelFeedbackStyle==3)) { settings.channelFeedbackStyle=3; } + ImGui::Unindent(); ImGui::Text("Channel font:"); - + ImGui::Indent(); if (ImGui::RadioButton("Regular##CHFont0",settings.channelFont==0)) { settings.channelFont=0; } if (ImGui::RadioButton("Monospace##CHFont1",settings.channelFont==1)) { settings.channelFont=1; } + ImGui::Unindent(); bool channelTextCenterB=settings.channelTextCenter; if (ImGui::Checkbox("Center channel name",&channelTextCenterB)) { @@ -2159,6 +2234,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("Channel colors:"); + ImGui::Indent(); if (ImGui::RadioButton("Single##CHC0",settings.channelColors==0)) { settings.channelColors=0; } @@ -2168,8 +2244,10 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Instrument type##CHC2",settings.channelColors==2)) { settings.channelColors=2; } + ImGui::Unindent(); ImGui::Text("Channel name colors:"); + ImGui::Indent(); if (ImGui::RadioButton("Single##CTC0",settings.channelTextColors==0)) { settings.channelTextColors=0; } @@ -2179,6 +2257,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Instrument type##CTC2",settings.channelTextColors==2)) { settings.channelTextColors=2; } + ImGui::Unindent(); // SUBSECTION ASSETS CONFIG_SUBSECTION("Assets"); @@ -2205,6 +2284,7 @@ void FurnaceGUI::drawSettings() { // SUBSECTION MACRO EDITOR CONFIG_SUBSECTION("Macro Editor"); ImGui::Text("Macro editor layout:"); + ImGui::Indent(); if (ImGui::RadioButton("Unified##mel0",settings.macroLayout==0)) { settings.macroLayout=0; } @@ -2220,6 +2300,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Single (combo box)##mel4",settings.macroLayout==4)) { settings.macroLayout=4; } + ImGui::Unindent(); bool oldMacroVSliderB=settings.oldMacroVSlider; if (ImGui::Checkbox("Use classic macro editor vertical slider",&oldMacroVSliderB)) { @@ -2236,6 +2317,7 @@ void FurnaceGUI::drawSettings() { // SUBSECTION FM EDITOR CONFIG_SUBSECTION("FM Editor"); ImGui::Text("FM parameter names:"); + ImGui::Indent(); if (ImGui::RadioButton("Friendly##fmn0",settings.fmNames==0)) { settings.fmNames=0; } @@ -2245,6 +2327,7 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Technical (alternate)##fmn2",settings.fmNames==2)) { settings.fmNames=2; } + ImGui::Unindent(); bool oplStandardWaveNamesB=settings.oplStandardWaveNames; if (ImGui::Checkbox("Use standard OPL waveform names",&oplStandardWaveNamesB)) { @@ -2252,6 +2335,7 @@ void FurnaceGUI::drawSettings() { } ImGui::Text("FM parameter editor layout:"); + ImGui::Indent(); if (ImGui::RadioButton("Modern##fml0",settings.fmLayout==0)) { settings.fmLayout=0; } @@ -2273,14 +2357,17 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Alternate (4x1)##fml5",settings.fmLayout==6)) { settings.fmLayout=6; } + ImGui::Unindent(); ImGui::Text("Position of Sustain in FM editor:"); + ImGui::Indent(); if (ImGui::RadioButton("Between Decay and Sustain Rate##susp0",settings.susPosition==0)) { settings.susPosition=0; } if (ImGui::RadioButton("After Release Rate##susp1",settings.susPosition==1)) { settings.susPosition=1; } + ImGui::Unindent(); bool separateFMColorsB=settings.separateFMColors; if (ImGui::Checkbox("Use separate colors for carriers/modulators in FM editor",&separateFMColorsB)) { @@ -2295,12 +2382,14 @@ void FurnaceGUI::drawSettings() { // SUBSECTION STATISTICS CONFIG_SUBSECTION("Statistics"); ImGui::Text("Chip memory usage unit:"); + ImGui::Indent(); if (ImGui::RadioButton("Bytes##MUU0",settings.memUsageUnit==0)) { settings.memUsageUnit=0; } if (ImGui::RadioButton("Kilobytes##MUU1",settings.memUsageUnit==1)) { settings.memUsageUnit=1; } + ImGui::Unindent(); // SUBSECTION OSCILLOSCOPE CONFIG_SUBSECTION("Oscilloscope"); @@ -2314,6 +2403,16 @@ void FurnaceGUI::drawSettings() { settings.oscBorder=oscBorderB; } + bool oscMonoB=settings.oscMono; + if (ImGui::Checkbox("Mono",&oscMonoB)) { + settings.oscMono=oscMonoB; + } + + bool oscAntiAliasB=settings.oscAntiAlias; + if (ImGui::Checkbox("Anti-aliased",&oscAntiAliasB)) { + settings.oscAntiAlias=oscAntiAliasB; + } + bool oscTakesEntireWindowB=settings.oscTakesEntireWindow; if (ImGui::Checkbox("Fill entire window",&oscTakesEntireWindowB)) { settings.oscTakesEntireWindow=oscTakesEntireWindowB; @@ -2364,6 +2463,7 @@ void FurnaceGUI::drawSettings() { } if (ImGui::TreeNode("General")) { ImGui::Text("Color scheme type:"); + ImGui::Indent(); if (ImGui::RadioButton("Dark##gcb0",settings.guiColorsBase==0)) { settings.guiColorsBase=0; applyUISettings(false); @@ -2372,6 +2472,7 @@ void FurnaceGUI::drawSettings() { settings.guiColorsBase=1; applyUISettings(false); } + ImGui::Unindent(); if (ImGui::SliderInt("Frame shading",&settings.guiColorsShading,0,100,"%d%%")) { if (settings.guiColorsShading<0) settings.guiColorsShading=0; if (settings.guiColorsShading>100) settings.guiColorsShading=100; @@ -2439,6 +2540,26 @@ void FurnaceGUI::drawSettings() { UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_PEAK,"Waveform (clip)"); UI_COLOR_CONFIG(GUI_COLOR_OSC_REF,"Reference"); UI_COLOR_CONFIG(GUI_COLOR_OSC_GUIDE,"Guide"); + + if (ImGui::TreeNode("Wave (non-mono)")) { + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH0,"Waveform (1)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH1,"Waveform (2)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH2,"Waveform (3)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH3,"Waveform (4)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH4,"Waveform (5)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH5,"Waveform (6)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH6,"Waveform (7)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH7,"Waveform (8)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH8,"Waveform (9)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH9,"Waveform (10)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH10,"Waveform (11)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH11,"Waveform (12)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH12,"Waveform (13)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH13,"Waveform (14)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH14,"Waveform (15)"); + UI_COLOR_CONFIG(GUI_COLOR_OSC_WAVE_CH15,"Waveform (16)"); + ImGui::TreePop(); + } ImGui::TreePop(); } if (ImGui::TreeNode("Volume Meter")) { @@ -2818,6 +2939,8 @@ void FurnaceGUI::syncSettings() { settings.oscTakesEntireWindow=e->getConfInt("oscTakesEntireWindow",0); settings.oscBorder=e->getConfInt("oscBorder",1); settings.oscEscapesBoundary=e->getConfInt("oscEscapesBoundary",0); + settings.oscMono=e->getConfInt("oscMono",1); + settings.oscAntiAlias=e->getConfInt("oscAntiAlias",1); settings.separateFMColors=e->getConfInt("separateFMColors",0); settings.insEditColorize=e->getConfInt("insEditColorize",0); settings.metroVol=e->getConfInt("metroVol",100); @@ -2891,6 +3014,9 @@ void FurnaceGUI::syncSettings() { settings.memUsageUnit=e->getConfInt("memUsageUnit",1); settings.cursorFollowsWheel=e->getConfInt("cursorFollowsWheel",0); settings.noDMFCompat=e->getConfInt("noDMFCompat",0); + settings.removeInsOff=e->getConfInt("removeInsOff",0); + settings.removeVolOff=e->getConfInt("removeVolOff",0); + settings.playOnLoad=e->getConfInt("playOnLoad",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.headFontSize,2,96); @@ -3022,6 +3148,9 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.memUsageUnit,0,1); clampSetting(settings.cursorFollowsWheel,0,1); clampSetting(settings.noDMFCompat,0,1); + clampSetting(settings.removeInsOff,0,1); + clampSetting(settings.removeVolOff,0,1); + clampSetting(settings.playOnLoad,0,2); if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; @@ -3121,7 +3250,7 @@ void FurnaceGUI::commitSettings() { e->setConf("tg100Path",settings.tg100Path); e->setConf("mu5Path",settings.mu5Path); e->setConf("mainFont",settings.mainFont); - e->setConf("headFont",settings.mainFont); + e->setConf("headFont",settings.headFont); e->setConf("patFont",settings.patFont); e->setConf("mainFontPath",settings.mainFontPath); e->setConf("headFontPath",settings.headFontPath); @@ -3177,6 +3306,8 @@ void FurnaceGUI::commitSettings() { e->setConf("oscTakesEntireWindow",settings.oscTakesEntireWindow); e->setConf("oscBorder",settings.oscBorder); e->setConf("oscEscapesBoundary",settings.oscEscapesBoundary); + e->setConf("oscMono",settings.oscMono); + e->setConf("oscAntiAlias",settings.oscAntiAlias); e->setConf("separateFMColors",settings.separateFMColors); e->setConf("insEditColorize",settings.insEditColorize); e->setConf("metroVol",settings.metroVol); @@ -3251,6 +3382,9 @@ void FurnaceGUI::commitSettings() { e->setConf("memUsageUnit",settings.memUsageUnit); e->setConf("cursorFollowsWheel",settings.cursorFollowsWheel); e->setConf("noDMFCompat",settings.noDMFCompat); + e->setConf("removeInsOff",settings.removeInsOff); + e->setConf("removeVolOff",settings.removeVolOff); + e->setConf("playOnLoad",settings.playOnLoad); // colors for (int i=0; ilockSave([&]() { @@ -235,6 +245,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int echoVol=(signed char)flags.getInt("echoVol",0); ImGui::Text("CPU rate:"); + ImGui::Indent(); if (ImGui::RadioButton("6.18MHz (NTSC)",clockSel==0)) { clockSel=0; altered=true; @@ -243,7 +254,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=1; altered=true; } + ImGui::Unindent(); ImGui::Text("Sample memory:"); + ImGui::Indent(); if (ImGui::RadioButton("8K (rev A/B/E)",sampleMemSize==0)) { sampleMemSize=0; altered=true; @@ -252,7 +265,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo sampleMemSize=1; altered=true; } + ImGui::Unindent(); ImGui::Text("DAC resolution:"); + ImGui::Indent(); if (ImGui::RadioButton("16-bit (rev A/B/D/F)",pdm==0)) { pdm=false; altered=true; @@ -261,6 +276,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo pdm=true; altered=true; } + ImGui::Unindent(); if (ImGui::Checkbox("Enable echo",&echo)) { altered=true; } @@ -317,6 +333,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo altered=true; } ImGui::Text("Chip revision:"); + ImGui::Indent(); if (ImGui::RadioButton("Original (DMG)",chipType==0)) { chipType=0; altered=true; @@ -333,8 +350,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo chipType=3; altered=true; } + ImGui::Unindent(); ImGui::Text("Wave channel orientation:"); if (chipType==3) { + ImGui::Indent(); if (ImGui::RadioButton("Normal",!invertWave)) { invertWave=false; altered=true; @@ -343,7 +362,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo invertWave=true; altered=true; } + ImGui::Unindent(); } else { + ImGui::Indent(); if (ImGui::RadioButton("Exact data (inverted)",!invertWave)) { invertWave=false; altered=true; @@ -352,6 +373,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo invertWave=true; altered=true; } + ImGui::Unindent(); } if (ImGui::Checkbox("Pretty please one more compat flag when I use arpeggio and my sound length",&enoughAlready)) { altered=true; @@ -375,6 +397,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool noTopHatFreq=flags.getBool("noTopHatFreq",false); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("NTSC (3.58MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -391,8 +414,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=3; altered=true; } + ImGui::Unindent(); if (type!=DIV_SYSTEM_VRC7) { ImGui::Text("Patch set:"); + ImGui::Indent(); if (ImGui::RadioButton("Yamaha YM2413",patchSet==0)) { patchSet=0; altered=true; @@ -409,6 +434,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo patchSet=3; altered=true; } + ImGui::Unindent(); } if (type==DIV_SYSTEM_OPLL_DRUMS) { @@ -431,6 +457,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo case DIV_SYSTEM_YM2151: { int clockSel=flags.getInt("clockSel",0); + ImGui::Indent(); if (ImGui::RadioButton("NTSC/X16 (3.58MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -443,6 +470,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -460,6 +488,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -472,9 +501,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); ImGui::Text("DPCM channel mode:"); + ImGui::Indent(); if (ImGui::RadioButton("DPCM (muffled samples; low CPU usage)",dpcmMode)) { dpcmMode=true; altered=true; @@ -483,6 +514,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo dpcmMode=false; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -503,6 +535,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("NTSC (1.02MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -515,9 +548,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); ImGui::Text("Global parameter priority:"); + ImGui::Indent(); if (ImGui::RadioButton("Left to right",!keyPriority)) { keyPriority=false; altered=true; @@ -526,6 +561,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo keyPriority=true; altered=true; } + ImGui::Unindent(); ImGui::Text("Hard reset envelope:"); @@ -576,6 +612,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int ssgVol=flags.getInt("ssgVol",128); int fmVol=flags.getInt("fmVol",256); + ImGui::Indent(); if (ImGui::RadioButton("8MHz (Neo Geo MVS)",clockSel==0)) { clockSel=0; altered=true; @@ -584,6 +621,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=1; altered=true; } + ImGui::Unindent(); if (type==DIV_SYSTEM_YM2610_EXT || type==DIV_SYSTEM_YM2610_FULL_EXT || type==DIV_SYSTEM_YM2610B_EXT || type==DIV_SYSTEM_YM2610_CSM || type==DIV_SYSTEM_YM2610B_CSM) { if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) { @@ -626,6 +664,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int stereoSep=flags.getInt("stereoSep",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("1.79MHz (ZX Spectrum NTSC/MSX)",clockSel==0)) { clockSel=0; altered=true; @@ -686,8 +725,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=14; altered=true; } + ImGui::Unindent(); if (type==DIV_SYSTEM_AY8910) { ImGui::Text("Chip type:"); + ImGui::Indent(); if (ImGui::RadioButton("AY-3-8910",chipType==0)) { chipType=0; altered=true; @@ -704,6 +745,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo chipType=3; altered=true; } + ImGui::Unindent(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip("note: AY-3-8914 is not supported by the VGM format!"); } @@ -744,6 +786,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo case DIV_SYSTEM_SAA1099: { int clockSel=flags.getInt("clockSel",0); + ImGui::Indent(); if (ImGui::RadioButton("SAM Coupé (8MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -756,6 +799,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -779,6 +823,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo } rightClickable ImGui::Text("Model:"); + ImGui::Indent(); if (ImGui::RadioButton("Amiga 500 (OCS)",chipType==0)) { chipType=0; altered=true; @@ -787,8 +832,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo chipType=1; altered=true; } + ImGui::Unindent(); ImGui::Text("Chip memory:"); + ImGui::Indent(); if (ImGui::RadioButton("2MB (ECS/AGA max)",chipMem==21)) { chipMem=21; altered=true; @@ -805,6 +852,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo chipMem=18; altered=true; } + ImGui::Unindent(); if (ImGui::Checkbox("PAL",&clockSel)) { @@ -830,6 +878,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int mixingType=flags.getInt("mixingType",0); ImGui::Text("Mixing mode:"); + ImGui::Indent(); if (ImGui::RadioButton("Mono",mixingType==0)) { mixingType=0; altered=true; @@ -842,6 +891,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo mixingType=2; altered=true; } + ImGui::Unindent(); if (ImGui::Checkbox("PAL",&clockSel)) { altered=true; @@ -860,6 +910,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int speakerType=flags.getInt("speakerType",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("1.19MHz (PC)",clockSel==0)) { clockSel=0; altered=true; @@ -872,8 +923,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); ImGui::Text("Speaker type:"); + ImGui::Indent(); if (ImGui::RadioButton("Unfiltered",speakerType==0)) { speakerType=0; altered=true; @@ -890,6 +943,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo speakerType=3; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -933,6 +987,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool stereo=flags.getBool("stereo",false); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("16MHz (Seta 1)",clockSel==0)) { clockSel=0; altered=true; @@ -945,6 +1000,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); if (ImGui::Checkbox("Stereo",&stereo)) { altered=true; @@ -965,6 +1021,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool lenCompensate=flags.getBool("lenCompensate",false); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -977,6 +1034,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); ImGui::Text("Initial channel limit:"); if (CWSliderInt("##N163_InitialChannelLimit",&channels,1,8)) { if (channels<1) channels=1; @@ -1037,6 +1095,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int fmVol=flags.getInt("fmVol",256); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { clockSel=0; altered=true; @@ -1061,7 +1120,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=5; altered=true; } + ImGui::Unindent(); ImGui::Text("Output rate:"); + ImGui::Indent(); if (ImGui::RadioButton("FM: clock / 72, SSG: clock / 16",prescale==0)) { prescale=0; altered=true; @@ -1074,6 +1135,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo prescale=2; altered=true; } + ImGui::Unindent(); if (CWSliderInt("SSG Volume",&ssgVol,0,256)) { if (ssgVol<0) ssgVol=0; @@ -1119,6 +1181,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int fmVol=flags.getInt("fmVol",256); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("8MHz (Arcade)",clockSel==0)) { clockSel=0; altered=true; @@ -1127,7 +1190,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=1; altered=true; } + ImGui::Unindent(); ImGui::Text("Output rate:"); + ImGui::Indent(); if (ImGui::RadioButton("FM: clock / 144, SSG: clock / 32",prescale==0)) { prescale=0; altered=true; @@ -1140,6 +1205,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo prescale=2; altered=true; } + ImGui::Unindent(); if (CWSliderInt("SSG Volume",&ssgVol,0,256)) { if (ssgVol<0) ssgVol=0; @@ -1179,6 +1245,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int chipType=flags.getInt("chipType",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("8MHz (FM Towns)",clockSel==0)) { clockSel=0; altered=true; @@ -1191,7 +1258,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=2; altered=true; } + ImGui::Unindent(); ImGui::Text("Chip type:"); + ImGui::Indent(); if (ImGui::RadioButton("RF5C68 (10-bit output)",chipType==0)) { chipType=0; altered=true; @@ -1200,6 +1269,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo chipType=1; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1213,6 +1283,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int clockSel=flags.getInt("clockSel",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("4MHz",clockSel==0)) { clockSel=0; altered=true; @@ -1229,6 +1300,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=3; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1242,6 +1314,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool rateSel=flags.getBool("rateSel",false); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("1MHz",clockSel==0)) { clockSel=0; altered=true; @@ -1302,7 +1375,9 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=14; altered=true; } + ImGui::Unindent(); ImGui::Text("Output rate:"); + ImGui::Indent(); if (ImGui::RadioButton("clock / 132",rateSel==0)) { rateSel=false; altered=true; @@ -1311,6 +1386,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo rateSel=true; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1325,6 +1401,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int clockSel=flags.getInt("clockSel",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("1.79MHz (NTSC/MSX)",clockSel==0)) { clockSel=0; altered=true; @@ -1341,6 +1418,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=3; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1358,6 +1436,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int clockSel=flags.getInt("clockSel",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { clockSel=0; altered=true; @@ -1382,6 +1461,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=5; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1396,6 +1476,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool compatPan=flags.getBool("compatPan",false); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("14.32MHz (NTSC)",clockSel==0)) { clockSel=0; altered=true; @@ -1416,6 +1497,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=4; altered=true; } + ImGui::Unindent(); if (ImGui::Checkbox("Compatible panning (0800)",&compatPan)) { altered=true; @@ -1433,6 +1515,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int clockSel=flags.getInt("clockSel",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("16.9344MHz",clockSel==0)) { clockSel=0; altered=true; @@ -1457,6 +1540,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=5; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1489,6 +1573,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo } ImGui::Text("Interpolation:"); + ImGui::Indent(); if (ImGui::RadioButton("None",interpolation==0)) { interpolation=0; altered=true; @@ -1505,6 +1590,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo interpolation=3; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1741,6 +1827,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo } ImGui::Text("Envelope mode (channel 1-4):"); + ImGui::Indent(); if (ImGui::RadioButton("Capacitor (attack/decay)##EM00",groupEnv[0])) { groupEnv[0]=true; altered=true; @@ -1749,8 +1836,10 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo groupEnv[0]=false; altered=true; } + ImGui::Unindent(); ImGui::Text("Envelope mode (channel 5-8):"); + ImGui::Indent(); if (ImGui::RadioButton("Capacitor (attack/decay)##EM10",groupEnv[1])) { groupEnv[1]=true; altered=true; @@ -1759,6 +1848,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo groupEnv[1]=false; altered=true; } + ImGui::Unindent(); ImGui::Text("Global vibrato:"); @@ -1834,6 +1924,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo bool romMode=flags.getBool("romMode",false); ImGui::Text("Waveform storage mode:"); + ImGui::Indent(); if (ImGui::RadioButton("RAM",!romMode)) { romMode=false; altered=true; @@ -1842,6 +1933,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo romMode=true; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1897,6 +1989,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo int clockSel=flags.getInt("clockSel",0); ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) { clockSel=0; altered=true; @@ -1905,6 +1998,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=1; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1919,6 +2013,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo ImGui::Text("Clock rate:"); + ImGui::Indent(); if (ImGui::RadioButton("NTSC (1.79MHz)",clockSel==0)) { clockSel=0; altered=true; @@ -1927,9 +2022,11 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo clockSel=1; altered=true; } + ImGui::Unindent(); ImGui::Text("Global parameter priority:"); + ImGui::Indent(); if (ImGui::RadioButton("Left to right",!keyPriority)) { keyPriority=false; altered=true; @@ -1938,6 +2035,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo keyPriority=true; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() { @@ -1988,11 +2086,13 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo } altered=true; } + ImGui::Indent(); if (ImGui::InputInt("Hz",&customClock)) { if (customClockMAX_CUSTOM_CLOCK) customClock=MAX_CUSTOM_CLOCK; altered=true; } + ImGui::Unindent(); if (altered) { e->lockSave([&]() {