@zylem/game-lib 0.8.9 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/api/game-lib.api.json +37952 -19547
- package/dist/api/game-lib.api.md +1302 -7
- package/dist/api/game-lib.d.ts +1696 -3
- package/dist/api/game-lib.typedoc.json +174596 -76562
- package/dist/audio.d.ts +193 -1
- package/dist/audio.js +1 -1
- package/dist/bridge.d.ts +17 -2
- package/dist/bridge.js +1 -1
- package/dist/catalog.js +1 -1
- package/dist/chunk-2PFNNGTV.js +1 -0
- package/dist/chunk-2XMG3NJS.js +1 -0
- package/dist/chunk-4CZZZCFB.js +9 -0
- package/dist/chunk-7CBJKE42.js +1 -0
- package/dist/{chunk-CBUQBP2U.js → chunk-BQRMYLYD.js} +1 -1
- package/dist/chunk-FZNEWOC5.js +1 -0
- package/dist/chunk-GPCSX3M6.js +1 -0
- package/dist/chunk-K3NNXZIJ.js +1 -0
- package/dist/{chunk-JNFFTNMH.js → chunk-KSEP7AUF.js} +1 -1
- package/dist/{chunk-7JSZEEAE.js → chunk-LI43BZQN.js} +1 -1
- package/dist/chunk-NVVLLWIM.js +1 -0
- package/dist/chunk-QGIYILYI.js +1 -0
- package/dist/chunk-SHDHPDOV.js +24 -0
- package/dist/chunk-STVEILJJ.js +1 -0
- package/dist/chunk-SWDNK4GG.js +1 -0
- package/dist/chunk-UUOPT2N4.js +1 -0
- package/dist/chunk-VMXSE3EC.js +0 -0
- package/dist/{chunk-EYDC2PMO.js → chunk-VSFULLND.js} +1 -1
- package/dist/chunk-YNX3Q3CL.js +1 -0
- package/dist/chunk-ZZO4CKRU.js +1 -0
- package/dist/cinematics.d.ts +279 -0
- package/dist/cinematics.js +1 -0
- package/dist/core.d.ts +124 -10
- package/dist/core.js +1 -1
- package/dist/cutscene-definition-C479fkei.d.ts +509 -0
- package/dist/debug.d.ts +1 -0
- package/dist/debug.js +1 -1
- package/dist/{entity-type-map-D6BeAdvg.d.ts → entity-type-map-CrsrKT8c.d.ts} +12 -3
- package/dist/entity.d.ts +2 -1
- package/dist/entity.js +1 -1
- package/dist/game-D8KTP3fD.d.ts +652 -0
- package/dist/game-default-JV3Q6JAL.js +1 -0
- package/dist/graphics.d.ts +1 -1
- package/dist/graphics.js +1 -1
- package/dist/public.d.ts +12 -6
- package/dist/public.js +1 -1
- package/dist/schema/cutscene.schema.json +782 -0
- package/dist/schema/song.schema.json +430 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +1 -1
- package/dist/selection-bounds-BKmSo9aG.d.ts +50 -0
- package/dist/song-definition-rEKksP0B.d.ts +263 -0
- package/dist/song-player-7QPLFLAS.js +1 -0
- package/dist/{game-DyKbOeck.d.ts → stage-CAPlk_cN.d.ts} +146 -647
- package/dist/web-components.d.ts +5 -3
- package/dist/web-components.js +1 -1
- package/dist/{zylem-camera-DZTpPOiD.d.ts → zylem-camera-CYDtrVgi.d.ts} +134 -102
- package/package.json +11 -4
- package/dist/chunk-34MYRTRP.js +0 -9
- package/dist/chunk-AXJTUVGC.js +0 -24
- package/dist/chunk-BWOZF5YK.js +0 -1
- package/dist/chunk-EVMLNMGU.js +0 -1
- package/dist/chunk-G3TBBZUI.js +0 -1
- package/dist/chunk-J6KD2G6F.js +0 -1
- package/dist/chunk-X7T7QRYP.js +0 -1
- package/dist/chunk-YVWDCZNT.js +0 -1
- package/dist/chunk-ZRT3ZQVH.js +0 -1
- package/dist/game-default-6YXFFZ2Q.js +0 -1
- /package/dist/{chunk-MSCVL5OK.js → chunk-ELQN62PQ.js} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
+
import { Static } from '@sinclair/typebox';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TypeBox schema for a song the audio module can play: instruments (Tone.js
|
|
6
|
+
* presets with an effects chain), tracks (one instrument or audio lane each)
|
|
7
|
+
* and clips placed on those tracks. All positions and lengths are in beats at
|
|
8
|
+
* the song's tempo; audio clips reference a URL the runtime can fetch.
|
|
9
|
+
*
|
|
10
|
+
* Creator's Music mode authors `.song.json` documents that strip down to this
|
|
11
|
+
* shape (`toRuntimeSong` in `@zylem-creator/shared`).
|
|
12
|
+
*/
|
|
13
|
+
declare const InstrumentPresetSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"synth">, _sinclair_typebox.TLiteral<"polySynth">, _sinclair_typebox.TLiteral<"fmSynth">, _sinclair_typebox.TLiteral<"amSynth">, _sinclair_typebox.TLiteral<"membraneSynth">, _sinclair_typebox.TLiteral<"metalSynth">, _sinclair_typebox.TLiteral<"noiseSynth">, _sinclair_typebox.TLiteral<"pluckSynth">]>;
|
|
14
|
+
type InstrumentPreset = Static<typeof InstrumentPresetSchema>;
|
|
15
|
+
declare const OscillatorTypeSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sine">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"sawtooth">, _sinclair_typebox.TLiteral<"triangle">]>;
|
|
16
|
+
type OscillatorType = Static<typeof OscillatorTypeSchema>;
|
|
17
|
+
declare const EnvelopeSchema: _sinclair_typebox.TObject<{
|
|
18
|
+
attack: _sinclair_typebox.TNumber;
|
|
19
|
+
decay: _sinclair_typebox.TNumber;
|
|
20
|
+
sustain: _sinclair_typebox.TNumber;
|
|
21
|
+
release: _sinclair_typebox.TNumber;
|
|
22
|
+
}>;
|
|
23
|
+
type Envelope = Static<typeof EnvelopeSchema>;
|
|
24
|
+
declare const EffectTypeSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"reverb">, _sinclair_typebox.TLiteral<"delay">, _sinclair_typebox.TLiteral<"distortion">, _sinclair_typebox.TLiteral<"filter">]>;
|
|
25
|
+
type EffectType = Static<typeof EffectTypeSchema>;
|
|
26
|
+
declare const InstrumentEffectSchema: _sinclair_typebox.TObject<{
|
|
27
|
+
id: _sinclair_typebox.TString;
|
|
28
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"reverb">, _sinclair_typebox.TLiteral<"delay">, _sinclair_typebox.TLiteral<"distortion">, _sinclair_typebox.TLiteral<"filter">]>;
|
|
29
|
+
/** Dry/wet mix, 0–1. */
|
|
30
|
+
wet: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
31
|
+
/** Effect-specific settings forwarded to the Tone.js constructor. */
|
|
32
|
+
options: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean]>>>;
|
|
33
|
+
}>;
|
|
34
|
+
type InstrumentEffect = Static<typeof InstrumentEffectSchema>;
|
|
35
|
+
declare const InstrumentDefinitionSchema: _sinclair_typebox.TObject<{
|
|
36
|
+
id: _sinclair_typebox.TString;
|
|
37
|
+
name: _sinclair_typebox.TString;
|
|
38
|
+
preset: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"synth">, _sinclair_typebox.TLiteral<"polySynth">, _sinclair_typebox.TLiteral<"fmSynth">, _sinclair_typebox.TLiteral<"amSynth">, _sinclair_typebox.TLiteral<"membraneSynth">, _sinclair_typebox.TLiteral<"metalSynth">, _sinclair_typebox.TLiteral<"noiseSynth">, _sinclair_typebox.TLiteral<"pluckSynth">]>;
|
|
39
|
+
oscillator: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sine">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"sawtooth">, _sinclair_typebox.TLiteral<"triangle">]>>;
|
|
40
|
+
envelope: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
41
|
+
attack: _sinclair_typebox.TNumber;
|
|
42
|
+
decay: _sinclair_typebox.TNumber;
|
|
43
|
+
sustain: _sinclair_typebox.TNumber;
|
|
44
|
+
release: _sinclair_typebox.TNumber;
|
|
45
|
+
}>>;
|
|
46
|
+
/** Output trim in dB. */
|
|
47
|
+
volume: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
48
|
+
effects: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
49
|
+
id: _sinclair_typebox.TString;
|
|
50
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"reverb">, _sinclair_typebox.TLiteral<"delay">, _sinclair_typebox.TLiteral<"distortion">, _sinclair_typebox.TLiteral<"filter">]>;
|
|
51
|
+
/** Dry/wet mix, 0–1. */
|
|
52
|
+
wet: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
53
|
+
/** Effect-specific settings forwarded to the Tone.js constructor. */
|
|
54
|
+
options: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean]>>>;
|
|
55
|
+
}>>>;
|
|
56
|
+
}>;
|
|
57
|
+
type InstrumentDefinition = Static<typeof InstrumentDefinitionSchema>;
|
|
58
|
+
declare const SongNoteSchema: _sinclair_typebox.TObject<{
|
|
59
|
+
id: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
60
|
+
/** MIDI pitch, 0–127. */
|
|
61
|
+
pitch: _sinclair_typebox.TInteger;
|
|
62
|
+
/** Beats from the clip start. */
|
|
63
|
+
start: _sinclair_typebox.TNumber;
|
|
64
|
+
/** Beats. */
|
|
65
|
+
duration: _sinclair_typebox.TNumber;
|
|
66
|
+
/** 0–1; defaults to 0.8. */
|
|
67
|
+
velocity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
68
|
+
}>;
|
|
69
|
+
type SongNote = Static<typeof SongNoteSchema>;
|
|
70
|
+
declare const SongTrackSchema: _sinclair_typebox.TObject<{
|
|
71
|
+
id: _sinclair_typebox.TString;
|
|
72
|
+
name: _sinclair_typebox.TString;
|
|
73
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"instrument">, _sinclair_typebox.TLiteral<"audio">]>;
|
|
74
|
+
instrumentId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
75
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
76
|
+
/** Fader in dB. */
|
|
77
|
+
volume: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
78
|
+
/** -1 (left) … 1 (right). */
|
|
79
|
+
pan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
80
|
+
mute: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
81
|
+
solo: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
82
|
+
}>;
|
|
83
|
+
type SongTrack = Static<typeof SongTrackSchema>;
|
|
84
|
+
declare const NoteClipSchema: _sinclair_typebox.TObject<{
|
|
85
|
+
kind: _sinclair_typebox.TLiteral<"notes">;
|
|
86
|
+
id: _sinclair_typebox.TString;
|
|
87
|
+
trackId: _sinclair_typebox.TString;
|
|
88
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
89
|
+
/** Beats from the song start. */
|
|
90
|
+
start: _sinclair_typebox.TNumber;
|
|
91
|
+
/** Beats; notes past the end are not played. */
|
|
92
|
+
length: _sinclair_typebox.TNumber;
|
|
93
|
+
notes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
94
|
+
id: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
95
|
+
/** MIDI pitch, 0–127. */
|
|
96
|
+
pitch: _sinclair_typebox.TInteger;
|
|
97
|
+
/** Beats from the clip start. */
|
|
98
|
+
start: _sinclair_typebox.TNumber;
|
|
99
|
+
/** Beats. */
|
|
100
|
+
duration: _sinclair_typebox.TNumber;
|
|
101
|
+
/** 0–1; defaults to 0.8. */
|
|
102
|
+
velocity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
103
|
+
}>>;
|
|
104
|
+
}>;
|
|
105
|
+
type NoteClip = Static<typeof NoteClipSchema>;
|
|
106
|
+
declare const AudioClipSchema: _sinclair_typebox.TObject<{
|
|
107
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
108
|
+
id: _sinclair_typebox.TString;
|
|
109
|
+
trackId: _sinclair_typebox.TString;
|
|
110
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
111
|
+
/** URL of the audio file. */
|
|
112
|
+
url: _sinclair_typebox.TString;
|
|
113
|
+
/** Beats from the song start. */
|
|
114
|
+
start: _sinclair_typebox.TNumber;
|
|
115
|
+
/** Seconds trimmed from the start of the file. */
|
|
116
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
117
|
+
/** Beats. */
|
|
118
|
+
length: _sinclair_typebox.TNumber;
|
|
119
|
+
/** Clip gain in dB. */
|
|
120
|
+
gain: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
121
|
+
}>;
|
|
122
|
+
type AudioClip = Static<typeof AudioClipSchema>;
|
|
123
|
+
declare const SongClipSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
124
|
+
kind: _sinclair_typebox.TLiteral<"notes">;
|
|
125
|
+
id: _sinclair_typebox.TString;
|
|
126
|
+
trackId: _sinclair_typebox.TString;
|
|
127
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
128
|
+
/** Beats from the song start. */
|
|
129
|
+
start: _sinclair_typebox.TNumber;
|
|
130
|
+
/** Beats; notes past the end are not played. */
|
|
131
|
+
length: _sinclair_typebox.TNumber;
|
|
132
|
+
notes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
133
|
+
id: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
134
|
+
/** MIDI pitch, 0–127. */
|
|
135
|
+
pitch: _sinclair_typebox.TInteger;
|
|
136
|
+
/** Beats from the clip start. */
|
|
137
|
+
start: _sinclair_typebox.TNumber;
|
|
138
|
+
/** Beats. */
|
|
139
|
+
duration: _sinclair_typebox.TNumber;
|
|
140
|
+
/** 0–1; defaults to 0.8. */
|
|
141
|
+
velocity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
142
|
+
}>>;
|
|
143
|
+
}>, _sinclair_typebox.TObject<{
|
|
144
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
145
|
+
id: _sinclair_typebox.TString;
|
|
146
|
+
trackId: _sinclair_typebox.TString;
|
|
147
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
148
|
+
/** URL of the audio file. */
|
|
149
|
+
url: _sinclair_typebox.TString;
|
|
150
|
+
/** Beats from the song start. */
|
|
151
|
+
start: _sinclair_typebox.TNumber;
|
|
152
|
+
/** Seconds trimmed from the start of the file. */
|
|
153
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
154
|
+
/** Beats. */
|
|
155
|
+
length: _sinclair_typebox.TNumber;
|
|
156
|
+
/** Clip gain in dB. */
|
|
157
|
+
gain: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
158
|
+
}>]>;
|
|
159
|
+
type SongClip = Static<typeof SongClipSchema>;
|
|
160
|
+
declare const TimeSignatureSchema: _sinclair_typebox.TObject<{
|
|
161
|
+
numerator: _sinclair_typebox.TInteger;
|
|
162
|
+
denominator: _sinclair_typebox.TInteger;
|
|
163
|
+
}>;
|
|
164
|
+
type TimeSignature = Static<typeof TimeSignatureSchema>;
|
|
165
|
+
declare const SongLoopSchema: _sinclair_typebox.TObject<{
|
|
166
|
+
enabled: _sinclair_typebox.TBoolean;
|
|
167
|
+
/** Beats. */
|
|
168
|
+
start: _sinclair_typebox.TNumber;
|
|
169
|
+
end: _sinclair_typebox.TNumber;
|
|
170
|
+
}>;
|
|
171
|
+
type SongLoop = Static<typeof SongLoopSchema>;
|
|
172
|
+
declare const SongDefinitionSchema: _sinclair_typebox.TObject<{
|
|
173
|
+
id: _sinclair_typebox.TString;
|
|
174
|
+
name: _sinclair_typebox.TString;
|
|
175
|
+
bpm: _sinclair_typebox.TNumber;
|
|
176
|
+
timeSignature: _sinclair_typebox.TObject<{
|
|
177
|
+
numerator: _sinclair_typebox.TInteger;
|
|
178
|
+
denominator: _sinclair_typebox.TInteger;
|
|
179
|
+
}>;
|
|
180
|
+
lengthBars: _sinclair_typebox.TInteger;
|
|
181
|
+
loop: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
182
|
+
enabled: _sinclair_typebox.TBoolean;
|
|
183
|
+
/** Beats. */
|
|
184
|
+
start: _sinclair_typebox.TNumber;
|
|
185
|
+
end: _sinclair_typebox.TNumber;
|
|
186
|
+
}>>;
|
|
187
|
+
instruments: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
188
|
+
id: _sinclair_typebox.TString;
|
|
189
|
+
name: _sinclair_typebox.TString;
|
|
190
|
+
preset: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"synth">, _sinclair_typebox.TLiteral<"polySynth">, _sinclair_typebox.TLiteral<"fmSynth">, _sinclair_typebox.TLiteral<"amSynth">, _sinclair_typebox.TLiteral<"membraneSynth">, _sinclair_typebox.TLiteral<"metalSynth">, _sinclair_typebox.TLiteral<"noiseSynth">, _sinclair_typebox.TLiteral<"pluckSynth">]>;
|
|
191
|
+
oscillator: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"sine">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"sawtooth">, _sinclair_typebox.TLiteral<"triangle">]>>;
|
|
192
|
+
envelope: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
193
|
+
attack: _sinclair_typebox.TNumber;
|
|
194
|
+
decay: _sinclair_typebox.TNumber;
|
|
195
|
+
sustain: _sinclair_typebox.TNumber;
|
|
196
|
+
release: _sinclair_typebox.TNumber;
|
|
197
|
+
}>>;
|
|
198
|
+
/** Output trim in dB. */
|
|
199
|
+
volume: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
200
|
+
effects: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
201
|
+
id: _sinclair_typebox.TString;
|
|
202
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"reverb">, _sinclair_typebox.TLiteral<"delay">, _sinclair_typebox.TLiteral<"distortion">, _sinclair_typebox.TLiteral<"filter">]>;
|
|
203
|
+
/** Dry/wet mix, 0–1. */
|
|
204
|
+
wet: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
205
|
+
/** Effect-specific settings forwarded to the Tone.js constructor. */
|
|
206
|
+
options: _sinclair_typebox.TOptional<_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean]>>>;
|
|
207
|
+
}>>>;
|
|
208
|
+
}>>;
|
|
209
|
+
tracks: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
210
|
+
id: _sinclair_typebox.TString;
|
|
211
|
+
name: _sinclair_typebox.TString;
|
|
212
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"instrument">, _sinclair_typebox.TLiteral<"audio">]>;
|
|
213
|
+
instrumentId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
214
|
+
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
215
|
+
/** Fader in dB. */
|
|
216
|
+
volume: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
217
|
+
/** -1 (left) … 1 (right). */
|
|
218
|
+
pan: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
219
|
+
mute: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
220
|
+
solo: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
221
|
+
}>>;
|
|
222
|
+
clips: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
223
|
+
kind: _sinclair_typebox.TLiteral<"notes">;
|
|
224
|
+
id: _sinclair_typebox.TString;
|
|
225
|
+
trackId: _sinclair_typebox.TString;
|
|
226
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
227
|
+
/** Beats from the song start. */
|
|
228
|
+
start: _sinclair_typebox.TNumber;
|
|
229
|
+
/** Beats; notes past the end are not played. */
|
|
230
|
+
length: _sinclair_typebox.TNumber;
|
|
231
|
+
notes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
232
|
+
id: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
233
|
+
/** MIDI pitch, 0–127. */
|
|
234
|
+
pitch: _sinclair_typebox.TInteger;
|
|
235
|
+
/** Beats from the clip start. */
|
|
236
|
+
start: _sinclair_typebox.TNumber;
|
|
237
|
+
/** Beats. */
|
|
238
|
+
duration: _sinclair_typebox.TNumber;
|
|
239
|
+
/** 0–1; defaults to 0.8. */
|
|
240
|
+
velocity: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
241
|
+
}>>;
|
|
242
|
+
}>, _sinclair_typebox.TObject<{
|
|
243
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
244
|
+
id: _sinclair_typebox.TString;
|
|
245
|
+
trackId: _sinclair_typebox.TString;
|
|
246
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
247
|
+
/** URL of the audio file. */
|
|
248
|
+
url: _sinclair_typebox.TString;
|
|
249
|
+
/** Beats from the song start. */
|
|
250
|
+
start: _sinclair_typebox.TNumber;
|
|
251
|
+
/** Seconds trimmed from the start of the file. */
|
|
252
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
253
|
+
/** Beats. */
|
|
254
|
+
length: _sinclair_typebox.TNumber;
|
|
255
|
+
/** Clip gain in dB. */
|
|
256
|
+
gain: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
257
|
+
}>]>>;
|
|
258
|
+
/** Master fader in dB. */
|
|
259
|
+
masterVolume: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
260
|
+
}>;
|
|
261
|
+
type SongDefinition = Static<typeof SongDefinitionSchema>;
|
|
262
|
+
|
|
263
|
+
export { AudioClipSchema as A, type Envelope as E, InstrumentDefinitionSchema as I, NoteClipSchema as N, type OscillatorType as O, SongDefinitionSchema as S, TimeSignatureSchema as T, InstrumentEffectSchema as a, InstrumentPresetSchema as b, SongTrackSchema as c, SongClipSchema as d, SongNoteSchema as e, SongLoopSchema as f, type SongDefinition as g, type InstrumentDefinition as h, type InstrumentEffect as i, type InstrumentPreset as j, type EffectType as k, type SongTrack as l, type SongClip as m, type NoteClip as n, type AudioClip as o, type SongNote as p, type TimeSignature as q, type SongLoop as r };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as a,g as b}from"./chunk-2PFNNGTV.js";import"./chunk-QGIYILYI.js";import"./chunk-WOT6VMZA.js";export{a as createSongPlayer,b as getActiveSongPlayer};
|