Skip to content

Commit b828e6b

Browse files
committed
Fix typos in code and elsewhere
Add dummy constructors to pacify the type checker.
1 parent ab0aca6 commit b828e6b

21 files changed

+52
-40
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
* Improvement: Improve loading times with asynchronous components [#520](https://github.com/xenharmonic-devs/scale-workshop/issues/520)
121121
* Bug fix: Fix tempering in exotic subgroups [#518](https://github.com/xenharmonic-devs/scale-workshop/issues/518)
122122
* Bug fix: Close Korg export modal when pressing escape [#524](https://github.com/xenharmonic-devs/scale-workshop/issues/524)
123-
* Refactoring: Split isomorhic QWERTY to s re-usable package [#336](https://github.com/xenharmonic-devs/scale-workshop/issues/336)
123+
* Refactoring: Split isomorphic QWERTY into a re-usable package [#336](https://github.com/xenharmonic-devs/scale-workshop/issues/336)
124124

125125
## 2.3.2
126126
* Bug fix: Make copy & paste possible outside of scale data [#515](https://github.com/xenharmonic-devs/scale-workshop/issues/515)
@@ -153,7 +153,7 @@
153153
* Feature: Light-weight algorithms for tempering in extremely large just intonation subgroups
154154
* Feature: Visualize how the various MIDI mappings assign scale degrees
155155
* Feature: Implement visual MIDI channel indicators
156-
* Feature: Interprete non-integer equal temperaments as cET
156+
* Feature: Interpret non-integer equal temperaments as cET
157157
* Feature: Implement basic reverb using a ping-pong delay
158158
* Feature: Implement new metric prefixes from quecto to quetta
159159
* Standardization: Rename reference pitch to A4
@@ -190,7 +190,7 @@
190190
* Feature: Rank-2 scales can now be manipulated interactively by clicking on the period circle in a new tab inside the modal for *New scale → Rank-2 temperament*
191191
* Refactoring: Core functionality now at [scale-workshop-core](https://github.com/xenharmonic-devs/scale-workshop-core) for better reusability
192192
* Refactoring: Utility packages [xen-dev-utils](https://www.npmjs.com/package/xen-dev-utils), [moment-of-symmetry](https://www.npmjs.com/package/moment-of-symmetry) and [temperaments](https://www.npmjs.com/package/temperaments) are now sourced from npm.
193-
* Bug fix: Decimal dots in the interval matrix is now consistent with the tunng table
193+
* Bug fix: Decimal dots in the interval matrix is now consistent with the tuning table
194194
* Bug fix: Touching the screen in piano layout played multiple notes in unison
195195
* Bug fix: Typing out text in some of the scale creation modals made sound
196196
* Bug fix: Disable browser specific features like quick find on Firefox

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ See [sw-server](https://github.com/xenharmonic-devs/sw-server) for the backend c
275275

276276
## License
277277

278-
MIT, see [LICENCE](LICENSE) for details.
278+
MIT, see [LICENSE](LICENSE) for details.
279279

280280
## Related projects
281281

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ onMounted(async () => {
376376
const url = new URL(window.location.href)
377377
const query = url.searchParams
378378
379-
// This is overriden when scale data is evaluated, but some corner cases need to be covered.
379+
// This is overridden when scale data is evaluated, but some corner cases need to be covered.
380380
setNumberOfComponents(DEFAULT_NUMBER_OF_COMPONENTS)
381381
382382
// Special handling for the empty app state so that

src/__tests__/util.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Exponential formatter', () => {
4141
})
4242

4343
describe('Hertz formatter', () => {
44-
it('leaves resonable frequencies as is', () => {
44+
it('leaves reasonable frequencies as is', () => {
4545
expect(formatHertz(12.345)).toBe('12.345Hz')
4646
expect(formatHertz(21234.567)).toBe('21234.567Hz')
4747
})
@@ -83,7 +83,7 @@ describe('Auto key color algorithm', () => {
8383
)
8484
})
8585

86-
it('produces something resonable with 17 notes', () => {
86+
it('produces something reasonable with 17 notes', () => {
8787
const colors = autoKeyColors(17)
8888
expect(colors.join(' ')).toBe(
8989
'white white black white white white black white white black white white white black white white black'

src/analysis.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function otonalCorrection(ratios: number[]) {
2020
}
2121

2222
// Calculate the best multiplier for a set of ratios that
23-
// miminizes the perceived motion of an otonal chord wheel.
23+
// minimizes the perceived motion of an otonal chord wheel.
2424
function otonalMultiplier(ratios: number[], maxMultiplier = 16) {
2525
let leastError = Infinity
2626
let result = 1
@@ -69,7 +69,7 @@ function utonalCorrection(ratios: number[]) {
6969
}
7070

7171
// Calculate the best divisor for a set of ratios that
72-
// miminizes the perceived motion of an utonal chord wheel.
72+
// minimizes the perceived motion of an utonal chord wheel.
7373
export function utonalDivisor(ratios: number[], maxDivisor = 23) {
7474
let leastError = Infinity
7575
let result = 1

src/components/ChordWheel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function draw(time: DOMHighResTimeStamp) {
8383
}
8484
8585
// Render a chord wheel that appears to move based on how
86-
// disconcordant the voices are compared to a pure enumerated chord.
86+
// discordant the voices are compared to a pure enumerated chord.
8787
const offsetWidth = canvas.value!.offsetWidth
8888
ctx.lineWidth = (props.lineWidth * props.width) / offsetWidth
8989
ctx.strokeStyle = props.strokeStyle

src/components/Faux3DLattice.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const viewBox = reactive([-1, -1, 2, 2])
2828
const lattice = computed(() => {
2929
const result = spanLattice3D(props.monzos, store.latticeOptions3D)
3030
// Center everything so that the vanishing point is at the center of the view box
31-
const inorm = 1 / result.vertices.length
32-
const avgX = result.vertices.reduce((s, v) => s + v.x, 0) * inorm
33-
const avgY = result.vertices.reduce((s, v) => s + v.y, 0) * inorm
34-
const avgZ = result.vertices.reduce((s, v) => s + v.z, 0) * inorm
31+
const inverseNorm = 1 / result.vertices.length
32+
const avgX = result.vertices.reduce((s, v) => s + v.x, 0) * inverseNorm
33+
const avgY = result.vertices.reduce((s, v) => s + v.y, 0) * inverseNorm
34+
const avgZ = result.vertices.reduce((s, v) => s + v.z, 0) * inverseNorm
3535
result.vertices = result.vertices.map((v) => ({
3636
...v,
3737
x: v.x - avgX,

src/components/PeriodCircle.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const mosLabel = computed(() => {
112112
const n = props.numPeriods
113113
return `${n * countL}L ${n * countM}M ${n * countS}s`
114114
}
115-
// There are degenerate edgecases with step variety = 2. Show nothing to avoid implying MOS.
115+
// There are degenerate edge-cases with step variety = 2. Show nothing to avoid implying MOS.
116116
return ''
117117
})
118118
@@ -250,7 +250,7 @@ function onWindowMouseUp(event: MouseEvent) {
250250
// Notes on touch handling:
251251
// * Touch start must not preventDefault to allow scrolling with two fingers.
252252
// * Touch move must preventDefault to prevent scrolling with one finger.
253-
// * The behaviour is a bit sporadic when two-finger scrolling is released and only one finger remains on the svg element.
253+
// * The behavior is a bit sporadic when two-finger scrolling is released and only one finger remains on the svg element.
254254
255255
function handleTouch(touch: Touch) {
256256
const svg = container.value!

src/exporters/pure-data.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import { BaseExporter } from '@/exporters/base'
1+
import { BaseExporter, type ExporterParams } from '@/exporters/base'
22

33
export default class PureDataExporter extends BaseExporter {
44
static tuningMaxSize = 128
55

6+
constructor(params: ExporterParams) {
7+
super(params)
8+
}
9+
610
// assemble the text file contents
711
getFileContents() {
812
let file = ''

src/exporters/reaper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { BaseExporter } from '@/exporters/base'
1+
import { BaseExporter, type ExporterParams } from '@/exporters/base'
22
import { Interval, TimeReal, intervalValueAs } from 'sonic-weave'
33
import { mmod, valueToCents } from 'xen-dev-utils'
44

55
export default class ReaperExporter extends BaseExporter {
66
static tuningMaxSize = 128
77
static fractionDigits = 3
88

9+
constructor(params: ExporterParams) {
10+
super(params)
11+
}
12+
913
getFileContentsAndSuffix() {
1014
const digits = ReaperExporter.fractionDigits
1115
const scale = this.params.scale

0 commit comments

Comments
 (0)