@maccesar/titools 5.2.3 → 5.2.5
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 +96 -87
- package/docs/examples.md +10 -3
- package/package.json +2 -2
- package/skills/ti-synthengine/SKILL.md +50 -18
- package/skills/ti-synthengine/assets/example/README.md +19 -6
- package/skills/ti-synthengine/assets/example/app.js +69 -12
- package/skills/ti-synthengine/assets/index.d.ts +106 -0
- package/skills/ti-synthengine/references/advanced-examples.md +34 -9
- package/skills/ti-synthengine/references/api.md +327 -246
- package/skills/ti-synthengine/references/audio-engine.md +28 -14
- package/skills/ti-synthengine/references/audio-pipeline-validation.md +1 -1
- package/skills/ti-synthengine/references/examples.md +5 -5
- package/skills/ti-synthengine/references/guide.md +40 -21
- package/skills/ti-synthengine/references/instruments-and-effects.md +164 -0
- package/skills/ti-synthengine/references/native-tone-repetition-validation.md +59 -0
- package/skills/ti-synthengine/references/native-variation-proposal.md +182 -0
- package/skills/ti-synthengine/references/native-variation-validation.md +63 -0
- package/skills/ti-synthengine/references/native-variation.md +285 -0
- package/skills/ti-synthengine/references/recipes-interaction.md +3 -1
- package/skills/ti-synthengine/references/recipes.md +3 -2
- package/skills/ti-synthengine/references/recommendations.md +5 -5
- package/skills/ti-synthengine/references/sound-design.md +18 -16
- package/skills/ti-synthengine/references/source-notes.md +54 -37
- package/skills/ti-synthengine/references/source-snapshot.json +188 -144
- package/skills/ti-synthengine/references/stats-performance.md +1 -1
- package/skills/ti-synthengine/references/troubleshooting.md +43 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
> Source snapshot: official TiSynthEngine
|
|
1
|
+
> Source snapshot: official TiSynthEngine documentation at commit `ec04f4e634075c41b55f66279eabcd78b9652d58` (2026-11-02). Published module 1.1.0; public API 1.1.0. Upstream `documentation/stats-performance.md` SHA-256: `085142b6ade7b4f7b5965f6a638f967fdceba5ab1f26fb85e8cb496d5b886b6a`.
|
|
2
2
|
|
|
3
3
|
# Statistics host comparison
|
|
4
4
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
> Source snapshot: official TiSynthEngine
|
|
1
|
+
> Source snapshot: official TiSynthEngine documentation at commit `ec04f4e634075c41b55f66279eabcd78b9652d58` (2026-11-02). Published module 1.1.0; public API 1.1.0. Upstream `documentation/troubleshooting.md` SHA-256: `37fd3173ccfce393ab354713df66fbcc99c7281131ea45de1b3aae1e2d6f2160`.
|
|
2
2
|
|
|
3
3
|
# Troubleshooting
|
|
4
4
|
|
|
5
|
-
Start with the
|
|
5
|
+
Start with the method's documented return value and the native log. Most silent requests are contract rejections, a stale binary or an engine that never started.
|
|
6
6
|
|
|
7
7
|
## A call returns `false`
|
|
8
8
|
|
|
@@ -16,26 +16,26 @@ Always check the return value: `playSequence` rejects with 0, while Boolean meth
|
|
|
16
16
|
|
|
17
17
|
Common fixes:
|
|
18
18
|
|
|
19
|
-
| Reason | Check
|
|
20
|
-
| ----------------------------------- |
|
|
21
|
-
| `unsupported_option` | Remove or correct the named key. Every options object is strict.
|
|
22
|
-
| `invalid_step_type` | Make every pattern step an object, not a number or string.
|
|
23
|
-
| `conflicting_pitch_fields` | Timed/held calls use mutually exclusive `note`/`frequency`; each sequence step uses exactly one `notes` array, `frequencies` array or `rest: true`.
|
|
24
|
-
| `missing_pitch_or_rest` | Add one pitch field or an explicit rest.
|
|
25
|
-
| `out_of_range` | Compare the value with `getDefaults().limits`.
|
|
26
|
-
| `not_integer` | Use integer milliseconds for timed tone/chord envelope fields and integer waveform values; native sequence intervals and lengths may be fractional.
|
|
27
|
-
| `invalid_note` | Check spelling, accidental case and octave.
|
|
28
|
-
| `invalid_sample_count` | Supply 2 to 64 values in `waveTable`.
|
|
29
|
-
| `unsupported_value` | Use `none`, `lowpass`, `highpass` or `bandpass` for `filterType`.
|
|
30
|
-
| `sustain_without_decay` | Add a `decay` greater than 0, or remove `sustain`.
|
|
31
|
-
| `decay_exceeds_remaining_duration` | Shorten `attack` or `decay`, or lengthen `duration`. The default attack counts.
|
|
32
|
-
| `filter_type_required` | Set `filterType` to a filter, or remove `filterHz`, `filterHzEnd` and `filterQ`.
|
|
33
|
-
| `fm_requires_sine` | Use `SINE` for FM, or set `fmDepth` to 0 and remove `fmDepthEnd`.
|
|
34
|
-
| `fm_depth_required` | Set `fmDepth` or `fmDepthEnd`, or remove `fmRatio`.
|
|
35
|
-
| `conflicting_spatial_fields` | Remove `pan`, `panEnd`, `pans` and `panSpread` whenever sending `spatialX` or `spatialY`; check pattern root and steps.
|
|
36
|
-
| `too_many_values` | Pass no more `pans` or `detunes` than the chord has pitches.
|
|
37
|
-
| `missing_required` with `waveTable` | Add a table whenever `waveType` is `WAVETABLE`.
|
|
38
|
-
| envelope reason | Make attack and release fit inside total duration.
|
|
19
|
+
| Reason | Check |
|
|
20
|
+
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `unsupported_option` | Remove or correct the named key. Every options object is strict. |
|
|
22
|
+
| `invalid_step_type` | Make every pattern step an object, not a number or string. |
|
|
23
|
+
| `conflicting_pitch_fields` | Timed/held calls use mutually exclusive `note`/`frequency`; each sequence step uses exactly one `notes` array, `frequencies` array or `rest: true`. |
|
|
24
|
+
| `missing_pitch_or_rest` | Add one pitch field or an explicit rest. |
|
|
25
|
+
| `out_of_range` | Compare the value with `getDefaults().limits`. |
|
|
26
|
+
| `not_integer` | Use integer milliseconds for timed tone/chord envelope fields and integer waveform values; native sequence intervals and lengths may be fractional. |
|
|
27
|
+
| `invalid_note` | Check spelling, accidental case and octave. |
|
|
28
|
+
| `invalid_sample_count` | Supply 2 to 64 values in `waveTable`. |
|
|
29
|
+
| `unsupported_value` | Use `none`, `lowpass`, `highpass` or `bandpass` for `filterType`. |
|
|
30
|
+
| `sustain_without_decay` | Add a `decay` greater than 0, or remove `sustain`. |
|
|
31
|
+
| `decay_exceeds_remaining_duration` | Shorten `attack` or `decay`, or lengthen `duration`. The default attack counts. |
|
|
32
|
+
| `filter_type_required` | Set `filterType` to a filter, or remove `filterHz`, `filterHzEnd` and `filterQ`. |
|
|
33
|
+
| `fm_requires_sine` | Use `SINE` for FM, or set `fmDepth` to 0 and remove `fmDepthEnd`. |
|
|
34
|
+
| `fm_depth_required` | Set `fmDepth` or `fmDepthEnd`, or remove `fmRatio`. |
|
|
35
|
+
| `conflicting_spatial_fields` | Remove `pan`, `panEnd`, `pans` and `panSpread` whenever sending `spatialX` or `spatialY`; check pattern root and steps. |
|
|
36
|
+
| `too_many_values` | Pass no more `pans` or `detunes` than the chord has pitches. |
|
|
37
|
+
| `missing_required` with `waveTable` | Add a table whenever `waveType` is `WAVETABLE`. |
|
|
38
|
+
| envelope reason | Make attack and release fit inside total duration. |
|
|
39
39
|
|
|
40
40
|
Warnings are deduplicated by method, key and reason. Repeating the same bad call may return `false` without printing a new line each time.
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ An `overflow` warning means the command queue was full. Reduce the command burst
|
|
|
43
43
|
|
|
44
44
|
The envelope and filter rules apply to the final values of each sounding event. In a native sequence, each step's `overrides` merges over root `voice`: root `voice.sustain` is valid when every sounding step supplies compatible decay, and `voice.filterHz` needs a non-none filter type after merging. Timed tones/chords enforce their total-duration envelope budget; held and sequence ADSR has no sequence-interval budget. A `detune` that pushes the pitch, or `frequencyEnd`, outside the frequency range is rejected with `out_of_range`.
|
|
45
45
|
|
|
46
|
-
`fmDepthEnd: 0` is valid. It sweeps the index down to nothing. Omit the key
|
|
46
|
+
`fmDepthEnd: 0` is valid. It sweeps the index down to nothing. Omit the key when the index should not move; passing 0 sets a sweep target.
|
|
47
47
|
|
|
48
48
|
For the shaping controls, check the discontinuous disabled values as well as the numeric range: `bitDepth` accepts 0 or 2 through 16, and `pulseWidthEnd` accepts 0 or 0.05 through 0.95. A `waveTable` must contain only finite values from -1 to 1.
|
|
49
49
|
|
|
@@ -53,18 +53,20 @@ Check the native binary at startup:
|
|
|
53
53
|
|
|
54
54
|
```javascript
|
|
55
55
|
var actual = synth.getDefaults().apiVersion
|
|
56
|
-
if (actual !== '1.
|
|
57
|
-
throw new Error('Expected TiSynthEngine 1.
|
|
56
|
+
if (actual !== '1.1.0') {
|
|
57
|
+
throw new Error('Expected TiSynthEngine 1.1.0, found ' + actual)
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
`apiVersion` describes the
|
|
61
|
+
`apiVersion` describes the public contract, separately from the package version. Version 1.1.0 uses API 1.1.0; published 1.0.2 uses API 1.0.0. For version 1.1.0, confirm both entries in `tiapp.xml` pin module version 1.1.0. Then remove the application's build output and rebuild so Titanium does not reuse an archive from an earlier build. The module directories should be:
|
|
62
62
|
|
|
63
63
|
```text
|
|
64
|
-
modules/android/ti.synthengine/1.0
|
|
65
|
-
modules/iphone/ti.synthengine/1.0
|
|
64
|
+
modules/android/ti.synthengine/1.1.0/
|
|
65
|
+
modules/iphone/ti.synthengine/1.1.0/
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
Module version `1.1.0` reports API `1.1.0`. Check the capability/schema pair before using variation.
|
|
69
|
+
|
|
68
70
|
For binaural, also inspect `getDefaults().limits.spatialX` and `.spatialY`. Use the official packages to avoid stale development binaries. Copying the package does not update an already installed app: rebuild and reinstall it.
|
|
69
71
|
|
|
70
72
|
## Binaural does not change the position
|
|
@@ -77,15 +79,15 @@ Inspect the options sent to the native method as well as the settings screen:
|
|
|
77
79
|
- No stereo placement fields remain, even with value 0 or through pattern inheritance. Handle the Boolean return value.
|
|
78
80
|
- The installed contract reports both spatial limits and the device has the rebuilt app.
|
|
79
81
|
- Use headphones and one broadband event at a time; with binaural off, points with the same X use the same horizontal placement regardless of Y.
|
|
80
|
-
- Timed tones/chords and each sequence attack keep their specified position. A spatial held voice can move through `
|
|
82
|
+
- Timed tones/chords and each sequence attack keep their specified position. A spatial held voice can move through `updateNote({ voiceId, spatialX, spatialY })`; omitted coordinates retain their previous value, and the FIR ramps over 10 ms without clearing history. A stereo voice cannot be converted to spatial by an update.
|
|
81
83
|
|
|
82
84
|
The [integration guide](guide.md#integrate-binaural-in-a-2d-app) contains the JavaScript conversion and explains switch/slider behavior.
|
|
83
85
|
|
|
84
86
|
## Statistics are missing or show `null`
|
|
85
87
|
|
|
86
|
-
Older development packages can report 1.0.0 without statistics methods. Check `typeof synth.getStats`, `typeof synth.
|
|
88
|
+
Older development packages can report 1.0.0 without statistics methods. Check `typeof synth.getStats`, `typeof synth.enableStats`, `typeof synth.disableStats` and `typeof synth.resetStats`; install the current packages, rebuild and reinstall the app if needed.
|
|
87
89
|
|
|
88
|
-
Basic voice/queue/rejection counters do not require diagnostics. Timing, output peak/RMS and limiter reduction require `
|
|
90
|
+
Basic voice/queue/rejection counters do not require diagnostics. Timing, output peak/RMS and limiter reduction require `enableStats()` and a measured callback/window. `null` means unmeasured or unavailable; keep it distinct from zero. The current iOS backend always reports `null` for underruns, output buffer size and estimated hardware latency. Android backend metrics are best-effort and independent of the diagnostic switch.
|
|
89
91
|
|
|
90
92
|
Read at a modest rate, such as 5 Hz, and stop polling and optional measurements when the diagnostic owner hides or closes. `getStats()` never resets counters; call `resetStats()` deliberately. See the [integration recipe](guide.md#read-engine-statistics).
|
|
91
93
|
|
|
@@ -110,7 +112,7 @@ If startup remains noisy, temporarily remove other launch work and increase the
|
|
|
110
112
|
Check these in order:
|
|
111
113
|
|
|
112
114
|
1. `start()` returned `true`.
|
|
113
|
-
2.
|
|
115
|
+
2. A timed tone/chord or held-note call returned `true`, or `playSequence` returned a positive sequence ID.
|
|
114
116
|
3. Master and event `volume` are above zero.
|
|
115
117
|
4. The device media volume is up and the expected route is selected.
|
|
116
118
|
5. `shutdown()` was not called by another owner.
|
|
@@ -166,7 +168,7 @@ If later sounds remain silent, capture the Android or Xcode log around the route
|
|
|
166
168
|
- Confirm the deployment target is iOS 15 or newer.
|
|
167
169
|
- Check whether another module changes `AVAudioSession` after startup.
|
|
168
170
|
- Test interruptions, phone calls, Bluetooth and route changes on hardware.
|
|
169
|
-
- Use the matching device or simulator slice from the 1.0
|
|
171
|
+
- Use the matching device or simulator slice from the 1.1.0 archive.
|
|
170
172
|
|
|
171
173
|
## What to include in a bug report
|
|
172
174
|
|
|
@@ -174,11 +176,11 @@ Include the platform, OS version, device model, Titanium SDK version, module ver
|
|
|
174
176
|
|
|
175
177
|
## Held notes, sequences or effects methods are missing
|
|
176
178
|
|
|
177
|
-
|
|
179
|
+
Published 1.0.2 reports API version 1.0.0 and provides `updateVoice`; version 1.1.0 reports API 1.1.0 and recommends `updateNote`. Detect `noteOn`/`noteOff`/`updateNote`, all four sequence methods and `setMasterProcessing` according to the feature needed. Install matching current Android/iOS packages, rebuild and reinstall the consumer app. A stale development binary may report the same version without the complete release API. See [capability detection](guide.md#detect-required-capabilities).
|
|
178
180
|
|
|
179
181
|
## A held voice does not release or update
|
|
180
182
|
|
|
181
|
-
Use the original positive `voiceId`, not the pitch or an ID that has already been reused. `noteOn` does not accept `duration` or temporal `*End` fields. `
|
|
183
|
+
Use the original positive `voiceId`, not the pitch or an ID that has already been reused. `noteOn` does not accept `duration` or temporal `*End` fields. `updateNote` cannot change source, filter type, table, quantization, ADSR or stereo-versus-spatial mode; restart with a new ID when those attack-time settings must change. Noise clock, one-pole cutoff, effect send and compatible stereo/spatial position support live edits. Changed continuous parameters ramp for 10 ms.
|
|
182
184
|
|
|
183
185
|
Check Boolean returns. A full public queue can reject `noteOff`; retry twice at 16 ms outside render, then shut down/report if still rejected. Cancel those retries on owner teardown. The [held motor example](advanced-examples.md#sustained-game-motor) implements this policy. Touch cancellation, pause and close need cleanup as well as normal key up.
|
|
184
186
|
|
|
@@ -205,3 +207,9 @@ If accumulated attenuation remains near zero, investigate phase cancellation bet
|
|
|
205
207
|
`WAVETABLE` repeats the supplied values using a stepped lookup. A short table can sound grainy or buzzy even when its values describe a sine wave and `bitDepth` is 0. Its harmonic character changes with pitch and filtering; this does not require reverb, an LFO or creative saturation to be enabled.
|
|
206
208
|
|
|
207
209
|
Compare one note with `SINE`, at a comfortable matched level, to distinguish the source's texture from the combined sound of overlapping notes. Read `preLimiterPeakDb` and `maxLimiterReductionDb` with diagnostics enabled to investigate mix headroom. No limiter reduction does not prove that the physical speaker, headphones or output processing are clean. Keep a subjective listening observation separate from a confirmed clipping or buffer-loss diagnosis.
|
|
210
|
+
|
|
211
|
+
## A variation dictionary is rejected or repeats the same sound
|
|
212
|
+
|
|
213
|
+
Check both `capabilities.variation === true` and `variationSchemaVersion === 1` before sending the property. Published 1.0.2 packages reject it. Source restrictions and range ordering still apply at amount zero; near the frequency ceiling, validate tuning, detune, every chord pitch and active pitch endpoints together.
|
|
214
|
+
|
|
215
|
+
Repeated standalone calls with one explicit seed reproduce the selected parameters. Omit it for independent selections, or use a native sequence to retain an advancing stream across loops. A held voice samples only at attack, and `updateNote` rejects `variation`. For a running sequence, clear an inherited root dictionary with a valid amount-zero replacement; omitting it from a revision retains the merged value. See the [complete examples and rules](native-variation.md).
|