Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap the meaning of 'a' and 'A' in absolute and relative notation #630

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4",
"version": "3.0.0-beta.5",
"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.6",
"sonic-weave": "github:xenharmonic-devs/sonic-weave#v0.0.7",
"sw-synth": "^0.1.0",
"temperaments": "^0.5.3",
"vue": "^3.3.4",
Expand Down
3 changes: 2 additions & 1 deletion src/character-palette.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"♮": "Natural sign. Signifies no change in pitch. Differentiates between augmented fourth <code>A4</code> and A natural four <code>A♮4</code>.",
"♮": "Natural sign. Signifies no change in pitch.",
"♯": "Sharp sign. Raises pitch by <code>2187/2048</code>. E.g. F sharp four is spelled <code>F♯4</code>.",
"♭": "Flat sign. Lowers pitch by <code>2187/2048</code>. E.g. B flat four is spelled <code>B♭4</code>.",
"𝄪": "Double sharp sign. Raises pitch by <code>4782969/4194304</code>.",
"𝄫": "Double flat sign. Lowers pitch by <code>4782969/4194304</code>.",
"Â": "Augmented interval quality. Capital A is reserved for absolute pitch so circumflexed <code>Â4</code> offers and alternative to <code>a4</code>.",
"𝄲": "Quarter sharp sign. Raises pitch by <code>sqrt(2187/2048)</code>.",
"‡": "Quarter sharp sign. Raises pitch by <code>sqrt(2187/2048)</code>.",
"𝄳": "Quarter flat sign. Lowers pitch by <code>sqrt(2187/2048)</code>.",
Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/generation/EqualTemperament.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ function generate(expand = true) {
if (expand || !modal.simpleEd) {
source = modal.degrees.map((steps) => `${steps}\\${edo}`).join('\n')
} else {
source = `ed(${edo})`
source = `tet(${edo})`
}
} else {
const ed = modal.divisions
const ji = modal.equave.toString()
if (expand || !modal.simpleEd) {
source = modal.degrees.map((steps) => `${steps}\\${ed}<${ji}>`).join('\n')
} else {
source = `ed(${ed}, ${ji})`
source = `tet(${ed}, ${ji})`
}
}
emit('update:source', source)
Expand Down
4 changes: 3 additions & 1 deletion src/exporters/__tests__/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ export function getTestData(appTitle: string) {
subscripts: [[5, '']]
})
const visitor = getSourceVisitor()
visitor.visit(parseAST('a4 = 440 Hz').body[0])
visitor.visit(parseAST('A4 = 440 Hz').body[0])
const ev = visitor.createExpressionVisitor()
const relativeC5 = relative.bind(ev)(absoluteC5)

const relativeIntervals = [
new Interval(TimeMonzo.fromEqualTemperament('100/1200', 2, 3), 'logarithmic', {
type: 'CentsLiteral',
sign: '',
whole: 100n,
fractional: ''
}),
Expand All @@ -48,6 +49,7 @@ export function getTestData(appTitle: string) {
}),
new Interval(TimeMonzo.fromValue(Math.E / 2, 3), 'linear', {
type: 'DecimalLiteral',
sign: '',
whole: 1n,
fractional: '3591409142295225',
flavor: 'r',
Expand Down
4 changes: 2 additions & 2 deletions src/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@
"5edo": {
"title": "Equal pentatonic",
"name": "Equal pentatonic (5edo)",
"source": "ed(5)\nlabel([white, white, white, white, gray])\n",
"source": "tet(5)\nlabel([white, white, white, white, gray])\n",
"categories": ["traditional", "equal temperament"]
},
"7edo": {
"title": "Equal heptatonic",
"name": "Equal heptatonic (7edo)",
"source": "ed(7)\ni => i white\npop() gray\n",
"source": "tet(7)\ni => i white\npop() gray\n",
"categories": ["traditional", "equal temperament"]
},
"archytasdiatonic": {
Expand Down
Loading