@webmusic/kernel 0.2.0 → 0.4.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.
Files changed (188) hide show
  1. package/LICENSE +202 -21
  2. package/NOTICE +2 -0
  3. package/README.md +103 -64
  4. package/dist/audio-context.cjs.map +1 -1
  5. package/dist/build-receipt.json +3 -3
  6. package/dist/chunk-27LH6QLZ.cjs +277 -0
  7. package/dist/chunk-27LH6QLZ.cjs.map +1 -0
  8. package/dist/chunk-3INDOVUC.cjs.map +1 -1
  9. package/dist/chunk-3RR2VIKA.js +393 -0
  10. package/dist/chunk-3RR2VIKA.js.map +1 -0
  11. package/dist/chunk-3YTKIKKX.cjs +378 -0
  12. package/dist/chunk-3YTKIKKX.cjs.map +1 -0
  13. package/dist/chunk-4RG4WQKC.js +360 -0
  14. package/dist/chunk-4RG4WQKC.js.map +1 -0
  15. package/dist/chunk-5AHVQXTF.cjs +620 -0
  16. package/dist/chunk-5AHVQXTF.cjs.map +1 -0
  17. package/dist/chunk-624KWJWZ.js +170 -0
  18. package/dist/chunk-624KWJWZ.js.map +1 -0
  19. package/dist/chunk-6HGFEKD3.cjs +851 -0
  20. package/dist/chunk-6HGFEKD3.cjs.map +1 -0
  21. package/dist/chunk-7ZTZZ5PN.cjs.map +1 -1
  22. package/dist/chunk-ALWV4P7D.js +726 -0
  23. package/dist/chunk-ALWV4P7D.js.map +1 -0
  24. package/dist/chunk-BADJJ6DV.cjs +143 -0
  25. package/dist/chunk-BADJJ6DV.cjs.map +1 -0
  26. package/dist/chunk-C3LMS36L.cjs +393 -0
  27. package/dist/chunk-C3LMS36L.cjs.map +1 -0
  28. package/dist/chunk-C3YWUZW3.cjs.map +1 -1
  29. package/dist/chunk-CR6OUWBJ.cjs +726 -0
  30. package/dist/chunk-CR6OUWBJ.cjs.map +1 -0
  31. package/dist/chunk-CYWDZLWC.js +2141 -0
  32. package/dist/chunk-CYWDZLWC.js.map +1 -0
  33. package/dist/chunk-DDOGX2D5.js +378 -0
  34. package/dist/chunk-DDOGX2D5.js.map +1 -0
  35. package/dist/chunk-DVN6E5U3.js +620 -0
  36. package/dist/chunk-DVN6E5U3.js.map +1 -0
  37. package/dist/chunk-EURMRU2S.js +208 -0
  38. package/dist/chunk-EURMRU2S.js.map +1 -0
  39. package/dist/chunk-EXDCK2VL.cjs +20 -0
  40. package/dist/chunk-EXDCK2VL.cjs.map +1 -0
  41. package/dist/chunk-G5EIUP52.js +114 -0
  42. package/dist/chunk-G5EIUP52.js.map +1 -0
  43. package/dist/chunk-GB4DGKLZ.js +143 -0
  44. package/dist/chunk-GB4DGKLZ.js.map +1 -0
  45. package/dist/chunk-GPOEAYOW.js +2147 -0
  46. package/dist/chunk-GPOEAYOW.js.map +1 -0
  47. package/dist/chunk-I4YMA5VM.cjs +120 -0
  48. package/dist/chunk-I4YMA5VM.cjs.map +1 -0
  49. package/dist/chunk-IVWHMDCB.cjs +4383 -0
  50. package/dist/chunk-IVWHMDCB.cjs.map +1 -0
  51. package/dist/chunk-JFCBJMA7.cjs +2147 -0
  52. package/dist/chunk-JFCBJMA7.cjs.map +1 -0
  53. package/dist/chunk-JLVSAZ3K.cjs +813 -0
  54. package/dist/chunk-JLVSAZ3K.cjs.map +1 -0
  55. package/dist/chunk-K7FYH6UG.cjs +208 -0
  56. package/dist/chunk-K7FYH6UG.cjs.map +1 -0
  57. package/dist/chunk-L4MYCETM.cjs +970 -0
  58. package/dist/chunk-L4MYCETM.cjs.map +1 -0
  59. package/dist/chunk-MNCMYNYL.js +970 -0
  60. package/dist/chunk-MNCMYNYL.js.map +1 -0
  61. package/dist/chunk-NT2BZ3QM.js +120 -0
  62. package/dist/chunk-NT2BZ3QM.js.map +1 -0
  63. package/dist/chunk-O7SA5GLC.js +277 -0
  64. package/dist/chunk-O7SA5GLC.js.map +1 -0
  65. package/dist/chunk-OCKAHITL.cjs +548 -0
  66. package/dist/chunk-OCKAHITL.cjs.map +1 -0
  67. package/dist/chunk-OTXYWCLA.js +206 -0
  68. package/dist/chunk-OTXYWCLA.js.map +1 -0
  69. package/dist/chunk-P6ZA63J7.js +548 -0
  70. package/dist/chunk-P6ZA63J7.js.map +1 -0
  71. package/dist/chunk-QLF3BOST.js +20 -0
  72. package/dist/chunk-QLF3BOST.js.map +1 -0
  73. package/dist/chunk-RCWFRZDR.js +4383 -0
  74. package/dist/chunk-RCWFRZDR.js.map +1 -0
  75. package/dist/chunk-RZBLPM3L.cjs +206 -0
  76. package/dist/chunk-RZBLPM3L.cjs.map +1 -0
  77. package/dist/chunk-TA3TNJZU.cjs +360 -0
  78. package/dist/chunk-TA3TNJZU.cjs.map +1 -0
  79. package/dist/chunk-TZSRPTQL.cjs +2141 -0
  80. package/dist/chunk-TZSRPTQL.cjs.map +1 -0
  81. package/dist/chunk-UMTPJ76S.cjs.map +1 -1
  82. package/dist/chunk-UY77FXDW.js +813 -0
  83. package/dist/chunk-UY77FXDW.js.map +1 -0
  84. package/dist/chunk-VFU3S7OC.js +851 -0
  85. package/dist/chunk-VFU3S7OC.js.map +1 -0
  86. package/dist/chunk-VY6WWZSW.cjs.map +1 -1
  87. package/dist/chunk-WN5DZOVT.cjs +170 -0
  88. package/dist/chunk-WN5DZOVT.cjs.map +1 -0
  89. package/dist/chunk-WOPW6WLR.cjs.map +1 -1
  90. package/dist/chunk-XBSIYUHM.cjs +114 -0
  91. package/dist/chunk-XBSIYUHM.cjs.map +1 -0
  92. package/dist/chunk-ZMU72HJS.cjs.map +1 -1
  93. package/dist/context-DSa0ymyN.d.cts +664 -0
  94. package/dist/context-DaxfAg3b.d.ts +664 -0
  95. package/dist/effect-chain-Cu03O5Y0.d.ts +91 -0
  96. package/dist/effect-chain-Do75T7uK.d.cts +91 -0
  97. package/dist/effect.cjs +16 -1
  98. package/dist/effect.cjs.map +1 -1
  99. package/dist/effect.d.cts +56 -14
  100. package/dist/effect.d.ts +56 -14
  101. package/dist/effect.js +16 -1
  102. package/dist/elements.cjs +37 -2
  103. package/dist/elements.cjs.map +1 -1
  104. package/dist/elements.d.cts +197 -8
  105. package/dist/elements.d.ts +197 -8
  106. package/dist/elements.js +36 -1
  107. package/dist/events.cjs.map +1 -1
  108. package/dist/index.cjs +555 -8
  109. package/dist/index.cjs.map +1 -1
  110. package/dist/index.d.cts +16 -4
  111. package/dist/index.d.ts +16 -4
  112. package/dist/index.js +566 -19
  113. package/dist/message.cjs +104 -0
  114. package/dist/message.cjs.map +1 -0
  115. package/dist/message.d.cts +738 -0
  116. package/dist/message.d.ts +738 -0
  117. package/dist/message.js +104 -0
  118. package/dist/meter.cjs.map +1 -1
  119. package/dist/module-control-C25BMtH7.d.ts +61 -0
  120. package/dist/module-control-yH6nTJM9.d.cts +61 -0
  121. package/dist/module-plugin-BnPmq1VP.d.ts +198 -0
  122. package/dist/module-plugin-CHb-5W0Y.d.cts +198 -0
  123. package/dist/module.cjs +263 -0
  124. package/dist/module.cjs.map +1 -0
  125. package/dist/module.d.cts +1112 -0
  126. package/dist/module.d.ts +1112 -0
  127. package/dist/module.js +263 -0
  128. package/dist/parameter-DwQzFmBR.d.cts +172 -0
  129. package/dist/parameter-DwQzFmBR.d.ts +172 -0
  130. package/dist/player.cjs.map +1 -1
  131. package/dist/processor-worklet.cjs +18 -0
  132. package/dist/processor-worklet.cjs.map +1 -0
  133. package/dist/processor-worklet.d.cts +166 -0
  134. package/dist/processor-worklet.d.ts +166 -0
  135. package/dist/processor-worklet.js +18 -0
  136. package/dist/processor-worklet.js.map +1 -0
  137. package/dist/processor.cjs +51 -0
  138. package/dist/processor.cjs.map +1 -0
  139. package/dist/processor.d.cts +397 -0
  140. package/dist/processor.d.ts +397 -0
  141. package/dist/processor.js +51 -0
  142. package/dist/processor.js.map +1 -0
  143. package/dist/project-types-BU4awMnL.d.ts +323 -0
  144. package/dist/project-types-DufCV8Ma.d.cts +323 -0
  145. package/dist/ring-C-i9N90a.d.cts +139 -0
  146. package/dist/ring-DkcMt2Eg.d.ts +139 -0
  147. package/dist/sequence.cjs +68 -0
  148. package/dist/sequence.cjs.map +1 -0
  149. package/dist/sequence.d.cts +303 -0
  150. package/dist/sequence.d.ts +303 -0
  151. package/dist/sequence.js +68 -0
  152. package/dist/sequence.js.map +1 -0
  153. package/dist/session.cjs +16 -0
  154. package/dist/session.cjs.map +1 -0
  155. package/dist/session.d.cts +407 -0
  156. package/dist/session.d.ts +407 -0
  157. package/dist/session.js +16 -0
  158. package/dist/session.js.map +1 -0
  159. package/dist/tick.cjs.map +1 -1
  160. package/dist/transport.cjs +50 -2
  161. package/dist/transport.cjs.map +1 -1
  162. package/dist/transport.d.cts +145 -1
  163. package/dist/transport.d.ts +145 -1
  164. package/dist/transport.js +51 -3
  165. package/dist/worker.cjs.map +1 -1
  166. package/package.json +61 -10
  167. package/dist/chunk-53YD73OY.js +0 -162
  168. package/dist/chunk-53YD73OY.js.map +0 -1
  169. package/dist/chunk-54JYWB5X.cjs +0 -1051
  170. package/dist/chunk-54JYWB5X.cjs.map +0 -1
  171. package/dist/chunk-BR63OD53.cjs +0 -1
  172. package/dist/chunk-BR63OD53.cjs.map +0 -1
  173. package/dist/chunk-ON64FRCF.js +0 -1051
  174. package/dist/chunk-ON64FRCF.js.map +0 -1
  175. package/dist/chunk-SM5YPDDI.cjs +0 -162
  176. package/dist/chunk-SM5YPDDI.cjs.map +0 -1
  177. package/dist/chunk-TEM2I2NN.js +0 -1
  178. package/dist/chunk-VVZX7DQ6.cjs +0 -254
  179. package/dist/chunk-VVZX7DQ6.cjs.map +0 -1
  180. package/dist/chunk-WNFGDB7B.js +0 -254
  181. package/dist/chunk-WNFGDB7B.js.map +0 -1
  182. package/dist/sync.cjs +0 -12
  183. package/dist/sync.cjs.map +0 -1
  184. package/dist/sync.d.cts +0 -307
  185. package/dist/sync.d.ts +0 -307
  186. package/dist/sync.js +0 -12
  187. /package/dist/{chunk-TEM2I2NN.js.map → message.js.map} +0 -0
  188. /package/dist/{sync.js.map → module.js.map} +0 -0
@@ -110,5 +110,149 @@ interface TimelineMapping {
110
110
  positionToSeconds(position: number): number;
111
111
  secondsToPosition(seconds: number): number;
112
112
  }
113
+ /** Upper bound on a grid tempo; beyond it beat lines are denser than any musical use. */
114
+ declare const MAX_TEMPO_GRID_BPM = 1000;
115
+ /** Upper bound on beats per bar. */
116
+ declare const MAX_TEMPO_GRID_BEATS_PER_BAR = 64;
117
+ /**
118
+ * A constant-tempo beat grid on a transport position axis (typically
119
+ * seconds). `anchor` is the position of one downbeat; every other beat lies a
120
+ * whole number of beat lengths away, extending in both directions without
121
+ * end. Immutable once created through {@link createTempoGrid}.
122
+ */
123
+ interface TempoGrid {
124
+ /** Beats per minute of the position axis; finite, > 0 and ≤ {@link MAX_TEMPO_GRID_BPM}. */
125
+ readonly bpm: number;
126
+ /** Position of a downbeat (bar start), on the transport axis. */
127
+ readonly anchor: number;
128
+ /** Beats in one bar; an integer from 1 to {@link MAX_TEMPO_GRID_BEATS_PER_BAR}. */
129
+ readonly beatsPerBar: number;
130
+ }
131
+ interface TempoGridInit {
132
+ readonly bpm: number;
133
+ readonly anchor?: number;
134
+ readonly beatsPerBar?: number;
135
+ }
136
+ /** Where a position falls on a {@link TempoGrid}. */
137
+ interface TempoGridPosition {
138
+ /** Continuous beat index from the anchor; negative before it. */
139
+ readonly beat: number;
140
+ /** Bar index from the anchor's bar (0); negative before it. */
141
+ readonly bar: number;
142
+ /** Beat inside the bar, 0 … beatsPerBar − 1. */
143
+ readonly beatInBar: number;
144
+ /** Fraction of the current beat already elapsed, in [0, 1). */
145
+ readonly phase: number;
146
+ }
147
+ /** Validate and freeze a grid. Throws RangeError for an invalid tempo, anchor or meter. */
148
+ declare function createTempoGrid(init: TempoGridInit): TempoGrid;
149
+ /** Length of one beat on the grid's position axis (60 / bpm for a seconds axis). */
150
+ declare function tempoGridBeatLength(grid: TempoGrid): number;
151
+ /** Beat, bar and phase at a position. */
152
+ declare function tempoGridPosition(grid: TempoGrid, position: number): TempoGridPosition;
153
+ /** Position of a (possibly fractional) beat index. */
154
+ declare function tempoGridBeatPosition(grid: TempoGrid, beat: number): number;
155
+ interface TempoGridSnapOptions {
156
+ /** Grid lines per beat: 1 beats, 2 eighths in 4/4, 0.25 one line per 4 beats. Default 1. */
157
+ readonly division?: number;
158
+ /** `nearest` (default), `forward` (at or after) or `backward` (at or before). */
159
+ readonly direction?: 'nearest' | 'forward' | 'backward';
160
+ }
161
+ /** The grid line nearest a position, or the next/previous one. */
162
+ declare function snapToTempoGrid(grid: TempoGrid, position: number, options?: TempoGridSnapOptions): number;
163
+ /**
164
+ * Quantized jump: the position near `to` that keeps the beat phase of
165
+ * `from`, so a running transport lands on the beat as it would have played
166
+ * there (the DJ "quantize" behavior). `to` is rounded to its nearest beat
167
+ * first; the phase of `from` is then added.
168
+ */
169
+ declare function tempoGridJump(grid: TempoGrid, from: number, to: number): number;
170
+ /** Positions of the grid lines inside [start, end], with their beat index. */
171
+ declare function tempoGridLines(grid: TempoGrid, start: number, end: number, division?: number): readonly {
172
+ readonly position: number;
173
+ readonly beat: number;
174
+ readonly downbeat: boolean;
175
+ }[];
176
+ /** The grid as a {@link TimelineMapping} between beats and its position axis. */
177
+ declare function tempoGridMapping(grid: TempoGrid): TimelineMapping;
178
+ /**
179
+ * Tempo from tap times (any monotonic seconds, such as `performance.now() / 1000`):
180
+ * the median interval of the most recent run of taps, where a gap longer than
181
+ * `resetSeconds` starts a new run. Undefined until a run has two taps.
182
+ */
183
+ declare function tapTempo(times: readonly number[], resetSeconds?: number): number | undefined;
184
+ /**
185
+ * Beats read from a transport clock: a {@link TransportClockReader} paired
186
+ * with a {@link TempoGrid} on the same position axis. Read-only — it never
187
+ * re-anchors the clock — and immutable; pair the clock with a new grid
188
+ * through {@link withGrid}. All reference times are the clock's.
189
+ */
190
+ declare class TempoClock {
191
+ readonly clock: TransportClockReader;
192
+ readonly grid: TempoGrid;
193
+ constructor(clock: TransportClockReader, grid: TempoGrid);
194
+ /** Same clock, another grid. */
195
+ withGrid(grid: TempoGrid): TempoClock;
196
+ /** Beat, bar and phase at reference time `t`. */
197
+ positionAt(t: number): TempoGridPosition;
198
+ /** Continuous beat index at reference time `t`. */
199
+ beatAt(t: number): number;
200
+ /** Tempo heard at the current rate: grid bpm × clock rate. */
201
+ get effectiveBpm(): number;
202
+ /**
203
+ * Reference time of the next grid line strictly after `t` (`division`
204
+ * lines per beat) — the instant to schedule a quantized action. Throws
205
+ * RangeError while the clock is paused, like {@link TransportClock.timeAt}.
206
+ */
207
+ nextGridTime(t: number, division?: number): number;
208
+ /** Reference time at which a beat index plays. Throws RangeError while paused. */
209
+ timeAtBeat(beat: number): number;
210
+ }
211
+ /** Ticks in one quarter note, as in Max. */
212
+ declare const TICKS_PER_QUARTER = 480;
213
+ interface MusicalTempo {
214
+ /** Quarter notes per minute; finite and > 0. */
215
+ readonly bpm: number;
216
+ /** Beats in a bar (time-signature numerator). */
217
+ readonly beatsPerBar: number;
218
+ /** The note value of one beat (time-signature denominator): 2, 4, 8 or 16. */
219
+ readonly beatUnit: number;
220
+ }
221
+ /** A position as bars, beats and ticks, all counted from 1 except ticks (from 0). */
222
+ interface BarsBeatsTicks {
223
+ readonly bar: number;
224
+ readonly beat: number;
225
+ readonly tick: number;
226
+ }
227
+ declare const DEFAULT_MUSICAL_TEMPO: MusicalTempo;
228
+ /** Validate and freeze a tempo. */
229
+ declare function createMusicalTempo(init?: Partial<MusicalTempo>): MusicalTempo;
230
+ /** Seconds per tick at a tempo. */
231
+ declare const tickSeconds: (tempo: MusicalTempo) => number;
232
+ /** Ticks in one beat of the meter. */
233
+ declare const ticksPerBeat: (tempo: MusicalTempo) => number;
234
+ /** Ticks in one bar. */
235
+ declare const ticksPerBar: (tempo: MusicalTempo) => number;
236
+ /**
237
+ * The length in ticks of a time value: a note value (`1n`, `4n`, `8nd`
238
+ * dotted, `16nt` triplet), `bars.beats.ticks` as a length (`1.0.0` is one
239
+ * bar), or `480 ticks`. Undefined for a value that is not musical (`250ms`,
240
+ * `2hz`, a plain number of milliseconds).
241
+ */
242
+ declare function timeValueTicks(text: string, tempo?: MusicalTempo): number | undefined;
243
+ /**
244
+ * The length in seconds of a time value at `tempo`: any musical value of
245
+ * {@link timeValueTicks}, or `250ms`, `0.5s`, `2hz` (one period) or a plain
246
+ * number of milliseconds.
247
+ */
248
+ declare function timeValueSeconds(text: string, tempo?: MusicalTempo): number;
249
+ /** Bars, beats and ticks at `seconds` from `anchor` (where bar 1 beat 1 begins). */
250
+ declare function barsBeatsTicksAt(seconds: number, tempo: MusicalTempo, anchor?: number): BarsBeatsTicks;
251
+ /** Seconds at a bars:beats:ticks position. */
252
+ declare function secondsAtBarsBeatsTicks(position: BarsBeatsTicks, tempo: MusicalTempo, anchor?: number): number;
253
+ /** `bar.beat.tick`, as Max shows a transport position. */
254
+ declare function formatBarsBeatsTicks(position: BarsBeatsTicks): string;
255
+ /** The next multiple of `interval` seconds at or after `position`, measured from `anchor`. */
256
+ declare function nextGridTime(position: number, interval: number, anchor?: number): number;
113
257
 
