@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.
- package/LICENSE +202 -21
- package/NOTICE +2 -0
- package/README.md +103 -64
- package/dist/audio-context.cjs.map +1 -1
- package/dist/build-receipt.json +3 -3
- package/dist/chunk-27LH6QLZ.cjs +277 -0
- package/dist/chunk-27LH6QLZ.cjs.map +1 -0
- package/dist/chunk-3INDOVUC.cjs.map +1 -1
- package/dist/chunk-3RR2VIKA.js +393 -0
- package/dist/chunk-3RR2VIKA.js.map +1 -0
- package/dist/chunk-3YTKIKKX.cjs +378 -0
- package/dist/chunk-3YTKIKKX.cjs.map +1 -0
- package/dist/chunk-4RG4WQKC.js +360 -0
- package/dist/chunk-4RG4WQKC.js.map +1 -0
- package/dist/chunk-5AHVQXTF.cjs +620 -0
- package/dist/chunk-5AHVQXTF.cjs.map +1 -0
- package/dist/chunk-624KWJWZ.js +170 -0
- package/dist/chunk-624KWJWZ.js.map +1 -0
- package/dist/chunk-6HGFEKD3.cjs +851 -0
- package/dist/chunk-6HGFEKD3.cjs.map +1 -0
- package/dist/chunk-7ZTZZ5PN.cjs.map +1 -1
- package/dist/chunk-ALWV4P7D.js +726 -0
- package/dist/chunk-ALWV4P7D.js.map +1 -0
- package/dist/chunk-BADJJ6DV.cjs +143 -0
- package/dist/chunk-BADJJ6DV.cjs.map +1 -0
- package/dist/chunk-C3LMS36L.cjs +393 -0
- package/dist/chunk-C3LMS36L.cjs.map +1 -0
- package/dist/chunk-C3YWUZW3.cjs.map +1 -1
- package/dist/chunk-CR6OUWBJ.cjs +726 -0
- package/dist/chunk-CR6OUWBJ.cjs.map +1 -0
- package/dist/chunk-CYWDZLWC.js +2141 -0
- package/dist/chunk-CYWDZLWC.js.map +1 -0
- package/dist/chunk-DDOGX2D5.js +378 -0
- package/dist/chunk-DDOGX2D5.js.map +1 -0
- package/dist/chunk-DVN6E5U3.js +620 -0
- package/dist/chunk-DVN6E5U3.js.map +1 -0
- package/dist/chunk-EURMRU2S.js +208 -0
- package/dist/chunk-EURMRU2S.js.map +1 -0
- package/dist/chunk-EXDCK2VL.cjs +20 -0
- package/dist/chunk-EXDCK2VL.cjs.map +1 -0
- package/dist/chunk-G5EIUP52.js +114 -0
- package/dist/chunk-G5EIUP52.js.map +1 -0
- package/dist/chunk-GB4DGKLZ.js +143 -0
- package/dist/chunk-GB4DGKLZ.js.map +1 -0
- package/dist/chunk-GPOEAYOW.js +2147 -0
- package/dist/chunk-GPOEAYOW.js.map +1 -0
- package/dist/chunk-I4YMA5VM.cjs +120 -0
- package/dist/chunk-I4YMA5VM.cjs.map +1 -0
- package/dist/chunk-IVWHMDCB.cjs +4383 -0
- package/dist/chunk-IVWHMDCB.cjs.map +1 -0
- package/dist/chunk-JFCBJMA7.cjs +2147 -0
- package/dist/chunk-JFCBJMA7.cjs.map +1 -0
- package/dist/chunk-JLVSAZ3K.cjs +813 -0
- package/dist/chunk-JLVSAZ3K.cjs.map +1 -0
- package/dist/chunk-K7FYH6UG.cjs +208 -0
- package/dist/chunk-K7FYH6UG.cjs.map +1 -0
- package/dist/chunk-L4MYCETM.cjs +970 -0
- package/dist/chunk-L4MYCETM.cjs.map +1 -0
- package/dist/chunk-MNCMYNYL.js +970 -0
- package/dist/chunk-MNCMYNYL.js.map +1 -0
- package/dist/chunk-NT2BZ3QM.js +120 -0
- package/dist/chunk-NT2BZ3QM.js.map +1 -0
- package/dist/chunk-O7SA5GLC.js +277 -0
- package/dist/chunk-O7SA5GLC.js.map +1 -0
- package/dist/chunk-OCKAHITL.cjs +548 -0
- package/dist/chunk-OCKAHITL.cjs.map +1 -0
- package/dist/chunk-OTXYWCLA.js +206 -0
- package/dist/chunk-OTXYWCLA.js.map +1 -0
- package/dist/chunk-P6ZA63J7.js +548 -0
- package/dist/chunk-P6ZA63J7.js.map +1 -0
- package/dist/chunk-QLF3BOST.js +20 -0
- package/dist/chunk-QLF3BOST.js.map +1 -0
- package/dist/chunk-RCWFRZDR.js +4383 -0
- package/dist/chunk-RCWFRZDR.js.map +1 -0
- package/dist/chunk-RZBLPM3L.cjs +206 -0
- package/dist/chunk-RZBLPM3L.cjs.map +1 -0
- package/dist/chunk-TA3TNJZU.cjs +360 -0
- package/dist/chunk-TA3TNJZU.cjs.map +1 -0
- package/dist/chunk-TZSRPTQL.cjs +2141 -0
- package/dist/chunk-TZSRPTQL.cjs.map +1 -0
- package/dist/chunk-UMTPJ76S.cjs.map +1 -1
- package/dist/chunk-UY77FXDW.js +813 -0
- package/dist/chunk-UY77FXDW.js.map +1 -0
- package/dist/chunk-VFU3S7OC.js +851 -0
- package/dist/chunk-VFU3S7OC.js.map +1 -0
- package/dist/chunk-VY6WWZSW.cjs.map +1 -1
- package/dist/chunk-WN5DZOVT.cjs +170 -0
- package/dist/chunk-WN5DZOVT.cjs.map +1 -0
- package/dist/chunk-WOPW6WLR.cjs.map +1 -1
- package/dist/chunk-XBSIYUHM.cjs +114 -0
- package/dist/chunk-XBSIYUHM.cjs.map +1 -0
- package/dist/chunk-ZMU72HJS.cjs.map +1 -1
- package/dist/context-DSa0ymyN.d.cts +664 -0
- package/dist/context-DaxfAg3b.d.ts +664 -0
- package/dist/effect-chain-Cu03O5Y0.d.ts +91 -0
- package/dist/effect-chain-Do75T7uK.d.cts +91 -0
- package/dist/effect.cjs +16 -1
- package/dist/effect.cjs.map +1 -1
- package/dist/effect.d.cts +56 -14
- package/dist/effect.d.ts +56 -14
- package/dist/effect.js +16 -1
- package/dist/elements.cjs +37 -2
- package/dist/elements.cjs.map +1 -1
- package/dist/elements.d.cts +197 -8
- package/dist/elements.d.ts +197 -8
- package/dist/elements.js +36 -1
- package/dist/events.cjs.map +1 -1
- package/dist/index.cjs +555 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +566 -19
- package/dist/message.cjs +104 -0
- package/dist/message.cjs.map +1 -0
- package/dist/message.d.cts +738 -0
- package/dist/message.d.ts +738 -0
- package/dist/message.js +104 -0
- package/dist/meter.cjs.map +1 -1
- package/dist/module-control-C25BMtH7.d.ts +61 -0
- package/dist/module-control-yH6nTJM9.d.cts +61 -0
- package/dist/module-plugin-BnPmq1VP.d.ts +198 -0
- package/dist/module-plugin-CHb-5W0Y.d.cts +198 -0
- package/dist/module.cjs +263 -0
- package/dist/module.cjs.map +1 -0
- package/dist/module.d.cts +1112 -0
- package/dist/module.d.ts +1112 -0
- package/dist/module.js +263 -0
- package/dist/parameter-DwQzFmBR.d.cts +172 -0
- package/dist/parameter-DwQzFmBR.d.ts +172 -0
- package/dist/player.cjs.map +1 -1
- package/dist/processor-worklet.cjs +18 -0
- package/dist/processor-worklet.cjs.map +1 -0
- package/dist/processor-worklet.d.cts +166 -0
- package/dist/processor-worklet.d.ts +166 -0
- package/dist/processor-worklet.js +18 -0
- package/dist/processor-worklet.js.map +1 -0
- package/dist/processor.cjs +51 -0
- package/dist/processor.cjs.map +1 -0
- package/dist/processor.d.cts +397 -0
- package/dist/processor.d.ts +397 -0
- package/dist/processor.js +51 -0
- package/dist/processor.js.map +1 -0
- package/dist/project-types-BU4awMnL.d.ts +323 -0
- package/dist/project-types-DufCV8Ma.d.cts +323 -0
- package/dist/ring-C-i9N90a.d.cts +139 -0
- package/dist/ring-DkcMt2Eg.d.ts +139 -0
- package/dist/sequence.cjs +68 -0
- package/dist/sequence.cjs.map +1 -0
- package/dist/sequence.d.cts +303 -0
- package/dist/sequence.d.ts +303 -0
- package/dist/sequence.js +68 -0
- package/dist/sequence.js.map +1 -0
- package/dist/session.cjs +16 -0
- package/dist/session.cjs.map +1 -0
- package/dist/session.d.cts +407 -0
- package/dist/session.d.ts +407 -0
- package/dist/session.js +16 -0
- package/dist/session.js.map +1 -0
- package/dist/tick.cjs.map +1 -1
- package/dist/transport.cjs +50 -2
- package/dist/transport.cjs.map +1 -1
- package/dist/transport.d.cts +145 -1
- package/dist/transport.d.ts +145 -1
- package/dist/transport.js +51 -3
- package/dist/worker.cjs.map +1 -1
- package/package.json +61 -10
- package/dist/chunk-53YD73OY.js +0 -162
- package/dist/chunk-53YD73OY.js.map +0 -1
- package/dist/chunk-54JYWB5X.cjs +0 -1051
- package/dist/chunk-54JYWB5X.cjs.map +0 -1
- package/dist/chunk-BR63OD53.cjs +0 -1
- package/dist/chunk-BR63OD53.cjs.map +0 -1
- package/dist/chunk-ON64FRCF.js +0 -1051
- package/dist/chunk-ON64FRCF.js.map +0 -1
- package/dist/chunk-SM5YPDDI.cjs +0 -162
- package/dist/chunk-SM5YPDDI.cjs.map +0 -1
- package/dist/chunk-TEM2I2NN.js +0 -1
- package/dist/chunk-VVZX7DQ6.cjs +0 -254
- package/dist/chunk-VVZX7DQ6.cjs.map +0 -1
- package/dist/chunk-WNFGDB7B.js +0 -254
- package/dist/chunk-WNFGDB7B.js.map +0 -1
- package/dist/sync.cjs +0 -12
- package/dist/sync.cjs.map +0 -1
- package/dist/sync.d.cts +0 -307
- package/dist/sync.d.ts +0 -307
- package/dist/sync.js +0 -12
- /package/dist/{chunk-TEM2I2NN.js.map → message.js.map} +0 -0
- /package/dist/{sync.js.map → module.js.map} +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @webmusic/kernel
|
|
2
2
|
|
|
3
|
+
> **2026-11-07 (DEC-068, MOD-15 round 8):** Bridge's master/follower sync family
|
|
4
|
+
> (`ScoreAudioSync`, `createSyncedPlayback`, `createAudioMasteredPlayback`,
|
|
5
|
+
> `clipAsMaster`, `scoreAsFollower`, `transport-contracts.ts`), Score's `TonePlayer`
|
|
6
|
+
> and Kernel's public `@webmusic/kernel/sync` entry are removed. Score and Audio now
|
|
7
|
+
> play together under one Session — `createScoreAudioSession` in code, nested
|
|
8
|
+
> players and Racks in markup. Sections below that describe `TransportGroup`,
|
|
9
|
+
> the removed `MirrorClockMaster` and the pair factories are a historical record of the 0.2
|
|
10
|
+
> design; the [modular composition contract](../../dev/design/MODULAR-COMPOSITION.md) is current.
|
|
11
|
+
|
|
3
12
|
The zero-domain shared kernel of the WebMusic ecosystem: the contracts and
|
|
4
13
|
pure logic that both `@webmusic/score` (symbolic music) and `@webmusic/audio`
|
|
5
14
|
(digital audio) build on. It knows nothing about scores or clips —
|
|
@@ -28,7 +37,7 @@ npm install @webmusic/kernel
|
|
|
28
37
|
```
|
|
29
38
|
|
|
30
39
|
Node.js 22 or later is supported. Import a subpath for the capability you need;
|
|
31
|
-
the root re-exports
|
|
40
|
+
the root re-exports the public modules. CommonJS uses the same paths with `require()`.
|
|
32
41
|
Importing the package creates no context, worker, timer or custom-element
|
|
33
42
|
registration. Browser operations still require their corresponding Web APIs.
|
|
34
43
|
|
|
@@ -57,45 +66,80 @@ The admission rule, enforced by review against the ledger in
|
|
|
57
66
|
|
|
58
67
|
Review new work against existing modules before adding another shared mechanism.
|
|
59
68
|
The ledger records the extraction boundary, including the role-contract basis for
|
|
60
|
-
|
|
69
|
+
the Session participant contracts. Decision reasons belong in [DECISIONS.md](../../dev/DECISIONS.md).
|
|
61
70
|
|
|
62
71
|
The counterpart rule matters as much: **policy that legitimately differs
|
|
63
|
-
between the families stays with the families.** The
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
between the families stays with the families.** The `/audio-context` constructor
|
|
73
|
+
helper does not decide ownership or resume playback. The modular audio environment
|
|
74
|
+
adds an explicit create/borrow lifetime, while callers choose which policy to
|
|
75
|
+
use. InsertChain supplies a common modular effect lifecycle; domain adapters
|
|
76
|
+
retain legacy effect behavior and DSP catalogs. WorkerLike and request correlation
|
|
77
|
+
still leave protocol versioning, cancellation and restart policy to callers.
|
|
78
|
+
Common mechanisms do not make distinct domain policies interchangeable.
|
|
70
79
|
|
|
71
80
|
## Module map
|
|
72
81
|
|
|
73
82
|
| Entry | Contract |
|
|
74
83
|
|---|---|
|
|
75
84
|
| `@webmusic/kernel/events` | Hardened typed `EventEmitter` |
|
|
76
|
-
| `@webmusic/kernel/element` | `WebMusicElement` connected-lifetime cleanup
|
|
85
|
+
| `@webmusic/kernel/element` | `WebMusicElement` connected-lifetime cleanup, SSR-safe helpers and scoped modular context/target discovery |
|
|
77
86
|
| `@webmusic/kernel/worker` | `WorkerLike`, `RequestTracker` correlation plumbing, `dedicatedWorkerScope()` |
|
|
78
87
|
| `@webmusic/kernel/audio-context` | SSR-safe AudioContext construction |
|
|
79
88
|
| `@webmusic/kernel/player` | `PlayerLike` playback control contract, capability tiers + guards |
|
|
80
|
-
| `@webmusic/kernel/effect` | `Effect`/`EffectNodes
|
|
89
|
+
| `@webmusic/kernel/effect` | `Effect`/`EffectNodes`, stable modular InsertChain and effect instances |
|
|
90
|
+
| `@webmusic/kernel/module` | Module handles, context/environment, route/CV leases, parameters and versioned project/runtime/editor contracts |
|
|
81
91
|
| `@webmusic/kernel/meter` | `AnalyserMeter` tap, RMS/peak with peak hold, `aggregateSpectrumBars` |
|
|
82
|
-
| `@webmusic/kernel/transport` | `TransportClock` affine anchor math
|
|
92
|
+
| `@webmusic/kernel/transport` | `TransportClock` affine anchor math, `TimelineMapping`, constant-tempo `TempoGrid` helpers and the read-only `TempoClock` |
|
|
83
93
|
| `@webmusic/kernel/tick` | Throttling-resistant tick delivery for lookahead schedulers |
|
|
84
|
-
| `@webmusic/kernel/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
`
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
transport
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
| `@webmusic/kernel/session` | Source-free SessionTransport, shared scheduling bindings, relative automation and phase |
|
|
95
|
+
| `@webmusic/kernel/processor` | Authored DSP definitions, per-context `AudioWorklet` preparation, processor modules, insert effects, instruments and project plugins, and the main/audio thread protocol |
|
|
96
|
+
| `@webmusic/kernel/processor-worklet` | Audio-thread authoring kit: `defineProcessor` over a reused render block |
|
|
97
|
+
| `@webmusic/kernel/message` | Message functions on values with the adapter that gives one ports, and Headless classes for timers, counters, values with a control, control sources, scripts and device input |
|
|
98
|
+
| `@webmusic/kernel/sequence` | Timed events on tracks: immutable data with pure edits, `SequenceDocument`, and `SequencePlayer` over a borrowed transport |
|
|
99
|
+
|
|
100
|
+
Pure time math remains in `/transport` and wakeups in `/tick`. The modular
|
|
101
|
+
entries build the one composition model (DEC-068) on those foundations:
|
|
102
|
+
`/module` defines module handles, the six port families (audio, note, control,
|
|
103
|
+
transport, source and, under DEC-075, message) with message clocks, Racks, provider scopes, sinks and the conformance kit;
|
|
104
|
+
`/effect` manages effect instances; `/session` owns the single timeline every
|
|
105
|
+
participant joins; and `/element` adds browser discovery and explicit `input`
|
|
106
|
+
resolution. Consumers may implement the structural
|
|
107
|
+
contracts without adopting an Element or a shared domain base class.
|
|
108
|
+
|
|
109
|
+
## Modular composition
|
|
110
|
+
|
|
111
|
+
ModuleHandle is a borrowed structural view of an existing module. ModuleRegistry
|
|
112
|
+
indexes handles by stable ID and returns precise registration leases; releasing
|
|
113
|
+
a registration or disposing the registry does not dispose the registered player.
|
|
114
|
+
ModuleContext explicitly lends audio, routing, registry, target and optional
|
|
115
|
+
Session capabilities. Its browser discovery adapter does not prepare a graph,
|
|
116
|
+
resume audio or transfer close/dispose permission.
|
|
117
|
+
|
|
118
|
+
ModuleAudioEnvironment lazily creates an audio context only when prepared, or
|
|
119
|
+
borrows one supplied by the caller. It closes only an owned real-time context.
|
|
120
|
+
AudioOutputPort manages a default main route, one replacement claimant and
|
|
121
|
+
separate send/tap branches. Leases release only managed edges; observing a signal
|
|
122
|
+
does not replace its main route. Context identity and output admission remain
|
|
123
|
+
necessary when attaching an already running player.
|
|
124
|
+
|
|
125
|
+
ParamHandle owns a numeric base value, descriptor, revisioned snapshots and
|
|
126
|
+
synchronous updates. ParamSurface exposes a named collection of those handles.
|
|
127
|
+
Effective audio readback and audio-rate modulation are separate capabilities;
|
|
128
|
+
the numeric value alone does not establish either. UI consumes structural
|
|
129
|
+
projections of the handles and retains no Kernel dependency.
|
|
130
|
+
|
|
131
|
+
InsertChain keeps stable same-context boundary ports while effect slots change.
|
|
132
|
+
A recipe can create several independent instances; panels editing one sound
|
|
133
|
+
must borrow the same instance and parameter handles. Compatibility adapters
|
|
134
|
+
retain the original `.effect` stage. A Session provider is not an audio master:
|
|
135
|
+
shared processing requires an explicit Rack/bus, and a source-free Session
|
|
136
|
+
does not fabricate an aggregate audio output.
|
|
137
|
+
|
|
138
|
+
The [modular composition contract](../../dev/design/MODULAR-COMPOSITION.md)
|
|
139
|
+
defines the ownership, routing and migration invariants. Concrete public
|
|
140
|
+
signatures belong in the [Kernel API reference](../../doc/src/content/docs/kernel/api.mdx);
|
|
141
|
+
[STATUS](../../dev/STATUS.md) distinguishes delivered integration from the
|
|
142
|
+
remaining sound, modulation and precision work.
|
|
99
143
|
|
|
100
144
|
## Design principles
|
|
101
145
|
|
|
@@ -157,9 +201,9 @@ nothing.
|
|
|
157
201
|
|
|
158
202
|
## The clock spine
|
|
159
203
|
|
|
160
|
-
`transport` + `tick` + `
|
|
204
|
+
`transport` + `tick` + `session` are the part of the kernel the rest of the
|
|
161
205
|
project's alignment rests on. They are three separate concerns: what time
|
|
162
|
-
*is*, how work gets *woken up*, and how several
|
|
206
|
+
*is*, how work gets *woken up*, and how several participants *agree*.
|
|
163
207
|
|
|
164
208
|
### TransportClock — one affine anchor
|
|
165
209
|
|
|
@@ -217,9 +261,13 @@ provides no anchor-change notification. Exact mapping reads do not confer audio
|
|
|
217
261
|
scheduling precision on a backend, timer or UI callback.
|
|
218
262
|
|
|
219
263
|
The accepted architecture is one timeline authority per session, with independent
|
|
220
|
-
sessions.
|
|
221
|
-
|
|
222
|
-
|
|
264
|
+
sessions. TransportGroup supplies a master-based authority; modular
|
|
265
|
+
SessionTransport provides a source-free conductor and a separate
|
|
266
|
+
`SessionSchedulingBinding` with authority identity, epoch, invalidation and
|
|
267
|
+
future loop segments. Native domain schedulers borrow this mapped anchor;
|
|
268
|
+
independent engines and legacy groups retain their own clocks. The pure reader
|
|
269
|
+
alone does not provide that scheduling protocol. See
|
|
270
|
+
[the shared-clock design](../shared-clock-injection.md).
|
|
223
271
|
|
|
224
272
|
### TimelineMapping — the musical-axis seam
|
|
225
273
|
|
|
@@ -252,10 +300,16 @@ The surface is deliberately tiny: `start(onTick)` / `stop()` / `dispose()`,
|
|
|
252
300
|
plus `running` and `workerBacked`. It delivers ticks; it holds no opinion
|
|
253
301
|
about what the tick does.
|
|
254
302
|
|
|
255
|
-
###
|
|
303
|
+
### Session internals — the join dance
|
|
304
|
+
|
|
305
|
+
`SessionTransport` owns one timeline and registers each participant through
|
|
306
|
+
`register(transport, options)`, which reports the participant's real
|
|
307
|
+
`ParticipantTiming` (`shared-anchor`, `callback`, `media-follower` or
|
|
308
|
+
`external`). Internally it delegates the follower choreography to a private
|
|
309
|
+
`TransportGroup`, described here because its rules define how participants
|
|
310
|
+
join; it is not a public entry.
|
|
256
311
|
|
|
257
|
-
|
|
258
|
-
work. Its implementation references only Kernel types. One **master** whose
|
|
312
|
+
Its implementation references only Kernel types. One **master** whose
|
|
259
313
|
clock is the group's timeline, N **followers** that join it, all positions on
|
|
260
314
|
the master's axis against one shared reference clock.
|
|
261
315
|
|
|
@@ -276,9 +330,7 @@ master.clock (TransportClockReader) ← the timeline, read never writte
|
|
|
276
330
|
The role contracts encode the design:
|
|
277
331
|
|
|
278
332
|
- The master **must** expose a `TransportClockReader`. There is no clockless
|
|
279
|
-
code path inside the group
|
|
280
|
-
`MirrorClockMaster` instead, so the fallback exists once as an adapter
|
|
281
|
-
rather than as a second branch through every method.
|
|
333
|
+
code path inside the group; the Session's own clock always satisfies it.
|
|
282
334
|
- Scheduled-start support is **observed, not declared**. The group proposes
|
|
283
335
|
`now + leadIn` to `master.play(when)`; a master that can arm does, and the
|
|
284
336
|
group notices through `clock.holding`. A master that ignores the proposal
|
|
@@ -298,8 +350,7 @@ The role contracts encode the design:
|
|
|
298
350
|
A join aligns the **slope before the intercept**: it hands the follower the
|
|
299
351
|
clock's current rate and only then seeks and schedules. Seeking alone would
|
|
300
352
|
leave a rate mismatch intact, so the drift just corrected starts growing back
|
|
301
|
-
immediately
|
|
302
|
-
rate rather than only a position.
|
|
353
|
+
immediately.
|
|
303
354
|
|
|
304
355
|
Two safeguards keep corrections from becoming pathologies. Drift checks hold
|
|
305
356
|
off until a scheduled join's origin has passed, because a follower parked at
|
|
@@ -316,7 +367,7 @@ settlement, background reconciliation and errors. Existing controls remain
|
|
|
316
367
|
migration surfaces. Strict dispatch checks observable failures and distinguishes
|
|
317
368
|
superseded commands; the engines cancel and re-arm through their existing methods,
|
|
318
369
|
retaining their private clocks. See the complete
|
|
319
|
-
[command contract](../../
|
|
370
|
+
[command contract](../../doc/src/content/docs/kernel/api.mdx).
|
|
320
371
|
|
|
321
372
|
`FollowerOptions.positionScale` adds a positive constant local-axis scale to the
|
|
322
373
|
offset, applied to both positions and rates. Optional `loop` metadata maps into
|
|
@@ -325,22 +376,6 @@ the master continues. Drift compares local phase and reports master-axis seconds
|
|
|
325
376
|
The group does not configure native loops, consume nonlinear mappings or perform
|
|
326
377
|
audio warping. Group-level loop re-entry still waits for a delivered watcher tick.
|
|
327
378
|
|
|
328
|
-
### MirrorClockMaster — the sampled fallback, once
|
|
329
|
-
|
|
330
|
-
A transport with no readable clock is adapted into the required-clock role by
|
|
331
|
-
dead-reckoning a mirror `TransportClock` across the command surface and
|
|
332
|
-
reconciling it against the transport's actual position on drift checks, or on
|
|
333
|
-
periodic lifecycle samples when follower drift checks are disabled:
|
|
334
|
-
|
|
335
|
-
- after observing forward motion, a stationary interval whose expected advance
|
|
336
|
-
exceeds the largest reported position step plus tolerance suggests the
|
|
337
|
-
transport stopped: pause the mirror and report `'stalled'`. Without a prior
|
|
338
|
-
moving sample, repeated positions alone cannot establish a stop;
|
|
339
|
-
- a moving transport that diverged re-anchors the mirror — **slope as well as
|
|
340
|
-
intercept**. Correcting only the position leaves a transport that refused or
|
|
341
|
-
clamped the shared rate drifting away again before the next check, which is
|
|
342
|
-
precisely how a rate mismatch turns into an endless correction loop.
|
|
343
|
-
|
|
344
379
|
## Error and lifetime policy
|
|
345
380
|
|
|
346
381
|
**Two delivery modes, chosen by the owner.** `emit` propagates a listener's
|
|
@@ -378,9 +413,10 @@ Recorded so the boundaries are visible rather than discovered:
|
|
|
378
413
|
Reverse playback is not represented by a negative rate. Pause holds position;
|
|
379
414
|
applications can implement scrubbing through explicit seeks.
|
|
380
415
|
- **No mutable-clock injection.** `TransportClock` remains pure time math with
|
|
381
|
-
no event surface.
|
|
382
|
-
|
|
383
|
-
|
|
416
|
+
no event surface. Native modular schedulers borrow `SessionSchedulingBinding`
|
|
417
|
+
with explicit invalidation and anchors; they never receive write authority.
|
|
418
|
+
Legacy groups publish their command outcomes while independent engines retain
|
|
419
|
+
private clocks. Direct local commands must not compete with an attached Session. See
|
|
384
420
|
[`platform/shared-clock-injection.md`](../shared-clock-injection.md).
|
|
385
421
|
- **No nonlinear mapped alignment.** `TimelineMapping` is published and both
|
|
386
422
|
families ship adapters. The group consumes constant offset/scale and optional
|
|
@@ -403,14 +439,17 @@ you can honestly advertise (`TimedPlayerLike`, `StatefulPlayerLike`,
|
|
|
403
439
|
exported `is*Player()` guards, never by poking optional members.
|
|
404
440
|
|
|
405
441
|
To take part in synchronized playback, implement `SyncFollowerTransport`
|
|
406
|
-
(honor `play(when)` sample-accurately)
|
|
407
|
-
`
|
|
442
|
+
(honor `play(when)` sample-accurately when you can) and register it on a
|
|
443
|
+
`SessionTransport` with the `ParticipantTiming` you honestly provide. To join a
|
|
444
|
+
module graph, expose a `ModuleHandle` whose `ports()` enumerate its audio, note,
|
|
445
|
+
control, transport and source ports, and run the Kernel conformance kit
|
|
446
|
+
(`checkModuleConformance`) in your tests.
|
|
408
447
|
|
|
409
448
|
## Gates
|
|
410
449
|
|
|
411
450
|
The multi-entry build enables code splitting for both module formats. Root and
|
|
412
451
|
subpath re-exports therefore use the same constructor within ESM and within
|
|
413
|
-
CommonJS, including the `TransportClock`
|
|
452
|
+
CommonJS, including the `TransportClock` the Session reads. ESM and
|
|
414
453
|
CommonJS remain separate module instances.
|
|
415
454
|
|
|
416
455
|
The kernel is a first-class checked package: its policy declares zero
|
|
@@ -430,4 +469,4 @@ what deliberately stayed per-family — lives in
|
|
|
430
469
|
|
|
431
470
|
## License
|
|
432
471
|
|
|
433
|
-
|
|
472
|
+
Apache-2.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users
|
|
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/audio-context.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,2JAAC","file":"/private/tmp/claude-501/-Users-mamingchen-GitHub-public-WebMusic/77eac0d8-82c0-45c6-aba8-0cd73cfd2b1b/scratchpad/release-0.4.0/platform/kernel/dist/audio-context.cjs"}
|
package/dist/build-receipt.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"name": "@webmusic/kernel",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"source": "
|
|
6
|
-
"outputs": "
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"source": "d55d3ce32e3b31e2e5800c7eea7a48fae3f3d074eab5cd522d0bd5f027c45b6f",
|
|
6
|
+
"outputs": "fe30d7a1e729c9a4c468640fa9bf6de7c1c3bdb1cbd316d4327c463b6152c474"
|
|
7
7
|
}
|