Skip to content

Commit

Permalink
fix bug when arpeggio goes above B-3
Browse files Browse the repository at this point in the history
  • Loading branch information
juusu committed Apr 12, 2022
1 parent b6d8893 commit a89c6d7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RetroConverter v1.0.0
# RetroConverter v1.0.2

## What is it?

Expand Down
12 changes: 11 additions & 1 deletion src/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,18 @@ class Converter {
break;
default:
var finetune = mod.instruments[trackInstrumentNumber[t] - 1].finetune;
var noteIndex = this.#periodTable[finetune].indexOf(
this.#periodTable[finetune].find(function (period) { return period <= trackPeriod[t] })
) + arpOffsets[arpStep];

// handle arpeggio wrap like PT
if (noteIndex > 35) {
finetune++;
noteIndex-=36;
}

periodData[t].push(
this.#periodTable[finetune][this.#periodTable[finetune].indexOf(this.#periodTable[finetune].find(function (period) { return period <= trackPeriod[t]; })) + arpOffsets[arpStep]]
this.#periodTable[finetune][noteIndex]
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/ /_/ _/ / / /_/ / /
\_/ \______/\_/\_/ \____/

-= RETROCONVERT v1.0.1 =-
&copy; 2020-2021 JUiCE / iNSANE ^ Reality
-= RETROCONVERT v1.0.2 =-
&copy; 2020-2022 JUiCE / iNSANE ^ Reality
</pre>
<div class="ui raised segments">
<div class="ui two top attached steps">
Expand Down

0 comments on commit a89c6d7

Please sign in to comment.