114
- export { type TimelineMapping, TransportClock, type TransportClockReader, type TransportClockState };
258
+ export { type BarsBeatsTicks, DEFAULT_MUSICAL_TEMPO, MAX_TEMPO_GRID_BEATS_PER_BAR, MAX_TEMPO_GRID_BPM, type MusicalTempo, TICKS_PER_QUARTER, TempoClock, type TempoGrid, type TempoGridInit, type TempoGridPosition, type TempoGridSnapOptions, type TimelineMapping, TransportClock, type TransportClockReader, type TransportClockState, barsBeatsTicksAt, createMusicalTempo, createTempoGrid, formatBarsBeatsTicks, nextGridTime, secondsAtBarsBeatsTicks, snapToTempoGrid, tapTempo, tempoGridBeatLength, tempoGridBeatPosition, tempoGridJump, tempoGridLines, tempoGridMapping, tempoGridPosition, tickSeconds, ticksPerBar, ticksPerBeat, timeValueSeconds, timeValueTicks };
package/dist/transport.js CHANGED
@@ -1,8 +1,56 @@
1
1
  import {
2
- TransportClock
3
- } from "./chunk-53YD73OY.js";
2
+ DEFAULT_MUSICAL_TEMPO,
3
+ MAX_TEMPO_GRID_BEATS_PER_BAR,
4
+ MAX_TEMPO_GRID_BPM,
5
+ TICKS_PER_QUARTER,
6
+ TempoClock,
7
+ TransportClock,
8
+ barsBeatsTicksAt,
9
+ createMusicalTempo,
10
+ createTempoGrid,
11
+ formatBarsBeatsTicks,
12
+ nextGridTime,
13
+ secondsAtBarsBeatsTicks,
14
+ snapToTempoGrid,
15
+ tapTempo,
16
+ tempoGridBeatLength,
17
+ tempoGridBeatPosition,
18
+ tempoGridJump,
19
+ tempoGridLines,
20
+ tempoGridMapping,
21
+ tempoGridPosition,
22
+ tickSeconds,
23
+ ticksPerBar,
24
+ ticksPerBeat,
25
+ timeValueSeconds,
26
+ timeValueTicks
27
+ } from "./chunk-4RG4WQKC.js";
4
28
  import "./chunk-PXG64RU4.js";
