@onjmin/dtm 2.0.2 → 2.0.3

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/dist/index.d.ts CHANGED
@@ -57,6 +57,151 @@ type ChordPlayerInstance = {
57
57
  */
58
58
  declare const mountChordPlayer: (target: HTMLElement, chords: string, options?: MountChordPlayerOptions) => ChordPlayerInstance;
59
59
 
60
+ /**
61
+ * 音律(12平均律 / 31平均律)と、ピッチの内部表現。
62
+ *
63
+ * ## 単位
64
+ *
65
+ * ノートのピッチは **1/372オクターブの整数** で持つ。372 = 12 × 31 で、12と31は
66
+ * 互いに素なので最小公倍数がこれになり、**12平均律と31平均律の両方が誤差ゼロで
67
+ * 同じ数直線に乗る**。
68
+ *
69
+ * 12平均律 1半音 = 31 units
70
+ * 31平均律 1度 = 12 units
71
+ * 1 unit = 1200/372 ≒ 3.2258 セント
72
+ *
73
+ * 整数のままなので `a.pitchUnits === b.pitchUnits` の同値判定が全部生き残る
74
+ * (重複判定・当たり判定・協調編集の (startStep, pitchUnits) キー)。小数にすると
75
+ * ここが軒並み壊れるため、細かい整数単位を選んでいる。
76
+ *
77
+ * ## 音律は音声経路に入らない
78
+ *
79
+ * ピッチが絶対値なので、シーケンサも発音器も音律を知らなくてよい。音律は
80
+ * 「格子・記譜・表示」だけに効く編集上の概念で、`RenderConfig.edo` に置く。
81
+ */
82
+ /**
83
+ * ピッチの単位を型で区別するためのブランド。
84
+ *
85
+ * `Units` と `MidiNote` はどちらも実体は number だが、互いに代入できない。
86
+ * これは「半音の数値を units のつもりで使う」「units を SoundFont の
87
+ * MIDIノート番号として渡す」といった取り違えを**コンパイラに検出させる**ため。
88
+ * 単位の取り違えは型が同じ number である限り一切検出できず、実際に
89
+ * 「楽器音が無音」「オクターブユニゾンが0.4半音ずれる」「多音階音源のサンプル
90
+ * 選択が常に最高音になる」といった不具合を作り込んだ。
91
+ *
92
+ * 生の number から作るときは {@link units} / {@link midiNote} を通す。
93
+ * 変換は {@link midiToUnits} / {@link unitsToMidi} など、この module の関数に集約する。
94
+ */
95
+ declare const UNITS_BRAND: unique symbol;
96
+ declare const MIDI_BRAND: unique symbol;
97
+ /** ピッチ。1/372オクターブの整数。 */
98
+ type Units = number & {
99
+ readonly [UNITS_BRAND]: true;
100
+ };
101
+ /** MIDIノート番号(半音)。0-127。SoundFont のゾーン選択やMIDI入出力で使う。 */
102
+ type MidiNote = number & {
103
+ readonly [MIDI_BRAND]: true;
104
+ };
105
+ /** 生の数値を units として扱う。単位が units であると確信できる箇所だけで使う。 */
106
+ declare const units: (n: number) => Units;
107
+ /** 生の数値をMIDIノート番号として扱う。MIDI入出力の境界だけで使う。 */
108
+ declare const midiNote: (n: number) => MidiNote;
109
+ /** units 同士・units と生の差分の加算。結果も units。 */
110
+ declare const addUnits: (a: Units, delta: number) => Units;
111
+ /** 1オクターブあたりの units。12 × 31。 */
112
+ declare const UNITS_PER_OCTAVE = 372;
113
+ /** 12平均律の1半音あたりの units。 */
114
+ declare const UNITS_PER_SEMITONE: number;
115
+ /** 31平均律の1度あたりの units。 */
116
+ declare const UNITS_PER_EDO31_DEGREE: number;
117
+ /** 1 unit のセント値。 */
118
+ declare const CENTS_PER_UNIT: number;
119
+ /** A4 (MIDI 69) の units。周波数計算の基準。 */
120
+ declare const A4_UNITS: Units;
121
+ /** A4 の周波数(Hz)。 */
122
+ declare const A4_HZ = 440;
123
+ /** 対応する音律(1オクターブの分割数)。 */
124
+ type Edo = 12 | 31;
125
+ /** 既定の音律。宣言のない曲はすべてこれ(=既存データは素通り)。 */
126
+ declare const DEFAULT_EDO: Edo;
127
+ /** その音律の1格子ステップが何 units か。 */
128
+ declare const unitsPerStep: (edo: Edo) => number;
129
+ /** MIDIノート番号 → units。 */
130
+ declare const midiToUnits: (midi: MidiNote | number) => Units;
131
+ /**
132
+ * units → MIDIノート番号(小数)。
133
+ * 歌声合成(koe)は Hz を受けるためこの小数値をそのまま渡してよい。
134
+ * SoundFont のように整数ゾーンしか持たない発音器は {@link unitsToMidiDetune} を使う。
135
+ */
136
+ declare const unitsToMidi: (u: Units) => number;
137
+ /** units → 周波数(Hz)。 */
138
+ declare const unitsToHz: (u: Units) => number;
139
+ /**
140
+ * units → 「最寄りの整数MIDIノート番号 + セント補正」。
141
+ *
142
+ * SoundFont は音高ごとに整数キーでゾーンを持つため小数ピッチを直接鳴らせない。
143
+ * 最寄りのゾーンを鳴らして残差を `AudioBufferSourceNode.detune` で補正する。
144
+ * 31平均律での残差は最大 ±48.4 セントで、detune の可動域に十分収まる。
145
+ */
146
+ declare const unitsToMidiDetune: (u: Units) => {
147
+ midi: MidiNote;
148
+ detuneCents: number;
149
+ };
150
+ /**
151
+ * 臨時記号1つあたりの格子ステップ数。
152
+ *
153
+ * - `#` / `+`(12平均律) … クロマチック半音上げ
154
+ * - `-` … クロマチック半音下げ
155
+ * - `+`(31平均律) … 格子1ステップ上げ(微分音)
156
+ * - `_` … 格子1ステップ下げ(微分音)
157
+ *
158
+ * 12平均律ではクロマチック半音=1格子ステップなので4記号すべてが従来の意味に潰れ、
159
+ * 既存MMLの解釈は1文字も変わらない。31平均律でのみ `#`/`-`(±2度)と
160
+ * `+`/`_`(±1度)が分岐する。
161
+ */
162
+ declare const chromaticStep: (edo: Edo) => number;
163
+ /** 微分音記号 `+` / `_` 1つあたりの格子ステップ数。常に1。 */
164
+ declare const MICRO_STEP = 1;
165
+ /** 幹音の文字か。 */
166
+ declare const isNaturalLetter: (ch: string) => boolean;
167
+ /** 幹音の文字 → オクターブ内の格子ステップ。未知の文字は null。 */
168
+ declare const naturalStep: (ch: string, edo: Edo) => number | null;
169
+ /**
170
+ * 音名・オクターブ・臨時記号から units を組み立てる。
171
+ *
172
+ * `octave` はMMLの `o` 指定(MIDI慣習で o4 の c が中央ド = MIDI 60)。
173
+ * 臨時記号でオクターブを跨ぐ綴り(`b##` が次オクターブへ、`c--` が前オクターブへ)も
174
+ * そのまま加算されるので、度数を 0〜edo-1 にクランプしてはいけない。
175
+ */
176
+ declare const spellingToUnits: (letter: string, octave: number, chromatic: number, micro: number, edo: Edo) => number | null;
177
+ /**
178
+ * 五度圏インデックス(C=0, G=1, F=-1, C#=7, Db=-5)→ オクターブ内の格子ステップ。
179
+ *
180
+ * ミーントーン系の音律はすべて「五度を何ステップとするか」だけで決まるため、
181
+ * 綴りを持つ音(chord-parser の `rootFifth` / `noteFifths` など)はこの一本で
182
+ * どちらの音律へも正確に写せる。12平均律では C# と Db が同じ値に潰れ、
183
+ * 31平均律では 2 と 3 に分かれる。
184
+ */
185
+ declare const fifthToStep: (fifthIndex: number, edo: Edo) => number;
186
+ /** 五度圏インデックス → オクターブ内の units。 */
187
+ declare const fifthToUnits: (fifthIndex: number, edo: Edo) => number;
188
+ /**
189
+ * ピッチ表現のバージョン。
190
+ *
191
+ * - v1 … `pitch` が半音(MIDIノート番号)。dtm 1.x
192
+ * - v2 … `pitchUnits` が 1/372オクターブ単位。dtm 2.x
193
+ *
194
+ * dtm 自身は通信路を持たず `onNotesPatch` / `applyPatch` のフックを出すだけなので、
195
+ * バージョンの突き合わせは利用側アプリのハンドシェイクの責務になる。変換の知識だけを
196
+ * ここに置く。v1→v2 は無損失だが、**v2→v1 は12平均律の曲でしか成立しない**
197
+ * (31平均律を半音へ丸めると最大48.4セント動く)。
198
+ */
199
+ declare const PITCH_ENCODING_VERSION = 2;
200
+ /** v1(半音)→ v2(units)。無損失。 */
201
+ declare const pitchV1ToUnits: (pitch: number) => Units;
202
+ /** v2(units)→ v1(半音)。12平均律の曲でのみ無損失。 */
203
+ declare const unitsToPitchV1: (u: Units) => number;
204
+
60
205
  /**
61
206
  * コード進行文字列を伴奏トラックのノート配置へ展開する。
62
207
  *
@@ -64,6 +209,7 @@ declare const mountChordPlayer: (target: HTMLElement, chords: string, options?:
64
209
  * 旧 demo/index.html の applyChordProgression を移植・整理し、
65
210
  * 実際のノート追加を行わず配置(placement)の配列を返す純関数にした。
66
211
  */
212
+
67
213
  type ChordPatternType = "block" | "arpeggio" | "arpeggio-fast" | "offbeat" | "yatsume" | "alternating";
68
214
  type ChordPlacement = {
69
215
  startStep: number;
@@ -71,7 +217,7 @@ type ChordPlacement = {
71
217
  * 1/372オクターブ単位。chord-parser が返すのは12平均律の半音なので、
72
218
  * ここへ入れる時点で音律に応じた格子へ写している。
73
219
  */
74
- pitchUnits: number;
220
+ pitchUnits: Units;
75
221
  durationSteps: number;
76
222
  velocity: number;
77
223
  };
@@ -419,7 +565,7 @@ type StreamVoiceNote = {
419
565
  * ピッチ。単位は units(1/372オクターブ)。koe は Hz を受けるので、
420
566
  * ここから直接 Hz へ変換して歌わせる(整数MIDIノートに丸めない)。
421
567
  */
422
- pitch: number;
568
+ pitch: Units;
423
569
  /** アンカー(再生開始時刻)からの相対秒。実発音時刻 = anchorTime + startSec。 */
424
570
  startSec: number;
425
571
  /** ゲート適用済みの発音長(秒)。 */
@@ -681,7 +827,7 @@ type Note = {
681
827
  * 12平均律の1半音 = 31、31平均律の1度 = 12。MIDIノート番号ではないので注意。
682
828
  * dtm 1.x の `pitch`(半音)から意味が変わっている。
683
829
  */
684
- pitchUnits: number;
830
+ pitchUnits: Units;
685
831
  velocity?: number;
686
832
  };
687
833
  type RenderConfig = {
@@ -736,7 +882,7 @@ type LyricSyncData = {
736
882
  type NoteData = {
737
883
  startStep: number;
738
884
  /** 1/372オクターブ単位。{@link Note.pitchUnits} と同じ。 */
739
- pitchUnits: number;
885
+ pitchUnits: Units;
740
886
  durationSteps: number;
741
887
  velocity?: number;
742
888
  };
@@ -744,7 +890,7 @@ type NoteData = {
744
890
  type NoteRemove = {
745
891
  startStep: number;
746
892
  /** 1/372オクターブ単位。{@link Note.pitchUnits} と同じ。 */
747
- pitchUnits: number;
893
+ pitchUnits: Units;
748
894
  };
749
895
  type PianoRollOptions = {
750
896
  mountTarget: HTMLElement;
@@ -790,7 +936,7 @@ type PlayNoteEvent = {
790
936
  * `unitsToMidiDetune` を使う。{@link PlayDrumEvent.pitch} はGM打楽器のキー番号で
791
937
  * 音高ではないため、こちらとは別物。
792
938
  */
793
- pitchUnits: number;
939
+ pitchUnits: Units;
794
940
  /** 元ノートのvelocity (0-127) */
795
941
  velocity: number;
796
942
  /** トラックvolume×velocityを反映した 0-1 程度の音量係数 */
@@ -1250,7 +1396,7 @@ type DawInstance = {
1250
1396
  * 画面外の場合は onScreen=false と方角 side を返す。
1251
1397
  * 協力DAWでのカーソル表示に使う。
1252
1398
  */
1253
- noteToCanvas: (step: number, pitch: number) => {
1399
+ noteToCanvas: (step: number, pitch: Units) => {
1254
1400
  x: number;
1255
1401
  y: number;
1256
1402
  onScreen: boolean;
@@ -1404,7 +1550,8 @@ declare const playPlacements: (placements: Array<{
1404
1550
  trackIndex: number;
1405
1551
  startStep: number;
1406
1552
  durationSteps: number;
1407
- pitchUnits: number;
1553
+ /** ピッチ。単位は units(1/372オクターブ)。 */
1554
+ pitchUnits: Units;
1408
1555
  velocity: number;
1409
1556
  }>, options: PlayPlacementsOptions) => MmlPlayback;
1410
1557
  /**
@@ -1415,7 +1562,7 @@ declare const playMML: (mml: string, options?: PlayMmlOptions) => MmlPlayback;
1415
1562
  type PlayNoteOptions = {
1416
1563
  audioContext?: AudioContext;
1417
1564
  destination?: AudioNode;
1418
- pitchUnits: number;
1565
+ pitchUnits: Units;
1419
1566
  volume?: number;
1420
1567
  duration?: number;
1421
1568
  };
@@ -1574,10 +1721,10 @@ declare class MMLCore {
1574
1721
  * @param pitch ピッチ番号
1575
1722
  * @param options ノート長などの設定
1576
1723
  */
1577
- addNote(step: number, pitch: number, options: AddNoteOptions): void;
1724
+ addNote(step: number, pitch: Units, options: AddNoteOptions): void;
1578
1725
  deleteNoteById(noteId: number): void;
1579
1726
  private getMaxStep;
1580
- moveNote(noteId: number, startStep: number, pitch: number): void;
1727
+ moveNote(noteId: number, startStep: number, pitch: Units): void;
1581
1728
  moveNoteEnd(_: number): void;
1582
1729
  resizeNote(noteId: number, durationSteps: number): void;
1583
1730
  resizeNoteEnd(_: number): void;
@@ -1875,7 +2022,7 @@ type MMLNotePlacement = {
1875
2022
  trackIndex: number;
1876
2023
  startStep: number;
1877
2024
  /** 1/372オクターブ単位({@link Note.pitchUnits} と同じ)。 */
1878
- pitchUnits: number;
2025
+ pitchUnits: Units;
1879
2026
  durationSteps: number;
1880
2027
  /** v コマンドで指定されたベロシティ(0-127、既定100) */
1881
2028
  velocity: number;
@@ -2069,11 +2216,12 @@ type Renderer = {
2069
2216
  getXY: (e: MouseEvent | PointerEvent) => [number, number, number];
2070
2217
  getGridPosition: (e: MouseEvent | PointerEvent) => {
2071
2218
  step: number;
2072
- pitch: number;
2219
+ /** ピッチ。単位は units(1/372オクターブ)。 */
2220
+ pitch: Units;
2073
2221
  x: number;
2074
2222
  y: number;
2075
2223
  };
2076
- onClick: (callback: (step: number, pitch: number) => void) => void;
2224
+ onClick: (callback: (step: number, pitch: Units) => void) => void;
2077
2225
  setDrawOffset: (x: number, y: number) => void;
2078
2226
  /** Canvasをマウント先から取り外す。 */
2079
2227
  destroy: () => void;
@@ -2397,7 +2545,7 @@ type DtmStudio = {
2397
2545
  /** SoundFontを用いた単音再生を行う */
2398
2546
  playNote: (options: {
2399
2547
  /** ピッチ。単位は units(1/372オクターブ)。`pitchV1ToUnits` でMIDI番号から変換できる。 */
2400
- pitchUnits: number;
2548
+ pitchUnits: Units;
2401
2549
  volume?: number;
2402
2550
  duration?: number;
2403
2551
  instrument?: string;
@@ -2493,7 +2641,7 @@ declare const showLoadingOverlay: (container: HTMLElement, options?: {
2493
2641
  * ピッチ(units) → 周波数(Hz)。A4 = 2139 units = 440Hz 基準。
2494
2642
  * 単位は 1/372オクターブの整数(`tuning.ts` 参照)。12平均律・31平均律とも同じ式で鳴る。
2495
2643
  */
2496
- declare const freqFromPitch: (pitchUnits: number) => number;
2644
+ declare const freqFromPitch: (pitchUnits: Units) => number;
2497
2645
  type Synth = {
2498
2646
  /** メロディックノートを発音する(PlayNoteEvent.when は ctx.currentTime からの相対秒) */
2499
2647
  playNote: (e: PlayNoteEvent) => void;
@@ -2519,122 +2667,6 @@ type SynthTone = {
2519
2667
  */
2520
2668
  declare const createSynth: (ctx: AudioContext, destination?: AudioNode, tone?: SynthTone) => Synth;
2521
2669
 
2522
- /**
2523
- * 音律(12平均律 / 31平均律)と、ピッチの内部表現。
2524
- *
2525
- * ## 単位
2526
- *
2527
- * ノートのピッチは **1/372オクターブの整数** で持つ。372 = 12 × 31 で、12と31は
2528
- * 互いに素なので最小公倍数がこれになり、**12平均律と31平均律の両方が誤差ゼロで
2529
- * 同じ数直線に乗る**。
2530
- *
2531
- * 12平均律 1半音 = 31 units
2532
- * 31平均律 1度 = 12 units
2533
- * 1 unit = 1200/372 ≒ 3.2258 セント
2534
- *
2535
- * 整数のままなので `a.pitchUnits === b.pitchUnits` の同値判定が全部生き残る
2536
- * (重複判定・当たり判定・協調編集の (startStep, pitchUnits) キー)。小数にすると
2537
- * ここが軒並み壊れるため、細かい整数単位を選んでいる。
2538
- *
2539
- * ## 音律は音声経路に入らない
2540
- *
2541
- * ピッチが絶対値なので、シーケンサも発音器も音律を知らなくてよい。音律は
2542
- * 「格子・記譜・表示」だけに効く編集上の概念で、`RenderConfig.edo` に置く。
2543
- */
2544
- /** 1オクターブあたりの units。12 × 31。 */
2545
- declare const UNITS_PER_OCTAVE = 372;
2546
- /** 12平均律の1半音あたりの units。 */
2547
- declare const UNITS_PER_SEMITONE: number;
2548
- /** 31平均律の1度あたりの units。 */
2549
- declare const UNITS_PER_EDO31_DEGREE: number;
2550
- /** 1 unit のセント値。 */
2551
- declare const CENTS_PER_UNIT: number;
2552
- /** A4 (MIDI 69) の units。周波数計算の基準。 */
2553
- declare const A4_UNITS: number;
2554
- /** A4 の周波数(Hz)。 */
2555
- declare const A4_HZ = 440;
2556
- /** 対応する音律(1オクターブの分割数)。 */
2557
- type Edo = 12 | 31;
2558
- /** 既定の音律。宣言のない曲はすべてこれ(=既存データは素通り)。 */
2559
- declare const DEFAULT_EDO: Edo;
2560
- /** その音律の1格子ステップが何 units か。 */
2561
- declare const unitsPerStep: (edo: Edo) => number;
2562
- /** MIDIノート番号 → units。 */
2563
- declare const midiToUnits: (midi: number) => number;
2564
- /**
2565
- * units → MIDIノート番号(小数)。
2566
- * 歌声合成(koe)は Hz を受けるためこの小数値をそのまま渡してよい。
2567
- * SoundFont のように整数ゾーンしか持たない発音器は {@link unitsToMidiDetune} を使う。
2568
- */
2569
- declare const unitsToMidi: (units: number) => number;
2570
- /** units → 周波数(Hz)。 */
2571
- declare const unitsToHz: (units: number) => number;
2572
- /**
2573
- * units → 「最寄りの整数MIDIノート番号 + セント補正」。
2574
- *
2575
- * SoundFont は音高ごとに整数キーでゾーンを持つため小数ピッチを直接鳴らせない。
2576
- * 最寄りのゾーンを鳴らして残差を `AudioBufferSourceNode.detune` で補正する。
2577
- * 31平均律での残差は最大 ±48.4 セントで、detune の可動域に十分収まる。
2578
- */
2579
- declare const unitsToMidiDetune: (units: number) => {
2580
- midi: number;
2581
- detuneCents: number;
2582
- };
2583
- /**
2584
- * 臨時記号1つあたりの格子ステップ数。
2585
- *
2586
- * - `#` / `+`(12平均律) … クロマチック半音上げ
2587
- * - `-` … クロマチック半音下げ
2588
- * - `+`(31平均律) … 格子1ステップ上げ(微分音)
2589
- * - `_` … 格子1ステップ下げ(微分音)
2590
- *
2591
- * 12平均律ではクロマチック半音=1格子ステップなので4記号すべてが従来の意味に潰れ、
2592
- * 既存MMLの解釈は1文字も変わらない。31平均律でのみ `#`/`-`(±2度)と
2593
- * `+`/`_`(±1度)が分岐する。
2594
- */
2595
- declare const chromaticStep: (edo: Edo) => number;
2596
- /** 微分音記号 `+` / `_` 1つあたりの格子ステップ数。常に1。 */
2597
- declare const MICRO_STEP = 1;
2598
- /** 幹音の文字か。 */
2599
- declare const isNaturalLetter: (ch: string) => boolean;
2600
- /** 幹音の文字 → オクターブ内の格子ステップ。未知の文字は null。 */
2601
- declare const naturalStep: (ch: string, edo: Edo) => number | null;
2602
- /**
2603
- * 音名・オクターブ・臨時記号から units を組み立てる。
2604
- *
2605
- * `octave` はMMLの `o` 指定(MIDI慣習で o4 の c が中央ド = MIDI 60)。
2606
- * 臨時記号でオクターブを跨ぐ綴り(`b##` が次オクターブへ、`c--` が前オクターブへ)も
2607
- * そのまま加算されるので、度数を 0〜edo-1 にクランプしてはいけない。
2608
- */
2609
- declare const spellingToUnits: (letter: string, octave: number, chromatic: number, micro: number, edo: Edo) => number | null;
2610
- /**
2611
- * 五度圏インデックス(C=0, G=1, F=-1, C#=7, Db=-5)→ オクターブ内の格子ステップ。
2612
- *
2613
- * ミーントーン系の音律はすべて「五度を何ステップとするか」だけで決まるため、
2614
- * 綴りを持つ音(chord-parser の `rootFifth` / `noteFifths` など)はこの一本で
2615
- * どちらの音律へも正確に写せる。12平均律では C# と Db が同じ値に潰れ、
2616
- * 31平均律では 2 と 3 に分かれる。
2617
- */
2618
- declare const fifthToStep: (fifthIndex: number, edo: Edo) => number;
2619
- /** 五度圏インデックス → オクターブ内の units。 */
2620
- declare const fifthToUnits: (fifthIndex: number, edo: Edo) => number;
2621
- /**
2622
- * ピッチ表現のバージョン。
2623
- *
2624
- * - v1 … `pitch` が半音(MIDIノート番号)。dtm 1.x
2625
- * - v2 … `pitchUnits` が 1/372オクターブ単位。dtm 2.x
2626
- *
2627
- * dtm 自身は通信路を持たず `onNotesPatch` / `applyPatch` のフックを出すだけなので、
2628
- * バージョンの突き合わせは利用側アプリのハンドシェイクの責務になる。変換の知識だけを
2629
- * ここに置く。v1→v2 は無損失だが、**v2→v1 は12平均律の曲でしか成立しない**
2630
- * (31平均律を半音へ丸めると最大48.4セント動く)。
2631
- */
2632
- declare const PITCH_ENCODING_VERSION = 2;
2633
- /** v1(半音)→ v2(units)。無損失。 */
2634
- declare const pitchV1ToUnits: (pitch: number) => number;
2635
- /** v2(units)→ v1(半音)。12平均律の曲でのみ無損失。 */
2636
- declare const unitsToPitchV1: (units: number) => number;
2637
-
2638
2670
  declare const VOICE_IMAGES: Record<string, string>;
2639
2671
 
2640
2672
  /**
@@ -2650,4 +2682,4 @@ declare const encodeWavPCM16: (channels: Float32Array[], sampleRate: number) =>
2650
2682
  /** Float32Array のチャンクを1本へ連結する。 */
2651
2683
  declare const concatFloat32: (chunks: Float32Array[]) => Float32Array;
2652
2684
 
2653
- export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, CENTS_PER_UNIT, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, type FadeScheduleParams, GM_INSTRUMENT_NAMES, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyncData, type LyricTrack, type LyricsConductor, MAX_VOCAL_VOLUME, MICRO_STEP, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MidiExtraction, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchToken, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, type RenderConfig, type Renderer, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceTrack, type Synth, TRACKS_ADVANCED, TRACKS_SIMPLE, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, chromaticStep, collectPitchTokens, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, resolveDrumPattern, resolveLoopPoint, shiftNotes, showLoadingOverlay, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, transposeNotes, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain };
2685
+ export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, CENTS_PER_UNIT, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, type FadeScheduleParams, GM_INSTRUMENT_NAMES, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyncData, type LyricTrack, type LyricsConductor, MAX_VOCAL_VOLUME, MICRO_STEP, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MidiExtraction, type MidiNote, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchToken, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, type RenderConfig, type Renderer, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceTrack, type Synth, TRACKS_ADVANCED, TRACKS_SIMPLE, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, type Units, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, addUnits, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, chromaticStep, collectPitchTokens, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiNote, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, resolveDrumPattern, resolveLoopPoint, shiftNotes, showLoadingOverlay, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, transposeNotes, units, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain };