Add xToys pattern import via URL paste
- XToysPattern.cs: fetch pattern from xtoys.app API (one call), parse script-v3 JSON, resolve slider defaults, evaluate sine/straight steps to WaveFrames at 100ms resolution - Frequency mapping: 0%=1000ms deep, 100%=10ms buzzy - MainForm: Pattern button + input dialog, continuously enqueues pattern frames as a loop, Stop All cancels - Fix: handle JSON values that are numbers vs strings (end/start fields) - NOTES.md: xToys slider parameter intel + frequency mapping docs
This commit is contained in:
@@ -129,3 +129,28 @@ web game / userscript ──WS──> Substation ──BLE──> Coyote 3.0
|
||||
```
|
||||
|
||||
Build: `dotnet run -c Release`
|
||||
|
||||
## xToys pattern import
|
||||
|
||||
Paste a URL like `https://xtoys.app/patterns/-OuhuHOuY1AlPPoCJlzc` into the Pattern dialog.
|
||||
The app fetches the pattern once from `https://xtoys.app/api/getPatternv2`, evaluates it
|
||||
locally, and plays it as a continuous loop. No ongoing API calls.
|
||||
|
||||
### xToys script-v3 slider parameters
|
||||
|
||||
From pattern analysis:
|
||||
|
||||
- **A CH** (0.5–10): Divides the pattern between channels. If A=1 and B=2, then 2/3 of
|
||||
the pattern goes to channel B. Controls the "hold" duration on channel A.
|
||||
- **B CH** (0.5–10): Same division for channel B. Controls the "pause" duration.
|
||||
- **Ramp** (0.5–5): Applies a smoothness filter to transitions. Higher = slower ramps.
|
||||
- **Min Freq** (0–100): Low cutoff on frequency values. No idea why.
|
||||
- **Min Level** (0–100): Low cutoff on intensity values. Floor that's held during "pause".
|
||||
|
||||
### Frequency mapping
|
||||
|
||||
xToys frequency is 0–100 (percentage). Mapped to e-stim period:
|
||||
- 0% = 1000ms (1Hz, deep thump)
|
||||
- 100% = 10ms (100Hz, buzzy)
|
||||
|
||||
Formula: `period_ms = 1000 - 9.9 * freq_pct`
|
||||
|
||||
Reference in New Issue
Block a user