Adding text export fixtures for ESFM instruments

This commit is contained in:
Kagamiin~ 2023-12-17 10:40:59 -03:00
parent 71841aaf4f
commit b6d632bc9c

View file

@ -6445,7 +6445,7 @@ SafeWriter* DivEngine::saveText(bool separatePatterns) {
w->writeText(fmt::sprintf("- type: %d\n",(int)ins->type));
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPZ || ins->type==DIV_INS_OPL_DRUMS || ins->type==DIV_INS_OPM) {
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPZ || ins->type==DIV_INS_OPL_DRUMS || ins->type==DIV_INS_OPM || ins->type==DIV_INS_ESFM) {
w->writeText("- FM parameters:\n");
w->writeText(fmt::sprintf(" - ALG: %d\n",ins->fm.alg));
w->writeText(fmt::sprintf(" - FB: %d\n",ins->fm.fb));
@ -6489,6 +6489,25 @@ SafeWriter* DivEngine::saveText(bool separatePatterns) {
}
}
if (ins->type==DIV_INS_ESFM) {
w->writeText("- ESFM parameters:\n");
w->writeText(fmt::sprintf(" - noise mode: %d\n",ins->esfm.noise));
for (int j=0; j<ins->fm.ops; j++) {
DivInstrumentESFM::Operator& opE=ins->esfm.op[j];
w->writeText(fmt::sprintf(" - operator %d:\n",j));
w->writeText(fmt::sprintf(" - DL: %d\n",opE.delay));
w->writeText(fmt::sprintf(" - OL: %d\n",opE.outLvl));
w->writeText(fmt::sprintf(" - MI: %d\n",opE.modIn));
w->writeText(fmt::sprintf(" - output left: %s\n",trueFalse[opE.left?1:0]));
w->writeText(fmt::sprintf(" - output right: %s\n",trueFalse[opE.right?1:0]));
w->writeText(fmt::sprintf(" - CT: %d\n",opE.ct));
w->writeText(fmt::sprintf(" - DT: %d\n",opE.dt));
w->writeText(fmt::sprintf(" - fixed frequency: %s\n",trueFalse[opE.fixed?1:0]));
}
}
if (ins->type==DIV_INS_GB) {
w->writeText("- Game Boy parameters:\n");
w->writeText(fmt::sprintf(" - volume: %d\n",ins->gb.envVol));