@maccesar/titools 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +44 -12
  2. package/agents/ti-pro.md +4 -0
  3. package/commands/ti-audit.md +4 -0
  4. package/lib/config.js +2 -0
  5. package/package.json +1 -1
  6. package/skills/purgetss/SKILL.md +4 -4
  7. package/skills/purgetss/references/EXAMPLES.md +3 -3
  8. package/skills/purgetss/references/adopting-purgetss.md +2 -2
  9. package/skills/purgetss/references/animation-advanced.md +2 -2
  10. package/skills/purgetss/references/arbitrary-values.md +8 -5
  11. package/skills/purgetss/references/class-categories.md +5 -5
  12. package/skills/purgetss/references/class-index-properties.md +6 -6
  13. package/skills/purgetss/references/class-index.md +2 -2
  14. package/skills/purgetss/references/cli-commands.md +2 -2
  15. package/skills/purgetss/references/dynamic-component-creation.md +2 -2
  16. package/skills/purgetss/references/grid-layout.md +1 -1
  17. package/skills/purgetss/references/migration-guide.md +34 -4
  18. package/skills/purgetss/references/multi-density-images.md +6 -6
  19. package/skills/purgetss/references/platform-modifiers.md +21 -0
  20. package/skills/purgetss/references/ui-ux-design.md +1 -1
  21. package/skills/purgetss/references/version-history.md +9 -4
  22. package/skills/ti-admob-unified/SKILL.md +44 -0
  23. package/skills/ti-admob-unified/agents/openai.yaml +4 -0
  24. package/skills/ti-admob-unified/assets/example/app.js +1003 -0
  25. package/skills/ti-admob-unified/assets/example/lib/ads.js +618 -0
  26. package/skills/ti-admob-unified/assets/example/library-usage.js +104 -0
  27. package/skills/ti-admob-unified/references/api-reference.md +592 -0
  28. package/skills/ti-admob-unified/references/banners.md +435 -0
  29. package/skills/ti-admob-unified/references/contributing.md +228 -0
  30. package/skills/ti-admob-unified/references/dependencies.md +85 -0
  31. package/skills/ti-admob-unified/references/fullscreen.md +223 -0
  32. package/skills/ti-admob-unified/references/game-monetization.md +17 -0
  33. package/skills/ti-admob-unified/references/getting-started.md +275 -0
  34. package/skills/ti-admob-unified/references/index.md +30 -0
  35. package/skills/ti-admob-unified/references/integration.md +85 -0
  36. package/skills/ti-admob-unified/references/library.md +189 -0
  37. package/skills/ti-admob-unified/references/mediation.md +132 -0
  38. package/skills/ti-admob-unified/references/migration.md +255 -0
  39. package/skills/ti-admob-unified/references/module-changelog.md +54 -0
  40. package/skills/ti-admob-unified/references/module-license.txt +21 -0
  41. package/skills/ti-admob-unified/references/privacy.md +254 -0
  42. package/skills/ti-admob-unified/references/roadmap.md +146 -0
  43. package/skills/ti-admob-unified/references/source-notes.md +33 -0
  44. package/skills/ti-admob-unified/references/source-snapshot.json +440 -0
  45. package/skills/ti-admob-unified/references/third-party-notices.md +22 -0
  46. package/skills/ti-game/SKILL.md +10 -1
  47. package/skills/ti-game/references/api.md +10 -2
  48. package/skills/ti-game/references/debugging-performance.md +6 -0
  49. package/skills/ti-game/references/examples.md +11 -1
  50. package/skills/ti-game/references/patterns.md +24 -2
  51. package/skills/ti-game/references/physics.md +502 -0
  52. package/skills/ti-game/references/project-setup.md +23 -1
  53. package/skills/ti-game/references/recipes-action.md +46 -14
  54. package/skills/ti-game/references/recipes-adventure-effects.md +12 -1
  55. package/skills/ti-game/references/roadmap.md +2 -2
  56. package/skills/ti-game/references/tilemaps.md +2 -1
  57. package/skills/ti-game-assets/SKILL.md +53 -0
  58. package/skills/ti-game-assets/agents/openai.yaml +4 -0
  59. package/skills/ti-game-assets/references/alpha.md +26 -0
  60. package/skills/ti-game-assets/references/art-direction.md +37 -0
  61. package/skills/ti-game-assets/references/integration.md +49 -0
  62. package/skills/ti-game-assets/references/manifest.example.json +429 -0
  63. package/skills/ti-game-assets/references/manifest.md +39 -0
  64. package/skills/ti-game-assets/references/offline-audio.md +33 -0
  65. package/skills/ti-game-assets/references/prompts.md +33 -0
  66. package/skills/ti-game-assets/references/repeating-textures.md +17 -0
  67. package/skills/ti-game-assets/references/responsible-ads.md +31 -0
  68. package/skills/ti-game-assets/references/sound-assets.md +42 -0
  69. package/skills/ti-game-assets/references/vector-sources.md +21 -0
  70. package/skills/ti-game-assets/scripts/alpha_tools.py +160 -0
  71. package/skills/ti-game-assets/scripts/requirements.txt +1 -0
  72. package/skills/ti-game-assets/scripts/validate_manifest.py +267 -0
  73. package/skills/ti-synthengine/SKILL.md +37 -13
  74. package/skills/ti-synthengine/references/api.md +397 -31
  75. package/skills/ti-synthengine/references/audio-engine.md +235 -14
  76. package/skills/ti-synthengine/references/examples.md +396 -17
  77. package/skills/ti-synthengine/references/guide.md +331 -12
  78. package/skills/ti-synthengine/references/recipes.md +212 -22
  79. package/skills/ti-synthengine/references/recommendations.md +53 -16
  80. package/skills/ti-synthengine/references/sound-design.md +359 -15
  81. package/skills/ti-synthengine/references/source-notes.md +121 -0
  82. package/skills/ti-synthengine/references/source-snapshot.json +105 -0
  83. package/skills/ti-synthengine/references/stats-performance.json +2992 -0
  84. package/skills/ti-synthengine/references/stats-performance.md +38 -0
  85. package/skills/ti-synthengine/references/troubleshooting.md +61 -4
