Skip to content

Commit

Permalink
Round after prime mapping not in prime mapping
Browse files Browse the repository at this point in the history
Update xen-dev-utils, moment-of-symmetry and sonic-weave to get addition of too accurate cents to coearce to reals.

ref #755
  • Loading branch information
frostburn committed Jun 16, 2024
1 parent 0e6d0e1 commit df548e6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

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

8 changes: 4 additions & 4 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.44",
"version": "3.0.0-beta.45",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
Expand All @@ -19,17 +19,17 @@
"isomorphic-qwerty": "^0.0.2",
"ji-lattice": "^0.2.0",
"jszip": "^3.10.1",
"moment-of-symmetry": "^0.8.1",
"moment-of-symmetry": "^0.8.2",
"pinia": "^2.1.7",
"qs": "^6.12.0",
"sonic-weave": "0.5.0",
"sonic-weave": "0.5.1",
"sw-synth": "^0.1.0",
"temperaments": "^0.5.3",
"values.js": "^2.1.1",
"vue": "^3.3.4",
"vue-router": "^4.3.0",
"webmidi": "^3.1.8",
"xen-dev-utils": "^0.9.0",
"xen-dev-utils": "^0.9.2",
"xen-midi": "^0.2.0"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions src/components/modals/modification/TemperScale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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()
Expand Down

0 comments on commit df548e6

Please sign in to comment.