5
29
  export {
6
- TransportClock
30
+ DEFAULT_MUSICAL_TEMPO,
31
+ MAX_TEMPO_GRID_BEATS_PER_BAR,
32
+ MAX_TEMPO_GRID_BPM,
33
+ TICKS_PER_QUARTER,
34
+ TempoClock,
35
+ TransportClock,
36
+ barsBeatsTicksAt,
37
+ createMusicalTempo,
38
+ createTempoGrid,
39
+ formatBarsBeatsTicks,
40
+ nextGridTime,
41
+ secondsAtBarsBeatsTicks,
42
+ snapToTempoGrid,
43
+ tapTempo,
44
+ tempoGridBeatLength,
45
+ tempoGridBeatPosition,
46
+ tempoGridJump,
47
+ tempoGridLines,
48
+ tempoGridMapping,
49
+ tempoGridPosition,
50
+ tickSeconds,
51
+ ticksPerBar,
52
+ ticksPerBeat,
53
+ timeValueSeconds,
54
+ timeValueTicks
7
55
  };
8
56
  //# sourceMappingURL=transport.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/mamingchen/GitHub/public/WebMusic/platform/kernel/dist/worker.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,6IAAC","file":"/Users/mamingchen/GitHub/public/WebMusic/platform/kernel/dist/worker.cjs"}
