@maccesar/titools 5.2.3 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- > Source snapshot: official TiSynthEngine 1.0.2 documentation from the reviewed working-tree based on `4a45f21230ffc5a8838fbd5fc108dd3ab470362a` (2026-10-29). Upstream `documentation/api.md` SHA-256: `0eae9bb5d07500fd33a9b767bd0036a491a2947954cd5c3b7fa51035ba375857`.
1
+ > Source snapshot: official TiSynthEngine documentation at commit `b07c97c762be5905f132cecf33e9d60ea0c21316` (2026-11-02). Published 1.0.2; local 1.1.0 candidates; public API 1.0.0. Upstream `documentation/api.md` SHA-256: `fed350aedb50da41b303e8bb8129c6381285e1aa708c6a0a70d3a9b5f2994e44`.
2
2
 
3
3
  # API reference
4
4
 
@@ -11,6 +11,7 @@ Android and iOS expose the same nineteen methods, one event and waveform values.
11
11
  <!-- TOC-START -->
12
12
  ## Contents
13
13
 
14
+ - [Native attack variation (local package 1.1.0)](#native-attack-variation-local-package-110)
14
15
  - [Return values](#return-values)
15
16
  - [`getDefaults()`](#getdefaults)
16
17
  - [Limits](#limits)
@@ -37,6 +38,10 @@ Android and iOS expose the same nineteen methods, one event and waveform values.
37
38
 
38
39
  <!-- TOC-END -->
39
40
 
41
+ ## Native attack variation (local package 1.1.0)
42
+
43
+ The optional `variation` dictionary is accepted by `playTone`, `playChord`, `noteOn`, sequence `voice` and step `overrides`. Public API compatibility remains `1.0.0`. Both platforms advertise `capabilities.variation: true` and `variationSchemaVersion: 1`; consumers must require both before sending the dictionary. The published 1.0.2 packages do not support it. See [native variation](native-variation.md) for fields, source restrictions, seeds and examples. Native `amount` is linear; Studio divides its displayed percentage by 100. `updateVoice` rejects the dictionary. An override replaces the whole inherited dictionary, and an amount-zero dictionary still validates its ranges.
44
+
40
45
  ## Return values
41
46
 
42
47
  `start`, `playTone`, `playChord`, `noteOn`, `noteOff`, `updateVoice`, `setVolume`, `setTempo`, `updateSequence`, `stopSequence` and `setMasterProcessing` return a Boolean. `playSequence` returns a positive sequence identifier, or 0 when rejected. `true` means the request was accepted. `false` means validation failed, the engine was unavailable, or the native command queue was full.
@@ -51,11 +56,13 @@ Returns the installed contract without starting the audio stream.
51
56
  var contract = synth.getDefaults()
52
57
  ```
53
58
 
54
- The shared result has this shape; Android adds the platform metadata described below:
59
+ The shared result in the local 1.1.0 candidates has this shape; Android adds the platform metadata described below. Published 1.0.2 packages retain the core contract but omit the variation capability/schema fields:
55
60
 
56
61
  ```javascript
57
62
  {
58
63
  apiVersion: '1.0.0',
64
+ capabilities: { variation: true },
65
+ variationSchemaVersion: 1,
59
66
  defaults: {
60
67
  maxVoices: 8,
61
68
  maxSequences: 1,
@@ -116,49 +123,49 @@ The shared result has this shape; Android adds the platform metadata described b
116
123
 
117
124
  `fmDepthEnd`, `detunes`, `spatialX` and `spatialY` have no reported default: their presence changes how the call is interpreted. Supplying a spatial coordinate enables binaural; the other coordinate then defaults to 0 internally. The maximum frequency is `sampleRate * 0.45`. Before the stream opens, the reported fallback is 19,845 Hz. Read the object again after `start()` if the precise device limit matters.
118
125
 
119
- Android additionally reports `capabilities: { nativeSequence: true, masterProcessing: true, modulations: true }` and `limits.stepDurationMs`. The reviewed iOS result omits those two metadata entries while implementing the corresponding methods and millisecond sequences. Both platforms report `limits.maxSequences`, `limits.priority` and `limits.effectSend`. Detect the required methods instead of requiring an Android-only flag. `limits.stepDuration` is in beats on both platforms; for millisecond sequences the accepted range is `4000 / sampleRate` through 60,000.
126
+ In the local 1.1.0 candidates, both platforms report `capabilities.variation: true` and `variationSchemaVersion: 1`. Android additionally reports `nativeSequence`, `masterProcessing` and `modulations` capability flags and `limits.stepDurationMs`. iOS omits those three older flags and `limits.stepDurationMs` while implementing the corresponding methods and millisecond sequences. Published 1.0.2 packages do not advertise variation; their iOS metadata has no `capabilities` map. Detect a required core method with `typeof synth.playSequence === 'function'` (and the other methods your feature needs); require the capability/schema pair specifically for variation. Both platforms report `limits.maxSequences`, `limits.priority` and `limits.effectSend`. `limits.stepDuration` is in beats on both platforms; millisecond sequences accept `4000 / sampleRate` through 60,000 even when `limits.stepDurationMs` is absent.
120
127
 
121
128
  ## Limits
122
129
 
123
130
  All ranges include their endpoints. `getDefaults().limits` uses `{ min, max }` objects. Sweep targets and array elements share the corresponding base range: `panEnd`/`pans[]` use `pan`, `frequencyEnd` accepts 0 through the frequency maximum, but only targets of at least 1 Hz enable a sweep (values below 1 disable it), `noiseRateEnd` uses `noiseRate`, `filterHzEnd` uses `filterHz` plus disabled value 0, `fmDepthEnd` uses `fmDepth`, and `detunes[]` uses `detune`. The sample-count key is `waveTableSamples`; there is no `limits.waveTable` object.
124
131
 
125
- | Field | Minimum | Maximum | Unit or rule |
126
- | --------------------------- | --------: | ------------------: | ------------------------------------------------------------------------- |
127
- | `maxSequences` | 1 | 4 | preallocated sequence capacity |
128
- | `priority` | 0 | 3 | integer admission priority |
129
- | `effectSend` | 0 | 1 | explicit processed share |
130
- | `maxVoices` | 1 | 32 | integer voices |
131
- | `frequency` | 1 | `sampleRate * 0.45` | Hz |
132
- | `duration` | 1 | 60,000 | integer ms, including timed-event duration |
133
- | `attack` | 0 | 2,000 | integer ms; must be less than duration |
134
- | `release` | 0 | 4,000 | integer ms; must fit after attack |
135
- | `volume` | 0 | 2 | event or master multiplier |
136
- | `waveType` | 0 | 5 | integer waveform value |
137
- | `sequenceSteps` | 1 | 512 | object steps |
138
- | `pan`, `panEnd`, `pans[]` | -1 | 1 | left to right |
139
- | `spatialX`, `spatialY` | -1 | 1 | initial binaural direction; omitted unless enabled |
140
- | `panSpread` | 0 | 1 | chord stereo width |
141
- | `frequencyEnd` | 0 | `sampleRate * 0.45` | Hz; values below 1 disable the sweep |
142
- | `lfoFreq` | 0 | 20,000 | Hz; 0 disables vibrato |
143
- | `lfoDepth` | 0 | 20,000 | Hz |
144
- | `noiseRate`, `noiseRateEnd` | 0 | `sampleRate * 0.45` | Hz; 0 selects white noise or disables the sweep |
145
- | `lowPassHz` | 0 | `sampleRate * 0.45` | Hz; 0 disables the filter |
146
- | `pulseWidth` | 0.05 | 0.95 | fraction of a square-wave cycle |
147
- | `pulseWidthEnd` | 0 or 0.05 | 0.95 | 0 disables the sweep |
148
- | `waveTable` | 2 samples | 64 samples | each value must be from -1 to 1; count range is `limits.waveTableSamples` |
149
- | `bitDepth` | 0 or 2 | 16 | integer bits; 0 disables quantization |
150
- | `bpm` | 20 | 300 | beats per minute |
151
- | `swing` | -0.75 | 0.75 | alternating timing offset |
152
- | `stepDuration` | `20 / sampleRate` | 300 | beats; returned by both platforms |
153
- | `stepDurationMs` | `4000 / sampleRate` | 60,000 | ms; returned by Android only, accepted in ms sequences on both |
154
- | `decay` | 0 | 4,000 | integer ms; `attack` plus `decay` must fit in the event |
155
- | `sustain` | 0 | 1 | level held after the decay |
156
- | `filterHz` | 20 | `sampleRate * 0.45` | Hz |
157
- | `filterHzEnd` | 0 or 20 | `sampleRate * 0.45` | Hz; 0 disables the sweep |
158
- | `filterQ` | 0.5 | 10 | resonance |
159
- | `fmRatio` | 0.1 | 16 | modulator frequency divided by carrier frequency |
160
- | `fmDepth`, `fmDepthEnd` | 0 | 10 | modulation index in radians |
161
- | `detune`, `detunes[]` | -1200 | 1200 | cents |
132
+ | Field | Minimum | Maximum | Unit or rule |
133
+ | --------------------------- | ------------------: | ------------------: | ------------------------------------------------------------------------- |
134
+ | `maxSequences` | 1 | 4 | preallocated sequence capacity |
135
+ | `priority` | 0 | 3 | integer admission priority |
136
+ | `effectSend` | 0 | 1 | explicit processed share |
137
+ | `maxVoices` | 1 | 32 | integer voices |
138
+ | `frequency` | 1 | `sampleRate * 0.45` | Hz |
139
+ | `duration` | 1 | 60,000 | integer ms, including timed-event duration |
140
+ | `attack` | 0 | 2,000 | integer ms; must be less than duration |
141
+ | `release` | 0 | 4,000 | integer ms; must fit after attack |
142
+ | `volume` | 0 | 2 | event or master multiplier |
143
+ | `waveType` | 0 | 5 | integer waveform value |
144
+ | `sequenceSteps` | 1 | 512 | object steps |
145
+ | `pan`, `panEnd`, `pans[]` | -1 | 1 | left to right |
146
+ | `spatialX`, `spatialY` | -1 | 1 | initial binaural direction; omitted unless enabled |
147
+ | `panSpread` | 0 | 1 | chord stereo width |
148
+ | `frequencyEnd` | 0 | `sampleRate * 0.45` | Hz; values below 1 disable the sweep |
149
+ | `lfoFreq` | 0 | 20,000 | Hz; 0 disables vibrato |
150
+ | `lfoDepth` | 0 | 20,000 | Hz |
151
+ | `noiseRate`, `noiseRateEnd` | 0 | `sampleRate * 0.45` | Hz; 0 selects white noise or disables the sweep |
152
+ | `lowPassHz` | 0 | `sampleRate * 0.45` | Hz; 0 disables the filter |
153
+ | `pulseWidth` | 0.05 | 0.95 | fraction of a square-wave cycle |
154
+ | `pulseWidthEnd` | 0 or 0.05 | 0.95 | 0 disables the sweep |
155
+ | `waveTable` | 2 samples | 64 samples | each value must be from -1 to 1; count range is `limits.waveTableSamples` |
156
+ | `bitDepth` | 0 or 2 | 16 | integer bits; 0 disables quantization |
157
+ | `bpm` | 20 | 300 | beats per minute |
158
+ | `swing` | -0.75 | 0.75 | alternating timing offset |
159
+ | `stepDuration` | `20 / sampleRate` | 300 | beats; returned by both platforms |
160
+ | `stepDurationMs` | `4000 / sampleRate` | 60,000 | ms; returned by Android only, accepted in ms sequences on both |
161
+ | `decay` | 0 | 4,000 | integer ms; `attack` plus `decay` must fit in the event |
162
+ | `sustain` | 0 | 1 | level held after the decay |
163
+ | `filterHz` | 20 | `sampleRate * 0.45` | Hz |
164
+ | `filterHzEnd` | 0 or 20 | `sampleRate * 0.45` | Hz; 0 disables the sweep |
165
+ | `filterQ` | 0.5 | 10 | resonance |
166
+ | `fmRatio` | 0.1 | 16 | modulator frequency divided by carrier frequency |
167
+ | `fmDepth`, `fmDepthEnd` | 0 | 10 | modulation index in radians |
168
+ | `detune`, `detunes[]` | -1200 | 1200 | cents |
162
169
 
163
170
  ## `start(options)`
164
171
 
@@ -166,7 +173,7 @@ Starts the native stream. Calling it again while the engine is running returns `
166
173
 
167
174
  | Key | Type | Default | Description |
168
175
  | --------------- | ------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
169
- | `maxSequences` | integer | `1` | Preallocated simultaneous sequence capacity, from 1 to 4. |
176
+ | `maxSequences` | integer | `1` | Preallocated simultaneous sequence capacity, from 1 to 4. |
170
177
  | `maxVoices` | integer | `8` | Size of the voice pool, from 1 to 32. |
171
178
  | `mixingProfile` | string | `conservative` | `conservative`, `balanced`, `speakerSafe` or `raw`. Matching is case-insensitive. |
172
179
  | `audioSession` | string | `playback` | iOS session category: `playback` or `ambient`. Matching is case-insensitive. Android validates the value and does not change its output. |
@@ -181,28 +188,29 @@ On iOS, `playback` ignores the silent switch and interrupts other apps' audio. `
181
188
 
182
189
  Starts a sustained native voice. Detect `typeof synth.noteOn === 'function'`, `noteOff` and `updateVoice` before enabling their controls; `apiVersion` is `1.0.0`. There is no duration limit and no JavaScript timer holds the note.
183
190
 
184
- | Field | Rule |
185
- | --- | --- |
186
- | `voiceId` | Required positive integer, 1-2,147,483,647, supplied by the app. |
187
- | `frequency`, `note` | Optional mutually exclusive pitch; default 440 Hz, same ranges as playTone. |
191
+ | Field | Rule |
192
+ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
193
+ | `voiceId` | Required positive integer, 1-2,147,483,647, supplied by the app. |
194
+ | `frequency`, `note` | Optional mutually exclusive pitch; default 440 Hz, same ranges as playTone. |
188
195
  | `attack`, `decay`, `sustain`, `release` | ADSR configuration for this attack; release begins only on noteOff. Same individual ranges as playTone, without a duration budget. |
189
- | `volume` | Initial voice level, 0-2; default 1. |
190
- | `waveType` | One of the six waveTypes; fixed for this attack. |
191
- | `pan` | Initial stereo position, −1…1. Conflicts with spatial coordinates. |
192
- | `lfoFreq`, `lfoDepth` | Initial vibrato, 0-20,000 Hz; default 0. |
193
- | `noiseRate`, `lowPassHz` | Initial noise clock / one-pole cutoff, 0 through the frequency maximum; default 0. |
194
- | `pulseWidth` | Initial square-wave duty cycle, 0.05-0.95; default 0.5. |
195
- | `waveTable` | Fixed table of 2-64 samples in −1…1; required for WAVETABLE. |
196
- | `bitDepth` | Fixed amplitude quantization, 0 or integer 2-16; default 0. |
197
- | `filterType` | Fixed none/lowpass/highpass/bandpass; default none. |
198
- | `filterHz`, `filterQ` | Initial cutoff and Q; a non-none filter type is required. |
199
- | `fmRatio`, `fmDepth` | Initial sine FM; same rules and ranges as playTone. |
200
- | `detune` | Initial pitch offset in cents, −1200…1200; default 0. |
201
- | `spatialX`, `spatialY` | Initial binaural position in −1…1; omitted for stereo. |
202
- | `modulations` | Up to two native LFOs; see Additional voice modulation. |
203
- | `bus` | Category: music, effects (default), ui or ambience. |
204
- | `effectSend` | Optional explicit processed share 0-1, replacing category selection. |
205
- | `priority` | Integer admission priority 0-3, default 0. |
196
+ | `volume` | Initial voice level, 0-2; default 1. |
197
+ | `waveType` | One of the six waveTypes; fixed for this attack. |
198
+ | `pan` | Initial stereo position, −1…1. Conflicts with spatial coordinates. |
199
+ | `lfoFreq`, `lfoDepth` | Initial vibrato, 0-20,000 Hz; default 0. |
200
+ | `noiseRate`, `lowPassHz` | Initial noise clock / one-pole cutoff, 0 through the frequency maximum; default 0. |
201
+ | `pulseWidth` | Initial square-wave duty cycle, 0.05-0.95; default 0.5. |
202
+ | `waveTable` | Fixed table of 2-64 samples in −1…1; required for WAVETABLE. |
203
+ | `bitDepth` | Fixed amplitude quantization, 0 or integer 2-16; default 0. |
204
+ | `filterType` | Fixed none/lowpass/highpass/bandpass; default none. |
205
+ | `filterHz`, `filterQ` | Initial cutoff and Q; a non-none filter type is required. |
206
+ | `fmRatio`, `fmDepth` | Initial sine FM; same rules and ranges as playTone. |
207
+ | `detune` | Initial pitch offset in cents, −1200…1200; default 0. |
208
+ | `spatialX`, `spatialY` | Initial binaural position in −1…1; omitted for stereo. |
209
+ | `modulations` | Up to two native LFOs; see Additional voice modulation. |
210
+ | `bus` | Category: music, effects (default), ui or ambience. |
211
+ | `effectSend` | Optional explicit processed share 0-1, replacing category selection. |
212
+ | `priority` | Integer admission priority 0-3, default 0. |
213
+ | `variation` | Optional attack-only ranges; see Native attack variation. |
206
214
 
207
215
  No `duration` or temporal `*End` targets are accepted. Source, table, filter type and envelope configuration require a new attack; compatible position controls can be updated. Other initial defaults and cross-field validation rules match `playTone`.
208
216
 
@@ -214,28 +222,28 @@ Repeating a public sustained note can inherit the oscillator phase and pre-envel
214
222
 
215
223
  ## `noteOff(options)`
216
224
 
217
- | Field | Rule |
218
- | --- | --- |
225
+ | Field | Rule |
226
+ | --------- | ------------------------------------------- |
219
227
  | `voiceId` | Required positive integer, 1-2,147,483,647. |
220
228
 
221
229
  Begins release from the current level, including during attack or decay. Repeated release requests never restart or lengthen a release. An ended or stolen ID is a no-op. `true` reports validation and queue publication, not proof of an audible voice. On `false` from a full queue, an instrument should retry twice at 16 ms intervals, then shut down and report failure if release still cannot be published.
222
230
 
223
231
  ## `updateVoice(options)`
224
232
 
225
- | Field | Rule |
226
- | --- | --- |
227
- | `voiceId` | Required positive integer, 1-2,147,483,647. |
228
- | `frequency`, `note` | Mutually exclusive target pitch. Same frequency/note ranges as playTone. |
229
- | `volume` | Target voice level, 0-2. |
230
- | `filterHz`, `filterQ` | Target cutoff/Q; only for a voice that started with a resonant filter. |
231
- | `lfoFreq`, `lfoDepth` | Target vibrato rate/deviation, 0-20,000 Hz. |
232
- | `pulseWidth` | Target duty cycle, 0.05-0.95; only for a square voice. |
233
- | `fmRatio`, `fmDepth` | Target FM ratio 0.1-16 / depth 0-10; only for a sine voice. |
234
- | `modulations` | Replace up to two native LFOs; empty array disables them while preserving phase. |
235
- | `noiseRate`, `lowPassHz` | Live noise clock/one-pole cutoff; 0 means white noise/bypass. |
236
- | `pan` | Target stereo position for a voice started without spatial coordinates. |
237
- | `spatialX`, `spatialY` | Target position for a spatial held voice; omitted coordinate stays unchanged. |
238
- | `effectSend` | Explicit processed share, 0-1, overriding category selection. |
233
+ | Field | Rule |
234
+ | ------------------------ | -------------------------------------------------------------------------------- |
235
+ | `voiceId` | Required positive integer, 1-2,147,483,647. |
236
+ | `frequency`, `note` | Mutually exclusive target pitch. Same frequency/note ranges as playTone. |
237
+ | `volume` | Target voice level, 0-2. |
238
+ | `filterHz`, `filterQ` | Target cutoff/Q; only for a voice that started with a resonant filter. |
239
+ | `lfoFreq`, `lfoDepth` | Target vibrato rate/deviation, 0-20,000 Hz. |
240
+ | `pulseWidth` | Target duty cycle, 0.05-0.95; only for a square voice. |
241
+ | `fmRatio`, `fmDepth` | Target FM ratio 0.1-16 / depth 0-10; only for a sine voice. |
242
+ | `modulations` | Replace up to two native LFOs; empty array disables them while preserving phase. |
243
+ | `noiseRate`, `lowPassHz` | Live noise clock/one-pole cutoff; 0 means white noise/bypass. |
244
+ | `pan` | Target stereo position for a voice started without spatial coordinates. |
245
+ | `spatialX`, `spatialY` | Target position for a spatial held voice; omitted coordinate stays unchanged. |
246
+ | `effectSend` | Explicit processed share, 0-1, overriding category selection. |
239
247
 
240
248
  At least one change is required. An incompatible change rejects the entire request when the ID is known; unknown/ended IDs accept publication as a no-op. The callback also checks source compatibility before applying a command. Changed continuous parameters ramp linearly from their current values over 10 ms. New targets retarget that ramp without restarting oscillator phase or the envelope. Unchanged parameters retain their current ramps. This also works during release.
241
249
 
@@ -259,49 +267,51 @@ Use `stopAll()` for panic: it stops every sequence, fades sounding voices and in
259
267
 
260
268
  Plays one pitch. It uses 440 Hz when neither pitch field is present. Note names accept C through B or DO, RE, MI, FA, SOL, LA, SI and TI, followed by optional `#` or lowercase `b` and one octave digit from 0 to 9. Letters are case-insensitive, the omitted octave is 4, and A4 is 440 Hz. A valid named pitch is limited to the active frequency ceiling when rendered; an out-of-range numeric `frequency` is rejected.
261
269
 
262
- | Key | Type | Default | Description |
263
- | --------------- | -------- | ------------: | ------------------------------------------------------------------------------------------ |
264
- | `frequency` | number | `440` | Starting frequency in Hz. Cannot be combined with `note`. |
265
- | `note` | string | none | Note name. Cannot be combined with `frequency`. |
266
- | `duration` | integer | `500` | Total event length in ms. |
267
- | `attack` | integer | `50` | Fade-in time in ms. |
268
- | `release` | integer | `50` | Fade-out time in ms. |
269
- | `volume` | number | `1` | Event level multiplier. |
270
- | `waveType` | integer | `SINE` | One of the six waveform values. |
271
- | `pan` | number | `0` | Starting stereo position. |
272
- | `panEnd` | number | same as `pan` | Ending stereo position; omission keeps the position fixed. |
273
- | `frequencyEnd` | number | `0` | Ending frequency; values below 1 keep the starting pitch. |
274
- | `lfoFreq` | number | `0` | Vibrato rate in Hz. |
275
- | `lfoDepth` | number | `0` | Vibrato depth in Hz. |
276
- | `noiseRate` | number | `0` | Noise update rate; 0 produces a fresh value per sample. |
277
- | `noiseRateEnd` | number | `0` | Ending noise update rate; 0 disables the sweep. |
278
- | `lowPassHz` | number | `0` | Per-voice low-pass cutoff; 0 bypasses it. |
279
- | `pulseWidth` | number | `0.5` | Duty cycle for `SQUARE`. |
280
- | `pulseWidthEnd` | number | `0` | Ending duty cycle; 0 disables the sweep. |
281
- | `waveTable` | number[] | none | Required for `WAVETABLE`; 2 to 64 normalized samples. |
282
- | `bitDepth` | integer | `0` | Amplitude quantization from 2 to 16 bits; 0 disables it. |
283
- | `decay` | integer | `0` | Milliseconds to fall from full level to `sustain` after the attack. |
284
- | `sustain` | number | `1` | Level held after the decay, from 0 to 1. |
285
- | `filterType` | string | `none` | `none`, `lowpass`, `highpass` or `bandpass`. Case-insensitive. |
286
- | `filterHz` | number | `1000` | Cutoff, or center for `bandpass`, in Hz. |
287
- | `filterHzEnd` | number | `0` | Ending cutoff; 0 disables the sweep. |
288
- | `filterQ` | number | `0.7071` | Resonance, from 0.5 to 10. |
289
- | `fmRatio` | number | `1` | Modulator frequency as a multiple of the carrier. |
290
- | `fmDepth` | number | `0` | Modulation index; 0 leaves FM off unless `fmDepthEnd` is set. |
291
- | `fmDepthEnd` | number | none | Ending index. Omit it for no sweep; 0 is a valid target. |
292
- | `detune` | number | `0` | Pitch offset in cents, applied to `frequency` and `frequencyEnd`. |
293
- | `spatialX` | number | omitted | Fixed left/right binaural direction; see [positioning](#binaural-front-plane-positioning). |
294
- | `spatialY` | number | omitted | Fixed below/above binaural direction. |
295
- | `bus` | string | `effects` | Category: music, effects, ui or ambience. |
296
- | `effectSend` | number | omitted | Explicit processed share 0-1; replaces category selection. |
297
- | `priority` | integer | `0` | Admission priority 0-3; higher voices are protected. |
270
+ | Key | Type | Default | Description |
271
+ | --------------- | ---------- | ------------: | ------------------------------------------------------------------------------------------ |
272
+ | `frequency` | number | `440` | Starting frequency in Hz. Cannot be combined with `note`. |
273
+ | `note` | string | none | Note name. Cannot be combined with `frequency`. |
274
+ | `duration` | integer | `500` | Total event length in ms. |
275
+ | `attack` | integer | `50` | Fade-in time in ms. |
276
+ | `release` | integer | `50` | Fade-out time in ms. |
277
+ | `volume` | number | `1` | Event level multiplier. |
278
+ | `waveType` | integer | `SINE` | One of the six waveform values. |
279
+ | `pan` | number | `0` | Starting stereo position. |
280
+ | `panEnd` | number | same as `pan` | Ending stereo position; omission keeps the position fixed. |
281
+ | `frequencyEnd` | number | `0` | Ending frequency; values below 1 keep the starting pitch. |
282
+ | `lfoFreq` | number | `0` | Vibrato rate in Hz. |
283
+ | `lfoDepth` | number | `0` | Vibrato depth in Hz. |
284
+ | `noiseRate` | number | `0` | Noise update rate; 0 produces a fresh value per sample. |
285
+ | `noiseRateEnd` | number | `0` | Ending noise update rate; 0 disables the sweep. |
286
+ | `lowPassHz` | number | `0` | Per-voice low-pass cutoff; 0 bypasses it. |
287
+ | `pulseWidth` | number | `0.5` | Duty cycle for `SQUARE`. |
288
+ | `pulseWidthEnd` | number | `0` | Ending duty cycle; 0 disables the sweep. |
289
+ | `waveTable` | number[] | none | Required for `WAVETABLE`; 2 to 64 normalized samples. |
290
+ | `bitDepth` | integer | `0` | Amplitude quantization from 2 to 16 bits; 0 disables it. |
291
+ | `decay` | integer | `0` | Milliseconds to fall from full level to `sustain` after the attack. |
292
+ | `sustain` | number | `1` | Level held after the decay, from 0 to 1. |
293
+ | `filterType` | string | `none` | `none`, `lowpass`, `highpass` or `bandpass`. Case-insensitive. |
294
+ | `filterHz` | number | `1000` | Cutoff, or center for `bandpass`, in Hz. |
295
+ | `filterHzEnd` | number | `0` | Ending cutoff; 0 disables the sweep. |
296
+ | `filterQ` | number | `0.7071` | Resonance, from 0.5 to 10. |
297
+ | `fmRatio` | number | `1` | Modulator frequency as a multiple of the carrier. |
298
+ | `fmDepth` | number | `0` | Modulation index; 0 leaves FM off unless `fmDepthEnd` is set. |
299
+ | `fmDepthEnd` | number | none | Ending index. Omit it for no sweep; 0 is a valid target. |
300
+ | `detune` | number | `0` | Pitch offset in cents, applied to `frequency` and `frequencyEnd`. |
301
+ | `spatialX` | number | omitted | Fixed left/right binaural direction; see [positioning](#binaural-front-plane-positioning). |
302
+ | `spatialY` | number | omitted | Fixed below/above binaural direction. |
303
+ | `bus` | string | `effects` | Category: music, effects, ui or ambience. |
304
+ | `effectSend` | number | omitted | Explicit processed share 0-1; replaces category selection. |
305
+ | `priority` | integer | `0` | Admission priority 0-3; higher voices are protected. |
306
+ | `variation` | dictionary | omitted | Optional attack-only ranges; see Native attack variation. |
298
307
 
299
308
  Omitted attack/release values are shortened to fit an event smaller than the default envelope. Explicit values must satisfy the documented envelope rules. `getDefaults()` reports the baseline defaults, not these per-event adjustments.
300
309
 
301
- At this source pin, the iOS timed tone/chord command builder converts accepted
302
- zero attack/release values to at least one sample. Android retains zero samples.
303
- This differs from the shared validator accepting zero; do not promise identical
304
- zero-edge rendering. Held notes have the separately documented 3 ms minimum.
310
+ In the current 1.0.2/1.1.0 implementations, the iOS timed tone/chord command builder
311
+ initially rounds accepted zero attack/release values to one sample, before
312
+ trimming them to the event duration budget. Android retains zero samples.
313
+ Validator acceptance does not imply identical zero-edge rendering. Held notes
314
+ have the separately documented 3 ms minimum.
305
315
 
306
316
  The controls from `decay` to `detune` are described in [Expressive controls](#expressive-controls), including the rules that tie them together.
307
317
 
@@ -317,23 +327,23 @@ Returns Boolean acceptance. BPM is 20-300, initially 120. The change applies at
317
327
 
318
328
  Returns a positive `sequenceId` on accepted atomic publication, or 0 on rejection. Identifiers never repeat during the module's lifetime, including across shutdown/start. Publication acceptance precedes application by the callback. Capacity exhaustion, unavailable banks or invalid options reject the complete operation.
319
329
 
320
- | Root field | Rule |
321
- | --- | --- |
322
- | `steps` | Required array of 1-512 step objects. |
323
- | `timeUnit` | `beats` (default) or `ms`, fixed for this sequence. One beat is a quarter note. |
324
- | `stepDuration` | Default 0.25 beats or 100 ms; maximum 300 beats or 60,000 ms. Minimum is four output samples at the highest tempo and maximum swing: `20 / sampleRate` beats or `4000 / sampleRate` ms. |
325
- | `gate` | 0.01-1, default 0.8; fraction of the effective interval before note release begins. |
326
- | `loop` | Boolean, default false. |
327
- | `swing` | −0.75…0.75, default 0. For intervals A/B, shifts `swing * min(A, B)` from the second interval to the first, preserving the pair's total length. Applies at the next pair. |
328
- | `mode` | `normal` (default), `up`, `down` or `updown`. Arpeggios traverse sounding steps in pitch order; rests participate only in normal mode. |
329
- | `tuning` | A4 frequency, 220-880 Hz, default 440. |
330
- | `detune` | MIDI pitch offset in cents, −1200…1200, default 0. |
331
- | `voice` | Inherited sound settings, listed below. |
332
- | `bus`, `effectSend`, `priority` | Inherited routing/admission settings; may also appear in `voice` or on each step. |
330
+ | Root field | Rule |
331
+ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
332
+ | `steps` | Required array of 1-512 step objects. |
333
+ | `timeUnit` | `beats` (default) or `ms`, fixed for this sequence. One beat is a quarter note. |
334
+ | `stepDuration` | Default 0.25 beats or 100 ms; maximum 300 beats or 60,000 ms. Minimum is four output samples at the highest tempo and maximum swing: `20 / sampleRate` beats or `4000 / sampleRate` ms. |
335
+ | `gate` | 0.01-1, default 0.8; fraction of the effective interval before note release begins. |
336
+ | `loop` | Boolean, default false. |
337
+ | `swing` | −0.75…0.75, default 0. For intervals A/B, shifts `swing * min(A, B)` from the second interval to the first, preserving the pair's total length. Applies at the next pair. |
338
+ | `mode` | `normal` (default), `up`, `down` or `updown`. Arpeggios traverse sounding steps in pitch order; rests participate only in normal mode. |
339
+ | `tuning` | A4 frequency, 220-880 Hz, default 440. |
340
+ | `detune` | MIDI pitch offset in cents, −1200…1200, default 0. |
341
+ | `voice` | Inherited sound settings, listed below. |
342
+ | `bus`, `effectSend`, `priority` | Inherited routing/admission settings; may also appear in `voice` or on each step. |
333
343
 
334
344
  Each step contains exactly one representation: `notes` (1-32 MIDI integers, 12-119), `frequencies` (1-32 frequencies in Hz), or `rest: true`. Duplicate pitches produce unison voices. Optional `duration` changes the interval until the next attack; `length` explicitly sets note duration until release begins and replaces gate for that step. Both use the sequence's time unit (at most 300 beats or 60,000 ms). Note length is positive, at least 0.000001; intervals use the four-sample scheduling minimum. Notes can overlap later attacks. Step `gate` overrides root gate. `overrides` merges shaping over root `voice`.
335
345
 
336
- The `voice` and `overrides` dictionaries accept `attack`, `decay`, `sustain`, `release`, `volume`, `waveType`, `pan`, `panEnd`, `frequencyEnd`, `lfoFreq`, `lfoDepth`, `noiseRate`, `noiseRateEnd`, `lowPassHz`, `pulseWidth`, `pulseWidthEnd`, `waveTable`, `bitDepth`, `filterType`, `filterHz`, `filterHzEnd`, `filterQ`, `fmRatio`, `fmDepth`, `fmDepthEnd`, `spatialX`, `spatialY`, `modulations`, `bus`, `effectSend` and `priority`. Individual tone parameter ranges and source/filter compatibility rules apply. ADSR remains in milliseconds and has no step-duration budget. Sweeps traverse the note's length and hold their destination throughout release. Chord compensation is fixed at attack; later notes never rescale existing voices.
346
+ The `voice` and `overrides` dictionaries accept `attack`, `decay`, `sustain`, `release`, `volume`, `waveType`, `pan`, `panEnd`, `frequencyEnd`, `lfoFreq`, `lfoDepth`, `noiseRate`, `noiseRateEnd`, `lowPassHz`, `pulseWidth`, `pulseWidthEnd`, `waveTable`, `bitDepth`, `filterType`, `filterHz`, `filterHzEnd`, `filterQ`, `fmRatio`, `fmDepth`, `fmDepthEnd`, `spatialX`, `spatialY`, `modulations`, `bus`, `effectSend`, `priority` and `variation`. A step variation replaces the entire inherited dictionary. Individual tone parameter ranges and source/filter compatibility rules apply. ADSR remains in milliseconds and has no step-duration budget. Sweeps traverse the note's length and hold their destination throughout release. Chord compensation is fixed at attack; later notes never rescale existing voices.
337
347
 
338
348
  ### `updateSequence({ sequenceId, ...changes })`
339
349
 
@@ -366,14 +376,14 @@ Selected audio follows fixed input gain → chorus → ping-pong delay → rever
366
376
 
367
377
  Requires a running engine and returns Boolean acceptance. Partial updates merge into the last accepted processing configuration, validate the complete result and publish atomically. Continuous controls ramp over 10 ms. Unknown fields, numeric booleans and non-finite values reject the whole edit. Detect method presence before use.
368
378
 
369
- | Section | Fields and initial values |
370
- | --- | --- |
371
- | Root | `applyTo`: array of `music`, `effects`, `ui`, `ambience` initially; empty selects none. |
372
- | Root | `inputGain`: 0-4, initially 1. |
373
- | `chorus` | `enabled`: false; `rate`: 0.05-5 Hz, initially 0.8; `depth`: 0-1, initially 0.4; `mix`: 0-1, initially 0.25. Stereo interpolated delay with offset modulation phases. |
374
- | `delay` | `enabled`: false; `timeMs`: 20-2000, initially 250; `sync`: off; `feedback`: 0-0.85, initially 0.3; `mix`: 0-1, initially 0.25. Ping-pong feedback and crossfade between changed read positions, up to four seconds reserved. |
375
- | `reverb` | `enabled`: false; `decay`: 0.2-8 seconds, initially 1.5; `damping`: 0-1, initially 0.5; `mix`: 0-1, initially 0.2. Stereo damped comb/allpass Schroeder network. |
376
- | `saturation` | `enabled`: false; `drive`: 1-4, initially 1; `mix`: 0-1, initially 1. Creative soft waveshaping that changes timbre. |
379
+ | Section | Fields and initial values |
380
+ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
381
+ | Root | `applyTo`: array of `music`, `effects`, `ui`, `ambience` initially; empty selects none. |
382
+ | Root | `inputGain`: 0-4, initially 1. |
383
+ | `chorus` | `enabled`: false; `rate`: 0.05-5 Hz, initially 0.8; `depth`: 0-1, initially 0.4; `mix`: 0-1, initially 0.25. Stereo interpolated delay with offset modulation phases. |
384
+ | `delay` | `enabled`: false; `timeMs`: 20-2000, initially 250; `sync`: off; `feedback`: 0-0.85, initially 0.3; `mix`: 0-1, initially 0.25. Ping-pong feedback and crossfade between changed read positions, up to four seconds reserved. |
385
+ | `reverb` | `enabled`: false; `decay`: 0.2-8 seconds, initially 1.5; `damping`: 0-1, initially 0.5; `mix`: 0-1, initially 0.2. Stereo damped comb/allpass Schroeder network. |
386
+ | `saturation` | `enabled`: false; `drive`: 1-4, initially 1; `mix`: 0-1, initially 1. Creative soft waveshaping that changes timbre. |
377
387
 
378
388
  Delay sync accepts `off`, `quarter`, `eighth`, `sixteenth`, `quarterTriplet`, `eighthTriplet` or `sixteenthTriplet`. Sync follows the native transport BPM, initially 120. Disabling an effect gradually closes its input and drains its tail, then restores exact bypass. Tails are bounded to 30 seconds with a final fade. `stopAll()` performs panic: it fades voices, stops the new transport and invalidates effect histories in bounded work. `shutdown()` stops the stream and frees buffers outside the callback.
379
389
 
@@ -385,13 +395,13 @@ Defaults keep all effects and saturation disabled, input gain at unity, and pres
385
395
 
386
396
  `noteOn` and `updateVoice` accept `modulations`, an array of up to two LFO objects. An empty array disables them. Omission on update preserves the previous configuration. Each object accepts only these fields:
387
397
 
388
- | Field | Rule |
389
- | --- | --- |
390
- | `wave` | `sine` (default) or `triangle`. |
398
+ | Field | Rule |
399
+ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
400
+ | `wave` | `sine` (default) or `triangle`. |
391
401
  | `target` | Required: `filterHz`, `pulseWidth` or `fmDepth`. Requires an active resonant filter, square source or sine source respectively. An explicit FM ratio with zero base depth is permitted when an FM-target LFO is enabled. |
392
- | `rate` | 0-20 Hz, default 1. Zero permits a stationary free-running phase. |
393
- | `depth` | 0-1, default 0; scales up to four cutoff octaves, 0.45 PWM offset or ten FM-index units. Two contributions sum with safe clamping. |
394
- | `sync` | Same musical values as delay; default off. Synced rates follow native tempo (up to 30 Hz at 300 BPM in sixteenth-note triplets). |
402
+ | `rate` | 0-20 Hz, default 1. Zero permits a stationary free-running phase. |
403
+ | `depth` | 0-1, default 0; scales up to four cutoff octaves, 0.45 PWM offset or ten FM-index units. Two contributions sum with safe clamping. |
404
+ | `sync` | Same musical values as delay; default off. Synced rates follow native tempo (up to 30 Hz at 300 BPM in sixteenth-note triplets). |
395
405
 
396
406
  Edits preserve oscillator/LFO phases. Continuous modulation contributions ramp over 10 ms; cutoff stays within 20 Hz and the frequency maximum, PWM within 0.05-0.95, FM index within 0-10. Initial modulations may also be inherited by sequence voices and overridden per step. These two slots coexist with the independent `lfoFreq`/`lfoDepth` pitch vibrato; they are not accepted by timed tones, chords .
397
407
 
@@ -399,35 +409,36 @@ Edits preserve oscillator/LFO phases. Continuous modulation contributions ramp o
399
409
 
400
410
  Starts 1 to 32 pitches as one atomic event. Exactly one pitch array is required.
401
411
 
402
- | Key | Type | Default | Description |
403
- | ------------- | -------- | -------------------: | -------------------------------------------------------------- |
404
- | `frequencies` | number[] | required alternative | Frequencies in Hz. |
405
- | `notes` | string[] | required alternative | Note names. |
406
- | `duration` | integer | `500` | Total chord length in ms. |
407
- | `attack` | integer | `50` | Fade-in time in ms. |
408
- | `release` | integer | `50` | Fade-out time in ms. |
409
- | `volume` | number | `1` | Chord event level. |
410
- | `waveType` | integer | `SINE` | Waveform for every voice. |
411
- | `panSpread` | number | `0` | Even stereo spread from 0 to 1. |
412
- | `pans` | number[] | none | Per-note pan positions; overrides spread for supplied entries. |
413
- | `noiseRate` | number | `0` | Fixed update rate for noise voices. |
414
- | `lowPassHz` | number | `0` | Fixed low-pass cutoff for every voice. |
415
- | `pulseWidth` | number | `0.5` | Fixed square-wave duty cycle. |
416
- | `waveTable` | number[] | none | Required when `waveType` is `WAVETABLE`. |
417
- | `bitDepth` | integer | `0` | Fixed amplitude quantization; 0 disables it. |
418
- | `decay` | integer | `0` | Fixed decay time shared by every voice. |
419
- | `sustain` | number | `1` | Fixed sustain level shared by every voice. |
420
- | `filterType` | string | `none` | Fixed filter type for every voice. |
421
- | `filterHz` | number | `1000` | Fixed cutoff or center in Hz. |
422
- | `filterQ` | number | `0.7071` | Fixed resonance. |
423
- | `fmRatio` | number | `1` | Fixed modulator ratio. |
424
- | `fmDepth` | number | `0` | Fixed modulation index; sine voices only. |
425
- | `detunes` | number[] | none | Per-note offsets in cents, matched to the pitch array. |
426
- | `spatialX` | number | omitted | Shared fixed left/right binaural direction. |
427
- | `spatialY` | number | omitted | Shared fixed below/above binaural direction. |
428
- | `bus` | string | `effects` | Category: music, effects, ui or ambience. |
429
- | `effectSend` | number | omitted | Explicit processed share 0-1; replaces category selection. |
430
- | `priority` | integer | `0` | Admission priority 0-3; higher voices are protected. |
412
+ | Key | Type | Default | Description |
413
+ | ------------- | ---------- | -------------------: | -------------------------------------------------------------- |
414
+ | `frequencies` | number[] | required alternative | Frequencies in Hz. |
415
+ | `notes` | string[] | required alternative | Note names. |
416
+ | `duration` | integer | `500` | Total chord length in ms. |
417
+ | `attack` | integer | `50` | Fade-in time in ms. |
418
+ | `release` | integer | `50` | Fade-out time in ms. |
419
+ | `volume` | number | `1` | Chord event level. |
420
+ | `waveType` | integer | `SINE` | Waveform for every voice. |
421
+ | `panSpread` | number | `0` | Even stereo spread from 0 to 1. |
422
+ | `pans` | number[] | none | Per-note pan positions; overrides spread for supplied entries. |
423
+ | `noiseRate` | number | `0` | Fixed update rate for noise voices. |
424
+ | `lowPassHz` | number | `0` | Fixed low-pass cutoff for every voice. |
425
+ | `pulseWidth` | number | `0.5` | Fixed square-wave duty cycle. |
426
+ | `waveTable` | number[] | none | Required when `waveType` is `WAVETABLE`. |
427
+ | `bitDepth` | integer | `0` | Fixed amplitude quantization; 0 disables it. |
428
+ | `decay` | integer | `0` | Fixed decay time shared by every voice. |
429
+ | `sustain` | number | `1` | Fixed sustain level shared by every voice. |
430
+ | `filterType` | string | `none` | Fixed filter type for every voice. |
431
+ | `filterHz` | number | `1000` | Fixed cutoff or center in Hz. |
432
+ | `filterQ` | number | `0.7071` | Fixed resonance. |
433
+ | `fmRatio` | number | `1` | Fixed modulator ratio. |
434
+ | `fmDepth` | number | `0` | Fixed modulation index; sine voices only. |
435
+ | `detunes` | number[] | none | Per-note offsets in cents, matched to the pitch array. |
436
+ | `spatialX` | number | omitted | Shared fixed left/right binaural direction. |
437
+ | `spatialY` | number | omitted | Shared fixed below/above binaural direction. |
438
+ | `bus` | string | `effects` | Category: music, effects, ui or ambience. |
439
+ | `effectSend` | number | omitted | Explicit processed share 0-1; replaces category selection. |
440
+ | `priority` | integer | `0` | Admission priority 0-3; higher voices are protected. |
441
+ | `variation` | dictionary | omitted | Optional attack-only ranges; see Native attack variation. |
431
442
 
432
443
  `pans` and `detunes` cannot contain more entries than the pitch array, and missing detune entries count as 0. Missing `pans` entries use the position computed from `panSpread`, or 0 when no spread is set. `playChord` does not accept sweep, vibrato or `detune` fields.
433
444
 
@@ -538,32 +549,32 @@ event=validation_warning method=playTone key=duraton reason=unsupported_option a
538
549
 
539
550
  Common reasons include:
540
551
 
541
- | Reason | Meaning |
542
- | ---------------------------------------- | -------------------------------------------------------------------------------------------- |
543
- | `unsupported_option` | The option name is not part of that method or step. |
544
- | `not_object` | A sequence step or options dictionary is not an object. |
545
- | `non_numeric_or_non_finite` | A numeric field is the wrong type, `NaN` or infinite. |
546
- | `not_integer` | An integer field contains a fractional number. |
547
- | `out_of_range` | A number falls outside the documented range. |
548
- | `missing_required` | A required pitch array or `WAVETABLE` sample array is missing. |
549
- | `not_string`, `not_array`, `not_boolean` | A field has the wrong container or primitive type. |
550
- | `invalid_note` | A note name cannot be parsed. |
551
- | `unsupported_note_value` | A note value is not one of the ten supported values. |
552
- | `unsupported_value` | `mixingProfile`, `audioSession` or `filterType` is not one of the listed strings. |
553
- | `invalid_sample_count` | `waveTable` has fewer than 2 or more than 64 samples. |
554
- | `missing_pitch_or_rest` | A sounding event has no pitch and is not a rest. |
555
- | `conflicting_pitch_fields` | A call or step provides more than one pitch source. |
552
+ | Reason | Meaning |
553
+ | ---------------------------------------- | --------------------------------------------------------------------------------------------------- |
554
+ | `unsupported_option` | The option name is not part of that method or step. |
555
+ | `not_object` | A sequence step or options dictionary is not an object. |
556
+ | `non_numeric_or_non_finite` | A numeric field is the wrong type, `NaN` or infinite. |
557
+ | `not_integer` | An integer field contains a fractional number. |
558
+ | `out_of_range` | A number falls outside the documented range. |
559
+ | `missing_required` | A required pitch array or `WAVETABLE` sample array is missing. |
560
+ | `not_string`, `not_array`, `not_boolean` | A field has the wrong container or primitive type. |
561
+ | `invalid_note` | A note name cannot be parsed. |
562
+ | `unsupported_note_value` | A note value is not one of the ten supported values. |
563
+ | `unsupported_value` | `mixingProfile`, `audioSession` or `filterType` is not one of the listed strings. |
564
+ | `invalid_sample_count` | `waveTable` has fewer than 2 or more than 64 samples. |
565
+ | `missing_pitch_or_rest` | A sounding event has no pitch and is not a rest. |
566
+ | `conflicting_pitch_fields` | A call or step provides more than one pitch source. |
556
567
  | `conflicting_spatial_fields` | Spatial coordinates are combined with stereo pan fields, including inherited sequence voice values. |
557
- | `invalid_voice_count` | A chord has fewer than 1 or more than 32 pitches. |
568
+ | `invalid_voice_count` | A chord has fewer than 1 or more than 32 pitches. |
558
569
  | `invalid_step_count` | The step array has fewer than 1 or more than 512 entries. |
559
- | `too_many_values` | `pans` or `detunes` is longer than the chord. |
560
- | `attack_greater_or_equal_duration` | An explicit attack leaves no time for the event. |
561
- | `release_exceeds_remaining_duration` | An explicit release does not fit after attack. |
562
- | `decay_exceeds_remaining_duration` | `attack` plus `decay` does not fit in the event. |
563
- | `sustain_without_decay` | `sustain` is below 1 while `decay` is 0. |
564
- | `filter_type_required` | A filter key is set while `filterType` is `none`. |
565
- | `fm_requires_sine` | FM is active on a waveform other than `SINE`. |
566
- | `fm_depth_required` | `fmRatio` is set while FM is off. |
570
+ | `too_many_values` | `pans` or `detunes` is longer than the chord. |
571
+ | `attack_greater_or_equal_duration` | An explicit attack leaves no time for the event. |
572
+ | `release_exceeds_remaining_duration` | An explicit release does not fit after attack. |
573
+ | `decay_exceeds_remaining_duration` | `attack` plus `decay` does not fit in the event. |
574
+ | `sustain_without_decay` | `sustain` is below 1 while `decay` is 0. |
575
+ | `filter_type_required` | A filter key is set while `filterType` is `none`. |
576
+ | `fm_requires_sine` | FM is active on a waveform other than `SINE`. |
577
+ | `fm_depth_required` | `fmRatio` is set while FM is off. |
567
578
 
568
579
  Explicit values are not clamped. Read `getDefaults().limits` when accepting user input and decide in the app whether to reject or constrain it.
569
580
 
@@ -594,33 +605,33 @@ Use `typeof synth.getStats === 'function'` to check that the expected module is
594
605
 
595
606
  Returns a new snapshot without resetting counters. Available before start and after shutdown. Occupancy is the last completed render block; queued commands are read at query time. No audio-thread allocation, locks or waiting are added.
596
607
 
597
- | Field | Meaning |
598
- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
599
- | `activeVoices` | Occupied primary slots, including binaural FIR draining. |
600
- | `maxVoices` | Configured primary-slot capacity (default 8 before start). |
601
- | `peakActiveVoices` | Highest primary occupancy since reset/start, including peaks between queries. |
602
- | `tailVoices` | External fade tails from replacement or `stopAll`, excluding primary FIR drain. |
603
- | `spatialVoices` | Spatial primary slots, including FIR draining; excludes external tails. |
604
- | `voiceStealCount` | Primary replacements while all slots are occupied. |
605
- | `rejectedRequestCount` | Counted API rejections, including sequence-publication rejection; not a complete rejected-call tally on every native path. |
606
- | `rejectedRequestsByReason` | `{ validation, engineStopped, queueFull }`; sum equals the recorded rejection total. |
607
- | `priorityDropCount` | Events/chords dropped because eligible voices could not accommodate them. |
608
- | `rejectedPublicationCount` | Rejected sequence publications due to capacity or bank pressure. |
609
- | `pendingCommands` | Published entries awaiting the renderer; chord notes count separately, future scheduler steps are excluded. |
610
- | `sampleRate` | Current native rate, or the last rate after shutdown; 44100 before start. |
611
- | `callbackFrames` | Frames processed in the most recent callback; 0 before start/after shutdown. |
612
- | `renderLoad` | Last callback elapsed seconds / (`callbackFrames / sampleRate`); may exceed 1. |
613
- | `peakRenderLoad` | Maximum callback load since diagnostics were enabled or statistics reset; accumulates across signal windows. |
614
- | `outputPeakDbFS` | `{ left, right }` peaks of final float output in the latest completed approximately 200 ms window. |
615
- | `outputRmsDbFS` | `{ left, right }` RMS of that same window. |
616
- | `preLimiterPeakDb` | Maximum native peak before the limiter since reset, in dBFS; diagnostics required. |
617
- | `maxLimiterReductionDb` | Maximum native limiter attenuation since reset, in dB; diagnostics required. A brief intervention persists across UI polls. |
618
- | `limiterReductionDb` | Maximum limiter attenuation in that window, as a positive dB magnitude. |
619
- | `underrunCount` | Android Oboe accumulated backend xruns since reset/start when supported; otherwise `null`. |
620
- | `bufferFrames` | Android Oboe output buffer size; otherwise `null`. This is distinct from `callbackFrames`. |
621
- | `estimatedOutputLatencyMs` | Android timestamp-based stream-to-DAC estimate, when valid; otherwise `null` (always `null` on this iOS backend). |
622
-
623
- At this source pin, iOS early rejections in tempo/sequence operations and a
608
+ | Field | Meaning |
609
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
610
+ | `activeVoices` | Occupied primary slots, including binaural FIR draining. |
611
+ | `maxVoices` | Configured primary-slot capacity (default 8 before start). |
612
+ | `peakActiveVoices` | Highest primary occupancy since reset/start, including peaks between queries. |
613
+ | `tailVoices` | External fade tails from replacement or `stopAll`, excluding primary FIR drain. |
614
+ | `spatialVoices` | Spatial primary slots, including FIR draining; excludes external tails. |
615
+ | `voiceStealCount` | Primary replacements while all slots are occupied. |
616
+ | `rejectedRequestCount` | Counted API rejections, including sequence-publication rejection; not a complete rejected-call tally on every native path. |
617
+ | `rejectedRequestsByReason` | `{ validation, engineStopped, queueFull }`; sum equals the recorded rejection total. |
618
+ | `priorityDropCount` | Events/chords dropped because eligible voices could not accommodate them. |
619
+ | `rejectedPublicationCount` | Rejected sequence publications due to capacity or bank pressure. |
620
+ | `pendingCommands` | Published entries awaiting the renderer; chord notes count separately, future scheduler steps are excluded. |
621
+ | `sampleRate` | Current native rate, or the last rate after shutdown; 44100 before start. |
622
+ | `callbackFrames` | Frames processed in the most recent callback; 0 before start/after shutdown. |
623
+ | `renderLoad` | Last callback elapsed seconds / (`callbackFrames / sampleRate`); may exceed 1. |
624
+ | `peakRenderLoad` | Maximum callback load since diagnostics were enabled or statistics reset; accumulates across signal windows. |
625
+ | `outputPeakDbFS` | `{ left, right }` peaks of final float output in the latest completed approximately 200 ms window. |
626
+ | `outputRmsDbFS` | `{ left, right }` RMS of that same window. |
627
+ | `preLimiterPeakDb` | Maximum native peak before the limiter since reset, in dBFS; diagnostics required. |
628
+ | `maxLimiterReductionDb` | Maximum native limiter attenuation since reset, in dB; diagnostics required. A brief intervention persists across UI polls. |
629
+ | `limiterReductionDb` | Maximum limiter attenuation in that window, as a positive dB magnitude. |
630
+ | `underrunCount` | Android Oboe accumulated backend xruns since reset/start when supported; otherwise `null`. |
631
+ | `bufferFrames` | Android Oboe output buffer size; otherwise `null`. This is distinct from `callbackFrames`. |
632
+ | `estimatedOutputLatencyMs` | Android timestamp-based stream-to-DAC estimate, when valid; otherwise `null` (always `null` on this iOS backend). |
633
+
634
+ In the current 1.0.2/1.1.0 implementations, iOS early rejections in tempo/sequence operations and a
624
635
  stopped `setMasterProcessing` call can bypass rejection counters. Incompatible
625
636
  held spatial-mode or modulation updates also have uncounted iOS returns.
626
637
  Android counts more of these cases, but an unknown/retired `stopSequence` return