@@ -0,0 +1,38 @@
1
+ > Source snapshot: official TiSynthEngine 1.0.0 beta documentation from the reviewed working tree based on `95901c98af5353b86d9dc7c60b29ab9186b038cd` (2026-10-14), including uncommitted statistics changes. Upstream `documentation/stats-performance.md` SHA-256: `798075f7bec08b4dafcaa46f1c43552d90ba23e2c85b49b4ab1d4ddf72c210df`.
2
+
3
+ # Statistics host comparison
4
+
5
+ Beta 1.0.0. Synthetic Android native render on Apple M1. Apple clang version 21.0.0 (clang-2100.3.34.2). Baseline commit `95901c98af5353b86d9dc7c60b29ab9186b038cd`. Both renderers use identical `-O3` flags.
6
+
7
+ One warmup and ten alternating runs per configuration, 48 kHz, 32 slots, 256-frame callbacks, twenty seconds per run. Current modes query native snapshots at 5 Hz. Timing includes command publication and snapshot work; JavaScript/JNI, real scheduler jitter and hardware streams are excluded. macOS user-interactive QoS reduces core-selection variability. Values below are median percentage changes relative to the previous engine.
8
+
9
+ The flagged sustained 32-voice binaural configuration was repeated in isolation with another warmup and ten alternating trials; its table row uses that repeat. The original trials are retained in the raw investigation.
10
+
11
+ | Case | Output | Basic total | Basic p95 | Full total | Full p95 |
12
+ | --- | --- | ---: | ---: | ---: | ---: |
13
+ | silence | stereo | -73.13% | -72.45% | -71.89% | -70.92% |
14
+ | oneVoice | stereo | -41.29% | -41.09% | -39.20% | -38.70% |
15
+ | 32Voices | stereo | -5.48% | -6.61% | -4.88% | -4.25% |
16
+ | steals | stereo | -7.01% | -6.01% | -0.42% | -1.47% |
17
+ | chords | stereo | -17.88% | -3.59% | -16.64% | -3.15% |
18
+ | patterns | stereo | -40.19% | -39.07% | -38.55% | -36.80% |
19
+ | drain | stereo | -69.59% | -60.42% | -68.12% | -59.24% |
20
+ | silence | binaural | -73.09% | -72.45% | -71.75% | -71.17% |
21
+ | oneVoice | binaural | -16.36% | -19.86% | -13.44% | -17.71% |
22
+ | 32Voices | binaural | -6.09% | -19.89% | -10.14% | -23.25% |
23
+ | steals | binaural | +0.55% | -0.26% | -0.47% | -6.54% |
24
+ | chords | binaural | -8.41% | -6.12% | -3.69% | +1.28% |
25
+ | patterns | binaural | -11.76% | -9.16% | -9.53% | -7.40% |
26
+ | drain | binaural | -45.49% | -22.73% | -50.18% | -21.98% |
27
+
28
+ All mode/configuration hashes match sample for sample. The direct integration regression also compares float arrays, including a reset during playback. Full mode includes timing, stereo peak/RMS and limiter reduction; basic mode leaves those measurements disabled. Full mode has additional work compared with basic mode; the table measures each final configuration against the previous engine.
29
+
30
+ Initial repeated silence regressions were about +5% basic and +19% full. Sparse sounds also crossed the investigation thresholds. The correction uses event-maintained occupancy to skip entirely empty voice/tail groups, in both Android and iOS, while retaining all requested meters. No DSP formulas or emitted samples were changed.
31
+
32
+ The acceptance thresholds are increases above 2% total render time or 5% p95 elapsed block time. No final median exceeds either threshold. The sustained 32-voice binaural full-mode total changed from +5.01% in the original batch to -10.14% in the isolated repeat; this variability prevents treating the percentages as a precise overhead bound. No repeatable regression above the screening limits was established in that case.
33
+
34
+ These are host measurements of the Android renderer and shared telemetry core. They do not execute the iOS callback, include bridge polling cost, establish physical underrun behavior, or demonstrate unchanged device heat, battery use or total app CPU. Both native modules are compiled separately; physical stereo/headphone listening and device performance remain separate acceptance work. No zero-impact claim is made.
35
+
36
+ The patterns case replays timed native note publications; it does not run the Java or dispatch scheduler. The drain case repeatedly renders 1 ms voices plus the complete binaural FIR history. Shutdown/rejection/queue concurrency belongs to regression testing, not these timings.
37
+
38
+ [Raw trials and investigation](stats-performance.json). Reproduce with `tests/stats_benchmark_host.cpp` and `tools/benchmark_stats.py`; see [engine test instructions](audio-engine.md#engine-statistics).
@@ -1,4 +1,4 @@
1
- > Source snapshot: official TiSynthEngine 1.0.0 documentation at commit `6685b81` (2026-08-29).
1
+ > Source snapshot: official TiSynthEngine 1.0.0 beta documentation from the reviewed working tree based on `95901c98af5353b86d9dc7c60b29ab9186b038cd` (2026-10-14), including uncommitted statistics changes. Upstream `documentation/troubleshooting.md` SHA-256: `10949f8f18f9e97933bfb1f025a12217746648c01805ff0fafe2c8e064b1c0cc`.
2
2
 
3
3
  # Troubleshooting
4
4
 
@@ -25,6 +25,16 @@ Common fixes:
25
25
  | `out_of_range` | Compare the value with `getDefaults().limits`. |
26
26
  | `not_integer` | Use whole milliseconds and integer waveform values where required. |
27
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`. |
28
38
  | envelope reason | Make attack and release fit inside total duration. |
29
39
 
30
40
  Warnings are deduplicated by method, key and reason. Repeating the same bad
@@ -34,6 +44,20 @@ An `overflow` warning means the command queue was full. Reduce the command
34
44
  burst or wait for the audio thread to consume queued work. Chords are rejected
35
45
  as a whole rather than partially started.
36
46
 
47
+ The envelope and filter rules read the values a sounding event ends up with.
48
+ In a pattern that means the step over the pattern root, so a `sustain` on the
49
+ root is fine when each step supplies a `decay`, and a root `filterHz` is
50
+ rejected when no step has a `filterType`. A `detune` that pushes the pitch, or
51
+ `frequencyEnd`, outside the frequency range is rejected with `out_of_range`.
52
+
53
+ `fmDepthEnd: 0` is valid. It sweeps the index down to nothing. Omit the key,
54
+ rather than passing 0, when the index should not move.
55
+
56
+ For the shaping controls, check the discontinuous disabled values as well
57
+ as the numeric range: `bitDepth` accepts 0 or 2 through 16, and
58
+ `pulseWidthEnd` accepts 0 or 0.05 through 0.95. A `waveTable` must contain only
59
+ finite values from -1 to 1.
60
+
37
61
  ## The installed contract is wrong
38
62
 
39
63
  Check the native binary at startup:
@@ -54,6 +78,22 @@ modules/android/ti.synthengine/1.0.0/
54
78
  modules/iphone/ti.synthengine/1.0.0/
55
79
  ```
56
80
 
81
+ For binaural, also inspect `getDefaults().limits.spatialX` and `.spatialY`. During the unreleased beta, two binaries can both report 1.0.0 while only one includes positioning. Copying the package does not update an already installed app: rebuild and reinstall it.
82
+
83
+ ## Binaural does not change the position
84
+
85
+ Check the actual object sent to the native method, not only the settings screen:
86
+
87
+ - Every effect that should be spatial sends `spatialX` and/or `spatialY`. A switch alone does not modify existing playback calls.
88
+ - Values are finite numbers within -1 to 1, with positive Y above and negative Y below. A 0 to 100% height slider scales the source position; it does not put all sounds above.
89
+ - Turning binaural off removes both coordinate keys. Sending zeros leaves binaural enabled at the front center.
90
+ - No stereo placement fields remain, even with value 0 or through pattern inheritance. Handle the Boolean return value.
91
+ - The installed contract reports both spatial limits and the device has the rebuilt app.
92
+ - 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.
93
+ - Positions are fixed for active voices. Later calls can use updated coordinates, but there is no method to move a voice already playing.
94
+
95
+ The [integration guide](guide.md#integrate-binaural-in-a-2d-app) contains the JavaScript conversion and explains switch/slider behavior.
96
+
57
97
  ## The first sound glitches
58
98
 
59
99
  Do not start the engine during the first layout. Add the `postlayout` listener
@@ -78,8 +118,9 @@ Check these in order:
78
118
  7. The app is not relying on a pattern that another `playPattern()` call
79
119
  replaced.
80
120
 
81
- On iOS, the module uses a `Playback` session, so the silent switch should not
82
- mute it. Another audio component can change the app-wide session after engine
121
+ On iOS, the module uses a `Playback` session by default, so the silent switch
122
+ should not mute it. With `audioSession: 'ambient'` the silent switch mutes it by
123
+ design. Another audio component can change the app-wide session after engine
83
124
  startup; inspect the order if behavior differs from the simple example.
84
125
 
85
126
  ## A pattern stops or skips steps
@@ -102,6 +143,20 @@ steps: [
102
143
  ]
103
144
  ```
104
145
 
146
+ ## `patternend` never arrives
147
+
148
+ The event fires once per accepted `playPattern`. Check, in order:
149
+
150
+ 1. The call returned `true`. A rejected pattern produces no event.
151
+ 2. The listener is on the module (`synth.addEventListener`), registered before
152
+ the pattern started and not removed by a cleanup that already ran.
153
+ 3. `shutdown()` was not called first. It discards a pending pattern silently.
154
+ 4. The pattern was not replaced. A newer accepted pattern delivers
155
+ `completed: false` for the old one instead of a natural end.
156
+
157
+ The event arrives when the pattern ends, about 1 ms after the sum of its step
158
+ lengths, not when you call. A 30 second pattern reports after 30 seconds.
159
+
105
160
  ## A chord is distorted or pumps
106
161
 
107
162
  Use one `playChord()` call for notes that should begin together. Several
@@ -110,6 +165,8 @@ Use one `playChord()` call for notes that should begin together. Several
110
165
  If the limiter engages repeatedly:
111
166
 
112
167
  - lower event volume;
168
+ - lower `filterQ`, because a resonant low-pass or high-pass boosts its cutoff
169
+ by about Q;
113
170
  - use `conservative` instead of `balanced` or `raw`;
114
171
  - use `speakerSafe` on a small speaker;
115
172
  - avoid retriggering a long event before its previous release ends.
@@ -148,7 +205,7 @@ time.
148
205
 
149
206
  ## iOS-specific checks
150
207
 
151
- - Confirm the deployment target is iOS 13 or newer.
208
+ - Confirm the deployment target is iOS 15 or newer.
152
209
  - Check whether another module changes `AVAudioSession` after startup.
153
210
  - Test interruptions, phone calls, Bluetooth and route changes on hardware.
154
211
  - Use the matching device or simulator slice from the 1.0.0 archive.