1
+ {"version":3,"sources":["/private/tmp/claude-501/-Users-mamingchen-GitHub-public-WebMusic/77eac0d8-82c0-45c6-aba8-0cd73cfd2b1b/scratchpad/release-0.4.0/platform/kernel/dist/worker.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,6IAAC","file":"/private/tmp/claude-501/-Users-mamingchen-GitHub-public-WebMusic/77eac0d8-82c0-45c6-aba8-0cd73cfd2b1b/scratchpad/release-0.4.0/platform/kernel/dist/worker.cjs"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmusic/kernel",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Domain-neutral WebMusic contracts and utilities for events, elements, workers, metering and synchronized playback.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -78,6 +78,16 @@
78
78
  "default": "./dist/effect.cjs"
79
79
  }
80
80
  },
81
+ "./module": {
82
+ "import": {
83
+ "types": "./dist/module.d.ts",
84
+ "default": "./dist/module.js"
85
+ },
86
+ "require": {
87
+ "types": "./dist/module.d.cts",
88
+ "default": "./dist/module.cjs"
89
+ }
90
+ },
81
91
  "./meter": {
82
92
  "import": {
83
93
  "types": "./dist/meter.d.ts",
@@ -108,20 +118,60 @@
108
118
  "default": "./dist/tick.cjs"
109
119
  }
110
120
  },
111
- "./sync": {
121
+ "./session": {
122
+ "import": {
123
+ "types": "./dist/session.d.ts",
124
+ "default": "./dist/session.js"
125
+ },
126
+ "require": {
127
+ "types": "./dist/session.d.cts",
128
+ "default": "./dist/session.cjs"
129
+ }
130
+ },
131
+ "./processor": {
132
+ "import": {
133
+ "types": "./dist/processor.d.ts",
134
+ "default": "./dist/processor.js"
135
+ },
136
+ "require": {
137
+ "types": "./dist/processor.d.cts",
138
+ "default": "./dist/processor.cjs"
139
+ }
140
+ },
141
+ "./processor-worklet": {
142
+ "import": {
143
+ "types": "./dist/processor-worklet.d.ts",
144
+ "default": "./dist/processor-worklet.js"
145
+ },
146
+ "require": {
147
+ "types": "./dist/processor-worklet.d.cts",
148
+ "default": "./dist/processor-worklet.cjs"
149
+ }
150
+ },
151
+ "./sequence": {
152
+ "import": {
153
+ "types": "./dist/sequence.d.ts",
154
+ "default": "./dist/sequence.js"
155
+ },
156
+ "require": {
157
+ "types": "./dist/sequence.d.cts",
158
+ "default": "./dist/sequence.cjs"
159
+ }
160
+ },
161
+ "./message": {
112
162
  "import": {
113
- "types": "./dist/sync.d.ts",
114
- "default": "./dist/sync.js"
163
+ "types": "./dist/message.d.ts",
164
+ "default": "./dist/message.js"
115
165
  },
116
166
  "require": {
117
- "types": "./dist/sync.d.cts",
118
- "default": "./dist/sync.cjs"
167
+ "types": "./dist/message.d.cts",
168
+ "default": "./dist/message.cjs"
119
169
  }
120
170
  },
121
171
  "./package.json": "./package.json"
122
172
  },
