From acee829079c2f8110adf420a35f11184466ece1c Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Fri, 5 Apr 2024 10:33:01 +0300 Subject: [PATCH] Fix handling of negative intervals in Anamark and Reaper exporters Update sonic-weave dependency. --- package-lock.json | 10 +++++----- package.json | 4 ++-- src/exporters/anamark.ts | 4 ++-- src/exporters/reaper.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index cad300b1..c3ab2e49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scale-workshop", - "version": "3.0.0-beta.8", + "version": "3.0.0-beta.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "scale-workshop", - "version": "3.0.0-beta.8", + "version": "3.0.0-beta.9", "dependencies": { "isomorphic-qwerty": "^0.0.2", "ji-lattice": "^0.0.3", @@ -14,7 +14,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", @@ -5414,8 +5414,8 @@ } }, "node_modules/sonic-weave": { - "version": "0.0.8", - "resolved": "git+ssh://git@github.com/xenharmonic-devs/sonic-weave.git#2c00c749cde9c4b06364963013b6f85652535950", + "version": "0.0.9", + "resolved": "git+ssh://git@github.com/xenharmonic-devs/sonic-weave.git#48d5cf0dd9026c978a8a0958957f73d036ef1001", "license": "MIT", "dependencies": { "moment-of-symmetry": "^0.4.2", diff --git a/package.json b/package.json index 06700fb7..2d383f16 100644 --- a/package.json +++ b/package.json @@ -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 {@}\" --", @@ -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", diff --git a/src/exporters/anamark.ts b/src/exporters/anamark.ts index 65d9087a..badbfaf9 100644 --- a/src/exporters/anamark.ts +++ b/src/exporters/anamark.ts @@ -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 } } diff --git a/src/exporters/reaper.ts b/src/exporters/reaper.ts index 442ffc12..64a44e0e 100644 --- a/src/exporters/reaper.ts +++ b/src/exporters/reaper.ts @@ -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(