Skip to content

Commit

Permalink
Golf presets and generated code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
frostburn committed Apr 30, 2024
1 parent fe8129b commit daf2275
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/modals/generation/HistoricalScale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ function generate(expand = true) {
) {
emit('update:baseFrequency', FREQUENCY_C)
emit('update:baseMidiNote', MIDI_NOTE_C)
source += `\nlabel([${KEY_COLORS_C.join(', ')}])`
source += `\n[${KEY_COLORS_C.join(', ')}]`
const labels: string[] = []
for (let i = 0; i < historical.size; ++i) {
labels[mmod(7 * (i - historical.down) - 1, historical.size)] = JSON.stringify(
spineLabel(i - historical.down)
)
}
source += `\nlabel([${labels.join(', ')}])`
source += `\n[${labels.join(', ')}]`
}
if (expand) {
source = expandCode(source)
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/generation/RankTwo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function generate(expand = true) {
} else {
up = size - n - rank2.down
}
labelString = `\nlabel([${colors.join(', ')}])`
labelString = `\n[${colors.join(', ')}]`
}
const source = `rank2(${rank2.generator.toString()}, ${up}, ${down}, ${rank2.period.toString()}, ${n})${labelString}`
emit('update:scaleName', `Rank 2 temperament (${rank2.generatorString}, ${rank2.periodString})`)
Expand Down
6 changes: 3 additions & 3 deletions src/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"ragabhairavi": {
"name": "Raga Bhairavi",
"source": "eulerGenus(135, 5)\n$[5] = 16/15\nsort()\nlabel([black, white, black, black, white, black, black, white])\n",
"source": "eulerGenus(135, 5)\n$[5] = 16/15\nsort()\n[black, white, black, black, white, black, black, white]\n",
"categories": ["traditional", "just intonation"]
},
"ragakafi": {
Expand Down Expand Up @@ -134,7 +134,7 @@
},
"pythagorean": {
"name": "Pythagorean",
"source": "[3^i rdc 2 white for i of [-2..4]] ['F', 'C', 'G', 'D', 'A', 'E', 'B']\n[3^i rdc 2 black for i of [-7..-3]] ['G♭', 'D♭', 'A♭', 'E♭', 'B♭']\nsort()\n",
"source": "(3^[-2..4] rdc 2) white ['F', 'C', 'G', 'D', 'A', 'E', 'B']\n(3^[-7..-3] rdc 2) black ['G♭', 'D♭', 'A♭', 'E♭', 'B♭']\nsort()\n",
"categories": ["traditional", "just intonation"],
"baseMidiNote": 67,
"baseFrequency": 391
Expand Down Expand Up @@ -238,7 +238,7 @@
},
"22orwell9": {
"name": "22edo orwell[9]",
"source": "rank2(7/6, 4, 4)\nlabel([black, white, black, white, white, black, white, black, white])\n22@\n",
"source": "rank2(7/6, 4, 4)\n[black, white, black, white, white, black, white, black, white]\n22@\n",
"categories": ["MOS", "equal temperament"]
},
"22pajara12": {
Expand Down

0 comments on commit daf2275

Please sign in to comment.