aulos 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aulos/TET12/__init__.py +88 -0
- aulos/TET12/note.py +41 -0
- aulos/TET12/scale.py +499 -0
- aulos/TET12/tuner.py +77 -0
- aulos/TET12/utils.py +27 -0
- aulos/TET24/__init__.py +0 -0
- aulos/__init__.py +22 -0
- aulos/__main__.py +35 -0
- aulos/_core/__init__.py +19 -0
- aulos/_core/framework/__init__.py +9 -0
- aulos/_core/framework/context.py +25 -0
- aulos/_core/framework/inject.py +30 -0
- aulos/_core/framework/optimize.py +15 -0
- aulos/_core/object.py +53 -0
- aulos/_core/schema.py +8 -0
- aulos/_core/setting.py +31 -0
- aulos/_core/utils/__init__.py +12 -0
- aulos/_core/utils/array.py +19 -0
- aulos/_core/utils/calculation.py +6 -0
- aulos/_core/utils/dataclass.py +31 -0
- aulos/_core/utils/decorators.py +15 -0
- aulos/_errors.py +1 -0
- aulos/_warnings.py +1 -0
- aulos/note/__init__.py +15 -0
- aulos/note/key.py +72 -0
- aulos/note/note.py +175 -0
- aulos/note/pitchclass.py +134 -0
- aulos/note/schemas/__init__.py +9 -0
- aulos/note/schemas/key.py +57 -0
- aulos/note/schemas/note.py +227 -0
- aulos/note/schemas/pitchclass.py +188 -0
- aulos/scale/__init__.py +14 -0
- aulos/scale/diatonic.py +91 -0
- aulos/scale/scale.py +108 -0
- aulos/scale/schemas/__init__.py +5 -0
- aulos/scale/schemas/scale.py +23 -0
- aulos/tuner/__init__.py +11 -0
- aulos/tuner/schemas/__init__.py +5 -0
- aulos/tuner/schemas/tuner.py +19 -0
- aulos/tuner/tuner.py +61 -0
- aulos/ui/__init__.py +6 -0
- aulos/ui/components/__init__.py +8 -0
- aulos/ui/components/base.py +13 -0
- aulos/ui/components/chordviewer.py +0 -0
- aulos/ui/components/keyboard.py +129 -0
- aulos/ui/components/scaleviewer.py +105 -0
- aulos/ui/components/selecter/__init__.py +7 -0
- aulos/ui/components/selecter/keyselecter.py +73 -0
- aulos/ui/components/selecter/scaleselecter.py +129 -0
- aulos/ui/const.py +27 -0
- aulos-0.1.0.dist-info/LICENSE +21 -0
- aulos-0.1.0.dist-info/METADATA +146 -0
- aulos-0.1.0.dist-info/RECORD +56 -0
- aulos-0.1.0.dist-info/WHEEL +5 -0
- aulos-0.1.0.dist-info/entry_points.txt +2 -0
- aulos-0.1.0.dist-info/top_level.txt +1 -0
aulos/TET12/__init__.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""
|
|
2
|
+
12-TET (12 equal temperament)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
This module provides classes and functions for working with notes, pitch classes,
|
|
6
|
+
and scales in the 12-tone equal temperament system.
|
|
7
|
+
It includes definitions for various musical scales and modes.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from .note import Key, Note, PitchClass
|
|
11
|
+
|
|
12
|
+
# Scales
|
|
13
|
+
# Modes
|
|
14
|
+
from .scale import (
|
|
15
|
+
Aeorian,
|
|
16
|
+
Aeorian_f5,
|
|
17
|
+
AlteredSuperLocrian,
|
|
18
|
+
Bluenote,
|
|
19
|
+
CombDiminish,
|
|
20
|
+
Diminish,
|
|
21
|
+
Dorian,
|
|
22
|
+
Dorian_f2,
|
|
23
|
+
Dorian_s4,
|
|
24
|
+
HarmonicMinor,
|
|
25
|
+
Ionian,
|
|
26
|
+
Ionian_s5,
|
|
27
|
+
Locrian,
|
|
28
|
+
Locrian_n6,
|
|
29
|
+
Lydian,
|
|
30
|
+
Lydian_f7,
|
|
31
|
+
Lydian_s2,
|
|
32
|
+
Lydian_s5,
|
|
33
|
+
Major,
|
|
34
|
+
MelodicMinor,
|
|
35
|
+
Minor,
|
|
36
|
+
MinorPentatonic,
|
|
37
|
+
Mixolydian,
|
|
38
|
+
Mixolydian_f6,
|
|
39
|
+
Mixolydian_f9,
|
|
40
|
+
Pentatonic,
|
|
41
|
+
Phrygian,
|
|
42
|
+
SuperLocrian,
|
|
43
|
+
Wholetone,
|
|
44
|
+
)
|
|
45
|
+
from .tuner import Equal12Tuner, JustIntonationTuner, MeantoneTuner, PythagoreanTuner
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
# Note classes
|
|
49
|
+
"Key",
|
|
50
|
+
"Note",
|
|
51
|
+
"PitchClass",
|
|
52
|
+
# Modes
|
|
53
|
+
"Aeorian",
|
|
54
|
+
"Aeorian_f5",
|
|
55
|
+
"AlteredSuperLocrian",
|
|
56
|
+
"Dorian",
|
|
57
|
+
"Dorian_f2",
|
|
58
|
+
"Dorian_s4",
|
|
59
|
+
"Ionian",
|
|
60
|
+
"Ionian_s5",
|
|
61
|
+
"Locrian",
|
|
62
|
+
"Locrian_n6",
|
|
63
|
+
"Lydian",
|
|
64
|
+
"Lydian_f7",
|
|
65
|
+
"Lydian_s2",
|
|
66
|
+
"Lydian_s5",
|
|
67
|
+
"Mixolydian",
|
|
68
|
+
"Mixolydian_f6",
|
|
69
|
+
"Mixolydian_f9",
|
|
70
|
+
"Phrygian",
|
|
71
|
+
"SuperLocrian",
|
|
72
|
+
# Scales
|
|
73
|
+
"Bluenote",
|
|
74
|
+
"CombDiminish",
|
|
75
|
+
"Diminish",
|
|
76
|
+
"HarmonicMinor",
|
|
77
|
+
"Major",
|
|
78
|
+
"MelodicMinor",
|
|
79
|
+
"Minor",
|
|
80
|
+
"MinorPentatonic",
|
|
81
|
+
"Pentatonic",
|
|
82
|
+
"Wholetone",
|
|
83
|
+
# tuners
|
|
84
|
+
"JustIntonationTuner",
|
|
85
|
+
"MeantoneTuner",
|
|
86
|
+
"PythagoreanTuner",
|
|
87
|
+
"Equal12Tuner",
|
|
88
|
+
]
|
aulos/TET12/note.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from ..note import BaseKey, BaseNote, BasePitchClass
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PitchClass(
|
|
5
|
+
BasePitchClass,
|
|
6
|
+
intervals=(2, 2, 1, 2, 2, 2, 1),
|
|
7
|
+
symbols_pitchclass=("C", "D", "E", "F", "G", "A", "B"),
|
|
8
|
+
symbols_accidental=("bbb", "bb", "b", "#", "##", "###"),
|
|
9
|
+
):
|
|
10
|
+
""" """
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Note(
|
|
14
|
+
BaseNote[PitchClass],
|
|
15
|
+
symbols_notenumber=range(128),
|
|
16
|
+
symbols_octave=(
|
|
17
|
+
"<N>-1",
|
|
18
|
+
"<N>0",
|
|
19
|
+
"<N>1",
|
|
20
|
+
"<N>2",
|
|
21
|
+
"<N>3",
|
|
22
|
+
"<N>4",
|
|
23
|
+
"<N>5",
|
|
24
|
+
"<N>6",
|
|
25
|
+
"<N>7",
|
|
26
|
+
"<N>8",
|
|
27
|
+
"<N>9",
|
|
28
|
+
),
|
|
29
|
+
reference_notenumber=60,
|
|
30
|
+
reference_octave=5,
|
|
31
|
+
pitchclass=PitchClass,
|
|
32
|
+
):
|
|
33
|
+
""" """
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Key(
|
|
37
|
+
BaseKey[PitchClass],
|
|
38
|
+
accidental=1,
|
|
39
|
+
pitchclass=PitchClass,
|
|
40
|
+
):
|
|
41
|
+
""" """
|
aulos/TET12/scale.py
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
from ..scale import DiatonicScale, NondiatonicScale
|
|
2
|
+
from .note import Key, PitchClass
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Major(
|
|
6
|
+
DiatonicScale[Key, PitchClass],
|
|
7
|
+
intervals=[2, 2, 1, 2, 2, 2, 1],
|
|
8
|
+
key=Key,
|
|
9
|
+
pitchclass=PitchClass,
|
|
10
|
+
):
|
|
11
|
+
"""Major scale (Ionian mode)
|
|
12
|
+
|
|
13
|
+
* Consisting of a specific pattern of whole and half steps: [2, 2, 1, 2, 2, 2, 1].
|
|
14
|
+
* The most commonly used scale in Western music, characterized by a happy or bright sound.
|
|
15
|
+
* Derived from the diatonic system, starting from the root note and ascending.
|
|
16
|
+
* Frequently used as the foundation for other musical scales and modes.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Minor(
|
|
21
|
+
DiatonicScale[Key, PitchClass],
|
|
22
|
+
intervals=[2, 1, 2, 2, 1, 2, 2],
|
|
23
|
+
key=Key,
|
|
24
|
+
pitchclass=PitchClass,
|
|
25
|
+
):
|
|
26
|
+
"""Minor scale (Aeolian mode)
|
|
27
|
+
|
|
28
|
+
* Consists of the following intervals: [2, 1, 2, 2, 1, 2, 2].
|
|
29
|
+
* Known for its melancholic, somber, or sad sound.
|
|
30
|
+
* The natural minor scale, often used in classical, rock, and pop music.
|
|
31
|
+
* The third degree is lowered by a half-step compared to the major scale.
|
|
32
|
+
* Forms the basis for many modal scales, including the harmonic and melodic minor scales.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class HarmonicMinor(
|
|
37
|
+
DiatonicScale[Key, PitchClass],
|
|
38
|
+
intervals=[2, 1, 2, 2, 1, 3, 1],
|
|
39
|
+
key=Key,
|
|
40
|
+
pitchclass=PitchClass,
|
|
41
|
+
):
|
|
42
|
+
"""Harmonic minor scale
|
|
43
|
+
|
|
44
|
+
* Consists of the following intervals: [2, 1, 2, 2, 1, 3, 1].
|
|
45
|
+
* A variation of the natural minor scale with a raised 7th degree.
|
|
46
|
+
* Known for its exotic, dramatic sound, often used in classical and metal music.
|
|
47
|
+
* The raised 7th degree creates an augmented second between the 6th and 7th degrees.
|
|
48
|
+
* Frequently used to create tension in chord progressions.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class MelodicMinor(
|
|
53
|
+
DiatonicScale[Key, PitchClass],
|
|
54
|
+
intervals=[2, 1, 2, 2, 2, 2, 1],
|
|
55
|
+
key=Key,
|
|
56
|
+
pitchclass=PitchClass,
|
|
57
|
+
):
|
|
58
|
+
"""Melodic minor scale
|
|
59
|
+
|
|
60
|
+
* Consists of the following intervals: [2, 1, 2, 2, 2, 2, 1].
|
|
61
|
+
* In its ascending form, both the 6th and 7th degrees are raised.
|
|
62
|
+
* Known for its smooth, sophisticated sound, often used in jazz and classical music.
|
|
63
|
+
* The descending form typically uses the natural minor scale (Aeolian mode).
|
|
64
|
+
* The raised 6th and 7th degrees help avoid awkward intervals in melodic motion.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Pentatonic(
|
|
69
|
+
NondiatonicScale[Key, PitchClass],
|
|
70
|
+
extensions=[[0], [0], [0], [], [0], [0], []],
|
|
71
|
+
base=Major,
|
|
72
|
+
key=Key,
|
|
73
|
+
pitchclass=PitchClass,
|
|
74
|
+
):
|
|
75
|
+
"""Pentatonic scale
|
|
76
|
+
|
|
77
|
+
* A five-note scale derived from the major scale.
|
|
78
|
+
* Composed of the notes: 1, 2, 3, 5, 6 in relation to the major scale.
|
|
79
|
+
* Known for its simplicity and versatility, commonly used in folk, blues, and rock music.
|
|
80
|
+
* The pentatonic scale omits the 4th and 7th degrees of the major scale.
|
|
81
|
+
* Works well in both major and minor contexts, creating a neutral or balanced sound.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class MinorPentatonic(
|
|
86
|
+
NondiatonicScale[Key, PitchClass],
|
|
87
|
+
extensions=[[0], [], [0], [0], [0], [], [0]],
|
|
88
|
+
base=Minor,
|
|
89
|
+
key=Key,
|
|
90
|
+
pitchclass=PitchClass,
|
|
91
|
+
):
|
|
92
|
+
"""Minor pentatonic scale
|
|
93
|
+
|
|
94
|
+
* A five-note scale derived from the natural minor scale.
|
|
95
|
+
* Composed of the notes: 1, 3, 4, 5, 7 in relation to the natural minor scale.
|
|
96
|
+
* Known for its bluesy, soulful sound, commonly used in rock, blues, and jazz music.
|
|
97
|
+
* Omits the 2nd and 6th degrees of the minor scale.
|
|
98
|
+
* Provides a simple yet expressive framework for improvisation and melody.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class Bluenote(
|
|
103
|
+
NondiatonicScale[Key, PitchClass],
|
|
104
|
+
extensions=[[0], [0], [-1, 0], [0], [-1, 0], [0], [-1, 0]],
|
|
105
|
+
base=Major,
|
|
106
|
+
key=Key,
|
|
107
|
+
pitchclass=PitchClass,
|
|
108
|
+
):
|
|
109
|
+
"""Bluenote scale
|
|
110
|
+
|
|
111
|
+
* A variation of the pentatonic scale with the addition of flat 5 (blue note).
|
|
112
|
+
* Composed of the notes: 1, 2, 3, 4, 5b, 6, 7.
|
|
113
|
+
* Characterized by its "bluesy" sound, used extensively in jazz, blues, and rock.
|
|
114
|
+
* The flat 5 creates a distinct tension and release, making it effective for expressive improvisation.
|
|
115
|
+
* Often associated with the "blue" feeling, evoking melancholy or sadness.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class Diminish(
|
|
120
|
+
NondiatonicScale[Key, PitchClass],
|
|
121
|
+
extensions=[[0], [0], [-1], [0, 1], [1], [0], [0]],
|
|
122
|
+
base=Major,
|
|
123
|
+
key=Key,
|
|
124
|
+
pitchclass=PitchClass,
|
|
125
|
+
):
|
|
126
|
+
"""Diminish scale
|
|
127
|
+
|
|
128
|
+
* A symmetrical scale that alternates between whole and half steps.
|
|
129
|
+
* Composed of the intervals: [2, 1, 2, 1, 2, 1, 2].
|
|
130
|
+
* Known for its tension-filled, dissonant sound.
|
|
131
|
+
* Frequently used in jazz and classical music for chromatic and diminished chord progressions.
|
|
132
|
+
* The scale's symmetrical nature creates repeated patterns and interesting melodic possibilities.
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class CombDiminish(
|
|
137
|
+
NondiatonicScale[Key, PitchClass],
|
|
138
|
+
extensions=[[0], [-1], [-1, 0], [1], [0], [0], [-1]],
|
|
139
|
+
base=Major,
|
|
140
|
+
key=Key,
|
|
141
|
+
pitchclass=PitchClass,
|
|
142
|
+
):
|
|
143
|
+
"""CombDiminish scale
|
|
144
|
+
|
|
145
|
+
* A combination of diminished and whole-tone scale patterns.
|
|
146
|
+
* Composed of alternating diminished and whole-step intervals, creating a hybrid structure.
|
|
147
|
+
* Known for its mysterious, unconventional sound, often used in jazz and avant-garde music.
|
|
148
|
+
* The scale's hybrid nature allows for chromatic movement and unusual chord progressions.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class Wholetone(
|
|
153
|
+
NondiatonicScale[Key, PitchClass],
|
|
154
|
+
extensions=[[0], [0], [0], [1], [1], [1], []],
|
|
155
|
+
base=Major,
|
|
156
|
+
key=Key,
|
|
157
|
+
pitchclass=PitchClass,
|
|
158
|
+
):
|
|
159
|
+
"""Whole tone scale
|
|
160
|
+
|
|
161
|
+
* A scale composed entirely of whole steps.
|
|
162
|
+
* Characterized by its ambiguous, dreamlike sound with no leading tone.
|
|
163
|
+
* The whole tone scale contains only six notes in total.
|
|
164
|
+
* Commonly used in impressionist music, creating a floating, ethereal atmosphere.
|
|
165
|
+
* Its symmetrical structure gives it a unique sound, with no tendency to resolve to a tonic.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
class Ionian(
|
|
170
|
+
Major,
|
|
171
|
+
intervals=Major.intervals,
|
|
172
|
+
shift=0,
|
|
173
|
+
key=Key,
|
|
174
|
+
pitchclass=PitchClass,
|
|
175
|
+
):
|
|
176
|
+
"""Ionian mode (Major scale)
|
|
177
|
+
|
|
178
|
+
* Also known as the major scale.
|
|
179
|
+
* A diatonic scale with a happy, bright, or resolved sound.
|
|
180
|
+
* Composed of the intervals: [2, 2, 1, 2, 2, 2, 1].
|
|
181
|
+
* The foundation of Western music harmony and melody.
|
|
182
|
+
* Frequently used in a wide variety of musical genres.
|
|
183
|
+
* This mode starts at the root of the major scale (no shift).
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class Dorian(
|
|
188
|
+
Major,
|
|
189
|
+
intervals=Major.intervals,
|
|
190
|
+
shift=1,
|
|
191
|
+
key=Key,
|
|
192
|
+
pitchclass=PitchClass,
|
|
193
|
+
):
|
|
194
|
+
"""Dorian mode
|
|
195
|
+
|
|
196
|
+
* A minor scale with a raised 6th degree.
|
|
197
|
+
* Composed of the intervals: [2, 1, 2, 2, 2, 1, 2].
|
|
198
|
+
* Known for its jazzy, bluesy character, balancing between major and minor.
|
|
199
|
+
* The 6th degree distinguishes Dorian from the natural minor scale.
|
|
200
|
+
* Often used in jazz, blues, and rock for improvisation.
|
|
201
|
+
* This mode starts from the 2nd degree of the major scale.
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class Phrygian(
|
|
206
|
+
Major,
|
|
207
|
+
intervals=Major.intervals,
|
|
208
|
+
shift=2,
|
|
209
|
+
key=Key,
|
|
210
|
+
pitchclass=PitchClass,
|
|
211
|
+
):
|
|
212
|
+
"""Phrygian mode
|
|
213
|
+
|
|
214
|
+
* A minor scale with a lowered 2nd degree.
|
|
215
|
+
* Composed of the intervals: [1, 2, 2, 2, 1, 2, 2].
|
|
216
|
+
* Known for its dark, exotic, or Spanish flavor.
|
|
217
|
+
* The lowered 2nd degree gives it a distinct, dissonant sound.
|
|
218
|
+
* Common in flamenco music and jazz.
|
|
219
|
+
* This mode starts from the 3rd degree of the major scale.
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class Lydian(
|
|
224
|
+
Major,
|
|
225
|
+
intervals=Major.intervals,
|
|
226
|
+
shift=3,
|
|
227
|
+
key=Key,
|
|
228
|
+
pitchclass=PitchClass,
|
|
229
|
+
):
|
|
230
|
+
"""Lydian mode
|
|
231
|
+
|
|
232
|
+
* A major scale with a raised 4th degree.
|
|
233
|
+
* Composed of the intervals: [2, 2, 2, 1, 2, 2, 1].
|
|
234
|
+
* Known for its bright, dreamy, or floating sound.
|
|
235
|
+
* The raised 4th degree gives it a unique flavor, often used in jazz fusion and progressive rock.
|
|
236
|
+
* This mode starts from the 4th degree of the major scale.
|
|
237
|
+
"""
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class Mixolydian(
|
|
241
|
+
Major,
|
|
242
|
+
intervals=Major.intervals,
|
|
243
|
+
shift=4,
|
|
244
|
+
key=Key,
|
|
245
|
+
pitchclass=PitchClass,
|
|
246
|
+
):
|
|
247
|
+
"""Mixolydian mode
|
|
248
|
+
|
|
249
|
+
* A major scale with a lowered 7th degree.
|
|
250
|
+
* Composed of the intervals: [2, 2, 1, 2, 2, 1, 2].
|
|
251
|
+
* Known for its bluesy or dominant sound.
|
|
252
|
+
* The lowered 7th degree gives it a less resolved sound compared to the Ionian mode.
|
|
253
|
+
* Often used in rock, blues, and funk.
|
|
254
|
+
* This mode starts from the 5th degree of the major scale.
|
|
255
|
+
"""
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class Aeorian(
|
|
259
|
+
Major,
|
|
260
|
+
intervals=Major.intervals,
|
|
261
|
+
shift=5,
|
|
262
|
+
key=Key,
|
|
263
|
+
pitchclass=PitchClass,
|
|
264
|
+
):
|
|
265
|
+
"""Aeolian mode (Natural minor scale)
|
|
266
|
+
|
|
267
|
+
* A natural minor scale with no raised or lowered degrees.
|
|
268
|
+
* Composed of the intervals: [2, 1, 2, 2, 1, 2, 2].
|
|
269
|
+
* Known for its melancholic, somber, or sad sound.
|
|
270
|
+
* The foundation for the minor scale in Western music.
|
|
271
|
+
* Often used in classical, rock, and pop music.
|
|
272
|
+
* This mode starts from the 6th degree of the major scale.
|
|
273
|
+
"""
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
class Locrian(
|
|
277
|
+
Major,
|
|
278
|
+
intervals=Major.intervals,
|
|
279
|
+
shift=6,
|
|
280
|
+
key=Key,
|
|
281
|
+
pitchclass=PitchClass,
|
|
282
|
+
):
|
|
283
|
+
"""Locrian mode
|
|
284
|
+
|
|
285
|
+
* A minor scale with a lowered 2nd and 5th degree.
|
|
286
|
+
* Composed of the intervals: [1, 2, 2, 1, 2, 2, 2].
|
|
287
|
+
* Known for its dissonant, unstable, and tense sound.
|
|
288
|
+
* The lowered 5th degree gives it a diminished quality.
|
|
289
|
+
* Rarely used in classical or contemporary music, but found in experimental and avant-garde genres.
|
|
290
|
+
* This mode starts from the 7th degree of the major scale.
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
class Dorian_f2(
|
|
295
|
+
MelodicMinor,
|
|
296
|
+
intervals=MelodicMinor.intervals,
|
|
297
|
+
shift=1,
|
|
298
|
+
key=Key,
|
|
299
|
+
pitchclass=PitchClass,
|
|
300
|
+
):
|
|
301
|
+
"""Dorian flat 2 mode (Dorian #2)
|
|
302
|
+
|
|
303
|
+
* A modified version of the Dorian mode with a lowered 2nd degree.
|
|
304
|
+
* Composed of the intervals: [1, 2, 2, 2, 2, 1, 2].
|
|
305
|
+
* Known for its exotic, tense sound.
|
|
306
|
+
* This mode is often used in jazz and fusion for a darker minor sound.
|
|
307
|
+
* This mode starts from the 2nd degree of the melodic minor scale.
|
|
308
|
+
"""
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class Lydian_s5(
|
|
312
|
+
MelodicMinor,
|
|
313
|
+
intervals=MelodicMinor.intervals,
|
|
314
|
+
shift=2,
|
|
315
|
+
key=Key,
|
|
316
|
+
pitchclass=PitchClass,
|
|
317
|
+
):
|
|
318
|
+
"""Lydian sharp 5 mode (Lydian #5)
|
|
319
|
+
|
|
320
|
+
* A Lydian mode with a raised 5th degree.
|
|
321
|
+
* Composed of the intervals: [2, 2, 2, 1, 3, 1, 2].
|
|
322
|
+
* Known for its otherworldly, dreamlike quality.
|
|
323
|
+
* The raised 5th degree creates an augmented chord quality.
|
|
324
|
+
* Often used in jazz and experimental music for rich harmonic tension.
|
|
325
|
+
* This mode starts from the 3rd degree of the melodic minor scale.
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
class Lydian_f7(
|
|
330
|
+
MelodicMinor,
|
|
331
|
+
intervals=MelodicMinor.intervals,
|
|
332
|
+
shift=3,
|
|
333
|
+
key=Key,
|
|
334
|
+
pitchclass=PitchClass,
|
|
335
|
+
):
|
|
336
|
+
"""Lydian flat 7 mode (Lydian b7)
|
|
337
|
+
|
|
338
|
+
* A Lydian mode with a lowered 7th degree.
|
|
339
|
+
* Composed of the intervals: [2, 2, 2, 2, 1, 2, 1].
|
|
340
|
+
* Known for its mix of major and dominant qualities.
|
|
341
|
+
* Often used in jazz, fusion, and progressive rock.
|
|
342
|
+
* This mode starts from the 4th degree of the melodic minor scale.
|
|
343
|
+
"""
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
class Mixolydian_f6(
|
|
347
|
+
MelodicMinor,
|
|
348
|
+
intervals=MelodicMinor.intervals,
|
|
349
|
+
shift=4,
|
|
350
|
+
key=Key,
|
|
351
|
+
pitchclass=PitchClass,
|
|
352
|
+
):
|
|
353
|
+
"""Mixolydian flat 6 mode (Mixolydian b6)
|
|
354
|
+
|
|
355
|
+
* A Mixolydian mode with a lowered 6th degree.
|
|
356
|
+
* Composed of the intervals: [2, 2, 1, 2, 1, 2, 2].
|
|
357
|
+
* Known for its bluesy, jazzy sound.
|
|
358
|
+
* The lowered 6th degree gives it a minor quality while maintaining the dominant 7th.
|
|
359
|
+
* This mode is commonly used in jazz and fusion.
|
|
360
|
+
* This mode starts from the 5th degree of the melodic minor scale.
|
|
361
|
+
"""
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
class Aeorian_f5(
|
|
365
|
+
MelodicMinor,
|
|
366
|
+
intervals=MelodicMinor.intervals,
|
|
367
|
+
shift=5,
|
|
368
|
+
key=Key,
|
|
369
|
+
pitchclass=PitchClass,
|
|
370
|
+
):
|
|
371
|
+
"""Aeolian flat 5 mode (Aeolian b5)
|
|
372
|
+
|
|
373
|
+
* A natural minor scale with a lowered 5th degree.
|
|
374
|
+
* Composed of the intervals: [2, 1, 2, 1, 2, 2, 2].
|
|
375
|
+
* Known for its dark, exotic sound, often used in jazz and metal.
|
|
376
|
+
* This mode creates a diminished quality by lowering the 5th degree.
|
|
377
|
+
* This mode starts from the 6th degree of the melodic minor scale.
|
|
378
|
+
"""
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
class SuperLocrian(
|
|
382
|
+
MelodicMinor,
|
|
383
|
+
intervals=MelodicMinor.intervals,
|
|
384
|
+
shift=6,
|
|
385
|
+
key=Key,
|
|
386
|
+
pitchclass=PitchClass,
|
|
387
|
+
):
|
|
388
|
+
"""Super Locrian mode (Altered scale)
|
|
389
|
+
|
|
390
|
+
* A scale with altered 2nd, 3rd, 4th, 5th, 6th, and 7th degrees.
|
|
391
|
+
* Composed of the intervals: [1, 2, 1, 2, 1, 2, 2].
|
|
392
|
+
* Known for its highly dissonant, tension-filled sound.
|
|
393
|
+
* Often used in jazz over diminished or dominant chords.
|
|
394
|
+
* The altered scale is a tool for creating complex harmonies.
|
|
395
|
+
* This mode starts from the 7th degree of the melodic minor scale.
|
|
396
|
+
"""
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class Locrian_n6(
|
|
400
|
+
HarmonicMinor,
|
|
401
|
+
intervals=HarmonicMinor.intervals,
|
|
402
|
+
shift=1,
|
|
403
|
+
key=Key,
|
|
404
|
+
pitchclass=PitchClass,
|
|
405
|
+
):
|
|
406
|
+
"""Locrian natural 6 mode (Locrian #6)
|
|
407
|
+
|
|
408
|
+
* A Locrian mode with a raised 6th degree.
|
|
409
|
+
* Composed of the intervals: [1, 2, 2, 1, 2, 3, 1].
|
|
410
|
+
* Known for its eerie, dissonant sound with a slight major flavor due to the raised 6th degree.
|
|
411
|
+
* This mode is used in jazz and contemporary music for unusual, dissonant harmonic progressions.
|
|
412
|
+
* This mode starts from the 2nd degree of the harmonic minor scale.
|
|
413
|
+
"""
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
class Ionian_s5(
|
|
417
|
+
HarmonicMinor,
|
|
418
|
+
intervals=HarmonicMinor.intervals,
|
|
419
|
+
shift=2,
|
|
420
|
+
key=Key,
|
|
421
|
+
pitchclass=PitchClass,
|
|
422
|
+
):
|
|
423
|
+
"""Ionian sharp 5 mode (Ionian #5)
|
|
424
|
+
|
|
425
|
+
* A major scale with a raised 5th degree.
|
|
426
|
+
* Composed of the intervals: [2, 2, 1, 2, 3, 1, 1].
|
|
427
|
+
* Known for its bright sound with a dramatic twist due to the sharp 5th.
|
|
428
|
+
* Often used in fusion and experimental music to create harmonic tension.
|
|
429
|
+
* This mode starts from the 3rd degree of the harmonic minor scale.
|
|
430
|
+
"""
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class Dorian_s4(
|
|
434
|
+
HarmonicMinor,
|
|
435
|
+
intervals=HarmonicMinor.intervals,
|
|
436
|
+
shift=3,
|
|
437
|
+
key=Key,
|
|
438
|
+
pitchclass=PitchClass,
|
|
439
|
+
):
|
|
440
|
+
"""Dorian sharp 4 mode (Dorian #4)
|
|
441
|
+
|
|
442
|
+
* A Dorian mode with a raised 4th degree.
|
|
443
|
+
* Composed of the intervals: [2, 1, 2, 3, 2, 1, 2].
|
|
444
|
+
* Known for its tension and dark character.
|
|
445
|
+
* Often used in jazz and fusion for a modern, complex sound.
|
|
446
|
+
* This mode starts from the 4th degree of the harmonic minor scale.
|
|
447
|
+
"""
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
class Mixolydian_f9(
|
|
451
|
+
HarmonicMinor,
|
|
452
|
+
intervals=HarmonicMinor.intervals,
|
|
453
|
+
shift=4,
|
|
454
|
+
key=Key,
|
|
455
|
+
pitchclass=PitchClass,
|
|
456
|
+
):
|
|
457
|
+
"""Mixolydian flat 9 mode (Phrygian Dominant)
|
|
458
|
+
|
|
459
|
+
* A Mixolydian mode with a lowered 9th degree.
|
|
460
|
+
* Composed of the intervals: [1, 2, 2, 2, 1, 2, 2].
|
|
461
|
+
* Known for its exotic, Middle Eastern flavor.
|
|
462
|
+
* Often used in flamenco, metal, and jazz to create tension and drama.
|
|
463
|
+
* This mode starts from the 5th degree of the harmonic minor scale.
|
|
464
|
+
"""
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
class Lydian_s2(
|
|
468
|
+
HarmonicMinor,
|
|
469
|
+
intervals=HarmonicMinor.intervals,
|
|
470
|
+
shift=5,
|
|
471
|
+
key=Key,
|
|
472
|
+
pitchclass=PitchClass,
|
|
473
|
+
):
|
|
474
|
+
"""Lydian flat 2 mode (Lydian b2)
|
|
475
|
+
|
|
476
|
+
* A Lydian mode with a lowered 2nd degree.
|
|
477
|
+
* Composed of the intervals: [1, 3, 2, 1, 2, 2, 2].
|
|
478
|
+
* Known for its dramatic, exotic sound with a raised 4th and lowered 2nd degree.
|
|
479
|
+
* Often used in avant-garde and fusion music to create tension and mystery.
|
|
480
|
+
* This mode starts from the 6th degree of the harmonic minor scale.
|
|
481
|
+
"""
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
class AlteredSuperLocrian(
|
|
485
|
+
HarmonicMinor,
|
|
486
|
+
intervals=HarmonicMinor.intervals,
|
|
487
|
+
shift=6,
|
|
488
|
+
key=Key,
|
|
489
|
+
pitchclass=PitchClass,
|
|
490
|
+
):
|
|
491
|
+
"""Altered Super Locrian mode (Altered scale with Super Locrian qualities)
|
|
492
|
+
|
|
493
|
+
* A highly altered scale that is often used in jazz and fusion.
|
|
494
|
+
* Composed of the intervals: [1, 2, 1, 2, 1, 2, 2].
|
|
495
|
+
* Known for its extreme dissonance and tension, incorporating all possible alterations of the major scale.
|
|
496
|
+
* Features a mix of both diminished and augmented intervals, contributing to its complex and unstable sound.
|
|
497
|
+
* Often used in jazz over dominant chords to create maximum harmonic tension and to resolve to tonic chords.
|
|
498
|
+
* This mode starts from the 7th degree of the harmonic minor scale.
|
|
499
|
+
"""
|
aulos/TET12/tuner.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import typing as t
|
|
2
|
+
|
|
3
|
+
from ..tuner import Tuner
|
|
4
|
+
from .note import Note
|
|
5
|
+
from .utils import fivelimit_tuning_table, standard_tuning_table
|
|
6
|
+
|
|
7
|
+
EQUAL12_TUNING_RATIOS: t.Final[tuple[float, ...]] = standard_tuning_table(2 ** (1 / 12))
|
|
8
|
+
PYTHAGOREAN_TUNING_RATIOS: t.Final[tuple[float, ...]] = standard_tuning_table(1.5)
|
|
9
|
+
MEANTONE_TUNING_RATIOS: t.Final[tuple[float, ...]] = standard_tuning_table(5**0.25)
|
|
10
|
+
FIVELIMIT_TUNING_RATIOS: t.Final[tuple[float, ...]] = fivelimit_tuning_table()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class JustIntonationTuner(
|
|
14
|
+
Tuner[Note],
|
|
15
|
+
ratios=FIVELIMIT_TUNING_RATIOS,
|
|
16
|
+
reference_notenumber=60,
|
|
17
|
+
note=Note,
|
|
18
|
+
):
|
|
19
|
+
"""
|
|
20
|
+
Just Intonation Tuner (Five-limit tuning)
|
|
21
|
+
|
|
22
|
+
* This tuner is based on the Just Intonation system, which utilizes simple
|
|
23
|
+
whole-number ratios derived from the harmonic series.
|
|
24
|
+
* It uses the Five-limit tuning ratios to determine the intervals between notes.
|
|
25
|
+
* The system focuses on creating pure, consonant intervals, especially for
|
|
26
|
+
natural harmonics.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class MeantoneTuner(
|
|
31
|
+
Tuner[Note],
|
|
32
|
+
ratios=MEANTONE_TUNING_RATIOS,
|
|
33
|
+
reference_notenumber=60,
|
|
34
|
+
note=Note,
|
|
35
|
+
):
|
|
36
|
+
"""
|
|
37
|
+
Meantone Tuner
|
|
38
|
+
|
|
39
|
+
* This tuner is based on the Meantone temperament, which aims to improve the
|
|
40
|
+
consonance of the major third interval, often sacrificing the purity of other
|
|
41
|
+
intervals like the perfect fifth.
|
|
42
|
+
* Meantone tuning is typically used in historical or specific stylistic music
|
|
43
|
+
applications where certain intervals are emphasized.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class PythagoreanTuner(
|
|
48
|
+
Tuner[Note],
|
|
49
|
+
ratios=PYTHAGOREAN_TUNING_RATIOS,
|
|
50
|
+
reference_notenumber=60,
|
|
51
|
+
note=Note,
|
|
52
|
+
):
|
|
53
|
+
"""
|
|
54
|
+
Pythagorean Tuner
|
|
55
|
+
|
|
56
|
+
* This tuner follows the Pythagorean tuning system, which is based on the
|
|
57
|
+
harmonic series, emphasizing the pure perfect fifth (3:2 ratio).
|
|
58
|
+
* The system uses the Pythagorean comma to create a series of intervals
|
|
59
|
+
derived from the natural harmonic series.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class Equal12Tuner(
|
|
64
|
+
Tuner[Note],
|
|
65
|
+
ratios=EQUAL12_TUNING_RATIOS,
|
|
66
|
+
reference_notenumber=60,
|
|
67
|
+
note=Note,
|
|
68
|
+
):
|
|
69
|
+
"""
|
|
70
|
+
Equal 12-Tone Tuner (12-TET)
|
|
71
|
+
|
|
72
|
+
* This tuner uses the Equal Temperament system, where the octave is divided
|
|
73
|
+
into 12 equal steps (12-TET).
|
|
74
|
+
* It is the standard tuning system used in Western music, where all semitones
|
|
75
|
+
are equal in frequency ratio.
|
|
76
|
+
* This system allows instruments to play in all keys with equal tuning accuracy.
|
|
77
|
+
"""
|