Skip to content

Commit

Permalink
added cents from degree 0 and harp tuning preset
Browse files Browse the repository at this point in the history
  • Loading branch information
000masa000 committed Nov 28, 2024
1 parent 1276b02 commit 053f1ea
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scales/22edo.scl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
! 22edo
!
22-tone equal tempered scale consisting of 22 sonically equal divisions per octave. Step size is 54.5 cents.
22
!
1\22
2\22
3\22
4\22
5\22
6\22
7\22
8\22
9\22
10\22
11\22
12\22
13\22
14\22
15\22
16\22
17\22
18\22
19\22
20\22
21\22
2/1
27 changes: 27 additions & 0 deletions scales/harp+names.scl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
! harp-layout
!
22-tone scale for testing harp pedal combinationa
22
!
1\12 !Db
0\12 !B#
1\12 !C#
2\12 !D
3\12 !Eb
4\12 !Fb
3\12 !D#
4\12 !E
5\12 !F
6\12 !Gb
5\12 !E#
6\12 !F#
7\12 !G
8\12 !Ab
8\12 !--
8\12 !G#
9\12 !A
10\12 !Bb
11\12 !Cb
10\12 !A#
11\12 !B
2/1 !C
27 changes: 27 additions & 0 deletions scales/harp.scl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
! harp-layout
!
22-tone scale for testing harp pedal combinationa
22
!
1\12
0\12
1\12
2\12
3\12
4\12
3\12
4\12
5\12
6\12
5\12
6\12
7\12
8\12
8\12
8\12
9\12
10\12
11\12
10\12
11\12
2/1
2 changes: 2 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ const normalize = (settings) => {
result["note"] = true;
} else if (settings.key_labels === "scala_names") {
result["scala"] = true;
} else if (settings.key_labels === "cents") {
result["cents"] = true;
} else if (settings.key_labels === "no_labels") {
result["no_labels"] = true;
};
Expand Down
1 change: 1 addition & 0 deletions src/keyboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Keyboard.propTypes = {
equivInterval: PropTypes.number,
equivSteps: PropTypes.number,
scala_names: PropTypes.arrayOf(PropTypes.string),
cents: PropTypes.arrayOf(PropTypes.string),
note_names: PropTypes.arrayOf(PropTypes.string),
note_colors: PropTypes.arrayOf(PropTypes.string),
spectrum_colors: PropTypes.bool,
Expand Down
2 changes: 2 additions & 0 deletions src/keyboard/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ class Keys {
name = this.settings.note_names[reducedNote];
} else if (this.settings.scala) {
name = this.settings.scala_names[reducedNote];
} else if (this.settings.cents) {
name = Math.round(this.settings.scale[reducedNote]).toString() + ".";
};

if (name) {
Expand Down
67 changes: 67 additions & 0 deletions src/settings/preset_values.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import scale_43_mt from 'scales/43-MT-1_5-Comma.scl';
import scale_55_mt from 'scales/55-MT-1_6-Comma.scl';

import scale_19_edo from 'scales/19edo.scl';
import scale_22_edo from 'scales/22edo.scl';
import scale_31_edo from 'scales/31edo.scl';
import scale_41_edo from 'scales/41edo.scl';
import scale_43_edo from 'scales/43edo.scl';
Expand All @@ -54,6 +55,8 @@ import scale_55_edo from 'scales/55edo.scl';
import scale_72_edo from 'scales/72edo.scl';

import scale_1cent from 'scales/1cent.scl';
import scale_harp from 'scales/harp.scl';


//import the Scala file parser, which can output scale: [], colors: [], labels: [], errors: [],
import { parseScale } from './scale/parse-scale';
Expand Down Expand Up @@ -1755,6 +1758,38 @@ export const presets = [
"reference_degree": 14,
"short_description": "19edo (Salinas, Septimal Notation)"
},
{
"name": "22edo (HEJI)",
"description": "22-tone equal tempered scale consisting of 22 sonically equal divisions per octave. The HEJI notation indicates how this temperament may be considered to present a distorted approximation of 5-limit JI.",
"scale_import": scale_22_edo,
"scale": parseScale(scale_22_edo).scale,
"equivSteps": 22,
"note_names": [
"C", "D", "C D", "D",
"D", "E", "E", "E",
"E",
"F", "F G", "F G", "F G",
"G", "A", "A", "A",
"A", "B", "B", "B",
"B"],
"key_labels": "note_names",
"note_colors": [
"#ffffff", "#d0d0d7", "#dee2da", "#fffae5",
"#ffffff", "#d0d0d7", "#dee2da", "#fffae5",
"#ffffff",
"#ffffff", "#d0d0d7", "#dee2da", "#fffae5",
"#ffffff", "#d0d0d7", "#dee2da", "#fffae5",
"#ffffff", "#d0d0d7", "#dee2da", "#fffae5",
"#ffffff"],
"spectrum_colors": false,
"rSteps": 4,
"urSteps": 1,
"hexSize": 42,
"rotation": -16.102113751,
"fundamental": 440,
"reference_degree": 17,
"short_description": "22-JI-5L Śrutis (Sambamurthy/Daniélou)"
},
{
"name": "31edo (gbb-a##)",
"description": "31-tone equal tempered scale consisting of 31 sonically equal divisions per octave. Similar to 1/4-Quintal Comma meantone, the system was first described by Lemme Rossi in 1666, although Vicentino effectively proposed it in 1555. Step-size is 38.7 cents.",
Expand Down Expand Up @@ -2064,6 +2099,38 @@ export const presets = [
"rotation": -29.3577535,
"fundamental": 240,
"short_description": "Interval Tester by Diesis (41 cents)"
},
{
"name": "Harp Layout",
"description": "22-tone layout for testing harp pedal combinations.",
"scale_import": scale_harp,
"scale": parseScale(scale_harp).scale,
"equivSteps": 22,
"note_names": [
"C", "D", "B", "C",
"D", "E", "F", "D",
"E",
"F", "G", "E", "F",
"G", "A", "-", "G",
"A", "B", "C", "A",
"B"],
"key_labels": "note_names",
"note_colors": [
"#ffffff", "#d0d0d7", "#dee2da", "#dee2da",
"#ffffff", "#d0d0d7", "#d0d0d7", "#dee2da",
"#ffffff",
"#ffffff", "#d0d0d7", "#dee2da", "#dee2da",
"#ffffff", "#d0d0d7", "#999999", "#dee2da",
"#ffffff", "#d0d0d7", "#d0d0d7", "#dee2da",
"#ffffff"],
"spectrum_colors": false,
"rSteps": 4,
"urSteps": 1,
"hexSize": 42,
"rotation": -16.102113751,
"fundamental": 440,
"reference_degree": 17,
"short_description": "Harp"
}
]
}
Expand Down
1 change: 1 addition & 0 deletions src/settings/scale/key-labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const KeyLabels = (props) => (
<option value="enumerate">Scale Degrees</option>
<option value="note_names">Note Names</option>
<option value="scala_names">Ratios/Cents</option>
<option value="cents">Cents</option>
</select>
</label>
</>
Expand Down

0 comments on commit 053f1ea

Please sign in to comment.