Skip to content

Commit

Permalink
Revert "Fix Error: Assignment to constant variable"
Browse files Browse the repository at this point in the history
This reverts commit aadd943.
  • Loading branch information
daksh4469 committed Mar 2, 2021
1 parent 0140cdf commit a9b0afa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/widgets/temperament.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/*
global platformColor, docById, wheelnav, slicePath, logo, Singer, isCustom,
TEMPERAMENT, rationalToFraction, _, getNoteFromInterval,
TEMPERAMENT, OCTAVERATIO: true, rationalToFraction, _, getNoteFromInterval,
FLAT, SHARP, pitchToFrequency, updateTemperaments, _buildScale
*/

Expand Down Expand Up @@ -1768,7 +1768,8 @@ class TemperamentWidget {
}
}

const OctaveRatio = this.powerBase;
// Global value
OCTAVERATIO = this.powerBase;

const value = logo.blocks.findUniqueTemperamentName(this.inTemperament);
this.inTemperament = value; // change from temporary "custom" to "custom1" or "custom2" ..
Expand All @@ -1780,8 +1781,8 @@ class TemperamentWidget {
[4, ["number", { value: this.frequencies[0] }], 0, 0, [2]],
[5, ["octavespace"], 0, 0, [2, 6, 9]],
[6, ["divide"], 0, 0, [5, 7, 8]],
[7, ["number", { value: rationalToFraction(OctaveRatio)[0] }], 0, 0, [6]],
[8, ["number", { value: rationalToFraction(OctaveRatio)[1] }], 0, 0, [6]],
[7, ["number", { value: rationalToFraction(OCTAVERATIO)[0] }], 0, 0, [6]],
[8, ["number", { value: rationalToFraction(OCTAVERATIO)[1] }], 0, 0, [6]],
[9, "vspace", 0, 0, [5, 10]]
];
let previousBlock = 9;
Expand Down

0 comments on commit a9b0afa

Please sign in to comment.