@musodojo/music-theory-data 33.0.0 → 35.0.0

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.
package/README.md CHANGED
@@ -108,14 +108,19 @@ const availableForMajorChord = getAvailableRootAndNoteCollectionConversions(
108
108
 
109
109
  console.log(availableForMajorChord.map((entry) => entry.id));
110
110
  // ["note-names", "intervals", "extensions", "compound-intervals"]
111
+
112
+ console.log(availableForMajorChord.map((entry) => entry.outputPreview));
113
+ // ["C, D♭, D...", "1, ♭2, 2...", "1, ♭9, 9...", "1, ♭9, 9, ♭10..."]
111
114
  ```
112
115
 
113
116
  The conversion registry is useful when an app needs selectable display layers
114
117
  for the same root and note collection. Each entry includes UI metadata such as
115
- `name`, `shortName`, `description`, `outputShape`, and whether empty chromatic
116
- slots can appear. Authored harmony conversions are exposed for modal collections
117
- such as `ionian`, but are filtered out for collections that do not define modal
118
- harmony, such as the `major` triad.
118
+ `name`, `shortName`, `description`, `outputPreview`, `sampleOutput`,
119
+ `outputShape`, and whether empty chromatic slots can appear. `outputPreview` is
120
+ intended for compact UI subtitles, while `sampleOutput` is a fuller
121
+ representative output string. Authored harmony conversions are exposed for modal
122
+ collections such as `ionian`, but are filtered out for collections that do not
123
+ define modal harmony, such as the `major` triad.
119
124
 
120
125
  ### Inspect A Note Collection
121
126
 
@@ -167,10 +172,10 @@ console.log(getChordProgressionRomanSymbols("oneSixFourFive"));
167
172
  // ["I", "vi", "IV", "V"]
168
173
 
169
174
  console.log(chordProgressionCategoryGroups.map((group) => group.name));
170
- // ["Fundamentals", "Popular Loops", "Jazz & Turnarounds", "Blues"]
175
+ // ["Common Loops & Sequences", "Cadences", "Blues Forms", "Jazz Cadences & Standards"]
171
176
 
172
177
  console.log(getChordProgressionKeysForCategory("jazz"));
173
- // ["oneSixTwoFive", "sixTwoFiveOne", "majorTwoFiveOne", ...]
178
+ // ["majorTwoFiveOne", "minorTwoFiveOne", "backdoorTwoFiveOne", ...]
174
179
 
175
180
  console.log(getChordProgressionChordNames("C", "oneSixFourFive"));
176
181
  // ["CM", "Am", "FM", "GM"]
@@ -16,14 +16,24 @@ declare const _chordProgressions: {
16
16
  readonly oneFiveSixFour: BuiltInChordProgression;
17
17
  readonly oneSixTwoFive: BuiltInChordProgression;
18
18
  readonly sixTwoFiveOne: BuiltInChordProgression;
19
+ readonly oneFourOneFiveSplitReturn: BuiltInChordProgression;
20
+ readonly circleOfFifths: BuiltInChordProgression;
21
+ readonly pachelbelCanon: BuiltInChordProgression;
22
+ readonly authenticCadence: BuiltInChordProgression;
23
+ readonly plagalCadence: BuiltInChordProgression;
24
+ readonly deceptiveCadence: BuiltInChordProgression;
25
+ readonly andalusianCadence: BuiltInChordProgression;
26
+ readonly twelveBarBlues: BuiltInChordProgression;
27
+ readonly twelveBarBluesQuickChange: BuiltInChordProgression;
28
+ readonly minorBlues: BuiltInChordProgression;
29
+ readonly jazzBlues: BuiltInChordProgression;
19
30
  readonly majorTwoFiveOne: BuiltInChordProgression;
20
31
  readonly minorTwoFiveOne: BuiltInChordProgression;
21
- readonly oneFourOneFiveSplitReturn: BuiltInChordProgression;
32
+ readonly backdoorTwoFiveOne: BuiltInChordProgression;
22
33
  readonly autumnLeavesA: BuiltInChordProgression;
23
34
  readonly autumnLeavesB: BuiltInChordProgression;
24
- readonly twelveBarBlues: BuiltInChordProgression;
25
- readonly twelveBarBluesQuickChange: BuiltInChordProgression;
26
- readonly rhythmChanges: BuiltInChordProgression;
35
+ readonly rhythmChangesA: BuiltInChordProgression;
36
+ readonly rhythmChangesBridge: BuiltInChordProgression;
27
37
  };
28
38
  /** A key for one of the built-in chord progression templates. */
29
39
  export type ChordProgressionKey = keyof typeof _chordProgressions;
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/data/chord-progressions/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,EAC7B,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,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bd,CAAC;AAEX,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,mBAAmB,EACnB,uBAAuB,CACH,CAAC;AAiBvB,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,EAAE,SAAS,wBAAwB,CACvE,mBAAmB,CACpB,EAM0C,CAAC;AAE5C,mEAAmE;AACnE,eAAO,MAAM,8BAA8B,EACzC,SAAS,6BAA6B,CAAC,mBAAmB,CAAC,EAQtD,CAAC"}
@@ -12,41 +12,41 @@ function chord(degree, chordCollectionKey, durationInBars, analysis) {
12
12
  };
13
13
  }
14
14
  const _chordProgressionCategories = {
15
- fundamentals: {
16
- name: "Fundamentals",
17
- description: "Small tonic, subdominant, and dominant patterns for core harmonic motion.",
15
+ commonLoops: {
16
+ name: "Common Loops & Sequences",
17
+ description: "Reusable diatonic and modal loops, pop progressions, and root-motion sequences.",
18
18
  },
19
- popular: {
20
- name: "Popular Loops",
21
- description: "Common diatonic loops used widely in popular, rock, folk, and songwriting contexts.",
22
- },
23
- jazz: {
24
- name: "Jazz & Turnarounds",
25
- description: "ii-V motion, turnarounds, and jazz-standard forms with richer chord collections.",
19
+ cadences: {
20
+ name: "Cadences",
21
+ description: "Short resolution patterns for tonic arrival, plagal motion, deceptive motion, and modal minor closure.",
26
22
  },
27
23
  blues: {
28
- name: "Blues",
24
+ name: "Blues Forms",
29
25
  description: "Blues forms built from dominant-function tonic, subdominant, and dominant areas.",
30
26
  },
27
+ jazz: {
28
+ name: "Jazz Cadences & Standards",
29
+ description: "Seventh-chord cadences and reusable sections from foundational jazz-standard forms.",
30
+ },
31
31
  };
32
32
  /** Category display metadata for built-in chord progressions. */
33
33
  export const chordProgressionCategories = _chordProgressionCategories;
34
34
  /** Built-in chord progression category keys in recommended display order. */
35
35
  export const chordProgressionCategoryKeys = [
36
- "fundamentals",
37
- "popular",
38
- "jazz",
36
+ "commonLoops",
37
+ "cadences",
39
38
  "blues",
39
+ "jazz",
40
40
  ];
41
41
  const oneOneFiveFive = {
42
- category: "fundamentals",
42
+ category: "commonLoops",
43
43
  chords: [
44
44
  chord("1", "major", 2),
45
45
  chord("5", "major", 2),
46
46
  ],
47
47
  };
48
48
  const oneOneFiveFiveDominant7 = {
49
- category: "fundamentals",
49
+ category: "commonLoops",
50
50
  chords: [
51
51
  chord("1", "major", 2),
52
52
  chord("5", "major", 1),
@@ -54,14 +54,14 @@ const oneOneFiveFiveDominant7 = {
54
54
  ],
55
55
  };
56
56
  const oneOneFourFour = {
57
- category: "fundamentals",
57
+ category: "commonLoops",
58
58
  chords: [
59
59
  chord("1", "major", 2),
60
60
  chord("4", "major", 2),
61
61
  ],
62
62
  };
63
63
  const oneOneFourFive = {
64
- category: "fundamentals",
64
+ category: "commonLoops",
65
65
  chords: [
66
66
  chord("1", "major", 2),
67
67
  chord("4", "major", 1),
@@ -69,7 +69,7 @@ const oneOneFourFive = {
69
69
  ],
70
70
  };
71
71
  const oneFourOneFive = {
72
- category: "fundamentals",
72
+ category: "commonLoops",
73
73
  chords: [
74
74
  chord("1", "major", 1),
75
75
  chord("4", "major", 1),
@@ -78,7 +78,7 @@ const oneFourOneFive = {
78
78
  ],
79
79
  };
80
80
  const oneSixFourFive = {
81
- category: "popular",
81
+ category: "commonLoops",
82
82
  chords: [
83
83
  chord("1", "major", 1),
84
84
  chord("6", "minor", 1),
@@ -87,7 +87,7 @@ const oneSixFourFive = {
87
87
  ],
88
88
  };
89
89
  const oneFiveSixFour = {
90
- category: "popular",
90
+ category: "commonLoops",
91
91
  chords: [
92
92
  chord("1", "major", 1),
93
93
  chord("5", "major", 1),
@@ -96,7 +96,7 @@ const oneFiveSixFour = {
96
96
  ],
97
97
  };
98
98
  const oneSixTwoFive = {
99
- category: "jazz",
99
+ category: "commonLoops",
100
100
  chords: [
101
101
  chord("1", "major", 1),
102
102
  chord("6", "minor", 1),
@@ -105,7 +105,7 @@ const oneSixTwoFive = {
105
105
  ],
106
106
  };
107
107
  const sixTwoFiveOne = {
108
- category: "jazz",
108
+ category: "commonLoops",
109
109
  chords: [
110
110
  chord("6", "minor", 1),
111
111
  chord("2", "minor", 1),
@@ -113,60 +113,80 @@ const sixTwoFiveOne = {
113
113
  chord("1", "major", 1),
114
114
  ],
115
115
  };
116
- const majorTwoFiveOne = {
117
- category: "jazz",
116
+ const oneFourOneFiveSplitReturn = {
117
+ category: "commonLoops",
118
118
  chords: [
119
- chord("2", "minor7", 1),
120
- chord("5", "dominant7", 1),
121
- chord("1", "major7", 2),
119
+ chord("1", "major", 1),
120
+ chord("4", "major", 1),
121
+ chord("1", "major", 1),
122
+ chord("5", "major", 1),
123
+ chord("1", "major", 1),
124
+ chord("4", "major", 1),
125
+ chord("1", "major", 0.5),
126
+ chord("5", "major", 0.5),
127
+ chord("1", "major", 1),
122
128
  ],
123
129
  };
124
- const minorTwoFiveOne = {
125
- category: "jazz",
130
+ const circleOfFifths = {
131
+ commonName: "Circle of Fifths Progression",
132
+ category: "commonLoops",
126
133
  chords: [
127
- chord("2", "halfDiminished7", 1),
128
- chord("5", "dominant7", 1),
129
- chord("1", "minor", 2),
134
+ chord("1", "major", 1),
135
+ chord("4", "major", 1),
136
+ chord("7", "diminishedTriad", 1),
137
+ chord("3", "minor", 1),
138
+ chord("6", "minor", 1),
139
+ chord("2", "minor", 1),
140
+ chord("5", "major", 1),
141
+ chord("1", "major", 1),
130
142
  ],
131
143
  };
132
- const autumnLeavesA = {
133
- commonName: "Autumn Leaves A Section",
134
- category: "jazz",
144
+ const pachelbelCanon = {
145
+ commonName: "Pachelbel Canon",
146
+ category: "commonLoops",
135
147
  chords: [
136
- chord("2", "minor7", 1),
137
- chord("5", "dominant7", 1),
138
- chord("1", "major7", 1),
139
- chord("4", "major7", 1),
140
- chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
141
- chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
142
- chord("6", "minor", 2),
148
+ chord("1", "major", 1),
149
+ chord("5", "major", 1),
150
+ chord("6", "minor", 1),
151
+ chord("3", "minor", 1),
152
+ chord("4", "major", 1),
153
+ chord("1", "major", 1),
154
+ chord("4", "major", 1),
155
+ chord("5", "major", 1),
143
156
  ],
144
157
  };
145
- const autumnLeavesB = {
146
- commonName: "Autumn Leaves B Section",
147
- category: "jazz",
158
+ const authenticCadence = {
159
+ commonName: "Authentic Cadence",
160
+ category: "cadences",
148
161
  chords: [
149
- chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
150
- chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
151
- chord("6", "minor", 2),
152
- chord("2", "minor7", 1),
153
162
  chord("5", "dominant7", 1),
154
- chord("1", "major7", 1),
155
- chord("4", "major7", 1),
163
+ chord("1", "major", 1),
156
164
  ],
157
165
  };
158
- const oneFourOneFiveSplitReturn = {
159
- category: "fundamentals",
166
+ const plagalCadence = {
167
+ commonName: "Plagal Cadence",
168
+ category: "cadences",
160
169
  chords: [
161
- chord("1", "major", 1),
162
170
  chord("4", "major", 1),
163
171
  chord("1", "major", 1),
172
+ ],
173
+ };
174
+ const deceptiveCadence = {
175
+ commonName: "Deceptive Cadence",
176
+ category: "cadences",
177
+ chords: [
178
+ chord("5", "dominant7", 1),
179
+ chord("6", "minor", 1),
180
+ ],
181
+ };
182
+ const andalusianCadence = {
183
+ commonName: "Andalusian Cadence",
184
+ category: "cadences",
185
+ chords: [
186
+ chord("1", "minor", 1),
187
+ chord("♭7", "major", 1),
188
+ chord("♭6", "major", 1),
164
189
  chord("5", "major", 1),
165
- chord("1", "major", 1),
166
- chord("4", "major", 1),
167
- chord("1", "major", 0.5),
168
- chord("5", "major", 0.5),
169
- chord("1", "major", 1),
170
190
  ],
171
191
  };
172
192
  const twelveBarBlues = {
@@ -197,38 +217,130 @@ const twelveBarBluesQuickChange = {
197
217
  chord("5", "dominant7", 1),
198
218
  ],
199
219
  };
200
- const rhythmChangesAChords = [
201
- chord("1", "major", 0.5),
202
- chord("6", "dominant7", 0.5),
203
- chord("2", "minor7", 0.5),
204
- chord("5", "dominant7", 0.5),
205
- chord("3", "minor7", 0.5),
206
- chord("6", "dominant7", 0.5),
207
- chord("2", "minor7", 0.5),
208
- chord("5", "dominant7", 0.5),
209
- chord("1", "major", 0.5),
210
- chord("1", "dominant7", 0.5),
211
- chord("4", "major", 0.5),
212
- chord("♯4", "diminished7", 0.5),
213
- chord("1", "major", 0.5),
214
- chord("6", "dominant7", 0.5),
215
- chord("2", "minor7", 0.5),
216
- chord("5", "dominant7", 0.5),
217
- ];
218
- const rhythmChangesBridgeChords = [
219
- chord("3", "dominant7", 2),
220
- chord("6", "dominant7", 2),
221
- chord("2", "dominant7", 2),
222
- chord("5", "dominant7", 2),
223
- ];
224
- const rhythmChanges = {
225
- commonName: "Rhythm Changes",
220
+ const minorBlues = {
221
+ commonName: "Minor Blues",
222
+ category: "blues",
223
+ chords: [
224
+ chord("1", "minor7", 1),
225
+ chord("4", "minor7", 1),
226
+ chord("1", "minor7", 1),
227
+ chord("1", "minor7", 1),
228
+ chord("4", "minor7", 1),
229
+ chord("4", "minor7", 1),
230
+ chord("1", "minor7", 1),
231
+ chord("1", "minor7", 1),
232
+ chord("♭6", "dominant7", 1),
233
+ chord("5", "dominant7", 1),
234
+ chord("1", "minor7", 1),
235
+ chord("5", "dominant7", 1),
236
+ ],
237
+ };
238
+ const jazzBlues = {
239
+ commonName: "Jazz Blues",
240
+ category: "blues",
241
+ chords: [
242
+ chord("1", "dominant7", 1),
243
+ chord("4", "dominant7", 1),
244
+ chord("1", "dominant7", 1),
245
+ chord("5", "minor7", 0.5),
246
+ chord("1", "dominant7", 0.5),
247
+ chord("4", "dominant7", 1),
248
+ chord("♯4", "diminished7", 1),
249
+ chord("1", "dominant7", 0.5),
250
+ chord("6", "dominant7", 0.5),
251
+ chord("2", "minor7", 0.5),
252
+ chord("5", "dominant7", 0.5),
253
+ chord("3", "minor7", 0.5),
254
+ chord("6", "dominant7", 0.5),
255
+ chord("2", "minor7", 0.5),
256
+ chord("5", "dominant7", 0.5),
257
+ chord("1", "dominant7", 0.5),
258
+ chord("6", "dominant7", 0.5),
259
+ chord("2", "minor7", 0.5),
260
+ chord("5", "dominant7", 0.5),
261
+ ],
262
+ };
263
+ const majorTwoFiveOne = {
264
+ category: "jazz",
265
+ chords: [
266
+ chord("2", "minor7", 1),
267
+ chord("5", "dominant7", 1),
268
+ chord("1", "major7", 2),
269
+ ],
270
+ };
271
+ const minorTwoFiveOne = {
272
+ category: "jazz",
273
+ chords: [
274
+ chord("2", "halfDiminished7", 1),
275
+ chord("5", "dominant7", 1),
276
+ chord("1", "minor", 2),
277
+ ],
278
+ };
279
+ const backdoorTwoFiveOne = {
280
+ commonName: "Backdoor ii-V-I",
281
+ category: "jazz",
282
+ chords: [
283
+ chord("4", "minor7", 1),
284
+ chord("♭7", "dominant7", 1),
285
+ chord("1", "major7", 2),
286
+ ],
287
+ };
288
+ const autumnLeavesA = {
289
+ commonName: "Autumn Leaves A Section",
226
290
  category: "jazz",
227
291
  chords: [
228
- ...rhythmChangesAChords,
229
- ...rhythmChangesAChords,
230
- ...rhythmChangesBridgeChords,
231
- ...rhythmChangesAChords,
292
+ chord("2", "minor7", 1),
293
+ chord("5", "dominant7", 1),
294
+ chord("1", "major7", 1),
295
+ chord("4", "major7", 1),
296
+ chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
297
+ chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
298
+ chord("6", "minor", 2),
299
+ ],
300
+ };
301
+ const autumnLeavesB = {
302
+ commonName: "Autumn Leaves B Section",
303
+ category: "jazz",
304
+ chords: [
305
+ chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
306
+ chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
307
+ chord("6", "minor", 2),
308
+ chord("2", "minor7", 1),
309
+ chord("5", "dominant7", 1),
310
+ chord("1", "major7", 1),
311
+ chord("4", "major7", 1),
312
+ ],
313
+ };
314
+ const rhythmChangesA = {
315
+ commonName: "Rhythm Changes A Section",
316
+ category: "jazz",
317
+ chords: [
318
+ chord("1", "major", 0.5),
319
+ chord("6", "dominant7", 0.5),
320
+ chord("2", "minor7", 0.5),
321
+ chord("5", "dominant7", 0.5),
322
+ chord("3", "minor7", 0.5),
323
+ chord("6", "dominant7", 0.5),
324
+ chord("2", "minor7", 0.5),
325
+ chord("5", "dominant7", 0.5),
326
+ chord("1", "major", 0.5),
327
+ chord("1", "dominant7", 0.5),
328
+ chord("4", "major", 0.5),
329
+ chord("4", "minor", 0.5),
330
+ chord("1", "major", 0.5),
331
+ chord("5", "dominant7", 0.5),
332
+ chord("1", "major", 0.5),
333
+ chord("5", "dominant7", 0.5),
334
+ ],
335
+ };
336
+ const rhythmChangesBridge = {
337
+ commonName: "Rhythm Changes Bridge",
338
+ category: "jazz",
339
+ chords: [
340
+ chord("3", "dominant7", 2),
341
+ chord("6", "dominant7", 2),
342
+ chord("2", "dominant7", 2),
343
+ chord("5", "dominant7", 2),
232
344
  ],
233
345
  };
234
346
  const _chordProgressions = {
@@ -241,14 +353,24 @@ const _chordProgressions = {
241
353
  oneFiveSixFour,
242
354
  oneSixTwoFive,
243
355
  sixTwoFiveOne,
356
+ oneFourOneFiveSplitReturn,
357
+ circleOfFifths,
358
+ pachelbelCanon,
359
+ authenticCadence,
360
+ plagalCadence,
361
+ deceptiveCadence,
362
+ andalusianCadence,
363
+ twelveBarBlues,
364
+ twelveBarBluesQuickChange,
365
+ minorBlues,
366
+ jazzBlues,
244
367
  majorTwoFiveOne,
245
368
  minorTwoFiveOne,
246
- oneFourOneFiveSplitReturn,
369
+ backdoorTwoFiveOne,
247
370
  autumnLeavesA,
248
371
  autumnLeavesB,
249
- twelveBarBlues,
250
- twelveBarBluesQuickChange,
251
- rhythmChanges,
372
+ rhythmChangesA,
373
+ rhythmChangesBridge,
252
374
  };
253
375
  /** Built-in chord progression templates keyed by progression id. */
254
376
  export const chordProgressions = _chordProgressions;
@@ -28,7 +28,8 @@ export interface ConversionRegistryEntry<T, TId extends string = string> {
28
28
  name: string;
29
29
  shortName: string;
30
30
  description: string;
31
- example: string;
31
+ outputPreview: string;
32
+ sampleOutput: string;
32
33
  inputKind: ConversionInputKind;
33
34
  outputKind: ConversionOutputKind;
34
35
  outputShape: ConversionOutputShape;
@@ -1 +1 @@
1
- {"version":3,"file":"conversion-registry.d.ts","sourceRoot":"","sources":["../../../src/src/utils/conversion-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgBrE;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,IAAI,CAAC;IACpB,oBAAoB,EAAE,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAClC,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,yBAAyB,KAC/B,cAAc,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAEnC,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,WAAW,GACX,YAAY,GACZ,eAAe,CAAC;AAEpB,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAEnD,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE9D,MAAM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AiB,EAAE,uBAAuB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;IAC3E,MAAM,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClD,aAAa,EAAE,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjE,WAAW,EAAE,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACjE,kBAAkB,EAAE,uBAAuB,CACzC,iBAAiB,EACjB,sBAAsB,CACvB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,gCAAgC,CAAC;CACzD;AAkBD,eAAO,MAAM,WAAW,EAAE,kBAmKzB,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAC3C,gCAAoE,CAAC;AAEvE,MAAM,MAAM,kCAAkC,GAC5C,MAAM,OAAO,gCAAgC,CAAC;AAEhD,MAAM,MAAM,+BAA+B,GACzC,OAAO,gCAAgC,CAAC,kCAAkC,CAAC,CAAC;AAE9E,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,+BAA+B,EAC3C,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAET;AAED,wBAAgB,4CAA4C,CAC1D,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,GACnC,+BAA+B,EAAE,CAQnC"}
@@ -15,7 +15,8 @@ export const conversions = {
15
15
  name: "Note Names",
16
16
  shortName: "Notes",
17
17
  description: "Returns 12 absolute pitch-class slots for the root and collection, indexed so C is slot 0.",
18
- example: "C, D♭, D, E♭, E, F, G♭, G, A♭, A, B♭, B",
18
+ outputPreview: "C, D♭, D...",
19
+ sampleOutput: "C, D♭, D, E♭, E, F, G♭, G, A♭, A, B♭, B",
19
20
  inputKind: "rootAndNoteCollection",
20
21
  outputKind: "noteNames",
21
22
  outputShape: "chromatic-12",
@@ -29,7 +30,8 @@ export const conversions = {
29
30
  name: "Intervals",
30
31
  shortName: "Intervals",
31
32
  description: "Returns 12 absolute pitch-class slots labeled with intervals relative to the root, indexed so C is slot 0.",
32
- example: "1, ♭2, 2, ♭3, 3, 4, ♭5, 5, ♭6, 6, ♭7, 7",
33
+ outputPreview: "1, ♭2, 2...",
34
+ sampleOutput: "1, ♭2, 2, ♭3, 3, 4, ♭5, 5, ♭6, 6, ♭7, 7",
33
35
  inputKind: "rootAndNoteCollection",
34
36
  outputKind: "intervals",
35
37
  outputShape: "chromatic-12",
@@ -43,7 +45,8 @@ export const conversions = {
43
45
  name: "Extensions",
44
46
  shortName: "Extensions",
45
47
  description: "Returns 12 chromatic interval slots with simple intervals converted to extensions where applicable.",
46
- example: "1, ♭9, 9, ♭3, 3, 11, ♭5, 5, ♭13, 13, ♭7, 7",
48
+ outputPreview: "1, ♭9, 9...",
49
+ sampleOutput: "1, ♭9, 9, ♭3, 3, 11, ♭5, 5, ♭13, 13, ♭7, 7",
47
50
  inputKind: "rootAndNoteCollection",
48
51
  outputKind: "intervals",
49
52
  outputShape: "chromatic-12",
@@ -57,7 +60,8 @@ export const conversions = {
57
60
  name: "Compound Intervals",
58
61
  shortName: "Compound",
59
62
  description: "Returns 12 chromatic interval slots with simple intervals converted to compound equivalents.",
60
- example: "1, ♭9, 9, ♭10, 10, 11, ♭12, 12, ♭13, 13, ♭14, 14",
63
+ outputPreview: "1, ♭9, 9, ♭10...",
64
+ sampleOutput: "1, ♭9, 9, ♭10, 10, 11, ♭12, 12, ♭13, 13, ♭14, 14",
61
65
  inputKind: "rootAndNoteCollection",
62
66
  outputKind: "intervals",
63
67
  outputShape: "chromatic-12",
@@ -71,7 +75,8 @@ export const conversions = {
71
75
  name: "Triads",
72
76
  shortName: "Triads",
73
77
  description: "Returns 12 chromatic triad-name slots for note collections with authored modal harmony.",
74
- example: "CM, -, Dm, -, Em, FM, -, GM, -, Am, -, B°",
78
+ outputPreview: "CM, Dm, Em...",
79
+ sampleOutput: "CM, -, Dm, -, Em, FM, -, GM, -, Am, -, B°",
75
80
  inputKind: "rootAndNoteCollection",
76
81
  outputKind: "chordNames",
77
82
  outputShape: "chromatic-12",
@@ -87,7 +92,8 @@ export const conversions = {
87
92
  name: "Seventh Chords",
88
93
  shortName: "Sevenths",
89
94
  description: "Returns 12 chromatic seventh-chord-name slots for note collections with authored modal harmony.",
90
- example: "CM7, -, Dm7, -, Em7, FM7, -, G7, -, Am7, -, Bø7",
95
+ outputPreview: "CM7, Dm7, Em7...",
96
+ sampleOutput: "CM7, -, Dm7, -, Em7, FM7, -, G7, -, Am7, -, Bø7",
91
97
  inputKind: "rootAndNoteCollection",
92
98
  outputKind: "chordNames",
93
99
  outputShape: "chromatic-12",
@@ -103,7 +109,8 @@ export const conversions = {
103
109
  name: "Roman Numeral Triads",
104
110
  shortName: "Roman Triads",
105
111
  description: "Returns 12 chromatic Roman numeral triad slots for note collections with authored modal harmony.",
106
- example: "I, -, ii, -, iii, IV, -, V, -, vi, -, vii°",
112
+ outputPreview: "I, ii, iii...",
113
+ sampleOutput: "I, -, ii, -, iii, IV, -, V, -, vi, -, vii°",
107
114
  inputKind: "rootAndNoteCollection",
108
115
  outputKind: "romanNumerals",
109
116
  outputShape: "chromatic-12",
@@ -119,7 +126,8 @@ export const conversions = {
119
126
  name: "Roman Numeral Seventh Chords",
120
127
  shortName: "Roman Sevenths",
121
128
  description: "Returns 12 chromatic Roman numeral seventh-chord slots for note collections with authored modal harmony.",
122
- example: "IM7, -, iim7, -, iiim7, IVM7, -, V7, -, vim7, -, viiø7",
129
+ outputPreview: "IM7, iim7, iiim7...",
130
+ sampleOutput: "IM7, -, iim7, -, iiim7, IVM7, -, V7, -, vim7, -, viiø7",
123
131
  inputKind: "rootAndNoteCollection",
124
132
  outputKind: "romanNumerals",
125
133
  outputShape: "chromatic-12",
@@ -1,12 +1,12 @@
1
1
  import { type Interval, type NoteName } from "../data/labels/note-labels.js";
2
2
  import type { MidiNoteNumber } from "../types/midi";
3
- export declare function getMidiOctave(midi: number): number;
4
- export type MidiNoteSpelling = "flat" | "sharp";
3
+ export declare function getScientificPitchOctaveForMidiNote(midi: number): number;
4
+ export type MidiNoteSpellingPreference = "flat" | "sharp";
5
5
  export interface FormatMidiNoteOptions {
6
- spelling?: MidiNoteSpelling;
6
+ spelling?: MidiNoteSpellingPreference;
7
7
  }
8
8
  export declare function formatMidiNote(midi: number, options?: FormatMidiNoteOptions): string;
9
- export declare function formatSpelledMidiNote(noteName: string, midi: number): string;
9
+ export declare function formatNoteNameWithMidiOctave(noteName: string, midi: number): string;
10
10
  /**
11
11
  * Calculates a MIDI note number based on a starting musical note (represented by its integer value and octave)
12
12
  * and an interval to apply to it.
@@ -1 +1 @@
1
- {"version":3,"file":"midi.d.ts","sourceRoot":"","sources":["../../../src/src/utils/midi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAEd,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,MAAM,CAQR;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,QAAQ,GACjB,cAAc,GAAG,SAAS,CAM5B;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,MAAM,EACxB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