From 3a2773664777502737c09a4aebf5addea81ffdfa Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Sat, 15 Jun 2024 15:23:36 +0300 Subject: [PATCH] WIP: Round after prime mapping not in prime mapping TODO: Fix sonic-weave #348 ref #755 --- src/components/modals/modification/TemperScale.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/modals/modification/TemperScale.vue b/src/components/modals/modification/TemperScale.vue index b0770a92..7bef62b7 100644 --- a/src/components/modals/modification/TemperScale.vue +++ b/src/components/modals/modification/TemperScale.vue @@ -5,7 +5,7 @@ import { Temperament, tenneyVals, vanishCommas } from 'temperaments' import { useTemperStore } from '@/stores/tempering' import { useScaleStore } from '@/stores/scale' import { useStateStore } from '@/stores/state' -import { setAndReportValidity } from '@/utils' +import { setAndReportValidity, centString } from '@/utils' defineProps<{ show: boolean @@ -48,6 +48,7 @@ function modify(expand = true) { tenneyVals(temper.vals, temper.subgroup, temper.weights, 'cents') ) } + scale.sourceText += `\n(* Vals = ${temper.valsString} *)` } } else if (temper.method === 'commas') { if (temper.constraintsAvailable) { @@ -65,11 +66,12 @@ function modify(expand = true) { ) ) } + scale.sourceText += `\n(* Commas = ${temper.commasString} *)` } if (temper.method === 'mapping') { scale.sourceText += `\nPrimeMapping(${temper.mappingString})` } else if (mapping) { - scale.sourceText += `\nPrimeMapping(${mapping.map((c) => c.toFixed(state.centsFractionDigits)).join(', ')})` + scale.sourceText += `\nPrimeMapping(${mapping.map((c) => centString(c)).join(', ')})\ncents(£, ${state.centsFractionDigits})` } if (expand) { const { visitor, defaults } = scale.getUserScopeVisitor()