Skip to content

Commit

Permalink
Fix handling of negative intervals in Anamark and Reaper exporters
Browse files Browse the repository at this point in the history
Update sonic-weave dependency.
  • Loading branch information
frostburn committed Apr 6, 2024
1 parent 00e469c commit acee829
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scale-workshop",
"version": "3.0.0-beta.8",
"version": "3.0.0-beta.9",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
Expand All @@ -21,7 +21,7 @@
"moment-of-symmetry": "^0.4.2",
"pinia": "^2.1.7",
"qs": "^6.12.0",
"sonic-weave": "github:xenharmonic-devs/sonic-weave#v0.0.8",
"sonic-weave": "github:xenharmonic-devs/sonic-weave#v0.0.9",
"sw-synth": "^0.1.0",
"temperaments": "^0.5.3",
"vue": "^3.3.4",
Expand Down
4 changes: 2 additions & 2 deletions src/exporters/anamark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ class AnaMarkExporter extends BaseExporter {
'="#>-' +
i +
' % ' +
intervals[i - 1].totalCents().toFixed(6) +
intervals[i - 1].totalCents(true).toFixed(6) +
' ~999"' +
newline
} else {
file +=
'note ' + i + '="#=0 % ' + intervals[i - 1].totalCents().toFixed(6) + '"' + newline
'note ' + i + '="#=0 % ' + intervals[i - 1].totalCents(true).toFixed(6) + '"' + newline
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/exporters/reaper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class ReaperExporter extends BaseExporter {
if (interval.domain === 'linear') {
file += value.valueOf().toFixed(digits).replace('.', ',')
} else {
file += value.totalCents().toFixed(digits)
file += value.totalCents(true).toFixed(digits)
}
} else {
file += new Interval(
Expand Down

0 comments on commit acee829

Please sign in to comment.