123
173
  "scripts": {
124
- "build": "tsup src/index.ts src/events.ts src/elements.ts src/worker.ts src/audio-context.ts src/player.ts src/effect.ts src/meter.ts src/transport.ts src/tick.ts src/sync.ts --tsconfig tsconfig.build.json --format esm,cjs --splitting --dts --sourcemap --clean && node ../../scripts/package-artifacts.mjs --write",
174
+ "build": "node ../../scripts/clean-dist.mjs --begin dist && tsup src/index.ts src/events.ts src/elements.ts src/worker.ts src/audio-context.ts src/player.ts src/effect.ts src/module.ts src/meter.ts src/transport.ts src/tick.ts src/session.ts src/processor.ts src/processor-worklet.ts src/sequence.ts src/message.ts --tsconfig tsconfig.build.json --format esm,cjs --splitting --dts --sourcemap && node ../../scripts/clean-dist.mjs --prune dist && node ../../scripts/package-artifacts.mjs --write",
125
175
  "test": "vitest run",
126
176
  "typecheck": "tsc --noEmit",
127
177
  "prepack": "node ../../scripts/package-artifacts.mjs"
@@ -129,9 +179,9 @@
129
179
  "devDependencies": {
130
180
  "tsup": "^8.5.0",
131
181
  "typescript": "^5.4.0",
132
- "vitest": "^5.0.0"
182
+ "vitest": "^5.1.0"
133
183
  },
134
- "license": "MIT",
184
+ "license": "Apache-2.0",
135
185
  "publishConfig": {
136
186
  "access": "public"
137
187
  },
@@ -142,7 +192,8 @@
142
192
  "files": [
143
193
  "dist",
144
194
  "README.md",
145
- "LICENSE"
195
+ "LICENSE",
196
+ "NOTICE"
146
197
  ],
147
198
  "repository": {
148
199
  "type": "git",
@@ -1,162 +0,0 @@
1
- import {
2
- __privateAdd,
3
- __privateGet,
4
- __privateSet
5
- } from "./chunk-PXG64RU4.js";
6
-
7
- // src/transport.ts
8
- var _originTime, _originPosition, _rate, _paused, _holdUntilOrigin, _now;
9
- var TransportClock = class {
10
- /** @param now Optional reference clock enabling the zero-arg `position` getter. */
11
- constructor(now) {
12
- __privateAdd(this, _originTime, 0);
13
- __privateAdd(this, _originPosition, 0);
14
- __privateAdd(this, _rate, 1);
15
- __privateAdd(this, _paused, true);
16
- __privateAdd(this, _holdUntilOrigin, false);
17
- __privateAdd(this, _now);
18
- __privateSet(this, _now, now);
19
- }
20
- get state() {
21
- return {
22
- originTime: __privateGet(this, _originTime),
23
- originPosition: __privateGet(this, _originPosition),
24
- rate: __privateGet(this, _rate),
25
- paused: __privateGet(this, _paused)
26
- };
27
- }
28
- get rate() {
29
- return __privateGet(this, _rate);
30
- }
31
- get paused() {
32
- return __privateGet(this, _paused);
33
- }
34
- /** Current position via the injected `now()` clock. Throws when none was injected. */
35
- get position() {
36
- if (!__privateGet(this, _now)) throw new Error("TransportClock has no injected now() clock; use positionAt(t).");
37
- return this.positionAt(__privateGet(this, _now).call(this));
38
- }
39
- /**
40
- * True when a {@link startAt} start is armed. The flag is cleared by the
41
- * next {@link start} or {@link pause} — NOT by the origin time passing —
42
- * so callers combining it with {@link TransportClockState.originTime}
43
- * should treat "holding and origin still in the future" as the pre-roll
44
- * condition (positionAt handles this internally either way).
45
- */
46
- get holding() {
47
- return __privateGet(this, _holdUntilOrigin);
48
- }
49
- /**
50
- * Position at reference time `t`. While paused this is constant. `t` before
51
- * the anchor yields positions before it (possibly negative) — callers clamp
52
- * to their own domain — EXCEPT after {@link startAt}, where the position
53
- * holds at the armed origin position through the pre-roll (mirroring how a
54
- * scheduled `source.start(when)` sounds nothing before `when`).
55
- */
56
- positionAt(t) {
57
- if (__privateGet(this, _paused)) return __privateGet(this, _originPosition);
58
- if (__privateGet(this, _holdUntilOrigin) && t < __privateGet(this, _originTime)) return __privateGet(this, _originPosition);
59
- return __privateGet(this, _originPosition) + (t - __privateGet(this, _originTime)) * __privateGet(this, _rate);
60
- }
61
- /**
62
- * Inverse of {@link positionAt}. Throws RangeError while paused: no
63
- * reference time maps to a position when the transport is frozen — guard
64
- * with {@link paused} before calling. While a {@link startAt} start is
65
- * armed, positions before the armed origin position also throw: the
66
- * position holds through the pre-roll and never passes below the origin,
67
- * so no reference time maps to them (extrapolating backwards would return
68
- * a time whose {@link positionAt} is NOT the requested position).
69
- */
70
- timeAt(position) {
71
- if (__privateGet(this, _paused)) throw new RangeError("TransportClock is paused; no reference time maps to a position.");
72
- if (__privateGet(this, _holdUntilOrigin) && position < __privateGet(this, _originPosition)) {
73
- throw new RangeError(
74
- "TransportClock is holding a scheduled start; no reference time maps to a position before the armed origin position."
75
- );
76
- }
77
- return __privateGet(this, _originTime) + (position - __privateGet(this, _originPosition)) / __privateGet(this, _rate);
78
- }
79
- /**
80
- * Anchor at `(t, position ?? current position)` and unpause. Re-anchoring
81
- * while already playing is idempotent for the position at `t`.
82
- */
83
- start(t, position) {
84
- assertFiniteAnchor("start time", t);
85
- if (position !== void 0) assertFiniteAnchor("start position", position);
86
- __privateSet(this, _originPosition, position ?? this.positionAt(t));
87
- __privateSet(this, _originTime, t);
88
- __privateSet(this, _paused, false);
89
- __privateSet(this, _holdUntilOrigin, false);
90
- }
91
- /**
92
- * Arm a SCHEDULED start: anchor at a (typically future) reference time and
93
- * unpause, with the position holding at `position` until `t` arrives —
94
- * the clock-side mirror of a sample-accurate `play(when)`. Transitions
95
- * during the pre-roll keep the armed origin: {@link setRate} changes the
96
- * slope after `t` without collapsing the hold, {@link seekTo} re-arms the
97
- * held position, and {@link pause} cancels the pending start.
98
- */
99
- startAt(t, position) {
100
- assertFiniteAnchor("startAt time", t);
101
- assertFiniteAnchor("startAt position", position);
102
- __privateSet(this, _originPosition, position);
103
- __privateSet(this, _originTime, t);
104
- __privateSet(this, _paused, false);
105
- __privateSet(this, _holdUntilOrigin, true);
106
- }
107
- /** Fold elapsed time into the anchor; `positionAt()` is constant afterwards. */
108
- pause(t) {
109
- assertFiniteAnchor("pause time", t);
110
- __privateSet(this, _originPosition, this.positionAt(t));
111
- __privateSet(this, _originTime, t);
112
- __privateSet(this, _paused, true);
113
- __privateSet(this, _holdUntilOrigin, false);
114
- }
115
- /**
116
- * Re-anchor at a new position; preserves the paused/playing state. During
117
- * an armed pre-roll the scheduled origin time is kept (the pending start
118
- * stays pending at the new position).
119
- */
120
- seekTo(position, t) {
121
- assertFiniteAnchor("seek position", position);
122
- assertFiniteAnchor("seek time", t);
123
- __privateSet(this, _originPosition, position);
124
- if (!(__privateGet(this, _holdUntilOrigin) && t < __privateGet(this, _originTime))) {
125
- __privateSet(this, _originTime, t);
126
- }
127
- }
128
- /**
129
- * Re-anchor so the position is continuous across the rate change:
130
- * `originPosition = positionAt(t); originTime = t; rate = r`.
131
- * Throws RangeError unless `r` is finite and > 0.
132
- */
133
- setRate(r, t) {
134
- if (!Number.isFinite(r) || r <= 0) {
135
- throw new RangeError(`TransportClock rate must be finite and > 0, got ${r}.`);
136
- }
137
- assertFiniteAnchor("setRate time", t);
138
- if (__privateGet(this, _holdUntilOrigin) && t < __privateGet(this, _originTime)) {
139
- __privateSet(this, _rate, r);
140
- return;
141
- }
142
- __privateSet(this, _originPosition, this.positionAt(t));
143
- __privateSet(this, _originTime, t);
144
- __privateSet(this, _rate, r);
145
- }
146
- };
147
- _originTime = new WeakMap();
148
- _originPosition = new WeakMap();
149
- _rate = new WeakMap();
150
- _paused = new WeakMap();
151
- _holdUntilOrigin = new WeakMap();
152
- _now = new WeakMap();
153
- function assertFiniteAnchor(name, value) {
154
- if (!Number.isFinite(value)) {
155
- throw new RangeError(`TransportClock ${name} must be a finite number, got ${value}.`);
156
- }
157
- }
158
-
159
- export {
160
- TransportClock
161
- };
162
- //# sourceMappingURL=chunk-53YD73OY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/transport.ts"],"sourcesContent":["// ============================================================================\n// Pure transport math shared by both families' playback engines, and the\n// timeline-mapping contract that lets musical time axes (score quarters,\n// audio beats) interoperate through seconds. No Web Audio, no domain types —\n// numbers in, numbers out. For the imperative playback control surface a\n// player exposes, see ./player.\n//\n// Terminology: TransportClock's \"position\" is a TIMELINE position (typically\n// media seconds); TimelineMapping's \"position\" is a MUSICAL position\n// (quarters, beats — the consumer defines the unit). The mapping converts\n// between the two axes.\n// ============================================================================\n\n/** Immutable snapshot of a transport anchor. All numbers, unit-agnostic. */\nexport interface TransportClockState {\n /** Reference-clock timestamp of the anchor. */\n readonly originTime: number;\n /** Timeline position at `originTime`. */\n readonly originPosition: number;\n /** Finite and > 0; position advances `rate`× reference time. */\n readonly rate: number;\n readonly paused: boolean;\n}\n\n/**\n * Affine mapping between an external monotonic reference clock (any number\n * domain — `AudioContext.currentTime`, `performance.now()/1000`, a test\n * counter) and a timeline position. Pure: never reads a real clock unless\n * `now` is injected; every mutator takes the current reference time\n * explicitly.\n *\n * position(t) = paused ? originPosition\n * : originPosition + (t - originTime) * rate\n *\n * The semantics mirror the two engines this abstracts: re-anchor math is the\n * score scheduler's retune (capture position, reset both anchors) and\n * BufferEngine's setRate; pause folds elapsed time into `originPosition`.\n * Loop/wrap is deliberately OUT of scope — consumers implement it as\n * `seekTo(loopStart, t)`, which is exactly what the engines do today.\n * Negative times and positions pass through unclamped; clamping to a\n * duration is domain policy. Every anchor mutator rejects non-finite\n * numbers: a NaN reference time or position would silently poison the\n * anchor and every later `positionAt` read, with no error at the source.\n */\nexport class TransportClock {\n #originTime = 0;\n #originPosition = 0;\n #rate = 1;\n #paused = true;\n #holdUntilOrigin = false;\n readonly #now?: () => number;\n\n /** @param now Optional reference clock enabling the zero-arg `position` getter. */\n constructor(now?: () => number) {\n this.#now = now;\n }\n\n get state(): TransportClockState {\n return {\n originTime: this.#originTime,\n originPosition: this.#originPosition,\n rate: this.#rate,\n paused: this.#paused,\n };\n }\n\n get rate(): number {\n return this.#rate;\n }\n\n get paused(): boolean {\n return this.#paused;\n }\n\n /** Current position via the injected `now()` clock. Throws when none was injected. */\n get position(): number {\n if (!this.#now) throw new Error('TransportClock has no injected now() clock; use positionAt(t).');\n return this.positionAt(this.#now());\n }\n\n /**\n * True when a {@link startAt} start is armed. The flag is cleared by the\n * next {@link start} or {@link pause} — NOT by the origin time passing —\n * so callers combining it with {@link TransportClockState.originTime}\n * should treat \"holding and origin still in the future\" as the pre-roll\n * condition (positionAt handles this internally either way).\n */\n get holding(): boolean {\n return this.#holdUntilOrigin;\n }\n\n /**\n * Position at reference time `t`. While paused this is constant. `t` before\n * the anchor yields positions before it (possibly negative) — callers clamp\n * to their own domain — EXCEPT after {@link startAt}, where the position\n * holds at the armed origin position through the pre-roll (mirroring how a\n * scheduled `source.start(when)` sounds nothing before `when`).\n */\n positionAt(t: number): number {\n if (this.#paused) return this.#originPosition;\n if (this.#holdUntilOrigin && t < this.#originTime) return this.#originPosition;\n return this.#originPosition + (t - this.#originTime) * this.#rate;\n }\n\n /**\n * Inverse of {@link positionAt}. Throws RangeError while paused: no\n * reference time maps to a position when the transport is frozen — guard\n * with {@link paused} before calling. While a {@link startAt} start is\n * armed, positions before the armed origin position also throw: the\n * position holds through the pre-roll and never passes below the origin,\n * so no reference time maps to them (extrapolating backwards would return\n * a time whose {@link positionAt} is NOT the requested position).\n */\n timeAt(position: number): number {\n if (this.#paused) throw new RangeError('TransportClock is paused; no reference time maps to a position.');\n if (this.#holdUntilOrigin && position < this.#originPosition) {\n throw new RangeError(\n 'TransportClock is holding a scheduled start; no reference time maps to a position before the armed origin position.',\n );\n }\n return this.#originTime + (position - this.#originPosition) / this.#rate;\n }\n\n /**\n * Anchor at `(t, position ?? current position)` and unpause. Re-anchoring\n * while already playing is idempotent for the position at `t`.\n */\n start(t: number, position?: number): void {\n assertFiniteAnchor('start time', t);\n if (position !== undefined) assertFiniteAnchor('start position', position);\n this.#originPosition = position ?? this.positionAt(t);\n this.#originTime = t;\n this.#paused = false;\n this.#holdUntilOrigin = false;\n }\n\n /**\n * Arm a SCHEDULED start: anchor at a (typically future) reference time and\n * unpause, with the position holding at `position` until `t` arrives —\n * the clock-side mirror of a sample-accurate `play(when)`. Transitions\n * during the pre-roll keep the armed origin: {@link setRate} changes the\n * slope after `t` without collapsing the hold, {@link seekTo} re-arms the\n * held position, and {@link pause} cancels the pending start.\n */\n startAt(t: number, position: number): void {\n assertFiniteAnchor('startAt time', t);\n assertFiniteAnchor('startAt position', position);\n this.#originPosition = position;\n this.#originTime = t;\n this.#paused = false;\n this.#holdUntilOrigin = true;\n }\n\n /** Fold elapsed time into the anchor; `positionAt()` is constant afterwards. */\n pause(t: number): void {\n assertFiniteAnchor('pause time', t);\n this.#originPosition = this.positionAt(t);\n this.#originTime = t;\n this.#paused = true;\n this.#holdUntilOrigin = false;\n }\n\n /**\n * Re-anchor at a new position; preserves the paused/playing state. During\n * an armed pre-roll the scheduled origin time is kept (the pending start\n * stays pending at the new position).\n */\n seekTo(position: number, t: number): void {\n assertFiniteAnchor('seek position', position);\n assertFiniteAnchor('seek time', t);\n this.#originPosition = position;\n if (!(this.#holdUntilOrigin && t < this.#originTime)) {\n this.#originTime = t;\n }\n }\n\n /**\n * Re-anchor so the position is continuous across the rate change:\n * `originPosition = positionAt(t); originTime = t; rate = r`.\n * Throws RangeError unless `r` is finite and > 0.\n */\n setRate(r: number, t: number): void {\n if (!Number.isFinite(r) || r <= 0) {\n throw new RangeError(`TransportClock rate must be finite and > 0, got ${r}.`);\n }\n assertFiniteAnchor('setRate time', t);\n if (this.#holdUntilOrigin && t < this.#originTime) {\n // Pre-roll: the position has not started moving; only the slope after\n // the armed origin changes. (Naively re-anchoring at `t` here is the\n // BufferEngine pre-roll setRate bug this mode exists to prevent.)\n this.#rate = r;\n return;\n }\n this.#originPosition = this.positionAt(t);\n this.#originTime = t;\n this.#rate = r;\n }\n}\n\nfunction assertFiniteAnchor(name: string, value: number): void {\n if (!Number.isFinite(value)) {\n throw new RangeError(`TransportClock ${name} must be a finite number, got ${value}.`);\n }\n}\n\n/**\n * Read-only view of a {@link TransportClock} — what a transport OWNER exposes\n * to consumers (the sync bridge, views) so they can anchor against the clock\n * without being able to re-anchor it.\n */\nexport type TransportClockReader = Pick<\n TransportClock,\n 'state' | 'rate' | 'paused' | 'holding' | 'positionAt' | 'timeAt'\n>;\n\n/**\n * Monotonic non-decreasing map between a musical position axis (quarters,\n * beats — the consumer defines the unit) and media seconds. Implementations\n * should be total over all reals (extrapolate past the ends); they MAY clamp\n * negative inputs, and MAY quantize (the score family's TimeMap quantizes the\n * inverse to 1/480 quarter), so round-trips are only approximate and only on\n * `[0, duration]`.\n */\nexport interface TimelineMapping {\n positionToSeconds(position: number): number;\n secondsToPosition(seconds: number): number;\n}\n"],"mappings":"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","names":[]}