@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.
@@ -1,7 +1,7 @@
1
1
  import { intervalToIntegerMap, noteNameToIntegerMap, } from "../data/labels/note-labels.js";
2
2
  import { noteLabelCollections } from "../data/labels/note-label-collections.js";
3
3
  import { normalizeChromaticIndex } from "./chromatic.js";
4
- export function getMidiOctave(midi) {
4
+ export function getScientificPitchOctaveForMidiNote(midi) {
5
5
  return Math.floor(midi / 12) - 1;
6
6
  }
7
7
  export function formatMidiNote(midi, options = {}) {
@@ -10,10 +10,12 @@ export function formatMidiNote(midi, options = {}) {
10
10
  ? noteLabelCollections.noteNamesSharp.labels
11
11
  : noteLabelCollections.noteNamesFlat.labels;
12
12
  const noteName = labels[normalizeChromaticIndex(midi)];
13
- return `${noteName}${getMidiOctave(midi)}`;
13
+ return `${noteName}${getScientificPitchOctaveForMidiNote(midi)}`;
14
14
  }
15
- export function formatSpelledMidiNote(noteName, midi) {
16
- return noteName === "" ? "" : `${noteName}${getMidiOctave(midi)}`;
15
+ export function formatNoteNameWithMidiOctave(noteName, midi) {
16
+ return noteName === ""
17
+ ? ""
18
+ : `${noteName}${getScientificPitchOctaveForMidiNote(midi)}`;
17
19
  }
18
20
  /**
19
21
  * Calculates a MIDI note number based on a starting musical note (represented by its integer value and octave)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@musodojo/music-theory-data",
3
- "version": "33.0.0",
3
+ "version": "35.0.0",
4
4
  "description": "The musician-friendly TypeScript library for scales, modes, chords, and arpeggios.",
5
5
  "keywords": [
6
6
  "music",
@@ -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,2BAA2B,EAC3B,gCAAgC,EAEjC,MAAM,gCAAgC,CAAC;AAExC,KAAK,uBAAuB,GAAG,gBAAgB,GAAG;IAChD,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;CAChD,CAAC;AAgDF,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,2BAA2B,EAC3B,gCAAgC,CACH,CAAC;AAEhC,6EAA6E;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,MAAM,yBAAyB,EAAE,SAAS,wBAAwB,CACvE,mBAAmB,CACpB,EAM0C,CAAC;AAE5C,mEAAmE;AACnE,eAAO,MAAM,8BAA8B,EACzC,SAAS,6BAA6B,CAAC,mBAAmB,CAAC,EAQtD,CAAC"}
@@ -15,41 +15,41 @@ function chord(degree, chordCollectionKey, durationInBars, analysis) {
15
15
  };
16
16
  }
17
17
  const _chordProgressionCategories = {
18
- fundamentals: {
19
- name: "Fundamentals",
20
- description: "Small tonic, subdominant, and dominant patterns for core harmonic motion.",
18
+ commonLoops: {
19
+ name: "Common Loops & Sequences",
20
+ description: "Reusable diatonic and modal loops, pop progressions, and root-motion sequences.",
21
21
  },
22
- popular: {
23
- name: "Popular Loops",
24
- description: "Common diatonic loops used widely in popular, rock, folk, and songwriting contexts.",
25
- },
26
- jazz: {
27
- name: "Jazz & Turnarounds",
28
- description: "ii-V motion, turnarounds, and jazz-standard forms with richer chord collections.",
22
+ cadences: {
23
+ name: "Cadences",
24
+ description: "Short resolution patterns for tonic arrival, plagal motion, deceptive motion, and modal minor closure.",
29
25
  },
30
26
  blues: {
31
- name: "Blues",
27
+ name: "Blues Forms",
32
28
  description: "Blues forms built from dominant-function tonic, subdominant, and dominant areas.",
33
29
  },
30
+ jazz: {
31
+ name: "Jazz Cadences & Standards",
32
+ description: "Seventh-chord cadences and reusable sections from foundational jazz-standard forms.",
33
+ },
34
34
  };
35
35
  /** Category display metadata for built-in chord progressions. */
36
36
  exports.chordProgressionCategories = _chordProgressionCategories;
37
37
  /** Built-in chord progression category keys in recommended display order. */
38
38
  exports.chordProgressionCategoryKeys = [
39
- "fundamentals",
40
- "popular",
41
- "jazz",
39
+ "commonLoops",
40
+ "cadences",
42
41
  "blues",
42
+ "jazz",
43
43
  ];
44
44
  const oneOneFiveFive = {
45
- category: "fundamentals",
45
+ category: "commonLoops",
46
46
  chords: [
47
47
  chord("1", "major", 2),
48
48
  chord("5", "major", 2),
49
49
  ],
50
50
  };
51
51
  const oneOneFiveFiveDominant7 = {
52
- category: "fundamentals",
52
+ category: "commonLoops",
53
53
  chords: [
54
54
  chord("1", "major", 2),
55
55
  chord("5", "major", 1),
@@ -57,14 +57,14 @@ const oneOneFiveFiveDominant7 = {
57
57
  ],
58
58
  };
59
59
  const oneOneFourFour = {
60
- category: "fundamentals",
60
+ category: "commonLoops",
61
61
  chords: [
62
62
  chord("1", "major", 2),
63
63
  chord("4", "major", 2),
64
64
  ],
65
65
  };
66
66
  const oneOneFourFive = {
67
- category: "fundamentals",
67
+ category: "commonLoops",
68
68
  chords: [
69
69
  chord("1", "major", 2),
70
70
  chord("4", "major", 1),
@@ -72,7 +72,7 @@ const oneOneFourFive = {
72
72
  ],
73
73
  };
74
74
  const oneFourOneFive = {
75
- category: "fundamentals",
75
+ category: "commonLoops",
76
76
  chords: [
77
77
  chord("1", "major", 1),
78
78
  chord("4", "major", 1),
@@ -81,7 +81,7 @@ const oneFourOneFive = {
81
81
  ],
82
82
  };
83
83
  const oneSixFourFive = {
84
- category: "popular",
84
+ category: "commonLoops",
85
85
  chords: [
86
86
  chord("1", "major", 1),
87
87
  chord("6", "minor", 1),
@@ -90,7 +90,7 @@ const oneSixFourFive = {
90
90
  ],
91
91
  };
92
92
  const oneFiveSixFour = {
93
- category: "popular",
93
+ category: "commonLoops",
94
94
  chords: [
95
95
  chord("1", "major", 1),
96
96
  chord("5", "major", 1),
@@ -99,7 +99,7 @@ const oneFiveSixFour = {
99
99
  ],
100
100
  };
101
101
  const oneSixTwoFive = {
102
- category: "jazz",
102
+ category: "commonLoops",
103
103
  chords: [
104
104
  chord("1", "major", 1),
105
105
  chord("6", "minor", 1),
@@ -108,7 +108,7 @@ const oneSixTwoFive = {
108
108
  ],
109
109
  };
110
110
  const sixTwoFiveOne = {
111
- category: "jazz",
111
+ category: "commonLoops",
112
112
  chords: [
113
113
  chord("6", "minor", 1),
114
114
  chord("2", "minor", 1),
@@ -116,60 +116,80 @@ const sixTwoFiveOne = {
116
116
  chord("1", "major", 1),
117
117
  ],
118
118
  };
119
- const majorTwoFiveOne = {
120
- category: "jazz",
119
+ const oneFourOneFiveSplitReturn = {
120
+ category: "commonLoops",
121
121
  chords: [
122
- chord("2", "minor7", 1),
123
- chord("5", "dominant7", 1),
124
- chord("1", "major7", 2),
122
+ chord("1", "major", 1),
123
+ chord("4", "major", 1),
124
+ chord("1", "major", 1),
125
+ chord("5", "major", 1),
126
+ chord("1", "major", 1),
127
+ chord("4", "major", 1),
128
+ chord("1", "major", 0.5),
129
+ chord("5", "major", 0.5),
130
+ chord("1", "major", 1),
125
131
  ],
126
132
  };
127
- const minorTwoFiveOne = {
128
- category: "jazz",
133
+ const circleOfFifths = {
134
+ commonName: "Circle of Fifths Progression",
135
+ category: "commonLoops",
129
136
  chords: [
130
- chord("2", "halfDiminished7", 1),
131
- chord("5", "dominant7", 1),
132
- chord("1", "minor", 2),
137
+ chord("1", "major", 1),
138
+ chord("4", "major", 1),
139
+ chord("7", "diminishedTriad", 1),
140
+ chord("3", "minor", 1),
141
+ chord("6", "minor", 1),
142
+ chord("2", "minor", 1),
143
+ chord("5", "major", 1),
144
+ chord("1", "major", 1),
133
145
  ],
134
146
  };
135
- const autumnLeavesA = {
136
- commonName: "Autumn Leaves A Section",
137
- category: "jazz",
147
+ const pachelbelCanon = {
148
+ commonName: "Pachelbel Canon",
149
+ category: "commonLoops",
138
150
  chords: [
139
- chord("2", "minor7", 1),
140
- chord("5", "dominant7", 1),
141
- chord("1", "major7", 1),
142
- chord("4", "major7", 1),
143
- chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
144
- chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
145
- chord("6", "minor", 2),
151
+ chord("1", "major", 1),
152
+ chord("5", "major", 1),
153
+ chord("6", "minor", 1),
154
+ chord("3", "minor", 1),
155
+ chord("4", "major", 1),
156
+ chord("1", "major", 1),
157
+ chord("4", "major", 1),
158
+ chord("5", "major", 1),
146
159
  ],
147
160
  };
148
- const autumnLeavesB = {
149
- commonName: "Autumn Leaves B Section",
150
- category: "jazz",
161
+ const authenticCadence = {
162
+ commonName: "Authentic Cadence",
163
+ category: "cadences",
151
164
  chords: [
152
- chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
153
- chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
154
- chord("6", "minor", 2),
155
- chord("2", "minor7", 1),
156
165
  chord("5", "dominant7", 1),
157
- chord("1", "major7", 1),
158
- chord("4", "major7", 1),
166
+ chord("1", "major", 1),
159
167
  ],
160
168
  };
161
- const oneFourOneFiveSplitReturn = {
162
- category: "fundamentals",
169
+ const plagalCadence = {
170
+ commonName: "Plagal Cadence",
171
+ category: "cadences",
163
172
  chords: [
164
- chord("1", "major", 1),
165
173
  chord("4", "major", 1),
166
174
  chord("1", "major", 1),
175
+ ],
176
+ };
177
+ const deceptiveCadence = {
178
+ commonName: "Deceptive Cadence",
179
+ category: "cadences",
180
+ chords: [
181
+ chord("5", "dominant7", 1),
182
+ chord("6", "minor", 1),
183
+ ],
184
+ };
185
+ const andalusianCadence = {
186
+ commonName: "Andalusian Cadence",
187
+ category: "cadences",
188
+ chords: [
189
+ chord("1", "minor", 1),
190
+ chord("♭7", "major", 1),
191
+ chord("♭6", "major", 1),
167
192
  chord("5", "major", 1),
168
- chord("1", "major", 1),
169
- chord("4", "major", 1),
170
- chord("1", "major", 0.5),
171
- chord("5", "major", 0.5),
172
- chord("1", "major", 1),
173
193
  ],
174
194
  };
175
195
  const twelveBarBlues = {
@@ -200,38 +220,130 @@ const twelveBarBluesQuickChange = {
200
220
  chord("5", "dominant7", 1),
201
221
  ],
202
222
  };
203
- const rhythmChangesAChords = [
204
- chord("1", "major", 0.5),
205
- chord("6", "dominant7", 0.5),
206
- chord("2", "minor7", 0.5),
207
- chord("5", "dominant7", 0.5),
208
- chord("3", "minor7", 0.5),
209
- chord("6", "dominant7", 0.5),
210
- chord("2", "minor7", 0.5),
211
- chord("5", "dominant7", 0.5),
212
- chord("1", "major", 0.5),
213
- chord("1", "dominant7", 0.5),
214
- chord("4", "major", 0.5),
215
- chord("♯4", "diminished7", 0.5),
216
- chord("1", "major", 0.5),
217
- chord("6", "dominant7", 0.5),
218
- chord("2", "minor7", 0.5),
219
- chord("5", "dominant7", 0.5),
220
- ];
221
- const rhythmChangesBridgeChords = [
222
- chord("3", "dominant7", 2),
223
- chord("6", "dominant7", 2),
224
- chord("2", "dominant7", 2),
225
- chord("5", "dominant7", 2),
226
- ];
227
- const rhythmChanges = {
228
- commonName: "Rhythm Changes",
223
+ const minorBlues = {
224
+ commonName: "Minor Blues",
225
+ category: "blues",
226
+ chords: [
227
+ chord("1", "minor7", 1),
228
+ chord("4", "minor7", 1),
229
+ chord("1", "minor7", 1),
230
+ chord("1", "minor7", 1),
231
+ chord("4", "minor7", 1),
232
+ chord("4", "minor7", 1),
233
+ chord("1", "minor7", 1),
234
+ chord("1", "minor7", 1),
235
+ chord("♭6", "dominant7", 1),
236
+ chord("5", "dominant7", 1),
237
+ chord("1", "minor7", 1),
238
+ chord("5", "dominant7", 1),
239
+ ],
240
+ };
241
+ const jazzBlues = {
242
+ commonName: "Jazz Blues",
243
+ category: "blues",
244
+ chords: [
245
+ chord("1", "dominant7", 1),
246
+ chord("4", "dominant7", 1),
247
+ chord("1", "dominant7", 1),
248
+ chord("5", "minor7", 0.5),
249
+ chord("1", "dominant7", 0.5),
250
+ chord("4", "dominant7", 1),
251
+ chord("♯4", "diminished7", 1),
252
+ chord("1", "dominant7", 0.5),
253
+ chord("6", "dominant7", 0.5),
254
+ chord("2", "minor7", 0.5),
255
+ chord("5", "dominant7", 0.5),
256
+ chord("3", "minor7", 0.5),
257
+ chord("6", "dominant7", 0.5),
258
+ chord("2", "minor7", 0.5),
259
+ chord("5", "dominant7", 0.5),
260
+ chord("1", "dominant7", 0.5),
261
+ chord("6", "dominant7", 0.5),
262
+ chord("2", "minor7", 0.5),
263
+ chord("5", "dominant7", 0.5),
264
+ ],
265
+ };
266
+ const majorTwoFiveOne = {
267
+ category: "jazz",
268
+ chords: [
269
+ chord("2", "minor7", 1),
270
+ chord("5", "dominant7", 1),
271
+ chord("1", "major7", 2),
272
+ ],
273
+ };
274
+ const minorTwoFiveOne = {
275
+ category: "jazz",
276
+ chords: [
277
+ chord("2", "halfDiminished7", 1),
278
+ chord("5", "dominant7", 1),
279
+ chord("1", "minor", 2),
280
+ ],
281
+ };
282
+ const backdoorTwoFiveOne = {
283
+ commonName: "Backdoor ii-V-I",
284
+ category: "jazz",
285
+ chords: [
286
+ chord("4", "minor7", 1),
287
+ chord("♭7", "dominant7", 1),
288
+ chord("1", "major7", 2),
289
+ ],
290
+ };
291
+ const autumnLeavesA = {
292
+ commonName: "Autumn Leaves A Section",
229
293
  category: "jazz",
230
294
  chords: [
231
- ...rhythmChangesAChords,
232
- ...rhythmChangesAChords,
233
- ...rhythmChangesBridgeChords,
234
- ...rhythmChangesAChords,
295
+ chord("2", "minor7", 1),
296
+ chord("5", "dominant7", 1),
297
+ chord("1", "major7", 1),
298
+ chord("4", "major7", 1),
299
+ chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
300
+ chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
301
+ chord("6", "minor", 2),
302
+ ],
303
+ };
304
+ const autumnLeavesB = {
305
+ commonName: "Autumn Leaves B Section",
306
+ category: "jazz",
307
+ chords: [
308
+ chord("7", "halfDiminished7", 1, { romanSymbol: "iiø7/vi" }),
309
+ chord("3", "dominant7", 1, { romanSymbol: "V7/vi" }),
310
+ chord("6", "minor", 2),
311
+ chord("2", "minor7", 1),
312
+ chord("5", "dominant7", 1),
313
+ chord("1", "major7", 1),
314
+ chord("4", "major7", 1),
315
+ ],
316
+ };
317
+ const rhythmChangesA = {
318
+ commonName: "Rhythm Changes A Section",
319
+ category: "jazz",
320
+ chords: [
321
+ chord("1", "major", 0.5),
322
+ chord("6", "dominant7", 0.5),
323
+ chord("2", "minor7", 0.5),
324
+ chord("5", "dominant7", 0.5),
325
+ chord("3", "minor7", 0.5),
326
+ chord("6", "dominant7", 0.5),
327
+ chord("2", "minor7", 0.5),
328
+ chord("5", "dominant7", 0.5),
329
+ chord("1", "major", 0.5),
330
+ chord("1", "dominant7", 0.5),
331
+ chord("4", "major", 0.5),
332
+ chord("4", "minor", 0.5),
333
+ chord("1", "major", 0.5),
334
+ chord("5", "dominant7", 0.5),
335
+ chord("1", "major", 0.5),
336
+ chord("5", "dominant7", 0.5),
337
+ ],
338
+ };
339
+ const rhythmChangesBridge = {
340
+ commonName: "Rhythm Changes Bridge",
341
+ category: "jazz",
342
+ chords: [
343
+ chord("3", "dominant7", 2),
344
+ chord("6", "dominant7", 2),
345
+ chord("2", "dominant7", 2),
346
+ chord("5", "dominant7", 2),
235
347
  ],
236
348
  };
237
349
  const _chordProgressions = {
@@ -244,14 +356,24 @@ const _chordProgressions = {
244
356
  oneFiveSixFour,
245
357
  oneSixTwoFive,
246
358
  sixTwoFiveOne,
359
+ oneFourOneFiveSplitReturn,
360
+ circleOfFifths,
361
+ pachelbelCanon,
362
+ authenticCadence,
363
+ plagalCadence,
364
+ deceptiveCadence,
365
+ andalusianCadence,
366
+ twelveBarBlues,
367
+ twelveBarBluesQuickChange,
368
+ minorBlues,
369
+ jazzBlues,
247
370
  majorTwoFiveOne,
248
371
  minorTwoFiveOne,
249
- oneFourOneFiveSplitReturn,
372
+ backdoorTwoFiveOne,
250
373
  autumnLeavesA,
251
374
  autumnLeavesB,
252
- twelveBarBlues,
253
- twelveBarBluesQuickChange,
254
- rhythmChanges,
375
+ rhythmChangesA,
376
+ rhythmChangesBridge,
255
377
  };
256
378
  /** Built-in chord progression templates keyed by progression id. */
257
379
  exports.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,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,CAAC;AAEvD,MAAM,MAAM,8BAA8B,GAAG,CAC3C,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC;AAEb,MAAM,WAAW,uBAAuB,CAAC,CAAC,EAAE,GAAG,SAAS,MAAM,GAAG,MAAM;IACrE,EAAE,EAAE,GAAG,CAAC;I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AAkB,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"}
@@ -20,7 +20,8 @@ exports.conversions = {
20
20
  name: "Note Names",
21
21
  shortName: "Notes",
22
22
  description: "Returns 12 absolute pitch-class slots for the root and collection, indexed so C is slot 0.",
23
- example: "C, D♭, D, E♭, E, F, G♭, G, A♭, A, B♭, B",
23
+ outputPreview: "C, D♭, D...",
24
+ sampleOutput: "C, D♭, D, E♭, E, F, G♭, G, A♭, A, B♭, B",
24
25
  inputKind: "rootAndNoteCollection",
25
26
  outputKind: "noteNames",
26
27
  outputShape: "chromatic-12",
@@ -34,7 +35,8 @@ exports.conversions = {
34
35
  name: "Intervals",
35
36
  shortName: "Intervals",
36
37
  description: "Returns 12 absolute pitch-class slots labeled with intervals relative to the root, indexed so C is slot 0.",
37
- example: "1, ♭2, 2, ♭3, 3, 4, ♭5, 5, ♭6, 6, ♭7, 7",
38
+ outputPreview: "1, ♭2, 2...",
39
+ sampleOutput: "1, ♭2, 2, ♭3, 3, 4, ♭5, 5, ♭6, 6, ♭7, 7",
38
40
  inputKind: "rootAndNoteCollection",
39
41
  outputKind: "intervals",
40
42
  outputShape: "chromatic-12",
@@ -48,7 +50,8 @@ exports.conversions = {
48
50
  name: "Extensions",
49
51
  shortName: "Extensions",
50
52
  description: "Returns 12 chromatic interval slots with simple intervals converted to extensions where applicable.",
51
- example: "1, ♭9, 9, ♭3, 3, 11, ♭5, 5, ♭13, 13, ♭7, 7",
53
+ outputPreview: "1, ♭9, 9...",
54
+ sampleOutput: "1, ♭9, 9, ♭3, 3, 11, ♭5, 5, ♭13, 13, ♭7, 7",
52
55
  inputKind: "rootAndNoteCollection",
53
56
  outputKind: "intervals",
54
57
  outputShape: "chromatic-12",
@@ -62,7 +65,8 @@ exports.conversions = {
62
65
  name: "Compound Intervals",
63
66
  shortName: "Compound",
64
67
  description: "Returns 12 chromatic interval slots with simple intervals converted to compound equivalents.",
65
- example: "1, ♭9, 9, ♭10, 10, 11, ♭12, 12, ♭13, 13, ♭14, 14",
68
+ outputPreview: "1, ♭9, 9, ♭10...",
69
+ sampleOutput: "1, ♭9, 9, ♭10, 10, 11, ♭12, 12, ♭13, 13, ♭14, 14",
66
70
  inputKind: "rootAndNoteCollection",
67
71
  outputKind: "intervals",
68
72
  outputShape: "chromatic-12",
@@ -76,7 +80,8 @@ exports.conversions = {
76
80
  name: "Triads",
77
81
  shortName: "Triads",
78
82
  description: "Returns 12 chromatic triad-name slots for note collections with authored modal harmony.",
79
- example: "CM, -, Dm, -, Em, FM, -, GM, -, Am, -, B°",
83
+ outputPreview: "CM, Dm, Em...",
84
+ sampleOutput: "CM, -, Dm, -, Em, FM, -, GM, -, Am, -, B°",
80
85
  inputKind: "rootAndNoteCollection",
81
86
  outputKind: "chordNames",
82
87
  outputShape: "chromatic-12",
@@ -92,7 +97,8 @@ exports.conversions = {
92
97
  name: "Seventh Chords",
93
98
  shortName: "Sevenths",
94
99
  description: "Returns 12 chromatic seventh-chord-name slots for note collections with authored modal harmony.",
95
- example: "CM7, -, Dm7, -, Em7, FM7, -, G7, -, Am7, -, Bø7",
100
+ outputPreview: "CM7, Dm7, Em7...",
101
+ sampleOutput: "CM7, -, Dm7, -, Em7, FM7, -, G7, -, Am7, -, Bø7",
96
102
  inputKind: "rootAndNoteCollection",
97
103
  outputKind: "chordNames",
98
104
  outputShape: "chromatic-12",
@@ -108,7 +114,8 @@ exports.conversions = {
108
114
  name: "Roman Numeral Triads",
109
115
  shortName: "Roman Triads",
110
116
  description: "Returns 12 chromatic Roman numeral triad slots for note collections with authored modal harmony.",
111
- example: "I, -, ii, -, iii, IV, -, V, -, vi, -, vii°",
117
+ outputPreview: "I, ii, iii...",
118
+ sampleOutput: "I, -, ii, -, iii, IV, -, V, -, vi, -, vii°",
112
119
  inputKind: "rootAndNoteCollection",
113
120
  outputKind: "romanNumerals",
114
121
  outputShape: "chromatic-12",
@@ -124,7 +131,8 @@ exports.conversions = {
124
131
  name: "Roman Numeral Seventh Chords",
125
132
  shortName: "Roman Sevenths",
126
133
  description: "Returns 12 chromatic Roman numeral seventh-chord slots for note collections with authored modal harmony.",
127
- example: "IM7, -, iim7, -, iiim7, IVM7, -, V7, -, vim7, -, viiø7",
134
+ outputPreview: "IM7, iim7, iiim7...",
135
+ sampleOutput: "IM7, -, iim7, -, iiim7, IVM7, -, V7, -, vim7, -, viiø7",
128
136
  inputKind: "rootAndNoteCollection",
129
137
  outputKind: "romanNumerals",
130
138
  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,QAAQ,EAAE,QAAQ,GACjB,cAAc,GAAG,SAAS,CAQ5B;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,QAAQ,GACjB,cAAc,GAAG,SAAS,CAI5B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,QAAQ,EAClB,gB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