dev138 - fix broken porta after legato
This commit is contained in:
parent
f7b30771d8
commit
539b2ec2db
|
@ -32,6 +32,7 @@ these fields are 0 in format versions prior to 100 (0.6pre1).
|
|||
|
||||
the format versions are:
|
||||
|
||||
- 138: Furnace dev138
|
||||
- 137: Furnace dev137
|
||||
- 136: Furnace dev136
|
||||
- 135: Furnace dev135
|
||||
|
@ -399,6 +400,9 @@ size | description
|
|||
4?? | patchbay
|
||||
| - see next section for more details.
|
||||
1 | automatic patchbay (>=136)
|
||||
--- | **a couple more compat flags** (>=138)
|
||||
1 | broken portamento during legato
|
||||
7 | reserved
|
||||
```
|
||||
|
||||
# patchbay
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
|
||||
#define BUSY_END isBusy.unlock(); softLocked=false;
|
||||
|
||||
#define DIV_VERSION "dev137"
|
||||
#define DIV_ENGINE_VERSION 137
|
||||
#define DIV_VERSION "dev138"
|
||||
#define DIV_ENGINE_VERSION 138
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
@ -1716,6 +1716,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
if (ds.version<130) {
|
||||
ds.oldArpStrategy=true;
|
||||
}
|
||||
if (ds.version<138) {
|
||||
ds.brokenPortaLegato=true;
|
||||
}
|
||||
ds.isDMF=false;
|
||||
|
||||
reader.readS(); // reserved
|
||||
|
@ -2221,6 +2224,13 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
|
||||
if (ds.version>=136) song.patchbayAuto=reader.readC();
|
||||
|
||||
if (ds.version>=138) {
|
||||
ds.brokenPortaArp=reader.readC();
|
||||
for (int i=0; i<7; i++) {
|
||||
reader.readC();
|
||||
}
|
||||
}
|
||||
|
||||
// read system flags
|
||||
if (ds.version>=119) {
|
||||
logD("reading chip flags...");
|
||||
|
@ -4515,6 +4525,12 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
|||
}
|
||||
w->writeC(song.patchbayAuto);
|
||||
|
||||
// even more compat flags
|
||||
w->writeC(song.brokenPortaLegato);
|
||||
for (int i=0; i<7; i++) {
|
||||
w->writeC(0);
|
||||
}
|
||||
|
||||
blockEndSeek=w->tell();
|
||||
w->seek(blockStartSeek,SEEK_SET);
|
||||
w->writeI(blockEndSeek-blockStartSeek-4);
|
||||
|
|
|
@ -896,7 +896,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
chan[i].vibratoPos=0;
|
||||
}
|
||||
dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
|
||||
if (chan[i].legato) {
|
||||
if (chan[i].legato && (!chan[i].inPorta || song.brokenPortaLegato)) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_LEGATO,i,chan[i].note));
|
||||
} else {
|
||||
|
|
|
@ -330,6 +330,7 @@ struct DivSong {
|
|||
bool autoSystem;
|
||||
bool oldArpStrategy;
|
||||
bool patchbayAuto;
|
||||
bool brokenPortaLegato;
|
||||
|
||||
std::vector<DivInstrument*> ins;
|
||||
std::vector<DivWavetable*> wave;
|
||||
|
@ -439,7 +440,8 @@ struct DivSong {
|
|||
disableSampleMacro(false),
|
||||
autoSystem(true),
|
||||
oldArpStrategy(false),
|
||||
patchbayAuto(true) {
|
||||
patchbayAuto(true),
|
||||
brokenPortaLegato(false) {
|
||||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||
system[i]=DIV_SYSTEM_NULL;
|
||||
systemVol[i]=1.0;
|
||||
|
|
|
@ -293,6 +293,10 @@ void FurnaceGUI::drawCompatFlags() {
|
|||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("behavior changed in 0.6pre2");
|
||||
}
|
||||
ImGui::Checkbox("Broken portamento during legato",&e->song.brokenPortaLegato);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("behavior changed in 0.6pre4");
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_COMPAT_FLAGS;
|
||||
ImGui::End();
|
||||
|
|
Loading…
Reference in a new issue