From 8a5d506a212947cff937536337247fe574be2d44 Mon Sep 17 00:00:00 2001 From: GnocchiBalboa Date: Mon, 23 Nov 2026 22:09:26 +0100 Subject: [PATCH 1/6] UNGEMACH: draft of a dissonant drone track machine A ColdFire track machine for the Octatrack MKI over the Modwerk USB base: sixteen detuned voices in three groups, a sub and noise, a resonant low-pass and saturation, in stereo. SRC: PTCH, DISS, TONE, WAVE, RATE, DIRT; SRC SETUP: SPRD, PNCH. One track per Part. Experimental draft in sdk/drafts/ungemach: host tests pass, the author played it on an MKI with base 0.7.10; CPU price, device:qualify, captures and the owner's review are still to do. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/CHANGELOG.json | 13 + sdk/drafts/ungemach/LICENSE | 32 ++ sdk/drafts/ungemach/README.md | 62 +++ sdk/drafts/ungemach/TESTING.md | 66 +++ sdk/drafts/ungemach/calib_waves.c | 35 ++ sdk/drafts/ungemach/engine.c | 412 ++++++++++++++++++ sdk/drafts/ungemach/engine.h | 76 ++++ sdk/drafts/ungemach/gen_tables.py | 335 ++++++++++++++ sdk/drafts/ungemach/machine.c | 368 ++++++++++++++++ sdk/drafts/ungemach/manifest.py | 17 + sdk/drafts/ungemach/octamod.module.json | 156 +++++++ .../ungemach/presentation/thumbnail.svg | 16 + sdk/drafts/ungemach/runtime.json | 17 + sdk/drafts/ungemach/tables.h | 47 ++ sdk/drafts/ungemach/test_engine.c | 223 ++++++++++ sdk/drafts/ungemach/test_ungemach.py | 31 ++ sdk/drafts/ungemach/verify.py | 46 ++ 17 files changed, 1952 insertions(+) create mode 100644 sdk/drafts/ungemach/CHANGELOG.json create mode 100644 sdk/drafts/ungemach/LICENSE create mode 100644 sdk/drafts/ungemach/README.md create mode 100644 sdk/drafts/ungemach/TESTING.md create mode 100644 sdk/drafts/ungemach/calib_waves.c create mode 100644 sdk/drafts/ungemach/engine.c create mode 100644 sdk/drafts/ungemach/engine.h create mode 100644 sdk/drafts/ungemach/gen_tables.py create mode 100644 sdk/drafts/ungemach/machine.c create mode 100644 sdk/drafts/ungemach/manifest.py create mode 100644 sdk/drafts/ungemach/octamod.module.json create mode 100644 sdk/drafts/ungemach/presentation/thumbnail.svg create mode 100644 sdk/drafts/ungemach/runtime.json create mode 100644 sdk/drafts/ungemach/tables.h create mode 100644 sdk/drafts/ungemach/test_engine.c create mode 100644 sdk/drafts/ungemach/test_ungemach.py create mode 100644 sdk/drafts/ungemach/verify.py diff --git a/sdk/drafts/ungemach/CHANGELOG.json b/sdk/drafts/ungemach/CHANGELOG.json new file mode 100644 index 0000000000..9139785509 --- /dev/null +++ b/sdk/drafts/ungemach/CHANGELOG.json @@ -0,0 +1,13 @@ +[ + { + "version": "0.1.0-experimental", + "date": "2026-11-22", + "changes": [ + "Adds UNGEMACH, a dissonant, living drone machine for dark techno: sixteen detuned voices, a sub and noise in stereo.", + "DISS widens the chord from unison to a scream while its pitch rises; WAVE has 32 waveforms from dull to shrill.", + "RATE drifts pitch, filter and level freely or pulses in time with the track; PNCH punches on every trig.", + "One UNGEMACH track per Part.", + "Known issue: tested only on the author's MKI; a busy pattern can skip a few of its frames a second." + ] + } +] diff --git a/sdk/drafts/ungemach/LICENSE b/sdk/drafts/ungemach/LICENSE new file mode 100644 index 0000000000..e6ed467a32 --- /dev/null +++ b/sdk/drafts/ungemach/LICENSE @@ -0,0 +1,32 @@ +MIT License + +Copyright (c) 2026 GnocchiBalboa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +UNGEMACH's engine, waveforms and tables are original work. It reads the +sequencer's clock, tempo and track speed at the RAM locations Euclid reads +(sdk/octabam/modules/euclid/control.c, MIT, Sam Banks); no code is copied from +it. It contains no Elektron firmware, extracted routines, tables, samples or +graphics: the machine page copies stock's FLEX page record at run time on the +user's own unit and never ships it. Nothing here is endorsed by, supported by +or affiliated with Elektron. Octatrack and Elektron are trademarks of Elektron +Music Machines MAV AB, used only to name the hardware this module runs on. diff --git a/sdk/drafts/ungemach/README.md b/sdk/drafts/ungemach/README.md new file mode 100644 index 0000000000..3e010d5021 --- /dev/null +++ b/sdk/drafts/ungemach/README.md @@ -0,0 +1,62 @@ +# Ungemach + +Version 0.1.0-experimental · by GnocchiBalboa (@GnocchiBalboa). An experimental draft: the author has played it on an Octatrack MKI over the Modwerk USB base. The [test record](TESTING.md) names the build for each result. + +## Overview + +UNGEMACH is a track machine for dark techno that makes its own sound on the ColdFire instead of playing a sample: a dissonant drone that never stands still. Sixteen detuned voices in three groups, an octave sub and a dark noise run through a resonant low-pass filter and a soft saturation, in stereo. + +PTCH sets the root. DISS moves the second and third voice groups against it, from unison through quarter tones, tritones and ninths to a scream, and the chord's pitch rises with the knob. WAVE crossfades through 32 original waveforms from dull to shrill. TONE opens the filter, and DIRT adds resonance, drive and a phase push between the voices that makes the drone rough. RATE lets pitch, filter and level drift on their own, or pulse in time with the track. On SRC SETUP, SPRD sets the stereo width and PNCH gives every trig a punch. + +The track's AMP envelope shapes the drone as it shapes a sample: a trig opens it and HOLD keeps it sounding. LFOs, parameter locks, scenes and the track's effects act on the six SRC knobs as on any machine. + +## Controls + +SRC (knobs A to F): + +| Knob | Range | Default | What it does | +| --- | --- | --- | --- | +| PTCH | 0 to 120 | 24 | The root, in half semitones: 0 is 27.5 Hz, 24 is 55 Hz (A1), 120 is 880 Hz. Locks, LFOs and slides move it smoothly. | +| DISS | 0 to 127 | 40 | The chord: where the second and third voice groups sit against the root. 0 is unison; then quarter tones, semitones, tritones, sevenths and ninths, octave and fifth near 71-76, and the scream from 121. The chord's pitch rises with the knob. A step glides in about 90 ms, so a turn or an LFO is a glissando. | +| TONE | 0 to 127 | 80 | The low-pass filter's cutoff: dark at 0, open at 127. | +| WAVE | 0 to 127 | 24 | The voices' waveform: 32 original waveforms from dull to shrill, crossfaded. A turn glides, half the range in about 0.7 s. | +| RATE | 0 to 63, S16 to S2 | 20 | How the drone moves. 0-63: pitch, filter and level drift on their own, from 0.02 Hz at 0 to 2 Hz at 63; the filter moves by up to a quarter of TONE's travel. Above 63: a pulse in time with the track, one every 16, 8, 6, 4, 3 or 2 steps (S16 to S2), that opens the filter by 25 % of TONE's travel at 64, rising to 35 % from 74. | +| DIRT | 0 to 127 | 12 | Resonance, saturation and a phase push between the voices: clean and round at 0, rough and screaming at 127. | + +SRC SETUP (knobs E and F; A to D are empty): + +| Knob | Range | Default | What it does | +| --- | --- | --- | --- | +| SPRD | MONO, NARW, WIDE, FULL | WIDE | The stereo width. | +| PNCH | 0 to 127 | 0 | A punch on every trig: it opens the filter, adds dirt and lifts the level, then falls away in 35 ms at low values to 55 ms at 127. 0 is off. | + +## Usage + +UNGEMACH is reached through the track's machine list. It needs no sample. A good start for a dark drone under a kick: PTCH 24 (A1), DISS 40, TONE 70, WAVE 24, RATE 20, DIRT 12, the AMP envelope's HOLD high, and a trig on step 1. Turn DISS above 100 for a screaming, rising chord, and set RATE above 63 for a pulse with the pattern. For hits, set PNCH and add trigs, or put an LFO on DIRT in a trig mode. + +## Quick tutorial + +1. Double-tap a track key, move to UNGEMACH in the machine list and press YES. +2. Put a trig on the track, set the AMP envelope's HOLD high and press PLAY: the drone sounds. On the SRC page, turn DISS slowly from 0 up: the chord widens and rises. Turn WAVE for the colour and TONE and DIRT for brightness and grit. +3. Press SRC again for SRC SETUP and turn PNCH up: each trig now punches. Set RATE above 63 for a pulse in time with the track. Press STOP to stop, or double-tap the track key and choose FLEX to leave the machine. + +## Compatibility and limitations + +- Experimental draft. The author tested it on an Octatrack MKI with OS 1.40C and the Modwerk USB base 0.7.10. It has not been tested on an MKII. +- One UNGEMACH track per Part: the base refuses it for a second track, and that track stays what it was. +- It renders on the ColdFire, in the frame interrupt: about 37-60 microseconds of the 363-microsecond frame in the author's busy live set. With a full pattern the base's frame guard skipped some of its frames: none in most seconds, up to a few dozen a second at busy moments (under 2 % of frames). The author heard no dropouts. Several UNGEMACH-like machines at once would not fit. +- SPRD and PNCH sit on SRC SETUP, which locks, LFOs and scenes do not reach. +- Every byte UNGEMACH keeps in the Part is a valid FLEX value. What a project opened without the module plays has not been tested. +- Not yet tested: Part and bank changes with UNGEMACH tracks, a power cycle after a Keep, the module's own CPU price, and `device:qualify`. + +## Tests and measurements + +See [TESTING.md](TESTING.md): host tests under UBSan and ASan, and the measurements on the author's MKI. + +## Authorship and licences + +Original work by GnocchiBalboa under the MIT licence ([LICENSE](LICENSE)). The engine, the waveforms and every table are original and generated by `gen_tables.py`. The machine reads the sequencer's clock, tempo and track speed at the RAM locations Euclid (Sam Banks, MIT) reads; no code is copied from it. No Elektron firmware, extracted routines, tables, samples or graphics are included: the machine page copies stock's FLEX page record at run time on the user's own unit. + +## Screens and audio + +No screenshots yet: they will be captured in the headless emulator before the module is listed. No audio preview. diff --git a/sdk/drafts/ungemach/TESTING.md b/sdk/drafts/ungemach/TESTING.md new file mode 100644 index 0000000000..021b61c3b1 --- /dev/null +++ b/sdk/drafts/ungemach/TESTING.md @@ -0,0 +1,66 @@ +# UNGEMACH testing + +Everything here was observed by the author (GnocchiBalboa) and the coding agent working with them. A result names its build; "not tested" means not run. + +## Units and base + +- **Live-set unit:** Octatrack MKI, OS 1.40C, Modwerk USB base 0.7.10 (`6070a4e4`), the author's own live set: seven Flex tracks with many trigs, LFOs and scenes, plus E-Verb, LOFI2, Analog BD, Mute Modes, Amiga and Mini Verb installed. +- **Test unit:** a second Octatrack MKI ("Probe-Octa"), OS 1.40C, an older USB base (`9680e9ac`), used for the early builds. +- Builds were loaded over USB with `npm run device -- try --accept` (a Keep), run through the USB bridge (`scripts/octatrack-usb-bridge.py`). + +## Host tests + +`python3 -B verify.py` (or `test_ungemach.py`) compiles `engine.c` with `test_engine.c` under UBSan and ASan and runs it: levels, DC and clipping at every corner of the controls and at every DISS value, DISS's glide (34 to 35: 3 % of the way after one block, all of it after 0.5 s), a split frame sounding as one, three minutes of drone, PNCH standing out and ending (PNCH 127: the first 10 ms 13.1 dB over no trig, back to the drone within 0.3 s, peak -6.0 dBFS), and a synced RATE that pulses. Result on the source of this draft, 22 November 2026: all passed, with and without the sanitizers. + +The cleanup for this draft (removed measurement and PC-only code, unused tables, LCUT) was checked by rendering 30,000 frames with moving controls and PNCH from the old and the new engine: the output is identical. + +`gen_tables.py` writes `tables.h` and reproduces it; `calib_waves.c` measures each waveform's level for `WAVE_TRIM_DB`. + +## Hardware: what was played + +- **One track a Part** (package v32 `d3b5f1e4`, Probe-Octa, 19 November 2026): a second track shows UNGEMACH in the machine list but cannot pick it. After T1 went back to FLEX, T2 could pick it. +- **Controls** (live-set unit, builds v60 to v68, 21-22 November 2026): every SRC knob and SPRD and PNCH were turned while the pattern played; parameter locks on PTCH ran on every trig; an LFO on DIRT moved it (the diagnostic log showed DIRT's range moving with it); a crossfader scene changing UNGEMACH parameters was moved and held. The author judged PNCH, WAVE, DIRT, RATE and DISS by ear and accepted v68's sound. +- **Keeps:** each build was kept with `device -- try --accept` and played; the author replugged USB or power-cycled between builds when the bridge needed it. +- **Not tested:** a project reloaded without the module, Part and bank changes with an UNGEMACH track, a power cycle after a Keep with the project reloaded, MIDI floods, `npm run device:qualify`, and any MKII. + +## Performance on the live-set unit + +The diagnostic builds (`UG_DIAG` in `machine.c`, never released) time the whole render callback with the 132 MHz DTCN3 timer, as the base's frame guard does, on the first UNGEMACH track, and report each second the mean a frame and the frames not rendered (the guard's skips) through `npm run device -- status` (DIAG value). The frame is 362.8 microseconds; the base gives all renders together about 290 of them. + +| Build, date | What | Mean a frame | Skipped frames | +| --- | --- | --- | --- | +| v66d, 22 Nov, 12:49-12:56 | free play, every control turned | 39-58 µs | 0 to 52 a second, 76 of 191 s with any | +| v66d, 22 Nov, 13:04-13:09 | one control at a time (PNCH 127, WAVE, PTCH, DISS, RATE free and synced, TONE) | 38-42 µs playing, 37 stopped | 0-41 a second while playing, in every step; none stopped | +| v66d, 22 Nov, 13:11-13:14 | crossfader scene: off, moving, middle, on | 38-39 µs | 0-8 a second | +| v66e, 22 Nov, 13:27-13:33 | free play | 38-59 µs | none in the 53-59 µs stretches, up to 15+ in others | +| v67d (no LCUT), 22 Nov, 21:01 | pattern playing, about 1 minute | 36-37 µs | 0-9 a second | +| v68d (DISS order), 22 Nov, 21:29-21:39 | free play, about 10 minutes | 37-43 µs and 49-60 µs | 0 in 63 % of playing seconds; never with the high means | + +The cost does not follow UNGEMACH's settings: with the same settings the mean moved from 58 to 43 µs within a minute, and the stretches with the highest means had no skipped frames. Each sequencer stop showed one second at 44-53 µs. That looks like the base's or stock's own state; it is reported on issue #1790. + +**Comparisons on the live-set unit, the same evening, switched in one build** (22 November 2026, each twice): + +| Variant | Mean a frame | +| --- | --- | +| as released, with LCUT (three one-poles a side) | 39-41 µs | +| the render loop compiled for speed (`-O2`, helpers inlined) | 51-52 µs | +| without LCUT | 39 µs (LCUT cost about 2 µs) | +| the sixteen voices as six loops / two loops instead of unrolled | 42 / 45 µs | + +LCUT was removed for this reason; the code size of the render loop matters more than its instruction count. + +**Earlier history** (summarised; the full log is in the pull request): the first full build cost about 76 µs a frame with 55 % of frames skipped in the live set (base `dbdf7e5d`, 19 November). The hits were removed, the slow figures moved to every eighth frame, the voices read at the nearest sample, the filter became a trapezoidal state-variable filter once a step, per-call state moved from BSS to initialised data (BSS is reached slowly), and RATE's timing is read only when needed. A busy-wait test machine (`UG_NULL`, issue #1790) showed that a machine in this set crackles from about 40-45 µs a frame on base 0.7.10. + +## CPU price + +Not measured yet (`npm run device -- do`, `guard`). + +## Stock flows + +Not compared systematically with and without the module. Seen in play with it installed: the machine list shows UNGEMACH as a row beside the stock machines, the other Flex tracks, their locks, LFOs and scenes, PLAY and STOP behaved as usual in the author's live set. Not tested: saving and loading projects and Parts, copying Parts, recording, MIDI, USB audio. + +UNGEMACH changes no stock flow. Its SRC SETUP A to D are empty and stay 0, so a track switched back to FLEX finds stock's defaults there. + +## OT UI captures + +Not captured yet. diff --git a/sdk/drafts/ungemach/calib_waves.c b/sdk/drafts/ungemach/calib_waves.c new file mode 100644 index 0000000000..c43a4c3378 --- /dev/null +++ b/sdk/drafts/ungemach/calib_waves.c @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: MIT + * Measures each waveform's level through the drone at its defaults (DIRT 0, PNCH 0), so gen_tables.py + * can trim them to one loudness (WAVE_TRIM_DB, printed in the order the waves are made, that tuple's order). + * cc -O2 -std=c99 calib_waves.c engine.c -lm -o calib && ./calib */ +#include +#include +#include "engine.h" +#include "tables.h" + +int main(void) +{ + static Ungemach k; + double level[UG_WAVES], mean = 0; + for (unsigned w = 0; w < UG_WAVES; ++w) { + double sum = 0; unsigned count = 0; + for (unsigned ptch = 16; ptch <= 52; ptch += 12) { + UgControls c = { .ptch = (uint16_t)(ptch << 8), .diss = 40, .tone = 80, .wave = (uint16_t)((w * 256u * 127u + UG_WAVES - 2u) / (UG_WAVES - 1u)), + .rate = 20, .move = 64, .sprd = 2, .dirt = 0 }; + ug_reset(&k); + int16_t l[16], r[16]; + for (unsigned at = 0; at < 44100 * 4; at += 16) { + ug_render(&k, &c, l, r, 16); + if (at < 44100) continue; + for (unsigned i = 0; i < 16; ++i) sum += (double)l[i] * l[i] + (double)r[i] * r[i], count += 2; + } + } + level[w] = 10 * log10(sum / count / (32768.0 * 32768.0)); + mean += level[w] / UG_WAVES; + } + double made[UG_WAVES]; + for (unsigned w = 0; w < UG_WAVES; ++w) made[ug_wave_made[w]] = mean - level[w]; + printf("WAVE_TRIM_DB = ("); + for (unsigned w = 0; w < UG_WAVES; ++w) printf("%.2f%s", made[w], w < UG_WAVES - 1u ? ", " : ")\n"); + return 0; +} diff --git a/sdk/drafts/ungemach/engine.c b/sdk/drafts/ungemach/engine.c new file mode 100644 index 0000000000..1479e4ca77 --- /dev/null +++ b/sdk/drafts/ungemach/engine.c @@ -0,0 +1,412 @@ +/* SPDX-License-Identifier: MIT + * UNGEMACH's engine: an original design. + * + * The drone: sixteen oscillators, eight a side, in three groups on a root (PTCH): the root itself and the two ratios + * DISS sets, from octave and fifth into fourteen stations of dissonance; and four subs an + * octave under the root. They play one waveform: WAVE crossfades through thirty-two of UNGEMACH's own, soft, harsh and + * sung, each band-limited for the pitch it plays. Within a group the voices sit a few cents apart, and each drifts on + * its own, so they beat against each other all the time. A sine at the third ratio, and the drone's own last sample, + * push every voice's phase (FM, by DIRT). The oscillators run at half the rate (ten interpolated, six read at the + * nearest sample); a half-band interpolator draws the full rate. SPRD sets how wide the two sides stand. A little dark noise; one + * resonant low-pass a side (TONE, its resonance by DIRT); saturation (by DIRT; at 0 it stays clean). A slow random + * drift moves pitch and cutoff, and the movement runs at full: freely at a RATE up to 63, on three curves of their + * own, or as a pulse on the track's steps above it. + * + * No hits of its own: the track's AMP envelope, filter and LFOs shape it on the DSP as they do a sample, and an LFO on + * DIRT in a trig mode makes a hit from the drone itself. + * Laws and constants: gen_tables.py. */ +#include "engine.h" +#include "tables.h" + +static int32_t clamp(int32_t v, int32_t lo, int32_t hi) { return v < lo ? lo : v > hi ? hi : v; } + +static uint32_t next(Ungemach *k) +{ + uint32_t x = k->rng; + x ^= x << 13, x ^= x >> 17, x ^= x << 5; + return k->rng = x; +} +static int32_t noise(Ungemach *k) { return (int32_t)next(k) >> 16; } +/* a waveform read between its samples */ +static inline __attribute__((always_inline)) int32_t look(const int16_t *t, uint32_t ph) +{ + unsigned i = ph >> 24; + int32_t a = t[i], b = t[i + 1]; + return a + (((b - a) * (int32_t)((ph >> 9) & 0x7fffu)) >> 15); +} +/* the richest mip whose top harmonic stays clear of aliasing at this increment */ +static unsigned mip_of(uint32_t inc) +{ + unsigned m = 0; + while (m < UG_MIPS - 1u && inc > ug_mip_inc[m]) ++m; + return m; +} +/* one slice of a group's waveform: the two waves around pos (0..(UG_WAVES - 1) << 8) crossfaded at one mip. A call + * makes UG_SLICE samples, the same work every call, so the cost never jumps when WAVE moves or the pitch crosses a mip. */ +#define UG_SLICE 32u +#define UG_SLICES (UG_WAVE_LEN / UG_SLICE) +#define UG_GLIDE 2 /* WAVE glides 2/256 of a waveform a block: a knob step in about 15 blocks (3 ms), 0 to 127 in 0.35 s */ +static void make(Ungemach *k, unsigned g, unsigned mip, uint32_t pos, unsigned from) +{ + unsigned a = pos >> 8, b = a + 1u < UG_WAVES ? a + 1u : a, sh = ug_mip_shift[mip]; + int32_t w = (int32_t)(pos & 255u); + const int16_t *A = ug_waves + a * UG_WAVE_STRIDE + ug_mip_off[mip], *B = ug_waves + b * UG_WAVE_STRIDE + ug_mip_off[mip]; + int16_t *o = k->work[g]; + if (!sh) { + for (unsigned i = from; i < from + UG_SLICE; ++i) o[i] = (int16_t)(A[i] + (((B[i] - A[i]) * w) >> 8)); + } else { + /* a mip kept shorter is drawn out to the full length through a cubic (Catmull-Rom), which adds far less + * above its harmonics than a straight line would. Each of its samples is crossfaded once, then slides + * through the four the cubic reads. */ + unsigned lm = (UG_WAVE_LEN >> sh) - 1u, per = 1u << sh, j0 = from >> sh, jn = (from + UG_SLICE) >> sh; +#define UG_XF(q) (A[(q) & lm] + (((B[(q) & lm] - A[(q) & lm]) * w) >> 8)) + int32_t y0 = UG_XF(j0 - 1u), y1 = UG_XF(j0), y2 = UG_XF(j0 + 1u); + int16_t *out = o + from; + for (unsigned j = j0; j < jn; ++j) { + int32_t y3 = UG_XF(j + 2u); + *out++ = (int16_t)y1; + for (unsigned t = 1; t < per; ++t) { + const int16_t *h = ug_herm[t << (2u - sh)]; + *out++ = (int16_t)clamp((h[0] * y0 + h[1] * y1 + h[2] * y2 + h[3] * y3) >> 12, -32767, 32767); + } + y0 = y1, y1 = y2, y2 = y3; + } +#undef UG_XF + } + if (!from) o[UG_WAVE_LEN] = o[0]; +} +static int32_t sine(uint32_t ph) { return ug_sine[ph >> 22]; } +/* 1.5 x - 0.5 x^3, flat beyond +-1 (Q15) */ +static int32_t smoothstep(int32_t x) +{ + x = clamp(x, -32767, 32767); + int32_t x2 = (x * x) >> 15, x3 = (x2 * x) >> 15; + return (3 * x - x3) >> 1; +} +/* above 0.75 of full scale the level bends towards it instead of clipping */ +static inline __attribute__((always_inline)) int32_t bend(int32_t o) +{ + const int32_t soft = 24575; + int32_t over = (o < 0 ? -o : o) - soft; + if (over <= 0) return o; + if (over >= 1 << 17) over = (1 << 17) - 1; + unsigned j = (unsigned)over >> 7; + int32_t bent = ug_bend[j] + (((ug_bend[j + 1] - ug_bend[j]) * (over & 127)) >> 7); /* soft + over room / (over + room) */ + return o < 0 ? -bent : bent; +} + +void ug_reset(Ungemach *k) +{ + uint8_t *p = (uint8_t *)k; + for (unsigned i = 0; i < sizeof *k; ++i) p[i] = 0; + k->rng = 0x6d2b79f5u; + for (unsigned v = 0; v < UG_NVOICES; ++v) k->ph[v] = next(k); /* free phases: no click of all voices at once */ + for (unsigned v = 0; v < UG_NSUBS; ++v) k->phs[v] = next(k); + k->pos = -1; /* the first block takes WAVE as it is; the drone fades in while the waveforms fill */ + k->r2q = -1; /* the first block takes DISS as it is */ + for (unsigned g = 0; g < UG_GROUPS; ++g) k->wkey[g] = 0xffffffffu; +} + +static uint32_t root_inc(uint16_t ptch) +{ + unsigned raw = ptch >> 8, frac = ptch & 255u; + if (raw < 4u) raw = 4u, frac = 0; + if (raw >= 124u) raw = 124u, frac = 0; + uint32_t a = ug_root_inc[raw - 4u], b = raw < 124u ? ug_root_inc[raw - 3u] : a; + return a + (((b - a) * frac) >> 8); +} + +#define UG_FRAME 16u +/* PNCH: two falling envelopes from a trig. The body falls with a time constant of 35 ms at a low PNCH, growing fast + * to 55 ms at its top (ug_punch_fall, a frame, Q15); at its height it throws the filter open, + * takes DIRT up and lifts the level (+12 dB for a full punch). The crack, about 3 ms (exp(-0.3628 / 3)), lifts it twice + * again (+6 dB) at the onset. The output's soft bend takes what goes past full scale: a hit, pressed, never clipped. + * PNCH works straight, so it is heard from the lower half on; its top is what 110 was in v65, a little over half a full + * punch (22 November 2026, the user: 127 too loud, up to 50 too subtle). */ +#define UG_CRACK_FALL 29030 +#define UG_PUNCH_CUT16 144 +#define UG_PUNCH_DIRT 127 +#define UG_PUNCH_LIFT 12288 /* Q12 */ +#define UG_CRACK_LIFT 8192 /* Q12 */ +void ug_punch(Ungemach *k) { k->pk = 32767, k->pc = 32767; } +/* once a frame: everything that moves at the frame rate, into k->fr */ +static void ug_levels(Ungemach *k, const UgControls *c); +/* the waveforms are made again a slice a frame, the groups in turn, only while one is still to make: WAVE's place and + * the groups' mips move only with the slow figures, which mark the groups whose waveform moved (ug_frame), so a frame + * with nothing to make costs a test. A turn of WAVE is heard as soon as it was before the slow figures went to every 8th + * frame (21 November 2026, the user: WAVE answered late). */ +static void ug_slice(Ungemach *k) +{ + for (unsigned t = 0; t < UG_GROUPS; ++t) { + const unsigned gi = k->slice++ & 3u; + if (!k->wleft[gi]) continue; + const unsigned from = (UG_SLICES - k->wleft[gi]) * UG_SLICE; + --k->wleft[gi]; + make(k, gi, k->gmip[gi], (uint32_t)k->pos, from); + return; + } +} +/* every 4th frame (UG_SLOW): everything that moves slowly, standing for the frames since, into k->fr */ +static void ug_frame(Ungemach *k, const UgControls *c, unsigned mult) +{ + const unsigned n = UG_FRAME * mult; /* the frames these figures stand for: time-scaled steps take them all */ + /* ---- once a block: pitch, ratios, cutoff, level ---- */ + k->drift_count += n; + if (k->drift_count >= 1u << 17) { + k->drift_count = 0; + for (unsigned i = 0; i < 2; ++i) k->target[i] = noise(k); + } + for (unsigned i = 0; i < 2; ++i) k->drift[i] += (k->target[i] - k->drift[i]) >> 11; + int32_t cents = (k->drift[0] * UG_DRIFT_CENTS) >> 15; + int32_t cut = ug_tone16[c->tone & 127] + ((k->drift[1] * UG_DRIFT_CUT16) >> 15); + int32_t level = 4096; /* Q12 */ + const int32_t mv = c->move & 127; /* MOVE, Q6: 64 as designed */ +#define MVQ 6 + if ((c->rate & 127) < 64) { + /* free: three smoothed random curves at full depth, pitch at 0.7 of RATE's pace, cutoff at it, level at 1.3, + * so the three seldom peak together */ + static const uint16_t pace[3] = { 179, 256, 333 }; /* Q8 */ + int32_t l[3]; + for (unsigned j = 0; j < 3; ++j) { + uint32_t before = k->lfo_phase[j]; + k->lfo_phase[j] += (((uint32_t)(int32_t)ug_free_inc[c->rate & 63u] >> 8) * pace[j]) * n; + if (k->lfo_phase[j] < before) k->lfo_from[j] = k->lfo_to[j], k->lfo_to[j] = noise(k); + int32_t p = (int32_t)(k->lfo_phase[j] >> 17); /* Q15 */ + int32_t s = (((p * p) >> 15) * (98304 - 2 * p)) >> 15; /* 3p^2 - 2p^3 */ + l[j] = k->lfo_from[j] + (((k->lfo_to[j] - k->lfo_from[j]) * (s >> 1)) >> 14); + } + for (unsigned j = 0; j < 3; ++j) l[j] = (l[j] * mv) >> MVQ; /* MOVE: the curves' depth */ + cents += (l[0] * UG_MOVE_CENTS) >> 15; + /* the cutoff's curve: +-25 % of TONE's travel (UG_MOVE_CUT16 is 30 %) at every free RATE */ + cut += (((l[1] * UG_MOVE_CUT16) >> 15) * 3413) >> 12; + level -= (((l[2] < 0 ? -l[2] : l[2]) * UG_MOVE_LEVEL) >> 15) >> 1; + } else { + /* synced: a pulse at the start of each cycle that falls away, opening the filter and lifting the level */ + int32_t e = (int32_t)((((uint32_t)(65535u - c->sync_phase) * (65535u - c->sync_phase)) >> 17)); /* Q15 */ + /* its height: 25 % of TONE's travel at S16's first step (64), rising over S16 to 35 % at 74, then 35 % */ + const unsigned r = (c->rate & 127u) - 64u; + const int32_t sdep = r >= 10u ? 4779 : 3413 + (int32_t)(r * 1366u) / 10; /* Q12 of UG_MOVE_CUT16 */ + cut += (((((e * UG_MOVE_CUT16) >> 15) * mv) >> MVQ) * sdep) >> 12; + level -= ((((32767 - e) * UG_MOVE_LEVEL) >> 15) * mv) >> MVQ; + } + if (level < 0) level = 0; + k->fr.cut0 = cut, k->fr.level0 = level; /* before PNCH, which ug_levels adds every frame */ + /* DISS: between its steps by the halfword's low byte, then gliding there (about 90 ms), so a step is a slide, + * never a stair, and a turn of the knob or an LFO on DISS runs as one glissando */ + { + unsigned dv = c->diss & 127, nx = dv < 127u ? dv + 1u : dv; + int32_t fr = (int32_t)c->diss_frac; + int32_t t2 = (int32_t)ug_ratio2[dv] + ((((int32_t)ug_ratio2[nx] - (int32_t)ug_ratio2[dv]) * fr) >> 8); + int32_t t3 = (int32_t)ug_ratio3[dv] + ((((int32_t)ug_ratio3[nx] - (int32_t)ug_ratio3[dv]) * fr) >> 8); + t2 <<= 4, t3 <<= 4; + if (k->r2q < 0) k->r2q = t2, k->r3q = t3; + else k->r2q += ((t2 - k->r2q) >> 12) * (int32_t)n, k->r3q += ((t3 - k->r3q) >> 12) * (int32_t)n; + } + + uint32_t inc1 = root_inc(c->ptch); + inc1 += (uint32_t)(((int32_t)(inc1 >> 10) * ((cents * UG_CENT) >> 8)) >> 6); + uint32_t g[3] = { inc1, (inc1 >> 10) * ((uint32_t)k->r2q >> 10), (inc1 >> 10) * ((uint32_t)k->r3q >> 10) }; + /* each voice's own drift: one voice a block may pick a new target, every voice glides towards its own */ + unsigned turn = k->vturn++ % UG_NVOICES; + if ((next(k) >> 24) == 0) k->vtarget[turn] = (noise(k) * UG_VOICE_DRIFT * 256) >> 15; + /* the waveforms: WAVE's place among the sixteen, gliding there, at the mip each group's pitch allows at the + * oscillators' half rate (its top harmonic under 16 kHz / 1.625, below their 11 kHz); the subs one mip softer. + * ug_slice makes one slice of one group a frame: every waveform is new again within 32 frames (12 ms). */ + int32_t want = (int32_t)((uint32_t)c->wave * (UG_WAVES - 1u) / 127u); + if (want > (UG_WAVES - 1) << 8) want = (UG_WAVES - 1) << 8; + if (k->pos < 0) k->pos = want; + else { + int32_t d = want - k->pos; + const int32_t gl = UG_GLIDE * (int32_t)mult; /* by the frames these figures stand for: the glide keeps its pace */ + k->pos += d > gl ? gl : d < -gl ? -gl : d; + } + const unsigned osh = 1u; + for (unsigned gi = 0; gi < 3; ++gi) k->gmip[gi] = (uint8_t)mip_of(g[gi] + (g[gi] >> 1) + (g[gi] >> 3)); + { + uint32_t h = inc1 >> 1; + unsigned smip = mip_of(h + (h >> 1) + (h >> 3)) + 1u; + k->gmip[3] = (uint8_t)(smip < UG_MIPS ? smip : UG_MIPS - 1u); + } + for (unsigned gi = 0; gi < UG_GROUPS; ++gi) { + const uint32_t key = (uint32_t)k->pos | (uint32_t)k->gmip[gi] << 16; + if (key != k->wkey[gi]) k->wkey[gi] = key, k->wleft[gi] = UG_SLICES; /* made again from its first slice */ + } + uint32_t sinc[UG_NSUBS]; + for (unsigned v = 0; v < UG_NSUBS; ++v) { + uint32_t h = inc1 >> 1; + sinc[v] = (h + (uint32_t)(((int32_t)(h >> 10) * ((ug_sub_cents[v] * UG_CENT) >> 8)) >> 6)) << 1; /* half rate */ + } + uint32_t inc[UG_NVOICES]; + for (unsigned v = 0; v < UG_NVOICES; ++v) { + k->vdrift[v] += (k->vtarget[v] - k->vdrift[v]) >> ug_vglide[v]; /* each at its own pace */ + int32_t delta = ((ug_spread[v] * 256 + k->vdrift[v]) * UG_CENT) >> 16; /* Q16 */ + uint32_t gv = g[ug_vgroup[v]]; + inc[v] = (gv + (uint32_t)(((int32_t)(gv >> 10) * delta) >> 6)) << osh; /* half (or quarter) rate */ + } + uint32_t minc = g[2] << osh; + int32_t width = ug_width[c->sprd & 3]; + + for (unsigned v = 0; v < UG_NVOICES; ++v) k->fr.inc[v] = inc[v]; + for (unsigned v = 0; v < UG_NSUBS; ++v) k->fr.sinc[v] = sinc[v]; + k->fr.minc = minc; + k->fr.width = width; + /* the fade-in, to half: the level everything is set for */ + k->fade += ((16384 - k->fade) * (int32_t)n) >> 14; + if (k->fade > 16384) k->fade = 16384; +} + +/* every frame: PNCH's punch and what it moves (cutoff, DIRT and level), so a trig's punch is as sharp as before + * however seldom the slow figures are worked out. The punch falls by the frames that passed, a skipped one too. */ +static void ug_levels(Ungemach *k, const UgControls *c) +{ + { + unsigned fr = c->frames ? c->frames : 1u; + if (fr > 200u) k->pk = k->pc = 0; + const int32_t fall = ug_punch_fall[c->pnch & 127u]; + for (; fr && (k->pk | k->pc); --fr) k->pk = (k->pk * fall) >> 15, k->pc = (k->pc * UG_CRACK_FALL) >> 15; + } + const int32_t amt = (int32_t)((c->pnch & 127u) * 71u) / 127; /* PNCH straight, 0..71 */ + const int32_t pe = (k->pk * amt) >> 7, ce = (k->pc * amt) >> 7; /* Q15 */ + int32_t cut = clamp(k->fr.cut0 + ((pe * UG_PUNCH_CUT16) >> 15), 0, UG_CUT_STEPS - 1); + unsigned dirt = (c->dirt & 127) + (unsigned)((pe * UG_PUNCH_DIRT) >> 15); + if (dirt > 127u) dirt = 127u; + k->fr.f = ug_svf_f[cut]; + k->fr.q = (int32_t)ug_q[dirt], k->fr.sat = (int32_t)ug_sat[dirt]; + k->fr.fm = (int32_t)ug_fm[dirt], k->fr.fbk = (int32_t)ug_fb[dirt]; + k->fr.gain = (((UG_DRONE_GAIN * k->fr.level0) >> 12) * (int32_t)ug_sat_gain[dirt]) >> 12; /* Q12 */ + k->fr.gfd = (k->fr.gain * (k->fade >> 3)) >> 12; + k->fr.gfd += (k->fr.gfd * (((pe * (UG_PUNCH_LIFT >> 4)) >> 11) + ((ce * (UG_CRACK_LIFT >> 4)) >> 11))) >> 12; /* PNCH lifts the level */ + { + /* the trapezoidal low-pass: a1 = 1 / (1 + g (g + k)), a2 = g a1, a3 = g a2, k its damping (DIRT's q) */ + const int32_t gg = ug_tpt_g[cut], den = 4096 + ((gg * (gg + k->fr.q)) >> 12); + k->fr.a1 = (4096 * 4096) / den, k->fr.a2 = (gg * k->fr.a1) >> 12, k->fr.a3 = (gg * k->fr.a2) >> 12; + } + k->fr.ready = 1; +} + +/* The voices, a waveform a run: left root 3, second 3, third 2; right root 3, second 2, third 3 (gen_tables.py's + * runs), each read at the nearest sample of its group's waveform */ +#define UG_NR(W, V) (ph[V] += inc[V], (int32_t)(W)[(ph[V] + pm) >> 24]) + +/* The drone, a frame's call at a time. CORE is inlined twice: into ug_render_part (int16 arrays, the host tests) and + * into ug_render_out (straight into the packer's buffer, machine.c), so the sample loop has no branch for it. */ +/* The per-sample state sits in registers for the call and the soft bend runs at the half rate (A/B on the live set, + * 21 November 2026, with the per-call state out of bss: 43-45 µs a frame down to 37-38, the same sound) */ +static inline __attribute__((always_inline)) void ug_core(Ungemach *k, const UgControls *c, int16_t *left, int16_t *right, + volatile uint32_t *dst, unsigned n, int fresh) +{ + /* the slow figures every 8th frame (UG_SLOW, standing for the frames since); PNCH's figures with them, and every + * frame while a punch runs (A/B on the live set, 20 November 2026: 5 µs a frame less, heard as the same) */ + const unsigned slow = UG_SLOW; + const int32_t a1 = k->fr.a1, a2 = k->fr.a2, a3 = k->fr.a3; /* the trapezoidal low-pass, Q12 */ + if (!k->fr.ready) ug_frame(k, c, 1u), ug_levels(k, c), ug_slice(k), k->vskip = (uint8_t)(slow - 1u); + else if (fresh) { + if (k->vskip || 0) { + if (k->vskip) --k->vskip; + if ((k->pk | k->pc) && (c->pnch & 127u)) ug_levels(k, c); + } else ug_frame(k, c, slow), ug_levels(k, c), k->vskip = (uint8_t)(slow - 1u); + if (k->wleft[0] | k->wleft[1] | k->wleft[2] | k->wleft[3]) ug_slice(k); + } + const uint32_t *inc = k->fr.inc, *sinc = k->fr.sinc; + const uint32_t minc = k->fr.minc; + const int32_t sat = k->fr.sat, fm = k->fr.fm, fbk = k->fr.fbk, width = k->fr.width; + const int16_t *st = k->work[3], *w0 = k->work[0], *w1 = k->work[1], *w2 = k->work[2]; + int32_t lowl = k->lowl, bandl = k->bandl, lowr = k->lowr, bandr = k->bandr; + int32_t dcl = k->dcl, dcr = k->dcr, fb = k->fb; + const int32_t gfd = k->fr.gfd; + /* the state each sample touches, in registers for the call */ + unsigned half = k->half, subq = k->subq; + int32_t xl1 = k->xl1, xr1 = k->xr1, nlp = k->noise_lp, subl = k->subl, subr = k->subr, subl0 = k->subl0, subr0 = k->subr0; + uint32_t phm = k->phm, rng = k->rng; + for (unsigned i = 0; i < n; ++i) { + int32_t xl, xr; + if ((half ^= 1u) != 0) { + /* ---- the drone, every other sample: the voices, the subs and the noise, then the low-pass (twice a step, + * the step's input held, so TONE and DIRT keep the tone they have at the full rate), the saturation, the DC + * blocker, a side each; a half-band interpolator draws the full rate from them ---- */ + uint32_t *ph = k->ph; + int32_t sl, sr; + phm += minc; + /* a sine at the third ratio and the drone's own last sample push every voice's phase (DIRT) */ + const uint32_t pm = 0 ? 0u : (uint32_t)(sine(phm) * fm + clamp(fb, -32767, 32767) * fbk) << 1; + { + /* all sixteen read at the nearest sample: their density for little (measured 5 µs a frame under ten read + * between samples and six at the nearest, 20 November 2026, and heard as all but the same) */ + sl = UG_NR(w0, 0) + UG_NR(w0, 1) + UG_NR(w0, 2) + UG_NR(w1, 3) + UG_NR(w1, 4) + UG_NR(w1, 5) + UG_NR(w2, 6) + UG_NR(w2, 7); + sr = UG_NR(w0, 8) + UG_NR(w0, 9) + UG_NR(w0, 10) + UG_NR(w1, 11) + UG_NR(w1, 12) + UG_NR(w2, 13) + UG_NR(w2, 14) + UG_NR(w2, 15); + } + /* the dark noise, every other oscillator step (A/B on the live set, 20 November 2026: heard as the same) */ + if (!(subq & 1u)) { rng ^= rng << 13, rng ^= rng >> 17, rng ^= rng << 5; nlp += (((int32_t)rng >> 16) - nlp) >> 2; } + const int32_t nz = (nlp * UG_NOISE) >> 12; + { + /* the subs, an octave under the root and a mip softer: every 4th oscillator step (an eighth of the rate), + * a straight line from their last to their newest between */ + const unsigned q4 = subq = (subq + 1u) & 3u; + if (!q4) { + k->phs[0] += sinc[0] << 2, k->phs[1] += sinc[1] << 2, k->phs[2] += sinc[2] << 2, k->phs[3] += sinc[3] << 2; + subl0 = subl, subr0 = subr; + subl = ((look(st, k->phs[0]) + look(st, k->phs[1])) * UG_SUB_LEVEL) >> 12; + subr = ((look(st, k->phs[2]) + look(st, k->phs[3])) * UG_SUB_LEVEL) >> 12; + } + sl += subl0 + (((subl - subl0) * (int32_t)(q4 + 1u)) >> 2); + sr += subr0 + (((subr - subr0) * (int32_t)(q4 + 1u)) >> 2); + } + int32_t ol, or_; + { + { + const int32_t mid = (sl + sr) >> 3, side = (((sl - sr) >> 3) * width) >> 12; + const int32_t il = mid + side + nz, ir = mid - side + nz; + /* the low-pass: trapezoidal (Zavalishin's state-variable filter in Simper's form), once a step at the + * oscillators' half rate, without the peak near the top a Chamberlin filter has there (it let the + * nearest-sample reads' hiss through); band and low hold its two states, to 2^18. A/B on the live set, + * 20 November 2026: 1-2 µs a frame under a Chamberlin filter run twice a step, and heard as better. */ + int32_t yl = il, yr = ir; + if (!0) { + int32_t v3 = il - lowl, v1 = (a1 * bandl + a2 * v3) >> 12; + yl = lowl + ((a2 * bandl + a3 * v3) >> 12); + bandl = clamp(2 * v1 - bandl, -(1 << 18), 1 << 18), lowl = clamp(2 * yl - lowl, -(1 << 18), 1 << 18); + v3 = ir - lowr, v1 = (a1 * bandr + a2 * v3) >> 12; + yr = lowr + ((a2 * bandr + a3 * v3) >> 12); + bandr = clamp(2 * v1 - bandr, -(1 << 18), 1 << 18), lowr = clamp(2 * yr - lowr, -(1 << 18), 1 << 18); + } + if (0) { ol = (yl * gfd) >> 12, or_ = (yr * gfd) >> 12, fb = ol; } else { + ol = (smoothstep((yl * sat) >> 4) * gfd) >> 12, or_ = (smoothstep((yr * sat) >> 4) * gfd) >> 12; + fb = ol; + /* a DC blocker near 14 Hz, a shift at the half rate: PNCH and DIRT push the drone off centre */ + dcl += ((ol * 256) - dcl) >> 8, dcr += ((or_ * 256) - dcr) >> 8; + ol -= dcl >> 8, or_ -= dcr >> 8; + } + } + } + { + /* the full rate: halfway between the last two, then the newest (A/B on the live set, 20 November 2026: + * heard as the same as a four-point half-band) */ + /* the soft bend at the half rate, before the line between: half the calls, nearly the same */ + ol = bend(ol), or_ = bend(or_); + xl = (xl1 + ol) >> 1, xr = (xr1 + or_) >> 1; + xl1 = ol, xr1 = or_; + } + } else xl = xl1, xr = xr1; + const int32_t yl = xl, yr = xr; + if (dst) dst[2u * i] = (uint32_t)(uint16_t)yl << 16, dst[2u * i + 1u] = (uint32_t)(uint16_t)yr << 16; + else left[i] = (int16_t)yl, right[i] = (int16_t)yr; + } + k->half = (uint8_t)half, k->subq = (uint8_t)subq, k->xl1 = xl1, k->xr1 = xr1, k->noise_lp = nlp; + k->subl = subl, k->subr = subr, k->subl0 = subl0, k->subr0 = subr0, k->phm = phm, k->rng = rng; + k->lowl = lowl, k->bandl = bandl, k->lowr = lowr, k->bandr = bandr; + k->dcl = dcl, k->dcr = dcr, k->fb = fb; +} +void ug_render_part(Ungemach *k, const UgControls *c, int16_t *left, int16_t *right, unsigned n, int fresh) +{ + ug_core(k, c, left, right, 0, n, fresh); +} +void ug_render_out(Ungemach *k, const UgControls *c, volatile uint32_t *dst, unsigned n, int fresh) +{ + ug_core(k, c, 0, 0, dst, n, fresh); +} +#undef UG_NR + +void ug_render(Ungemach *k, const UgControls *c, int16_t *left, int16_t *right, unsigned n) +{ + ug_render_part(k, c, left, right, n, 1); +} diff --git a/sdk/drafts/ungemach/engine.h b/sdk/drafts/ungemach/engine.h new file mode 100644 index 0000000000..602c98a8a4 --- /dev/null +++ b/sdk/drafts/ungemach/engine.h @@ -0,0 +1,76 @@ +/* SPDX-License-Identifier: MIT + * UNGEMACH's sound: a drone of sixteen detuned oscillators and four subs, on waveforms of its own, that modulate each + * other and never stop moving. Integer only, no allocation, no firmware calls: it builds and is checked on the host + * (test_engine.c). */ +#ifndef UNGEMACH_ENGINE_H +#define UNGEMACH_ENGINE_H +#include + +typedef struct { + uint16_t ptch; /* SRC A, stock PTCH's halfword: raw byte << 8 (4..124), two a semitone; locks and LFOs in it */ + uint8_t diss; /* SRC B: 0 octave and fifth .. 127 chaos, along one path of dissonance */ + uint8_t diss_frac; /* SRC B's halfword's low byte: between two steps, as a slide or an LFO moves it */ + uint8_t tone; /* SRC C: the drone's low-pass, dark to bright */ + uint16_t wave; /* SRC D's halfword: the waveform, 0 soft .. 127 << 8 harsh, crossfaded (locks and LFOs in it) */ + uint8_t rate; /* SRC E: 0..63 free, 64..127 synced to the track's steps */ + uint8_t move; /* how deep RATE's movement goes: 0 none, 64 as designed, 127 about twice that */ + uint8_t sprd; /* SETUP E: MONO, NARW, WIDE, FULL */ + uint8_t dirt; /* SRC F: FM, resonance and saturation */ + uint8_t pnch; /* SETUP F: how hard a trig's punch opens the filter, adds DIRT and lifts the level, 0 none */ + uint8_t frames; /* frames since the last frame's figures, the skipped ones too (machine.c, from the timer); 0 reads as 1 */ + uint16_t sync_phase;/* where the synced cycle is, 0..65535 (machine.c, from the sequencer's clock) */ +} UgControls; + +#define UG_NVOICES 16 +#define UG_SLOW 8u /* the slow figures every 8th frame (2.9 ms): drift, voices, ratios, waveforms, RATE's movement */ +#define UG_NSUBS 4 +#define UG_GROUPS 4 /* the root, the second and third ratio, the subs */ +typedef struct { + uint32_t rng; + uint32_t ph[UG_NVOICES], phs[UG_NSUBS], phm; /* the voices, the subs and the FM sine */ + int16_t work[UG_GROUPS][257]; /* each group's waveform: two waves crossfaded at one mip, and its first sample again */ + int32_t vdrift[UG_NVOICES], vtarget[UG_NVOICES]; /* each voice's own drift, in 1/256 cents */ + uint32_t vturn; + int32_t lowl, bandl, lowr, bandr; /* the low-pass's two states a side (trapezoidal: ic2 and ic1) */ + int32_t noise_lp, fb; + int32_t dcl, dcr; /* the DC blocker, Q8 */ + int32_t fade; /* the drone fading in, Q15 */ + int32_t pk, pc; /* PNCH: the punch's body and its crack, Q15, falling from a trig */ + uint8_t vskip; /* frames until the next slow figures (UG_SLOW) */ + int32_t drift[2], target[2]; /* slow random walks: pitch, cutoff (Q15) */ + uint32_t drift_count; + uint32_t lfo_phase[3]; /* free RATE: three curves, pitch, cutoff and level, each at its own pace */ + int32_t lfo_from[3], lfo_to[3]; + /* cost: WAVE glides, and the four groups' waveforms are made again a slice at a time, round the groups; the + * oscillators run at half the rate, every other sample, and a half-band interpolator draws the full rate */ + int32_t pos; /* WAVE's place, gliding, 0..(UG_WAVES - 1) << 8 */ + uint8_t slice, half, gmip[UG_GROUPS]; + int32_t upl[16], upr[16]; /* the oscillators' last eight samples a side, twice, so eight in a row read from up + 1 */ + uint8_t up, wleft[UG_GROUPS]; /* the newest's place; slices of each group's waveform still to make */ + uint32_t wkey[UG_GROUPS]; /* what each group's waveform is being made from: its place and mip */ + int32_t r2q, r3q; /* DISS gliding: the ratios (Q20) */ + int32_t xl1, xr1; /* the full rate's next sample a side */ + int32_t subl, subr; /* the subs' last sample a side (they run at an eighth of the rate) */ + uint8_t subq; /* which of four oscillator steps the subs are at */ + int32_t subl0, subr0; /* the subs' sample before their last, to draw a line between */ + /* what the frame works out once (ug_frame) and its calls use: the increments, the filter and the levels */ + struct { + uint32_t inc[UG_NVOICES], sinc[UG_NSUBS], minc; + int32_t f, q, sat, fm, fbk, gain, width, gfd, cut0, level0; /* cut0, level0: before PNCH */ + int32_t a1, a2, a3; /* the trapezoidal low-pass's coefficients, Q12 */ + uint8_t ready; + } fr; +} Ungemach; + +void ug_reset(Ungemach *k); +/* a trig: the punch starts again (PNCH sets how much of it is heard) */ +void ug_punch(Ungemach *k); +/* n samples (at most 16) into left and right; works the frame's figures out first */ +void ug_render(Ungemach *k, const UgControls *c, int16_t *left, int16_t *right, unsigned n); +/* the same in a frame's parts: fresh on the frame's first call (its figures are worked out once, for 16 samples), not + * on a second call after the trig's offset */ +void ug_render_part(Ungemach *k, const UgControls *c, int16_t *left, int16_t *right, unsigned n, int fresh); +/* the same, written straight into the packer's buffer: an L and an R long a sample, the sample in the high half */ +void ug_render_out(Ungemach *k, const UgControls *c, volatile uint32_t *dst, unsigned n, int fresh); + +#endif diff --git a/sdk/drafts/ungemach/gen_tables.py b/sdk/drafts/ungemach/gen_tables.py new file mode 100644 index 0000000000..933f6b2681 --- /dev/null +++ b/sdk/drafts/ungemach/gen_tables.py @@ -0,0 +1,335 @@ +"""UNGEMACH's laws, written once: tables.h. Run after a change: `python3 -B gen_tables.py`. SR is 44,100 Hz. Every +number the engine uses is here, with what it does.""" +import math +import pathlib +import random + +SR = 44100.0 +HERE = pathlib.Path(__file__).parent + +# PTCH (SRC A, stock PTCH's byte 4..124): the drone's root, two steps a semitone, A1 (55 Hz) at ROOT_AT: one octave +# down to 27.5 Hz, four up to 880 Hz +ROOT_HZ, ROOT_AT, STEPS_PER_SEMITONE = 55.0, 28, 2 +# the voices: VOICES oscillators, half left and half right, in three groups (the root, DISS's second and third ratio), +# each SPREAD_CENTS apart in its group, each drifting on its own by up to VOICE_DRIFT_CENTS; and SUBS an octave under +# the root, SUB_CENTS apart, at SUB_LEVEL of a voice, one mip softer +VOICES = 16 +SUB_CENTS = (-3, 2, 3, -2) +SUB_LEVEL = 0.7 +# WAVE (SRC D): WAVES waveforms of our own, made once from random harmonics (WAVE_SEED), sorted dull to shrill and +# crossfaded; each kept band-limited at MIPS harmonic counts, so none aliases: a voice plays the richest whose top +# harmonic stays under MIP_TOP_HZ +# Then HARSH more, past the harshest of those: little fundamental, loud high harmonics, gaps and metallic clusters, +# their own seed, sorted the same way; then the choir: six vowels, UH OH AH AE EH IH, a glottal source through each +# vowel's three formants, laid out for a voice at VOWEL_HZ. +SOFT, HARSH, WAVE_LEN, WAVE_SEED = 16, 10, 256, 20261112 +VOWEL_HZ = 110.0 +VOWELS = [(300, 870, 2240), (450, 800, 2600), (730, 1090, 2440), (660, 1720, 2410), (530, 1840, 2480), (270, 2290, 3010)] +FORMANT_BW, FORMANT_GAIN = (90.0, 110.0, 170.0), (1.0, 0.6, 0.3) +WAVES = SOFT + HARSH + len(VOWELS) +MIPS = (64, 32, 16, 8, 4, 2) +# each mip kept at MIP_LEN samples (and its first again), four or more a harmonic; the engine draws it out to +# WAVE_LEN when it makes a voice's waveform. Room: a module's image and bss share 128 KiB. +MIP_LEN = (256, 256, 64, 64, 64, 64) +MIP_TOP_HZ = 16000.0 +WAVE_RMS = 0.42 +# each wave's trim to one loudness through the drone, measured by calib_waves.c (add its output to these), in the +# order the waves are made (soft, harsh, choir); each moves with its wave when they are sorted +WAVE_TRIM_DB = (-0.81, -0.86, -0.88, -0.82, -0.85, -0.88, -0.80, -0.80, -0.89, -0.83, 0.28, -1.11, 0.73, 1.77, 1.28, 5.49, + 5.18, 6.46, 8.6, 7.98, 6.89, 9.79, 8.28, 9.24, 6.97, 10.3, + -1.23, -1.86, -0.08, -1.26, -1.49, -0.92) +# WAVE's order by ear (the user, 22 November 2026): the second harsh wave, a narrow band of harmonics 12 to 15 and +# no fundamental, whistles far shriller than its place at WAVE 70; it goes after wave 14, to WAVE 102 +WAVE_BY_EAR = ((17, 14),) +# PNCH (SETUP F): the body's time constant, PUNCH_MS[0] at a low PNCH to PUNCH_MS[1] at its top, rising fast at first +# (1 - (1 - x)^2; the user, 22 November 2026: longer sooner, 25 ms was too short), as a fall a frame of 16 samples +PUNCH_MS = (35.0, 55.0) +# SPRD (SETUP E): the stereo width, MONO NARW WIDE FULL, as the side's share +WIDTHS = (0.0, 0.3, 0.6, 1.0) +SPREAD_CENTS = 9.0 +VOICE_DRIFT_CENTS = 14.0 +# DISS (SRC B): the second and third groups' ratios to the root, in cents. DISS 0 is unison, every group on the root +# (only the voices' spread between them), the clean start; from there a row of dissonant stations, each a plateau of several steps on which each ratio moves by +# PLATEAU_CENTS (the beating changing as it goes), joined by legs that glide at most about LEG_CENTS a step, so +# no step jumps and the consonances a leg passes slide by. The stations sit next to their neighbours, so no leg is long, and they end +# on the scream far above. Through the waypoints a monotone cubic a ratio, so nothing overshoots and nothing stands. +# The stations rise by where the chord's weight sits (the mean of its sixteen voices in cents: root 6, second 5, third +# 5), so the pitch one hears as the drone's own climbs with DISS (the user, 22 November 2026: it rose and fell). +DISS_START = (0, 0) +DISS_STATIONS = [('a quarter tone above and below', 50, -50), + ('a semitone above and below', 100, -100), + ('a semitone and a whole tone above', 100, 200), + ('a quarter-sharp tritone and a semitone under', 650, -100), + ('major seventh and minor second', 1100, 100), + ('minor ninth and a semitone under', 1300, -100), + ('two tritones a quarter tone apart', 650, 600), + ('major seventh and a quarter-sharp tritone', 1100, 650), + ('octave and fifth', 1200, 702), + ('minor ninth and a quarter-sharp tritone', 1300, 650), + ('minor ninth and major seventh', 1300, 1100), + ('a minor ninth and a major seventh an octave up', 2300, 1300), + ('a semitone either side of two octaves', 2500, 2300), + ('the scream', 2669, 3041)] +PLATEAU_CENTS, START_STEPS = 60.0, 3.0 +LEG_MIN, LEG_CENTS = 2.0, 150.0 # a leg's steps: LEG_CENTS of its longer move a step, at least LEG_MIN + + +def _diss_way(): + """the waypoints (step, cents of the second, cents of the third): a plateau a station, short legs between""" + # each ratio moves across its plateau the way the path goes on (from the station before to the one after), so it + # rarely turns, and where it does the other ratio still moves + half, at = PLATEAU_CENTS / 2, [DISS_START] + [s[1:] for s in DISS_STATIONS] + pts = [] + for j in range(1, len(at)): + after = at[j + 1] if j + 1 < len(at) else (2 * at[j][0] - at[j - 1][0], 2 * at[j][1] - at[j - 1][1]) + d = [1 if after[k] > at[j - 1][k] else -1 if after[k] < at[j - 1][k] else (1, -1)[k] for k in (0, 1)] + pts.append((at[j][0] - d[0] * half, at[j][1] - d[1] * half, at[j][0] + d[0] * half, at[j][1] + d[1] * half)) + legs = [START_STEPS] + [max(LEG_MIN, max(abs(b[0] - a[2]), abs(b[1] - a[3])) / LEG_CENTS) + for a, b in zip(pts, pts[1:])] + plateau = (127.0 - sum(legs)) / len(pts) + way, at = [(0.0,) + DISS_START], 0.0 + for leg, p in zip(legs, pts): + at += leg + way.append((at, p[0], p[1])) + at += plateau + way.append((at, p[2], p[3])) + return way + + +DISS_WAY = _diss_way() + + +def _pchip(xs, ys, x): + """Fritsch-Carlson monotone cubic through (xs, ys) at x""" + n = len(xs) + d = [(ys[i + 1] - ys[i]) / (xs[i + 1] - xs[i]) for i in range(n - 1)] + m = [d[0]] + [0.0 if d[i - 1] * d[i] <= 0 else + 3 * (xs[i + 1] - xs[i - 1]) / ((2 * xs[i + 1] - xs[i] - xs[i - 1]) / d[i - 1] + + (xs[i + 1] + xs[i] - 2 * xs[i - 1]) / d[i]) + for i in range(1, n - 1)] + [d[-1]] + i = 0 + while i < n - 2 and x > xs[i + 1]: + i += 1 + h = xs[i + 1] - xs[i] + t = min(1.0, max(0.0, (x - xs[i]) / h)) + return ((2 * t ** 3 - 3 * t * t + 1) * ys[i] + (t ** 3 - 2 * t * t + t) * h * m[i] + + (-2 * t ** 3 + 3 * t * t) * ys[i + 1] + (t ** 3 - t * t) * h * m[i + 1]) + + +def diss(v, k): + """DISS's ratio k (0 the second, 1 the third) at v""" + return 2 ** (_pchip([w[0] for w in DISS_WAY], [w[1 + k] for w in DISS_WAY], float(v)) / 1200) + + +def diss_places(): + """where each station's plateau starts and ends on DISS""" + return [('%s (to %d)' % (s[0], round(DISS_WAY[2 * i + 2][0])), round(DISS_WAY[2 * i + 1][0])) + for i, s in enumerate(DISS_STATIONS)] + + +# TONE (SRC C): the low-pass's cutoff, 60 Hz to 6 kHz +TONE_LO, TONE_HI = 60.0, 6000.0 +# DIRT (SRC D): FM depth (a sine at the third ratio, and the drone's own output, on every voice's phase), resonance +# (Q from Q_CLEAN to Q_DIRTY) and saturation +FM_MAX, FEEDBACK_MAX = 0.35, 0.25 # phase deviation in cycles at DIRT 127 +Q_CLEAN, Q_DIRTY = 1.3, 0.16 +SAT_CLEAN, SAT_DIRTY = 1.0, 7.0 +# movement always at full (no MOVE control); RATE (SRC E): 0..63 free 0.02-2 Hz; 64..127 synced, steps a cycle +MOVE_CENTS, MOVE_OCTAVES, MOVE_LEVEL = 35.0, 2.0, 0.6 +FREE_LO, FREE_HI = 0.02, 2.0 +SYNC_STEPS = [16, 8, 6, 4, 3, 2] # machine.c's RATE words; the six spread over 64..127 +DRIFT_CENTS, DRIFT_OCTAVES = 6.0, 0.25 +# each voice glides to its own drift at its own pace: 2^VGLIDE blocks, fast (about 0.02 s) to slow (0.4 s) +VGLIDE = (7, 11) +DRONE_GAIN, NOISE_LEVEL = 0.45, 0.06 + + +def q12(x): + return int(round(x * 4096.0)) + + +def inc(hz): + return int(round(hz / SR * 4294967296.0)) + + +def svf_f(hz): + return 2.0 * math.sin(math.pi * min(hz, 8000.0) / SR) + + +def waves(): + """WAVES spectra (each harmonic's level and phase), each with the place it was made at. The first is nearly a sine, + the rest random in tilt, odd and even balance, gaps and peaks; each group sorted by spectral centroid, then all of + them by brightness as heard, dull first.""" + rnd = random.Random(WAVE_SEED) + # one phase per harmonic, shared by every wave, so a crossfade between two never cancels + phases = [0.0] + [rnd.uniform(0, 2 * math.pi) for _ in range(MIPS[0] - 1)] + spectra = [[(1.0, phases[0]), (0.18, phases[1]), (0.08, phases[2])] + [(0.0, 0.0)] * (MIPS[0] - 3)] + for w in range(1, SOFT): + tilt = 2.2 - 1.8 * w / (SOFT - 1) + rnd.uniform(-0.3, 0.3) + odd = rnd.uniform(0.2, 1.0) + peak, width = rnd.randint(3, 40), rnd.uniform(2.0, 10.0) + lift = rnd.uniform(0.0, 1.5) * w / (SOFT - 1) + sp = [] + for h in range(1, MIPS[0] + 1): + a = h ** -tilt * (odd if h % 2 == 0 else 1.0) + a *= 1.0 + lift * math.exp(-((h - peak) / width) ** 2) + if h > 1 and rnd.random() < 0.15: + a *= 0.1 + sp.append((a * rnd.uniform(0.6, 1.0), phases[h - 1])) + spectra.append(sp) + def centroid(sp): + return sum(h * a * a for h, (a, _) in enumerate(sp, 1)) / sum(a * a for a, _ in sp) + soft = [spectra[0]] + sorted(spectra[1:], key=centroid) + # the harsh ones: a rising or flat tilt, a weak fundamental, one to three metallic clusters, many gaps + hr = random.Random(WAVE_SEED + 1) + harsh = [] + for w in range(HARSH): + t = w / (HARSH - 1) + tilt = 0.15 - 1.0 * t + hr.uniform(-0.1, 0.1) + fund = 0.2 - 0.17 * t + gaps = 0.2 + 0.35 * t * hr.uniform(0.5, 1.0) + clusters = [(hr.randint(5, 40), hr.uniform(1.0, 4.0), hr.uniform(3.0, 8.0)) for _ in range(hr.randint(2, 3))] + sp = [] + for h in range(1, MIPS[0] + 1): + a = h ** -tilt * (fund if h == 1 else 1.0) + for c, wd, lift in clusters: + a *= 1.0 + lift * math.exp(-((h - c) / wd) ** 2) + if h > 2 and hr.random() < gaps: + a *= 0.03 + sp.append((a * hr.uniform(0.4, 1.0), phases[h - 1])) + harsh.append(sp) + harsh.sort(key=centroid) + # the choir: a glottal source (falling 6 dB an octave) through three formants, each a resonance in Hz + choir = [] + for formants in VOWELS: + sp = [] + for h in range(1, MIPS[0] + 1): + f = h * VOWEL_HZ + env = 0.03 + sum(g / (1.0 + ((f - fc) / (bw / 2)) ** 2) for fc, bw, g in zip(formants, FORMANT_BW, FORMANT_GAIN)) + sp.append((env / h, phases[h - 1])) + choir.append(sp) + # then all of them in one row from dull to shrill, by brightness as heard: the centre of the energy on a log + # frequency scale, A-weighted, for a voice at 55 and at 110 Hz; the sine stays first + def heard(sp): + def aw(f): + f2 = f * f + return (12194 ** 2 * f2 * f2) / ((f2 + 20.6 ** 2) * math.sqrt((f2 + 107.7 ** 2) * (f2 + 737.9 ** 2)) * (f2 + 12194 ** 2)) + c = 0.0 + for f0 in (55.0, 110.0): + e = [(a * a * aw(h * f0) ** 2, h * f0) for h, (a, _) in enumerate(sp, 1)] + c += sum(x * math.log2(f) for x, f in e) / sum(x for x, _ in e) + return c + made = list(enumerate(soft + harsh + choir)) + row = made[:1] + sorted(made[1:], key=lambda w: heard(w[1])) + # by ear: a wave the measure places too low, moved to just after another (both by the place they were made at) + for w, after in WAVE_BY_EAR: + x = next(e for e in row if e[0] == w) + row.remove(x) + row.insert(row.index(next(e for e in row if e[0] == after)) + 1, x) + print('wave order', [i for i, _ in row]) + return row + + +def render(sp, top, length=WAVE_LEN): + out = [] + for n in range(length): + x = 2 * math.pi * n / length + out.append(sum(a * math.sin(h * x + ph) for h, (a, ph) in enumerate(sp[:top], 1))) + return out + + +def write(): + r = ['/* Generated by gen_tables.py: do not edit. UNGEMACH\'s laws in fixed point. */', + '#ifndef UNGEMACH_TABLES_H\n#define UNGEMACH_TABLES_H\n#include '] + r.append('static const int16_t ug_sine[1025] = {' + ', '.join(str(int(round(32767 * math.sin(2 * math.pi * i / 1024)))) for i in range(1025)) + '};') + r.append('static const uint32_t ug_root_inc[121] = {' + ', '.join(str(inc(ROOT_HZ * 2 ** ((p - ROOT_AT) / (12.0 * STEPS_PER_SEMITONE)))) for p in range(4, 125)) + '};') + # the voices in runs of one group a side, so a run reads one waveform: left root 3, second 3, third 2; right root 3, + # second 2, third 3. In a run they sit SPREAD_CENTS apart (0, -1, +1), + # the right side a third of that higher + runs = [(0, 3), (1, 3), (2, 2), (0, 3), (1, 2), (2, 3)] + spread, group = [], [] + for ri, (gi, n) in enumerate(runs): + offs = (0.0, -1.0, 1.0) if n == 3 else (-0.5, 0.5) + for j in range(n): + spread.append(int(round((offs[j] + (0.33 if ri >= 3 else 0.0)) * SPREAD_CENTS))) + group.append(gi) + r.append('static const int8_t ug_spread[%d] = {' % VOICES + ', '.join(str(x) for x in spread) + '}; /* cents; voices 0..7 left */') + r.append('static const uint8_t ug_vgroup[%d] = {' % VOICES + ', '.join(str(x) for x in group) + '};') + gl = random.Random(WAVE_SEED + 2) + paces = [VGLIDE[0] + (VGLIDE[1] - VGLIDE[0]) * i // (VOICES - 1) for i in range(VOICES)] + gl.shuffle(paces) + r.append('static const uint8_t ug_vglide[%d] = {' % VOICES + ', '.join(map(str, paces)) + '}; /* each voice\'s drift glide, a shift */') + r.append('#define UG_VOICE_DRIFT %d /* cents */' % int(VOICE_DRIFT_CENTS)) + r.append('static const int8_t ug_sub_cents[4] = {' + ', '.join(str(x) for x in SUB_CENTS) + '}; /* 0, 1 left */') + r.append('#define UG_SUB_LEVEL %d /* Q12 */' % q12(SUB_LEVEL)) + # the waves: [wave][mip][sample], each wave scaled once to WAVE_RMS at its richest, no mip past full scale + rows, made = [], [] + for wi, sp in waves(): + made.append(wi) + full = render(sp, MIPS[0]) + # loudness as heard through the drone's filter: the low harmonics count, the top ones barely + rms = math.sqrt(sum((amp / (1.0 + (h / 12.0) ** 2)) ** 2 / 2 for h, (amp, _) in enumerate(sp, 1))) + scale = WAVE_RMS / rms * 10 ** (WAVE_TRIM_DB[wi] / 20.0) + for top, length in zip(MIPS, MIP_LEN): + m = render(sp, top, length) + k = min(scale, 0.98 / max(abs(v) for v in render(sp, top))) + m = [int(round(32767 * k * v)) for v in m] + rows.append(', '.join(str(v) for v in m + m[:1])) + r.append('#define UG_WAVES %d' % WAVES) + r.append('static const uint8_t ug_wave_made[%d] = {' % WAVES + ', '.join(map(str, made)) + '}; /* the wave at each place, as made: the order of WAVE_TRIM_DB (calib_waves.c) */') + r.append('#define UG_MIPS %d' % len(MIPS)) + r.append('#define UG_WAVE_LEN %d' % WAVE_LEN) + stride = sum(n + 1 for n in MIP_LEN) + offs = [sum(n + 1 for n in MIP_LEN[:m]) for m in range(len(MIPS))] + r.append('#define UG_WAVE_STRIDE %d' % stride) + r.append('static const uint16_t ug_mip_off[%d] = {' % len(MIPS) + ', '.join(map(str, offs)) + '};') + r.append('static const uint8_t ug_mip_shift[%d] = {' % len(MIPS) + ', '.join(str(int(math.log2(WAVE_LEN // n))) for n in MIP_LEN) + '};') + r.append('static const int16_t ug_waves[%d] = { /* wave * UG_WAVE_STRIDE + ug_mip_off[mip] + sample */' % (WAVES * stride) + ', '.join(rows) + '};') + # a voice's increment at most for each mip: its top harmonic under MIP_TOP_HZ + r.append('static const uint32_t ug_mip_inc[%d] = {' % len(MIPS) + ', '.join(str(inc(MIP_TOP_HZ / h)) for h in MIPS) + '};') + r.append('static const int16_t ug_width[4] = {' + ', '.join(str(q12(w)) for w in WIDTHS) + '}; /* Q12 */') + r.append('static const uint32_t ug_ratio2[128] = {' + ', '.join(str(int(round(diss(v, 0) * 65536))) for v in range(128)) + '}; /* Q16 */') + r.append('static const uint32_t ug_ratio3[128] = {' + ', '.join(str(int(round(diss(v, 1) * 65536))) for v in range(128)) + '}; /* Q16 */') + # a short mip drawn out to the full length: Catmull-Rom weights for the sample a quarter, a half and three + # quarters of the way between two (Q12; y0 before, y1, y2, y3 after) + herm = [] + for q in range(4): + t = q / 4.0 + herm.append([(-t ** 3 + 2 * t * t - t) / 2, (3 * t ** 3 - 5 * t * t + 2) / 2, (-3 * t ** 3 + 4 * t * t + t) / 2, (t ** 3 - t * t) / 2]) + r.append('static const int16_t ug_herm[4][4] = {' + ', '.join('{' + ', '.join(str(q12(w)) for w in row) + '}' for row in herm) + '}; /* Q12 */') + span = math.log2(TONE_HI / TONE_LO) + r.append('static const int16_t ug_tone16[128] = {' + ', '.join(str(int(round(16 * span * v / 127))) for v in range(128)) + '};') + steps = 16 * 9 + r.append('#define UG_CUT_STEPS %d' % steps) + r.append('static const int16_t ug_svf_f[%d] = {' % steps + ', '.join(str(q12(svf_f(TONE_LO * 2 ** (i / 16.0)))) for i in range(steps)) + '}; /* Q12 */') + # the low-pass is trapezoidal (TPT) at the oscillators' half rate, once a step: g = tan(pi fc / 22,050) for the same + # corners, taken from svf_f's coefficient (f = 2 sin(pi fc / 44,100)) so TONE's law stays as it was + r.append('static const int16_t ug_punch_fall[128] = {' + ', '.join(str(int(round(32768 * math.exp(-16000.0 / SR / (PUNCH_MS[0] + (PUNCH_MS[1] - PUNCH_MS[0]) * (1 - (1 - p / 127.0) ** 2)))))) for p in range(128)) + '}; /* Q15 */') + r.append('static const int16_t ug_tpt_g[%d] = {' % steps + ', '.join(str(q12(math.tan(2 * math.asin(q12(svf_f(TONE_LO * 2 ** (i / 16.0))) / 4096 / 2)))) for i in range(steps)) + '}; /* Q12 */') + r.append('static const uint16_t ug_fm[128] = {' + ', '.join(str(int(round(65535 * FM_MAX * (v / 127) ** 1.5))) for v in range(128)) + '};') + r.append('static const uint16_t ug_fb[128] = {' + ', '.join(str(int(round(65535 * FEEDBACK_MAX * (v / 127) ** 2))) for v in range(128)) + '};') + r.append('static const int16_t ug_q[128] = {' + ', '.join(str(q12(Q_CLEAN + (Q_DIRTY - Q_CLEAN) * v / 127)) for v in range(128)) + '}; /* Q12 */') + r.append('static const int16_t ug_sat[128] = {' + ', '.join(str(int(round(16 * (SAT_CLEAN + (SAT_DIRTY - SAT_CLEAN) * v / 127)))) for v in range(128)) + '}; /* Q4 */') + r.append('static const int16_t ug_sat_gain[128] = {' + ', '.join(str(q12((SAT_CLEAN / (SAT_CLEAN + (SAT_DIRTY - SAT_CLEAN) * v / 127)) ** 0.35)) for v in range(128)) + '}; /* Q12 */') + r.append('static const uint32_t ug_free_inc[64] = {' + ', '.join(str(inc(FREE_LO * (FREE_HI / FREE_LO) ** (v / 63.0))) for v in range(64)) + '};') + r.append('static const uint16_t ug_sync_q8[64] = {' + ', '.join(str(int(round(256 * SYNC_STEPS[v * len(SYNC_STEPS) // 64]))) for v in range(64)) + '}; /* steps a cycle, Q8 */') + r.append('#define UG_MOVE_CENTS %d' % int(MOVE_CENTS)) + r.append('#define UG_MOVE_CUT16 %d' % int(round(16 * MOVE_OCTAVES))) + r.append('#define UG_MOVE_LEVEL %d /* Q12 */' % q12(MOVE_LEVEL)) + r.append('#define UG_DRIFT_CENTS %d' % int(DRIFT_CENTS)) + r.append('#define UG_DRIFT_CUT16 %d' % int(round(16 * DRIFT_OCTAVES))) + r.append('#define UG_CENT %d /* Q24: ln 2 / 1200 */' % int(round(math.log(2) / 1200 * 16777216))) + # the output's soft limit above 0.75 of full scale: soft + over * room / (over + room), a step every 128 over + soft, room = 24575, 32767 - 24575 + r.append('static const int16_t ug_bend[1025] = {' + ', '.join(str(soft + (j * 128 * room) // (j * 128 + room)) for j in range(1025)) + '};') + r.append('#define UG_DRONE_GAIN %d /* Q12 */' % q12(DRONE_GAIN)) + r.append('#define UG_NOISE %d /* Q12 */' % q12(NOISE_LEVEL)) + r.append('#endif') + (HERE / 'tables.h').write_text('\n'.join(r) + '\n', newline='\n') + + +if __name__ == '__main__': + write() + print('wrote tables.h') + for name, v in diss_places(): + print('DISS %3d: %s' % (v, name)) diff --git a/sdk/drafts/ungemach/machine.c b/sdk/drafts/ungemach/machine.c new file mode 100644 index 0000000000..370b233dcf --- /dev/null +++ b/sdk/drafts/ungemach/machine.c @@ -0,0 +1,368 @@ +/* SPDX-License-Identifier: MIT + * UNGEMACH as a track machine: one row of the base's machine chooser (the ot_machines table), its page and its render. + * The page, the render glue and the sequencer clock are VA CLAP's (sdk/drafts/va-clap/machine.c), + * which reads stock RAM and ROM the way SYNTIZ, Analog BD and FM Synth do. + * + * Not PROTECT: every byte UNGEMACH keeps is a valid FLEX value (PTCH in 4..124, B-F 0..127; on SRC SETUP SPRD has the + * 4 steps FLEX's slot E has and PNCH F's 128; A-D are hidden at 0). + * + * The track's own AMP envelope shapes the drone on the DSP, as it does a sample: a trig opens it, HOLD at its top keeps + * the drone sounding. UNGEMACH writes nothing into the DSP's voice records, so a frame the base's guard skips leaves the + * envelope as it was. */ +#include +#include "engine.h" +#include "tables.h" +#include "../../machines/octatrack/include/modwerk_events.h" + +#define U8(a) (*(volatile uint8_t *)(uintptr_t)(a)) +/* state the render reads every call goes into initialized data, not bss: the loader reaches a package's bss through + * the uncached alias, about four times as slow (see voices) */ +#define UG_DATA __attribute__((section(".data"))) +#define U32(a) (*(volatile uint32_t *)(uintptr_t)(a)) +#define CURSOR 0x80001c80u /* the packer's source cursor */ +#define FP_PTR 0x800062a8u /* the rendered track's record: SRC A-F halfwords, locks, LFOs and scenes applied */ +#define EVENTS 0x46104d0cu /* a byte a track: bit 4, a voice starts this frame */ +#define LANE 0x80000810u /* the frame builder's current values, 72 bytes a track: SRC SETUP at +0x20 */ +#define FLEX_DESC 0x400d3176u /* stock's FLEX page record, 0x38 bytes before the page itself */ +#define DESC_BYTES 0x1cau + +/* ---- the page ----------------------------------------------------------------------------------------- */ + +static void text(uint8_t *p, const char *s, unsigned n) +{ + unsigned i = 0; + for (; i + 1u < n && s[i]; ++i) p[i] = (uint8_t)s[i]; + for (; i < n; ++i) p[i] = 0; +} +static void put32(uint8_t *p, uint32_t v) +{ + p[0] = (uint8_t)(v >> 24), p[1] = (uint8_t)(v >> 16), p[2] = (uint8_t)(v >> 8), p[3] = (uint8_t)v; +} +static void number(char *out, int v) +{ + unsigned i = 0, a = (unsigned)(v < 0 ? 0 : v); + if (a >= 100u) out[i++] = (char)('0' + a / 100u); + if (a >= 10u) out[i++] = (char)('0' + a / 10u % 10u); + out[i++] = (char)('0' + a % 10u); + out[i] = 0; +} +static void word(char *out, const char *const *names, unsigned count, int v) +{ + text((uint8_t *)out, names[v >= 0 && (unsigned)v < count ? v : 0], 5); +} +/* Formatters, called with the stored value. */ +void ungemach_fmt_ptch(char *out, int v) { number(out, v - 4); } /* PTCH's byte 4..124 shows 0..120 */ +void ungemach_fmt_num(char *out, int v) { number(out, v); } +void ungemach_fmt_rate(char *out, int v) +{ + /* 0..63 free; above, the synced cycle in steps */ + static const char *const s[] = { "16", "8", "6", "4", "3", "2" }; /* gen_tables.py's SYNC_STEPS */ + if (v < 64) { number(out, v); return; } + unsigned i = (unsigned)(v - 64) * 6u / 64u; + out[0] = 'S', out[1] = 0; + text((uint8_t *)out + 1, s[i < 6u ? i : 5u], 4); +} +void ungemach_fmt_sprd(char *out, int v) { static const char *const n[] = { "MONO", "NARW", "WIDE", "FULL" }; word(out, n, 4, v); } + +typedef struct { const char *label; uint8_t min, count, def, shown; void (*fmt)(char *, int); } Slot; +/* SRC A-F, then SRC SETUP A-F. SETUP C and D are hidden and stay 0: a control there blocks PLAY (C) or changes stock + * playback (D). Every count is FLEX's own (SETUP: 4, 2, 2, 2, 4, 128). DIRT sits on SRC F, where the track's LFOs and + * locks reach it: an LFO on it in a trig mode is UNGEMACH's hit. */ +static const Slot slots[12] = { + { "PTCH", 4, 121, 28, 1, ungemach_fmt_ptch }, + { "DISS", 0, 128, 40, 1, ungemach_fmt_num }, + { "TONE", 0, 128, 80, 1, ungemach_fmt_num }, + { "WAVE", 0, 128, 24, 1, ungemach_fmt_num }, + { "RATE", 0, 128, 20, 1, ungemach_fmt_rate }, + { "DIRT", 0, 128, 12, 1, ungemach_fmt_num }, + { "", 0, 4, 0, 0, ungemach_fmt_num }, + { "", 0, 2, 0, 0, ungemach_fmt_num }, + { "", 0, 2, 0, 0, ungemach_fmt_num }, + { "", 0, 2, 0, 0, ungemach_fmt_num }, + { "SPRD", 0, 4, 2, 1, ungemach_fmt_sprd }, + { "PNCH", 0, 128, 0, 1, ungemach_fmt_num }, +}; +/* The twelve bytes a track takes when it becomes UNGEMACH: PTCH 28 is the root at 55 Hz. */ +const uint8_t ungemach_part_defaults[12] = { 28, 40, 80, 24, 20, 12, 0, 0, 0, 0, 2, 0 }; /* PNCH 0: no punch */ + +static uint8_t desc[DESC_BYTES]; +static uint8_t built; +/* The page: stock's FLEX record copied at run time (never shipped), named, ranged and formatted here. Offsets from the + * page P = record + 0x38: short name +4, full name +9, labels +0x16 + 6 i, defaults +0x5e + i, minimum +0x6a + 4 i, + * count +0x9a + 4 i, formatter +0xca + 4 i, widget +0xfa + 4 i, knob handler +0x12a + 4 i, enable nibbles +0x18e + * (slots 0-7) and +0x18a (slots 8-11). */ +static uint32_t page(void) +{ + if (!built) { + const volatile uint8_t *src = (const volatile uint8_t *)(uintptr_t)FLEX_DESC; + uint8_t *p = desc + 0x38; + for (unsigned i = 0; i < DESC_BYTES; ++i) desc[i] = src[i]; + text(p + 4, "UNGM", 5), text(p + 9, "SRC UNGEMACH", 13); + uint32_t lo = 0, hi = 0; + for (unsigned i = 0; i < 12u; ++i) { + const Slot *s = &slots[i]; + text(p + 0x16 + 6 * i, s->label, 6); + p[0x5e + i] = s->def; + put32(p + 0x6a + 4 * i, s->min); + put32(p + 0x9a + 4 * i, s->count); + put32(p + 0xca + 4 * i, (uint32_t)(uintptr_t)s->fmt); + put32(p + 0xfa + 4 * i, 0); + put32(p + 0x12a + 4 * i, 0); + if (s->shown) { if (i < 8u) lo |= 1u << (4 * i); else hi |= 1u << (4 * (i - 8)); } + } + put32(p + 0x18e, lo), put32(p + 0x18a, hi); + built = 1; + } + return (uint32_t)(uintptr_t)(desc + 0x38); +} +uint32_t ungemach_track_page(const volatile uint8_t *slot) { (void)slot; return page(); } +uint32_t ungemach_setup_page(uint32_t stock) { (void)stock; return page(); } +unsigned ungemach_setup_knob(unsigned index, int delta) { (void)index, (void)delta; return 0; } + +/* ---- the sequencer's time ------------------------------------------------------------------------------ */ +/* No clock of its own: the sequencer's, read as Euclid does (sdk/octabam/modules/euclid/control.c, MIT, Sam Banks): + * the frame clock, the transport, the tempo, and the pattern's and track's speed and length. It sets where a synced + * RATE's cycle is. */ +#define FRAME_CLOCK 0x46104cf0u +#define TRANSPORT 0x800065b8u +#define TEMPO24 0x8000181cu +#define SEQ_BANK 0x800065bdu +#define SEQ_PATTERN 0x800065beu +#define BANK_BLOB 0x400e21e0u +#define BANK_STRIDE 635712u +#define PATTERN_STRIDE 36568u +#define TRACK_STRIDE 2330u +#define QUANTUM 1323000u /* a track step is 2 x scale of these */ +#define PING_AT 0x800000e0u /* the frame builder's ping: the DSP record set built this frame */ + +typedef struct { uint32_t step, scale; } Grid; /* a step is 2 x scale quanta */ +/* the track's speed alone (a step is 2 x scale quanta): the one figure of the grid RATE needs */ +static uint32_t grid_scale(unsigned track) +{ + static const uint8_t scales[7] = { 3, 4, 6, 8, 12, 24, 48 }; + volatile uint8_t *pattern = (volatile uint8_t *)(uintptr_t)(BANK_BLOB + U8(SEQ_BANK) * BANK_STRIDE + + U8(SEQ_PATTERN) * PATTERN_STRIDE); + unsigned si = pattern[0x8e55u] ? pattern[track * TRACK_STRIDE + 0x51u] : pattern[0x8e54u]; + return scales[si < 7u ? si : 2u]; +} + +typedef struct { uint32_t last, quantum, remainder; uint8_t running; } Clock; +typedef struct { uint32_t free_phase; } Steps; +static Clock clock UG_DATA; +static Steps steps[8] UG_DATA; +static uint32_t clock_frame UG_DATA; + +static void clock_update(void) +{ + uint32_t now = U32(FRAME_CLOCK); + if (now == clock_frame) return; + clock_frame = now; + unsigned running = U32(TRANSPORT) == 1u; + if (running && !clock.running) { + clock.quantum = clock.remainder = 0, clock.last = now; + } else if (running) { + int32_t rem = (int32_t)clock.remainder + (int32_t)(now - clock.last); + clock.last = now; + while (rem < 0) --clock.quantum, rem += (int32_t)QUANTUM; + while (rem >= (int32_t)QUANTUM) ++clock.quantum, rem -= (int32_t)QUANTUM; + clock.remainder = (uint32_t)rem; + } + clock.running = (uint8_t)running; +} +/* A synced RATE's cycle, 0..65535: from the sequencer's position while it plays, from the tempo while it stands. */ +static uint16_t sync_phase(unsigned track, unsigned rate, const Grid *g, uint32_t step_samples, unsigned n) +{ + uint32_t cycle_q8 = g->step * ug_sync_q8[(rate - 64u) & 63u]; /* the cycle in quanta, Q8 */ + Steps *s = &steps[track]; + if (clock.running) { + uint32_t pos = (clock.quantum * 256u + clock.remainder / (QUANTUM / 256u)) % cycle_q8; + s->free_phase = ((pos << 10) / cycle_q8) << 22; + } else { + uint32_t cycle = (step_samples >> 4) * (ug_sync_q8[(rate - 64u) & 63u] >> 4) + 1u; /* samples */ + s->free_phase += (0xffffffffu / cycle) * n; + } + return (uint16_t)(s->free_phase >> 16); +} + +/* ---- the render --------------------------------------------------------------------------------------- */ + +#ifdef UG_DIAG +/* DIAGNOSIS ONLY, never released: what the measurements in TESTING.md read. Each second, on the first track UNGEMACH + * plays, in one word for `npm run device -- status` (DIAG value): bits 26-31 the mean render time a frame in us, less + * 30 (to 63), timed as the base's guard times the callback (DTCN3, 132 MHz); 22-25 the frames not rendered against the + * timer's count (the guard's skips, to 15); then the last settings, coarse: 17-21 PTCH's byte / 4, 13-16 DISS / 8, + * 9-12 WAVE / 8, 5-8 RATE / 8, 2-4 PNCH / 16; bit 1 the sequencer plays; bit 0 PTCH, DISS or WAVE moved. */ +#include "../../runtime/loader/modwerk_module.h" +#define DIAG_TIMER (*(volatile uint32_t *)0xfc07c00cu) /* 132 MHz */ +static volatile uint32_t diag_ticks UG_DATA, diag_value UG_DATA, diag_t_last UG_DATA; +static volatile uint32_t diag_acc UG_DATA, diag_sum UG_DATA, diag_frames UG_DATA, diag_key UG_DATA, diag_snap UG_DATA; +static volatile uint8_t diag_track = 255u, diag_moved UG_DATA; +void module_tick(struct modwerk_runtime_api *api) +{ + if (diag_ticks % 60u == 59u) { + uint32_t now = DIAG_TIMER, expect = (now - diag_t_last) / 47891u; + uint32_t f = diag_frames ? diag_frames : 1u, a = diag_sum / f / 132u; + uint32_t miss = diag_frames && expect > diag_frames ? expect - diag_frames : 0u; + uint32_t us = a < 30u ? 0u : a - 30u > 63u ? 63u : a - 30u; + diag_t_last = now; + diag_value = us << 26 | (miss > 15u ? 15u : miss) << 22 | diag_snap | (U32(TRANSPORT) == 1u ? 2u : 0u) | diag_moved; + diag_sum = diag_frames = 0, diag_moved = 0u, diag_track = 255u; + } + ++diag_ticks; + api->value = diag_value; +} +#endif + +/* The engines' state is initialized data, not bss: the loader reaches a package's own image through the cached alias, + * its bss through the uncached one (measured on the Probe-Octa, 13 November 2026: a bss read about four times a cached + * one), and the render reads its state thousands of times a frame. */ +static Ungemach voices[8] = { { .rng = 1u } }; +static uint8_t ready UG_DATA; +static uint32_t frame_at[8] = { 1u }; /* each track's frame clock at its last render call (data, not bss: see voices) */ +static uint32_t timed_at[8] = { 1u }; +/* each track's controls, read on a frame's first call (data, not bss: read every call) */ +static UgControls ctls[8] = { { .move = 64u } }; /* each track's timer at its last frame's figures, in whole frames */ +#define TIMER (*(volatile uint32_t *)0xfc07c00cu) /* DTCN3, 132 MHz: 47,891 counts a frame */ +static volatile uint8_t owned UG_DATA; /* tracks UNGEMACH renders: bit t, set by the render, cleared when the track leaves */ + +/* Stock plays a track's rendered samples at the increment it builds from the FLEX record's PTCH and RATE: on + * UNGEMACH's tracks those are its own controls, and an increment under unity read a fraction of each frame's fresh + * samples, held across the frame: a bitcrusher at the drone's own pitch, from the first trig that rebuilt it. So + * UNGEMACH takes its tracks' increment, at unity, as POLY8 does (ev_play_increment). */ +int ungemach_play_increment(uint32_t *increment, unsigned track) +{ + if (track >= 8u || !(owned >> track & 1u)) return 0; + *increment = 0x04000000u; + return 1; +} +static void ungemach_leave(unsigned track) +{ + if (track < 8u) owned &= (uint8_t)~(1u << track), ready &= (uint8_t)~(1u << track); +} +/* Called twice a frame for each UNGEMACH track, before and after its event's sample offset (the second call has + * end == 16). It writes the header stock's packer expects at the cursor and the samples as L and R longs. */ +int ungemach_render_track(unsigned track, unsigned ping, unsigned start, unsigned end) +{ + (void)ping; +#ifdef UG_DIAG + uint32_t diag_t0 = DIAG_TIMER; /* the whole callback, as the base's guard times it */ +#endif + volatile uint32_t *h = (volatile uint32_t *)(uintptr_t)U32(CURSOR); + unsigned n = end > start && end <= 16u ? end - start : 0u; + h[0] = n, h[1] = start, h[2] = 0x04000000u, h[3] = start << 26; + if (track < 8u) owned |= (uint8_t)(1u << track); + + if (n && track < 8u) { + if (!(ready >> track & 1u)) ug_reset(&voices[track]), ready |= (uint8_t)(1u << track); + const volatile uint16_t *fp = (const volatile uint16_t *)(uintptr_t)U32(FP_PTR); + const volatile uint8_t *lane = (const volatile uint8_t *)(uintptr_t)(LANE + 72u * track); + const volatile uint8_t *setup = lane + 0x20u; + /* the frame's figures once a frame: on its first call that renders (the frame clock moved since this track's + * last call), not again on the second call after the trig's offset */ + uint32_t now = U32(FRAME_CLOCK); + int fresh = now != frame_at[track]; + frame_at[track] = now; + static Grid grids[8] = { { .step = 1u } }; /* data, not bss */ + static uint32_t steps[8] = { 1u }; + Grid *gp = &grids[track]; + Ungemach *const v = &voices[track]; + /* RATE's timing (the track's speed, the tempo, the sequencer's clock and a synced cycle's phase) is read only on + * the frames the engine works RATE's movement out: every UG_SLOW-th, a fresh call that finds vskip at 0. Read + * every frame it cost about 2 µs a frame, free or synced (A/B on the live set, 21 November 2026), and the + * pattern's bytes are slow to reach. */ + const int slow = fresh && (!v->fr.ready || v->vskip == 0u); + if (slow) { + gp->scale = grid_scale(track), gp->step = 2u * gp->scale; + uint32_t tempo = U32(TEMPO24); + steps[track] = tempo ? 2u * gp->scale * QUANTUM / tempo : 5512u; + } + const uint32_t step_samples = steps[track]; + /* all six from the parameter record, as FLEX reads them: locks, LFOs and scenes applied (measured on the live-set + * Octa, 19 November 2026: E and F there are the knob << 8 as A-D are, and an LFO on F moves F there; the lane + * holds the knob alone). An earlier reading of F as "26 with the knob at 0" was a Part's LFO on RTIM. */ + /* the controls once a frame, on its first call: the second call after a trig's offset takes them as they were + * (a frame split by a trig read every knob, setup byte and the record twice) */ + UgControls *const kc = &ctls[track]; + if (fresh) { + const unsigned rate = (fp[4] >> 8) & 127u; + kc->ptch = fp[0], kc->diss = (uint8_t)(fp[1] >> 8), kc->diss_frac = (uint8_t)fp[1], kc->tone = (uint8_t)(fp[2] >> 8), kc->wave = fp[3]; + kc->rate = (uint8_t)rate, kc->move = 64u, kc->dirt = (uint8_t)((fp[5] >> 8) & 127u); /* MOVE: no knob here, as designed */ + kc->sprd = setup[4] & 3u, kc->pnch = setup[5] & 127u; + } + kc->frames = 1u; + const unsigned rate = kc->rate; + if (slow) { + clock_update(); + if (rate >= 64u) kc->sync_phase = sync_phase(track, rate, gp, step_samples, 16u * UG_SLOW); + } + /* The event byte's low nibble is where in the frame its event sits; the packer splits the frame's render there + * and only clears bits 4-7 after it, so after one trig every later frame was split at the same place. The + * frame guard then shed the short first part again and again (3 of every 16 samples gone: a bitcrusher). On a + * frame with no event of its own, UNGEMACH clears that stale offset on its own track: the next frames render + * in one call; a frame with a trig is still split where the trig is. */ + if (end == 16u) { + const uint8_t ev = U8(EVENTS + track); /* once: the event byte sits in slow memory */ + if (ev & 16u) ug_punch(v); /* a trig: PNCH's punch (the AMP envelope is the track's) */ + else U8(EVENTS + track) = (uint8_t)(ev & 0xf0u); + } + if (fresh) { + /* the frames that passed by the timer, a frame the base's guard skipped too, so PNCH's punch ends on time */ + uint32_t el = (TIMER - timed_at[track]) / 47891u; + kc->frames = (uint8_t)(el < 1u ? 1u : el > 255u ? 255u : el); + timed_at[track] += el * 47891u; + } + ug_render_out(v, kc, h + 4, n, fresh); /* straight into the packer's buffer */ +#ifdef UG_DIAG + if (diag_track == 255u) diag_track = (uint8_t)track; + if (track == diag_track) { + const uint32_t key = (uint32_t)(kc->ptch >> 8) | (uint32_t)kc->diss << 8 | (uint32_t)(kc->wave >> 8) << 16; + if (key != diag_key) diag_moved = 1u, diag_key = key; + diag_snap = ((uint32_t)(kc->ptch >> 8) >> 2 & 31u) << 17 | ((uint32_t)kc->diss >> 3 & 15u) << 13 + | ((uint32_t)(kc->wave >> 8) >> 3 & 15u) << 9 | ((uint32_t)kc->rate >> 3 & 15u) << 5 | ((uint32_t)kc->pnch >> 4 & 7u) << 2; + diag_acc += DIAG_TIMER - diag_t0; + if (end == 16u) diag_sum += diag_acc, diag_acc = 0, ++diag_frames; + } +#endif + } + U32(CURSOR) = (uint32_t)(uintptr_t)(h + 4 + 2 * n); + return 0; +} + +/* ---- one track a Part --------------------------------------------------------------------------------- */ +/* At most one UNGEMACH track in a Part: one track takes 37-60 us of the 363 us frame on an MKI while a busy pattern + * plays, and a second would overrun the frame interrupt's share, so the base's guard drops renders, a crackle + * (TESTING.md; issue #1790). Choosing UNGEMACH for a second track is refused, and that track stays what it was. The + * track that is UNGEMACH already is admitted, and a Part that holds more (a copied Part) plays on: the base asks only + * when a track is picked. The test reads the Part signature as SYNTIZ's wave_admit_track does. */ +#define SIG 60u /* a track's signature at Part + 60 + 30 t: 'U', 'G', 1 */ +static unsigned is_ungemach(const volatile uint8_t *part, unsigned t) +{ + const volatile uint8_t *s = part + SIG + 30u * t; + return part[0x22u + t] == 1u && s[0] == 'U' && s[1] == 'G' && s[2] == 1u; +} +unsigned ungemach_admit_track(const volatile uint8_t *part, unsigned track) +{ + if (track >= 8u) return 0; + if (is_ungemach(part, track)) return 1; + for (unsigned t = 0; t < 8u; ++t) + if (is_ungemach(part, t)) return 0; + return 1; +} + +/* ---- the row ------------------------------------------------------------------------------------------ */ + +const struct modwerk_machine_setup ungemach_machine = { + .machine = { + .abi = MODWERK_MACHINE_ABI, + .sig = { 'U', 'G' }, .sig_lo = 1, .sig_hi = 1, + .label = "UNGEMACH", + .flags = MODWERK_MACHINE_LIST | MODWERK_MACHINE_SETUP_PAGE | MODWERK_MACHINE_SETUP_ALL, + .defaults = ungemach_part_defaults, + .admit_track = ungemach_admit_track, + .track_page = ungemach_track_page, + .render = ungemach_render_track, + .leave = ungemach_leave, + }, + .page = ungemach_setup_page, + .knob = ungemach_setup_knob, +}; diff --git a/sdk/drafts/ungemach/manifest.py b/sdk/drafts/ungemach/manifest.py new file mode 100644 index 0000000000..07485635e1 --- /dev/null +++ b/sdk/drafts/ungemach/manifest.py @@ -0,0 +1,17 @@ +"""UNGEMACH: an original track machine, a dissonant drone that never stands still. + +A C runtime module (engine.c, machine.c) that contributes one machine to the base's ot_machines table and takes its +tracks' playback increment (ev_play_increment), both in sdk/machines/octatrack/HOOKS.md. The base owns the chooser row +and SRC SETUP; the module renders its own samples on the ColdFire. It has no card form: its USB package is built from +its row in src/engine/assets/octatrack-module-packages.json once listed, and verify.py checks it. +""" +from remix.schema import Category, Proof, Gate, Kind, Module + +MODULE = Module( + name="ungemach", key="UNGEMACH", kind=Kind.CF_PATCH, + doc="A track machine: a dissonant, living drone of sixteen detuned voices with a punch on each trig.", + category=Category.MACHINES, author="GnocchiBalboa", author_url="https://github.com/GnocchiBalboa", + proof=Proof.UNTESTED, + proof_note="USB package only; host and package checks in verify.py, hardware results in TESTING.md.", + gates=(Gate("modules/ungemach/verify.py", remix_arg=False),), +) diff --git a/sdk/drafts/ungemach/octamod.module.json b/sdk/drafts/ungemach/octamod.module.json new file mode 100644 index 0000000000..4577fbd126 --- /dev/null +++ b/sdk/drafts/ungemach/octamod.module.json @@ -0,0 +1,156 @@ +{ + "schemaVersion": 2, + "id": "ungemach", + "key": "UNGEMACH", + "name": "Ungemach", + "version": "0.1.0-experimental", + "category": "machines", + "author": { + "github": "GnocchiBalboa", + "credits": [ + "GnocchiBalboa" + ] + }, + "nativeManifest": "manifest.py", + "presentation": { + "label": "Drone", + "family": "Synth track machine", + "summary": "A dissonant, living drone for dark techno: sixteen detuned voices in three groups, a chord that rises from unison to a scream, 32 waveforms from dull to shrill, and a punch on every trig.", + "overview": "UNGEMACH is a track machine that makes its own sound on the ColdFire instead of playing a sample. Sixteen detuned voices in three groups, an octave sub and a dark noise run through a resonant low-pass and a saturation. PTCH sets the root, DISS moves the second and third groups from unison through ever wider dissonant chords to a scream, WAVE crossfades through 32 original waveforms from dull to shrill, TONE opens the filter and DIRT adds resonance, drive and a phase push that roughens the voices. RATE lets pitch, filter and level drift on their own, slowly or fast, or pulse in time with the sequencer. On SRC SETUP, SPRD sets the stereo width and PNCH gives every trig a punch that opens the filter and lifts the level for a few dozen milliseconds. The track's AMP envelope, LFOs, locks, scenes and effects act on it as on a sample.", + "highlights": [ + "Sixteen voices in three detuned groups, an octave sub and noise, in stereo.", + "DISS: from unison through quarter tones, tritones and ninths to a scream; the chord's pitch rises with the knob and every step glides.", + "WAVE: 32 original waveforms ordered from dull to shrill, crossfaded and gliding.", + "RATE: free drift of pitch, filter and level from 0.02 to 2 Hz, or a pulse synced to the track from 16 steps to 2.", + "PNCH: a punch on every trig, 35 to 55 ms long, that opens the filter, adds dirt and lifts the level.", + "All six SRC knobs take parameter locks, LFOs and scenes; an LFO on DIRT in a trig mode makes hits." + ], + "usage": [ + "Choose UNGEMACH in a track's machine list, put a trig on step 1 and set the AMP envelope's HOLD high: the drone sounds.", + "Turn DISS for the chord, WAVE for the colour and TONE and DIRT for brightness and grit; RATE above 63 pulses with the pattern.", + "Set PNCH on SRC SETUP and add trigs for a punch on each, or put an LFO on DIRT in a trig mode for hits." + ] + }, + "controls": [ + { + "name": "PTCH", + "default": 28, + "count": 121, + "doc": "The drone's root, in half semitones: 0 is 27.5 Hz, 24 (the default) 55 Hz, 120 880 Hz (stored as 4 to 124 like stock's PTCH). Locks, LFOs and slides move it smoothly. SRC knob A.", + "labels": null + }, + { + "name": "DISS", + "default": 40, + "count": 128, + "doc": "The chord: where the second and third voice groups sit against the root. 0 is unison; from there quarter tones, semitones, tritones, sevenths and ninths, octave and fifth near 71-76, and the scream at 121-127. The chord's pitch rises with the knob, and each step glides in about 90 ms. SRC knob B.", + "labels": null + }, + { + "name": "TONE", + "default": 80, + "count": 128, + "doc": "The low-pass filter's cutoff: dark at 0, open at 127. SRC knob C.", + "labels": null + }, + { + "name": "WAVE", + "default": 24, + "count": 128, + "doc": "The voices' waveform: 32 original waveforms from dull (0) to shrill (127), crossfaded; a turn glides, half the range in about 0.7 s. SRC knob D.", + "labels": null + }, + { + "name": "RATE", + "default": 20, + "count": 128, + "doc": "How the drone moves. 0-63: pitch, filter and level drift on their own, from 0.02 Hz at 0 to 2 Hz at 63; the filter moves by up to a quarter of TONE's travel. 64-127: a pulse in time with the track, S16, S8, S6, S4, S3 or S2 steps a cycle, that opens the filter by 25 % of TONE's travel at 64, rising to 35 % from 74. SRC knob E.", + "labels": null + }, + { + "name": "DIRT", + "default": 12, + "count": 128, + "doc": "Resonance, saturation and a phase push between the voices: clean and round at 0, rough and screaming at 127. Locks and LFOs reach it; an LFO in a trig mode makes hits. SRC knob F.", + "labels": null + }, + { + "name": "SPRD", + "default": 2, + "count": 4, + "doc": "The stereo width: MONO, NARW, WIDE (the default) or FULL. SRC SETUP knob E.", + "labels": [ + "MONO", + "NARW", + "WIDE", + "FULL" + ] + }, + { + "name": "PNCH", + "default": 0, + "count": 128, + "doc": "A punch on every trig: it opens the filter, adds dirt and lifts the level, then falls away in 35 ms (low values) to 55 ms (127). 0 is off. SRC SETUP knob F.", + "labels": null + } + ], + "compatibility": { + "firmware": "1.40C", + "location": "Track machine", + "conflicts": [], + "uiClaims": [], + "limitations": [ + "Experimental draft. Tested by the author on an Octatrack MKI with the Modwerk USB base 0.7.10; not tested on an MKII.", + "One UNGEMACH track per Part: choosing it for a second track is refused, and that track stays what it was.", + "It renders on the ColdFire: about 37-60 microseconds of the 363-microsecond frame in a busy live set. With a full pattern the base can skip a few of its frames a second; the author heard no dropouts.", + "SPRD and PNCH sit on SRC SETUP, which locks, LFOs and scenes do not reach. SRC SETUP A to D are empty.", + "Not yet tested: a project opened without the module, Part and bank changes with UNGEMACH tracks, and a power cycle after a Keep." + ], + "effectId": null + }, + "resources": { + "recorded": "2026-11-22", + "storage": { + "label": "Module image and memory", + "display": "89,772 bytes of code and data and 460 bytes of BSS", + "value": 90232, + "unit": "bytes", + "method": "static", + "conditions": "The release package built by sdk/runtime/loader/build.py from this source: 89,772 bytes of code and data (most of it the 32 waveforms at six band limits) and 460 bytes of BSS. Stack use and stock calls are not counted.", + "source": "TESTING.md" + }, + "processing": { + "label": "ColdFire, in the frame interrupt", + "display": "37-60 microseconds a frame in a busy live set (mean over each second)", + "value": 15840, + "unit": "cycles/render", + "method": "hardware", + "conditions": "Author's Octatrack MKI, OS 1.40C, Modwerk USB base 0.7.10 (6070a4e4), the author's full live-set pattern with seven Flex tracks. A diagnostic build of the same engine timed the whole callback with the 132 MHz DTCN3 timer, as the base's guard does, and reported the mean a frame each second: 37-43 microseconds for long stretches and 49-60 for others, with the same settings (22 November 2026). The value is the highest mean, 60 microseconds, in core cycles (twice the timer's ticks). The longest single frame was not recorded.", + "source": "TESTING.md" + } + }, + "tests": { + "report": "TESTING.md", + "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). Not yet run: device:qualify, the CPU price, a project reloaded without the module, Part and bank changes, a power cycle after a Keep, and any MKII.", + "hardwareStatus": "reported", + "evidenceRevision": "c07f3b1ccf31e66967c4f328019c607dc2821ce9", + "gates": [ + "python3 -B verify.py" + ] + }, + "license": { + "spdx": "MIT", + "file": "LICENSE", + "declaration": "Original work by GnocchiBalboa under MIT. No Elektron firmware, extracted routines, tables, samples or graphics; the page copies stock's FLEX record at run time on the user's unit and never ships it." + }, + "media": [], + "access": { + "location": "The track's machine list (double-tap a track key, or SRC SETUP)", + "steps": [ + "Double-tap a track key, move to UNGEMACH in the machine list and press YES.", + "Put a trig on the track, set the AMP envelope's HOLD high and press PLAY: the drone sounds. The SRC page shows PTCH, DISS, TONE, WAVE, RATE and DIRT.", + "Press SRC again for SRC SETUP: SPRD (knob E) and PNCH (knob F)." + ], + "screenshots": [] + } +} diff --git a/sdk/drafts/ungemach/presentation/thumbnail.svg b/sdk/drafts/ungemach/presentation/thumbnail.svg new file mode 100644 index 0000000000..7e2a9c05cf --- /dev/null +++ b/sdk/drafts/ungemach/presentation/thumbnail.svg @@ -0,0 +1,16 @@ + +UNGEMACH: a living drone machine +A conceptual drawing: three groups of detuned voices start in unison and fan out upward as DISS turns, each line wavering with the drift; below, a punch falls away after each trig. It illustrates the idea, not a measured screen or audio. + + + + + +DISSSCREAMUNISONPNCH + diff --git a/sdk/drafts/ungemach/runtime.json b/sdk/drafts/ungemach/runtime.json new file mode 100644 index 0000000000..a513aab793 --- /dev/null +++ b/sdk/drafts/ungemach/runtime.json @@ -0,0 +1,17 @@ +{ + "schema": 1, + "subscribe": [ + { + "event": "ev_play_increment", + "fn": "ungemach_play_increment", + "order": 25 + } + ], + "contribute": [ + { + "to": "ot_machines", + "data": "ungemach_machine", + "order": 60 + } + ] +} diff --git a/sdk/drafts/ungemach/tables.h b/sdk/drafts/ungemach/tables.h new file mode 100644 index 0000000000..ad6cf3a691 --- /dev/null +++ b/sdk/drafts/ungemach/tables.h @@ -0,0 +1,47 @@ +/* Generated by gen_tables.py: do not edit. UNGEMACH's laws in fixed point. */ +#ifndef UNGEMACH_TABLES_H +#define UNGEMACH_TABLES_H +#include +static const int16_t ug_sine[1025] = {0, 201, 402, 603, 804, 1005, 1206, 1407, 1608, 1809, 2009, 2210, 2410, 2611, 2811, 3012, 3212, 3412, 3612, 3811, 4011, 4210, 4410, 4609, 4808, 5007, 5205, 5404, 5602, 5800, 5998, 6195, 6393, 6590, 6786, 6983, 7179, 7375, 7571, 7767, 7962, 8157, 8351, 8545, 8739, 8933, 9126, 9319, 9512, 9704, 9896, 10087, 10278, 10469, 10659, 10849, 11039, 11228, 11417, 11605, 11793, 11980, 12167, 12353, 12539, 12725, 12910, 13094, 13279, 13462, 13645, 13828, 14010, 14191, 14372, 14553, 14732, 14912, 15090, 15269, 15446, 15623, 15800, 15976, 16151, 16325, 16499, 16673, 16846, 17018, 17189, 17360, 17530, 17700, 17869, 18037, 18204, 18371, 18537, 18703, 18868, 19032, 19195, 19357, 19519, 19680, 19841, 20000, 20159, 20317, 20475, 20631, 20787, 20942, 21096, 21250, 21403, 21554, 21705, 21856, 22005, 22154, 22301, 22448, 22594, 22739, 22884, 23027, 23170, 23311, 23452, 23592, 23731, 23870, 24007, 24143, 24279, 24413, 24547, 24680, 24811, 24942, 25072, 25201, 25329, 25456, 25582, 25708, 25832, 25955, 26077, 26198, 26319, 26438, 26556, 26674, 26790, 26905, 27019, 27133, 27245, 27356, 27466, 27575, 27683, 27790, 27896, 28001, 28105, 28208, 28310, 28411, 28510, 28609, 28706, 28803, 28898, 28992, 29085, 29177, 29268, 29358, 29447, 29534, 29621, 29706, 29791, 29874, 29956, 30037, 30117, 30195, 30273, 30349, 30424, 30498, 30571, 30643, 30714, 30783, 30852, 30919, 30985, 31050, 31113, 31176, 31237, 31297, 31356, 31414, 31470, 31526, 31580, 31633, 31685, 31736, 31785, 31833, 31880, 31926, 31971, 32014, 32057, 32098, 32137, 32176, 32213, 32250, 32285, 32318, 32351, 32382, 32412, 32441, 32469, 32495, 32521, 32545, 32567, 32589, 32609, 32628, 32646, 32663, 32678, 32692, 32705, 32717, 32728, 32737, 32745, 32752, 32757, 32761, 32765, 32766, 32767, 32766, 32765, 32761, 32757, 32752, 32745, 32737, 32728, 32717, 32705, 32692, 32678, 32663, 32646, 32628, 32609, 32589, 32567, 32545, 32521, 32495, 32469, 32441, 32412, 32382, 32351, 32318, 32285, 32250, 32213, 32176, 32137, 32098, 32057, 32014, 31971, 31926, 31880, 31833, 31785, 31736, 31685, 31633, 31580, 31526, 31470, 31414, 31356, 31297, 31237, 31176, 31113, 31050, 30985, 30919, 30852, 30783, 30714, 30643, 30571, 30498, 30424, 30349, 30273, 30195, 30117, 30037, 29956, 29874, 29791, 29706, 29621, 29534, 29447, 29358, 29268, 29177, 29085, 28992, 28898, 28803, 28706, 28609, 28510, 28411, 28310, 28208, 28105, 28001, 27896, 27790, 27683, 27575, 27466, 27356, 27245, 27133, 27019, 26905, 26790, 26674, 26556, 26438, 26319, 26198, 26077, 25955, 25832, 25708, 25582, 25456, 25329, 25201, 25072, 24942, 24811, 24680, 24547, 24413, 24279, 24143, 24007, 23870, 23731, 23592, 23452, 23311, 23170, 23027, 22884, 22739, 22594, 22448, 22301, 22154, 22005, 21856, 21705, 21554, 21403, 21250, 21096, 20942, 20787, 20631, 20475, 20317, 20159, 20000, 19841, 19680, 19519, 19357, 19195, 19032, 18868, 18703, 18537, 18371, 18204, 18037, 17869, 17700, 17530, 17360, 17189, 17018, 16846, 16673, 16499, 16325, 16151, 15976, 15800, 15623, 15446, 15269, 15090, 14912, 14732, 14553, 14372, 14191, 14010, 13828, 13645, 13462, 13279, 13094, 12910, 12725, 12539, 12353, 12167, 11980, 11793, 11605, 11417, 11228, 11039, 10849, 10659, 10469, 10278, 10087, 9896, 9704, 9512, 9319, 9126, 8933, 8739, 8545, 8351, 8157, 7962, 7767, 7571, 7375, 7179, 6983, 6786, 6590, 6393, 6195, 5998, 5800, 5602, 5404, 5205, 5007, 4808, 4609, 4410, 4210, 4011, 3811, 3612, 3412, 3212, 3012, 2811, 2611, 2410, 2210, 2009, 1809, 1608, 1407, 1206, 1005, 804, 603, 402, 201, 0, -201, -402, -603, -804, -1005, -1206, -1407, -1608, -1809, -2009, -2210, -2410, -2611, -2811, -3012, -3212, -3412, -3612, -3811, -4011, -4210, -4410, -4609, -4808, -5007, -5205, -5404, -5602, -5800, -5998, -6195, -6393, -6590, -6786, -6983, -7179, -7375, -7571, -7767, -7962, -8157, -8351, -8545, -8739, -8933, -9126, -9319, -9512, -9704, -9896, -10087, -10278, -10469, -10659, -10849, -11039, -11228, -11417, -11605, -11793, -11980, -12167, -12353, -12539, -12725, -12910, -13094, -13279, -13462, -13645, -13828, -14010, -14191, -14372, -14553, -14732, -14912, -15090, -15269, -15446, -15623, -15800, -15976, -16151, -16325, -16499, -16673, -16846, -17018, -17189, -17360, -17530, -17700, -17869, -18037, -18204, -18371, -18537, -18703, -18868, -19032, -19195, -19357, -19519, -19680, -19841, -20000, -20159, -20317, -20475, -20631, -20787, -20942, -21096, -21250, -21403, -21554, -21705, -21856, -22005, -22154, -22301, -22448, -22594, -22739, -22884, -23027, -23170, -23311, -23452, -23592, -23731, -23870, -24007, -24143, -24279, -24413, -24547, -24680, -24811, -24942, -25072, -25201, -25329, -25456, -25582, -25708, -25832, -25955, -26077, -26198, -26319, -26438, -26556, -26674, -26790, -26905, -27019, -27133, -27245, -27356, -27466, -27575, -27683, -27790, -27896, -28001, -28105, -28208, -28310, -28411, -28510, -28609, -28706, -28803, -28898, -28992, -29085, -29177, -29268, -29358, -29447, -29534, -29621, -29706, -29791, -29874, -29956, -30037, -30117, -30195, -30273, -30349, -30424, -30498, -30571, -30643, -30714, -30783, -30852, -30919, -30985, -31050, -31113, -31176, -31237, -31297, -31356, -31414, -31470, -31526, -31580, -31633, -31685, -31736, -31785, -31833, -31880, -31926, -31971, -32014, -32057, -32098, -32137, -32176, -32213, -32250, -32285, -32318, -32351, -32382, -32412, -32441, -32469, -32495, -32521, -32545, -32567, -32589, -32609, -32628, -32646, -32663, -32678, -32692, -32705, -32717, -32728, -32737, -32745, -32752, -32757, -32761, -32765, -32766, -32767, -32766, -32765, -32761, -32757, -32752, -32745, -32737, -32728, -32717, -32705, -32692, -32678, -32663, -32646, -32628, -32609, -32589, -32567, -32545, -32521, -32495, -32469, -32441, -32412, -32382, -32351, -32318, -32285, -32250, -32213, -32176, -32137, -32098, -32057, -32014, -31971, -31926, -31880, -31833, -31785, -31736, -31685, -31633, -31580, -31526, -31470, -31414, -31356, -31297, -31237, -31176, -31113, -31050, -30985, -30919, -30852, -30783, -30714, -30643, -30571, -30498, -30424, -30349, -30273, -30195, -30117, -30037, -29956, -29874, -29791, -29706, -29621, -29534, -29447, -29358, -29268, -29177, -29085, -28992, -28898, -28803, -28706, -28609, -28510, -28411, -28310, -28208, -28105, -28001, -27896, -27790, -27683, -27575, -27466, -27356, -27245, -27133, -27019, -26905, -26790, -26674, -26556, -26438, -26319, -26198, -26077, -25955, -25832, -25708, -25582, -25456, -25329, -25201, -25072, -24942, -24811, -24680, -24547, -24413, -24279, -24143, -24007, -23870, -23731, -23592, -23452, -23311, -23170, -23027, -22884, -22739, -22594, -22448, -22301, -22154, -22005, -21856, -21705, -21554, -21403, -21250, -21096, -20942, -20787, -20631, -20475, -20317, -20159, -20000, -19841, -19680, -19519, -19357, -19195, -19032, -18868, -18703, -18537, -18371, -18204, -18037, -17869, -17700, -17530, -17360, -17189, -17018, -16846, -16673, -16499, -16325, -16151, -15976, -15800, -15623, -15446, -15269, -15090, -14912, -14732, -14553, -14372, -14191, -14010, -13828, -13645, -13462, -13279, -13094, -12910, -12725, -12539, -12353, -12167, -11980, -11793, -11605, -11417, -11228, -11039, -10849, -10659, -10469, -10278, -10087, -9896, -9704, -9512, -9319, -9126, -8933, -8739, -8545, -8351, -8157, -7962, -7767, -7571, -7375, -7179, -6983, -6786, -6590, -6393, -6195, -5998, -5800, -5602, -5404, -5205, -5007, -4808, -4609, -4410, -4210, -4011, -3811, -3612, -3412, -3212, -3012, -2811, -2611, -2410, -2210, -2009, -1809, -1608, -1407, -1206, -1005, -804, -603, -402, -201, 0}; +static const uint32_t ug_root_inc[121] = {2678268, 2756747, 2837526, 2920672, 3006254, 3094344, 3185015, 3278343, 3374406, 3473283, 3575058, 3679816, 3787642, 3898629, 4012867, 4130453, 4251485, 4376063, 4504291, 4636277, 4772130, 4911964, 5055896, 5204045, 5356535, 5513494, 5675051, 5841343, 6012507, 6188687, 6370030, 6556686, 6748811, 6946567, 7150117, 7359631, 7575285, 7797257, 8025735, 8260907, 8502970, 8752126, 9008582, 9272554, 9544261, 9823929, 10111792, 10408090, 10713070, 11026987, 11350103, 11682686, 12025015, 12377375, 12740059, 13113372, 13497623, 13893133, 14300233, 14719262, 15150569, 15594515, 16051469, 16521813, 17005939, 17504251, 18017165, 18545108, 19088521, 19647858, 20223584, 20816180, 21426141, 22053975, 22700205, 23365372, 24050030, 24754749, 25480119, 26226743, 26995246, 27786267, 28600467, 29438524, 30301139, 31189030, 32102938, 33043626, 34011878, 35008502, 36034330, 37090216, 38177043, 39295715, 40447168, 41632360, 42852281, 44107949, 45400411, 46730744, 48100060, 49509499, 50960238, 52453487, 53990491, 55572534, 57200933, 58877048, 60602278, 62378060, 64205876, 66087252, 68023757, 70017005, 72068660, 74180433, 76354085, 78591431, 80894335, 83264720, 85704563}; +static const int8_t ug_spread[16] = {0, -9, 9, 0, -9, 9, -4, 4, 3, -6, 12, -2, 7, 3, -6, 12}; /* cents; voices 0..7 left */ +static const uint8_t ug_vgroup[16] = {0, 0, 0, 1, 1, 1, 2, 2, 0, 0, 0, 1, 1, 2, 2, 2}; +static const uint8_t ug_vglide[16] = {10, 8, 9, 8, 8, 7, 10, 7, 9, 11, 10, 8, 9, 9, 7, 7}; /* each voice's drift glide, a shift */ +#define UG_VOICE_DRIFT 14 /* cents */ +static const int8_t ug_sub_cents[4] = {-3, 2, 3, -2}; /* 0, 1 left */ +#define UG_SUB_LEVEL 2867 /* Q12 */ +#define UG_WAVES 32 +static const uint8_t ug_wave_made[32] = {0, 1, 3, 7, 2, 6, 4, 5, 31, 26, 27, 8, 30, 29, 28, 9, 16, 12, 10, 18, 11, 13, 19, 20, 14, 17, 21, 23, 22, 15, 25, 24}; /* the wave at each place, as made: the order of WAVE_TRIM_DB (calib_waves.c) */ +#define UG_MIPS 6 +#define UG_WAVE_LEN 256 +#define UG_WAVE_STRIDE 774 +static const uint16_t ug_mip_off[6] = {0, 257, 514, 579, 644, 709}; +static const uint8_t ug_mip_shift[6] = {0, 0, 2, 2, 2, 2}; +static const int16_t ug_waves[24768] = { /* wave * UG_WAVE_STRIDE + ug_mip_off[mip] + sample */3014, 3375, 3730, 4077, 4419, 4754, 5083, 5407, 5725, 6038, 6347, 6650, 6949, 7244, 7535, 7822, 8106, 8386, 8663, 8936, 9207, 9474, 9739, 10000, 10258, 10514, 10766, 11016, 11262, 11504, 11744, 11979, 12210, 12438, 12661, 12879, 13093, 13301, 13504, 13701, 13892, 14076, 14254, 14424, 14587, 14743, 14890, 15029, 15159, 15280, 15392, 15495, 15587, 15670, 15742, 15804, 15855, 15896, 15926, 15944, 15952, 15949, 15935, 15910, 15874, 15828, 15770, 15703, 15624, 15536, 15438, 15330, 15213, 15087, 14952, 14809, 14658, 14500, 14334, 14161, 13982, 13798, 13607, 13412, 13212, 13008, 12800, 12589, 12375, 12159, 11940, 11719, 11498, 11275, 11051, 10827, 10602, 10377, 10153, 9929, 9705, 9482, 9259, 9037, 8815, 8594, 8373, 8153, 7933, 7713, 7493, 7272, 7051, 6828, 6604, 6379, 6151, 5921, 5688, 5452, 5212, 4968, 4720, 4466, 4207, 3942, 3670, 3392, 3107, 2814, 2512, 2203, 1885, 1558, 1221, 875, 519, 154, -222, -607, -1003, -1409, -1825, -2251, -2687, -3133, -3587, -4051, -4524, -5004, -5493, -5989, -6491, -7000, -7514, -8032, -8555, -9080, -9608, -10138, -10668, -11197, -11726, -12251, -12774, -13292, -13804, -14310, -14809, -15298, -15778, -16248, -16705, -17150, -17580, -17996, -18396, -18779, -19145, -19492, -19819, -20126, -20412, -20677, -20919, -21139, -21335, -21507, -21654, -21777, -21875, -21948, -21995, -22016, -22012, -21983, -21928, -21848, -21743, -21613, -21458, -21279, -21077, -20852, -20604, -20334, -20043, -19732, -19401, -19051, -18682, -18297, -17895, -17478, -17046, -16600, -16142, -15673, -15193, -14703, -14205, -13699, -13186, -12668, -12145, -11618, -11088, -10557, -10024, -9491, -8958, -8427, -7898, -7372, -6849, -6330, -5816, -5306, -4803, -4305, -3814, -3329, -2852, -2382, -1919, -1465, -1018, -579, -148, 274, 689, 1096, 1495, 1886, 2269, 2645, 3014, 3014, 3375, 3730, 4077, 4419, 4754, 5083, 5407, 5725, 6038, 6347, 6650, 6949, 7244, 7535, 7822, 8106, 8386, 8663, 8936, 9207, 9474, 9739, 10000, 10258, 10514, 10766, 11016, 11262, 11504, 11744, 11979, 12210, 12438, 12661, 12879, 13093, 13301, 13504, 13701, 13892, 14076, 14254, 14424, 14587, 14743, 14890, 15029, 15159, 15280, 15392, 15495, 15587, 15670, 15742, 15804, 15855, 15896, 15926, 15944, 15952, 15949, 15935, 15910, 15874, 15828, 15770, 15703, 15624, 15536, 15438, 15330, 15213, 15087, 14952, 14809, 14658, 14500, 14334, 14161, 13982, 13798, 13607, 13412, 13212, 13008, 12800, 12589, 12375, 12159, 11940, 11719, 11498, 11275, 11051, 10827, 10602, 10377, 10153, 9929, 9705, 9482, 9259, 9037, 8815, 8594, 8373, 8153, 7933, 7713, 7493, 7272, 7051, 6828, 6604, 6379, 6151, 5921, 5688, 5452, 5212, 4968, 4720, 4466, 4207, 3942, 3670, 3392, 3107, 2814, 2512, 2203, 1885, 1558, 1221, 875, 519, 154, -222, -607, -1003, -1409, -1825, -2251, -2687, -3133, -3587, -4051, -4524, -5004, -5493, -5989, -6491, -7000, -7514, -8032, -8555, -9080, -9608, -10138, -10668, -11197, -11726, -12251, -12774, -13292, -13804, -14310, -14809, -15298, -15778, -16248, -16705, -17150, -17580, -17996, -18396, -18779, -19145, -19492, -19819, -20126, -20412, -20677, -20919, -21139, -21335, -21507, -21654, -21777, -21875, -21948, -21995, -22016, -22012, -21983, -21928, -21848, -21743, -21613, -21458, -21279, -21077, -20852, -20604, -20334, -20043, -19732, -19401, -19051, -18682, -18297, -17895, -17478, -17046, -16600, -16142, -15673, -15193, -14703, -14205, -13699, -13186, -12668, -12145, -11618, -11088, -10557, -10024, -9491, -8958, -8427, -7898, -7372, -6849, -6330, -5816, -5306, -4803, -4305, -3814, -3329, -2852, -2382, -1919, -1465, -1018, -579, -148, 274, 689, 1096, 1495, 1886, 2269, 2645, 3014, 3014, 4419, 5725, 6949, 8106, 9207, 10258, 11262, 12210, 13093, 13892, 14587, 15159, 15587, 15855, 15952, 15874, 15624, 15213, 14658, 13982, 13212, 12375, 11498, 10602, 9705, 8815, 7933, 7051, 6151, 5212, 4207, 3107, 1885, 519, -1003, -2687, -4524, -6491, -8555, -10668, -12774, -14809, -16705, -18396, -19819, -20919, -21654, -21995, -21928, -21458, -20604, -19401, -17895, -16142, -14205, -12145, -10024, -7898, -5816, -3814, -1919, -148, 1495, 3014, 3014, 4419, 5725, 6949, 8106, 9207, 10258, 11262, 12210, 13093, 13892, 14587, 15159, 15587, 15855, 15952, 15874, 15624, 15213, 14658, 13982, 13212, 12375, 11498, 10602, 9705, 8815, 7933, 7051, 6151, 5212, 4207, 3107, 1885, 519, -1003, -2687, -4524, -6491, -8555, -10668, -12774, -14809, -16705, -18396, -19819, -20919, -21654, -21995, -21928, -21458, -20604, -19401, -17895, -16142, -14205, -12145, -10024, -7898, -5816, -3814, -1919, -148, 1495, 3014, 3014, 4419, 5725, 6949, 8106, 9207, 10258, 11262, 12210, 13093, 13892, 14587, 15159, 15587, 15855, 15952, 15874, 15624, 15213, 14658, 13982, 13212, 12375, 11498, 10602, 9705, 8815, 7933, 7051, 6151, 5212, 4207, 3107, 1885, 519, -1003, -2687, -4524, -6491, -8555, -10668, -12774, -14809, -16705, -18396, -19819, -20919, -21654, -21995, -21928, -21458, -20604, -19401, -17895, -16142, -14205, -12145, -10024, -7898, -5816, -3814, -1919, -148, 1495, 3014, 3060, 4870, 6543, 8062, 9419, 10606, 11624, 12476, 13169, 13712, 14119, 14404, 14580, 14662, 14664, 14597, 14473, 14296, 14073, 13805, 13489, 13121, 12694, 12199, 11626, 10963, 10199, 9324, 8328, 7205, 5953, 4569, 3060, 1433, -298, -2117, -4000, -5923, -7857, -9769, -11626, -13393, -15036, -16521, -17817, -18894, -19728, -20299, -20593, -20600, -20318, -19751, -18907, -17804, -16462, -14906, -13169, -11282, -9282, -7206, -5091, -2974, -888, 1132, 3060, 351, 741, 1131, 1519, 1907, 2307, 2727, 3154, 3574, 4000, 4458, 4950, 5445, 5922, 6400, 6901, 7408, 7878, 8293, 8677, 9058, 9434, 9798, 10150, 10497, 10832, 11148, 11454, 11759, 12060, 12339, 12592, 12836, 13086, 13337, 13567, 13762, 13931, 14095, 14276, 14484, 14716, 14950, 15159, 15328, 15462, 15576, 15684, 15786, 15883, 15978, 16073, 16164, 16251, 16345, 16460, 16595, 16732, 16859, 16979, 17089, 17176, 17229, 17265, 17309, 17368, 17420, 17443, 17431, 17393, 17338, 17272, 17199, 17116, 17015, 16885, 16720, 16522, 16304, 16088, 15884, 15681, 15465, 15234, 15005, 14779, 14547, 14305, 14066, 13840, 13625, 13413, 13204, 12990, 12753, 12478, 12173, 11853, 11528, 11198, 10870, 10548, 10218, 9855, 9452, 9023, 8587, 8154, 7739, 7357, 7021, 6733, 6489, 6276, 6073, 5853, 5609, 5344, 5064, 4763, 4441, 4109, 3780, 3452, 3114, 2761, 2396, 2022, 1638, 1242, 835, 411, -36, -517, -1030, -1559, -2088, -2623, -3180, -3759, -4334, -4888, -5442, -6020, -6607, -7158, -7654, -8121, -8590, -9059, -9512, -9938, -10341, -10721, -11078, -11417, -11738, -12031, -12289, -12520, -12741, -12964, -13187, -13407, -13620, -13822, -14018, -14227, -14467, -14730, -14994, -15236, -15451, -15643, -15822, -15994, -16160, -16320, -16472, -16619, -16759, -16892, -17027, -17180, -17356, -17545, -17736, -17930, -18119, -18283, -18407, -18496, -18575, -18652, -18718, -18761, -18777, -18771, -18751, -18723, -18686, -18630, -18544, -18421, -18263, -18071, -17856, -17638, -17426, -17211, -16974, -16714, -16444, -16175, -15905, -15632, -15353, -15069, -14781, -14492, -14201, -13895, -13558, -13188, -12797, -12391, -11970, -11535, -11097, -10666, -10231, -9775, -9287, -8774, -8250, -7729, -7225, -6749, -6313, -5921, -5571, -5250, -4938, -4616, -4276, -3920, -3552, -3175, -2790, -2398, -2002, -1608, -1219, -829, -434, -39, 351, 353, 743, 1131, 1518, 1910, 2309, 2720, 3142, 3574, 4018, 4473, 4940, 5422, 5916, 6417, 6916, 7401, 7861, 8291, 8691, 9067, 9430, 9788, 10143, 10494, 10836, 11161, 11468, 11759, 12040, 12316, 12590, 12857, 13111, 13344, 13552, 13740, 13918, 14099, 14292, 14502, 14722, 14940, 15142, 15318, 15465, 15587, 15692, 15789, 15882, 15974, 16066, 16157, 16252, 16354, 16468, 16594, 16728, 16860, 16981, 17083, 17164, 17227, 17280, 17327, 17370, 17405, 17426, 17425, 17399, 17350, 17283, 17203, 17111, 17003, 16873, 16716, 16531, 16323, 16102, 15878, 15660, 15448, 15238, 15020, 14791, 14549, 14302, 14060, 13831, 13619, 13418, 13215, 12997, 12750, 12473, 12170, 11850, 11524, 11201, 10880, 10553, 10212, 9846, 9450, 9028, 8590, 8154, 7737, 7356, 7022, 6736, 6491, 6274, 6066, 5851, 5614, 5352, 5064, 4756, 4437, 4112, 3784, 3452, 3111, 2760, 2397, 2023, 1638, 1243, 835, 408, -42, -519, -1022, -1548, -2089, -2638, -3192, -3751, -4315, -4885, -5460, -6034, -6596, -7137, -7652, -8141, -8606, -9056, -9495, -9924, -10338, -10731, -11096, -11429, -11733, -12011, -12272, -12519, -12756, -12982, -13197, -13401, -13601, -13803, -14016, -14244, -14486, -14736, -14985, -15222, -15443, -15644, -15828, -16000, -16164, -16321, -16471, -16614, -16752, -16889, -17032, -17187, -17359, -17545, -17739, -17931, -18111, -18270, -18403, -18510, -18593, -18658, -18708, -18743, -18765, -18772, -18764, -18738, -18693, -18625, -18531, -18409, -18256, -18076, -17873, -17655, -17426, -17193, -16955, -16710, -16456, -16190, -15913, -15629, -15343, -15059, -14779, -14497, -14206, -13896, -13558, -13192, -12798, -12385, -11961, -11534, -11106, -10674, -10231, -9769, -9283, -8774, -8252, -7730, -7224, -6749, -6315, -5925, -5573, -5246, -4931, -4612, -4279, -3927, -3557, -3174, -2784, -2392, -2002, -1612, -1222, -829, -435, -40, 353, 350, 1912, 3579, 5442, 7357, 9083, 10523, 11746, 12823, 13758, 14560, 15243, 15789, 16208, 16595, 17018, 17367, 17447, 17191, 16667, 15931, 15018, 14059, 13165, 12212, 10934, 9337, 7780, 6553, 5542, 4444, 3134, 1644, -65, -2078, -4323, -6572, -8620, -10355, -11717, -12742, -13614, -14512, -15408, -16160, -16769, -17387, -18056, -18598, -18815, -18670, -18215, -17467, -16464, -15335, -14164, -12833, -11156, -9188, -7256, -5625, -4222, -2791, -1233, 350, 320, 1925, 3639, 5436, 7249, 8983, 10544, 11867, 12937, 13785, 14480, 15097, 15686, 16254, 16765, 17153, 17353, 17325, 17064, 16594, 15953, 15169, 14250, 13194, 12002, 10699, 9338, 7991, 6711, 5511, 4338, 3087, 1641, -82, -2087, -4284, -6510, -8582, -10355, -11766, -12847, -13703, -14461, -15221, -16021, -16835, -17587, -18188, -18568, -18688, -18543, -18144, -17503, -16625, -15511, -14169, -12630, -10948, -9196, -7451, -5774, -4188, -2679, -1197, 320, 868, 2513, 4103, 5640, 7125, 8556, 9931, 11241, 12471, 13606, 14625, 15505, 16228, 16776, 17138, 17311, 17296, 17103, 16747, 16244, 15613, 14872, 14036, 13112, 12107, 11020, 9848, 8585, 7227, 5772, 4222, 2586, 876, -885, -2673, -4461, -6218, -7916, -9532, -11043, -12434, -13694, -14815, -15794, -16627, -17311, -17839, -18205, -18398, -18408, -18222, -17830, -17227, -16411, -15389, -14174, -12787, -11256, -9612, -7889, -6121, -4339, -2567, -827, 868, 712, 2471, 4185, 5837, 7414, 8901, 10287, 11561, 12714, 13740, 14633, 15388, 16001, 16472, 16798, 16979, 17015, 16909, 16660, 16272, 15748, 15089, 14301, 13388, 12356, 11209, 9955, 8603, 7160, 5638, 4047, 2401, 712, -1004, -2732, -4454, -6154, -7812, -9410, -10931, -12356, -13666, -14846, -15880, -16754, -17456, -17975, -18305, -18439, -18375, -18113, -17655, -17008, -16179, -15178, -14018, -12714, -11283, -9742, -8110, -6407, -4654, -2869, -1074, 712, 2923, 3028, 3153, 3266, 3333, 3393, 3495, 3622, 3739, 3895, 4175, 4560, 4943, 5277, 5630, 6065, 6538, 6959, 7286, 7521, 7673, 7781, 7923, 8149, 8411, 8616, 8756, 8930, 9240, 9681, 10152, 10575, 10958, 11362, 11793, 12182, 12465, 12671, 12896, 13211, 13616, 14079, 14564, 15016, 15367, 15589, 15720, 15819, 15924, 16052, 16216, 16404, 16576, 16717, 16883, 17130, 17426, 17674, 17827, 17919, 17981, 17991, 17949, 17931, 18013, 18156, 18235, 18175, 18005, 17789, 17560, 17323, 17074, 16794, 16469, 16112, 15730, 15290, 14765, 14206, 13692, 13231, 12764, 12303, 11929, 11647, 11354, 10992, 10648, 10420, 10274, 10143, 10050, 10035, 10020, 9874, 9605, 9340, 9149, 8994, 8836, 8675, 8467, 8136, 7692, 7236, 6823, 6414, 5994, 5634, 5408, 5323, 5361, 5506, 5686, 5789, 5791, 5786, 5834, 5871, 5820, 5713, 5627, 5551, 5422, 5244, 5079, 4939, 4763, 4513, 4211, 3878, 3479, 2974, 2376, 1756, 1164, 579, -36, -654, -1187, -1613, -2050, -2631, -3330, -3995, -4542, -5046, -5612, -6237, -6844, -7391, -7896, -8394, -8906, -9420, -9888, -10259, -10550, -10829, -11136, -11445, -11731, -12013, -12308, -12618, -12959, -13375, -13871, -14388, -14878, -15345, -15799, -16220, -16602, -16971, -17332, -17650, -17915, -18180, -18476, -18758, -18984, -19191, -19440, -19752, -20126, -20576, -21073, -21507, -21778, -21917, -22026, -22145, -22232, -22255, -22238, -22211, -22181, -22159, -22156, -22147, -22086, -21946, -21724, -21414, -21038, -20665, -20354, -20074, -19734, -19292, -18804, -18345, -17918, -17473, -16970, -16419, -15857, -15304, -14733, -14100, -13401, -12689, -12015, -11366, -10689, -9961, -9220, -8512, -7840, -7158, -6419, -5637, -4877, -4181, -3529, -2889, -2303, -1848, -1534, -1281, -1008, -705, -384, -39, 330, 687, 1010, 1322, 1641, 1942, 2199, 2427, 2638, 2807, 2923, 2954, 3078, 3170, 3240, 3305, 3380, 3478, 3607, 3770, 3969, 4210, 4502, 4849, 5249, 5688, 6137, 6563, 6936, 7240, 7477, 7664, 7827, 7988, 8160, 8347, 8548, 8766, 9010, 9300, 9649, 10063, 10525, 11001, 11448, 11833, 12145, 12399, 12638, 12907, 13241, 13648, 14104, 14565, 14982, 15321, 15568, 15738, 15859, 15961, 16069, 16197, 16348, 16524, 16725, 16947, 17184, 17421, 17636, 17805, 17913, 17964, 17976, 17979, 17999, 18047, 18108, 18151, 18138, 18041, 17857, 17604, 17317, 17027, 16744, 16458, 16140, 15759, 15301, 14776, 14218, 13671, 13172, 12735, 12353, 12000, 11654, 11304, 10963, 10658, 10417, 10256, 10163, 10110, 10053, 9958, 9808, 9613, 9396, 9185, 8996, 8823, 8643, 8421, 8128, 7752, 7304, 6820, 6349, 5940, 5631, 5442, 5372, 5400, 5493, 5614, 5730, 5816, 5862, 5867, 5838, 5785, 5716, 5633, 5534, 5416, 5275, 5113, 4930, 4727, 4496, 4222, 3888, 3475, 2976, 2402, 1778, 1139, 518, -61, -597, -1105, -1611, -2138, -2699, -3293, -3904, -4514, -5107, -5679, -6237, -6790, -7344, -7897, -8439, -8952, -9422, -9843, -10217, -10554, -10864, -11159, -11443, -11721, -12001, -12293, -12615, -12980, -13397, -13864, -14363, -14869, -15358, -15812, -16226, -16605, -16960, -17302, -17633, -17946, -18233, -18488, -18717, -18937, -19174, -19453, -19788, -20179, -20603, -21029, -21417, -21736, -21969, -22114, -22185, -22206, -22201, -22193, -22193, -22201, -22209, -22200, -22155, -22058, -21900, -21679, -21403, -21086, -20744, -20388, -20023, -19649, -19258, -18845, -18405, -17939, -17449, -16941, -16416, -15873, -15306, -14710, -14081, -13421, -12737, -12037, -11334, -10634, -9941, -9250, -8557, -7853, -7133, -6395, -5647, -4899, -4173, -3490, -2874, -2342, -1900, -1539, -1238, -967, -695, -397, -65, 296, 668, 1031, 1366, 1667, 1935, 2179, 2403, 2611, 2797, 2954, 2962, 3286, 3765, 4930, 6465, 7656, 8419, 9354, 10809, 12461, 13883, 15026, 15982, 16734, 17315, 17842, 18196, 18004, 17077, 15593, 13814, 12008, 10629, 10002, 9726, 8944, 7462, 6077, 5533, 5651, 5769, 5513, 4755, 3325, 1243, -1092, -3357, -5630, -7925, -9840, -11139, -12297, -13900, -15777, -17315, -18429, -19590, -20942, -22012, -22386, -22154, -21541, -20495, -18897, -16875, -14635, -12151, -9289, -6239, -3557, -1632, -272, 981, 2179, 2962, 2803, 3476, 4174, 4992, 5990, 7174, 8493, 9861, 11190, 12432, 13590, 14698, 15783, 16812, 17673, 18204, 18248, 17732, 16705, 15334, 13843, 12427, 11188, 10125, 9169, 8257, 7387, 6624, 6054, 5706, 5489, 5194, 4554, 3352, 1522, -812, -3375, -5852, -8005, -9756, -11194, -12508, -13879, -15397, -17026, -18630, -20040, -21125, -21820, -22118, -22025, -21523, -20565, -19095, -17099, -14641, -11874, -9009, -6267, -3824, -1781, -156, 1092, 2045, 2803, 3411, 4104, 4678, 5244, 5904, 6737, 7792, 9074, 10550, 12146, 13760, 15275, 16572, 17548, 18125, 18263, 17964, 17270, 16258, 15026, 13686, 12345, 11095, 9998, 9087, 8357, 7775, 7278, 6794, 6243, 5556, 4676, 3570, 2232, 675, -1066, -2944, -4907, -6903, -8887, -10823, -12684, -14449, -16102, -17622, -18983, -20149, -21072, -21699, -21972, -21838, -21258, -20214, -18715, -16802, -14550, -12061, -9454, -6858, -4397, -2176, -269, 1287, 2499, 3411, 2679, 4468, 6134, 7663, 9043, 10267, 11334, 12244, 13002, 13615, 14093, 14447, 14689, 14829, 14881, 14853, 14753, 14589, 14364, 14079, 13734, 13324, 12845, 12291, 11651, 10919, 10086, 9145, 8088, 6913, 5618, 4205, 2679, 1051, -667, -2458, -4299, -6168, -8036, -9874, -11651, -13336, -14896, -16301, -17522, -18534, -19314, -19844, -20111, -20108, -19831, -19284, -18477, -17424, -16144, -14660, -13002, -11199, -9284, -7291, -5254, -3208, -1184, 787, 2679, 4071, 4143, 4230, 4285, 4293, 4330, 4445, 4572, 4658, 4788, 5096, 5560, 6020, 6397, 6781, 7268, 7806, 8257, 8550, 8709, 8786, 8846, 8962, 9169, 9403, 9556, 9622, 9729, 10005, 10423, 10828, 11112, 11333, 11632, 12055, 12482, 12765, 12889, 12968, 13114, 13360, 13704, 14122, 14529, 14791, 14849, 14787, 14733, 14735, 14768, 14823, 14906, 14982, 15019, 15072, 15239, 15511, 15765, 15916, 15993, 16026, 15966, 15793, 15628, 15635, 15811, 15982, 15997, 15858, 15666, 15499, 15380, 15302, 15237, 15148, 15005, 14789, 14491, 14132, 13776, 13468, 13179, 12846, 12473, 12114, 11783, 11420, 11002, 10598, 10283, 10047, 9851, 9696, 9586, 9451, 9205, 8858, 8513, 8245, 8048, 7888, 7741, 7551, 7247, 6816, 6340, 5902, 5517, 5166, 4877, 4718, 4749, 4972, 5328, 5709, 6012, 6221, 6398, 6587, 6751, 6844, 6889, 6939, 6990, 6991, 6931, 6855, 6778, 6655, 6452, 6189, 5885, 5498, 4981, 4360, 3719, 3097, 2465, 1797, 1141, 561, 35, -546, -1257, -2040, -2752, -3321, -3827, -4407, -5098, -5808, -6434, -6977, -7524, -8136, -8777, -9346, -9769, -10057, -10299, -10583, -10934, -11315, -11677, -12008, -12326, -12664, -13048, -13492, -13978, -14466, -14919, -15343, -15766, -16211, -16675, -17146, -17614, -18072, -18518, -18961, -19419, -19892, -20370, -20851, -21372, -21970, -22626, -23248, -23729, -24024, -24182, -24285, -24374, -24418, -24371, -24236, -24071, -23943, -23865, -23798, -23694, -23518, -23249, -22870, -22392, -21885, -21442, -21097, -20761, -20304, -19681, -18994, -18378, -17865, -17362, -16775, -16113, -15453, -14848, -14275, -13678, -13029, -12345, -11654, -10962, -10252, -9521, -8817, -8192, -7630, -7031, -6314, -5507, -4705, -3949, -3216, -2500, -1860, -1344, -930, -561, -202, 164, 556, 976, 1391, 1782, 2170, 2562, 2908, 3161, 3362, 3584, 3817, 3984, 4071, 4078, 4177, 4241, 4279, 4304, 4339, 4402, 4509, 4670, 4888, 5166, 5505, 5906, 6362, 6854, 7351, 7813, 8203, 8496, 8694, 8819, 8910, 9006, 9133, 9296, 9484, 9682, 9883, 10097, 10345, 10646, 11007, 11408, 11808, 12161, 12438, 12638, 12792, 12952, 13164, 13447, 13788, 14141, 14450, 14674, 14797, 14835, 14821, 14795, 14783, 14797, 14837, 14905, 15004, 15142, 15322, 15529, 15734, 15896, 15980, 15977, 15907, 15814, 15748, 15738, 15784, 15851, 15890, 15861, 15754, 15592, 15419, 15273, 15169, 15087, 14983, 14810, 14544, 14197, 13808, 13427, 13086, 12788, 12504, 12194, 11829, 11411, 10975, 10572, 10250, 10025, 9878, 9761, 9619, 9416, 9147, 8839, 8535, 8272, 8065, 7896, 7727, 7513, 7222, 6844, 6398, 5923, 5474, 5104, 4857, 4759, 4815, 5007, 5297, 5633, 5965, 6251, 6470, 6623, 6728, 6807, 6876, 6937, 6982, 6995, 6963, 6886, 6768, 6617, 6432, 6199, 5894, 5494, 4990, 4393, 3735, 3061, 2406, 1788, 1201, 621, 18, -622, -1297, -1988, -2665, -3309, -3916, -4501, -5088, -5697, -6335, -6989, -7634, -8240, -8783, -9256, -9665, -10025, -10356, -10673, -10984, -11297, -11617, -11951, -12306, -12688, -13098, -13532, -13979, -14432, -14883, -15330, -15777, -16229, -16686, -17150, -17613, -18071, -18520, -18962, -19406, -19864, -20349, -20873, -21435, -22022, -22609, -23162, -23643, -24018, -24268, -24394, -24412, -24357, -24265, -24169, -24086, -24016, -23941, -23837, -23680, -23457, -23165, -22814, -22419, -21997, -21559, -21109, -20644, -20157, -19641, -19093, -18515, -17912, -17298, -16682, -16074, -15478, -14888, -14293, -13680, -13035, -12354, -11645, -10924, -10212, -9527, -8874, -8245, -7619, -6970, -6276, -5531, -4747, -3954, -3189, -2489, -1878, -1360, -925, -546, -191, 168, 548, 954, 1376, 1797, 2198, 2562, 2881, 3156, 3393, 3601, 3786, 3946, 4078, 4074, 4262, 4710, 5987, 7661, 8845, 9410, 10068, 11275, 12668, 13716, 14356, 14798, 15145, 15450, 15766, 15963, 15810, 15314, 14622, 13620, 12152, 10598, 9584, 8998, 8039, 6493, 5260, 5192, 6015, 6826, 7086, 6647, 5342, 3176, 591, -1974, -4509, -7033, -9184, -10701, -11965, -13521, -15345, -17122, -18927, -21013, -23058, -24292, -24395, -23743, -22709, -21212, -19118, -16662, -14193, -11720, -9003, -6049, -3264, -1040, 673, 2161, 3401, 4074, 3891, 4516, 5210, 6073, 7120, 8296, 9503, 10648, 11672, 12565, 13352, 14066, 14721, 15293, 15728, 15961, 15945, 15665, 15138, 14399, 13481, 12404, 11186, 9863, 8518, 7288, 6339, 5811, 5755, 6073, 6524, 6766, 6456, 5365, 3456, 902, -1964, -4765, -7202, -9150, -10682, -12017, -13422, -15090, -17065, -19215, -21284, -22971, -24029, -24328, -23867, -22748, -21116, -19107, -16817, -14303, -11611, -8814, -6026, -3399, -1091, 781, 2182, 3172, 3891, 4514, 5304, 5946, 6533, 7150, 7864, 8719, 9725, 10862, 12077, 13297, 14432, 15394, 16102, 16497, 16546, 16250, 15639, 14771, 13726, 12591, 11454, 10393, 9463, 8698, 8099, 7646, 7290, 6970, 6615, 6155, 5528, 4685, 3596, 2249, 653, -1171, -3186, -5348, -7607, -9910, -12204, -14435, -16547, -18482, -20182, -21585, -22632, -23266, -23440, -23120, -22293, -20968, -19184, -17003, -14517, -11833, -9071, -6354, -3794, -1482, 517, 2173, 3493, 4514, 4054, 5859, 7488, 8925, 10163, 11200, 12040, 12692, 13170, 13492, 13677, 13749, 13728, 13637, 13496, 13321, 13126, 12922, 12714, 12502, 12283, 12050, 11789, 11487, 11126, 10688, 10152, 9501, 8718, 7790, 6706, 5460, 4054, 2491, 785, -1049, -2986, -4997, -7049, -9106, -11126, -13069, -14892, -16554, -18016, -19243, -20204, -20874, -21234, -21273, -20986, -20379, -19461, -18253, -16780, -15073, -13170, -11110, -8937, -6696, -4431, -2184, 3, 2093, 4054, 132, 230, 378, 544, 643, 713, 865, 1077, 1228, 1349, 1638, 2176, 2795, 3331, 3849, 4495, 5229, 5873, 6347, 6716, 7042, 7339, 7669, 8122, 8649, 9056, 9254, 9430, 9843, 10492, 11114, 11530, 11845, 12263, 12783, 13221, 13461, 13580, 13700, 13854, 14034, 14293, 14677, 15114, 15455, 15632, 15713, 15796, 15929, 16138, 16434, 16770, 17041, 17214, 17386, 17662, 18004, 18283, 18451, 18573, 18688, 18747, 18745, 18819, 19103, 19538, 19909, 20070, 20046, 19930, 19769, 19570, 19351, 19134, 18922, 18708, 18470, 18181, 17843, 17508, 17202, 16867, 16448, 16006, 15635, 15278, 14787, 14169, 13623, 13275, 13038, 12801, 12613, 12516, 12354, 11925, 11254, 10544, 9918, 9360, 8862, 8436, 8000, 7427, 6716, 5999, 5352, 4742, 4152, 3632, 3216, 2923, 2820, 2938, 3128, 3161, 3013, 2879, 2889, 2952, 2959, 2956, 3017, 3087, 3076, 3014, 2981, 2953, 2839, 2622, 2362, 2079, 1721, 1240, 656, 35, -565, -1138, -1721, -2314, -2853, -3314, -3810, -4467, -5214, -5837, -6271, -6697, -7305, -8062, -8787, -9377, -9866, -10338, -10842, -11345, -11720, -11852, -11788, -11704, -11694, -11684, -11600, -11514, -11540, -11692, -11924, -12226, -12588, -12949, -13283, -13669, -14184, -14777, -15341, -15848, -16329, -16769, -17133, -17447, -17770, -18092, -18354, -18551, -18749, -19007, -19354, -19790, -20268, -20679, -20936, -21052, -21085, -21044, -20904, -20697, -20504, -20363, -20244, -20107, -19931, -19708, -19432, -19111, -18753, -18372, -18019, -17768, -17622, -17464, -17162, -16701, -16196, -15770, -15453, -15166, -14784, -14250, -13645, -13109, -12683, -12273, -11793, -11265, -10745, -10216, -9630, -9009, -8444, -7995, -7639, -7292, -6870, -6355, -5831, -5406, -5081, -4774, -4459, -4225, -4130, -4087, -3962, -3719, -3403, -3052, -2689, -2340, -2003, -1636, -1246, -919, -694, -492, -244, -9, 132, 107, 250, 387, 519, 645, 762, 879, 1009, 1177, 1410, 1732, 2156, 2679, 3283, 3936, 4597, 5226, 5793, 6283, 6702, 7069, 7414, 7762, 8126, 8506, 8891, 9270, 9643, 10022, 10432, 10888, 11394, 11922, 12428, 12860, 13183, 13398, 13538, 13663, 13830, 14073, 14389, 14740, 15077, 15356, 15564, 15717, 15851, 16002, 16192, 16423, 16681, 16947, 17212, 17476, 17740, 18000, 18239, 18434, 18569, 18648, 18703, 18782, 18932, 19171, 19474, 19779, 20007, 20097, 20028, 19829, 19563, 19296, 19073, 18892, 18720, 18510, 18232, 17887, 17503, 17123, 16773, 16447, 16112, 15723, 15253, 14712, 14153, 13645, 13252, 12994, 12841, 12723, 12551, 12257, 11815, 11248, 10614, 9979, 9393, 8869, 8388, 7907, 7381, 6782, 6111, 5399, 4697, 4067, 3560, 3207, 3010, 2943, 2959, 3005, 3038, 3034, 2996, 2946, 2912, 2913, 2952, 3012, 3066, 3090, 3070, 3007, 2910, 2782, 2620, 2403, 2108, 1714, 1222, 652, 41, -573, -1163, -1721, -2259, -2797, -3351, -3927, -4518, -5111, -5694, -6267, -6839, -7424, -8030, -8656, -9285, -9893, -10451, -10933, -11321, -11602, -11772, -11838, -11814, -11729, -11622, -11537, -11512, -11571, -11719, -11944, -12226, -12547, -12901, -13294, -13732, -14221, -14750, -15298, -15834, -16331, -16773, -17156, -17489, -17783, -18048, -18294, -18533, -18782, -19065, -19398, -19785, -20204, -20605, -20928, -21119, -21156, -21054, -20866, -20657, -20479, -20352, -20256, -20147, -19979, -19727, -19402, -19040, -18688, -18377, -18114, -17878, -17636, -17359, -17035, -16672, -16287, -15897, -15503, -15097, -14663, -14197, -13704, -13201, -12708, -12230, -11759, -11273, -10753, -10192, -9608, -9032, -8498, -8026, -7610, -7220, -6822, -6389, -5923, -5454, -5027, -4684, -4441, -4288, -4183, -4076, -3923, -3701, -3412, -3072, -2706, -2334, -1968, -1616, -1280, -967, -684, -436, -226, -48, 107, 219, 546, 1153, 2809, 5114, 7084, 8531, 10058, 11851, 13358, 14295, 15091, 16092, 17075, 17845, 18612, 19417, 19814, 19451, 18485, 17160, 15555, 13910, 12541, 11185, 9157, 6480, 4173, 3049, 2871, 2994, 3083, 2807, 1633, -479, -2858, -5081, -7438, -9907, -11548, -11783, -11592, -12427, -14360, -16296, -17678, -18915, -20205, -20971, -20736, -19803, -18735, -17643, -16302, -14628, -12736, -10709, -8609, -6653, -5159, -4180, -3300, -2077, -689, 219, -255, 677, 1770, 3105, 4722, 6577, 8537, 10412, 12026, 13292, 14260, 15080, 15929, 16904, 17960, 18920, 19549, 19667, 19229, 18326, 17126, 15768, 14294, 12651, 10771, 8675, 6538, 4662, 3349, 2744, 2719, 2883, 2715, 1783, -70, -2642, -5463, -7988, -9836, -10935, -11528, -12034, -12845, -14151, -15867, -17697, -19278, -20325, -20727, -20534, -19886, -18917, -17700, -16247, -14555, -12657, -10652, -8676, -6863, -5299, -3996, -2911, -1975, -1113, -255, 387, 1435, 2506, 3642, 4875, 6224, 7690, 9259, 10897, 12556, 14174, 15684, 17017, 18108, 18904, 19365, 19469, 19215, 18620, 17720, 16563, 15210, 13724, 12169, 10603, 9073, 7615, 6249, 4980, 3799, 2685, 1608, 534, -573, -1747, -3014, -4389, -5878, -7472, -9149, -10873, -12600, -14275, -15840, -17233, -18398, -19282, -19845, -20058, -19909, -19402, -18558, -17414, -16020, -14436, -12727, -10959, -9196, -7490, -5882, -4398, -3044, -1814, -682, 387, 377, 2108, 3807, 5459, 7047, 8558, 9978, 11296, 12499, 13580, 14529, 15340, 16007, 16526, 16893, 17106, 17165, 17069, 16820, 16420, 15873, 15182, 14353, 13393, 12309, 11109, 9802, 8400, 6913, 5353, 3735, 2071, 377, -1331, -3037, -4725, -6379, -7980, -9514, -10962, -12309, -13541, -14642, -15601, -16406, -17048, -17517, -17809, -17920, -17846, -17590, -17153, -16541, -15760, -14818, -13727, -12499, -11148, -9689, -8139, -6513, -4831, -3110, -1368, 377, 4785, 5008, 5300, 5587, 5684, 5622, 5599, 5653, 5675, 5748, 6136, 6831, 7440, 7724, 7961, 8542, 9384, 10068, 10418, 10638, 10902, 11141, 11284, 11440, 11705, 11974, 12122, 12240, 12514, 12927, 13242, 13301, 13217, 13224, 13408, 13642, 13741, 13635, 13409, 13234, 13266, 13558, 14003, 14383, 14531, 14461, 14317, 14199, 14098, 13992, 13919, 13889, 13824, 13689, 13602, 13690, 13872, 13947, 13881, 13823, 13823, 13733, 13504, 13391, 13659, 14199, 14642, 14778, 14699, 14557, 14404, 14270, 14199, 14146, 13979, 13656, 13269, 12900, 12553, 12249, 12042, 11895, 11703, 11452, 11237, 11076, 10884, 10674, 10586, 10653, 10743, 10815, 11004, 11313, 11459, 11230, 10804, 10493, 10334, 10172, 9996, 9898, 9801, 9515, 9044, 8566, 8146, 7702, 7242, 6910, 6774, 6791, 6990, 7430, 7978, 8350, 8441, 8422, 8440, 8443, 8371, 8284, 8224, 8113, 7902, 7674, 7500, 7312, 7024, 6653, 6250, 5790, 5219, 4525, 3721, 2852, 2000, 1220, 454, -354, -1120, -1755, -2398, -3290, -4390, -5362, -6022, -6569, -7277, -8149, -9022, -9811, -10533, -11199, -11826, -12425, -12896, -13068, -12940, -12736, -12622, -12546, -12436, -12385, -12465, -12561, -12567, -12624, -12936, -13462, -13976, -14378, -14759, -15189, -15629, -16039, -16425, -16780, -17092, -17396, -17733, -18078, -18373, -18612, -18841, -19106, -19473, -19990, -20578, -21031, -21245, -21360, -21566, -21849, -22042, -22060, -21971, -21877, -21835, -21881, -22007, -22128, -22150, -22041, -21790, -21396, -20949, -20654, -20620, -20693, -20607, -20264, -19776, -19289, -18864, -18504, -18160, -17758, -17285, -16825, -16424, -15973, -15334, -14517, -13636, -12741, -11821, -10942, -10226, -9681, -9168, -8573, -7910, -7241, -6573, -5864, -5102, -4349, -3724, -3311, -3053, -2787, -2410, -1950, -1464, -935, -347, 258, 855, 1483, 2129, 2682, 3104, 3519, 4016, 4482, 4785, 4793, 5144, 5402, 5549, 5595, 5579, 5560, 5595, 5722, 5953, 6279, 6681, 7140, 7647, 8193, 8767, 9343, 9883, 10348, 10708, 10964, 11142, 11287, 11445, 11646, 11888, 12152, 12408, 12635, 12830, 13004, 13170, 13331, 13470, 13561, 13583, 13535, 13448, 13376, 13373, 13475, 13677, 13938, 14192, 14378, 14459, 14429, 14316, 14161, 14002, 13867, 13770, 13716, 13705, 13734, 13792, 13856, 13898, 13889, 13820, 13710, 13604, 13564, 13635, 13828, 14108, 14401, 14627, 14728, 14691, 14548, 14356, 14166, 13998, 13834, 13634, 13363, 13017, 12631, 12262, 11965, 11760, 11626, 11509, 11356, 11140, 10885, 10655, 10523, 10538, 10698, 10942, 11176, 11312, 11296, 11131, 10868, 10580, 10331, 10149, 10020, 9899, 9733, 9476, 9111, 8652, 8139, 7632, 7197, 6896, 6774, 6847, 7093, 7457, 7856, 8207, 8447, 8550, 8533, 8442, 8331, 8234, 8156, 8075, 7959, 7783, 7545, 7261, 6951, 6621, 6254, 5810, 5249, 4552, 3736, 2855, 1974, 1150, 402, -293, -983, -1723, -2538, -3418, -4318, -5186, -5987, -6718, -7414, -8123, -8882, -9696, -10528, -11312, -11979, -12473, -12776, -12906, -12904, -12821, -12701, -12577, -12471, -12397, -12374, -12419, -12547, -12766, -13071, -13448, -13872, -14321, -14772, -15214, -15638, -16041, -16422, -16780, -17116, -17432, -17730, -18017, -18300, -18588, -18890, -19219, -19583, -19983, -20408, -20834, -21227, -21550, -21775, -21894, -21924, -21902, -21874, -21877, -21927, -22011, -22091, -22122, -22067, -21911, -21672, -21390, -21112, -20874, -20688, -20536, -20376, -20162, -19861, -19465, -18999, -18508, -18038, -17620, -17252, -16898, -16497, -15988, -15333, -14531, -13624, -12681, -11779, -10972, -10281, -9685, -9135, -8574, -7958, -7272, -6531, -5775, -5051, -4401, -3846, -3388, -3008, -2671, -2335, -1962, -1521, -996, -396, 256, 919, 1553, 2131, 2643, 3104, 3536, 3963, 4388, 4793, 4805, 5452, 5884, 7164, 9197, 10936, 11886, 12513, 13176, 13627, 13772, 13954, 14199, 14070, 13615, 13554, 14129, 14583, 14219, 13228, 12140, 11221, 10727, 10850, 11036, 10289, 8629, 7362, 7387, 8091, 8408, 8035, 7006, 5051, 2145, -1088, -4219, -7462, -10627, -12596, -12794, -12404, -13033, -14754, -16460, -17691, -18939, -20421, -21615, -22096, -22002, -21579, -20833, -19724, -18245, -16262, -13642, -10583, -7602, -5133, -3185, -1337, 837, 3147, 4805, 4139, 5399, 6567, 7737, 8981, 10297, 11594, 12712, 13496, 13876, 13912, 13774, 13668, 13731, 13965, 14238, 14359, 14183, 13693, 13002, 12289, 11693, 11237, 10825, 10319, 9646, 8872, 8183, 7780, 7731, 7874, 7821, 7103, 5367, 2564, -997, -4738, -8034, -10442, -11864, -12547, -12947, -13517, -14525, -15978, -17664, -19284, -20591, -21463, -21901, -21959, -21663, -20982, -19840, -18178, -16016, -13468, -10717, -7959, -5344, -2957, -823, 1061, 2708, 4139, 4851, 6202, 7322, 8272, 9115, 9910, 10697, 11496, 12302, 13086, 13803, 14401, 14826, 15038, 15015, 14761, 14302, 13689, 12990, 12277, 11620, 11071, 10661, 10394, 10239, 10144, 10031, 9815, 9413, 8752, 7783, 6484, 4868, 2973, 867, -1372, -3655, -5901, -8041, -10028, -11836, -13459, -14911, -16213, -17387, -18448, -19395, -20209, -20852, -21270, -21401, -21182, -20562, -19509, -18020, -16121, -13874, -11365, -8701, -5999, -3370, -913, 1299, 3223, 4851, 4067, 5886, 7528, 8978, 10228, 11276, 12125, 12785, 13271, 13599, 13790, 13866, 13849, 13760, 13620, 13446, 13251, 13046, 12835, 12621, 12399, 12161, 11896, 11588, 11221, 10774, 10231, 9571, 8778, 7839, 6744, 5486, 4067, 2491, 771, -1076, -3027, -5052, -7118, -9188, -11221, -13175, -15009, -16680, -18151, -19384, -20350, -21024, -21385, -21424, -21135, -20523, -19600, -18385, -16903, -15186, -13271, -11198, -9012, -6756, -4476, -2215, -13, 2092, 4067, 984, 1305, 1705, 2005, 2131, 2273, 2606, 3013, 3306, 3590, 4152, 4991, 5781, 6348, 6916, 7727, 8648, 9350, 9737, 9987, 10242, 10488, 10718, 11002, 11352, 11653, 11818, 11921, 12092, 12333, 12530, 12619, 12690, 12886, 13239, 13626, 13897, 14025, 14111, 14262, 14513, 14854, 15239, 15541, 15602, 15386, 15049, 14766, 14568, 14412, 14320, 14327, 14344, 14264, 14171, 14280, 14630, 15033, 15343, 15618, 15892, 16026, 15948, 15886, 16143, 16685, 17174, 17378, 17379, 17368, 17420, 17504, 17562, 17525, 17346, 17049, 16663, 16137, 15450, 14761, 14286, 14002, 13685, 13256, 12883, 12682, 12541, 12356, 12230, 12271, 12396, 12499, 12654, 12921, 13100, 12927, 12439, 11909, 11485, 11108, 10751, 10459, 10147, 9610, 8811, 7956, 7209, 6518, 5783, 5064, 4514, 4236, 4261, 4549, 4941, 5239, 5405, 5581, 5849, 6105, 6246, 6337, 6473, 6585, 6529, 6315, 6080, 5870, 5580, 5137, 4632, 4180, 3735, 3134, 2318, 1424, 599, -199, -1120, -2150, -3097, -3889, -4734, -5825, -7019, -7981, -8616, -9144, -9763, -10434, -11029, -11525, -11958, -12317, -12589, -12796, -12936, -12953, -12840, -12688, -12587, -12556, -12586, -12677, -12787, -12856, -12916, -13087, -13414, -13808, -14176, -14516, -14822, -15025, -15109, -15165, -15280, -15444, -15629, -15850, -16101, -16315, -16490, -16723, -17080, -17517, -18004, -18573, -19165, -19572, -19708, -19783, -20063, -20514, -20876, -21012, -21023, -21044, -21104, -21173, -21210, -21154, -20971, -20688, -20326, -19837, -19237, -18712, -18431, -18288, -18012, -17515, -16984, -16596, -16330, -16096, -15886, -15714, -15539, -15344, -15177, -15033, -14778, -14296, -13638, -12944, -12275, -11619, -11005, -10480, -9988, -9377, -8572, -7665, -6789, -5964, -5125, -4282, -3571, -3132, -2963, -2929, -2883, -2753, -2543, -2292, -2041, -1787, -1490, -1139, -797, -515, -246, 90, 453, 744, 984, 1076, 1402, 1682, 1916, 2122, 2335, 2587, 2904, 3294, 3756, 4289, 4890, 5561, 6299, 7082, 7869, 8602, 9225, 9705, 10045, 10285, 10489, 10713, 10986, 11298, 11608, 11867, 12049, 12161, 12245, 12356, 12532, 12779, 13066, 13345, 13577, 13756, 13910, 14086, 14325, 14630, 14962, 15253, 15432, 15458, 15337, 15114, 14858, 14625, 14448, 14327, 14249, 14204, 14202, 14268, 14426, 14677, 14992, 15316, 15592, 15788, 15909, 16002, 16126, 16324, 16600, 16916, 17211, 17427, 17541, 17564, 17534, 17483, 17412, 17289, 17060, 16684, 16155, 15523, 14873, 14292, 13837, 13511, 13270, 13050, 12808, 12544, 12306, 12163, 12168, 12326, 12584, 12843, 12999, 12980, 12771, 12411, 11977, 11541, 11146, 10793, 10440, 10032, 9517, 8873, 8111, 7275, 6430, 5653, 5014, 4570, 4348, 4344, 4519, 4808, 5139, 5450, 5705, 5902, 6058, 6200, 6339, 6462, 6536, 6523, 6398, 6162, 5842, 5474, 5088, 4686, 4243, 3721, 3087, 2336, 1491, 597, -304, -1188, -2063, -2957, -3897, -4891, -5913, -6910, -7825, -8619, -9289, -9866, -10397, -10921, -11447, -11950, -12380, -12690, -12858, -12895, -12846, -12762, -12690, -12650, -12640, -12646, -12661, -12693, -12768, -12914, -13149, -13465, -13829, -14195, -14516, -14768, -14951, -15088, -15208, -15338, -15488, -15656, -15835, -16024, -16231, -16475, -16778, -17150, -17585, -18061, -18542, -18995, -19396, -19737, -20023, -20267, -20483, -20678, -20854, -21006, -21128, -21211, -21245, -21217, -21112, -20917, -20628, -20253, -19818, -19357, -18906, -18492, -18122, -17785, -17457, -17118, -16760, -16399, -16065, -15795, -15606, -15490, -15407, -15293, -15083, -14733, -14236, -13621, -12944, -12267, -11633, -11054, -10506, -9942, -9313, -8583, -7747, -6835, -5904, -5023, -4259, -3658, -3238, -2985, -2853, -2783, -2711, -2586, -2383, -2103, -1772, -1425, -1094, -793, -517, -243, 50, 374, 724, 1076, 1013, 2076, 3431, 5621, 8303, 10444, 11487, 11951, 12700, 13876, 14849, 15072, 14711, 14407, 14653, 15485, 16582, 17433, 17487, 16432, 14592, 12920, 12288, 12566, 12553, 11107, 8374, 5771, 4665, 5166, 6202, 6546, 5636, 3557, 598, -2968, -6735, -10006, -12055, -12716, -12642, -12787, -13550, -14567, -15383, -16109, -17210, -18784, -20323, -21188, -21094, -20139, -18643, -17083, -15896, -15021, -13743, -11367, -8120, -5123, -3267, -2335, -1460, -235, 1013, 1052, 2285, 3787, 5587, 7604, 9651, 11482, 12874, 13709, 14035, 14055, 14050, 14263, 14790, 15539, 16279, 16751, 16790, 16397, 15715, 14934, 14174, 13411, 12510, 11325, 9833, 8204, 6755, 5806, 5488, 5625, 5747, 5259, 3695, 941, -2684, -6525, -9841, -12095, -13146, -13278, -13049, -13041, -13632, -14870, -16510, -18163, -19473, -20244, -20471, -20268, -19765, -19023, -18014, -16661, -14915, -12807, -10467, -8090, -5873, -3956, -2388, -1120, -29, 1052, 2371, 3805, 5119, 6350, 7532, 8696, 9858, 11021, 12170, 13277, 14300, 15193, 15912, 16419, 16690, 16720, 16521, 16120, 15559, 14886, 14149, 13391, 12640, 11910, 11196, 10477, 9720, 8884, 7928, 6816, 5525, 4048, 2395, 595, -1311, -3272, -5232, -7142, -8955, -10641, -12180, -13566, -14802, -15896, -16858, -17693, -18398, -18959, -19352, -19546, -19503, -19188, -18576, -17650, -16414, -14891, -13121, -11162, -9083, -6958, -4856, -2837, -946, 792, 2371, 1899, 3679, 5366, 6946, 8406, 9736, 10931, 11987, 12904, 13682, 14326, 14839, 15229, 15502, 15662, 15717, 15672, 15531, 15296, 14970, 14552, 14043, 13441, 12743, 11946, 11048, 10047, 8940, 7729, 6414, 5000, 3492, 1899, 234, -1490, -3255, -5043, -6830, -8593, -10307, -11946, -13484, -14895, -16154, -17239, -18128, -18806, -19256, -19471, -19443, -19172, -18660, -17916, -16950, -15779, -14423, -12904, -11246, -9478, -7626, -5720, -3787, -1856, 47, 1899, 118, 198, 445, 620, 601, 612, 813, 974, 861, 718, 978, 1635, 2276, 2710, 3204, 4008, 4979, 5794, 6335, 6693, 6957, 7162, 7375, 7671, 8016, 8280, 8427, 8616, 9044, 9671, 10208, 10458, 10606, 11013, 11749, 12480, 12873, 12955, 12992, 13193, 13661, 14459, 15488, 16392, 16817, 16783, 16630, 16599, 16661, 16730, 16838, 16994, 17101, 17137, 17293, 17750, 18398, 18952, 19311, 19597, 19844, 19879, 19628, 19383, 19542, 20119, 20686, 20844, 20603, 20274, 20092, 20045, 19995, 19842, 19581, 19232, 18754, 18060, 17181, 16345, 15771, 15389, 14941, 14364, 13869, 13565, 13265, 12816, 12387, 12205, 12193, 12138, 12074, 12146, 12209, 11921, 11249, 10541, 10049, 9703, 9394, 9161, 8943, 8465, 7572, 6457, 5377, 4356, 3341, 2469, 1959, 1859, 2079, 2527, 3069, 3488, 3680, 3775, 3903, 3978, 3892, 3777, 3834, 3986, 3979, 3783, 3625, 3605, 3542, 3289, 2967, 2714, 2397, 1776, 890, 63, -509, -987, -1619, -2356, -2942, -3354, -3927, -4913, -6086, -6972, -7443, -7843, -8503, -9339, -10017, -10376, -10555, -10778, -11136, -11543, -11823, -11869, -11732, -11570, -11493, -11523, -11655, -11871, -12079, -12173, -12193, -12318, -12657, -13127, -13590, -13996, -14345, -14626, -14861, -15127, -15458, -15795, -16087, -16368, -16683, -17020, -17357, -17697, -18034, -18377, -18824, -19461, -20149, -20570, -20587, -20425, -20383, -20487, -20544, -20448, -20279, -20157, -20139, -20220, -20344, -20409, -20342, -20131, -19741, -19122, -18366, -17758, -17504, -17448, -17221, -16662, -15977, -15474, -15255, -15196, -15114, -14905, -14575, -14206, -13863, -13506, -13027, -12383, -11653, -10942, -10252, -9536, -8846, -8346, -8092, -7874, -7398, -6608, -5717, -4899, -4124, -3370, -2805, -2600, -2658, -2712, -2630, -2466, -2266, -2020, -1758, -1518, -1241, -878, -556, -427, -397, -246, 5, 134, 118, 183, 323, 449, 550, 625, 679, 724, 777, 856, 986, 1197, 1521, 1986, 2602, 3348, 4169, 4987, 5717, 6296, 6708, 6983, 7183, 7380, 7620, 7915, 8239, 8558, 8854, 9137, 9450, 9837, 10318, 10871, 11430, 11919, 12286, 12537, 12739, 12991, 13385, 13955, 14663, 15407, 16064, 16537, 16791, 16858, 16813, 16742, 16704, 16728, 16816, 16965, 17185, 17493, 17896, 18373, 18867, 19297, 19591, 19721, 19722, 19679, 19687, 19811, 20047, 20327, 20551, 20634, 20552, 20345, 20091, 19862, 19678, 19494, 19220, 18774, 18127, 17328, 16488, 15732, 15142, 14724, 14410, 14099, 13714, 13245, 12754, 12345, 12106, 12067, 12169, 12295, 12310, 12124, 11725, 11180, 10602, 10097, 9719, 9450, 9204, 8869, 8343, 7575, 6581, 5443, 4286, 3252, 2468, 2013, 1907, 2105, 2507, 2987, 3423, 3733, 3889, 3920, 3886, 3848, 3844, 3874, 3908, 3908, 3851, 3739, 3592, 3434, 3263, 3050, 2745, 2302, 1705, 987, 217, -521, -1172, -1728, -2233, -2762, -3386, -4135, -4989, -5884, -6742, -7504, -8152, -8707, -9210, -9698, -10182, -10645, -11046, -11351, -11544, -11635, -11656, -11647, -11640, -11649, -11678, -11723, -11788, -11882, -12021, -12219, -12482, -12800, -13158, -13532, -13903, -14259, -14594, -14911, -15212, -15502, -15787, -16072, -16361, -16660, -16975, -17311, -17676, -18074, -18510, -18976, -19455, -19911, -20297, -20568, -20695, -20676, -20548, -20372, -20220, -20145, -20168, -20267, -20386, -20457, -20422, -20251, -19947, -19540, -19075, -18590, -18114, -17661, -17235, -16833, -16455, -16102, -15773, -15471, -15196, -14948, -14720, -14499, -14258, -13962, -13571, -13055, -12408, -11659, -10868, -10112, -9460, -8941, -8537, -8180, -7780, -7260, -6582, -5769, -4899, -4077, -3400, -2929, -2669, -2575, -2570, -2570, -2508, -2353, -2105, -1792, -1454, -1132, -854, -633, -464, -331, -213, -92, 41, 183, 287, 522, 848, 2241, 4682, 6950, 8219, 9086, 10549, 12616, 14533, 15862, 16741, 17455, 18248, 19258, 20242, 20597, 19924, 18338, 16193, 13981, 12422, 11886, 11518, 9844, 6676, 3684, 2538, 3103, 3973, 4131, 3430, 1973, -191, -2900, -5864, -8674, -10726, -11578, -11624, -11888, -12890, -14209, -15410, -16698, -18277, -19715, -20483, -20600, -20262, -19346, -17825, -16200, -14920, -13683, -11847, -9307, -6601, -4352, -2855, -1973, -1250, -404, 287, 25, 594, 1414, 2597, 4160, 6015, 7981, 9853, 11476, 12815, 13962, 15082, 16307, 17647, 18949, 19945, 20371, 20091, 19162, 17806, 16303, 14846, 13467, 12044, 10422, 8551, 6576, 4811, 3596, 3105, 3210, 3480, 3335, 2289, 178, -2755, -5946, -8746, -10687, -11669, -11971, -12103, -12560, -13616, -15223, -17070, -18745, -19912, -20429, -20346, -19830, -19041, -18050, -16832, -15312, -13449, -11292, -8984, -6728, -4717, -3084, -1874, -1037, -459, 25, 879, 1646, 2401, 3231, 4213, 5403, 6826, 8474, 10300, 12230, 14161, 15981, 17574, 18839, 19697, 20099, 20035, 19527, 18633, 17431, 16016, 14486, 12929, 11419, 10003, 8707, 7529, 6447, 5422, 4409, 3364, 2247, 1034, -290, -1721, -3245, -4835, -6464, -8099, -9713, -11279, -12778, -14191, -15501, -16686, -17724, -18582, -19226, -19614, -19708, -19475, -18894, -17959, -16688, -15121, -13317, -11358, -9334, -7336, -5450, -3745, -2262, -1015, 16, 879, 373, 2100, 3795, 5443, 7028, 8536, 9954, 11269, 12471, 13550, 14497, 15307, 15974, 16492, 16858, 17071, 17130, 17035, 16786, 16387, 15841, 15151, 14324, 13365, 12283, 11084, 9780, 8380, 6895, 5339, 3723, 2063, 373, -1331, -3034, -4719, -6368, -7966, -9495, -10939, -12283, -13511, -14609, -15566, -16368, -17007, -17476, -17766, -17876, -17803, -17547, -17112, -16501, -15722, -14783, -13695, -12471, -11123, -9668, -8122, -6501, -4823, -3106, -1368, 373, 13554, 12859, 12771, 13036, 13231, 13301, 13295, 12875, 11645, 9882, 8335, 7303, 6463, 5683, 5420, 6045, 7195, 8132, 8443, 8099, 7112, 5568, 3873, 2563, 1792, 1281, 863, 826, 1521, 2743, 3755, 4015, 3688, 3303, 3029, 2541, 1620, 590, 0, 90, 769, 1916, 3374, 4702, 5317, 4992, 4017, 2798, 1543, 425, -245, -268, 214, 976, 2026, 3365, 4532, 4805, 3934, 2366, 676, -875, -2042, -2272, -1174, 812, 2595, 3340, 2959, 1797, 228, -1365, -2580, -3201, -3312, -3127, -2869, -2786, -3033, -3471, -3842, -4165, -4672, -5338, -5897, -6388, -7211, -8371, -9154, -8914, -7803, -6359, -4829, -3391, -2676, -3304, -5014, -6797, -7849, -7911, -6878, -4772, -2192, -149, 752, 632, -183, -1460, -2772, -3437, -3015, -1567, 648, 3322, 5870, 7608, 8425, 8880, 9436, 10006, 10443, 10994, 11873, 12819, 13490, 14058, 14967, 16295, 17718, 18979, 20000, 20593, 20437, 19446, 18005, 16753, 16180, 16389, 17150, 18156, 19156, 19801, 19560, 18134, 15969, 14032, 12944, 12546, 12357, 12160, 11978, 11755, 11279, 10334, 8864, 7111, 5594, 4702, 4272, 3792, 3039, 2221, 1477, 651, -322, -1233, -2019, -2995, -4420, -6126, -7824, -9489, -11145, -12562, -13498, -14069, -14605, -15291, -16203, -17468, -19095, -20774, -22113, -22994, -23539, -23887, -24223, -24817, -25768, -26818, -27664, -28305, -28887, -29343, -29468, -29243, -28841, -28396, -27976, -27679, -27534, -27380, -27032, -26505, -25889, -25169, -24356, -23651, -23196, -22701, -21651, -19892, -17834, -16032, -14731, -13823, -13084, -12376, -11694, -11014, -10121, -8699, -6680, -4399, -2282, -489, 1041, 2290, 3105, 3447, 3580, 3955, 4924, 6504, 8404, 10310, 12088, 13639, 14686, 14957, 14574, 14002, 13597, 13422, 13508, 13973, 14775, 15659, 16459, 17193, 17748, 17800, 17249, 16398, 15520, 14566, 13554, 13592, 13050, 12852, 12941, 13171, 13337, 13226, 12682, 11654, 10228, 8618, 7116, 6015, 5521, 5677, 6347, 7242, 8007, 8324, 8011, 7067, 5666, 4090, 2642, 1563, 977, 892, 1223, 1830, 2559, 3253, 3766, 3970, 3782, 3195, 2303, 1304, 463, 39, 197, 943, 2111, 3401, 4467, 5024, 4923, 4190, 3008, 1661, 461, -318, -497, -25, 999, 2329, 3617, 4478, 4604, 3870, 2408, 598, -1030, -1970, -1924, -931, 633, 2179, 3121, 3094, 2088, 435, -1335, -2716, -3418, -3457, -3105, -2733, -2635, -2904, -3435, -4015, -4473, -4785, -5084, -5572, -6377, -7435, -8468, -9081, -8939, -7942, -6315, -4555, -3259, -2885, -3559, -5008, -6645, -7785, -7897, -6811, -4776, -2374, -305, 858, 871, -109, -1586, -2909, -3494, -3009, -1465, 822, 3359, 5662, 7407, 8511, 9113, 9474, 9849, 10388, 11102, 11903, 12690, 13430, 14187, 15088, 16230, 17589, 18979, 20092, 20612, 20363, 19412, 18080, 16841, 16147, 16248, 17082, 18289, 19345, 19766, 19293, 17984, 16181, 14365, 12970, 12217, 12055, 12208, 12305, 12035, 11256, 10031, 8568, 7122, 5887, 4934, 4213, 3602, 2976, 2263, 1461, 612, -243, -1107, -2037, -3128, -4458, -6041, -7800, -9576, -11184, -12478, -13415, -14074, -14636, -15316, -16275, -17558, -19070, -20617, -21977, -22995, -23645, -24035, -24364, -24834, -25559, -26524, -27585, -28536, -29190, -29455, -29361, -29038, -28648, -28318, -28088, -27914, -27706, -27378, -26903, -26317, -25698, -25113, -24578, -24032, -23362, -22449, -21227, -19716, -18035, -16362, -14880, -13713, -12880, -12292, -11767, -11091, -10075, -8618, -6738, -4575, -2357, -341, 1261, 2345, 2953, 3263, 3543, 4066, 5028, 6485, 8331, 10332, 12195, 13651, 14535, 14822, 14627, 14163, 13680, 13399, 13461, 13908, 14677, 15628, 16573, 17326, 17733, 17709, 17252, 16447, 15445, 14433, 13592, 15227, 12865, 10052, 8071, 6856, 5352, 3402, 2076, 1975, 2381, 2492, 2389, 2344, 2146, 1678, 1276, 1002, 320, -1062, -2781, -4496, -6101, -7063, -6640, -5135, -3795, -2935, -1303, 2083, 6536, 10799, 14412, 17254, 18787, 18734, 17655, 16006, 13464, 9944, 6320, 3172, -292, -4987, -10358, -15160, -19180, -22991, -26425, -28519, -28840, -27828, -25837, -22722, -18478, -13576, -8480, -3276, 2019, 7040, 11116, 13768, 15173, 15925, 16151, 15227, 14782, 12963, 10729, 8398, 6277, 4592, 3434, 2756, 2418, 2267, 2190, 2146, 2128, 2115, 2028, 1730, 1081, 9, -1426, -3035, -4550, -5715, -6354, -6398, -5846, -4705, -2940, -489, 2663, 6397, 10390, 14149, 17115, 18834, 19095, 17988, 15834, 13044, 9944, 6671, 3169, -711, -5073, -9854, -14794, -19489, -23503, -26483, -28222, -28660, -27831, -25816, -22712, -18647, -13809, -8472, -2987, 2269, 6950, 10795, 13645, 15436, 16174, 15916, 14782, 15038, 13279, 11093, 8748, 6497, 4551, 3058, 2093, 1649, 1648, 1954, 2392, 2778, 2946, 2764, 2164, 1140, -239, -1846, -3504, -5011, -6166, -6786, -6736, -5939, -4390, -2154, 638, 3800, 7111, 10331, 13223, 15572, 17195, 17959, 17781, 16634, 14544, 11584, 7872, 3562, -1164, -6100, -11025, -15711, -19931, -23468, -26128, -27750, -28221, -27486, -25556, -22516, -18521, -13793, -8607, -3272, 1892, 6580, 10526, 13529, 15467, 16310, 16119, 15038, 14305, 15362, 15847, 15759, 15119, 13968, 12368, 10395, 8140, 5703, 3189, 706, -1641, -3754, -5546, -6945, -7892, -8351, -8306, -7760, -6740, -5290, -3473, -1370, 929, 3323, 5706, 7973, 10020, 11753, 13087, 13955, 14305, 14105, 13345, 12036, 10210, 7922, 5242, 2259, -929, -4212, -7475, -10605, -13490, -16028, -18126, -19709, -20718, -21115, -20885, -20034, -18589, -16601, -14137, -11284, -8140, -4814, -1420, 1926, 5111, 8029, 10585, 12698, 14305, 9521, 8987, 8744, 8486, 7830, 6818, 5650, 4165, 2109, -207, -2108, -3417, -4579, -5843, -6836, -7184, -7121, -7183, -7592, -8254, -9114, -10133, -11029, -11413, -11242, -10841, -10384, -9573, -8027, -5899, -3859, -2424, -1469, -533, 489, 1241, 1467, 1430, 1608, 2192, 3082, 4189, 5423, 6457, 6835, 6432, 5586, 4701, 3942, 3402, 3278, 3666, 4373, 5204, 6273, 7765, 9445, 10779, 11550, 12043, 12518, 12872, 13046, 13427, 14464, 15993, 17310, 17895, 17762, 17119, 16038, 14549, 12790, 10905, 8957, 7024, 5201, 3471, 1753, 99, -1396, -2872, -4564, -6341, -7763, -8705, -9499, -10259, -10539, -9987, -8918, -7836, -6779, -5621, -4694, -4496, -4930, -5405, -5612, -5685, -5669, -5441, -5182, -5366, -6161, -7267, -8464, -9844, -11396, -12781, -13682, -14008, -13660, -12525, -10842, -9138, -7618, -6004, -4151, -2359, -833, 734, 2693, 4910, 7076, 9243, 11647, 14188, 16477, 18326, 19822, 20971, 21571, 21492, 20898, 20111, 19351, 18627, 17850, 17050, 16406, 15945, 15338, 14233, 12775, 11510, 10712, 10091, 9277, 8332, 7622, 7382, 7550, 7871, 8088, 8151, 8303, 8766, 9355, 9643, 9506, 9197, 8845, 8262, 7342, 6284, 5211, 3919, 2251, 390, -1460, -3421, -5683, -8136, -10536, -12834, -15069, -17117, -18816, -20203, -21384, -22303, -22878, -23242, -23629, -24130, -24753, -25534, -26369, -26914, -26890, -26413, -25789, -25125, -24354, -23521, -22794, -22267, -21960, -21927, -22161, -22471, -22626, -22561, -22281, -21711, -20855, -19974, -19327, -18782, -17950, -16697, -15313, -14141, -13201, -12219, -10908, -9186, -7207, -5168, -3092, -843, 1578, 3898, 5842, 7431, 8880, 10264, 11443, 12294, 12915, 13565, 14437, 15476, 16424, 17075, 17446, 17596, 17388, 16636, 15473, 14312, 13432, 12832, 12487, 12471, 12728, 13011, 13181, 13295, 13301, 12961, 12232, 11432, 10795, 10195, 9521, 9549, 9157, 8813, 8397, 7782, 6864, 5592, 3979, 2106, 110, -1844, -3588, -4992, -5987, -6592, -6906, -7087, -7308, -7704, -8331, -9150, -10037, -10823, -11340, -11464, -11136, -10361, -9196, -7727, -6063, -4329, -2664, -1213, -92, 641, 1022, 1183, 1324, 1646, 2279, 3230, 4364, 5453, 6250, 6573, 6374, 5743, 4882, 4038, 3434, 3222, 3468, 4160, 5224, 6547, 7986, 9384, 10592, 11506, 12100, 12450, 12718, 13097, 13742, 14691, 15834, 16934, 17701, 17889, 17381, 16217, 14569, 12667, 10715, 8834, 7048, 5320, 3600, 1865, 135, -1549, -3151, -4665, -6103, -7465, -8706, -9716, -10345, -10458, -10002, -9050, -7800, -6528, -5500, -4890, -4732, -4919, -5259, -5555, -5677, -5608, -5444, -5351, -5512, -6061, -7042, -8395, -9963, -11524, -12834, -13678, -13914, -13497, -12489, -11037, -9327, -7536, -5785, -4119, -2510, -884, 841, 2725, 4790, 7017, 9362, 11759, 14125, 16356, 18330, 19912, 20990, 21499, 21456, 20966, 20193, 19321, 18496, 17787, 17177, 16585, 15910, 15082, 14088, 12975, 11829, 10742, 9784, 8991, 8372, 7923, 7642, 7531, 7594, 7816, 8164, 8575, 8976, 9292, 9464, 9454, 9246, 8836, 8222, 7408, 6396, 5189, 3796, 2223, 478, -1433, -3506, -5728, -8065, -10461, -12835, -15091, -17131, -18879, -20292, -21372, -22165, -22753, -23237, -23715, -24258, -24885, -25560, -26188, -26646, -26814, -26618, -26059, -25222, -24259, -23344, -22628, -22198, -22057, -22132, -22309, -22469, -22517, -22402, -22111, -21653, -21048, -20317, -19477, -18552, -17565, -16545, -15506, -14444, -13327, -12104, -10716, -9117, -7289, -5249, -3047, -756, 1535, 3738, 5769, 7562, 9077, 10311, 11303, 12130, 12891, 13675, 14531, 15448, 16344, 17092, 17552, 17618, 17254, 16511, 15519, 14455, 13502, 12807, 12449, 12421, 12644, 12982, 13283, 13410, 13280, 12873, 12243, 11489, 10731, 10068, 9549, 10671, 7011, 1597, -3694, -7658, -10036, -10263, -7563, -2661, 1979, 4362, 4683, 4543, 5417, 8083, 12260, 16053, 16721, 12891, 5759, -1968, -7644, -9507, -7652, -4757, -4390, -7524, -11384, -12257, -8587, -1181, 7984, 16180, 20599, 20207, 16607, 12394, 9236, 7842, 8295, 9232, 7834, 2248, -6290, -14708, -20928, -24608, -25937, -25251, -23596, -22267, -21406, -19773, -16087, -10139, -2711, 4944, 11413, 15465, 16589, 15411, 13522, 12397, 11998, 10671, 10721, 7555, 2346, -3790, -8901, -11191, -10000, -6168, -1569, 1930, 3482, 3647, 3918, 5685, 9233, 13412, 16185, 15762, 11664, 5088, -1664, -6379, -8076, -7424, -6217, -6179, -7832, -10087, -10830, -8182, -1720, 7064, 15368, 20437, 20936, 17579, 12667, 8787, 7400, 8099, 8926, 7560, 2680, -5248, -14187, -21597, -25725, -26390, -24857, -22912, -21730, -21189, -20046, -16810, -10795, -2694, 5656, 12185, 15630, 16096, 14829, 13349, 12506, 12006, 10721, 8711, 4655, 578, -3084, -5947, -7720, -8235, -7463, -5516, -2635, 838, 4501, 7936, 10754, 12638, 13376, 12884, 11211, 8531, 5123, 1339, -2434, -5817, -8475, -10149, -10679, -10016, -8225, -5466, -1986, 1915, 5908, 9660, 12868, 15271, 16672, 16942, 16033, 13968, 10844, 6822, 2118, -3006, -8259, -13330, -17908, -21700, -24447, -25945, -26061, -24752, -22071, -18171, -13303, -7798, -2046, 3532, 8523, 12557, 15342, 16696, 16565, 15029, 12303, 8711, 7858, 8594, 9014, 9117, 8911, 8420, 7675, 6716, 5592, 4358, 3070, 1786, 563, -545, -1492, -2237, -2750, -3010, -3008, -2746, -2238, -1508, -590, 473, 1631, 2831, 4015, 5127, 6111, 6916, 7498, 7821, 7858, 7593, 7021, 6151, 5002, 3604, 1999, 235, -1631, -3539, -5424, -7224, -8875, -10321, -11512, -12404, -12966, -13177, -13027, -12522, -11676, -10517, -9084, -7424, -5592, -3650, -1661, 311, 2201, 3950, 5505, 6820, 7858, 9394, 8108, 7003, 5694, 3799, 1493, -814, -3084, -5429, -7469, -8568, -8744, -8752, -9128, -9653, -9967, -10208, -10721, -11468, -12115, -12489, -12599, -12343, -11614, -10685, -10143, -10257, -10610, -10540, -9869, -8985, -8206, -7315, -5906, -4076, -2478, -1625, -1375, -1218, -819, -73, 1150, 2933, 5001, 6827, 8142, 9112, 9964, 10704, 11330, 12021, 12914, 13880, 14792, 15846, 17278, 18840, 19936, 20296, 20187, 19861, 19198, 18138, 17112, 16630, 16560, 16211, 15110, 13370, 11311, 9084, 6754, 4447, 2243, 107, -1983, -3999, -5977, -7967, -9826, -11352, -12613, -13830, -14896, -15434, -15442, -15406, -15543, -15417, -14620, -13405, -12199, -10929, -9372, -7845, -6888, -6447, -5962, -5183, -4313, -3437, -2421, -1419, -873, -882, -1061, -1135, -1214, -1343, -1260, -749, 164, 1492, 3304, 5354, 7134, 8516, 9894, 11499, 13044, 14289, 15502, 16973, 18474, 19615, 20433, 21210, 21904, 22187, 21945, 21351, 20466, 19101, 17124, 14696, 12132, 9629, 7148, 4550, 1835, -814, -3343, -6038, -9182, -12504, -15319, -17266, -18650, -19918, -21105, -21934, -22250, -22166, -21925, -21703, -21396, -20580, -18888, -16463, -13802, -11162, -8451, -5713, -3294, -1370, 294, 1921, 3420, 4725, 6077, 7651, 9188, 10302, 10919, 11151, 10979, 10381, 9583, 8887, 8369, 7978, 7765, 7740, 7653, 7159, 6121, 4575, 2603, 479, -1271, -2253, -2584, -2675, -2779, -2969, -3383, -4198, -5408, -6848, -8374, -9825, -10946, -11574, -11838, -12006, -12246, -12718, -13711, -15363, -17281, -18760, -19424, -19471, -19315, -19158, -18969, -18691, -18401, -18274, -18383, -18484, -18120, -17016, -15302, -13260, -11002, -8530, -6014, -3804, -2118, -812, 532, 2306, 4612, 7249, 9967, 12648, 15157, 17146, 18265, 18584, 18557, 18558, 18671, 18932, 19428, 20051, 20461, 20434, 20003, 19149, 17715, 15794, 13854, 12234, 10809, 9394, 9426, 8292, 7079, 5598, 3746, 1540, -878, -3283, -5430, -7128, -8284, -8929, -9196, -9284, -9391, -9667, -10170, -10854, -11588, -12198, -12529, -12496, -12122, -11536, -10922, -10457, -10231, -10205, -10219, -10047, -9490, -8463, -7039, -5430, -3912, -2714, -1932, -1492, -1177, -723, 88, 1340, 2964, 4775, 6543, 8078, 9281, 10161, 10811, 11364, 11958, 12698, 13648, 14814, 16143, 17519, 18777, 19735, 20245, 20244, 19787, 19034, 18196, 17453, 16874, 16387, 15805, 14899, 13506, 11594, 9279, 6777, 4314, 2037, -28, -1958, -3869, -5837, -7845, -9788, -11518, -12914, -13939, -14640, -15114, -15441, -15637, -15637, -15333, -14638, -13546, -12159, -10658, -9242, -8056, -7143, -6437, -5807, -5120, -4303, -3372, -2425, -1602, -1030, -775, -819, -1061, -1342, -1481, -1317, -745, 266, 1667, 3343, 5145, 6931, 8604, 10129, 11534, 12882, 14234, 15616, 17007, 18345, 19552, 20561, 21330, 21837, 22057, 21948, 21447, 20485, 19024, 17087, 14769, 12220, 9596, 7007, 4483, 1971, -623, -3380, -6312, -9337, -12290, -14977, -17235, -18980, -20225, -21061, -21609, -21970, -22186, -22225, -21996, -21383, -20287, -18661, -16529, -13994, -11219, -8399, -5724, -3336, -1297, 416, 1899, 3287, 4693, 6170, 7679, 9097, 10256, 10997, 11232, 10977, 10356, 9566, 8818, 8274, 7993, 7915, 7875, 7657, 7063, 5981, 4433, 2578, 677, -981, -2172, -2807, -2968, -2885, -2866, -3190, -4018, -5333, -6953, -8598, -9987, -10944, -11454, -11664, -11822, -12186, -12929, -14082, -15526, -17032, -18345, -19258, -19678, -19641, -19296, -18847, -18485, -18324, -18360, -18468, -18436, -18029, -17064, -15474, -13337, -10860, -8316, -5963, -3955, -2296, -840, 649, 2408, 4583, 7166, 9986, 12760, 15179, 17002, 18131, 18634, 18712, 18634, 18645, 18890, 19372, 19959, 20429, 20544, 20129, 19127, 17622, 15803, 13914, 12165, 10673, 9426, 10128, 2547, -4559, -9125, -11023, -11595, -11481, -10019, -6847, -2771, 1390, 5719, 10396, 14831, 18087, 19378, 17836, 12754, 4716, -4134, -11343, -15231, -15020, -11217, -6173, -2802, -1809, -993, 2140, 7843, 14455, 19854, 21878, 18695, 10229, -1155, -12109, -19961, -22819, -19625, -11432, -1778, 5636, 9467, 10355, 8973, 5672, 1429, -2413, -5507, -8622, -12286, -15982, -18695, -19550, -17818, -12978, -5279, 3857, 12231, 17931, 20229, 19459, 16042, 10128, 9882, 2891, -3779, -8968, -11956, -12619, -11382, -8963, -6008, -2803, 778, 5017, 9937, 14957, 18869, 20221, 17972, 12108, 3856, -4658, -11201, -14322, -13887, -11002, -7334, -4212, -1963, 127, 3217, 7986, 13910, 19185, 21405, 18709, 10827, -519, -12107, -20420, -23032, -19526, -11569, -2123, 5794, 10228, 10804, 8494, 4851, 1164, -2059, -5056, -8356, -12189, -16126, -19133, -19981, -17795, -12473, -4782, 3862, 11812, 17615, 20325, 19633, 15867, 9882, 12679, 6829, 173, -6293, -11600, -14951, -15840, -14124, -10048, -4206, 2547, 9222, 14842, 18588, 19920, 18654, 14989, 9476, 2933, -3679, -9398, -13404, -15141, -14396, -11326, -6433, -483, 5613, 10936, 14701, 16366, 15721, 12904, 8383, 2873, -2776, -7713, -11218, -12815, -12344, -9980, -6206, -1731, 2622, 6052, 7908, 7796, 5643, 1721, -3403, -8941, -14010, -17771, -19555, -18976, -15997, -10939, -4441, 2629, 9302, 14651, 17931, 18691, 16843, 12679, 2218, 2602, 2895, 3095, 3203, 3223, 3164, 3034, 2848, 2618, 2359, 2087, 1817, 1563, 1339, 1154, 1018, 936, 911, 942, 1026, 1157, 1326, 1521, 1729, 1938, 2131, 2293, 2412, 2473, 2467, 2384, 2218, 1968, 1632, 1216, 725, 172, -433, -1072, -1729, -2386, -3023, -3622, -4163, -4631, -5010, -5288, -5455, -5506, -5438, -5252, -4954, -4552, -4057, -3483, -2848, -2169, -1466, -758, -65, 594, 1204, 1749, 2218, -1079, -1110, -661, -230, -218, -308, -69, 220, 29, -337, 45, 1288, 2374, 2651, 2860, 4039, 5973, 7534, 8200, 8399, 8536, 8554, 8527, 8855, 9530, 9886, 9503, 8904, 8890, 9486, 10049, 10236, 10400, 10988, 11900, 12599, 12701, 12353, 12056, 12200, 12806, 13659, 14557, 15318, 15729, 15686, 15351, 14980, 14684, 14524, 14672, 15162, 15620, 15673, 15590, 16017, 17045, 18075, 18730, 19278, 19882, 20093, 19615, 19060, 19271, 20166, 20893, 20963, 20643, 20340, 20175, 20174, 20344, 20493, 20369, 19971, 19403, 18557, 17377, 16272, 15680, 15337, 14633, 13656, 13090, 13012, 12641, 11605, 10619, 10436, 10842, 11235, 11560, 11960, 12046, 11331, 10105, 9106, 8536, 8082, 7731, 7764, 7970, 7647, 6542, 5153, 3903, 2611, 1045, -456, -1265, -1088, -92, 1301, 2569, 3320, 3608, 3813, 4089, 4188, 3991, 3870, 4229, 4878, 5265, 5225, 5161, 5402, 5708, 5625, 5153, 4706, 4447, 4036, 3252, 2498, 2226, 2093, 1333, -23, -1031, -1228, -1458, -2729, -4776, -6450, -7226, -7563, -7945, -8367, -8785, -9361, -10029, -10418, -10429, -10425, -10651, -10888, -10891, -10777, -10770, -10897, -11102, -11352, -11501, -11399, -11267, -11583, -12450, -13433, -14149, -14657, -15097, -15369, -15387, -15307, -15277, -15296, -15441, -15860, -16393, -16653, -16663, -16951, -17774, -18777, -19679, -20699, -21884, -22637, -22499, -21967, -21875, -22281, -22589, -22526, -22349, -22273, -22300, -22515, -22970, -23351, -23258, -22733, -22052, -21197, -20079, -19085, -18681, -18579, -18037, -17005, -16199, -15928, -15629, -14862, -14027, -13687, -13762, -13850, -13838, -13706, -13190, -12152, -10975, -10094, -9388, -8547, -7758, -7460, -7515, -7226, -6215, -4805, -3414, -2017, -445, 1083, 2032, 2058, 1296, 219, -680, -1149, -1260, -1231, -1156, -941, -548, -199, -190, -500, -753, -694, -556, -721, -1079, -814, -671, -546, -456, -386, -304, -190, -46, 117, 296, 529, 890, 1470, 2329, 3455, 4744, 6026, 7119, 7902, 8357, 8568, 8675, 8804, 9008, 9249, 9438, 9494, 9412, 9284, 9260, 9479, 9990, 10715, 11474, 12064, 12354, 12356, 12217, 12158, 12369, 12917, 13716, 14565, 15239, 15587, 15588, 15348, 15035, 14803, 14729, 14805, 14978, 15201, 15477, 15858, 16399, 17111, 17925, 18707, 19311, 19650, 19737, 19683, 19642, 19731, 19977, 20308, 20595, 20728, 20676, 20500, 20314, 20209, 20193, 20169, 19981, 19494, 18670, 17604, 16486, 15518, 14818, 14368, 14028, 13618, 13016, 12235, 11423, 10801, 10553, 10728, 11203, 11722, 12002, 11846, 11224, 10278, 9263, 8435, 7948, 7801, 7840, 7821, 7505, 6737, 5499, 3916, 2222, 697, -403, -903, -754, -45, 1023, 2186, 3190, 3861, 4152, 4141, 3994, 3894, 3968, 4247, 4662, 5090, 5412, 5563, 5551, 5432, 5269, 5086, 4860, 4533, 4063, 3450, 2754, 2065, 1456, 934, 428, -181, -1007, -2094, -3383, -4731, -5962, -6946, -7643, -8115, -8484, -8868, -9321, -9815, -10265, -10580, -10719, -10715, -10660, -10650, -10742, -10921, -11114, -11240, -11264, -11224, -11226, -11398, -11821, -12490, -13303, -14104, -14741, -15131, -15286, -15292, -15268, -15306, -15441, -15650, -15885, -16117, -16365, -16695, -17186, -17888, -18788, -19796, -20778, -21596, -22158, -22441, -22492, -22403, -22270, -22173, -22154, -22227, -22382, -22596, -22829, -23023, -23106, -22999, -22646, -22040, -21231, -20324, -19444, -18688, -18093, -17621, -17182, -16680, -16065, -15365, -14677, -14126, -13807, -13726, -13788, -13825, -13653, -13148, -12297, -11206, -10064, -9068, -8353, -7936, -7712, -7488, -7049, -6240, -5013, -3452, -1754, -175, 1034, 1698, 1762, 1304, 514, -360, -1078, -1478, -1508, -1239, -821, -430, -203, -193, -362, -613, -832, -943, -925, -814, -425, -441, -163, 1952, 5622, 8586, 9452, 9398, 10304, 12256, 13907, 14569, 14877, 15691, 17177, 18899, 20252, 20781, 20311, 18792, 16251, 13293, 11241, 10816, 10732, 8822, 4920, 1496, 827, 2507, 4435, 5318, 5224, 4361, 2468, -624, -4455, -7998, -10162, -10669, -10577, -11319, -13028, -14543, -15311, -16279, -18336, -20829, -22469, -22931, -22637, -21547, -19333, -16518, -14319, -13092, -11689, -8778, -4583, -939, 472, -137, -989, -892, -425, -811, -548, 516, 2365, 4735, 7201, 9335, 10860, 11746, 12216, 12642, 13388, 14638, 16316, 18104, 19567, 20333, 20230, 19338, 17917, 16270, 14590, 12901, 11098, 9077, 6880, 4759, 3114, 2316, 2504, 3449, 4576, 5154, 4572, 2592, -537, -4172, -7525, -9974, -11292, -11705, -11765, -12090, -13107, -14888, -17159, -19438, -21244, -22268, -22443, -21898, -20838, -19421, -17695, -15620, -13149, -10325, -7339, -4511, -2199, -679, -35, -105, -521, -811, 1623, 2176, 2718, 3348, 4149, 5184, 6482, 8035, 9798, 11694, 13619, 15455, 17080, 18386, 19285, 19719, 19668, 19150, 18214, 16941, 15429, 13783, 12107, 10489, 8999, 7680, 6546, 5587, 4770, 4046, 3355, 2639, 1841, 916, -170, -1433, -2877, -4490, -6248, -8118, -10057, -12016, -13939, -15768, -17440, -18892, -20061, -20888, -21324, -21331, -20889, -20000, -18689, -17006, -15024, -12837, -10548, -8268, -6099, -4130, -2423, -1012, 105, 961, 1623, 1280, 3005, 4664, 6240, 7720, 9094, 10351, 11486, 12494, 13373, 14121, 14738, 15226, 15588, 15824, 15938, 15934, 15813, 15577, 15229, 14770, 14202, 13525, 12740, 11849, 10854, 9755, 8557, 7264, 5882, 4417, 2880, 1280, -369, -2052, -3753, -5454, -7135, -8776, -10354, -11849, -13240, -14504, -15624, -16580, -17357, -17942, -18323, -18494, -18449, -18189, -17716, -17036, -16160, -15100, -13872, -12494, -10987, -9372, -7672, -5910, -4112, -2299, -495, 1280, -5537, -6283, -6929, -7809, -9283, -10933, -12082, -12739, -13208, -13037, -11356, -8265, -4965, -2304, 18, 2481, 4740, 6110, 6523, 6439, 6174, 5877, 5946, 6817, 8283, 9540, 10122, 10487, 11362, 12696, 13615, 13472, 12611, 11825, 11230, 10124, 7992, 5242, 2744, 983, 4, -147, 503, 1407, 1680, 886, -691, -2634, -4833, -7168, -9203, -10553, -11250, -11348, -10466, -8250, -5186, -2387, -495, 694, 1438, 1531, 991, 702, 1723, 4090, 6877, 9347, 11519, 13609, 15508, 16988, 18003, 18560, 18617, 18245, 17631, 16830, 15816, 14772, 13911, 13002, 11601, 9830, 8301, 7100, 5570, 3447, 1434, 121, -957, -2532, -4497, -6414, -8563, -11478, -14727, -17129, -18095, -17908, -16847, -15008, -13019, -11949, -12229, -13365, -14832, -16521, -18112, -18803, -17955, -15481, -11456, -6062, -112, 5142, 9105, 12144, 14577, 16108, 16659, 16998, 17902, 19250, 20538, 21808, 23399, 25118, 26357, 26889, 26986, 26768, 25954, 24302, 21963, 19286, 16435, 13264, 9572, 5495, 1547, -1909, -5079, -8278, -11134, -12809, -13117, -12963, -13446, -14887, -16934, -19218, -21613, -24096, -26533, -28441, -28972, -27525, -24425, -20627, -16741, -12803, -8998, -5906, -3787, -2230, -827, 339, 1234, 2305, 3924, 5810, 7498, 8985, 10498, 11971, 13224, 14367, 15563, 16620, 17214, 17289, 16865, 15692, 13475, 10281, 6421, 2215, -1827, -4894, -6467, -6858, -6850, -6966, -7418, -8484, -10469, -13358, -16853, -20630, -24285, -27214, -28920, -29370, -28801, -27404, -25502, -23766, -22743, -22211, -21430, -20054, -18471, -17222, -16376, -15561, -14381, -12743, -10862, -8951, -6871, -4215, -856, 2778, 6131, 9030, 11558, 13581, 14686, 14635, 13714, 12622, 12028, 12182, 12909, 13979, 15348, 16884, 18016, 18058, 16889, 14954, 12624, 9944, 7053, 4344, 2033, 13, -1698, -2838, -3430, -3916, -4501, -4871, -4882, -4981, -5537, -5489, -5998, -6811, -7957, -9365, -10859, -12182, -13048, -13209, -12507, -10915, -8552, -5655, -2546, 425, 2946, 4799, 5903, 6336, 6309, 6113, 6038, 6289, 6938, 7914, 9051, 10163, 11115, 11860, 12420, 12831, 13073, 13040, 12563, 11485, 9759, 7514, 5061, 2807, 1133, 255, 148, 551, 1057, 1240, 787, -428, -2327, -4668, -7115, -9301, -10888, -11609, -11314, -10007, -7877, -5285, -2700, -575, 783, 1324, 1277, 1081, 1230, 2101, 3822, 6246, 9020, 11731, 14049, 15810, 17024, 17795, 18239, 18408, 18285, 17832, 17048, 16005, 14830, 13653, 12534, 11432, 10228, 8799, 7101, 5210, 3301, 1564, 94, -1176, -2469, -4076, -6211, -8891, -11873, -14710, -16888, -17998, -17892, -16745, -15013, -13303, -12192, -12063, -12990, -14717, -16719, -18326, -18892, -17948, -15323, -11184, -6003, -437, 4827, 9241, 12509, 14631, 15857, 16573, 17175, 17955, 19049, 20440, 22007, 23585, 25014, 26155, 26894, 27135, 26798, 25835, 24244, 22077, 19423, 16384, 13046, 9468, 5706, 1844, -1966, -5505, -8518, -10801, -12278, -13068, -13477, -13923, -14818, -16430, -18784, -21645, -24561, -26988, -28421, -28518, -27173, -24528, -20925, -16830, -12723, -9015, -5970, -3674, -2042, -862, 133, 1185, 2450, 3968, 5669, 7426, 9105, 10623, 11968, 13186, 14341, 15455, 16472, 17238, 17522, 17075, 15700, 13327, 10064, 6201, 2175, -1519, -4445, -6341, -7204, -7305, -7131, -7258, -8184, -10188, -13242, -17016, -20976, -24536, -27210, -28734, -29100, -28515, -27310, -25830, -24342, -22996, -21825, -20785, -19797, -18793, -17729, -16590, -15371, -14061, -12624, -10996, -9084, -6796, -4073, -930, 2510, 6011, 9250, 11889, 13660, 14452, 14359, 13671, 12805, 12186, 12137, 12780, 14009, 15523, 16918, 17792, 17850, 16966, 15195, 12743, 9903, 6987, 4257, 1890, -35, -1526, -2643, -3464, -4061, -4485, -4779, -4990, -5192, -5489, -7379, -9328, -10412, -6570, 1815, 8309, 9758, 9964, 11129, 9478, 3160, -3148, -5691, -6460, -6668, -2959, 5463, 13116, 16008, 16269, 15329, 10193, 680, -7460, -11196, -14260, -18059, -16790, -6973, 5877, 15491, 22212, 26833, 25151, 15074, 2175, -7964, -16281, -23590, -24921, -17197, -5971, 2177, 7953, 13792, 16305, 11408, 1859, -6997, -14529, -21927, -26561, -25290, -19687, -12908, -5007, 4301, 12134, 15791, 15945, 13558, 7958, 480, -4968, -7379, -8588, -10061, -8734, -4979, 301, 5832, 10233, 12352, 11589, 8124, 2929, -2469, -6419, -7654, -5684, -958, 5280, 11361, 15655, 16991, 14901, 9688, 2324, -5738, -12811, -17260, -17827, -13962, -6090, 4309, 14905, 23036, 26430, 23908, 15838, 4119, -8319, -18357, -23592, -23005, -17173, -7992, 1945, 10098, 14598, 14596, 10301, 2793, -6302, -15151, -22035, -25625, -25209, -20841, -13352, -4215, 4766, 11860, 15810, 16103, 13047, 7639, 1284, -4541, -8588, 6172, 4014, 1534, -879, -2851, -4077, -4361, -3648, -2030, 268, 2920, 5548, 7779, 9293, 9877, 9451, 8079, 5959, 3393, 744, -1620, -3380, -4307, -4298, -3388, -1740, 379, 2641, 4706, 6273, 7120, 7139, 6344, 4869, 2937, 827, -1173, -2812, -3918, -4417, -4346, -3843, -3121, -2429, -2007, -2042, -2638, -3787, -5372, -7179, -8931, -10325, -11088, -11015, -10011, -8105, -5460, -2347, 889, 3872, 6254, 7761, 8237, 7665, 6172, 2452, 2931, 3310, 3584, 3755, 3827, 3809, 3710, 3544, 3327, 3073, 2801, 2526, 2264, 2030, 1834, 1686, 1593, 1557, 1578, 1652, 1773, 1931, 2114, 2308, 2498, 2667, 2799, 2881, 2897, 2837, 2690, 2452, 2120, 1695, 1181, 587, -74, -790, -1541, -2308, -3071, -3808, -4498, -5120, -5656, -6088, -6403, -6591, -6644, -6561, -6343, -5995, -5526, -4950, -4284, -3544, -2753, -1932, -1102, -287, 494, 1222, 1879, 2452, 20063, 19257, 18201, 16590, 14041, 10975, 8042, 5100, 1703, -1676, -3980, -5106, -6082, -7500, -8695, -8910, -8466, -8238, -8555, -9230, -10229, -11604, -12969, -13710, -13774, -13684, -13578, -12655, -9963, -5603, -773, 3464, 7099, 10649, 13962, 16092, 16423, 15475, 14343, 13709, 13753, 14619, 16330, 18297, 19527, 19514, 18541, 17020, 14990, 12470, 9803, 7258, 4663, 1874, -667, -2427, -3689, -5337, -7686, -10127, -12094, -13687, -14946, -15111, -13361, -10067, -6642, -4175, -2740, -1990, -1770, -1931, -2079, -1806, -892, 833, 3468, 6788, 10359, 13931, 17325, 19959, 21156, 21022, 20344, 19417, 17758, 15321, 13103, 11915, 11308, 10459, 9410, 8514, 7277, 4896, 1647, -1327, -3482, -5168, -6627, -7800, -9136, -11529, -15161, -19213, -22920, -26083, -28384, -29063, -27615, -24183, -19074, -12670, -5981, -422, 3408, 6052, 8035, 9207, 9639, 10299, 12095, 14859, 17915, 21140, 24708, 28194, 30737, 31958, 32112, 31365, 29511, 26438, 22500, 18265, 14055, 9792, 5272, 605, -3715, -7385, -10730, -14160, -17276, -19106, -19368, -18976, -19065, -19930, -21155, -22353, -23449, -24507, -25473, -25877, -24820, -21640, -16686, -11005, -5269, 463, 5932, 10404, 13489, 15553, 16981, 17651, 17534, 17181, 17070, 16960, 16384, 15371, 14196, 12801, 11016, 9030, 7130, 5239, 3141, 901, -1378, -3966, -7257, -11301, -15895, -20808, -25527, -29113, -30846, -30863, -29797, -28027, -25668, -23047, -20655, -18749, -17334, -16392, -15759, -14941, -13446, -11190, -8320, -4907, -1194, 2134, 4463, 5987, 7456, 9180, 10676, 11322, 11045, 10263, 9404, 8533, 7353, 5575, 3351, 1203, -557, -2145, -3860, -5567, -6897, -7844, -8854, -10326, -12173, -13897, -14995, -15330, -15105, -14444, -13159, -11127, -8751, -6659, -4987, -3367, -1619, 30, 1471, 2943, 4570, 6198, 7864, 9894, 12279, 14501, 16270, 17854, 19346, 20214, 20063, 20013, 19474, 18237, 16339, 13878, 11001, 7890, 4729, 1692, -1079, -3470, -5397, -6817, -7730, -8197, -8347, -8357, -8425, -8718, -9326, -10243, -11365, -12521, -13505, -14113, -14156, -13463, -11892, -9357, -5880, -1640, 3002, 7538, 11413, 14173, 15603, 15808, 15195, 14339, 13804, 13959, 14870, 16300, 17815, 18939, 19303, 18736, 17271, 15094, 12465, 9644, 6850, 4240, 1903, -153, -2001, -3781, -5656, -7733, -9974, -12157, -13900, -14770, -14447, -12872, -10311, -7307, -4516, -2490, -1493, -1426, -1882, -2297, -2152, -1119, 873, 3673, 6994, 10514, 13924, 16949, 19337, 20859, 21355, 20791, 19317, 17266, 15080, 13181, 11824, 11006, 10473, 9828, 8695, 6876, 4432, 1657, -1051, -3356, -5124, -6480, -7765, -9403, -11740, -14897, -18697, -22674, -26168, -28474, -29011, -27465, -23882, -18673, -12538, -6311, -769, 3542, 6426, 8054, 8880, 9493, 10442, 12092, 14558, 17713, 21252, 24787, 27932, 30353, 31799, 32112, 31236, 29225, 26237, 22510, 18322, 13926, 9499, 5130, 837, -3365, -7411, -11147, -14354, -16816, -18417, -19213, -19448, -19497, -19751, -20485, -21755, -23362, -24897, -25845, -25721, -24187, -21137, -16714, -11279, -5339, 550, 5882, 10278, 13544, 15681, 16855, 17330, 17390, 17253, 17031, 16716, 16218, 15425, 14262, 12731, 10917, 8955, 6974, 5047, 3149, 1154, -1138, -3936, -7383, -11483, -16058, -20746, -25055, -28464, -30546, -31086, -30147, -28064, -25358, -22596, -20238, -18523, -17424, -16691, -15954, -14859, -13171, -10834, -7960, -4777, -1550, 1484, 4159, 6385, 8133, 9417, 10263, 10702, 10751, 10421, 9711, 8620, 7165, 5398, 3416, 1355, -635, -2431, -3974, -5293, -6495, -7717, -9069, -10577, -12157, -13622, -14741, -15301, -15171, -14336, -12896, -11032, -8954, -6856, -4876, -3083, -1479, -15, 1391, 2832, 4389, 6112, 8013, 10059, 12177, 14265, 16203, 17865, 19127, 19875, 20013, 20307, 14530, 1759, -6899, -8710, -10976, -14015, -8603, 5693, 16395, 17453, 16051, 15228, 7787, -6140, -13870, -10106, -4481, -2161, 4387, 16496, 21799, 14980, 6905, 3525, -4422, -19752, -27255, -16881, 72, 10975, 19496, 29529, 30488, 15008, -4952, -15693, -20436, -25345, -22857, -6235, 12940, 19483, 15572, 11124, 4643, -9594, -24894, -29420, -23405, -15251, -7127, 2891, 10722, 10375, 3523, -4029, -10200, -14200, -12945, -6124, 1826, 8832, 16185, 20307, 17819, 13467, 5079, -4501, -11992, -14826, -12042, -4600, 4991, 13570, 18416, 18125, 13001, 4865, -3594, -9684, -11514, -8512, -1575, 7179, 14976, 19159, 17994, 11306, 723, -10632, -19003, -21232, -15951, -4290, 10260, 22896, 29145, 26531, 15596, -161, -15474, -25203, -26216, -18523, -5230, 8654, 18091, 19811, 13399, 1276, -12316, -22905, -27323, -24669, -16410, -5694, 3827, 9226, 9190, 4328, -3143, -10205, -14058, -13056, -7254, 1588, 10588, 16709, 17819, 3538, 2815, 1947, 1090, 393, -21, -75, 255, 935, 1879, 2960, 4032, 4948, 5580, 5841, 5695, 5158, 4303, 3243, 2116, 1068, 228, -304, -477, -286, 219, 949, 1786, 2602, 3276, 3711, 3846, 3661, 3179, 2458, 1578, 629, -304, -1157, -1890, -2497, -3002, -3446, -3884, -4365, -4923, -5564, -6263, -6964, -7583, -8026, -8197, -8018, -7444, -6470, -5141, -3545, -1811, -85, 1478, 2743, 3608, 4017, 3975, 3538, 2251, 2732, 3119, 3410, 3605, 3709, 3727, 3669, 3547, 3374, 3166, 2937, 2702, 2475, 2270, 2096, 1962, 1875, 1836, 1845, 1900, 1993, 2118, 2261, 2412, 2556, 2678, 2765, 2803, 2780, 2685, 2510, 2251, 1906, 1475, 964, 381, -264, -955, -1677, -2412, -3140, -3841, -4495, -5083, -5589, -5995, -6290, -6465, -6512, -6429, -6219, -5886, -5438, -4889, -4253, -3547, -2790, -2004, -1207, -422, 333, 1041, 1684, 2251, 6300, 2703, -447, -3435, -6688, -9700, -11727, -13025, -14251, -14960, -14006, -11414, -8584, -6352, -3986, -601, 3400, 6954, 9654, 11687, 12994, 13347, 13005, 12478, 11616, 9633, 6326, 2783, 421, -512, -1031, -1972, -2920, -2927, -1991, -1231, -1492, -2334, -2672, -1940, -163, 2639, 6359, 10204, 12933, 13941, 13614, 12516, 10770, 8487, 6173, 4248, 2567, 993, 55, 346, 1409, 2018, 1626, 825, 195, -446, -1137, -877, 1451, 5519, 9697, 12700, 14407, 15128, 14873, 13606, 11590, 9156, 6488, 3820, 1421, -719, -2781, -4657, -6144, -7557, -9392, -11285, -12147, -11615, -10394, -8759, -5798, -883, 5041, 10584, 15455, 19811, 22864, 23547, 22212, 20349, 18763, 17190, 15476, 13803, 11661, 7935, 2336, -4239, -10945, -17600, -23810, -28555, -31047, -31209, -29120, -24928, -19579, -14576, -10531, -6781, -2820, 909, 4140, 7650, 12149, 17081, 21384, 24810, 27637, 29559, 29858, 28485, 26172, 23501, 20494, 17153, 13900, 11275, 9410, 7879, 6085, 3850, 1537, -629, -3088, -6297, -9649, -11796, -12222, -11895, -12089, -13108, -14447, -15694, -16866, -18183, -19727, -21066, -21196, -19350, -15914, -12046, -8358, -4653, -946, 2155, 4411, 6411, 8643, 10843, 12740, 14682, 16893, 18730, 19346, 18615, 16838, 14045, 10235, 5910, 1719, -2163, -5789, -8947, -11466, -13707, -16247, -19275, -22693, -26369, -29812, -31990, -32112, -30398, -27645, -24295, -20448, -16432, -12780, -9750, -7330, -5534, -4257, -3041, -1461, 414, 2274, 3981, 5288, 5509, 4140, 1720, -519, -1913, -2840, -3942, -5293, -6450, -7021, -7083, -7154, -7710, -8649, -9378, -9533, -9383, -9298, -9129, -8459, -7327, -6339, -6051, -6425, -6916, -6970, -6469, -5692, -4801, -3542, -1702, 321, 1886, 2962, 4122, 5673, 7359, 9004, 10777, 12659, 14258, 15432, 16438, 17199, 17111, 15934, 14196, 12249, 9697, 6300, 6400, 3109, -290, -3657, -6835, -9649, -11927, -13521, -14332, -14314, -13476, -11869, -9577, -6718, -3448, 33, 3497, 6707, 9451, 11572, 12981, 13640, 13546, 12711, 11171, 9013, 6415, 3661, 1109, -893, -2114, -2531, -2349, -1931, -1653, -1739, -2154, -2593, -2600, -1746, 177, 3055, 6461, 9781, 12402, 13881, 14046, 13002, 11052, 8605, 6074, 3815, 2090, 1045, 685, 858, 1279, 1601, 1529, 955, 41, -800, -1022, -159, 1978, 5183, 8885, 12321, 14776, 15811, 15366, 13727, 11370, 8767, 6238, 3896, 1704, -426, -2539, -4602, -6530, -8238, -9675, -10800, -11531, -11678, -10945, -9005, -5648, -925, 4766, 10726, 16115, 20195, 22537, 23132, 22356, 20791, 18997, 17303, 15700, 13871, 11335, 7644, 2577, -3746, -10847, -17967, -24231, -28832, -31206, -31161, -28904, -24981, -20130, -15087, -10400, -6317, -2761, 569, 4044, 7935, 12288, 16898, 21365, 25218, 28042, 29574, 29742, 28646, 26519, 23670, 20440, 17165, 14131, 11524, 9391, 7622, 5975, 4162, 1954, -711, -3690, -6662, -9243, -11130, -12220, -12663, -12809, -13085, -13833, -15183, -17000, -18919, -20457, -21152, -20688, -18972, -16143, -12521, -8523, -4566, -975, 2078, 4589, 6703, 8642, 10618, 12743, 14961, 17045, 18637, 19350, 18880, 17101, 14117, 10239, 5908, 1582, -2378, -5790, -8677, -11241, -13770, -16536, -19675, -23118, -26568, -29554, -31548, -32112, -31035, -28416, -24652, -20339, -16112, -12467, -9644, -7591, -6037, -4622, -3052, -1216, 784, 2678, 4133, 4870, 4751, 3816, 2258, 362, -1573, -3297, -4657, -5612, -6222, -6619, -6961, -7379, -7935, -8593, -9233, -9685, -9801, -9514, -8876, -8052, -7259, -6696, -6461, -6517, -6702, -6790, -6566, -5902, -4786, -3320, -1664, 16, 1611, 3084, 4474, 5865, 7343, 8963, 10719, 12533, 14269, 15750, 16793, 17244, 17003, 16042, 14401, 12168, 9460, 6400, 7255, -7536, -15841, -10325, 3913, 13884, 12029, 2737, -4154, -3183, 3736, 10517, 11508, 5816, -955, -1337, 5850, 13388, 12901, 3199, -8644, -12734, -3632, 13961, 26034, 20045, -2157, -24126, -29499, -15710, 6700, 24539, 30168, 23682, 11201, -152, -8001, -14572, -20199, -20207, -10822, 4286, 16383, 19072, 11321, -4055, -21087, -31414, -29234, -16876, -3325, 3571, 2543, -2579, -7410, -9747, -9708, -8468, -6631, -3419, 2417, 10518, 17338, 17225, 7255, 4186, -2151, -6063, -6220, -2860, 2355, 7065, 9270, 8248, 4899, 1312, -286, 1287, 5459, 10091, 12541, 11093, 6023, -340, -4688, -4464, 619, 8146, 13995, 14385, 7971, -3112, -13921, -18907, -14663, -1844, 14743, 28067, 32002, 24192, 7288, -12077, -26163, -29513, -21321, -5697, 10245, 19560, 18436, 7641, -8090, -22340, -29829, -28505, -20071, -8865, 239, 3916, 1581, -4703, -11389, -15068, -13840, -7928, 598, 8754, 13825, 14344, 10544, 4186, 5477, 4523, 3354, 2191, 1247, 695, 646, 1135, 2113, 3460, 5000, 6526, 7829, 8730, 9105, 8900, 8138, 6917, 5397, 3772, 2247, 1008, 196, -108, 103, 766, 1761, 2924, 4074, 5040, 5681, 5903, 5670, 5003, 3973, 2685, 1258, -194, -1577, -2835, -3950, -4941, -5854, -6751, -7683, -8684, -9750, -10838, -11862, -12708, -13244, -13344, -12908, -11885, -10281, -8169, -5687, -3022, -387, 1997, 3937, 5289, 5979, 6013, 5477, 3718, 4525, 5178, 5672, 6007, 6189, 6230, 6146, 5954, 5678, 5342, 4971, 4589, 4219, 3883, 3598, 3377, 3232, 3166, 3178, 3264, 3413, 3611, 3840, 4080, 4307, 4499, 4631, 4682, 4630, 4460, 4159, 3718, 3134, 2409, 1552, 576, -500, -1653, -2857, -4080, -5291, -6457, -7544, -8521, -9360, -10035, -10525, -10813, -10890, -10752, -10402, -9847, -9102, -8188, -7129, -5954, -4695, -3385, -2058, -749, 511, 1692, 2768, 3718, 8400, 7639, 8327, 9074, 8231, 6831, 6373, 5829, 3715, 1548, 2040, 4696, 6298, 5601, 4763, 5847, 8277, 10336, 11177, 10613, 8638, 6187, 5131, 6287, 8015, 7852, 5556, 3779, 5232, 9366, 12676, 12781, 11350, 11715, 14182, 15734, 14536, 12375, 11557, 11689, 11463, 11713, 14006, 17165, 18104, 16096, 13625, 12619, 12218, 11089, 9767, 9252, 9007, 8129, 7439, 8505, 11017, 12963, 13442, 13568, 14160, 14184, 12651, 10891, 11289, 14077, 16863, 17522, 16336, 14930, 14198, 13952, 13800, 13572, 13266, 13049, 12974, 12598, 11557, 10506, 10401, 10750, 10035, 8282, 7369, 7903, 7795, 5505, 2832, 2371, 3777, 4985, 5838, 7592, 9615, 9781, 8047, 6705, 6836, 7296, 7535, 8503, 9998, 9956, 7544, 4519, 2282, -81, -3437, -6455, -7357, -6030, -3072, 1301, 5983, 8650, 8555, 7959, 8976, 10632, 10971, 10402, 10610, 11441, 11494, 11042, 11750, 13749, 15366, 15836, 16104, 16611, 16283, 14469, 12274, 10972, 10175, 8608, 6157, 4173, 3726, 4100, 3356, 429, -3527, -6224, -6627, -5867, -5773, -7022, -8890, -10288, -10794, -11006, -11909, -13486, -14202, -12629, -9486, -7067, -6637, -7369, -7901, -7732, -6905, -5651, -4856, -5628, -7792, -9874, -11092, -12198, -13776, -15079, -15466, -15696, -16659, -17807, -18107, -17782, -17860, -18483, -18839, -18510, -18027, -18267, -19868, -22823, -26090, -28085, -28193, -27396, -26932, -26930, -26854, -26570, -26267, -25924, -25634, -25945, -27173, -28715, -29647, -29575, -28442, -26176, -23295, -21258, -21169, -22259, -22529, -20988, -18680, -17333, -17417, -17794, -17193, -15784, -14999, -15706, -16976, -17105, -15546, -13266, -11363, -10012, -8749, -7258, -5785, -5026, -5346, -5894, -5127, -2711, -104, 1484, 2718, 4598, 6320, 6278, 4540, 2639, 1379, 595, 585, 1776, 3271, 3836, 4101, 5552, 7527, 7860, 6636, 6390, 7947, 9077, 8400, 8461, 8876, 8952, 8600, 7863, 6882, 5834, 4869, 4086, 3543, 3293, 3400, 3925, 4877, 6167, 7588, 8852, 9679, 9897, 9508, 8684, 7700, 6821, 6215, 5922, 5894, 6072, 6463, 7143, 8206, 9666, 11376, 13028, 14243, 14718, 14377, 13425, 12297, 11494, 11384, 12059, 13303, 14689, 15756, 16180, 15867, 14942, 13649, 12241, 10895, 9710, 8759, 8139, 7983, 8405, 9407, 10818, 12297, 13444, 13959, 13786, 13161, 12516, 12299, 12760, 13830, 15143, 16199, 16594, 16200, 15216, 14065, 13183, 12813, 12908, 13173, 13238, 12855, 12026, 10986, 10066, 9503, 9294, 9195, 8844, 7967, 6552, 4898, 3514, 2896, 3305, 4628, 6414, 8047, 9006, 9073, 8411, 7481, 6828, 6835, 7544, 8626, 9492, 9520, 8293, 5765, 2306, -1392, -4518, -6370, -6551, -5066, -2305, 1094, 4432, 7145, 8942, 9834, 10075, 10024, 9998, 10169, 10549, 11044, 11556, 12061, 12631, 13371, 14325, 15390, 16299, 16706, 16322, 15068, 13128, 10910, 8874, 7348, 6380, 5725, 4964, 3720, 1842, -504, -2906, -4895, -6168, -6731, -6898, -7137, -7838, -9124, -10777, -12339, -13316, -13398, -12596, -11216, -9714, -8488, -7720, -7340, -7120, -6835, -6417, -6002, -5867, -6284, -7367, -8999, -10876, -12634, -14007, -14924, -15512, -15992, -16551, -17231, -17916, -18407, -18550, -18348, -17995, -17816, -18142, -19163, -20848, -22945, -25068, -26827, -27943, -28322, -28054, -27360, -26523, -25816, -25449, -25536, -26079, -26954, -27931, -28717, -29028, -28677, -27648, -26116, -24396, -22833, -21681, -21000, -20649, -20358, -19861, -19026, -17926, -16807, -15976, -15646, -15822, -16274, -16617, -16462, -15570, -13953, -11871, -9731, -7932, -6724, -6123, -5926, -5791, -5362, -4394, -2822, -779, 1444, 3476, 4962, 5654, 5476, 4559, 3211, 1849, 890, 626, 1146, 2307, 3790, 5222, 6299, 6898, 7090, 7091, 7146, 7415, 7901, 8461, 8988, 7071, 4323, 4870, 7688, 8472, 7017, 7453, 11037, 14175, 14414, 13263, 12132, 10629, 9823, 11840, 15173, 15759, 13504, 12010, 11404, 8373, 4201, 4610, 9289, 10119, 3711, -2306, -500, 6116, 10658, 12490, 14315, 14729, 10723, 3825, -2304, -7138, -11087, -11856, -8501, -5673, -8093, -13560, -16807, -17661, -19873, -24000, -26988, -27601, -27261, -26212, -23306, -19304, -16540, -15169, -12698, -7644, -1654, 2345, 3196, 2761, 4015, 7214, 8988, 7490, 7350, 6537, 5597, 5244, 5989, 7836, 10227, 12306, 13362, 13202, 12249, 11299, 11070, 11795, 13101, 14227, 14466, 13562, 11830, 9944, 8506, 7693, 7178, 6405, 5048, 3347, 2115, 2325, 4510, 8293, 12358, 14927, 14549, 10809, 4590, -2270, -7780, -10656, -10841, -9438, -8111, -8287, -10537, -14431, -18876, -22707, -25210, -26311, -26398, -25934, -25119, -23801, -21654, -18482, -14446, -10051, -5924, -2510, 101, 2134, 3892, 5501, 6806, 7490, 7739, 7727, 7438, 7065, 6789, 6761, 7081, 7784, 8838, 10148, 11573, 12947, 14098, 14879, 15185, 14968, 14244, 13093, 11644, 10059, 8515, 7173, 6163, 5566, 5404, 5639, 6179, 6893, 7628, 8226, 8550, 8490, 7981, 7001, 5573, 3751, 1617, -742, -3238, -5794, -8353, -10871, -13318, -15667, -17890, -19945, -21771, -23291, -24409, -25025, -25044, -24390, -23026, -20959, -18253, -15025, -11444, -7711, -4045, -658, 2270, 4606, 6282, 7302, 7739, 6471, 8202, 9662, 10839, 11730, 12343, 12695, 12810, 12719, 12459, 12069, 11590, 11065, 10531, 10025, 9577, 9210, 8940, 8777, 8719, 8758, 8878, 9055, 9259, 9457, 9611, 9681, 9631, 9423, 9026, 8414, 7566, 6471, 5128, 3544, 1735, -272, -2440, -4728, -7086, -9457, -11784, -14008, -16068, -17910, -19480, -20734, -21634, -22152, -22270, -21982, -21292, -20216, -18781, -17021, -14984, -12719, -10285, -7742, -5153, -2578, -77, 2295, 4492, 6471, 13714, 8601, 5698, 2258, -4419, -11023, -13615, -15296, -21167, -28037, -27631, -19740, -13520, -13826, -14207, -7404, 3730, 11128, 12721, 12567, 12463, 10161, 5925, 4384, 7124, 8105, 1129, -10379, -16486, -13781, -9822, -12127, -17581, -17615, -10823, -4186, -2529, -3171, -2240, -317, 1032, 3396, 8145, 12298, 12030, 8233, 4828, 3157, 1779, 597, 1041, 2276, 1183, -2778, -5771, -4379, -67, 3179, 4184, 4936, 6021, 4932, 523, -3289, -1430, 5423, 11176, 11990, 10387, 10506, 12545, 14293, 15477, 17424, 19712, 19976, 16607, 10148, 2779, -2899, -6214, -9857, -16218, -22300, -22785, -19020, -18780, -24334, -27669, -22464, -13935, -9741, -7265, 723, 12019, 17216, 14273, 10610, 10736, 11516, 10698, 10682, 11479, 8432, 138, -8475, -14023, -19073, -25750, -31128, -32112, -29483, -24529, -17052, -8995, -4213, -2125, 2524, 10872, 17120, 17797, 17513, 21023, 25232, 24552, 19838, 16173, 14589, 11599, 5791, 211, -1991, -1379, -1046, -2715, -4498, -3163, 1118, 4473, 5385, 7658, 13641, 18064, 14649, 6536, 2789, 5191, 6146, 423, -8275, -14149, -16248, -16579, -16900, -19026, -23119, -24821, -19601, -10270, -3904, -1355, 2684, 8898, 11662, 9936, 10348, 15722, 19397, 15851, 9185, 5582, 4243, 1516, -1961, -3844, -4757, -5499, -4409, -1676, -969, -2760, -1825, 4219, 9929, 10418, 8575, 8540, 8114, 4006, -734, -1406, 402, -48, -3163, -6399, -9385, -12164, -12265, -9135, -7533, -10719, -14244, -12529, -7586, -4692, -3389, -232, 2814, 931, -4284, -6069, -2655, 694, -106, -3698, -7480, -10599, -12324, -12160, -11925, -13621, -15376, -13584, -8733, -4855, -3257, -1065, 3573, 8711, 11974, 13607, 15136, 17107, 18876, 19371, 18041, 15837, 14424, 13657, 11407, 6809, 1694, -2262, -5275, -7112, -6092, -2315, 1202, 2843, 4764, 8735, 12946, 15500, 17429, 19248, 18399, 13714, 15570, 11805, 6674, 754, -5248, -10723, -15327, -18991, -21785, -23704, -24524, -23821, -21178, -16470, -10085, -2938, 3765, 8920, 11906, 12762, 12079, 10659, 9100, 7532, 5624, 2863, -1048, -5885, -10870, -14934, -17152, -17151, -15256, -12333, -9371, -7045, -5453, -4164, -2537, -136, 2981, 6246, 8845, 10107, 9827, 8334, 6303, 4398, 2969, 1946, 995, -179, -1561, -2756, -3178, -2399, -457, 2061, 4236, 5237, 4746, 3153, 1405, 575, 1358, 3747, 7055, 10279, 12601, 13783, 14227, 14683, 15748, 17428, 19015, 19351, 17378, 12686, 5791, -2014, -9177, -14524, -17709, -19256, -20183, -21394, -23143, -24855, -25375, -23545, -18818, -11608, -3222, 4625, 10457, 13575, 14233, 13408, 12270, 11623, 11550, 11421, 10220, 7040, 1518, -5962, -14355, -22275, -28395, -31791, -32112, -29576, -24821, -18688, -12017, -5481, 494, 5743, 10305, 14311, 17857, 20889, 23170, 24339, 24049, 22145, 18781, 14436, 9783, 5494, 2032, -448, -2051, -2989, -3385, -3171, -2120, -21, 3109, 6883, 10579, 13341, 14484, 13739, 11339, 7890, 4085, 416, -2998, -6364, -9982, -13967, -18043, -21557, -23690, -23777, -21592, -17450, -12086, -6384, -1069, 3484, 7243, 10362, 12956, 14946, 16052, 15935, 14407, 11586, 7918, 4044, 587, -2044, -3739, -4623, -4908, -4726, -4060, -2782, -797, 1811, 4708, 7362, 9202, 9818, 9107, 7297, 4852, 2289, 6, -1834, -3303, -4617, -6003, -7583, -9307, -10971, -12278, -12936, -12749, -11674, -9847, -7557, -5185, -3108, -1610, -812, -655, -944, -1451, -2020, -2642, -3454, -4659, -6396, -8627, -11084, -13323, -14857, -15311, -14536, -12632, -9875, -6592, -3051, 590, 4251, 7862, 11287, 14320, 16733, 18362, 19168, 19232, 18685, 17605, 15956, 13608, 10455, 6565, 2282, -1782, -4900, -6453, -6148, -4109, -816, 3079, 6985, 10511, 13489, 15860, 17525, 18250, 17696, 15570, 17555, -5345, -26588, -22426, 1214, 16055, 6579, -12800, -18577, -6861, 6429, 8642, 3309, -150, 304, 1704, 5063, 13171, 20697, 15517, -5470, -26802, -27775, -5985, 17170, 17720, -5424, -28726, -28043, -3041, 23094, 27814, 11842, -3515, -1351, 11550, 13819, -3131, -22872, -23054, -2785, 16160, 15712, 1743, -6232, -202, 8878, 7569, -3610, -13153, -13098, -6242, -1047, -3154, -10869, -15806, -9180, 8300, 23126, 21122, 5079, -5398, 3053, 18722, 17555, 366, -6252, -11504, -14425, -14311, -11297, -6660, -2456, -556, -1552, -4221, -5984, -4256, 1978, 11272, 20102, 24469, 21916, 12909, 749, -9993, -15730, -15597, -11713, -7794, -6878, -9455, -13075, -13735, -8309, 3310, 17619, 28892, 31907, 24629, 9430, -7834, -20459, -23918, -17785, -5650, 6840, 14719, 15829, 11320, 4474, -1367, -4563, -5704, -6766, -9511, -14143, -18989, -21365, -19067, -11630, -667, 10844, 19871, 24506, 24443, 20650, 14591, 7541, 366, 13881, 4946, -4622, -13571, -20716, -25107, -26156, -23726, -18150, -10183, -904, 8442, 16610, 22530, 25448, 25033, 21407, 15127, 7093, -1580, -9727, -16293, -20477, -21837, -20336, -16334, -10515, -3777, 2909, 8646, 12736, 14779, 14709, 12788, 9545, 5671, 1899, -1123, -2941, -3362, -2487, -678, 1510, 3430, 4471, 4169, 2302, -1052, -5522, -10477, -15132, -18660, -20336, -19657, -16439, -10870, -3502, 4811, 13024, 20045, 24891, 26836, 25526, 21036, 13881, 3176, 3368, 3433, 3372, 3190, 2896, 2504, 2031, 1499, 929, 345, -228, -767, -1251, -1659, -1976, -2188, -2288, -2272, -2140, -1899, -1559, -1134, -641, -102, 461, 1024, 1564, 2058, 2483, 2820, 3055, 3176, 3174, 3048, 2799, 2434, 1964, 1406, 778, 102, -598, -1297, -1970, -2592, -3141, -3596, -3941, -4163, -4254, -4209, -4030, -3724, -3301, -2776, -2168, -1499, -792, -73, 633, 1302, 1909, 2435, 2862, 3176, 5690, 3091, 7379, 11549, 8503, 2565, 819, -418, -8578, -18518, -17242, -4711, 3922, 68, -6768, -4837, 3345, 8082, 7495, 6206, 4917, 1144, -2654, -1124, 4111, 4757, -2272, -9502, -8417, -394, 5291, 2912, -3005, -3108, 5580, 15580, 17432, 10807, 4003, 2917, 5305, 7280, 9785, 14499, 17963, 15709, 9667, 5640, 5041, 4902, 4542, 5668, 6674, 4305, 1324, 4456, 13015, 18113, 16315, 15054, 19147, 21173, 13749, 3861, 3989, 13399, 19762, 17459, 12907, 11723, 11752, 10956, 12188, 16358, 18968, 17158, 13467, 9878, 5151, 443, -218, 2115, 1158, -3528, -4388, 905, 3873, -983, -6534, -5022, -581, -263, -778, 4542, 11898, 12314, 6567, 2947, 3117, 2045, 12, 2536, 8511, 9900, 4386, -1837, -5256, -9424, -16305, -22112, -23900, -22530, -17741, -8376, 1280, 4012, 443, -1048, 2863, 6430, 6134, 6701, 11683, 16532, 16530, 14624, 15591, 18105, 18461, 17780, 19737, 23820, 25631, 22627, 16736, 12194, 11645, 13089, 11576, 6322, 3455, 6988, 10262, 4085, -8305, -13844, -7933, -712, -2421, -11085, -18437, -20535, -18365, -14373, -12338, -14982, -18596, -15889, -6661, 900, 2109, 1510, 3476, 5165, 3583, 2070, 3855, 5511, 2953, -1412, -3301, -3497, -4736, -6203, -6322, -6778, -8945, -10438, -9623, -9134, -10679, -11184, -8511, -6051, -7045, -9553, -11784, -16683, -25468, -32112, -30944, -25388, -22581, -23202, -23009, -20927, -19177, -18378, -18362, -20882, -26087, -29658, -28591, -25841, -23996, -19685, -11101, -5461, -9782, -18128, -18278, -9252, -2160, -3875, -9516, -12283, -11870, -10717, -9465, -9104, -11496, -15044, -15189, -11538, -9191, -10469, -10725, -5947, 65, 721, -3861, -6983, -4098, 2326, 7134, 9035, 11122, 15595, 19993, 19976, 14971, 9030, 6120, 6623, 8568, 9840, 8830, 5702, 3513, 5006, 8114, 8564, 7013, 8075, 11425, 10988, 5690, 8384, 8943, 9421, 9109, 7389, 4072, -427, -5190, -9123, -11350, -11513, -9828, -6924, -3567, -396, 2195, 4046, 5130, 5475, 5141, 4257, 3041, 1768, 659, -213, -955, -1751, -2683, -3574, -3970, -3320, -1280, 2010, 5858, 9228, 11167, 11245, 9799, 7804, 6452, 6600, 8373, 11116, 13709, 15089, 14715, 12755, 9925, 7112, 4976, 3768, 3397, 3678, 4563, 6179, 8665, 11903, 15358, 18166, 19474, 18873, 16670, 13823, 11543, 10731, 11558, 13405, 15214, 16066, 15671, 14503, 13504, 13497, 14651, 16296, 17205, 16223, 12914, 7869, 2506, -1560, -3265, -2592, -552, 1330, 1772, 359, -2272, -4756, -5682, -4269, -740, 3778, 7755, 9918, 9758, 7689, 4817, 2443, 1534, 2353, 4372, 6469, 7324, 5876, 1701, -4780, -12350, -19292, -23880, -24923, -22182, -16486, -9474, -3019, 1447, 3444, 3553, 3081, 3410, 5348, 8777, 12764, 16082, 17865, 18053, 17406, 17079, 17969, 20199, 23013, 25134, 25414, 23429, 19709, 15481, 12058, 10200, 9774, 9874, 9342, 7389, 3991, -126, -3904, -6524, -7827, -8354, -9022, -10589, -13232, -16429, -19203, -20591, -20065, -17733, -14209, -10289, -6600, -3418, -715, 1638, 3659, 5170, 5888, 5616, 4406, 2584, 620, -1083, -2365, -3345, -4302, -5487, -6964, -8564, -9978, -10905, -11182, -10838, -10057, -9122, -8363, -8147, -8865, -10863, -14294, -18943, -24124, -28763, -31697, -32112, -29920, -25910, -21526, -18359, -17526, -19239, -22733, -26603, -29392, -30157, -28761, -25802, -22237, -18930, -16331, -14438, -12984, -11710, -10559, -9669, -9225, -9276, -9666, -10123, -10441, -10636, -10943, -11638, -12790, -14097, -14943, -14678, -12983, -10117, -6879, -4270, -3008, -3134, -3935, -4241, -2973, 339, 5295, 10776, 15413, 18151, 18629, 17236, 14830, 12312, 10272, 8861, 7921, 7228, 6697, 6422, 6555, 7124, 7941, 8664, 8991, 8848, 8457, 8206, 8384, 12308, 4855, -6976, -8528, 1353, 7219, 1120, -5039, 846, 12297, 15828, 11078, 7873, 10211, 14063, 16633, 18538, 19366, 17621, 13084, 6070, -1779, -4775, 1624, 10861, 9505, -4638, -17440, -16095, -3361, 10423, 20319, 25830, 25410, 18839, 9169, -1968, -14323, -22032, -16712, -1787, 7095, 1960, -7489, -10414, -10517, -16439, -26204, -31705, -31618, -29756, -26048, -18760, -11835, -11113, -15080, -15895, -8643, 4057, 14777, 17077, 11840, 7687, 10133, 12308, 7927, 3158, -1246, -4075, -4492, -2436, 1267, 5211, 8060, 9207, 9084, 8907, 9945, 12718, 16570, 19912, 21041, 19101, 14630, 9344, 5234, 3459, 3676, 4242, 3224, -303, -5429, -9603, -9847, -4428, 5907, 17846, 26761, 28740, 22453, 9898, -4372, -15215, -19140, -15762, -7816, 217, 4187, 2030, -5554, -15717, -24955, -30672, -32094, -30195, -26842, -23697, -21461, -19767, -17649, -14231, -9238, -3117, 3212, 8741, 12683, 14577, 14276, 11908, 7927, 10434, 7282, 3807, 562, -1940, -3289, -3233, -1712, 1135, 4988, 9391, 13811, 17711, 20616, 22182, 22233, 20782, 18029, 14328, 10134, 5949, 2248, -577, -2267, -2721, -1998, -306, 2039, 4659, 7169, 9228, 10577, 11066, 10661, 9432, 7528, 5145, 2483, -283, -3032, -5703, -8298, -10858, -13443, -16095, -18814, -21531, -24106, -26328, -27942, -28684, -28319, -26689, -23748, -19587, -14438, -8665, -2722, 2890, 7687, 11260, 13334, 13801, 12746, 10434, 6761, 8340, 9637, 10643, 11358, 11790, 11961, 11896, 11630, 11203, 10658, 10040, 9393, 8758, 8173, 7671, 7276, 7006, 6869, 6864, 6983, 7206, 7510, 7860, 8222, 8553, 8812, 8957, 8948, 8750, 8333, 7675, 6761, 5588, 4160, 2494, 614, -1444, -3637, -5915, -8222, -10499, -12684, -14719, -16545, -18108, -19362, -20269, -20799, -20934, -20666, -20001, -18955, -17553, -15833, -13841, -11630, -9257, -6786, -4278, -1796, 600, 2856, 4923, 6761, 17793, 15682, 15532, 15910, 13554, 9616, 7514, 5669, -312, -7864, -8379, -698, 4855, 1184, -4439, -1314, 8597, 14383, 12069, 7272, 3920, 277, -3443, -3159, 645, 849, -5625, -11554, -9020, -602, 4554, 3056, 372, 2600, 9368, 15320, 16015, 11589, 5849, 2643, 3375, 7695, 14723, 22159, 26080, 24454, 19939, 16556, 14817, 13095, 11835, 12038, 11262, 6803, 2032, 3027, 8793, 12027, 10662, 10558, 14063, 14646, 8202, 1938, 4663, 13771, 19585, 18633, 15093, 12237, 10179, 10072, 13141, 16566, 16623, 14551, 13461, 11754, 6589, 1446, 1867, 5133, 3480, -2694, -4833, -669, 1691, -2716, -7964, -7837, -5093, -4025, -1826, 5000, 11950, 12444, 8071, 5277, 5444, 5737, 6722, 10999, 15853, 15126, 8281, 928, -3746, -7923, -13177, -17422, -18651, -16619, -10332, 794, 12452, 17764, 15832, 12973, 13509, 14478, 12213, 9055, 9165, 11370, 11323, 8893, 8320, 11245, 14214, 14393, 14026, 16428, 19712, 18426, 11613, 5365, 4904, 7145, 5540, 771, 406, 6640, 10997, 5688, -4650, -8780, -3753, 2573, 2973, -1525, -6004, -7957, -7573, -6174, -6189, -9223, -12867, -12643, -8087, -3491, -1825, -1663, -1100, -580, -274, 1232, 3479, 3069, -1542, -7400, -11397, -14050, -16753, -18638, -18827, -18730, -19374, -19275, -17534, -16046, -15879, -14643, -10663, -6755, -6415, -9131, -12994, -18708, -26530, -32112, -30942, -25483, -22586, -24411, -26660, -25570, -22100, -18990, -17764, -19113, -22786, -26663, -28636, -28983, -28337, -25094, -18847, -14494, -17214, -23841, -25456, -19391, -12632, -11510, -13853, -14275, -12023, -9773, -8759, -9076, -11548, -15428, -17016, -14325, -10602, -9471, -9237, -6505, -3217, -4450, -9730, -12196, -7703, -102, 4815, 7006, 10482, 16033, 19413, 16873, 9776, 2669, -1521, -2984, -2875, -1762, -169, 1319, 3185, 6551, 10795, 13494, 13964, 14642, 17061, 18897, 17793, 19311, 19357, 18515, 16653, 13855, 10407, 6702, 3125, -10, -2464, -4026, -4477, -3638, -1480, 1735, 5389, 8605, 10500, 10506, 8614, 5410, 1848, -1142, -3028, -3849, -4092, -4329, -4815, -5274, -5005, -3277, 181, 4877, 9629, 13011, 14004, 12509, 9471, 6525, 5312, 6767, 10732, 16046, 21064, 24350, 25203, 23814, 21004, 17752, 14759, 12277, 10227, 8492, 7154, 6514, 6883, 8292, 10317, 12183, 13107, 12723, 11323, 9766, 9062, 9848, 12017, 14741, 16871, 17535, 16599, 14745, 13112, 12665, 13649, 15407, 16682, 16264, 13639, 9296, 4535, 843, -830, -530, 739, 1545, 775, -1774, -5262, -8182, -9080, -7246, -3052, 2204, 6878, 9684, 10209, 9016, 7318, 6392, 7008, 9098, 11789, 13746, 13670, 10778, 5093, -2506, -10484, -17033, -20541, -20038, -15495, -7870, 1120, 9488, 15560, 18468, 18362, 16250, 13529, 11411, 10489, 10622, 11192, 11551, 11446, 11168, 11355, 12561, 14831, 17526, 19534, 19773, 17743, 13836, 9220, 5345, 3293, 3294, 4650, 6100, 6451, 5148, 2508, -483, -2707, -3491, -2938, -1848, -1290, -2049, -4236, -7246, -10072, -11795, -11987, -10847, -9010, -7165, -5697, -4552, -3366, -1792, 190, 2149, 3346, 3060, 952, -2752, -7324, -11830, -15498, -17979, -19397, -20158, -20662, -21047, -21116, -20480, -18818, -16149, -12952, -10072, -8454, -8805, -11330, -15641, -20867, -25925, -29828, -31941, -32112, -30639, -28145, -25376, -23030, -21612, -21363, -22244, -23961, -26040, -27924, -29104, -29243, -28280, -26453, -24239, -22197, -20767, -20098, -19977, -19907, -19317, -17831, -15482, -12756, -10441, -9309, -9771, -11644, -14168, -16269, -16985, -15875, -13223, -9939, -7189, -5888, -6293, -7856, -9418, -9664, -7657, -3222, 2946, 9508, 14930, 17971, 18047, 15352, 10734, 5399, 564, -2828, -4275, -3740, -1577, 1621, 5195, 8579, 11416, 13601, 15241, 16544, 17677, 18655, 19311, 23187, 13602, -56, -1204, 6176, 6202, -2304, -5337, 2628, 12137, 16364, 18429, 19333, 14968, 8217, 8457, 15565, 19043, 15453, 11382, 7805, -514, -8070, -1922, 13268, 15660, -193, -12177, -3990, 11579, 16353, 13619, 14791, 16840, 11561, 3461, 413, -1785, -8568, -11961, -4530, 2713, -4494, -19064, -22952, -16137, -14943, -24326, -31811, -29920, -26342, -27476, -27362, -20210, -12317, -12294, -16241, -12395, 1067, 11567, 8962, 848, 3034, 16217, 23187, 15761, 14180, 9912, 4264, -707, -3083, -1963, 2145, 7618, 12532, 15561, 16485, 16075, 15476, 15454, 15972, 16295, 15535, 13277, 9897, 6375, 3739, 2489, 2357, 2575, 2453, 1928, 1682, 2741, 5753, 10373, 15165, 18147, 17727, 13546, 6757, -448, -5842, -8191, -7789, -6217, -5493, -7056, -11117, -16683, -22176, -26272, -28480, -29179, -29162, -29005, -28669, -27562, -25000, -20746, -15271, -9564, -4607, -839, 2038, 4773, 7968, 11533, 14565, 15761, 11437, 9584, 7321, 5081, 3275, 2237, 2179, 3166, 5108, 7772, 10820, 13851, 16462, 18305, 19129, 18817, 17405, 15067, 12097, 8863, 5759, 3148, 1321, 451, 584, 1628, 3378, 5542, 7789, 9790, 11261, 11997, 11891, 10939, 9227, 6909, 4175, 1220, -1789, -4736, -7558, -10252, -12852, -15411, -17970, -20533, -23051, -25407, -27427, -28893, -29577, -29272, -27834, -25209, -21460, -16772, -11440, -5845, -413, 4437, 8342, 11041, 12411, 12482, 11437, 8337, 10114, 11545, 12620, 13341, 13720, 13784, 13567, 13113, 12472, 11699, 10849, 9978, 9137, 8375, 7730, 7235, 6910, 6766, 6802, 7006, 7354, 7816, 8350, 8910, 9445, 9901, 10226, 10369, 10285, 9937, 9294, 8337, 7061, 5469, 3579, 1422, -962, -3520, -6192, -8910, -11603, -14197, -16619, -18797, -20667, -22172, -23265, -23910, -24085, -23780, -23002, -21769, -20113, -18080, -15725, -13113, -10314, -7403, -4456, -1550, 1244, 3861, 6241, 8337, 18729, 10300, 8264, 7992, 2315, -4888, -6815, -7884, -16364, -27699, -29146, -19479, -10982, -10681, -11030, -2659, 12481, 25191, 30137, 28474, 23363, 17174, 11651, 7583, 3662, -3013, -13481, -23281, -24729, -15943, -5593, -3625, -8221, -8481, -386, 7614, 7326, 1395, -2863, -3052, 32, 7019, 16360, 21424, 18036, 10824, 5796, 1142, -7368, -16130, -17766, -13085, -9754, -9535, -5997, 3540, 12260, 13571, 9741, 6121, 2003, -6731, -18362, -24842, -20882, -9444, 2588, 10686, 13372, 10478, 4128, -753, -922, 970, 410, -1554, 373, 7084, 13353, 15703, 15736, 13781, 6599, -4884, -13238, -15385, -18237, -26437, -32112, -26200, -13321, -4191, 1331, 10662, 21611, 23699, 15883, 8859, 8152, 8224, 6029, 7048, 13173, 16620, 11815, 3159, -4494, -13213, -24113, -31625, -31923, -28616, -24451, -16211, -3724, 5480, 7543, 9228, 15786, 20885, 17629, 11218, 10228, 12286, 9765, 4233, 3144, 5696, 4304, -1220, -2993, 602, 1042, -6533, -14697, -14042, -6009, 234, 546, 133, 5185, 13790, 17554, 12023, 3043, 388, 6097, 12498, 11897, 4695, -3022, -6602, -6241, -6016, -10289, -18478, -23634, -19639, -9126, 203, 5968, 11657, 17359, 18101, 13179, 9013, 9214, 9149, 4646, -795, -2602, -2727, -4877, -7443, -7341, -6465, -8040, -10008, -8253, -3715, -432, 1466, 5181, 10911, 15016, 14858, 10626, 3294, -5602, -12939, -16041, -15465, -13592, -11314, -7991, -3633, 642, 3501, 3892, 1895, -666, -2271, -3935, -6647, -7472, -2816, 4265, 5695, -692, -7100, -5766, 1340, 6389, 5673, 1703, -1983, -3811, -3130, 47, 3852, 5208, 2596, -2183, -5467, -5616, -5051, -6654, -8553, -6290, -775, 1632, -361, 741, 9120, 16908, 15672, 10396, 11309, 16220, 13600, 1507, -9611, -13489, -14740, -17043, -17036, -13483, -10972, -10164, -5134, 5040, 12713, 14593, 17180, 23475, 25681, 18729, 18709, 14811, 10209, 5506, 998, -3339, -7701, -12209, -16685, -20562, -22968, -22987, -19992, -13926, -5431, 4255, 13579, 21061, 25635, 26856, 24898, 20383, 14138, 6987, -345, -7213, -12981, -16994, -18671, -17708, -14299, -9237, -3796, 623, 2979, 3001, 1332, -689, -1551, -197, 3511, 8681, 13704, 16843, 16866, 13464, 7308, -228, -7531, -13191, -16273, -16391, -13646, -8550, -1996, 4763, 10217, 12872, 11691, 6566, -1420, -10124, -16929, -19618, -17214, -10420, -1426, 6864, 11907, 12453, 8959, 3310, -1995, -4834, -4226, -551, 4777, 9976, 13574, 14795, 13566, 10226, 5208, -1132, -8414, -15999, -22803, -27376, -28283, -24680, -16805, -6123, 5002, 14027, 19084, 19611, 16512, 11761, 7623, 5783, 6731, 9626, 12658, 13769, 11430, 5209, -4056, -14523, -23915, -30193, -32112, -29488, -23145, -14576, -5474, 2716, 9082, 13311, 15559, 16228, 15743, 14437, 12546, 10288, 7936, 5810, 4187, 3160, 2539, 1885, 684, -1388, -4236, -7275, -9579, -10221, -8659, -5001, -30, 5047, 9027, 11136, 11274, 9988, 8187, 6726, 6050, 6025, 6029, 5239, 2996, -891, -6019, -11471, -16053, -18628, -18420, -15236, -9527, -2303, 5105, 11360, 15438, 16864, 15794, 12908, 9154, 5441, 2368, 117, -1498, -2840, -4223, -5756, -7299, -8537, -9113, -8746, -7290, -4743, -1245, 2899, 7170, 10822, 12954, 12734, 9704, 4080, -3138, -10335, -15728, -17956, -16569, -12217, -6416, -1000, 2549, 3590, 2448, 143, -2129, -3509, -3754, -3191, -2399, -1843, -1633, -1534, -1199, -441, 600, 1513, 1854, 1434, 459, -539, -983, -572, 522, 1704, 2230, 1576, -293, -2887, -5407, -7090, -7513, -6705, -5031, -2924, -641, 1830, 4654, 7904, 11334, 14310, 15969, 15535, 12655, 7589, 1165, -5471, -11210, -15262, -17280, -17297, -15546, -12298, -7784, -2253, 3920, 10149, 15664, 19670, 21571, 21166, 18709, 30578, 1650, -29942, -20537, 16688, 30527, 4830, -22474, -17252, 6839, 16570, 5923, -5584, -5963, -1827, -2177, -5766, -4628, 5051, 14612, 8662, -13005, -25602, -7931, 22821, 27337, -2381, -30041, -23889, 4341, 21944, 16810, 1354, -9086, -6747, 6761, 16872, 7506, -13664, -18212, 2619, 20389, 10029, -11741, -12867, 4517, 10647, -3341, -14716, -8426, 1737, 345, -5025, -1213, 5517, 874, -9923, -7019, 10984, 18854, 709, -20890, -12425, 19400, 30578, 11419, 9706, 5437, 224, -3513, -3890, -710, 4272, 8205, 8661, 4981, -1331, -7412, -10585, -9784, -6044, -1783, 660, 370, -1731, -3633, -3677, -1764, 459, 625, -2689, -8679, -14284, -15594, -10009, 2006, 16655, 28309, 32112, 26395, 13616, -706, -10567, -12287, -6137, 3980, 12578, 15262, 10686, 869, -10128, -18340, -21692, -20572, -17073, -13501, -11087, -9587, -7870, -4980, -939, 3225, 6181, 7230, 6798, 6169, 6590, 8365, 10535, 11419, 8464, 7285, 5898, 4430, 3004, 1721, 652, -163, -718, -1041, -1184, -1218, -1223, -1272, -1428, -1731, -2196, -2804, -3510, -4245, -4921, -5443, -5716, -5661, -5219, -4360, -3088, -1446, 491, 2619, 4808, 6916, 8797, 10313, 11342, 11791, 11600, 10749, 9257, 7188, 4642, 1751, -1327, -4420, -7351, -9951, -12066, -13573, -14383, -14451, -13777, -12408, -10433, -7980, -5205, -2281, 613, 3306, 5647, 7516, 8832, 9557, 9698, 9305, 8464, 8460, 8818, 8840, 8529, 7899, 6977, 5801, 4419, 2888, 1267, -379, -1985, -3487, -4827, -5952, -6818, -7392, -7650, -7584, -7196, -6503, -5531, -4319, -2916, -1377, 237, 1861, 3431, 4883, 6160, 7208, 7986, 8460, 8609, 8423, 7909, 7081, 5969, 4614, 3064, 1377, -385, -2156, -3869, -5461, -6872, -8048, -8944, -9528, -9776, -9680, -9241, -8477, -7415, -6096, -4568, -2888, -1119, 674, 2424, 4065, 5539, 6791, 7777, 8460, 3521, 1027, 1338, 1352, -3512, -9008, -7107, -613, -701, -7954, -9258, 856, 9276, 4535, -3642, 1452, 17533, 26977, 22798, 15470, 13900, 14601, 13190, 13136, 16541, 17038, 10259, 3571, 6367, 15667, 20264, 16491, 11609, 12142, 16079, 17734, 14775, 8575, 1714, -2494, -741, 7286, 17383, 23929, 24553, 21175, 16723, 11970, 6583, 2337, 2326, 5771, 6990, 2941, -991, 2100, 9781, 13212, 10701, 10037, 14904, 17853, 12534, 5520, 7690, 18377, 26714, 26384, 21002, 16061, 13272, 12991, 15464, 18767, 20481, 21160, 21678, 19221, 12014, 5553, 6206, 10311, 8845, 2266, 220, 5466, 9258, 5905, 1086, 899, 2947, 4402, 9062, 18606, 25369, 22614, 15170, 11311, 10630, 9047, 9421, 16218, 23968, 22485, 11728, 1336, -3568, -6762, -11732, -16965, -20529, -21466, -16868, -5300, 7110, 11954, 10028, 9629, 13239, 14604, 10572, 6946, 8975, 13292, 13915, 11066, 9403, 10811, 12994, 13850, 14482, 17486, 22394, 23906, 17723, 8218, 4669, 7804, 7741, 159, -4721, 1517, 8663, 1119, -17060, -26265, -19554, -10776, -12108, -18802, -21722, -21357, -21575, -20577, -16802, -15232, -19323, -23436, -21049, -14719, -10887, -10074, -8866, -6709, -4460, -775, 4050, 5051, -732, -8611, -12752, -14131, -16535, -18857, -17493, -13224, -9957, -8979, -9031, -9559, -10043, -8992, -6856, -6440, -7799, -7614, -6512, -10484, -20498, -27645, -25138, -19084, -19637, -26274, -30154, -27647, -23163, -20617, -19845, -20554, -23237, -26605, -28863, -30071, -29456, -24043, -14901, -10073, -14427, -20748, -18942, -10773, -6573, -9651, -13478, -13454, -11945, -11251, -10592, -11293, -16467, -23639, -25686, -21388, -17425, -17330, -16395, -11433, -7951, -11714, -18581, -19285, -11475, -1454, 4709, 7319, 10416, 15888, 20914, 20679, 13821, 4634, -1446, -3561, -4604, -5975, -6364, -5044, -2959, -789, 1112, 1598, 600, 696, 3288, 5211, 3521, 3753, 2988, 1215, -1214, -3637, -5356, -5948, -5450, -4304, -3085, -2156, -1428, -387, 1621, 4970, 9442, 14197, 18079, 20113, 19956, 18063, 15464, 13271, 12159, 12105, 12510, 12639, 12126, 11238, 10739, 11401, 13445, 16227, 18406, 18551, 15909, 10926, 5228, 1006, 73, 3035, 8969, 15784, 21094, 23190, 21666, 17435, 12178, 7537, 4470, 3044, 2712, 2836, 3126, 3743, 5050, 7195, 9836, 12208, 13514, 13426, 12364, 11362, 11545, 13484, 16803, 20276, 22417, 22257, 19910, 16585, 14017, 13581, 15548, 18887, 21730, 22296, 19792, 14831, 9156, 4793, 3061, 3960, 6227, 8031, 7952, 5732, 2418, -161, -320, 2619, 7969, 13967, 18578, 20394, 19223, 16097, 12741, 10772, 11002, 13140, 15970, 17874, 17463, 14044, 7815, -233, -8611, -15704, -20127, -21019, -18246, -12451, -4941, 2635, 8739, 12396, 13475, 12661, 11117, 9959, 9794, 10523, 11517, 12055, 11802, 11051, 10587, 11243, 13371, 16523, 19556, 21109, 20260, 16995, 12263, 7552, 4197, 2755, 2761, 2989, 2087, -741, -5338, -10682, -15387, -18365, -19311, -18772, -17796, -17375, -17955, -19286, -20643, -21271, -20815, -19464, -17786, -16333, -15274, -14270, -12673, -9950, -6096, -1802, 1733, 3285, 2146, -1527, -6728, -11979, -15890, -17660, -17295, -15484, -13209, -11305, -10155, -9645, -9360, -8887, -8077, -7129, -6493, -6658, -7931, -10312, -13511, -17054, -20438, -23246, -25202, -26179, -26191, -25393, -24091, -22719, -21768, -21647, -22525, -24209, -26149, -27589, -27824, -26484, -23705, -20110, -16594, -13979, -12694, -12614, -13145, -13515, -13151, -11974, -10462, -9445, -9721, -11648, -14923, -18634, -21599, -22841, -21993, -19460, -16252, -13563, -12263, -12525, -13736, -14729, -14243, -11417, -6140, 878, 8314, 14636, 18553, 19360, 17094, 12473, 6661, 949, -3569, -6237, -6942, -6064, -4287, -2347, -776, 234, 830, 1329, 1993, 2837, 3575, 3753, 2992, -2308, -5421, 1449, 12407, 17100, 14783, 12007, 11594, 11609, 11577, 12082, 10905, 6870, 4951, 9976, 17718, 20216, 17377, 14549, 11644, 5680, 1870, 8443, 19656, 18855, 2866, -10688, -7423, 5193, 12198, 12415, 13714, 15913, 11840, 908, -10176, -17574, -21368, -19546, -11202, -3519, -4918, -12046, -13908, -9008, -7666, -15387, -24548, -26726, -23893, -21475, -18572, -13015, -9874, -14825, -21764, -17823, -2053, 10624, 8643, -999, -3950, 1053, 2992, -1460, -2016, -613, 2767, 7428, 12157, 15614, 16829, 15595, 12600, 9196, 6863, 6597, 8475, 11636, 14680, 16340, 16068, 14272, 12039, 10515, 10248, 10864, 11277, 10340, 7596, 3704, 269, -910, 1192, 6128, 11950, 15935, 15764, 10606, 1594, -8573, -16721, -20513, -19375, -14645, -8901, -4810, -4046, -6727, -11589, -16716, -20452, -22038, -21748, -20516, -19320, -18654, -18330, -17668, -15927, -12747, -8378, -3623, 469, 3005, 3583, 2440, 385, -1460, 4592, 5318, 5820, 6213, 6612, 7114, 7784, 8645, 9673, 10804, 11941, 12975, 13794, 14308, 14458, 14232, 13659, 12814, 11800, 10738, 9748, 8931, 8352, 8036, 7957, 8049, 8210, 8318, 8253, 7907, 7205, 6112, 4640, 2842, 809, -1349, -3516, -5585, -7474, -9133, -10550, -11744, -12762, -13665, -14511, -15344, -16182, -17009, -17774, -18399, -18788, -18840, -18468, -17614, -16257, -14427, -12198, -9684, -7031, -4391, -1912, 284, 2114, 3545, 4592, 3337, 4906, 6330, 7595, 8693, 9622, 10385, 10989, 11445, 11766, 11969, 12071, 12090, 12043, 11947, 11816, 11660, 11487, 11304, 11109, 10901, 10673, 10415, 10116, 9763, 9340, 8831, 8224, 7503, 6660, 5686, 4578, 3337, 1967, 479, -1112, -2785, -4516, -6278, -8038, -9763, -11418, -12969, -14380, -15619, -16657, -17469, -18032, -18333, -18360, -18112, -17592, -16809, -15778, -14523, -13068, -11445, -9687, -7832, -5915, -3974, -2046, -165, 1638, 3337, -2111, -2626, -6, 1097, -1844, -4828, -4354, -4284, -9353, -15106, -12778, -3697, 428, -5730, -12438, -8260, 4325, 13307, 12989, 8277, 5229, 4483, 4336, 4423, 4451, 3115, 327, -1678, -903, 1862, 3724, 2490, -772, -1794, 2586, 9415, 11497, 5999, -1522, -3974, -545, 5315, 11948, 18667, 21863, 18176, 10463, 4926, 3110, 2284, 2217, 4519, 6189, 2472, -3187, -1477, 8120, 14912, 13387, 11582, 16228, 19900, 13441, 3276, 3369, 14141, 22582, 21882, 18119, 16739, 15063, 11712, 12277, 19704, 27229, 26987, 19936, 12457, 8183, 7273, 8801, 9904, 7120, 1853, -170, 2360, 3740, 436, -3409, -3443, -1481, 267, 4383, 11561, 15297, 10709, 3296, 1015, 2478, 1606, -321, 2686, 9085, 10578, 4744, -2481, -7416, -12775, -19928, -25367, -26991, -26482, -23431, -14704, -2437, 4883, 3387, -505, 251, 3850, 4884, 3793, 4742, 7432, 7741, 5329, 4577, 7504, 10650, 10713, 9587, 10946, 13870, 13652, 9173, 5706, 7632, 11224, 9648, 4174, 3697, 10969, 16177, 9581, -4351, -12271, -8862, -1575, 574, -3399, -8436, -9865, -6907, -3119, -3271, -7288, -9200, -5216, 393, 1920, 815, 1452, 2210, -1010, -5081, -3040, 3686, 6124, 1230, -4866, -8034, -10812, -13984, -13383, -8451, -5031, -5968, -7254, -6808, -8108, -11402, -11016, -6168, -4570, -9571, -13874, -12980, -14103, -22506, -29235, -24357, -14347, -12914, -20125, -24372, -21559, -18387, -17960, -16011, -12601, -14795, -24201, -32112, -31091, -23456, -15170, -8859, -5851, -7701, -11905, -12264, -7134, -2184, -2105, -4624, -5359, -3759, -1683, -676, -2713, -8755, -14668, -13978, -6999, -1495, -1502, -1813, 2363, 6614, 4222, -2814, -6501, -3886, 1132, 5522, 10274, 15848, 19950, 20939, 19406, 15504, 8516, 355, -4089, -2424, 1736, 3132, 1228, -274, 611, 1751, 1044, -12, 822, 2147, 885, -2111, 912, 1410, 767, -1028, -3482, -5864, -7590, -8502, -8892, -9244, -9853, -10539, -10646, -9361, -6193, -1364, 4133, 8871, 11587, 11747, 9777, 6845, 4281, 2943, 2849, 3281, 3280, 2268, 447, -1274, -1781, -429, 2497, 5820, 8010, 7981, 5717, 2383, -165, -253, 2782, 8233, 14306, 18907, 20552, 18947, 14989, 10233, 6131, 3449, 2142, 1673, 1548, 1710, 2560, 4600, 7948, 12038, 15750, 17910, 17914, 16119, 13728, 12227, 12634, 14970, 18256, 21036, 22175, 21474, 19781, 18502, 18793, 20850, 23710, 25693, 25263, 21861, 16259, 10235, 5718, 3843, 4405, 6000, 6791, 5492, 2074, -2175, -5273, -5536, -2442, 3066, 8965, 13053, 13911, 11488, 7058, 2608, -42, 14, 2463, 5965, 8722, 9132, 6309, 300, -7979, -17010, -25036, -30442, -32112, -29698, -23759, -15669, -7276, -368, 3888, 5301, 4658, 3327, 2635, 3298, 5167, 7414, 9055, 9526, 9011, 8329, 8453, 9912, 12418, 14947, 16253, 15547, 12983, 9659, 7107, 6514, 8070, 10803, 13003, 13044, 10190, 4988, -972, -5797, -8179, -7969, -6174, -4382, -3930, -5232, -7619, -9741, -10307, -8772, -5617, -2082, 480, 1289, 498, -946, -1855, -1466, 134, 2043, 3006, 2068, -921, -5214, -9501, -12507, -13550, -12777, -11006, -9273, -8328, -8346, -8958, -9570, -9757, -9528, -9323, -9765, -11309, -13986, -17369, -20757, -23479, -25142, -25721, -25457, -24672, -23609, -22398, -21152, -20090, -19585, -20054, -21721, -24371, -27272, -29335, -29505, -27223, -22737, -17093, -11764, -8069, -6628, -7107, -8393, -9125, -8351, -6001, -2948, -611, -280, -2461, -6560, -11058, -14116, -14347, -11419, -6218, -503, 3800, 5370, 3998, 650, -2934, -4916, -4032, -23, 6323, 13469, 19648, 23386, 23893, 21209, 16124, 9921, 4023, -375, -2589, -2598, -1003, 1197, 2963, 3580, 2900, 1358, -265, -1213, -1124, -196, 912, 1561, -4648, -12890, -10729, 2174, 11664, 8334, -106, -817, 7182, 14484, 14770, 10448, 7516, 9713, 16449, 23665, 27596, 27852, 24828, 16691, 4488, -2571, 3416, 14249, 11701, -7876, -25754, -23900, -6694, 8179, 12757, 13088, 15130, 16485, 12090, 1800, -8625, -11928, -6252, 1249, 1227, -6335, -12491, -12646, -12690, -18549, -26860, -31353, -32100, -31858, -28526, -19114, -8190, -4315, -8230, -10737, -3794, 9717, 18835, 16149, 5857, -949, 178, 1561, -3444, -6390, -7309, -5953, -2661, 1667, 5811, 8640, 9566, 8839, 7491, 6920, 8251, 11768, 16715, 21594, 24820, 25438, 23511, 19987, 16114, 12731, 9833, 6696, 2484, -2975, -8740, -12928, -13533, -9489, -1439, 8241, 16268, 19784, 17591, 10684, 1813, -5732, -9551, -9116, -5877, -2471, -1464, -4219, -10398, -18259, -25534, -30401, -32112, -31032, -28185, -24602, -20849, -16916, -12485, -7332, -1650, 3899, 8391, 10981, 11207, 9141, 5364, 810, -3444, 2968, 771, -1218, -2706, -3451, -3285, -2130, -6, 2972, 6602, 10618, 14707, 18542, 21811, 24246, 25643, 25884, 24948, 22909, 19933, 16259, 12182, 8023, 4103, 714, -1905, -3592, -4272, -3962, -2774, -899, 1404, 3838, 6087, 7847, 8854, 8903, 7867, 5712, 2500, -1618, -6408, -11574, -16778, -21670, -25913, -29209, -31325, -32112, -31515, -29579, -26447, -22346, -17573, -12464, -7374, -2646, 1420, 4589, 6709, 7726, 7684, 6721, 5056, 2968, 3424, 5165, 6755, 8179, 9428, 10499, 11394, 12118, 12682, 13099, 13384, 13556, 13631, 13627, 13560, 13444, 13290, 13107, 12899, 12668, 12410, 12121, 11790, 11406, 10956, 10425, 9799, 9064, 8207, 7220, 6094, 4828, 3424, 1889, 233, -1525, -3365, -5259, -7178, -9089, -10956, -12742, -14410, -15925, -17253, -18362, -19226, -19824, -20139, -20161, -19887, -19321, -18474, -17361, -16005, -14435, -12682, -10782, -8773, -6694, -4585, -2484, -427, 1552, 3424, -15115, -19514, -13566, -1803, 6050, 9873, 14162, 15104, 6679, -5040, -8157, -3488, -3307, -11744, -18696, -14923, -2893, 9779, 18981, 23031, 20130, 11261, 1722, -3853, -6629, -11590, -20271, -26403, -21095, -4140, 12790, 18669, 16301, 16502, 21170, 21095, 10793, -4290, -17364, -27151, -31845, -26430, -11474, 3941, 13513, 19922, 24925, 22965, 11803, 321, -3551, -5277, -13810, -24990, -26263, -15187, -2193, 4878, 9002, 14643, 18659, 15455, 6563, -405, -1457, -689, -3768, -9830, -13024, -10807, -6291, -1982, 3617, 10926, 15848, 14827, 9229, 1979, -5299, -9614, -8019, -4609, -7260, -13362, -10071, 4749, 15143, 10742, 3690, 7578, 13297, 5130, -10315, -14225, -7370, -7070, -15737, -17674, -7507, 2847, 8265, 17110, 28787, 28652, 13420, -502, -3637, -7433, -20695, -32112, -29482, -18702, -9710, 374, 15444, 26374, 24569, 17424, 14831, 11175, -3055, -20780, -26564, -19668, -12761, -10748, -5992, 5594, 16918, 20923, 19915, 19514, 18926, 11971, -3171, -18548, -23847, -18941, -13592, -12071, -6023, 10098, 24866, 23696, 11346, 5458, 9829, 10226, -2182, -18567, -26695, -24077, -13832, 98, 10756, 12768, 10966, 13367, 16339, 10208, -1999, -8060, -8260, -14398, -25346, -24585, -7448, 9605, 14634, 15860, 22401, 27602, 22585, 10747, -1748, -15448, -28176, -30914, -22601, -14497, -11077, -2324, 15701, 29691, 29621, 23462, 19128, 9162, -11699, -29912, -31237, -22131, -16362, -12597, -2446, 10478, 17337, 20314, 24575, 22863, 6429, -15547, -25557, -21901, -16439, -12915, -4917, 7132, 14067, 13372, 12078, 13101, 10834, 1827, -9960, -19363, -23508, -19989, -9429, 1460, 6783, 9485, 15200, 20902, 18215, 6576, -5188, -10447, -11234, -12489, -14862, -14389, -7147, 5612, 16908, 20930, 19582, 17762, 14089, 3898, -9603, -17181, -17294, -16985, -17397, -11031, 2753, 12870, 13302, 11952, 15224, 16490, 9152, -690, -5318, -8367, -15115, -16766, -15559, -10674, -3527, 3957, 9906, 12991, 12674, 9217, 3491, -3255, -9625, -14254, -16006, -14199, -8846, -811, 8240, 16164, 20890, 21031, 16341, 7819, -2566, -12437, -19639, -22727, -21186, -15390, -6419, 4163, 14493, 22604, 26684, 25464, 18650, 7243, -6454, -19265, -27952, -30172, -25238, -14389, -447, 13028, 22778, 26717, 24374, 16807, 6130, -5147, -14719, -20896, -22795, -20371, -14341, -6035, 2840, 10521, 15568, 17193, 15422, 11029, 5236, -676, -5699, -9243, -11074, -11142, -9440, -6022, -1152, 4500, 9813, 13415, 14114, 11392, 5728, -1447, -8179, -12646, -13775, -11554, -6919, -1313, 3873, 7710, 9839, 10306, 9273, 6819, 2956, -2155, -7951, -13359, -16972, -17459, -14073, -7022, 2458, 12369, 20459, 24795, 24219, 18591, 8814, -3345, -15556, -25331, -30501, -29715, -22850, -11184, 2775, 15850, 25010, 28201, 24910, 16256, 4584, -7269, -16765, -22224, -23029, -19487, -12519, -3377, 6528, 15669, 22478, 25528, 23885, 17489, 7407, -4260, -14835, -21787, -23466, -19579, -11233, -563, 9909, 17926, 21972, 21470, 16746, 8856, -638, -9902, -17091, -20676, -19791, -14524, -6002, 3806, 12567, 18204, 19450, 16148, 9208, 280, -8713, -15994, -20205, -20526, -16720, -9178, 1028, 12145, 21919, 28004, 28571, 22919, 11857, -2348, -16484, -27243, -32112, -30025, -21571, -8749, 5602, 18479, 27314, 30399, 27126, 18081, 4990, -9499, -22264, -30355, -31745, -25953, -14312, 284, 14135, 23771, 26932, 23167, 13851, 1679, -10182, -18947, -22842, -21367, -15225, -6025, 4101, 12914, 18460, 19451, 15573, 7650, -2466, -12290, -19339, -21829, -19179, -12161, -2628, 7064, 14718, 18824, 18796, 14934, 8198, -44, -8231, -14780, -18273, -17723, -12880, -4475, 5773, 15467, 22150, 24021, 20514, 12492, 1981, -8458, -16475, -20521, -20115, -15762, -8635, -218, 7979, 14585, 18471, 18885, 15625, 9207, 908, -7432, -13840, -16766, 10683, -26069, -23201, 12744, 22821, -3951, -16797, 5190, 19873, 1024, -16469, -3620, 10113, -5085, -20699, -2135, 23408, 12247, -15813, -10639, 17409, 14098, -20027, -26210, 9706, 29119, -509, -31252, -17527, 10935, 8748, -6806, 3424, 23900, 14923, -9977, -7013, 15531, 10316, -20080, -21945, 14269, 31643, 2264, -24909, -8262, 17082, 3974, -24474, -18353, 10666, 12072, -14223, -21098, 895, 11098, -3659, -6615, 16065, 24555, -1998, -21183, 1488, 28319, 10683, -1454, -2185, -2493, -2153, -851, 1399, 3945, 5611, 5253, 2472, -1949, -6231, -8392, -7271, -3215, 1985, 5951, 6917, 4647, 535, -3184, -4686, -3578, -1093, 666, 27, -3156, -7253, -9662, -8241, -2606, 5458, 12741, 16150, 14259, 8049, 426, -5217, -6648, -3813, 1283, 5718, 7173, 5024, 469, -4289, -7302, -7852, -6646, -5188, -4768, -5661, -7003, -7372, -5682, -1878, 2984, 7272, 9606, 9487, 7419, 4495, 1766, -217, -1454, 2804, 1934, 1039, 198, -519, -1060, -1391, -1502, -1406, -1137, -746, -295, 149, 524, 773, 857, 756, 469, 20, -551, -1186, -1817, -2374, -2789, -3005, -2978, -2688, -2135, -1344, -361, 749, 1906, 3023, 4014, 4795, 5300, 5477, 5299, 4764, 3898, 2748, 1385, -104, -1621, -3066, -4340, -5359, -6054, -6379, -6315, -5869, -5076, -3995, -2706, -1301, 120, 1460, 2629, 3553, 4181, 4484, 4462, 4140, 3565, 2804, 2863, 2974, 2972, 2857, 2634, 2313, 1907, 1431, 906, 350, -213, -761, -1274, -1730, -2113, -2408, -2602, -2689, -2666, -2532, -2294, -1961, -1546, -1065, -538, 16, 573, 1113, 1614, 2055, 2419, 2692, 2863, 2923, 2870, 2706, 2435, 2068, 1618, 1101, 538, -52, -645, -1220, -1754, -2228, -2624, -2926, -3123, -3207, -3176, -3030, -2775, -2420, -1979, -1467, -906, -314, 284, 868, 1414, 1904, 2318, 2641, 2863, -1270, -581, 506, 3092, 6166, 9249, 11491, 9232, 476, -9117, -11645, -8417, -8580, -14984, -19198, -13857, -2839, 5929, 11823, 18788, 25132, 24430, 16095, 7087, 1016, -7201, -20962, -32112, -29451, -14945, -2581, 179, 1119, 9196, 19766, 21626, 13585, 4555, -534, -4804, -9193, -8479, -1283, 4364, 1258, -6733, -10301, -6568, 72, 5679, 9439, 10146, 5778, -2540, -9648, -10650, -4815, 4537, 12475, 15018, 10858, 1512, -9555, -17511, -17449, -8110, 5142, 13523, 12432, 4838, -3045, -7507, -8132, -5246, 938, 8580, 13395, 11528, 3933, -3680, -7068, -7985, -9496, -9037, -2161, 7350, 9314, 1637, -5342, -3732, 975, 779, -1090, 2614, 8175, 5340, -5746, -13731, -11948, -4651, 3048, 11003, 17805, 18273, 10741, 48, -9045, -15467, -18245, -16272, -12256, -9633, -5402, 5557, 18737, 22625, 15112, 6894, 4831, 2460, -6923, -17356, -18899, -12543, -7309, -6078, -2894, 6372, 17365, 22638, 19976, 13519, 7688, 1883, -6851, -16423, -19691, -14315, -7152, -3937, -489, 8183, 15716, 12346, 1719, -2924, 1252, 3583, -1596, -6557, -4416, 317, 1327, 275, 370, -853, -5297, -8320, -5853, -1330, 507, 928, 2792, 4458, 3661, 2560, 3919, 6516, 8090, 8226, 5557, -2140, -12172, -17548, -16154, -12538, -8234, 934, 13998, 20899, 15778, 6140, 1998, 3139, 4023, 3919, 4111, 1341, -7179, -16633, -20267, -18377, -14806, -8812, 2090, 14525, 21640, 20872, 14109, 3580, -7026, -11532, -7757, -1823, -331, -1855, -1898, -1824, -5476, -10001, -7990, 2062, 13388, 18341, 13865, 1779, -11535, -17768, -13825, -4956, 2396, 7649, 12297, 13710, 8762, 610, -4447, -5123, -4844, -5219, -5225, -5357, -7138, -9099, -7689, -1959, 5702, 12351, 15521, 13707, 8591, 4317, 2043, -1479, -7352, -11091, -9435, -5768, -3954, -1643, 4221, 9511, 7892, 999, -3613, -3126, -1270, -4702, -2675, 1550, 6462, 10331, 11863, 10598, 6903, 1642, -4246, -10004, -15049, -18782, -20436, -19140, -14257, -5843, 5040, 16373, 25644, 30559, 29740, 23114, 11903, -1725, -15179, -25944, -31994, -32112, -26162, -15261, -1732, 11299, 20690, 24267, 21620, 14312, 5312, -2200, -6135, -6301, -4279, -2419, -2467, -4551, -7119, -7878, -5260, 435, 6921, 10989, 10254, 4639, -3291, -9442, -10276, -4782, 4734, 13596, 17030, 12664, 1916, -10503, -18823, -19076, -11137, 1141, 11819, 15839, 11568, 1602, -8595, -13512, -10419, -757, 10625, 17960, 17486, 9305, -2752, -13133, -17350, -14127, -5817, 3022, 8083, 7471, 2473, -3383, -6404, -4777, 497, 6228, 8843, 6367, -453, -8463, -13638, -13054, -6308, 4278, 14689, 20937, 20647, 13845, 2715, -9393, -19201, -24446, -24277, -19148, -10430, 4, 10113, 17957, 21989, 21370, 16223, 7695, -2287, -11516, -18088, -20841, -19507, -14568, -6979, 2072, 11260, 19126, 24139, 24953, 20857, 12238, 787, -10776, -19460, -22985, -20600, -13357, -3712, 5386, 11532, 13595, 11887, 7784, 3034, -900, -3221, -3838, -3162, -1839, -537, 178, -60, -1319, -3284, -5280, -6470, -6199, -4335, -1399, 1637, 3838, 4814, 4948, 5142, 6179, 8033, 9601, 9104, 5067, -2604, -12085, -20057, -23050, -19100, -8903, 4227, 15680, 21587, 20586, 14370, 6721, 1472, 464, 2589, 4481, 2534, -4828, -15871, -26050, -30124, -24864, -10947, 7010, 22378, 29501, 26273, 15011, 1205, -9204, -12641, -9381, -3014, 1755, 1750, -2985, -9330, -12921, -10671, -2592, 8043, 16294, 18052, 12149, 994, -10559, -17516, -17043, -9654, 1238, 11060, 16194, 15417, 10065, 2995, -2992, -6408, -7451, -7424, -7665, -8637, -9665, -9396, -6671, -1294, 5716, 12478, 17000, 17939, 15044, 9143, 1778, -5299, -10576, -13057, -12405, -8976, -3764, 1777, 6076, 7914, 6865, 3524, -652, -3869, -4702, 20364, 19217, -18927, -28304, 10940, 31245, -3428, -32112, -6314, 25674, 10069, -18982, -9660, 15227, 9990, -10175, -7545, 7138, 5307, -3402, -112, 2454, -6305, -6484, 8533, 10399, -8613, -14428, 3924, 10553, -6547, -9715, 12407, 17431, -8154, -17470, 7668, 18182, -8891, -22978, 4837, 24157, -904, -23072, -234, 25676, 6945, -23207, -14054, 13467, 12113, -8573, -10891, 2435, 6263, 1704, 175, -3759, -8906, 800, 16404, 7401, -16453, -10498, 20364, 2655, -861, -3556, -4853, -4770, -3807, -2634, -1754, -1293, -1014, -522, 445, 1818, 3180, 3962, 3744, 2510, 706, -939, -1760, -1507, -510, 447, 498, -834, -3308, -5960, -7457, -6687, -3328, 1875, 7290, 10978, 11474, 8427, 2811, -3391, -7937, -9201, -6808, -1784, 3866, 7957, 8980, 6658, 1996, -3188, -7024, -8330, -7022, -4043, -879, 1117, 1293, -76, -1980, -3171, -2744, -543, 2776, 6031, 8017, 7994, 5971, 2655, 2721, 1144, -546, -2134, -3415, -4226, -4463, -4103, -3201, -1886, -339, 1226, 2596, 3589, 4075, 3995, 3369, 2291, 912, -577, -1977, -3106, -3825, -4055, -3786, -3075, -2037, -822, 403, 1485, 2298, 2769, 2878, 2661, 2199, 1600, 983, 454, 90, -74, -50, 109, 319, 482, 505, 321, -99, -735, -1520, -2348, -3086, -3601, -3776, -3535, -2857, -1781, -411, 1103, 2579, 3827, 4681, 5018, 4780, 3984, 2721, 938, 972, 970, 931, 856, 750, 615, 458, 285, 102, -83, -264, -432, -583, -708, -805, -869, -897, -889, -845, -767, -657, -520, -362, -188, -5, 179, 357, 522, 668, 789, 880, 938, 959, 943, 891, 804, 685, 539, 371, 188, -4, -198, -385, -559, -714, -843, -942, -1006, -1034, -1024, -977, -893, -778, -634, -468, -285, -92, 102, 292, 470, 628, 762, 867, 938, 4948, 4412, 9576, 11863, 5481, -1313, 1349, 7370, 3134, -9357, -13802, -5516, 767, -4723, -10455, -2583, 12460, 18395, 13405, 8951, 9566, 9373, 6996, 8708, 14828, 16360, 9666, 3652, 6462, 13270, 13918, 7128, 839, 1469, 7645, 13051, 12474, 6056, -973, -3513, -1046, 4433, 12220, 20872, 25222, 21465, 13798, 9682, 9696, 8991, 7217, 8177, 10214, 7453, 1840, 2666, 11137, 17222, 16449, 17055, 23150, 23980, 11445, -2680, -1428, 12572, 21684, 18216, 10558, 6926, 6962, 9069, 13477, 17282, 16984, 15548, 16955, 16153, 6724, -3971, -2483, 8392, 11760, 3130, -3008, 1995, 7736, 4737, 443, 3707, 8551, 7253, 6686, 15844, 27062, 26268, 15002, 6263, 3954, 2507, 2789, 11121, 23355, 26293, 16995, 6767, 3188, 805, -6625, -15853, -20526, -18777, -10848, 2256, 14467, 17557, 12176, 8194, 10482, 12479, 8291, 2827, 3210, 6682, 5263, -1060, -4021, 382, 5926, 5212, 280, -441, 5181, 8983, 4456, -2165, -278, 7978, 9765, 2279, -1338, 6543, 13253, 4336, -12854, -19258, -12047, -5972, -9010, -13480, -12884, -11707, -13913, -15217, -12868, -11916, -15317, -17214, -12447, -4965, -1143, -1495, -3601, -6539, -8343, -5754, -307, 1740, -1549, -5628, -8323, -12519, -17541, -17319, -11008, -6206, -7271, -9513, -9300, -10119, -13458, -13875, -9367, -6746, -10093, -14004, -15241, -19755, -29177, -32112, -20876, -6993, -6270, -15849, -20169, -14255, -7012, -5030, -6663, -10178, -15600, -19722, -19654, -19040, -21016, -19430, -8866, 1317, -2370, -15496, -20214, -11566, -3064, -4110, -8211, -8273, -8066, -11316, -13087, -10671, -11268, -19276, -25973, -22104, -12424, -7210, -6431, -3770, -971, -5494, -15814, -20974, -15998, -8086, -4777, -3717, 1644, 11293, 18216, 16542, 7077, -4222, -11263, -11913, -8750, -6119, -5930, -6191, -4000, 215, 2721, 1714, 748, 3906, 8709, 8931, 4948, 12166, 12548, 11350, 9179, 6881, 5025, 3580, 1957, -556, -4213, -8419, -11785, -12672, -9983, -3824, 4361, 12268, 17669, 19366, 17694, 14318, 11419, 10638, 12317, 15400, 18038, 18596, 16526, 12669, 8820, 6782, 7402, 10096, 13115, 14442, 12850, 8604, 3420, -291, -545, 3294, 10210, 17996, 24227, 27249, 26743, 23625, 19419, 15483, 12485, 10378, 8802, 7597, 7092, 7962, 10739, 15280, 20552, 24912, 26802, 25509, 21572, 16606, 12582, 10926, 11875, 14446, 17016, 18215, 17655, 16100, 14986, 15541, 17988, 21289, 23576, 23102, 19196, 12733, 5834, 910, -474, 1635, 5602, 9015, 9901, 7746, 3808, 545, 421, 4653, 12510, 21501, 28403, 30651, 27474, 20267, 12041, 6181, 5065, 9095, 16544, 24229, 28719, 27603, 20332, 8385, -5257, -17097, -24196, -25005, -19718, -10080, 1222, 11398, 18336, 21111, 20083, 16581, 12306, 8692, 6447, 5455, 5037, 4435, 3272, 1765, 584, 445, 1647, 3824, 6056, 7314, 7015, 5386, 3415, 2378, 3151, 5658, 8760, 10685, 9835, 5581, -1348, -9094, -15445, -18796, -18845, -16681, -14223, -13283, -14702, -17981, -21578, -23694, -23171, -20028, -15409, -10970, -8055, -7074, -7402, -7827, -7280, -5475, -3087, -1412, -1667, -4323, -8806, -13723, -17505, -19111, -18468, -16407, -14192, -12863, -12776, -13537, -14358, -14599, -14200, -13753, -14190, -16244, -19988, -24692, -29072, -31815, -32112, -29948, -26040, -21483, -17313, -14201, -12397, -11870, -12520, -14277, -17029, -20448, -23861, -26324, -26928, -25210, -21467, -16761, -12559, -10137, -10012, -11700, -13927, -15242, -14731, -12518, -9763, -8163, -9145, -13134, -19232, -25478, -29600, -29932, -26126, -19340, -11837, -6148, -4130, -6285, -11574, -17786, -22302, -22987, -18909, -10649, -132, 9955, 16979, 19160, 16093, 8852, -367, -8961, -14735, -16567, -14658, -10318, -5354, -1333, 988, 1825, 2094, 2837, 4650, 7377, 10216, 12166, 14809, 10291, -4004, -8032, 5535, 21523, 23540, 14338, 8106, 10855, 16955, 20146, 19872, 18654, 18776, 20828, 22974, 22975, 21138, 18376, 13175, 6221, 5457, 16758, 30076, 27340, 7622, -8032, -3601, 11178, 16211, 8192, 959, 3629, 9634, 7280, -6146, -21820, -27757, -20468, -9271, -6197, -11858, -16922, -17375, -19356, -26246, -31102, -28077, -22664, -22489, -24694, -21760, -15450, -15023, -22488, -27979, -21894, -7095, 3622, 1638, -7020, -7793, 3933, 14809, 2560, 2314, 2939, 4810, 7810, 11325, 14452, 16369, 16735, 15911, 14852, 14678, 16093, 18951, 22217, 24415, 24357, 21804, 17693, 13750, 11662, 12194, 14738, 17553, 18632, 16756, 12200, 6679, 2533, 1522, 3861, 7995, 11272, 11208, 6714, -1312, -10357, -17436, -20463, -19176, -15195, -11195, -9631, -11638, -16611, -22619, -27389, -29366, -28325, -25309, -21997, -19847, -19455, -20394, -21535, -21636, -19906, -16287, -11401, -6245, -1805, 1255, 2751, 2971, 2560, 3972, 5309, 6447, 7488, 8536, 9677, 10964, 12410, 13985, 15618, 17211, 18647, 19816, 20622, 21006, 20948, 20472, 19647, 18571, 17360, 16131, 14984, 13989, 13178, 12536, 12010, 11515, 10946, 10196, 9175, 7817, 6095, 4026, 1664, -903, -3568, -6218, -8749, -11080, -13161, -14974, -16534, -17881, -19066, -20139, -21138, -22076, -22936, -23670, -24205, -24451, -24317, -23724, -22622, -20997, -18880, -16347, -13510, -10508, -7491, -4599, -1949, 377, 2346, 3972, 2799, 4967, 7004, 8891, 10614, 12164, 13535, 14726, 15739, 16581, 17258, 17782, 18162, 18410, 18536, 18551, 18462, 18276, 17996, 17626, 17164, 16609, 15955, 15197, 14328, 13342, 12231, 10991, 9616, 8107, 6464, 4691, 2799, 799, -1292, -3453, -5658, -7881, -10089, -12250, -14328, -16289, -18097, -19719, -21123, -22280, -23168, -23766, -24060, -24041, -23708, -23064, -22120, -20892, -19400, -17673, -15739, -13634, -11392, -9054, -6656, -4236, -1832, 524, 2799, 24744, 18443, 10551, 1402, -8683, -17901, -24528, -28998, -32112, -31994, -25810, -14552, -3021, 5784, 13400, 21659, 28533, 30611, 27802, 22765, 16754, 9014, 70, -7511, -12532, -16851, -21997, -25934, -25302, -19982, -13144, -6978, -695, 6586, 13126, 16382, 16286, 14897, 13348, 11049, 7904, 5351, 4335, 3545, 874, -3987, -9347, -13452, -15635, -15763, -13682, -9692, -4927, -600, 3007, 6317, 9269, 11015, 11087, 10232, 9382, 8197, 5673, 2041, -1206, -3523, -6205, -10161, -13839, -14671, -12088, -7890, -3790, 226, 4830, 9534, 12601, 12768, 10764, 8692, 7666, 6689, 4586, 2113, 559, -1163, -5476, -11887, -16510, -16980, -15156, -13237, -10020, -3806, 3238, 7264, 8117, 8948, 10950, 12079, 11210, 10081, 10048, 9662, 6919, 1996, -3449, -8250, -12040, -14667, -15951, -15276, -11637, -5336, 777, 3591, 3237, 2484, 2733, 2768, 1760, 1111, 2278, 4545, 6160, 6485, 6079, 5505, 4834, 3900, 2756, 2020, 2161, 2045, -516, -5653, -10366, -12247, -12557, -13246, -12720, -8056, -331, 6275, 10409, 14398, 18786, 20358, 17083, 11269, 5905, 1006, -4399, -9557, -13458, -16630, -19317, -19940, -17403, -13027, -8296, -2508, 5354, 14037, 21166, 25498, 26424, 22989, 15444, 6441, -1298, -7547, -13309, -18244, -21044, -21352, -19659, -16083, -10600, -3828, 3456, 10817, 17485, 22181, 24208, 23528, 19533, 11570, 1248, -7936, -14217, -18740, -22201, -22904, -19676, -14222, -8608, -2566, 4541, 11162, 15351, 17398, 18272, 17094, 12744, 6607, 994, -4063, -9778, -15269, -18034, -17298, -14431, -10383, -5059, 1011, 6569, 11118, 14640, 16147, 14495, 10412, 5761, 1045, -4374, -9824, -13344, -14321, -14035, -13174, -10691, -5742, 807, 7469, 13439, 18195, 20897, 20852, 17962, 12463, 4892, -3586, -11512, -17952, -22507, -24678, -23870, -19925, -13204, -4500, 4757, 12874, 19139, 24005, 27433, 28024, 24744, 24195, 18588, 10843, 1618, -8204, -17563, -25322, -30431, -32112, -30019, -24334, -15753, -5386, 5422, 15305, 23076, 27901, 29391, 27630, 23106, 16582, 8930, 974, -6608, -13304, -18713, -22470, -24202, -23575, -20427, -14935, -7723, 161, 7450, 12984, 16050, 16584, 15154, 12705, 10174, 8124, 6570, 5055, 2943, -204, -4343, -8889, -12893, -15383, -15721, -13813, -10109, -5412, -597, 3641, 6916, 9136, 10390, 10817, 10517, 9533, 7878, 5584, 2726, -562, -4078, -7538, -10555, -12650, -13327, -12209, -9211, -4662, 691, 5844, 9827, 12005, 12282, 11096, 9204, 7332, 5864, 4690, 3303, 1094, -2283, -6651, -11278, -15089, -17044, -16518, -13529, -8727, -3161, 2081, 6199, 8871, 10247, 10769, 10918, 10979, 10924, 10431, 9041, 6377, 2355, -2693, -8026, -12650, -15585, -16162, -14256, -10368, -5496, -845, 2551, 4153, 4058, 2916, 1638, 1024, 1463, 2819, 4544, 5964, 6588, 6307, 5397, 4344, 3563, 3178, 2947, 2374, 952, -1570, -5026, -8827, -12119, -14030, -13922, -11555, -7138, -1278, 5151, 11171, 15861, 18512, 18742, 16565, 12379, 6874, 859, -4922, -9939, -13916, -16765, -18440, -18800, -17565, -14406, -9152, -2014, 6275, 14507, 21244, 25182, 25526, 22213, 15917, 7840, -645, -8331, -14410, -18517, -20620, -20835, -19263, -15945, -10925, -4394, 3165, 10932, 17826, 22709, 24649, 23168, 18381, 11000, 2184, -6703, -14366, -19812, -22485, -22289, -19518, -14729, -8616, -1903, 4708, 10563, 15077, 17767, 18312, 16617, 12862, 7512, 1259, -5078, -10676, -14827, -17028, -17026, -14835, -10738, -5261, 868, 6796, 11664, 14755, 15625, 14204, 10796, 6004, 582, -4723, -9290, -12673, -14584, -14847, -13365, -10140, -5332, 668, 7200, 13383, 18251, 20938, 20873, 17910, 12363, 4951, -3340, -11410, -18205, -22847, -24727, -23579, -19510, -12994, -4813, 4050, 12558, 19757, 24891, 27460, 27226, 24195, 25848, -10725, -32112, -6085, 27549, 20169, -14099, -25466, -2497, 19195, 13171, -6768, -14210, -4092, 8607, 9670, -1188, -10850, -6015, 8995, 13627, -1257, -16520, -10025, 9783, 15481, 1230, -11388, -8374, 164, 3378, 5146, 7159, 807, -11118, -8976, 10018, 17389, -3264, -22477, -7439, 21171, 17540, -14134, -23105, 5498, 24884, 3330, -23291, -11653, 17207, 15019, -12199, -16850, 7500, 16702, -5408, -18388, 3163, 22811, 3975, -24517, -13801, 22105, 25848, 1584, 1378, 302, -1226, -2411, -2557, -1511, 202, 1650, 2022, 1114, -533, -1925, -2188, -1087, 822, 2492, 2982, 2008, 105, -1682, -2407, -1790, -381, 769, 758, -588, -2542, -3848, -3439, -1093, 2345, 5338, 6437, 5055, 1800, -1808, -4107, -4125, -2050, 925, 3256, 3852, 2591, 291, -1820, -2796, -2453, -1375, -479, -428, -1241, -2311, -2813, -2228, -666, 1197, 2524, 2805, 2135, 1114, 452, 511, 1092, 1584, 1011, 523, 5, -481, -878, -1139, -1238, -1167, -941, -594, -177, 253, 637, 924, 1074, 1070, 913, 623, 240, -187, -603, -957, -1206, -1323, -1296, -1133, -856, -500, -108, 279, 623, 896, 1079, 1170, 1176, 1110, 994, 848, 690, 530, 374, 218, 56, -121, -320, -543, -784, -1029, -1255, -1436, -1543, -1548, -1435, -1196, -840, -391, 115, 629, 1099, 1474, 1712, 1784, 1681, 1413, 1011, 608, 633, 632, 609, 562, 494, 408, 307, 196, 78, -41, -158, -266, -363, -444, -507, -548, -567, -562, -534, -483, -413, -325, -223, -111, 6, 125, 239, 345, 438, 515, 573, 608, 621, 609, 574, 516, 437, 341, 231, 111, -15, -141, -263, -377, -478, -562, -627, -668, -686, -680, -649, -594, -519, -424, -316, -196, -70, 58, 182, 299, 403, 492, 561, 608, 12034, -2534, -3891, 5477, 5030, -7183, -9502, 5592, 16055, 5620, -10116, -11181, -5370, -9953, -18126, -10613, 9366, 20143, 15976, 11033, 10224, 2713, -11631, -15192, -1735, 9286, 1042, -15163, -18100, -7704, -1281, -5973, -11252, -7016, 3867, 12587, 14853, 11627, 5217, -1815, -5945, -3814, 4469, 13412, 16150, 11927, 6573, 3642, 259, -4524, -4744, 1479, 3828, -5624, -16216, -12264, 1446, 5794, -2443, -7272, -3029, -4519, -18985, -29573, -20780, -2550, 7188, 8963, 13028, 17157, 13043, 5791, 7038, 14387, 16030, 11170, 8211, 7028, 1020, -6804, -8009, -5928, -10013, -15914, -11683, -2087, -3989, -16413, -19294, -6594, 3958, 2444, 3501, 18340, 32112, 26577, 8126, -4879, -8763, -10489, -8991, 234, 10338, 11116, 5804, 3849, 3107, -4535, -15401, -18790, -15297, -13644, -12692, -4275, 7717, 9314, -1336, -10644, -10793, -8174, -7340, -2936, 6431, 11348, 6947, 2690, 7696, 16339, 17975, 13138, 10368, 12120, 12672, 7487, -1850, -10631, -14907, -13768, -9679, -4874, 1717, 9768, 12050, 1862, -13976, -19336, -8929, 4689, 8352, 3956, 1460, 3713, 4992, -21, -10859, -21090, -21206, -7564, 9647, 15128, 7685, 1290, 3665, 6020, 899, -3139, 3490, 12814, 10976, 1089, -2258, 2690, 3509, -3864, -8637, -4730, -1052, -5292, -10525, -7145, 1634, 6336, 6538, 9064, 14308, 14464, 5652, -5735, -10932, -8490, -3947, -2570, -4647, -7081, -7767, -7225, -6043, -2726, 3784, 10318, 11104, 4001, -6491, -13014, -11288, -2885, 6176, 9902, 7109, 1805, -1873, -3777, -5577, -6844, -6013, -3373, 170, 5480, 12272, 15431, 9758, -1432, -7988, -4924, 1918, 4585, 2955, 2019, 2345, -1006, -9617, -16588, -13826, -2707, 6859, 8771, 7660, 10199, 13768, 10335, -227, -8871, -10183, -8132, -6752, -4076, 372, 1248, -3159, -5842, -2766, -412, -2680, -827, 10877, 19757, 12034, 15042, 10310, 3155, -3364, -6402, -4727, 565, 6435, 9290, 6757, -1011, -11168, -19319, -21486, -16000, -4400, 9127, 19528, 23091, 19017, 9644, -778, -8139, -10344, -8105, -4312, -2340, -4189, -9402, -15314, -18453, -16385, -9033, 1198, 10533, 15609, 15034, 9949, 3373, -1313, -1945, 1539, 7285, 12598, 15275, 14536, 11113, 6582, 2411, -733, -3048, -5093, -7118, -8714, -9032, -7470, -4361, -1175, -1, -2473, -8714, -16900, -23793, -26085, -21937, -11941, 995, 12870, 20321, 22055, 19262, 14831, 11777, 11686, 13974, 16314, 15991, 11458, 3259, -6162, -13666, -17008, -15967, -12412, -9270, -8904, -11761, -16009, -18369, -15784, -7088, 6142, 20008, 29831, 32112, 26044, 13901, 137, -10391, -14299, -10904, -2322, 7503, 14399, 15511, 10248, 321, -11023, -20230, -24663, -23407, -17449, -9218, -1675, 2717, 2827, -804, -6223, -10839, -12441, -10055, -4291, 2974, 9462, 13517, 14818, 14410, 14033, 15051, 17552, 20109, 20400, 16451, 7884, -3506, -14221, -20485, -19974, -13038, -2742, 6378, 10327, 7500, -526, -9692, -15352, -14490, -7201, 3294, 12122, 15034, 10400, -22, -11892, -20276, -21849, -16281, -6200, 4183, 11065, 12676, 9814, 5118, 1560, 960, 3251, 6784, 9401, 9625, 7344, 3663, 109, -2292, -3520, -4371, -5731, -7786, -9692, -9934, -7211, -1344, 6331, 13365, 17237, 16517, 11537, 4228, -2813, -7535, -9291, -8916, -8016, -7900, -8764, -9598, -8878, -5633, -269, 5371, 8812, 8238, 3573, -3249, -9069, -10981, -7806, -791, 6863, 11467, 10608, 4365, -4637, -12389, -15324, -11950, -3529, 6524, 14203, 16697, 13566, 6788, -284, -4536, -4495, -896, 3800, 6657, 5668, 683, -6533, -13076, -16145, -14186, -7495, 1919, 11108, 17244, 18572, 14931, 7705, -726, -7831, -11767, -11947, -9145, -5110, -1819, -639, -1742, -4027, -5624, -4797, -857, 5345, 11646, 15472, 15042, 16679, 6543, -10403, -8976, 6841, 10461, -5730, -18613, -9358, 10036, 17120, 10299, 3236, -1469, -11914, -22923, -15425, 12418, 32112, 18401, -14536, -28486, -9676, 16223, 20564, 5729, -7405, -11422, -14120, -15349, -4075, 17665, 27715, 12800, -9412, -13303, -1252, 2891, -7348, -11644, 2298, 16492, 10051, -7253, -9583, 4846, 11696, -834, -14207, -9575, 3495, 4412, -5108, -5756, 5999, 11498, 943, -9460, -3289, 8837, 5799, -9097, -11706, 4609, 16679, 18075, 20491, 12232, -2985, -17468, -23622, -18072, -3532, 12624, 22293, 20911, 9712, -5192, -16284, -18674, -12417, -1968, 6756, 9845, 7346, 2656, -117, 934, 4220, 5802, 2263, -6538, -16686, -22067, -17940, -4131, 14136, 28477, 31612, 21337, 1989, -17529, -28184, -25360, -11093, 7174, 20584, 23384, 15562, 2288, -9334, -14230, -11800, -5586, -578, 63, -3152, -6682, -6579, -1362, 6721, 12906, 12893, 5755, -5079, -13511, -14255, -6096, 7059, 18075, 2379, 1407, 428, -468, -1204, -1721, -1982, -1980, -1735, -1291, -712, -73, 543, 1060, 1414, 1558, 1469, 1151, 631, -40, -795, -1554, -2239, -2772, -3091, -3151, -2930, -2430, -1679, -725, 362, 1503, 2609, 3596, 4383, 4904, 5113, 4984, 4515, 3730, 2672, 1409, 21, -1402, -2765, -3975, -4950, -5623, -5946, -5896, -5477, -4719, -3677, -2424, -1054, 335, 1643, 2776, 3657, 4229, 4463, 4355, 3933, 3250, 2379, 2366, 2460, 2461, 2368, 2186, 1923, 1589, 1197, 764, 307, -157, -609, -1032, -1409, -1725, -1968, -2129, -2201, -2181, -2071, -1875, -1601, -1259, -863, -428, 27, 487, 931, 1342, 1705, 2004, 2228, 2366, 2414, 2368, 2230, 2004, 1699, 1325, 896, 428, -60, -552, -1028, -1471, -1864, -2191, -2441, -2604, -2674, -2648, -2526, -2315, -2020, -1654, -1230, -764, -274, 222, 707, 1161, 1567, 1912, 2181, 2366, 697, -2756, -1481, 6068, 8495, 3972, 6108, 15513, 11807, -8561, -15651, 7126, 28008, 13288, -15755, -14828, 12182, 22544, 6406, -3194, 6259, 6434, -15418, -29121, -14069, 3074, -6863, -27129, -25516, -7710, -3636, -16351, -20335, -4530, 13778, 18426, 13548, 9763, 9043, 8344, 7230, 7944, 12772, 21007, 26434, 22576, 12351, 5285, 3762, 1760, -1975, -2618, -2467, -9118, -17685, -14368, -2758, -3582, -19373, -25266, -9853, 1661, -12591, -32112, -24046, 5281, 20788, 10353, -5058, -8181, -3608, 275, 2869, 3685, 2280, 4412, 11766, 12203, -1113, -11132, -1203, 12988, 5501, -14281, -13776, 7865, 16177, -2160, -18644, -11471, 2048, 794, -4766, 3021, 15112, 13387, 3451, 3145, 11155, 11869, 3494, -680, 4819, 10811, 7866, -3913, -16841, -20990, -13733, -7290, -15543, -30490, -28829, -7771, 6818, -977, -12990, -8124, 4079, 3605, -4157, 388, 15513, 21308, 12957, 5971, 9703, 16844, 19628, 19220, 18568, 19019, 22062, 24120, 16238, -308, -9081, -2767, 1600, -10028, -21508, -11423, 7684, 5511, -17465, -30079, -18527, -3107, -2707, -10800, -14000, -10397, -2280, 8335, 12326, 2471, -8196, -537, 17099, 17347, -985, -8400, 6455, 17922, 8020, -4135, 921, 8370, -990, -12889, -4557, 12101, 8060, -13339, -19970, -1058, 18156, 15589, 202, -6907, -164, 10649, 15977, 14186, 9504, 6107, 2893, -3634, -10844, -11915, -8233, -8957, -14774, -15748, -10327, -9792, -16317, -16074, -5143, -754, -11529, -19269, -10350, -1860, -10522, -18137, -1205, 23270, 20922, -2295, -7897, 13110, 28709, 20297, 7781, 9970, 16825, 15662, 12704, 12580, 5558, -8409, -10860, 2413, 7254, -10010, -26188, -17993, -1378, -5349, -24681, -30258, -15817, -3331, -5289, -9195, -2131, 10768, 17564, 14464, 5343, -3571, -6242, -1123, 6628, 11145, 11247, 7529, 737, -3964, -197, 8300, 9974, 3006, -1829, 67, 697, 411, 1289, 2826, 4719, 6611, 8179, 9168, 9389, 8726, 7202, 5084, 2939, 1545, 1623, 3457, 6610, 9912, 11810, 10992, 7003, 535, -6789, -13093, -17073, -18559, -18500, -18368, -19254, -21152, -22833, -22422, -18412, -10602, -441, 9456, 16416, 18919, 17310, 13633, 10666, 10613, 14085, 19858, 25498, 28506, 27424, 22372, 14827, 6830, 75, -4674, -7610, -9457, -10915, -12317, -13645, -14798, -15857, -17098, -18731, -20540, -21723, -21142, -17911, -12042, -4729, 1966, 5970, 6201, 3183, -1086, -4031, -3736, 81, 5884, 11040, 13107, 11050, 5753, -417, -4797, -5737, -3384, 456, 3295, 3252, 11, -5031, -9475, -11093, -8879, -3460, 3281, 9129, 12523, 13127, 11767, 9844, 8572, 8428, 9036, 9457, 8684, 6059, 1474, -4662, -11587, -18355, -23967, -27508, -28320, -26233, -21734, -15949, -10332, -6143, -3917, -3207, -2784, -1237, 2273, 7526, 13283, 17888, 20142, 19989, 18625, 17915, 19386, 23307, 28358, 32107, 32112, 27109, 17721, 6289, -4087, -10864, -13089, -11688, -8889, -7106, -7833, -11073, -15510, -19276, -20875, -19801, -16593, -12391, -8291, -4866, -2080, 435, 2961, 5424, 7418, 8495, 8505, 7762, 6906, 6546, 6890, 7589, 7910, 7132, 4979, 1812, -1494, -3955, -4933, -4402, -2906, -1228, 31, 744, 1277, 2236, 4095, 6890, 10146, 13031, 14674, 14469, 12243, 8259, 3076, -2622, -8163, -12971, -16597, -18761, -19402, -18722, -17176, -15380, -13945, -13291, -13514, -14357, -15304, -15738, -15118, -13116, -9688, -5075, 238, 5618, 10416, 14126, 16537, 17807, 18393, 18851, 19543, 20398, 20864, 20112, 17432, 12655, 6369, -215, -5728, -9245, -10734, -11099, -11753, -13897, -17843, -22721, -26746, -27958, -25109, -18279, -8938, 588, 8001, 11875, 12092, 9724, 6449, 3824, 2727, 3188, 4607, 6177, 7280, 7669, 7420, 6743, 5809, 4691, 3423, 2111, 981, 333, 411, 5895, 6593, 5771, 8720, 9978, -1556, -20811, -26850, -10292, 14046, 27109, 24517, 11134, -7779, -23186, -24245, -11829, 741, 5263, 5320, 3452, -2517, -7054, 605, 15165, 15431, -5089, -25472, -25546, -9827, 7152, 21299, 31307, 27730, 6948, -15787, -22880, -15023, -3690, 5823, 11834, 9108, -1382, -5987, 3606, 14669, 10020, -7465, -20904, -22780, -17734, -7935, 8243, 24243, 26196, 9242, -14483, -26786, -19679, -1549, 11260, 10701, 4226, 2773, 5895, 27993, 23768, 12750, -1329, -13672, -20121, -18644, -10034, 2416, 14138, 20925, 20372, 12619, 201, -12903, -22611, -26022, -22249, -12607, -158, 11225, 17999, 18015, 11214, -249, -12556, -21360, -23207, -16803, -3651, 12257, 25691, 31995, 28812, 17057, 704, -14594, -23550, -23188, -13926, 612, 14973, 23891, 24170, 15738, 1538, -13634, -24853, -28714, -24356, -13586, -138, 11599, 17986, 17229, 9885, -1354, -12507, -19575, -19835, -12791, -424, 13372, 24056, 27993, 10620, 10270, 9478, 8345, 6985, 5504, 3995, 2526, 1135, -168, -1395, -2570, -3719, -4855, -5977, -7054, -8034, -8841, -9386, -9582, -9353, -8649, -7455, -5801, -3758, -1439, 1018, 3455, 5716, 7659, 9172, 10182, 10656, 10609, 10089, 9173, 7953, 6526, 4976, 3374, 1768, 186, -1360, -2869, -4336, -5751, -7087, -8296, -9313, -10061, -10456, -10422, -9903, -8874, -7348, -5382, -3074, -557, 2013, 4470, 6657, 8440, 9722, 10450, 10620, 9656, 9954, 9869, 9406, 8582, 7429, 5992, 4326, 2495, 570, -1374, -3264, -5026, -6593, -7904, -8909, -9569, -9859, -9767, -9297, -8468, -7311, -5871, -4204, -2372, -448, 1495, 3382, 5140, 6702, 8006, 9004, 9656, 9937, 9835, 9355, 8515, 7347, 5895, 4216, 2372, 436, -1519, -3418, -5187, -6760, -8075, -9082, -9743, -10032, -9937, -9464, -8629, -7465, -6016, -4338, -2495, -558, 1398, 3300, 5074, 6651, 7972, 8987, 9656, 148, -3052, -5484, -5252, -1966, 4077, 10793, 13427, 8368, -1780, -10049, -12631, -11391, -8349, -2262, 6725, 13217, 11835, 4204, -3369, -7381, -8072, -4806, 3407, 12329, 13476, 3736, -9653, -16748, -14926, -8606, -1629, 5931, 13868, 18651, 16038, 5817, -7136, -16368, -18201, -13188, -4446, 4417, 10149, 10790, 7276, 3094, 857, -60, -1345, -2842, -3848, -5489, -8449, -9401, -3956, 6565, 15225, 17070, 12894, 4865, -6474, -18329, -23512, -16700, -931, 15071, 24087, 22968, 11858, -4784, -18544, -22811, -17652, -6919, 6468, 18829, 23162, 14748, -1626, -15444, -20796, -18165, -8264, 7918, 22695, 24279, 9829, -9953, -22674, -25130, -19400, -5707, 13875, 29574, 30406, 15819, -4573, -21346, -29944, -27350, -12244, 9827, 27394, 32112, 24028, 7769, -11495, -26979, -31004, -21290, -4161, 11306, 20232, 21455, 14378, 869, -11941, -16097, -10527, -1114, 6592, 11111, 11647, 6133, -4602, -14141, -15768, -9176, 799, 10366, 17884, 20065, 12873, -1723, -14419, -17684, -13432, -7999, -2443, 6510, 16983, 20428, 12108, -1792, -11047, -12120, -8689, -4471, -25, 4486, 7480, 7397, 3836, -2335, -8200, -9424, -4425, 2773, 6424, 5194, 2062, -734, -3266, -4968, -3914, 141, 4742, 7382, 7125, 3845, -1372, -5256, -4942, -1753, 596, 1266, 2026, 1969, -2273, -9659, -13227, -8279, 1931, 11274, 17198, 18850, 13527, 441, -14502, -22919, -21933, -14359, -3201, 9260, 18478, 19461, 12189, 1573, -7839, -13779, -14201, -8333, 119, 5511, 6650, 6496, 5536, 1004, -6067, -9053, -4349, 2813, 5045, 1857, -1804, -3065, -2817, -1935, -240, 1450, 1793, 1117, 525, -272, -1529, -1227, 2206, 5701, 4077, -2900, -9595, -11376, -8931, -4548, 2004, 10988, 18661, 19524, 12306, 1215, -8589, -14588, -16067, -12598, -5089, 3128, 8310, 9355, 7778, 5103, 1852, -999, -1714, -99, 1342, 148, -1164, -3793, -5457, -4541, -637, 4966, 9716, 11013, 7594, 362, -7830, -13415, -13790, -8631, -142, 7913, 11986, 10441, 4355, -3013, -7848, -7693, -2709, 4363, 9563, 9720, 4128, -4965, -13337, -16780, -13162, -3540, 8223, 17170, 19487, 14219, 3645, -7813, -15609, -17044, -12277, -3971, 4159, 9124, 9864, 7372, 3770, 964, -371, -917, -1958, -4238, -7180, -8986, -7642, -2294, 5825, 13545, 17073, 13904, 4365, -8100, -18194, -21118, -14936, -1753, 12947, 22648, 22775, 12933, -2738, -17316, -24227, -20309, -7343, 8697, 20391, 22336, 13701, -1358, -15641, -22319, -18201, -5288, 10133, 20468, 20458, 9757, -6800, -21394, -26882, -20200, -3912, 14855, 27617, 28418, 16599, -2820, -21344, -30783, -26899, -11286, 9357, 26193, 32112, 24767, 7475, -12372, -26587, -29692, -21105, -5118, 11208, 21212, 21442, 12885, 198, -10604, -14898, -11395, -2474, 7147, 12703, 11575, 4401, -5327, -12934, -14717, -9596, 421, 11141, 18012, 18068, 11163, 7, -10992, -17544, -17196, -10263, 387, 10555, 16416, 15998, 9866, 761, -7608, -12094, -11334, -6178, 806, 6515, 8647, 6619, 1703, -3651, -6974, -6892, -3694, 890, 4564, 5586, 3590, -266, -3899, -5347, -3750, 208, 4628, 7337, 6977, 3699, -889, -4530, -5473, -3405, 338, 3421, 3732, 572, -4811, -9668, -11034, -7256, 978, 10664, 17651, 18468, 11996, 172, -12639, -21407, -22562, -15559, -3150, 9758, 18174, 19092, 12669, 2008, -8310, -14241, -13938, -8332, -460, 6077, 8748, 7081, 2600, -2144, -4915, -4809, -2500, 331, 2013, 1765, 14, -1988, -2959, -2339, -568, 1244, 2027, 1421, -2, -1103, -920, 648, 2644, 3511, 2000, -1965, -6964, -10567, -10457, -5665, 2715, 11757, 17857, 18298, 12527, 2503, -8078, -15331, -16816, -12500, -4622, 3435, 8695, 9826, 7485, 3701, 652, -468, 71, 929, 686, -1164, 28926, -491, -21086, -6348, 13742, 7408, -10128, -9653, 3340, 5113, -3839, -5481, 1218, 3082, 325, 3019, 7373, 2521, -5516, -3669, 852, -7577, -19170, -10356, 12071, 15386, -5559, -17528, -3112, 12381, 6693, -3188, 3922, 14757, 9268, -803, 3632, 9429, -4050, -19366, -5670, 22444, 20893, -10657, -24097, -1035, 17039, -822, -23611, -13074, 10890, 6393, -17391, -17624, 6000, 10571, -13231, -21639, 7283, 32112, 14289, -17044, -11297, 21738, 28926, 6612, 4297, 1583, -927, -2557, -2936, -2260, -1223, -639, -921, -1781, -2349, -1705, 473, 3527, 6002, 6346, 3780, -1140, -6641, -10518, -11215, -8627, -4164, -29, 1944, 1261, -988, -2743, -2153, 1349, 6642, 11442, 13471, 11663, 6751, 921, -3285, -4237, -1993, 1808, 4854, 5363, 2943, -1313, -5505, -7968, -8097, -6548, -4742, -4006, -4839, -6691, -8327, -8537, -6757, -3310, 851, 4659, 7407, 8923, 9415, 9151, 8234, 6612, 6872, 4918, 2680, 448, -1500, -2935, -3705, -3759, -3150, -2024, -602, 859, 2099, 2897, 3102, 2653, 1590, 48, -1765, -3596, -5186, -6302, -6775, -6521, -5549, -3961, -1937, 294, 2486, 4409, 5878, 6780, 7077, 6812, 6094, 5073, 3916, 2779, 1780, 985, 398, -29, -387, -786, -1327, -2082, -3072, -4254, -5528, -6740, -7711, -8259, -8233, -7539, -6159, -4164, -1711, 976, 3628, 5967, 7745, 8773, 8951, 8282, 6872, 4471, 4652, 4655, 4482, 4140, 3645, 3016, 2278, 1462, 599, -276, -1129, -1927, -2638, -3235, -3694, -3998, -4134, -4098, -3891, -3521, -3003, -2358, -1611, -792, 68, 933, 1770, 2546, 3229, 3792, 4212, 4471, 4559, 4470, 4206, 3777, 3198, 2489, 1677, 792, -133, -1064, -1965, -2803, -3545, -4165, -4637, -4945, -5077, -5027, -4797, -4396, -3839, -3146, -2344, -1462, -534, 407, 1324, 2184, 2954, 3607, 4119, 4471, -5009, -5790, 5778, 12610, 5582, -1569, 2099, 4558, -6923, -20374, -16481, -127, 6496, -3217, -13313, -9803, 3670, 15597, 19606, 15467, 6279, -2270, -4820, -622, 6054, 8704, 2803, -8121, -12215, -3002, 8157, 5042, -7884, -8707, 8798, 22905, 14810, -4599, -13064, -8286, -3351, -1169, 6195, 17317, 20449, 13040, 5410, 3014, 203, -5215, -6043, -336, 1353, -7575, -16417, -11572, 2493, 9568, 6180, 5336, 13038, 15579, 711, -18638, -17951, 4162, 22015, 17508, 2592, -1991, 3971, 6432, 2703, 3218, 11356, 17880, 16092, 9523, 3194, -1946, -4901, -4448, -3257, -3899, -2724, 3180, 6758, 213, -10246, -12079, -5616, -1052, 642, 6883, 15027, 13444, 2327, -4908, -3406, -1549, -1097, 6794, 20164, 22138, 7459, -6545, -6782, -3949, -12274, -26263, -32112, -28210, -19969, -7385, 7547, 13481, 5472, -2789, 1777, 10592, 8391, -609, -843, 7331, 9403, 2836, 670, 7747, 12597, 8210, 4275, 10212, 18679, 16693, 5433, -2027, 322, 4635, 2591, -2020, 763, 11602, 18745, 12190, -3384, -13579, -10250, 777, 6812, 849, -11519, -16737, -8066, 4092, 3349, -9795, -16640, -6924, 5891, 6004, -768, 269, 6668, 5231, -2232, -1566, 7440, 9714, 1308, -4361, -728, 1959, -2877, -6898, -3951, -907, -2972, -4307, -1704, -1949, -7088, -8011, -1466, 2377, -1535, -3812, -223, -2724, -17382, -28481, -21488, -7279, -4867, -11870, -11994, -3236, 1672, -1925, -6233, -7380, -9652, -13953, -16048, -15848, -16151, -13508, -3078, 8191, 6732, -7347, -17088, -9977, 6364, 14454, 7151, -6518, -12678, -7103, 1096, 561, -8058, -13009, -7777, 24, 720, -2757, -352, 8257, 11753, 3372, -8482, -10325, -861, 7354, 4410, -3461, -1982, 11291, 22829, 20880, 9207, -1626, -7976, -10478, -6474, 3639, 9439, 3074, -6310, -4742, 4689, 7982, 4126, 4163, 8243, 4894, -5009, 3468, 4776, 5654, 5584, 4408, 2327, -264, -3006, -5690, -8203, -10333, -11614, -11362, -8964, -4303, 1928, 8265, 12940, 14601, 12953, 8954, 4411, 1131, 49, 796, 1961, 1948, -30, -3379, -6323, -6844, -3864, 1966, 8357, 12390, 11968, 6973, -511, -7072, -9550, -6547, 901, 9815, 16691, 19092, 16645, 10952, 4559, -418, -3233, -4559, -5673, -7362, -9225, -9844, -7726, -2459, 4665, 11008, 13826, 11748, 5664, -1536, -6316, -6270, -1381, 5939, 12087, 14163, 11512, 6080, 1367, 516, 4553, 11731, 18356, 20679, 16876, 8062, -2200, -9657, -11474, -7620, -809, 4943, 6395, 2714, -4157, -10548, -12963, -9843, -2320, 6391, 12587, 13855, 10138, 3651, -2266, -4718, -2507, 3456, 10682, 16197, 17680, 14178, 6237, -4462, -15672, -25130, -30988, -32112, -28307, -20439, -10335, -388, 7118, 10755, 10456, 7508, 3977, 1787, 1884, 3906, 6510, 8210, 8247, 7033, 5902, 6296, 8840, 12831, 16464, 17719, 15453, 10117, 3674, -1265, -2681, -138, 4985, 10143, 12827, 11717, 7231, 1212, -4036, -6861, -6958, -5346, -3690, -3366, -4774, -7222, -9384, -10050, -8740, -5891, -2551, 200, 1774, 2272, 2292, 2497, 3212, 4256, 5091, 5155, 4195, 2398, 289, -1546, -2730, -3230, -3307, -3334, -3585, -4117, -4768, -5250, -5289, -4742, -3673, -2381, -1371, -1264, -2620, -5703, -10262, -15445, -19932, -22320, -21646, -17841, -11893, -5601, -968, 532, -1482, -6171, -11825, -16547, -18967, -18675, -16219, -12716, -9302, -6679, -4962, -3833, -2866, -1816, -738, 104, 425, 88, -858, -2248, -3904, -5672, -7367, -8680, -9153, -8308, -5898, -2173, 2033, 5493, 7024, 6016, 2784, -1445, -4943, -6143, -4263, 365, 6413, 12053, 15620, 16158, 13675, 9033, 3576, -1318, -4609, -5802, -4966, -2630, 398, 3247, 5197, 5874, 5344, 4086, 2803, 2139, 2410, 3468, 11889, 3510, -11814, -12075, 5488, 17124, 8105, -5643, -4005, 8291, 14055, 9478, 2524, -2187, -3498, 1129, 9941, 15419, 15028, 12882, 8015, -3491, -12305, -2765, 17843, 20327, -4925, -29843, -26563, -3312, 13868, 17182, 16519, 16986, 15441, 10573, 2797, -7944, -15581, -10469, 3807, 10078, 2044, -6536, -5783, -5155, -13772, -23099, -23073, -19503, -20592, -20527, -11973, -2519, -3020, -9200, -8882, -90, 9237, 12824, 9473, 2380, -288, 6175, 11889, 4306, 1697, -1000, -2699, -2264, 723, 5449, 10043, 12419, 11411, 7514, 2771, -221, 318, 4360, 10046, 14672, 16152, 14132, 10093, 6378, 4708, 5065, 5681, 4172, -777, -8194, -14879, -16857, -11543, 551, 15562, 27758, 32112, 26706, 13736, -1444, -12781, -16290, -11783, -2737, 5542, 8498, 4342, -5412, -17003, -26408, -31157, -31116, -28005, -24084, -20850, -18438, -15937, -12295, -7166, -1213, 4281, 8146, 9931, 9997, 9105, 7848, 6327, 4306, 8847, 6888, 4842, 2996, 1596, 833, 816, 1571, 3030, 5048, 7416, 9884, 12188, 14080, 15350, 15854, 15523, 14372, 12500, 10076, 7325, 4502, 1869, -330, -1895, -2687, -2639, -1768, -166, 2006, 4528, 7145, 9587, 11587, 12908, 13355, 12797, 11171, 8491, 4847, 401, -4627, -9964, -15311, -20356, -24796, -28358, -30817, -32015, -31870, -30386, -27656, -23853, -19221, -14060, -8700, -3478, 1288, 5324, 8425, 10469, 11427, 11363, 10429, 8847, 12231, 14331, 15931, 17017, 17598, 17697, 17357, 16632, 15591, 14312, 12876, 11369, 9875, 8471, 7230, 6210, 5459, 5008, 4871, 5046, 5515, 6243, 7180, 8265, 9426, 10585, 11660, 12571, 13238, 13592, 13571, 13128, 12231, 10863, 9028, 6747, 4059, 1019, -2299, -5813, -9426, -13037, -16541, -19833, -22812, -25385, -27470, -28999, -29921, -30202, -29830, -28811, -27172, -24960, -22237, -19084, -15591, -11860, -7996, -4107, -301, 3322, 6669, 9661, 12231, 7936, -13000, -7901, 6178, 1339, -12368, -7277, 11539, 14882, -1211, -11678, -5651, 97, -5604, -10548, -2725, 10689, 17237, 15387, 8307, -4680, -20652, -26610, -11649, 16073, 32112, 19612, -10451, -28275, -18361, 2636, 9665, 3247, 3327, 13445, 14483, -1571, -15889, -12474, -2075, -619, -2481, 5133, 15777, 13493, -540, -11504, -14103, -13006, -6571, 9087, 23184, 18612, -1919, -16850, -15353, -8256, -5300, 176, 14216, 24749, 15576, -8955, -26593, -23125, -5766, 9557, 15089, 12501, 5359, -3030, -8316, -8300, -5742, -3013, 2575, 11450, 14686, 5155, -7876, -9717, -3710, -5231, -11927, -4082, 18563, 27566, 8344, -14414, -15104, -5710, -8225, -12103, 4530, 27995, 24929, -2864, -20771, -16105, -9302, -9006, 848, 20591, 23698, 1820, -16344, -10154, 2393, -173, -8130, -4607, 3120, 1803, -1337, 4339, 9155, 1264, -8806, -5748, 3942, 5959, 3575, 5700, 4538, -9161, -21058, -10935, 12541, 21627, 9704, -3518, -5078, -2630, -3407, -1759, 5925, 10992, 5458, -5692, -11608, -8203, -27, 5561, 4288, -1405, -4487, -1307, 4209, 5991, 2533, -2917, -5280, -1104, 6079, 6094, -4700, -14083, -8973, 3614, 5677, -3306, -5777, 4104, 10865, 4413, -4250, -4067, -1238, -2649, -393, 10882, 16947, 3550, -17919, -23544, -8982, 8533, 15296, 12389, 5135, -3559, -9339, -7722, -662, 5343, 7099, 5608, 2134, -1517, -2553, -1582, -2976, -6969, -7288, -968, 6035, 7718, 5654, 2915, -2003, -9112, -11882, -5400, 5534, 12349, 12017, 5883, -4730, -15817, -18759, -8329, 8942, 19162, 14040, -1461, -13437, -11860, -728, 6806, 4804, 532, 1098, 2683, -281, -4282, -4367, -3561, -4056, 690, 12051, 15970, 3215, -11543, -10842, -3217, -6579, -13101, -1019, 23422, 29139, 7431, -15510, -19006, -11133, -4137, 4068, 13274, 12896, 2359, -4477, -4615, -10008, -18053, -8494, 17489, 27824, 7936, 25079, 13916, -2788, -16490, -20391, -12928, 1451, 14624, 19067, 11856, -3681, -19562, -27204, -21904, -5413, 14741, 28914, 30167, 17803, -2199, -20119, -27357, -20744, -4136, 13582, 23055, 19286, 4246, -14095, -25865, -24410, -9840, 10888, 27413, 31243, 20143, -609, -20799, -30409, -24700, -6642, 14562, 28150, 27278, 12507, -8495, -24902, -28300, -17020, 3009, 21323, 28349, 20369, 1473, -18535, -29203, -24851, -7558, 13867, 28388, 28419, 13751, -8310, -26670, -32112, -21995, -1575, 18734, 28721, 23604, 6429, -13581, -25845, -23914, -8798, 11581, 26515, 28064, 15177, -5738, -24078, -30465, -21538, -1667, 19256, 30817, 27314, 10587, -10973, -26675, -28880, -16749, 3449, 21569, 28673, 21409, 3532, -16107, -28012, -26673, -13097, 5915, 21268, 26017, 18555, 3062, -12855, -22011, -21012, -11542, 933, 10185, 12373, 7702, -97, -6064, -6756, -1996, 5223, 10532, 10637, 5106, -3420, -10660, -12945, -9103, -998, 7501, 12536, 12180, 7288, 867, -3616, -4077, -832, 3715, 6493, 5485, 843, -5215, -9613, -10078, -6347, -275, 5178, 7533, 6076, 2153, -1676, -3125, -1503, 1883, 4481, 3990, -221, -6590, -12052, -13632, -10088, -2703, 5243, 10107, 9777, 4818, -1773, -6131, -5613, -294, 6950, 11901, 11251, 4503, -5555, -14106, -16717, -11688, -1078, 10179, 16689, 15339, 6949, -4065, -11907, -12387, -5145, 6064, 15232, 17186, 10330, -2404, -14930, -21048, -17621, -6235, 7526, 16876, 17258, 8673, -4314, -14921, -17631, -11045, 1390, 13162, 18058, 13390, 1400, -11887, -19762, -18290, -8317, 5007, 14924, 16590, 9555, -2070, -11861, -14520, -8717, 2214, 12079, 15187, 9496, -2175, -13528, -18114, -12839, 190, 14532, 22621, 19700, 6448, -11108, -24442, -26750, -16435, 1954, 19832, 28751, 24554, 9436, -9142, -22154, -23482, -12922, 3781, 17887, 22094, 14236, -1639, -17347, -24730, -19810, -4811, 12961, 24819, 25079, 18685, 7578, -17603, -14104, 13132, 16047, -10766, -18511, 7663, 21655, 648, -15645, -722, 12581, -2051, -16552, -5477, 7989, 1773, -4370, 5382, 9672, -3297, -8802, 3146, 4443, -13543, -17279, 4281, 14255, -1757, -5796, 17399, 25177, -2770, -20392, 1179, 17280, -8028, -32112, -9690, 23788, 15076, -13674, -9017, 18625, 19164, -7513, -17824, -2309, 6771, -3586, -12064, -5584, 4173, 5548, 224, -4755, -2506, 6959, 10097, -2100, -11676, 1488, 18685, 4487, 2395, -419, -3026, -4398, -3856, -1403, 2185, 5594, 7446, 6829, 3675, -1167, -6197, -9773, -10666, -8490, -3842, 1865, 6826, 9384, 8536, 4265, -2388, -9553, -15007, -16806, -13897, -6533, 3666, 14078, 21793, 24494, 21212, 12692, 1227, -10014, -17959, -20558, -17381, -9674, 109, 9113, 14948, 16328, 13307, 7100, -403, -7237, -11891, -13629, -12548, -9420, -5377, -1542, 1279, 2788, 3197, 3061, 3002, 3410, 4263, 5128, 5372, 4487, 5709, 4256, 2469, 615, -1039, -2270, -2926, -2953, -2399, -1405, -179, 1031, 1986, 2485, 2406, 1722, 504, -1081, -2803, -4397, -5608, -6228, -6129, -5283, -3768, -1760, 496, 2717, 4623, 5983, 6638, 6534, 5719, 4342, 2622, 822, -799, -2020, -2691, -2757, -2264, -1346, -208, 911, 1779, 2202, 2066, 1345, 118, -1452, -3132, -4664, -5797, -6329, -6139, -5207, -3619, -1554, 735, 2965, 4856, 6177, 6775, 6601, 5709, 2702, 2787, 2766, 2638, 2409, 2089, 1689, 1224, 714, 177, -366, -894, -1386, -1824, -2190, -2471, -2655, -2736, -2711, -2580, -2349, -2026, -1624, -1159, -648, -111, 430, 957, 1447, 1881, 2244, 2521, 2702, 2778, 2747, 2611, 2374, 2045, 1637, 1166, 648, 105, -443, -976, -1472, -1912, -2281, -2563, -2748, -2829, -2802, -2669, -2435, -2108, -1701, -1231, -714, -170, 379, 913, 1411, 1855, 2226, 2512, 2702, -9135, -11815, 1856, 16792, 15440, 1452, -9067, -11322, -11214, -8422, 1195, 9885, 4283, -11938, -19315, -9099, 7138, 16700, 18453, 13165, -963, -16091, -15037, 5146, 22814, 16957, -6555, -24504, -23718, -8813, 9138, 19906, 16108, -4, -14269, -14180, -2469, 8867, 12641, 7715, -5667, -20826, -22013, -1205, 25462, 32112, 13428, -11525, -24065, -20889, -6132, 13930, 25459, 14551, -11842, -27267, -17039, 4717, 17362, 18030, 12597, -884, -21709, -31953, -14845, 16898, 31597, 17054, -8128, -20876, -15096, 2436, 20279, 24705, 10103, -9960, -15767, -6272, 3446, 7329, 11363, 12245, -1813, -23362, -25219, 28, 23567, 19113, -2787, -16421, -16550, -11811, -1396, 16331, 25663, 11112, -14498, -24029, -12463, 3016, 12518, 18455, 16411, -1229, -22283, -22254, 184, 18018, 12361, -6221, -18762, -20380, -14153, -1258, 12700, 16302, 7042, -3585, -6020, -2656, 1905, 7308, 9735, 2179, -11310, -15282, -3933, 9807, 12924, 7934, 3113, -449, -3816, -3258, 2696, 7576, 5625, -911, -7499, -11911, -10197, 971, 14000, 14622, 2010, -7360, -2491, 7425, 8717, 2308, -2145, -1772, -703, -1492, -3805, -6167, -4745, 2614, 8738, 3562, -8870, -12103, -648, 11472, 11827, 5482, 1660, -1333, -6800, -7974, 779, 10401, 8366, -2975, -11070, -10564, -5381, 1097, 7253, 8803, 2933, -5556, -9075, -5225, 3927, 14296, 17716, 6721, -12476, -21450, -11720, 3623, 8167, 2061, -4927, -9011, -9831, -3046, 10690, 17799, 7544, -10365, -17827, -12217, -4183, 2104, 9553, 12894, 2146, -16806, -22528, -5364, 17925, 23841, 8269, -12483, -20353, -10725, 6208, 15382, 10482, -1116, -8262, -8222, -5183, -734, 6413, 12631, 10141, -1923, -13180, -12383, 262, 13055, 14193, 3210, -8336, -8544, 2392, 13385, 15155, 7741, -3526, -12732, -13593, -3471, 9750, 12726, 2724, -8508, -10391, -4762, 2063, 7975, 10182, 3269, -9135, 9593, 15133, 17677, 15837, 9700, 816, -8453, -15936, -20478, -22181, -21960, -20708, -18600, -14978, -8911, -104, 10423, 20365, 26963, 28228, 23913, 15656, 6182, -1993, -7658, -11150, -13648, -15963, -17640, -17010, -12276, -3046, 8653, 18671, 22417, 17198, 3988, -12450, -25366, -29015, -21395, -5345, 12644, 25372, 28193, 20995, 7931, -4874, -12401, -12980, -8608, -3294, -513, -1226, -3600, -4496, -1769, 4050, 9763, 11276, 6141, -4632, -16637, -24097, -22845, -12630, 2562, 16413, 23438, 21735, 13820, 5125, 962, 3624, 11207, 18768, 21167, 15998, 4976, -6974, -14414, -14380, -7980, 263, 4968, 2911, -5147, -14855, -20653, -18834, -9615, 2913, 12916, 15859, 10834, 948, -8380, -12261, -8785, 180, 10137, 16367, 16210, 10083, 808, -8199, -14746, -18673, -21293, -23947, -26660, -27792, -24948, -16605, -3488, 11193, 22891, 27718, 24253, 14245, 1811, -8407, -13221, -12014, -6558, 238, 5894, 9383, 11173, 12405, 13827, 15139, 15138, 12524, 6850, -964, -8851, -14431, -16006, -13199, -6972, 912, 8611, 14755, 18610, 19932, 18745, 15262, 9974, 3775, -2107, -6451, -8534, -8491, -7270, -6144, -5984, -6726, -7341, -6413, -3001, 2665, 9101, 14173, 16108, 14360, 9854, 4480, 111, -2312, -3106, -3445, -4494, -6604, -9064, -10546, -9952, -7132, -3010, 962, 3699, 5131, 6164, 7936, 10788, 13638, 14246, 10365, 1205, -11608, -24245, -32112, -31902, -23258, -9164, 5198, 14642, 16171, 10135, -173, -10225, -16364, -17281, -14188, -9753, -6475, -5405, -5857, -6152, -4855, -1738, 2074, 4819, 5192, 3146, -79, -2690, -3392, -2108, 49, 1523, 1331, -296, -2021, -2221, -40, 3960, 7963, 9821, 8256, 3680, -1837, -5473, -4981, 201, 8628, 17426, 23494, 24740, 20818, 13111, 4049, -3848, -8798, -10174, -8474, -4960, -1180, 1499, 2265, 1080, -1277, -3429, -3877, -1621, 3292, 9593, 19392, 4134, -27206, -24628, 12366, 28388, 1843, -21952, -9781, 9412, 4473, -5996, 1161, 8099, -4350, -15665, -3356, 16158, 18760, 9858, 2052, -8218, -17393, -7628, 14306, 13465, -15415, -31870, -14397, 7040, 7442, 4443, 12466, 12213, -3247, -5051, 15495, 21136, -4884, -21349, 550, 23376, 7933, -18421, -11788, 12579, 11761, -10793, -19105, -8700, -4608, -11498, -11447, -1314, 4483, 1472, -1311, 2028, 10576, 18830, 15549, -1885, -12317, 2334, 19392, -6484, -10325, -11154, -9254, -5528, -1297, 2039, 3397, 2370, -592, -4288, -7158, -7840, -5687, -1027, 4948, 10610, 14463, 15595, 13851, 9694, 3886, -2804, -9699, -16127, -21242, -23979, -23262, -18438, -9758, 1387, 12673, 21485, 25800, 24918, 19733, 12390, 5463, 995, -201, 1291, 3875, 5679, 5292, 2213, -3126, -9664, -16161, -21549, -25075, -26275, -24870, -20742, -14022, -5238, 4595, 14053, 21576, 25847, 26156, 22601, 16062, 7969, -40, -6484, 5523, 1483, -2407, -5798, -8390, -9969, -10418, -9730, -8009, -5456, -2352, 976, 4179, 6926, 8931, 9986, 9976, 8889, 6822, 3966, 589, -2987, -6419, -9372, -11553, -12733, -12773, -11632, -9373, -6158, -2230, 2097, 6478, 10551, 13977, 16463, 17787, 17813, 16505, 13932, 10259, 5738, 690, -4523, -9519, -13930, -17430, -19758, -20739, -20300, -18479, -15414, -11345, -6586, -1505, 3506, 8065, 11828, 14522, 15962, 16073, 14892, 12566, 9338, 5523, 5691, 5958, 5998, 5814, 5414, 4817, 4048, 3140, 2128, 1055, -37, -1104, -2103, -2996, -3746, -4325, -4710, -4885, -4844, -4590, -4132, -3489, -2687, -1758, -740, 326, 1398, 2432, 3385, 4220, 4900, 5398, 5691, 5765, 5615, 5244, 4663, 3892, 2958, 1894, 740, -462, -1669, -2834, -3916, -4874, -5671, -6278, -6672, -6838, -6769, -6468, -5945, -5220, -4319, -3276, -2128, -919, 307, 1506, 2634, 3650, 4517, 5205, 5691}; +static const uint32_t ug_mip_inc[6] = {24347887, 48695774, 97391549, 194783097, 389566195, 779132389}; +static const int16_t ug_width[4] = {0, 1229, 2458, 4096}; /* Q12 */ +static const uint32_t ug_ratio2[128] = {65536, 65778, 66021, 66297, 66688, 67195, 67733, 68213, 68542, 68624, 68379, 68248, 68503, 69007, 69620, 70192, 70574, 70391, 68751, 68251, 68375, 68638, 69046, 69604, 70317, 72727, 81065, 90602, 94108, 94826, 95215, 95489, 95865, 96566, 99807, 111813, 121448, 122702, 123358, 123736, 124123, 124811, 126256, 135288, 141290, 141097, 140608, 139834, 138787, 137482, 135251, 125569, 112474, 101668, 96987, 95967, 95139, 94502, 94059, 93813, 94291, 103256, 116376, 121973, 123058, 123754, 124247, 124727, 125387, 126486, 128111, 129292, 130121, 130800, 131436, 132137, 133016, 134337, 136044, 137253, 138405, 139480, 140382, 141017, 141289, 140018, 137389, 136492, 136734, 137274, 138093, 139174, 140500, 143124, 153428, 170908, 193311, 216947, 236061, 243711, 245776, 247192, 248268, 249321, 250674, 252679, 255630, 259268, 263237, 267160, 270640, 273263, 275136, 276634, 277980, 279406, 281147, 283513, 287286, 291960, 296645, 300397, 302844, 304860, 306604, 308212, 309818, 311563}; /* Q16 */ +static const uint32_t ug_ratio3[128] = {65536, 65295, 65054, 64783, 64487, 64180, 63842, 63455, 63000, 62434, 61309, 60797, 60873, 61065, 61388, 61855, 62481, 64303, 72223, 74834, 74683, 74375, 73919, 73328, 72614, 71160, 67581, 64111, 62708, 62090, 61587, 61202, 60941, 60810, 61805, 66871, 70627, 70588, 70390, 70049, 69560, 68918, 68036, 63494, 60796, 60879, 61089, 61426, 61889, 62478, 63545, 68871, 77642, 86658, 91163, 92136, 92939, 93564, 94003, 94248, 94290, 94092, 93839, 93769, 93971, 94399, 95008, 95756, 96597, 97721, 99600, 99992, 99726, 99232, 98564, 97773, 96909, 95599, 93924, 93798, 94009, 94412, 95020, 95847, 96910, 103207, 116118, 121983, 123088, 123793, 124284, 124755, 125400, 126423, 127927, 129762, 131751, 133705, 135422, 136699, 137552, 138178, 138752, 139454, 140467, 142740, 152504, 169569, 191739, 215448, 235078, 243542, 245510, 246687, 247532, 248517, 250120, 254125, 274643, 309133, 346899, 371505, 376130, 378941, 380984, 382628, 384254, 386248}; /* Q16 */ +static const int16_t ug_herm[4][4] = {{0, 4096, 0, 0}, {-288, 3552, 928, -96}, {-256, 2304, 2304, -256}, {-96, 928, 3552, -288}}; /* Q12 */ +static const int16_t ug_tone16[128] = {0, 1, 2, 3, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 23, 24, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 33, 34, 35, 36, 37, 38, 39, 39, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 59, 60, 61, 62, 63, 64, 64, 65, 66, 67, 68, 69, 69, 70, 71, 72, 73, 74, 74, 75, 76, 77, 78, 79, 80, 80, 81, 82, 83, 84, 85, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 94, 95, 95, 96, 97, 98, 99, 100, 100, 101, 102, 103, 104, 105, 105, 106}; +#define UG_CUT_STEPS 144 +static const int16_t ug_svf_f[144] = {35, 37, 38, 40, 42, 43, 45, 47, 50, 52, 54, 56, 59, 61, 64, 67, 70, 73, 76, 80, 83, 87, 91, 95, 99, 103, 108, 113, 118, 123, 128, 134, 140, 146, 153, 159, 167, 174, 182, 190, 198, 207, 216, 226, 236, 246, 257, 268, 280, 292, 305, 319, 333, 348, 363, 379, 396, 414, 432, 451, 471, 492, 513, 536, 560, 585, 610, 637, 666, 695, 726, 758, 791, 826, 862, 900, 940, 982, 1025, 1070, 1117, 1166, 1217, 1271, 1327, 1385, 1445, 1509, 1575, 1644, 1715, 1790, 1868, 1949, 2033, 2121, 2213, 2308, 2408, 2511, 2618, 2730, 2846, 2966, 3091, 3220, 3354, 3493, 3637, 3786, 3940, 4098, 4262, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420, 4420}; /* Q12 */ +static const int16_t ug_punch_fall[128] = {32430, 32433, 32436, 32439, 32442, 32444, 32447, 32449, 32452, 32454, 32457, 32459, 32461, 32464, 32466, 32468, 32470, 32472, 32474, 32476, 32478, 32480, 32482, 32483, 32485, 32487, 32488, 32490, 32492, 32493, 32495, 32496, 32498, 32499, 32501, 32502, 32503, 32505, 32506, 32507, 32508, 32510, 32511, 32512, 32513, 32514, 32515, 32516, 32517, 32518, 32519, 32520, 32521, 32522, 32523, 32524, 32525, 32526, 32527, 32528, 32528, 32529, 32530, 32531, 32531, 32532, 32533, 32534, 32534, 32535, 32536, 32536, 32537, 32537, 32538, 32539, 32539, 32540, 32540, 32541, 32541, 32542, 32542, 32543, 32543, 32544, 32544, 32545, 32545, 32545, 32546, 32546, 32546, 32547, 32547, 32547, 32548, 32548, 32548, 32549, 32549, 32549, 32549, 32550, 32550, 32550, 32550, 32551, 32551, 32551, 32551, 32551, 32551, 32552, 32552, 32552, 32552, 32552, 32552, 32552, 32552, 32552, 32552, 32552, 32553, 32553, 32553, 32553}; /* Q15 */ +static const int16_t ug_tpt_g[144] = {35, 37, 38, 40, 42, 43, 45, 47, 50, 52, 54, 56, 59, 61, 64, 67, 70, 73, 76, 80, 83, 87, 91, 95, 99, 103, 108, 113, 118, 123, 128, 134, 140, 146, 153, 159, 167, 174, 182, 190, 198, 207, 216, 226, 236, 246, 257, 268, 280, 293, 306, 320, 334, 349, 364, 380, 397, 416, 434, 453, 473, 495, 516, 539, 564, 590, 615, 643, 673, 703, 735, 768, 802, 839, 877, 917, 959, 1004, 1050, 1098, 1149, 1203, 1259, 1319, 1382, 1448, 1517, 1591, 1669, 1752, 1838, 1931, 2030, 2135, 2246, 2366, 2495, 2632, 2782, 2943, 3117, 3309, 3518, 3747, 4002, 4285, 4603, 4965, 5380, 5861, 6428, 7104, 7936, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908, 8908}; /* Q12 */ +static const uint16_t ug_fm[128] = {0, 16, 45, 83, 128, 179, 236, 297, 363, 433, 507, 585, 666, 751, 840, 931, 1026, 1123, 1224, 1327, 1433, 1542, 1654, 1768, 1884, 2003, 2125, 2248, 2375, 2503, 2633, 2766, 2901, 3038, 3177, 3318, 3462, 3607, 3754, 3903, 4054, 4207, 4362, 4519, 4678, 4838, 5000, 5164, 5330, 5497, 5666, 5837, 6010, 6184, 6360, 6537, 6716, 6897, 7079, 7263, 7448, 7635, 7824, 8014, 8206, 8399, 8593, 8789, 8987, 9186, 9386, 9588, 9791, 9996, 10202, 10409, 10618, 10829, 11040, 11253, 11468, 11683, 11900, 12119, 12338, 12559, 12782, 13005, 13230, 13456, 13684, 13912, 14142, 14373, 14606, 14840, 15074, 15311, 15548, 15787, 16026, 16267, 16510, 16753, 16998, 17243, 17490, 17738, 17988, 18238, 18489, 18742, 18996, 19251, 19507, 19764, 20023, 20282, 20543, 20804, 21067, 21331, 21596, 21862, 22129, 22398, 22667, 22937}; +static const uint16_t ug_fb[128] = {0, 1, 4, 9, 16, 25, 37, 50, 65, 82, 102, 123, 146, 172, 199, 229, 260, 294, 329, 367, 406, 448, 492, 537, 585, 635, 687, 741, 796, 854, 914, 976, 1040, 1106, 1174, 1244, 1316, 1391, 1467, 1545, 1625, 1708, 1792, 1878, 1967, 2057, 2149, 2244, 2340, 2439, 2539, 2642, 2747, 2853, 2962, 3073, 3186, 3300, 3417, 3536, 3657, 3780, 3905, 4032, 4161, 4292, 4425, 4560, 4697, 4836, 4977, 5121, 5266, 5413, 5562, 5714, 5867, 6023, 6180, 6340, 6501, 6665, 6830, 6998, 7167, 7339, 7513, 7689, 7866, 8046, 8228, 8412, 8598, 8786, 8976, 9168, 9362, 9558, 9756, 9956, 10158, 10362, 10568, 10777, 10987, 11199, 11413, 11630, 11848, 12069, 12291, 12516, 12742, 12971, 13201, 13434, 13669, 13905, 14144, 14385, 14627, 14872, 15119, 15368, 15619, 15872, 16127, 16384}; +static const int16_t ug_q[128] = {5325, 5288, 5251, 5214, 5178, 5141, 5104, 5067, 5031, 4994, 4957, 4920, 4884, 4847, 4810, 4773, 4737, 4700, 4663, 4626, 4589, 4553, 4516, 4479, 4442, 4406, 4369, 4332, 4295, 4259, 4222, 4185, 4148, 4111, 4075, 4038, 4001, 3964, 3928, 3891, 3854, 3817, 3781, 3744, 3707, 3670, 3634, 3597, 3560, 3523, 3486, 3450, 3413, 3376, 3339, 3303, 3266, 3229, 3192, 3156, 3119, 3082, 3045, 3008, 2972, 2935, 2898, 2861, 2825, 2788, 2751, 2714, 2678, 2641, 2604, 2567, 2530, 2494, 2457, 2420, 2383, 2347, 2310, 2273, 2236, 2200, 2163, 2126, 2089, 2053, 2016, 1979, 1942, 1905, 1869, 1832, 1795, 1758, 1722, 1685, 1648, 1611, 1575, 1538, 1501, 1464, 1427, 1391, 1354, 1317, 1280, 1244, 1207, 1170, 1133, 1097, 1060, 1023, 986, 949, 913, 876, 839, 802, 766, 729, 692, 655}; /* Q12 */ +static const int16_t ug_sat[128] = {16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 48, 49, 49, 50, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 58, 59, 60, 61, 61, 62, 63, 64, 64, 65, 66, 67, 67, 68, 69, 70, 70, 71, 72, 73, 73, 74, 75, 76, 76, 77, 78, 79, 79, 80, 81, 82, 83, 83, 84, 85, 86, 86, 87, 88, 89, 89, 90, 91, 92, 92, 93, 94, 95, 95, 96, 97, 98, 98, 99, 100, 101, 101, 102, 103, 104, 104, 105, 106, 107, 107, 108, 109, 110, 110, 111, 112}; /* Q4 */ +static const int16_t ug_sat_gain[128] = {4096, 4030, 3969, 3910, 3855, 3803, 3753, 3706, 3661, 3618, 3577, 3538, 3500, 3464, 3429, 3396, 3363, 3332, 3302, 3273, 3245, 3218, 3192, 3166, 3142, 3118, 3094, 3072, 3050, 3028, 3007, 2987, 2967, 2948, 2929, 2911, 2893, 2875, 2858, 2842, 2825, 2809, 2794, 2778, 2763, 2749, 2734, 2720, 2706, 2693, 2679, 2666, 2654, 2641, 2629, 2616, 2605, 2593, 2581, 2570, 2559, 2548, 2537, 2527, 2516, 2506, 2496, 2486, 2476, 2466, 2457, 2448, 2438, 2429, 2420, 2411, 2403, 2394, 2386, 2377, 2369, 2361, 2353, 2345, 2337, 2329, 2322, 2314, 2307, 2299, 2292, 2285, 2278, 2271, 2264, 2257, 2250, 2244, 2237, 2231, 2224, 2218, 2211, 2205, 2199, 2193, 2187, 2181, 2175, 2169, 2163, 2157, 2152, 2146, 2141, 2135, 2130, 2124, 2119, 2114, 2108, 2103, 2098, 2093, 2088, 2083, 2078, 2073}; /* Q12 */ +static const uint32_t ug_free_inc[64] = {1948, 2096, 2254, 2425, 2609, 2807, 3020, 3249, 3496, 3761, 4046, 4353, 4683, 5038, 5420, 5831, 6273, 6749, 7261, 7811, 8404, 9041, 9727, 10464, 11258, 12112, 13030, 14018, 15081, 16225, 17455, 18779, 20203, 21736, 23384, 25157, 27065, 29118, 31326, 33701, 36257, 39007, 41965, 45147, 48571, 52254, 56217, 60480, 65067, 70001, 75310, 81021, 87166, 93776, 100887, 108538, 116769, 125625, 135152, 145401, 156428, 168290, 181053, 194783}; +static const uint16_t ug_sync_q8[64] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512}; /* steps a cycle, Q8 */ +#define UG_MOVE_CENTS 35 +#define UG_MOVE_CUT16 32 +#define UG_MOVE_LEVEL 2458 /* Q12 */ +#define UG_DRIFT_CENTS 6 +#define UG_DRIFT_CUT16 4 +#define UG_CENT 9691 /* Q24: ln 2 / 1200 */ +static const int16_t ug_bend[1025] = {24575, 24701, 24823, 24941, 25056, 25168, 25277, 25382, 25485, 25584, 25682, 25776, 25868, 25958, 26045, 26130, 26213, 26294, 26373, 26450, 26525, 26598, 26670, 26740, 26809, 26876, 26941, 27005, 27068, 27129, 27189, 27248, 27305, 27361, 27417, 27471, 27524, 27576, 27626, 27676, 27725, 27773, 27820, 27867, 27912, 27957, 28000, 28043, 28085, 28127, 28167, 28207, 28247, 28285, 28323, 28361, 28397, 28434, 28469, 28504, 28538, 28572, 28605, 28638, 28671, 28702, 28734, 28764, 28795, 28824, 28854, 28883, 28911, 28940, 28967, 28995, 29022, 29048, 29074, 29100, 29126, 29151, 29175, 29200, 29224, 29248, 29271, 29294, 29317, 29340, 29362, 29384, 29406, 29427, 29448, 29469, 29490, 29510, 29530, 29550, 29570, 29589, 29608, 29627, 29646, 29664, 29682, 29700, 29718, 29736, 29753, 29771, 29788, 29804, 29821, 29838, 29854, 29870, 29886, 29902, 29917, 29933, 29948, 29963, 29978, 29992, 30007, 30022, 30036, 30050, 30064, 30078, 30092, 30105, 30119, 30132, 30145, 30158, 30171, 30184, 30196, 30209, 30221, 30234, 30246, 30258, 30270, 30282, 30293, 30305, 30317, 30328, 30339, 30350, 30362, 30372, 30383, 30394, 30405, 30415, 30426, 30436, 30447, 30457, 30467, 30477, 30487, 30497, 30507, 30516, 30526, 30535, 30545, 30554, 30564, 30573, 30582, 30591, 30600, 30609, 30618, 30627, 30635, 30644, 30652, 30661, 30669, 30678, 30686, 30694, 30702, 30710, 30719, 30726, 30734, 30742, 30750, 30758, 30765, 30773, 30781, 30788, 30795, 30803, 30810, 30817, 30825, 30832, 30839, 30846, 30853, 30860, 30867, 30874, 30881, 30887, 30894, 30901, 30907, 30914, 30920, 30927, 30933, 30940, 30946, 30952, 30959, 30965, 30971, 30977, 30983, 30989, 30995, 31001, 31007, 31013, 31019, 31025, 31030, 31036, 31042, 31048, 31053, 31059, 31064, 31070, 31075, 31081, 31086, 31091, 31097, 31102, 31107, 31113, 31118, 31123, 31128, 31133, 31138, 31143, 31148, 31153, 31158, 31163, 31168, 31173, 31178, 31183, 31187, 31192, 31197, 31201, 31206, 31211, 31215, 31220, 31224, 31229, 31233, 31238, 31242, 31247, 31251, 31256, 31260, 31264, 31269, 31273, 31277, 31281, 31285, 31290, 31294, 31298, 31302, 31306, 31310, 31314, 31318, 31322, 31326, 31330, 31334, 31338, 31342, 31346, 31350, 31353, 31357, 31361, 31365, 31368, 31372, 31376, 31379, 31383, 31387, 31390, 31394, 31398, 31401, 31405, 31408, 31412, 31415, 31419, 31422, 31426, 31429, 31432, 31436, 31439, 31443, 31446, 31449, 31452, 31456, 31459, 31462, 31466, 31469, 31472, 31475, 31478, 31481, 31485, 31488, 31491, 31494, 31497, 31500, 31503, 31506, 31509, 31512, 31515, 31518, 31521, 31524, 31527, 31530, 31533, 31536, 31539, 31542, 31544, 31547, 31550, 31553, 31556, 31558, 31561, 31564, 31567, 31569, 31572, 31575, 31578, 31580, 31583, 31586, 31588, 31591, 31594, 31596, 31599, 31601, 31604, 31607, 31609, 31612, 31614, 31617, 31619, 31622, 31624, 31627, 31629, 31632, 31634, 31637, 31639, 31641, 31644, 31646, 31649, 31651, 31653, 31656, 31658, 31660, 31663, 31665, 31667, 31670, 31672, 31674, 31677, 31679, 31681, 31683, 31685, 31688, 31690, 31692, 31694, 31697, 31699, 31701, 31703, 31705, 31707, 31709, 31712, 31714, 31716, 31718, 31720, 31722, 31724, 31726, 31728, 31730, 31732, 31734, 31736, 31738, 31740, 31743, 31744, 31746, 31748, 31750, 31752, 31754, 31756, 31758, 31760, 31762, 31764, 31766, 31768, 31770, 31772, 31774, 31775, 31777, 31779, 31781, 31783, 31785, 31787, 31788, 31790, 31792, 31794, 31796, 31797, 31799, 31801, 31803, 31805, 31806, 31808, 31810, 31812, 31813, 31815, 31817, 31818, 31820, 31822, 31824, 31825, 31827, 31829, 31830, 31832, 31834, 31835, 31837, 31839, 31840, 31842, 31843, 31845, 31847, 31848, 31850, 31852, 31853, 31855, 31856, 31858, 31859, 31861, 31863, 31864, 31866, 31867, 31869, 31870, 31872, 31873, 31875, 31876, 31878, 31879, 31881, 31882, 31884, 31885, 31887, 31888, 31890, 31891, 31893, 31894, 31896, 31897, 31898, 31900, 31901, 31903, 31904, 31906, 31907, 31908, 31910, 31911, 31913, 31914, 31915, 31917, 31918, 31920, 31921, 31922, 31924, 31925, 31926, 31928, 31929, 31930, 31932, 31933, 31934, 31936, 31937, 31938, 31940, 31941, 31942, 31943, 31945, 31946, 31947, 31949, 31950, 31951, 31952, 31954, 31955, 31956, 31957, 31959, 31960, 31961, 31962, 31964, 31965, 31966, 31967, 31968, 31970, 31971, 31972, 31973, 31975, 31976, 31977, 31978, 31979, 31980, 31982, 31983, 31984, 31985, 31986, 31987, 31989, 31990, 31991, 31992, 31993, 31994, 31995, 31997, 31998, 31999, 32000, 32001, 32002, 32003, 32004, 32006, 32007, 32008, 32009, 32010, 32011, 32012, 32013, 32014, 32015, 32016, 32018, 32019, 32020, 32021, 32022, 32023, 32024, 32025, 32026, 32027, 32028, 32029, 32030, 32031, 32032, 32033, 32034, 32035, 32036, 32037, 32038, 32039, 32040, 32041, 32042, 32043, 32044, 32045, 32046, 32047, 32048, 32049, 32050, 32051, 32052, 32053, 32054, 32055, 32056, 32057, 32058, 32059, 32060, 32061, 32062, 32063, 32064, 32065, 32066, 32067, 32067, 32068, 32069, 32070, 32071, 32072, 32073, 32074, 32075, 32076, 32077, 32078, 32078, 32079, 32080, 32081, 32082, 32083, 32084, 32085, 32086, 32086, 32087, 32088, 32089, 32090, 32091, 32092, 32093, 32093, 32094, 32095, 32096, 32097, 32098, 32099, 32099, 32100, 32101, 32102, 32103, 32104, 32105, 32105, 32106, 32107, 32108, 32109, 32109, 32110, 32111, 32112, 32113, 32114, 32114, 32115, 32116, 32117, 32118, 32118, 32119, 32120, 32121, 32122, 32122, 32123, 32124, 32125, 32126, 32126, 32127, 32128, 32129, 32129, 32130, 32131, 32132, 32133, 32133, 32134, 32135, 32136, 32136, 32137, 32138, 32139, 32139, 32140, 32141, 32142, 32142, 32143, 32144, 32145, 32145, 32146, 32147, 32148, 32148, 32149, 32150, 32150, 32151, 32152, 32153, 32153, 32154, 32155, 32155, 32156, 32157, 32158, 32158, 32159, 32160, 32160, 32161, 32162, 32162, 32163, 32164, 32165, 32165, 32166, 32167, 32167, 32168, 32169, 32169, 32170, 32171, 32171, 32172, 32173, 32173, 32174, 32175, 32175, 32176, 32177, 32177, 32178, 32179, 32179, 32180, 32181, 32181, 32182, 32183, 32183, 32184, 32185, 32185, 32186, 32187, 32187, 32188, 32188, 32189, 32190, 32190, 32191, 32192, 32192, 32193, 32194, 32194, 32195, 32195, 32196, 32197, 32197, 32198, 32198, 32199, 32200, 32200, 32201, 32202, 32202, 32203, 32203, 32204, 32205, 32205, 32206, 32206, 32207, 32208, 32208, 32209, 32209, 32210, 32211, 32211, 32212, 32212, 32213, 32213, 32214, 32215, 32215, 32216, 32216, 32217, 32218, 32218, 32219, 32219, 32220, 32220, 32221, 32222, 32222, 32223, 32223, 32224, 32224, 32225, 32225, 32226, 32227, 32227, 32228, 32228, 32229, 32229, 32230, 32230, 32231, 32232, 32232, 32233, 32233, 32234, 32234, 32235, 32235, 32236, 32236, 32237, 32237, 32238, 32239, 32239, 32240, 32240, 32241, 32241, 32242, 32242, 32243, 32243, 32244, 32244, 32245, 32245, 32246, 32246, 32247, 32247, 32248, 32248, 32249, 32249, 32250, 32250, 32251, 32251, 32252, 32252, 32253, 32253, 32254, 32255, 32255, 32255, 32256, 32256, 32257, 32257, 32258, 32258, 32259, 32259, 32260, 32260, 32261, 32261, 32262, 32262, 32263, 32263, 32264, 32264, 32265, 32265, 32266, 32266, 32267, 32267, 32268, 32268, 32269, 32269, 32270, 32270, 32270, 32271, 32271, 32272, 32272, 32273, 32273, 32274, 32274, 32275, 32275, 32276, 32276, 32277, 32277, 32277, 32278, 32278, 32279, 32279, 32280, 32280, 32281, 32281, 32281, 32282, 32282, 32283, 32283, 32284, 32284, 32285}; +#define UG_DRONE_GAIN 1843 /* Q12 */ +#define UG_NOISE 246 /* Q12 */ +#endif diff --git a/sdk/drafts/ungemach/test_engine.c b/sdk/drafts/ungemach/test_engine.c new file mode 100644 index 0000000000..e2a33e083c --- /dev/null +++ b/sdk/drafts/ungemach/test_engine.c @@ -0,0 +1,223 @@ +/* SPDX-License-Identifier: MIT + * Host checks for UNGEMACH's engine: no clipping, silence or DC at any corner of its controls, a drone that stays at its + * level for minutes and moves, DIRT that changes it at its level and may move fast (an LFO on it in a trig mode is the + * hit), a synced RATE that pulses. cc -O2 -std=c99 -Wall -Wextra -Werror test_engine.c engine.c -lm -o test_engine && + * ./test_engine */ +#include +#include +#include +#include "engine.h" + +static int failures; +#define CHECK(c, ...) do { if (!(c)) { ++failures; printf("FAIL %s:%d ", __FILE__, __LINE__); printf(__VA_ARGS__); printf("\n"); } } while (0) + +static UgControls base(void) +{ + UgControls c = { .ptch = 28 << 8, .diss = 40, .tone = 80, .wave = 24 << 8, .rate = 20, .move = 64, .sprd = 2, .dirt = 12, + .sync_phase = 0 }; + return c; +} +typedef struct { double rms, peak, dc; } Stats; +static Stats run(UgControls c, double secs, double measure, Ungemach *k, int fresh) +{ + if (fresh) ug_reset(k); + unsigned total = (unsigned)(secs * 44100), from = total - (unsigned)(measure * 44100), cycle = 0; + double sum = 0, dc = 0, peak = 0; unsigned count = 0; + int16_t l[16], r[16]; + for (unsigned at = 0; at < total; at += 16) { + if (c.rate >= 64) c.sync_phase = (uint16_t)(cycle += 16u * 65536u / 11025u); + ug_render(k, &c, l, r, 16); + if (at < from) continue; + for (unsigned i = 0; i < 16; ++i) { + double a = l[i] / 32768.0, b = r[i] / 32768.0; + sum += a * a + b * b, dc += a + b, count += 2; + if (fabs(a) > peak) peak = fabs(a); + if (fabs(b) > peak) peak = fabs(b); + } + } + Stats s = { sqrt(sum / count), peak, dc / count }; + return s; +} +static double db(double x) { return 20 * log10(x > 1e-9 ? x : 1e-9); } + +int main(void) +{ + static Ungemach k; + UgControls c = base(); + Stats d = run(c, 4, 2, &k, 1); + printf("default drone: rms %.1f dB peak %.1f dB dc %.4f\n", db(d.rms), db(d.peak), d.dc); + CHECK(db(d.rms) > -30 && db(d.rms) < -8, "default drone level %.1f dB", db(d.rms)); + CHECK(fabs(d.dc) < 0.02, "dc %.4f", d.dc); + + /* DIRT from 0 to 127: the level stays within a few dB, never clipping */ + for (unsigned dirt = 0; dirt <= 127; dirt += 127) { + UgControls x = base(); x.dirt = (uint8_t)dirt; + Stats s = run(x, 3, 2, &k, 1); + printf("DIRT %3u: rms %.1f dB, peak %.1f dB\n", dirt, db(s.rms), db(s.peak)); + CHECK(db(s.rms) > -30 && db(s.rms) < -6 && s.peak < 1.0, "DIRT %u: rms %.1f dB peak %.2f", dirt, db(s.rms), s.peak); + } + /* DIRT swept 0 -> 127 -> 0 in 30 ms every 0.2 s, as a fast LFO in a trig mode would: no clipping, no runaway, and the + * drone back at its level after it */ + { + UgControls x = base(); x.dirt = 0; + Stats before = run(x, 2, 1, &k, 1); + int16_t l[16], r[16]; + double peak = 0; + for (unsigned b = 0; b < 2756u * 2u; ++b) { + unsigned t = b % 551u; + x.dirt = (uint8_t)(t < 42u ? t * 127u / 42u : t < 84u ? (84u - t) * 127u / 42u : 0u); + ug_render(&k, &x, l, r, 16); + for (unsigned i = 0; i < 16; ++i) if (fabs(l[i] / 32768.0) > peak) peak = fabs(l[i] / 32768.0); + } + x.dirt = 0; + Stats after = run(x, 1, 0.5, &k, 0); + printf("DIRT swept 0-127-0 every 0.2 s: peak %.1f dB, drone %.1f dB before, %.1f dB after\n", db(peak), db(before.rms), + db(after.rms)); + CHECK(peak < 1.0 && fabs(db(after.rms) - db(before.rms)) < 3, "DIRT sweep: peak %.2f, %.1f against %.1f dB", peak, + db(after.rms), db(before.rms)); + } + /* WAVE: every waveform at about the same level */ + for (unsigned w = 0; w <= 127; w += 4) { + UgControls x = base(); x.wave = (uint16_t)(w << 8), x.dirt = 0; + Stats s = run(x, 1.5, 1, &k, 1); + printf("WAVE %3u: rms %.1f dB\n", w, db(s.rms)); + CHECK(db(s.rms) > -32 && db(s.rms) < -10, "WAVE %u level %.1f dB", w, db(s.rms)); + } + /* a DISS step glides (34 to 35, on a leg, about 200 cents): after one block the ratio has gone a little of the + * way, after 0.5 s nearly all of it */ + { + UgControls x = base(); x.diss = 34; + ug_reset(&k); run(x, 0.2, 0.1, &k, 0); + int32_t from = k.r2q; + x.diss = 35; + int16_t l[16], r[16]; + ug_render(&k, &x, l, r, 16); + int32_t one = k.r2q; + run(x, 0.5, 0.1, &k, 0); + int32_t mid = k.r2q; + run(x, 2.0, 0.1, &k, 0); + int32_t to = k.r2q; /* where it settles */ + double first = (double)(one - from) / (to - from), later = (double)(mid - from) / (to - from); + printf("DISS step: %.3f of the way after a block, %.3f after 0.5 s\n", first, later); + CHECK(first > 0 && first < 0.05 && later > 0.95, "DISS does not glide: %.3f, %.3f", first, later); + } + /* the voices (ten interpolated, six read at the nearest sample): clean at the corners */ + { + unsigned bado = 0; + static const uint8_t v3[] = { 0, 64, 127 }; + for (unsigned p = 0; p < 3; ++p) for (unsigned w = 0; w < 3; ++w) for (unsigned di = 0; di < 3; ++di) { + UgControls y = base(); y.ptch = (uint16_t)((p == 0 ? 4 : p == 1 ? 28 : 124) << 8), y.wave = (uint16_t)(v3[w] << 8), y.diss = v3[di], y.tone = 127, y.dirt = 127; + Stats st = run(y, 0.5, 0.3, &k, 1); + if (st.rms < 1e-4 || st.peak >= 1.0 || fabs(st.dc) > 0.05) ++bado; + } + printf("voices: %u bad corners\n", bado); + CHECK(bado == 0, "voices: %u bad corners", bado); + } + /* a frame split by a trig's offset (3 + 13, the frame's figures once) sounds as one call of 16 */ + { + static Ungemach split; + UgControls x = base(); + ug_reset(&k), ug_reset(&split); + int16_t l[16], r[16], l2[16], r2[16]; + double diff = 0, sig = 0; + for (unsigned b = 0; b < 2756; ++b) { + ug_render(&k, &x, l, r, 16); + ug_render_part(&split, &x, l2, r2, 3, 1); + ug_render_part(&split, &x, l2 + 3, r2 + 3, 13, 0); + for (unsigned i = 0; i < 16; ++i) { double e = l[i] - l2[i]; diff += e * e, sig += (double)l[i] * l[i]; } + } + printf("a split frame: differs by %.1f dB under the signal\n", 10 * log10(sig / (diff + 1e-9))); + CHECK(diff < sig * 1e-4, "a split frame sounds otherwise: %.1f dB under the signal", 10 * log10(sig / (diff + 1e-9))); + } + /* every DISS value, at a high and a low root: no silence, clipping or DC */ + { + unsigned bad_d = 0; + for (unsigned dv = 0; dv < 128; ++dv) for (unsigned p = 0; p < 2; ++p) { + UgControls x = base(); x.diss = (uint8_t)dv, x.ptch = (uint16_t)((p ? 100 : 10) << 8), x.tone = 127, x.dirt = 127; + Stats s = run(x, 0.4, 0.2, &k, 1); + if (s.rms < 1e-4 || s.peak >= 1.0 || fabs(s.dc) > 0.05) { + if (++bad_d <= 4) printf(" DISS %u ptch %u: rms %.1f peak %.2f dc %.3f\n", dv, p ? 100 : 10, db(s.rms), s.peak, s.dc); + } + } + CHECK(bad_d == 0, "%u DISS values silent, clipping or off centre", bad_d); + } + /* SPRD MONO: both sides alike */ + { + UgControls x = base(); x.sprd = 0; + ug_reset(&k); run(x, 0.5, 0.5, &k, 0); + int16_t l[16], r[16]; int same = 1; + for (unsigned b = 0; b < 100; ++b) { ug_render(&k, &x, l, r, 16); for (unsigned i = 0; i < 16; ++i) if (l[i] != r[i]) same = 0; } + CHECK(same, "SPRD MONO leaves the sides apart"); + } + static const uint8_t v7[] = { 0, 64, 127 }; + static const uint16_t pt[] = { 4 << 8, 28 << 8, 124 << 8 }; + unsigned corners = 0, bad = 0; + for (unsigned p = 0; p < 3; ++p) for (unsigned di = 0; di < 3; ++di) for (unsigned t = 0; t < 3; ++t) + for (unsigned m = 0; m < 3; ++m) for (unsigned ra = 0; ra < 3; ++ra) { + UgControls x = base(); + x.ptch = pt[p], x.diss = v7[di], x.tone = v7[t], x.dirt = v7[m], x.wave = (uint16_t)(v7[(m + di) % 3] << 8), x.rate = v7[ra], x.sprd = (uint8_t)(ra + 1); + Stats s = run(x, 1.0, 0.75, &k, 1); + ++corners; + if (s.rms < 1e-4 || s.peak >= 1.0 || fabs(s.dc) > 0.05) { + if (++bad <= 8) printf(" corner ptch %u diss %u tone %u dirt %u rate %u: rms %.1f peak %.2f dc %.3f\n", + pt[p] >> 8, v7[di], v7[t], v7[m], v7[ra], db(s.rms), s.peak, s.dc); + } + } + CHECK(bad == 0, "%u of %u corners silent, clipping or off centre", bad, corners); + + /* PNCH: a trig's punch stands out of the drone for its first milliseconds, never clips, and is gone by 0.3 s (55 ms at its top); + * at PNCH 0 a trig changes nothing */ + for (unsigned pn = 0; pn <= 127; pn += 127) { + static Ungemach twin; + UgControls x = base(); x.pnch = (uint8_t)pn; + run(x, 2, 1, &k, 1); + twin = k; + ug_punch(&k); + int16_t l[16], r[16], l2[16], r2[16]; + double first = 0, ref = 0, late = 0, lref = 0, peak = 0; + for (unsigned b = 0; b < 276; ++b) { /* 0.1 s */ + ug_render(&k, &x, l, r, 16), ug_render(&twin, &x, l2, r2, 16); + for (unsigned i = 0; i < 16; ++i) { + double a = l[i] / 32768.0, o = l2[i] / 32768.0; + if (b < 28) first += a * a, ref += o * o; /* the first 10 ms */ + if (fabs(a) > peak) peak = fabs(a); + } + } + for (unsigned b = 0; b < 552; ++b) ug_render(&k, &x, l, r, 16), ug_render(&twin, &x, l2, r2, 16); /* to 0.3 s */ + for (unsigned b = 0; b < 276; ++b) { /* 0.3-0.4 s */ + ug_render(&k, &x, l, r, 16), ug_render(&twin, &x, l2, r2, 16); + for (unsigned i = 0; i < 16; ++i) late += (double)l[i] * l[i], lref += (double)l2[i] * l2[i]; + } + double lift = 10 * log10(first / ref), after = 10 * log10(late / lref); + printf("PNCH %3u: first 10 ms %+.1f dB against no trig, 0.3-0.4 s later %+.2f dB, peak %.1f dB\n", pn, lift, after, db(peak)); + if (pn) CHECK(lift > 8 && fabs(after) < 1 && peak < 1.0, "PNCH 127: %+.1f dB, then %+.2f dB, peak %.2f", lift, after, peak); + else CHECK(fabs(lift) < 0.2 && fabs(after) < 0.2, "PNCH 0 still punches: %+.1f dB", lift); + } + + c = base(); + ug_reset(&k); + double lo = 1e9, hi = 0; + for (unsigned seg = 0; seg < 30; ++seg) { + Stats s = run(c, 6, 6, &k, 0); + if (seg) { if (s.rms < lo) lo = s.rms; if (s.rms > hi) hi = s.rms; } + } + printf("three minutes, 6 s windows: %.1f .. %.1f dB\n", db(lo), db(hi)); + CHECK(db(hi) - db(lo) < 6 && db(hi) - db(lo) > 0.05, "level over minutes %.1f .. %.1f dB", db(lo), db(hi)); + { + UgControls x = base(); x.rate = 100; + ug_reset(&k); + run(x, 1.0, 0.1, &k, 0); + double w[8] = { 0 }; + int16_t l[16], r[16]; + unsigned cycle = 0; + for (unsigned at = 0; at < 44100; at += 16) { + x.sync_phase = (uint16_t)(cycle += 16u * 65536u / 11025u); + ug_render(&k, &x, l, r, 16); + for (unsigned i = 0; i < 16; ++i) w[(x.sync_phase >> 13) & 7] += (double)l[i] * l[i]; + } + printf("synced: first eighth %.1f dB against the last %.1f dB\n", db(sqrt(w[0])), db(sqrt(w[7]))); + CHECK(db(sqrt(w[0])) > db(sqrt(w[7])) + 3, "synced RATE does not pulse"); + } + printf(failures ? "%d FAILED\n" : "all passed\n", failures); + return failures != 0; +} diff --git a/sdk/drafts/ungemach/test_ungemach.py b/sdk/drafts/ungemach/test_ungemach.py new file mode 100644 index 0000000000..a5851e5f96 --- /dev/null +++ b/sdk/drafts/ungemach/test_ungemach.py @@ -0,0 +1,31 @@ +"""UNGEMACH's host tests: the engine under UBSan and ASan (test_engine.c), and the calibration tool builds. + +Runs with no arguments from the checkout root; skips when no host C compiler is here.""" +import pathlib +import shutil +import subprocess +import tempfile +import unittest + +HERE = pathlib.Path(__file__).resolve().parent +CC = shutil.which('cc') or shutil.which('gcc') +SANITIZE = ['-std=c99', '-O1', '-g', '-fsanitize=undefined,address', '-fno-sanitize-recover=all'] + + +@unittest.skipUnless(CC, 'no host C compiler') +class Engine(unittest.TestCase): + def test_engine(self): + with tempfile.TemporaryDirectory() as folder: + exe = pathlib.Path(folder) / 'engine' + subprocess.run([CC, *SANITIZE, '-o', str(exe), 'engine.c', 'test_engine.c', '-lm'], cwd=HERE, check=True) + out = subprocess.run([str(exe)], cwd=HERE, check=True, capture_output=True, text=True).stdout + self.assertIn('all passed', out) + + def test_calibration_builds(self): + with tempfile.TemporaryDirectory() as folder: + subprocess.run([CC, '-std=c99', '-O2', '-Wall', '-Wextra', '-Werror', '-o', str(pathlib.Path(folder) / 'calib'), + 'calib_waves.c', 'engine.c', '-lm'], cwd=HERE, check=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/drafts/ungemach/verify.py b/sdk/drafts/ungemach/verify.py new file mode 100644 index 0000000000..05f3557f1f --- /dev/null +++ b/sdk/drafts/ungemach/verify.py @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: MIT +"""UNGEMACH: the engine and the USB package. + +1. test_engine.c on the host under UBSan/ASan: levels, DC and clipping at every corner of the controls, DISS's glide, + a split frame sounding as one, three minutes of drone, PNCH's punch standing out and ending, a synced RATE that + pulses (TESTING.md). +2. The package build.py makes from the sources is byte for byte the published one + (src/engine/assets/octatrack-module-packages.json). +Needs a host C compiler for 1 and m68k-elf-gcc for 2; what cannot run here is reported as skipped. +""" +from pathlib import Path +import hashlib +import json +import shutil +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[2] # sdk/drafts/ungemach; parents[3] once listed under sdk/octatrack/modules +FLAGS = ['-std=c99', '-O1', '-g', '-fsanitize=undefined,address', '-fno-sanitize-recover=all'] + +cc = shutil.which('cc') +if not cc: + sys.exit('[SKIP] no host C compiler: the engine checks did not run.') +with tempfile.TemporaryDirectory() as folder: + exe = Path(folder) / 'engine' + subprocess.run([cc, *FLAGS, '-o', str(exe), str(HERE / 'engine.c'), str(HERE / 'test_engine.c'), '-lm'], check=True) + subprocess.run([str(exe)], check=True, stdout=subprocess.DEVNULL) +if not shutil.which('m68k-elf-gcc'): + sys.exit('[SKIP] package: no m68k-elf-gcc here; the host checks passed.') +row = next((r for r in json.loads((ROOT / 'src/engine/assets/octatrack-module-packages.json').read_text(encoding='utf-8'))['packages'] + if r['id'] == 'ungemach'), None) +if row is None: + sys.exit('[SKIP] package: UNGEMACH is a draft with no published package row yet; the host checks passed.') +with tempfile.TemporaryDirectory() as folder: + out = Path(folder) / 'ungemach.mwrm' + subprocess.run([sys.executable, '-B', str(ROOT / 'sdk/runtime/loader/build.py'), *[str(ROOT / s) for s in row['sources']], + *[arg for hook in row['subscribe'] for arg in ('--subscribe', hook)], + *[arg for event in row.get('raise', []) for arg in ('--raise', event)], '-o', str(out)], + check=True, capture_output=True, cwd=ROOT) + data = out.read_bytes() +digest = hashlib.sha256(data).hexdigest() +if digest != row['sha256'] or (ROOT / 'public' / row['path']).read_bytes() != data: + sys.exit('[FAIL] the package built from source (%s) is not the published one (%s)' % (digest[:16], row['sha256'][:16])) +print('[PASS] UNGEMACH %s: engine on the host, package %s identical to the published one' % (row['version'], digest[:16])) From 6353800d69c5e1348d64c62fb6297c95f1c7e88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannik=20A=C3=9Ffalg?= <67785539+repeat98@users.noreply.github.com> Date: Tue, 24 Nov 2026 10:20:54 +0100 Subject: [PATCH 2/6] UNGEMACH: name the tested source in tests.evidenceRevision evidenceRevision named c07f3b1c, a commit on main that has no ungemach, which modules:check refuses. Name this branch's commit, which holds the engine the TESTING.md runs played (the cleaned-up engine renders identically to the build played on the unit, v68). Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/octamod.module.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/drafts/ungemach/octamod.module.json b/sdk/drafts/ungemach/octamod.module.json index 4577fbd126..8644361035 100644 --- a/sdk/drafts/ungemach/octamod.module.json +++ b/sdk/drafts/ungemach/octamod.module.json @@ -133,7 +133,7 @@ "report": "TESTING.md", "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). Not yet run: device:qualify, the CPU price, a project reloaded without the module, Part and bank changes, a power cycle after a Keep, and any MKII.", "hardwareStatus": "reported", - "evidenceRevision": "c07f3b1ccf31e66967c4f328019c607dc2821ce9", + "evidenceRevision": "8a5d506a212947cff937536337247fe574be2d44", "gates": [ "python3 -B verify.py" ] From 076d5b93fc886423a3832ea7de2c8887f39a5132 Mon Sep 17 00:00:00 2001 From: GnocchiBalboa Date: Tue, 24 Nov 2026 10:31:25 +0100 Subject: [PATCH 3/6] UNGEMACH: name 0.1.0-experimental and its build in TESTING.md modules:check requires TESTING.md to say what ran on this version: the source is v68d's engine with the measurement code compiled out; its release package has not been on a unit yet. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/TESTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/drafts/ungemach/TESTING.md b/sdk/drafts/ungemach/TESTING.md index 021b61c3b1..52743a39be 100644 --- a/sdk/drafts/ungemach/TESTING.md +++ b/sdk/drafts/ungemach/TESTING.md @@ -2,6 +2,10 @@ Everything here was observed by the author (GnocchiBalboa) and the coding agent working with them. A result names its build; "not tested" means not run. +## 0.1.0-experimental, 22 November 2026 + +This version's source (commit 8a5d506a, `module/ungemach`) is the engine of the diagnostic build v68d with the measurement code compiled out; its output renders identically to v68 (see Host tests). On the author's live-set MKI, v68d was kept, played and measured (Performance below), and its sound accepted. The release package built from this exact commit has not been on a unit yet; `device:qualify`, the CPU price and the persistence checks are still to run on it. + ## Units and base - **Live-set unit:** Octatrack MKI, OS 1.40C, Modwerk USB base 0.7.10 (`6070a4e4`), the author's own live set: seven Flex tracks with many trigs, LFOs and scenes, plus E-Verb, LOFI2, Analog BD, Mute Modes, Amiga and Mini Verb installed. From 3f54d43786c5f4cf82695663fc541dfc66b4138f Mon Sep 17 00:00:00 2001 From: GnocchiBalboa Date: Tue, 24 Nov 2026 15:00:46 +0100 Subject: [PATCH 4/6] UNGEMACH: CPU price, instance curve and qualification on the unit Measured on the author's MKI with a development twin of the beta base (4c7eb79b), release package a8bcdca3: CPU price 14.1 points, so 15 % in reserved[0] and resources.cpuPrice; first instance 14.6 % of a frame, admitted alone on an empty and a medium pattern with nothing dropped; device:qualify passed. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/TESTING.md | 30 ++++++++++-- sdk/drafts/ungemach/evidence/frame-cost.json | 48 ++++++++++++++++++++ sdk/drafts/ungemach/machine.c | 1 + sdk/drafts/ungemach/octamod.module.json | 11 ++++- 4 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 sdk/drafts/ungemach/evidence/frame-cost.json diff --git a/sdk/drafts/ungemach/TESTING.md b/sdk/drafts/ungemach/TESTING.md index 52743a39be..bfddf40057 100644 --- a/sdk/drafts/ungemach/TESTING.md +++ b/sdk/drafts/ungemach/TESTING.md @@ -4,7 +4,9 @@ Everything here was observed by the author (GnocchiBalboa) and the coding agent ## 0.1.0-experimental, 22 November 2026 -This version's source (commit 8a5d506a, `module/ungemach`) is the engine of the diagnostic build v68d with the measurement code compiled out; its output renders identically to v68 (see Host tests). On the author's live-set MKI, v68d was kept, played and measured (Performance below), and its sound accepted. The release package built from this exact commit has not been on a unit yet; `device:qualify`, the CPU price and the persistence checks are still to run on it. +This version's source (commit 8a5d506a, `module/ungemach`) is the engine of the diagnostic build v68d with the measurement code compiled out; its output renders identically to v68 (see Host tests). On the author's live-set MKI, v68d was kept, played and measured (Performance below), and its sound accepted. + +On 24 November 2026 the release package of this source, `a8bcdca3`, was priced and qualified on the same MKI (CPU price and Qualification below). The package now carries that price in its descriptor (`reserved[0]` = 15), which is the only byte that differs: `37d7a278`. The power cycle after a Keep and a project opened without the module are still to run. ## Units and base @@ -25,7 +27,7 @@ The cleanup for this draft (removed measurement and PC-only code, unused tables, - **One track a Part** (package v32 `d3b5f1e4`, Probe-Octa, 19 November 2026): a second track shows UNGEMACH in the machine list but cannot pick it. After T1 went back to FLEX, T2 could pick it. - **Controls** (live-set unit, builds v60 to v68, 21-22 November 2026): every SRC knob and SPRD and PNCH were turned while the pattern played; parameter locks on PTCH ran on every trig; an LFO on DIRT moved it (the diagnostic log showed DIRT's range moving with it); a crossfader scene changing UNGEMACH parameters was moved and held. The author judged PNCH, WAVE, DIRT, RATE and DISS by ear and accepted v68's sound. - **Keeps:** each build was kept with `device -- try --accept` and played; the author replugged USB or power-cycled between builds when the bridge needed it. -- **Not tested:** a project reloaded without the module, Part and bank changes with an UNGEMACH track, a power cycle after a Keep with the project reloaded, MIDI floods, `npm run device:qualify`, and any MKII. +- **Not tested:** a project reloaded without the module, a power cycle after a Keep with the project reloaded, MIDI floods, and any MKII. Part and bank changes ran in `device:qualify` (below). ## Performance on the live-set unit @@ -57,7 +59,29 @@ LCUT was removed for this reason; the code size of the render loop matters more ## CPU price -Not measured yet (`npm run device -- do`, `guard`). +Measured 24 November 2026 on the author's MKI, OS 1.40C, RAM-booted with a development twin of the beta base (`4c7eb79b`, built with `--dev` from `d0dc7166`), release package `a8bcdca3`, as a trial that was rolled back. A scratch project, bank A: A01 a medium pattern (T1-T7 with trigs on steps 1, 5, 9 and 13, samples on T2 and T3), A02 empty, A03 only T1 with a trig on every step and no sample. UNGEMACH at its Part defaults. + +| Reading (`PLAY w2500 guard w6000 guard STOP`, the second line, twice each) | In the frame interrupt | Skipped | +| --- | --- | --- | +| T1 UNGEMACH, A03 | 43.9 %, 43.9 % | 0 | +| T1 UNGEMACH, A02 (no trigs) | 43.6 %, 43.5 % | 0 | +| T1 FLEX, A03 | 29.8 %, 29.8 % | 0 | + +**Price: 14.1 points, so 15 %** (`resources.cpuPrice`, `reserved[0]`). UNGEMACH renders while the sequencer runs whether or not its track trigs, so the price is the machine against the same track on FLEX. + +**Instance curve** (`device:price --curve T1`, `evidence/frame-cost.json`): installed on no track it added nothing (rest 0). On A03 the first instance raised the longest frame from 63.1 to 77.7 % (first 14.6). On the medium pattern A01 it read 78.7 to 102.2 % (+23.5): past 100 % that is the overload, not the module's cost, so the curve is A03's. Admission: picked on A02 and played there, admitted, longest frame 70.8 %, 0 dropped renders, 0 stalls; played on A01, admitted, longest frame 97.6 %, 0 dropped, 0 stalls. The `cpu` line after the pick showed the base booking the default 12 % (this package named no price yet). + +The price tool's trial did not roll back by itself in any of its three runs (it printed "THE TRIAL DID NOT ROLL BACK"); each time `recover` rolled it back and the inventory read empty. + +## Qualification + +`device:qualify --keeps-ok --seconds 30` on the same twin and scratch project, release package `a8bcdca3`, 24 November 2026 (on Windows through a small wrapper that maps the script's Unix socket to the session's TCP port; the script itself unchanged). **Result: passed, no failures.** + +- UNGEMACH alone, playing: on T1 its longest render 39.2 % of a frame, T1-4 core peak 394 per mille, CPU 602 per mille; on T5 its longest render 65.3 %, T5-8 core peak 419, CPU 612. Mean frame interrupt quiet against triggered: T1 42.7 / 43.2 %, T5 45.0 / 45.4 %. +- On T1-T8 at once: T1 ran UNGEMACH, T2-T8 were refused (one track a Part, as intended). CPU 608, core peaks 395 and 483 per mille. +- The six SRC knobs swept while playing; Part switches 12 of 12 ran their own effects within 3 s; a queued pattern change into another bank and back. +- Afterwards the Part reloaded from its saved copy byte for byte, the module was removed and the inventory was empty. No crash or stall recorded. +- Not covered: listening, a power cycle and what survives it, MIDI, scenes and recording, UNGEMACH beside other installed modules. ## Stock flows diff --git a/sdk/drafts/ungemach/evidence/frame-cost.json b/sdk/drafts/ungemach/evidence/frame-cost.json new file mode 100644 index 0000000000..7660fb293f --- /dev/null +++ b/sdk/drafts/ungemach/evidence/frame-cost.json @@ -0,0 +1,48 @@ +{ + "module": "ungemach", + "version": "0.1.0-experimental", + "base": "4c7eb79b (development twin of the beta base, built with --dev from module/ungemach d0dc7166)", + "scene": "A scratch project, bank A, Part 1 saved. Picks on the empty pattern A02. The curve was read on A03 (only T1, a trig on every step, no sample): on the medium pattern A01 (T1-T7 with trigs on steps 1/5/9/13, samples on T2 and T3) the first instance read 102.2 % of a frame (+23.5 over 78.7), the overload rather than the module. The medium admission run is from that A01 run. One instance only: UNGEMACH admits one track a Part. Author's Octatrack MKI, OS 1.40C, release package a8bcdca3.", + "seconds": 8, + "measuredAt": "2026-11-24T13:33:27.951Z", + "tracks": [ + "T1" + ], + "rest": 0, + "first": 14.6, + "each": 14.6, + "points": [ + 63.1, + 77.7 + ], + "adds": [ + 14.6 + ], + "admission": [ + { + "pattern": "empty", + "number": 2, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 70.8, + "frame": 43.1, + "dropped": 0, + "stalls": 0 + }, + { + "pattern": "medium", + "number": 1, + "track": "T1", + "seconds": 8, + "admitted": true, + "frameMax": 97.6, + "frame": 53.2, + "dropped": 0, + "stalls": 0 + } + ], + "notes": [ + "Medium run on A01 (2026-11-24T13:31:06.173Z): points [78.7, 102.2], adds [23.5]." + ] +} diff --git a/sdk/drafts/ungemach/machine.c b/sdk/drafts/ungemach/machine.c index 370b233dcf..4fb3f6b58b 100644 --- a/sdk/drafts/ungemach/machine.c +++ b/sdk/drafts/ungemach/machine.c @@ -362,6 +362,7 @@ const struct modwerk_machine_setup ungemach_machine = { .track_page = ungemach_track_page, .render = ungemach_render_track, .leave = ungemach_leave, + .reserved = {15}, /* the CPU price, % of a frame (resources.cpuPrice): 14.1 measured, rounded up */ }, .page = ungemach_setup_page, .knob = ungemach_setup_knob, diff --git a/sdk/drafts/ungemach/octamod.module.json b/sdk/drafts/ungemach/octamod.module.json index 8644361035..bca58e7f21 100644 --- a/sdk/drafts/ungemach/octamod.module.json +++ b/sdk/drafts/ungemach/octamod.module.json @@ -127,11 +127,20 @@ "method": "hardware", "conditions": "Author's Octatrack MKI, OS 1.40C, Modwerk USB base 0.7.10 (6070a4e4), the author's full live-set pattern with seven Flex tracks. A diagnostic build of the same engine timed the whole callback with the 132 MHz DTCN3 timer, as the base's guard does, and reported the mean a frame each second: 37-43 microseconds for long stretches and 49-60 for others, with the same settings (22 November 2026). The value is the highest mean, 60 microseconds, in core cycles (twice the timer's ticks). The longest single frame was not recorded.", "source": "TESTING.md" + }, + "cpuPrice": { + "value": 15, + "unit": "percent-of-frame", + "measure": "machine-render", + "tool": "npm run device -- do (guard)", + "date": "2026-11-24", + "conditions": "Author's Octatrack MKI, OS 1.40C, a development twin (4c7eb79b) of the beta base, release package a8bcdca3. A scratch pattern with only T1 playing, a trig on every step and no sample, default UNGEMACH settings: T1 on UNGEMACH read 43.9 % of a frame in the frame interrupt, the same track on FLEX 29.8 % (two 6-second windows each, no skipped frames), so 14.1 points, rounded up. UNGEMACH renders while the sequencer runs whether or not its track trigs: the same pattern without trigs read 43.5-43.6 %.", + "source": "TESTING.md" } }, "tests": { "report": "TESTING.md", - "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). Not yet run: device:qualify, the CPU price, a project reloaded without the module, Part and bank changes, a power cycle after a Keep, and any MKII.", + "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). The release package (24 November 2026, development twin 4c7eb79b): CPU price 14.1 points (15 %), first instance 14.6 % of a frame, admitted alone on an empty and a medium pattern with no dropped render, and device:qualify passed, Part and bank changes included. Not yet run: a project reloaded without the module, a power cycle after a Keep, and any MKII.", "hardwareStatus": "reported", "evidenceRevision": "8a5d506a212947cff937536337247fe574be2d44", "gates": [ From 35e918bd3168721e0a81075b2ebdf48e70f54720 Mon Sep 17 00:00:00 2001 From: GnocchiBalboa Date: Tue, 24 Nov 2026 15:19:45 +0100 Subject: [PATCH 5/6] UNGEMACH: persistence on the unit The kept package survived a power cycle with the saved project, and with the module removed the project loaded with its track on FLEX and a missing-module message. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/TESTING.md | 11 +++++++++-- sdk/drafts/ungemach/octamod.module.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sdk/drafts/ungemach/TESTING.md b/sdk/drafts/ungemach/TESTING.md index bfddf40057..dc7794ecaa 100644 --- a/sdk/drafts/ungemach/TESTING.md +++ b/sdk/drafts/ungemach/TESTING.md @@ -6,7 +6,14 @@ Everything here was observed by the author (GnocchiBalboa) and the coding agent This version's source (commit 8a5d506a, `module/ungemach`) is the engine of the diagnostic build v68d with the measurement code compiled out; its output renders identically to v68 (see Host tests). On the author's live-set MKI, v68d was kept, played and measured (Performance below), and its sound accepted. -On 24 November 2026 the release package of this source, `a8bcdca3`, was priced and qualified on the same MKI (CPU price and Qualification below). The package now carries that price in its descriptor (`reserved[0]` = 15), which is the only byte that differs: `37d7a278`. The power cycle after a Keep and a project opened without the module are still to run. +On 24 November 2026 the release package of this source, `a8bcdca3`, was priced and qualified on the same MKI (CPU price and Qualification below). The package now carries that price in its descriptor (`reserved[0]` = 15), which is the only byte that differs: `37d7a278`. That package went through the persistence checks the same day (Persistence below). + +## Persistence + +Package `37d7a278`, the author's MKI, OS 1.40C, flashed base 0.7.10 (`6070a4e4`), 24 November 2026, observed by the author; the inventory was read over USB. + +- **Keep and power cycle:** kept with `device -- try --accept`. In a scratch project T1 was set to UNGEMACH, a pattern with trigs on T1 played and the drone sounded; Part and project were saved. After a power cycle the inventory still listed UNGEMACH (`ee55bea9`), the project loaded with T1 on UNGEMACH, and it played as before. +- **The project without the module:** another project loaded, UNGEMACH removed with `device -- remove --accept` (inventory empty), then the scratch project loaded again without saving. The unit showed a message that UNGEMACH is missing, T1 read FLEX, the sequencer ran normally and T1 stayed silent (no sample on it). ## Units and base @@ -27,7 +34,7 @@ The cleanup for this draft (removed measurement and PC-only code, unused tables, - **One track a Part** (package v32 `d3b5f1e4`, Probe-Octa, 19 November 2026): a second track shows UNGEMACH in the machine list but cannot pick it. After T1 went back to FLEX, T2 could pick it. - **Controls** (live-set unit, builds v60 to v68, 21-22 November 2026): every SRC knob and SPRD and PNCH were turned while the pattern played; parameter locks on PTCH ran on every trig; an LFO on DIRT moved it (the diagnostic log showed DIRT's range moving with it); a crossfader scene changing UNGEMACH parameters was moved and held. The author judged PNCH, WAVE, DIRT, RATE and DISS by ear and accepted v68's sound. - **Keeps:** each build was kept with `device -- try --accept` and played; the author replugged USB or power-cycled between builds when the bridge needed it. -- **Not tested:** a project reloaded without the module, a power cycle after a Keep with the project reloaded, MIDI floods, and any MKII. Part and bank changes ran in `device:qualify` (below). +- **Not tested:** MIDI floods and any MKII. Part and bank changes ran in `device:qualify`; the power cycle and a project without the module under Persistence (below). ## Performance on the live-set unit diff --git a/sdk/drafts/ungemach/octamod.module.json b/sdk/drafts/ungemach/octamod.module.json index bca58e7f21..af9b615f3e 100644 --- a/sdk/drafts/ungemach/octamod.module.json +++ b/sdk/drafts/ungemach/octamod.module.json @@ -140,7 +140,7 @@ }, "tests": { "report": "TESTING.md", - "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). The release package (24 November 2026, development twin 4c7eb79b): CPU price 14.1 points (15 %), first instance 14.6 % of a frame, admitted alone on an empty and a medium pattern with no dropped render, and device:qualify passed, Part and bank changes included. Not yet run: a project reloaded without the module, a power cycle after a Keep, and any MKII.", + "summary": "Author's MKI, Modwerk USB base 0.7.10, kept with diagnostic builds of this engine (22 November 2026): it played in the author's full live set for about ten minutes per session while every control was turned, with 0-15 skipped frames a second at times and no dropouts heard. Host tests under UBSan and ASan pass (levels, DC, clipping, DISS glide, PNCH, synced RATE). The release package (24 November 2026, development twin 4c7eb79b): CPU price 14.1 points (15 %), first instance 14.6 % of a frame, admitted alone on an empty and a medium pattern with no dropped render, and device:qualify passed, Part and bank changes included. Kept, it survived a power cycle with the saved project; with the module removed the project loaded with that track on FLEX and a missing-module message. Not run: any MKII.", "hardwareStatus": "reported", "evidenceRevision": "8a5d506a212947cff937536337247fe574be2d44", "gates": [ From 73ae558d0d18e6a9bea42b617104cab725ddfc5e Mon Sep 17 00:00:00 2001 From: GnocchiBalboa Date: Tue, 24 Nov 2026 15:34:05 +0100 Subject: [PATCH 6/6] UNGEMACH: performance record, cost at rest and hardware UI captures evidence/performance.json and evidence/cpu-price.json from the 24 November unit runs (cost at rest 0), and two LCD captures of the author's MKI with their media entries and access steps. The static cycle bound and a MIDI flood are not run; they await the owner's waiver as for SYNTIZ. Co-Authored-By: Claude Opus 5.5 --- sdk/drafts/ungemach/TESTING.md | 7 ++- sdk/drafts/ungemach/evidence/cpu-price.json | 38 +++++++++++++ sdk/drafts/ungemach/evidence/performance.json | 30 +++++++++++ sdk/drafts/ungemach/media/LICENSE.md | 3 ++ sdk/drafts/ungemach/media/ot-machine-list.png | Bin 0 -> 2222 bytes sdk/drafts/ungemach/media/ot-src.png | Bin 0 -> 2390 bytes sdk/drafts/ungemach/octamod.module.json | 50 +++++++++++++++--- 7 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 sdk/drafts/ungemach/evidence/cpu-price.json create mode 100644 sdk/drafts/ungemach/evidence/performance.json create mode 100644 sdk/drafts/ungemach/media/LICENSE.md create mode 100644 sdk/drafts/ungemach/media/ot-machine-list.png create mode 100644 sdk/drafts/ungemach/media/ot-src.png diff --git a/sdk/drafts/ungemach/TESTING.md b/sdk/drafts/ungemach/TESTING.md index dc7794ecaa..c17d97e328 100644 --- a/sdk/drafts/ungemach/TESTING.md +++ b/sdk/drafts/ungemach/TESTING.md @@ -98,4 +98,9 @@ UNGEMACH changes no stock flow. Its SRC SETUP A to D are empty and stay 0, so a ## OT UI captures -Not captured yet. +Hardware captures, 24 November 2026: the author's MKI, OS 1.40C, the development twin `4c7eb79b` RAM-booted over USB, package `37d7a278` in a trial, the scratch project with T1 on UNGEMACH at its Part defaults, transport stopped. The LCD was read over USB (`png:`) and scaled 3x without changing pixels. + +- `media/ot-machine-list.png`: FUNC + SRC on T1, PLAYBACK SETUP with UNGEMACH selected in the machine list and its SPRD and PNCH knobs. +- `media/ot-src.png`: SRC, the main page with PTCH, DISS, TONE, WAVE, RATE and DIRT. + +While the trial ran, the base's `cpu` line booked 15 % for the track, the package's price. When the trial ended with T1 set back to FLEX, the base refused the rollback with "needs-recovery"; a power cycle returns the unit to its flashed base, and nothing was kept. diff --git a/sdk/drafts/ungemach/evidence/cpu-price.json b/sdk/drafts/ungemach/evidence/cpu-price.json new file mode 100644 index 0000000000..4113e75381 --- /dev/null +++ b/sdk/drafts/ungemach/evidence/cpu-price.json @@ -0,0 +1,38 @@ +{ + "module": "ungemach", + "version": "0.1.0-experimental", + "base": "4c7eb79b (development twin of the beta base, built with --dev from module/ungemach d0dc7166)", + "scene": "Author's Octatrack MKI, OS 1.40C, a scratch project, bank A: read on A03 (only T1, a trig on every step, no sample), transport stopped between readings; release package a8bcdca3 (the released 37d7a278 differs only in its price byte). Before: no module installed. At rest: UNGEMACH installed, T1 on FLEX. Its price in use is the machine-render reading in resources.cpuPrice; this record holds only the cost at rest. The tool printed THE TRIAL DID NOT ROLL BACK; recover rolled it back and the inventory read empty.", + "seconds": 8, + "measuredAt": "2026-11-24T13:33:27.951Z", + "result": { + "id": "ungemach", + "version": "file", + "packageSha256": "a8bcdca3ac910e22d538712213756b7cd430d8aced2575e0b0b0f3207aff4de1", + "before": { + "frame": 32.3, + "frameMax": 63.1, + "frames": 22357, + "skipped": 0, + "cpu": 44.6, + "dsp1to4": 38.6, + "dsp5to8": 47.5 + }, + "atRest": { + "frame": 32.3, + "frameMax": 63.1, + "frames": 22361, + "skipped": 0, + "cpu": 44.7, + "dsp1to4": 38.4, + "dsp5to8": 47.5 + }, + "atRestAdds": { + "frame": 0, + "cpu": 0.1, + "dsp1to4": -0.2, + "dsp5to8": 0 + }, + "rolledBack": false + } +} diff --git a/sdk/drafts/ungemach/evidence/performance.json b/sdk/drafts/ungemach/evidence/performance.json new file mode 100644 index 0000000000..15972fa2e8 --- /dev/null +++ b/sdk/drafts/ungemach/evidence/performance.json @@ -0,0 +1,30 @@ +{ + "schema": 1, + "module": "ungemach", + "version": "0.1.0-experimental", + "kind": "coldfire", + "cycles": { + "unit": "cycles/event", + "static": null, + "measured": 62546, + "budget": 95782, + "method": "An event is one track's render for one 16-sample frame, called by the base in the frame interrupt (two calls when a trig falls inside the frame). The budget is the whole frame, the render's deadline: 362.8 us, 95,782 cycles at 264 MHz; the base's guard lets the interrupt use 80 % of it. Measured on the author's MKI, OS 1.40C, 24 November 2026, with device:qualify on a RAM-booted development twin (4c7eb79b) of the beta base, release package a8bcdca3 (the released 37d7a278 differs only in its price byte): the `cpu` line's longest render, both passes of a frame, was 39.2 % of a frame (37,547 cycles) on T1 and 65.3 % (62,546 cycles) on T5 while the pattern played and the knobs were swept. Its mean is far lower: 14.1 points of the frame interrupt over FLEX (resources.cpuPrice), and 37-43 us a frame (9,800-11,400 cycles) in the author's busy live set with diagnostic builds of the same engine (TESTING.md, Performance), 49-60 us in some stretches with the same settings. A static bound is not established." + }, + "load": { + "frameUs": 362.8, + "stockLongestUs": 228.9, + "moduleLongestUs": 281.9, + "stockIdlePercent": 70.2, + "moduleIdlePercent": 56.1, + "method": "The base's frame guard (npm run device -- do guard and device:price --curve), not cfmeter.py, on the development twin 4c7eb79b on the author's MKI, 24 November 2026, release package a8bcdca3: a scratch pattern with only T1 playing, a trig on every step and no sample. T1 on FLEX: longest frame 63.1 % (228.9 us), 29.8 % of each frame in the frame interrupt. T1 on UNGEMACH: longest frame 77.7 % (281.9 us), 43.9 % in the interrupt, 0 renders dropped. Idle is 100 minus the interrupt's share. On the medium pattern (T1-T7 with trigs every four steps, two samples) the longest frame went from 78.7 to 102.2 % with UNGEMACH; played there alone it was admitted with 0 dropped renders and 0 stalls (evidence/frame-cost.json). One UNGEMACH track is about 14 % of a frame, so the longest-frame rise and the idle fall are above the audit's 10 % rule; it is limited to one track a Part, and the waiver is asked of the owner (issue #1790, pull request #2081)." + }, + "stress": { + "floodMessagesPerSecond": null, + "clockBpm": null, + "seconds": null, + "stuckNotes": null, + "hangs": null, + "dropped": null, + "droppedExplanation": "No MIDI flood ran: UNGEMACH has no MIDI path of its own, notes reach it through the track's PTCH as for FLEX, and nothing on the author's computer sends MIDI to the unit. Its stress runs are the author's full live set (seven Flex tracks with many trigs, LFOs and scenes) played for about ten minutes per session with diagnostic builds of the same engine while every control was turned (22 November 2026: no hang, no dropout heard, 0-15 frames skipped a second at busy moments), and device:qualify (24 November 2026: knob sweeps, 12 Part switches and a bank change while playing, no failure, crash or stall). A flood is still to run." + } +} diff --git a/sdk/drafts/ungemach/media/LICENSE.md b/sdk/drafts/ungemach/media/LICENSE.md new file mode 100644 index 0000000000..507d968936 --- /dev/null +++ b/sdk/drafts/ungemach/media/LICENSE.md @@ -0,0 +1,3 @@ +# Media rights + +`ot-*.png` are captures of the author's Octatrack MKI LCD over USB (a development base's screen read), scaled 3x without changing pixels, for module documentation. GnocchiBalboa made the captures. The underlying Octatrack interface remains Elektron material; no relicensing of that interface is claimed. Use is declared as `LicenseRef-OT-UI-Documentation` for review in this repository. Firmware, cards, raw LCD planes and memory dumps are not distributed. diff --git a/sdk/drafts/ungemach/media/ot-machine-list.png b/sdk/drafts/ungemach/media/ot-machine-list.png new file mode 100644 index 0000000000000000000000000000000000000000..671a97d9b4817ad39908478c90cd1ce7c0a6ce5c GIT binary patch literal 2222 zcmZuz2~ZPP82&fmP$U*n5sgRy87*45O60JRI1#msf)0uY2qlUX3@9K+EwDCxE6L`ce|Gl0_q}ib_g`;wL)Nb* zS=i+$U{46RzwIi(l>KWN^w4y9zar@8PH#(7nmtpMz2SiSU(;_P zS&WV1ij9JZD-4JDgOp9#Z-aUVzVR6;eEvl6s;PCv9!x+-(V#0PiA$@K2`IoP4J8iB za+EXkt{=!9pU4*lG`0E%kB_%6nQuR&=G$uR(3kG1GdkDZ65`^G=t8Q_)W z+!dvdnjFQlV=iz?8|-dhRgcyqox)BlJm@Hh{cE<%x$SrIAGq|#4@=|Nk1kM+uyOgZ zDpNP%2Dj$a&T8ipQa3p=c?LYAF2-@5My$>;PK_V}cc6f-)=w-;@<7#h2zt|J5J9kJ zWLC43H@C-b51~IH$NjbgDsi=&uYp?bcm_gmy5WGq`+9&5a z%elDyA(pf*Wy*Y?Rx?xF8YGxgVv1A9p%Pn&ZU8G!Gc?Z~>NyC-T#|CcuhUD3#_g`eS=Er?=&srQ+&F2qe04#D|^_qOUdFM1th_V^W%G_}nW z&+RU)XzFi&TR_s*jlS#x&e9yR!;6stIk(}GX?KB)s~5{jbhis+RH^e>5vfNt*sW9WyNrA<%^K{c;Ju`^o}W{88|ExQ}3vE^SC zl6;F|19@>zBt@7<%diHiFX*4(XirXzlq#%!{{617jNUf;F|R4m=H8oTeCI+vCX1HZ z_lou4a1k9l^T&p3f=)w<6PPl|AD%W_b1EP2*vuh+%YJLbao7z2CFF3YT`g(S<;Gm$ z2#@w0LiWmMm*9t{6x>!ZYLcR;o?3 z{{{vkgO-cC4d%2%G!6uM?O!{IU1%Jlm5+~J3z`B-h{7)BNo9Z)LVL0jCP11OG^gXp R!D#KiwX4=Mcq^lR_#blQHrfCH literal 0 HcmV?d00001 diff --git a/sdk/drafts/ungemach/media/ot-src.png b/sdk/drafts/ungemach/media/ot-src.png new file mode 100644 index 0000000000000000000000000000000000000000..dc4f09259c3ade956ac3b0001bcfb54eda5469af GIT binary patch literal 2390 zcmZuzX;c$e6utohvV`pzz(i~Wj|+kamjpFH2*`F?0YzmI6;Tlc5+y1i2BwV)BCAzf zwvtnNz)ApRm8Fm#6tKwBgY03EARw!t5JW5;p#1@p@5ju%neX1*`@MVL&0Qx4TY?fv z2>=N8c887v$fA!pWF2}1#!L5f07YH2qz~cavWB}Id0c?K}3W5WHSCx>=7PIc}Gusjj9n&xL#<3ThRU48Vx3I4- z)b3y9?!N^GSJ2xi6WO@==qG*g>r!(5gw;2JSRzH4(o>z(vXGQ45z&SPZq}{jMtYBY zsxqZZJ|J8fYoNpC#YUHBD3)1~3x0L-E@ajuC({dg>M5|A02ymf=KNT*-#DjsRR`JzI+*UK?Nl4-kR_3sm9dWxb5gPv=gNuMTYQ zF$8_J)3K&cG9yPPjt}`dVcmEtB6dAdm6wiwH(4h|5&`ZhXH2E+(iY^hbJJmu&(Fnw%@hR@*6;vW@_a&R9>Lv3ohTklDW2R$#!x2Y zjLk*!)7iV~sbHRep7F3)O%X#9DfS7fE)${Ri)47Gq@Np-ODA9hlZ8QANddDmv}Pa% zZ9)u$?|~&{2Pvw;v(MRI&F0PVQx)Y7JWMU4b|+X5X~QLD*vJ5$ZbI7pPA{DtYrvil z8dd`KL6uAbNs3{g0}Od5NU2V|r-}Et*duNH&DhL%qG=4{pRg_Lmp9jVN0-PYsMPzQ zJ?;kF+?u!66;zW+!6>$70376=W)Miewnal}^~v~nqpMh7o&-e0V9KwWEi#9^+c{Fy zh1W9iMrCta)r=Tz=QHV-7im5V5#A^0fxjJg`#UUEnQwLy3V4Qz5U)I%f@WxuoqJy0w$v$xq-aU_3#dZ|wEcFx0h);UCcZFxwp4)GH;`IkGf>QQmmSyn~4f3``^?K98fe4OQCn{Gm` z$wU-HMFRbZw>F*p4uye=&~(QgkzM_D znNlibJ8*sTBH~RocTAdx;GEFe%cr2jmx=bsiZdarj&35_4gS$|c_c;y+I4U%w`XKz zgki1eWrj>Q^DTiQ2P+p3=yQoA$N;Jps`dXPU4V-Zu(QsXd+?5PYc?f6OULcVK<3#r zVvNZ~{jv^;)q$`@thnfzJ(iF@t0yKmyX@lbeJ?iiGp7q4m*P9N>L$LLGmDc_%<=dp zmitU$^`KV2faY_ii&adl58&AdZN2ySwX9ZsX=Q;&qG)HX(eqdfrRX3hX8ZE0dtb$t zoFcEskaKXxS&7sz*X-__DJ>6PH(X33wiGhOd!y4yZd42#j8*w;d&@U3?Fh1zrT;U4 fpd2*GeiAI=>Ic-@iBy$n^cC1!I~>Zf^!(vp#Aj!T literal 0 HcmV?d00001 diff --git a/sdk/drafts/ungemach/octamod.module.json b/sdk/drafts/ungemach/octamod.module.json index af9b615f3e..74a585818a 100644 --- a/sdk/drafts/ungemach/octamod.module.json +++ b/sdk/drafts/ungemach/octamod.module.json @@ -152,14 +152,52 @@ "file": "LICENSE", "declaration": "Original work by GnocchiBalboa under MIT. No Elektron firmware, extracted routines, tables, samples or graphics; the page copies stock's FLEX record at run time on the user's unit and never ships it." }, - "media": [], + "media": [ + { + "path": "media/ot-machine-list.png", + "credit": "GnocchiBalboa; Elektron Octatrack UI", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "captureType": "hardware", + "caption": "Select an audio track, hold FUNC and press SRC: PLAYBACK SETUP opens with the machine list. Go DOWN to UNGEMACH and press YES. The right side shows its two setup knobs: SPRD (stereo width) and PNCH (a punch on every trig).", + "alt": "PLAYBACK SETUP with the machine list FLEX, THRU, NEIGHBOR, PICKUP and UNGEMACH selected, and the SPRD and PNCH knobs on the right.", + "otUi": { + "page": "SRC SETUP (PLAYBACK SETUP) machine list", + "shows": "location-and-controls", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "ace30d0ffa6b1ee4e52537b20266a93c9133abc62274eaf31f28bf30b27f2caf", + "setup": "The author's Octatrack MKI, OS 1.40C, a development twin (4c7eb79b) of the beta base RAM-booted over USB, UNGEMACH 0.1.0-experimental (package 37d7a278) in a trial, track 1 on UNGEMACH at its Part defaults, stopped transport. The LCD read over USB (png), actual pixels scaled 3x. UI capture only." + } + }, + { + "path": "media/ot-src.png", + "credit": "GnocchiBalboa; Elektron Octatrack UI", + "license": "LicenseRef-OT-UI-Documentation", + "source": "original", + "captureType": "hardware", + "caption": "Press SRC for the main page. DISS widens the chord from unison to a scream, WAVE goes from dull to shrill, RATE drifts freely up to 63 and pulses with the track from 64. Put a trig on the track, set the AMP HOLD high and press PLAY; try DISS 40 and RATE 16 for a slowly moving dark chord.", + "alt": "The SRC page of track 1 with PTCH, DISS and TONE on the top row and WAVE, RATE and DIRT below; the footer reads SRC UNGEMACH.", + "otUi": { + "page": "SRC main page", + "shows": "controls", + "firmware": "1.40C", + "moduleVersion": "0.1.0-experimental", + "imageSha256": "ace30d0ffa6b1ee4e52537b20266a93c9133abc62274eaf31f28bf30b27f2caf", + "setup": "The author's Octatrack MKI, OS 1.40C, a development twin (4c7eb79b) of the beta base RAM-booted over USB, UNGEMACH 0.1.0-experimental (package 37d7a278) in a trial, track 1 on UNGEMACH at its Part defaults, stopped transport. The LCD read over USB (png), actual pixels scaled 3x. UI capture only." + } + } + ], "access": { - "location": "The track's machine list (double-tap a track key, or SRC SETUP)", + "location": "Audio track: FUNC + SRC (PLAYBACK SETUP) → UNGEMACH in the machine list.", "steps": [ - "Double-tap a track key, move to UNGEMACH in the machine list and press YES.", - "Put a trig on the track, set the AMP envelope's HOLD high and press PLAY: the drone sounds. The SRC page shows PTCH, DISS, TONE, WAVE, RATE and DIRT.", - "Press SRC again for SRC SETUP: SPRD (knob E) and PNCH (knob F)." + "Select an audio track with its TRACK key.", + "Hold FUNC and press SRC to open PLAYBACK SETUP. Go DOWN to UNGEMACH and press YES; the right side shows SPRD and PNCH.", + "Press SRC for PTCH, DISS, TONE, WAVE, RATE and DIRT. Put a trig on the track, set the AMP envelope's HOLD high and press PLAY: the drone sounds." ], - "screenshots": [] + "screenshots": [ + "media/ot-machine-list.png", + "media/ot-src.png" + ] } }