[
  {
    "path": ".clangd",
    "content": "Diagnostics:\n  Suppress:\n    - \"xunused-includes\"\n    - \"xasm_invalid_output_constraint\"\nCompileFlags:\n  Add:\n    - \"-I./\"\n    - \"-I./lib/\"\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Build\n\non: [push]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n      with:\n        fetch-depth: 0\n    - name: Set up Python\n      uses: actions/setup-python@v2\n    - name: build\n      run: |\n        git submodule update --init \n        bash -ex ./src/build.sh --rebuild\n    - name: deploy\n      run: |\n        git remote add --mirror=fetch secondary https://${{ secrets.CODEBERG_AUTH }}@codeberg.org/eh2k/squares-and-circles.git\n        git fetch origin\n        git push secondary --all --force"
  },
  {
    "path": ".gitignore",
    "content": ".pio\n.vscode\n.test\n*.elf\n*.log\n*.txt\n*.bin.h\nsrc/__pycache__/app_hex.cpython-310.pyc\n.build/\n.venv/"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"lib/udynlink\"]\n\tpath = lib/udynlink\n\turl = https://github.com/eh2k/udynlink.git\n"
  },
  {
    "path": "README.md",
    "content": "> Feedback welcome: Feel free to leave a message or any hints in the [\"General Feedback\"](https://github.com/eh2k/squares-and-circles/issues/1) issue.\n\n# □︎●︎ [![WebFlasher](https://img.shields.io/badge/Web-Flasher-blue)](https://eh2k.github.io/□●/flash/?firmware) [![MODULAGrid](https://img.shields.io/badge/MODULAR-Grid-white)](https://www.modulargrid.net/e/modules/browser?SearchName=squares+and+circles&SearchShowothers=1)\n\n<!-- ⧉⦾ ⧇ ⟥⧂ -->\n**squares-and-circles** is an alternate firmware for the Eurorack module Ornament & Crime (O_C), specifically targeting the Teensy 4.0.\n\n>  <a href=\"CHANGELOG.txt\">CHANGELOG.txt</a>\n\n## ■ Demos\n\n| [![](https://img.youtube.com/vi/WQj3YqGpxRU/0.jpg)](https://www.youtube.com/watch?v=WQj3YqGpxRU) | [![](https://img.youtube.com/vi/QdlwETEaE3A/0.jpg)](https://youtu.be/QdlwETEaE3A) | [![](https://img.youtube.com/vi/lb-pbm1ddRw/0.jpg)](https://youtu.be/lb-pbm1ddRw) | [![](https://img.youtube.com/vi/J1vmVwwdVU4/0.jpg)](https://youtu.be/J1vmVwwdVU4)\n|--|--|--|--|\n\n## Acknowledgments & Credits\n\nThanks to the creators of ornament & crime (o_C) and PJRC for the Teensy, and all those who have worked on the [code and algorithms](https://github.com/eh2k/squares-and-circles/wiki/credits) that are reused here, especially Mutable Instruments.\nThey served a great source of learning and provided a huge playground and the foundation for this project.\n\n## Motivation / Challenge\n\n<img align=\"right\" src=\"doc/u_oc.png\" width=160px />\n\n\nGiven are the following ingredients: Two buttons, two encoders and a 128x64 display. Sixteen I/O ports (4x trigs, 4x cv and 4x dac) and a Cortex-M7.\n\nDamn many possibilities to complicate it. Mono, stereo and then again CV. A tricky task to design a simple UI logic, not get lost in menu diving, and to get as much out of the hardware as possible (work in progress).\n\n## Concept\n\nSimilar to the Monomachine and Machinedrum, this device features four fully configurable engine instances. Each instance can be assigned a synthesizer, effects, or sequencer engine, which can be controlled via trigger inputs, CV inputs, or clock signals.\n\nThe available engine types include drums, synthesizers, oscillators, sequencers, and audio processors. The hardware ports and the generated output signals can be internally routed to any engine. For example, you can route the mono audio signal from an oscillator engine to a neighboring effects engine with stereo outputs, enabling seamless signal chaining.\n\n* [Short Press [LEFT]/[RIGHT]] scrolls through the 4 machine-tracks.\n* [Long press [LEFT]] enters the machine-selection-page.\n* [Long press [RIGHT]] enters the menu-page.\n* [Long press left or right [ENCODER]] shows the modulation popup\n* [Long press [L-ENCODER] + [R-ENCODER]] saves the patch - will be restored at startup\n  - DEBUG: skip restore - press [RIGHT] button while startup ).\n\n<br/>\n<div style=\"page-break-after: always;\"></div>\n\n# Machines <sup>[wiki](https://github.com/eh2k/squares-and-circles/wiki/%E2%96%A1%EF%B8%8E%E2%97%8F%EF%B8%8E-Machines-&-Engines)</sup>\n\n<img align=\"right\" src=\"doc/menu_engines.png\" width=196px />\n\n* [Long press [LEFT]] enters the machine-selection-page.<br/>\n* [Short press [R-ENCODER]] loads the selected engine.<br/>\n* [Long press [R-ENCODER]] loads the selected engine - extended mode.<br/>\n   * Load & reset I/O settings\n   * Load & keep IO settings <img align=\"right\" src=\"doc/engine_load_resetio.png\" width=196px />\n   * Copy #1-4 (parameter values + modulations + I/O settings)\n\n<br/>\n\n---\n###### Screenshots\n<img src=\"doc/engines.png\" />\n\n---\n\n## Engines\n* **GND**\n  * `---`\n  * [Scope](https://github.com/eh2k/squares-and-circles/wiki/Scope)\n  * [FFT](https://github.com/eh2k/squares-and-circles/wiki/FFT)\n* **CV**\n  * [V_OCT](https://github.com/eh2k/squares-and-circles/wiki/V_OCT)\n  * [Slew](https://github.com/eh2k/squares-and-circles/wiki/Slew)\n  * [EnvGen_AD](https://github.com/eh2k/squares-and-circles/wiki/EnvGen_AD)\n  * [EnvGen_ADSR](https://github.com/eh2k/squares-and-circles/wiki/EnvGen_ADSR)\n  * [LFO](https://github.com/eh2k/squares-and-circles/wiki/LFO)\n  * [EnvFollower](https://github.com/eh2k/squares-and-circles/wiki/EnvFollower)\n* **Drums**\n  * [Analog-BD](https://github.com/eh2k/squares-and-circles/wiki/Analog-BD),\n  * [Analog-SD](https://github.com/eh2k/squares-and-circles/wiki/Analog-SD),\n  * [Analog-HH](https://github.com/eh2k/squares-and-circles/wiki/Analog-HH),\n  * [Analog-HH2](https://github.com/eh2k/squares-and-circles/wiki/Analog-HH2),\n  * [909ish-BD](https://github.com/eh2k/squares-and-circles/wiki/909ish-BD),\n  * [909ish-SD](https://github.com/eh2k/squares-and-circles/wiki/909ish-SD),\n  * [TR909-HiHat](https://github.com/eh2k/squares-and-circles/wiki/TR909_HiHats)\n  * [808ish-BD](https://github.com/eh2k/squares-and-circles/wiki/808ish-BD),\n  * [808ish-SD](https://github.com/eh2k/squares-and-circles/wiki/808ish-SD),\n  * [808ish-HiHat](https://github.com/eh2k/squares-and-circles/wiki/808ish-HiHat),\n  * [TR707](https://github.com/eh2k/squares-and-circles/wiki/TR707),\n  * [RZ-1](https://github.com/eh2k/squares-and-circles/wiki/RZ-1),\n  * [FM-Drum](https://github.com/eh2k/squares-and-circles/wiki/FM-Drum)\n  * [Djembe](https://github.com/eh2k/squares-and-circles/wiki/Djembe)\n  * [Claps](https://github.com/eh2k/squares-and-circles/wiki/Claps)\n* **M-OSC**\n  * [Waveforms](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)\n  * [Virt.Analog](https://github.com/eh2k/squares-and-circles/wiki/Virt.Analog)\n  * [Waveshaping](https://github.com/eh2k/squares-and-circles/wiki/Waveshaping)\n  * [2-OP-FM](https://github.com/eh2k/squares-and-circles/wiki/2-OP-FM)\n  * [Formant/PD](https://github.com/eh2k/squares-and-circles/wiki/Formant-PD)\n  * [Harmonic](https://github.com/eh2k/squares-and-circles/wiki/Harmonic)\n  * [Wavetable](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)\n  * [Chord](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)\n* **SYNTH**\n  * [Resonator](https://github.com/eh2k/squares-and-circles/wiki/Resonator)\n  * [DxFM](https://github.com/eh2k/squares-and-circles/wiki/DxFM)\n  * [DxFM_BNK1-3](lib/plaits/resources.cc#L41)\n  * [Open303](https://github.com/eh2k/squares-and-circles/wiki/Open303)\n  * [ClassicVAVCF](lib/plaits/dsp/engine2/virtual_analog_vcf_engine.cc)\n* **FX**\n  * [Reverb](https://github.com/eh2k/squares-and-circles/wiki/clouds_reverb)\n  * [ReverbSC](https://github.com/eh2k/squares-and-circles/wiki/ReverbSC)\n  * [Rev-Dattorro](https://github.com/eh2k/squares-and-circles/wiki/Rev-Dattorro)\n  * [Delay](https://github.com/eh2k/squares-and-circles/wiki/Delay)\n  * [Gated-Reverb](https://github.com/eh2k/squares-and-circles/wiki/Gated-Reverb)\n  * [Reverb-HP-LP](https://github.com/eh2k/squares-and-circles/wiki/Reverb-HP-LP)\n  * [JU60_chorus](https://github.com/eh2k/squares-and-circles/wiki/JU60_chorus)\n* **NOISE**\n  * [White/Pink](https://github.com/eh2k/squares-and-circles/wiki/White_Pink_noise)\n  * [NES_noise](https://github.com/eh2k/squares-and-circles/wiki/NES_noise)\n  * [808_squares](https://github.com/eh2k/squares-and-circles/wiki/808_squares)\n* **FILTER**\n  * [SVF](https://github.com/eh2k/squares-and-circles/wiki/filter_plaits_svf)\n  * [MoogLadder](https://github.com/eh2k/squares-and-circles/wiki/moog_ladder)\n  * [TeeBee](https://github.com/eh2k/squares-and-circles/wiki/filter_teebee)\n* **SPEECH**\n  * [LPC](https://github.com/eh2k/squares-and-circles/wiki/LPC)\n  * [SAM](https://github.com/eh2k/squares-and-circles/wiki/SAM)\n* **MIDI**\n  * [Monitor](https://github.com/eh2k/squares-and-circles/wiki/Monitor)\n  * [Clock](https://github.com/eh2k/squares-and-circles/wiki/Clock)\n  * [VAx6](https://github.com/eh2k/squares-and-circles/wiki/VAx6)\n* **SEQ**\n  * [EuclidRythm](https://github.com/eh2k/squares-and-circles/wiki/EuclidRythm)\n  * [EuclidArp](https://github.com/eh2k/squares-and-circles/wiki/EuclidArp)\n  * [TuringMachine](https://github.com/eh2k/squares-and-circles/wiki/TM)\n  * [303-Patterns](https://github.com/eh2k/squares-and-circles/wiki/303-Patterns)\n\n## Machine/Engine\n\nMachines/Engines are controlled by individual parameters.\n\n>[Short press left/right [ENCODER]] changes parameter selection<br/>\n>[Rotate left/right [ENCODER]] changes parameter value\n\n### Modulations\n\n>[Long press left or right [ENCODER]] shows/hides the modulation popup*\n\n\nFor each parameter a modulation can be assigned:\n  * **CV**: <img align=\"right\" src=\"doc/mod_cv.png\" width=196px />\n    * SRC:\n      * `C1`, `C2`, `C3`, `C4` - Analog inputs\n        * OP: `THRU`, `SLEW`, `S&H`, `T&H`\n          * THRU - Thru Input\n          * SLEW - Slew Limiter\n            - Rising\n            - Falling\n          * S&H - Sample and Hold \n            - Trig Source\n          * T&H - Track and Hold \n            - Gate Source\n      * `+` - Constant internal voltage\n        * 10V with 1/1000 resolution - nice for fine adjustments (detuning etc)\n    * Hints:\n      * Parameter 0 (top-left) is primarily used for V/OCT control. Therefore, a single V/OCT signal or CV input can be shared by applying modulation to parameter 0 with an attenuverter set to +1, within the -3V to +6V range. It is also possible to select the V/OCT input in the io-configuration page.\n      * All other parameters can be modulated via CV-input with a assumed voltage-range of -4V..4V at 2kHz sample rate.\n      * Be aware the CV-range is probably limited by hardware to: -3.5v..6.5V\n  * **RND**: Trigger generates a random voltage <img align=\"right\" src=\"doc/mod_rnd.png\" width=196px />\n    * TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n    <br/>\n     <br/>\n  * **ENV**: Triggered Envelope (Attack, Decay) <img align=\"right\" src=\"doc/mod_env.png\" width=196px />\n\n    * TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n    * ATTACK\n    * DECAY\n * **LFO**: Free/Triggered Sine-LFO <img align=\"right\" src=\"doc/mod_lfo.png\" width=196px />\n    * TRIG: `-`, `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n    * SHAPE: `SIN`, `TRI`, `SQR`, `STEPS`, `NOISE`\n    * FREQUENCY: `0-127`\n    * WAVEFORM: `0-127`\n  * **EF**: Envelope Follower <img align=\"right\" src=\"doc/mod_ef.png\" width=196px />\n    * SRC: `C1`, `C2`, `C3`, `C4`\n    * ATTACK\n    * RELEASE\n  * **TM**: Turing Machine  <img align=\"right\" src=\"doc/mod_tm.png\" width=196px />\n    * TRIG: `!`, `CLK`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n    * PROB: `0-9` (0-100%)\n    * STEPS: `1-16`\n  * **SEQ**: 4-Step Sequencer <img align=\"right\" src=\"doc/mod_seq.png\" width=196px />\n    * TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`, `CLK/1`, `CLK/4`, `CLK/16`, `CLK/32`, `CLK/96`\n    * RESET: `-`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n    * 4-STEPS: `-64..64`\n >`!` = current engine trigger<br/>\n >`CLK` = internal clock<br/>\n All modulations have an attenuverter parameter (-/+).\n  * The modulation-voltage is attenuverted/multiplied by -1..+1;\n\n<div style=\"page-break-after: always;\"></div>\n\n## I/O-Configuration\n\n>[Long press [RIGHT]] enters the I/O-Configuration page.\n\nThe I/O-Configuration page lets you virtually patch the engine with the hardware ports and internal gate/cv signals ($1a-$4d). Depending on the engine interface, trigger, gate, accent and V/OCT can be configured. In addition to the trigger, which is set with a rising edge, a gate state is also provided, that can be processed by the engine. Engines like Closed/Open-HiHats have an additional accent input - this works technically like a second trigger. The V/OCT input can optionally be quantized and transposed. In addition to the Tx inputs, the Cx inputs can also be used as a source for triggers and accents. The output can be configured as mono or stereo. Several engines can share the same output - the signal is mixed.\n\n### Ctrl / Inputs\n\n<img align=\"right\" src=\"doc/inputs.png\" width=196px />\n\n*In case the Engine supports Triggers/Gates - Trigger Input is configurable:*\n\n * **Trig-Input**:\n   * `-`\n   * `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n   * `$1-$9`\n\n*In case the Engine supports Clock-Input - Clock-Source is configurable:*\n\n * **Clock-Source**:\n   * `CLK` - global clock -> Midi/Clock/Timing settings.\n   * `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n   * `$1-$9`\n\n*In case the Engine supports Accents (Closed/Open HiHat) - Accent Input is configurable:*\n\n * **Accent-Input**:\n   * `-`\n   * `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`\n   * `$1-$9`\n   \n<img align=\"right\" src=\"doc/inputs2.png\" width=196px />\n\n*In case the Engine is an AUDIO_PROCESSOR - Input signal mix is configurable:*\n * **Aux-Input**: `-`, `C1`, `C2`, `C3`, `C4`\n   * AUX-IN: -3V..3V for additional audio source for effects (prefer CV4).\n * **Insert-1**: Feed-in signal from engine-1\n * **Insert-2**: Feed-in signal from engine-2\n * **Insert-3**: Feed-in signal from engine-3\n * **Insert-Aux**: Feed-in signal from aux-input\n\n<br/>\n\n *In case the Engine supports V/OCT - V/OCT Input is configurable:*\n\n * **CV-Input**: `-`, `C1`, `C2`, `C3`, `C4`\n   * V/OCT: -3V..6V for frequency-control (default)\n * **Quantizer**: [Off, Semitones, Ionian, Dorian, ...](lib/braids/quantizer_scales.h)\n   * **ROOT**: `C`, `C#`, `D`, `D#`, `E`, `F`, `F#`, `G`, `G#`, `A`, `A#`, `B`\n * **Transpose**: -48 to 24  (semitone per step)\n   * **FINE**: semitone/128\n\n### Mix / Outputs\n\n<img align=\"right\" src=\"doc/outputs2.png\" width=196px />\n\n * **Level**: Output volume level\n   - can result in distortion\n   - not available on CV-Engines\n * **Pan**: Stereo panning\n   - on stereo engines with mono output, panning is also used for mixing\n * **Output**\n   * `-`, `A`, `A+B`, `B`, `C`, `C+D`, `D`\n     - The option `-(no output)` is useful if the signal is to be routed into an AUDIO_PROCESSOR engine\n * **Stereo**\n   * Experimental stereo feature - see STERIOLIZED Flag ;-)\n<br/>\n<div style=\"page-break-after: always;\"></div>\n\n## CLOCK+TIMING+MIDI-Settings\n\n>[Long press [LEFT] + [RIGHT]] for getting to the CLOCK+TIMING+MIDI-Settings page.\n\n<img align=\"right\" src=\"doc/config_midi1.png\" width=196px />\n\n### - **CLOCK-Source**:\n   * `-` none\n   * `INT` Internal Clock-Source (BPM)\n   * `T1` T1 as Clock-Input (4ppqn)\n   * `MIDI` Clock received from MIDI\n\n> Default Clock-Source for `SEQ/...` engines. <br/>\n> Clock-Source is also used by engines like `FX/Delay` (clocked sync) or `MIDI/Clock`\n\n\n<img align=\"right\" src=\"doc/config_midi2.png\" width=196px />\n\n### - **TRIG-In-Delay**: \n   * `0-50ms`Trigger input processing delay in ms. Usecase: sync trig signals with midi or CV\n\n<img align=\"right\" src=\"doc/config_midi0.png\" width=196px />\n\n### - **MIDI-Control**:\n  - `-` disabled\n  - In case OC_T40\n    - `USB+T1` [T1 input can be used as MIDI-Input](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime#-midi-expander)\n  - else\n    - `MIDI/USB` the USB-MIDI and/or hardware Midi-Input\n\nIn case the MIDI-Control is enabled, you can setup the Midi-Channel for each engine.\n> Each engine can be assigned to a MIDI-Channel - it is possible to control single mono engines together polyphonically (for this all engines have to be set to the same midi channel). [Midi-Engines](app/MIDI/VAx6.cpp) consume the MIDI-Stream directly, therefore the MIDI-Messages are not converted as incoming CVs or triggers.\n\n#### Midi-Control\n  * Engines can be loaded/selected by midi program change\n  * Default Parameter CC-Mappings\n    ````\n    | HEX | DEC | parameter-index | CH |\n    |-----|-----|-----------------|----|\n    |  07 |  07 |      LEVEL      |  * |\n    |  0A |  10 |       PAN       |  * |\n    |  10 |  16 |        0        |  * |\n    |  11 |  17 |        1        |  * |\n    |  12 |  18 |        2        |  * |\n    |  13 |  19 |        3        |  * |\n    |  14 |  20 |        4        |  * |\n    |  15 |  21 |        5        |  * |\n    |  16 |  22 |        6        |  * |\n    |  17 |  23 |        7        |  * |\n    ````\n  > CC 48-56 (HEX 30-38) for LSB (14Bit CC)\n\n* **Midi-Channel**: `-`, `1`...`16`\n  - The Midi messages are translated to analog events\n    - Trig: NoteOn\n    - Gate: NoteOn until NoteOff\n    - CV: 0V = Key 60\n  - [Multi-Trig-Drum-Engines](https://github.com/eh2k/squares-and-circles/wiki/DrumSynth)\n    - In case trigger to `-` - individual drums/instruments are triggered by individual keys:\n        - GM Standard Drum Map: https://github.com/eh2k/squares-and-circles/wiki/TR707#midi-mapping\n        - or Keys 60-75 for instrument 1-16\n        \n# Patch Storage\n<img align=\"right\" src=\"doc/patch_storage_load.png\" width=196px />\n\n> [Press `L-ENC + R-ENC`] to enter the patch storage page\n\n\n* Use `L-ENC` for patch slot selection\n* Use `R-ENC` for LOAD/SAVE\n  * Load `empty` - restores all engines to `GND/-`\n\n# Supported Hardware\n\n * [Ornament-and-Crime T4.0](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime)\n * [Squares-and-Circles DSM0](https://github.com/eh2k/squares-and-circles/wiki/Squares&Circles-D_SM-Prototype)\n * [O_C T4.1](https://github.com/eh2k/squares-and-circles/wiki/O_C_T41)\n\n## Hardware setup procedure\n  > Use [![WebFlasher](https://img.shields.io/badge/Web-Flasher-blue)](https://eh2k.github.io/□●/flash/?firmware)  to enter callibration mode, or execute advanced setup commands </br>\n  >Press and hold the [LEFT] button during power-on to enter the setup procedure.\n\n### Display setup\n\n<img align=\"right\" src=\"doc/display_setup.png\" width=196px />\n\n* Press left encoder to flip180.\n* Press right encoder for changing display brightness (50%, maximal).\n\n### Encoder setup\n\n<img align=\"right\" src=\"doc/encoder_setup.png\" width=196px />\n\n* Check the encoder rotation direction.\n* Press encoder for reversed setup.\n\n<br/>\n<br/>\n\n### DAC calibration\n\n<img align=\"right\" src=\"doc/dac_calib.png\" width=196px />\n\nTo calibrate the DAC, use a multimeter to accurately set the reference voltages at `0V`, `-2V` and `+2V`.\nStart with DAC1 (channel A) - connect the multimeter typically using alligator clip on a patch cable inserted in the jack. Use the right encoder to set the voltage as accurately as possible (press the encoder for coarse adjustment). Do it on all outputs - use the left encoder for channel selection. After calibrating `0V` on all outputs, press [right] to step to the `-2V` calibration. Repeat the procedure and press [right] to calibrating `+2V`.\n\n\n### ADC calibration\n\n<img align=\"right\" src=\"doc/adc_calib.png\" width=196px />\n\nTo calibrate the ADC `0V` reference, remove all patch cables from the module. Use the right encoder to adjust the offset (press the encoder for fast adjustment). Do it on all cv-inputs, select the channel with the left encoder. Press [right] to enter the `-2V` calibration. Now you need to connect the DAC outputs to the cv-inputs. The DAC output produces the reference voltage, that is calibrated on the input. Repeat the calibration procedure and step to the `+2V` calibration.\n\n### I/O Test:\n\n<img align=\"right\" src=\"doc/io_test.png\" width=196px />\n\n* Test/Verify your TRIG or CV inputs.\n* The output voltage is set by the cv input voltage (DACx = ADCx).\n\n<br/>\n\n## ⧉ Conclusions and the future\n\nThe project started as a kind of personal research in embedded DSP that I did over half a year. At some point, it turned out by chance that the O_C was very well suited for this by only upgrading the Teensy. Apart from the small optional [mod](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime#optional-dac-voltage-range-mod--5v5v-range) on the DAC voltage range, the current O_C hardware unfortunately has some unchangeable limitations for audio applications. As you know, the Teensy 4.0 doesn't have \"high-end\" ADCs and a limited amount of RAM. On the other hand, it is the the combination of limitations that make the project unique.\n\nI have mixed feelings about the user interface and the firmware concept. On the one hand, the two buttons and the two encoders are sufficient and actually practical for a multifunction module, but on the other hand, something is missing. Additional buttons/encoders could definitely simplify the operation/interaction - let's see if this [puzzle](https://github.com/eh2k/squares-and-circles/wiki/Squares&Circles-D_SM-Prototype) can be solved.\n\n## License\n\nThe application code respectively the suite of machines/engines and the third-party source files are published under permissive software licenses.\nFor the exact license and copyright holder - see the header of individual source code files or readme/license file in the sub folder.\n\nThe firmware as a whole is for personal use only.\nIf you are considering commercial distributing hardware with this firmware, please contact me (eh2k◯gmx.de).\n\n<!--\n\n````\n _______________\n|***************|\n|*             *|\n|*             *|\n|***************|\n|               |\n| [BL]     [BR] |\n|               |\n| (EL)     (ER) |\n|               |\n|( ) ( ) ( ) ( )|\n|               |\n|( ) ( ) ( ) ( )|\n|               |\n|( ) ( ) ( ) ( )|\n|_______________|\n````\n-->\n"
  },
  {
    "path": "app/SEQ/patterns_303.h",
    "content": "#include <inttypes.h>\n\nconstexpr uint8_t REST = 0x0;\n\n/* between 0x0 and 0xA, the VCO voltage pins, so these notes arent really\n * 'effective' in that they all sound the same.\n */\n\n// lowest octave\nconstexpr uint8_t C1 = 0x0B;\nconstexpr uint8_t C1_SHARP = 0x0C;\nconstexpr uint8_t D1 = 0x0D;\nconstexpr uint8_t D1_SHARP = 0x0E;\nconstexpr uint8_t E1 = 0x0F;\nconstexpr uint8_t F1 = 0x10;\nconstexpr uint8_t F1_SHARP = 0x11;\nconstexpr uint8_t G1 = 0x12;\nconstexpr uint8_t G1_SHARP = 0x13;\n\n// middle octave\nconstexpr uint8_t A1 = 0x14;\nconstexpr uint8_t A1_SHARP = 0x15;\nconstexpr uint8_t B1 = 0x16;\nconstexpr uint8_t C2 = 0x17;\nconstexpr uint8_t C2_SHARP = 0x18;\nconstexpr uint8_t D2 = 0x19;\nconstexpr uint8_t D2_SHARP = 0x1A;\nconstexpr uint8_t E2 = 0x1B;\nconstexpr uint8_t F2 = 0x1C;\nconstexpr uint8_t F2_SHARP = 0x1D;\nconstexpr uint8_t G2 = 0x1E;\nconstexpr uint8_t G2_SHARP = 0x1F;\n\n// high octave\nconstexpr uint8_t A2 = 0x20;\nconstexpr uint8_t A2_SHARP = 0x21;\nconstexpr uint8_t B2 = 0x22;\nconstexpr uint8_t C3 = 0x23;\nconstexpr uint8_t C3_SHARP = 0x24;\nconstexpr uint8_t D3 = 0x25;\nconstexpr uint8_t D3_SHARP = 0x26;\nconstexpr uint8_t E3 = 0x27;\nconstexpr uint8_t F3 = 0x28;\nconstexpr uint8_t F3_SHARP = 0x29;\nconstexpr uint8_t G3 = 0x2A;\nconstexpr uint8_t G3_SHARP = 0x2B;\n\nconstexpr uint8_t A3 = 0x2C;\nconstexpr uint8_t A3_SHARP = 0x2D;\nconstexpr uint8_t B3 = 0x2E;\nconstexpr uint8_t C4 = 0x2F;\nconstexpr uint8_t C4_SHARP = 0x30;\nconstexpr uint8_t D4 = 0x31;\nconstexpr uint8_t D4_SHARP = 0x32;\nconstexpr uint8_t E4 = 0x33;\nconstexpr uint8_t F4 = 0x34;\nconstexpr uint8_t F4_SHARP = 0x35;\nconstexpr uint8_t G4 = 0x36;\nconstexpr uint8_t G4_SHARP = 0x37;\n\nconstexpr uint8_t A4 = 0x38;\nconstexpr uint8_t A4_SHARP = 0x39;\nconstexpr uint8_t B4 = 0x3A;\nconstexpr uint8_t C5 = 0x3B;\nconstexpr uint8_t C5_SHARP = 0x3C;\nconstexpr uint8_t D5 = 0x3D;\nconstexpr uint8_t D5_SHARP = 0x3E;\n// no more notes!\n\nconstexpr uint8_t NOTE_MASK = 0x3F;\nconstexpr uint8_t SLIDE = 0x80;\nconstexpr uint8_t ACCENT = 0x40;\n\n//\"C\", \"C#\", \"D\", \"D#\", \"E\", \"F\", \"F#\", \"G\", \"G#\", \"A\", \"A#\", \"B\"\n\n// Daft Punk - Da Funk\nconst uint8_t da_funk[16] = {A2_SHARP, F4, D3 | SLIDE, C5, A3_SHARP | SLIDE | ACCENT, G3, F2_SHARP | SLIDE | ACCENT, G3_SHARP,\n                             A4_SHARP | SLIDE, A2, C4 | SLIDE, D4 | SLIDE | ACCENT, F3, D3 | SLIDE, F2 | SLIDE, D3_SHARP | SLIDE};"
  },
  {
    "path": "app/index.json",
    "content": "{\n  \"apps\": [\n    \"CV/EnvFollower.bin\",\n    \"CV/EnvGen.bin\",\n    \"CV/LFO.bin\",\n    \"CV/V_OCT.bin\",\n    \"DRUMS/808ish-BD.bin\",\n    \"DRUMS/808ish-HiHat.bin\",\n    \"DRUMS/808ish-SD.bin\",\n    \"DRUMS/Claps.bin\",\n    \"DRUMS/Djembe.bin\",\n    \"DRUMS/DrumSynth.bin\",\n    \"DRUMS/FM-Drum.bin\",\n    \"DRUMS/RZ-1.bin\",\n    \"DRUMS/TR707.bin\",\n    \"DRUMS/TR909-HiHat.bin\",\n    \"FILTER/MoogLadder.bin\",\n    \"FILTER/SVF.bin\",\n    \"FILTER/TeeBee.bin\",\n    \"FX/Delay.bin\",\n    \"FX/FV1emu.bin\",\n    \"FX/Gated-Reverb.bin\",\n    \"FX/JU60_chorus.bin\",\n    \"FX/Rev-Dattorro.bin\",\n    \"FX/Reverb-HP-LP.bin\",\n    \"FX/Reverb.bin\",\n    \"FX/ReverbSC.bin\",\n    \"GND/FFT.bin\",\n    \"GND/Scope.bin\",\n    \"M-OSC/Waveforms.bin\",\n    \"MIDI/Clock.bin\",\n    \"MIDI/Monitor.bin\",\n    \"MIDI/VAx6.bin\",\n    \"NOISE/808_squares.bin\",\n    \"NOISE/NES.bin\",\n    \"NOISE/WhitePink.bin\",\n    \"SEQ/303-Patterns.bin\",\n    \"SEQ/EuclidArp.bin\",\n    \"SEQ/EuclidRythm.bin\",\n    \"SEQ/TuringMachine.bin\",\n    \"SPEECH/LPC.bin\",\n    \"SPEECH/SAM.bin\",\n    \"SYNTH/DxFM.bin\",\n    \"SYNTH/Open303.bin\",\n    \"SYNTH/Resonator.bin\",\n    \"SYNTH/plaits.bin\"\n  ]\n}\n"
  },
  {
    "path": "app/squares-and-circles-loader.sha",
    "content": "0e8b51c\n"
  },
  {
    "path": "app/upload.py",
    "content": "#!/usr/bin/env python3\n\nimport json\nimport zlib\nimport os, glob\nimport sys\n\ntry:\n    import usb.core\n    import usb.util\nexcept ImportError:\n    print(\"pyusb is required. Install with: pip install pyusb\")\n    sys.exit(1)\n\n\nclass bcolors:\n    HEADER = \"\\033[95m\"\n    OKBLUE = \"\\033[94m\"\n    OKCYAN = \"\\033[96m\"\n    OKGREEN = \"\\033[92m\"\n    WARNING = \"\\033[93m\"\n    FAIL = \"\\033[91m\"\n    ENDC = \"\\033[0m\"\n    BOLD = \"\\033[1m\"\n    UNDERLINE = \"\\033[4m\"\n\nprint(\"-------------------------------------------------\")\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\nUSB_VENDOR_ID = 0x16C0\nUSB_INTERFACE = 3\nUSB_ENDPOINT = 5\nUSB_TIMEOUT_MS = 5000\n\n\ndef _safe_usb_string(device, index):\n    if not index:\n        return \"\"\n    try:\n        return usb.util.get_string(device, index) or \"\"\n    except usb.core.USBError:\n        return \"\"\n\n\ndef _find_bulk_endpoint(interface, direction):\n    for endpoint in interface:\n        if usb.util.endpoint_direction(endpoint.bEndpointAddress) != direction:\n            continue\n        if usb.util.endpoint_type(endpoint.bmAttributes) != usb.util.ENDPOINT_TYPE_BULK:\n            continue\n        if endpoint.bEndpointAddress & 0x0F == USB_ENDPOINT:\n            return endpoint\n    for endpoint in interface:\n        if usb.util.endpoint_direction(endpoint.bEndpointAddress) != direction:\n            continue\n        if usb.util.endpoint_type(endpoint.bmAttributes) == usb.util.ENDPOINT_TYPE_BULK:\n            return endpoint\n    return None\n\n\ndef open_device():\n    devices = list(usb.core.find(find_all=True, idVendor=USB_VENDOR_ID) or [])\n    if not devices:\n        return None\n\n    selected = None\n    for device in devices:\n        product = _safe_usb_string(device, device.iProduct)\n        if product.startswith(\"S&C\") or product.startswith(\"Squares&Circles\"):\n            selected = device\n            break\n\n    if selected is None:\n        selected = devices[0]\n\n    #selected.set_configuration()\n    config = selected.get_active_configuration()\n    interface = usb.util.find_descriptor(config, bInterfaceNumber=USB_INTERFACE)\n    if interface is None:\n        raise RuntimeError(f\"USB interface {USB_INTERFACE} not found\")\n\n    if selected.is_kernel_driver_active(USB_INTERFACE):\n        selected.detach_kernel_driver(USB_INTERFACE)\n\n    usb.util.claim_interface(selected, USB_INTERFACE)\n\n    ep_out = _find_bulk_endpoint(interface, usb.util.ENDPOINT_OUT)\n    ep_in = _find_bulk_endpoint(interface, usb.util.ENDPOINT_IN)\n    if ep_out is None or ep_in is None:\n        usb.util.release_interface(selected, USB_INTERFACE)\n        raise RuntimeError(\"Bulk IN/OUT endpoints not found\")\n\n    return selected, ep_out, ep_in\n\n\ndef close_device(device):\n    if device is None:\n        return\n    try:\n        usb.util.release_interface(device, USB_INTERFACE)\n    except Exception:\n        pass\n    usb.util.dispose_resources(device)\n\n\ndevice_bundle = open_device()\n\nif device_bundle is None:\n    print(\" -> S&C Device not found\")\n    exit(1)\nelse:\n    dev, ep_out, ep_in = device_bundle\n    product = _safe_usb_string(dev, dev.iProduct)\n    serial_number = _safe_usb_string(dev, dev.iSerialNumber)\n    print(\" -> S&C Device found:\", product or \"Unknown\", serial_number)\n\n\ndef usb_write(ep_out, payload):\n    ep_out.write(payload, timeout=USB_TIMEOUT_MS)\n\n\ndef usb_read_until_nul(ep_in, timeout_ms=USB_TIMEOUT_MS, chunk_size=512):\n    data = bytearray()\n    while True:\n        chunk = ep_in.read(chunk_size, timeout=timeout_ms)\n        for byte in chunk:\n            if byte == 0:\n                return data.decode(errors=\"replace\")\n            data.append(byte)\n\n\ndef get_blobs(ep_out, ep_in):\n    usb_write(ep_out, b\"blobs\\0\")\n    buffer = usb_read_until_nul(ep_in)\n\n    try:\n        blobs = json.loads(buffer)\n    except Exception as e:\n        print(buffer)\n        print(\"Error parsing blobs:\", e)\n        return []\n\n    for blob in blobs[:]:\n        if os.path.exists(blob[\"name\"]) == False:\n            del blobs[blobs.index(blob)]\n            continue\n        with open(blob[\"name\"], \"rb\") as f:\n            blob[\"crc32_local\"] = \"%X\" % zlib.crc32(f.read())\n    \n    #print(\"blobs:\", json.dumps(blobs, indent=2))\n    return blobs\n\ndef update_blob(ep_out, ep_in, filename):\n    blob = bytearray()\n    blob.extend(\"WRI\".encode()[:3] + bytes([0]))\n    blob.extend(filename.encode() + bytes([0]))\n    blob.extend(bytes(0x0 for _ in range(4 - (len(blob) % 4))))\n    blob.extend(os.path.getsize(filename).to_bytes(4, \"little\"))\n    crc32 = 0\n    with open(filename, \"rb\") as f:\n        crc32 =zlib.crc32(f.read())\n        blob.extend(crc32.to_bytes(4, \"little\"))\n        f.seek(0)\n        blob.extend(f.read())\n    blob.extend(bytes(0xFF for _ in range(64 - (len(blob) % 64))))\n    #return \n    for i in range(0, len(blob), 512):\n        chunk = blob[i : i + 512]\n        usb_write(ep_out, chunk)\n        r = usb_read_until_nul(ep_in)\n        print(r)\n        if r.startswith(\"ERR\"):\n            return False\n\n    #r = usb_read_until_nul(ep_in)\n    #print(r)\n\n    #crc_ret = int.from_bytes(r[4:8], \"little\")\n    #print(\"FLASH RESULT:\", \"%X\" % crc32, \"%X\" % crc_ret)\n    return True\n\ndef reset(ep_out):\n    usb_write(ep_out, b\"ui:reset\\0\")\n    print(\"Reset command sent\")\n    #dev.read(endpoint_in.bEndpointAddress, 64, 1000).tobytes()\n\nupdated = False\nmap = {}\n\nif device_bundle is None:\n    print(\"-> S&C Device not connected\")\n    exit(1)\n\ndev, ep_out, ep_in = device_bundle\n\ntry:\n    print(\"-> S&C Device connected\")\n\n    print(\"-------------------------------------------------\")\n\n    for blob in get_blobs(ep_out, ep_in):\n        map[blob[\"name\"]] = blob\n        if blob[\"crc32\"] != blob[\"crc32_local\"]:\n            print(\n                bcolors.WARNING,\n                blob,\n                bcolors.ENDC,\n            )\n            updated |= update_blob(ep_out, ep_in, blob[\"name\"])\n        #else:\n        #    print(bcolors.OKBLUE, blob, bcolors.ENDC)\n\n    # glob for .bin files in current directory\n    for local_file in glob.glob(\"*/*.bin\"):\n        local_file = local_file.replace(\"\\\\\", \"/\")\n        if local_file.endswith(\".bin\") and local_file not in map:\n            print(bcolors.WARNING, \"NEW FILE:\", local_file, bcolors.ENDC)\n            #updated |= update_blob(local_file)\n\n    if updated:\n        reset(ep_out)\n    else:\n        print(\"all apps up to date\")\nfinally:\n    close_device(dev)"
  },
  {
    "path": "doc/.conv.sh",
    "content": "set +x\n\ncd $(dirname $0)\n\nmontage -background '#25282c' -tile 5x -geometry +10+10 gnd_*.png cv_*.png drums_*.png mosc_*.png synth_*.png noise_*.png fx_*.png midi_*.png filter_*.png seq_*.png engines.png\n\nfor f in $1; do\n    convert $f -sample 256x128 ${f%.*}.png\ndone\n"
  },
  {
    "path": "doc/.screenshots.py",
    "content": "import base64\nimport math, struct\nfrom array import array\n\ne = \"////Bwfn52dnZ2dnZ+fnBwf//4eHZ2d/fwcHBwcfH///5+fn5+fnBwfn539///8HB+fnZ2dnZ2dn5+cHB////////////////////////39/Px8fH4+Ph8fHx+Pj4+Pj4+Pj4+PHx8eHj48fHx8/f3////////////////////////8AAH9/YGBgYGBgf38AAP//eXnm5h4e4OB4ePj4Hx/5+QcH+fkYGIGBHh7//wAAf39gYGBgYGB/fwAA/////////////38/Hw+Hw+Hw+Pz8/v///////////////////////////////////vz8+PDhw4cPHz9//////////////4aGnp4GBoaGnp5mZmZm5+f4+GdnhoZ5eX5+//8eHv//fn6BgRgYn58YGB8fBgb+/h4e5uZ+fmZmhob///////9/HwMB4Pj8////wb6+vsH/5+vtgO//gLa2tr7/+ba21uH/gLa2tr7/2Lq6usb////////8+OABAx9/////////h4fn5wAAn5+BgX5+ZmZhYWFhAADn5+bmYGBhYX5+h4fm5mdnAAAHB5iYfn4eHv//eHjn5wYGHh4ZGf//////BwAA+P/////////Bvr6+wf+Avr7d4/+A9vb2/v/+jvb6/P/Bvr6+wf/n6+2A7//////////////4AAAH//////9nZ+Hh4OAZGZmZ+PhmZpiY4OCGhgEB//9mZn5+ZmZ5eXl5/v5mZvj4BwdmZnh4//9gYIeHHh6AgP7+///////AAAA//////////////////////////////////////////////////////////////////////z8AAMD//////35+Z2d/f2BgYWF5eWZm+fkHB5mZmJgfH/7+4OBgYObmfn4BAXh4BwcGBuDgZmbh4QAABweAgB8fn5/////////88IABDz9///////////////////////////////////////////////////////////9/Pw8BgPD8////////AAD+/gYGBgYGBv7+AAD//xgYh4eBgZ6e4eF5efj45+ceHoaGgIB+fgAABwfm5gcHgICYmGdn5uYBAf/////////////8+PDhw4cPHz9/f/////////////////////////////////////9/fz8fD4fD4fD4/P/////////////g4Ofn5ubm5ubm5+fg4P//5ubn5+fn5+f//+bm+fn5+eDg///5+ebm4OD+/v//+Pj5+fn5/v7h4f7+///////////////////////+/Pz48PHx4+PDx8fHj4+Pj4+Pj4+Pj8fHx8Pj4/Hx8Pj8/P7//////////////////w==\"\na = \"AH9BQSIcAH8JGSlGAD9AQEA/AH8CDAJ/AEZJSUkxACAQCAQCAAZJSSkeAD5BQUE+AAZJSSkeAABEfUAAAEhUVFQgAH8IBAR4AAgICAgIAEF/SUk2AH9BQSIcAAAAAAAAAAAAAAAAAAAAAAAAHD4+PhwcIiIiHBwiIiIcHCIiIhwCAgICAgKCgoKCggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCgoKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuAYBAIBAQY4wAAAAQECBBjgAAAAAPCQkJAQAMCAQECAAIBAQECAAIBAQIDAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4BgEAgEBAACAgICBgYKEGOAAAAAA8JCQkGAAwAAAAMAAwIBAQIAAgEBAQAAA8IBAQIAAAAAAAAAAAAAAAAAAAwwQIEBAgICAgIBAQCAQDAMAAAAABwAAAAAABwAAAAAAAwUFBQEAAQICAQ8AAAAAAAAAAAAAAAAAAAAAAAAAAAADDBAgQECAgICAgEBAIBAMAwAAAAAHAAAAAAADBAQCBwAHAAAABwADBAQEAgAHAAAABwAAAAAAAAAAAAAAAAAAAAAAgEAgICAgIECAAAAAAAAAAACAgICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQCAgICAgQIAAAAAAAAAAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8gQICAhISERCAfAAAAAAAAAAAAPwAAABwiIiIcAD4EAgI8ABwqKioMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHyBAgICEhIJCIB8AAAAAAAAAPyAgEQ4AHCoqKgwAHCIiIhAAECoqKjwADlBQUD4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+A==\"\nmod = \"fwIMAn8ACAgICAgAPkFBQT4ARklJSTEAPkFBQSIAIBAIBAIABxhgGAcAAER9QAAAfAgEBAgABD9EQCAAAGBgAAAAfBIREnwAfAgEBHgAIFRUVHgAAEF/QAAAOERERDgAGKSkpHwAAAAAAAAAHD4+PhwcIiIiHBwiIiIcHCIiIhz5+fn5+fn5CdnZCfkZ6ekZ+Qnp6Rn5Cfn5CfkJ+fn5+RlpaRn56Qnp6fnpCen5+Rnp6Rn5Cbl5Cfn5+fn5+fkBAQEBAQEBgUFBQUFBgQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf8DAwMDAwMC85OSkxMC8kODAvICc4MCgnICAwICAgIDAgMDAgMDEhMTExKCQiMjExISExMiI0OCExN/ExMD/wAAAAAAPkGAAAAIECCAQT4AAAAAAAAAfwgICH8AIFRUVHgAfAgEBAgAfAQYBHgAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAAAAAACHhISEBICHgAABh4CAAQYBgICAAAAAAAAAAIAAAAAAAAAAPsEAAAAAAAgEBAIBAcE+AAAAAAD/AAD8/DwcDAwFBQUFBQgIECDAAAAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAD/AAAAAAAAAIBPQIAAT8JCTQBIz0hAAAcKCg4AAACJAAAACwAAAMBAQMAAAAECAgQEBAQEAgIBAAAAAAAAAP8AAB9ggABAIBAIBAAAAAAAgGAfAAAAAD8BBgE/ABwiIiIcAD4EAgIEAH4SEhIMAD8EAgI8AAAAAAAAAAAAAAAAAP8AAAAAAAAA5yIixwDgp6AgAMAnICAAAAAEAAAAAEQAAAAAAAAA56SkpwCgoKBAAAAAAAAAAAAAAAAAAAAA/wAAAAAAgUIiFBTUFBQiQoEAAAAAAAAAgEBAQIAAAAAAAAAAAEDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/xAQEBAQEBATEhIREBMSEhIQERISEhAQEBIQEBAQEtDQ0NDQ0NDT0tLT0BISEhEQEBAQEBAQEBAQEBAQEBD/AAAAAAAPECBAQENAQCAQDwAAAAAAAAAPEBAQCAAOERERDgAAEB8QAAAOERERDgAfAgEBAgAAAAAAAAAAAAAAAAD7+vr6+vr6+vr6+vr6+vr6+vr6+vr6+vr6+vr6+vr6+oqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiouIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+A==\"\nc = \"/////wP3z/cD/w+3u7cP/wf7+/t3/wPf398D///7A/v//wPv378D/wPb29v7////AP////8D29vb+/8D79+/A/8H+9vbF///+wP7//8D79+/A/8D29vb+///////////////////////////////////////////////////////BwcHhkdHR4YHxgcHB8YHx0ZGhgcHBgcHBwYHBwYGBgcHBgcHBwYHBgYGBgYHBwf4BwcHBwaGRoYGBwYHBwcGBwcGBgYGBwdGxgYHBwYHBwcGBwYGBgYGBwcHBwcHB8cHBwfHB8cHBwfHBwcHBwcHBwcHBwcHBwcHBwcHBwcHV/8AAAAPEBISHgAfAQIEHwAfEBAIBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAAAHwQEBB8AHwIBAR4ACBUVFR4AABAfEAAADhEREQ4ABikpKR8AAAAAAAAAHwICAh8AHwICAh8AAAAAAAAAAAAAAAAAAAAAAAAAAABV/wAAAD5BQUEiAAcYYBgHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAAB8EhESfAB8CAQEeAAgVFRUeAAAQX9AAAA4REREOAAYpKSkfAAAAAAAAAB/CAgIfwB/CAgIfwBCYVFJRgAAAAAAAAAAAAAAAAAAAFX/AP//A/v7d4//A9ubW+f/A////wP/A/fP9wP/59vb2zv//////////////////wD/AP///+fb21uH/wf7+/sH/+fb21uH///vC////9+vr69//wPf7+8f/9/f39/f//sD29sn/wP7+3eP//////////////////////////8A/f8ABwf2JsYn9weGh4eHhgfnFhYW5wdml5eXFgfmFhYWJwcHBwcHBwcHBwcHBwcHAP8ABwcHZ5aWl+cH5xYWFucHZ5aWl+cHB0bWBgcHhkZGRgcH9odHR4YHh4eHh4cHZpaWlhcH9hYWJ8cHBwcHBwcHBwcHBwcHBwcHBwcHBwBf/wAAAMdAQEBHAMAAAADAAAMEBAQDAAQEBAQDAAMEBAQCAAAAAAAAAAAAAAAAAAAA/wAAAABARMRCQQDDREREgwCARERCgQCAREdEgACERUVFggAHAAAABwCAQEBAgADEBAQEwwAHBAQCAQCAQEBAgADAAAAAwAAAAAAAAAAAAFX/+Pj4//r6+vj4+P36/fj4+Pj4+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiIiIiPiIiIiIiIj4iIiI+KjoqJiImKioqPiI+IiIiPiImKioqPiIqKioqKiI+IiIiIiI+KioqPiIqKioqKiI+IiIiPiI+KioqPiIiIiIiIiIiI/Q==\"\nconfig = \"////////ewF/////k5P/////////////fQF9//+DfX19g//v7+/v7/+DfX19u/+DfX19g/8B9+/fAf8B7e3t/f//fQF9//+DfW1tC/////////////////////////////////////////////////////////////////////8DAwMDAwMDQ0PDQ0MDw0NDQ4MDA0PDQwMDg0NDQ4MDAwMDAwMDA0PDQwMDwwMDA8MDw0NDQ4MDwwMDA8MDQ0PDQ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNDQ8NDQwPDQ0NDgwMDg8MDAwMDAwMDAwMDAwMDAwMD/wAAAAAAAAAAgJ+AAACfAgYKkQAAEB8QAAAPkJKSHgCCAgICggCAkJ+QAACfAQIEnwCfgoKCgQAPEBAQDwAAAB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAn4AAAJ8CBgqRAAAQnxAAAAAAAAAAAAAAAAAAAAD/AAAAAAAAAB8gICARAAMMMAwDAAQEBAQEAAAgPyAAAD8CBAg/AD8EBAQDAB8gICAfAAAAPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHyAgIBEAAwwwDAMAACE/IAAAAAAAAAAAAAAAAAAAAP8AAEEiFAgAPkFRIV4AP0BAQD8AfBIREnwAfwQIEH8AAQF/AQEAAEF/QQAAYVFJRUMAf0lJSUEAfwkZKUYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUNnc2FAAgQEE/AQB8EhESfAB/CQkJBgB8EhESfAAAAAAAAAAA/wAAAAAAAAACAv4CAgD+EjJSjAD4JCIk+AD+CBAg/gCMkpKSYgD+EhISDAB8goKCfACMkpKSYgD+kpKSggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQAITCopKMADAoJP4gAAAAAAAAAAAAAAAAAAD/AAAAAAAAAPgEBAT4APwAAAD8AAQE/AQEAPwkJCQYAPwAAAD8AAQE/AQEACAgICAgAPgEJCToAPBIREjwAAAE/AQAAPwQIED8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+AQEBPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/4+Pj4+Pj4+Pn5+fj4+Pn5+fj4+Pj5+Pj4+fj4+Pj4+ImJiYiIiIiJiIiIiIiIiIiIiImJiYmIiYiIiImIiImJiYiIiYiIiImIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiYmJiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI/w==\"\nconfig_midi = \"//////8D98/3A///+wP7//8D+/t3j///+wP7///f39/f3//n29vbO/8D29vb+//7+wP7+//7+wP7+///+wP7//8D79+/A/8H+9vbF//n29vbO/////////////////////////////////////////////////////////////8HB0eHBwYHB0fGRwcGxgYHB8YGRkfHR0cGBgYHBwcHh0dHR4YGxgYHBwYGxgYGh0cHBgcHBwcHBgeHRwcGRsZHR4YHx0dGR4cGxoYGh8YGBkaHBwcHBwcHBwcHh8eHBwcHh8cHBwcHh8cHBwcHh8cHBwcHBwcHBweHR0dHhwcH/wAAEAgFAgCAEB8QgAAfgYKEHwCAgJ8AAAACgoKCAgAPEBAQCAAfkJCQEACfAgUIkACAgICAAACABwgQgACQn5KSjQAfAgICAQAfAAMAHwAAEAgHAAAAAAAAAAUNHQ0FAIAQHxCAAACQn5CAAICQn5AAAAAYGAAAABAYFBIRAAD/AAAAAAAAAD8BBgE/AAAgPyAAAD8gIBEOAAAgPyAAAAQEBAQEAAAgPyAAAD8CBAg/AD8EBAQDAB8gICAfAAAAPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHyAgIB8AIyQkJBgAID8kJBsAAAAAAAAAAAAAAAAAAP8AAAAAAAAAfwIMAn8AAEF/QQAAf0FBIhwAAEF/QQAACAgICAgAPkFBQSIAfwgICH8AAAAAAAAAFH8UfxQAAEJ/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQn9AAAAAAAAAAAAAHCJBAAB8EhESfAAAQSIcAAAA/wAAAAAAAAD+BBgE/gAAgv6CAAD+goJEOAAAgv6CAAAQEBAQEAB8goKCRAD+EBAQ/gAAAAAAAAAo/ij+KACEwqKSjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE/oAAAAAAAAAAAAA4RIIAAIL+kpJsAACCRDgAAABXAAAAAAAAAPwIMAj8AAAE/AQAAPwEBIhwAAAE/AQAACAgICAgAPgEBASIAPwgICD8AAAAAAAAAFD8UPxQAIQEFCzEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj8AAAAAAAAAAAAAHCIBAAA+AQEBIgAAASIcAAAAFUAAAAAAAAA+RBgEPkAAAn5CQAA+QkJEOAAAAn5CQAAQEBAQEAA8AkJCRAA+UBAQPkAAAAAAAAAoPmg+aAAwKGR+YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEfkBAAAAAAAAAAAA4BAJAAD4CQkR4AAACRDgAAAABQ==\"\nconfig_fx = \"///////P19sB3///k5P/////////////fQF9//+DfX19g//v7+/v7/+DfX19u/+DfX19g/8B9+/fAf8B7e3t/f//fQF9//+DfW1tC/////////////////////////////////////////////////////////////////////8DAwMDAwMDQ0PDQ0MDw0NDQ4MDA0PDQwMDg0NDQ4MDAwMDAwMDA0PDQwMDwwMDA8MDw0NDQ4MDwwMDA8MDQ0PDQ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwNDQ8NDQwPDQ0NDgwMDA4PDAwMDAwMDAwMDAwMDAwMDVwAAAAAAAAAAAJ8AAACfAgYKkQCAEB8QgAAPEBISHgACgoKCAgCAEB8QgACfgYKEHwCfAgICgQCPkJCQjwAAAB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAAB8CBgoRAAYFBB8EAAAAAAAAAAAAAAAAAAD1AAAAAAAAAD4JCAk+AB8gICAfADEKBAoxAAQEBAQEAAAgPyAAAD8CBAg/AD8EBAQDAB8gICAfAAAAPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAEEiFAgAAEF/QQAAfwQIEH8ARklJSTEAf0lJSUEAfwkZKUYAAQF/AQEACAgICAgAAEJ/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUNnc2FAAAQn9AAAA+QUFBPgAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAgv6CAAD+CBAg/gCMkpKSYgD+kpKSggD+EjJSjAACAv4CAgAQEBAQEACEwqKSjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE6KiopyAEKCipZiAAAAAAAAAAAAAAAAAAAAAAAAAABXAAAAAAAAAAAE/AQAAPwQIED8ABgkJCTEAPwkJCQEAPwkZKQYAAQE/AQEACAgICAgAIQEFCzEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhAQULMQA+AQEBPgAAAAAAAAAAAAAAAAAAAAAAAAAAFX4iIiIiIiIiImJiYiIiYiIiImIiYmJiYiIiYmJiYmIiYiIiImIiIiJiIiIiIiIiIiIiImJiYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIj4+fn5+Pj4+fn5+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4/Q==\"\nencoder_setup = \"////A9vb2/v/A+/fvwP/B/v7+3f/B/v7+wf/A/v7d4//A9vb2/v/A9ubW+f/////////59vb2zv/A9vb2/v/+/sD+/v/A////wP/A9vb2+f/////////////////////////////////////////////////////////////////BwcGBgYGBgcGBwcHBgcHBgYGBwcHBgYGBwcGBgYHBwcGBgYGBgcGBwcHBgcHBwcHBwcGBgYGBwcGBgYGBgcHBwYHBwcHBgYGBwcGBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH//8AAAAAAAAAAPBQUCAA8FBQoADwUFAQACBQUJAAIFBQkAAAAAAAAPBQUBAA8ECA8ADgEBAQAAAAAAAAEPAQEADgEBDgAAAAAAAA8FBQoADwUFAQAPAAAPAA8FBQEADwUFCgACBQUJAA8FBQEAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAQAAAAABAAABAAEBAQEAAQEBAAABAQEAAAAAAAAAAQEBAQABAAABAAABAQEAAAAAAAAAAQAAAAABAQAAAAAAAAABAAABAAEBAQEAAAEBAAABAQEBAAEAAAEAAQEBAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAAAADAMAgEAgIBAf0BAQICBAgwwAAAAADgAAAAAAAAgICAAAAAwCAgQACA4IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwDAIBAICAQH9AQECAgQIMMAAAAAA4CAgIMAAAICgAAAAAICAgIAA4ACAgAAAgOCAAAAAAAAAAAAA//8AAAAAAAcYIECAgAAAAQAAgIBAIBgHAAAAAA8ICAgIAAcKCgoDAAEPAQAAAAAHCAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAHGCBAgIAAAAEAAICAQCAYBwAAAAAPAQMFCAAACA8IAAADFBQUDwAPAQAADwAABwgIBAAAAAAAAAD//wAAAAAAAAAAAAAAAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI/w==\"\nio_test = \"////////+wP7//9/v9/v9/8H+/v7B//////////7+wP7+/8D29vb+//n29vbO//7+wP7+///////////////////////////////////////////////////////////////////////////////////////////////////////BwcHBwcGBgYHBwcHBwcHBwcGBgYHBwcHBwcHBwcHBgcHBwYGBgYGBwYGBgYHBwcHBgcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH//8AAAAAAgL+AgIA/hIyUowAAIT+gAAAAAAAAAAAfIKCgnwAAABAwAAAAAAAAAAAfIKCgkQADjDAMA4AAIT+gAAAAAAAAAAAEBAQEBAAfIKCgnwAAMDAAAAAfIKCgnwAfIKCgnwAhMKikowADjDAMA4AAAAAAAAAAAAAAAAAAAD//wAAAAAICPgICAD4SMhIMAAQCIhIMAAAAAAAAADwCAgI8AAAAAEAAAAAAAAAAADwCAgIEAA4wADAOAAQCIhIMAAAAAAAAABAQPBAQADwCAgI8AAAAAAAAADwCAgI8ADwCAgI8AAQCIhIMAA4wADAOAAAAAAAAAAAAAAAAAAAAP//AAAAACAg4yAgAOMgICHCACIjomIiAAAAAAAAAMEiIiLBAAAABQMAAAAAAAAAAMEiIiJBAOAAAwDgACIjomIiAAAAAAAAAAAAwQAAAMEiIiLBAAADAwAAAMEiIiLBAMEiIiLBAEIjIiLCAOAAAwDgAAAAAAAAAAAAAAAAAAAA//8AAAAAgICPgIAAj4GDhQgABAgIiQYAAAAAAAAAB4iIiAcAAAAUDAAAAAAAAAAAB4iIiAQAgAMMA4AABAgIiQYAAAAAAAAAAQEHAQEAB4iIiAcAAAwMAAAAB4iIiAcAB4iIiAcACIyKiQgAgAMMA4AAAAAAAAAAAAAAAAAAAAD//wAAAAAAAD8AAAA/BAwUIwAMCgk/CAAAAAAAAAAfICAgHwAAAFAwAAAAAAAAAAAfICAgEQADDDAMAwAMCgk/CAAAAAAAAAAEBB8EBAAfICAgHwAAMDAAAAAfICAgHwAfICAgHwAhMCgkIwADDDAMAwAAAAAAAAAAAAAAAAAAAP//iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIj4+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiI/w==\"\ndisplay_setup = \"////A/v7d4////sD+///59vb2zv/A9vb2+f/A///////D7e7tw//498/3+P/////////59vb2zv/A9vb2/v/+/sD+/v/A////wP/A9vb2+f/////////////////////////////////////////////////////////////////BwcGBgYHBwcHBgYGBwcGBgYGBwcGBwcHBwcGBgYGBgcGBwcHBgcHBwYHBwcHBwcHBwcGBgYGBwcGBgYGBgcHBwYHBwcHBgYGBwcGBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH//8AAAAA8JCQkGAA8JCQkGAA8JCQkBAAYJCQkBAAYJCQkBAAAGBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAHAAAAAADHAAECBAAHBAQEBADEREREQwDEBAQEwwCAQ0NAgAAAgIAAAAAAAAAAAADAQEBAQADAAAAAAAAAQMBAAADAQEBAgAAAgMAAAACAQEBAgACAQEBAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAAAAAAAAAAAB8QEBAQAAICAgICAB8SEhIQAB8BAgQfAA8QEBAIAAANDQAAAAAAAAAAAB8CAgIAAB8QEBAQAAAQHxAAAB8CAgIBAAAQHxAAAA0SEhINAA8QEBAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAAAAAAAAAAAAfwkZKUYACAgICAgAf0lJSUEAfwQIEH8APkFBQSIAADY2AAAAAAAAAAAAQX9JSTYAfwkZKUYAAEF/QQAAPkFJSXoAfwgICH8AAQF/AQEAfwQIEH8Af0lJSUEARklJSTEARklJSTEAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//+Pj4+Pj4+Pj4+PiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI/w==\"\ndac_calib = \"////A/v7d4//D7e7tw//B/v7+3f///8f7+/v/x9vbx//D//////vD+///w+vr1//D6+vX/8fb28f/+8P7+//7w/v//8f7+8f/w+/fw/////f////////////////////398H39//B/v7+wf//39/////B/v7+wf/459/n+P/////BwcGBgYHBwcGBwcHBgcHBgYGBwcHBwcGBgYHBgcHBgcGBgYGBwYGBgcHBgYGBwcGBwcGBwYHBwYHBwYHBwcGBgYHBwcGBgcHBgcHBgcHBwYHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBgYGBwcHBgYHBwcHBgYGBwcHBwYHBwcH//8AAACCRCgQAP6CgkQ4APgkIiT4AHyCgoJEAACE/oAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAAAAKGzubCgAEBB8EBAAfIKCgnwAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAA+AgIEOAA4JCIkOAA8AgICBAAEAiISDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQPBAQADwCAgI8AAAAAAAAAAAAAAAAAAAAP//AAAAAAAAAADjIiJBgACDQCBAgwDBIiIiQQAiI6JiIgAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAwMAAAAAAAAAAAAAAAAAwQAAAMEiIiLBAAAAAAAAAAAAAAAAAAAA//8AAAAAAAAAAI+IiAQDAA8CggIPAAeIiIgEAAQICIkGAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAMDAAAAAAAAAAAAAAAAQEHAQEAB4iIiAcAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAAAPyAgEQ4APgkICT4AHyAgIBEADAoJPwgAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAADAwAAAAAAAAAAAAAAAEBB8EBAAfICAgHwAAAAAAAAAAAAAAAAAAAP//iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+Pj4+Pj4+Pj4+Pj4iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI/w==\"\nadc_calib = \"////D7e7tw//A/v7d4//B/v7+3f///8f7+/v/x9vbx//D//////vD+///w+vr1//D6+vX/8fb28f/+8P7+//7w/v//8f7+8f/w+/fw/////f////////////////////398H39//B/v7+wf//39/////B/v7+wf/459/n+P/////BwcGBwcHBgcGBgYHBwcHBgYGBwcHBwcGBgYHBgcHBgcGBgYGBwYGBgcHBgYGBwcGBwcGBwYHBwYHBwYHBwcGBgYHBwcGBgcHBgcHBgcHBwYHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBgYGBwcHBgYHBwcHBgYGBwcHBwYHBwcH//8AAACCRCgQAPgkIiT4AP6CgkQ4AHyCgoJEAACE/oAAAAAAACgoKCgoAAAAAAAAABAQfBAQAHyCgoJ8AADAwAAAAHyCgoJ8AHyCgoJ8AACE/oAAAA4wwDAOAAAAAAAAKGzubCgAEBB8EBAAAIT+gAAAbJKSkmwAfIKCgnwAAAD//wAAAAAAAAAA4JCIkOAA+AgIEOAA8AgICBAAEAiISDAAAAAAoKCgoKAAAAAAAAAAQEDwQEAA8AgICPAAAAAAAAAA8AgICPAA8AgICPAAEAiISDAAOMAAwDgAAAAAAAAAAAAAAABAQPBAQAA4KCgoyAA4KCgoyAAAAAAAAAAAAP//AAAAAAAAAACDQCBAgwDjIiJBgADBIiIiQQAiI6JiIgAAAACAgICAgAAAAAAAAAAAAMEAAADBIiIiwQAAAwMAAADBIiIiwQDBIiIiwQAiI6JiIgDgAAMA4AAAAAAAAAAAAAAAAAAAwQAAAAFC4gIBAOGioqIhAMAgICDAAAAA//8AAAAAAAAAAA8CggIPAI+IiAQDAAeIiIgEAAQICIkGAAAAAAICAgICAAAAAAAAAAEBBwEBAAeIiIgHAAAMDAAAAAeIiIgHAAeIiIgHAAQIiAkGAIADDAOAAAAAAAAAAAAAAAAAAQEHAQEAAAiPCAAAhIiIiIcABwiIiAcAAAD//wAAAAAAAAAAPgkICT4APyAgEQ4AHyAgIBEADAoJPwgAAAAACgoKCgoAAAAAAAAABAQfBAQAHyAgIB8AADAwAAAAHyAgIB8AHyAgIB8AACE/IAAAAwwwDAMAAAAAAAAAAAAAAAAEBAQEBAAAIT8gAAAQICIlGAAeJSQkGAAAAP//iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+Pj4+Pj4+Pj4+Pj4iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI/w==\"\nosc =       \"fwIMAn8ACAgICAgAPkFBQT4ARklJSTEAPkFBQSIAIBAIBAIABxhgGAcAAER9QAAAfAgEBAgABD9EQCAAAGBgAAAAfBIREnwAfAgEBHgAIFRUVHgAAEF/QAAAOERERDgAGKSkpHwAAAAAAAAAHD4+PhwcIiIiHBwiIiIcHCIiIhwCgkIiEhIKCuoKChISIkKCAgICAuIioqIiIiKiIiIioqIioqIiIiKiIiIioiIiIqKiIuICAgICgoKCAgICAgICAgICAgICgkJCQkJCggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAj7BAAAAAAAADwAAAAAAAME+AAAA/wD/H/AA8P/wAPD//wD///AA8P/wAPD/8ADw//8A/wAAAOeIiOgAAAAAAAAAAAAAPkGAAAAIECCAQT4AAAAAAAAAfwgICH8AIFRUVHgAfAgEBAgAfAQYBHgAAAAAAAAAAAAAAAAAAAAAAAAAAAABAoREKCgoKChEhAIBAAAAAAAHhIWEhYQFBQWEBQUFBAUFBQQFhQUEBQUFBAUFBQQHAAAAAAAAAwAAAAAAAAAAwCAQCAgFBfUFBQgIECDAAAAAAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAfIECQiISAgEAgHwAAAAAAAAAAAD8AAAAAIj4gAAA+AgwCPAA/JCIiHAA+BAICBAAcKioqDAAAAAAAAAAAAB9ggAAAAAAABwAAAAAAgGAfAAAAAD8BBgE/ABwiIiIcAD4EAgIEAH4SEhIMAD8EAgI8AAAAAAAAAAAAAAAAAAAAAIBAIBAQ0BAQIECAAAAAAAAAAMBAQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgUIiFBTUFBQiQoEAAAAAAAAAgEBAQIAAAAAAAAAAAEDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAgQEBDQEAgEA8AAAAAAAAAHxAQCAcADhUVFQYADhEREQgACBUVFR4ABygoKB8AAAAAAAAAAAAAAAAAAAAAAAAPECBAQENAQCAQDwAAAAAAAAAPEBAQCAAOERERDgAAEB8QAAAOERERDgAfAgEBAgAAAAAAAAAAAAAAAAD4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+A==\"\n\nscreenshots = { \"io_test\" : io_test, \n                \"splash\": e,\n                \"osc\": osc,\n                \"encoder_setup\" : encoder_setup, \n                \"display_setup\" : display_setup, \n                \"dac_calib\" : dac_calib, \n                \"adc_calib\" : adc_calib, \n                \"engine\" : a, \n                \"modulation\" : mod, \n                \"menu\" : c, \n                \"config\" : config,\n                \"config_midi\" : config_midi,\n                \"config_fx\" : config_fx,\n             }\n\nmult4 = lambda n: int(math.ceil(n/4))*4\nmult8 = lambda n: int(math.ceil(n/8))*8\nlh = lambda n: struct.pack(\"<h\", n)\nli = lambda n: struct.pack(\"<i\", n)\n\ndef bmp(rows, w):\n    h, wB = len(rows), int(mult8(w)/8)\n    s, pad = li(mult4(wB)*h+0x20), [0]*(mult4(wB)-wB)\n    s = li(mult4(w)*h+0x20)\n    return (b\"BM\" + s + b\"\\x00\\x00\\x00\\x00\\x20\\x00\\x00\\x00\\x0C\\x00\\x00\\x00\" +\n            lh(w) + lh(h) + b\"\\x01\\x00\\x01\\x00\\xff\\xff\\xff\\x00\\x00\\x00\" +\n            b\"\".join([bytes(row+pad) for row in reversed(rows)]))\n\n\ndef getPixel(buffer, x, y):\n    return buffer[x + int(y / 8) * 128] & (1 << (y & 7)) == 0\n\ndef setPixel(row, x, c):\n    if c:\n        row[int(x/8)] |= (0b10000000 >> (x % 8))\n    else:\n        row[int(x/8)] &= ~(0b10000000 >> (x % 8))\n\nfor key in screenshots:\n    s = base64.b64decode(screenshots[key])\n    print(len(s))\n    rrr = []\n    for y in range(64): # comma, or other\n        r = list(s[y*16:][:16])\n        for x in range(128):\n            setPixel(r, x, getPixel(s, x, y))\n        rrr.append(r)\n\n    smile = [[0xFF,0xFF], [0x81,0xFF], [0xA5,0xFF], [0x81,0xFF], [0xA5,0xFF], [0xBD,0xFF], [0x81,0xFF], [0xFF,0xFF]]\n\n    f = open(key + \".bmp\", \"wb\")\n    f.write(bmp(rrr, 128))\n    f.close()"
  },
  {
    "path": "doc/output-routing.xml",
    "content": "<mxfile host=\"app.diagrams.net\" modified=\"2022-05-01T09:43:04.750Z\" agent=\"5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36\" etag=\"ipP1wIMTQGRE3NMpLXNX\" version=\"17.5.0\" type=\"device\"><diagram id=\"C5RBs43oDa-KdzZeNtuy\" name=\"Page-1\">7V1Nc9s4Ev01rpo92EWA4Ncxjh1vdhJXdpxMkrlsqSyOpYkseiU6tufXD2URMtkQCRACiKasXCJRMEg2XjceuhuNI//t7ePFYnQ3+ZiN09kR9caPR/7ZEaXES+Liv9WVp/WVIA7XF24W03HZ6OXC1fTvlP9lefV+Ok6XtYZ5ls3y6V394nU2n6fXee3aaLHIHurN/sxm9bvejW5S4cLV9WgmXv06HeeT9dWYRi/X/51Obyb8ziRM1r/cjnjj8k2Wk9E4e6hc8s+P/LeLLMvXn24f36azlfC4XL6+f/o6+/AjvPjPf5f/H305/fXz5e/H687edfmTzSss0nlutmt/3fXP0ey+lNf55cX7y/PiWnnXZf7ERbnI7ufjdNUdOfJPHybTPL26G12vfn0owFNcm+S3s/LnP7N5XqKBFKI6vZmNlquh9IrPy3yR/dgMx6r1RrarnxVft3zAn+kiTx8rg12+/kWa3ab54qloUv7KyoF8qn99qMCivDSpIII3G5VAvNn0+yLs4kMp7+2y//X7p/Sn9yP06enF3YzR33+cX5TDtVX2dO9kT0JcwifNwvf3Tvgb0SIRPm0WPts74TMPl/CZIPyLN+8vBbEXPRVTdCoXuTWLAUBLqCg41qfgwoEILkQmt2ggcvM9ZIKLByI4RpEJjojU6uzNWwmn9RwKsC4/6rkmRyI7WsuvjZc6lB8kl+4FKDKctQDbuKVDAUKC6F6A4sJ0LcA2fuhUg7EJMBAEKE4c8/GblYel+Ha94snT67qw6pJNH6f5t9Xnk6D89r1st/p89lhpdvakxamX2f3iOm1pV4IiHddcPuKgVIQebBE6v7ZIZ6N8+rPuKNo2EuUdPmXT4jUqfKE+60VgLNevU/5R1TED+mniubyffLS4SXOhn2dYbF56B6SIvHZXpMyLJ6pAZfX1e/W3F7A8f9NDy1osCiwACVzgMIeacElAP37PcBHpvAPD0g/EqgapzYUnhSJDhUQCFzqeJhSFjuB01oDFAhyjp0qzu1WDZfMD04YHfoH2ukezQBeXX68X6EzV5hJcSCcAOEQX6bCjoGermxzACH33UjBGuLDY5CXpjEXYEWQSlrHIb3/A4gvG5IaR4gIjXLxAFqkMRtkqyDYYRVfV6wUjVQRjjAuLTMIilbEIO4p7xiI9YBFiTG4YcTl1NsSuiegpgxF2lPQMxtec2hNzuu4sw0GMsleTe7xf3n37194NAlymux8F0Qm+x1k+PsUmftGzXM3z2U8lYDGyUeAEHX0aQQDNRyJKrtc0Ar8pDD6MNALiOYeeSIhR5xGIfmbnEmyKgyNNJIBzEAIJikwMdyYBjBM6lyATJxBx8tBc1tLIryxsvZOE8e9mF7erTj6li2khkXShxQCkC14+z0pXvD6yFW9UB1yiHQ2EHVmKBgYgFpNEXutz+XHH9mFrezvRRmbRj+nXlIyceCRUVTLKwpqanXhhpKFqzy0s6x9fbcj1D1deCAVTZqIboxQ66jlGyUS2ZwzCUVSfJkigiuDQDwCCKUGKYPUZBFc+CcyES3Qjm0JHPUc2mcgVjSE4pKRuhD2JEW4CYakQNAGwDqgM1gcj3MwpAPJi3ey8gLM76MToC8KiyxOnt8eHLnvX3h5mPg92p+hdXb2jQKLdhhWZJYqKzDUeiSJD8h7rxu/gNjqBlhlazTCgB4nfvjoR2jNJ+4ZVmWr7uN7e0upHTCp+8+WboH6dYgO2DFeILdbI7CWq1ki3IuUmdcMls1vj0XKyGVLTRkw1OyvAlRHDiCE2AjsSfDudjZhxviImtr6/vDp6dnB7v5z99r3o9ev5ZzFOqExgKjHC2Kbflu+44mMWB4JZaIOMcbPAO3bLZ6yqd4BKa0Ootbp5bE0OSDxaGxj3Vu6AEyTDL4yaLvOEa1FVP15nP3qDv9Aq0wuoVeToshAdxmPamqmuuJCZPR8uMPRdJzDyqbgTtke7Z95BuENAs7/d2K3ZdXLAJrgAC10Euhu3BeTvzK67PbCqiyDuI4AZiI7HNZEXk6XQUXcwEUbcELlyRQYqe6wLZboqv2aLfJLdZPPR7PzlKjA0L20+ZNldKeC/0jx/KiU8us+zuvhrMysYC25/SIcJE8nOBJ4ZL/cKqE603QxSV/WHW6xiiYcQto9oN3MB2lsyF6K3fW0utiAdu7mIXJsL0QFYyHKbAxWbKAOFZOl+Ramyz3qIlncLJy0uvpvO+C2XhTnMeaN5Nk/5tbKNDUOsmsZgOMNN2zEjaL5icLcz4YOZ8BKLD9vz57JqwTkp7VczdvZB7mTZpJAOVNdE5rnFbrVNraUf6hHEuveG9hz8Vh5FZMHvgCQnhXHb/CN1KxJ6JyHTs3ztPScePQmjZPMvtmIVYWQ6CiS8Fpr9PnhtaNy/aTKLpG89Us0GQ6dHAGmwkIC62myHoO0kEkAYLEG9ZY/z3u8wZ64LfIYte5tFkzN06YvHR7gWf8ve5v3bWi4eIOFa/KKH9BVsLUdng4ZSoR6eJbHZZOnsLAnRz4RTctDuuhYc5/ToBcfQSW7Y1QxC18YuEld2qIsZQMrkXoADq2UASY97AQ6tlAE6FR74oQity3AkvhMQfA50C4tCxhYlJ0nS1cVoytUR7esZCZwUIAEPGPSV17ll0DVPTGA9b8mMDicmiG4rKTJDXFty4FEHTDfLFXYUWEoahLWs+ANbdQlHhzMTRATLjTDFBXUCp15dqBNozns2vBYPTdijwlV8eOU4RVa4ypfM67o17AXOaimAHdRNskilWcf2tLW9HZPPKduhcJX2PKG6S5nDB4v+QbauXTgOdqRYOM4YhC3WXnsVhavUZxBcvgqSSAiKMoJhRz2XXoupPQS/jsJVQzXCDDo3dHcds6ReuIrBnCfbEBajAzgDezDZ2nlgL7ZYtW54hatiVUUOcR0PB8k7092kAMuA2nIwwSOvg3p6rby9rNBVw6pMtT3rIwcyFiNKeAtXQcPlOhwX26u4VyPdwytcFSt7yZEZscgQGxE62nmnlXG+IkZ1hlm4yo/qhatY5LhwVYwiiGBVvXE5UgOobLoxe8EBGegE7XvUYeMBgj0oYwXH0DcSg4frVFUfX2dW2uBLtMoC+bsdilppr8aQmUQfLj703SogB27nMsKmjWBi3vs93JpWoeqOxRgZ8YbeA930FAj83Yl3twdW9R70ks6SUEE1hlLTCh56tJG3Ky9lIvp3RSEOsbIKip3WPAlYarc4pF3XtIJb2STOQ9je74XWiY71odSoEtQ/dK3+W8sDDqJGlcKuy35FqeI2PVhS2wnK3DpYr17VENfovhQJgE1QjPB2zjyGCiMJ3Ah7TDu25+9hdy6IXOgY8mpXnEw4YB27WVBrHuYhVrtSHkVkwabVlrBaTSoQxwj0y13Juk5AvStwG1O+TL+V9Moj4KQPw2gxyX5wBa8S1WUYOlUCSNPd8gE7YrZOTYPuoD5qu222bqHPUYM5QM4PVySeeS/zPu7F2UAMiWE4hnu4tE+HBw6J4kXNxoYb1grwLB3J0Qlwd6asffvR8rbMELWnS3ux5UY6/WJTswI5bXwzfqayQvXVrip4LDuhynKKN/FUYgCHjTbDwe0xcCnpn/xeIDz2KgiPwWxBit/9ynTRM3Atptjvxf6a4VlclpyEFcSBU9sLOFK/kZyoo9rtYfDEG8pp8PCEK/frlabzaYr3GFR6L/GRnUtLPBT1cGzm9270Domxg0k92gegwOVOiDu/l3jGHf3DT/CFY8iM5PdSyAQtHVoLg4u9HFpLPLuJ4gNO8N1MlAoMEJdRTKAt01+61DpCeGztxon3GnJ8FYCI67QReAaeGYMM4W1pFzB8eJl/tf0oW0vmm4jBB7S7dOFhnBxkrjbpEjKAxF3dTAoEOw4IoYp2y9JxiZ1Td0OwoOwl9MqlJKzHh5BCCrOXt54YG/Sq1MyFDvd5aHSPaXCb+UVOPTiMkSTCEWKtIvoAU3/V1zLKprgnZ7bfHj4MjYQPn+9SjcFQwDBpzaMO7mKIb5IYvFsfVV4IEV2WBQK8j9k8Oz6f30zn6VJQm+XD9HY2ej5HuadphsKFqDDJ8KPdayCkMNnLoHkR/W++ILfi7oVIvKs8XaRZ8eFdMaF761/xCZVuiUxslaqQQmdQqqI3ij42StC7SvP7O3ySDLfUTdsuSRg105Hkb49/n0afP/0vnYy//PHh/p58/OOvY/NeEbf1h8B0ZPIkV9Va5uuTXF1NhCHwxWkHOkJZxMSiT6/4usiyvNq8WLhMPmbjdNXiHw==</diagram></mxfile>"
  },
  {
    "path": "lib/.fetch_deps.py",
    "content": "import subprocess\nimport os\nimport io\nimport urllib.request\nimport zipfile\nimport shutil\n\nsubprocess.run('git submodule update --init', shell=True)\n\nfrom os.path import isdir, join\n\nfrom SCons.Script import DefaultEnvironment\nenv = DefaultEnvironment()\nplatform = env.PioPlatform()\nboard = env.BoardConfig()\n\nprint(env[\"PIOENV\"])\n\n"
  },
  {
    "path": "lib/MoogLadders/LICENSE",
    "content": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org/>\n"
  },
  {
    "path": "lib/MoogLadders/README.md",
    "content": "# Moog Ladder Filters\n\nThis project contains different digital implementations of the classic 4-pole, 24 dB/octave analog filter introduced in 1965. The filter is well-regarded to add a nice character to any sound source, either synthesized or acoustic. \n\nThe ladder structure consists of four one-pole filters and a global negative feedback loop. Several academics have attempted to discretize this filter, and some academic publications on the topic can be found in the `research/` directory.\n\nThe filter classes do not rely on external libraries and can be used with little to no modification in other DSP projects. Every filter has been modified from its original implementation for code clarity and/or runtime performance. The project includes a test app that will pass white noise through each of the implemented filter variants. \n\n# Filter Tuning & A Word of Warning\nEach model is unique. The newest is from 2015 while the oldest dates back over 20 years. Some try to remain true to their analog counterpart, where others are more approximate. The filters have not been rigorously verified for all combinations of cutoff, resonance, and sampling rate. Some are purposely built to self-oscillate, but beware the occasional blow-up with parameters that exceed some undiscovered value. \n\n# Models & Licenses\n\n“Closed-Source Friendly” indicates if the individual license permits redistribution in a closed-source product (like a VST plugin). Filtered output audio is fair game for any kind of sample library or music production, commercial or otherwise. In the case of copyright-only code, it is possible to contact the original author to request an explicit license.\n\nImplementation | License | Original Source | Closed-Source Friendly\n------------- | ------------- | ----------------- | -----------------\nSimplified | Custom | DAFX | No\nHuovilainen  | LGPLv3 | CSound | If dynamically linked\nStilson | Unlicense | Moog~ by D. Lowenfels | Yes\nMicrotracker | Unlicense | Magnus Jonsson | Yes\nKrajeski | Unlicense | Aaron Krajeski | Yes\nMusicDSP | Suggested CC-BY-SA | MusicDSP.org | Yes\nOberheim | Custom | Will Pirkle | Yes\nImproved | ISC | Via Author | Yes\nRKSimulation | BSD | Bob~ by Miller Puckette | Yes\n\n# ToDo\n\nCommunity contributions are welcome.\n\n* Several filters have extra parameters that could be exposed (drive, thermal coefficients, Q, etc).\n* Many filters could be easily modified for HPF or other types of output.\n* Filter response graphs.\n* The Huovilainen and Simplified models need to be oversampled and nyquist filtered.\n\n# License\nIf not otherwise stated in the header of a file, all other code in this project is released under the Unlicense.\n"
  },
  {
    "path": "lib/MoogLadders/src/Filters.h",
    "content": "#pragma once\n\n#ifndef FILTERS_H\n#define FILTERS_H\n\n#include <stdint.h>\n#include <array>\n\n#include \"Util.h\"\n\nclass BiQuadBase\n{\npublic:\n\t\n\tBiQuadBase()\n\t{\n\t\tbCoef = {{0.0f, 0.0f, 0.0f}};\n\t\taCoef = {{0.0f, 0.0f}};\n\t\tw = {{0.0f, 0.0f}};\n\t}\n\t\n\t~BiQuadBase()\n\t{\n\n\t}\n\t\n\t// DF-II impl\n\tvoid Process(float * samples, const uint32_t n)\n\t{\n\t\tfloat out = 0;\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tout = bCoef[0] * samples[s] + w[0];\n\t\t\tw[0] = bCoef[1] * samples[s] - aCoef[0] * out + w[1];\n\t\t\tw[1] = bCoef[2] * samples[s] - aCoef[1] * out;\n\t\t\tsamples[s] = out;\n\t\t}\n\t}\n\n\tfloat Tick(float s)\n\t{\n\t\tfloat out = bCoef[0] * s + w[0];\n\t\tw[0] = bCoef[1] * s - aCoef[0] * out + w[1];\n\t\tw[1] = bCoef[2] * s - aCoef[1] * out;\n\t\treturn out;\n\t}\n\n\tvoid SetBiquadCoefs(std::array<float, 3> b, std::array<float, 2> a)\n\t{\n\t\tbCoef = b;\n\t\taCoef = a;\n\t}\n\t\nprotected:\n\tstd::array<float, 3> bCoef; // b0, b1, b2\n\tstd::array<float, 2> aCoef; // a1, a2\n\tstd::array<float, 2> w; // delays\n};\n\nclass RBJFilter : public BiQuadBase\n{\npublic:\n\t\n\tenum FilterType\n\t{\n\t\tLOWPASS,\n\t\tHIGHPASS,\n\t\tBANDPASS,\n\t\tALLPASS,\n\t\tNOTCH,\n\t\tPEAK,\n\t\tLOW_SHELF,\n\t\tHIGH_SHELF\n\t};\n\t\n\tRBJFilter(FilterType type = FilterType::LOWPASS, float cutoff = 1, float sampleRate = 44100) : sampleRate(sampleRate), t(type)\n\t{\n\t\tQ = 1;\n\t\tA = 1;\n\n\t\ta = {{0.0f, 0.0f, 0.0f}};\n\t\tb = {{0.0f, 0.0f, 0.0f}};\n\n\t\tSetCutoff(cutoff);\n\t}\n\t\n\t~RBJFilter()\n\t{\n\t\t\n\t}\n\t\n\tvoid UpdateCoefficients()\n\t{\n\t\tcosOmega = cos(omega);\n\t\tsinOmega = sin(omega);\n\t\t\n\t\tswitch (t)\n\t\t{\n\t\t\tcase LOWPASS:\n\t\t\t{\n\t\t\t\talpha = sinOmega / (2.0 * Q);\n\t\t\t\tb[0] = (1 - cosOmega) / 2;\n\t\t\t\tb[1] = 1 - cosOmega;\n\t\t\t\tb[2] = b[0];\n\t\t\t\ta[0] = 1 + alpha;\n\t\t\t\ta[1] = -2 * cosOmega;\n\t\t\t\ta[2] = 1 - alpha;\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase HIGHPASS:\n\t\t\t{\n\t\t\t\talpha = sinOmega / (2.0 * Q);\n\t\t\t\tb[0] = (1 + cosOmega) / 2;\n\t\t\t\tb[1] = -(1 + cosOmega);\n\t\t\t\tb[2] = b[0];\n\t\t\t\ta[0] = 1 + alpha;\n\t\t\t\ta[1] = -2 * cosOmega;\n\t\t\t\ta[2] = 1 - alpha;\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase BANDPASS:\n\t\t\t{\n\t\t\t\talpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);\n\t\t\t\tb[0] = sinOmega / 2;\n\t\t\t\tb[1] = 0;\n\t\t\t\tb[2] = -b[0];\n\t\t\t\ta[0] = 1 + alpha;\n\t\t\t\ta[1] = -2 * cosOmega;\n\t\t\t\ta[2] = 1 - alpha;\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase ALLPASS:\n\t\t\t{\n\t\t\t\talpha = sinOmega / (2.0 * Q);\n\t\t\t\tb[0] = 1 - alpha;\n\t\t\t\tb[1] = -2 * cosOmega;\n\t\t\t\tb[2] = 1 + alpha;\n\t\t\t\ta[0] = b[2];\n\t\t\t\ta[1] = b[1];\n\t\t\t\ta[2] = b[0];\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase NOTCH:\n\t\t\t{\n\t\t\t\talpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);\n\t\t\t\tb[0] = 1;\n\t\t\t\tb[1] = -2 * cosOmega;\n\t\t\t\tb[2] = 1;\n\t\t\t\ta[0] = 1 + alpha;\n\t\t\t\ta[1] = b[1];\n\t\t\t\ta[2] = 1 - alpha;\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase PEAK:\n\t\t\t{\n\t\t\t\talpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);\n\t\t\t\tb[0] = 1 + (alpha * A);\n\t\t\t\tb[1] = -2 * cosOmega;\n\t\t\t\tb[2] = 1 - (alpha * A);\n\t\t\t\ta[0] = 1 + (alpha / A);\n\t\t\t\ta[1] = b[1];\n\t\t\t\ta[2] = 1 - (alpha / A);\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase LOW_SHELF:\n\t\t\t{\n\t\t\t\talpha = sinOmega / 2.0 * sqrt( (A + 1.0 / A) * (1.0 / Q - 1.0) + 2.0);\n\t\t\t\tb[0] = A * ((A + 1) - ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));\n\t\t\t\tb[1] = 2 * A * ((A - 1) - ((A + 1) * cosOmega));\n\t\t\t\tb[2] = A * ((A + 1) - ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));\n\t\t\t\ta[0] = ((A + 1) + ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));\n\t\t\t\ta[1] = -2 * ((A - 1) + ((A + 1) * cosOmega));\n\t\t\t\ta[2] = ((A + 1) + ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));\n\t\t\t} break;\n\t\t\t\t\n\t\t\tcase HIGH_SHELF:\n\t\t\t{\n\t\t\t\talpha = sinOmega / 2.0 * sqrt( (A + 1.0 / A) * (1.0 / Q - 1.0) + 2.0);\n\t\t\t\tb[0] = A * ((A + 1) + ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));\n\t\t\t\tb[1] = -2 * A * ((A - 1) + ((A + 1) * cosOmega));\n\t\t\t\tb[2] = A * ((A + 1) + ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));\n\t\t\t\ta[0] = ((A + 1) - ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));\n\t\t\t\ta[1] = 2 * ((A - 1) - ((A + 1) * cosOmega));\n\t\t\t\ta[2] = ((A + 1) - ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));\n\t\t\t} break;\n\t\t}\n\t\t\n\t\t// Normalize filter coefficients\n\t\tfloat factor = 1.0f / a[0];\n\t\t\n\t\tstd::array<float, 2> aNorm;\n\t\tstd::array<float, 3> bNorm;\n\n\t\taNorm[0] = a[1] * factor;\n\t\taNorm[1] = a[2] * factor;\n\n\t\tbNorm[0] = b[0] * factor;\n\t\tbNorm[1] = b[1] * factor;\n\t\tbNorm[2] = b[2] * factor;\n\t\t\n\t\tSetBiquadCoefs(bNorm, aNorm);\n\t}\n\t\n\t// In Hertz, 0 to Nyquist\n\tvoid SetCutoff(float c)\n\t{\n\t\tomega = HZ_TO_RAD(c) / sampleRate;\n\t\tUpdateCoefficients();\n\t}\n\t\n\tfloat GetCutoff()\n\t{\n\t\treturn omega;\n\t}\n\t\n\t// Arbitrary, from 0.01f to ~20\n\tvoid SetQValue(float q)\n\t{\n\t\tQ = q;\n\t\tUpdateCoefficients();\n\t}\n\t\n\tfloat GetQValue()\n\t{\n\t\treturn Q;\n\t}\n\n\tvoid SetType(FilterType newType)\n\t{\n\t\tt = newType;\n\t\tUpdateCoefficients();\n\t}\n\t\n\tFilterType GetType()\n\t{\n\t\treturn t;\n\t}\n\t\nprivate:\n\n\tfloat sampleRate;\n\t\n\tfloat omega;\n\tfloat cosOmega;\n\tfloat sinOmega;\n\t\n\tfloat Q;\n\tfloat alpha;\n\tfloat A;\n\n\tstd::array<float, 3> a;\n\tstd::array<float, 3> b;\n\t\n\tFilterType t;\n};\n\n// +/-0.05dB above 9.2Hz @ 44,100Hz\nclass PinkingFilter\n{\n\tdouble b0, b1, b2, b3, b4, b5, b6;\npublic:\n\tPinkingFilter() : b0(0), b1(0), b2(0), b3(0), b4(0), b5(0), b6(0) {}\n\tfloat process(const float s)\n\t{\n\t\tb0 = 0.99886 * b0 + s * 0.0555179;\n\t\tb1 = 0.99332 * b1 + s * 0.0750759;\n\t\tb2 = 0.96900 * b2 + s * 0.1538520;\n\t\tb3 = 0.86650 * b3 + s * 0.3104856;\n\t\tb4 = 0.55000 * b4 + s * 0.5329522;\n\t\tb5 = -0.7616 * b5 - s * 0.0168980;\n\t\tconst double pink = (b0 + b1 + b2 + b3 + b4 + b5 + b6 + (s * 0.5362)) * 0.11;\n\t\tb6 = s * 0.115926;\n\t\treturn pink;\n\t}\n};\n\nclass BrowningFilter\n{\nfloat l;\npublic:\n\tBrowningFilter() : l(0) {}\n\tfloat process(const float s)\n\t{\n\t\tfloat brown = (l + (0.02f * s)) / 1.02f;\n\t\tl = brown;\n\t\treturn brown * 3.5f; // compensate for gain\n\t}\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/HuovilainenModel.h",
    "content": "// Based on implementation in CSound5 (LGPLv2.1)\n// https://github.com/csound/csound/blob/develop/COPYING\n\n#pragma once\n\n#ifndef HUOVILAINEN_LADDER_H\n#define HUOVILAINEN_LADDER_H\n\n#include \"LadderFilterBase.h\"\n\n/*\nHuovilainen developed an improved and physically correct model of the Moog\nLadder filter that builds upon the work done by Smith and Stilson. This model\ninserts nonlinearities inside each of the 4 one-pole sections on account of the\nsmoothly saturating function of analog transistors. The base-emitter voltages of\nthe transistors are considered with an experimental value of 1.22070313 which\nmaintains the characteristic sound of the analog Moog. This model also permits\nself-oscillation for resonances greater than 1. The model depends on five\nhyperbolic tangent functions (tanh) for each sample, and an oversampling factor\nof two (preferably higher, if possible). Although a more faithful\nrepresentation of the Moog ladder, these dependencies increase the processing\ntime of the filter significantly. Lastly, a half-sample delay is introduced for \nphase compensation at the final stage of the filter. \n\nReferences: Huovilainen (2004), Huovilainen (2010), DAFX - Zolzer (ed) (2nd ed)\nOriginal implementation: Victor Lazzarini for CSound5\n\nConsiderations for oversampling: \nhttp://music.columbia.edu/pipermail/music-dsp/2005-February/062778.html\nhttp://www.synthmaker.co.uk/dokuwiki/doku.php?id=tutorials:oversampling\n*/ \n\nclass HuovilainenMoog : public LadderFilterBase\n{\npublic:\n\t\n\tHuovilainenMoog(float sampleRate) : LadderFilterBase(sampleRate), thermal(0.000025)\n\t{\n\t\tmemset(stage, 0, sizeof(stage));\n\t\tmemset(delay, 0, sizeof(delay));\n\t\tmemset(stageTanh, 0, sizeof(stageTanh));\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.10f);\n\t}\n\t\n\tvirtual ~HuovilainenMoog()\n\t{\n\t\t\n\t}\n\t\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\t// Oversample\n\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t{\n\t\t\t\tfloat input = samples[s] - resQuad * delay[5];\n\t\t\t\tdelay[0] = stage[0] = delay[0] + tune * (tanh(input * thermal) - stageTanh[0]);\n\t\t\t\tfor (int k = 1; k < 4; k++) \n\t\t\t\t{\n\t\t\t\t\tinput = stage[k-1];\n\t\t\t\t\tstage[k] = delay[k] + tune * ((stageTanh[k-1] = tanh(input * thermal)) - (k != 3 ? stageTanh[k] : tanh(delay[k] * thermal)));\n\t\t\t\t\tdelay[k] = stage[k];\n\t\t\t\t}\n\t\t\t\t// 0.5 sample delay for phase compensation\n\t\t\t\tdelay[5] = (stage[3] + delay[4]) * 0.5;\n\t\t\t\tdelay[4] = stage[3];\n\t\t\t}\n\t\t\tsamples[s] = delay[5];\n\t\t}\n\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tresonance = r;\n\t\tresQuad = 4.0 * resonance * acr;\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c;\n\n\t\tdouble fc =  cutoff / sampleRate;\n\t\tdouble f  =  fc * 0.5; // oversampled \n\t\tdouble fc2 = fc * fc;\n\t\tdouble fc3 = fc * fc * fc;\n\n\t\tdouble fcr = 1.8730 * fc3 + 0.4955 * fc2 - 0.6490 * fc + 0.9988;\n\t\tacr = -3.9364 * fc2 + 1.8409 * fc + 0.9968;\n\n\t\ttune = (1.0 - exp(-((2 * MOOG_PI) * f * fcr))) / thermal; \n\n\t\tSetResonance(resonance);\n\t}\n\t\nprivate:\n\t\n\tdouble stage[4];\n\tdouble stageTanh[3];\n\tdouble delay[6];\n\n\tdouble thermal;\n\tdouble tune;\n\tdouble acr;\n\tdouble resQuad;\n\t\n}; \n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/ImprovedModel.h",
    "content": "/*\nCopyright 2012 Stefano D'Angelo <zanga.mail@gmail.com>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHIS SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\n#pragma once\n\n#ifndef IMPROVED_LADDER_H\n#define IMPROVED_LADDER_H\n\n#include \"LadderFilterBase.h\"\n\n/*\nThis model is based on a reference implementation of an algorithm developed by\nStefano D'Angelo and Vesa Valimaki, presented in a paper published at ICASSP in 2013.\nThis improved model is based on a circuit analysis and compared against a reference\nNgspice simulation. In the paper, it is noted that this particular model is\nmore accurate in preserving the self-oscillating nature of the real filter.\n\nReferences: \"An Improved Virtual Analog Model of the Moog Ladder Filter\"\nOriginal Implementation: D'Angelo, Valimaki\n*/\n\n// Thermal voltage (26 milliwats at room temperature)\n#define VT 0.312\n\nclass ImprovedMoog : public LadderFilterBase\n{\npublic:\n\t\n\tImprovedMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tmemset(V, 0, sizeof(V));\n\t\tmemset(dV, 0, sizeof(dV));\n\t\tmemset(tV, 0, sizeof(tV));\n\t\t\n\t\tdrive = 1.0f;\n\t\t\n\t\tSetCutoff(1000.0f); // normalized cutoff frequency\n\t\tSetResonance(0.1f); // [0, 4]\n\t}\n\t\n\tvirtual ~ImprovedMoog() { }\n\t\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tdouble dV0, dV1, dV2, dV3;\n\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tdV0 = -g * (tanh((drive * samples[i] + resonance * V[3]) / (2.0 * VT)) + tV[0]);\n\t\t\tV[0] += (dV0 + dV[0]) / (2.0 * sampleRate);\n\t\t\tdV[0] = dV0;\n\t\t\ttV[0] = tanh(V[0] / (2.0 * VT));\n\t\t\t\n\t\t\tdV1 = g * (tV[0] - tV[1]);\n\t\t\tV[1] += (dV1 + dV[1]) / (2.0 * sampleRate);\n\t\t\tdV[1] = dV1;\n\t\t\ttV[1] = tanh(V[1] / (2.0 * VT));\n\t\t\t\n\t\t\tdV2 = g * (tV[1] - tV[2]);\n\t\t\tV[2] += (dV2 + dV[2]) / (2.0 * sampleRate);\n\t\t\tdV[2] = dV2;\n\t\t\ttV[2] = tanh(V[2] / (2.0 * VT));\n\t\t\t\n\t\t\tdV3 = g * (tV[2] - tV[3]);\n\t\t\tV[3] += (dV3 + dV[3]) / (2.0 * sampleRate);\n\t\t\tdV[3] = dV3;\n\t\t\ttV[3] = tanh(V[3] / (2.0 * VT));\n\t\t\t\n\t\t\tsamples[i] = V[3];\n\t\t}\n\t}\n\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tif (r > 1.0)\n            r = 1.0;\n        if (r < 0.001)\n            r = 0.001;\n\t\tresonance = r * 6.844399855f;\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n#define CUTOFF_MAX (20000.0f)\n\t\tcutoff = c;\n\t\tif (cutoff > CUTOFF_MAX) {\n            cutoff = CUTOFF_MAX;\n        }\n\t\tx = (MOOG_PI * cutoff) / sampleRate;\n\t\tg = 4.0 * MOOG_PI * VT * cutoff * (1.0 - x) / (1.0 + x);\n\t}\n\t\nprivate:\n\t\n\tdouble V[4];\n\tdouble dV[4];\n\tdouble tV[4];\n\t\n\tdouble x;\n\tdouble g;\n\tdouble drive;\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/KrajeskiModel.h",
    "content": "#pragma once\n\n#ifndef KRAJESKI_LADDER_H\n#define KRAJESKI_LADDER_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\n/*\nThis class implements Tim Stilson's MoogVCF filter\nusing 'compromise' poles at z = -0.3\n\nSeveral improments are built in, such as corrections\nfor cutoff and resonance parameters, removal of the\nnecessity of the separation table, audio rate update\nof cutoff and resonance and a smoothly saturating\ntanh() function, clamping output and creating inherent\nnonlinearities.\n\nThis code is Unlicensed (i.e. public domain); in an email exchange on\n4.21.2018 Aaron Krajeski stated: \"That work is under no copyright. \nYou may use it however you might like.\"\n\nSource: http://song-swap.com/MUMT618/aaron/Presentation/demo.html\n*/\n\nclass KrajeskiMoog final : public LadderFilterBase\n{\n\t\npublic:\n\t\n    KrajeskiMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tmemset(state, 0, sizeof(state));\n\t\tmemset(delay, 0, sizeof(delay));\n\t\t\n\t\tdrive = 1.0;\n\t\tgComp = 1.0;\n\t\t\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.1f);\n\t}\n\t\n\tvirtual ~KrajeskiMoog() { }\n\t\n\tvirtual void Process(float * samples, const uint32_t n) override\n\t{\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tstate[0] = tanh(drive * (samples[s] - 4 * gRes * (state[4] - gComp * samples[s])));\n\t\t\t\n\t\t\tfor(int i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tstate[i+1] = fclamp(g * (0.3 / 1.3 * state[i] + 1 / 1.3 * delay[i] - state[i + 1]) + state[i + 1], -1e30, 1e30);\n\t\t\t\t\n\t\t\t\tdelay[i] = state[i];\n\t\t\t}\n\t\t\tsamples[s] = state[4];\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tresonance = r;\n\t\tgRes = resonance * (1.0029 + 0.0526 * wc - 0.926 * pow(wc, 2) + 0.0218 * pow(wc, 3));\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c;\n\t\twc = 2 * MOOG_PI * cutoff / sampleRate;\n\t\tg = 0.9892 * wc - 0.4342 * pow(wc, 2) + 0.1381 * pow(wc, 3) - 0.0202 * pow(wc, 4);\n\t}\n\t\nprivate:\n\t\n\tdouble state[5];\n\tdouble delay[5];\n\tdouble wc; // The angular frequency of the cutoff.\n\tdouble g; // A derived parameter for the cutoff frequency\n\tdouble gRes; // A similar derived parameter for resonance.\n\tdouble gComp; // Compensation factor.\n\tdouble drive; // A parameter that controls intensity of nonlinearities.\n\t\n\tinline float fclamp(float in, float min, float max){\n\t    return fmin(fmax(in, min), max);\n\t}\n\t\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/LadderFilterBase.h",
    "content": "#pragma once\n\n#ifndef LADDER_FILTER_BASE_H\n#define LADDER_FILTER_BASE_H\n\n#include \"Util.h\"\n\nclass LadderFilterBase\n{\npublic:\n\t\n\tLadderFilterBase(float sampleRate) : sampleRate(sampleRate) {}\n\tvirtual ~LadderFilterBase() {}\n\t\n\tvirtual void Process(float * samples, uint32_t n) = 0;\n\tvirtual void SetResonance(float r) = 0;\n\tvirtual void SetCutoff(float c) = 0;\n\t\n\tfloat GetResonance() { return resonance; }\n\tfloat GetCutoff() { return cutoff; }\n\t\nprotected:\n\t\n\tfloat cutoff;\n\tfloat resonance;\n\tfloat sampleRate;\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/MicrotrackerModel.h",
    "content": "// Based on an implementation by Magnus Jonsson\n// https://github.com/magnusjonsson/microtracker (unlicense)\n\n#pragma once\n\n#ifndef MICROTRACKER_MODEL_H\n#define MICROTRACKER_MODEL_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\nclass MicrotrackerMoog : public LadderFilterBase\n{\n\npublic:\n\n\tMicrotrackerMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tp0 = p1 = p2 = p3 = p32 = p33 = p34 = 0.0;\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.10f);\n\t}\n\n\tvirtual ~MicrotrackerMoog() {}\n\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tdouble k = resonance * 4;\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\t// Coefficients optimized using differential evolution\n\t\t\t// to make feedback gain 4.0 correspond closely to the\n\t\t\t// border of instability, for all values of omega.\n\t\t\tdouble out = p3 * 0.360891 + p32 * 0.417290 + p33 * 0.177896 + p34 * 0.0439725;\n\n\t\t\tp34 = p33;\n\t\t\tp33 = p32;\n\t\t\tp32 = p3;\n\n\t\t\tp0 += (fast_tanh(samples[s] - k * out) - fast_tanh(p0)) * cutoff;\n\t\t\tp1 += (fast_tanh(p0) - fast_tanh(p1)) * cutoff;\n\t\t\tp2 += (fast_tanh(p1) - fast_tanh(p2)) * cutoff;\n\t\t\tp3 += (fast_tanh(p2) - fast_tanh(p3)) * cutoff;\n\n\t\t\tsamples[s] = out;\n\t\t}\n\t}\n\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tresonance = r;\n\t}\n\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c * 2 * MOOG_PI / sampleRate;\n\t\tcutoff = moog_min(cutoff, 1);\n\t}\n\nprivate:\n\n\tdouble p0;\n\tdouble p1;\n\tdouble p2;\n\tdouble p3;\n\tdouble p32;\n\tdouble p33;\n\tdouble p34;\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/MusicDSPModel.h",
    "content": "// This file is unlicensed and uncopyright as found at:\n// http://www.musicdsp.org/showone.php?id=24\n// Considering how widely this same code has been used in ~100 projects on GitHub with \n// various licenses, it might be reasonable to suggest that the license is CC-BY-SA\n\n#pragma once\n\n#ifndef MUSICDSP_MOOG_H\n#define MUSICDSP_MOOG_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\nclass MusicDSPMoog : public LadderFilterBase\n{\n\t\npublic:\n\t\n\tMusicDSPMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tmemset(stage, 0, sizeof(stage));\n\t\tmemset(delay, 0, sizeof(delay));\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.10f);\n\t}\n\t\n\tvirtual ~MusicDSPMoog()\n\t{\n\n\t}\n\t\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tfloat x = samples[s] - resonance * stage[3];\n\n\t\t\t// Four cascaded one-pole filters (bilinear transform)\n\t\t\tstage[0] = x * p + delay[0]  * p - k * stage[0];\n\t\t\tstage[1] = stage[0] * p + delay[1] * p - k * stage[1];\n\t\t\tstage[2] = stage[1] * p + delay[2] * p - k * stage[2];\n\t\t\tstage[3] = stage[2] * p + delay[3] * p - k * stage[3];\n\t\t\n\t\t\t// Clipping band-limited sigmoid\n\t\t\tstage[3] -= (stage[3] * stage[3] * stage[3]) / 6.0;\n\t\t\t\n\t\t\tdelay[0] = x;\n\t\t\tdelay[1] = stage[0];\n\t\t\tdelay[2] = stage[1];\n\t\t\tdelay[3] = stage[2];\n\n\t\t\tsamples[s] = stage[3];\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tresonance = r * (t2 + 6.0 * t1) / (t2 - 6.0 * t1);\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = 2.0 * c / sampleRate;\n\n\t\tp = cutoff * (1.8 - 0.8 * cutoff);\n\t\tk = 2.0 * sin(cutoff * MOOG_PI * 0.5) - 1.0;\n\t\tt1 = (1.0 - p) * 1.386249;\n\t\tt2 = 12.0 + t1 * t1;\n\n\t\tSetResonance(resonance);\n\t}\n\t\nprivate:\n\t\n\tdouble stage[4];\n\tdouble delay[4];\n\n\tdouble p;\n\tdouble k;\n\tdouble t1;\n\tdouble t2;\n\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/NoiseGenerator.h",
    "content": "#pragma once\n\n#ifndef NOISE_GENERATOR_H\n#define NOISE_GENERATOR_H\n\n#include <vector>\n#include <stdint.h>\n#include <exception>\n#include <array>\n#include <random>\n\n#include \"Util.h\"\n#include \"Filters.h\"\n\nstruct WhiteNoiseSource\n{\n\tWhiteNoiseSource() : dist(-1, 1) {}\n\tstd::mt19937 engine;\n\tstd::uniform_real_distribution<float> dist;\n};\n\n// Full spectrum noise\nstruct WhiteNoise : public WhiteNoiseSource\n{\n\tfloat operator()() { return dist(engine); }\n};\n\n// Pink noise has a decrease of 3dB/Octave\nstruct PinkNoise : public WhiteNoiseSource\n{\n\tfloat operator()() { return f.process(dist(engine)); }\n\tPinkingFilter f;\n};\n\n // Brown noise has a decrease of 6dB/Octave\nstruct BrownNoise : public WhiteNoiseSource\n{\n\tfloat operator()() { return f.process(dist(engine)); }\n\tBrowningFilter f;\n};\n\n// Note! This noise is only valid for 44100 because of the hard-coded filter coefficients\nstruct NoiseGenerator\n{\n\tenum NoiseType\n\t{\n\t\tWHITE,\n\t\tPINK,\n\t\tBROWN,\n\t};\n\t\n\tstd::vector<float> produce(NoiseType t, int sampleRate, int channels, float seconds)\n\t{\n\t\tint samplesToGenerate = sampleRate * seconds * channels;\n\t\tstd::vector<float> samples;\n\t\tsamples.resize(samplesToGenerate);\n\t\t\n\t\tswitch (t)\n\t\t{\n\t\tcase NoiseType::WHITE:\n\t\t{\n\t\t\tWhiteNoise n;\n\t\t\tfor(int s = 0; s < samplesToGenerate; s++) samples[s] = n();\n\t\t} break;\n\t\tcase NoiseType::PINK:\n\t\t{\n\t\t\tPinkNoise n;\n\t\t\tfor(int s = 0; s < samplesToGenerate; s++) samples[s] = n();\n\t\t} break;\n\t\tcase NoiseType::BROWN:\n\t\t{\n\t\t\tBrownNoise n;\n\t\t\tfor(int s = 0; s < samplesToGenerate; s++) samples[s] = n();\n\t\t} break;\n\t\tdefault: throw std::runtime_error(\"Invalid noise type\");\n\t\t}\n\t\treturn samples;\n\t}\n\t\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/OberheimVariationModel.h",
    "content": "// See: http://www.willpirkle.com/forum/licensing-and-book-code/licensing-and-using-book-code/\n// The license is \"You may also use the code from the FX and Synth books without licensing or fees. \n// The code is for you to develop your own plugins for your own use or for commercial use.\"\n\n#pragma once\n\n#ifndef OBERHEIM_VARIATION_LADDER_H\n#define OBERHEIM_VARIATION_LADDER_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\nclass VAOnePole\n{\npublic:\n\n\tVAOnePole(float sr) : sampleRate(sr)\n\t{\n\t\tReset();\n\t}\n\t\n\tvoid Reset()\n\t{\n\t\talpha = 1.0;\n\t\tbeta = 0.0;\n\t\tgamma = 1.0;\n\t\tdelta = 0.0;\n\t\tepsilon = 0.0;\n\t\ta0 = 1.0;\n\t\tfeedback = 0.0;\n\t\tz1 = 0.0;\n\t}\n\t\n\tdouble Tick(double s)\n\t{\n\t\ts = s * gamma + feedback + epsilon * GetFeedbackOutput();\n\t\tdouble vn = (a0 * s - z1) * alpha;\n\t\tdouble out = vn + z1;\n\t\tz1 = vn + out;\n\t\treturn out;\n\t}\n\t\n\tvoid SetFeedback(double fb) { feedback = fb; }\n\tdouble GetFeedbackOutput(){ return beta * (z1 + feedback * delta); }\n\tvoid SetAlpha(double a) { alpha = a; };\n\tvoid SetBeta(double b) { beta = b; };\n\t\nprivate:\n\n\tfloat sampleRate;\n\tdouble alpha;\n\tdouble beta;\n\tdouble gamma;\n\tdouble delta;\n\tdouble epsilon;\n\tdouble a0;\n\tdouble feedback;\n\tdouble z1;\n};\n\nclass OberheimVariationMoog : public LadderFilterBase\n{\n\t\npublic:\n\t\n\tOberheimVariationMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tLPF1 = new VAOnePole(sampleRate);\n\t\tLPF2 = new VAOnePole(sampleRate);\n\t\tLPF3 = new VAOnePole(sampleRate);\n\t\tLPF4 = new VAOnePole(sampleRate);\n\t\t\n\t\tsaturation = 1.0;\n\t\tQ = 3.0;\n\t\t\n\t\tSetCutoff(1000.f);\n\t\tSetResonance(0.1f);\n\t}\n\t\n\tvirtual ~OberheimVariationMoog()\n\t{\n\t\tdelete LPF1;\n\t\tdelete LPF2;\n\t\tdelete LPF3;\n\t\tdelete LPF4;\n\t}\n\t\n\tvirtual void Process(float * samples, uint32_t n) noexcept override\n\t{\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tfloat input = samples[s];\n\t\t\t\n\t\t\tdouble sigma =\n\t\t\t\tLPF1->GetFeedbackOutput() +\n\t\t\t\tLPF2->GetFeedbackOutput() +\n\t\t\t\tLPF3->GetFeedbackOutput() +\n\t\t\t\tLPF4->GetFeedbackOutput();\n\t\t\t\n\t\t\tinput *= 1.0 + K;\n\t\t\t\n\t\t\t// calculate input to first filter\n\t\t\tdouble u = (input - K * sigma) * alpha0;\n\t\t\t\n\t\t\tu = tanh(saturation * u);\n\t\t\t\n\t\t\tdouble stage1 = LPF1->Tick(u);\n\t\t\tdouble stage2 = LPF2->Tick(stage1);\n\t\t\tdouble stage3 = LPF3->Tick(stage2);\n\t\t\tdouble stage4 = LPF4->Tick(stage3);\n\t\t\t\n\t\t\t// Oberheim variations\n\t\t\tsamples[s] =\n\t\t\t\toberheimCoefs[0] * u +\n\t\t\t\toberheimCoefs[1] * stage1 +\n\t\t\t\toberheimCoefs[2] * stage2 +\n\t\t\t\toberheimCoefs[3] * stage3 +\n\t\t\t\toberheimCoefs[4] * stage4;\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n        {\n             // this maps resonance = 1->10 to K = 0 -> 4\n             K = (4.0) * (r - 1.0)/(10.0 - 1.0);\n        }\n\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c;\n\t\t\n\t\t// prewarp for BZT\n\t\tdouble wd = 2.0 * MOOG_PI * cutoff;\n\t\tdouble T = 1.0 / sampleRate;\n\t\tdouble wa = (2.0 / T) * tan(wd * T / 2.0);\n\t\tdouble g = wa * T / 2.0;\n\t\t\n\t\t// Feedforward coeff\n\t\tdouble G = g / (1.0 + g);\n\t\t\n\t\tLPF1->SetAlpha(G);\n\t\tLPF2->SetAlpha(G);\n\t\tLPF3->SetAlpha(G);\n\t\tLPF4->SetAlpha(G);\n\n\t\tLPF1->SetBeta(G*G*G / (1.0 + g));\n\t\tLPF2->SetBeta(G*G / (1.0 + g));\n\t\tLPF3->SetBeta(G / (1.0 + g));\n\t\tLPF4->SetBeta(1.0 / (1.0 + g));\n\t\t\n\t\tgamma = G*G*G*G;\n\t\talpha0 = 1.0 / (1.0 + K * gamma);\n\t\t\n\t\t// Oberheim variations / LPF4\n\t\toberheimCoefs[0] = 0.0;\n\t\toberheimCoefs[1] = 0.0;\n\t\toberheimCoefs[2] = 0.0;\n\t\toberheimCoefs[3] = 0.0;\n\t\toberheimCoefs[4] = 1.0;\n\t}\n\t\nprivate:\n\t\n\tVAOnePole * LPF1;\n\tVAOnePole * LPF2;\n\tVAOnePole * LPF3;\n\tVAOnePole * LPF4;\n\t\n\tdouble K;\n\tdouble gamma;\n\tdouble alpha0;\n\tdouble Q;\n\tdouble saturation;\n\t\n\tdouble oberheimCoefs[5];\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/RKSimulationModel.h",
    "content": "/*\nCopyright (c) 2015, Miller Puckette. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#pragma once\n\n#ifndef RK_SIMULATION_LADDER_H\n#define RK_SIMULATION_LADDER_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\n/*\nImitates a Moog resonant filter by Runge-Kutte numerical integration of\na differential equation approximately describing the dynamics of the circuit.\n \nUseful references:\n\n\t* Tim Stilson\n\t\"Analyzing the Moog VCF with Considerations for Digital Implementation\"\n\t\tSections 1 and 2 are a reasonably good introduction but the \n\t\tmodel they use is highly idealized.\n\n\t* Timothy E. Stinchcombe\n\t\"Analysis of the Moog Transistor Ladder and Derivative Filters\"\n\t\tLong, but a very thorough description of how the filter works including\n\t\tits nonlinearities\n\n\t* Antti Huovilainen\n\t\"Non-linear digital implementation of the moog ladder filter\"\n\t\tComes close to giving a differential equation for a reasonably realistic\n\t\tmodel of the filter\n\nThe differential equations are:\n\n\ty1' = k * (S(x - r * y4) - S(y1))\n\ty2' = k * (S(y1) - S(y2))\n\ty3' = k * (S(y2) - S(y3))\n\ty4' = k * (S(y3) - S(y4))\n\nwhere k controls the cutoff frequency, r is feedback (<= 4 for stability), and S(x) is a saturation function.\n*/\n\nclass RKSimulationMoog : public LadderFilterBase\n{\n\t\npublic:\n\t\n\tRKSimulationMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tmemset(state, 0, sizeof(state));\n\t\t\n\t\tsaturation = 3.0;\n\t\tsaturationInv = 1.0 / saturation;\n\t\t\n\t\toversampleFactor = 1;\n\t\t\n\t\tstepSize = 1.0 / (oversampleFactor * sampleRate);\n\t\t\n\t\tSetCutoff(1000.f);\n\t\tSetResonance(1.0f);\n\t}\n\t\n\tvirtual ~RKSimulationMoog()\n\t{\n\t}\n\t\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tfor (int j = 0; j < oversampleFactor; j++)\n\t\t\t{\n\t\t\t\trungekutteSolver(samples[s], state);\n\t\t\t}\n\t\t\t\n\t\t\tsamples[s] = state[3];\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\t// 0 to 10\n\t\tresonance = r;\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = (2.0 * MOOG_PI * c);\n\t}\n\t\nprivate:\n\t\n\tvoid calculateDerivatives(float input, double * dstate, double * state)\n\t{\n\t\tdouble satstate0 = clip(state[0], saturation, saturationInv);\n\t\tdouble satstate1 = clip(state[1], saturation, saturationInv);\n\t\tdouble satstate2 = clip(state[2], saturation, saturationInv);\n\t\t\n\t\tdstate[0] = cutoff * (clip(input - resonance * state[3], saturation, saturationInv) - satstate0);\n\t\tdstate[1] = cutoff * (satstate0 - satstate1);\n\t\tdstate[2] = cutoff * (satstate1 - satstate2);\n\t\tdstate[3] = cutoff * (satstate2 - clip(state[3], saturation, saturationInv));\n\t}\n\n\tvoid rungekutteSolver(float input, double * state)\n\t{\n\t\tint i;\n\t\tdouble deriv1[4], deriv2[4], deriv3[4], deriv4[4], tempState[4];\n\t\t\n\t\tcalculateDerivatives(input, deriv1, state);\n\t\t\n\t\tfor (i = 0; i < 4; i++)\n\t\t\ttempState[i] = state[i] + 0.5 * stepSize * deriv1[i];\n\t\t\n\t\tcalculateDerivatives(input, deriv2, tempState);\n\t\t\n\t\tfor (i = 0; i < 4; i++)\n\t\t\ttempState[i] = state[i] + 0.5 * stepSize * deriv2[i];\n\t\t\n\t\tcalculateDerivatives(input, deriv3, tempState);\n\t\t\n\t\tfor (i = 0; i < 4; i++)\n\t\t\ttempState[i] = state[i] + stepSize * deriv3[i];\n\t\t\n\t\tcalculateDerivatives(input, deriv4, tempState);\n\t\t\n\t\tfor (i = 0; i < 4; i++)\n\t\t\tstate[i] += (1.0 / 6.0) * stepSize * (deriv1[i] + 2.0 * deriv2[i] + 2.0 * deriv3[i] + deriv4[i]);\n\t}\n\t\n\tdouble state[4];\n\tdouble saturation, saturationInv;\n\tint oversampleFactor;\n\tdouble stepSize;\n\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/SimplifiedModel.h",
    "content": "/* -------------------------------------------------------------------------\n * This source code is provided without any warranties as published in \n * DAFX book 2nd edition, copyright Wiley & Sons 2011, available at \n * http://www.dafx.de. It may be used for educational purposes and not \n * for commercial applications without further permission.\n * -------------------------------------------------------------------------\n */\n\n#pragma once\n\n#ifndef SIMPLIFIED_LADDER_H\n#define SIMPLIFIED_LADDER_H\n\n#include \"LadderFilterBase.h\"\n\n/*\nThe simplified nonlinear Moog filter is based on the full Huovilainen model,\nwith five nonlinear (tanh) functions (4 first-order sections and a feedback).\nLike the original, this model needs an oversampling factor of at least two when\nthese nonlinear functions are used to reduce possible aliasing. This model\nmaintains the ability to self oscillate when the feedback gain is >= 1.0.\n\nReferences: DAFX - Zolzer (ed) (2nd ed)\nOriginal implementation: Valimaki, Bilbao, Smith, Abel, Pakarinen, Berners (DAFX)\nThis is a transliteration into C++ of the original matlab source (moogvcf.m)\n\nConsiderations for oversampling:\nhttp://music.columbia.edu/pipermail/music-dsp/2005-February/062778.html\nhttp://www.synthmaker.co.uk/dokuwiki/doku.php?id=tutorials:oversampling\n*/\n\nclass SimplifiedMoog : public LadderFilterBase\n{\npublic:\n\t\n\tSimplifiedMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\t// To keep the overall level approximately constant, comp should be set\n\t\t// to 0.5 resulting in a 6 dB passband gain decrease at the maximum resonance\n\t\t// (compared to a 12 dB decrease in the original Moog model\n\t\tgainCompensation = 0.5;\n\t\t\n\t\tmemset(stage, 0, sizeof(stage));\n\t\tmemset(stageZ1, 0, sizeof(stageZ1));\n\t\tmemset(stageTanh, 0, sizeof(stageTanh));\n\t\t\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.10f);\n\t}\n\t\n\tvirtual ~SimplifiedMoog()\n\t{\n\t\t\n\t}\n\t\n\t// This system is nonlinear so we are probably going to create a signal with components that exceed nyquist.\n\t// To prevent aliasing distortion, we need to oversample this processing chunk. Where do these extra samples\n\t// come from? Todo! We can use polynomial interpolation to generate the extra samples, but this is expensive.\n\t// The cheap solution is to zero-stuff the incoming sample buffer.\n\t// With resampling, numSamples should be 2x the frame size of the existing sample rate.\n\t// The output of this filter needs to be run through a decimator to return to the original samplerate.\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\t// Processing still happens at sample rate...\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\tfor (int stageIdx = 0; stageIdx < 4; ++stageIdx)\n\t\t\t{\n\t\t\t\tif (stageIdx)\n\t\t\t\t{\n\t\t\t\t\tinput = stage[stageIdx-1];\n\t\t\t\t\tstageTanh[stageIdx-1] = tanh(input);\n\t\t\t\t\tstage[stageIdx] = (h * stageZ1[stageIdx] + h0 * stageTanh[stageIdx-1]) + (1.0 - g) * (stageIdx != 3 ? stageTanh[stageIdx] : tanh(stageZ1[stageIdx]));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinput = samples[s] - ((4.0 * resonance) * (output - gainCompensation * samples[s]));\n\t\t\t\t\tstage[stageIdx] = (h * tanh(input) + h0 * stageZ1[stageIdx]) + (1.0 - g) * stageTanh[stageIdx];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstageZ1[stageIdx] = stage[stageIdx];\n\t\t\t}\n\t\t\t\n\t\t\toutput = stage[3];\n\t\t\tSNAP_TO_ZERO(output);\n\t\t\tsamples[s] = output;\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tresonance = r;\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c;\n\t\t\n\t\t// Not being oversampled at the moment... * 2 when functional\n\t\tfloat fs2 = sampleRate;\n\t\t\n\t\t// Normalized cutoff [0, 1] in radians: ((2*pi) * cutoff / samplerate)\n\t\tg = (2 * MOOG_PI) * cutoff / fs2; // feedback coefficient at fs*2 because of doublesampling\n\t\tg *= MOOG_PI / 1.3; // correction factor that allows _cutoff to be supplied Hertz\n\t\t\n\t\t// FIR part with gain g\n\t\th = g / 1.3;\n\t\th0 = g * 0.3 / 1.3;\n\t}\n\t\nprivate:\n\t\n\tdouble output;\n\tdouble lastStage;\n\t\n\tdouble stage[4];\n\tdouble stageZ1[4];\n\tdouble stageTanh[3];\n\t\n\tdouble input;\n\tdouble h;\n\tdouble h0;\n\tdouble g;\n\t\n\tfloat gainCompensation;\n};\n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/StilsonModel.h",
    "content": "// Copyright (c) 2003, David Lowenfels\n// Released as the moog~ pd extern.\n\n// This code is Unlicensed (i.e. public domain); in an email exchange on\n// 6.14.2019 David Lowenfels stated \"You're welcome to use the Moog~ code, \n// license it free as in beer or whatever :)\"\n\n#pragma once\n\n#ifndef STILSON_LADDER_H\n#define STILSON_LADDER_H\n\n#include \"LadderFilterBase.h\"\n\n/*\nA digital model of the classic Moog filter was presented first by Stilson and\nSmith. This model uses a cascade of one-pole IIR filters in series with a global\nfeedback to produce resonance. A digital realization of this filter introduces a\nunit delay, effectively making it a fifth-order filter. Unfortunately, this\ndelay also has the effect of coupling the cutoff and resonance parameters,\nuncharacteristic of the uncoupled control of the original Moog ladder. As a\ncompromise, a zero can be inserted at z = -0.3 inside each one pole section to\nminimize the coupling the parameters (humans are not particularly sensitive to\nvariations in Q factor). Although fast coefficient updates can be achieved since\nthe nonlinearities of the Moog are not considered, the filter becomes unstable\nwith very large resonance values and does not enter self-oscillation.\n\nReferences: Stilson and Smith (1996), DAFX - Zolzer (ed) (2nd ed)\nOriginal implementation: Tim Stilson, David Lowenfels\n*/\n\nstatic float S_STILSON_GAINTABLE[199] =\n{\n\t0.999969, 0.990082, 0.980347, 0.970764, 0.961304, 0.951996, 0.94281, 0.933777, 0.924866, 0.916077,\n\t0.90741, 0.898865, 0.890442, 0.882141 , 0.873962, 0.865906, 0.857941, 0.850067, 0.842346, 0.834686,\n\t0.827148, 0.819733, 0.812378, 0.805145, 0.798004, 0.790955, 0.783997, 0.77713, 0.770355, 0.763672,\n\t0.75708 , 0.75058, 0.744141, 0.737793, 0.731537, 0.725342, 0.719238, 0.713196, 0.707245, 0.701355,\n\t0.695557, 0.689819, 0.684174, 0.678558, 0.673035, 0.667572, 0.66217, 0.65686, 0.651581, 0.646393,\n\t0.641235, 0.636169, 0.631134, 0.62619, 0.621277, 0.616425, 0.611633, 0.606903, 0.602234, 0.597626,\n\t0.593048, 0.588531, 0.584045, 0.579651, 0.575287 , 0.570953, 0.566681, 0.562469, 0.558289, 0.554169,\n\t0.550079, 0.546051, 0.542053, 0.538116, 0.53421, 0.530334, 0.52652, 0.522736, 0.518982, 0.515289,\n\t0.511627, 0.507996 , 0.504425, 0.500885, 0.497375, 0.493896, 0.490448, 0.487061, 0.483704, 0.480377,\n\t0.477081, 0.473816, 0.470581, 0.467377, 0.464203, 0.46109, 0.457977, 0.454926, 0.451874, 0.448883,\n\t0.445892, 0.442932, 0.440033, 0.437134, 0.434265, 0.431427, 0.428619, 0.425842, 0.423096, 0.42038,\n\t0.417664, 0.415009, 0.412354, 0.409729, 0.407135, 0.404572, 0.402008, 0.399506, 0.397003, 0.394501,\n\t0.392059, 0.389618, 0.387207, 0.384827, 0.382477, 0.380127, 0.377808, 0.375488, 0.37323, 0.370972,\n\t0.368713, 0.366516, 0.364319, 0.362122, 0.359985, 0.357849, 0.355713, 0.353607, 0.351532, 0.349457,\n\t0.347412, 0.345398, 0.343384, 0.34137, 0.339417, 0.337463, 0.33551, 0.333588, 0.331665, 0.329773,\n\t0.327911, 0.32605, 0.324188, 0.322357, 0.320557, 0.318756, 0.316986, 0.315216, 0.313446, 0.311707,\n\t0.309998, 0.308289, 0.30658, 0.304901, 0.303223, 0.301575, 0.299927, 0.298309, 0.296692, 0.295074,\n\t0.293488, 0.291931, 0.290375, 0.288818, 0.287262, 0.285736, 0.284241, 0.282715, 0.28125, 0.279755,\n\t0.27829, 0.276825, 0.275391, 0.273956, 0.272552, 0.271118, 0.269745, 0.268341, 0.266968, 0.265594,\n\t0.264252, 0.262909, 0.261566, 0.260223, 0.258911, 0.257599, 0.256317, 0.255035, 0.25375\n};\n\nclass StilsonMoog : public LadderFilterBase\n{\npublic:\n\t\n\tStilsonMoog(float sampleRate) : LadderFilterBase(sampleRate)\n\t{\n\t\tmemset(state, 0, sizeof(state));\n\t\tSetCutoff(1000.0f);\n\t\tSetResonance(0.10f);\n\t}\n\t\n\tvirtual ~StilsonMoog()\n\t{\n\t\t\n\t}\n\t\n\tvirtual void Process(float * samples, uint32_t n) override\n\t{\n\t\tfloat localState;\n\t\t\n\t\tfor (int s = 0; s < n; ++s)\n\t\t{\n\t\t\t// Scale by arbitrary value on account of our saturation function\n\t\t\tconst float input = samples[s] * 0.65f;\n\t\t\t\n\t\t\t// Negative Feedback\n\t\t\toutput = 0.25 * (input - output);\n\t\t\t\n\t\t\tfor (int pole = 0; pole < 4; ++pole)\n\t\t\t{\n\t\t\t\tlocalState = state[pole];\n\t\t\t\toutput = moog_saturate(output + p * (output - localState));\n\t\t\t\tstate[pole] = output;\n\t\t\t\toutput = moog_saturate(output + localState);\n\t\t\t}\n\t\t\t\n\t\t\tSNAP_TO_ZERO(output);\n\t\t\tsamples[s] = output;\n\t\t\toutput *= Q; // Scale stateful output by Q\n\t\t}\n\t}\n\t\n\tvirtual void SetResonance(float r) override\n\t{\n\t\tr = moog_min(r, 1);\n\t\tresonance = r;\n\t\t\n\t\tdouble ix;\n\t\tdouble ixfrac;\n\t\tint ixint;\n\t\t\n\t\tix = p * 99;\n\t\tixint = floor(ix);\n\t\tixfrac = ix - ixint;\n\t\t\n\t\tQ = r * moog_lerp(ixfrac, S_STILSON_GAINTABLE[ixint + 99], S_STILSON_GAINTABLE[ixint + 100]);\n\t}\n\t\n\tvirtual void SetCutoff(float c) override\n\t{\n\t\tcutoff = c;\n\t\t\n\t\t// Normalized cutoff between [0, 1]\n\t\tdouble fc = (cutoff) / sampleRate;\n\t\tdouble x2 = fc * fc;\n\t\tdouble x3 = fc * fc * fc;\n\t\t\n\t\t// Frequency & amplitude correction (Cubic Fit)\n\t\tp = -0.69346 * x3 - 0.59515 * x2 + 3.2937 * fc - 1.0072;\n\t\t\n\t\tSetResonance(resonance);\n\t}\n\t\nprivate:\n\t\n\tdouble p;\n\tdouble Q; \n\tdouble state[4];\n\tdouble output; \n}; \n\n#endif\n"
  },
  {
    "path": "lib/MoogLadders/src/Util.h",
    "content": "#pragma once\n\n#ifndef MOOG_UTIL_H\n#define MOOG_UTIL_H\n\n#include <cmath>\n#include <stdint.h>\n\n#define MOOG_E         2.71828182845904523536028747135266250\n#define MOOG_LOG2E     1.44269504088896340735992468100189214\n#define MOOG_LOG10E    0.434294481903251827651128918916605082\n#define MOOG_LN2       0.693147180559945309417232121458176568\n#define MOOG_LN10      2.30258509299404568401799145468436421\n#define MOOG_PI        3.14159265358979323846264338327950288\n#define MOOG_PI_2      1.57079632679489661923132169163975144\n#define MOOG_PI_4      0.785398163397448309615660845819875721\n#define MOOG_1_PI      0.318309886183790671537767526745028724\n#define MOOG_2_PI      0.636619772367581343075535053490057448\n#define MOOG_2_SQRTPI  1.12837916709551257389615890312154517\n#define MOOG_SQRT2     1.41421356237309504880168872420969808\n#define MOOG_SQRT1_2   0.707106781186547524400844362104849039\n#define MOOG_INV_PI_2  0.159154943091895\n\n#define NO_COPY(C) C(const C &) = delete; C & operator = (const C &) = delete\n#define NO_MOVE(C) NO_COPY(C); C(C &&) = delete; C & operator = (const C &&) = delete\n\n#define SNAP_TO_ZERO(n)    if (! (n < -1.0e-8 || n > 1.0e-8)) n = 0;\n\n// Linear interpolation, used to crossfade a gain table\ninline float moog_lerp(float amount, float a, float b)\n{\n\treturn (1.0f - amount) * a + amount * b;\n}\n\ninline float moog_min(float a, float b)\n{\n\ta = b - a;\n\ta += fabs(a);\n\ta *= 0.5f;\n\ta = b - a;\n\treturn a;\n}\n\n// Clamp without branching\n// If input - _limit < 0, then it really substracts, and the 0.5 to make it half the 2 inputs.\n// If > 0 then they just cancel, and keeps input normal.\n// The easiest way to understand it is check what happends on both cases.\ninline float moog_saturate(float input)\n{\n\tfloat x1 = fabs(input + 0.95f);\n\tfloat x2 = fabs(input - 0.95f);\n\treturn 0.5f * (x1 - x2);\n}\n\n// Imitate the (tanh) clipping function of a transistor pair.\n// to 4th order, tanh is x - x*x*x/3; this cubic's\n// plateaus are at +/- 1 so clip to 1 and evaluate the cubic.\n// This is pretty coarse - for instance if you clip a sinusoid this way you\n// can sometimes hear the discontinuity in 4th derivative at the clip point\ninline float clip(float value, float saturation, float saturationinverse)\n{\n\tfloat v2 = (value * saturationinverse > 1 ? 1 :\n\t\t\t\t(value * saturationinverse < -1 ? -1:\n\t\t\t\t value * saturationinverse));\n\treturn (saturation * (v2 - (1./3.) * v2 * v2 * v2));\n}\n\n#define HZ_TO_RAD(f) (MOOG_PI_2 * f)\n#define RAD_TO_HZ(omega) (MOOG_INV_PI_2 * omega)\n\n#ifdef __GNUC__\n\t#define ctz(N) __builtin_ctz(N)\n#else\n\ttemplate<typename T>\n\tinline int ctz(T x)\n\t{\n\t\tint p, b;\n\t\tfor (p = 0, b = 1; !(b & x); b <<= 1, ++p)\n\t\t\t;\n\t\treturn p;\n\t}\n#endif\n\ninline double fast_tanh(double x) \n{\n\tdouble x2 = x * x;\n\treturn x * (27.0 + x2) / (27.0 + 9.0 * x2);\n}\n\n#endif\n"
  },
  {
    "path": "lib/SAM/README.md",
    "content": "https://github.com/s-macke/SAM\n\nSAM\n===\n\nSoftware Automatic Mouth - Tiny Speech Synthesizer \n\n\nWhat is SAM?\n============\n\nSam is a very small Text-To-Speech (TTS) program written in C, that runs on most popular platforms.\nIt is an adaption to C of the speech software SAM (Software Automatic Mouth) for the Commodore C64 published \nin the year 1982 by Don't Ask Software (now SoftVoice, Inc.). It includes a Text-To-Phoneme converter called reciter and a Phoneme-To-Speech routine for the \nfinal output. It is so small that it will work also on embedded computers. On my computer it takes\nless than 39KB (much smaller on embedded devices as the executable-overhead is not necessary) of disk space and is a fully stand alone program. \nFor immediate output it uses the SDL-library, otherwise it can save .wav files. \n\nAn online version and executables for Windows can be found on the web site: http://simulationcorner.net/index.php?page=sam\n\nCompile\n=======\n\nSimply type \"make\" in your command prompt.\nIn order to compile without SDL remove the SDL statements from the CFLAGS and LFLAGS variables in the file \"Makefile\".\n\nIt should compile on every UNIX-like operating system. For Windows you need Cygwin or MinGW( + libsdl).\n\nFork\n====\n\nTake a look at https://github.com/vidarh/SAM for a more refactored and cleaner version of the code.\n\nUsage\n=====\n\ntype\n\n\t./sam I am Sam\n\nfor the first output.\n\nIf you have disabled SDL try\n\n\t./sam -wav i_am_sam.wav I am Sam\n\nto get a wav file. This file can be played by many media players available for the PC.\n\nyou can try other options like\n\t-pitch number\n\t-speed number\n\t-throat number\n\t-mouth number\n\nSome typical values written in the original manual are:\n\n\tDESCRIPTION          SPEED     PITCH     THROAT    MOUTH\n\tElf                   72        64        110       160\n\tLittle Robot          92        60        190       190\n\tStuffy Guy            82        72        110       105\n\tLittle Old Lady       82        32        145       145\n\tExtra-Terrestrial    100        64        150       200\n\tSAM                   72        64        128       128\n\n\nIt can even sing\nlook at the file \"sing\"\nfor a small example.\n\nFor the phoneme input table look in the Wiki.\n\n\nA description of additional features can be found in the original manual at\n\thttp://www.retrobits.net/atari/sam.shtml\nor in the manual of the equivalent Apple II program\n\thttp://www.apple-iigs.info/newdoc/sam.pdf\n\n\nAdaption To C\n=============\n\nThis program (disassembly at http://hitmen.c02.at/html/tools_sam.html) was converted semi-automatic into C by converting each assembler opcode.\ne. g. \n\n\tlda 56\t\t=>\tA = mem[56];\n\tjmp 38018  \t=>\tgoto pos38018;\n\tinc 38\t\t=>\tmem[38]++;\n\t.\t\t\t.\n\t.\t\t\t.\n\nThen it was manually rewritten to remove most of the \njumps and register variables in the code and rename the variables to proper names. \nMost of the description below is a result of this rewriting process.\n\nUnfortunately it is still unreadable. But you should see from where I started :)\n\n\nShort description\n=================\n\nFirst of all I will limit myself here to a very coarse description. \nThere are very many exceptions defined in the source code that I will not explain. \nAlso a lot of code is unknown for me e. g. Code47503. \nFor a complete understanding of the code I need more time and especially more eyes have a look on the code. \n\nReciter\n-------\n\nIt changes the english text to phonemes by a ruleset shown in the wiki.\n\nThe rule\n\t\" ANT(I)\",\t\"AY\",\nmeans that if he find an \"I\" with previous letters \" ANT\", exchange the I by the phoneme \"AY\".\n\nThere are some special signs in this rules like\n\t#\n\t&\n\t@\n\t^\n\t+\n\t:\n\t%\nwhich can mean e. g. that there must be a vocal or a consonant or something else. \n\nWith the -debug option you will get the corresponding rules and the resulting phonemes.\n\n\nOutput\n------\n\nHere is the full tree of subroutine calls:\n\nSAMMain()\n\tParser1()\n\tParser2()\n\t\tInsert()\n\tCopyStress()\n\tSetPhonemeLength()\n\tCode48619()\n\tCode41240()\n\t\tInsert()\n\tCode48431()\n\t\tInsert()\n\t\t\n\tCode48547\n\t\tCode47574\n\t\t\tSpecial1\n\t\t\tCode47503\n\t\t\tCode48227\n\n\nSAMMain() is the entry routine and calls all further routines. \nParser1 transforms the phoneme input and transforms it to three tables\n\tphonemeindex[]\n\tstress[]\n\tphonemelength[] (zero at this moment)\n\t\nThis tables are now changed: \n\nParser2 exchanges some phonemes by others and inserts new. \nCopyStress adds 1 to the stress under some circumstances\nSetPhonemeLength sets phoneme lengths. \nCode48619 changes the phoneme lengths\nCode41240 adds some additional phonemes\nCode48431 has some extra rules\n\n\nThe wiki shows all possible phonemes and some flag fields.  \nThe final content of these tables can be seen with the -debug command.\n\n\nIn the function PrepareOutput() these tables are partly copied into the small tables:\n\tphonemeindexOutput[]\n\tstressOutput[]\n\tphonemelengthOutput[]\nfor output.\n\nFinal Output\n------------\n\nExcept of some special phonemes the output is build by a linear combination:\n\t\n\tA =   A1 * sin ( f1 * t ) +\n\t      A2 * sin ( f2 * t ) +\n\t      A3 * rect( f3 * t )\n\nwhere rect is a rectangular function with the same periodicity like sin. \nIt seems really strange, but this is really enough for most types of phonemes. \n\nTherefore the above phonemes are converted with some tables to \n\tpitches[]\n\tfrequency1[]  =  f1\n\tfrequency2[]  =  f2\n\tfrequency3[]  =  f3\n\tamplitude1[]  =  A1\n\tamplitude2[]  =  A2\n\tamplitude3[]  =  A3\n\t\nAbove formula is calculated in one very good omptimized routine.\nIt only consist of 26 commands:\n\n    48087: \tLDX 43\t\t; get phase\t\n    CLC\t\t\n\tLDA 42240,x\t; load sine value (high 4 bits)\n\tORA TabAmpl1,y\t; get amplitude (in low 4 bits)\n\tTAX\t\t\n\tLDA 42752,x\t; multiplication table\n\tSTA 56\t\t; store \n\n\tLDX 42\t\t; get phase\n\tLDA 42240,x\t; load sine value (high 4 bits)\n\tORA TabAmpl2,y\t; get amplitude (in low 4 bits)\n\tTAX\t\t\n\tLDA 42752,x\t; multiplication table\n\tADC Var56\t; add with previous values\n\tSTA 56\t\t; and store\n\n\tLDX 41\t\t; get phase\n\tLDA 42496,x\t; load rect value (high 4 bits)\n\tORA TabAmpl3,y\t; get amplitude (in low 4 bits)\n\tTAX\t\t\n\tLDA 42752,x\t; multiplication table\n\tADC 56\t\t; add with previous values\n\n\tADC #136\t\t\n\tLSR A\t\t; get highest 4 bits\n\tLSR A\t\t\n\tLSR A\t\t\n\tLSR A\t\t\n\tSTA 54296\t;SID   main output command\n\n\nThe rest is handled in a special way. At the moment I cannot figure out in which way. \nBut it seems that it uses some noise (e. g. for \"s\") using a table with random values. \n\nLicense\n=======\n\nThe software is a reverse-engineered version of a software \npublished more than 34 years ago by \"Don't ask Software\".\n\nThe company no longer exists. Any attempt to contact the original\nauthors failed. Hence S.A.M. can be best described as Abandonware\n(http://en.wikipedia.org/wiki/Abandonware)\n\nAs long this is the case I cannot put my code under any specific open\nsource software license. However the software might be used under the\n\"Fair Use\" act (https://en.wikipedia.org/wiki/FAIR_USE_Act) in the USA.\n\nContact\n=======\n\nIf you have questions don' t hesitate to ask me.\nIf you discovered some new knowledge about the code please mail me.\n\nSebastian Macke\nEmail: sebastian@macke.de\n"
  },
  {
    "path": "lib/SAM/ReciterTabs.h",
    "content": "#ifndef RECITERTABS_H\n#define RECITERTABS_H\n\n//some flags\nconst unsigned char tab36376[] =\n{\n    0, 0, 0, 0, 0, 0, 0, 0, // 0-7\n    0, 0, 0, 0, 0, 0, 0, 0, // 8-15\n    0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0, 0,\n    0, 2, 2, 2, 2, 2, 2, 130, // ' ', '!'\n    0, 0, 2, 2, 2, 2, 2, 2,\n    3, 3, 3, 3, 3, 3, 3, 3,\n    3, 3, 2, 2, 2, 2, 2, 2,\n    2, 192, 168, 176, 172, 192, 160, 184, // '@', 'A'\n    160, 192, 188, 160, 172, 168, 172, 192,\n    160, 160, 172, 180, 164, 192, 168, 168,\n    176, 192, 188, 0, 0, 0, 2, 0, // 'X', 'Y', 'Z', '[',\n    32, 32, 155, 32, 192, 185, 32, 205,\n    163, 76, 138, 142\n};\n\nconst unsigned char rules[] =\n{\n']','A'|0x80,\n' ','(','A','.',')',                    '=','E','H','4','Y','.',' '|0x80,\n'(','A',')',' ',                        '=','A','H'|0x80,\n' ','(','A','R','E',')',' ',            '=','A','A','R'|0x80,\n' ','(','A','R',')','O',                '=','A','X','R'|0x80,\n'(','A','R',')','#',                    '=','E','H','4','R'|0x80,\n' ','^','(','A','S',')','#',            '=','E','Y','4','S'|0x80,\n'(','A',')','W','A',                    '=','A','X'|0x80,\n'(','A','W',')',                        '=','A','O','5'|0x80,\n' ',':','(','A','N','Y',')',            '=','E','H','4','N','I','Y'|0x80,\n'(','A',')','^','+','#',                '=','E','Y','5'|0x80,\n'#',':','(','A','L','L','Y',')',        '=','U','L','I','Y'|0x80,\n' ','(','A','L',')','#',                '=','U','L'|0x80,\n'(','A','G','A','I','N',')',            '=','A','X','G','E','H','4','N'|0x80,\n'#',':','(','A','G',')','E',            '=','I','H','J'|0x80,\n'(','A',')','^','%',                    '=','E','Y'|0x80,\n'(','A',')','^','+',':','#',            '=','A','E'|0x80,\n' ',':','(','A',')','^','+',' ',        '=','E','Y','4'|0x80,\n' ','(','A','R','R',')',                '=','A','X','R'|0x80,\n'(','A','R','R',')',                    '=','A','E','4','R'|0x80,\n' ','^','(','A','R',')',' ',            '=','A','A','5','R'|0x80,\n'(','A','R',')',                        '=','A','A','5','R'|0x80,\n'(','A','I','R',')',                    '=','E','H','4','R'|0x80,\n'(','A','I',')',                        '=','E','Y','4'|0x80,\n'(','A','Y',')',                        '=','E','Y','5'|0x80,\n'(','A','U',')',                        '=','A','O','4'|0x80,\n'#',':','(','A','L',')',' ',            '=','U','L'|0x80,\n'#',':','(','A','L','S',')',' ',        '=','U','L','Z'|0x80,\n'(','A','L','K',')',                    '=','A','O','4','K'|0x80,\n'(','A','L',')','^',                    '=','A','O','L'|0x80,\n' ',':','(','A','B','L','E',')',        '=','E','Y','4','B','U','L'|0x80,\n'(','A','B','L','E',')',                '=','A','X','B','U','L'|0x80,\n'(','A',')','V','O',                    '=','E','Y','4'|0x80,\n'(','A','N','G',')','+',                '=','E','Y','4','N','J'|0x80,\n'(','A','T','A','R','I',')',            '=','A','H','T','A','A','4','R','I','Y'|0x80,\n'(','A',')','T','O','M',                '=','A','E'|0x80,\n'(','A',')','T','T','I',                '=','A','E'|0x80,\n' ','(','A','T',')',' ',                '=','A','E','T'|0x80,\n' ','(','A',')','T',                    '=','A','H'|0x80,\n'(','A',')',                            '=','A','E'|0x80,\n\n']','B'|0x80,\n' ','(','B',')',' ',                    '=','B','I','Y','4'|0x80,\n' ','(','B','E',')','^','#',            '=','B','I','H'|0x80,\n'(','B','E','I','N','G',')',            '=','B','I','Y','4','I','H','N','X'|0x80,\n' ','(','B','O','T','H',')',' ',        '=','B','O','W','4','T','H'|0x80,\n' ','(','B','U','S',')','#',            '=','B','I','H','4','Z'|0x80,\n'(','B','R','E','A','K',')',            '=','B','R','E','Y','5','K'|0x80,\n'(','B','U','I','L',')',                '=','B','I','H','4','L'|0x80,\n'(','B',')',                            '=','B'|0x80,\n\n']','C'|0x80,\n' ','(','C',')',' ',                    '=','S','I','Y','4'|0x80,\n' ','(','C','H',')','^',                '=','K'|0x80,\n'^','E','(','C','H',')',                '=','K'|0x80,\n'(','C','H','A',')','R','#',            '=','K','E','H','5'|0x80,\n'(','C','H',')',                        '=','C','H'|0x80,\n' ','S','(','C','I',')','#',            '=','S','A','Y','4'|0x80,\n'(','C','I',')','A',                    '=','S','H'|0x80,\n'(','C','I',')','O',                    '=','S','H'|0x80,\n'(','C','I',')','E','N',                '=','S','H'|0x80,\n'(','C','I','T','Y',')',                '=','S','I','H','T','I','Y'|0x80,\n'(','C',')','+',                        '=','S'|0x80,\n'(','C','K',')',                        '=','K'|0x80,\n'(','C','O','M','M','O','D','O','R','E',')','=','K','A','A','4','M','A','H','D','O','H','R'|0x80,\n'(','C','O','M',')',                    '=','K','A','H','M'|0x80,\n'(','C','U','I','T',')',                '=','K','I','H','T'|0x80,\n'(','C','R','E','A',')',                '=','K','R','I','Y','E','Y'|0x80,\n'(','C',')',                            '=','K'|0x80,\n\n']','D'|0x80,\n' ','(','D',')',' ',                    '=','D','I','Y','4'|0x80,\n' ','(','D','R','.',')',' ',            '=','D','A','A','4','K','T','E','R'|0x80,\n'#',':','(','D','E','D',')',' ',        '=','D','I','H','D'|0x80,\n'.','E','(','D',')',' ',                '=','D'|0x80,\n'#',':','^','E','(','D',')',' ',        '=','T'|0x80,\n' ','(','D','E',')','^','#',            '=','D','I','H'|0x80,\n' ','(','D','O',')',' ',                '=','D','U','W'|0x80,\n' ','(','D','O','E','S',')',            '=','D','A','H','Z'|0x80,\n'(','D','O','N','E',')',' ',            '=','D','A','H','5','N'|0x80,\n'(','D','O','I','N','G',')',            '=','D','U','W','4','I','H','N','X'|0x80,\n' ','(','D','O','W',')',                '=','D','A','W'|0x80,\n'#','(','D','U',')','A',                '=','J','U','W'|0x80,\n'#','(','D','U',')','^','#',            '=','J','A','X'|0x80,\n'(','D',')',                            '=','D'|0x80,\n\n']','E'|0x80,\n' ','(','E',')',' ',                    '=','I','Y','I','Y','4'|0x80,\n'#',':','(','E',')',' ','='|0x80,\n'\\'',':','^','(','E',')',' ','='|0x80,\n' ',':','(','E',')',' ',                '=','I','Y'|0x80,\n'#','(','E','D',')',' ',                '=','D'|0x80,\n'#',':','(','E',')','D',' ','='|0x80,\n'(','E','V',')','E','R',                '=','E','H','4','V'|0x80,\n'(','E',')','^','%',                    '=','I','Y','4'|0x80,\n'(','E','R','I',')','#',                '=','I','Y','4','R','I','Y'|0x80,\n'(','E','R','I',')',                    '=','E','H','4','R','I','H'|0x80,\n'#',':','(','E','R',')','#',            '=','E','R'|0x80,\n'(','E','R','R','O','R',')',            '=','E','H','4','R','O','H','R'|0x80,\n'(','E','R','A','S','E',')',            '=','I','H','R','E','Y','5','S'|0x80,\n'(','E','R',')','#',                    '=','E','H','R'|0x80,\n'(','E','R',')',                        '=','E','R'|0x80,\n' ','(','E','V','E','N',')',            '=','I','Y','V','E','H','N'|0x80,\n'#',':','(','E',')','W','='|0x80,\n'@','(','E','W',')',                    '=','U','W'|0x80,\n'(','E','W',')',                        '=','Y','U','W'|0x80,\n'(','E',')','O',                        '=','I','Y'|0x80,\n'#',':','&','(','E','S',')',' ',        '=','I','H','Z'|0x80,\n'#',':','(','E',')','S',' ','='|0x80,\n'#',':','(','E','L','Y',')',' ',        '=','L','I','Y'|0x80,\n'#',':','(','E','M','E','N','T',')',    '=','M','E','H','N','T'|0x80,\n'(','E','F','U','L',')',                '=','F','U','H','L'|0x80,\n'(','E','E',')',                        '=','I','Y','4'|0x80,\n'(','E','A','R','N',')',                '=','E','R','5','N'|0x80,\n' ','(','E','A','R',')','^',            '=','E','R','5'|0x80,\n'(','E','A','D',')',                    '=','E','H','D'|0x80,\n'#',':','(','E','A',')',' ',            '=','I','Y','A','X'|0x80,\n'(','E','A',')','S','U',                '=','E','H','5'|0x80,\n'(','E','A',')',                        '=','I','Y','5'|0x80,\n'(','E','I','G','H',')',                '=','E','Y','4'|0x80,\n'(','E','I',')',                        '=','I','Y','4'|0x80,\n' ','(','E','Y','E',')',                '=','A','Y','4'|0x80,\n'(','E','Y',')',                        '=','I','Y'|0x80,\n'(','E','U',')',                        '=','Y','U','W','5'|0x80,\n'(','E','Q','U','A','L',')',            '=','I','Y','4','K','W','U','L'|0x80,\n'(','E',')',                            '=','E','H'|0x80,\n\n']','F'|0x80,\n' ','(','F',')',' ',                    '=','E','H','4','F'|0x80,\n'(','F','U','L',')',                    '=','F','U','H','L'|0x80,\n'(','F','R','I','E','N','D',')',        '=','F','R','E','H','5','N','D'|0x80,\n'(','F','A','T','H','E','R',')',        '=','F','A','A','4','D','H','E','R'|0x80,\n'(','F',')','F','='|0x80,\n'(','F',')',                            '=','F'|0x80,\n\n']','G'|0x80,\n' ','(','G',')',' ',                    '=','J','I','Y','4'|0x80,\n'(','G','I','V',')',                    '=','G','I','H','5','V'|0x80,\n' ','(','G',')','I','^',                '=','G'|0x80,\n'(','G','E',')','T',                    '=','G','E','H','5'|0x80,\n'S','U','(','G','G','E','S',')',        '=','G','J','E','H','4','S'|0x80,\n'(','G','G',')',                        '=','G'|0x80,\n' ','B','#','(','G',')',                '=','G'|0x80,\n'(','G',')','+',                        '=','J'|0x80,\n'(','G','R','E','A','T',')',            '=','G','R','E','Y','4','T'|0x80,\n'(','G','O','N',')','E',                '=','G','A','O','5','N'|0x80,\n'#','(','G','H',')','='|0x80,\n' ','(','G','N',')',                    '=','N'|0x80,\n'(','G',')',                            '=','G'|0x80,\n\n']','H'|0x80,\n' ','(','H',')',' ',                    '=','E','Y','4','C','H'|0x80,\n' ','(','H','A','V',')',                '=','/','H','A','E','6','V'|0x80,\n' ','(','H','E','R','E',')',            '=','/','H','I','Y','R'|0x80,\n' ','(','H','O','U','R',')',            '=','A','W','5','E','R'|0x80,\n'(','H','O','W',')',                    '=','/','H','A','W'|0x80,\n'(','H',')','#',                        '=','/','H'|0x80,\n'(','H',')','='|0x80,\n\n']','I'|0x80,\n' ','(','I','N',')',                    '=','I','H','N'|0x80,\n' ','(','I',')',' ',                    '=','A','Y','4'|0x80,\n'(','I',')',' ',                        '=','A','Y'|0x80,\n'(','I','N',')','D',                    '=','A','Y','5','N'|0x80,\n'S','E','M','(','I',')',                '=','I','Y'|0x80,\n' ','A','N','T','(','I',')',            '=','A','Y'|0x80,\n'(','I','E','R',')',                    '=','I','Y','E','R'|0x80,\n'#',':','R','(','I','E','D',')',' ',    '=','I','Y','D'|0x80,\n'(','I','E','D',')',' ',                '=','A','Y','5','D'|0x80,\n'(','I','E','N',')',                    '=','I','Y','E','H','N'|0x80,\n'(','I','E',')','T',                    '=','A','Y','4','E','H'|0x80,\n'(','I','\\'',')',                        '=','A','Y','5'|0x80,\n' ',':','(','I',')','^','%',            '=','A','Y','5'|0x80,\n' ',':','(','I','E',')',' ',            '=','A','Y','4'|0x80,\n'(','I',')','%',                        '=','I','Y'|0x80,\n'(','I','E',')',                        '=','I','Y','4'|0x80,\n' ','(','I','D','E','A',')',            '=','A','Y','D','I','Y','5','A','H'|0x80,\n'(','I',')','^','+',':','#',            '=','I','H'|0x80,\n'(','I','R',')','#',                    '=','A','Y','R'|0x80,\n'(','I','Z',')','%',                    '=','A','Y','Z'|0x80,\n'(','I','S',')','%',                    '=','A','Y','Z'|0x80,\n'I','^','(','I',')','^','#',            '=','I','H'|0x80,\n'+','^','(','I',')','^','+',            '=','A','Y'|0x80,\n'#',':','^','(','I',')','^','+',        '=','I','H'|0x80,\n'(','I',')','^','+',                    '=','A','Y'|0x80,\n'(','I','R',')',                        '=','E','R'|0x80,\n'(','I','G','H',')',                    '=','A','Y','4'|0x80,\n'(','I','L','D',')',                    '=','A','Y','5','L','D'|0x80,\n' ','(','I','G','N',')',                '=','I','H','G','N'|0x80,\n'(','I','G','N',')',' ',                '=','A','Y','4','N'|0x80,\n'(','I','G','N',')','^',                '=','A','Y','4','N'|0x80,\n'(','I','G','N',')','%',                '=','A','Y','4','N'|0x80,\n'(','I','C','R','O',')',                '=','A','Y','4','K','R','O','H'|0x80,\n'(','I','Q','U','E',')',                '=','I','Y','4','K'|0x80,\n'(','I',')',                            '=','I','H'|0x80,\n\n']','J'|0x80,\n' ','(','J',')',' ',                    '=','J','E','Y','4'|0x80,\n'(','J',')',                            '=','J'|0x80,\n\n']','K'|0x80,\n' ','(','K',')',' ',                    '=','K','E','Y','4'|0x80,\n' ','(','K',')','N','='|0x80,\n'(','K',')',                            '=','K'|0x80,\n\n']','L'|0x80,\n' ','(','L',')',' ',                    '=','E','H','4','L'|0x80,\n'(','L','O',')','C','#',                '=','L','O','W'|0x80,\n'L','(','L',')','='|0x80,\n'#',':','^','(','L',')','%',            '=','U','L'|0x80,\n'(','L','E','A','D',')',                '=','L','I','Y','D'|0x80,\n' ','(','L','A','U','G','H',')',        '=','L','A','E','4','F'|0x80,\n'(','L',')',                            '=','L'|0x80,\n\n']','M'|0x80,\n' ','(','M',')',' ',                    '=','E','H','4','M'|0x80,\n' ','(','M','R','.',')',' ',            '=','M','I','H','4','S','T','E','R'|0x80,\n' ','(','M','S','.',')',                '=','M','I','H','5','Z'|0x80,\n' ','(','M','R','S','.',')',' ',        '=','M','I','H','4','S','I','X','Z'|0x80,\n'(','M','O','V',')',                    '=','M','U','W','4','V'|0x80,\n'(','M','A','C','H','I','N',')',        '=','M','A','H','S','H','I','Y','5','N'|0x80,\n'M','(','M',')','='|0x80,\n'(','M',')',                            '=','M'|0x80,\n\n']','N'|0x80,\n' ','(','N',')',' ',                    '=','E','H','4','N'|0x80,\n'E','(','N','G',')','+',                '=','N','J'|0x80,\n'(','N','G',')','R',                    '=','N','X','G'|0x80,\n'(','N','G',')','#',                    '=','N','X','G'|0x80,\n'(','N','G','L',')','%',                '=','N','X','G','U','L'|0x80,\n'(','N','G',')',                        '=','N','X'|0x80,\n'(','N','K',')',                        '=','N','X','K'|0x80,\n' ','(','N','O','W',')',' ',            '=','N','A','W','4'|0x80,\n'N','(','N',')','='|0x80,\n'(','N','O','N',')','E',                '=','N','A','H','4','N'|0x80,\n'(','N',')',                            '=','N'|0x80,\n\n']','O'|0x80,\n' ','(','O',')',' ',                    '=','O','H','4','W'|0x80,\n'(','O','F',')',' ',                    '=','A','H','V'|0x80,\n' ','(','O','H',')',' ',                '=','O','W','5'|0x80,\n'(','O','R','O','U','G','H',')',        '=','E','R','4','O','W'|0x80,\n'#',':','(','O','R',')',' ',            '=','E','R'|0x80,\n'#',':','(','O','R','S',')',' ',        '=','E','R','Z'|0x80,\n'(','O','R',')',                        '=','A','O','R'|0x80,\n' ','(','O','N','E',')',                '=','W','A','H','N'|0x80,\n'#','(','O','N','E',')',' ',            '=','W','A','H','N'|0x80,\n'(','O','W',')',                        '=','O','W'|0x80,\n' ','(','O','V','E','R',')',            '=','O','W','5','V','E','R'|0x80,\n'P','R','(','O',')','V',                '=','U','W','4'|0x80,\n'(','O','V',')',                        '=','A','H','4','V'|0x80,\n'(','O',')','^','%',                    '=','O','W','5'|0x80,\n'(','O',')','^','E','N',                '=','O','W'|0x80,\n'(','O',')','^','I','#',                '=','O','W','5'|0x80,\n'(','O','L',')','D',                    '=','O','W','4','L'|0x80,\n'(','O','U','G','H','T',')',            '=','A','O','5','T'|0x80,\n'(','O','U','G','H',')',                '=','A','H','5','F'|0x80,\n' ','(','O','U',')',                    '=','A','W'|0x80,\n'H','(','O','U',')','S','#',            '=','A','W','4'|0x80,\n'(','O','U','S',')',                    '=','A','X','S'|0x80,\n'(','O','U','R',')',                    '=','O','H','R'|0x80,\n'(','O','U','L','D',')',                '=','U','H','5','D'|0x80,\n'(','O','U',')','^','L',                '=','A','H','5'|0x80,\n'(','O','U','P',')',                    '=','U','W','5','P'|0x80,\n'(','O','U',')',                        '=','A','W'|0x80,\n'(','O','Y',')',                        '=','O','Y'|0x80,\n'(','O','I','N','G',')',                '=','O','W','4','I','H','N','X'|0x80,\n'(','O','I',')',                        '=','O','Y','5'|0x80,\n'(','O','O','R',')',                    '=','O','H','5','R'|0x80,\n'(','O','O','K',')',                    '=','U','H','5','K'|0x80,\n'F','(','O','O','D',')',                '=','U','W','5','D'|0x80,\n'L','(','O','O','D',')',                '=','A','H','5','D'|0x80,\n'M','(','O','O','D',')',                '=','U','W','5','D'|0x80,\n'(','O','O','D',')',                    '=','U','H','5','D'|0x80,\n'F','(','O','O','T',')',                '=','U','H','5','T'|0x80,\n'(','O','O',')',                        '=','U','W','5'|0x80,\n'(','O','\\'',')',                        '=','O','H'|0x80,\n'(','O',')','E',                        '=','O','W'|0x80,\n'(','O',')',' ',                        '=','O','W'|0x80,\n'(','O','A',')',                        '=','O','W','4'|0x80,\n' ','(','O','N','L','Y',')',            '=','O','W','4','N','L','I','Y'|0x80,\n' ','(','O','N','C','E',')',            '=','W','A','H','4','N','S'|0x80,\n'(','O','N','\\'','T',')',                '=','O','W','4','N','T'|0x80,\n'C','(','O',')','N',                    '=','A','A'|0x80,\n'(','O',')','N','G',                    '=','A','O'|0x80,\n' ',':','^','(','O',')','N',            '=','A','H'|0x80,\n'I','(','O','N',')',                    '=','U','N'|0x80,\n'#',':','(','O','N',')',                '=','U','N'|0x80,\n'#','^','(','O','N',')',                '=','U','N'|0x80,\n'(','O',')','S','T',                    '=','O','W'|0x80,\n'(','O','F',')','^',                    '=','A','O','4','F'|0x80,\n'(','O','T','H','E','R',')',            '=','A','H','5','D','H','E','R'|0x80,\n'R','(','O',')','B',                    '=','R','A','A'|0x80,\n'^','R','(','O',')',':','#',            '=','O','W','5'|0x80,\n'(','O','S','S',')',' ',                '=','A','O','5','S'|0x80,\n'#',':','^','(','O','M',')',            '=','A','H','M'|0x80,\n'(','O',')',                            '=','A','A'|0x80,\n\n']','P'|0x80,\n' ','(','P',')',' ',                    '=','P','I','Y','4'|0x80,\n'(','P','H',')',                        '=','F'|0x80,\n'(','P','E','O','P','L',')',            '=','P','I','Y','5','P','U','L'|0x80,\n'(','P','O','W',')',                    '=','P','A','W','4'|0x80,\n'(','P','U','T',')',' ',                '=','P','U','H','T'|0x80,\n'(','P',')','P','='|0x80,\n'(','P',')','S','='|0x80,\n'(','P',')','N','='|0x80,\n'(','P','R','O','F','.',')',            '=','P','R','O','H','F','E','H','4','S','E','R'|0x80,\n'(','P',')',                            '=','P'|0x80,\n\n']','Q'|0x80,\n' ','(','Q',')',' ',                    '=','K','Y','U','W','4'|0x80,\n'(','Q','U','A','R',')',                '=','K','W','O','H','5','R'|0x80,\n'(','Q','U',')',                        '=','K','W'|0x80,\n'(','Q',')',                            '=','K'|0x80,\n']','R'|0x80,\n' ','(','R',')',' ',                    '=','A','A','5','R'|0x80,\n' ','(','R','E',')','^','#',            '=','R','I','Y'|0x80,\n'(','R',')','R','='|0x80,\n'(','R',')',                            '=','R'|0x80,\n\n']','S'|0x80,\n' ','(','S',')',' ',                    '=','E','H','4','S'|0x80,\n'(','S','H',')',                        '=','S','H'|0x80,\n'#','(','S','I','O','N',')',            '=','Z','H','U','N'|0x80,\n'(','S','O','M','E',')',                '=','S','A','H','M'|0x80,\n'#','(','S','U','R',')','#',            '=','Z','H','E','R'|0x80,\n'(','S','U','R',')','#',                '=','S','H','E','R'|0x80,\n'#','(','S','U',')','#',                '=','Z','H','U','W'|0x80,\n'#','(','S','S','U',')','#',            '=','S','H','U','W'|0x80,\n'#','(','S','E','D',')',                '=','Z','D'|0x80,\n'#','(','S',')','#',                    '=','Z'|0x80,\n'(','S','A','I','D',')',                '=','S','E','H','D'|0x80,\n'^','(','S','I','O','N',')',            '=','S','H','U','N'|0x80,\n'(','S',')','S','='|0x80,\n'.','(','S',')',' ',                    '=','Z'|0x80,\n'#',':','.','E','(','S',')',' ',        '=','Z'|0x80,\n'#',':','^','#','(','S',')',' ',        '=','S'|0x80,\n'U','(','S',')',' ',                    '=','S'|0x80,\n' ',':','#','(','S',')',' ',            '=','Z'|0x80,\n'#','#','(','S',')',' ',                '=','Z'|0x80,\n' ','(','S','C','H',')',                '=','S','K'|0x80,\n'(','S',')','C','+','='|0x80,\n'#','(','S','M',')',                    '=','Z','U','M'|0x80,\n'#','(','S','N',')','\\'',                '=','Z','U','M'|0x80,\n'(','S','T','L','E',')',                '=','S','U','L'|0x80,\n'(','S',')',                            '=','S'|0x80,\n\n']','T'|0x80,\n' ','(','T',')',' ',                    '=','T','I','Y','4'|0x80,\n' ','(','T','H','E',')',' ','#',        '=','D','H','I','Y'|0x80,\n' ','(','T','H','E',')',' ',            '=','D','H','A','X'|0x80,\n'(','T','O',')',' ',                    '=','T','U','X'|0x80,\n' ','(','T','H','A','T',')',            '=','D','H','A','E','T'|0x80,\n' ','(','T','H','I','S',')',' ',        '=','D','H','I','H','S'|0x80,\n' ','(','T','H','E','Y',')',            '=','D','H','E','Y'|0x80,\n' ','(','T','H','E','R','E',')',        '=','D','H','E','H','R'|0x80,\n'(','T','H','E','R',')',                '=','D','H','E','R'|0x80,\n'(','T','H','E','I','R',')',            '=','D','H','E','H','R'|0x80,\n' ','(','T','H','A','N',')',' ',        '=','D','H','A','E','N'|0x80,\n' ','(','T','H','E','M',')',' ',        '=','D','H','A','E','N'|0x80,\n'(','T','H','E','S','E',')',' ',        '=','D','H','I','Y','Z'|0x80,\n' ','(','T','H','E','N',')',            '=','D','H','E','H','N'|0x80,\n'(','T','H','R','O','U','G','H',')',    '=','T','H','R','U','W','4'|0x80,\n'(','T','H','O','S','E',')',            '=','D','H','O','H','Z'|0x80,\n'(','T','H','O','U','G','H',')',' ',    '=','D','H','O','W'|0x80,\n'(','T','O','D','A','Y',')',            '=','T','U','X','D','E','Y'|0x80,\n'(','T','O','M','O',')','R','R','O','W','=','T','U','M','A','A','5'|0x80,\n'(','T','O',')','T','A','L',            '=','T','O','W','5'|0x80,\n' ','(','T','H','U','S',')',            '=','D','H','A','H','4','S'|0x80,\n'(','T','H',')',                        '=','T','H'|0x80,\n'#',':','(','T','E','D',')',            '=','T','I','X','D'|0x80,\n'S','(','T','I',')','#','N',            '=','C','H'|0x80,\n'(','T','I',')','O',                    '=','S','H'|0x80,\n'(','T','I',')','A',                    '=','S','H'|0x80,\n'(','T','I','E','N',')',                '=','S','H','U','N'|0x80,\n'(','T','U','R',')','#',                '=','C','H','E','R'|0x80,\n'(','T','U',')','A',                    '=','C','H','U','W'|0x80,\n' ','(','T','W','O',')',                '=','T','U','W'|0x80,\n'&','(','T',')','E','N',' ','='|0x80,\n'(','T',')',                            '=','T'|0x80,\n\n']','U'|0x80,\n' ','(','U',')',' ',                    '=','Y','U','W','4'|0x80,\n' ','(','U','N',')','I',                '=','Y','U','W','N'|0x80,\n' ','(','U','N',')',                    '=','A','H','N'|0x80,\n' ','(','U','P','O','N',')',            '=','A','X','P','A','O','N'|0x80,\n'@','(','U','R',')','#',                '=','U','H','4','R'|0x80,\n'(','U','R',')','#',                    '=','Y','U','H','4','R'|0x80,\n'(','U','R',')',                        '=','E','R'|0x80,\n'(','U',')','^',' ',                    '=','A','H'|0x80,\n'(','U',')','^','^',                    '=','A','H','5'|0x80,\n'(','U','Y',')',                        '=','A','Y','5'|0x80,\n' ','G','(','U',')','#','='|0x80,\n'G','(','U',')','%','='|0x80,\n'G','(','U',')','#',                    '=','W'|0x80,\n'#','N','(','U',')',                    '=','Y','U','W'|0x80,\n'@','(','U',')',                        '=','U','W'|0x80,\n'(','U',')',                            '=','Y','U','W'|0x80,\n\n']','V'|0x80,\n' ','(','V',')',' ',                    '=','V','I','Y','4'|0x80,\n'(','V','I','E','W',')',                '=','V','Y','U','W','5'|0x80,\n'(','V',')',                            '=','V'|0x80,\n\n']','W'|0x80,\n' ','(','W',')',' ',                    '=','D','A','H','4','B','U','L','Y','U','W'|0x80,\n' ','(','W','E','R','E',')',            '=','W','E','R'|0x80,\n'(','W','A',')','S','H',                '=','W','A','A'|0x80,\n'(','W','A',')','S','T',                '=','W','E','Y'|0x80,\n'(','W','A',')','S',                    '=','W','A','H'|0x80,\n'(','W','A',')','T',                    '=','W','A','A'|0x80,\n'(','W','H','E','R','E',')',            '=','W','H','E','H','R'|0x80,\n'(','W','H','A','T',')',                '=','W','H','A','H','T'|0x80,\n'(','W','H','O','L',')',                '=','/','H','O','W','L'|0x80,\n'(','W','H','O',')',                    '=','/','H','U','W'|0x80,\n'(','W','H',')',                        '=','W','H'|0x80,\n'(','W','A','R',')','#',                '=','W','E','H','R'|0x80,\n'(','W','A','R',')',                    '=','W','A','O','R'|0x80,\n'(','W','O','R',')','^',                '=','W','E','R'|0x80,\n'(','W','R',')',                        '=','R'|0x80,\n'(','W','O','M',')','A',                '=','W','U','H','M'|0x80,\n'(','W','O','M',')','E',                '=','W','I','H','M'|0x80,\n'(','W','E','A',')','R',                '=','W','E','H'|0x80,\n'(','W','A','N','T',')',                '=','W','A','A','5','N','T'|0x80,\n'A','N','S','(','W','E','R',')',        '=','E','R'|0x80,\n'(','W',')',                            '=','W'|0x80,\n\n']','X'|0x80,\n' ','(','X',')',' ',                    '=','E','H','4','K','R'|0x80,\n' ','(','X',')',                        '=','Z'|0x80,\n'(','X',')',                            '=','K','S'|0x80,\n\n']','Y'|0x80,\n' ','(','Y',')',' ',                    '=','W','A','Y','4'|0x80,\n'(','Y','O','U','N','G',')',            '=','Y','A','H','N','X'|0x80,\n' ','(','Y','O','U','R',')',            '=','Y','O','H','R'|0x80,\n' ','(','Y','O','U',')',                '=','Y','U','W'|0x80,\n' ','(','Y','E','S',')',                '=','Y','E','H','S'|0x80,\n' ','(','Y',')',                        '=','Y'|0x80,\n'F','(','Y',')',                        '=','A','Y'|0x80,\n'P','S','(','Y','C','H',')',            '=','A','Y','K'|0x80,\n'#',':','^','(','Y',')',                '=','I','Y'|0x80,\n'#',':','^','(','Y',')','I',            '=','I','Y'|0x80,\n' ',':','(','Y',')',' ',                '=','A','Y'|0x80,\n' ',':','(','Y',')','#',                '=','A','Y'|0x80,\n' ',':','(','Y',')','^','+',':','#',    '=','I','H'|0x80,\n' ',':','(','Y',')','^','#',            '=','A','Y'|0x80,\n'(','Y',')',                            '=','I','H'|0x80,\n\n']','Z'|0x80,\n' ','(','Z',')',' ',                    '=','Z','I','Y','4'|0x80,\n'(','Z',')',                            '=','Z'|0x80,\n'j'|0x80\n};\n\nconst unsigned char rules2[] =\n{\n'(','A',')',                            '='|0x80,\n'(','!',')',                            '=','.'|0x80,\n'(','\"',')',' ',                        '=','-','A','H','5','N','K','W','O','W','T','-'|0x80,\n'(','\"',')',                            '=','K','W','O','W','4','T','-'|0x80,\n'(','#',')',                            '=',' ','N','A','H','4','M','B','E','R'|0x80,\n'(','$',')',                            '=',' ','D','A','A','4','L','E','R'|0x80,\n'(','%',')',                            '=',' ','P','E','R','S','E','H','4','N','T'|0x80,\n'(','&',')',                            '=',' ','A','E','N','D'|0x80,\n'(','\\'',')',                           '='|0x80,\n'(','*',')',                            '=',' ','A','E','4','S','T','E','R','I','H','S','K'|0x80,\n'(','+',')',                            '=',' ','P','L','A','H','4','S'|0x80,\n'(',',',')',                            '=',','|0x80,\n' ','(','-',')',' ',                    '=','-'|0x80,\n'(','-',')',                            '='|0x80,\n'(','.',')',                            '=',' ','P','O','Y','N','T'|0x80,\n'(','/',')',                            '=',' ','S','L','A','E','4','S','H'|0x80,\n'(','0',')',                            '=',' ','Z','I','Y','4','R','O','W'|0x80,\n' ','(','1','S','T',')',                '=','F','E','R','4','S','T'|0x80,\n' ','(','1','0','T','H',')',            '=','T','E','H','4','N','T','H'|0x80,\n'(','1',')',                            '=',' ','W','A','H','4','N'|0x80,\n' ','(','2','N','D',')',                '=','S','E','H','4','K','U','N','D'|0x80,\n'(','2',')',                            '=',' ','T','U','W','4'|0x80,\n' ','(','3','R','D',')',                '=','T','H','E','R','4','D'|0x80,\n'(','3',')',                            '=',' ','T','H','R','I','Y','4'|0x80,\n'(','4',')',                            '=',' ','F','O','H','4','R'|0x80,\n' ','(','5','T','H',')',                '=','F','I','H','4','F','T','H'|0x80,\n'(','5',')',                            '=',' ','F','A','Y','4','V'|0x80,\n' ','(','6','4',')',' ',                '=','S','I','H','4','K','S','T','I','Y',' ','F','O','H','R'|0x80,\n'(','6',')',                            '=',' ','S','I','H','4','K','S'|0x80,\n'(','7',')',                            '=',' ','S','E','H','4','V','U','N'|0x80,\n' ','(','8','T','H',')',                '=','E','Y','4','T','H'|0x80,\n'(','8',')',                            '=',' ','E','Y','4','T'|0x80,\n'(','9',')',                            '=',' ','N','A','Y','4','N'|0x80,\n'(',':',')',                            '=','.'|0x80,\n'(',';',')',                            '=','.'|0x80,\n'(','<',')',                            '=',' ','L','E','H','4','S',' ','D','H','A','E','N'|0x80,\n'(','=',')',                            '=',' ','I','Y','4','K','W','U','L','Z'|0x80,\n'(','>',')',                            '=',' ','G','R','E','Y','4','T','E','R',' ','D','H','A','E','N'|0x80,\n'(','?',')',                            '=','?'|0x80,\n'(','@',')',                            '=',' ','A','E','6','T'|0x80,\n'(','^',')',                            '=',' ','K','A','E','4','R','I','X','T'|0x80,\n']','A'|0x80\n};\n\n\n//26 items. From 'A' to 'Z'\n// positions for mem62 and mem63 for each character\nconst unsigned char tab37489[] =\n{\n0, 149, 247, 162, 57, 197, 6, 126,\n199, 38, 55, 78, 145, 241, 85, 161,\n254, 36, 69, 45, 167, 54, 83, 46,\n71, 218\n};\n\nconst unsigned char tab37515[] =\n{\n125, 126, 126, 127, 128, 129, 130, 130,\n130, 132, 132, 132, 132, 132, 133, 135,\n135, 136, 136, 137, 138, 139, 139, 140,\n140, 140\n};\n\n#endif\n"
  },
  {
    "path": "lib/SAM/RenderTabs.h",
    "content": "#ifndef RENDERTABS_H\n#define RENDERTABS_H\n\nconst unsigned char tab48426[5] = { 0x18, 0x1A, 0x17, 0x17, 0x17 };\n\nconst unsigned char tab47492[] =\n{\n    0 , 0 , 0xE0 , 0xE6 , 0xEC , 0xF3 , 0xF9 , 0 ,\n    6 , 0xC , 6\n};\n\n\nconst unsigned char amplitudeRescale[] =\n{\n    0 , 1 , 2 , 2 , 2 , 3 , 3 , 4 ,\n    4 , 5 , 6 , 8 , 9 ,0xB ,0xD ,0xF, 0  //17 elements?\n};\n\n// Used to decide which phoneme's blend lengths. The candidate with the lower score is selected.\n// tab45856\nconst unsigned char blendRank[] =\n{\n    0 , 0x1F , 0x1F , 0x1F , 0x1F , 2 , 2 , 2 ,\n    2 , 2 , 2 , 2 , 2 , 2 , 5 , 5 ,\n    2 ,0xA , 2 , 8 , 5 , 5 ,0xB ,0xA ,\n    9 , 8 , 8 , 0xA0 , 8 , 8 , 0x17 , 0x1F ,\n    0x12 , 0x12 , 0x12 , 0x12 , 0x1E , 0x1E , 0x14 , 0x14 ,\n    0x14 , 0x14 , 0x17 , 0x17 , 0x1A , 0x1A , 0x1D , 0x1D ,\n    2 , 2 , 2 , 2 , 2 , 2 , 0x1A , 0x1D ,\n    0x1B , 0x1A , 0x1D , 0x1B , 0x1A , 0x1D , 0x1B , 0x1A ,\n    0x1D , 0x1B , 0x17 , 0x1D , 0x17 , 0x17 , 0x1D , 0x17 ,\n    0x17 , 0x1D , 0x17 , 0x17 , 0x1D , 0x17 , 0x17 , 0x17\n};\n\n\n// Number of frames at the end of a phoneme devoted to interpolating to next phoneme's final value\n//tab45696\nconst unsigned char outBlendLength[] =\n{\n    0 , 2 , 2 , 2 , 2 , 4 , 4 , 4 ,\n    4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,\n    4 , 4 , 3 , 2 , 4 , 4 , 2 , 2 ,\n    2 , 2 , 2 , 1 , 1 , 1 , 1 , 1 ,\n    1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 ,\n    2 , 1 , 0 , 1 , 0 , 1 , 0 , 5 ,\n    5 , 5 , 5 , 5 , 4 , 4 , 2 , 0 ,\n    1 , 2 , 0 , 1 , 2 , 0 , 1 , 2 ,\n    0 , 1 , 2 , 0 , 2 , 2 , 0 , 1 ,\n    3 , 0 , 2 , 3 , 0 , 2 , 0xA0 , 0xA0\n};\n\n\n// Number of frames at beginning of a phoneme devoted to interpolating to phoneme's final value\n// tab45776\nconst unsigned char inBlendLength[] =\n{\n    0 , 2 , 2 , 2 , 2 , 4 , 4 , 4 ,\n    4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,\n    4 , 4 , 3 , 3 , 4 , 4 , 3 , 3 ,\n    3 , 3 , 3 , 1 , 2 , 3 , 2 , 1 ,\n    3 , 3 , 3 , 3 , 1 , 1 , 3 , 3 ,\n    3 , 2 , 2 , 3 , 2 , 3 , 0 , 0 ,\n    5 , 5 , 5 , 5 , 4 , 4 , 2 , 0 ,\n    2 , 2 , 0 , 3 , 2 , 0 , 4 , 2 ,\n    0 , 3 , 2 , 0 , 2 , 2 , 0 , 2 ,\n    3 , 0 , 3 , 3 , 0 , 3 , 0xB0 , 0xA0\n};\n\n\n// Looks like it's used as bit flags\n// High bits masked by 248 (11111000)\n//\n// 32: S*    241         11110001\n// 33: SH    226         11100010\n// 34: F*    211         11010011\n// 35: TH    187         10111011\n// 36: /H    124         01111100\n// 37: /X    149         10010101\n// 38: Z*    1           00000001\n// 39: ZH    2           00000010\n// 40: V*    3           00000011\n// 41: DH    3           00000011\n// 43: **    114         01110010\n// 45: **    2           00000010\n// 67: **    27          00011011\n// 70: **    25          00011001\n// tab45936\nconst unsigned char sampledConsonantFlags[] =\n{\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0xF1 , 0xE2 , 0xD3 , 0xBB , 0x7C , 0x95 , 1 , 2 ,\n    3 , 3 , 0 , 0x72 , 0 , 2 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0x1B , 0 , 0 , 0x19 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0\n};\n\n\n//tab45056\nunsigned char freq1data[]=\n{\n    0x00 ,0x13 ,0x13 ,0x13 ,0x13 , 0xA , 0xE ,0x12\n    ,  0x18 ,0x1A ,0x16 ,0x14 ,0x10 ,0x14 , 0xE ,0x12\n    ,   0xE ,0x12 ,0x12 ,0x10 , 0xC , 0xE , 0xA ,0x12\n    ,   0xE ,0xA  , 8  , 6  , 6  ,  6 ,  6 ,0x11\n    ,    6 , 6 , 6 , 6 ,0xE , 0x10 , 9 ,0xA\n    ,    8 ,0xA , 6 , 6 , 6 , 5 , 6 , 0\n    ,  0x12 , 0x1A , 0x14 , 0x1A , 0x12 ,0xC , 6 , 6\n    ,    6 , 6 , 6 , 6 , 6 , 6 , 6 , 6\n    ,    6 , 6 , 6 , 6 , 6 , 6 , 6 , 6\n    ,    6 ,0xA ,0xA , 6 , 6 , 6 , 0x2C , 0x13\n};\n\n//tab451356\nunsigned char freq2data[]=\n{\n    0x00 , 0x43 , 0x43 , 0x43 , 0x43 , 0x54 , 0x48 , 0x42 ,\n    0x3E , 0x28 , 0x2C , 0x1E , 0x24 , 0x2C , 0x48 , 0x30 ,\n    0x24 , 0x1E , 0x32 , 0x24 , 0x1C , 0x44 , 0x18 , 0x32 ,\n    0x1E , 0x18 , 0x52 , 0x2E , 0x36 , 0x56 , 0x36 , 0x43 ,\n    0x49 , 0x4F , 0x1A , 0x42 , 0x49 , 0x25 , 0x33 , 0x42 ,\n    0x28 , 0x2F , 0x4F , 0x4F , 0x42 , 0x4F , 0x6E , 0x00 ,\n    0x48 , 0x26 , 0x1E , 0x2A , 0x1E , 0x22 , 0x1A , 0x1A ,\n    0x1A , 0x42 , 0x42 , 0x42 , 0x6E , 0x6E , 0x6E , 0x54 ,\n    0x54 , 0x54 , 0x1A , 0x1A , 0x1A , 0x42 , 0x42 , 0x42 ,\n    0x6D , 0x56 , 0x6D , 0x54 , 0x54 , 0x54 , 0x7F , 0x7F\n};\n\n//tab45216\nunsigned char freq3data[]=\n{\n    0x00 , 0x5B , 0x5B , 0x5B , 0x5B , 0x6E , 0x5D , 0x5B ,\n    0x58 , 0x59 , 0x57 , 0x58 , 0x52 , 0x59 , 0x5D , 0x3E ,\n    0x52 , 0x58 , 0x3E , 0x6E , 0x50 , 0x5D , 0x5A , 0x3C ,\n    0x6E , 0x5A , 0x6E , 0x51 , 0x79 , 0x65 , 0x79 , 0x5B ,\n    0x63 , 0x6A , 0x51 , 0x79 , 0x5D , 0x52 , 0x5D , 0x67 ,\n    0x4C , 0x5D , 0x65 , 0x65 , 0x79 , 0x65 , 0x79 , 0x00 ,\n    0x5A , 0x58 , 0x58 , 0x58 , 0x58 , 0x52 , 0x51 , 0x51 ,\n    0x51 , 0x79 , 0x79 , 0x79 , 0x70 , 0x6E , 0x6E , 0x5E ,\n    0x5E , 0x5E , 0x51 , 0x51 , 0x51 , 0x79 , 0x79 , 0x79 ,\n    0x65 , 0x65 , 0x70 , 0x5E , 0x5E , 0x5E , 0x08 , 0x01\n};\n\nconst unsigned char ampl1data[] =\n{\n    0 , 0 , 0 , 0 , 0 ,0xD ,0xD ,0xE ,\n    0xF ,0xF ,0xF ,0xF ,0xF ,0xC ,0xD ,0xC ,\n    0xF ,0xF ,0xD ,0xD ,0xD ,0xE ,0xD ,0xC ,\n    0xD ,0xD ,0xD ,0xC , 9 , 9 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 ,0xB ,0xB ,\n    0xB ,0xB , 0 , 0 , 1 ,0xB , 0 , 2 ,\n    0xE ,0xF ,0xF ,0xF ,0xF ,0xD , 2 , 4 ,\n    0 , 2 , 4 , 0 , 1 , 4 , 0 , 1 ,\n    4 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 ,0xC , 0 , 0 , 0 , 0 ,0xF ,0xF\n};\n\nconst unsigned char ampl2data[] =\n{\n    0 , 0 , 0 , 0 , 0 ,0xA ,0xB ,0xD ,\n    0xE ,0xD ,0xC ,0xC ,0xB , 9 ,0xB ,0xB ,\n    0xC ,0xC ,0xC , 8 , 8 ,0xC , 8 ,0xA ,\n    8 , 8 ,0xA , 3 , 9 , 6 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 3 , 5 ,\n    3 , 4 , 0 , 0 , 0 , 5 ,0xA , 2 ,\n    0xE ,0xD ,0xC ,0xD ,0xC , 8 , 0 , 1 ,\n    0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 ,\n    1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 ,0xA , 0 , 0 ,0xA , 0 , 0 , 0\n};\n\nconst unsigned char ampl3data[] =\n{\n    0 , 0 , 0 , 0 , 0 , 8 , 7 , 8 ,\n    8 , 1 , 1 , 0 , 1 , 0 , 7 , 5 ,\n    1 , 0 , 6 , 1 , 0 , 7 , 0 , 5 ,\n    1 , 0 , 8 , 0 , 0 , 3 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ,\n    0 , 0 , 0 , 0 , 0 , 1 ,0xE , 1 ,\n    9 , 1 , 0 , 1 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,\n    0 , 7 , 0 , 0 , 5 , 0 , 0x13 , 0x10\n};\n\n\n\n//tab42240\nconst signed char sinus[256] =\n{0,3,6,9,12,16,19,22,25,28,31,34,37,40,43,46,49,51,54,57,60,63,65,68,71,73,76,78,81,83,85,88,90,92,94,96,98,100,102,104,106,107,109,111,112,113,115,116,117,118,120,121,122,122,123,124,125,125,126,126,126,127,127,127,127,127,127,127,126,126,126,125,125,124,123,122,122,121,120,118,117,116,115,113,112,111,109,107,106,104,102,100,98,96,94,92,90,88,85,83,81,78,76,73,71,68,65,63,60,57,54,51,49,46,43,40,37,34,31,28,25,22,19,16,12,9,6,3,0,-3,-6,-9,-12,-16,-19,-22,-25,-28,-31,-34,-37,-40,-43,-46,-49,-51,-54,-57,-60,-63,-65,-68,-71,-73,-76,-78,-81,-83,-85,-88,-90,-92,-94,-96,-98,-100,-102,-104,-106,-107,-109,-111,-112,-113,-115,-116,-117,-118,-120,-121,-122,-122,-123,-124,-125,-125,-126,-126,-126,-127,-127,-127,-127,-127,-127,-127,-126,-126,-126,-125,-125,-124,-123,-122,-122,-121,-120,-118,-117,-116,-115,-113,-112,-111,-109,-107,-106,-104,-102,-100,-98,-96,-94,-92,-90,-88,-85,-83,-81,-78,-76,-73,-71,-68,-65,-63,-60,-57,-54,-51,-49,-46,-43,-40,-37,-34,-31,-28,-25,-22,-19,-16,-12,-9,-6,-3};\n\n//tab42496\nconst unsigned char rectangle[] =\n{\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,\n    0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70\n};\n\n\n//random data ?\nconst unsigned char sampleTable[0x500] =\n{\n    //00\n\n    0x38 , 0x84 , 0x6B , 0x19 , 0xC6 , 0x63 ,  0x18 , 0x86\n    ,  0x73 , 0x98 , 0xC6 , 0xB1 , 0x1C , 0xCA , 0x31 , 0x8C\n    ,  0xC7 , 0x31 , 0x88 , 0xC2 , 0x30 , 0x98 , 0x46 , 0x31\n    ,  0x18 , 0xC6 , 0x35 ,0xC , 0xCA , 0x31 ,0xC , 0xC6\n    //20\n    ,  0x21 , 0x10 , 0x24 , 0x69 , 0x12 , 0xC2 , 0x31 , 0x14\n    ,  0xC4 , 0x71 , 8 , 0x4A , 0x22 , 0x49 , 0xAB , 0x6A\n    ,  0xA8 , 0xAC , 0x49 , 0x51 , 0x32 , 0xD5 , 0x52 , 0x88\n    ,  0x93 , 0x6C , 0x94 , 0x22 , 0x15 , 0x54 , 0xD2 , 0x25\n    //40\n    ,  0x96 , 0xD4 , 0x50 , 0xA5 , 0x46 , 0x21 , 8 , 0x85\n    ,  0x6B , 0x18 , 0xC4 , 0x63 , 0x10 , 0xCE , 0x6B , 0x18\n    ,  0x8C , 0x71 , 0x19 , 0x8C , 0x63 , 0x35 ,0xC , 0xC6\n    ,  0x33 , 0x99 , 0xCC , 0x6C , 0xB5 , 0x4E , 0xA2 , 0x99\n    //60\n    ,  0x46 , 0x21 , 0x28 , 0x82 , 0x95 , 0x2E , 0xE3 , 0x30\n    ,  0x9C , 0xC5 , 0x30 , 0x9C , 0xA2 , 0xB1 , 0x9C , 0x67\n    ,  0x31 , 0x88 , 0x66 , 0x59 , 0x2C , 0x53 , 0x18 , 0x84\n    ,  0x67 , 0x50 , 0xCA , 0xE3 ,0xA , 0xAC , 0xAB , 0x30\n    //80\n    ,  0xAC , 0x62 , 0x30 , 0x8C , 0x63 , 0x10 , 0x94 , 0x62\n    ,  0xB1 , 0x8C , 0x82 , 0x28 , 0x96 , 0x33 , 0x98 , 0xD6\n    ,  0xB5 , 0x4C , 0x62 , 0x29 , 0xA5 , 0x4A , 0xB5 , 0x9C\n    ,  0xC6 , 0x31 , 0x14 , 0xD6 , 0x38 , 0x9C , 0x4B , 0xB4\n    //A0\n    ,  0x86 , 0x65 , 0x18 , 0xAE , 0x67 , 0x1C , 0xA6 , 0x63\n    ,  0x19 , 0x96 , 0x23 , 0x19 , 0x84 , 0x13 , 8 , 0xA6\n    ,  0x52 , 0xAC , 0xCA , 0x22 , 0x89 , 0x6E , 0xAB , 0x19\n    ,  0x8C , 0x62 , 0x34 , 0xC4 , 0x62 , 0x19 , 0x86 , 0x63\n    //C0\n    ,  0x18 , 0xC4 , 0x23 , 0x58 , 0xD6 , 0xA3 , 0x50 , 0x42\n    ,  0x54 , 0x4A , 0xAD , 0x4A , 0x25 , 0x11 , 0x6B , 0x64\n    ,  0x89 , 0x4A , 0x63 , 0x39 , 0x8A , 0x23 , 0x31 , 0x2A\n    ,  0xEA , 0xA2 , 0xA9 , 0x44 , 0xC5 , 0x12 , 0xCD , 0x42\n    //E0\n    ,  0x34 , 0x8C , 0x62 , 0x18 , 0x8C , 0x63 , 0x11 , 0x48\n    ,  0x66 , 0x31 , 0x9D , 0x44 , 0x33 , 0x1D , 0x46 , 0x31\n    ,  0x9C , 0xC6 , 0xB1 ,0xC , 0xCD , 0x32 , 0x88 , 0xC4\n    ,  0x73 , 0x18 , 0x86 , 0x73 , 8 , 0xD6 , 0x63 , 0x58\n    //100\n    ,    7 , 0x81 , 0xE0 , 0xF0 , 0x3C , 7 , 0x87 , 0x90\n    ,  0x3C , 0x7C ,0xF , 0xC7 , 0xC0 , 0xC0 , 0xF0 , 0x7C\n    ,  0x1E , 7 , 0x80 , 0x80 , 0 , 0x1C , 0x78 , 0x70\n    ,  0xF1 , 0xC7 , 0x1F , 0xC0 ,0xC , 0xFE , 0x1C , 0x1F\n    //120\n    ,  0x1F ,0xE ,0xA , 0x7A , 0xC0 , 0x71 , 0xF2 , 0x83\n    ,  0x8F , 3 ,0xF ,0xF ,0xC , 0 , 0x79 , 0xF8\n    ,  0x61 , 0xE0 , 0x43 ,0xF , 0x83 , 0xE7 , 0x18 , 0xF9\n    ,  0xC1 , 0x13 , 0xDA , 0xE9 , 0x63 , 0x8F ,0xF , 0x83\n    //140\n    ,  0x83 , 0x87 , 0xC3 , 0x1F , 0x3C , 0x70 , 0xF0 , 0xE1\n    ,  0xE1 , 0xE3 , 0x87 , 0xB8 , 0x71 ,0xE , 0x20 , 0xE3\n    ,  0x8D , 0x48 , 0x78 , 0x1C , 0x93 , 0x87 , 0x30 , 0xE1\n    ,  0xC1 , 0xC1 , 0xE4 , 0x78 , 0x21 , 0x83 , 0x83 , 0xC3\n    //160\n    ,  0x87 , 6 , 0x39 , 0xE5 , 0xC3 , 0x87 , 7 ,0xE\n    ,  0x1C , 0x1C , 0x70 , 0xF4 , 0x71 , 0x9C , 0x60 , 0x36\n    ,  0x32 , 0xC3 , 0x1E , 0x3C , 0xF3 , 0x8F ,0xE , 0x3C\n    ,  0x70 , 0xE3 , 0xC7 , 0x8F ,0xF ,0xF ,0xE , 0x3C\n    //180\n    ,  0x78 , 0xF0 , 0xE3 , 0x87 , 6 , 0xF0 , 0xE3 , 7\n    ,  0xC1 , 0x99 , 0x87 ,0xF , 0x18 , 0x78 , 0x70 , 0x70\n    ,  0xFC , 0xF3 , 0x10 , 0xB1 , 0x8C , 0x8C , 0x31 , 0x7C\n    ,  0x70 , 0xE1 , 0x86 , 0x3C , 0x64 , 0x6C , 0xB0 , 0xE1\n    //1A0\n    ,  0xE3 ,0xF , 0x23 , 0x8F ,0xF , 0x1E , 0x3E , 0x38\n    ,  0x3C , 0x38 , 0x7B , 0x8F , 7 ,0xE , 0x3C , 0xF4\n    ,  0x17 , 0x1E , 0x3C , 0x78 , 0xF2 , 0x9E , 0x72 , 0x49\n    ,  0xE3 , 0x25 , 0x36 , 0x38 , 0x58 , 0x39 , 0xE2 , 0xDE\n    //1C0\n    ,  0x3C , 0x78 , 0x78 , 0xE1 , 0xC7 , 0x61 , 0xE1 , 0xE1\n    ,  0xB0 , 0xF0 , 0xF0 , 0xC3 , 0xC7 ,0xE , 0x38 , 0xC0\n    ,  0xF0 , 0xCE , 0x73 , 0x73 , 0x18 , 0x34 , 0xB0 , 0xE1\n    ,  0xC7 , 0x8E , 0x1C , 0x3C , 0xF8 , 0x38 , 0xF0 , 0xE1\n    //1E0\n    ,  0xC1 , 0x8B , 0x86 , 0x8F , 0x1C , 0x78 , 0x70 , 0xF0\n    ,  0x78 , 0xAC , 0xB1 , 0x8F , 0x39 , 0x31 , 0xDB , 0x38\n    ,  0x61 , 0xC3 ,0xE ,0xE , 0x38 , 0x78 , 0x73 , 0x17\n    ,  0x1E , 0x39 , 0x1E , 0x38 , 0x64 , 0xE1 , 0xF1 , 0xC1\n    //200\n    ,  0x4E ,0xF , 0x40 , 0xA2 , 2 , 0xC5 , 0x8F , 0x81\n    ,  0xA1 , 0xFC , 0x12 , 8 , 0x64 , 0xE0 , 0x3C , 0x22\n    ,  0xE0 , 0x45 , 7 , 0x8E ,0xC , 0x32 , 0x90 , 0xF0\n    ,  0x1F , 0x20 , 0x49 , 0xE0 , 0xF8 ,0xC , 0x60 , 0xF0\n    //220\n    ,  0x17 , 0x1A , 0x41 , 0xAA , 0xA4 , 0xD0 , 0x8D , 0x12\n    ,  0x82 , 0x1E , 0x1E , 3 , 0xF8 , 0x3E , 3 ,0xC\n    ,  0x73 , 0x80 , 0x70 , 0x44 , 0x26 , 3 , 0x24 , 0xE1\n    ,  0x3E , 4 , 0x4E , 4 , 0x1C , 0xC1 , 9 , 0xCC\n    //240\n    ,  0x9E , 0x90 , 0x21 , 7 , 0x90 , 0x43 , 0x64 , 0xC0\n    ,   0xF , 0xC6 , 0x90 , 0x9C , 0xC1 , 0x5B , 3 , 0xE2\n    ,  0x1D , 0x81 , 0xE0 , 0x5E , 0x1D , 3 , 0x84 , 0xB8\n    ,  0x2C ,0xF , 0x80 , 0xB1 , 0x83 , 0xE0 , 0x30 , 0x41\n    //260\n    ,  0x1E , 0x43 , 0x89 , 0x83 , 0x50 , 0xFC , 0x24 , 0x2E\n    ,  0x13 , 0x83 , 0xF1 , 0x7C , 0x4C , 0x2C , 0xC9 ,0xD\n    ,  0x83 , 0xB0 , 0xB5 , 0x82 , 0xE4 , 0xE8 , 6 , 0x9C\n    ,    7 , 0xA0 , 0x99 , 0x1D , 7 , 0x3E , 0x82 , 0x8F\n    //280\n    ,  0x70 , 0x30 , 0x74 , 0x40 , 0xCA , 0x10 , 0xE4 , 0xE8\n    ,   0xF , 0x92 , 0x14 , 0x3F , 6 , 0xF8 , 0x84 , 0x88\n    ,  0x43 , 0x81 ,0xA , 0x34 , 0x39 , 0x41 , 0xC6 , 0xE3\n    ,  0x1C , 0x47 , 3 , 0xB0 , 0xB8 , 0x13 ,0xA , 0xC2\n    //2A0\n    ,  0x64 , 0xF8 , 0x18 , 0xF9 , 0x60 , 0xB3 , 0xC0 , 0x65\n    ,  0x20 , 0x60 , 0xA6 , 0x8C , 0xC3 , 0x81 , 0x20 , 0x30\n    ,  0x26 , 0x1E , 0x1C , 0x38 , 0xD3 , 1 , 0xB0 , 0x26\n    ,  0x40 , 0xF4 ,0xB , 0xC3 , 0x42 , 0x1F , 0x85 , 0x32\n    //2C0\n    ,  0x26 , 0x60 , 0x40 , 0xC9 , 0xCB , 1 , 0xEC , 0x11\n    ,  0x28 , 0x40 , 0xFA , 4 , 0x34 , 0xE0 , 0x70 , 0x4C\n    ,  0x8C , 0x1D , 7 , 0x69 , 3 , 0x16 , 0xC8 , 4\n    ,  0x23 , 0xE8 , 0xC6 , 0x9A ,0xB , 0x1A , 3 , 0xE0\n    //2E0\n    ,  0x76 , 6 , 5 , 0xCF , 0x1E , 0xBC , 0x58 , 0x31\n    ,  0x71 , 0x66 , 0 , 0xF8 , 0x3F , 4 , 0xFC ,0xC\n    ,  0x74 , 0x27 , 0x8A , 0x80 , 0x71 , 0xC2 , 0x3A , 0x26\n    ,    6 , 0xC0 , 0x1F , 5 ,0xF , 0x98 , 0x40 , 0xAE\n    //300\n    ,    1 , 0x7F , 0xC0 , 7 , 0xFF , 0 ,0xE , 0xFE\n    ,    0 , 3 , 0xDF , 0x80 , 3 , 0xEF , 0x80 , 0x1B\n    ,  0xF1 , 0xC2 , 0 , 0xE7 , 0xE0 , 0x18 , 0xFC , 0xE0\n    ,  0x21 , 0xFC , 0x80 , 0x3C , 0xFC , 0x40 ,0xE , 0x7E\n    //320\n    ,    0 , 0x3F , 0x3E , 0 ,0xF , 0xFE , 0 , 0x1F\n    ,  0xFF , 0 , 0x3E , 0xF0 , 7 , 0xFC , 0 , 0x7E\n    ,  0x10 , 0x3F , 0xFF , 0 , 0x3F , 0x38 ,0xE , 0x7C\n    ,    1 , 0x87 ,0xC , 0xFC , 0xC7 , 0 , 0x3E , 4\n    //340\n    ,   0xF , 0x3E , 0x1F ,0xF ,0xF , 0x1F ,0xF , 2\n    ,  0x83 , 0x87 , 0xCF , 3 , 0x87 ,0xF , 0x3F , 0xC0\n    ,    7 , 0x9E , 0x60 , 0x3F , 0xC0 , 3 , 0xFE , 0\n    ,  0x3F , 0xE0 , 0x77 , 0xE1 , 0xC0 , 0xFE , 0xE0 , 0xC3\n    //360\n    ,  0xE0 , 1 , 0xDF , 0xF8 , 3 , 7 , 0 , 0x7E\n    ,  0x70 , 0 , 0x7C , 0x38 , 0x18 , 0xFE ,0xC , 0x1E\n    ,  0x78 , 0x1C , 0x7C , 0x3E ,0xE , 0x1F , 0x1E , 0x1E\n    ,  0x3E , 0 , 0x7F , 0x83 , 7 , 0xDB , 0x87 , 0x83\n    //380\n    ,    7 , 0xC7 , 7 , 0x10 , 0x71 , 0xFF , 0 , 0x3F\n    ,  0xE2 , 1 , 0xE0 , 0xC1 , 0xC3 , 0xE1 , 0 , 0x7F\n    ,  0xC0 , 5 , 0xF0 , 0x20 , 0xF8 , 0xF0 , 0x70 , 0xFE\n    ,  0x78 , 0x79 , 0xF8 , 2 , 0x3F ,0xC , 0x8F , 3\n    //3a0\n    ,   0xF , 0x9F , 0xE0 , 0xC1 , 0xC7 , 0x87 , 3 , 0xC3\n    ,  0xC3 , 0xB0 , 0xE1 , 0xE1 , 0xC1 , 0xE3 , 0xE0 , 0x71\n    ,  0xF0 , 0 , 0xFC , 0x70 , 0x7C ,0xC , 0x3E , 0x38\n    ,   0xE , 0x1C , 0x70 , 0xC3 , 0xC7 , 3 , 0x81 , 0xC1\n    //3c0\n    ,  0xC7 , 0xE7 , 0 ,0xF , 0xC7 , 0x87 , 0x19 , 9\n    ,  0xEF , 0xC4 , 0x33 , 0xE0 , 0xC1 , 0xFC , 0xF8 , 0x70\n    ,  0xF0 , 0x78 , 0xF8 , 0xF0 , 0x61 , 0xC7 , 0 , 0x1F\n    ,  0xF8 , 1 , 0x7C , 0xF8 , 0xF0 , 0x78 , 0x70 , 0x3C\n    //3e0\n    ,  0x7C , 0xCE ,0xE , 0x21 , 0x83 , 0xCF , 8 , 7\n    ,  0x8F , 8 , 0xC1 , 0x87 , 0x8F , 0x80 , 0xC7 , 0xE3\n    ,    0 , 7 , 0xF8 , 0xE0 , 0xEF , 0 , 0x39 , 0xF7\n    ,  0x80 ,0xE , 0xF8 , 0xE1 , 0xE3 , 0xF8 , 0x21 , 0x9F\n    //400\n    ,  0xC0 , 0xFF , 3 , 0xF8 , 7 , 0xC0 , 0x1F , 0xF8\n    ,  0xC4 , 4 , 0xFC , 0xC4 , 0xC1 , 0xBC , 0x87 , 0xF0\n    ,   0xF , 0xC0 , 0x7F , 5 , 0xE0 , 0x25 , 0xEC , 0xC0\n    ,  0x3E , 0x84 , 0x47 , 0xF0 , 0x8E , 3 , 0xF8 , 3\n    //420\n    ,  0xFB , 0xC0 , 0x19 , 0xF8 , 7 , 0x9C ,0xC , 0x17\n    ,  0xF8 , 7 , 0xE0 , 0x1F , 0xA1 , 0xFC ,0xF , 0xFC\n    ,    1 , 0xF0 , 0x3F , 0 , 0xFE , 3 , 0xF0 , 0x1F\n    ,    0 , 0xFD , 0 , 0xFF , 0x88 ,0xD , 0xF9 , 1\n    //440\n    ,  0xFF , 0 , 0x70 , 7 , 0xC0 , 0x3E , 0x42 , 0xF3\n    ,   0xD , 0xC4 , 0x7F , 0x80 , 0xFC , 7 , 0xF0 , 0x5E\n    ,  0xC0 , 0x3F , 0 , 0x78 , 0x3F , 0x81 , 0xFF , 1\n    ,  0xF8 , 1 , 0xC3 , 0xE8 ,0xC , 0xE4 , 0x64 , 0x8F\n    ////460\n    ,  0xE4 ,0xF , 0xF0 , 7 , 0xF0 , 0xC2 , 0x1F , 0\n    ,  0x7F , 0xC0 , 0x6F , 0x80 , 0x7E , 3 , 0xF8 , 7\n    ,  0xF0 , 0x3F , 0xC0 , 0x78 ,0xF , 0x82 , 7 , 0xFE\n    ,  0x22 , 0x77 , 0x70 , 2 , 0x76 , 3 , 0xFE , 0\n    //480\n    ,  0xFE , 0x67 , 0 , 0x7C , 0xC7 , 0xF1 , 0x8E , 0xC6\n    ,  0x3B , 0xE0 , 0x3F , 0x84 , 0xF3 , 0x19 , 0xD8 , 3\n    ,  0x99 , 0xFC , 9 , 0xB8 ,0xF , 0xF8 , 0 , 0x9D\n    ,  0x24 , 0x61 , 0xF9 ,0xD , 0 , 0xFD , 3 , 0xF0\n    //4a0\n    ,  0x1F , 0x90 , 0x3F , 1 , 0xF8 , 0x1F , 0xD0 ,0xF\n    ,  0xF8 , 0x37 , 1 , 0xF8 , 7 , 0xF0 ,0xF , 0xC0\n    ,  0x3F , 0 , 0xFE , 3 , 0xF8 ,0xF , 0xC0 , 0x3F\n    ,    0 , 0xFA , 3 , 0xF0 ,0xF , 0x80 , 0xFF , 1\n    //4c0\n    ,  0xB8 , 7 , 0xF0 , 1 , 0xFC , 1 , 0xBC , 0x80\n    ,  0x13 , 0x1E , 0 , 0x7F , 0xE1 , 0x40 , 0x7F , 0xA0\n    ,  0x7F , 0xB0 , 0 , 0x3F , 0xC0 , 0x1F , 0xC0 , 0x38\n    ,   0xF , 0xF0 , 0x1F , 0x80 , 0xFF , 1 , 0xFC , 3\n    //4e0\n    ,  0xF1 , 0x7E , 1 , 0xFE , 1 , 0xF0 , 0xFF , 0\n    ,  0x7F , 0xC0 , 0x1D , 7 , 0xF0 ,0xF , 0xC0 , 0x7E\n    ,    6 , 0xE0 , 7 , 0xE0 ,0xF , 0xF8 , 6 , 0xC1\n    ,  0xFE , 1 , 0xFC , 3 , 0xE0 ,0xF , 0 , 0xFC\n};\n\n\n\n#endif\n"
  },
  {
    "path": "lib/SAM/SamTabs.h",
    "content": "#ifndef SAMTABS_H\n#define SAMTABS_H\n\n//tab40672\nconst unsigned char stressInputTable[] =\n{\n    '*', '1', '2', '3', '4', '5', '6', '7', '8'\n};\n\n//tab40682\nconst unsigned char signInputTable1[]={\n    ' ', '.', '?', ',', '-', 'I', 'I', 'E',\n    'A', 'A', 'A', 'A', 'U', 'A', 'I', 'E',\n    'U', 'O', 'R', 'L', 'W', 'Y', 'W', 'R',\n    'L', 'W', 'Y', 'M', 'N', 'N', 'D', 'Q',\n    'S', 'S', 'F', 'T', '/', '/', 'Z', 'Z',\n    'V', 'D', 'C', '*', 'J', '*', '*', '*',\n    'E', 'A', 'O', 'A', 'O', 'U', 'B', '*',\n    '*', 'D', '*', '*', 'G', '*', '*', 'G',\n    '*', '*', 'P', '*', '*', 'T', '*', '*',\n    'K', '*', '*', 'K', '*', '*', 'U', 'U',\n    'U'\n};\n\n//tab40763\nconst unsigned char signInputTable2[] =\n{\n    '*', '*', '*', '*', '*', 'Y', 'H', 'H',\n    'E', 'A', 'H', 'O', 'H', 'X', 'X', 'R',\n    'X', 'H', 'X', 'X', 'X', 'X', 'H', '*',\n    '*', '*', '*', '*', '*', 'X', 'X', '*',\n    '*', 'H', '*', 'H', 'H', 'X', '*', 'H',\n    '*', 'H', 'H', '*', '*', '*', '*', '*',\n    'Y', 'Y', 'Y', 'W', 'W', 'W', '*', '*',\n    '*', '*', '*', '*', '*', '*', '*', 'X',\n    '*', '*', '*', '*', '*', '*', '*', '*',\n    '*', '*', '*', 'X', '*', '*', 'L', 'M',\n    'N'\n};\n\n//loc_9F8C\nconst unsigned char flags[]={\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xA4 , 0xA4 , 0xA4 ,\n    0xA4 , 0xA4 , 0xA4 , 0x84 , 0x84 , 0xA4 , 0xA4 , 0x84 ,\n    0x84 , 0x84 , 0x84 , 0x84 , 0x84 , 0x84 , 0x44 , 0x44 ,\n    0x44 , 0x44 , 0x44 , 0x4C , 0x4C , 0x4C , 0x48 , 0x4C ,\n    0x40 , 0x40 , 0x40 , 0x40 , 0x40 , 0x40 , 0x44 , 0x44 ,\n    0x44 , 0x44 , 0x48 , 0x40 , 0x4C , 0x44 , 0x00 , 0x00 ,\n    0xB4 , 0xB4 , 0xB4 , 0x94 , 0x94 , 0x94 , 0x4E , 0x4E ,\n    0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E ,\n    0x4E , 0x4E , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B ,\n    0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x80 , 0xC1 ,\n    0xC1\n\n\n};\n\n//??? flags overlap flags2\n//loc_9FDA\nconst unsigned char flags2[] =\n{\n    0x80 , 0xC1 , 0xC1 , 0xC1 , 0xC1 , 0x00 , 0x00 , 0x00 ,\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x10 ,\n    0x10 , 0x10 , 0x10 , 0x08 , 0x0C , 0x08 , 0x04 , 0x40 ,\n    0x24 , 0x20 , 0x20 , 0x24 , 0x00 , 0x00 , 0x24 , 0x20 ,\n    0x20 , 0x24 , 0x20 , 0x20 , 0x00 , 0x20 , 0x00 , 0x00 ,\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,\n    0x00 , 0x04 , 0x04 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 ,\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x04 , 0x04 , 0x04 ,\n    0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00\n};\n\n\n\n//tab45616???\nconst unsigned char phonemeStressedLengthTable[] =\n{\n    0x00 , 0x12 , 0x12 , 0x12 , 8 ,0xB , 9 ,0xB ,\n    0xE ,0xF ,0xB , 0x10 ,0xC , 6 , 6 ,0xE ,\n    0xC ,0xE ,0xC ,0xB , 8 , 8 ,0xB ,0xA ,\n    9 , 8 , 8 , 8 , 8 , 8 , 3 , 5 ,\n    2 , 2 , 2 , 2 , 2 , 2 , 6 , 6 ,\n    8 , 6 , 6 , 2 , 9 , 4 , 2 , 1 ,\n    0xE ,0xF ,0xF ,0xF ,0xE ,0xE , 8 , 2 ,\n    2 , 7 , 2 , 1 , 7 , 2 , 2 , 7 ,\n    2 , 2 , 8 , 2 , 2 , 6 , 2 , 2 ,\n    7 , 2 , 4 , 7 , 1 , 4 , 5 , 5\n};\n\n//tab45536???\nconst unsigned char phonemeLengthTable[] =\n{\n    0 , 0x12 , 0x12 , 0x12 , 8 , 8 , 8 , 8 ,\n    8 ,0xB , 6 ,0xC ,0xA , 5 , 5 ,0xB ,\n    0xA ,0xA ,0xA , 9 , 8 , 7 , 9 , 7 ,\n    6 , 8 , 6 , 7 , 7 , 7 , 2 , 5 ,\n    2 , 2 , 2 , 2 , 2 , 2 , 6 , 6 ,\n    7 , 6 , 6 , 2 , 8 , 3 , 1 , 0x1E ,\n    0xD ,0xC ,0xC ,0xC ,0xE , 9 , 6 , 1 ,\n    2 , 5 , 1 , 1 , 6 , 1 , 2 , 6 ,\n    1 , 2 , 8 , 2 , 2 , 4 , 2 , 2 ,\n    6 , 1 , 4 , 6 , 1 , 4 , 0xC7 , 0xFF\n};\n\n\n\n/*\n\nInd  | phoneme |  flags   |\n-----|---------|----------|\n0    |   *     | 00000000 |\n1    |  .*     | 00000000 |\n2    |  ?*     | 00000000 |\n3    |  ,*     | 00000000 |\n4    |  -*     | 00000000 |\n\nVOWELS\n5    |  IY     | 10100100 |\n6    |  IH     | 10100100 |\n7    |  EH     | 10100100 |\n8    |  AE     | 10100100 |\n9    |  AA     | 10100100 |\n10   |  AH     | 10100100 |\n11   |  AO     | 10000100 |\n17   |  OH     | 10000100 |\n12   |  UH     | 10000100 |\n16   |  UX     | 10000100 |\n15   |  ER     | 10000100 |\n13   |  AX     | 10100100 |\n14   |  IX     | 10100100 |\n\nDIPHTONGS\n48   |  EY     | 10110100 |\n49   |  AY     | 10110100 |\n50   |  OY     | 10110100 |\n51   |  AW     | 10010100 |\n52   |  OW     | 10010100 |\n53   |  UW     | 10010100 |\n\n\n21   |  YX     | 10000100 |\n20   |  WX     | 10000100 |\n18   |  RX     | 10000100 |\n19   |  LX     | 10000100 |\n37   |  /X     | 01000000 |\n30   |  DX     | 01001000 |\n\n\n22   |  WH     | 01000100 |\n\n\nVOICED CONSONANTS\n23   |  R*     | 01000100 |\n24   |  L*     | 01000100 |\n25   |  W*     | 01000100 |\n26   |  Y*     | 01000100 |\n27   |  M*     | 01001100 |\n28   |  N*     | 01001100 |\n29   |  NX     | 01001100 |\n54   |  B*     | 01001110 |\n57   |  D*     | 01001110 |\n60   |  G*     | 01001110 |\n44   |  J*     | 01001100 |\n38   |  Z*     | 01000100 |\n39   |  ZH     | 01000100 |\n40   |  V*     | 01000100 |\n41   |  DH     | 01000100 |\n\nunvoiced CONSONANTS\n32   |  S*     | 01000000 |\n33   |  SH     | 01000000 |\n34   |  F*     | 01000000 |\n35   |  TH     | 01000000 |\n66   |  P*     | 01001011 |\n69   |  T*     | 01001011 |\n72   |  K*     | 01001011 |\n42   |  CH     | 01001000 |\n36   |  /H     | 01000000 |\n\n43   |  **     | 01000000 |\n45   |  **     | 01000100 |\n46   |  **     | 00000000 |\n47   |  **     | 00000000 |\n\n\n55   |  **     | 01001110 |\n56   |  **     | 01001110 |\n58   |  **     | 01001110 |\n59   |  **     | 01001110 |\n61   |  **     | 01001110 |\n62   |  **     | 01001110 |\n63   |  GX     | 01001110 |\n64   |  **     | 01001110 |\n65   |  **     | 01001110 |\n67   |  **     | 01001011 |\n68   |  **     | 01001011 |\n70   |  **     | 01001011 |\n71   |  **     | 01001011 |\n73   |  **     | 01001011 |\n74   |  **     | 01001011 |\n75   |  KX     | 01001011 |\n76   |  **     | 01001011 |\n77   |  **     | 01001011 |\n\n\nSPECIAL\n78   |  UL     | 10000000 |\n79   |  UM     | 11000001 |\n80   |  UN     | 11000001 |\n31   |  Q*     | 01001100 |\n\n*/\n\n#endif\n"
  },
  {
    "path": "lib/SAM/debug.c",
    "content": "#include<stdio.h>\n\nextern const unsigned char signInputTable1[];\nextern const unsigned char signInputTable2[];\n\nvoid PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLength, unsigned char *stress)\n{\n    int i = 0;\n    printf(\"===========================================\\n\");\n\n    printf(\"Internal Phoneme presentation:\\n\\n\");\n    printf(\" idx    phoneme  length  stress\\n\");\n    printf(\"------------------------------\\n\");\n\n    while((phonemeindex[i] != 255) && (i < 255))\n    {\n        if (phonemeindex[i] < 81)\n        {\n            printf(\" %3i      %c%c      %3i       %i\\n\",\n            phonemeindex[i],\n            signInputTable1[phonemeindex[i]],\n            signInputTable2[phonemeindex[i]],\n            phonemeLength[i],\n            stress[i]\n            );\n        } else\n        {\n            printf(\" %3i      ??      %3i       %i\\n\", phonemeindex[i], phonemeLength[i], stress[i]);\n        }\n        i++;\n    }\n    printf(\"===========================================\\n\");\n    printf(\"\\n\");\n}\n\nvoid PrintOutput(\n    unsigned char *flag,\n    unsigned char *f1,\n    unsigned char *f2,\n    unsigned char *f3,\n    unsigned char *a1,\n    unsigned char *a2,\n    unsigned char *a3,\n    unsigned char *p)\n{\n    printf(\"===========================================\\n\");\n    printf(\"Final data for speech output:\\n\\n\");\n    int i = 0;\n    printf(\" flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch\\n\");\n    printf(\"------------------------------------------------\\n\");\n    while(i < 255)\n    {\n        printf(\"%5i %5i %5i %5i %5i %5i %5i %5i\\n\", flag[i], a1[i], f1[i], a2[i], f2[i], a3[i], f3[i], p[i]);\n        i++;\n    }\n    printf(\"===========================================\\n\");\n\n}\n\nextern unsigned char GetRuleByte(unsigned short mem62, unsigned char Y);\n\nvoid PrintRule(int offset)\n{\n    int i = 1;\n    unsigned char A = 0;\n    printf(\"Applying rule: \");\n    do\n    {\n        A = GetRuleByte(offset, i);\n        if ((A&127) == '=') printf(\" -> \"); else printf(\"%c\", A&127);\n        i++;\n    } while ((A&128)==0);\n    printf(\"\\n\");\n}\n"
  },
  {
    "path": "lib/SAM/debug.h",
    "content": "#ifndef DEBUG_H\n#define DEBUG_H\n\nvoid PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLength, unsigned char *stress);\nvoid PrintOutput(\n    unsigned char *flag,\n    unsigned char *f1,\n    unsigned char *f2,\n    unsigned char *f3,\n    unsigned char *a1,\n    unsigned char *a2,\n    unsigned char *a3,\n    unsigned char *p);\n\nvoid PrintRule(int offset);\n\n#endif\n"
  },
  {
    "path": "lib/SAM/reciter.c",
    "content": "#include <stdio.h>\n#include <string.h>\n#include \"reciter.h\"\n#include \"ReciterTabs.h\"\n#include \"debug.h\"\n\nextern unsigned char A, X, Y;\nextern int debug;\n\nstatic unsigned char inputtemp[256];   // secure copy of input tab36096\n\nvoid Code37055(unsigned char mem59)\n{\n    X = mem59;\n    X--;\n    A = inputtemp[X];\n    Y = A;\n    A = tab36376[Y];\n    return;\n}\n\nvoid Code37066(unsigned char mem58)\n{\n    X = mem58;\n    X++;\n    A = inputtemp[X];\n    Y = A;\n    A = tab36376[Y];\n}\n\nunsigned char GetRuleByte(unsigned short mem62, unsigned char Y)\n{\n    unsigned int address = mem62;\n\n    if (mem62 >= 37541)\n    {\n        address -= 37541;\n        return rules2[address+Y];\n    }\n    address -= 32000;\n    return rules[address+Y];\n}\n\nint TextToPhonemes(unsigned char *input) // Code36484\n{\n    //unsigned char *tab39445 = &mem[39445];   //input and output\n    //unsigned char mem29;\n    unsigned char mem56;      //output position for phonemes\n    unsigned char mem57;\n    unsigned char mem58;\n    unsigned char mem59;\n    unsigned char mem60;\n    unsigned char mem61;\n    unsigned short mem62;     // memory position of current rule\n\n    unsigned char mem64;      // position of '=' or current character\n    unsigned char mem65;     // position of ')'\n    unsigned char mem66;     // position of '('\n    unsigned char mem36653;\n\n    inputtemp[0] = 32;\n\n    // secure copy of input\n    // because input will be overwritten by phonemes\n    X = 1;\n    Y = 0;\n    do\n    {\n        //pos36499:\n        A = input[Y] & 127;\n        if ( A >= 112) A = A & 95;\n        else if ( A >= 96) A = A & 79;\n\n        inputtemp[X] = A;\n        X++;\n        Y++;\n    } while (Y != 255);\n\n\n    X = 255;\n    inputtemp[X] = 27;\n    mem61 = 255;\n\n\npos36550:\n    A = 255;\n    mem56 = 255;\n\n\npos36554:\n    while(1)\n    {\n        mem61++;\n        X = mem61;\n        A = inputtemp[X];\n        mem64 = A;\n        if (A == '[')\n        {\n            mem56++;\n            X = mem56;\n            A = 155;\n            input[X] = 155;\n            //goto pos36542;\n            //          Code39771();    //Code39777();\n            return 1;\n        }\n\n        //pos36579:\n        if (A != '.') break;\n        X++;\n        Y = inputtemp[X];\n        A = tab36376[Y] & 1;\n        if(A != 0) break;\n        mem56++;\n        X = mem56;\n        A = '.';\n        input[X] = '.';\n    } //while\n\n\n    //pos36607:\n    A = mem64;\n    Y = A;\n    A = tab36376[A];\n    mem57 = A;\n    if((A&2) != 0)\n    {\n        mem62 = 37541;\n        goto pos36700;\n    }\n\n    //pos36630:\n    A = mem57;\n    if(A != 0) goto pos36677;\n    A = 32;\n    inputtemp[X] = ' ';\n    mem56++;\n    X = mem56;\n    if (X > 120) goto pos36654;\n    input[X] = A;\n    goto pos36554;\n\n    // -----\n\n    //36653 is unknown. Contains position\n\npos36654:\n    input[X] = 155;\n    A = mem61;\n    mem36653 = A;\n    //  mem29 = A; // not used\n    //  Code36538(); das ist eigentlich\n    return 1;\n    //Code39771();\n    //go on if there is more input ???\n    mem61 = mem36653;\n    goto pos36550;\n\npos36677:\n    A = mem57 & 128;\n    if(A == 0)\n    {\n        //36683: BRK\n        return 0;\n    }\n\n    // go to the right rules for this character.\n    X = mem64 - 'A';\n    mem62 = tab37489[X] | (tab37515[X]<<8);\n\n    // -------------------------------------\n    // go to next rule\n    // -------------------------------------\n\npos36700:\n\n    // find next rule\n    Y = 0;\n    do\n    {\n        mem62 += 1;\n        A = GetRuleByte(mem62, Y);\n    } while ((A & 128) == 0);\n    Y++;\n\n    //pos36720:\n    // find '('\n    while(1)\n    {\n        A = GetRuleByte(mem62, Y);\n        if (A == '(') break;\n        Y++;\n    }\n    mem66 = Y;\n\n    //pos36732:\n    // find ')'\n    do\n    {\n        Y++;\n        A = GetRuleByte(mem62, Y);\n    } while(A != ')');\n    mem65 = Y;\n\n    //pos36741:\n    // find '='\n    do\n    {\n        Y++;\n        A = GetRuleByte(mem62, Y);\n        A = A & 127;\n    } while (A != '=');\n    mem64 = Y;\n\n    X = mem61;\n    mem60 = X;\n\n    // compare the string within the bracket\n    Y = mem66;\n    Y++;\n    //pos36759:\n    while(1)\n    {\n        mem57 = inputtemp[X];\n        A = GetRuleByte(mem62, Y);\n        if (A != mem57) goto pos36700;\n        Y++;\n        if(Y == mem65) break;\n        X++;\n        mem60 = X;\n    }\n\n// the string in the bracket is correct\n\n//pos36787:\n    A = mem61;\n    mem59 = mem61;\n\npos36791:\n    while(1)\n    {\n        mem66--;\n        Y = mem66;\n        A = GetRuleByte(mem62, Y);\n        mem57 = A;\n        //36800: BPL 36805\n        if ((A & 128) != 0) goto pos37180;\n        X = A & 127;\n        A = tab36376[X] & 128;\n        if (A == 0) break;\n        X = mem59-1;\n        A = inputtemp[X];\n        if (A != mem57) goto pos36700;\n        mem59 = X;\n    }\n\n//pos36833:\n    A = mem57;\n    if (A == ' ') goto pos36895;\n    if (A == '#') goto pos36910;\n    if (A == '.') goto pos36920;\n    if (A == '&') goto pos36935;\n    if (A == '@') goto pos36967;\n    if (A == '^') goto pos37004;\n    if (A == '+') goto pos37019;\n    if (A == ':') goto pos37040;\n    //  Code42041();    //Error\n    //36894: BRK\n    return 0;\n\n    // --------------\n\npos36895:\n    Code37055(mem59);\n    A = A & 128;\n    if(A != 0) goto pos36700;\npos36905:\n    mem59 = X;\n    goto pos36791;\n\n    // --------------\n\npos36910:\n    Code37055(mem59);\n    A = A & 64;\n    if(A != 0) goto pos36905;\n    goto pos36700;\n\n    // --------------\n\n\npos36920:\n    Code37055(mem59);\n    A = A & 8;\n    if(A == 0) goto pos36700;\npos36930:\n    mem59 = X;\n    goto pos36791;\n\n    // --------------\n\npos36935:\n    Code37055(mem59);\n    A = A & 16;\n    if(A != 0) goto pos36930;\n    A = inputtemp[X];\n    if (A != 72) goto pos36700;\n    X--;\n    A = inputtemp[X];\n    if ((A == 67) || (A == 83)) goto pos36930;\n    goto pos36700;\n\n    // --------------\n\npos36967:\n    Code37055(mem59);\n    A = A & 4;\n    if(A != 0) goto pos36930;\n    A = inputtemp[X];\n    if (A != 72) goto pos36700;\n    if ((A != 84) && (A != 67) && (A != 83)) goto pos36700;\n    mem59 = X;\n    goto pos36791;\n\n    // --------------\n\n\npos37004:\n    Code37055(mem59);\n    A = A & 32;\n    if(A == 0) goto pos36700;\n\npos37014:\n    mem59 = X;\n    goto pos36791;\n\n    // --------------\n\npos37019:\n    X = mem59;\n    X--;\n    A = inputtemp[X];\n    if ((A == 'E') || (A == 'I') || (A == 'Y')) goto pos37014;\n    goto pos36700;\n    // --------------\n\npos37040:\n    Code37055(mem59);\n    A = A & 32;\n    if(A == 0) goto pos36791;\n    mem59 = X;\n    goto pos37040;\n\n//---------------------------------------\n\n\npos37077:\n    X = mem58+1;\n    A = inputtemp[X];\n    if (A != 'E') goto pos37157;\n    X++;\n    Y = inputtemp[X];\n    X--;\n    A = tab36376[Y] & 128;\n    if(A == 0) goto pos37108;\n    X++;\n    A = inputtemp[X];\n    if (A != 'R') goto pos37113;\npos37108:\n    mem58 = X;\n    goto pos37184;\npos37113:\n    if ((A == 83) || (A == 68)) goto pos37108;  // 'S' 'D'\n    if (A != 76) goto pos37135; // 'L'\n    X++;\n    A = inputtemp[X];\n    if (A != 89) goto pos36700;\n    goto pos37108;\n\npos37135:\n    if (A != 70) goto pos36700;\n    X++;\n    A = inputtemp[X];\n    if (A != 85) goto pos36700;\n    X++;\n    A = inputtemp[X];\n    if (A == 76) goto pos37108;\n    goto pos36700;\n\npos37157:\n    if (A != 73) goto pos36700;\n    X++;\n    A = inputtemp[X];\n    if (A != 78) goto pos36700;\n    X++;\n    A = inputtemp[X];\n    if (A == 71) goto pos37108;\n    //pos37177:\n    goto pos36700;\n\n    // -----------------------------------------\n\npos37180:\n\n    A = mem60;\n    mem58 = A;\n\npos37184:\n    Y = mem65 + 1;\n\n    //37187: CPY 64\n    //  if(? != 0) goto pos37194;\n    if(Y == mem64) goto pos37455;\n    mem65 = Y;\n    //37196: LDA (62),y\n    A = GetRuleByte(mem62, Y);\n    mem57 = A;\n    X = A;\n    A = tab36376[X] & 128;\n    if(A == 0) goto pos37226;\n    X = mem58+1;\n    A = inputtemp[X];\n    if (A != mem57) goto pos36700;\n    mem58 = X;\n    goto pos37184;\npos37226:\n    A = mem57;\n    if (A == 32) goto pos37295;   // ' '\n    if (A == 35) goto pos37310;   // '#'\n    if (A == 46) goto pos37320;   // '.'\n    if (A == 38) goto pos37335;   // '&'\n    if (A == 64) goto pos37367;   // ''\n    if (A == 94) goto pos37404;   // ''\n    if (A == 43) goto pos37419;   // '+'\n    if (A == 58) goto pos37440;   // ':'\n    if (A == 37) goto pos37077;   // '%'\n    //pos37291:\n    //  Code42041(); //Error\n    //37294: BRK\n    return 0;\n\n    // --------------\npos37295:\n    Code37066(mem58);\n    A = A & 128;\n    if(A != 0) goto pos36700;\npos37305:\n    mem58 = X;\n    goto pos37184;\n\n    // --------------\n\npos37310:\n    Code37066(mem58);\n    A = A & 64;\n    if(A != 0) goto pos37305;\n    goto pos36700;\n\n    // --------------\n\n\npos37320:\n    Code37066(mem58);\n    A = A & 8;\n    if(A == 0) goto pos36700;\n\npos37330:\n    mem58 = X;\n    goto pos37184;\n\n    // --------------\n\npos37335:\n    Code37066(mem58);\n    A = A & 16;\n    if(A != 0) goto pos37330;\n    A = inputtemp[X];\n    if (A != 72) goto pos36700;\n    X++;\n    A = inputtemp[X];\n    if ((A == 67) || (A == 83)) goto pos37330;\n    goto pos36700;\n\n    // --------------\n\n\npos37367:\n    Code37066(mem58);\n    A = A & 4;\n    if(A != 0) goto pos37330;\n    A = inputtemp[X];\n    if (A != 72) goto pos36700;\n    if ((A != 84) && (A != 67) && (A != 83)) goto pos36700;\n    mem58 = X;\n    goto pos37184;\n\n    // --------------\n\npos37404:\n    Code37066(mem58);\n    A = A & 32;\n    if(A == 0) goto pos36700;\npos37414:\n    mem58 = X;\n    goto pos37184;\n\n    // --------------\n\npos37419:\n    X = mem58;\n    X++;\n    A = inputtemp[X];\n    if ((A == 69) || (A == 73) || (A == 89)) goto pos37414;\n    goto pos36700;\n\n// ----------------------\n\npos37440:\n\n    Code37066(mem58);\n    A = A & 32;\n    if(A == 0) goto pos37184;\n    mem58 = X;\n    goto pos37440;\npos37455:\n    Y = mem64;\n    mem61 = mem60;\n\n#ifdef SAM_DEBUG\n        PrintRule(mem62);\n#endif\n\npos37461:\n    //37461: LDA (62),y\n    A = GetRuleByte(mem62, Y);\n    mem57 = A;\n    A = A & 127;\n    if (A != '=')\n    {\n        mem56++;\n        X = mem56;\n        input[X] = A;\n    }\n\n    //37478: BIT 57\n    //37480: BPL 37485  //not negative flag\n    if ((mem57 & 128) == 0) goto pos37485; //???\n    goto pos36554;\npos37485:\n    Y++;\n    goto pos37461;\n}\n"
  },
  {
    "path": "lib/SAM/reciter.h",
    "content": "#ifndef RECITER_C\n#define RECITER_C\n\n//int TextToPhonemes(char *input, char *output);\n\nint TextToPhonemes(unsigned char *input);\n\n#endif\n"
  },
  {
    "path": "lib/SAM/render.c",
    "content": "#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"render.h\"\n#include \"RenderTabs.h\"\n\n#include \"debug.h\"\nextern int debug;\n\nunsigned char wait1 = 7;\nunsigned char wait2 = 6;\n\nextern unsigned char A, X, Y;\nextern unsigned char mem44;\nextern unsigned char mem47;\nextern unsigned char mem49;\nextern unsigned char mem39;\nextern unsigned char mem50;\nextern unsigned char mem51;\nextern unsigned char mem53;\nextern unsigned char mem56;\n\nextern unsigned char speed;\nextern unsigned char pitch;\nextern int singmode;\n\n\nextern unsigned char phonemeIndexOutput[60]; //tab47296\nextern unsigned char stressOutput[60]; //tab47365\nextern unsigned char phonemeLengthOutput[60]; //tab47416\n\nunsigned char pitches[256]; // tab43008\n\nunsigned char frequency1[256];\nunsigned char frequency2[256];\nunsigned char frequency3[256];\n\nunsigned char amplitude1[256];\nunsigned char amplitude2[256];\nunsigned char amplitude3[256];\n\nunsigned char sampledConsonantFlag[256]; // tab44800\n\n\nvoid AddInflection(unsigned char mem48, unsigned char phase1);\nunsigned char trans(unsigned char mem39212, unsigned char mem39213);\n\n\n// contains the final soundbuffer\nextern int bufferpos;\nextern void (*SAM_write_buffer)(int pos, char value);\n\n\n//timetable for more accurate c64 simulation\nint timetable[5][5] =\n{\n    {162, 167, 167, 127, 128},\n    {226, 60, 60, 0, 0},\n    {225, 60, 59, 0, 0},\n    {200, 0, 0, 54, 55},\n    {199, 0, 0, 54, 54}\n};\n\nstatic unsigned oldtimetableindex = 0;\nvoid Output8BitAry(int index, unsigned char ary[5])\n{\n    int k;\n    bufferpos += timetable[oldtimetableindex][index];\n    oldtimetableindex = index;\n    // write a little bit in advance\n    for(k=0; k<5; k++)\n        SAM_write_buffer(bufferpos/50 + k, ary[k]);\n}\nvoid Output8Bit(int index, unsigned char A)\n{\n    unsigned char ary[5] = {A,A,A,A,A};\n    Output8BitAry(index, ary);\n}\n\n\n\n\n\n\n\n\n//written by me because of different table positions.\n// mem[47] = ...\n// 168=pitches\n// 169=frequency1\n// 170=frequency2\n// 171=frequency3\n// 172=amplitude1\n// 173=amplitude2\n// 174=amplitude3\nunsigned char Read(unsigned char p, unsigned char Y)\n{\n    switch(p)\n    {\n    case 168: return pitches[Y];\n    case 169: return frequency1[Y];\n    case 170: return frequency2[Y];\n    case 171: return frequency3[Y];\n    case 172: return amplitude1[Y];\n    case 173: return amplitude2[Y];\n    case 174: return amplitude3[Y];\n    }\n    printf(\"Error reading to tables\");\n    return 0;\n}\n\nvoid Write(unsigned char p, unsigned char Y, unsigned char value)\n{\n\n    switch(p)\n    {\n    case 168: pitches[Y] = value; return;\n    case 169: frequency1[Y] = value;  return;\n    case 170: frequency2[Y] = value;  return;\n    case 171: frequency3[Y] = value;  return;\n    case 172: amplitude1[Y] = value;  return;\n    case 173: amplitude2[Y] = value;  return;\n    case 174: amplitude3[Y] = value;  return;\n    }\n    printf(\"Error writing to tables\\n\");\n}\n\n\n\n// -------------------------------------------------------------------------\n//Code48227\n// Render a sampled sound from the sampleTable.\n//\n//   Phoneme   Sample Start   Sample End\n//   32: S*    15             255\n//   33: SH    257            511\n//   34: F*    559            767\n//   35: TH    583            767\n//   36: /H    903            1023\n//   37: /X    1135           1279\n//   38: Z*    84             119\n//   39: ZH    340            375\n//   40: V*    596            639\n//   41: DH    596            631\n//\n//   42: CH\n//   43: **    399            511\n//\n//   44: J*\n//   45: **    257            276\n//   46: **\n//\n//   66: P*\n//   67: **    743            767\n//   68: **\n//\n//   69: T*\n//   70: **    231            255\n//   71: **\n//\n// The SampledPhonemesTable[] holds flags indicating if a phoneme is\n// voiced or not. If the upper 5 bits are zero, the sample is voiced.\n//\n// Samples in the sampleTable are compressed, with bits being converted to\n// bytes from high bit to low, as follows:\n//\n//   unvoiced 0 bit   -> X\n//   unvoiced 1 bit   -> 5\n//\n//   voiced 0 bit     -> 6\n//   voiced 1 bit     -> 24\n//\n// Where X is a value from the table:\n//\n//   { 0x18, 0x1A, 0x17, 0x17, 0x17 };\n//\n// The index into this table is determined by masking off the lower\n// 3 bits from the SampledPhonemesTable:\n//\n//        index = (SampledPhonemesTable[i] & 7) - 1;\n//\n// For voices samples, samples are interleaved between voiced output.\n\n\n// Code48227()\nvoid RenderSample(unsigned char *mem66)\n{\n    int tempA;\n    // current phoneme's index\n    mem49 = Y;\n\n    // mask low three bits and subtract 1 get value to\n    // convert 0 bits on unvoiced samples.\n    A = mem39&7;\n    X = A-1;\n\n    // store the result\n    mem56 = X;\n\n    // determine which offset to use from table { 0x18, 0x1A, 0x17, 0x17, 0x17 }\n    // T, S, Z                0          0x18\n    // CH, J, SH, ZH          1          0x1A\n    // P, F*, V, TH, DH       2          0x17\n    // /H                     3          0x17\n    // /X                     4          0x17\n\n    // get value from the table\n    mem53 = tab48426[X];\n    mem47 = X;      //46016+mem[56]*256\n\n    // voiced sample?\n    A = mem39 & 248;\n    if(A == 0)\n    {\n        // voiced phoneme: Z*, ZH, V*, DH\n        Y = mem49;\n        A = pitches[mem49] >> 4;\n\n        // jump to voiced portion\n        goto pos48315;\n    }\n\n    Y = A ^ 255;\npos48274:\n\n    // step through the 8 bits in the sample\n    mem56 = 8;\n\n    // get the next sample from the table\n    // mem47*256 = offset to start of samples\n    A = sampleTable[mem47*256+Y];\npos48280:\n\n    // left shift to get the high bit\n    tempA = A;\n    A = A << 1;\n    //48281: BCC 48290\n\n    // bit not set?\n    if ((tempA & 128) == 0)\n    {\n        // convert the bit to value from table\n        X = mem53;\n        //mem[54296] = X;\n        // output the byte\n        Output8Bit(1, (X&0x0f) * 16);\n        // if X != 0, exit loop\n        if(X != 0) goto pos48296;\n    }\n\n    // output a 5 for the on bit\n    Output8Bit(2, 5 * 16);\n\n    //48295: NOP\npos48296:\n\n    X = 0;\n\n    // decrement counter\n    mem56--;\n\n    // if not done, jump to top of loop\n    if (mem56 != 0) goto pos48280;\n\n    // increment position\n    Y++;\n    if (Y != 0) goto pos48274;\n\n    // restore values and return\n    mem44 = 1;\n    Y = mem49;\n    return;\n\n\n    unsigned char phase1;\n\npos48315:\n// handle voiced samples here\n\n   // number of samples?\n    phase1 = A ^ 255;\n\n    Y = *mem66;\n    do\n    {\n        //pos48321:\n\n        // shift through all 8 bits\n        mem56 = 8;\n        //A = Read(mem47, Y);\n\n        // fetch value from table\n        A = sampleTable[mem47*256+Y];\n\n        // loop 8 times\n        //pos48327:\n        do\n        {\n            //48327: ASL A\n            //48328: BCC 48337\n\n            // left shift and check high bit\n            tempA = A;\n            A = A << 1;\n            if ((tempA & 128) != 0)\n            {\n                // if bit set, output 26\n                X = 26;\n                Output8Bit(3, (X&0xf)*16);\n            } else\n            {\n                //timetable 4\n                // bit is not set, output a 6\n                X=6;\n                Output8Bit(4, (X&0xf)*16);\n            }\n\n            mem56--;\n        } while(mem56 != 0);\n\n        // move ahead in the table\n        Y++;\n\n        // continue until counter done\n        phase1++;\n\n    } while (phase1 != 0);\n    //  if (phase1 != 0) goto pos48321;\n\n    // restore values and return\n    A = 1;\n    mem44 = 1;\n    *mem66 = Y;\n    Y = mem49;\n    return;\n}\n\n\n\n// RENDER THE PHONEMES IN THE LIST\n//\n// The phoneme list is converted into sound through the steps:\n//\n// 1. Copy each phoneme <length> number of times into the frames list,\n//    where each frame represents 10 milliseconds of sound.\n//\n// 2. Determine the transitions lengths between phonemes, and linearly\n//    interpolate the values across the frames.\n//\n// 3. Offset the pitches by the fundamental frequency.\n//\n// 4. Render the each frame.\n\n\n\n//void Code47574()\nvoid Render()\n{\n    unsigned char phase1 = 0;  //mem43\n    unsigned char phase2=0;\n    unsigned char phase3=0;\n    unsigned char mem66=0;\n    unsigned char mem38=0;\n    unsigned char mem40=0;\n    unsigned char speedcounter=0; //mem45\n    unsigned char mem48=0;\n    int i;\n    if (phonemeIndexOutput[0] == 255) return; //exit if no data\n\n    A = 0;\n    X = 0;\n    mem44 = 0;\n\n\n// CREATE FRAMES\n//\n// The length parameter in the list corresponds to the number of frames\n// to expand the phoneme to. Each frame represents 10 milliseconds of time.\n// So a phoneme with a length of 7 = 7 frames = 70 milliseconds duration.\n//\n// The parameters are copied from the phoneme to the frame verbatim.\n\n\n// pos47587:\ndo\n{\n    // get the index\n    Y = mem44;\n    // get the phoneme at the index\n    A = phonemeIndexOutput[mem44];\n    mem56 = A;\n\n    // if terminal phoneme, exit the loop\n    if (A == 255) break;\n\n    // period phoneme *.\n    if (A == 1)\n    {\n       // add rising inflection\n        A = 1;\n        mem48 = 1;\n        //goto pos48376;\n        AddInflection(mem48, phase1);\n    }\n    /*\n    if (A == 2) goto pos48372;\n    */\n\n    // question mark phoneme?\n    if (A == 2)\n    {\n        // create falling inflection\n        mem48 = 255;\n        AddInflection(mem48, phase1);\n    }\n    //  pos47615:\n\n    // get the stress amount (more stress = higher pitch)\n    phase1 = tab47492[stressOutput[Y] + 1];\n\n    // get number of frames to write\n    phase2 = phonemeLengthOutput[Y];\n    Y = mem56;\n\n    // copy from the source to the frames list\n    do\n    {\n        frequency1[X] = freq1data[Y];     // F1 frequency\n        frequency2[X] = freq2data[Y];     // F2 frequency\n        frequency3[X] = freq3data[Y];     // F3 frequency\n        amplitude1[X] = ampl1data[Y];     // F1 amplitude\n        amplitude2[X] = ampl2data[Y];     // F2 amplitude\n        amplitude3[X] = ampl3data[Y];     // F3 amplitude\n        sampledConsonantFlag[X] = sampledConsonantFlags[Y];        // phoneme data for sampled consonants\n        pitches[X] = pitch + phase1;      // pitch\n        X++;\n        phase2--;\n    } while(phase2 != 0);\n    mem44++;\n} while(mem44 != 0);\n// -------------------\n//pos47694:\n\n// CREATE TRANSITIONS\n//\n// Linear transitions are now created to smoothly connect the\n// end of one sustained portion of a phoneme to the following\n// phoneme.\n//\n// To do this, three tables are used:\n//\n//  Table         Purpose\n//  =========     ==================================================\n//  blendRank     Determines which phoneme's blend values are used.\n//\n//  blendOut      The number of frames at the end of the phoneme that\n//                will be used to transition to the following phoneme.\n//\n//  blendIn       The number of frames of the following phoneme that\n//                will be used to transition into that phoneme.\n//\n// In creating a transition between two phonemes, the phoneme\n// with the HIGHEST rank is used. Phonemes are ranked on how much\n// their identity is based on their transitions. For example,\n// vowels are and diphthongs are identified by their sustained portion,\n// rather than the transitions, so they are given low values. In contrast,\n// stop consonants (P, B, T, K) and glides (Y, L) are almost entirely\n// defined by their transitions, and are given high rank values.\n//\n// Here are the rankings used by SAM:\n//\n//     Rank    Type                         Phonemes\n//     2       All vowels                   IY, IH, etc.\n//     5       Diphthong endings            YX, WX, ER\n//     8       Terminal liquid consonants   LX, WX, YX, N, NX\n//     9       Liquid consonants            L, RX, W\n//     10      Glide                        R, OH\n//     11      Glide                        WH\n//     18      Voiceless fricatives         S, SH, F, TH\n//     20      Voiced fricatives            Z, ZH, V, DH\n//     23      Plosives, stop consonants    P, T, K, KX, DX, CH\n//     26      Stop consonants              J, GX, B, D, G\n//     27-29   Stop consonants (internal)   **\n//     30      Unvoiced consonants          /H, /X and Q*\n//     160     Nasal                        M\n//\n// To determine how many frames to use, the two phonemes are\n// compared using the blendRank[] table. The phoneme with the\n// higher rank is selected. In case of a tie, a blend of each is used:\n//\n//      if blendRank[phoneme1] ==  blendRank[phomneme2]\n//          // use lengths from each phoneme\n//          outBlendFrames = outBlend[phoneme1]\n//          inBlendFrames = outBlend[phoneme2]\n//      else if blendRank[phoneme1] > blendRank[phoneme2]\n//          // use lengths from first phoneme\n//          outBlendFrames = outBlendLength[phoneme1]\n//          inBlendFrames = inBlendLength[phoneme1]\n//      else\n//          // use lengths from the second phoneme\n//          // note that in and out are SWAPPED!\n//          outBlendFrames = inBlendLength[phoneme2]\n//          inBlendFrames = outBlendLength[phoneme2]\n//\n// Blend lengths can't be less than zero.\n//\n// Transitions are assumed to be symetrical, so if the transition\n// values for the second phoneme are used, the inBlendLength and\n// outBlendLength values are SWAPPED.\n//\n// For most of the parameters, SAM interpolates over the range of the last\n// outBlendFrames-1 and the first inBlendFrames.\n//\n// The exception to this is the Pitch[] parameter, which is interpolates the\n// pitch from the CENTER of the current phoneme to the CENTER of the next\n// phoneme.\n//\n// Here are two examples. First, For example, consider the word \"SUN\" (S AH N)\n//\n//    Phoneme   Duration    BlendWeight    OutBlendFrames    InBlendFrames\n//    S         2           18             1                 3\n//    AH        8           2              4                 4\n//    N         7           8              1                 2\n//\n// The formant transitions for the output frames are calculated as follows:\n//\n//     flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch\n//    ------------------------------------------------\n// S\n//    241     0     6     0    73     0    99    61   Use S (weight 18) for transition instead of AH (weight 2)\n//    241     0     6     0    73     0    99    61   <-- (OutBlendFrames-1) = (1-1) = 0 frames\n// AH\n//      0     2    10     2    66     0    96    59 * <-- InBlendFrames = 3 frames\n//      0     4    14     3    59     0    93    57 *\n//      0     8    18     5    52     0    90    55 *\n//      0    15    22     9    44     1    87    53\n//      0    15    22     9    44     1    87    53\n//      0    15    22     9    44     1    87    53   Use N (weight 8) for transition instead of AH (weight 2).\n//      0    15    22     9    44     1    87    53   Since N is second phoneme, reverse the IN and OUT values.\n//      0    11    17     8    47     1    98    56 * <-- (InBlendFrames-1) = (2-1) = 1 frames\n// N\n//      0     8    12     6    50     1   109    58 * <-- OutBlendFrames = 1\n//      0     5     6     5    54     0   121    61\n//      0     5     6     5    54     0   121    61\n//      0     5     6     5    54     0   121    61\n//      0     5     6     5    54     0   121    61\n//      0     5     6     5    54     0   121    61\n//      0     5     6     5    54     0   121    61\n//\n// Now, consider the reverse \"NUS\" (N AH S):\n//\n//     flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch\n//    ------------------------------------------------\n// N\n//     0     5     6     5    54     0   121    61\n//     0     5     6     5    54     0   121    61\n//     0     5     6     5    54     0   121    61\n//     0     5     6     5    54     0   121    61\n//     0     5     6     5    54     0   121    61\n//     0     5     6     5    54     0   121    61   Use N (weight 8) for transition instead of AH (weight 2)\n//     0     5     6     5    54     0   121    61   <-- (OutBlendFrames-1) = (1-1) = 0 frames\n// AH\n//     0     8    11     6    51     0   110    59 * <-- InBlendFrames = 2\n//     0    11    16     8    48     0    99    56 *\n//     0    15    22     9    44     1    87    53   Use S (weight 18) for transition instead of AH (weight 2)\n//     0    15    22     9    44     1    87    53   Since S is second phoneme, reverse the IN and OUT values.\n//     0     9    18     5    51     1    90    55 * <-- (InBlendFrames-1) = (3-1) = 2\n//     0     4    14     3    58     1    93    57 *\n// S\n//   241     2    10     2    65     1    96    59 * <-- OutBlendFrames = 1\n//   241     0     6     0    73     0    99    61\n\n    A = 0;\n    mem44 = 0;\n    mem49 = 0; // mem49 starts at as 0\n    X = 0;\n    while(1) //while No. 1\n    {\n\n        // get the current and following phoneme\n        Y = phonemeIndexOutput[X];\n        A = phonemeIndexOutput[X+1];\n        X++;\n\n        // exit loop at end token\n        if (A == 255) break;//goto pos47970;\n\n\n        // get the ranking of each phoneme\n        X = A;\n        mem56 = blendRank[A];\n        A = blendRank[Y];\n\n        // compare the rank - lower rank value is stronger\n        if (A == mem56)\n        {\n            // same rank, so use out blend lengths from each phoneme\n            phase1 = outBlendLength[Y];\n            phase2 = outBlendLength[X];\n        } else\n        if (A < mem56)\n        {\n            // first phoneme is stronger, so us it's blend lengths\n            phase1 = inBlendLength[X];\n            phase2 = outBlendLength[X];\n        } else\n        {\n            // second phoneme is stronger, so use it's blend lengths\n            // note the out/in are swapped\n            phase1 = outBlendLength[Y];\n            phase2 = inBlendLength[Y];\n        }\n\n        Y = mem44;\n        A = mem49 + phonemeLengthOutput[mem44]; // A is mem49 + length\n        mem49 = A; // mem49 now holds length + position\n        A = A + phase2; //Maybe Problem because of carry flag\n\n        //47776: ADC 42\n        speedcounter = A;\n        mem47 = 168;\n        phase3 = mem49 - phase1; // what is mem49\n        A = phase1 + phase2; // total transition?\n        mem38 = A;\n\n        X = A;\n        X -= 2;\n        if ((X & 128) == 0)\n        do   //while No. 2\n        {\n            //pos47810:\n\n          // mem47 is used to index the tables:\n          // 168  pitches[]\n          // 169  frequency1\n          // 170  frequency2\n          // 171  frequency3\n          // 172  amplitude1\n          // 173  amplitude2\n          // 174  amplitude3\n\n            mem40 = mem38;\n\n            if (mem47 == 168)     // pitch\n            {\n\n               // unlike the other values, the pitches[] interpolates from\n               // the middle of the current phoneme to the middle of the\n               // next phoneme\n\n                unsigned char mem36, mem37;\n                // half the width of the current phoneme\n                mem36 = phonemeLengthOutput[mem44] >> 1;\n                // half the width of the next phoneme\n                mem37 = phonemeLengthOutput[mem44+1] >> 1;\n                // sum the values\n                mem40 = mem36 + mem37; // length of both halves\n                mem37 += mem49; // center of next phoneme\n                mem36 = mem49 - mem36; // center index of current phoneme\n                A = Read(mem47, mem37); // value at center of next phoneme - end interpolation value\n                //A = mem[address];\n\n                Y = mem36; // start index of interpolation\n                mem53 = A - Read(mem47, mem36); // value to center of current phoneme\n            } else\n            {\n                // value to interpolate to\n                A = Read(mem47, speedcounter);\n                // position to start interpolation from\n                Y = phase3;\n                // value to interpolate from\n                mem53 = A - Read(mem47, phase3);\n            }\n\n            //Code47503(mem40);\n            // ML : Code47503 is division with remainder, and mem50 gets the sign\n\n            // calculate change per frame\n            signed char m53 = (signed char)mem53;\n            mem50 = mem53 & 128;\n            unsigned char m53abs = abs(m53);\n            mem51 = m53abs % mem40; //abs((char)m53) % mem40;\n            mem53 = (unsigned char)((signed char)(m53) / mem40);\n\n            // interpolation range\n            X = mem40; // number of frames to interpolate over\n            Y = phase3; // starting frame\n\n\n            // linearly interpolate values\n\n            mem56 = 0;\n            //47907: CLC\n            //pos47908:\n            while(1)     //while No. 3\n            {\n                A = Read(mem47, Y) + mem53; //carry alway cleared\n\n                mem48 = A;\n                Y++;\n                X--;\n                if(X == 0) break;\n\n                mem56 += mem51;\n                if (mem56 >= mem40)  //???\n                {\n                    mem56 -= mem40; //carry? is set\n                    //if ((mem56 & 128)==0)\n                    if ((mem50 & 128)==0)\n                    {\n                        //47935: BIT 50\n                        //47937: BMI 47943\n                        if(mem48 != 0) mem48++;\n                    } else mem48--;\n                }\n                //pos47945:\n                Write(mem47, Y, mem48);\n            } //while No. 3\n\n            //pos47952:\n            mem47++;\n            //if (mem47 != 175) goto pos47810;\n        } while (mem47 != 175);     //while No. 2\n        //pos47963:\n        mem44++;\n        X = mem44;\n    }  //while No. 1\n\n    //goto pos47701;\n    //pos47970:\n\n    // add the length of this phoneme\n    mem48 = mem49 + phonemeLengthOutput[mem44];\n\n\n// ASSIGN PITCH CONTOUR\n//\n// This subtracts the F1 frequency from the pitch to create a\n// pitch contour. Without this, the output would be at a single\n// pitch level (monotone).\n\n\n    // don't adjust pitch if in sing mode\n    if (!singmode)\n    {\n        // iterate through the buffer\n        for(i=0; i<256; i++) {\n            // subtract half the frequency of the formant 1.\n            // this adds variety to the voice\n            pitches[i] -= (frequency1[i] >> 1);\n        }\n    }\n\n    phase1 = 0;\n    phase2 = 0;\n    phase3 = 0;\n    mem49 = 0;\n    speedcounter = 72; //sam standard speed\n\n// RESCALE AMPLITUDE\n//\n// Rescale volume from a linear scale to decibels.\n//\n\n    //amplitude rescaling\n    for(i=255; i>=0; i--)\n    {\n        amplitude1[i] = amplitudeRescale[amplitude1[i]];\n        amplitude2[i] = amplitudeRescale[amplitude2[i]];\n        amplitude3[i] = amplitudeRescale[amplitude3[i]];\n    }\n\n    Y = 0;\n    A = pitches[0];\n    mem44 = A;\n    X = A;\n    mem38 = A - (A>>2);     // 3/4*A ???\n\n#ifdef SAM_DEBUG\n    PrintOutput(sampledConsonantFlag, frequency1, frequency2, frequency3, amplitude1, amplitude2, amplitude3, pitches);\n#endif\n\n// PROCESS THE FRAMES\n//\n// In traditional vocal synthesis, the glottal pulse drives filters, which\n// are attenuated to the frequencies of the formants.\n//\n// SAM generates these formants directly with sin and rectangular waves.\n// To simulate them being driven by the glottal pulse, the waveforms are\n// reset at the beginning of each glottal pulse.\n\n    //finally the loop for sound output\n    //pos48078:\n    while(1)\n    {\n        // get the sampled information on the phoneme\n        A = sampledConsonantFlag[Y];\n        mem39 = A;\n\n        // unvoiced sampled phoneme?\n        A = A & 248;\n        if(A != 0)\n        {\n            // render the sample for the phoneme\n            RenderSample(&mem66);\n\n            // skip ahead two in the phoneme buffer\n            Y += 2;\n            mem48 -= 2;\n        } else\n        {\n            // simulate the glottal pulse and formants\n            unsigned char ary[5];\n            unsigned int p1 = phase1 * 256; // Fixed point integers because we need to divide later on\n            unsigned int p2 = phase2 * 256;\n            unsigned int p3 = phase3 * 256;\n            int k;\n            for (k=0; k<5; k++) {\n                signed char sp1 = (signed char)sinus[0xff & (p1>>8)];\n                signed char sp2 = (signed char)sinus[0xff & (p2>>8)];\n                signed char rp3 = (signed char)rectangle[0xff & (p3>>8)];\n                signed int sin1 = sp1 * ((unsigned char)amplitude1[Y] & 0x0f);\n                signed int sin2 = sp2 * ((unsigned char)amplitude2[Y] & 0x0f);\n                signed int rect = rp3 * ((unsigned char)amplitude3[Y] & 0x0f);\n                signed int mux = sin1 + sin2 + rect;\n                mux /= 32;\n                mux += 128; // Go from signed to unsigned amplitude\n                ary[k] = mux;\n                p1 += frequency1[Y] * 256 / 4; // Compromise, this becomes a shift and works well\n                p2 += frequency2[Y] * 256 / 4;\n                p3 += frequency3[Y] * 256 / 4;\n            }\n            // output the accumulated value\n            Output8BitAry(0, ary);\n            speedcounter--;\n            if (speedcounter != 0) goto pos48155;\n            Y++; //go to next amplitude\n\n            // decrement the frame count\n            mem48--;\n        }\n\n        // if the frame count is zero, exit the loop\n        if(mem48 == 0)  return;\n        speedcounter = speed;\npos48155:\n\n        // decrement the remaining length of the glottal pulse\n        mem44--;\n\n        // finished with a glottal pulse?\n        if(mem44 == 0)\n        {\npos48159:\n            // fetch the next glottal pulse length\n            A = pitches[Y];\n            mem44 = A;\n            A = A - (A>>2);\n            mem38 = A;\n\n            // reset the formant wave generators to keep them in\n            // sync with the glottal pulse\n            phase1 = 0;\n            phase2 = 0;\n            phase3 = 0;\n            continue;\n        }\n\n        // decrement the count\n        mem38--;\n\n        // is the count non-zero and the sampled flag is zero?\n        if((mem38 != 0) || (mem39 == 0))\n        {\n            // reset the phase of the formants to match the pulse\n            phase1 += frequency1[Y];\n            phase2 += frequency2[Y];\n            phase3 += frequency3[Y];\n            continue;\n        }\n\n        // voiced sampled phonemes interleave the sample with the\n        // glottal pulse. The sample flag is non-zero, so render\n        // the sample for the phoneme.\n        RenderSample(&mem66);\n        goto pos48159;\n    } //while\n\n\n    // The following code is never reached. It's left over from when\n    // the voiced sample code was part of this loop, instead of part\n    // of RenderSample();\n\n    //pos48315:\n    int tempA;\n    phase1 = A ^ 255;\n    Y = mem66;\n    do\n    {\n        //pos48321:\n\n        mem56 = 8;\n        A = Read(mem47, Y);\n\n        //pos48327:\n        do\n        {\n            //48327: ASL A\n            //48328: BCC 48337\n            tempA = A;\n            A = A << 1;\n            if ((tempA & 128) != 0)\n            {\n                X = 26;\n                // mem[54296] = X;\n                bufferpos += 150;\n                SAM_write_buffer(bufferpos/50, (X & 15)*16);\n            } else\n            {\n                //mem[54296] = 6;\n                X=6;\n                bufferpos += 150;\n                SAM_write_buffer(bufferpos/50, (X & 15)*16);\n            }\n\n            for(X = wait2; X>0; X--); //wait\n            mem56--;\n        } while(mem56 != 0);\n\n        Y++;\n        phase1++;\n\n    } while (phase1 != 0);\n    //  if (phase1 != 0) goto pos48321;\n    A = 1;\n    mem44 = 1;\n    mem66 = Y;\n    Y = mem49;\n    return;\n}\n\n\n// Create a rising or falling inflection 30 frames prior to\n// index X. A rising inflection is used for questions, and\n// a falling inflection is used for statements.\n\nvoid AddInflection(unsigned char mem48, unsigned char phase1)\n{\n    //pos48372:\n    //  mem48 = 255;\n//pos48376:\n\n    // store the location of the punctuation\n    mem49 = X;\n    A = X;\n    int Atemp = A;\n\n    // backup 30 frames\n    A = A - 30;\n    // if index is before buffer, point to start of buffer\n    if (Atemp <= 30) A=0;\n    X = A;\n\n    // FIXME: Explain this fix better, it's not obvious\n    // ML : A =, fixes a problem with invalid pitch with '.'\n    while( (A=pitches[X]) == 127) X++;\n\n\npos48398:\n    //48398: CLC\n    //48399: ADC 48\n\n    // add the inflection direction\n    A += mem48;\n    phase1 = A;\n\n    // set the inflection\n    pitches[X] = A;\npos48406:\n\n    // increment the position\n    X++;\n\n    // exit if the punctuation has been reached\n    if (X == mem49) return; //goto pos47615;\n    if (pitches[X] == 255) goto pos48406;\n    A = phase1;\n    goto pos48398;\n}\n\n/*\n    SAM's voice can be altered by changing the frequencies of the\n    mouth formant (F1) and the throat formant (F2). Only the voiced\n    phonemes (5-29 and 48-53) are altered.\n*/\nvoid SetMouthThroat(unsigned char mouth, unsigned char throat)\n{\n    unsigned char initialFrequency;\n    unsigned char newFrequency = 0;\n    //unsigned char mouth; //mem38880\n    //unsigned char throat; //mem38881\n\n    // mouth formants (F1) 5..29\n    unsigned char mouthFormants5_29[30] = {\n        0, 0, 0, 0, 0, 10,\n        14, 19, 24, 27, 23, 21, 16, 20, 14, 18, 14, 18, 18,\n        16, 13, 15, 11, 18, 14, 11, 9, 6, 6, 6};\n\n    // throat formants (F2) 5..29\n    unsigned char throatFormants5_29[30] = {\n    255, 255,\n    255, 255, 255, 84, 73, 67, 63, 40, 44, 31, 37, 45, 73, 49,\n    36, 30, 51, 37, 29, 69, 24, 50, 30, 24, 83, 46, 54, 86};\n\n    // there must be no zeros in this 2 tables\n    // formant 1 frequencies (mouth) 48..53\n    unsigned char mouthFormants48_53[6] = {19, 27, 21, 27, 18, 13};\n\n    // formant 2 frequencies (throat) 48..53\n    unsigned char throatFormants48_53[6] = {72, 39, 31, 43, 30, 34};\n\n    unsigned char pos = 5; //mem39216\n//pos38942:\n    // recalculate formant frequencies 5..29 for the mouth (F1) and throat (F2)\n    while(pos != 30)\n    {\n        // recalculate mouth frequency\n        initialFrequency = mouthFormants5_29[pos];\n        if (initialFrequency != 0) newFrequency = trans(mouth, initialFrequency);\n        freq1data[pos] = newFrequency;\n\n        // recalculate throat frequency\n        initialFrequency = throatFormants5_29[pos];\n        if(initialFrequency != 0) newFrequency = trans(throat, initialFrequency);\n        freq2data[pos] = newFrequency;\n        pos++;\n    }\n\n//pos39059:\n    // recalculate formant frequencies 48..53\n    pos = 48;\n    Y = 0;\n    while(pos != 54)\n    {\n        // recalculate F1 (mouth formant)\n        initialFrequency = mouthFormants48_53[Y];\n        newFrequency = trans(mouth, initialFrequency);\n        freq1data[pos] = newFrequency;\n\n        // recalculate F2 (throat formant)\n        initialFrequency = throatFormants48_53[Y];\n        newFrequency = trans(throat, initialFrequency);\n        freq2data[pos] = newFrequency;\n        Y++;\n        pos++;\n    }\n}\n\n\n//return = (mem39212*mem39213) >> 1\nunsigned char trans(unsigned char mem39212, unsigned char mem39213)\n{\n    //pos39008:\n    unsigned char carry;\n    int temp;\n    unsigned char mem39214, mem39215;\n    A = 0;\n    mem39215 = 0;\n    mem39214 = 0;\n    X = 8;\n    do\n    {\n        carry = mem39212 & 1;\n        mem39212 = mem39212 >> 1;\n        if (carry != 0)\n        {\n            /*\n                        39018: LSR 39212\n                        39021: BCC 39033\n                        */\n            carry = 0;\n            A = mem39215;\n            temp = (int)A + (int)mem39213;\n            A = A + mem39213;\n            if (temp > 255) carry = 1;\n            mem39215 = A;\n        }\n        temp = mem39215 & 1;\n        mem39215 = (mem39215 >> 1) | (carry?128:0);\n        carry = temp;\n        //39033: ROR 39215\n        X--;\n    } while (X != 0);\n    temp = mem39214 & 128;\n    mem39214 = (mem39214 << 1) | (carry?1:0);\n    carry = temp;\n    temp = mem39215 & 128;\n    mem39215 = (mem39215 << 1) | (carry?1:0);\n    carry = temp;\n\n    return mem39215;\n}\n"
  },
  {
    "path": "lib/SAM/render.h",
    "content": "#ifndef RENDER_H\n#define RENDER_H\n\nvoid Render();\nvoid SetMouthThroat(unsigned char mouth, unsigned char throat);\n\n#endif\n"
  },
  {
    "path": "lib/SAM/sam.c",
    "content": "#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include \"debug.h\"\n#include \"sam.h\"\n#include \"render.h\"\n#include \"SamTabs.h\"\n\nchar input[256]; //tab39445\n//standard sam sound\nunsigned char speed = 72;\nunsigned char pitch = 64;\nunsigned char mouth = 128;\nunsigned char throat = 128;\n\nint singmode = 0;\nint debug = 0;\n\nunsigned char mem39;\nunsigned char mem44;\nunsigned char mem47;\nunsigned char mem49;\nunsigned char mem50;\nunsigned char mem51;\nunsigned char mem53;\nunsigned char mem56;\n\nunsigned char mem59=0;\n\nunsigned char A, X, Y;\n\nunsigned char stress[256]; //numbers from 0 to 8\nunsigned char phonemeLength[256]; //tab40160\nunsigned char phonemeindex[256];\n\nunsigned char phonemeIndexOutput[60]; //tab47296\nunsigned char stressOutput[60]; //tab47365\nunsigned char phonemeLengthOutput[60]; //tab47416\n\n\n\n\n// contains the final soundbuffer\nint bufferpos=0;\nchar *buffer = NULL;\n\n\nvoid SetInput(char *_input)\n{\n    int i, l;\n    l = strlen(_input);\n    if (l > 254) l = 254;\n    for(i=0; i<l; i++)\n        input[i] = _input[i];\n    input[l] = 0;\n}\n\nvoid SetSpeed(unsigned char _speed) {speed = _speed;}\nvoid SetPitch(unsigned char _pitch) {pitch = _pitch;}\nvoid SetMouth(unsigned char _mouth) {mouth = _mouth;}\nvoid SetThroat(unsigned char _throat) {throat = _throat;}\nvoid EnableSingmode() {singmode = 1;}\nchar* GetBuffer(){return buffer;}\nint GetBufferLength(){return bufferpos;}\n\nvoid Init();\nint Parser1();\nvoid Parser2();\nint SAMMain();\nvoid CopyStress();\nvoid SetPhonemeLength();\nvoid AdjustLengths();\nvoid Code41240();\nvoid Insert(unsigned char position, unsigned char mem60, unsigned char mem59, unsigned char mem58);\nvoid InsertBreath();\nvoid PrepareOutput();\nvoid SetMouthThroat(unsigned char mouth, unsigned char throat);\n\n// 168=pitches\n// 169=frequency1\n// 170=frequency2\n// 171=frequency3\n// 172=amplitude1\n// 173=amplitude2\n// 174=amplitude3\n\nvoid (*SAM_write_buffer)(int pos, char value) = NULL;\n\nvoid write_buffer(int pos, char value)\n{\n    buffer[pos] = value;\n}\n\nvoid Init()\n{\n    int i;\n    SetMouthThroat( mouth, throat);\n\n    bufferpos = 0;\n    // TODO, check for free the memory, 10 seconds of output should be more than enough\n\n    if(SAM_write_buffer == NULL)\n    {\n        buffer = (char*)malloc(22050*10);\n        SAM_write_buffer = write_buffer;\n    }\n\n    /*\n    freq2data = &mem[45136];\n    freq1data = &mem[45056];\n    freq3data = &mem[45216];\n    */\n    //pitches = &mem[43008];\n    /*\n    frequency1 = &mem[43264];\n    frequency2 = &mem[43520];\n    frequency3 = &mem[43776];\n    */\n    /*\n    amplitude1 = &mem[44032];\n    amplitude2 = &mem[44288];\n    amplitude3 = &mem[44544];\n    */\n    //phoneme = &mem[39904];\n    /*\n    ampl1data = &mem[45296];\n    ampl2data = &mem[45376];\n    ampl3data = &mem[45456];\n    */\n\n    for(i=0; i<256; i++)\n    {\n        stress[i] = 0;\n        phonemeLength[i] = 0;\n    }\n\n    for(i=0; i<60; i++)\n    {\n        phonemeIndexOutput[i] = 0;\n        stressOutput[i] = 0;\n        phonemeLengthOutput[i] = 0;\n    }\n    phonemeindex[255] = 255; //to prevent buffer overflow // ML : changed from 32 to 255 to stop freezing with long inputs\n\n}\n\n\n//int Code39771()\nint SAMMain()\n{\n    Init();\n    phonemeindex[255] = 32; //to prevent buffer overflow\n\n    if (!Parser1()) return 0;\n#ifdef SAM_DEBUG\n        PrintPhonemes(phonemeindex, phonemeLength, stress);\n#endif\n    Parser2();\n    CopyStress();\n    SetPhonemeLength();\n    AdjustLengths();\n    Code41240();\n    do\n    {\n        A = phonemeindex[X];\n        if (A > 80)\n        {\n            phonemeindex[X] = 255;\n            break; // error: delete all behind it\n        }\n        X++;\n    } while (X != 0);\n\n    //pos39848:\n    InsertBreath();\n\n    //mem[40158] = 255;\n#ifdef SAM_DEBUG\n        PrintPhonemes(phonemeindex, phonemeLength, stress);\n#endif\n\n    PrepareOutput();\n\n    return 1;\n}\n\n\n//void Code48547()\nvoid PrepareOutput()\n{\n    A = 0;\n    X = 0;\n    Y = 0;\n\n    //pos48551:\n    while(1)\n    {\n        A = phonemeindex[X];\n        if (A == 255)\n        {\n            A = 255;\n            phonemeIndexOutput[Y] = 255;\n            Render();\n            return;\n        }\n        if (A == 254)\n        {\n            X++;\n            int temp = X;\n            //mem[48546] = X;\n            phonemeIndexOutput[Y] = 255;\n            Render();\n            //X = mem[48546];\n            X=temp;\n            Y = 0;\n            continue;\n        }\n\n        if (A == 0)\n        {\n            X++;\n            continue;\n        }\n\n        phonemeIndexOutput[Y] = A;\n        phonemeLengthOutput[Y] = phonemeLength[X];\n        stressOutput[Y] = stress[X];\n        X++;\n        Y++;\n    }\n}\n\n//void Code48431()\nvoid InsertBreath()\n{\n    unsigned char mem54;\n    unsigned char mem55;\n    unsigned char index; //variable Y\n    mem54 = 255;\n    X++;\n    mem55 = 0;\n    unsigned char mem66 = 0;\n    while(1)\n    {\n        //pos48440:\n        X = mem66;\n        index = phonemeindex[X];\n        if (index == 255) return;\n        mem55 += phonemeLength[X];\n\n        if (mem55 < 232)\n        {\n            if (index != 254) // ML : Prevents an index out of bounds problem\n            {\n                A = flags2[index]&1;\n                if(A != 0)\n                {\n                    X++;\n                    mem55 = 0;\n                    Insert(X, 254, mem59, 0);\n                    mem66++;\n                    mem66++;\n                    continue;\n                }\n            }\n            if (index == 0) mem54 = X;\n            mem66++;\n            continue;\n        }\n        X = mem54;\n        phonemeindex[X] = 31;   // 'Q*' glottal stop\n        phonemeLength[X] = 4;\n        stress[X] = 0;\n        X++;\n        mem55 = 0;\n        Insert(X, 254, mem59, 0);\n        X++;\n        mem66 = X;\n    }\n\n}\n\n// Iterates through the phoneme buffer, copying the stress value from\n// the following phoneme under the following circumstance:\n\n//     1. The current phoneme is voiced, excluding plosives and fricatives\n//     2. The following phoneme is voiced, excluding plosives and fricatives, and\n//     3. The following phoneme is stressed\n//\n//  In those cases, the stress value+1 from the following phoneme is copied.\n//\n// For example, the word LOITER is represented as LOY5TER, with as stress\n// of 5 on the diphtong OY. This routine will copy the stress value of 6 (5+1)\n// to the L that precedes it.\n\n\n//void Code41883()\nvoid CopyStress()\n{\n    // loop thought all the phonemes to be output\n    unsigned char pos=0; //mem66\n    while(1)\n    {\n        // get the phomene\n        Y = phonemeindex[pos];\n\n        // exit at end of buffer\n        if (Y == 255) return;\n\n        // if CONSONANT_FLAG set, skip - only vowels get stress\n        if ((flags[Y] & 64) == 0) {pos++; continue;}\n        // get the next phoneme\n        Y = phonemeindex[pos+1];\n        if (Y == 255) //prevent buffer overflow\n        {\n            pos++; continue;\n        } else\n        // if the following phoneme is a vowel, skip\n        if ((flags[Y] & 128) == 0)  {pos++; continue;}\n\n        // get the stress value at the next position\n        Y = stress[pos+1];\n\n        // if next phoneme is not stressed, skip\n        if (Y == 0)  {pos++; continue;}\n\n        // if next phoneme is not a VOWEL OR ER, skip\n        if ((Y & 128) != 0)  {pos++; continue;}\n\n        // copy stress from prior phoneme to this one\n        stress[pos] = Y+1;\n\n        // advance pointer\n        pos++;\n    }\n\n}\n\n\n//void Code41014()\nvoid Insert(unsigned char position/*var57*/, unsigned char mem60, unsigned char mem59, unsigned char mem58)\n{\n    int i;\n    for(i=253; i >= position; i--) // ML : always keep last safe-guarding 255\n    {\n        phonemeindex[i+1] = phonemeindex[i];\n        phonemeLength[i+1] = phonemeLength[i];\n        stress[i+1] = stress[i];\n    }\n\n    phonemeindex[position] = mem60;\n    phonemeLength[position] = mem59;\n    stress[position] = mem58;\n    return;\n}\n\n// The input[] buffer contains a string of phonemes and stress markers along\n// the lines of:\n//\n//     DHAX KAET IHZ AH5GLIY. <0x9B>\n//\n// The byte 0x9B marks the end of the buffer. Some phonemes are 2 bytes\n// long, such as \"DH\" and \"AX\". Others are 1 byte long, such as \"T\" and \"Z\".\n// There are also stress markers, such as \"5\" and \".\".\n//\n// The first character of the phonemes are stored in the table signInputTable1[].\n// The second character of the phonemes are stored in the table signInputTable2[].\n// The stress characters are arranged in low to high stress order in stressInputTable[].\n//\n// The following process is used to parse the input[] buffer:\n//\n// Repeat until the <0x9B> character is reached:\n//\n//        First, a search is made for a 2 character match for phonemes that do not\n//        end with the '*' (wildcard) character. On a match, the index of the phoneme\n//        is added to phonemeIndex[] and the buffer position is advanced 2 bytes.\n//\n//        If this fails, a search is made for a 1 character match against all\n//        phoneme names ending with a '*' (wildcard). If this succeeds, the\n//        phoneme is added to phonemeIndex[] and the buffer position is advanced\n//        1 byte.\n//\n//        If this fails, search for a 1 character match in the stressInputTable[].\n//        If this succeeds, the stress value is placed in the last stress[] table\n//        at the same index of the last added phoneme, and the buffer position is\n//        advanced by 1 byte.\n//\n//        If this fails, return a 0.\n//\n// On success:\n//\n//    1. phonemeIndex[] will contain the index of all the phonemes.\n//    2. The last index in phonemeIndex[] will be 255.\n//    3. stress[] will contain the stress value for each phoneme\n\n// input[] holds the string of phonemes, each two bytes wide\n// signInputTable1[] holds the first character of each phoneme\n// signInputTable2[] holds te second character of each phoneme\n// phonemeIndex[] holds the indexes of the phonemes after parsing input[]\n//\n// The parser scans through the input[], finding the names of the phonemes\n// by searching signInputTable1[] and signInputTable2[]. On a match, it\n// copies the index of the phoneme into the phonemeIndexTable[].\n//\n// The character <0x9B> marks the end of text in input[]. When it is reached,\n// the index 255 is placed at the end of the phonemeIndexTable[], and the\n// function returns with a 1 indicating success.\nint Parser1()\n{\n    int i;\n    unsigned char sign1;\n    unsigned char sign2;\n    unsigned char position = 0;\n    X = 0;\n    A = 0;\n    Y = 0;\n\n    // CLEAR THE STRESS TABLE\n    for(i=0; i<256; i++)\n        stress[i] = 0;\n\n  // THIS CODE MATCHES THE PHONEME LETTERS TO THE TABLE\n    // pos41078:\n    while(1)\n    {\n        // GET THE FIRST CHARACTER FROM THE PHONEME BUFFER\n        sign1 = input[X];\n        // TEST FOR 155 (�) END OF LINE MARKER\n        if (sign1 == 155)\n        {\n           // MARK ENDPOINT AND RETURN\n            phonemeindex[position] = 255;      //mark endpoint\n            // REACHED END OF PHONEMES, SO EXIT\n            return 1;       //all ok\n        }\n\n        // GET THE NEXT CHARACTER FROM THE BUFFER\n        X++;\n        sign2 = input[X];\n\n        // NOW sign1 = FIRST CHARACTER OF PHONEME, AND sign2 = SECOND CHARACTER OF PHONEME\n\n       // TRY TO MATCH PHONEMES ON TWO TWO-CHARACTER NAME\n       // IGNORE PHONEMES IN TABLE ENDING WITH WILDCARDS\n\n       // SET INDEX TO 0\n        Y = 0;\npos41095:\n\n         // GET FIRST CHARACTER AT POSITION Y IN signInputTable\n         // --> should change name to PhonemeNameTable1\n        A = signInputTable1[Y];\n\n        // FIRST CHARACTER MATCHES?\n        if (A == sign1)\n        {\n           // GET THE CHARACTER FROM THE PhonemeSecondLetterTable\n            A = signInputTable2[Y];\n            // NOT A SPECIAL AND MATCHES SECOND CHARACTER?\n            if ((A != '*') && (A == sign2))\n            {\n               // STORE THE INDEX OF THE PHONEME INTO THE phomeneIndexTable\n                phonemeindex[position] = Y;\n\n                // ADVANCE THE POINTER TO THE phonemeIndexTable\n                position++;\n                // ADVANCE THE POINTER TO THE phonemeInputBuffer\n                X++;\n\n                // CONTINUE PARSING\n                continue;\n            }\n        }\n\n        // NO MATCH, TRY TO MATCH ON FIRST CHARACTER TO WILDCARD NAMES (ENDING WITH '*')\n\n        // ADVANCE TO THE NEXT POSITION\n        Y++;\n        // IF NOT END OF TABLE, CONTINUE\n        if (Y != 81) goto pos41095;\n\n// REACHED END OF TABLE WITHOUT AN EXACT (2 CHARACTER) MATCH.\n// THIS TIME, SEARCH FOR A 1 CHARACTER MATCH AGAINST THE WILDCARDS\n\n// RESET THE INDEX TO POINT TO THE START OF THE PHONEME NAME TABLE\n        Y = 0;\npos41134:\n// DOES THE PHONEME IN THE TABLE END WITH '*'?\n        if (signInputTable2[Y] == '*')\n        {\n// DOES THE FIRST CHARACTER MATCH THE FIRST LETTER OF THE PHONEME\n            if (signInputTable1[Y] == sign1)\n            {\n                // SAVE THE POSITION AND MOVE AHEAD\n                phonemeindex[position] = Y;\n\n                // ADVANCE THE POINTER\n                position++;\n\n                // CONTINUE THROUGH THE LOOP\n                continue;\n            }\n        }\n        Y++;\n        if (Y != 81) goto pos41134; //81 is size of PHONEME NAME table\n\n// FAILED TO MATCH WITH A WILDCARD. ASSUME THIS IS A STRESS\n// CHARACTER. SEARCH THROUGH THE STRESS TABLE\n\n        // SET INDEX TO POSITION 8 (END OF STRESS TABLE)\n        Y = 8;\n\n       // WALK BACK THROUGH TABLE LOOKING FOR A MATCH\n        while( (sign1 != stressInputTable[Y]) && (Y>0))\n        {\n  // DECREMENT INDEX\n            Y--;\n        }\n\n        // REACHED THE END OF THE SEARCH WITHOUT BREAKING OUT OF LOOP?\n        if (Y == 0)\n        {\n            //mem[39444] = X;\n            //41181: JSR 42043 //Error\n           // FAILED TO MATCH ANYTHING, RETURN 0 ON FAILURE\n            return 0;\n        }\n// SET THE STRESS FOR THE PRIOR PHONEME\n        stress[position-1] = Y;\n    } //while\n}\n\n\n\n\n//change phonemelength depedendent on stress\n//void Code41203()\nvoid SetPhonemeLength()\n{\n    unsigned char A;\n    int position = 0;\n    while(phonemeindex[position] != 255 )\n    {\n        A = stress[position];\n        //41218: BMI 41229\n        if ((A == 0) || ((A&128) != 0))\n        {\n            phonemeLength[position] = phonemeLengthTable[phonemeindex[position]];\n        } else\n        {\n            phonemeLength[position] = phonemeStressedLengthTable[phonemeindex[position]];\n        }\n        position++;\n    }\n}\n\n\nvoid Code41240()\n{\n    unsigned char pos=0;\n\n    while(phonemeindex[pos] != 255)\n    {\n        unsigned char index; //register AC\n        X = pos;\n        index = phonemeindex[pos];\n        if ((flags[index]&2) == 0)\n        {\n            pos++;\n            continue;\n        } else\n        if ((flags[index]&1) == 0)\n        {\n            Insert(pos+1, index+1, phonemeLengthTable[index+1], stress[pos]);\n            Insert(pos+2, index+2, phonemeLengthTable[index+2], stress[pos]);\n            pos += 3;\n            continue;\n        }\n\n        do\n        {\n            X++;\n            A = phonemeindex[X];\n        } while(A==0);\n\n        if (A != 255)\n        {\n            if ((flags[A] & 8) != 0)  {pos++; continue;}\n            if ((A == 36) || (A == 37)) {pos++; continue;} // '/H' '/X'\n        }\n\n        Insert(pos+1, index+1, phonemeLengthTable[index+1], stress[pos]);\n        Insert(pos+2, index+2, phonemeLengthTable[index+2], stress[pos]);\n        pos += 3;\n    };\n\n}\n\n// Rewrites the phonemes using the following rules:\n//\n//       <DIPHTONG ENDING WITH WX> -> <DIPHTONG ENDING WITH WX> WX\n//       <DIPHTONG NOT ENDING WITH WX> -> <DIPHTONG NOT ENDING WITH WX> YX\n//       UL -> AX L\n//       UM -> AX M\n//       <STRESSED VOWEL> <SILENCE> <STRESSED VOWEL> -> <STRESSED VOWEL> <SILENCE> Q <VOWEL>\n//       T R -> CH R\n//       D R -> J R\n//       <VOWEL> R -> <VOWEL> RX\n//       <VOWEL> L -> <VOWEL> LX\n//       G S -> G Z\n//       K <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> KX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\n//       G <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> GX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\n//       S P -> S B\n//       S T -> S D\n//       S K -> S G\n//       S KX -> S GX\n//       <ALVEOLAR> UW -> <ALVEOLAR> UX\n//       CH -> CH CH' (CH requires two phonemes to represent it)\n//       J -> J J' (J requires two phonemes to represent it)\n//       <UNSTRESSED VOWEL> T <PAUSE> -> <UNSTRESSED VOWEL> DX <PAUSE>\n//       <UNSTRESSED VOWEL> D <PAUSE>  -> <UNSTRESSED VOWEL> DX <PAUSE>\n\n\n//void Code41397()\nvoid Parser2()\n{\n    if (debug) printf(\"Parser2\\n\");\n    unsigned char pos = 0; //mem66;\n    unsigned char mem58 = 0;\n\n\n  // Loop through phonemes\n    while(1)\n    {\n// SET X TO THE CURRENT POSITION\n        X = pos;\n// GET THE PHONEME AT THE CURRENT POSITION\n        A = phonemeindex[pos];\n\n// DEBUG: Print phoneme and index\n        if (debug && A != 255) printf(\"%d: %c%c\\n\", X, signInputTable1[A], signInputTable2[A]);\n\n// Is phoneme pause?\n        if (A == 0)\n        {\n// Move ahead to the\n            pos++;\n            continue;\n        }\n\n// If end of phonemes flag reached, exit routine\n        if (A == 255) return;\n\n// Copy the current phoneme index to Y\n        Y = A;\n\n// RULE:\n//       <DIPHTONG ENDING WITH WX> -> <DIPHTONG ENDING WITH WX> WX\n//       <DIPHTONG NOT ENDING WITH WX> -> <DIPHTONG NOT ENDING WITH WX> YX\n// Example: OIL, COW\n\n\n// Check for DIPHTONG\n        if ((flags[A] & 16) == 0) goto pos41457;\n\n// Not a diphthong. Get the stress\n        mem58 = stress[pos];\n\n// End in IY sound?\n        A = flags[Y] & 32;\n\n// If ends with IY, use YX, else use WX\n        if (A == 0) A = 20; else A = 21;    // 'WX' = 20 'YX' = 21\n        //pos41443:\n// Insert at WX or YX following, copying the stress\n\n        if (debug) if (A==20) printf(\"RULE: insert WX following diphtong NOT ending in IY sound\\n\");\n        if (debug) if (A==21) printf(\"RULE: insert YX following diphtong ending in IY sound\\n\");\n        Insert(pos+1, A, mem59, mem58);\n        X = pos;\n// Jump to ???\n        goto pos41749;\n\n\n\npos41457:\n\n// RULE:\n//       UL -> AX L\n// Example: MEDDLE\n\n// Get phoneme\n        A = phonemeindex[X];\n// Skip this rule if phoneme is not UL\n        if (A != 78) goto pos41487;  // 'UL'\n        A = 24;         // 'L'                 //change 'UL' to 'AX L'\n\n        if (debug) printf(\"RULE: UL -> AX L\\n\");\n\npos41466:\n// Get current phoneme stress\n        mem58 = stress[X];\n\n// Change UL to AX\n        phonemeindex[X] = 13;  // 'AX'\n// Perform insert. Note code below may jump up here with different values\n        Insert(X+1, A, mem59, mem58);\n        pos++;\n// Move to next phoneme\n        continue;\n\npos41487:\n\n// RULE:\n//       UM -> AX M\n// Example: ASTRONOMY\n\n// Skip rule if phoneme != UM\n        if (A != 79) goto pos41495;   // 'UM'\n        // Jump up to branch - replaces current phoneme with AX and continues\n        A = 27; // 'M'  //change 'UM' to  'AX M'\n        if (debug) printf(\"RULE: UM -> AX M\\n\");\n        goto pos41466;\npos41495:\n\n// RULE:\n//       UN -> AX N\n// Example: FUNCTION\n\n\n// Skip rule if phoneme != UN\n        if (A != 80) goto pos41503; // 'UN'\n\n        // Jump up to branch - replaces current phoneme with AX and continues\n        A = 28;         // 'N' //change UN to 'AX N'\n        if (debug) printf(\"RULE: UN -> AX N\\n\");\n        goto pos41466;\npos41503:\n\n// RULE:\n//       <STRESSED VOWEL> <SILENCE> <STRESSED VOWEL> -> <STRESSED VOWEL> <SILENCE> Q <VOWEL>\n// EXAMPLE: AWAY EIGHT\n\n        Y = A;\n// VOWEL set?\n        A = flags[A] & 128;\n\n// Skip if not a vowel\n        if (A != 0)\n        {\n// Get the stress\n            A = stress[X];\n\n// If stressed...\n            if (A != 0)\n            {\n// Get the following phoneme\n                X++;\n                A = phonemeindex[X];\n// If following phoneme is a pause\n\n                if (A == 0)\n                {\n// Get the phoneme following pause\n                    X++;\n                    Y = phonemeindex[X];\n\n// Check for end of buffer flag\n                    if (Y == 255) //buffer overflow\n// ??? Not sure about these flags\n                        A = 65&128;\n                    else\n// And VOWEL flag to current phoneme's flags\n                        A = flags[Y] & 128;\n\n// If following phonemes is not a pause\n                    if (A != 0)\n                    {\n// If the following phoneme is not stressed\n                        A = stress[X];\n                        if (A != 0)\n                        {\n// Insert a glottal stop and move forward\n                            if (debug) printf(\"RULE: Insert glottal stop between two stressed vowels with space between them\\n\");\n                            // 31 = 'Q'\n                            Insert(X, 31, mem59, 0);\n                            pos++;\n                            continue;\n                        }\n                    }\n                }\n            }\n        }\n\n\n// RULES FOR PHONEMES BEFORE R\n//        T R -> CH R\n// Example: TRACK\n\n\n// Get current position and phoneme\n        X = pos;\n        A = phonemeindex[pos];\n        if (A != 23) goto pos41611;     // 'R'\n\n// Look at prior phoneme\n        X--;\n        A = phonemeindex[pos-1];\n        //pos41567:\n        if (A == 69)                    // 'T'\n        {\n// Change T to CH\n            if (debug) printf(\"RULE: T R -> CH R\\n\");\n            phonemeindex[pos-1] = 42;\n            goto pos41779;\n        }\n\n\n// RULES FOR PHONEMES BEFORE R\n//        D R -> J R\n// Example: DRY\n\n// Prior phonemes D?\n        if (A == 57)                    // 'D'\n        {\n// Change D to J\n            phonemeindex[pos-1] = 44;\n            if (debug) printf(\"RULE: D R -> J R\\n\");\n            goto pos41788;\n        }\n\n// RULES FOR PHONEMES BEFORE R\n//        <VOWEL> R -> <VOWEL> RX\n// Example: ART\n\n\n// If vowel flag is set change R to RX\n        A = flags[A] & 128;\n        if (debug) printf(\"RULE: R -> RX\\n\");\n        if (A != 0) phonemeindex[pos] = 18;  // 'RX'\n\n// continue to next phoneme\n        pos++;\n        continue;\n\npos41611:\n\n// RULE:\n//       <VOWEL> L -> <VOWEL> LX\n// Example: ALL\n\n// Is phoneme L?\n        if (A == 24)    // 'L'\n        {\n// If prior phoneme does not have VOWEL flag set, move to next phoneme\n            if ((flags[phonemeindex[pos-1]] & 128) == 0) {pos++; continue;}\n// Prior phoneme has VOWEL flag set, so change L to LX and move to next phoneme\n            if (debug) printf(\"RULE: <VOWEL> L -> <VOWEL> LX\\n\");\n            phonemeindex[X] = 19;     // 'LX'\n            pos++;\n            continue;\n        }\n\n// RULE:\n//       G S -> G Z\n//\n// Can't get to fire -\n//       1. The G -> GX rule intervenes\n//       2. Reciter already replaces GS -> GZ\n\n// Is current phoneme S?\n        if (A == 32)    // 'S'\n        {\n// If prior phoneme is not G, move to next phoneme\n            if (phonemeindex[pos-1] != 60) {pos++; continue;}\n// Replace S with Z and move on\n            if (debug) printf(\"RULE: G S -> G Z\\n\");\n            phonemeindex[pos] = 38;    // 'Z'\n            pos++;\n            continue;\n        }\n\n// RULE:\n//             K <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> KX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\n// Example: COW\n\n// Is current phoneme K?\n        if (A == 72)    // 'K'\n        {\n// Get next phoneme\n            Y = phonemeindex[pos+1];\n// If at end, replace current phoneme with KX\n            if (Y == 255) phonemeindex[pos] = 75; // ML : prevents an index out of bounds problem\n            else\n            {\n// VOWELS AND DIPHTONGS ENDING WITH IY SOUND flag set?\n                A = flags[Y] & 32;\n                if (debug) if (A==0) printf(\"RULE: K <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> KX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\\n\");\n// Replace with KX\n                if (A == 0) phonemeindex[pos] = 75;  // 'KX'\n            }\n        }\n        else\n\n// RULE:\n//             G <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> GX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\n// Example: GO\n\n\n// Is character a G?\n        if (A == 60)   // 'G'\n        {\n// Get the following character\n            unsigned char index = phonemeindex[pos+1];\n\n// At end of buffer?\n            if (index == 255) //prevent buffer overflow\n            {\n                pos++; continue;\n            }\n            else\n// If diphtong ending with YX, move continue processing next phoneme\n            if ((flags[index] & 32) != 0) {pos++; continue;}\n// replace G with GX and continue processing next phoneme\n            if (debug) printf(\"RULE: G <VOWEL OR DIPHTONG NOT ENDING WITH IY> -> GX <VOWEL OR DIPHTONG NOT ENDING WITH IY>\\n\");\n            phonemeindex[pos] = 63; // 'GX'\n            pos++;\n            continue;\n        }\n\n// RULE:\n//      S P -> S B\n//      S T -> S D\n//      S K -> S G\n//      S KX -> S GX\n// Examples: SPY, STY, SKY, SCOWL\n\n        Y = phonemeindex[pos];\n        //pos41719:\n// Replace with softer version?\n        A = flags[Y] & 1;\n        if (A == 0) goto pos41749;\n        A = phonemeindex[pos-1];\n        if (A != 32)    // 'S'\n        {\n            A = Y;\n            goto pos41812;\n        }\n        // Replace with softer version\n        if (debug) printf(\"RULE: S* %c%c -> S* %c%c\\n\", signInputTable1[Y], signInputTable2[Y],signInputTable1[Y-12], signInputTable2[Y-12]);\n        phonemeindex[pos] = Y-12;\n        pos++;\n        continue;\n\n\npos41749:\n\n// RULE:\n//      <ALVEOLAR> UW -> <ALVEOLAR> UX\n//\n// Example: NEW, DEW, SUE, ZOO, THOO, TOO\n\n//       UW -> UX\n\n        A = phonemeindex[X];\n        if (A == 53)    // 'UW'\n        {\n// ALVEOLAR flag set?\n            Y = phonemeindex[X-1];\n            A = flags2[Y] & 4;\n// If not set, continue processing next phoneme\n            if (A == 0) {pos++; continue;}\n            if (debug) printf(\"RULE: <ALVEOLAR> UW -> <ALVEOLAR> UX\\n\");\n            phonemeindex[X] = 16;\n            pos++;\n            continue;\n        }\npos41779:\n\n// RULE:\n//       CH -> CH CH' (CH requires two phonemes to represent it)\n// Example: CHEW\n\n        if (A == 42)    // 'CH'\n        {\n            //        pos41783:\n            if (debug) printf(\"CH -> CH CH+1\\n\");\n            Insert(X+1, A+1, mem59, stress[X]);\n            pos++;\n            continue;\n        }\n\npos41788:\n\n// RULE:\n//       J -> J J' (J requires two phonemes to represent it)\n// Example: JAY\n\n\n        if (A == 44) // 'J'\n        {\n            if (debug) printf(\"J -> J J+1\\n\");\n            Insert(X+1, A+1, mem59, stress[X]);\n            pos++;\n            continue;\n        }\n\n// Jump here to continue\npos41812:\n\n// RULE: Soften T following vowel\n// NOTE: This rule fails for cases such as \"ODD\"\n//       <UNSTRESSED VOWEL> T <PAUSE> -> <UNSTRESSED VOWEL> DX <PAUSE>\n//       <UNSTRESSED VOWEL> D <PAUSE>  -> <UNSTRESSED VOWEL> DX <PAUSE>\n// Example: PARTY, TARDY\n\n\n// Past this point, only process if phoneme is T or D\n\n        if (A != 69)    // 'T'\n        if (A != 57) {pos++; continue;}       // 'D'\n        //pos41825:\n\n\n// If prior phoneme is not a vowel, continue processing phonemes\n        if ((flags[phonemeindex[X-1]] & 128) == 0) {pos++; continue;}\n\n// Get next phoneme\n        X++;\n        A = phonemeindex[X];\n        //pos41841\n// Is the next phoneme a pause?\n        if (A != 0)\n        {\n// If next phoneme is not a pause, continue processing phonemes\n            if ((flags[A] & 128) == 0) {pos++; continue;}\n// If next phoneme is stressed, continue processing phonemes\n// FIXME: How does a pause get stressed?\n            if (stress[X] != 0) {pos++; continue;}\n//pos41856:\n// Set phonemes to DX\n        if (debug) printf(\"RULE: Soften T or D following vowel or ER and preceding a pause -> DX\\n\");\n        phonemeindex[pos] = 30;       // 'DX'\n        } else\n        {\n            A = phonemeindex[X+1];\n            if (A == 255) //prevent buffer overflow\n                A = 65 & 128;\n            else\n// Is next phoneme a vowel or ER?\n                A = flags[A] & 128;\n            if (debug) if (A != 0) printf(\"RULE: Soften T or D following vowel or ER and preceding a pause -> DX\\n\");\n            if (A != 0) phonemeindex[pos] = 30;  // 'DX'\n        }\n\n        pos++;\n\n    } // while\n}\n\n\n// Applies various rules that adjust the lengths of phonemes\n//\n//         Lengthen <FRICATIVE> or <VOICED> between <VOWEL> and <PUNCTUATION> by 1.5\n//         <VOWEL> <RX | LX> <CONSONANT> - decrease <VOWEL> length by 1\n//         <VOWEL> <UNVOICED PLOSIVE> - decrease vowel by 1/8th\n//         <VOWEL> <UNVOICED CONSONANT> - increase vowel by 1/2 + 1\n//         <NASAL> <STOP CONSONANT> - set nasal = 5, consonant = 6\n//         <VOICED STOP CONSONANT> {optional silence} <STOP CONSONANT> - shorten both to 1/2 + 1\n//         <LIQUID CONSONANT> <DIPHTONG> - decrease by 2\n\n\n//void Code48619()\nvoid AdjustLengths()\n{\n\n    // LENGTHEN VOWELS PRECEDING PUNCTUATION\n    //\n    // Search for punctuation. If found, back up to the first vowel, then\n    // process all phonemes between there and up to (but not including) the punctuation.\n    // If any phoneme is found that is a either a fricative or voiced, the duration is\n    // increased by (length * 1.5) + 1\n\n    // loop index\n    X = 0;\n    unsigned char index;\n\n    // iterate through the phoneme list\n    unsigned char loopIndex=0;\n    while(1)\n    {\n        // get a phoneme\n        index = phonemeindex[X];\n\n        // exit loop if end on buffer token\n        if (index == 255) break;\n\n        // not punctuation?\n        if((flags2[index] & 1) == 0)\n        {\n            // skip\n            X++;\n            continue;\n        }\n\n        // hold index\n        loopIndex = X;\n\n        // Loop backwards from this point\npos48644:\n\n        // back up one phoneme\n        X--;\n\n        // stop once the beginning is reached\n        if(X == 0) break;\n\n        // get the preceding phoneme\n        index = phonemeindex[X];\n\n        if (index != 255) //inserted to prevent access overrun\n        if((flags[index] & 128) == 0) goto pos48644; // if not a vowel, continue looping\n\n        //pos48657:\n        do\n        {\n            // test for vowel\n            index = phonemeindex[X];\n\n            if (index != 255)//inserted to prevent access overrun\n            // test for fricative/unvoiced or not voiced\n            if(((flags2[index] & 32) == 0) || ((flags[index] & 4) != 0))     //nochmal �berpr�fen\n            {\n                //A = flags[Y] & 4;\n                //if(A == 0) goto pos48688;\n\n                // get the phoneme length\n                A = phonemeLength[X];\n\n                // change phoneme length to (length * 1.5) + 1\n                A = (A >> 1) + A + 1;\nif (debug) printf(\"RULE: Lengthen <FRICATIVE> or <VOICED> between <VOWEL> and <PUNCTUATION> by 1.5\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\n\n                phonemeLength[X] = A;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\n\n            }\n            // keep moving forward\n            X++;\n        } while (X != loopIndex);\n        //  if (X != loopIndex) goto pos48657;\n        X++;\n    }  // while\n\n    // Similar to the above routine, but shorten vowels under some circumstances\n\n    // Loop throught all phonemes\n    loopIndex = 0;\n    //pos48697\n\n    while(1)\n    {\n        // get a phoneme\n        X = loopIndex;\n        index = phonemeindex[X];\n\n        // exit routine at end token\n        if (index == 255) return;\n\n        // vowel?\n        A = flags[index] & 128;\n        if (A != 0)\n        {\n            // get next phoneme\n            X++;\n            index = phonemeindex[X];\n\n            // get flags\n            if (index == 255)\n            mem56 = 65; // use if end marker\n            else\n            mem56 = flags[index];\n\n            // not a consonant\n            if ((flags[index] & 64) == 0)\n            {\n                // RX or LX?\n                if ((index == 18) || (index == 19))  // 'RX' & 'LX'\n                {\n                    // get the next phoneme\n                    X++;\n                    index = phonemeindex[X];\n\n                    // next phoneme a consonant?\n                    if ((flags[index] & 64) != 0) {\n                        // RULE: <VOWEL> RX | LX <CONSONANT>\n\n\nif (debug) printf(\"RULE: <VOWEL> <RX | LX> <CONSONANT> - decrease length by 1\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", loopIndex, signInputTable1[phonemeindex[loopIndex]], signInputTable2[phonemeindex[loopIndex]], phonemeLength[loopIndex]);\n\n                        // decrease length of vowel by 1 frame\n                        phonemeLength[loopIndex]--;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", loopIndex, signInputTable1[phonemeindex[loopIndex]], signInputTable2[phonemeindex[loopIndex]], phonemeLength[loopIndex]);\n\n                    }\n                    // move ahead\n                    loopIndex++;\n                    continue;\n                }\n                // move ahead\n                loopIndex++;\n                continue;\n            }\n\n\n            // Got here if not <VOWEL>\n\n            // not voiced\n            if ((mem56 & 4) == 0)\n            {\n\n                 // Unvoiced\n                 // *, .*, ?*, ,*, -*, DX, S*, SH, F*, TH, /H, /X, CH, P*, T*, K*, KX\n\n                // not an unvoiced plosive?\n                if((mem56 & 1) == 0) {\n                    // move ahead\n                    loopIndex++;\n                    continue;\n                }\n\n                // P*, T*, K*, KX\n\n\n                // RULE: <VOWEL> <UNVOICED PLOSIVE>\n                // <VOWEL> <P*, T*, K*, KX>\n\n                // move back\n                X--;\n\nif (debug) printf(\"RULE: <VOWEL> <UNVOICED PLOSIVE> - decrease vowel by 1/8th\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]],  phonemeLength[X]);\n\n                // decrease length by 1/8th\n                mem56 = phonemeLength[X] >> 3;\n                phonemeLength[X] -= mem56;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\n\n                // move ahead\n                loopIndex++;\n                continue;\n            }\n\n            // RULE: <VOWEL> <VOICED CONSONANT>\n            // <VOWEL> <WH, R*, L*, W*, Y*, M*, N*, NX, DX, Q*, Z*, ZH, V*, DH, J*, B*, D*, G*, GX>\n\nif (debug) printf(\"RULE: <VOWEL> <VOICED CONSONANT> - increase vowel by 1/2 + 1\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X-1, signInputTable1[phonemeindex[X-1]], signInputTable2[phonemeindex[X-1]],  phonemeLength[X-1]);\n\n            // decrease length\n            A = phonemeLength[X-1];\n            phonemeLength[X-1] = (A >> 2) + A + 1;     // 5/4*A + 1\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X-1, signInputTable1[phonemeindex[X-1]], signInputTable2[phonemeindex[X-1]], phonemeLength[X-1]);\n\n            // move ahead\n            loopIndex++;\n            continue;\n\n        }\n\n\n        // WH, R*, L*, W*, Y*, M*, N*, NX, Q*, Z*, ZH, V*, DH, J*, B*, D*, G*, GX\n\n//pos48821:\n\n        // RULE: <NASAL> <STOP CONSONANT>\n        //       Set punctuation length to 6\n        //       Set stop consonant length to 5\n\n        // nasal?\n        if((flags2[index] & 8) != 0)\n        {\n\n            // M*, N*, NX,\n\n            // get the next phoneme\n            X++;\n            index = phonemeindex[X];\n\n            // end of buffer?\n            if (index == 255)\n               A = 65&2;  //prevent buffer overflow\n            else\n                A = flags[index] & 2; // check for stop consonant\n\n\n            // is next phoneme a stop consonant?\n            if (A != 0)\n\n               // B*, D*, G*, GX, P*, T*, K*, KX\n\n            {\nif (debug) printf(\"RULE: <NASAL> <STOP CONSONANT> - set nasal = 5, consonant = 6\\n\");\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X-1, signInputTable1[phonemeindex[X-1]], signInputTable2[phonemeindex[X-1]], phonemeLength[X-1]);\n\n                // set stop consonant length to 6\n                phonemeLength[X] = 6;\n\n                // set nasal length to 5\n                phonemeLength[X-1] = 5;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X-1, signInputTable1[phonemeindex[X-1]], signInputTable2[phonemeindex[X-1]], phonemeLength[X-1]);\n\n            }\n            // move to next phoneme\n            loopIndex++;\n            continue;\n        }\n\n\n        // WH, R*, L*, W*, Y*, Q*, Z*, ZH, V*, DH, J*, B*, D*, G*, GX\n\n        // RULE: <VOICED STOP CONSONANT> {optional silence} <STOP CONSONANT>\n        //       Shorten both to (length/2 + 1)\n\n        // (voiced) stop consonant?\n        if((flags[index] & 2) != 0)\n        {\n            // B*, D*, G*, GX\n\n            // move past silence\n            do\n            {\n                // move ahead\n                X++;\n                index = phonemeindex[X];\n            } while(index == 0);\n\n\n            // check for end of buffer\n            if (index == 255) //buffer overflow\n            {\n                // ignore, overflow code\n                if ((65 & 2) == 0) {loopIndex++; continue;}\n            } else if ((flags[index] & 2) == 0) {\n                // if another stop consonant, move ahead\n                loopIndex++;\n                continue;\n            }\n\n            // RULE: <UNVOICED STOP CONSONANT> {optional silence} <STOP CONSONANT>\nif (debug) printf(\"RULE: <UNVOICED STOP CONSONANT> {optional silence} <STOP CONSONANT> - shorten both to 1/2 + 1\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X-1, signInputTable1[phonemeindex[X-1]], signInputTable2[phonemeindex[X-1]], phonemeLength[X-1]);\n// X gets overwritten, so hold prior X value for debug statement\nint debugX = X;\n            // shorten the prior phoneme length to (length/2 + 1)\n            phonemeLength[X] = (phonemeLength[X] >> 1) + 1;\n            X = loopIndex;\n\n            // also shorten this phoneme length to (length/2 +1)\n            phonemeLength[loopIndex] = (phonemeLength[loopIndex] >> 1) + 1;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", debugX, signInputTable1[phonemeindex[debugX]], signInputTable2[phonemeindex[debugX]], phonemeLength[debugX]);\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", debugX-1, signInputTable1[phonemeindex[debugX-1]], signInputTable2[phonemeindex[debugX-1]], phonemeLength[debugX-1]);\n\n\n            // move ahead\n            loopIndex++;\n            continue;\n        }\n\n\n        // WH, R*, L*, W*, Y*, Q*, Z*, ZH, V*, DH, J*, **,\n\n        // RULE: <VOICED NON-VOWEL> <DIPHTONG>\n        //       Decrease <DIPHTONG> by 2\n\n        // liquic consonant?\n        if ((flags2[index] & 16) != 0)\n        {\n            // R*, L*, W*, Y*\n\n            // get the prior phoneme\n            index = phonemeindex[X-1];\n\n            // prior phoneme a stop consonant>\n            if((flags[index] & 2) != 0) {\n                             // Rule: <LIQUID CONSONANT> <DIPHTONG>\n\nif (debug) printf(\"RULE: <LIQUID CONSONANT> <DIPHTONG> - decrease by 2\\n\");\nif (debug) printf(\"PRE\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\n\n             // decrease the phoneme length by 2 frames (20 ms)\n             phonemeLength[X] -= 2;\n\nif (debug) printf(\"POST\\n\");\nif (debug) printf(\"phoneme %d (%c%c) length %d\\n\", X, signInputTable1[phonemeindex[X]], signInputTable2[phonemeindex[X]], phonemeLength[X]);\n        }\n         }\n\n         // move to next phoneme\n         loopIndex++;\n         continue;\n    }\n//            goto pos48701;\n}\n\n// -------------------------------------------------------------------------\n// ML : Code47503 is division with remainder, and mem50 gets the sign\nvoid Code47503(unsigned char mem52)\n{\n\n    Y = 0;\n    if ((mem53 & 128) != 0)\n    {\n        mem53 = -mem53;\n        Y = 128;\n    }\n    mem50 = Y;\n    A = 0;\n    for(X=8; X > 0; X--)\n    {\n        int temp = mem53;\n        mem53 = mem53 << 1;\n        A = A << 1;\n        if (temp >= 128) A++;\n        if (A >= mem52)\n        {\n            A = A - mem52;\n            mem53++;\n        }\n    }\n\n    mem51 = A;\n    if ((mem50 & 128) != 0) mem53 = -mem53;\n\n}\n"
  },
  {
    "path": "lib/SAM/sam.h",
    "content": "#ifndef SAM_H\n#define SAM_H\n\nvoid SetInput(char *_input);\nvoid SetSpeed(unsigned char _speed);\nvoid SetPitch(unsigned char _pitch);\nvoid SetMouth(unsigned char _mouth);\nvoid SetThroat(unsigned char _throat);\nvoid EnableSingmode();\nvoid EnableDebug();\n\nint SAMMain();\nextern void (*SAM_write_buffer)(int pos, char value); //Overwrite for own buffer\n\nchar* GetBuffer();\nint GetBufferLength();\n\n//char input[]={\"/HAALAOAO MAYN NAAMAEAE IHSTT SAEBAASTTIHAAN \\x9b\\x9b\\0\"};\n//unsigned char input[]={\"/HAALAOAO \\x9b\\0\"};\n//unsigned char input[]={\"AA \\x9b\\0\"};\n//unsigned char input[] = {\"GUH5DEHN TAEG\\x9b\\0\"};\n\n//unsigned char input[]={\"AY5 AEM EY TAO4LXKIHNX KAX4MPYUX4TAH. GOW4 AH/HEH3D PAHNK.MEYK MAY8 DEY.\\x9b\\0\"};\n//unsigned char input[]={\"/HEH3LOW2, /HAW AH YUX2 TUXDEY. AY /HOH3P YUX AH FIYLIHNX OW4 KEY.\\x9b\\0\"};\n//unsigned char input[]={\"/HEY2, DHIHS IH3Z GREY2T. /HAH /HAH /HAH.AYL BIY5 BAEK.\\x9b\\0\"};\n//unsigned char input[]={\"/HAH /HAH /HAH \\x9b\\0\"};\n//unsigned char input[]={\"/HAH /HAH /HAH.\\x9b\\0\"};\n//unsigned char input[]={\".TUW BIY5Y3,, OHR NAA3T - TUW BIY5IYIY., DHAE4T IHZ DHAH KWEH4SCHAHN.\\x9b\\0\"};\n//unsigned char input[]={\"/HEY2, DHIHS \\x9b\\0\"};\n\n//unsigned char input[]={\" IYIHEHAEAAAHAOOHUHUXERAXIX  \\x9b\\0\"};\n//unsigned char input[]={\" RLWWYMNNXBDGJZZHVDH \\x9b\\0\"};\n//unsigned char input[]={\" SSHFTHPTKCH/H \\x9b\\0\"};\n\n//unsigned char input[]={\" EYAYOYAWOWUW ULUMUNQ YXWXRXLX/XDX\\x9b\\0\"};\n\n\n#endif\n"
  },
  {
    "path": "lib/bbd/LICENSE",
    "content": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "lib/bbd/README.md",
    "content": "# https://github.com/jpcima/bbd-delay-experimental\nTesting grounds for newer BBD delay implementation\n\n## Reference\n\n- Holters, M., & Parker, J. D. (2018). A combined model for a bucket brigade device and its input and output filters. In *Proc. Int. Conf. Digital Audio Effects (DAFx-18), Aveiro, Portugal*.\n"
  },
  {
    "path": "lib/bbd/bbd_filter.cc",
    "content": "#include \"bbd_filter.h\"\n#include <vector>\n#include <algorithm>\n#include <cmath>\n#include <cassert>\n\n#ifdef M_PI\ncdouble BBD_Filter_Spec::transfer(cdouble::value_type frequency) const noexcept\n{\n    cdouble j(0.0, 1.0);\n    cdouble s = j * (cdouble::value_type)(2.0 * M_PI) * frequency;\n    cdouble h = 0.0;\n    for (unsigned i = 0; i < M; ++i)\n        h += R[i] / (s - P[i]);\n    return h;\n}\n#endif\n\ntemplate <class T>\nstatic void interpolate_row(cdouble::value_type d, unsigned rows, unsigned cols, const T *src, T *dst)\n{\n    assert(d >= 0);\n    auto row = d * (rows - 1);\n    unsigned row1 = std::min((unsigned)row, rows - 1);\n    unsigned row2 = std::min(row1 + 1, rows - 1);\n    auto mu = row - (unsigned)row;\n    for (unsigned i = 0; i < cols; ++i)\n        dst[i] = (1 - mu) * src[row1 * cols + i] + mu * src[row2 * cols + i];\n}\n\nvoid BBD_Filter_Coef::interpolate_G(cdouble::value_type d, cdouble *g/*[M]*/) const noexcept\n{\n    interpolate_row(d, N, M, G.get(), g);\n}\n\nBBD_Filter_Coef BBD::compute_filter(float fs, unsigned steps, const BBD_Filter_Spec &spec)\n{\n    BBD_Filter_Coef coef;\n    cdouble::value_type ts = 1.0 / fs;\n    unsigned M = spec.M;\n\n    coef.M = M;\n    coef.N = steps;\n    coef.G.reset(new cdouble[M * steps]);\n    coef.P.reset(new cdouble[M]);\n\n    cdouble *pm = coef.P.get();\n    for (unsigned m = 0; m < M; ++m)\n        pm[m] = std::exp(ts * spec.P[m]);\n\n    for (unsigned step = 0; step < steps; ++step)  {\n        auto d = (cdouble::value_type)step / (steps - 1);\n        cdouble *gm = &coef.G[step * M];\n        switch (spec.kind) {\n        case BBD_Filter_Kind::Input:\n            for (unsigned m = 0; m < M; ++m)\n                gm[m] = ts * spec.R[m] * std::pow(pm[m], d);\n            break;\n        case BBD_Filter_Kind::Output:\n            for (unsigned m = 0; m < M; ++m)\n                gm[m] = (spec.R[m] / spec.P[m]) * std::pow(pm[m], 1 - d);\n            break;\n        }\n    }\n\n    cdouble H = 0;\n    for (unsigned m = 0; m < M; ++m)\n        H -= spec.R[m] / spec.P[m];\n    coef.H = H.real();\n\n    return coef;\n}\n\nnamespace j60 {\nstatic constexpr unsigned M_in = 5;\nstatic constexpr cdouble R_in[M_in] = {{251589, 0}, {-130428, -4165}, {-130428, 4165}, {4634, -22873}, {4634, 22873}};\nstatic constexpr cdouble P_in[M_in] = {{-46580, 0}, {-55482, 25082}, {-55482, -25082}, {-26292, -59437}, {-26292, 59437}};\nstatic constexpr unsigned M_out = 5;\nstatic constexpr cdouble R_out[M_out] = {{5092, 0}, {11256, -99566}, {11256, 99566}, {-13802, -24606}, {-13802, 24606}};\nstatic constexpr cdouble P_out[M_out] = {{-176261, 0}, {-51468, 21437}, {-51468, -21437}, {-26276, -59699}, {-26276, 59699}};\n} // namespace j60\n\nconst BBD_Filter_Spec bbd_fin_j60 = {BBD_Filter_Kind::Input, j60::M_in, j60::R_in, j60::P_in};\nconst BBD_Filter_Spec bbd_fout_j60 = {BBD_Filter_Kind::Output, j60::M_out, j60::R_out, j60::P_out};\n"
  },
  {
    "path": "lib/bbd/bbd_filter.h",
    "content": "#pragma once\n#include <memory>\n#include <complex>\ntypedef std::complex<float> cdouble;\n\nenum class BBD_Filter_Kind {\n    Input,\n    Output,\n};\n\n/*\n  Analog specifications of BBD filters, input and output.\n  M=order R=numerator P=denominator\n  Analog transfer: H(s)=sum(m:1→M) (R[m]/(s-P[m]))\n*/\n\nstruct BBD_Filter_Spec {\n    BBD_Filter_Kind kind;\n    unsigned M;\n    const cdouble* R;/*[M]*/\n    const cdouble* P;/*[M]*/\n    //\n    cdouble transfer(cdouble::value_type frequency) const noexcept;\n};\n\n/*\n  Discretized matrix of filters coefficients.\n  M=order, N=interpolation steps, H=feedback factor\n*/\nstruct BBD_Filter_Coef {\n    unsigned M;\n    unsigned N;\n    std::unique_ptr<cdouble[]> G;/*[M*N]*/\n    std::unique_ptr<cdouble[]> P;/*[M]*/\n    cdouble::value_type H;\n    //\n    void interpolate_G(cdouble::value_type d, cdouble *g/*[M]*/) const noexcept;\n};\n\nnamespace BBD {\nBBD_Filter_Coef compute_filter(float fs, unsigned steps, const BBD_Filter_Spec &spec);\n} // namespace BBD\n\n/*\n  The model of BBD input and output filters from Juno 60.\n*/\nextern const BBD_Filter_Spec bbd_fin_j60;\nextern const BBD_Filter_Spec bbd_fout_j60;\n"
  },
  {
    "path": "lib/bbd/bbd_line.cc",
    "content": "#include \"bbd_line.h\"\n#include <algorithm>\n#include <cassert>\n\nvoid BBD_Line::setup(unsigned ns, const BBD_Filter_Coef &fin, const BBD_Filter_Coef &fout)\n{\n    //[eh2k] mem_.reserve(8192);\n\n    fin_ = &fin;\n    fout_ = &fout;\n\n    unsigned Min = fin.M;\n    unsigned Mout = fout.M;\n    Xin_.reset(new cdouble[Min]);\n    Xout_.reset(new cdouble[Mout]);\n    Xout_mem_.reset(new cdouble[Mout]);\n    Gin_.reset(new cdouble[Min]);\n    Gout_.reset(new cdouble[Mout]);\n\n    set_delay_size(ns);\n    clear();\n}\n\nvoid BBD_Line::set_delay_size(unsigned ns)\n{\n    mem_.clear();\n    mem_.resize(ns);\n    imem_ = 0;\n    ns_ = ns;\n}\n\nvoid BBD_Line::clear()\n{\n    std::fill(mem_.begin(), mem_.end(), 0);\n    imem_ = 0;\n    pclk_ = 0;\n    ptick_ = 0;\n    ybbd_old_ = 0;\n    unsigned Min = fin_->M;\n    unsigned Mout = fout_->M;\n    std::fill(&Xin_[0], &Xin_[Min], 0);\n    std::fill(&Xout_[0], &Xout_[Mout], 0);\n    std::fill(&Xout_mem_[0], &Xout_mem_[Mout], 0);\n}\n\nvoid BBD_Line::process(unsigned n, const float *input, float *output, const float *clock)\n{\n    unsigned ns = ns_;\n    float *mem = mem_.data();\n    unsigned imem = imem_;\n    auto pclk = pclk_;\n    unsigned ptick = ptick_;\n    auto ybbd_old = ybbd_old_;\n\n    const BBD_Filter_Coef &fin = *fin_, &fout = *fout_;\n    unsigned Min = fin.M, Mout = fout.M;\n    cdouble *Xin = Xin_.get(), *Xout = Xout_.get();\n    cdouble *Xout_mem = Xout_mem_.get();\n    cdouble *Gin = Gin_.get(), *Gout = Gout_.get();\n    const cdouble *Pin = fin.P.get(), *Pout = fout.P.get();\n\n    for (unsigned i = 0; i < n; ++i) {\n        double fclk = clock[i];\n\n        for (unsigned m = 0; m < Mout; ++m)\n            Xout[m] = 0;\n\n        if (fclk > 0) {\n            auto pclk_old = pclk;\n            pclk += fclk;\n            unsigned tick_count = (unsigned)pclk;\n            pclk -= tick_count;\n            for (unsigned tick = 0; tick < tick_count; ++tick) {\n                auto d = (1 - pclk_old + tick) * (1 / fclk);\n                d -= (unsigned)d;\n                if ((ptick & 1) == 0) {\n                    fin.interpolate_G(d, Gin);\n                    cdouble s = 0;\n                    for (unsigned m = 0; m < Min; ++m)\n                        s += Gin[m] * Xin[m];\n                    mem[imem] = s.real();\n                    imem = ((imem + 1) < ns) ? (imem + 1) : 0;\n                }\n                else {\n                    fout.interpolate_G(d, Gout);\n                    auto ybbd = mem[imem];\n                    auto delta = ybbd - ybbd_old;\n                    ybbd_old = ybbd;\n                    for (unsigned m = 0; m < Mout; ++m)\n                        Xout[m] += Gout[m] * delta;\n                }\n                ++ptick;\n            }\n        }\n\n        for (unsigned m = 0; m < Min; ++m)\n            Xin[m] = Pin[m] * Xin[m] + cdouble(input[i]);\n\n        cdouble y = fout.H * ybbd_old;\n        for (unsigned m = 0; m < Mout; ++m) {\n            cdouble xout = Pout[m] * Xout_mem[m] + Xout[m];\n            Xout_mem[m] = xout;\n            y += xout;\n        }\n\n        output[i] = y.real();\n    }\n\n    imem_ = imem;\n    pclk_ = pclk;\n    ptick_ = ptick;\n    ybbd_old_ = ybbd_old;\n}"
  },
  {
    "path": "lib/bbd/bbd_line.h",
    "content": "#pragma once\n#include \"bbd_filter.h\"\n#include <algorithm>\n#include <vector>\n#include <memory>\n#include <complex>\n\nclass BBD_Line {\npublic:\n    /**\n     * Initialize a delay line with the specified parameters. (non-RT)\n     * @param fs audio sampling rate\n     * @param ns number of stages / length of the virtual capacitor array\n     * @param fsin analog specification of the input filter\n     * @param fsout analog specification of the output filter\n     */\n    void setup(unsigned ns, const BBD_Filter_Coef &fin, const BBD_Filter_Coef &fout);\n\n    /**\n     * Change the number of stages. (RT?)\n     * @note It guarantees not to reallocate the buffer for \\f$ns \\leq 8192\\f$.\n     * @param ns number of stages / length of the virtual capacitor array\n     */\n    void set_delay_size(unsigned ns);\n\n    /**\n     * Reinitialize all the internal state to zero. (RT)\n     */\n    void clear();\n\n    /**\n     * Process a block of audio signal. (RT)\n     * @note The clock input is defined as \\f$F_{clk}/F_{s}\\f$, where\n     *       \\f$F_{clk}\\f$ is the desired BBD instantaneous clock rate. It is\n     *       valid to have \\f$F_{clk}>F_{s}/2\\f$.\n     * @param n number of frames to process\n     * @param input input buffer of size @p n\n     * @param output output buffer of size @p n\n     * @param clock clock input buffer of size @p n\n     */\n    void process(unsigned n, const float *input, float *output, const float *clock);\n\n    /**\n     * Get the discretization of the input filter. (RT)\n     * @return digital filter model\n     */\n    const BBD_Filter_Coef &filter_in() const noexcept { return *fin_; }\n\n    /**\n     * Get the discretization of the output filter. (RT)\n     * @return digital filter model\n     */\n    const BBD_Filter_Coef &filter_out() const noexcept { return *fout_; }\n\n    /**\n     * Determine the BBD clock rate \\f$F_{clk}\\f$ which obtains a given delay. (RT)\n     * @param delay delay in seconds\n     * @param ns number of stages / length of the virtual capacitor array\n     * @return BBD clock rate in Hz\n     */\n    static inline float hz_rate_for_delay(float delay, unsigned ns)\n        { return 2 * ns / delay; }\n\n    /**\n     * Determine the delay obtained for a given BBD clock rate \\f$F_{clk}\\f$. (RT)\n     * @param rate BBD clock rate in Hz\n     * @param ns number of stages / length of the virtual capacitor array\n     * @return delay in seconds\n     */\n    static inline cdouble::value_type delay_for_hz_rate(cdouble::value_type rate, unsigned ns)\n        { return 2 * ns / rate; }\n\nprivate:\n    unsigned ns_; // delay size\n    std::vector<float> mem_; // delay memory\n    unsigned imem_; // delay memory index\n    cdouble::value_type pclk_; // clock phase\n    unsigned ptick_; // clock tick counter\n    cdouble::value_type ybbd_old_;\n    const BBD_Filter_Coef *fin_;\n    const BBD_Filter_Coef *fout_;\n    std::unique_ptr<cdouble[]> Xin_;\n    std::unique_ptr<cdouble[]> Xout_;\n    std::unique_ptr<cdouble[]> Xout_mem_; // sample memory of output filter\n    std::unique_ptr<cdouble[]> Gin_;\n    std::unique_ptr<cdouble[]> Gout_;\n};\n"
  },
  {
    "path": "lib/braids/README.md",
    "content": "# Synthesis Models\n\n## Classic Analog Waveforms\n\n| #  | Model       | Description                   | Timbre             | Color               |\n|----|-------------|-------------------------------|--------------------|---------------------|\n| 0  | `CSAW`      | CS-80 imperfect saw           | Notch width        | Notch polarity      |\n| 1  | `/\\/\\|-_-_` | Variable waveshape            | Waveshape          | Distortion/filter   |\n| 2  | `/\\|/\\|-_-_`| Classic saw-tooth/square      | Pulse width        | Saw to square       |\n| 3  | `FOLD`      | Sine/triangle into wavefolder | Wavefolder amount  | Sine to triangle    |\n\n---\n\n## Digital Synthesis\n\n| #  | Model       | Description                          | Timbre                   | Color                   |\n|----|-------------|--------------------------------------|--------------------------|-------------------------|\n| 4  | `_\\|_\\|_\\|_`| 2 detuned harmonic combs             | Smoothness               | Detune                  |\n| 5  | `SUB-_`     |                                      |                          |                         |\n| 6  | `SUB/_`     |                                      |                          |                         |\n| 7  | `SYN-_`     | 2 VCOs with hardsync                 | VCO frequency ratio      | VCO balance             |\n| 8  | `SYN/\\|`    | 2 VCOs with hardsync                 | VCO frequency ratio      | VCO balance             |\n| 9  | `/\\|/\\| x3` | Triple saw waves                    | Osc. 2 detune            | Osc. 3 detune           |\n| 10 | `-_ x3`     | Triple square waves                 | Osc. 2 detune            | Osc. 3 detune           |\n| 11 | `/\\ x3`     | Triple triangle waves               | Osc. 2 detune            | Osc. 3 detune           |\n| 12 | `SI x3`     | Triple sine waves                   | Osc. 2 detune            | Osc. 3 detune           |\n| 13 | `RING`      | 3 ring-modulated sine waves          | 2/1 frequency ratio      | 3/1 frequency ratio     |\n| 14 | `/\\|/\\|/\\|/\\|` | Swarm of 7 sawtooth waves         | Detune                   | High-pass filter        |\n| 15 | `/\\|/\\|_\\|_\\|` | Comb filtered sawtooth           | Delay time               | Neg./pos. feedback      |\n| 16 | `TOY*`      | Low-fi circuitbent sounds            | Sample reduction         | Bit toggling            |\n| 17 | `ZLPF`      | Direct synthesis of LP waveform      | Cutoff frequency         | Waveshape               |\n| 18 | `ZPKF`      | Direct synthesis of Peaking waveform | Cutoff frequency         | Waveshape               |\n| 19 | `ZBPF`      | Direct synthesis of BP waveform      | Cutoff frequency         | Waveshape               |\n| 20 | `ZHPF`      | Direct synthesis of HP waveform      | Cutoff frequency         | Waveshape               |\n| 21 | `VOSM`      | Sawtooth with 2 formants             | Formant 1 frequency      | Formant 2 frequency     |\n\n---\n\n## Vocal Synthesis\n\n| #  | Model       | Description                      | Timbre        | Color              |\n|----|-------------|----------------------------------|---------------|--------------------|\n| 22 | `VOWL`      | Vowel synthesis (a, e, i, o, u) | Vowel shape   | Gender             |\n| 23 | `VFOF`      | Hi-fi vowel synthesis           | Air pressure  | Instrument shape   |\n\n---\n\n## Additive Synthesis\n\n| #  | Model       | Description                | Timbre          | Color               |\n|----|-------------|----------------------------|-----------------|---------------------|\n| 24 | `HARM`      | Additive synth, 14 harmonics | Harmonic #      | Spectral peakedness |\n\n---\n\n## Frequency Modulation (FM)\n\n| #  | Model       | Description                            | Timbre                | Color                |\n|----|-------------|----------------------------------------|-----------------------|----------------------|\n| 25 | `FM`        | Plain 2-operator FM                   | Modulation index      | Frequency ratio      |\n| 26 | `FBFM`      | Feedback 2-operator FM                | Modulation index      | Frequency ratio      |\n| 27 | `WTFM`      | Chaotic 2-operator FM                 | Modulation index      | Frequency ratio      |\n\n---\n\n## Physical Simulations\n\n| #  | Model       | Description                 | Timbre                | Color               |\n|----|-------------|-----------------------------|-----------------------|---------------------|\n| 28 | `PLUK`      | Plucked strings             | Decay                 | Plucking position   |\n| 29 | `BOWD`      | Bowed string                | Friction              | Bowing position     |\n| 30 | `BLOW`      | Reed simulation             | Air pressure          | Instrument geometry |\n| 31 | `FLUT`      | Flute simulation            | Air pressure          | Instrument geometry |\n\n---\n\n## Percussions\n\n| #  | Model       | Description                 | Timbre                | Color               |\n|----|-------------|-----------------------------|-----------------------|---------------------|\n| 32 | `BELL`      | Bell sound                  | Decay                 | Harmonicity         |\n| 33 | `DRUM`      | Metallic drum sound         | Decay                 | Harmonicity         |\n| 34 | `KICK`      | 808 bass drum               | Decay                 | Brightness          |\n| 35 | `CYMB`      | Cymbal noise                | Cutoff                | Noisiness           |\n| 36 | `SNAR`      | 808 snare drum              | Tone                  | Noisiness/decay     |\n\n---\n\n## Wavetables\n\n| #  | Model       | Description                   | Timbre                | Color               |\n|----|-------------|-------------------------------|-----------------------|---------------------|\n| 37 | `WTBL`      | 21 wavetables                | Smooth wavetable position | Quantized selection |\n| 38 | `WMAP`      | 16x16 waves                 | X position            | Y position          |\n| 39 | `WLIN`      | Linear wavetable scanning   | Wavetable position    | Interpolation quality |\n| 40 | `WTx4`      | Polyphonic wavetable        | Wavetable position    | Chord type          |\n\n---\n\n## Noise\n\n| #  | Model       | Description                 | Timbre                | Color               |\n|----|-------------|-----------------------------|-----------------------|---------------------|\n| 41 | `NOIS`      | Tuned noise (2-pole filter) | Filter resonance      | Response (LP to HP) |\n| 42 | `TWNQ`      | Noise sent to 2 resonators  | Resonance             | Resonators freq. ratio |\n| 43 | `CLKN`      | Clocked digital noise       | Cycle length          | Quantization        |\n| 44 | `CLOU`      | Sinusoidal granular synthesis | Grain density       | Frequency dispersion |\n| 45 | `PRTC`      | Droplets granular synthesis | Grain density         | Frequency dispersion |\n| 46 | `QPSK`      | Modem noises                | Bit-rate              | Modulated data      |\n\n## EASTER EGG\n\n| #  | Model       | Description                 | Timbre                | Color               |\n|----|-------------|-----------------------------|-----------------------|---------------------|\n| 47 | `****`      |                             |                       |                     |\n\n## Braids Renaissance Chords (https://burns.ca/eurorack.html)\n\n| #  | Model       | Description                 | Timbre                | Color               |\n|----|-------------|-----------------------------|-----------------------|---------------------|\n| 48 | `//CH`      |                             |                       |                     |\n| 49 | `-_CH`      |                             |                       |                     |\n| 50 | `/\\\\CH`     |                             |                       |                     |\n| 51 | `SICH`      |                             |                       |                     |\n| 52 | `WTCH`      |                             |                       |                     |\n| 53 | `//x6`      |                             |                       |                     |\n| 54 | `-_x6`      |                             |                       |                     |\n| 55 | `/\\\\x6`     |                             |                       |                     |\n| 56 | `SIx6`      |                             |                       |                     |\n| 57 | `WTx6`      |                             |                       |                     |"
  },
  {
    "path": "lib/braids/analog_oscillator.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Oscillator - analog style waveforms.\n\n#include \"braids/analog_oscillator.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"braids/resources.h\"\n#include \"braids/parameter_interpolation.h\"\n\nnamespace braids {\n\nusing namespace stmlib;\n\nstatic const size_t kNumZones = 15;\n\nstatic const uint16_t kHighestNote = 128 * 128;\nstatic const uint16_t kPitchTableStart = 128 * 128;\nstatic const uint16_t kOctave = 12 * 128;\n\nuint32_t AnalogOscillator::ComputePhaseIncrement(int16_t midi_pitch) {\n  if (midi_pitch >= kHighestNote) {\n    midi_pitch = kHighestNote - 1;\n  }\n  \n  int32_t ref_pitch = midi_pitch;\n  ref_pitch -= kPitchTableStart;\n  \n  size_t num_shifts = 0;\n  while (ref_pitch < 0) {\n    ref_pitch += kOctave;\n    ++num_shifts;\n  }\n  \n  uint32_t a = lut_oscillator_increments[ref_pitch >> 4];\n  uint32_t b = lut_oscillator_increments[(ref_pitch >> 4) + 1];\n  uint32_t phase_increment = a + \\\n      (static_cast<int32_t>(b - a) * (ref_pitch & 0xf) >> 4);\n  phase_increment >>= num_shifts;\n  return phase_increment;\n}\n\nvoid AnalogOscillator::Render(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  RenderFn fn = fn_table_[shape_];\n  \n  if (shape_ != previous_shape_) {\n    Init();\n    previous_shape_ = shape_;\n  }\n  \n  phase_increment_ = ComputePhaseIncrement(pitch_);\n  \n  if (pitch_ > kHighestNote) {\n    pitch_ = kHighestNote;\n  } else if (pitch_ < 0) {\n    pitch_ = 0;\n  }\n  \n  (this->*fn)(sync_in, buffer, sync_out, size);\n}\n\nvoid AnalogOscillator::RenderCSaw(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  int32_t next_sample = next_sample_;\n  while (size--) {\n    bool sync_reset = false;\n    bool self_reset = false;\n    bool transition_during_reset = false;\n    uint32_t reset_time = 0;\n    INTERPOLATE_PHASE_INCREMENT\n    uint32_t pw = static_cast<uint32_t>(parameter_) * 49152;\n    if (pw < 8 * phase_increment) {\n      pw = 8 * phase_increment;\n    }\n    \n    int32_t this_sample = next_sample;\n    next_sample = 0;\n\n    if (*sync_in) {\n      // sync_in contain the fractional reset time.\n      reset_time = static_cast<uint32_t>(*sync_in - 1) << 9;\n      uint32_t phase_at_reset = phase_ + \\\n          (65535 - reset_time) * (phase_increment >> 16);\n      sync_reset = true;\n      transition_during_reset = false;\n      if (phase_at_reset < phase_ || (!high_ && phase_at_reset >= pw)) {\n        transition_during_reset = true;\n      }\n      if (phase_ >= pw) {\n        discontinuity_depth_ = -2048 + (aux_parameter_ >> 2);\n        int32_t before = (phase_at_reset >> 18);\n        int16_t after = discontinuity_depth_;\n        int32_t discontinuity = after - before;\n        this_sample += discontinuity * ThisBlepSample(reset_time) >> 15;\n        next_sample += discontinuity * NextBlepSample(reset_time) >> 15;\n      }\n    }\n    sync_in++;\n\n    phase_ += phase_increment;\n    if (phase_ < phase_increment) {\n      self_reset = true;\n    }\n    if (sync_out) {\n      if (phase_ < phase_increment) {\n        *sync_out++ = phase_ / (phase_increment >> 7) + 1;\n      } else {\n        *sync_out++ = 0;\n      }\n    }\n    \n    while (transition_during_reset || !sync_reset) {\n      if (!high_) {\n        if (phase_ < pw) {\n          break;\n        }\n        uint32_t t = (phase_ - pw) / (phase_increment >> 16);\n        int16_t before = discontinuity_depth_;\n        int16_t after = phase_ >> 18;\n        int16_t discontinuity = after - before;\n        this_sample += discontinuity * ThisBlepSample(t) >> 15;\n        next_sample += discontinuity * NextBlepSample(t) >> 15;\n        high_ = true;\n      }\n      if (high_) {\n        if (!self_reset) {\n          break;\n        }\n        self_reset = false;\n        discontinuity_depth_ = -2048 + (aux_parameter_ >> 2);\n        uint32_t t = phase_ / (phase_increment >> 16);\n        int16_t before = 16383;\n        int16_t after = discontinuity_depth_;\n        int16_t discontinuity = after - before;\n        this_sample += discontinuity * ThisBlepSample(t) >> 15;\n        next_sample += discontinuity * NextBlepSample(t) >> 15;\n        high_ = false;\n      }\n    }\n\n    if (sync_reset) {\n      phase_ = reset_time * (phase_increment >> 16);\n      high_ = false;\n    }\n\n    next_sample += phase_ < pw\n        ? discontinuity_depth_\n        : phase_ >> 18;\n    *buffer++ = (this_sample - 8192) << 1;\n  }\n  next_sample_ = next_sample;\n  END_INTERPOLATE_PHASE_INCREMENT\n}\n\nvoid AnalogOscillator::RenderSquare(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  if (parameter_ > 32000) {\n    parameter_ = 32000;\n  }\n  \n  int32_t next_sample = next_sample_;\n  while (size--) {\n    bool sync_reset = false;\n    bool self_reset = false;\n    bool transition_during_reset = false;\n    uint32_t reset_time = 0;\n    \n    INTERPOLATE_PHASE_INCREMENT\n    uint32_t pw = static_cast<uint32_t>(32768 - parameter_) << 16;\n    \n    int32_t this_sample = next_sample;\n    next_sample = 0;\n    \n    if (*sync_in) {\n      // sync_in contain the fractional reset time.\n      reset_time = static_cast<uint32_t>(*sync_in - 1) << 9;\n      uint32_t phase_at_reset = phase_ + \\\n          (65535 - reset_time) * (phase_increment >> 16);\n      sync_reset = true;\n      if (phase_at_reset < phase_ || (!high_ && phase_at_reset >= pw)) {\n        transition_during_reset = true;\n      }\n      if (phase_at_reset >= pw) {\n        this_sample -= ThisBlepSample(reset_time);\n        next_sample -= NextBlepSample(reset_time);\n      }\n    }\n    sync_in++;\n    \n    phase_ += phase_increment;\n    if (phase_ < phase_increment) {\n      self_reset = true;\n    }\n    \n    if (sync_out) {\n      if (phase_ < phase_increment) {\n        *sync_out++ = phase_ / (phase_increment >> 7) + 1;\n      } else {\n        *sync_out++ = 0;\n      }\n    }\n    \n    while (transition_during_reset || !sync_reset) {\n      if (!high_) {\n        if (phase_ < pw) {\n          break;\n        }\n        uint32_t t = (phase_ - pw) / (phase_increment >> 16);\n        this_sample += ThisBlepSample(t);\n        next_sample += NextBlepSample(t);\n        high_ = true;\n      }\n      if (high_) {\n        if (!self_reset) {\n          break;\n        }\n        self_reset = false;\n        uint32_t t = phase_ / (phase_increment >> 16);\n        this_sample -= ThisBlepSample(t);\n        next_sample -= NextBlepSample(t);\n        high_ = false;\n      }\n    }\n    \n    if (sync_reset) {\n      phase_ = reset_time * (phase_increment >> 16);\n      high_ = false;\n    }\n    \n    next_sample += phase_ < pw ? 0 : 32767;\n    *buffer++ = (this_sample - 16384) << 1;\n  }\n  next_sample_ = next_sample;\n  END_INTERPOLATE_PHASE_INCREMENT\n}\n\nvoid AnalogOscillator::RenderSaw(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  int32_t next_sample = next_sample_;\n  while (size--) {\n    bool sync_reset = false;\n    bool self_reset = false;\n    bool transition_during_reset = false;\n    uint32_t reset_time = 0;\n    \n    INTERPOLATE_PHASE_INCREMENT\n    int32_t this_sample = next_sample;\n    next_sample = 0;\n\n    if (*sync_in) {\n      // sync_in contain the fractional reset time.\n      reset_time = static_cast<uint32_t>(*sync_in - 1) << 9;\n      uint32_t phase_at_reset = phase_ + \\\n          (65535 - reset_time) * (phase_increment >> 16);\n      sync_reset = true;\n      if (phase_at_reset < phase_) {\n        transition_during_reset = true;\n      }\n      int32_t discontinuity = phase_at_reset >> 17;\n      this_sample -= discontinuity * ThisBlepSample(reset_time) >> 15;\n      next_sample -= discontinuity * NextBlepSample(reset_time) >> 15;\n    }\n    sync_in++;\n\n    phase_ += phase_increment;\n    if (phase_ < phase_increment) {\n      self_reset = true;\n    }\n\n    if (sync_out) {\n      if (phase_ < phase_increment) {\n        *sync_out++ = phase_ / (phase_increment >> 7) + 1;\n      } else {\n        *sync_out++ = 0;\n      }\n    }\n\n    if ((transition_during_reset || !sync_reset) && self_reset) {\n      uint32_t t = phase_ / (phase_increment >> 16);\n      this_sample -= ThisBlepSample(t);\n      next_sample -= NextBlepSample(t);\n    }\n\n    if (sync_reset) {\n      phase_ = reset_time * (phase_increment >> 16);\n      high_ = false;\n    }\n    \n    next_sample += phase_ >> 17;\n    *buffer++ = (this_sample - 16384) << 1;\n  }\n  next_sample_ = next_sample;\n  END_INTERPOLATE_PHASE_INCREMENT\n}\n\nvoid AnalogOscillator::RenderVariableSaw(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  int32_t next_sample = next_sample_;\n  if (parameter_ < 1024) {\n    parameter_ = 1024;\n  }\n  while (size--) {\n    bool sync_reset = false;\n    bool self_reset = false;\n    bool transition_during_reset = false;\n    uint32_t reset_time = 0;\n\n    INTERPOLATE_PHASE_INCREMENT\n    uint32_t pw = static_cast<uint32_t>(parameter_) << 16;\n\n    int32_t this_sample = next_sample;\n    next_sample = 0;\n\n    if (*sync_in) {\n      // sync_in contain the fractional reset time.\n      reset_time = static_cast<uint32_t>(*sync_in - 1) << 9;\n      uint32_t phase_at_reset = phase_ + \\\n          (65535 - reset_time) * (phase_increment >> 16);\n      sync_reset = true;\n      if (phase_at_reset < phase_ || (!high_ && phase_at_reset >= pw)) {\n        transition_during_reset = true;\n      }\n      int32_t before = (phase_at_reset >> 18) + ((phase_at_reset - pw) >> 18);\n      int32_t after = (0 >> 18) + ((0 - pw) >> 18);\n      int32_t discontinuity = after - before;\n      this_sample += discontinuity * ThisBlepSample(reset_time) >> 15;\n      next_sample += discontinuity * NextBlepSample(reset_time) >> 15;\n    }\n    sync_in++;\n\n    phase_ += phase_increment;\n    if (phase_ < phase_increment) {\n      self_reset = true;\n    }\n\n    if (sync_out) {\n      if (phase_ < phase_increment) {\n        *sync_out++ = phase_ / (phase_increment >> 7) + 1;\n      } else {\n        *sync_out++ = 0;\n      }\n    }\n\n    while (transition_during_reset || !sync_reset) {\n      if (!high_) {\n        if (phase_ < pw) {\n          break;\n        }\n        uint32_t t = (phase_ - pw) / (phase_increment >> 16);\n        this_sample -= ThisBlepSample(t) >> 1;\n        next_sample -= NextBlepSample(t) >> 1;\n        high_ = true;\n      }\n      if (high_) {\n        if (!self_reset) {\n          break;\n        }\n        self_reset = false;\n        uint32_t t = phase_ / (phase_increment >> 16);\n        this_sample -= ThisBlepSample(t) >> 1;\n        next_sample -= NextBlepSample(t) >> 1;\n        high_ = false;\n      }\n    }\n\n    if (sync_reset) {\n      phase_ = reset_time * (phase_increment >> 16);\n      high_ = false;\n    }\n    \n    next_sample += phase_ >> 18;\n    next_sample += (phase_ - pw) >> 18;\n    *buffer++ = (this_sample - 16384) << 1;\n  }\n  next_sample_ = next_sample;\n  END_INTERPOLATE_PHASE_INCREMENT\n}\n\nvoid AnalogOscillator::RenderTriangle(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  uint32_t phase = phase_;\n  while (size--) {\n    INTERPOLATE_PHASE_INCREMENT\n    \n    int16_t triangle;\n    uint16_t phase_16;\n    \n    if (*sync_in++) {\n      phase = 0;\n    }\n    \n    phase += phase_increment >> 1;\n    phase_16 = phase >> 16;\n    triangle = (phase_16 << 1) ^ (phase_16 & 0x8000 ? 0xffff : 0x0000);\n    triangle += 32768;\n    *buffer = triangle >> 1;\n    \n    phase += phase_increment >> 1;\n    phase_16 = phase >> 16;\n    triangle = (phase_16 << 1) ^ (phase_16 & 0x8000 ? 0xffff : 0x0000);\n    triangle += 32768;\n    *buffer++ += triangle >> 1;\n  }\n  phase_ = phase;\n  END_INTERPOLATE_PHASE_INCREMENT\n}\n\nvoid AnalogOscillator::RenderSine(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  uint32_t phase = phase_;\n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  while (size--) {\n    INTERPOLATE_PHASE_INCREMENT\n    phase += phase_increment;\n    if (*sync_in++) {\n      phase = 0;\n    }\n    *buffer++ = Interpolate824(wav_sine, phase);\n  }\n  END_INTERPOLATE_PHASE_INCREMENT\n  phase_ = phase;\n}\n\nvoid AnalogOscillator::RenderTriangleFold(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  uint32_t phase = phase_;\n  \n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  BEGIN_INTERPOLATE_PARAMETER\n  \n  while (size--) {\n    INTERPOLATE_PARAMETER\n    INTERPOLATE_PHASE_INCREMENT\n    \n    uint16_t phase_16;\n    int16_t triangle;\n    int16_t gain = 2048 + (parameter * 30720 >> 15);\n    \n    if (*sync_in++) {\n      phase = 0;\n    }\n    \n    // 2x oversampled WF.\n    phase += phase_increment >> 1;\n    phase_16 = phase >> 16;\n    triangle = (phase_16 << 1) ^ (phase_16 & 0x8000 ? 0xffff : 0x0000);\n    triangle += 32768;\n    triangle = triangle * gain >> 15;\n    triangle = Interpolate88(ws_tri_fold, triangle + 32768);\n    *buffer = triangle >> 1;\n    \n    phase += phase_increment >> 1;\n    phase_16 = phase >> 16;\n    triangle = (phase_16 << 1) ^ (phase_16 & 0x8000 ? 0xffff : 0x0000);\n    triangle += 32768;\n    triangle = triangle * gain >> 15;\n    triangle = Interpolate88(ws_tri_fold, triangle + 32768);\n    *buffer++ += triangle >> 1;\n  }\n  \n  END_INTERPOLATE_PARAMETER\n  END_INTERPOLATE_PHASE_INCREMENT\n    \n  phase_ = phase;\n}\n\nvoid AnalogOscillator::RenderSineFold(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  uint32_t phase = phase_;\n  \n  BEGIN_INTERPOLATE_PHASE_INCREMENT\n  BEGIN_INTERPOLATE_PARAMETER\n  \n  while (size--) {\n    INTERPOLATE_PARAMETER\n    INTERPOLATE_PHASE_INCREMENT\n    \n    int16_t sine;\n    int16_t gain = 2048 + (parameter * 30720 >> 15);\n    \n    if (*sync_in++) {\n      phase = 0;\n    }\n    \n    // 2x oversampled WF.\n    phase += phase_increment >> 1;\n    sine = Interpolate824(wav_sine, phase);\n    sine = sine * gain >> 15;\n    sine = Interpolate88(ws_sine_fold, sine + 32768);\n    *buffer = sine >> 1;\n    \n    phase += phase_increment >> 1;\n    sine = Interpolate824(wav_sine, phase);\n    sine = sine * gain >> 15;\n    sine = Interpolate88(ws_sine_fold, sine + 32768);\n    *buffer++ += sine >> 1;\n  }\n  \n  END_INTERPOLATE_PARAMETER\n  END_INTERPOLATE_PHASE_INCREMENT\n  \n  phase_ = phase;\n}\n\nvoid AnalogOscillator::RenderBuzz(\n    const uint8_t* sync_in,\n    int16_t* buffer,\n    uint8_t* sync_out,\n    size_t size) {\n  int32_t shifted_pitch = pitch_ + ((32767 - parameter_) >> 1);\n  uint16_t crossfade = shifted_pitch << 6;\n  size_t index = (shifted_pitch >> 10);\n  if (index >= kNumZones) {\n    index = kNumZones - 1;\n  }\n  const int16_t* wave_1 = waveform_table[WAV_BANDLIMITED_COMB_0 + index];\n  index += 1;\n  if (index >= kNumZones) {\n    index = kNumZones - 1;\n  }\n  const int16_t* wave_2 = waveform_table[WAV_BANDLIMITED_COMB_0 + index];\n  while (size--) {\n    phase_ += phase_increment_;\n    if (*sync_in++) {\n      phase_ = 0;\n    }\n    *buffer++ = Crossfade(wave_1, wave_2, phase_, crossfade);\n  }\n}\n\n/* static */\nAnalogOscillator::RenderFn AnalogOscillator::fn_table_[] = {\n  &AnalogOscillator::RenderSaw,\n  &AnalogOscillator::RenderVariableSaw,\n  &AnalogOscillator::RenderCSaw,\n  &AnalogOscillator::RenderSquare,\n  &AnalogOscillator::RenderTriangle,\n  &AnalogOscillator::RenderSine,\n  &AnalogOscillator::RenderTriangleFold,\n  &AnalogOscillator::RenderSineFold,\n  &AnalogOscillator::RenderBuzz,\n};\n\n}  // namespace braids\n"
  },
  {
    "path": "lib/braids/analog_oscillator.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Oscillator - analog style waveforms.\n\n#ifndef BRAIDS_ANALOG_OSCILLATOR_H_\n#define BRAIDS_ANALOG_OSCILLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n#include <cstdio>\n\n#include \"braids/resources.h\"\n\nnamespace braids {\n\nenum AnalogOscillatorShape {\n  OSC_SHAPE_SAW,\n  OSC_SHAPE_VARIABLE_SAW,\n  OSC_SHAPE_CSAW,\n  OSC_SHAPE_SQUARE,\n  OSC_SHAPE_TRIANGLE,\n  OSC_SHAPE_SINE,\n  OSC_SHAPE_TRIANGLE_FOLD,\n  OSC_SHAPE_SINE_FOLD,\n  OSC_SHAPE_BUZZ\n};\n\nenum SyncMode {\n  OSCILLATOR_SYNC_MODE_OFF,\n  OSCILLATOR_SYNC_MODE_MASTER,\n  OSCILLATOR_SYNC_MODE_SLAVE\n};\n\nclass AnalogOscillator {\n public:\n  typedef void (AnalogOscillator::*RenderFn)(\n      const uint8_t*,\n      int16_t*,\n      uint8_t*,\n      size_t);\n\n  AnalogOscillator() { }\n  ~AnalogOscillator() { }\n  \n  inline void Init() {\n    phase_ = 0;\n    phase_increment_ = 1;\n    high_ = false;\n    parameter_ = previous_parameter_ = 0;\n    aux_parameter_ = 0;\n    discontinuity_depth_ = -16383;\n    pitch_ = 60 << 7;\n    next_sample_ = 0;\n  }\n  \n  inline void set_shape(AnalogOscillatorShape shape) {\n    shape_ = shape;\n  }\n  \n  inline void set_pitch(int16_t pitch) {\n    pitch_ = pitch;\n  }\n\n  inline void set_parameter(int16_t parameter) {\n    parameter_ = parameter;\n  }\n\n  inline void set_aux_parameter(int16_t parameter) {\n    aux_parameter_ = parameter;\n  }\n  \n  inline uint32_t phase_increment() const {\n    return phase_increment_;\n  }\n  \n  inline void Reset() {\n    phase_ = -phase_increment_;\n  }\n\n  void Render(\n      const uint8_t* sync_in,\n      int16_t* buffer,\n      uint8_t* sync_out,\n      size_t size);\n  \n private:\n  void RenderSquare(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderSaw(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderVariableSaw(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderCSaw(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderTriangle(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderSine(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderTriangleFold(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderSineFold(const uint8_t*, int16_t*, uint8_t*, size_t);\n  void RenderBuzz(const uint8_t*, int16_t*, uint8_t*, size_t);\n  \n  uint32_t ComputePhaseIncrement(int16_t midi_pitch);\n  \n  inline int32_t ThisBlepSample(uint32_t t) {\n    if (t > 65535) {\n      t = 65535;\n    }\n    return t * t >> 18;\n  }\n  \n  inline int32_t NextBlepSample(uint32_t t) {\n    if (t > 65535) {\n      t = 65535;\n    }\n    t = 65535 - t;\n    return -static_cast<int32_t>(t * t >> 18);\n  }\n   \n  uint32_t phase_;\n  uint32_t phase_increment_;\n  uint32_t previous_phase_increment_;\n  bool high_;\n\n  int16_t parameter_;\n  int16_t previous_parameter_;\n  int16_t aux_parameter_;\n  int16_t discontinuity_depth_;\n  int16_t pitch_;\n  \n  int32_t next_sample_;\n  \n  AnalogOscillatorShape shape_;\n  AnalogOscillatorShape previous_shape_;\n  \n  static RenderFn fn_table_[];\n  \n  DISALLOW_COPY_AND_ASSIGN(AnalogOscillator);\n};\n\n}  // namespace braids\n\n#endif // BRAIDS_ANALOG_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/braids/chords_stack.cc",
    "content": "//https://github.com/boourns/eurorack/blob/master/braids/stack.cc\n\n#include \"braids/digital_oscillator.h\"\n\n#include <algorithm>\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"braids/parameter_interpolation.h\"\n#include \"braids/resources.h\"\n#include \"braids/quantizer.h\"\n\nextern braids::Quantizer quantizer;\n\nnamespace braids {\n\nusing namespace stmlib;\n\nconst int kStackSize = 6;\n\n#define CALC_SINE(phase) Interpolate88(ws_sine_fold, (Interpolate824(wav_sine, phase) * gain >> 15) + 32768);\n\ninline void renderChordSine(\n  DigitalOscillatorState& state_,\n  int16_t parameter_[2],\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  uint32_t *phase_increment, \n  uint8_t noteCount) {\n  \n  uint32_t phase_0, phase_1, phase_2, phase_3, phase_4;\n  int16_t gain = 2048 + (parameter_[0] * 30720 >> 15);\n\n  phase_0 = state_.stack.phase[0];\n  phase_1 = state_.stack.phase[1];\n  phase_2 = state_.stack.phase[2];\n  phase_3 = state_.stack.phase[3];\n  phase_4 = state_.stack.phase[4];\n\n  while (size) {\n    int32_t sample = 0;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n\n    sample = CALC_SINE(phase_0);\n\n    sample += CALC_SINE(phase_1);\n    sample += CALC_SINE(phase_2);\n    sample += CALC_SINE(phase_3);\n\n    if (noteCount > 4) {\n      sample += CALC_SINE(phase_4);\n    }\n\n    sample = (sample >> 3) + (sample >> 5);\n    CLIP(sample)\n    *buffer++ = sample;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n\n    sample = CALC_SINE(phase_0);\n\n    sample += CALC_SINE(phase_1);\n    sample += CALC_SINE(phase_2);\n    sample += CALC_SINE(phase_3);\n\n    if (noteCount > 4) {\n      sample += CALC_SINE(phase_4);\n    }\n\n    sample = (sample >> 3) + (sample >> 5);\n    CLIP(sample)\n    *buffer++ = sample;\n\n    size -= 2;\n  }\n  \n  state_.stack.phase[0] = phase_0;\n  state_.stack.phase[1] = phase_1;\n  state_.stack.phase[2] = phase_2;\n  state_.stack.phase[3] = phase_3;\n  state_.stack.phase[4] = phase_4;\n}\n\ninline void renderChordSaw(\n  DigitalOscillatorState& state_,\n  int16_t parameter_[2],\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  uint32_t *phase_increment, \n  uint8_t noteCount) {\n\n  uint32_t phase_0, phase_1, phase_2, phase_3, phase_4, phase_5;\n\n  uint32_t detune = 0;\n\n  for (int i = 0; i < 2; i++) {\n    phase_0 = state_.stack.phase[(i*6)+0];\n    phase_1 = state_.stack.phase[(i*6)+1];\n    phase_2 = state_.stack.phase[(i*6)+2];\n    phase_3 = state_.stack.phase[(i*6)+3];\n    phase_4 = state_.stack.phase[(i*6)+4];\n    phase_5 = state_.stack.phase[(i*6)+5];\n\n    if (i == 1) {\n      detune = parameter_[0]<<3;\n    }\n\n    int16_t *b = buffer;\n    size_t s = size;\n\n    while (s) {\n      int32_t sample = 0;\n      \n      phase_0 += phase_increment[0] + detune;\n      phase_1 += phase_increment[1] - detune;\n      phase_2 += phase_increment[2] + detune;\n      phase_3 += phase_increment[3] - detune;\n      phase_4 += phase_increment[4] + detune;\n      phase_5 += phase_increment[5] - detune;\n\n      sample += (1 << 15) - (phase_0 >> 16);\n      sample += (1 << 15) - (phase_1 >> 16);\n      sample += (1 << 15) - (phase_2 >> 16);\n      sample += (1 << 15) - (phase_3 >> 16);\n\n      if (noteCount > 4) {\n        sample += (1 << 15) - (phase_4 >> 16);\n      }\n      if (noteCount > 5) {\n        sample += (1 << 15) - (phase_5 >> 16);\n      }\n\n      sample = (sample >> 2) + (sample >> 5);\n      CLIP(sample)\n      if (i == 0) {\n        *b++ = sample >> 1;\n      } else {\n        *b += sample >> 1;\n        b++;\n      }\n      \n      phase_0 += phase_increment[0] + detune;\n      phase_1 += phase_increment[1] - detune;\n      phase_2 += phase_increment[2] + detune;\n      phase_3 += phase_increment[3] - detune;\n      phase_4 += phase_increment[4] + detune;\n      phase_5 += phase_increment[5] - detune;\n\n      sample = (1 << 15) - (phase_0 >> 16);\n      sample += (1 << 15) - (phase_1 >> 16);\n      sample += (1 << 15) - (phase_2 >> 16);\n      sample += (1 << 15) - (phase_3 >> 16);\n\n      if (noteCount > 4) {\n        sample += (1 << 15) - (phase_4 >> 16);\n      }\n      if (noteCount > 5) {\n        sample += (1 << 15) - (phase_5 >> 16);\n      }\n\n      sample = (sample >> 2) + (sample >> 5);\n      CLIP(sample)\n      if (i == 0) {\n        *b++ = sample >> 1;\n      } else {\n        *b += sample >> 1;\n        b++;\n      }\n\n      s -= 2;\n    }\n    state_.stack.phase[(i*6)+0] = phase_0;\n    state_.stack.phase[(i*6)+1] = phase_1;\n    state_.stack.phase[(i*6)+2] = phase_2;\n    state_.stack.phase[(i*6)+3] = phase_3;\n    state_.stack.phase[(i*6)+4] = phase_4;\n    state_.stack.phase[(i*6)+5] = phase_5;\n  }\n}\n\n// #define CALC_TRIANGLE_RAW(x) ((int16_t) ((((x >> 16) << 1) ^ (x & 0x80000000 ? 0xffff : 0x0000))) + 32768)\n#define CALC_TRIANGLE(x) Interpolate88(ws_tri_fold, (calc_triangle_raw(x) * gain >> 15) + 32768)\n\ninline int16_t calc_triangle_raw(uint32_t phase) {\n  uint16_t phase_16 = phase >> 16;\n  int16_t triangle = (phase_16 << 1) ^ (phase_16 & 0x8000 ? 0xffff : 0x0000);\n  return triangle + 32768;\n}\n\ninline void renderChordTriangle(\n  DigitalOscillatorState& state_,\n  int16_t parameter_[2],\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  uint32_t *phase_increment, \n  uint8_t noteCount) {\n  uint32_t phase_0, phase_1, phase_2, phase_3, phase_4, phase_5;\n\n  phase_0 = state_.stack.phase[0];\n  phase_1 = state_.stack.phase[1];\n  phase_2 = state_.stack.phase[2];\n  phase_3 = state_.stack.phase[3];\n  phase_4 = state_.stack.phase[4];\n  phase_5 = state_.stack.phase[5];\n\n  int16_t gain = 2048 + (parameter_[0] * 30720 >> 15);\n\n  while (size) {\n    int32_t sample = 0;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n    phase_5 += phase_increment[5];\n\n    sample = CALC_TRIANGLE(phase_0);\n    sample += CALC_TRIANGLE(phase_1);\n    sample += CALC_TRIANGLE(phase_2);\n    sample += CALC_TRIANGLE(phase_3);\n\n    if (noteCount > 4) {\n      sample += CALC_TRIANGLE(phase_4);\n    }\n    if (noteCount > 5) {\n      sample += CALC_TRIANGLE(phase_5);\n    }\n\n    sample = (sample >> 3) + (sample >> 5);\n    CLIP(sample)\n    *buffer++ = sample;\n\n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n    phase_5 += phase_increment[5];\n\n    sample = CALC_TRIANGLE(phase_0);\n    sample += CALC_TRIANGLE(phase_1);\n    sample += CALC_TRIANGLE(phase_2);\n    sample += CALC_TRIANGLE(phase_3);\n\n    if (noteCount > 4) {\n      sample += CALC_TRIANGLE(phase_4);\n    }\n    if (noteCount > 5) {\n      sample += CALC_TRIANGLE(phase_5);\n    }\n\n    sample = (sample >> 3) + (sample >> 5);\n    CLIP(sample)\n    *buffer++ = sample;\n\n    size -= 2;\n  }\n  \n  state_.stack.phase[0] = phase_0;\n  state_.stack.phase[1] = phase_1;\n  state_.stack.phase[2] = phase_2;\n  state_.stack.phase[3] = phase_3;\n  state_.stack.phase[4] = phase_4;\n  state_.stack.phase[5] = phase_5;\n}\n\n#define CALC_SQUARE(x, width) ((x > width) ? 5400 : -5400)\n\ninline void renderChordSquare(\n  DigitalOscillatorState& state_,\n  int16_t parameter_[2],\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  uint32_t *phase_increment, \n  uint8_t noteCount) {\n\n  uint32_t phase_0, phase_1, phase_2, phase_3, phase_4, phase_5;\n  uint32_t pw = parameter_[0] << 16;\n\n  phase_0 = state_.stack.phase[0];\n  phase_1 = state_.stack.phase[1];\n  phase_2 = state_.stack.phase[2];\n  phase_3 = state_.stack.phase[3];\n  phase_4 = state_.stack.phase[4];\n  phase_5 = state_.stack.phase[5];\n\n  while (size) {\n    int32_t sample = 0;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n\n    sample = CALC_SQUARE(phase_0, pw);\n    sample += CALC_SQUARE(phase_1, pw);\n    sample += CALC_SQUARE(phase_2, pw);\n    sample += CALC_SQUARE(phase_3, pw);\n\n    if (noteCount > 4) {\n      sample += CALC_SQUARE(phase_4, pw);\n    }\n    if (noteCount > 5) {\n      sample += CALC_SQUARE(phase_5, pw);\n    }\n\n    CLIP(sample)\n    *buffer++ = sample;\n\n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n\n    sample = CALC_SQUARE(phase_0, pw);\n    sample += CALC_SQUARE(phase_1, pw);\n    sample += CALC_SQUARE(phase_2, pw);\n    sample += CALC_SQUARE(phase_3, pw);\n\n    if (noteCount > 4) {\n      sample += CALC_SQUARE(phase_4, pw);\n    }\n    if (noteCount > 5) {\n      sample += CALC_SQUARE(phase_5, pw);\n    }\n\n    CLIP(sample)\n    *buffer++ = sample;\n\n    size -= 2;\n  }\n  \n  state_.stack.phase[0] = phase_0;\n  state_.stack.phase[1] = phase_1;\n  state_.stack.phase[2] = phase_2;\n  state_.stack.phase[3] = phase_3;\n  state_.stack.phase[4] = phase_4;\n  state_.stack.phase[5] = phase_5;\n}\n\nconst uint8_t mini_wave_line[] = {\n  157, 161, 171, 188, 189, 191, 192, 193, 196, 198, 201, 234, 232,\n  229, 226, 224, 1, 2, 3, 4, 5, 8, 12, 32, 36, 42, 47, 252, 254, 141, 139,\n  135, 174\n};\n\n#define SEMI * 128\n\nconst uint16_t chords[17][3] = {\n  { 2, 4, 6 },\n  { 16, 32, 48 },\n  { 2 SEMI, 7 SEMI, 12 SEMI },\n  { 3 SEMI, 7 SEMI, 10 SEMI },\n  { 3 SEMI, 7 SEMI, 12 SEMI },\n  { 3 SEMI, 7 SEMI, 14 SEMI },\n  { 3 SEMI, 7 SEMI, 17 SEMI },\n  { 7 SEMI, 12 SEMI, 19 SEMI },\n  { 7 SEMI, 3 + 12 SEMI, 5 + 19 SEMI },\n  { 4 SEMI, 7 SEMI, 17 SEMI },\n  { 4 SEMI, 7 SEMI, 14 SEMI },\n  { 4 SEMI, 7 SEMI, 12 SEMI },\n  { 4 SEMI, 7 SEMI, 11 SEMI },\n  { 5 SEMI, 7 SEMI, 12 SEMI },\n  { 4, 7 SEMI, 12 SEMI },\n  { 4, 4 + 12 SEMI, 12 SEMI },\n  { 4, 4 + 12 SEMI, 12 SEMI },\n};\n\ninline void renderChordWavetable(\n  DigitalOscillatorState& state_,\n  int16_t parameter_[2],\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  uint32_t *phase_increment, \n  uint8_t noteCount) {\n\n  const uint8_t* wave_1 = wt_waves + mini_wave_line[parameter_[0] >> 10] * 129;\n  const uint8_t* wave_2 = wt_waves + mini_wave_line[(parameter_[0] >> 10) + 1] * 129;\n  uint16_t wave_xfade = parameter_[0] << 6;\n  uint32_t phase_0, phase_1, phase_2, phase_3, phase_4;\n\n  phase_0 = state_.stack.phase[0];\n  phase_1 = state_.stack.phase[1];\n  phase_2 = state_.stack.phase[2];\n  phase_3 = state_.stack.phase[3];\n  phase_4 = state_.stack.phase[4];\n\n  while (size) {\n    int32_t sample = 0;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n\n    sample = Crossfade(wave_1, wave_2, phase_0 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_1 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_2 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_3 >> 1, wave_xfade);\n    if (noteCount > 4) {\n      sample += Crossfade(wave_1, wave_2, phase_4 >> 1, wave_xfade);\n    }\n\n    sample = (sample >> 2);\n    CLIP(sample)\n    *buffer++ = sample;\n    \n    phase_0 += phase_increment[0];\n    phase_1 += phase_increment[1];\n    phase_2 += phase_increment[2];\n    phase_3 += phase_increment[3];\n    phase_4 += phase_increment[4];\n\n    sample = Crossfade(wave_1, wave_2, phase_0 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_1 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_2 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_3 >> 1, wave_xfade);\n    if (noteCount > 4) {\n      sample += Crossfade(wave_1, wave_2, phase_4 >> 1, wave_xfade);\n    }\n\n    sample = (sample >> 2);\n    CLIP(sample)\n    *buffer++ = sample;\n\n    size -= 2;\n  }\n  \n  state_.stack.phase[0] = phase_0;\n  state_.stack.phase[1] = phase_1;\n  state_.stack.phase[2] = phase_2;\n  state_.stack.phase[3] = phase_3;\n  state_.stack.phase[4] = phase_4;\n}\n\n// without the attribute this gets build as-is AND inlined into RenderStack :/\nvoid DigitalOscillator::renderChord(\n  const uint8_t *sync, \n  int16_t *buffer, \n  size_t size, \n  const uint8_t* noteOffset, \n  uint8_t noteCount) {\n\n  int32_t fm = 0;\n\n  if (strike_) {\n    for (size_t i = 0; i < kStackSize; ++i) {\n      state_.stack.phase[i] = Random::GetWord();\n    }\n    strike_ = false;\n  }\n\n  // Do not use an array here to allow these to be kept in arbitrary registers.\n  uint32_t phase_increment[6];\n\n  if (quantizer.enabled()) {\n    int8_t index = 0;\n    int8_t root = 0;\n    quantizer.Process(pitch_, 0, &root);\n    fm = pitch_ - quantizer.Lookup(root);\n\n    phase_increment[0] = phase_increment_;\n    for (size_t i = 1; i < noteCount; i++) {\n      if(custom_chord != nullptr)\n        phase_increment[i] = DigitalOscillator::ComputePhaseIncrement(quantizer.Process(pitch_ + (noteOffset[i-1]<<7)));\n      else {\n        index = (root + noteOffset[i-1]);\n        phase_increment[i] = DigitalOscillator::ComputePhaseIncrement(quantizer.Lookup(index) + fm);\n      }        \n    }\n  } else {\n    noteCount = 4;\n    uint16_t chord_integral = parameter_[1] >> 11;\n    uint16_t chord_fractional = parameter_[1] << 5;\n    if (chord_fractional < 30720) {\n      chord_fractional = 0;\n    } else if (chord_fractional >= 34816) {\n      chord_fractional = 65535;\n    } else {\n      chord_fractional = (chord_fractional - 30720) * 16;\n    }\n\n    phase_increment[0] = phase_increment_;\n    for (size_t i = 0; i < 3; ++i) {\n      uint16_t detune_1 = chords[chord_integral][i];\n      uint16_t detune_2 = chords[chord_integral + 1][i];\n      uint16_t detune = detune_1 + ((detune_2 - detune_1) * chord_fractional >> 16);\n      phase_increment[i+1] = DigitalOscillator::ComputePhaseIncrement(pitch_ + detune);\n    }\n  }\n\n  if (shape_ == OSC_SHAPE_STACK_SAW || shape_ == OSC_SHAPE_CHORD_SAW) {\n    renderChordSaw(state_, parameter_, sync, buffer, size, phase_increment, noteCount);\n  } else if (shape_ == OSC_SHAPE_STACK_WAVETABLE || shape_ == OSC_SHAPE_CHORD_WAVETABLE) {\n    renderChordWavetable(state_, parameter_, sync, buffer, size, phase_increment, noteCount);\n  } else if (shape_ == OSC_SHAPE_STACK_TRIANGLE || shape_ == OSC_SHAPE_CHORD_TRIANGLE) {\n    renderChordTriangle(state_, parameter_, sync, buffer, size, phase_increment, noteCount);\n  } else if (shape_ == OSC_SHAPE_STACK_SQUARE || shape_ == OSC_SHAPE_CHORD_SQUARE) {\n    renderChordSquare(state_, parameter_, sync, buffer, size, phase_increment, noteCount);\n  } else {\n    renderChordSine(state_, parameter_, sync, buffer, size, phase_increment, noteCount);\n  }\n}\n\n//number of notes, followed by offsets\nconst uint8_t diatonic_chords[8][6] = {\n  {0, 2, 4, 7, 0, 0},  // octave\n  {0, 2, 4, 5, 7, 0},  // octave add6\n  {0, 2, 4, 6, 0, 0},  // 7th\n  {0, 2, 4, 5, 6, 0},  // 7th add6\n  {0, 2, 4, 6, 8, 0},  // 9th\n  {0, 2, 4, 6, 8, 10}, // 11th\n  {0, 2, 4, 5, 7, 10}, // 11th add6\n  {0, 2, 4, 8, 0, 0},  // add9\n};\n\nconst uint8_t* custom_chord = nullptr;\n\nvoid DigitalOscillator::RenderDiatonicChord(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  const uint8_t* offsets = custom_chord;\n  \n  if(offsets == nullptr) \n    offsets = diatonic_chords[(parameter_[1] >> 12) & 0x7];\n    \n  uint8_t len = 4;\n    \n  for (size_t i = 4; i < 6; i++) {\n    if(offsets[i] > 0)\n      len ++;\n  }\n\n  renderChord(sync, buffer, size, &offsets[1], len);\n}\n\nvoid DigitalOscillator::RenderStack(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  uint8_t span = 1 + (parameter_[1] >> 11);\n  uint8_t offsets[kStackSize];\n  uint8_t acc = 0;\n  uint8_t count = kStackSize-1;\n  uint8_t i = 0;\n\n  for (; i < count; i++) {\n    acc += span;\n    offsets[i] = acc;\n  }\n\n  // don't pass in kStackSize or gcc will render a second, optimized version of renderChord that\n  // knows noteCount is static.\n  renderChord(sync, buffer, size, offsets, i);\n}\n\n}\n"
  },
  {
    "path": "lib/braids/digital_oscillator.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Oscillator - digital style waveforms.\n\n#include \"braids/digital_oscillator.h\"\n\n#include <algorithm>\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"braids/parameter_interpolation.h\"\n#include \"braids/resources.h\"\n\nnamespace braids {\n  \nusing namespace stmlib;\n\nstatic const uint16_t kHighestNote = 140 * 128;\nstatic const uint16_t kPitchTableStart = 128 * 128;\nstatic const uint16_t kOctave = 12 * 128;\n\nstatic const uint32_t kFIR4Coefficients[4] = { 10530, 14751, 16384, 14751 };\nstatic const uint32_t kFIR4DcOffset = 28208;\n\nuint32_t DigitalOscillator::ComputePhaseIncrement(int16_t midi_pitch) {\n  if (midi_pitch >= kPitchTableStart) {\n    midi_pitch = kPitchTableStart - 1;\n  }\n  \n  int32_t ref_pitch = midi_pitch;\n  ref_pitch -= kPitchTableStart;\n  \n  size_t num_shifts = 0;\n  while (ref_pitch < 0) {\n    ref_pitch += kOctave;\n    ++num_shifts;\n  }\n  \n  uint32_t a = lut_oscillator_increments[ref_pitch >> 4];\n  uint32_t b = lut_oscillator_increments[(ref_pitch >> 4) + 1];\n  uint32_t phase_increment = a + \\\n      (static_cast<int32_t>(b - a) * (ref_pitch & 0xf) >> 4);\n  phase_increment >>= num_shifts;\n  return phase_increment;\n}\n\nuint32_t DigitalOscillator::ComputeDelay(int16_t midi_pitch) {\n  if (midi_pitch >= kHighestNote - kOctave) {\n    midi_pitch = kHighestNote - kOctave;\n  }\n  \n  int32_t ref_pitch = midi_pitch;\n  ref_pitch -= kPitchTableStart;\n  \n  size_t num_shifts = 0;\n  while (ref_pitch < 0) {\n    ref_pitch += kOctave;\n    ++num_shifts;\n  }\n  \n  uint32_t a = lut_oscillator_delays[ref_pitch >> 4];\n  uint32_t b = lut_oscillator_delays[(ref_pitch >> 4) + 1];\n  uint32_t delay = a + (static_cast<int32_t>(b - a) * (ref_pitch & 0xf) >> 4);  \n  delay >>= 12 - num_shifts;\n  return delay;\n}\n\nvoid DigitalOscillator::Render(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n\n  // Quantize parameter for FM.\n  if (shape_ >= OSC_SHAPE_FM &&\n      shape_ <= OSC_SHAPE_CHAOTIC_FEEDBACK_FM) {\n    uint16_t integral = parameter_[1] >> 8;\n    uint16_t fractional = parameter_[1] & 255;\n    int16_t a = lut_fm_frequency_quantizer[integral];\n    int16_t b = lut_fm_frequency_quantizer[integral + 1];\n    parameter_[1] = a + ((b - a) * fractional >> 8);\n  }    \n  \n  RenderFn fn = fn_table_[shape_];\n  \n  if (shape_ != previous_shape_) {\n    Init();\n    previous_shape_ = shape_;\n    init_ = true;\n  }\n  \n  phase_increment_ = ComputePhaseIncrement(pitch_);\n  delay_ = ComputeDelay(pitch_);\n  \n  if (pitch_ > kHighestNote) {\n    pitch_ = kHighestNote;\n  } else if (pitch_ < 0) {\n    pitch_ = 0;\n  }\n\n  (this->*fn)(sync, buffer, size);\n}\n\nvoid DigitalOscillator::RenderTripleRingMod(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint32_t phase = phase_ + (1L << 30);\n  uint32_t increment = phase_increment_;\n  uint32_t modulator_phase = state_.vow.formant_phase[0];\n  uint32_t modulator_phase_2 = state_.vow.formant_phase[1];\n  uint32_t modulator_phase_increment = ComputePhaseIncrement(\n    pitch_ + ((parameter_[0] - 16384) >> 2)\n  );\n  uint32_t modulator_phase_increment_2 = ComputePhaseIncrement(\n    pitch_ + ((parameter_[1] - 16384) >> 2)\n  );\n  \n  while (size--) {\n    phase += increment;\n    if (*sync++) {\n      phase = 0;\n      modulator_phase = 0;\n      modulator_phase_2 = 0;\n    }\n    modulator_phase += modulator_phase_increment;\n    modulator_phase_2 += modulator_phase_increment_2;\n    int16_t result = Interpolate824(wav_sine, phase);\n    result = result * Interpolate824(wav_sine, modulator_phase) >> 16;\n    result = result * Interpolate824(wav_sine, modulator_phase_2) >> 16;\n    result = Interpolate88(ws_moderate_overdrive, result + 32768);\n    *buffer++ = result;\n  }\n  phase_ = phase - (1L << 30);\n  state_.vow.formant_phase[0] = modulator_phase;\n  state_.vow.formant_phase[1] = modulator_phase_2;\n}\n\nvoid DigitalOscillator::RenderSawSwarm(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int32_t detune = parameter_[0] + 1024;\n  detune = (detune * detune) >> 9;\n  uint32_t increments[7];\n  for (int16_t i = 0; i < 7; ++i) {\n    int32_t saw_detune = detune * (i - 3);\n    int32_t detune_integral = saw_detune >> 16;\n    int32_t detune_fractional = saw_detune & 0xffff;\n    int32_t increment_a = ComputePhaseIncrement(pitch_ + detune_integral);\n    int32_t increment_b = ComputePhaseIncrement(pitch_ + detune_integral + 1);\n    increments[i] = increment_a + \\\n        (((increment_b - increment_a) * detune_fractional) >> 16);\n  }\n  if (strike_) {\n    for (size_t i = 0; i < 6; ++i) {\n      state_.saw.phase[i] = Random::GetWord();\n    }\n    strike_ = false;\n  }\n  int32_t hp_cutoff = pitch_;\n  if (parameter_[1] < 10922) {\n    hp_cutoff += ((parameter_[1] - 10922) * 24) >> 5;\n  } else {\n    hp_cutoff += ((parameter_[1] - 10922) * 12) >> 5;\n  }\n  if (hp_cutoff < 0) {\n    hp_cutoff = 0;\n  } else if (hp_cutoff > 32767) {\n    hp_cutoff = 32767;\n  }\n  \n  int32_t f = Interpolate824(lut_svf_cutoff, hp_cutoff << 17);\n  int32_t damp = lut_svf_damp[0];\n  int32_t bp = state_.saw.bp;\n  int32_t lp = state_.saw.lp;\n\n  while (size--) {\n    if (*sync++) {\n      for (size_t i = 0; i < 6; ++i) {\n        state_.saw.phase[i] = 0;\n      }\n    }\n    int32_t notch, hp, sample;\n    \n    phase_ += increments[0];\n    state_.saw.phase[0] += increments[1];\n    state_.saw.phase[1] += increments[2];\n    state_.saw.phase[2] += increments[3];\n    state_.saw.phase[3] += increments[4];\n    state_.saw.phase[4] += increments[5];\n    state_.saw.phase[5] += increments[6];\n    \n    // Compute a sample.\n    sample = -28672;\n    sample += phase_ >> 19;\n    sample += state_.saw.phase[0] >> 19;\n    sample += state_.saw.phase[1] >> 19;\n    sample += state_.saw.phase[2] >> 19;\n    sample += state_.saw.phase[3] >> 19;\n    sample += state_.saw.phase[4] >> 19;\n    sample += state_.saw.phase[5] >> 19;\n    sample = Interpolate88(ws_moderate_overdrive, sample + 32768);\n    \n    notch = sample - (bp * damp >> 15);\n    lp += f * bp >> 15;\n    CLIP(lp)\n    hp = notch - lp;\n    bp += f * hp >> 15;\n    \n    int32_t result = hp;\n    CLIP(result)\n    *buffer++ = result;\n  }\n  state_.saw.lp = lp;\n  state_.saw.bp = bp;\n}\n\nvoid DigitalOscillator::RenderComb(\n    const uint8_t* sync,\n     int16_t* buffer,\n     size_t size) {\n  // Filter the delay time to avoid clicks/glitches.\n  int32_t pitch = pitch_ + ((parameter_[0] - 16384) >> 1);\n  int32_t filtered_pitch = state_.ffm.previous_sample;\n  filtered_pitch = (15 * filtered_pitch + pitch) >> 4;\n  state_.ffm.previous_sample = filtered_pitch;\n  \n  int16_t* dl = delay_lines_.comb;\n  uint32_t delay = ComputeDelay(filtered_pitch);\n  if (delay > (kCombDelayLength << 16)) {\n    delay = kCombDelayLength << 16;\n  }\n  uint32_t delay_integral = delay >> 16;\n  int32_t delay_fractional = delay & 0xffff;\n\n  // Warp the resonance curve to have a more precise adjustment in the extrema.\n  int16_t resonance = (parameter_[1] << 1) - 32768;\n  resonance = Interpolate88(ws_moderate_overdrive, resonance + 32768);\n  \n  uint32_t delay_ptr = phase_;\n  delay_ptr =  delay_ptr % kCombDelayLength;\n  while (size--) {\n    int32_t in = *buffer;\n    uint32_t offset = delay_ptr + 2 * kCombDelayLength - delay_integral;\n    int32_t a = dl[offset % kCombDelayLength];\n    int32_t b = dl[(offset - 1) % kCombDelayLength];\n    int32_t delayed_sample = a + (((b - a) * (delay_fractional >> 1)) >> 15);\n    int32_t feedback = (delayed_sample * resonance >> 15) + (in >> 1);\n    CLIP(feedback)\n    dl[delay_ptr] = feedback;\n    int32_t out = (in + (delayed_sample << 1)) >> 1;\n    CLIP(out)\n    *buffer++ = out;\n    delay_ptr = (delay_ptr + 1) % kCombDelayLength;\n  }\n  phase_ = delay_ptr;\n}\n\nvoid DigitalOscillator::RenderToy(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  // 4 times oversampling.\n  phase_increment_ >>= 2;\n  \n  uint32_t phase_increment = phase_increment_;\n  uint32_t phase = phase_;\n  \n  uint16_t decimation_counter = state_.toy.decimation_counter;\n  uint16_t decimation_count = 512 - (parameter_[0] >> 6);\n\n  uint8_t held_sample = state_.toy.held_sample;\n  while (size--) {\n    int32_t filtered_sample = 0;\n    if (*sync++) {\n      phase = 0;\n    } \n    for (size_t tap = 0; tap < 4; ++tap) {\n      phase += phase_increment;\n      if (decimation_counter >= decimation_count) {\n        uint8_t x = parameter_[1] >> 8;\n        held_sample = (((phase >> 24) ^ (x << 1)) & (~x)) + (x >> 1);\n        decimation_counter = 0;\n      }\n      filtered_sample += kFIR4Coefficients[tap] * held_sample;\n      ++decimation_counter;\n    }\n    *buffer++ = (filtered_sample >> 8) - kFIR4DcOffset;\n  }\n  state_.toy.held_sample = held_sample;\n  state_.toy.decimation_counter = decimation_counter;\n  phase_ = phase;\n}\n \nconst uint32_t kPhaseReset[] = {\n  0,\n  0x80000000,\n  0x40000000,\n  0x80000000\n};\n\nvoid DigitalOscillator::RenderDigitalFilter(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int16_t shifted_pitch = pitch_ + ((parameter_[0] - 2048) >> 1);\n  if (shifted_pitch > 16383) {\n    shifted_pitch = 16383;\n  }\n  uint32_t modulator_phase = state_.res.modulator_phase;\n  uint32_t square_modulator_phase = state_.res.square_modulator_phase;\n  int32_t square_integrator = state_.res.integrator;\n  \n  uint8_t filter_type = shape_ - OSC_SHAPE_DIGITAL_FILTER_LP;\n  \n  uint32_t modulator_phase_increment = state_.res.modulator_phase_increment;\n  uint32_t target_increment = ComputePhaseIncrement(shifted_pitch);\n  uint32_t modulator_phase_increment_increment = \n    modulator_phase_increment < target_increment\n    ? (target_increment - modulator_phase_increment) / size\n    : ~((modulator_phase_increment - target_increment) / size);\n    \n  while (size--) {\n    phase_ += phase_increment_;\n    modulator_phase_increment += modulator_phase_increment_increment;\n    modulator_phase += modulator_phase_increment;\n    uint16_t integrator_gain = (modulator_phase_increment >> 14);\n    \n    if (*sync++) {\n      state_.res.polarity = 1;\n      phase_ = 0;\n      modulator_phase = 0;\n      square_modulator_phase = 0;\n      square_integrator = 0;\n    }\n    \n    square_modulator_phase += modulator_phase_increment;\n    if (phase_ < phase_increment_) {\n      modulator_phase = kPhaseReset[filter_type];\n    }\n    if ((phase_ << 1) < (phase_increment_ << 1)) {\n      state_.res.polarity = !state_.res.polarity;\n      square_modulator_phase = kPhaseReset[(filter_type & 1) + 2];\n    }\n    \n    int32_t carrier = Interpolate824(wav_sine, modulator_phase);\n    int32_t square_carrier = Interpolate824(wav_sine, square_modulator_phase);\n    \n    uint16_t saw = ~(phase_ >> 16);\n    uint16_t double_saw = ~(phase_ >> 15);\n    uint16_t triangle = (phase_ >> 15) ^ (phase_ & 0x80000000 ? 0xffff : 0x0000);\n    uint16_t window = parameter_[1] < 16384 ? saw : triangle;\n\n    int32_t pulse = (square_carrier * double_saw) >> 16;\n    if (state_.res.polarity) {\n      pulse = -pulse;\n    }\n    square_integrator += (pulse * integrator_gain) >> 16;\n    CLIP(square_integrator)\n    \n    int16_t saw_tri_signal;\n    int16_t square_signal;\n    \n    if (filter_type & 2) {\n      saw_tri_signal = (carrier * window) >> 16;\n      square_signal = pulse;\n    } else {\n      saw_tri_signal = (window * (carrier + 32768) >> 16) - 32768;\n      square_signal = square_integrator;\n      if (filter_type == 1) {\n        square_signal = (pulse + square_integrator) >> 1;\n      }\n    }\n    uint16_t balance = (parameter_[1] < 16384 ? \n                        parameter_[1] : ~parameter_[1]) << 2;\n    *buffer++ = Mix(saw_tri_signal, square_signal, balance);\n  }\n  state_.res.modulator_phase = modulator_phase;\n  state_.res.square_modulator_phase = square_modulator_phase;\n  state_.res.integrator = square_integrator;\n  state_.res.modulator_phase_increment = modulator_phase_increment;\n}\n\nvoid DigitalOscillator::RenderVosim(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  for (size_t i = 0; i < 2; ++i) {\n    state_.vow.formant_increment[i] = ComputePhaseIncrement(parameter_[i] >> 1);\n  }\n  while (size--) {\n    phase_ += phase_increment_;\n    if (*sync++) {\n      phase_ = 0;\n    }\n    int32_t sample = 16384 + 8192;\n    state_.vow.formant_phase[0] += state_.vow.formant_increment[0];\n    sample += Interpolate824(wav_sine, state_.vow.formant_phase[0]) >> 1;\n    \n    state_.vow.formant_phase[1] += state_.vow.formant_increment[1];\n    sample += Interpolate824(wav_sine, state_.vow.formant_phase[1]) >> 2;\n    \n    sample = sample * (Interpolate824(lut_bell, phase_) >> 1) >> 15;\n    if (phase_ < phase_increment_) {\n      state_.vow.formant_phase[0] = 0;\n      state_.vow.formant_phase[1] = 0;\n      sample = 0;\n    }\n    sample -= 16384 + 8192;\n    *buffer++ = sample;\n  }\n}\n\nstruct PhonemeDefinition {\n  uint8_t formant_frequency[3];\n  uint8_t formant_amplitude[3];\n};\n\nstatic const PhonemeDefinition vowels_data[9] = {\n    { { 27,  40,  89 }, { 15,  13,  1 } },\n    { { 18,  51,  62 }, { 13,  12,  6 } },\n    { { 15,  69,  93 }, { 14,  12,  7 } },\n    { { 10,  84, 110 }, { 13,  10,  8 } },\n    { { 23,  44,  87 }, { 15,  12,  1 } },\n    { { 13,  29,  80 }, { 13,   8,  0 } },\n    { {  6,  46,  81 }, { 12,   3,  0 } },\n    { {  9,  51,  95 }, { 15,   3,  0 } },\n    { {  6,  73,  99 }, {  7,   3,  14 } }\n};\n\nstatic const PhonemeDefinition consonant_data[8] = {\n    { { 6, 54, 121 }, { 9,  9,  0 } },\n    { { 18, 50, 51 }, { 12,  10,  5 } },\n    { { 11, 24, 70 }, { 13,  8,  0 } },\n    { { 15, 69, 74 }, { 14,  12,  7 } },\n    { { 16, 37, 111 }, { 14,  8,  1 } },\n    { { 18, 51, 62 }, { 14,  12,  6 } },\n    { { 6, 26, 81 }, { 5,  5,  5 } },\n    { { 6, 73, 99 }, { 7,  10,  14 } },\n};\n\n\nvoid DigitalOscillator::RenderVowel(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  size_t vowel_index = parameter_[0] >> 12;\n  uint16_t balance = parameter_[0] & 0x0fff;\n  uint16_t formant_shift = (200 + (parameter_[1] >> 6));\n  if (strike_) {\n    strike_ = false;\n    state_.vow.consonant_frames = 160;\n    uint16_t index = (Random::GetSample() + 1) & 7;\n    for (size_t i = 0; i < 3; ++i) {\n      state_.vow.formant_increment[i] = \\\n          static_cast<uint32_t>(consonant_data[index].formant_frequency[i]) * \\\n          0x1000 * formant_shift;\n      state_.vow.formant_amplitude[i] = consonant_data[index].formant_amplitude[i];\n    }\n    state_.vow.noise = index >= 6 ? 4095 : 0;\n  }\n  \n  if (state_.vow.consonant_frames) {\n    --state_.vow.consonant_frames;\n  } else {\n    for (size_t i = 0; i < 3; ++i) {\n      state_.vow.formant_increment[i] = \n          (vowels_data[vowel_index].formant_frequency[i] * (0x1000 - balance) + \\\n           vowels_data[vowel_index + 1].formant_frequency[i] * balance) * \\\n           formant_shift;\n      state_.vow.formant_amplitude[i] =\n          (vowels_data[vowel_index].formant_amplitude[i] * (0x1000 - balance) + \\\n           vowels_data[vowel_index + 1].formant_amplitude[i] * balance) >> 12;\n    }\n    state_.vow.noise = 0;\n  }\n  int32_t noise = state_.vow.noise;\n  \n  while (size--) {\n    phase_ += phase_increment_;\n    size_t phaselet;\n    int16_t sample = 0;\n    state_.vow.formant_phase[0] += state_.vow.formant_increment[0];\n    phaselet = (state_.vow.formant_phase[0] >> 24) & 0xf0;\n    sample += wav_formant_sine[phaselet | state_.vow.formant_amplitude[0]];\n\n    state_.vow.formant_phase[1] += state_.vow.formant_increment[1];\n    phaselet = (state_.vow.formant_phase[1] >> 24) & 0xf0;\n    sample += wav_formant_sine[phaselet | state_.vow.formant_amplitude[1]];\n    \n    state_.vow.formant_phase[2] += state_.vow.formant_increment[2];\n    phaselet = (state_.vow.formant_phase[2] >> 24) & 0xf0;\n    sample += wav_formant_square[phaselet | state_.vow.formant_amplitude[2]];\n    \n    sample *= 255 - (phase_ >> 24);\n    int32_t phase_noise = Random::GetSample() * noise;\n    if ((phase_ + phase_noise) < phase_increment_) {\n      state_.vow.formant_phase[0] = 0;\n      state_.vow.formant_phase[1] = 0;\n      state_.vow.formant_phase[2] = 0;\n      sample = 0;\n    }\n    sample = Interpolate88(ws_moderate_overdrive, sample + 32768);\n    *buffer++ = sample;\n  }\n}\n\nstatic const int16_t formant_f_data[kNumFormants][kNumFormants][kNumFormants] = {\n  // bass\n  {\n    { 9519, 10738, 12448, 12636, 12892 }, // a\n    { 8620, 11720, 12591, 12932, 13158 }, // e\n    { 7579, 11891, 12768, 13122, 13323 }, // i\n    { 8620, 10013, 12591, 12768, 13010 }, // o\n    { 8324, 9519, 12591, 12831, 13048 } // u\n  },\n  // tenor\n  {\n    { 9696, 10821, 12810, 13010, 13263 }, // a\n    { 8620, 11827, 12768, 13228, 13477 }, // e\n    { 7908, 12038, 12932, 13263, 13452 }, // i\n    { 8620, 10156, 12768, 12932, 13085 }, // o\n    { 8324, 9519, 12852, 13010, 13296 } // u\n  },\n  // countertenor\n  {\n    { 9730, 10902, 12892, 13085, 13330 }, // a\n    { 8832, 11953, 12852, 13085, 13296 }, // e\n    { 7749, 12014, 13010, 13330, 13483 }, // i\n    { 8781, 10211, 12852, 13085, 13296 }, // o\n    { 8448, 9627, 12892, 13085, 13363 } // u\n  },\n  // alto\n  {\n    { 10156, 10960, 12932, 13427, 14195 }, // a\n    { 8620, 11692, 12852, 13296, 14195 }, // e\n    { 8324, 11827, 12852, 13550, 14195 }, // i\n    { 8881, 10156, 12956, 13427, 14195 }, // o\n    { 8160, 9860, 12708, 13427, 14195 } // u\n  },\n  // soprano\n  {\n    { 10156, 10960, 13010, 13667, 14195 }, // a\n    { 8324, 12187, 12932, 13489, 14195 }, // e\n    { 7749, 12337, 13048, 13667, 14195 }, // i\n    { 8881, 10156, 12956, 13609, 14195 }, // o\n    { 8160, 9860, 12852, 13609, 14195 } // u\n  }\n};\n\nstatic const int16_t formant_a_data[kNumFormants][kNumFormants][kNumFormants] = {\n  // bass\n  {\n    { 16384, 7318, 5813, 5813, 1638 }, // a\n    { 16384, 4115, 5813, 4115, 2062 }, // e\n    { 16384, 518, 2596, 1301, 652 }, // i\n    { 16384, 4617, 1460, 1638, 163 }, // o\n    { 16384, 1638, 411, 652, 259 } // u\n  },\n  // tenor\n  {\n    { 16384, 8211, 7318, 6522, 1301 }, // a\n    { 16384, 3269, 4115, 3269, 1638 }, // e\n    { 16384, 2913, 2062, 1638, 518 }, // i\n    { 16384, 5181, 4115, 4115, 821 }, // o\n    { 16384, 1638, 2314, 3269, 821 } // u\n  },\n  // countertenor\n  {\n    { 16384, 8211, 1159, 1033, 206 }, // a\n    { 16384, 3269, 2062, 1638, 1638 }, // e\n    { 16384, 1033, 1033, 259, 259 }, // i\n    { 16384, 5181, 821, 1301, 326 }, // o\n    { 16384, 1638, 1159, 518, 326 } // u\n  },\n  // alto\n  {\n    { 16384, 10337, 1638, 259, 16 }, // a\n    { 16384, 1033, 518, 291, 16 }, // e\n    { 16384, 1638, 518, 259, 16 }, // i\n    { 16384, 5813, 2596, 652, 29 }, // o\n    { 16384, 4115, 518, 163, 10 } // u\n  },\n  // soprano\n  {\n    { 16384, 8211, 411, 1638, 51 }, // a\n    { 16384, 1638, 2913, 163, 25 }, // e\n    { 16384, 4115, 821, 821, 103 }, // i\n    { 16384, 4617, 1301, 1301, 51 }, // o\n    { 16384, 2596, 291, 163, 16 } // u\n  }\n};\n\nint16_t DigitalOscillator::InterpolateFormantParameter(\n    const int16_t table[][kNumFormants][kNumFormants],\n    int16_t x,\n    int16_t y,\n    uint8_t formant) {\n  uint16_t x_index = x >> 13;\n  uint16_t x_mix = x << 3;\n  uint16_t y_index = y >> 13;\n  uint16_t y_mix = y << 3;\n  int16_t a = table[x_index][y_index][formant];\n  int16_t b = table[x_index + 1][y_index][formant];\n  int16_t c = table[x_index][y_index + 1][formant];\n  int16_t d = table[x_index + 1][y_index + 1][formant];\n  a = a + ((b - a) * x_mix >> 16);\n  c = c + ((d - c) * x_mix >> 16);\n  return a + ((c - a) * y_mix >> 16);\n}\n\nvoid DigitalOscillator::RenderVowelFof(\n  const uint8_t* sync,\n  int16_t* buffer,\n  size_t size) {\n\n  // The original implementation used FOF but we live in the future and it's\n  // less computationally expensive to render a proper bank of 5 SVF.\n\n  int16_t amplitudes[kNumFormants];\n  int32_t svf_lp[kNumFormants];\n  int32_t svf_bp[kNumFormants];\n  int16_t svf_f[kNumFormants];\n  \n  for (size_t i = 0; i < kNumFormants; ++i) {\n    int32_t frequency = InterpolateFormantParameter(\n        formant_f_data,\n        parameter_[1],\n        parameter_[0],\n        i) + (12 << 7);\n    svf_f[i] = Interpolate824(lut_svf_cutoff, frequency << 17);\n    amplitudes[i] = InterpolateFormantParameter(\n        formant_a_data,\n        parameter_[1],\n        parameter_[0],\n        i);\n    if (init_) {\n      svf_lp[i] = 0;\n      svf_bp[i] = 0;\n    } else {\n      svf_lp[i] = state_.fof.svf_lp[i];\n      svf_bp[i] = state_.fof.svf_bp[i];\n    }\n  }\n  \n  if (init_) {\n    init_ = false;\n  }\n  \n  uint32_t phase = phase_;\n  int32_t previous_sample = state_.fof.previous_sample;\n  int32_t next_saw_sample = state_.fof.next_saw_sample;\n  uint32_t increment = phase_increment_ << 1;\n  while (size) {\n    int32_t this_saw_sample = next_saw_sample;\n    next_saw_sample = 0;\n    phase += increment;\n    if (phase < increment) {\n      uint32_t t = phase / (increment >> 16);\n      if (t > 65535) {\n        t = 65535;\n      }\n      this_saw_sample -= static_cast<int32_t>(t * t >> 18);\n      t = 65535 - t;\n      next_saw_sample -= -static_cast<int32_t>(t * t >> 18);\n    }\n    next_saw_sample += phase >> 17;\n    int32_t in = this_saw_sample;\n    int32_t out = 0;\n    for (int32_t i = 0; i < 5; ++i) {\n      int32_t notch = in - (svf_bp[i] >> 6);\n      svf_lp[i] += svf_f[i] * svf_bp[i] >> 15;\n      CLIP(svf_lp[i])\n      int32_t hp = notch - svf_lp[i];\n      svf_bp[i] += svf_f[i] * hp >> 15;\n      CLIP(svf_bp[i])\n      out += svf_bp[i] * amplitudes[0] >> 17;\n    }\n    CLIP(out);\n    *buffer++ = (out + previous_sample) >> 1;\n    *buffer++ = out;\n    previous_sample = out;\n    size -= 2;\n  }\n  phase_ = phase;\n  state_.fof.next_saw_sample = next_saw_sample;\n  state_.fof.previous_sample = previous_sample;\n  for (size_t i = 0; i < kNumFormants; ++i) {\n    state_.fof.svf_lp[i] = svf_lp[i];\n    state_.fof.svf_bp[i] = svf_bp[i];\n  }\n}\n\nvoid DigitalOscillator::RenderFm(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint32_t modulator_phase = state_.modulator_phase;\n  uint32_t modulator_phase_increment = ComputePhaseIncrement(\n      (12 << 7) + pitch_ + ((parameter_[1] - 16384) >> 1)) >> 1;\n  \n  BEGIN_INTERPOLATE_PARAMETER_0    \n  \n  while (size--) {\n    INTERPOLATE_PARAMETER_0\n    \n    phase_ += phase_increment_;\n    if (*sync++) {\n      phase_ = modulator_phase = 0;\n    }\n    modulator_phase += modulator_phase_increment;\n\n    uint32_t pm = (\n        Interpolate824(wav_sine, modulator_phase) * parameter_0) << 2;\n    *buffer++ = Interpolate824(wav_sine, phase_ + pm);\n  }\n  \n  END_INTERPOLATE_PARAMETER_0\n  \n  previous_parameter_[0] = parameter_[0];\n  state_.modulator_phase = modulator_phase;\n}\n\nvoid DigitalOscillator::RenderFeedbackFm(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int16_t previous_sample = state_.ffm.previous_sample;\n  uint32_t modulator_phase = state_.ffm.modulator_phase;\n\n  int32_t attenuation = pitch_ - (72 << 7) + ((parameter_[1] - 16384) >> 1);\n  attenuation = 32767 - attenuation * 4;\n  if (attenuation < 0) attenuation = 0;\n  if (attenuation > 32767) attenuation = 32767;\n  \n  uint32_t modulator_phase_increment = ComputePhaseIncrement(\n      (12 << 7) + pitch_ + ((parameter_[1] - 16384) >> 1)) >> 1;\n  \n  BEGIN_INTERPOLATE_PARAMETER_0    \n  \n  while (size--) {\n    INTERPOLATE_PARAMETER_0\n    \n    phase_ += phase_increment_;\n    if (*sync++) {\n      phase_ = modulator_phase = 0;\n    }\n    \n    modulator_phase += modulator_phase_increment;\n\n    int32_t pm;\n    int32_t p = parameter_0 * attenuation >> 15;\n    pm = previous_sample << 14;\n    pm = (\n        Interpolate824(wav_sine, modulator_phase + pm) * p) << 1;\n    previous_sample = Interpolate824(wav_sine, phase_ + pm);\n    *buffer++ = previous_sample;\n  }\n  \n  END_INTERPOLATE_PARAMETER_0\n  \n  state_.ffm.previous_sample = previous_sample;\n  state_.ffm.modulator_phase = modulator_phase;\n}\n\nvoid DigitalOscillator::RenderChaoticFeedbackFm(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint32_t modulator_phase_increment = ComputePhaseIncrement(\n      (12 << 7) + pitch_ + ((parameter_[1] - 16384) >> 1)) >> 1;\n  int16_t previous_sample = state_.ffm.previous_sample;\n  uint32_t modulator_phase = state_.ffm.modulator_phase;\n  \n  BEGIN_INTERPOLATE_PARAMETER_0\n  \n  while (size--) {\n    INTERPOLATE_PARAMETER_0\n    \n    phase_ += phase_increment_;\n    if (*sync++) {\n      phase_ = modulator_phase = 0;\n    }\n    \n    int32_t pm;\n    pm = (Interpolate824(wav_sine, modulator_phase) * parameter_0) << 1;\n    previous_sample = Interpolate824(wav_sine, phase_ + pm);\n    *buffer++ = previous_sample;\n    modulator_phase += (modulator_phase_increment >> 8) * \\\n        (129 + (previous_sample >> 9));\n  }\n  \n  END_INTERPOLATE_PARAMETER_0\n  \n  state_.ffm.previous_sample = previous_sample;\n  state_.ffm.modulator_phase = modulator_phase;\n}\n\n\nstatic const int16_t kBellPartials[] = {\n  -1284, -1283, -184, -183, 385, 1175, 1536, 2233, 2434, 2934, 3110\n};\n\nstatic const int16_t kBellPartialAmplitudes[] = {\n  8192, 5488, 8192, 14745, 21872, 13680, 11960, 10895, 10895, 6144, 10895\n};\n\nstatic const uint16_t kBellPartialDecayLong[] = {\n  65533, 65533, 65533, 65532, 65531, 65531, 65530, 65529, 65527, 65523, 65519\n};\n\nstatic const uint16_t kBellPartialDecayShort[] = {\n  65308, 65283, 65186, 65123, 64839, 64889, 64632, 64409, 64038, 63302, 62575\n};\n\nstatic const int16_t kDrumPartials[] = {\n  0, 0, 1041, 1747, 1846, 3072\n};\n\nstatic const int16_t kDrumPartialAmplitude[] = {\n  16986, 2654, 3981, 5308, 3981, 2985\n};\n\nstatic const uint16_t kDrumPartialDecayLong[] = {\n  65533, 65531, 65531, 65531, 65531, 65516\n};\n\nstatic const uint16_t kDrumPartialDecayShort[] = {\n  65083, 64715, 64715, 64715, 64715, 62312\n};\n\nvoid DigitalOscillator::RenderStruckBell(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  // To save some CPU cycles, do not refresh the frequency of all partials at\n  // the same time. This create a kind of \"arpeggiation\" with high frequency\n  // CV though...\n  size_t first_partial = state_.add.current_partial;\n  size_t last_partial = std::min(\n      state_.add.current_partial + 3,\n      kNumBellPartials);\n  state_.add.current_partial = (first_partial + 3) % kNumBellPartials;\n  \n  if (strike_) {\n    for (size_t i = 0; i < kNumBellPartials; ++i) {\n      state_.add.partial_amplitude[i] = kBellPartialAmplitudes[i];\n      state_.add.partial_phase[i] = (1L << 30);\n    }\n    strike_ = false;\n    first_partial = 0;\n    last_partial = kNumBellPartials;\n  }\n  \n  for (size_t i = first_partial; i < last_partial; ++i) {\n    int16_t partial_pitch = pitch_ + kBellPartials[i];\n    if (i & 1) {\n      partial_pitch += parameter_[1] >> 7;\n    } else {\n      partial_pitch -= parameter_[1] >> 7;\n    }\n    state_.add.partial_phase_increment[i] = \\\n        ComputePhaseIncrement(partial_pitch) << 1;\n  }\n  \n  // Allow a \"droning\" bell with no energy loss when the parameter is set to\n  // its maximum value\n  if (parameter_[0] < 32000) {\n    for (size_t i = 0; i < kNumBellPartials; ++i) {\n      int32_t decay_long = kBellPartialDecayLong[i];\n      int32_t decay_short = kBellPartialDecayShort[i];\n      int16_t balance = (32767 - parameter_[0]) >> 8;\n      balance = balance * balance >> 7;\n      int32_t decay = decay_long - ((decay_long - decay_short) * balance >> 7);\n      state_.add.partial_amplitude[i] = \\\n          state_.add.partial_amplitude[i] * decay >> 16;\n    }\n  }\n  \n  int16_t previous_sample = state_.add.previous_sample;\n  while (size--) {\n    int32_t out = 0;\n    for (size_t i = 0; i < kNumBellPartials; ++i) {\n      state_.add.partial_phase[i] += state_.add.partial_phase_increment[i];\n      int32_t partial = Interpolate824(wav_sine, state_.add.partial_phase[i]);\n      out += partial * state_.add.partial_amplitude[i] >> 17;\n    }\n    CLIP(out)\n    *buffer++ = (out + previous_sample) >> 1;\n    *buffer++ = out; size--;\n    previous_sample = out;\n  }\n  state_.add.previous_sample = previous_sample;\n}\n\nvoid DigitalOscillator::RenderHarmonics(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint32_t phase = phase_;\n  int16_t previous_sample = state_.add.previous_sample;\n  uint32_t phase_increment = phase_increment_ << 1;\n  int32_t target_amplitude[kNumAdditiveHarmonics];\n  int32_t amplitude[kNumAdditiveHarmonics];\n  \n  int32_t peak = (kNumAdditiveHarmonics * parameter_[0]) >> 7;\n  int32_t second_peak = (peak >> 1) + kNumAdditiveHarmonics * 128;\n  int32_t second_peak_amount = parameter_[1] * parameter_[1] >> 15;\n\n  int32_t sqrtsqrt_width = parameter_[1] < 16384\n      ? parameter_[1] >> 6 : 511 - (parameter_[1] >> 6);\n  int32_t sqrt_width = sqrtsqrt_width * sqrtsqrt_width >> 10;\n  int32_t width = sqrt_width * sqrt_width + 4;\n  int32_t total = 0;\n  for (size_t i = 0; i < kNumAdditiveHarmonics; ++i) {\n    int32_t x = i << 8;\n    int32_t d, g;\n\n    d = (x - peak);\n    g = 32768 * 128 / (128 + d * d / width);\n    \n    d = (x - second_peak);\n    g += second_peak_amount * 128 / (128 + d * d / width);\n    total += g;\n    target_amplitude[i] = g;\n  }\n  \n  int32_t attenuation = 2147483647 / total;\n  for (size_t i = 0; i < kNumAdditiveHarmonics; ++i) {\n    if ((phase_increment >> 16) * (i + 1) > 0x4000) {\n      target_amplitude[i] = 0;\n    } else {\n      target_amplitude[i] = target_amplitude[i] * attenuation >> 16;\n    }\n    amplitude[i] = state_.hrm.amplitude[i];\n  }\n  \n  while (size) {\n    int32_t out;\n    \n    phase += phase_increment;\n    if (*sync++ || *sync++) {\n      phase = 0;\n    }\n    out = 0;\n    for (size_t i = 0; i < kNumAdditiveHarmonics; ++i) {\n      out += Interpolate824(wav_sine, phase * (i + 1)) * amplitude[i] >> 15;\n      amplitude[i] += (target_amplitude[i] - amplitude[i]) >> 8;\n    }\n    CLIP(out)\n    *buffer++ = (out + previous_sample) >> 1;\n    *buffer++ = out;\n    previous_sample = out;\n    size -= 2;\n  }\n  state_.add.previous_sample = previous_sample;\n  phase_ = phase;\n  for (size_t i = 0; i < kNumAdditiveHarmonics; ++i) {\n    state_.hrm.amplitude[i] = amplitude[i];\n  }\n}\n\nvoid DigitalOscillator::RenderStruckDrum(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  if (strike_) {\n    bool reset_phase = state_.add.partial_amplitude[0] < 1024;\n    for (size_t i = 0; i < kNumDrumPartials; ++i) {\n      state_.add.target_partial_amplitude[i] = kDrumPartialAmplitude[i];\n      if (reset_phase) {\n        state_.add.partial_phase[i] = (1L << 30);\n      }\n    }\n    strike_ = false;\n  } else {\n    if (parameter_[0] < 32000) {\n      for (size_t i = 0; i < kNumDrumPartials; ++i) {\n        int32_t decay_long = kDrumPartialDecayLong[i];\n        int32_t decay_short = kDrumPartialDecayShort[i];\n        int16_t balance = (32767 - parameter_[0]) >> 8;\n        balance = balance * balance >> 7;\n        int32_t decay = decay_long - ((decay_long - decay_short) * balance >> 7);\n        state_.add.target_partial_amplitude[i] = \\\n            state_.add.partial_amplitude[i] * decay >> 16;\n      }\n    }\n  }\n  \n  for (size_t i = 0; i < kNumDrumPartials; ++i) {\n    int16_t partial_pitch = pitch_ + kDrumPartials[i];\n    state_.add.partial_phase_increment[i] = ComputePhaseIncrement(partial_pitch) << 1;\n  }\n  \n  int16_t previous_sample = state_.add.previous_sample;\n  int32_t cutoff = (pitch_ - 12 * 128) + (parameter_[1] >> 2);\n  if (cutoff < 0) {\n    cutoff = 0;\n  } else if (cutoff > 32767) {\n    cutoff = 32767;\n  }\n  int32_t f = Interpolate824(lut_svf_cutoff, cutoff << 16);\n  int32_t lp_state_0 = state_.add.lp_noise[0];\n  int32_t lp_state_1 = state_.add.lp_noise[1];\n  int32_t lp_state_2 = state_.add.lp_noise[2];\n  int32_t harmonics_gain = parameter_[1] < 12888 ? (parameter_[1] + 4096) : 16384;\n  int32_t noise_mode_gain = parameter_[1] < 16384 ? 0 : parameter_[1] - 16384;\n  noise_mode_gain = noise_mode_gain * 12888 >> 14;\n\n  int32_t fade_increment = 65536 / size;\n  int32_t fade = 0;\n  while (size--) {\n    fade += fade_increment;\n    int32_t harmonics = 0;\n\n    int32_t noise = Random::GetSample();\n    if (noise > 16384) {\n      noise = 16384;\n    }\n    if (noise < -16384) {\n      noise = -16384;\n    }\n    lp_state_0 += (noise - lp_state_0) * f >> 15;\n    lp_state_1 += (lp_state_0 - lp_state_1) * f >> 15;\n    lp_state_2 += (lp_state_1 - lp_state_2) * f >> 15;\n\n    int32_t partials[kNumDrumPartials];\n    for (size_t i = 0; i < kNumDrumPartials; ++i) {\n      AdditiveState* a = &state_.add;\n      a->partial_phase[i] += a->partial_phase_increment[i];\n      int32_t partial = Interpolate824(wav_sine, a->partial_phase[i]);\n      int32_t amplitude = a->partial_amplitude[i] + \\\n          (((a->target_partial_amplitude[i] - a->partial_amplitude[i]) * fade) >> 15);\n      partial = partial * amplitude >> 16;\n      harmonics += partial;\n      partials[i] = partial;\n    }\n    int32_t sample = partials[0];\n    int32_t noise_mode_1 = partials[1] * lp_state_2 >> 8;\n    int32_t noise_mode_2 = partials[3] * lp_state_2 >> 9;\n    sample += noise_mode_1 * (12288 - noise_mode_gain) >> 14;\n    sample += noise_mode_2 * noise_mode_gain >> 14;\n    sample += harmonics * harmonics_gain >> 14;\n    CLIP(sample)\n    //sample = Interpolate88(ws_moderate_overdrive, sample + 32768);\n    *buffer++ = (sample + previous_sample) >> 1;\n    *buffer++ = sample; size--;\n    previous_sample = sample;\n  }\n  state_.add.previous_sample = previous_sample;\n  state_.add.lp_noise[0] = lp_state_0;\n  state_.add.lp_noise[1] = lp_state_1;\n  state_.add.lp_noise[2] = lp_state_2;\n  for (size_t i = 0; i < kNumBellPartials; ++i) {\n    AdditiveState* a = &state_.add;\n    a->partial_amplitude[i] = a->target_partial_amplitude[i];\n  }\n}\n\nvoid DigitalOscillator::RenderPlucked(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  phase_increment_ <<= 1;\n  if (strike_) {\n    ++active_voice_;\n    if (active_voice_ >= kNumPluckVoices) {\n      active_voice_ = 0;\n    }\n    // Find the optimal oversampling rate.\n    PluckState* p = &state_.plk[active_voice_];\n    int32_t increment = phase_increment_;\n    p->shift = 0;\n    while (increment > (2 << 22)) {\n      increment >>= 1;\n      ++p->shift;\n    }\n    p->size = 1024 >> p->shift;\n    p->mask = p->size - 1;\n    p->write_ptr = 0;\n    p->max_phase_increment = phase_increment_ << 1;\n    p->phase_increment = phase_increment_;\n    int32_t width = parameter_[1];\n    width = (3 * width) >> 1;\n    p->initialization_ptr = p->size * (8192 + width) >> 16;\n    strike_ = false;\n  }\n  \n  PluckState* current_string = &state_.plk[active_voice_];\n  \n  // Update the phase increment of the latest note, but do not transpose too\n  // high above the original pitch.\n  current_string->phase_increment = std::min(\n      phase_increment_,\n      current_string->max_phase_increment);\n  \n  // Compute loss and stretching factors.\n  uint32_t update_probability = parameter_[0] < 16384\n      ? 65535\n      : 131072 - (parameter_[0] >> 3) * 31;\n  int16_t loss = 4096 - (phase_increment_ >> 14);\n  if (loss < 256) {\n    loss = 256;\n  }\n  if (parameter_[0] < 16384) {\n    loss = loss * (16384 - parameter_[0]) >> 14;\n  } else {\n    loss = 0;\n  }\n  \n  int16_t previous_sample = state_.plk[0].previous_sample;\n\n  while (size) {\n    int32_t sample = 0;\n    for (size_t i = 0; i < kNumPluckVoices; ++i) {\n      PluckState* p = &state_.plk[i];\n      int16_t* dl = delay_lines_.ks + i * 1025;\n      // Initialization: Just use a white noise sample and fill the delay\n      // line.\n      if (p->initialization_ptr) {\n        --p->initialization_ptr;\n        int32_t excitation_sample = (dl[p->initialization_ptr] + \\\n            3 * Random::GetSample()) >> 2;\n        dl[p->initialization_ptr] = excitation_sample;\n        sample += excitation_sample;\n      } else {\n        p->phase += p->phase_increment;\n        size_t read_ptr = ((p->phase >> (22 + p->shift)) + 2) & p->mask;\n        size_t write_ptr = p->write_ptr;\n        size_t num_loops = 0;\n        while (write_ptr != read_ptr) {\n          ++num_loops;\n          size_t next = (write_ptr + 1) & p->mask;\n          int32_t a = dl[write_ptr];\n          int32_t b = dl[next];\n          uint32_t probability = Random::GetWord();\n          if ((probability & 0xffff) <= update_probability) {\n            int32_t sum = (a + b);\n            sum = sum < 0 ? -(-sum >> 1) : (sum >> 1);\n            if (loss) {\n              sum = sum * (32768 - loss) >> 15;\n            }\n            dl[write_ptr] = sum;\n          }\n          if (write_ptr == 0) {\n            dl[p->size] = dl[0];\n          }\n          write_ptr = next;\n        }\n        p->write_ptr = write_ptr;\n        sample += Interpolate1022(dl, p->phase >> p->shift);\n      }\n    }\n    CLIP(sample);\n    *buffer++ = (previous_sample + sample) >> 1;\n    *buffer++ = sample;\n    previous_sample = sample;\n    size -= 2;\n  }\n  state_.plk[0].previous_sample = previous_sample;\n}\n\nstatic const int32_t kBridgeLPGain = 14008;\nstatic const int32_t kBridgeLPPole1 = 18022;\nstatic const int32_t kBiquadGain = 6553;\nstatic const int32_t kBiquadPole1 = 6948;\nstatic const int32_t kBiquadPole2 = -2959;\n\nvoid DigitalOscillator::RenderBowed(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int8_t* dl_b = delay_lines_.bowed.bridge;\n  int8_t* dl_n = delay_lines_.bowed.neck;\n  \n  if (strike_) {\n    memset(dl_b, 0, sizeof(delay_lines_.bowed.bridge));\n    memset(dl_n, 0, sizeof(delay_lines_.bowed.neck));\n    memset(&state_, 0, sizeof(state_));\n    strike_ = false;\n  }\n  int16_t parameter_0 = 172 - (parameter_[0]  >> 8);\n  int16_t parameter_1 = 6 + (parameter_[1]  >> 9);\n\n  uint16_t delay_ptr = state_.phy.delay_ptr;\n  uint16_t excitation_ptr = state_.phy.excitation_ptr;\n  int32_t lp_state = state_.phy.lp_state;\n\n  int32_t biquad_y0 = state_.phy.filter_state[0];\n  int32_t biquad_y1 = state_.phy.filter_state[1];\n  // Setup delay times and interpolation coefficients.\n  uint32_t delay = (delay_ >> 1) - (2 << 16);  // Compensation for 1-pole delay\n  uint32_t bridge_delay = (delay >> 8) * parameter_1;\n  // Transpose one octave up when the note is too low to fit in the delays.\n  while ((delay - bridge_delay) > ((kWGNeckLength - 1) << 16)\n         || bridge_delay > ((kWGBridgeLength - 1) << 16)) {\n    delay >>= 1;\n    bridge_delay >>= 1;\n  }\n  uint16_t bridge_delay_integral = bridge_delay >> 16;\n  uint16_t bridge_delay_fractional = bridge_delay & 0xffff;\n  uint32_t neck_delay = delay - bridge_delay;\n  uint32_t neck_delay_integral = neck_delay >> 16;\n  uint16_t neck_delay_fractional = neck_delay & 0xffff;\n  int16_t previous_sample = state_.phy.previous_sample;\n  // Rendered at half the sample rate (for avoiding big rounding error in\n  // coefficients of body IIR filter).\n  while (size) {\n    phase_ += phase_increment_;\n    \n    int32_t new_velocity, friction;\n    uint16_t bridge_delay_ptr = delay_ptr + 2 * kWGBridgeLength \\\n        - bridge_delay_integral;\n    uint16_t neck_delay_ptr = delay_ptr + 2 * kWGNeckLength \\\n        - neck_delay_integral;\n    int16_t bridge_dl_a = dl_b[bridge_delay_ptr % kWGBridgeLength];\n    int16_t bridge_dl_b = dl_b[(bridge_delay_ptr - 1) % kWGBridgeLength];\n    int16_t nut_dl_a = dl_n[neck_delay_ptr % kWGNeckLength];\n    int16_t nut_dl_b = dl_n[(neck_delay_ptr - 1) % kWGNeckLength];\n    int32_t bridge_value = Mix(\n        bridge_dl_a, bridge_dl_b, bridge_delay_fractional) << 8;\n    int32_t nut_value = Mix(nut_dl_a, nut_dl_b, neck_delay_fractional) << 8;\n    lp_state = (bridge_value * kBridgeLPGain + lp_state * kBridgeLPPole1) >> 15;\n    int32_t bridge_reflection = -lp_state;\n    int32_t nut_reflection = -nut_value;\n    int32_t string_velocity = bridge_reflection + nut_reflection;\n    int32_t bow_velocity = lut_bowing_envelope[excitation_ptr >> 1];\n    bow_velocity += lut_bowing_envelope[(excitation_ptr + 1) >> 1];\n    bow_velocity >>= 1;\n    int32_t velocity_delta = bow_velocity - string_velocity;\n    \n    friction = velocity_delta * parameter_0 >> 5;\n    if (friction < 0) {\n      friction = -friction;\n    }\n    if (friction >= (1 << 17)) {\n      friction = (1 << 17) - 1;\n    }\n    //friction = Interpolate824(lut_bowing_friction, friction << 15);\n    friction = lut_bowing_friction[friction >> 9];\n    new_velocity = friction * velocity_delta >> 15;\n    dl_n[delay_ptr % kWGNeckLength] = (bridge_reflection + new_velocity) >> 8;\n    dl_b[delay_ptr % kWGBridgeLength] = (nut_reflection + new_velocity) >> 8;\n    ++delay_ptr;\n    \n    int32_t temp = bridge_value * kBiquadGain >> 15;\n    temp += biquad_y0 * kBiquadPole1 >> 12;\n    temp += biquad_y1 * kBiquadPole2 >> 12;\n    int32_t out = temp - biquad_y1;\n    biquad_y1 = biquad_y0;\n    biquad_y0 = temp;\n\n    CLIP(out)\n    *buffer++ = (out + previous_sample) >> 1;\n    *buffer++ = out;\n    previous_sample = out;\n    ++excitation_ptr;\n    size -= 2;\n  }\n  if ((excitation_ptr >> 1) >= LUT_BOWING_ENVELOPE_SIZE - 32) {\n    excitation_ptr = (LUT_BOWING_ENVELOPE_SIZE - 32) << 1;\n  }\n  state_.phy.delay_ptr = delay_ptr % kWGNeckLength;\n  state_.phy.excitation_ptr = excitation_ptr;\n  state_.phy.lp_state = lp_state;\n  state_.phy.filter_state[0] = biquad_y0;\n  state_.phy.filter_state[1] = biquad_y1;\n  state_.phy.previous_sample = previous_sample;\n}\n\nstatic const uint16_t kBreathPressure = 26214;\nstatic const int16_t kReflectionCoefficient = -3891;\nstatic const int16_t kReedSlope = -1229;\nstatic const int16_t kReedOffset = 22938;\n\nvoid DigitalOscillator::RenderBlown(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint16_t delay_ptr = state_.phy.delay_ptr;\n  int32_t lp_state = state_.phy.lp_state;\n  \n  int16_t* dl = delay_lines_.bore;\n  if (strike_) {\n    memset(dl, 0, sizeof(delay_lines_.bore));\n    strike_ = false;\n  }\n\n  uint32_t delay = (delay_ >> 1) - (1 << 16);\n  while (delay > ((kWGBoreLength - 1) << 16)) {\n    delay >>= 1;\n  }\n  uint16_t bore_delay_integral = delay >> 16;\n  uint16_t bore_delay_fractional = delay & 0xffff;\n  uint16_t parameter = 28000 - (parameter_[0] >> 1);\n  int16_t filter_state = state_.phy.filter_state[0];\n  int16_t normalized_pitch = (pitch_ - 8192 + (parameter_[1] >> 1)) >> 7;\n  if (normalized_pitch < 0) {\n    normalized_pitch = 0;\n  } else if (normalized_pitch > 127) {\n    normalized_pitch = 127;\n  }\n  uint16_t filter_coefficient = lut_flute_body_filter[normalized_pitch];\n  while (size--) {\n    phase_ += phase_increment_;\n    \n    int32_t breath_pressure = Random::GetSample() * parameter >> 15;\n    breath_pressure = breath_pressure * kBreathPressure >> 15;\n    breath_pressure += kBreathPressure;\n    \n    uint16_t bore_delay_ptr = delay_ptr + 2 * kWGBoreLength \\\n        - bore_delay_integral;\n    int16_t dl_a = dl[bore_delay_ptr % kWGBoreLength];\n    int16_t dl_b = dl[(bore_delay_ptr - 1) % kWGBoreLength];\n    int32_t dl_value = Mix(dl_a, dl_b, bore_delay_fractional);\n    \n    int32_t pressure_delta = (dl_value >> 1) + lp_state;\n    lp_state = dl_value >> 1;\n    \n    pressure_delta = kReflectionCoefficient * pressure_delta >> 12;\n    pressure_delta -= breath_pressure;\n    int32_t reed = (pressure_delta * kReedSlope >> 12) + kReedOffset;\n    CLIP(reed)\n    int32_t out = pressure_delta * reed >> 15;\n    out += breath_pressure;\n    CLIP(out)\n    dl[delay_ptr++ % kWGBoreLength] = out;\n    filter_state = (filter_coefficient * out + \\\n        (4096 - filter_coefficient) * filter_state) >> 12;\n    *buffer++ = filter_state;\n  }\n  state_.phy.filter_state[0] = filter_state;\n  state_.phy.delay_ptr = delay_ptr % kWGBoreLength;\n  state_.phy.lp_state = lp_state;\n}\n\nstatic const uint16_t kRandomPressure = 0.22 * 4096;\nstatic const uint16_t kDCBlockingPole = 0.99 * 4096;\n\nvoid DigitalOscillator::RenderFluted(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint16_t delay_ptr = state_.phy.delay_ptr;\n  uint16_t excitation_ptr = state_.phy.excitation_ptr;\n\n  int32_t lp_state = state_.phy.lp_state;\n  int32_t dc_blocking_x0 = state_.phy.filter_state[0];\n  int32_t dc_blocking_y0 = state_.phy.filter_state[1];\n\n  int8_t* dl_b = delay_lines_.fluted.bore;\n  int8_t* dl_j = delay_lines_.fluted.jet;\n  \n  if (strike_) {\n    excitation_ptr = 0;\n    memset(dl_b, 0, sizeof(delay_lines_.fluted.bore));\n    memset(dl_j, 0, sizeof(delay_lines_.fluted.jet));\n    lp_state = 0;\n    strike_ = false;\n  }\n\n  // Setup delay times and interpolation coefficients.\n  uint32_t bore_delay = (delay_ << 1) - (2 << 16);\n  uint32_t jet_delay = (bore_delay >> 8) * (48 + (parameter_[1]  >> 10));\n  bore_delay -= jet_delay;\n  while (bore_delay > ((kWGFBoreLength - 1) << 16)\n         || jet_delay > ((kWGJetLength - 1) << 16)) {\n    bore_delay >>= 1;\n    jet_delay >>= 1;\n  }\n  uint16_t bore_delay_integral = bore_delay >> 16;\n  uint16_t bore_delay_fractional = bore_delay & 0xffff;\n  uint32_t jet_delay_integral = jet_delay >> 16;\n  uint16_t jet_delay_fractional = jet_delay & 0xffff;\n  \n  uint16_t breath_intensity = 2100 - (parameter_[0] >> 4);\n  uint16_t filter_coefficient = lut_flute_body_filter[pitch_ >> 7];\n  while (size--) {\n    phase_ += phase_increment_;\n    \n    uint16_t bore_delay_ptr = delay_ptr + 2 * kWGFBoreLength \\\n        - bore_delay_integral;\n    uint16_t jet_delay_ptr = delay_ptr + 2 * kWGJetLength \\\n        - jet_delay_integral;\n    int16_t bore_dl_a = dl_b[bore_delay_ptr % kWGFBoreLength];\n    int16_t bore_dl_b = dl_b[(bore_delay_ptr - 1) % kWGFBoreLength];\n    int16_t jet_dl_a = dl_j[jet_delay_ptr % kWGJetLength];\n    int16_t jet_dl_b = dl_j[(jet_delay_ptr - 1) % kWGJetLength];\n    int32_t bore_value = Mix(bore_dl_a, bore_dl_b, bore_delay_fractional) << 9;\n    int32_t jet_value = Mix(jet_dl_a, jet_dl_b, jet_delay_fractional) << 9;\n        \n    int32_t breath_pressure = lut_blowing_envelope[excitation_ptr];\n    breath_pressure <<= 1;\n    int32_t random_pressure = Random::GetSample() * breath_intensity >> 12;\n    random_pressure = random_pressure * breath_pressure >> 15;\n    breath_pressure += random_pressure;\n    \n    lp_state = (-filter_coefficient * bore_value + \\\n        (4096 - filter_coefficient) * lp_state) >> 12;\n    int32_t reflection = lp_state;\n    dc_blocking_y0 = (kDCBlockingPole * dc_blocking_y0 >> 12);\n    dc_blocking_y0 += reflection - dc_blocking_x0;\n    dc_blocking_x0 = reflection;\n    reflection = dc_blocking_y0;\n    \n    int32_t pressure_delta = breath_pressure - (reflection >> 1);\n    dl_j[delay_ptr % kWGJetLength] = pressure_delta >> 9;\n    \n    pressure_delta = jet_value;\n    int32_t jet_table_index = pressure_delta;\n    if (jet_table_index < 0) {\n      jet_table_index = 0;\n    }\n    if (jet_table_index > 65535) {\n      jet_table_index = 65535;\n    }\n    pressure_delta = static_cast<int16_t>(\n        lut_blowing_jet[jet_table_index >> 8]) + (reflection >> 1);\n    dl_b[delay_ptr % kWGFBoreLength] = pressure_delta >> 9;\n    ++delay_ptr;\n    \n    int32_t out = bore_value >> 1;\n    CLIP(out)\n    *buffer++ = out;\n    if (size & 3) {\n      ++excitation_ptr;\n    }\n  }\n  if (excitation_ptr >= LUT_BLOWING_ENVELOPE_SIZE - 32) {\n    excitation_ptr = LUT_BLOWING_ENVELOPE_SIZE - 32;\n  }\n  state_.phy.delay_ptr = delay_ptr;\n  state_.phy.excitation_ptr = excitation_ptr;\n  state_.phy.lp_state = lp_state;\n  state_.phy.filter_state[0] = dc_blocking_x0;\n  state_.phy.filter_state[1] = dc_blocking_y0;\n}\n\nstruct WavetableDefinition {\n  uint8_t num_steps;\n  uint8_t wave_index[17];\n};\n\nstatic const WavetableDefinition wavetable_definitions[] = {\n// 01 male\n{ 16 , { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15 } },\n// 02 female\n{ 16 , { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31 } },\n// 03 choir\n{ 16 , { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47 } },\n// 04 space_voice\n{ 16 , { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63 } },\n// 05 tampura\n{ 16 , { 64, 65, 66, 67, 68, 68, 69, 70, 71, 72, 73, 73, 74, 75, 75, 76, 76 } },\n// 06 shamus\n{ 16 , { 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 92 } },\n// 07 swept_string\n{ 16 , { 93, 94, 95, 96, 97, 98, 99, 100, 101,\n         102, 103, 104, 105, 106, 107, 108, 108 } },\n// 08 bowed\n{ 16 , { 109, 110, 111, 112, 113, 114, 115, 116,\n         117, 118, 119, 120, 121, 122, 123, 124, 124 } },\n// 09 cello\n{ 16 , { 125, 126, 127, 128, 129, 130, 131, 132,\n         132, 132, 132, 132, 132, 132, 132, 132, 132 } },\n// 10 vibes\n{ 16 , { 133, 134, 135, 136, 137, 138, 139, 140,\n         141, 142, 143, 144, 144, 144, 145, 145, 145 } },\n// 11 slap\n{ 16 , { 146, 147, 148, 149, 150, 151, 151, 151,\n         152, 152, 152, 152, 153, 153, 153, 153, 153 } },\n// 12 piano\n{ 8 , { 154, 154, 154, 154, 154, 154, 155, 156, 156 } },\n// 13 organ!\n{ 16 , { 176, 157, 158, 159, 160, 161, 162, 163,\n         164, 165, 166, 167, 168, 169, 170, 171, 171 } },\n// 14 waves!\n{ 16 , { 172, 173, 174, 175, 176, 177, 178, 179,\n         180, 181, 182, 183, 184, 185, 186, 187, 187 } },\n// 15 digital\n{ 16 , { 176, 188, 189, 190, 191, 192, 193, 194,\n         195, 196, 197, 198, 199, 200, 201, 202, 202 } },\n// 16 drone 1\n{ 16 , { 203, 205, 204, 205, 212, 206, 207, 208,\n         208, 209, 210, 210, 211, 211, 212, 212, 212 } },\n// 17 drone 2\n{ 8 , { 213, 213, 213, 214, 215, 216, 217, 218, 219 } },\n// 18 metallic\n{ 16 , { 220, 221, 222, 223, 224, 225, 226, 227,\n         228, 229, 230, 231, 232, 233, 234, 235, 235 } },\n// 19 fantasy\n{ 16 , { 236, 237, 238, 239, 240, 241, 242, 243,\n         244, 245, 246, 247, 248, 249, 250, 251, 251 } },\n// 20 bell\n{ 4 , { 252, 253, 254, 255, 254 } },\n};\n\nvoid DigitalOscillator::RenderWavetables(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  // Add some hysteresis to the second parameter to prevent a single DAC bit\n  // error to cause a sharp and glitchy wavetable transition.\n  if ((parameter_[1] > previous_parameter_[1] + 64) ||\n      (parameter_[1] < previous_parameter_[1] - 64)) {\n    previous_parameter_[1] = parameter_[1];\n  }\n      \n  uint32_t wavetable_index = static_cast<uint32_t>(previous_parameter_[1]) * 20;\n  wavetable_index >>= 15;\n  \n  uint32_t wave_pointer;\n  const uint8_t* wave[2];\n  const WavetableDefinition& wt = wavetable_definitions[wavetable_index];\n  \n  wave_pointer = (parameter_[0] << 1) * wt.num_steps;\n  for (size_t i = 0; i < 2; ++i) {\n    size_t wave_index = wt.wave_index[(wave_pointer >> 16) + i];\n    wave[i] = wt_waves + wave_index * 129;\n  }\n\n  uint32_t phase_increment = phase_increment_ >> 1;\n  while (size--) {\n    int16_t sample;\n    // 2x naive oversampling.\n    phase_ += phase_increment;\n    if (*sync++) {\n      phase_ = 0;\n    }\n    \n    sample = Crossfade(wave[0], wave[1], phase_ >> 1, wave_pointer) >> 1;\n    phase_ += phase_increment;\n    sample += Crossfade(wave[0], wave[1], phase_ >> 1, wave_pointer) >> 1;\n    *buffer++ = sample;\n  }\n}\n\nvoid DigitalOscillator::RenderWaveMap(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  // The grid is 16x16; so there are 15 interpolation squares.\n  uint16_t p[2];\n  uint16_t wave_xfade[2];\n  uint16_t wave_coordinate[2];\n\n  p[0] = parameter_[0] * 15 >> 4;\n  p[1] = parameter_[1] * 15 >> 4;\n  wave_xfade[0] = p[0] << 5;\n  wave_xfade[1] = p[1] << 5;\n  wave_coordinate[0] = p[0] >> 11;\n  wave_coordinate[1] = p[1] >> 11;\n\n  const uint8_t* wave[2][2];\n  \n  for (size_t i = 0; i < 2; ++i) {\n    for (size_t j = 0; j < 2; ++j) {\n      uint16_t wave_index = \\\n          (wave_coordinate[0] + i) * 16 + (wave_coordinate[1] + j);\n      wave[i][j] = wt_waves + wt_map[wave_index] * 129;\n    }\n  }\n\n  uint32_t phase_increment = phase_increment_ >> 1;\n  while (size--) {\n    int16_t sample;\n    // 2x naive oversampling.\n    phase_ += phase_increment;\n    if (*sync++) {\n      phase_ = 0;\n    }\n    \n    sample = Mix(\n        Crossfade(wave[0][0], wave[0][1], phase_ >> 1, wave_xfade[1]),\n        Crossfade(wave[1][0], wave[1][1], phase_ >> 1, wave_xfade[1]),\n        wave_xfade[0]) >> 1;\n    phase_ += phase_increment;\n    sample += Mix(\n        Crossfade(wave[0][0], wave[0][1], phase_ >> 1, wave_xfade[1]),\n        Crossfade(wave[1][0], wave[1][1], phase_ >> 1, wave_xfade[1]),\n        wave_xfade[0]) >> 1;\n    *buffer++ = sample;\n  }\n}\n\nstatic const uint8_t wave_line[] = {\n  187, 179, 154, 155, 135, 134, 137, 19, 24, 3, 8, 66, 79, 25, 180, 174, 64,\n  127, 198, 15, 10, 7, 11, 0, 191, 192, 115, 238, 237, 236, 241, 47, 70, 76,\n  235, 26, 133, 208, 34, 175, 183, 146, 147, 148, 150, 151, 152, 153, 117,\n  138, 32, 33, 35, 125, 199, 201, 30, 31, 193, 27, 29, 21, 18, 182\n};\n\n\nstatic const uint8_t mini_wave_line[] = {\n  157, 161, 171, 188, 189, 191, 192, 193, 196, 198, 201, 234, 232,\n  229, 226, 224, 1, 2, 3, 4, 5, 8, 12, 32, 36, 42, 47, 252, 254, 141, 139,\n  135, 174\n};\n\nvoid DigitalOscillator::RenderWaveLine(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  smoothed_parameter_ = (3 * smoothed_parameter_ + (parameter_[0] << 1)) >> 2;\n\n  uint16_t scan = smoothed_parameter_;\n  const uint8_t* wave_0 = wt_waves + wave_line[previous_parameter_[0] >> 9] * 129;\n  const uint8_t* wave_1 = wt_waves + wave_line[scan >> 10] * 129;\n  const uint8_t* wave_2 = wt_waves + wave_line[(scan >> 10) + 1] * 129;\n\n  uint16_t smooth_xfade = scan << 6;\n  uint16_t rough_xfade = 0;\n  uint16_t rough_xfade_increment = 32768 / size;\n  uint32_t balance = parameter_[1] << 3;\n\n  uint32_t phase = phase_;\n  uint32_t phase_increment = phase_increment_ >> 1;\n  \n  int16_t rough, smooth;\n  \n  if (parameter_[1] < 8192) {\n    while (size--) {\n      if (*sync++) {\n        phase = 0;\n      }\n      int32_t sample = 0;\n      \n      rough = Crossfade(wave_0, wave_1, (phase >> 1) & 0xfe000000, rough_xfade);\n      smooth = Crossfade(wave_0, wave_1, phase >> 1, rough_xfade);\n      sample += Mix(rough, smooth, balance);\n      phase += phase_increment;\n      rough_xfade += rough_xfade_increment;\n      \n      rough = Crossfade(wave_0, wave_1, (phase >> 1) & 0xfe000000, rough_xfade);\n      smooth = Crossfade(wave_0, wave_1, phase >> 1, rough_xfade);\n      sample += Mix(rough, smooth, balance);\n      phase += phase_increment;\n      rough_xfade += rough_xfade_increment;\n      \n      *buffer++ = sample >> 1;\n    }\n  } else if (parameter_[1] < 16384) {\n    while (size--) {\n      if (*sync++) {\n        phase = 0;\n      }\n      int32_t sample = 0;\n      \n      rough = Crossfade(wave_0, wave_1, phase >> 1, rough_xfade);\n      smooth = Crossfade(wave_1, wave_2, phase >> 1, smooth_xfade);\n      sample += Mix(rough, smooth, balance);\n      phase += phase_increment;\n      rough_xfade += rough_xfade_increment;\n      \n      rough = Crossfade(wave_0, wave_1, phase >> 1, rough_xfade);\n      smooth = Crossfade(wave_1, wave_2, phase >> 1, smooth_xfade);\n      sample += Mix(rough, smooth, balance);\n      phase += phase_increment;\n      rough_xfade += rough_xfade_increment;\n\n      *buffer++ = sample >> 1;\n    }\n  } else if (parameter_[1] < 24576) {\n    while (size--) {\n      if (*sync++) {\n        phase = 0;\n      }\n      int32_t sample = 0;\n      \n      smooth = Crossfade(wave_1, wave_2, phase >> 1, smooth_xfade);\n      rough = Crossfade(wave_1, wave_2, (phase >> 1) & 0xfe000000, smooth_xfade);\n      sample += Mix(smooth, rough, balance);\n      phase += phase_increment;\n\n      smooth = Crossfade(wave_1, wave_2, phase >> 1, smooth_xfade);\n      rough = Crossfade(wave_1, wave_2, (phase >> 1) & 0xfe000000, smooth_xfade);\n      sample += Mix(smooth, rough, balance);\n      phase += phase_increment;\n\n      *buffer++ = sample >> 1;\n    }\n  } else {\n    while (size--) {\n      if (*sync++) {\n        phase = 0;\n      }\n      int32_t sample = 0;\n      smooth = Crossfade(wave_1, wave_2, (phase >> 1) & 0xfe000000, smooth_xfade);\n      rough = Crossfade(wave_1, wave_2, (phase >> 1) & 0xf8000000, smooth_xfade);\n      sample += Mix(smooth, rough, balance);\n      phase += phase_increment;\n\n      smooth = Crossfade(wave_1, wave_2, (phase >> 1) & 0xfe000000, smooth_xfade);\n      rough = Crossfade(wave_1, wave_2, (phase >> 1) & 0xf8000000, smooth_xfade);\n      sample += Mix(smooth, rough, balance);\n      phase += phase_increment;\n\n      *buffer++ = sample >> 1;\n    }\n  }\n  phase_ = phase;\n  previous_parameter_[0] = smoothed_parameter_ >> 1;\n}\n\n#define SEMI * 128\n\nstatic const uint16_t chords[17][3] = {\n  { 2, 4, 6 },\n  { 16, 32, 48 },\n  { 2 SEMI, 7 SEMI, 12 SEMI },\n  { 3 SEMI, 7 SEMI, 10 SEMI },\n  { 3 SEMI, 7 SEMI, 12 SEMI },\n  { 3 SEMI, 7 SEMI, 14 SEMI },\n  { 3 SEMI, 7 SEMI, 17 SEMI },\n  { 7 SEMI, 12 SEMI, 19 SEMI },\n  { 7 SEMI, 3 + 12 SEMI, 5 + 19 SEMI },\n  { 4 SEMI, 7 SEMI, 17 SEMI },\n  { 4 SEMI, 7 SEMI, 14 SEMI },\n  { 4 SEMI, 7 SEMI, 12 SEMI },\n  { 4 SEMI, 7 SEMI, 11 SEMI },\n  { 5 SEMI, 7 SEMI, 12 SEMI },\n  { 4, 7 SEMI, 12 SEMI },\n  { 4, 4 + 12 SEMI, 12 SEMI },\n  { 4, 4 + 12 SEMI, 12 SEMI },\n};\n\nvoid DigitalOscillator::RenderWaveParaphonic(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  if (strike_) {\n    for (size_t i = 0; i < 4; ++i) {\n      state_.saw.phase[i] = Random::GetWord();\n    }\n    strike_ = false;\n  }\n  \n  // Do not use an array here to allow these to be kept in arbitrary registers.\n  uint32_t phase_0, phase_1, phase_2, phase_3;\n  uint32_t phase_increment[3];\n  uint32_t phase_increment_0;\n\n  phase_increment_0 = phase_increment_;\n  phase_0 = state_.saw.phase[0];\n  phase_1 = state_.saw.phase[1];\n  phase_2 = state_.saw.phase[2];\n  phase_3 = state_.saw.phase[3];\n  \n  uint16_t chord_integral = parameter_[1] >> 11;\n  uint16_t chord_fractional = parameter_[1] << 5;\n  if (chord_fractional < 30720) {\n    chord_fractional = 0;\n  } else if (chord_fractional >= 34816) {\n    chord_fractional = 65535;\n  } else {\n    chord_fractional = (chord_fractional - 30720) * 16;\n  }\n  \n  for (size_t i = 0; i < 3; ++i) {\n    uint16_t detune_1 = chords[chord_integral][i];\n    uint16_t detune_2 = chords[chord_integral + 1][i];\n    uint16_t detune = detune_1 + ((detune_2 - detune_1) * chord_fractional >> 16);\n    phase_increment[i] = ComputePhaseIncrement(pitch_ + detune);\n  }\n\n  const uint8_t* wave_1 = wt_waves + mini_wave_line[parameter_[0] >> 10] * 129;\n  const uint8_t* wave_2 = wt_waves + mini_wave_line[(parameter_[0] >> 10) + 1] * 129;\n  uint16_t wave_xfade = parameter_[0] << 6;\n  \n  while (size) {\n    int32_t sample = 0;\n    \n    phase_0 += phase_increment_0;\n    phase_1 += phase_increment[0];\n    phase_2 += phase_increment[1];\n    phase_3 += phase_increment[2];\n\n    sample += Crossfade(wave_1, wave_2, phase_0 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_1 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_2 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_3 >> 1, wave_xfade);\n    *buffer++ = sample >> 2;\n    \n    phase_0 += phase_increment_0;\n    phase_1 += phase_increment[0];\n    phase_2 += phase_increment[1];\n    phase_3 += phase_increment[2];\n    \n    sample = 0;\n    sample += Crossfade(wave_1, wave_2, phase_0 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_1 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_2 >> 1, wave_xfade);\n    sample += Crossfade(wave_1, wave_2, phase_3 >> 1, wave_xfade);\n    *buffer++ = sample >> 2;\n    size -= 2;\n  }\n  \n  state_.saw.phase[0] = phase_0;\n  state_.saw.phase[1] = phase_1;\n  state_.saw.phase[2] = phase_2;\n  state_.saw.phase[3] = phase_3;\n\n}\n\nvoid DigitalOscillator::RenderFilteredNoise(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int32_t f = Interpolate824(lut_svf_cutoff, pitch_ << 17);\n  int32_t damp = Interpolate824(lut_svf_damp, parameter_[0] << 17);\n  int32_t scale = Interpolate824(lut_svf_scale, parameter_[0] << 17);\n  int32_t bp = state_.svf.bp;\n  int32_t lp = state_.svf.lp;\n  int32_t bp_gain, lp_gain, hp_gain;\n  \n  // Morph between LP, BP, HP.\n  if (parameter_[1] < 16384) {\n    bp_gain = parameter_[1];\n    lp_gain = 16384 - bp_gain;\n    hp_gain = 0;\n  } else {\n    bp_gain = 32767 - parameter_[1];\n    hp_gain = parameter_[1] - 16384;\n    lp_gain = 0;\n  }\n  \n  int32_t gain_correction = f > scale ? scale * 32767 / f : 32767;\n  while (size--) {\n    int32_t notch, hp, in;\n    \n    in = Random::GetSample() >> 1;\n    notch = in - (bp * damp >> 15);\n    lp += f * bp >> 15;\n    CLIP(lp)\n    hp = notch - lp;\n    bp += f * hp >> 15;\n    \n    int32_t result = 0;\n    result += (lp_gain * lp) >> 14;\n    result += (bp_gain * bp) >> 14;\n    result += (hp_gain * hp) >> 14;\n    CLIP(result)\n    result = result * gain_correction >> 15;\n    *buffer++ = Interpolate88(ws_moderate_overdrive, result + 32768);\n  }\n  state_.svf.lp = lp;\n  state_.svf.bp = bp;\n}\n\nvoid DigitalOscillator::RenderTwinPeaksNoise(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int32_t sample;\n  int32_t y10, y20;\n  int32_t y11 = state_.pno.filter_state[0][0];\n  int32_t y12 = state_.pno.filter_state[0][1];\n  int32_t y21 = state_.pno.filter_state[1][0];\n  int32_t y22 = state_.pno.filter_state[1][1];\n  uint32_t q = 65240 + (parameter_[0] >> 7);\n  int32_t q_squared = q * q >> 17;\n  int16_t p1 = pitch_;\n\n  CONSTRAIN(p1, 0, 16383)\n  int32_t c1 = Interpolate824(lut_resonator_coefficient, p1 << 17);\n  int32_t s1 = Interpolate824(lut_resonator_scale, p1 << 17);\n  \n  int16_t p2 = pitch_ + ((parameter_[1] - 16384) >> 1);\n  CONSTRAIN(p2, 0, 16383)\n  int32_t c2 = Interpolate824(lut_resonator_coefficient, p2 << 17);\n  int32_t s2 = Interpolate824(lut_resonator_scale, p2 << 17);\n\n  c1 = c1 * q >> 16;\n  c2 = c2 * q >> 16;\n\n  int32_t makeup_gain = 8191 - (parameter_[0] >> 2);\n  \n  while (size) {    \n    sample = Random::GetSample() >> 1;\n    \n    if (sample > 0) {\n      y10 = sample * s1 >> 16;\n      y20 = sample * s2 >> 16;\n    } else {\n      y10 = -((-sample) * s1 >> 16);\n      y20 = -((-sample) * s2 >> 16);\n    }\n    \n    y10 += y11 * c1 >> 15;\n    y10 -= y12 * q_squared >> 15;\n    CLIP(y10)\n    y12 = y11;\n    y11 = y10;\n    \n    y20 += y21 * c2 >> 15;\n    y20 -= y22 * q_squared >> 15;\n    CLIP(y20)\n    y22 = y21;\n    y21 = y20;\n    \n    y10 += y20;\n    y10 += (y10 * makeup_gain >> 13);\n    CLIP(y10)\n    sample = y10;\n    sample = Interpolate88(ws_moderate_overdrive, sample + 32768);\n    \n    *buffer++ = sample;\n    *buffer++ = sample;\n    size -= 2;\n  }\n  \n  state_.pno.filter_state[0][0] = y11;\n  state_.pno.filter_state[0][1] = y12;\n  state_.pno.filter_state[1][0] = y21;\n  state_.pno.filter_state[1][1] = y22;\n}\n\nvoid DigitalOscillator::RenderClockedNoise(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  ClockedNoiseState* state = &state_.clk;\n  \n  if ((parameter_[1] > previous_parameter_[1] + 64) ||\n      (parameter_[1] < previous_parameter_[1] - 64)) {\n    previous_parameter_[1] = parameter_[1];\n  }\n  if ((parameter_[0] > previous_parameter_[0] + 16) ||\n      (parameter_[0] < previous_parameter_[0] - 16)) {\n    previous_parameter_[0] = parameter_[0];\n  }\n  \n  \n  if (strike_) {\n    state->seed = Random::GetWord();\n    strike_ = false;\n  }\n  \n  // Shift the range of the Coarse knob to reach higher clock rates, close\n  // to the sample rate.\n  uint32_t phase = phase_;\n  uint32_t phase_increment = phase_increment_;\n  for (size_t i = 0; i < 3; ++i) {\n    if (phase_increment < (1UL << 31)) {\n      phase_increment <<= 1;\n    }\n  }\n  \n  // Compute the period of the random generator.\n  state->cycle_phase_increment = ComputePhaseIncrement(\n      previous_parameter_[0] - 16384) << 1;\n  \n  // Compute the number of quantization steps\n  uint32_t num_steps = 1 + (previous_parameter_[1] >> 10);\n  if (num_steps == 1) {\n    num_steps = 2;\n  }\n  uint32_t quantizer_divider = 65536 / num_steps;\n  while (size--) {\n    phase += phase_increment;\n    if (*sync++) {\n      phase = 0;\n    }\n    \n    // Clock.\n    if (phase < phase_increment) {\n      state->rng_state = state->rng_state * 1664525L + 1013904223L;\n      state->cycle_phase += state->cycle_phase_increment;\n      // Enforce period\n      if (state->cycle_phase < state->cycle_phase_increment) {\n        state->rng_state = state->seed;\n        // Make the period an integer.\n        state->cycle_phase = state->cycle_phase_increment;\n      }\n      uint16_t sample = state->rng_state;\n      sample -= sample % quantizer_divider;\n      sample += quantizer_divider >> 1;\n      state->sample = sample;\n      // Make the clock rate an exact divisor of the sample rate.\n      phase = phase_increment;\n    }\n    *buffer++ = state->sample;\n  }\n  phase_ = phase;\n}\n\nvoid DigitalOscillator::RenderGranularCloud(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  \n  for (size_t i = 0; i < 4; ++i) {\n    Grain* g = &state_.grain[i];\n    // If a grain has reached the end of its envelope, reset it.\n    if (g->envelope_phase > (1 << 24) ||\n        g->envelope_phase_increment == 0) {\n      g->envelope_phase_increment = 0;\n      if ((Random::GetWord() & 0xffff) < 0x4000) {\n        g->envelope_phase_increment = \\\n            lut_granular_envelope_rate[parameter_[0] >> 7] << 3;\n        g->envelope_phase = 0;\n        g->phase_increment = phase_increment_;\n        int32_t pitch_mod = Random::GetSample() * parameter_[1] >> 16;\n        int32_t phi = phase_increment_ >> 8;\n        if (pitch_mod < 0) {\n          g->phase_increment += phi * (pitch_mod >> 8);\n        } else {\n          g->phase_increment += phi * (pitch_mod >> 7);\n        }\n      }\n    }\n  }\n  \n  // TODO(pichenettes): Check if it's possible to interpolate envelope\n  // increment too!\n  while (size--) {\n    int32_t sample = 0;\n    state_.grain[0].phase += state_.grain[0].phase_increment;\n    state_.grain[0].envelope_phase += state_.grain[0].envelope_phase_increment;\n    sample += Interpolate824(wav_sine, state_.grain[0].phase) * \\\n        lut_granular_envelope[state_.grain[0].envelope_phase >> 16] >> 17;\n\n    state_.grain[1].phase += state_.grain[1].phase_increment;\n    state_.grain[1].envelope_phase += state_.grain[1].envelope_phase_increment;\n    sample += Interpolate824(wav_sine, state_.grain[1].phase) * \\\n        lut_granular_envelope[state_.grain[1].envelope_phase >> 16] >> 17;\n\n    state_.grain[2].phase += state_.grain[2].phase_increment;\n    state_.grain[2].envelope_phase += state_.grain[2].envelope_phase_increment;\n    sample += Interpolate824(wav_sine, state_.grain[2].phase) * \\\n        lut_granular_envelope[state_.grain[2].envelope_phase >> 16] >> 17;\n\n    state_.grain[3].phase += state_.grain[3].phase_increment;\n    state_.grain[3].envelope_phase += state_.grain[3].envelope_phase_increment;\n    sample += Interpolate824(wav_sine, state_.grain[3].phase) * \\\n        lut_granular_envelope[state_.grain[3].envelope_phase >> 16] >> 17;\n    \n    if (sample < -32768) {\n      sample = -32768;\n    }\n    if (sample > 32767) {\n      sample = 32767;\n    }\n    *buffer++ = sample;\n  } \n}\n\nstatic const uint16_t kParticleNoiseDecay = 64763;\nstatic const int32_t kResonanceSquared = 32768 * 0.996 * 0.996;\nstatic const int32_t kResonanceFactor = 32768 * 0.996;\n\nvoid DigitalOscillator::RenderParticleNoise(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint16_t amplitude = state_.pno.amplitude;\n  uint32_t density = 1024 + parameter_[0];\n  int32_t sample;\n  \n  int32_t y10, y20, y30;\n  int32_t y11 = state_.pno.filter_state[0][0];\n  int32_t y12 = state_.pno.filter_state[0][1];\n  int32_t s1 = state_.pno.filter_scale[0];\n  int32_t c1 = state_.pno.filter_coefficient[0];\n  int32_t y21 = state_.pno.filter_state[1][0];\n  int32_t y22 = state_.pno.filter_state[1][1];\n  int32_t s2 = state_.pno.filter_scale[1];\n  int32_t c2 = state_.pno.filter_coefficient[1];\n  int32_t y31 = state_.pno.filter_state[2][0];\n  int32_t y32 = state_.pno.filter_state[2][1];\n  int32_t s3 = state_.pno.filter_scale[2];\n  int32_t c3 = state_.pno.filter_coefficient[2];\n\n  while (size) {\n    uint32_t noise = Random::GetWord();\n    if ((noise & 0x7fffff) < density) {\n      amplitude = 65535;\n      int16_t noise_a = (noise & 0x0fff) - 0x800;\n      int16_t noise_b = ((noise >> 15) & 0x1fff) - 0x1000;\n      int16_t p1 = pitch_ + (3 * noise_a * parameter_[1] >> 17) + 0x600;\n\n      CONSTRAIN(p1, 0, 16383)\n      c1 = Interpolate824(lut_resonator_coefficient, p1 << 17);\n      s1 = Interpolate824(lut_resonator_scale, p1 << 17);\n\n      int16_t p2 = pitch_ + (noise_a * parameter_[1] >> 15) + 0x980;\n      CONSTRAIN(p2, 0, 16383)\n      c2 = Interpolate824(lut_resonator_coefficient, p2 << 17);\n      s2 = Interpolate824(lut_resonator_scale, p2 << 17);\n\n      int16_t p3 = pitch_ + (noise_b * parameter_[1] >> 16) + 0x790;\n      CONSTRAIN(p3, 0, 16383)\n      c3 = Interpolate824(lut_resonator_coefficient, p3 << 17);\n      s3 = Interpolate824(lut_resonator_scale, p3 << 17);\n      \n      c1 = c1 * kResonanceFactor >> 15;\n      c2 = c2 * kResonanceFactor >> 15;\n      c3 = c3 * kResonanceFactor >> 15;\n    }\n    sample = (static_cast<int16_t>(noise) * amplitude) >> 16;\n    amplitude = (amplitude * kParticleNoiseDecay) >> 16;\n    \n    if (sample > 0) {\n      y10 = sample * s1 >> 16;\n      y20 = sample * s2 >> 16;\n      y30 = sample * s3 >> 16;\n    } else {\n      y10 = -((-sample) * s1 >> 16);\n      y20 = -((-sample) * s2 >> 16);\n      y30 = -((-sample) * s3 >> 16);\n    }\n    \n    y10 += y11 * c1 >> 15;\n    y10 -= y12 * kResonanceSquared >> 15;\n    CLIP(y10);\n    y12 = y11;\n    y11 = y10;\n    \n    y20 += y21 * c2 >> 15;\n    y20 -= y22 * kResonanceSquared >> 15;\n    CLIP(y20);\n    y22 = y21;\n    y21 = y20;\n    \n    y30 += y31 * c3 >> 15;\n    y30 -= y32 * kResonanceSquared >> 15;\n    CLIP(y30);\n    y32 = y31;\n    y31 = y30;\n    \n    y10 += y20 + y30;\n    CLIP(y10)\n    *buffer++ = y10;\n    *buffer++ = y10;\n    size -= 2;\n  }\n  \n  state_.pno.amplitude = amplitude;\n  state_.pno.filter_state[0][0] = y11;\n  state_.pno.filter_state[0][1] = y12;\n  state_.pno.filter_scale[0] = s1;\n  state_.pno.filter_coefficient[0] = c1;\n  state_.pno.filter_state[1][0] = y21;\n  state_.pno.filter_state[1][1] = y22;\n  state_.pno.filter_scale[1] = s2;\n  state_.pno.filter_coefficient[1] = c2;\n  state_.pno.filter_state[2][0] = y31;\n  state_.pno.filter_state[2][1] = y32;\n  state_.pno.filter_scale[2] = s3;\n  state_.pno.filter_coefficient[2] = c3;\n}\n\nstatic const int32_t kConstellationQ[] = { 23100, -23100, -23100, 23100 };\nstatic const int32_t kConstellationI[] = { 23100, 23100, -23100, -23100 };\n\nvoid DigitalOscillator::RenderDigitalModulation(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  uint32_t phase = phase_;\n  uint32_t increment = phase_increment_;\n  \n  uint32_t symbol_stream_phase = state_.dmd.symbol_phase;\n  uint32_t symbol_stream_phase_increment = ComputePhaseIncrement(\n      pitch_ - 1536 + ((parameter_[0] - 32767) >> 3));\n  uint8_t data_byte = state_.dmd.data_byte;\n  \n  if (strike_) {\n    state_.dmd.symbol_count = 0;\n    strike_ = false;\n  }\n  \n  while (size--) {\n    phase += increment;\n    symbol_stream_phase += symbol_stream_phase_increment;\n    if (symbol_stream_phase < symbol_stream_phase_increment) {\n      ++state_.dmd.symbol_count;\n      if (!(state_.dmd.symbol_count & 3)) {\n        if (state_.dmd.symbol_count >= (64 + 4 * 256)) {\n          state_.dmd.symbol_count = 0;\n        }\n        if (state_.dmd.symbol_count < 32) {\n          data_byte = 0x00;\n        } else if (state_.dmd.symbol_count < 48) {\n          data_byte = 0x99;\n        } else if (state_.dmd.symbol_count < 64) {\n          data_byte = 0xcc;\n        } else {\n          state_.dmd.filter_state = (state_.dmd.filter_state * 3 + \\\n              static_cast<int32_t>(parameter_[1])) >> 2;\n          data_byte = state_.dmd.filter_state >> 7;\n        }\n      } else {\n        data_byte >>= 2;\n      }\n    }\n    int16_t i = Interpolate824(wav_sine, phase);\n    int16_t q = Interpolate824(wav_sine, phase + (1 << 30));\n    *buffer++ = (kConstellationQ[data_byte & 3] * q >> 15) + \\\n        (kConstellationI[data_byte & 3] * i >> 15);\n  }\n  phase_ = phase;\n  state_.dmd.symbol_phase = symbol_stream_phase;\n  state_.dmd.data_byte = data_byte;\n}\n\nvoid DigitalOscillator::RenderQuestionMark(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  ClockedNoiseState* state = &state_.clk;\n  \n  if (strike_) {\n    state->rng_state = 0;\n    state->cycle_phase = 0;\n    state->sample = 10;\n    state->cycle_phase_increment = -1;\n    state->seed = 32767;\n    strike_ = false;\n  }\n  \n  uint32_t phase = phase_;\n  uint32_t increment = phase_increment_;\n  uint32_t dit_duration = 3600 + ((32767 - parameter_[0]) >> 2);\n  int32_t noise_threshold = 1024 + (parameter_[1] >> 3);\n  while (size--) {\n    phase += increment;\n    int32_t sample;\n    if (state->rng_state) {\n      sample = (Interpolate824(wav_sine, phase) * 3) >> 2;\n    } else {\n      sample = 0;\n    }\n    if (++state->cycle_phase > dit_duration) {\n      --state->sample;\n      if (state->sample == 0) {\n        ++state->cycle_phase_increment;\n        state->rng_state = !state->rng_state;\n\n        size_t address = state->cycle_phase_increment >> 2;\n        size_t shift = (state->cycle_phase_increment & 0x3) << 1;\n        state->sample = (2 << ((wt_code[address] >> shift) & 3)) - 1;\n        if (state->sample == 15) {\n          state->sample = 100;\n          state->rng_state = 0;\n          state->cycle_phase_increment = - 1;\n        }\n        phase = 1L << 30;\n      }\n      state->cycle_phase = 0;\n    }\n    state->seed += Random::GetSample() >> 2;\n    int32_t noise_intensity = state->seed >> 8;\n    if (noise_intensity < 0) {\n      noise_intensity = -noise_intensity;\n    }\n    if (noise_intensity < noise_threshold) {\n      noise_intensity = noise_threshold;\n    }\n    if (noise_intensity > 16000) {\n      noise_intensity = 16000;\n    }\n    int32_t noise = (Random::GetSample() * noise_intensity >> 15);\n    noise = noise * wav_sine[(phase >> 22) & 0xff] >> 15;\n    sample += noise;\n    CLIP(sample);\n    int32_t distorted = sample * sample >> 14;\n    sample += distorted * parameter_[1] >> 15;\n    CLIP(sample);\n    *buffer++ = sample;\n  }\n  phase_ = phase;\n}\n\nvoid DigitalOscillator::RenderKick(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  if (init_) {\n    pulse_[0].Init();\n    pulse_[0].set_delay(0);\n    pulse_[0].set_decay(3340);\n\n    pulse_[1].Init();\n    pulse_[1].set_delay(1.0e-3 * 48000);\n    pulse_[1].set_decay(3072);\n\n    pulse_[2].Init();\n    pulse_[2].set_delay(4.0e-3 * 48000);\n    pulse_[2].set_decay(4093);\n\n    svf_[0].Init();\n    svf_[0].set_punch(32768);\n    svf_[0].set_mode(SVF_MODE_BP);\n    init_ = false;\n  }\n  \n  if (strike_) {\n    strike_ = false;\n    pulse_[0].Trigger(12 * 32768 * 0.7);\n    pulse_[1].Trigger(-19662 * 0.7);\n    pulse_[2].Trigger(18000);\n    svf_[0].set_punch(24000);\n  }\n  \n  uint32_t decay = parameter_[0];\n  uint32_t scaled = 65535 - (decay << 1);\n  uint32_t squared = scaled * scaled >> 16;\n  scaled = squared * scaled >> 18;\n  svf_[0].set_resonance(32768 - 128 - scaled);\n  \n  uint32_t coefficient = parameter_[1];\n  coefficient = coefficient * coefficient >> 15;\n  coefficient = coefficient * coefficient >> 15;\n  int32_t lp_coefficient = 128 + (coefficient >> 1) * 3;\n  int32_t lp_state = state_.svf.lp;\n  \n  while (size) {\n    int32_t excitation = 0;\n    excitation += pulse_[0].Process();\n    excitation += !pulse_[1].done() ? 16384 : 0;\n    excitation += pulse_[1].Process();\n    pulse_[2].Process();\n    svf_[0].set_frequency(pitch_ + (pulse_[2].done() ? 0 : 17 << 7));\n    \n    for (int32_t j = 0; j < 2; ++j) {\n      int32_t resonator_output, output;\n      resonator_output = (excitation >> 4) + svf_[0].Process(excitation);\n      lp_state += (resonator_output - lp_state) * lp_coefficient >> 15;\n      CLIP(lp_state);\n      output = lp_state;\n      *buffer++ = output;\n    }\n    size -= 2;\n  }\n  \n  state_.svf.lp = lp_state;\n}\n\nvoid DigitalOscillator::RenderSnare(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  if (init_) {\n    pulse_[0].Init();\n    pulse_[0].set_delay(0);\n    pulse_[0].set_decay(1536);\n\n    pulse_[1].Init();\n    pulse_[1].set_delay(1e-3 * 48000);\n    pulse_[1].set_decay(3072);\n\n    pulse_[2].Init();\n    pulse_[2].set_delay(1e-3 * 48000);\n    pulse_[2].set_decay(1200);\n  \n    pulse_[3].Init();\n    pulse_[3].set_delay(0);\n  \n    svf_[0].Init();\n\n    svf_[1].Init();\n\n    svf_[2].Init();\n    svf_[2].set_resonance(2000);\n    svf_[2].set_mode(SVF_MODE_BP);\n\n    init_ = false;\n  }\n  \n  if (strike_) {\n    int32_t decay = 49152 - pitch_;\n    decay += parameter_[1] < 16384 ? 0 : parameter_[1] - 16384;\n    if (decay > 65535) {\n      decay = 65535;\n    }\n    svf_[0].set_resonance(29000 + (decay >> 5));\n    svf_[1].set_resonance(26500 + (decay >> 5));\n    pulse_[3].set_decay(4092 + (decay >> 14));\n    \n    pulse_[0].Trigger(15 * 32768);\n    pulse_[1].Trigger(-1 * 32768);\n    pulse_[2].Trigger(13107);\n    int32_t snappy = parameter_[1];\n    if (snappy >= 14336) {\n      snappy = 14336;\n    }\n    pulse_[3].Trigger(512 + (snappy << 1));\n    strike_ = false;\n  }\n  \n  svf_[0].set_frequency(pitch_ + (12 << 7));\n  svf_[1].set_frequency(pitch_ + (24 << 7));\n  svf_[2].set_frequency(pitch_ + (60 << 7));\n  \n  int32_t g_1 = 22000 - (parameter_[0] >> 1);\n  int32_t g_2 = 22000 + (parameter_[0] >> 1);\n\n  while (size) {\n    int32_t excitation_1 = 0;\n    excitation_1 += pulse_[0].Process();\n    excitation_1 += pulse_[1].Process();\n    excitation_1 += !pulse_[1].done() ? 2621 : 0;\n    \n    int32_t excitation_2 = 0;\n    excitation_2 += pulse_[2].Process();\n    excitation_2 += !pulse_[2].done() ? 13107 : 0;\n    \n    int32_t noise_sample = Random::GetSample() * pulse_[3].Process() >> 15;\n    \n    int32_t sd = 0;\n    sd += (svf_[0].Process(excitation_1) + (excitation_1 >> 4)) * g_1 >> 15;\n    sd += (svf_[1].Process(excitation_2) + (excitation_2 >> 4)) * g_2 >> 15;\n    sd += svf_[2].Process(noise_sample);\n    CLIP(sd);\n    \n    *buffer++ = sd;\n    *buffer++ = sd;\n    size -= 2;\n  }\n}\n\nvoid DigitalOscillator::RenderCymbal(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  if (init_) {\n    svf_[0].Init();\n    svf_[0].set_mode(SVF_MODE_BP);\n    svf_[0].set_resonance(12000);\n    svf_[1].Init();\n    svf_[1].set_mode(SVF_MODE_HP);\n    svf_[1].set_resonance(2000);\n    init_ = false;\n  }\n  \n  HatState* hat = &state_.hat;\n\n  uint32_t increments[7];\n  int32_t note = (40 << 7) + (pitch_ >> 1);\n  increments[0] = ComputePhaseIncrement(note);\n  \n  uint32_t root = increments[0] >> 10;\n  increments[1] = root * 24273 >> 4;\n  increments[2] = root * 12561 >> 4;\n  increments[3] = root * 18417 >> 4;\n  increments[4] = root * 22452 >> 4;\n  increments[5] = root * 31858 >> 4;\n  increments[6] = increments[0] * 24;\n\n  int32_t xfade = parameter_[1];\n  svf_[0].set_frequency(parameter_[0] >> 1);\n  svf_[1].set_frequency(parameter_[0] >> 1);\n  \n  while (size--) {\n    phase_ += increments[6];\n    if (phase_ < increments[6]) {\n      hat->rng_state = hat->rng_state * 1664525L + 1013904223L;\n    }\n    hat->phase[0] += increments[0];\n    hat->phase[1] += increments[1];\n    hat->phase[2] += increments[2];\n    hat->phase[3] += increments[3];\n    hat->phase[4] += increments[4];\n    hat->phase[5] += increments[5];\n    \n    int32_t hat_noise = 0;\n    hat_noise += hat->phase[0] >> 31;\n    hat_noise += hat->phase[1] >> 31;\n    hat_noise += hat->phase[2] >> 31;\n    hat_noise += hat->phase[3] >> 31;\n    hat_noise += hat->phase[4] >> 31;\n    hat_noise += hat->phase[5] >> 31;\n    hat_noise -= 3;\n    hat_noise *= 5461;\n    hat_noise = svf_[0].Process(hat_noise);\n    CLIP(hat_noise)\n    \n    int32_t noise = (hat->rng_state >> 16) - 32768;\n    noise = svf_[1].Process(noise >> 1);\n    CLIP(noise)\n    \n    *buffer++ = hat_noise + ((noise - hat_noise) * xfade >> 15);\n  }\n}\n\n/*\nvoid DigitalOscillator::RenderYourAlgo(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  while (size--) {\n    *buffer++ = 0;\n  }\n}\n*/\n\n/* static */\nDigitalOscillator::RenderFn DigitalOscillator::fn_table_[] = {\n  &DigitalOscillator::RenderTripleRingMod,\n  &DigitalOscillator::RenderSawSwarm,\n  &DigitalOscillator::RenderComb,\n  &DigitalOscillator::RenderToy,\n  &DigitalOscillator::RenderDigitalFilter,\n  &DigitalOscillator::RenderDigitalFilter,\n  &DigitalOscillator::RenderDigitalFilter,\n  &DigitalOscillator::RenderDigitalFilter,\n  &DigitalOscillator::RenderVosim,\n  &DigitalOscillator::RenderVowel,\n  &DigitalOscillator::RenderVowelFof,\n  &DigitalOscillator::RenderHarmonics,\n  &DigitalOscillator::RenderFm,\n  &DigitalOscillator::RenderFeedbackFm,\n  &DigitalOscillator::RenderChaoticFeedbackFm,\n  &DigitalOscillator::RenderPlucked,\n  &DigitalOscillator::RenderBowed,\n  &DigitalOscillator::RenderBlown,\n  &DigitalOscillator::RenderFluted,\n  &DigitalOscillator::RenderStruckBell,\n  &DigitalOscillator::RenderStruckDrum,\n  &DigitalOscillator::RenderKick,\n  &DigitalOscillator::RenderCymbal,\n  &DigitalOscillator::RenderSnare,\n  &DigitalOscillator::RenderWavetables,\n  &DigitalOscillator::RenderWaveMap,\n  &DigitalOscillator::RenderWaveLine,\n  &DigitalOscillator::RenderWaveParaphonic,\n  &DigitalOscillator::RenderFilteredNoise,\n  &DigitalOscillator::RenderTwinPeaksNoise,\n  &DigitalOscillator::RenderClockedNoise,\n  &DigitalOscillator::RenderGranularCloud,\n  &DigitalOscillator::RenderParticleNoise,\n  &DigitalOscillator::RenderDigitalModulation,\n  // &DigitalOscillator::RenderYourAlgo,\n\n  &DigitalOscillator::RenderQuestionMark,\n  &DigitalOscillator::RenderDiatonicChord,\n  &DigitalOscillator::RenderDiatonicChord,\n  &DigitalOscillator::RenderDiatonicChord,\n  &DigitalOscillator::RenderDiatonicChord,\n  &DigitalOscillator::RenderDiatonicChord,\n\n  &DigitalOscillator::RenderStack,\n  &DigitalOscillator::RenderStack,\n  &DigitalOscillator::RenderStack,\n  &DigitalOscillator::RenderStack,\n  &DigitalOscillator::RenderStack,\n};\n\n}  // namespace braids\n"
  },
  {
    "path": "lib/braids/digital_oscillator.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Oscillator - digital style waveforms.\n\n#ifndef BRAIDS_DIGITAL_OSCILLATOR_H_\n#define BRAIDS_DIGITAL_OSCILLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"braids/excitation.h\"\n#include \"braids/svf.h\"\n\n#include <cstring>\n\nnamespace braids {\n\nstatic const size_t kWGBridgeLength = 1024;\nstatic const size_t kWGNeckLength = 4096;\nstatic const size_t kWGBoreLength = 2048;\nstatic const size_t kWGJetLength = 1024;\nstatic const size_t kWGFBoreLength = 4096;\nstatic const size_t kCombDelayLength = 8192;\n\nstatic const size_t kNumFormants = 5;\nstatic const size_t kNumPluckVoices = 3;\nstatic const size_t kNumOverlappingFof = 3;\nstatic const size_t kNumBellPartials = 11;\nstatic const size_t kNumDrumPartials = 6;\nstatic const size_t kNumAdditiveHarmonics = 12;\n\nenum DigitalOscillatorShape {\n  OSC_SHAPE_TRIPLE_RING_MOD,\n  OSC_SHAPE_SAW_SWARM,\n  OSC_SHAPE_COMB_FILTER,\n  OSC_SHAPE_TOY,\n\n  OSC_SHAPE_DIGITAL_FILTER_LP,\n  OSC_SHAPE_DIGITAL_FILTER_PK,\n  OSC_SHAPE_DIGITAL_FILTER_BP,\n  OSC_SHAPE_DIGITAL_FILTER_HP,\n  OSC_SHAPE_VOSIM,\n  OSC_SHAPE_VOWEL,\n  OSC_SHAPE_VOWEL_FOF,\n  \n  OSC_SHAPE_HARMONICS,\n\n  OSC_SHAPE_FM,\n  OSC_SHAPE_FEEDBACK_FM,\n  OSC_SHAPE_CHAOTIC_FEEDBACK_FM,\n\n  OSC_SHAPE_STRUCK_BELL,\n  OSC_SHAPE_STRUCK_DRUM,\n\n  OSC_SHAPE_KICK,\n  OSC_SHAPE_HAT,\n  OSC_SHAPE_SNARE,\n  \n  OSC_SHAPE_PLUCKED,\n  OSC_SHAPE_BOWED,\n  OSC_SHAPE_BLOWN,\n  OSC_SHAPE_FLUTED,\n  \n  OSC_SHAPE_WAVETABLES,\n  OSC_SHAPE_WAVE_MAP,\n  OSC_SHAPE_WAVE_LINE,\n  OSC_SHAPE_WAVE_PARAPHONIC,\n  \n  OSC_SHAPE_FILTERED_NOISE,\n  OSC_SHAPE_TWIN_PEAKS_NOISE,\n  OSC_SHAPE_CLOCKED_NOISE,\n  OSC_SHAPE_GRANULAR_CLOUD,\n  OSC_SHAPE_PARTICLE_NOISE,\n\n  OSC_SHAPE_DIGITAL_MODULATION,\n\n  OSC_SHAPE_QUESTION_MARK_LAST,\n\n  // Braids Renaissance https://burns.ca/eurorack.html\n  OSC_SHAPE_CHORD_SAW,\n  OSC_SHAPE_CHORD_SQUARE,\n  OSC_SHAPE_CHORD_TRIANGLE,\n  OSC_SHAPE_CHORD_SINE,\n  OSC_SHAPE_CHORD_WAVETABLE,\n\n  OSC_SHAPE_STACK_SAW,\n  OSC_SHAPE_STACK_SQUARE,\n  OSC_SHAPE_STACK_TRIANGLE,\n  OSC_SHAPE_STACK_SINE,\n  OSC_SHAPE_STACK_WAVETABLE,\n\n};\n\nstruct ResoSquareState {\n  uint32_t modulator_phase_increment;\n  uint32_t modulator_phase;\n  uint32_t square_modulator_phase;\n  int32_t integrator;\n  bool polarity;\n};\n\nstruct VowelSynthesizerState {\n  uint32_t formant_increment[3];\n  uint32_t formant_phase[3];\n  uint32_t formant_amplitude[3];\n  uint16_t consonant_frames;\n  uint16_t noise;\n};\n\nstruct SawSwarmState {\n  uint32_t phase[6];\n  int32_t filter_state[2][2];\n  int32_t dc_blocked;\n  int32_t lp;\n  int32_t bp;\n};\n\nstruct HarmonicsState {\n  int32_t amplitude[kNumAdditiveHarmonics];\n};\n\nstruct AdditiveState {\n  uint32_t partial_phase[kNumBellPartials];\n  uint32_t partial_phase_increment[kNumBellPartials];\n  int32_t partial_amplitude[kNumBellPartials];\n  int32_t target_partial_amplitude[kNumBellPartials];\n  int16_t previous_sample;\n  size_t current_partial;\n  int32_t lp_noise[3];\n};\n\nstruct PluckState {\n  size_t size;\n  size_t write_ptr;\n  size_t shift;\n  size_t mask;\n  size_t pluck_position;\n  size_t initialization_ptr;\n  uint32_t phase;\n  uint32_t phase_increment;\n  uint32_t max_phase_increment;\n  int16_t previous_sample;\n  uint8_t polyphony_assigner;\n};\n\nstruct FeedbackFmState {\n  uint32_t modulator_phase;\n  int16_t previous_sample;\n};\n\nstruct ParticleNoiseState {\n  uint16_t amplitude;\n  int32_t filter_state[3][2];\n  int32_t filter_scale[3];\n  int32_t filter_coefficient[3];\n};\n\nstruct PhysicalModellingState {\n  uint16_t delay_ptr;\n  uint16_t excitation_ptr;\n  int32_t lp_state;\n  int32_t filter_state[2];\n  int16_t previous_sample;\n};\n\nstruct Grain {\n  uint32_t phase;\n  uint32_t phase_increment;\n  uint32_t envelope_phase;\n  uint32_t envelope_phase_increment;\n};\n\nstruct FofState {\n  int32_t next_saw_sample;\n  int16_t previous_sample;\n  int32_t svf_lp[kNumFormants];\n  int32_t svf_bp[kNumFormants];\n};\n\nstruct ToyState {\n  uint8_t held_sample;\n  uint16_t decimation_counter;\n};\n\nstruct SvfState {\n  int32_t bp;\n  int32_t lp;\n};\n\nstruct DigitalModulationState {\n  uint32_t symbol_phase;\n  uint16_t symbol_count;\n  int32_t filter_state;\n  uint8_t data_byte;\n};\n\nstruct ClockedNoiseState {\n  uint32_t cycle_phase;\n  uint32_t cycle_phase_increment;\n  uint32_t rng_state;\n  int32_t seed;\n  int16_t sample;\n};\n\nstruct HatState {\n  uint32_t phase[6];\n  uint32_t rng_state;\n};\n\nstruct StackState {\n  uint32_t phase[12];\n  int16_t previous_sample;\n};\n\nunion DigitalOscillatorState {\n  ResoSquareState res;\n  VowelSynthesizerState vow;\n  SawSwarmState saw;\n  PluckState plk[4];\n  FeedbackFmState ffm;\n  ParticleNoiseState pno;\n  PhysicalModellingState phy;\n  Grain grain[4];\n  FofState fof;\n  ToyState toy;\n  SvfState svf;\n  AdditiveState add;\n  DigitalModulationState dmd;\n  ClockedNoiseState clk;\n  HatState hat;\n  HarmonicsState hrm;\n  StackState stack;\n  uint32_t modulator_phase;\n};\n\nclass DigitalOscillator {\n public:\n  typedef void (DigitalOscillator::*RenderFn)(const uint8_t*, int16_t*, size_t);\n\n  DigitalOscillator() { }\n  ~DigitalOscillator() { }\n  \n  inline void Init() {\n    memset(&state_, 0, sizeof(state_));\n    pulse_[0].Init();\n    pulse_[1].Init();\n    pulse_[2].Init();\n    pulse_[3].Init();\n    svf_[0].Init();\n    svf_[1].Init();\n    svf_[2].Init();\n    phase_ = 0;\n    strike_ = true;\n    init_ = true;\n  }\n  \n  inline void set_shape(DigitalOscillatorShape shape) {\n    shape_ = shape;\n  }\n  \n  inline void set_pitch(int16_t pitch) {\n    // Smooth HF noise when the pitch CV is noisy.\n    if (pitch_ > (90 << 7) && pitch > (90 << 7)) {\n      pitch_ = (static_cast<int32_t>(pitch_) + pitch) >> 1;\n    } else {\n      pitch_ = pitch;\n    }\n  }\n\n  inline void set_parameters(\n      int16_t parameter_1,\n      int16_t parameter_2) {\n    parameter_[0] = parameter_1;\n    parameter_[1] = parameter_2;\n  }\n  \n  inline uint32_t phase_increment() const {\n    return phase_increment_;\n  }\n  \n  inline void Strike() {\n    strike_ = true;\n  }\n\n  void Render(const uint8_t* sync, int16_t* buffer, size_t size);\n  \n private:\n  void RenderTripleRingMod(const uint8_t*, int16_t*, size_t);\n  void RenderSawSwarm(const uint8_t*, int16_t*, size_t);\n  void RenderComb(const uint8_t*, int16_t*, size_t);\n  void RenderToy(const uint8_t*, int16_t*, size_t);\n\n  void RenderDigitalFilter(const uint8_t*, int16_t*, size_t);\n  void RenderVosim(const uint8_t*, int16_t*, size_t);\n  void RenderVowel(const uint8_t*, int16_t*, size_t);\n  void RenderVowelFof(const uint8_t*, int16_t*, size_t);\n\n  void RenderHarmonics(const uint8_t*, int16_t*, size_t);\n\n  void RenderFm(const uint8_t*, int16_t*, size_t);\n  void RenderFeedbackFm(const uint8_t*, int16_t*, size_t);\n  void RenderChaoticFeedbackFm(const uint8_t*, int16_t*, size_t);\n  \n  void RenderStruckBell(const uint8_t*, int16_t*, size_t);\n  void RenderStruckDrum(const uint8_t*, int16_t*, size_t);\n  void RenderPlucked(const uint8_t*, int16_t*, size_t);\n  void RenderBowed(const uint8_t*, int16_t*, size_t);\n  void RenderBlown(const uint8_t*, int16_t*, size_t);\n  void RenderFluted(const uint8_t*, int16_t*, size_t);\n\n  void RenderWavetables(const uint8_t*, int16_t*, size_t);\n  void RenderWaveMap(const uint8_t*, int16_t*, size_t);\n  void RenderWaveLine(const uint8_t*, int16_t*, size_t);\n  void RenderWaveParaphonic(const uint8_t*, int16_t*, size_t);\n  \n  void RenderTwinPeaksNoise(const uint8_t*, int16_t*, size_t);\n  void RenderFilteredNoise(const uint8_t*, int16_t*, size_t);\n  void RenderClockedNoise(const uint8_t*, int16_t*, size_t);\n  void RenderGranularCloud(const uint8_t*, int16_t*, size_t);\n  void RenderParticleNoise(const uint8_t*, int16_t*, size_t);\n  \n  void RenderDigitalModulation(const uint8_t*, int16_t*, size_t);\n  void RenderKick(const uint8_t*, int16_t*, size_t);\n  void RenderSnare(const uint8_t*, int16_t*, size_t);\n  void RenderCymbal(const uint8_t*, int16_t*, size_t);\n  void RenderQuestionMark(const uint8_t*, int16_t*, size_t);\n\n  // void RenderYourAlgo(const uint8_t*, int16_t*, size_t);\n  void renderChord(\n    const uint8_t *sync, \n    int16_t *buffer, \n    size_t size, \n    const uint8_t* noteOffset, \n    uint8_t noteCount);\n  void RenderStack(const uint8_t*, int16_t*, size_t);\n  void RenderDiatonicChord(const uint8_t*, int16_t*, size_t);\n\npublic:  \n  static uint32_t ComputePhaseIncrement(int16_t midi_pitch);\n  static uint32_t ComputeDelay(int16_t midi_pitch);\n  static int16_t InterpolateFormantParameter(\n      const int16_t table[][kNumFormants][kNumFormants],\n      int16_t x,\n      int16_t y,\n      uint8_t formant);\n      \nprivate:    \n  uint32_t phase_;\n  uint32_t phase_increment_;\n  uint32_t delay_;\n\n  int16_t parameter_[2];\n  int16_t previous_parameter_[2];\n  int32_t smoothed_parameter_;\n  int16_t pitch_;\n  \n  uint8_t active_voice_;\n  \n  bool init_;\n  bool strike_;\n\n  DigitalOscillatorShape shape_;\n  DigitalOscillatorShape previous_shape_;\n  DigitalOscillatorState state_;\n  \n  Excitation pulse_[4];\n  Svf svf_[3];\n  \n  union {\n    int16_t comb[kCombDelayLength];\n    int16_t ks[1025 * 4];\n    struct {\n      int8_t bridge[kWGBridgeLength];\n      int8_t neck[kWGNeckLength];\n    } bowed;\n    int16_t bore[kWGBoreLength];\n    struct {\n      int8_t jet[kWGJetLength];\n      int8_t bore[kWGFBoreLength];\n    } fluted;\n  } delay_lines_;\n  \n  static RenderFn fn_table_[];\n  \n  DISALLOW_COPY_AND_ASSIGN(DigitalOscillator);\n};\n\n}  // namespace braids\n\n#endif // BRAIDS_DIGITAL_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/braids/envelope.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n\n#ifndef BRAIDS_ENVELOPE_H_\n#define BRAIDS_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"braids/resources.h\"\n\nnamespace braids {\n\nusing namespace stmlib;\n\nenum EnvelopeSegment {\n  ENV_SEGMENT_ATTACK = 0,\n  ENV_SEGMENT_DECAY = 1,\n  ENV_SEGMENT_DEAD = 2,\n  ENV_NUM_SEGMENTS,\n};\n\nclass Envelope {\n public:\n  Envelope() { }\n  ~Envelope() { }\n\n  void Init() {\n    target_[ENV_SEGMENT_ATTACK] = 65535;\n    target_[ENV_SEGMENT_DECAY] = 0;\n    target_[ENV_SEGMENT_DEAD] = 0;\n    increment_[ENV_SEGMENT_DEAD] = 0;\n  }\n\n  inline EnvelopeSegment segment() const {\n    return static_cast<EnvelopeSegment>(segment_);\n  }\n\n  inline void Update(int32_t a, int32_t d) {\n    increment_[ENV_SEGMENT_ATTACK] = lut_env_portamento_increments[a];\n    increment_[ENV_SEGMENT_DECAY] = lut_env_portamento_increments[d];\n  }\n  \n  inline void Trigger(EnvelopeSegment segment) {\n    if (segment == ENV_SEGMENT_DEAD) {\n      value_ = 0;\n    }\n    a_ = value_;\n    b_ = target_[segment];\n    segment_ = segment;\n    phase_ = 0;\n  }\n\n  inline uint16_t Render() {\n    uint32_t increment = increment_[segment_];\n    phase_ += increment;\n    if (phase_ < increment) {\n      value_ = Mix(a_, b_, 65535);\n      Trigger(static_cast<EnvelopeSegment>(segment_ + 1));\n    }\n    if (increment_[segment_]) {\n      value_ = Mix(a_, b_, Interpolate824(lut_env_expo, phase_));\n    }\n    return value_;\n  }\n  \n  inline uint16_t value() const { return value_; }\n\n private:\n  // Phase increments for each segment.\n  uint32_t increment_[ENV_NUM_SEGMENTS];\n  \n  // Value that needs to be reached at the end of each segment.\n  uint16_t target_[ENV_NUM_SEGMENTS];\n  \n  // Current segment.\n  size_t segment_;\n  \n  // Start and end value of the current segment.\n  uint16_t a_;\n  uint16_t b_;\n  uint16_t value_;\n  uint32_t phase_;\n\n  DISALLOW_COPY_AND_ASSIGN(Envelope);\n};\n\n}  // namespace braids\n\n#endif  // BRAIDS_ENVELOPE_H_\n"
  },
  {
    "path": "lib/braids/excitation.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Exponential decay excitation.\n\n#ifndef BRAIDS_EXCITATION_H_\n#define BRAIDS_EXCITATION_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace braids {\n\nclass Excitation {\n public:\n  Excitation() { }\n  ~Excitation() { }\n\n  void Init() {\n    delay_ = 0;\n    decay_ = 4093;\n    counter_ = 0;\n    state_ = 0;\n  }\n\n  void set_delay(uint16_t delay) {\n    delay_ = delay;\n  }\n  \n  void set_decay(uint16_t decay) {\n    decay_ = decay;\n  }\n  \n  void Trigger(int32_t level) {\n    level_ = level;\n    counter_ = delay_ + 1;\n  }\n  \n  bool done() {\n    return counter_ == 0;\n  }\n  \n  inline int32_t Process() {\n    state_ = (state_ * decay_ >> 12);\n    if (counter_ > 0) {\n      --counter_;\n      if (counter_ == 0) {\n        state_ += level_ < 0 ? -level_ : level_;\n      }\n    }\n    return level_ < 0 ? -state_ : state_;\n  }\n  \n private:\n  uint32_t delay_;\n  uint32_t decay_;\n  int32_t counter_;\n  int32_t state_;\n  int32_t level_;\n\n  DISALLOW_COPY_AND_ASSIGN(Excitation);\n};\n\n}  // namespace braids\n\n#endif  // BRAIDS_EXCITATION_H_\n"
  },
  {
    "path": "lib/braids/macro_oscillator.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Macro-oscillator.\n\n#include \"braids/macro_oscillator.h\"\n\n#include <algorithm>\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"braids/parameter_interpolation.h\"\n#include \"braids/resources.h\"\n\nnamespace braids {\n  \nusing namespace stmlib;\n\nvoid MacroOscillator::Render(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  RenderFn fn = fn_table_[shape_];\n  (this->*fn)(sync, buffer, size);\n}\n\nvoid MacroOscillator::RenderCSaw(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  analog_oscillator_[0].set_pitch(pitch_);\n  analog_oscillator_[0].set_shape(OSC_SHAPE_CSAW);\n  analog_oscillator_[0].set_parameter(parameter_[0]);\n  analog_oscillator_[0].set_aux_parameter(parameter_[1]);\n  analog_oscillator_[0].Render(sync, buffer, NULL, size);\n  int16_t shift = -(parameter_[1] - 32767) >> 4;\n  while (size--) {\n    int32_t s = *buffer + shift;\n    *buffer++ = (s * 13) >> 3;\n  }\n}\n\nvoid MacroOscillator::RenderMorph(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  analog_oscillator_[0].set_pitch(pitch_);\n  analog_oscillator_[1].set_pitch(pitch_);\n  \n  uint16_t balance;\n  if (parameter_[0] <= 10922) {\n    analog_oscillator_[0].set_parameter(0);\n    analog_oscillator_[1].set_parameter(0);\n    analog_oscillator_[0].set_shape(OSC_SHAPE_TRIANGLE);\n    analog_oscillator_[1].set_shape(OSC_SHAPE_SAW);\n    balance = parameter_[0] * 6;\n  } else if (parameter_[0] <= 21845) {\n    analog_oscillator_[0].set_parameter(0);\n    analog_oscillator_[1].set_parameter(0);\n    analog_oscillator_[0].set_shape(OSC_SHAPE_SQUARE);\n    analog_oscillator_[1].set_shape(OSC_SHAPE_SAW);\n    balance = 65535 - (parameter_[0] - 10923) * 6;\n  } else {\n    analog_oscillator_[0].set_parameter((parameter_[0] - 21846) * 3);\n    analog_oscillator_[1].set_parameter(0);\n    analog_oscillator_[0].set_shape(OSC_SHAPE_SQUARE);\n    analog_oscillator_[1].set_shape(OSC_SHAPE_SINE);\n    balance = 0;\n  }\n  \n  int16_t* shape_1 = buffer;\n  int16_t* shape_2 = temp_buffer_;\n  analog_oscillator_[0].Render(sync, shape_1, NULL, size);\n  analog_oscillator_[1].Render(sync, shape_2, NULL, size);\n  \n  int32_t lp_cutoff = pitch_ - (parameter_[1] >> 1) + 128 * 128;\n  if (lp_cutoff < 0) {\n    lp_cutoff = 0;\n  } else if (lp_cutoff > 32767) {\n    lp_cutoff = 32767;\n  }\n  int32_t f = Interpolate824(lut_svf_cutoff, lp_cutoff << 17);\n  int32_t lp_state = lp_state_;\n  int32_t fuzz_amount = parameter_[1] << 1;\n  if (pitch_ > (80 << 7)) {\n    fuzz_amount -= (pitch_ - (80 << 7)) << 4;\n    if (fuzz_amount < 0) {\n      fuzz_amount = 0;\n    }\n  }\n  while (size--) {\n    int16_t sample = Mix(*shape_1++, *shape_2++, balance);\n    int32_t shifted_sample = sample;\n    shifted_sample += (parameter_[1] >> 2) + (parameter_[0] >> 4);\n  \n    lp_state += (sample - lp_state) * f >> 15;\n    CLIP(lp_state)\n    shifted_sample = lp_state + 32768;\n  \n    int16_t fuzzed = Interpolate88(ws_violent_overdrive, shifted_sample);\n    *buffer++ = Mix(sample, fuzzed, fuzz_amount);\n  }\n  lp_state_ = lp_state;\n}\n\nvoid MacroOscillator::RenderSawSquare(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  analog_oscillator_[0].set_parameter(parameter_[0]);\n  analog_oscillator_[1].set_parameter(parameter_[0]);\n  analog_oscillator_[0].set_pitch(pitch_);\n  analog_oscillator_[1].set_pitch(pitch_);\n\n  analog_oscillator_[0].set_shape(OSC_SHAPE_VARIABLE_SAW);\n  analog_oscillator_[1].set_shape(OSC_SHAPE_SQUARE);\n  \n  int16_t* saw_buffer = buffer;\n  int16_t* square_buffer = temp_buffer_;\n  \n  analog_oscillator_[0].Render(sync, saw_buffer, NULL, size);\n  analog_oscillator_[1].Render(sync, square_buffer, NULL, size);\n  \n  BEGIN_INTERPOLATE_PARAMETER_1\n  while (size--) {\n    INTERPOLATE_PARAMETER_1\n    uint16_t balance = parameter_1 << 1;\n    int16_t attenuated_square = static_cast<int32_t>(\n          *square_buffer++) * 148 >> 8;\n    *buffer++ = Mix(*saw_buffer++, attenuated_square, balance);\n  }\n  END_INTERPOLATE_PARAMETER_1\n}\n\n#define SEMI * 128\n\nconst int16_t intervals[65] = {\n  -24 SEMI, -24 SEMI, -24 SEMI + 4,\n  -23 SEMI, -22 SEMI, -21 SEMI, -20 SEMI, -19 SEMI, -18 SEMI,\n  -17 SEMI - 4, -17 SEMI,\n  -16 SEMI, -15 SEMI, -14 SEMI, -13 SEMI,\n  -12 SEMI - 4, -12 SEMI,\n  -11 SEMI, -10 SEMI, -9 SEMI, -8 SEMI,\n  -7 SEMI - 4, -7 SEMI,\n  -6 SEMI, -5 SEMI, -4 SEMI, -3 SEMI, -2 SEMI, -1 SEMI,\n  -24, -8, -4, 0, 4, 8, 24,\n  1 SEMI, 2 SEMI, 3 SEMI, 4 SEMI, 5 SEMI, 6 SEMI,\n  7 SEMI, 7 SEMI + 4,\n  8 SEMI, 9 SEMI, 10 SEMI, 11 SEMI,\n  12 SEMI, 12 SEMI + 4,\n  13 SEMI, 14 SEMI, 15 SEMI, 16 SEMI,\n  17 SEMI, 17 SEMI + 4,\n  18 SEMI, 19 SEMI, 20 SEMI, 21 SEMI, 22 SEMI, 23 SEMI,\n  24 SEMI - 4, 24 SEMI, 24 SEMI\n};\n\nvoid MacroOscillator::RenderTriple(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  AnalogOscillatorShape base_shape;\n  switch (shape_) {\n    case MACRO_OSC_SHAPE_TRIPLE_SAW:\n      base_shape = OSC_SHAPE_SAW;\n      break;\n    case MACRO_OSC_SHAPE_TRIPLE_TRIANGLE:\n      base_shape = OSC_SHAPE_TRIANGLE;\n      break;\n    case MACRO_OSC_SHAPE_TRIPLE_SQUARE:\n      base_shape = OSC_SHAPE_SQUARE;\n      break;\n    default:\n      base_shape = OSC_SHAPE_SINE;\n      break;\n  }\n  \n  analog_oscillator_[0].set_parameter(0);\n  analog_oscillator_[1].set_parameter(0);\n  analog_oscillator_[2].set_parameter(0);\n\n  analog_oscillator_[0].set_pitch(pitch_);\n  for (size_t i = 0; i < 2; ++i) {\n    int16_t detune_1 = intervals[parameter_[i] >> 9];\n    int16_t detune_2 = intervals[((parameter_[i] >> 8) + 1) >> 1];\n    uint16_t xfade = parameter_[i] << 8;\n    int16_t detune = detune_1 + ((detune_2 - detune_1) * xfade >> 16);\n    analog_oscillator_[i + 1].set_pitch(pitch_ + detune);\n  }\n\n  analog_oscillator_[0].set_shape(base_shape);\n  analog_oscillator_[1].set_shape(base_shape);\n  analog_oscillator_[2].set_shape(base_shape);\n\n  std::fill(&buffer[0], &buffer[size], 0);\n  for (size_t i = 0; i < 3; ++i) {\n    analog_oscillator_[i].Render(sync, temp_buffer_, NULL, size);\n    for (size_t j = 0; j < size; ++j) {\n      buffer[j] += temp_buffer_[j] * 21 >> 6;\n    }\n  }\n}\n\nvoid MacroOscillator::RenderSub(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  AnalogOscillatorShape base_shape = shape_ == MACRO_OSC_SHAPE_SQUARE_SUB ?\n      OSC_SHAPE_SQUARE : OSC_SHAPE_VARIABLE_SAW;\n  analog_oscillator_[0].set_parameter(parameter_[0]);\n  analog_oscillator_[0].set_shape(base_shape);\n  analog_oscillator_[0].set_pitch(pitch_);\n\n  analog_oscillator_[1].set_parameter(0);\n  analog_oscillator_[1].set_shape(OSC_SHAPE_SQUARE);\n  int16_t octave = parameter_[1] < 16384 ? (24 << 7) : (12 << 7);\n  analog_oscillator_[1].set_pitch(pitch_ - octave);\n\n  analog_oscillator_[0].Render(sync, buffer, NULL, size);\n  analog_oscillator_[1].Render(sync, temp_buffer_, NULL, size);\n  \n  BEGIN_INTERPOLATE_PARAMETER_1\n\n  int16_t* temp_buffer = temp_buffer_;\n  while (size--) {\n    INTERPOLATE_PARAMETER_1\n    uint16_t sub_gain = (parameter_1 < 16384\n        ? (16383 - parameter_1) : (parameter_1 - 16384)) << 1;\n    *buffer = Mix(*buffer, *temp_buffer, sub_gain);\n    buffer++;\n    temp_buffer++;\n  }\n  \n  END_INTERPOLATE_PARAMETER_1\n}\n\nvoid MacroOscillator::RenderDualSync(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  AnalogOscillatorShape base_shape = shape_ == MACRO_OSC_SHAPE_SQUARE_SYNC ?\n      OSC_SHAPE_SQUARE : OSC_SHAPE_SAW;\n  analog_oscillator_[0].set_parameter(0);\n  analog_oscillator_[0].set_shape(base_shape);\n  analog_oscillator_[0].set_pitch(pitch_);\n\n  analog_oscillator_[1].set_parameter(0);\n  analog_oscillator_[1].set_shape(base_shape);\n  analog_oscillator_[1].set_pitch(pitch_ + (parameter_[0] >> 2));\n\n  analog_oscillator_[0].Render(sync, buffer, sync_buffer_, size);\n  analog_oscillator_[1].Render(sync_buffer_, temp_buffer_, NULL, size);\n  \n  BEGIN_INTERPOLATE_PARAMETER_1\n\n  int16_t* temp_buffer = temp_buffer_;\n  while (size--) {\n    INTERPOLATE_PARAMETER_1\n    uint16_t balance = parameter_1 << 1;\n    \n    *buffer = (Mix(*buffer, *temp_buffer, balance) >> 2) * 3;\n    buffer++;\n    temp_buffer++;\n  }\n  \n  END_INTERPOLATE_PARAMETER_1\n}\n\nvoid MacroOscillator::RenderSineTriangle(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  int32_t attenuation_sine = 32767 - 6 * (pitch_ - (92 << 7));\n  int32_t attenuation_tri = 32767 - 7 * (pitch_ - (80 << 7));\n  if (attenuation_tri < 0) attenuation_tri = 0;\n  if (attenuation_sine < 0) attenuation_sine = 0;\n  if (attenuation_tri > 32767) attenuation_tri = 32767;\n  if (attenuation_sine > 32767) attenuation_sine = 32767;\n  \n  int32_t timbre = parameter_[0];\n\n  analog_oscillator_[0].set_parameter(timbre * attenuation_sine >> 15);\n  analog_oscillator_[1].set_parameter(timbre * attenuation_tri >> 15);\n  analog_oscillator_[0].set_pitch(pitch_);\n  analog_oscillator_[1].set_pitch(pitch_);\n  \n  analog_oscillator_[0].set_shape(OSC_SHAPE_SINE_FOLD);\n  analog_oscillator_[1].set_shape(OSC_SHAPE_TRIANGLE_FOLD);\n\n  analog_oscillator_[0].Render(sync, buffer, NULL, size);\n  analog_oscillator_[1].Render(sync, temp_buffer_, NULL, size);\n\n  int16_t* temp_buffer = temp_buffer_;\n  \n  BEGIN_INTERPOLATE_PARAMETER_1\n  \n  while (size--) {\n    INTERPOLATE_PARAMETER_1\n    uint16_t balance = parameter_1 << 1;\n    \n    *buffer = Mix(*buffer, *temp_buffer, balance);\n    buffer++;\n    temp_buffer++;\n  }\n  \n  END_INTERPOLATE_PARAMETER_1\n}\n\nvoid MacroOscillator::RenderBuzz(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  analog_oscillator_[0].set_parameter(parameter_[0]);\n  analog_oscillator_[0].set_shape(OSC_SHAPE_BUZZ);\n  analog_oscillator_[0].set_pitch(pitch_);\n\n  analog_oscillator_[1].set_parameter(parameter_[0]);\n  analog_oscillator_[1].set_shape(OSC_SHAPE_BUZZ);\n  analog_oscillator_[1].set_pitch(pitch_ + (parameter_[1] >> 8));\n\n  analog_oscillator_[0].Render(sync, buffer, NULL, size);\n  analog_oscillator_[1].Render(sync, temp_buffer_, NULL, size);\n  int16_t* temp_buffer = temp_buffer_;\n  while (size--) {\n    *buffer >>= 1;\n    *buffer += *temp_buffer >> 1;\n    buffer++;\n    temp_buffer++;\n  }\n}\n\nvoid MacroOscillator::RenderDigital(\n    const uint8_t* sync,\n    int16_t* buffer,\n    size_t size) {\n  digital_oscillator_.set_parameters(parameter_[0], parameter_[1]);\n  digital_oscillator_.set_pitch(pitch_);\n  digital_oscillator_.set_shape(static_cast<DigitalOscillatorShape>(\n      shape_ - MACRO_OSC_SHAPE_TRIPLE_RING_MOD));\n  digital_oscillator_.Render(sync, buffer, size);\n}\n\nvoid MacroOscillator::RenderSawComb(\n  const uint8_t* sync,\n  int16_t* buffer,\n  size_t size) {\n  analog_oscillator_[0].set_parameter(0);\n  analog_oscillator_[0].set_pitch(pitch_);\n  analog_oscillator_[0].set_shape(OSC_SHAPE_SAW);\n  analog_oscillator_[0].Render(sync, buffer, NULL, size);\n  \n  digital_oscillator_.set_parameters(parameter_[0], parameter_[1]);\n  digital_oscillator_.set_pitch(pitch_);\n  digital_oscillator_.set_shape(OSC_SHAPE_COMB_FILTER);\n  digital_oscillator_.Render(sync, buffer, size);\n}\n\n/* static */\nMacroOscillator::RenderFn MacroOscillator::fn_table_[] = {\n  &MacroOscillator::RenderCSaw,\n  &MacroOscillator::RenderMorph,\n  &MacroOscillator::RenderSawSquare,\n  &MacroOscillator::RenderSineTriangle,\n  &MacroOscillator::RenderBuzz,\n  &MacroOscillator::RenderSub,\n  &MacroOscillator::RenderSub,\n  &MacroOscillator::RenderDualSync,\n  &MacroOscillator::RenderDualSync,\n  &MacroOscillator::RenderTriple,\n  &MacroOscillator::RenderTriple,\n  &MacroOscillator::RenderTriple,\n  &MacroOscillator::RenderTriple,\n  &MacroOscillator::RenderDigital, \n  &MacroOscillator::RenderDigital, // Diatonic Chord 1-5\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital, // Stacks 1-5\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderSawComb,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  &MacroOscillator::RenderDigital,\n  // &MacroOscillator::RenderDigital\n};\n\n}  // namespace braids\n"
  },
  {
    "path": "lib/braids/macro_oscillator.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Macro-oscillator entry point.\n\n#ifndef BRAIDS_MACRO_OSCILLATOR_H_\n#define BRAIDS_MACRO_OSCILLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n\n#include \"braids/analog_oscillator.h\"\n#include \"braids/digital_oscillator.h\"\n#include \"braids/resources.h\"\n#include \"braids/settings.h\"\n\nnamespace braids {\n  \nclass MacroOscillator {\n public:\n  typedef void (MacroOscillator::*RenderFn)(const uint8_t*, int16_t*, size_t);\n\n  MacroOscillator() { }\n  ~MacroOscillator() { }\n  \n  inline void Init() {\n    analog_oscillator_[0].Init();\n    analog_oscillator_[1].Init();\n    analog_oscillator_[2].Init();\n    digital_oscillator_.Init();\n    lp_state_ = 0;\n    previous_parameter_[0] = 0;\n    previous_parameter_[1] = 0;\n  }\n  \n  inline void set_shape(MacroOscillatorShape shape) {\n    if (shape != shape_) {\n      Strike();\n    }\n    shape_ = shape;\n  }\n\n  inline void set_pitch(int16_t pitch) {\n    pitch_ = pitch;\n  }\n\n  inline int16_t pitch() const { return pitch_; }\n\n  inline void set_parameters(\n      int16_t parameter_1,\n      int16_t parameter_2) {\n    parameter_[0] = parameter_1;\n    parameter_[1] = parameter_2;\n  }\n  \n  inline void Strike() {\n    digital_oscillator_.Strike();\n  }\n  \n  void Render(const uint8_t* sync_buffer, int16_t* buffer, size_t size);\n  \n private:\n  void RenderCSaw(const uint8_t*, int16_t*, size_t);\n  void RenderMorph(const uint8_t*, int16_t*, size_t);\n  void RenderSawSquare(const uint8_t*, int16_t*, size_t);\n  void RenderSub(const uint8_t*, int16_t*, size_t);\n  void RenderDualSync(const uint8_t*, int16_t*, size_t);\n  void RenderSineTriangle(const uint8_t*, int16_t*, size_t);\n  void RenderBuzz(const uint8_t*, int16_t*, size_t);\n  void RenderDigital(const uint8_t*, int16_t*, size_t);\n  void RenderSawComb(const uint8_t*, int16_t*, size_t);\n  void RenderTriple(const uint8_t*, int16_t*, size_t);\n  void ConfigureTriple(AnalogOscillatorShape shape);\n\n  int16_t parameter_[2];\n  int16_t previous_parameter_[2];\n  int16_t pitch_;\n  uint8_t sync_buffer_[24];\n  int16_t temp_buffer_[24];\n  int32_t lp_state_;\n  \n  AnalogOscillator analog_oscillator_[3];\n  DigitalOscillator digital_oscillator_;\n  \n  MacroOscillatorShape shape_;\n  static RenderFn fn_table_[];\n  \n  DISALLOW_COPY_AND_ASSIGN(MacroOscillator);\n};\n\n}  // namespace braids\n\n#endif // BRAIDS_MACRO_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/braids/parameter_interpolation.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Macros for linearly interpolating parameters - used when the modulated signal\n// is a sine or triangle - which makes the 4kHz quantization obvious.\n\n#ifndef BRAIDS_PARAMETER_INTERPOLATION_H_\n#define BRAIDS_PARAMETER_INTERPOLATION_H_\n\n// Macro for linear interpolation of parameters.\n#define BEGIN_INTERPOLATE_PARAMETERS \\\n  int32_t parameter_0_start = previous_parameter_[0]; \\\n  int32_t parameter_1_start = previous_parameter_[1]; \\\n  int32_t parameter_0_delta = parameter_[0] - previous_parameter_[0]; \\\n  int32_t parameter_1_end = parameter_[1] - previous_parameter_[1]; \\\n  int32_t parameter_increment = 32767 / size; \\\n  int32_t parameter_xfade = 0;\n\n#define INTERPOLATE_PARAMETERS \\\n  parameter_xfade += parameter_increment; \\\n  int32_t parameter_0 = parameter_0_start + \\\n      (parameter_0_delta * parameter_xfade >> 15); \\\n  int32_t parameter_1 = parameter_0_start + \\\n      (parameter_0_delta * parameter_xfade >> 15);\n\n#define END_INTERPOLATE_PARAMETERS \\\n  previous_parameter_[0] = parameter_[0]; \\\n  previous_parameter_[1] = parameter_[1];\n\n\n#define BEGIN_INTERPOLATE_PARAMETER_0 \\\n  int32_t parameter_0_start = previous_parameter_[0]; \\\n  int32_t parameter_0_delta = parameter_[0] - previous_parameter_[0]; \\\n  int32_t parameter_increment = 32767 / size; \\\n  int32_t parameter_xfade = 0;\n\n#define INTERPOLATE_PARAMETER_0 \\\n  parameter_xfade += parameter_increment; \\\n  int32_t parameter_0 = parameter_0_start + \\\n      (parameter_0_delta * parameter_xfade >> 15);\n\n#define END_INTERPOLATE_PARAMETER_0 \\\n  previous_parameter_[0] = parameter_[0];\n\n\n#define BEGIN_INTERPOLATE_PARAMETER_1 \\\n  int32_t parameter_1_start = previous_parameter_[1]; \\\n  int32_t parameter_1_delta = parameter_[1] - previous_parameter_[1]; \\\n  int32_t parameter_increment = 32767 / size; \\\n  int32_t parameter_xfade = 0;\n\n#define INTERPOLATE_PARAMETER_1 \\\n  parameter_xfade += parameter_increment; \\\n  int32_t parameter_1 = parameter_1_start + \\\n      (parameter_1_delta * parameter_xfade >> 15);\n\n#define END_INTERPOLATE_PARAMETER_1 \\\n  previous_parameter_[1] = parameter_[1];\n\n\n#define BEGIN_INTERPOLATE_PARAMETER \\\n  int32_t parameter_start = previous_parameter_; \\\n  int32_t parameter_delta = parameter_ - previous_parameter_; \\\n  int32_t parameter_increment = 32767 / size; \\\n  int32_t parameter_xfade = 0;\n\n#define INTERPOLATE_PARAMETER \\\n  parameter_xfade += parameter_increment; \\\n  int32_t parameter = parameter_start + \\\n      (parameter_delta * parameter_xfade >> 15);\n\n#define END_INTERPOLATE_PARAMETER \\\n  previous_parameter_ = parameter_;\n\n#define BEGIN_INTERPOLATE_PHASE_INCREMENT \\\n  uint32_t phase_increment = previous_phase_increment_; \\\n  uint32_t phase_increment_increment = \\\n      previous_phase_increment_ < phase_increment_ \\\n      ? (phase_increment_ - previous_phase_increment_) / size \\\n      : ~((previous_phase_increment_ - phase_increment_) / size);\n\n#define INTERPOLATE_PHASE_INCREMENT \\\n  phase_increment += phase_increment_increment;\n  \n#define END_INTERPOLATE_PHASE_INCREMENT \\\n  previous_phase_increment_ = phase_increment;\n\n#endif // BRAIDS_PARAMETER_INTERPOLATION_H_\n"
  },
  {
    "path": "lib/braids/quantizer.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Note quantizer\n#include <algorithm>\n#include \"braids/quantizer.h\"\n\n#include <algorithm>\n#include <cstdlib>\n\nnamespace braids {\n\nvoid Quantizer::Init() {\n  enabled_ = false;\n  codeword_ = 0;\n  previous_boundary_ = 0;\n  next_boundary_ = 0;\n  last_note = 64;\n  num_notes_ = 12;\n  for (int16_t i = 0; i < 128; ++i) {\n    codebook_[i] = (i - 64) << 7;\n  }\n}\n\nint16_t Quantizer::Lookup(uint8_t index) {\n  return codebook_[index];\n}\n\nbool Quantizer::enabled() {\n  return enabled_;\n}\n\nvoid Quantizer::Configure(\n    const int16_t* notes,\n    int16_t span,\n    size_t num_notes) {\n  enabled_ = notes != NULL && num_notes != 0 && span != 0;\n  num_notes_ = num_notes;\n  if (enabled_) {\n    codeword_ = 0;\n    previous_boundary_ = 0;\n    next_boundary_ = 0;\n    last_note = 64;\n    int32_t octave = 0;\n    size_t note = 0;\n    int16_t root = 0;\n    for (int32_t i = 0; i < 64; ++i) {\n      int32_t up = root + notes[note] + span * octave;\n      int32_t down = root + notes[num_notes - 1 - note] + (-octave - 1) * span;\n      CLIP(up)\n      CLIP(down)\n      codebook_[64 + i] = up;\n      codebook_[64 - i - 1] = down;\n      ++note;\n      if (note >= num_notes) {\n        note = 0;\n        ++octave;\n      }\n    }\n  } else {\n    Init();\n  }\n}\n\nint32_t Quantizer::Process(int32_t pitch, int32_t root, int8_t* note) {\n\n  pitch -= root;\n  if (pitch >= previous_boundary_ && pitch <= next_boundary_) {\n    // We're still in the voronoi cell for the active codeword.\n  } else {\n    // Search for the nearest neighbour in the codebook.\n    int16_t upper_bound_index = std::upper_bound(\n        &codebook_[3],\n        &codebook_[126],\n        static_cast<int16_t>(pitch)) - &codebook_[0];\n    int16_t lower_bound_index = upper_bound_index - 2;\n\n    int16_t best_distance = 16384;\n    int16_t q = -1;\n    for (int16_t i = lower_bound_index; i <= upper_bound_index; ++i) {\n      int16_t distance = abs(pitch - codebook_[i]);\n      if (distance < best_distance) {\n        best_distance = distance;\n        q = i;\n      }\n    }\n    codeword_ = codebook_[q];\n    last_note = q;\n    // Enlarge the current voronoi cell a bit for hysteresis.\n    previous_boundary_ = (9 * codebook_[q - 1] + 7 * codeword_) >> 4;\n    next_boundary_ = (9 * codebook_[q + 1] + 7 * codeword_) >> 4;\n    if (enabled_)\n      pitch = codeword_;\n  }\n  if (enabled_)\n    pitch = codeword_;\n  if(note != nullptr)\n    *note = last_note;\n  pitch += root;\n  return pitch;\n}\n\n}  // namespace braids\n"
  },
  {
    "path": "lib/braids/quantizer.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Note quantizer\n\n#ifndef BRAIDS_QUANTIZER_H_\n#define BRAIDS_QUANTIZER_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace braids {\n  \nstruct Scale {\n  int16_t span;\n  size_t num_notes;\n  int16_t notes[16];\n};\n\nclass Quantizer {\n public:\n  Quantizer() { }\n  ~Quantizer() { }\n  \n  void Init();\n  \n  int32_t Process(int32_t pitch) {\n    return Process(pitch, 0, nullptr);\n  }\n  \n  int32_t Process(int32_t pitch, int32_t root, int8_t* note);\n\n  void Configure(const Scale& scale) {\n    Configure(scale.notes, scale.span, scale.num_notes);\n  }\n  \n  int16_t Lookup(uint8_t index);\n\n  void Configure(const int16_t* notes, int16_t span, size_t num_notes);\n\n  bool enabled();\n  \n  size_t NumNotes() {\n    return num_notes_;\n  }\n\n private:\n  int8_t last_note;\n  bool enabled_;\n  int16_t codebook_[128];\n  int32_t codeword_;\n  int32_t previous_boundary_;\n  int32_t next_boundary_;\n  size_t num_notes_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Quantizer);\n};\n\n}  // namespace braids\n\n#endif // BRAIDS_QUANTIZER_H_\n"
  },
  {
    "path": "lib/braids/quantizer_scales.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Quantizer scales\n\n#ifndef BRAIDS_QUANTIZER_SCALES_H_\n#define BRAIDS_QUANTIZER_SCALES_H_\n\n#include \"quantizer.h\"\n\nnamespace braids {\n\nconst Scale scales[] = {\n  // Off\n  { 0, 0, { } },\n  // Semitones\n  { 12 << 7, 12, { 0, 128, 256, 384, 512, 640, 768, 896, 1024, 1152, 1280, 1408} },\n  // Ionian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 256, 512, 640, 896, 1152, 1408} },\n  // Dorian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 256, 384, 640, 896, 1152, 1280} },\n  // Phrygian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 128, 384, 640, 896, 1024, 1280} },\n  // Lydian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 256, 512, 768, 896, 1152, 1408} },\n  // Mixolydian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 256, 512, 640, 896, 1152, 1280} },\n  // Aeolian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 256, 384, 640, 896, 1024, 1280} },\n  // Locrian (From midipal/BitT source code)\n  { 12 << 7, 7, { 0, 128, 384, 640, 768, 1024, 1280} },\n  // Blues major (From midipal/BitT source code)\n  { 12 << 7, 6, { 0, 384, 512, 896, 1152, 1280} },\n  // Blues minor (From midipal/BitT source code)\n  { 12 << 7, 6, { 0, 384, 640, 768, 896, 1280} },\n  // Pentatonic major (From midipal/BitT source code)\n  { 12 << 7, 5, { 0, 256, 512, 896, 1152} },\n  // Pentatonic minor (From midipal/BitT source code)\n  { 12 << 7, 5, { 0, 384, 640, 896, 1280} },\n  // Folk (From midipal/BitT source code)\n  { 12 << 7, 8, { 0, 128, 384, 512, 640, 896, 1024, 1280} },\n  // Japanese (From midipal/BitT source code)\n  { 12 << 7, 5, { 0, 128, 640, 896, 1024} },\n  // Gamelan (From midipal/BitT source code)\n  { 12 << 7, 5, { 0, 128, 384, 896, 1024} },\n  // Gypsy\n  { 12 << 7, 7, { 0, 256, 384, 768, 896, 1024, 1408} }, \n  // Arabian\n  { 12 << 7, 7, { 0, 128, 512, 640, 896, 1024, 1408} }, \n  // Flamenco\n  { 12 << 7, 7, { 0, 128, 512, 640, 896, 1024, 1280} },\n  // Whole tone (From midipal/BitT source code)\n  { 12 << 7, 6, { 0, 256, 512, 768, 1024, 1280} },\n  // pythagorean (From yarns source code)\n  { 12 << 7, 12, { 0, 115, 261, 376, 522, 637, 783, 899, 1014, 1160, 1275, 1421} },\n  // 1_4_eb (From yarns source code)\n  { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1152, 1280, 1344} },\n  // 1_4_e (From yarns source code)\n  { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1152, 1280, 1408} },\n  // 1_4_ea (From yarns source code)\n  { 12 << 7, 12, { 0, 128, 256, 384, 448, 640, 768, 896, 1024, 1088, 1280, 1408} },\n  // bhairav (From yarns source code)\n  { 12 << 7, 7, { 0, 115, 494, 637, 899, 1014, 1393} },\n  // gunakri (From yarns source code)\n  { 12 << 7, 5, { 0, 143, 637, 899, 1042} },\n  // marwa (From yarns source code)\n  { 12 << 7, 6, { 0, 143, 494, 755, 1132, 1393} },\n  // shree (From yarns source code)\n  { 12 << 7, 7, { 0, 115, 494, 755, 899, 1014, 1393} },\n  // purvi (From yarns source code)\n  { 12 << 7, 7, { 0, 143, 494, 755, 899, 1042, 1393} },\n  // bilawal (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 494, 637, 899, 1160, 1393} },\n  // yaman (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 522, 783, 899, 1160, 1421} },\n  // kafi (From yarns source code)\n  { 12 << 7, 7, { 0, 233, 376, 637, 899, 1132, 1275} },\n  // bhimpalasree (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 404, 637, 899, 1160, 1303} },\n  // darbari (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 376, 637, 899, 1014, 1275} },\n  // rageshree (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 494, 637, 899, 1132, 1275} },\n  // khamaj (From yarns source code)\n  { 12 << 7, 8, { 0, 261, 494, 637, 899, 1160, 1275, 1421} },\n  // mimal (From yarns source code)\n  { 12 << 7, 8, { 0, 261, 376, 637, 899, 1132, 1275, 1393} },\n  // parameshwari (From yarns source code)\n  { 12 << 7, 6, { 0, 115, 376, 637, 1132, 1275} },\n  // rangeshwari (From yarns source code)\n  { 12 << 7, 6, { 0, 261, 376, 637, 899, 1393} },\n  // gangeshwari (From yarns source code)\n  { 12 << 7, 6, { 0, 494, 637, 899, 1014, 1275} },\n  // kameshwari (From yarns source code)\n  { 12 << 7, 6, { 0, 261, 755, 899, 1132, 1275} },\n  // pa__kafi (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 376, 637, 899, 1160, 1275} },\n  // natbhairav (From yarns source code)\n  { 12 << 7, 7, { 0, 261, 494, 637, 899, 1014, 1393} },\n  // m_kauns (From yarns source code)\n  { 12 << 7, 6, { 0, 261, 522, 637, 1014, 1275} },\n  // bairagi (From yarns source code)\n  { 12 << 7, 5, { 0, 115, 637, 899, 1275} },\n  // b_todi (From yarns source code)\n  { 12 << 7, 5, { 0, 115, 376, 899, 1275} },\n  // chandradeep (From yarns source code)\n  { 12 << 7, 5, { 0, 376, 637, 899, 1275} },\n  // kaushik_todi (From yarns source code)\n  { 12 << 7, 5, { 0, 376, 637, 755, 1014} },\n  // jogeshwari (From yarns source code)\n  { 12 << 7, 6, { 0, 376, 494, 637, 1132, 1275} },\n};\n\n}  // namespace braids\n\n#endif  // BRAIDS_QUANTIZER_SCALES_H_\n"
  },
  {
    "path": "lib/braids/resources.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"braids/resources.h\"\n\n#ifndef FLASHMEM\n#define FLASHMEM\n#endif\n\nnamespace braids {\n\nstatic const char str_dummy[] = \"dummy\";\n\n\nconst char* string_table[] = {\n  str_dummy,\n};\n\nconst uint16_t FLASHMEM lut_resonator_coefficient[] = {\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65535,  65535,  65535,\n   65535,  65534,  65534,  65534,\n   65534,  65534,  65534,  65533,\n   65533,  65533,  65532,  65532,\n   65532,  65531,  65531,  65530,\n   65529,  65529,  65528,  65527,\n   65526,  65525,  65523,  65522,\n   65520,  65518,  65516,  65514,\n   65511,  65508,  65505,  65501,\n   65497,  65492,  65487,  65481,\n   65475,  65467,  65459,  65449,\n   65439,  65427,  65414,  65399,\n   65382,  65363,  65342,  65318,\n   65292,  65262,  65228,  65191,\n   65149,  65101,  65048,  64988,\n   64922,  64847,  64762,  64668,\n   64562,  64443,  64310,  64160,\n   63992,  63804,  63593,  63356,\n   63091,  62794,  62461,  62088,\n   61670,  61202,  60677,  60091,\n   59435,  58701,  57881,  56964,\n   55941,  54799,  53526,  52107,\n   50528,  48773,  46824,  44662,\n   42268,  39623,  36704,  33492,\n   29966,  26107,  21898,  17325,\n   12380,   7061,   1374,      0,\n       0,\n};\nconst uint16_t FLASHMEM lut_resonator_scale[] = {\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      2,      2,      2,\n       2,      2,      3,      3,\n       3,      4,      4,      4,\n       5,      5,      6,      6,\n       7,      8,      8,      9,\n      10,     11,     12,     13,\n      14,     16,     17,     19,\n      20,     22,     24,     27,\n      29,     32,     35,     38,\n      41,     45,     49,     54,\n      58,     64,     70,     76,\n      83,     90,     98,    107,\n     117,    128,    139,    152,\n     166,    181,    197,    215,\n     234,    255,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,    256,    256,    256,\n     256,\n};\nconst uint16_t FLASHMEM lut_svf_cutoff[] = {\n      17,     18,     19,     20,\n      22,     23,     24,     26,\n      27,     29,     31,     33,\n      35,     37,     39,     41,\n      44,     46,     49,     52,\n      55,     58,     62,     66,\n      70,     74,     78,     83,\n      88,     93,     99,    105,\n     111,    117,    124,    132,\n     140,    148,    157,    166,\n     176,    187,    198,    210,\n     222,    235,    249,    264,\n     280,    297,    314,    333,\n     353,    374,    396,    420,\n     445,    471,    499,    529,\n     561,    594,    629,    667,\n     706,    748,    793,    840,\n     890,    943,    999,   1059,\n    1122,   1188,   1259,   1334,\n    1413,   1497,   1586,   1681,\n    1781,   1886,   1999,   2117,\n    2243,   2377,   2518,   2668,\n    2826,   2994,   3172,   3361,\n    3560,   3772,   3996,   4233,\n    4485,   4751,   5033,   5332,\n    5648,   5983,   6337,   6713,\n    7111,   7532,   7978,   8449,\n    8949,   9477,  10037,  10628,\n   11254,  11916,  12616,  13356,\n   14138,  14964,  15837,  16758,\n   17730,  18756,  19837,  20975,\n   22174,  23435,  24761,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,\n};\nconst uint16_t FLASHMEM lut_svf_damp[] = {\n   65534,  49213,  46125,  44055,\n   42453,  41129,  39991,  38988,\n   38086,  37266,  36512,  35812,\n   35158,  34544,  33965,  33416,\n   32893,  32395,  31918,  31460,\n   31021,  30597,  30188,  29793,\n   29411,  29041,  28681,  28332,\n   27992,  27661,  27339,  27024,\n   26717,  26418,  26125,  25838,\n   25558,  25283,  25014,  24750,\n   24491,  24236,  23987,  23742,\n   23501,  23264,  23031,  22802,\n   22577,  22355,  22136,  21921,\n   21708,  21499,  21293,  21089,\n   20889,  20691,  20495,  20302,\n   20112,  19924,  19738,  19555,\n   19373,  19194,  19017,  18842,\n   18668,  18497,  18327,  18160,\n   17994,  17830,  17667,  17506,\n   17347,  17189,  17033,  16878,\n   16725,  16573,  16423,  16274,\n   16126,  15980,  15834,  15691,\n   15548,  15407,  15266,  15127,\n   14989,  14853,  14717,  14582,\n   14449,  14316,  14185,  14054,\n   13925,  13796,  13669,  13542,\n   13416,  13291,  13167,  13044,\n   12922,  12801,  12680,  12561,\n   12442,  12324,  12206,  12090,\n   11974,  11859,  11744,  11631,\n   11518,  11406,  11294,  11183,\n   11073,  10964,  10855,  10747,\n   10639,  10532,  10426,  10321,\n   10215,  10111,  10007,   9904,\n    9801,   9699,   9597,   9496,\n    9396,   9296,   9196,   9097,\n    8999,   8901,   8804,   8707,\n    8610,   8514,   8419,   8324,\n    8230,   8136,   8042,   7949,\n    7856,   7764,   7672,   7581,\n    7490,   7400,   7309,   7220,\n    7131,   7042,   6953,   6865,\n    6778,   6690,   6604,   6517,\n    6431,   6345,   6260,   6175,\n    6090,   6006,   5922,   5839,\n    5755,   5673,   5590,   5508,\n    5426,   5345,   5263,   5183,\n    5102,   5022,   4942,   4862,\n    4783,   4704,   4626,   4547,\n    4469,   4391,   4314,   4237,\n    4160,   4083,   4007,   3931,\n    3855,   3780,   3705,   3630,\n    3555,   3481,   3407,   3333,\n    3259,   3186,   3113,   3040,\n    2968,   2895,   2823,   2752,\n    2680,   2609,   2538,   2467,\n    2396,   2326,   2256,   2186,\n    2116,   2047,   1978,   1909,\n    1840,   1771,   1703,   1635,\n    1567,   1500,   1432,   1365,\n    1298,   1231,   1164,   1098,\n    1032,    966,    900,    834,\n     769,    704,    639,    574,\n     510,    445,    381,    317,\n     253,\n};\nconst uint16_t FLASHMEM lut_svf_scale[] = {\n   32767,  28395,  27490,  26866,\n   26373,  25958,  25596,  25273,\n   24979,  24709,  24458,  24222,\n   24000,  23790,  23589,  23398,\n   23214,  23037,  22867,  22703,\n   22544,  22389,  22239,  22093,\n   21951,  21812,  21677,  21544,\n   21415,  21288,  21163,  21041,\n   20922,  20804,  20688,  20574,\n   20462,  20352,  20243,  20136,\n   20031,  19927,  19824,  19722,\n   19622,  19523,  19425,  19328,\n   19232,  19137,  19043,  18951,\n   18859,  18768,  18677,  18588,\n   18499,  18411,  18324,  18238,\n   18152,  18067,  17983,  17899,\n   17815,  17733,  17651,  17569,\n   17488,  17408,  17328,  17249,\n   17170,  17091,  17013,  16935,\n   16858,  16781,  16705,  16629,\n   16553,  16478,  16403,  16328,\n   16254,  16180,  16106,  16033,\n   15960,  15887,  15815,  15743,\n   15671,  15599,  15528,  15456,\n   15386,  15315,  15244,  15174,\n   15104,  15034,  14964,  14895,\n   14826,  14756,  14687,  14619,\n   14550,  14482,  14413,  14345,\n   14277,  14209,  14141,  14074,\n   14006,  13939,  13871,  13804,\n   13737,  13670,  13603,  13536,\n   13469,  13402,  13336,  13269,\n   13202,  13136,  13070,  13003,\n   12937,  12870,  12804,  12738,\n   12672,  12605,  12539,  12473,\n   12407,  12341,  12274,  12208,\n   12142,  12076,  12010,  11943,\n   11877,  11811,  11744,  11678,\n   11611,  11545,  11478,  11412,\n   11345,  11278,  11211,  11144,\n   11077,  11010,  10943,  10876,\n   10808,  10741,  10673,  10605,\n   10538,  10470,  10401,  10333,\n   10265,  10196,  10127,  10058,\n    9989,   9920,   9850,   9780,\n    9710,   9640,   9570,   9499,\n    9429,   9357,   9286,   9215,\n    9143,   9071,   8998,   8925,\n    8852,   8779,   8705,   8631,\n    8557,   8482,   8407,   8332,\n    8256,   8179,   8103,   8025,\n    7948,   7870,   7791,   7712,\n    7632,   7552,   7471,   7390,\n    7308,   7225,   7142,   7058,\n    6973,   6888,   6801,   6714,\n    6626,   6538,   6448,   6358,\n    6266,   6173,   6080,   5985,\n    5889,   5791,   5692,   5592,\n    5491,   5388,   5283,   5176,\n    5067,   4957,   4844,   4729,\n    4612,   4491,   4368,   4242,\n    4112,   3979,   3841,   3698,\n    3550,   3397,   3236,   3068,\n    2890,   2701,   2499,   2280,\n    2038,\n};\nconst uint16_t FLASHMEM lut_granular_envelope[] = {\n       0,      4,     19,     44,\n      78,    123,    177,    241,\n     314,    398,    490,    593,\n     705,    826,    957,   1097,\n    1247,   1405,   1572,   1749,\n    1934,   2128,   2330,   2541,\n    2761,   2988,   3224,   3467,\n    3718,   3977,   4244,   4517,\n    4798,   5086,   5381,   5682,\n    5989,   6303,   6623,   6949,\n    7281,   7618,   7960,   8308,\n    8660,   9017,   9378,   9744,\n   10113,  10487,  10864,  11244,\n   11627,  12013,  12402,  12793,\n   13187,  13582,  13979,  14377,\n   14777,  15178,  15579,  15981,\n   16383,  16785,  17187,  17588,\n   17989,  18389,  18787,  19184,\n   19579,  19973,  20364,  20753,\n   21139,  21522,  21902,  22279,\n   22653,  23022,  23388,  23749,\n   24106,  24458,  24806,  25148,\n   25485,  25817,  26143,  26463,\n   26777,  27084,  27385,  27680,\n   27968,  28249,  28522,  28789,\n   29048,  29299,  29542,  29778,\n   30005,  30225,  30436,  30638,\n   30832,  31017,  31194,  31361,\n   31519,  31669,  31809,  31940,\n   32061,  32173,  32276,  32368,\n   32452,  32525,  32589,  32643,\n   32688,  32722,  32747,  32762,\n   32767,  32762,  32747,  32722,\n   32688,  32643,  32589,  32525,\n   32452,  32368,  32276,  32173,\n   32061,  31940,  31809,  31669,\n   31519,  31361,  31194,  31017,\n   30832,  30638,  30436,  30225,\n   30005,  29778,  29542,  29299,\n   29048,  28789,  28522,  28249,\n   27968,  27680,  27385,  27084,\n   26777,  26463,  26143,  25817,\n   25485,  25148,  24806,  24458,\n   24106,  23749,  23388,  23022,\n   22653,  22279,  21902,  21522,\n   21139,  20753,  20364,  19973,\n   19579,  19184,  18787,  18389,\n   17989,  17588,  17187,  16785,\n   16383,  15981,  15579,  15178,\n   14777,  14377,  13979,  13582,\n   13187,  12793,  12402,  12013,\n   11627,  11244,  10864,  10487,\n   10113,   9744,   9378,   9017,\n    8660,   8308,   7960,   7618,\n    7281,   6949,   6623,   6303,\n    5989,   5682,   5381,   5086,\n    4798,   4517,   4244,   3977,\n    3718,   3467,   3224,   2988,\n    2761,   2541,   2330,   2128,\n    1934,   1749,   1572,   1405,\n    1247,   1097,    957,    826,\n     705,    593,    490,    398,\n     314,    241,    177,    123,\n      78,     44,     19,      4,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,\n};\nconst uint16_t FLASHMEM lut_granular_envelope_rate[] = {\n    2048,   2070,   2092,   2115,\n    2138,   2161,   2185,   2209,\n    2233,   2257,   2282,   2307,\n    2332,   2357,   2383,   2409,\n    2435,   2462,   2488,   2515,\n    2543,   2571,   2599,   2627,\n    2655,   2684,   2714,   2743,\n    2773,   2803,   2834,   2865,\n    2896,   2927,   2959,   2991,\n    3024,   3057,   3090,   3124,\n    3158,   3192,   3227,   3262,\n    3298,   3334,   3370,   3407,\n    3444,   3481,   3519,   3558,\n    3596,   3635,   3675,   3715,\n    3756,   3796,   3838,   3880,\n    3922,   3965,   4008,   4051,\n    4096,   4140,   4185,   4231,\n    4277,   4323,   4371,   4418,\n    4466,   4515,   4564,   4614,\n    4664,   4715,   4766,   4818,\n    4870,   4924,   4977,   5031,\n    5086,   5142,   5198,   5254,\n    5311,   5369,   5428,   5487,\n    5547,   5607,   5668,   5730,\n    5792,   5855,   5919,   5983,\n    6049,   6114,   6181,   6248,\n    6316,   6385,   6455,   6525,\n    6596,   6668,   6741,   6814,\n    6888,   6963,   7039,   7116,\n    7193,   7271,   7351,   7431,\n    7512,   7593,   7676,   7760,\n    7844,   7930,   8016,   8103,\n    8192,   8281,   8371,   8462,\n    8554,   8647,   8742,   8837,\n    8933,   9030,   9129,   9228,\n    9328,   9430,   9533,   9637,\n    9741,   9848,   9955,  10063,\n   10173,  10284,  10396,  10509,\n   10623,  10739,  10856,  10974,\n   11094,  11214,  11336,  11460,\n   11585,  11711,  11838,  11967,\n   12098,  12229,  12363,  12497,\n   12633,  12771,  12910,  13051,\n   13193,  13336,  13482,  13628,\n   13777,  13927,  14078,  14232,\n   14387,  14543,  14702,  14862,\n   15024,  15187,  15353,  15520,\n   15689,  15860,  16032,  16207,\n   16384,  16562,  16742,  16925,\n   17109,  17295,  17484,  17674,\n   17866,  18061,  18258,  18456,\n   18657,  18861,  19066,  19274,\n   19483,  19696,  19910,  20127,\n   20346,  20568,  20792,  21018,\n   21247,  21478,  21712,  21949,\n   22188,  22429,  22673,  22920,\n   23170,  23422,  23677,  23935,\n   24196,  24459,  24726,  24995,\n   25267,  25542,  25820,  26102,\n   26386,  26673,  26964,  27257,\n   27554,  27854,  28157,  28464,\n   28774,  29087,  29404,  29724,\n   30048,  30375,  30706,  31040,\n   31378,  31720,  32065,  32415,\n   32768,\n};\nconst uint16_t FLASHMEM lut_bowing_envelope[] = {\n       0,     10,     21,     32,\n      43,     54,     65,     76,\n      87,     98,    109,    120,\n     131,    142,    153,    164,\n     175,    185,    196,    207,\n     218,    229,    240,    251,\n     262,    273,    284,    295,\n     306,    317,    328,    339,\n     350,    361,    371,    382,\n     393,    404,    415,    426,\n     437,    448,    459,    470,\n     481,    492,    503,    514,\n     525,    536,    547,    557,\n     568,    579,    590,    601,\n     612,    623,    634,    645,\n     656,    667,    678,    689,\n     700,    711,    722,    733,\n     743,    754,    765,    776,\n     787,    798,    809,    820,\n     831,    842,    853,    864,\n     875,    886,    897,    908,\n     919,    929,    940,    951,\n     962,    973,    984,    995,\n    1006,   1017,   1028,   1039,\n    1050,   1061,   1072,   1083,\n    1094,   1105,   1115,   1126,\n    1137,   1148,   1159,   1170,\n    1181,   1192,   1203,   1214,\n    1225,   1236,   1247,   1258,\n    1269,   1280,   1291,   1301,\n    1312,   1323,   1334,   1345,\n    1356,   1367,   1378,   1389,\n    1400,   1411,   1422,   1433,\n    1444,   1455,   1466,   1477,\n    1487,   1498,   1509,   1520,\n    1531,   1542,   1553,   1564,\n    1575,   1586,   1597,   1608,\n    1619,   1630,   1641,   1652,\n    1663,   1673,   1684,   1695,\n    1706,   1717,   1728,   1739,\n    1750,   1761,   1772,   1783,\n    1794,   1805,   1816,   1827,\n    1838,   1849,   1859,   1870,\n    1881,   1892,   1903,   1914,\n    1925,   1936,   1947,   1958,\n    1969,   1980,   1991,   2002,\n    2013,   2024,   2035,   2045,\n    2056,   2067,   2078,   2089,\n    2100,   2111,   2122,   2133,\n    2144,   2155,   2166,   2177,\n    2188,   2199,   2210,   2221,\n    2231,   2242,   2253,   2264,\n    2275,   2286,   2297,   2308,\n    2319,   2330,   2341,   2352,\n    2363,   2374,   2385,   2396,\n    2406,   2417,   2428,   2439,\n    2450,   2461,   2472,   2483,\n    2494,   2505,   2516,   2527,\n    2538,   2549,   2560,   2571,\n    2582,   2592,   2603,   2614,\n    2625,   2636,   2647,   2658,\n    2669,   2680,   2691,   2702,\n    2713,   2724,   2735,   2746,\n    2757,   2768,   2778,   2789,\n    2800,   2811,   2822,   2833,\n    2844,   2855,   2866,   2877,\n    2888,   2899,   2910,   2921,\n    2932,   2943,   2954,   2964,\n    2975,   2986,   2997,   3008,\n    3019,   3030,   3041,   3052,\n    3063,   3074,   3085,   3096,\n    3107,   3118,   3129,   3140,\n    3150,   3161,   3172,   3183,\n    3194,   3205,   3216,   3227,\n    3238,   3249,   3260,   3271,\n    3282,   3293,   3304,   3315,\n    3326,   3336,   3347,   3358,\n    3369,   3380,   3391,   3402,\n    3413,   3424,   3435,   3446,\n    3457,   3468,   3479,   3490,\n    3501,   3512,   3522,   3533,\n    3544,   3555,   3566,   3577,\n    3588,   3599,   3610,   3621,\n    3632,   3643,   3654,   3665,\n    3676,   3687,   3698,   3708,\n    3719,   3730,   3741,   3752,\n    3763,   3774,   3785,   3796,\n    3807,   3818,   3829,   3840,\n    3851,   3862,   3873,   3884,\n    3894,   3905,   3916,   3927,\n    3938,   3949,   3960,   3971,\n    3982,   3993,   4004,   4015,\n    4026,   4037,   4048,   4059,\n    4070,   4080,   4091,   4102,\n    4113,   4124,   4135,   4146,\n    4157,   4168,   4179,   4190,\n    4201,   4212,   4223,   4234,\n    4245,   4256,   4266,   4277,\n    4288,   4299,   4310,   4321,\n    4332,   4343,   4354,   4365,\n    4376,   4387,   4398,   4409,\n    4420,   4431,   4442,   4452,\n    4463,   4474,   4485,   4496,\n    4507,   4518,   4529,   4540,\n    4551,   4562,   4573,   4584,\n    4595,   4606,   4617,   4628,\n    4638,   4649,   4660,   4671,\n    4682,   4693,   4704,   4715,\n    4726,   4737,   4748,   4759,\n    4770,   4781,   4792,   4803,\n    4813,   4824,   4835,   4846,\n    4857,   4868,   4879,   4890,\n    4901,   4912,   4923,   4934,\n    4945,   4956,   4967,   4978,\n    4989,   4999,   5010,   5021,\n    5032,   5043,   5054,   5065,\n    5076,   5087,   5098,   5109,\n    5120,   5131,   5142,   5153,\n    5164,   5175,   5185,   5196,\n    5207,   5218,   5229,   5240,\n    5251,   5262,   5273,   5284,\n    5295,   5306,   5317,   5328,\n    5339,   5350,   5361,   5371,\n    5382,   5393,   5404,   5415,\n    5426,   5437,   5448,   5459,\n    5470,   5481,   5492,   5503,\n    5514,   5525,   5536,   5547,\n    5557,   5568,   5579,   5590,\n    5601,   5612,   5623,   5634,\n    5645,   5656,   5667,   5678,\n    5689,   5700,   5711,   5722,\n    5733,   5743,   5754,   5765,\n    5776,   5787,   5798,   5809,\n    5820,   5831,   5842,   5853,\n    5864,   5875,   5886,   5897,\n    5908,   5919,   5929,   5940,\n    5951,   5962,   5973,   5984,\n    5995,   6006,   6017,   6028,\n    6039,   6050,   6061,   6072,\n    6083,   6094,   6105,   6115,\n    6126,   6137,   6148,   6159,\n    6170,   6181,   6192,   6203,\n    6214,   6225,   6236,   6247,\n    6258,   6269,   6280,   6291,\n    6301,   6312,   6323,   6334,\n    6345,   6356,   6367,   6378,\n    6389,   6400,   6411,   6422,\n    6433,   6444,   6455,   6466,\n    6477,   6487,   6498,   6509,\n    6520,   6531,   6542,   6553,\n    6553,   6542,   6531,   6520,\n    6509,   6498,   6487,   6476,\n    6465,   6454,   6443,   6432,\n    6421,   6410,   6399,   6388,\n    6377,   6366,   6355,   6344,\n    6333,   6322,   6311,   6300,\n    6289,   6278,   6267,   6256,\n    6245,   6234,   6223,   6212,\n    6201,   6190,   6179,   6168,\n    6157,   6146,   6135,   6124,\n    6113,   6102,   6090,   6079,\n    6068,   6057,   6046,   6035,\n    6024,   6013,   6002,   5991,\n    5980,   5969,   5958,   5947,\n    5936,   5925,   5914,   5903,\n    5892,   5881,   5870,   5859,\n    5848,   5837,   5826,   5815,\n    5804,   5793,   5782,   5771,\n    5760,   5749,   5738,   5727,\n    5716,   5705,   5694,   5683,\n    5672,   5661,   5650,   5639,\n    5628,   5617,   5606,   5595,\n    5584,   5573,   5562,   5551,\n    5540,   5529,   5518,   5507,\n    5496,   5485,   5474,   5463,\n    5452,   5441,   5430,   5419,\n    5408,   5397,   5386,   5375,\n    5364,   5353,   5342,   5330,\n    5319,   5308,   5297,   5286,\n    5275,   5264,   5253,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n    5242,   5242,   5242,   5242,\n};\nconst uint16_t FLASHMEM lut_bowing_friction[] = {\n   32768,  32768,  32768,  32768,\n   32768,  32768,  32768,  32768,\n   32768,  32768,  32768,  32768,\n   32768,  32768,  32768,  32768,\n   32768,  30797,  28973,  27281,\n   25711,  24253,  22896,  21633,\n   20456,  19358,  18333,  17374,\n   16478,  15638,  14852,  14114,\n   13421,  12771,  12159,  11583,\n   11042,  10531,  10050,   9596,\n    9167,   8762,   8379,   8016,\n    7673,   7349,   7041,   6749,\n    6472,   6209,   5960,   5723,\n    5497,   5283,   5078,   4884,\n    4699,   4522,   4354,   4194,\n    4040,   3894,   3754,   3621,\n    3493,   3371,   3254,   3143,\n    3036,   2933,   2835,   2741,\n    2651,   2564,   2481,   2401,\n    2325,   2251,   2181,   2113,\n    2048,   1985,   1924,   1866,\n    1810,   1756,   1705,   1655,\n    1606,   1560,   1515,   1472,\n    1431,   1390,   1352,   1314,\n    1278,   1243,   1209,   1177,\n    1145,   1115,   1085,   1057,\n    1029,   1003,    977,    952,\n     928,    904,    882,    860,\n     838,    818,    798,    778,\n     759,    741,    723,    706,\n     690,    673,    658,    642,\n     628,    613,    599,    586,\n     572,    560,    547,    535,\n     523,    512,    501,    490,\n     479,    469,    459,    449,\n     440,    430,    421,    413,\n     404,    396,    388,    380,\n     372,    365,    357,    350,\n     343,    336,    330,    323,\n     317,    311,    305,    299,\n     293,    288,    282,    277,\n     272,    267,    262,    257,\n     252,    247,    243,    238,\n     234,    230,    226,    222,\n     218,    214,    210,    207,\n     203,    199,    196,    193,\n     189,    186,    183,    180,\n     177,    174,    171,    168,\n     165,    162,    160,    157,\n     155,    152,    150,    147,\n     145,    143,    140,    138,\n     136,    134,    132,    130,\n     128,    126,    124,    122,\n     120,    118,    116,    114,\n     113,    111,    109,    108,\n     106,    104,    103,    101,\n     100,     98,     97,     96,\n      94,     93,     92,     90,\n      89,     88,     86,     85,\n      84,     83,     82,     81,\n      79,     78,     77,     76,\n      75,     74,     73,     72,\n      71,     70,     69,     68,\n      67,     66,     66,     65,\n      64,\n};\nconst uint16_t FLASHMEM lut_blowing_envelope[] = {\n       0,    178,    357,    536,\n     715,    894,   1073,   1252,\n    1431,   1610,   1789,   1968,\n    2147,   2326,   2505,   2684,\n    2863,   3042,   3221,   3400,\n    3579,   3758,   3937,   4116,\n    4295,   4474,   4653,   4832,\n    5011,   5190,   5369,   5548,\n    5727,   5906,   6085,   6264,\n    6443,   6622,   6801,   6980,\n    7159,   7338,   7517,   7696,\n    7875,   8054,   8233,   8412,\n    8591,   8770,   8949,   9128,\n    9307,   9486,   9665,   9844,\n   10023,  10202,  10381,  10560,\n   10739,  10918,  11097,  11276,\n   11455,  11634,  11813,  11991,\n   12170,  12349,  12528,  12707,\n   12886,  13065,  13244,  13423,\n   13602,  13781,  13960,  14139,\n   14318,  14497,  14676,  14855,\n   15034,  15213,  15392,  15571,\n   15750,  15929,  16108,  16287,\n   16466,  16645,  16824,  17003,\n   17182,  17361,  17540,  17719,\n   17898,  18077,  18256,  18435,\n   18614,  18793,  18972,  19151,\n   19330,  19509,  19688,  19867,\n   20046,  20225,  20404,  20583,\n   20762,  20941,  21120,  21299,\n   21299,  21281,  21263,  21245,\n   21227,  21210,  21192,  21174,\n   21156,  21138,  21120,  21103,\n   21085,  21067,  21049,  21031,\n   21014,  20996,  20978,  20960,\n   20942,  20924,  20907,  20889,\n   20871,  20853,  20835,  20817,\n   20800,  20782,  20764,  20746,\n   20728,  20711,  20693,  20675,\n   20657,  20639,  20621,  20604,\n   20586,  20568,  20550,  20532,\n   20514,  20497,  20479,  20461,\n   20443,  20425,  20408,  20390,\n   20372,  20354,  20336,  20318,\n   20301,  20283,  20265,  20247,\n   20229,  20211,  20194,  20176,\n   20158,  20140,  20122,  20105,\n   20087,  20069,  20051,  20033,\n   20015,  19998,  19980,  19962,\n   19944,  19926,  19908,  19891,\n   19873,  19855,  19837,  19819,\n   19802,  19784,  19766,  19748,\n   19730,  19712,  19695,  19677,\n   19659,  19641,  19623,  19605,\n   19588,  19570,  19552,  19534,\n   19516,  19499,  19481,  19463,\n   19445,  19427,  19409,  19392,\n   19374,  19356,  19338,  19320,\n   19302,  19285,  19267,  19249,\n   19231,  19213,  19196,  19178,\n   19160,  19142,  19124,  19106,\n   19089,  19071,  19053,  19035,\n   19017,  18999,  18982,  18964,\n   18946,  18928,  18910,  18893,\n   18875,  18857,  18839,  18821,\n   18803,  18786,  18768,  18750,\n   18732,  18714,  18696,  18679,\n   18661,  18643,  18625,  18607,\n   18590,  18572,  18554,  18536,\n   18518,  18500,  18483,  18465,\n   18447,  18429,  18411,  18393,\n   18376,  18358,  18340,  18322,\n   18304,  18287,  18269,  18251,\n   18233,  18215,  18197,  18180,\n   18162,  18144,  18126,  18108,\n   18090,  18073,  18055,  18037,\n   18019,  18001,  17984,  17966,\n   17948,  17930,  17912,  17894,\n   17877,  17859,  17841,  17823,\n   17805,  17787,  17770,  17752,\n   17734,  17716,  17698,  17681,\n   17663,  17645,  17627,  17609,\n   17591,  17574,  17556,  17538,\n   17520,  17502,  17484,  17467,\n   17449,  17431,  17413,  17395,\n   17378,  17360,  17342,  17324,\n   17306,  17288,  17271,  17253,\n   17235,  17217,  17199,  17181,\n   17164,  17146,  17128,  17110,\n   17092,  17075,  17057,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n   17039,  17039,  17039,  17039,\n};\nconst uint16_t FLASHMEM lut_flute_body_filter[] = {\n      30,     32,     34,     36,\n      38,     40,     43,     45,\n      48,     51,     54,     57,\n      60,     64,     68,     72,\n      76,     81,     86,     91,\n      96,    102,    108,    114,\n     121,    129,    136,    144,\n     153,    162,    172,    182,\n     193,    204,    216,    229,\n     243,    258,    273,    289,\n     306,    325,    344,    364,\n     386,    409,    433,    459,\n     487,    516,    546,    579,\n     613,    650,    688,    729,\n     773,    819,    867,    919,\n     974,   1032,   1093,   1158,\n    1227,   1300,   1377,   1459,\n    1546,   1638,   1735,   1839,\n    1948,   2064,   2187,   2317,\n    2454,   2600,   2755,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n    2867,   2867,   2867,   2867,\n};\nconst uint16_t FLASHMEM lut_fm_frequency_quantizer[] = {\n    7168,   7168,   7168,   7360,\n    7552,   7744,   7936,   8128,\n    8320,   8512,   8704,   8896,\n    9088,   9280,   9472,   9664,\n    9856,  10048,  10240,  10240,\n   10240,  10432,  10624,  10816,\n   11008,  11200,  11392,  11584,\n   11776,  11968,  12160,  12352,\n   12544,  12736,  12928,  13312,\n   13312,  13312,  13352,  13352,\n   13352,  13726,  14100,  14474,\n   14848,  14848,  14848,  15080,\n   15313,  15313,  15313,  15581,\n   15848,  16116,  16384,  16384,\n   16384,  16424,  16424,  16424,\n   16798,  17172,  17546,  17920,\n   17920,  17920,  18152,  18385,\n   18385,  18385,  18624,  18864,\n   18864,  18864,  19160,  19456,\n   19456,  19456,  19496,  19496,\n   19496,  19737,  19978,  19978,\n   19978,  20200,  20422,  20645,\n   20867,  20867,  20867,  20992,\n   20992,  20992,  21253,  21253,\n   21253,  21457,  21457,  21457,\n   21673,  21890,  21890,  21890,\n   22209,  22528,  22528,  22528,\n   22789,  22789,  22789,  23021,\n   23254,  23254,  23254,  23516,\n   23516,  23516,  23790,  24064,\n   24064,  24064,  24448,  24832,\n   25216,  25600,  25600,  25600,\n   25600,\n};\nconst uint16_t FLASHMEM lut_vco_detune[] = {\n      10,     10,     10,     47,\n     116,    184,    252,    321,\n     389,    456,    524,    592,\n     659,    727,    794,    862,\n     929,    996,   1063,   1130,\n    1196,   1263,   1330,   1396,\n    1463,   1529,   1595,   1662,\n    1728,   1794,   1860,   1926,\n    1992,   2058,   2124,   2189,\n    2255,   2321,   2386,   2452,\n    2517,   2583,   2648,   2714,\n    2779,   2844,   2910,   2975,\n    3040,   3105,   3170,   3235,\n    3301,   3366,   3431,   3496,\n    3560,   3625,   3690,   3755,\n    3820,   3885,   3950,   4014,\n    4079,   4144,   4208,   4273,\n    4338,   4402,   4467,   4532,\n    4596,   4661,   4725,   4790,\n    4854,   4919,   4983,   5048,\n    5112,   5176,   5241,   5305,\n    5370,   5434,   5498,   5563,\n    5627,   5691,   5755,   5820,\n    5884,   5948,   6013,   6077,\n    6141,   6205,   6269,   6334,\n    6398,   6462,   6526,   6590,\n    6654,   6719,   6783,   6847,\n    6911,   6975,   7039,   7103,\n    7167,   7231,   7295,   7359,\n    7423,   7487,   7551,   7615,\n    7680,   7743,   7807,   7871,\n    7935,   7999,   8063,   8127,\n    8191,   8255,   8319,   8383,\n    8447,   8511,   8575,   8638,\n    8702,   8766,   8830,   8894,\n    8958,   9021,   9085,   9149,\n    9213,   9277,   9340,   9404,\n    9468,   9532,   9595,   9659,\n    9723,   9786,   9850,   9914,\n    9977,  10041,  10105,  10168,\n   10232,  10295,  10359,  10422,\n   10486,  10549,  10613,  10676,\n   10740,  10803,  10867,  10930,\n   10993,  11057,  11120,  11183,\n   11247,  11310,  11373,  11436,\n   11500,  11563,  11626,  11689,\n   11752,  11815,  11878,  11941,\n   12004,  12067,  12130,  12193,\n   12256,  12319,  12381,  12444,\n   12507,  12570,  12632,  12695,\n   12757,  12820,  12882,  12945,\n   13007,  13069,  13132,  13194,\n   13256,  13318,  13380,  13442,\n   13504,  13566,  13628,  13690,\n   13752,  13813,  13875,  13936,\n   13998,  14059,  14120,  14182,\n   14243,  14304,  14365,  14426,\n   14487,  14547,  14608,  14668,\n   14729,  14789,  14849,  14910,\n   14970,  15030,  15089,  15149,\n   15209,  15268,  15327,  15387,\n   15446,  15505,  15564,  15622,\n   15681,  15739,  15797,  15855,\n   15913,  15971,  16029,  16086,\n   16143,\n};\nconst uint16_t FLASHMEM lut_bell[] = {\n       0,    670,   2655,   5873,\n   10191,  15434,  21387,  27805,\n   34427,  40980,  47198,  52824,\n   57630,  61417,  64032,  65366,\n   65534,  65528,  65517,  65500,\n   65477,  65449,  65415,  65376,\n   65331,  65280,  65224,  65162,\n   65095,  65022,  64944,  64860,\n   64770,  64675,  64574,  64468,\n   64357,  64240,  64118,  63990,\n   63857,  63718,  63575,  63426,\n   63271,  63112,  62947,  62777,\n   62602,  62421,  62236,  62046,\n   61850,  61650,  61444,  61234,\n   61018,  60798,  60573,  60343,\n   60109,  59870,  59626,  59377,\n   59124,  58866,  58604,  58338,\n   58067,  57791,  57512,  57228,\n   56940,  56648,  56351,  56051,\n   55746,  55438,  55126,  54810,\n   54490,  54166,  53839,  53508,\n   53173,  52835,  52494,  52149,\n   51801,  51449,  51094,  50736,\n   50375,  50011,  49645,  49275,\n   48902,  48526,  48148,  47767,\n   47384,  46998,  46610,  46219,\n   45826,  45431,  45033,  44633,\n   44232,  43828,  43423,  43015,\n   42606,  42195,  41783,  41369,\n   40953,  40537,  40118,  39699,\n   39278,  38856,  38433,  38010,\n   37585,  37159,  36733,  36306,\n   35879,  35450,  35022,  34593,\n   34163,  33734,  33304,  32874,\n   32445,  32015,  31585,  31156,\n   30727,  30298,  29869,  29442,\n   29014,  28588,  28162,  27737,\n   27312,  26889,  26467,  26045,\n   25625,  25206,  24789,  24373,\n   23958,  23545,  23133,  22723,\n   22315,  21908,  21504,  21101,\n   20700,  20302,  19905,  19511,\n   19119,  18730,  18343,  17958,\n   17576,  17196,  16819,  16445,\n   16074,  15706,  15340,  14978,\n   14618,  14262,  13909,  13559,\n   13212,  12869,  12529,  12193,\n   11860,  11531,  11206,  10884,\n   10566,  10252,   9941,   9635,\n    9332,   9034,   8740,   8450,\n    8164,   7882,   7604,   7331,\n    7062,   6798,   6538,   6283,\n    6032,   5786,   5544,   5307,\n    5075,   4848,   4625,   4407,\n    4195,   3987,   3784,   3586,\n    3393,   3205,   3022,   2844,\n    2671,   2504,   2342,   2185,\n    2033,   1887,   1746,   1610,\n    1479,   1354,   1235,   1121,\n    1012,    909,    811,    719,\n     632,    550,    475,    405,\n     340,    281,    228,    180,\n     138,    101,     70,     45,\n      25,     11,      2,      0,\n       0,\n};\nconst uint16_t FLASHMEM lut_env_expo[] = {\n       0,   1034,   2053,   3057,\n    4044,   5016,   5974,   6916,\n    7844,   8757,   9656,  10542,\n   11413,  12271,  13116,  13948,\n   14766,  15572,  16366,  17147,\n   17916,  18673,  19419,  20153,\n   20875,  21587,  22287,  22976,\n   23655,  24323,  24981,  25629,\n   26267,  26894,  27512,  28121,\n   28720,  29310,  29890,  30462,\n   31024,  31578,  32124,  32661,\n   33189,  33710,  34222,  34727,\n   35223,  35712,  36193,  36667,\n   37134,  37593,  38045,  38490,\n   38928,  39360,  39785,  40203,\n   40615,  41020,  41419,  41812,\n   42198,  42579,  42954,  43323,\n   43686,  44044,  44396,  44743,\n   45084,  45420,  45751,  46077,\n   46397,  46713,  47024,  47330,\n   47631,  47927,  48219,  48507,\n   48790,  49068,  49342,  49612,\n   49878,  50140,  50398,  50651,\n   50901,  51147,  51389,  51627,\n   51862,  52092,  52320,  52544,\n   52764,  52981,  53195,  53405,\n   53612,  53816,  54016,  54214,\n   54408,  54600,  54788,  54974,\n   55156,  55336,  55513,  55688,\n   55859,  56028,  56195,  56358,\n   56520,  56678,  56835,  56988,\n   57140,  57289,  57436,  57580,\n   57723,  57863,  58001,  58136,\n   58270,  58402,  58531,  58659,\n   58784,  58908,  59029,  59149,\n   59267,  59383,  59498,  59610,\n   59721,  59830,  59937,  60043,\n   60147,  60250,  60351,  60450,\n   60548,  60644,  60739,  60832,\n   60924,  61014,  61103,  61191,\n   61277,  61362,  61446,  61528,\n   61609,  61689,  61768,  61845,\n   61921,  61996,  62070,  62143,\n   62214,  62285,  62354,  62422,\n   62490,  62556,  62621,  62685,\n   62748,  62810,  62871,  62932,\n   62991,  63049,  63107,  63163,\n   63219,  63274,  63328,  63381,\n   63434,  63485,  63536,  63586,\n   63635,  63683,  63731,  63778,\n   63824,  63870,  63914,  63958,\n   64002,  64045,  64087,  64128,\n   64169,  64209,  64248,  64287,\n   64326,  64363,  64400,  64437,\n   64473,  64508,  64543,  64577,\n   64611,  64645,  64677,  64710,\n   64741,  64773,  64803,  64834,\n   64863,  64893,  64922,  64950,\n   64978,  65006,  65033,  65060,\n   65086,  65112,  65137,  65162,\n   65187,  65212,  65236,  65259,\n   65282,  65305,  65328,  65350,\n   65372,  65393,  65414,  65435,\n   65456,  65476,  65496,  65515,\n   65535,\n};\n\n\nconst uint16_t* lookup_table_table[] = {\n  lut_resonator_coefficient,\n  lut_resonator_scale,\n  lut_svf_cutoff,\n  lut_svf_damp,\n  lut_svf_scale,\n  lut_granular_envelope,\n  lut_granular_envelope_rate,\n  lut_bowing_envelope,\n  lut_bowing_friction,\n  lut_blowing_envelope,\n  lut_flute_body_filter,\n  lut_fm_frequency_quantizer,\n  lut_vco_detune,\n  lut_bell,\n  lut_env_expo,\n};\n\nconst int16_t FLASHMEM lut_blowing_jet[] = {\n       0,   -255,   -511,   -767,\n   -1022,  -1278,  -1532,  -1786,\n   -2039,  -2292,  -2544,  -2795,\n   -3044,  -3293,  -3541,  -3787,\n   -4031,  -4275,  -4516,  -4756,\n   -4994,  -5231,  -5465,  -5697,\n   -5927,  -6155,  -6381,  -6604,\n   -6824,  -7042,  -7257,  -7470,\n   -7679,  -7886,  -8089,  -8289,\n   -8486,  -8680,  -8870,  -9056,\n   -9239,  -9418,  -9594,  -9765,\n   -9932, -10095, -10254, -10409,\n  -10559, -10705, -10846, -10982,\n  -11114, -11241, -11363, -11480,\n  -11591, -11698, -11799, -11894,\n  -11984, -12069, -12147, -12220,\n  -12287, -12348, -12403, -12452,\n  -12494, -12530, -12560, -12583,\n  -12599, -12609, -12611, -12607,\n  -12596, -12578, -12552, -12519,\n  -12479, -12431, -12376, -12313,\n  -12242, -12163, -12077, -11982,\n  -11879, -11768, -11649, -11521,\n  -11384, -11239, -11085, -10923,\n  -10751, -10571, -10381, -10182,\n   -9974,  -9757,  -9530,  -9293,\n   -9047,  -8791,  -8526,  -8250,\n   -7964,  -7668,  -7362,  -7046,\n   -6719,  -6382,  -6034,  -5676,\n   -5306,  -4926,  -4535,  -4133,\n   -3719,  -3295,  -2859,  -2411,\n   -1952,  -1482,  -1000,   -506,\n       0,    517,   1048,   1590,\n    2144,   2711,   3291,   3883,\n    4487,   5105,   5735,   6378,\n    7034,   7704,   8386,   9082,\n    9791,  10514,  11250,  12000,\n   12764,  13542,  14333,  15139,\n   15959,  16793,  17642,  18504,\n   19382,  20274,  21181,  22102,\n   23039,  23990,  24957,  25939,\n   26936,  27948,  28976,  30019,\n   31079,  32153,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,\n};\n\n\nconst int16_t* lookup_table_signed_table[] = {\n  lut_blowing_jet,\n};\n\nconst uint32_t FLASHMEM lut_oscillator_increments[] = {\n  594573364, 598881888, 603221633, 607592826,\n  611995694, 616430467, 620897376, 625396654,\n  629928536, 634493258, 639091058, 643722175,\n  648386851, 653085330, 657817855, 662584675,\n  667386036, 672222191, 677093390, 681999888,\n  686941940, 691919804, 696933740, 701984010,\n  707070875, 712194602, 717355458, 722553711,\n  727789633, 733063497, 738375577, 743726151,\n  749115497, 754543897, 760011633, 765518991,\n  771066257, 776653721, 782281674, 787950409,\n  793660223, 799411412, 805204277, 811039119,\n  816916243, 822835954, 828798563, 834804379,\n  840853716, 846946888, 853084215, 859266014,\n  865492610, 871764326, 878081490, 884444431,\n  890853479, 897308971, 903811242, 910360631,\n  916957479, 923602131, 930294933, 937036233,\n  943826384, 950665739, 957554655, 964493491,\n  971482608, 978522372, 985613148, 992755307,\n  999949221, 1007195266, 1014493818, 1021845258,\n  1029249970, 1036708340, 1044220756, 1051787610,\n  1059409296, 1067086213, 1074818759, 1082607339,\n  1090452358, 1098354226, 1106313353, 1114330156,\n  1122405051, 1130538461, 1138730809, 1146982522,\n  1155294030, 1163665767, 1172098168, 1180591675,\n  1189146729,\n};\nconst uint32_t FLASHMEM lut_oscillator_delays[] = {\n  1939073583, 1925123345, 1911273470, 1897523234,\n  1883871922, 1870318821, 1856863224, 1843504431,\n  1830241745, 1817074474, 1804001933, 1791023438,\n  1778138315, 1765345891, 1752645499, 1740036478,\n  1727518169, 1715089920, 1702751084, 1690501017,\n  1678339080, 1666264640, 1654277066, 1642375735,\n  1630560024, 1618829320, 1607183009, 1595620485,\n  1584141146, 1572744391, 1561429629, 1550196268,\n  1539043722, 1527971412, 1516978758, 1506065189,\n  1495230135, 1484473032, 1473793318, 1463190437,\n  1452663836, 1442212966, 1431837283, 1421536245,\n  1411309316, 1401155962, 1391075655, 1381067868,\n  1371132079, 1361267772, 1351474431, 1341751546,\n  1332098611, 1322515121, 1313000577, 1303554484,\n  1294176349, 1284865683, 1275622000, 1266444818,\n  1257333660, 1248288051, 1239307518, 1230391593,\n  1221539812, 1212751713, 1204026838, 1195364733,\n  1186764945, 1178227026, 1169750531, 1161335019,\n  1152980050, 1144685189, 1136450004, 1128274065,\n  1120156946, 1112098224, 1104097479, 1096154293,\n  1088268252, 1080438946, 1072665967, 1064948908,\n  1057287368, 1049680947, 1042129249, 1034631880,\n  1027188449, 1019798568, 1012461852, 1005177918,\n  997946388, 990766882, 983639028, 976562454,\n  969536791,\n};\nconst uint32_t FLASHMEM lut_env_portamento_increments[] = {\n  1431655765, 1208633567, 1025339217, 873854034,\n  747996982, 642910145, 554750639, 480459775,\n  417588783, 364166300, 318596895, 279582889,\n  246063710, 217168604, 192179528, 170501890,\n  151641346, 135185326, 120788231, 108159539,\n  97054201, 87264844, 78615425, 70956050,\n  64158714, 58113796, 52727166, 47917783,\n  43615697, 39760385, 36299356, 33186980,\n  30383504, 27854220, 25568762, 23500507,\n  21626072, 19924877, 18378778, 16971748,\n  15689604, 14519780, 13451115, 12473688,\n  11578663, 10758156, 10005128, 9313280,\n  8676970, 8091136, 7551232, 7053169,\n  6593263, 6168194, 5774964, 5410864,\n  5073442, 4760475, 4469950, 4200037,\n  3949073, 3715547, 3498079, 3295415,\n  3106409, 2930012, 2765269, 2611303,\n  2467313, 2332562, 2206377, 2088136,\n  1977272, 1873260, 1775618, 1683902,\n  1597702, 1516641, 1440370, 1368566,\n  1300932, 1237191, 1177088, 1120388,\n  1066869, 1016330, 968580, 923445,\n  880761, 840376, 802150, 765951,\n  731657, 699152, 668331, 639094,\n  611349, 585008, 559991, 536221,\n  513628, 492146, 471711, 452267,\n  433757, 416131, 399341, 383341,\n  368089, 353545, 339672, 326434,\n  313798, 301733, 290209, 279199,\n  268677, 258617, 248997, 239795,\n  230990, 222562, 214494, 206767,\n  199365, 192272, 185474, 178956,\n};\n\n\nconst uint32_t* lookup_table_hr_table[] = {\n  lut_oscillator_increments,\n  lut_oscillator_delays,\n  lut_env_portamento_increments,\n};\n\nconst int16_t FLASHMEM wav_formant_sine[] = {\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      2,      2,      3,\n       3,      4,      5,      6,\n       7,      8,     10,     12,\n      14,     17,     20,     24,\n       0,      3,      4,      5,\n       6,      7,      9,     10,\n      12,     15,     18,     21,\n      26,     31,     37,     45,\n       0,      4,      5,      6,\n       8,      9,     11,     13,\n      16,     19,     23,     28,\n      34,     40,     49,     58,\n       0,      5,      6,      7,\n       8,     10,     12,     15,\n      17,     21,     25,     30,\n      36,     44,     53,     63,\n       0,      4,      5,      6,\n       8,      9,     11,     13,\n      16,     19,     23,     28,\n      34,     40,     49,     58,\n       0,      3,      4,      5,\n       6,      7,      9,     10,\n      12,     15,     18,     21,\n      26,     31,     37,     45,\n       0,      2,      2,      3,\n       3,      4,      5,      6,\n       7,      8,     10,     12,\n      14,     17,     20,     24,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,     -2,     -2,     -3,\n      -3,     -4,     -5,     -6,\n      -7,     -8,    -10,    -12,\n     -14,    -17,    -20,    -24,\n       0,     -3,     -4,     -5,\n      -6,     -7,     -9,    -10,\n     -12,    -15,    -18,    -21,\n     -26,    -31,    -37,    -45,\n       0,     -4,     -5,     -6,\n      -8,     -9,    -11,    -13,\n     -16,    -19,    -23,    -28,\n     -34,    -40,    -49,    -58,\n       0,     -5,     -6,     -7,\n      -8,    -10,    -12,    -15,\n     -17,    -21,    -25,    -30,\n     -36,    -44,    -53,    -63,\n       0,     -4,     -5,     -6,\n      -8,     -9,    -11,    -13,\n     -16,    -19,    -23,    -28,\n     -34,    -40,    -49,    -58,\n       0,     -3,     -4,     -5,\n      -6,     -7,     -9,    -10,\n     -12,    -15,    -18,    -21,\n     -26,    -31,    -37,    -45,\n       0,     -2,     -2,     -3,\n      -3,     -4,     -5,     -6,\n      -7,     -8,    -10,    -12,\n     -14,    -17,    -20,    -24,\n};\nconst int16_t FLASHMEM wav_formant_square[] = {\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,      1,      1,      2,\n       2,      3,      3,      4,\n       4,      5,      6,      8,\n       9,     11,     13,     16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n       0,     -1,     -1,     -2,\n      -2,     -3,     -3,     -4,\n      -4,     -5,     -6,     -8,\n      -9,    -11,    -13,    -16,\n};\nconst int16_t FLASHMEM wav_sine[] = {\n  -32512, -32502, -32473, -32423,\n  -32356, -32265, -32160, -32031,\n  -31885, -31719, -31533, -31331,\n  -31106, -30864, -30605, -30324,\n  -30028, -29712, -29379, -29026,\n  -28658, -28272, -27868, -27449,\n  -27011, -26558, -26089, -25604,\n  -25103, -24588, -24056, -23512,\n  -22953, -22378, -21793, -21191,\n  -20579, -19954, -19316, -18667,\n  -18006, -17334, -16654, -15960,\n  -15259, -14548, -13828, -13100,\n  -12363, -11620, -10868, -10112,\n   -9347,  -8578,  -7805,  -7023,\n   -6241,  -5453,  -4662,  -3868,\n   -3073,  -2274,  -1474,   -674,\n     126,    929,   1729,   2527,\n    3326,   4123,   4916,   5707,\n    6495,   7278,   8057,   8833,\n    9601,  10366,  11122,  11874,\n   12618,  13353,  14082,  14802,\n   15512,  16216,  16906,  17589,\n   18260,  18922,  19569,  20207,\n   20834,  21446,  22045,  22634,\n   23206,  23765,  24311,  24842,\n   25357,  25858,  26343,  26812,\n   27266,  27701,  28123,  28526,\n   28912,  29281,  29632,  29966,\n   30281,  30579,  30859,  31118,\n   31361,  31583,  31788,  31973,\n   32139,  32286,  32412,  32521,\n   32608,  32679,  32725,  32757,\n   32766,  32757,  32725,  32679,\n   32608,  32521,  32412,  32286,\n   32139,  31973,  31788,  31583,\n   31361,  31118,  30859,  30579,\n   30281,  29966,  29632,  29281,\n   28912,  28526,  28123,  27701,\n   27266,  26812,  26343,  25858,\n   25357,  24842,  24311,  23765,\n   23206,  22634,  22045,  21446,\n   20834,  20207,  19569,  18922,\n   18260,  17589,  16906,  16216,\n   15512,  14802,  14082,  13353,\n   12618,  11874,  11122,  10366,\n    9601,   8833,   8057,   7278,\n    6495,   5707,   4916,   4123,\n    3326,   2527,   1729,    929,\n     126,   -674,  -1474,  -2274,\n   -3073,  -3868,  -4662,  -5453,\n   -6241,  -7023,  -7805,  -8578,\n   -9347, -10112, -10868, -11620,\n  -12363, -13100, -13828, -14548,\n  -15259, -15960, -16654, -17334,\n  -18006, -18667, -19316, -19954,\n  -20579, -21191, -21793, -22378,\n  -22953, -23512, -24056, -24588,\n  -25103, -25604, -26089, -26558,\n  -27011, -27449, -27868, -28272,\n  -28658, -29026, -29379, -29712,\n  -30028, -30324, -30605, -30864,\n  -31106, -31331, -31533, -31719,\n  -31885, -32031, -32160, -32265,\n  -32356, -32423, -32473, -32502,\n  -32512,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_0[] = {\n    -142,   -146,   -143,   -139,\n    -129,   -125,   -122,   -125,\n    -133,   -142,   -146,   -146,\n    -141,   -133,   -124,   -120,\n    -123,   -129,   -140,   -147,\n    -149,   -145,   -136,   -125,\n    -117,   -119,   -126,   -136,\n    -148,   -154,   -150,   -139,\n    -127,   -115,   -113,   -119,\n    -133,   -148,   -159,   -158,\n    -147,   -129,   -112,   -103,\n    -108,   -126,   -148,   -168,\n    -175,   -161,   -136,   -104,\n     -82,    -80,   -105,   -150,\n    -196,   -226,   -220,   -164,\n     -65,     60,    180,    270,\n   32765,    271,    180,     59,\n     -65,   -163,   -220,   -227,\n    -196,   -149,   -106,    -79,\n     -83,   -104,   -135,   -162,\n    -174,   -168,   -150,   -124,\n    -109,   -102,   -113,   -128,\n    -147,   -159,   -158,   -149,\n    -132,   -120,   -113,   -114,\n    -127,   -140,   -150,   -153,\n    -148,   -138,   -124,   -119,\n    -118,   -125,   -135,   -145,\n    -150,   -147,   -139,   -130,\n    -122,   -121,   -124,   -132,\n    -141,   -147,   -146,   -141,\n    -133,   -126,   -122,   -124,\n    -130,   -138,   -144,   -145,\n    -143,   -135,   -128,   -124,\n    -125,   -128,   -135,   -142,\n    -145,   -142,   -137,   -131,\n    -126,   -125,   -126,   -135,\n    -138,   -144,   -143,   -139,\n    -133,   -127,   -125,   -127,\n    -131,   -138,   -142,   -142,\n    -141,   -135,   -128,   -127,\n    -126,   -130,   -135,   -141,\n    -143,   -141,   -136,   -131,\n    -127,   -126,   -128,   -135,\n    -139,   -141,   -143,   -137,\n    -133,   -128,   -126,   -128,\n    -132,   -137,   -142,   -142,\n    -139,   -135,   -128,   -127,\n    -128,   -129,   -137,   -140,\n    -143,   -139,   -137,   -130,\n    -127,   -127,   -129,   -134,\n    -140,   -142,   -140,   -139,\n    -131,   -129,   -125,   -129,\n    -132,   -138,   -142,   -142,\n    -138,   -135,   -129,   -125,\n    -128,   -130,   -137,   -140,\n    -144,   -140,   -135,   -131,\n    -126,   -125,   -130,   -135,\n    -140,   -142,   -143,   -137,\n    -131,   -128,   -124,   -128,\n    -132,   -140,   -143,   -142,\n    -140,   -134,   -127,   -125,\n    -125,   -131,   -137,   -143,\n    -144,   -142,   -136,   -128,\n    -124,   -124,   -129,   -135,\n    -142,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_1[] = {\n    -150,   -157,   -152,   -144,\n    -132,   -121,   -119,   -125,\n    -135,   -149,   -157,   -157,\n    -149,   -135,   -123,   -114,\n    -120,   -131,   -146,   -158,\n    -162,   -156,   -139,   -123,\n    -112,   -113,   -124,   -142,\n    -160,   -167,   -164,   -147,\n    -125,   -108,   -104,   -113,\n    -136,   -161,   -177,   -175,\n    -159,   -129,   -102,    -89,\n     -96,   -124,   -161,   -192,\n    -201,   -182,   -140,    -89,\n     -55,    -53,    -92,   -161,\n    -237,   -285,   -272,   -185,\n     -29,    170,    362,    503,\n   32766,    503,    362,    170,\n     -28,   -186,   -272,   -285,\n    -237,   -161,    -92,    -52,\n     -56,    -89,   -140,   -182,\n    -201,   -192,   -160,   -125,\n     -96,    -89,   -101,   -130,\n    -159,   -175,   -177,   -161,\n    -135,   -115,   -102,   -109,\n    -125,   -147,   -163,   -168,\n    -160,   -142,   -124,   -113,\n    -111,   -124,   -140,   -154,\n    -163,   -158,   -146,   -131,\n    -119,   -116,   -122,   -134,\n    -150,   -156,   -158,   -149,\n    -136,   -123,   -120,   -121,\n    -132,   -143,   -154,   -155,\n    -151,   -140,   -128,   -122,\n    -121,   -130,   -139,   -150,\n    -154,   -151,   -144,   -131,\n    -125,   -122,   -128,   -136,\n    -146,   -153,   -151,   -145,\n    -136,   -128,   -122,   -127,\n    -133,   -143,   -151,   -151,\n    -147,   -139,   -130,   -124,\n    -126,   -131,   -140,   -148,\n    -152,   -148,   -141,   -132,\n    -127,   -125,   -130,   -136,\n    -146,   -151,   -149,   -144,\n    -135,   -128,   -125,   -128,\n    -135,   -143,   -149,   -150,\n    -146,   -138,   -130,   -125,\n    -127,   -133,   -139,   -149,\n    -150,   -147,   -142,   -131,\n    -127,   -125,   -131,   -137,\n    -147,   -149,   -150,   -143,\n    -134,   -128,   -126,   -127,\n    -136,   -143,   -150,   -150,\n    -146,   -137,   -130,   -124,\n    -127,   -132,   -142,   -148,\n    -151,   -149,   -139,   -132,\n    -125,   -124,   -131,   -138,\n    -147,   -152,   -150,   -143,\n    -134,   -126,   -123,   -128,\n    -135,   -145,   -152,   -152,\n    -147,   -136,   -127,   -122,\n    -125,   -132,   -143,   -152,\n    -153,   -150,   -140,   -129,\n    -122,   -121,   -129,   -140,\n    -150,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_2[] = {\n    -159,   -164,   -128,   -110,\n    -139,   -167,   -154,   -114,\n    -116,   -153,   -171,   -138,\n    -105,   -127,   -170,   -163,\n    -119,   -105,   -147,   -176,\n    -149,   -104,   -114,   -165,\n    -178,   -127,    -94,   -134,\n    -183,   -164,   -104,    -97,\n    -159,   -193,   -140,    -83,\n    -115,   -187,   -188,   -108,\n     -72,   -146,   -214,   -164,\n     -70,    -79,   -192,   -228,\n    -120,    -29,   -114,   -254,\n    -220,    -41,      3,   -194,\n    -342,   -165,    119,     24,\n    -441,   -578,    190,   1453,\n   32767,   1453,    191,   -579,\n    -442,     26,    118,   -165,\n    -341,   -195,      3,    -41,\n    -220,   -254,   -114,    -29,\n    -120,   -227,   -193,    -80,\n     -68,   -165,   -214,   -145,\n     -74,   -107,   -187,   -188,\n    -115,    -82,   -142,   -191,\n    -160,    -97,   -103,   -165,\n    -184,   -132,    -95,   -128,\n    -176,   -166,   -114,   -104,\n    -148,   -178,   -145,   -106,\n    -118,   -165,   -168,   -128,\n    -106,   -137,   -170,   -154,\n    -116,   -114,   -153,   -169,\n    -137,   -111,   -128,   -164,\n    -159,   -123,   -115,   -143,\n    -166,   -146,   -116,   -122,\n    -157,   -161,   -133,   -114,\n    -135,   -163,   -152,   -122,\n    -119,   -149,   -161,   -141,\n    -117,   -129,   -157,   -156,\n    -130,   -117,   -140,   -162,\n    -147,   -120,   -125,   -150,\n    -161,   -134,   -118,   -135,\n    -158,   -152,   -125,   -121,\n    -146,   -159,   -143,   -119,\n    -128,   -155,   -156,   -131,\n    -120,   -138,   -159,   -148,\n    -123,   -125,   -148,   -159,\n    -136,   -121,   -132,   -157,\n    -152,   -128,   -121,   -143,\n    -159,   -144,   -121,   -127,\n    -153,   -157,   -132,   -120,\n    -137,   -158,   -150,   -123,\n    -124,   -147,   -159,   -140,\n    -118,   -132,   -156,   -154,\n    -128,   -121,   -141,   -160,\n    -145,   -121,   -126,   -152,\n    -158,   -134,   -119,   -134,\n    -160,   -151,   -125,   -120,\n    -146,   -162,   -141,   -117,\n    -129,   -157,   -157,   -129,\n    -117,   -139,   -164,   -147,\n    -120,   -121,   -153,   -162,\n    -136,   -114,   -132,   -163,\n    -155,   -122,   -117,   -145,\n    -167,   -144,   -112,   -125,\n    -159,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_3[] = {\n    -190,   -184,   -179,   -172,\n    -166,   -156,   -150,   -143,\n    -133,   -128,   -121,   -114,\n    -110,   -106,   -103,   -102,\n    -103,   -102,   -107,   -111,\n    -116,   -124,   -132,   -141,\n    -152,   -161,   -174,   -185,\n    -197,   -206,   -218,   -226,\n    -235,   -241,   -246,   -249,\n    -249,   -248,   -243,   -238,\n    -226,   -217,   -199,   -185,\n    -164,   -143,   -120,    -93,\n     -68,    -40,    -12,     17,\n      47,     73,    101,    128,\n     151,    176,    194,    213,\n     227,    239,    248,    253,\n   32767,    252,    248,    239,\n     228,    212,    195,    175,\n     151,    129,    100,     74,\n      46,     17,    -11,    -41,\n     -67,    -94,   -120,   -142,\n    -165,   -184,   -200,   -216,\n    -228,   -236,   -243,   -249,\n    -248,   -250,   -245,   -242,\n    -235,   -225,   -219,   -206,\n    -197,   -184,   -174,   -162,\n    -152,   -141,   -131,   -125,\n    -116,   -110,   -107,   -104,\n    -101,   -102,   -104,   -105,\n    -111,   -114,   -121,   -127,\n    -134,   -142,   -150,   -158,\n    -164,   -173,   -178,   -185,\n    -189,   -195,   -197,   -199,\n    -200,   -201,   -199,   -198,\n    -193,   -191,   -186,   -180,\n    -175,   -170,   -161,   -158,\n    -150,   -145,   -139,   -135,\n    -131,   -127,   -124,   -123,\n    -123,   -122,   -123,   -126,\n    -127,   -132,   -134,   -141,\n    -145,   -150,   -155,   -161,\n    -167,   -170,   -177,   -179,\n    -184,   -187,   -189,   -189,\n    -192,   -190,   -189,   -187,\n    -186,   -181,   -178,   -174,\n    -168,   -165,   -158,   -153,\n    -150,   -143,   -141,   -135,\n    -132,   -131,   -127,   -126,\n    -128,   -125,   -129,   -129,\n    -133,   -136,   -139,   -144,\n    -149,   -154,   -159,   -163,\n    -169,   -174,   -178,   -181,\n    -185,   -188,   -189,   -190,\n    -192,   -189,   -189,   -187,\n    -183,   -180,   -177,   -170,\n    -167,   -160,   -156,   -151,\n    -144,   -140,   -135,   -131,\n    -129,   -124,   -124,   -123,\n    -121,   -123,   -125,   -128,\n    -129,   -136,   -139,   -145,\n    -150,   -157,   -163,   -168,\n    -176,   -180,   -186,   -190,\n    -195,   -196,   -200,   -201,\n    -200,   -199,   -197,   -194,\n    -190,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_4[] = {\n    -201,    -92,   -117,   -221,\n    -162,    -74,   -164,   -225,\n    -112,    -86,   -211,   -197,\n     -73,   -128,   -236,   -148,\n     -61,   -183,   -232,    -91,\n     -84,   -235,   -191,    -50,\n    -140,   -260,   -125,    -44,\n    -211,   -243,    -57,    -83,\n    -272,   -181,    -12,   -162,\n    -296,    -89,    -15,   -261,\n    -261,      7,    -84,   -343,\n    -160,     66,   -212,   -372,\n      -7,     52,   -383,   -304,\n     173,    -81,   -563,    -88,\n     341,   -408,   -711,    424,\n     462,  -1367,   -794,   3905,\n   32766,   3905,   -795,  -1366,\n     462,    423,   -710,   -408,\n     341,    -89,   -562,    -81,\n     172,   -303,   -383,     51,\n      -6,   -372,   -212,     66,\n    -160,   -344,    -83,      6,\n    -260,   -261,    -15,    -90,\n    -295,   -162,    -12,   -181,\n    -273,    -83,    -56,   -243,\n    -211,    -44,   -126,   -259,\n    -141,    -48,   -193,   -234,\n     -85,    -90,   -232,   -183,\n     -62,   -146,   -238,   -127,\n     -73,   -198,   -210,    -86,\n    -113,   -224,   -164,    -75,\n    -161,   -220,   -119,    -91,\n    -202,   -191,    -88,   -130,\n    -217,   -151,    -84,   -172,\n    -208,   -111,   -107,   -202,\n    -177,    -92,   -142,   -211,\n    -140,    -93,   -180,   -197,\n    -107,   -118,   -204,   -165,\n     -93,   -155,   -205,   -129,\n    -103,   -187,   -185,   -105,\n    -129,   -203,   -155,    -96,\n    -164,   -200,   -121,   -111,\n    -192,   -176,   -102,   -140,\n    -202,   -144,   -102,   -171,\n    -193,   -116,   -119,   -195,\n    -168,   -100,   -149,   -201,\n    -136,   -104,   -181,   -186,\n    -109,   -128,   -198,   -159,\n    -100,   -158,   -199,   -126,\n    -111,   -186,   -180,   -104,\n    -137,   -200,   -149,   -101,\n    -167,   -196,   -119,   -115,\n    -193,   -172,   -101,   -144,\n    -203,   -139,   -103,   -176,\n    -191,   -111,   -122,   -199,\n    -164,    -97,   -154,   -203,\n    -130,   -104,   -186,   -187,\n    -101,   -131,   -205,   -154,\n     -94,   -164,   -204,   -119,\n    -106,   -198,   -179,    -94,\n    -139,   -211,   -143,    -91,\n    -177,   -203,   -106,   -111,\n    -209,   -171,    -85,   -150,\n    -218,   -129,    -88,   -193,\n    -200,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_5[] = {\n       0,   -130,   -195,   -104,\n      21,     14,   -125,   -204,\n    -116,     24,     26,   -117,\n    -214,   -130,     25,     42,\n    -108,   -225,   -147,     26,\n      61,    -98,   -237,   -168,\n      28,     83,    -84,   -254,\n    -191,     28,    111,    -68,\n    -273,   -222,     29,    146,\n     -45,   -299,   -263,     29,\n     195,    -14,   -333,   -325,\n      31,    266,     35,   -387,\n    -421,     31,    387,    118,\n    -484,   -599,     31,    636,\n     304,   -714,  -1072,     31,\n    1501,   1103,  -2083,  -6238,\n   32766,  -6238,  -2084,   1105,\n    1500,     31,  -1072,   -715,\n     305,    636,     32,   -601,\n    -483,    119,    385,     32,\n    -421,   -386,     34,    266,\n      30,   -324,   -333,    -14,\n     195,     29,   -263,   -299,\n     -45,    146,     29,   -222,\n    -273,    -68,    111,     28,\n    -191,   -254,    -84,     83,\n      27,   -166,   -239,    -97,\n      61,     26,   -147,   -225,\n    -108,     42,     25,   -130,\n    -214,   -117,     26,     24,\n    -116,   -204,   -125,     13,\n      23,   -105,   -195,   -130,\n       0,     20,    -93,   -187,\n    -135,    -11,     18,    -83,\n    -180,   -139,    -21,     15,\n     -74,   -172,   -143,    -32,\n      15,    -67,   -165,   -147,\n     -40,     12,    -60,   -157,\n    -150,    -49,     10,    -54,\n    -150,   -152,    -58,      8,\n     -47,   -145,   -154,    -64,\n       3,    -40,   -138,   -157,\n     -71,      1,    -35,   -133,\n    -156,    -80,     -2,    -30,\n    -125,   -159,    -86,     -5,\n     -26,   -119,   -159,    -93,\n      -9,    -21,   -112,   -160,\n     -99,    -14,    -16,   -106,\n    -160,   -106,    -17,    -12,\n    -100,   -160,   -112,    -21,\n      -9,    -93,   -160,   -118,\n     -25,     -7,    -85,   -159,\n    -124,    -32,     -1,    -79,\n    -158,   -132,    -35,      2,\n     -73,   -156,   -138,    -40,\n       3,    -64,   -154,   -145,\n     -47,      7,    -56,   -153,\n    -151,    -52,      8,    -47,\n    -151,   -157,    -60,     11,\n     -39,   -147,   -165,    -67,\n      15,    -32,   -143,   -172,\n     -74,     15,    -21,   -139,\n    -180,    -83,     18,    -11,\n    -135,   -187,    -94,     21,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_6[] = {\n       0,   -260,     12,   -272,\n      24,   -285,     38,   -298,\n      50,   -310,     62,   -322,\n      74,   -334,     85,   -344,\n      96,   -356,    108,   -368,\n     120,   -380,    131,   -390,\n     142,   -401,    151,   -410,\n     161,   -419,    169,   -428,\n     180,   -439,    189,   -447,\n     196,   -453,    203,   -461,\n     211,   -469,    218,   -475,\n     225,   -482,    230,   -486,\n     234,   -491,    240,   -496,\n     244,   -500,    247,   -502,\n     250,   -505,    251,   -506,\n     253,   -507,    253,   -507,\n   32765,   -507,    253,   -507,\n     252,   -505,    251,   -505,\n     250,   -502,    246,   -498,\n     242,   -494,    238,   -490,\n     234,   -486,    229,   -480,\n     224,   -476,    219,   -469,\n     211,   -461,    203,   -453,\n     195,   -446,    189,   -439,\n     181,   -430,    170,   -419,\n     161,   -411,    152,   -400,\n     140,   -389,    131,   -380,\n     120,   -369,    110,   -358,\n      98,   -346,     86,   -334,\n      74,   -322,     61,   -308,\n      48,   -296,     36,   -284,\n      24,   -273,     14,   -262,\n       1,   -248,    -12,   -236,\n     -24,   -224,    -36,   -212,\n     -48,   -200,    -61,   -186,\n     -74,   -174,    -86,   -162,\n     -98,   -150,   -110,   -139,\n    -120,   -128,   -131,   -119,\n    -140,   -108,   -152,    -97,\n    -161,    -89,   -170,    -78,\n    -181,    -69,   -189,    -62,\n    -195,    -55,   -203,    -47,\n    -211,    -39,   -219,    -32,\n    -224,    -28,   -229,    -22,\n    -234,    -18,   -238,    -14,\n    -242,    -10,   -246,     -6,\n    -250,     -3,   -251,     -3,\n    -252,     -1,   -253,     -1,\n    -253,     -1,   -253,     -1,\n    -253,     -2,   -251,     -3,\n    -250,     -6,   -247,     -8,\n    -244,    -12,   -240,    -17,\n    -234,    -22,   -230,    -26,\n    -225,    -33,   -218,    -39,\n    -211,    -47,   -203,    -55,\n    -196,    -61,   -189,    -69,\n    -180,    -80,   -169,    -89,\n    -161,    -98,   -151,   -107,\n    -142,   -118,   -131,   -128,\n    -120,   -140,   -108,   -152,\n     -96,   -164,    -85,   -174,\n     -74,   -186,    -62,   -198,\n     -50,   -210,    -38,   -223,\n     -24,   -236,    -12,   -248,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_7[] = {\n       0,   -101,   -495,    -60,\n     -22,   -500,   -136,     49,\n    -484,   -223,    106,   -442,\n    -317,    142,   -375,   -412,\n     155,   -288,   -501,    141,\n    -184,   -574,     94,    -66,\n    -628,     18,     57,   -656,\n     -87,    177,   -648,   -222,\n     287,   -602,   -378,    375,\n    -512,   -553,    433,   -374,\n    -740,    450,   -183,   -932,\n     414,     63,  -1119,    310,\n     374,  -1294,    114,    772,\n   -1448,   -222,   1310,  -1578,\n    -801,   2133,  -1672,  -2002,\n    3876,  -1734,  -6442,  14783,\n   32766,  14782,  -6443,  -1732,\n    3875,  -2001,  -1674,   2135,\n    -802,  -1577,   1308,   -220,\n   -1449,    773,    112,  -1292,\n     373,    310,  -1118,     62,\n     414,   -931,   -184,    450,\n    -740,   -374,    434,   -555,\n    -510,    374,   -378,   -601,\n     285,   -220,   -649,    177,\n     -87,   -655,     56,     19,\n    -629,    -66,     94,   -574,\n    -183,    139,   -499,   -289,\n     156,   -413,   -375,    142,\n    -317,   -441,    105,   -223,\n    -483,     47,   -134,   -500,\n     -24,    -59,   -494,   -102,\n       0,   -466,   -183,     40,\n    -422,   -257,     57,   -361,\n    -327,     57,   -294,   -380,\n      34,   -223,   -418,     -3,\n    -155,   -437,    -55,    -92,\n    -439,   -115,    -42,   -420,\n    -180,     -6,   -387,   -243,\n      14,   -341,   -301,     16,\n    -285,   -350,      3,   -226,\n    -387,    -25,   -166,   -408,\n     -68,   -110,   -411,   -121,\n     -62,   -400,   -177,    -27,\n    -373,   -235,     -5,   -333,\n    -291,      3,   -286,   -336,\n      -8,   -230,   -374,    -31,\n    -174,   -396,    -70,   -118,\n    -405,   -117,    -71,   -396,\n    -173,    -33,   -373,   -229,\n      -9,   -336,   -285,      1,\n    -289,   -334,     -5,   -234,\n    -374,    -27,   -176,   -401,\n     -62,   -120,   -412,   -110,\n     -68,   -408,   -165,    -26,\n    -387,   -226,      4,   -351,\n    -286,     18,   -302,   -341,\n      15,   -244,   -387,     -6,\n    -179,   -421,    -42,   -115,\n    -438,    -93,    -55,   -436,\n    -156,     -3,   -418,   -223,\n      34,   -379,   -295,     57,\n    -326,   -363,     59,   -258,\n    -422,     40,   -182,   -467,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_8[] = {\n    -640,   -727,   -239,    149,\n    -114,   -674,   -747,   -215,\n     185,   -116,   -715,   -769,\n    -188,    228,   -118,   -761,\n    -800,   -155,    282,   -120,\n    -820,   -836,   -115,    349,\n    -122,   -894,   -881,    -65,\n     433,   -123,   -988,   -942,\n       2,    543,   -123,  -1115,\n   -1025,     92,    697,   -123,\n   -1295,  -1144,    223,    925,\n    -124,  -1569,  -1329,    429,\n    1296,   -125,  -2036,  -1659,\n     807,   2004,   -126,  -3025,\n   -2397,   1722,   3890,   -126,\n   -6482,  -5603,   7218,  24634,\n   32766,  24634,   7218,  -5602,\n   -6483,   -126,   3889,   1724,\n   -2399,  -3023,   -127,   2004,\n     807,  -1658,  -2037,   -125,\n    1296,    429,  -1329,  -1569,\n    -124,    925,    223,  -1143,\n   -1296,   -124,    698,     93,\n   -1026,  -1115,   -123,    543,\n       3,   -943,   -988,   -123,\n     432,    -63,   -882,   -894,\n    -121,    347,   -114,   -836,\n    -820,   -120,    282,   -155,\n    -799,   -762,   -118,    228,\n    -187,   -771,   -714,   -116,\n     186,   -216,   -747,   -674,\n    -114,    149,   -239,   -727,\n    -639,   -113,    118,   -259,\n    -711,   -611,   -109,     92,\n    -278,   -697,   -585,   -107,\n      70,   -295,   -686,   -561,\n    -105,     50,   -309,   -676,\n    -542,   -101,     32,   -323,\n    -667,   -524,    -97,     16,\n    -336,   -661,   -506,    -93,\n       1,   -347,   -656,   -490,\n     -91,     -9,   -360,   -650,\n    -477,    -85,    -22,   -370,\n    -647,   -464,    -80,    -30,\n    -384,   -643,   -451,    -74,\n     -41,   -394,   -641,   -439,\n     -69,    -48,   -405,   -640,\n    -428,    -62,    -56,   -416,\n    -640,   -416,    -56,    -62,\n    -428,   -640,   -404,    -49,\n     -70,   -438,   -641,   -394,\n     -40,    -76,   -450,   -643,\n    -383,    -31,    -81,   -463,\n    -646,   -372,    -21,    -84,\n    -478,   -650,   -360,    -10,\n     -89,   -492,   -654,   -349,\n       3,    -94,   -506,   -661,\n    -336,     16,    -97,   -524,\n    -667,   -323,     32,   -101,\n    -542,   -676,   -309,     50,\n    -105,   -561,   -686,   -295,\n      70,   -107,   -585,   -697,\n    -278,     92,   -109,   -611,\n    -711,   -259,    118,   -112,\n    -640,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_9[] = {\n       0,   -521,  -1050,  -1263,\n   -1024,   -465,     82,    279,\n       1,   -602,  -1168,  -1350,\n   -1024,   -374,    216,    378,\n      -1,   -706,  -1320,  -1462,\n   -1024,   -252,    391,    508,\n       0,   -848,  -1529,  -1615,\n   -1025,    -83,    643,    694,\n       1,  -1056,  -1839,  -1848,\n   -1023,    177,   1038,    994,\n      -1,  -1398,  -2363,  -2246,\n   -1025,    651,   1768,   1559,\n       1,  -2094,  -3463,  -3124,\n   -1024,   1791,   3640,   3114,\n       0,  -4354,  -7452,  -6767,\n   -1024,   8955,  20343,  29349,\n   32765,  29349,  20344,   8954,\n   -1024,  -6766,  -7453,  -4354,\n       0,   3115,   3639,   1791,\n   -1024,  -3124,  -3462,  -2094,\n      -1,   1561,   1767,    651,\n   -1024,  -2248,  -2361,  -1399,\n       0,    993,   1038,    178,\n   -1024,  -1848,  -1839,  -1055,\n       0,    694,    643,    -83,\n   -1024,  -1616,  -1529,   -848,\n       1,    507,    392,   -253,\n   -1024,  -1462,  -1319,   -708,\n       1,    378,    214,   -373,\n   -1023,  -1351,  -1167,   -603,\n       0,    281,     81,   -464,\n   -1025,  -1263,  -1049,   -522,\n       0,    204,    -25,   -538,\n   -1024,  -1193,   -955,   -453,\n      -1,    140,   -113,   -598,\n   -1024,  -1136,   -872,   -398,\n      -1,     86,   -187,   -652,\n   -1024,  -1084,   -803,   -348,\n      -1,     38,   -254,   -697,\n   -1025,  -1039,   -739,   -305,\n       0,     -6,   -314,   -739,\n   -1024,   -999,   -681,   -264,\n      -1,    -44,   -371,   -778,\n   -1024,   -961,   -626,   -227,\n       1,    -84,   -422,   -816,\n   -1024,   -923,   -576,   -189,\n      -1,   -118,   -474,   -853,\n   -1023,   -887,   -525,   -154,\n      -1,   -154,   -524,   -888,\n   -1023,   -852,   -475,   -118,\n       0,   -191,   -574,   -924,\n   -1024,   -815,   -423,    -83,\n       0,   -227,   -626,   -961,\n   -1023,   -779,   -371,    -44,\n       0,   -265,   -681,   -999,\n   -1023,   -740,   -314,     -6,\n       1,   -306,   -739,  -1039,\n   -1024,   -698,   -254,     38,\n       0,   -349,   -802,  -1085,\n   -1025,   -650,   -187,     84,\n       1,   -398,   -874,  -1134,\n   -1025,   -598,   -113,    140,\n       0,   -454,   -954,  -1194,\n   -1024,   -538,    -24,    203,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_10[] = {\n       0,   -492,  -1080,  -1617,\n   -1967,  -2040,  -1807,  -1322,\n    -691,    -79,    371,    533,\n     359,   -114,   -784,  -1487,\n   -2044,  -2316,  -2219,  -1765,\n   -1053,   -252,    439,    843,\n     844,    423,   -334,  -1250,\n   -2106,  -2679,  -2811,  -2442,\n   -1639,   -575,    491,   1293,\n    1610,   1325,    467,   -785,\n   -2150,  -3284,  -3882,  -3741,\n   -2828,  -1296,    526,   2207,\n    3300,   3446,   2485,    496,\n   -2177,  -4961,  -7173,  -8126,\n   -7279,  -4364,    544,   7005,\n   14274,  21393,  27381,  31367,\n   32767,  31367,  27381,  21394,\n   14273,   7005,    545,  -4365,\n   -7279,  -8126,  -7172,  -4963,\n   -2175,    495,   2485,   3447,\n    3298,   2208,    527,  -1297,\n   -2828,  -3740,  -3883,  -3284,\n   -2149,   -787,    469,   1324,\n    1610,   1293,    492,   -576,\n   -1639,  -2442,  -2810,  -2680,\n   -2106,  -1250,   -334,    424,\n     843,    843,    439,   -252,\n   -1053,  -1765,  -2218,  -2316,\n   -2046,  -1485,   -785,   -115,\n     361,    533,    369,    -77,\n    -692,  -1321,  -1808,  -2040,\n   -1968,  -1615,  -1081,   -492,\n       1,    279,    285,     18,\n    -447,   -992,  -1486,  -1802,\n   -1874,  -1684,  -1287,   -781,\n    -294,     53,    183,     62,\n    -271,   -736,  -1212,  -1584,\n   -1765,  -1707,  -1435,  -1012,\n    -550,   -158,     64,     68,\n    -147,   -527,   -972,  -1376,\n   -1639,  -1695,  -1538,  -1202,\n    -776,   -365,    -69,     41,\n     -65,   -354,   -756,  -1173,\n   -1496,  -1655,  -1601,  -1359,\n    -982,   -567,   -218,    -16,\n     -17,   -212,   -561,   -970,\n   -1341,  -1583,  -1634,  -1485,\n   -1169,   -769,   -381,   -102,\n       1,   -102,   -381,   -768,\n   -1170,  -1485,  -1634,  -1582,\n   -1342,   -970,   -560,   -214,\n     -15,    -18,   -216,   -568,\n    -982,  -1358,  -1602,  -1654,\n   -1498,  -1171,   -757,   -354,\n     -64,     39,    -67,   -366,\n    -776,  -1202,  -1537,  -1697,\n   -1637,  -1377,   -972,   -526,\n    -148,     68,     65,   -159,\n    -550,  -1012,  -1435,  -1707,\n   -1764,  -1585,  -1212,   -736,\n    -271,     62,    183,     54,\n    -295,   -781,  -1286,  -1685,\n   -1874,  -1802,  -1485,   -994,\n    -446,     19,    284,    280,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_11[] = {\n       0,   -465,  -1027,  -1635,\n   -2234,  -2768,  -3185,  -3439,\n   -3506,  -3375,  -3045,  -2548,\n   -1922,  -1222,   -513,    144,\n     677,   1040,   1185,   1096,\n     768,    223,   -497,  -1330,\n   -2206,  -3042,  -3759,  -4284,\n   -4553,  -4537,  -4211,  -3596,\n   -2730,  -1681,   -535,    609,\n    1637,   2450,   2955,   3078,\n    2784,   2057,    936,   -514,\n   -2189,  -3958,  -5661,  -7140,\n   -8230,  -8778,  -8665,  -7805,\n   -6147,  -3711,   -543,   3233,\n    7471,  11973,  16521,  20884,\n   24832,  28154,  30667,  32235,\n   32765,  32234,  30668,  28153,\n   24833,  20883,  16522,  11972,\n    7471,   3235,   -546,  -3708,\n   -6149,  -7804,  -8666,  -8778,\n   -8229,  -7140,  -5662,  -3957,\n   -2189,   -515,    936,   2058,\n    2783,   3079,   2954,   2451,\n    1637,    608,   -534,  -1681,\n   -2731,  -3595,  -4213,  -4534,\n   -4555,  -4283,  -3760,  -3041,\n   -2207,  -1329,   -498,    224,\n     767,   1096,   1186,   1040,\n     677,    143,   -512,  -1223,\n   -1921,  -2549,  -3045,  -3373,\n   -3508,  -3439,  -3184,  -2768,\n   -2235,  -1634,  -1028,   -464,\n      -1,    329,    491,    482,\n     300,    -30,   -476,   -996,\n   -1539,  -2054,  -2496,  -2826,\n   -3014,  -3046,  -2924,  -2658,\n   -2277,  -1819,  -1325,   -845,\n    -416,    -85,    125,    193,\n     116,    -97,   -425,   -836,\n   -1291,  -1748,  -2164,  -2502,\n   -2731,  -2829,  -2794,  -2623,\n   -2340,  -1966,  -1541,  -1103,\n    -693,   -347,   -101,     29,\n      27,   -105,   -351,   -692,\n   -1094,  -1519,  -1926,  -2282,\n   -2548,  -2706,  -2738,  -2640,\n   -2426,  -2112,  -1731,  -1314,\n    -906,   -537,   -249,    -64,\n       0,    -63,   -249,   -538,\n    -905,  -1315,  -1730,  -2113,\n   -2425,  -2641,  -2737,  -2706,\n   -2549,  -2281,  -1927,  -1518,\n   -1094,   -693,   -351,   -104,\n      26,     29,    -99,   -349,\n    -692,  -1103,  -1542,  -1966,\n   -2339,  -2624,  -2793,  -2830,\n   -2730,  -2503,  -2163,  -1748,\n   -1292,   -836,   -424,    -97,\n     115,    194,    124,    -84,\n    -417,   -844,  -1325,  -1820,\n   -2276,  -2659,  -2923,  -3047,\n   -3013,  -2826,  -2497,  -2054,\n   -1538,   -996,   -477,    -30,\n     301,    481,    492,    328,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_12[] = {\n       0,   -449,   -979,  -1569,\n   -2199,  -2835,  -3457,  -4036,\n   -4543,  -4957,  -5256,  -5424,\n   -5448,  -5325,  -5052,  -4639,\n   -4096,  -3442,  -2703,  -1903,\n   -1081,   -263,    507,   1203,\n    1783,   2222,   2496,   2578,\n    2462,   2138,   1613,    892,\n       1,  -1039,  -2188,  -3405,\n   -4648,  -5859,  -6991,  -7989,\n   -8798,  -9374,  -9669,  -9645,\n   -9277,  -8542,  -7429,  -5944,\n   -4096,  -1911,    578,   3319,\n    6267,   9351,  12509,  15664,\n   18744,  21676,  24384,  26806,\n   28877,  30544,  31768,  32514,\n   32767,  32515,  31768,  30544,\n   28877,  26805,  24385,  21676,\n   18744,  15664,  12508,   9352,\n    6266,   3321,    576,  -1911,\n   -4095,  -5944,  -7429,  -8542,\n   -9277,  -9646,  -9668,  -9374,\n   -8798,  -7989,  -6992,  -5859,\n   -4646,  -3407,  -2187,  -1039,\n       0,    893,   1613,   2137,\n    2463,   2579,   2494,   2222,\n    1785,   1201,    508,   -263,\n   -1081,  -1904,  -2702,  -3443,\n   -4095,  -4639,  -5052,  -5325,\n   -5449,  -5423,  -5256,  -4957,\n   -4544,  -4034,  -3459,  -2835,\n   -2197,  -1571,   -978,   -449,\n      -1,    351,    591,    711,\n     713,    595,    369,     41,\n    -368,   -839,  -1355,  -1890,\n   -2423,  -2927,  -3389,  -3782,\n   -4095,  -4317,  -4436,  -4452,\n   -4363,  -4179,  -3903,  -3552,\n   -3144,  -2689,  -2218,  -1740,\n   -1285,   -867,   -502,   -212,\n       1,    120,    147,     77,\n     -81,   -325,   -639,  -1012,\n   -1426,  -1866,  -2307,  -2737,\n   -3134,  -3480,  -3764,  -3971,\n   -4097,  -4130,  -4076,  -3934,\n   -3710,  -3417,  -3066,  -2669,\n   -2250,  -1821,  -1404,  -1015,\n    -671,   -387,   -174,    -46,\n       1,    -44,   -176,   -386,\n    -672,  -1014,  -1404,  -1821,\n   -2250,  -2670,  -3065,  -3417,\n   -3710,  -3934,  -4077,  -4129,\n   -4097,  -3971,  -3765,  -3480,\n   -3132,  -2738,  -2308,  -1865,\n   -1426,  -1012,   -640,   -324,\n     -82,     79,    145,    121,\n       0,   -210,   -504,   -866,\n   -1285,  -1741,  -2217,  -2690,\n   -3142,  -3554,  -3902,  -4179,\n   -4364,  -4451,  -4436,  -4317,\n   -4095,  -3783,  -3388,  -2928,\n   -2422,  -1890,  -1355,   -840,\n    -367,     42,    367,    596,\n     712,    712,    591,    350,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_13[] = {\n       0,    457,    858,   1194,\n    1456,   1640,   1738,   1748,\n    1666,   1490,   1224,    864,\n     416,   -111,   -718,  -1393,\n   -2126,  -2908,  -3728,  -4569,\n   -5424,  -6274,  -7104,  -7901,\n   -8651,  -9333,  -9938, -10453,\n  -10856, -11145, -11301, -11319,\n  -11186, -10901, -10454,  -9844,\n   -9071,  -8133,  -7036,  -5783,\n   -4384,  -2842,  -1178,    607,\n    2489,   4457,   6490,   8576,\n   10689,  12809,  14923,  17000,\n   19028,  20980,  22840,  24588,\n   26205,  27675,  28982,  30111,\n   31054,  31798,  32332,  32658,\n   32766,  32658,  32332,  31798,\n   31053,  30113,  28981,  27675,\n   26204,  24589,  22840,  20981,\n   19026,  17002,  14921,  12811,\n   10688,   8575,   6491,   4457,\n    2490,    605,  -1176,  -2844,\n   -4383,  -5783,  -7036,  -8134,\n   -9069,  -9845, -10454, -10901,\n  -11186, -11319, -11302, -11143,\n  -10858, -10451,  -9939,  -9334,\n   -8650,  -7901,  -7104,  -6274,\n   -5423,  -4571,  -3727,  -2908,\n   -2126,  -1393,   -718,   -111,\n     416,    864,   1223,   1491,\n    1666,   1748,   1739,   1639,\n    1456,   1194,    857,    458,\n       0,   -504,  -1048,  -1615,\n   -2202,  -2795,  -3383,  -3956,\n   -4508,  -5024,  -5500,  -5927,\n   -6300,  -6610,  -6856,  -7034,\n   -7143,  -7177,  -7144,  -7043,\n   -6873,  -6643,  -6355,  -6017,\n   -5634,  -5212,  -4764,  -4292,\n   -3809,  -3320,  -2838,  -2368,\n   -1919,  -1501,  -1115,   -774,\n    -483,   -240,    -57,     67,\n     132,    131,     74,    -46,\n    -223,   -454,   -734,  -1058,\n   -1420,  -1815,  -2234,  -2669,\n   -3113,  -3561,  -4000,  -4426,\n   -4828,  -5203,  -5542,  -5839,\n   -6092,  -6289,  -6436,  -6523,\n   -6554,  -6523,  -6436,  -6290,\n   -6090,  -5840,  -5542,  -5203,\n   -4829,  -4425,  -4000,  -3560,\n   -3114,  -2670,  -2233,  -1815,\n   -1420,  -1058,   -734,   -454,\n    -222,    -47,     73,    132,\n     132,     67,    -57,   -241,\n    -481,   -775,  -1116,  -1499,\n   -1920,  -2368,  -2838,  -3321,\n   -3808,  -4292,  -4763,  -5214,\n   -5632,  -6018,  -6355,  -6644,\n   -6872,  -7043,  -7143,  -7179,\n   -7142,  -7034,  -6856,  -6610,\n   -6300,  -5927,  -5500,  -5024,\n   -4508,  -3956,  -3384,  -2793,\n   -2203,  -1616,  -1046,   -505,\n       0,\n};\nconst int16_t FLASHMEM wav_bandlimited_comb_14[] = {\n       0,    804,   1608,   2410,\n    3212,   4011,   4808,   5601,\n    6393,   7178,   7963,   8738,\n    9512,  10278,  11038,  11793,\n   12539,  13277,  14011,  14731,\n   15446,  16150,  16845,  17530,\n   18204,  18867,  19518,  20159,\n   20787,  21402,  22003,  22595,\n   23168,  23731,  24278,  24811,\n   25328,  25831,  26319,  26788,\n   27244,  27682,  28105,  28509,\n   28897,  29268,  29619,  29956,\n   30271,  30571,  30851,  31112,\n   31354,  31580,  31784,  31970,\n   32136,  32284,  32412,  32518,\n   32609,  32678,  32726,  32755,\n   32767,  32756,  32727,  32677,\n   32608,  32520,  32410,  32285,\n   32136,  31970,  31784,  31579,\n   31355,  31112,  30851,  30571,\n   30271,  29955,  29620,  29268,\n   28897,  28509,  28104,  27683,\n   27244,  26789,  26317,  25832,\n   25328,  24811,  24278,  23730,\n   23170,  22593,  22004,  21402,\n   20787,  20158,  19519,  18867,\n   18204,  17530,  16844,  16151,\n   15446,  14732,  14009,  13278,\n   12539,  11792,  11039,  10278,\n    9512,   8738,   7962,   7180,\n    6391,   5602,   4808,   4011,\n    3212,   2410,   1608,    803,\n       1,   -804,  -1608,  -2410,\n   -3213,  -4010,  -4807,  -5603,\n   -6392,  -7178,  -7963,  -8738,\n   -9512, -10278, -11039, -11792,\n  -12539, -13278, -14009, -14732,\n  -15446, -16151, -16844, -17530,\n  -18204, -18867, -19519, -20158,\n  -20787, -21402, -22004, -22593,\n  -23170, -23730, -24278, -24811,\n  -25328, -25832, -26317, -26789,\n  -27244, -27683, -28104, -28509,\n  -28898, -29266, -29621, -29955,\n  -30271, -30571, -30851, -31112,\n  -31355, -31579, -31784, -31970,\n  -32137, -32283, -32411, -32520,\n  -32608, -32678, -32726, -32756,\n  -32766, -32756, -32727, -32677,\n  -32608, -32520, -32411, -32283,\n  -32138, -31969, -31784, -31579,\n  -31355, -31112, -30852, -30569,\n  -30273, -29954, -29620, -29268,\n  -28897, -28509, -28105, -27682,\n  -27244, -26789, -26318, -25830,\n  -25330, -24809, -24279, -23731,\n  -23169, -22593, -22004, -21403,\n  -20786, -20158, -19519, -18867,\n  -18204, -17530, -16845, -16150,\n  -15446, -14732, -14009, -13278,\n  -12539, -11793, -11038, -10278,\n   -9512,  -8739,  -7961,  -7179,\n   -6393,  -5601,  -4808,  -4012,\n   -3210,  -2411,  -1608,   -804,\n       0,\n};\n\n\nconst int16_t* waveform_table[] = {\n  wav_formant_sine,\n  wav_formant_square,\n  wav_sine,\n  wav_bandlimited_comb_0,\n  wav_bandlimited_comb_1,\n  wav_bandlimited_comb_2,\n  wav_bandlimited_comb_3,\n  wav_bandlimited_comb_4,\n  wav_bandlimited_comb_5,\n  wav_bandlimited_comb_6,\n  wav_bandlimited_comb_7,\n  wav_bandlimited_comb_8,\n  wav_bandlimited_comb_9,\n  wav_bandlimited_comb_10,\n  wav_bandlimited_comb_11,\n  wav_bandlimited_comb_12,\n  wav_bandlimited_comb_13,\n  wav_bandlimited_comb_14,\n};\n\nconst int16_t FLASHMEM ws_moderate_overdrive[] = {\n  -32766, -32728, -32689, -32648,\n  -32607, -32564, -32519, -32474,\n  -32427, -32378, -32328, -32277,\n  -32224, -32170, -32113, -32056,\n  -31996, -31935, -31872, -31807,\n  -31740, -31671, -31600, -31527,\n  -31451, -31374, -31294, -31212,\n  -31128, -31041, -30951, -30859,\n  -30765, -30667, -30567, -30464,\n  -30358, -30250, -30138, -30022,\n  -29904, -29782, -29657, -29529,\n  -29397, -29261, -29122, -28979,\n  -28832, -28681, -28526, -28367,\n  -28204, -28036, -27864, -27688,\n  -27507, -27321, -27131, -26936,\n  -26736, -26531, -26321, -26106,\n  -25886, -25660, -25429, -25192,\n  -24950, -24702, -24449, -24190,\n  -23925, -23654, -23377, -23094,\n  -22805, -22510, -22209, -21902,\n  -21588, -21268, -20942, -20609,\n  -20270, -19924, -19573, -19215,\n  -18850, -18479, -18102, -17718,\n  -17328, -16932, -16530, -16121,\n  -15707, -15286, -14859, -14427,\n  -13989, -13545, -13095, -12640,\n  -12180, -11715, -11244, -10769,\n  -10289,  -9804,  -9315,  -8822,\n   -8324,  -7823,  -7319,  -6810,\n   -6299,  -5785,  -5268,  -4748,\n   -4226,  -3703,  -3177,  -2650,\n   -2121,  -1592,  -1062,   -531,\n       0,    531,   1062,   1592,\n    2122,   2650,   3177,   3703,\n    4227,   4749,   5268,   5785,\n    6299,   6811,   7319,   7824,\n    8325,   8822,   9315,   9804,\n   10289,  10769,  11244,  11715,\n   12180,  12641,  13095,  13545,\n   13989,  14427,  14860,  15286,\n   15707,  16122,  16530,  16933,\n   17329,  17719,  18102,  18479,\n   18850,  19215,  19573,  19925,\n   20270,  20609,  20942,  21268,\n   21588,  21902,  22209,  22510,\n   22806,  23094,  23377,  23654,\n   23925,  24190,  24449,  24703,\n   24950,  25192,  25429,  25660,\n   25886,  26106,  26321,  26531,\n   26736,  26936,  27131,  27322,\n   27507,  27688,  27865,  28037,\n   28204,  28367,  28526,  28681,\n   28832,  28979,  29122,  29262,\n   29397,  29529,  29658,  29783,\n   29904,  30023,  30138,  30250,\n   30359,  30465,  30568,  30668,\n   30765,  30860,  30952,  31041,\n   31128,  31212,  31294,  31374,\n   31452,  31527,  31600,  31671,\n   31740,  31807,  31872,  31935,\n   31996,  32056,  32114,  32170,\n   32224,  32277,  32329,  32379,\n   32427,  32474,  32520,  32564,\n   32607,  32648,  32689,  32728,\n   32728,\n};\nconst int16_t FLASHMEM ws_violent_overdrive[] = {\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32765, -32765,\n  -32765, -32765, -32765, -32765,\n  -32765, -32765, -32765, -32764,\n  -32764, -32764, -32764, -32763,\n  -32763, -32763, -32762, -32762,\n  -32761, -32760, -32760, -32759,\n  -32758, -32757, -32756, -32754,\n  -32753, -32751, -32749, -32747,\n  -32744, -32741, -32738, -32734,\n  -32730, -32725, -32720, -32713,\n  -32706, -32698, -32689, -32679,\n  -32668, -32655, -32640, -32623,\n  -32604, -32582, -32558, -32531,\n  -32499, -32464, -32424, -32379,\n  -32327, -32269, -32204, -32130,\n  -32046, -31951, -31844, -31724,\n  -31587, -31434, -31260, -31065,\n  -30845, -30598, -30320, -30008,\n  -29658, -29266, -28828, -28340,\n  -27795, -27189, -26518, -25774,\n  -24954, -24053, -23064, -21985,\n  -20811, -19541, -18172, -16705,\n  -15142, -13486, -11742,  -9919,\n   -8025,  -6073,  -4075,  -2045,\n       0,   2045,   4075,   6073,\n    8025,   9919,  11742,  13486,\n   15142,  16705,  18172,  19541,\n   20811,  21985,  23064,  24053,\n   24954,  25774,  26518,  27189,\n   27795,  28340,  28828,  29266,\n   29658,  30008,  30320,  30598,\n   30845,  31065,  31260,  31434,\n   31587,  31724,  31844,  31951,\n   32046,  32130,  32204,  32269,\n   32327,  32379,  32424,  32464,\n   32499,  32531,  32558,  32582,\n   32604,  32623,  32640,  32655,\n   32668,  32679,  32689,  32698,\n   32706,  32713,  32720,  32725,\n   32730,  32734,  32738,  32741,\n   32744,  32747,  32749,  32751,\n   32753,  32754,  32756,  32757,\n   32758,  32759,  32760,  32760,\n   32761,  32762,  32762,  32763,\n   32763,  32763,  32764,  32764,\n   32764,  32764,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,\n};\nconst int16_t FLASHMEM ws_sine_fold[] = {\n  -32766, -32682, -32595, -32504,\n  -32410, -32315, -32218, -32121,\n  -32025, -31931, -31840, -31754,\n  -31673, -31599, -31531, -31470,\n  -31416, -31367, -31322, -31279,\n  -31235, -31188, -31132, -31064,\n  -30980, -30874, -30744, -30584,\n  -30392, -30166, -29903, -29605,\n  -29273, -28911, -28524, -28119,\n  -27704, -27290, -26888, -26510,\n  -26167, -25871, -25633, -25461,\n  -25361, -25337, -25389, -25511,\n  -25696, -25931, -26197, -26475,\n  -26739, -26962, -27116, -27171,\n  -27099, -26876, -26478, -25891,\n  -25105, -24119, -22940, -21584,\n  -20079, -18458, -16766, -15052,\n  -13374, -11789, -10357,  -9135,\n   -8176,  -7526,  -7217,  -7272,\n   -7698,  -8484,  -9603, -11013,\n  -12652, -14446, -16308, -18142,\n  -19847, -21320, -22465, -23190,\n  -23420, -23094, -22176, -20652,\n  -18533, -15860, -12697,  -9137,\n   -5292,  -1294,   2713,   6576,\n   10143,  13266,  15812,  17665,\n   18734,  18960,  18316,  16811,\n   14491,  11437,   7763,   3614,\n    -844,  -5428,  -9944, -14200,\n  -18011, -21206, -23640, -25199,\n  -25802, -25410, -24026, -21695,\n  -18501, -14568, -10051,  -5129,\n       0,   5129,  10051,  14568,\n   18501,  21695,  24026,  25410,\n   25802,  25199,  23640,  21206,\n   18011,  14200,   9944,   5428,\n     844,  -3614,  -7763, -11437,\n  -14491, -16811, -18316, -18960,\n  -18734, -17665, -15812, -13266,\n  -10143,  -6576,  -2713,   1294,\n    5292,   9137,  12697,  15860,\n   18533,  20652,  22176,  23094,\n   23420,  23190,  22465,  21320,\n   19847,  18142,  16308,  14446,\n   12652,  11013,   9603,   8484,\n    7698,   7272,   7217,   7526,\n    8176,   9135,  10357,  11789,\n   13374,  15052,  16766,  18458,\n   20079,  21584,  22940,  24119,\n   25105,  25891,  26478,  26876,\n   27099,  27171,  27116,  26962,\n   26739,  26475,  26197,  25931,\n   25696,  25511,  25389,  25337,\n   25361,  25461,  25633,  25871,\n   26167,  26510,  26888,  27290,\n   27704,  28119,  28524,  28911,\n   29273,  29605,  29903,  30166,\n   30392,  30584,  30744,  30874,\n   30980,  31064,  31132,  31188,\n   31235,  31279,  31322,  31367,\n   31416,  31470,  31531,  31599,\n   31673,  31754,  31840,  31931,\n   32025,  32121,  32218,  32315,\n   32410,  32504,  32595,  32682,\n   32682,\n};\nconst int16_t FLASHMEM ws_tri_fold[] = {\n     -78, -20070, -31636, -30481,\n  -17545,   1825,  20257,  31198,\n   31144,  20555,   3335, -14748,\n  -28051, -32765, -27869, -15160,\n    1526,  17553,  28787,  32606,\n   28401,  17522,   2767, -12404,\n  -24698, -31675, -32164, -26370,\n  -15686,  -2305,  11261,  22670,\n   30122,  32609,  29985,  22895,\n   12593,    688, -11123, -21293,\n  -28618, -32346, -32225, -28466,\n  -21675, -12730,  -2661,   7481,\n   16727,  24281,  29569,  32266,\n   32296,  29804,  25121,  18711,\n   11123,   2936,  -5286, -13027,\n  -19851, -25419, -29496, -31955,\n  -32766, -31988, -29754, -26252,\n  -21712, -16387, -10537,  -4418,\n    1726,   7680,  13252,  18287,\n   22661,  26287,  29107,  31097,\n   32257,  32610,  32199,  31083,\n   29331,  27022,  24237,  21062,\n   17579,  13872,  10018,   6089,\n    2152,  -1734,  -5515,  -9146,\n  -12587, -15807, -18779, -21484,\n  -23907, -26038, -27872, -29408,\n  -30647, -31595, -32257, -32644,\n  -32766, -32635, -32264, -31666,\n  -30855, -29846, -28653, -27289,\n  -25770, -24109, -22319, -20413,\n  -18405, -16307, -14130, -11888,\n   -9591,  -7250,  -4877,  -2483,\n     -78,   2327,   4722,   7095,\n    9435,  11732,  13975,  16151,\n   18249,  20257,  22163,  23953,\n   25615,  27134,  28497,  29691,\n   30700,  31510,  32108,  32479,\n   32610,  32488,  32101,  31439,\n   30492,  29253,  27717,  25883,\n   23752,  21329,  18624,  15651,\n   12431,   8990,   5359,   1578,\n   -2307,  -6245, -10174, -14028,\n  -17735, -21217, -24393, -27177,\n  -29487, -31238, -32354, -32765,\n  -32412, -31253, -29263, -26442,\n  -22817, -18442, -13407,  -7835,\n   -1882,   4263,  10381,  16231,\n   21557,  26096,  29598,  31832,\n   32610,  31800,  29341,  25263,\n   19695,  12871,   5130,  -3091,\n  -11279, -18867, -25276, -29960,\n  -32452, -32422, -29725, -24437,\n  -16883,  -7636,   2505,  12574,\n   21519,  28311,  32069,  32191,\n   28462,  21137,  10967,   -844,\n  -12749, -23051, -30140, -32765,\n  -30278, -22825, -11417,   2150,\n   15530,  26214,  32008,  31519,\n   24543,  12248,  -2923, -17678,\n  -28556, -32762, -28943, -17709,\n   -1682,  15005,  27714,  32609,\n   27895,  14592,  -3491, -20710,\n  -31300, -31354, -20413,  -1981,\n   17389,  30325,  31480,  19915,\n   19915,\n};\n\n\nconst int16_t* waveshaper_table[] = {\n  ws_moderate_overdrive,\n  ws_violent_overdrive,\n  ws_sine_fold,\n  ws_tri_fold,\n};\n\nconst uint8_t FLASHMEM wt_waves[] = {\n     104,    105,    107,    108,\n     110,    112,    115,    116,\n     118,    122,    124,    124,\n     126,    129,    131,    132,\n     135,    137,    138,    140,\n     143,    145,    145,    147,\n     148,    149,    148,    148,\n     148,    147,    146,    144,\n     142,    139,    137,    133,\n     127,    121,    116,    110,\n     101,     93,     88,     83,\n      78,     74,     73,     73,\n      75,     80,     86,     93,\n     104,    116,    130,    143,\n     158,    173,    188,    203,\n     218,    228,    236,    245,\n     255,    252,    248,    244,\n     240,    232,    222,    211,\n     200,    188,    177,    166,\n     153,    141,    132,    123,\n     114,    105,     98,     91,\n      85,     82,     78,     74,\n      72,     72,     73,     72,\n      72,     75,     78,     80,\n      83,     88,     92,     95,\n     100,    104,    108,    113,\n     117,    120,    122,    125,\n     126,    125,    125,    124,\n     122,    120,    118,    116,\n     113,    111,    110,    108,\n     107,    105,    105,    104,\n     103,    103,    104,    103,\n     104,    123,    122,    124,\n     120,    118,    117,    117,\n     118,    117,    113,    114,\n     115,    113,    110,    109,\n     109,    110,    110,    108,\n     110,    114,    116,    118,\n     122,    125,    131,    135,\n     136,    135,    139,    142,\n     141,    139,    138,    138,\n     138,    135,    131,    129,\n     127,    125,    119,    114,\n     111,    107,    100,     95,\n      90,     84,     82,     79,\n      80,     82,     87,     97,\n     111,    124,    140,    160,\n     182,    203,    218,    229,\n     241,    255,    246,    238,\n     231,    223,    208,    193,\n     180,    173,    166,    157,\n     150,    149,    149,    148,\n     145,    143,    143,    141,\n     138,    134,    131,    128,\n     125,    121,    116,    110,\n     105,    102,     97,     90,\n      86,     86,     85,     84,\n      82,     85,     90,     93,\n      95,     98,    105,    110,\n     111,    112,    114,    116,\n     115,    113,    111,    111,\n     112,    112,    112,    113,\n     117,    120,    122,    124,\n     124,    126,    127,    128,\n     125,    123,    149,    149,\n     148,    147,    148,    146,\n     143,    143,    142,    139,\n     138,    137,    136,    135,\n     134,    134,    133,    132,\n     132,    132,    130,    129,\n     127,    125,    121,    118,\n     114,    109,    105,    103,\n      99,     96,     95,     93,\n      92,     92,     91,     90,\n      88,     88,     86,     84,\n      82,     79,     77,     75,\n      73,     71,     70,     72,\n      74,     75,     78,     86,\n      93,    100,    113,    129,\n     141,    155,    175,    193,\n     203,    217,    236,    242,\n     245,    251,    255,    251,\n     245,    244,    238,    228,\n     219,    213,    203,    191,\n     184,    176,    165,    156,\n     148,    140,    129,    122,\n     115,    107,     98,     92,\n      85,     77,     70,     65,\n      58,     56,     55,     54,\n      55,     58,     63,     69,\n      76,     85,     92,     99,\n     108,    115,    119,    122,\n     127,    128,    128,    129,\n     130,    129,    128,    130,\n     130,    130,    131,    135,\n     137,    137,    141,    144,\n     145,    146,    149,    134,\n     129,    121,    119,    120,\n     118,    117,    123,    127,\n     125,    127,    128,    122,\n     116,    113,    109,    105,\n     108,    115,    123,    131,\n     144,    153,    156,    156,\n     153,    141,    127,    115,\n     105,     95,     93,     98,\n     104,    110,    125,    137,\n     140,    142,    147,    146,\n     135,    135,    139,    139,\n     142,    160,    173,    174,\n     185,    192,    174,    148,\n     133,    105,     60,     36,\n      38,     27,     28,     69,\n     116,    142,    183,    239,\n     255,    250,    254,    248,\n     204,    164,    149,    119,\n      80,     72,     78,     71,\n      70,     90,    102,     99,\n     110,    125,    129,    129,\n     147,    161,    162,    170,\n     182,    179,    167,    158,\n     147,    120,     97,     83,\n      69,     52,     51,     64,\n      74,     90,    118,    142,\n     156,    172,    185,    183,\n     170,    162,    146,    123,\n     105,     98,     87,     78,\n      83,     92,     96,    104,\n     120,    128,    131,    137,\n     143,    138,    134,    134,\n     148,    154,    158,    162,\n     163,    166,    166,    166,\n     164,    160,    156,    151,\n     142,    136,    128,    118,\n     110,    103,     96,     91,\n      87,     84,     83,     84,\n      86,     89,     92,     98,\n     103,    110,    116,    123,\n     129,    133,    137,    142,\n     144,    143,    142,    142,\n     139,    134,    130,    125,\n     120,    114,    107,    102,\n      95,     91,     85,     79,\n      75,     74,     72,     70,\n      73,     82,     90,    101,\n     121,    140,    155,    177,\n     203,    220,    230,    243,\n     254,    255,    248,    243,\n     235,    220,    202,    185,\n     168,    152,    136,    120,\n     106,     98,     90,     84,\n      77,     76,     77,     75,\n      75,     76,     79,     81,\n      84,     88,     92,     97,\n     105,    114,    121,    128,\n     138,    148,    155,    160,\n     164,    168,    168,    164,\n     158,    151,    143,    134,\n     123,    111,    104,     99,\n      92,     89,     90,     92,\n      94,    100,    106,    113,\n     121,    128,    135,    142,\n     148,    148,    163,    170,\n     171,    169,    162,    153,\n     144,    130,    115,    108,\n     105,     95,     81,     75,\n      75,     71,     69,     77,\n      96,    112,    126,    142,\n     154,    156,    155,    148,\n     132,    119,    113,    105,\n      90,     80,     76,     69,\n      60,     52,     54,     64,\n      75,     92,    116,    136,\n     150,    162,    163,    154,\n     143,    135,    132,    127,\n     121,    120,    121,    108,\n      80,     64,     62,     50,\n      43,     76,    112,    133,\n     172,    221,    239,    238,\n     247,    255,    240,    220,\n     214,    210,    194,    170,\n     151,    141,    127,    111,\n     105,    107,    113,    122,\n     137,    151,    164,    181,\n     195,    201,    202,    199,\n     197,    190,    172,    148,\n     121,     98,     74,     39,\n      14,     25,     45,     54,\n      71,    105,    139,    157,\n     166,    177,    184,    187,\n     185,    176,    168,    159,\n     145,    128,    108,     86,\n      74,     73,     67,     61,\n      70,     90,    103,    114,\n     130,    148,    178,    176,\n     172,    161,    160,    159,\n     143,    138,    137,    125,\n     121,    114,    106,    100,\n      95,     90,     84,     81,\n      80,     81,     70,     81,\n      78,     70,     75,     82,\n      80,     75,     79,     86,\n      87,     82,     89,     97,\n      89,     90,     96,     95,\n      90,     89,     95,     88,\n      85,     88,     87,     80,\n      82,     85,     79,     81,\n      84,     88,     83,     95,\n     102,     98,    104,    119,\n     126,    123,    141,    159,\n     154,    168,    190,    194,\n     201,    211,    224,    230,\n     232,    241,    248,    249,\n     253,    255,    255,    251,\n     250,    244,    236,    229,\n     224,    209,    193,    189,\n     179,    158,    148,    143,\n     119,    106,    100,     88,\n      75,     66,     58,     53,\n      47,     38,     39,     43,\n      40,     43,     46,     56,\n      59,     66,     79,     83,\n      94,    105,    110,    119,\n     134,    139,    143,    157,\n     164,    166,    169,    182,\n     181,    175,    183,    188,\n     183,    177,    178,    151,\n     153,    156,    144,    137,\n     143,    138,    126,    122,\n     129,    127,    115,    112,\n     116,    118,    113,    113,\n     118,    117,    118,    122,\n     130,    130,    128,    136,\n     142,    137,    143,    144,\n     134,    143,    153,    140,\n     128,    138,    145,    125,\n     113,    125,    119,     97,\n      90,    104,     99,     73,\n      67,     83,     77,     60,\n      65,     77,     64,     56,\n      82,     91,     72,     80,\n     107,    109,    102,    127,\n     146,    135,    143,    176,\n     187,    179,    186,    211,\n     220,    209,    218,    244,\n     238,    217,    233,    255,\n     230,    214,    232,    225,\n     197,    197,    201,    178,\n     156,    153,    149,    131,\n     112,    103,    100,     81,\n      63,     70,     64,     38,\n      38,     49,     34,     25,\n      46,     47,     33,     46,\n      63,     65,     65,     78,\n      94,    100,    101,    111,\n     126,    130,    131,    142,\n     153,    150,    150,    162,\n     166,    160,    159,    164,\n     163,    164,    160,    151,\n     183,    167,    151,    130,\n     125,    113,     83,     80,\n      89,     82,     80,    101,\n     122,    127,    133,    141,\n     157,    160,    148,    144,\n     143,    144,    131,    109,\n      99,     97,     84,     59,\n      53,     75,    105,    113,\n     117,    144,    166,    171,\n     144,    117,    119,    107,\n      65,     27,     46,     68,\n      39,     24,     55,     70,\n      68,     79,    103,    118,\n     122,    134,    136,    117,\n     120,    121,    103,     92,\n     116,    130,    106,    112,\n     150,    152,    132,    137,\n     168,    174,    153,    157,\n     188,    203,    195,    204,\n     222,    215,    209,    207,\n     186,    160,    158,    152,\n     120,    112,    145,    163,\n     162,    169,    187,    210,\n     207,    196,    194,    181,\n     160,    122,    101,     92,\n      85,     97,     77,     64,\n      97,    132,    152,    171,\n     210,    235,    228,    197,\n     149,    128,    112,     56,\n       1,     20,     62,     49,\n      30,     61,    102,    118,\n     134,    174,    208,    205,\n     183,    168,    158,    144,\n     129,    120,    116,    113,\n     114,    117,    124,    135,\n     140,    135,    135,    147,\n     152,    143,    141,    151,\n     160,    155,    152,    153,\n     142,    128,    117,    103,\n      84,     74,     83,     94,\n     101,    110,    130,    147,\n     150,    143,    134,    127,\n     112,     92,     71,     63,\n      61,     58,     54,     59,\n      71,     84,     95,    101,\n     102,    107,    114,    108,\n      91,     83,     84,     82,\n      74,     77,     84,    103,\n     146,    189,    201,    205,\n     232,    255,    229,    183,\n     163,    156,    132,    105,\n     103,    115,    125,    142,\n     162,    167,    165,    178,\n     187,    173,    155,    160,\n     174,    174,    167,    165,\n     170,    169,    156,    135,\n     113,    100,     89,     78,\n      71,     76,     92,    109,\n     128,    148,    163,    181,\n     192,    190,    177,    163,\n     139,    109,     85,     72,\n      51,     34,     44,     65,\n      75,     84,    114,    141,\n     153,    164,    182,    188,\n     178,    168,    120,    127,\n     135,    128,    123,    126,\n     125,    121,    124,    140,\n     158,    167,    160,    154,\n     168,    184,    184,    170,\n     159,    155,    146,    140,\n     140,    132,    116,    111,\n     113,    106,     95,    100,\n     119,    129,    115,    103,\n     111,    129,    132,    126,\n     114,     95,     79,     79,\n      94,     97,     75,     54,\n      51,     47,     34,     35,\n      52,     61,     53,     37,\n      20,     22,     53,     90,\n     102,     87,     73,     69,\n      94,    164,    244,    255,\n     202,    176,    217,    253,\n     243,    232,    241,    227,\n     179,    155,    160,    153,\n     139,    150,    161,    136,\n      99,     86,    108,    141,\n     167,    167,    149,    138,\n     141,    157,    176,    188,\n     181,    160,    151,    150,\n     134,    117,    131,    159,\n     149,    108,     84,     88,\n     101,    109,    120,    124,\n     108,     87,     86,    103,\n     113,    105,    100,    119,\n     134,    122,    112,    130,\n     144,    135,    128,    141,\n     148,    133,    120,    137,\n     136,    132,    142,    163,\n     167,    157,    157,    166,\n     170,    169,    170,    163,\n     154,    153,    155,    151,\n     141,    133,    129,    128,\n     127,    122,    111,    108,\n     113,    113,    105,    101,\n     102,    103,    104,    102,\n     101,    100,     95,     94,\n     101,     97,     79,     72,\n      83,     89,     72,     51,\n      50,     66,     69,     49,\n      33,     43,     61,     64,\n      51,     50,     65,     76,\n      80,     92,    117,    134,\n     123,    113,    149,    211,\n     216,    167,    157,    217,\n     255,    225,    191,    205,\n     227,    216,    194,    195,\n     203,    186,    156,    148,\n     166,    170,    137,    108,\n     115,    136,    135,    115,\n     102,    109,    124,    129,\n     122,    120,    129,    138,\n     138,    137,    141,    150,\n     152,    146,    146,    155,\n     159,    147,    136,    142,\n     149,    142,    124,    118,\n     123,    123,    112,    102,\n     105,    111,    104,     97,\n     104,    113,    110,    106,\n     113,    123,    131,    137,\n     173,    176,    164,    163,\n     190,    203,    190,    187,\n     197,    197,    198,    208,\n     206,    191,    186,    188,\n     191,    183,    174,    162,\n     149,    143,    149,    141,\n     115,    102,    101,     97,\n      87,     81,     67,     58,\n      50,     51,     50,     47,\n      33,     29,     27,     31,\n      35,     31,     20,     22,\n      24,     24,     35,     45,\n      26,     18,     35,     59,\n      58,     53,     50,     59,\n      75,     93,    106,    111,\n     123,    123,    120,    149,\n     210,    204,    156,    160,\n     231,    255,    226,    208,\n     237,    251,    237,    232,\n     251,    254,    234,    210,\n     212,    235,    242,    203,\n     168,    182,    203,    187,\n     161,    158,    154,    140,\n     129,    139,    138,    116,\n      98,    102,    103,    103,\n      97,     85,     76,     79,\n      82,     82,     85,     78,\n      68,     70,     88,     93,\n      83,     78,     92,     96,\n      93,    103,    118,    110,\n     104,    119,    134,    138,\n     137,    138,    143,    156,\n     173,    121,    124,    113,\n     110,    113,    122,    125,\n     116,    126,    130,    122,\n     143,    144,    128,    136,\n     142,    145,    141,    137,\n     135,    135,    140,    128,\n     134,    141,    101,    123,\n     147,    109,    104,    129,\n     136,    124,    126,    144,\n     146,    139,    160,    171,\n     134,    133,    163,    129,\n     117,    139,     94,     79,\n     100,     72,     55,     55,\n      37,     27,     34,     24,\n      19,     22,     38,     66,\n      51,     56,    112,    109,\n     101,    165,    183,    160,\n     189,    227,    231,    229,\n     231,    252,    255,    224,\n     230,    232,    203,    205,\n     189,    148,    153,    160,\n     113,     97,    112,     87,\n      74,     90,     80,     66,\n      76,     86,     87,     95,\n      97,     97,     95,    116,\n     129,     94,    105,    148,\n     123,    118,    143,    136,\n     144,    147,    147,    157,\n     148,    144,    156,    163,\n     148,    140,    155,    157,\n     142,    137,    137,    137,\n     133,    122,    126,    123,\n     111,    121,    172,    178,\n     185,    193,    193,    197,\n     210,    210,    205,    213,\n     216,    211,    209,    209,\n     207,    197,    194,    191,\n     185,    176,    169,    161,\n     149,    143,    139,    121,\n     114,    111,     96,     88,\n      85,     85,     67,     61,\n      62,     57,     48,     57,\n      48,     28,     39,     42,\n      33,     26,     42,     24,\n      24,     41,     38,     30,\n      38,     40,     44,     53,\n      54,     61,     71,     87,\n      97,     94,    116,    144,\n     135,    137,    187,    196,\n     172,    192,    236,    225,\n     219,    240,    253,    245,\n     246,    255,    252,    249,\n     247,    234,    228,    234,\n     222,    197,    196,    197,\n     177,    159,    165,    153,\n     126,    123,    129,    106,\n      93,     98,     89,     68,\n      75,     73,     54,     52,\n      63,     52,     46,     51,\n      48,     51,     58,     55,\n      55,     62,     69,     70,\n      77,     86,     88,     90,\n     102,    114,    115,    121,\n     134,    140,    139,    153,\n     166,    166,    172,    120,\n     102,     97,    114,    144,\n     171,    170,    151,    160,\n     185,    189,    196,    202,\n     172,    143,    137,    143,\n     150,    143,    119,    107,\n     115,    126,    135,    136,\n     123,    116,    121,    115,\n     107,    115,    122,     98,\n      68,     66,     81,     94,\n     102,     89,     62,     61,\n      87,    111,    112,    100,\n      86,     98,    110,     95,\n      93,    100,     85,     60,\n      43,     38,     63,     85,\n      82,     72,     73,     91,\n     107,    118,    163,    225,\n     233,    172,    131,    185,\n     255,    239,    168,    146,\n     167,    175,    166,    172,\n     185,    169,    143,    145,\n     177,    199,    193,    168,\n     140,    126,    147,    178,\n     162,    112,     90,    108,\n     128,    136,    136,    127,\n     111,    110,    113,    118,\n     137,    150,    128,     91,\n      79,    103,    134,    124,\n      85,     66,     80,    103,\n     118,    127,    122,    108,\n     111,    134,    154,    165,\n     162,    138,    112,    115,\n     143,    158,    144,    120,\n     104,    114,    124,    137,\n     148,    160,    170,    176,\n     181,    183,    184,    181,\n     179,    172,    164,    155,\n     145,    137,    127,    119,\n     112,    106,     98,     93,\n      88,     82,     81,     80,\n      82,     84,     88,     93,\n     100,    110,    120,    133,\n     142,    154,    163,    172,\n     179,    182,    186,    181,\n     177,    165,    157,    143,\n     128,    113,     96,     81,\n      66,     56,     50,     45,\n      46,     43,     45,     47,\n      55,     71,     91,    116,\n     137,    159,    177,    195,\n     215,    233,    247,    254,\n     255,    250,    239,    224,\n     208,    190,    170,    148,\n     126,    104,     84,     69,\n      59,     52,     49,     48,\n      50,     53,     59,     68,\n      80,     90,    102,    110,\n     118,    125,    134,    142,\n     148,    156,    162,    166,\n     169,    172,    174,    173,\n     174,    171,    168,    162,\n     153,    145,    135,    127,\n     116,    107,     97,     88,\n      80,     74,     72,     71,\n      74,     79,     87,     95,\n     104,    104,    102,    100,\n     100,    103,    108,    114,\n     121,    126,    136,    145,\n     152,    161,    161,    167,\n     165,    163,    158,    154,\n     147,    140,    133,    121,\n     113,    103,     95,     93,\n      91,     90,     89,     93,\n      98,    105,    116,    126,\n     136,    141,    148,    152,\n     159,    162,    163,    162,\n     156,    151,    136,    132,\n     122,    110,    100,     90,\n      79,     67,     63,     59,\n      59,     60,     58,     57,\n      56,     63,     75,     96,\n     122,    146,    167,    188,\n     208,    229,    246,    255,\n     255,    242,    232,    214,\n     200,    188,    177,    166,\n     154,    144,    139,    137,\n     137,    140,    140,    135,\n     130,    119,    110,    100,\n      92,     82,     70,     61,\n      49,     47,     45,     54,\n      63,     77,     89,    103,\n     119,    133,    150,    160,\n     168,    174,    172,    172,\n     167,    164,    155,    150,\n     142,    135,    131,    124,\n     122,    116,    117,    113,\n     111,    110,    108,    107,\n     105,    104,     52,     55,\n      65,     78,     99,    127,\n     152,    180,    202,    224,\n     236,    241,    239,    221,\n     206,    182,    163,    139,\n     120,    105,     91,     88,\n      80,     81,     78,     77,\n      78,     72,     72,     62,\n      63,     61,     65,     76,\n      88,    110,    130,    157,\n     178,    199,    216,    222,\n     228,    217,    205,    180,\n     159,    136,    112,     98,\n      82,     74,     66,     68,\n      73,     78,     87,     82,\n      79,     67,     62,     63,\n      69,     87,    100,    117,\n     132,    157,    185,    212,\n     233,    239,    242,    233,\n     221,    208,    194,    182,\n     162,    146,    129,    120,\n     117,    118,    123,    120,\n     117,    111,    107,    100,\n      92,     89,     79,     73,\n      63,     57,     49,     45,\n      54,     67,     92,    118,\n     154,    187,    215,    236,\n     245,    252,    255,    253,\n     233,    204,    175,    143,\n     120,     98,     85,     76,\n      71,     70,     66,     70,\n      69,     70,     67,     62,\n      57,     49,     52,     90,\n      91,     95,    102,    116,\n     130,    154,    170,    183,\n     193,    192,    181,    164,\n     142,    123,    103,     91,\n      80,     76,     76,     83,\n      99,    110,    121,    124,\n     126,    127,    122,    118,\n     110,    106,    105,    105,\n     112,    121,    138,    150,\n     161,    165,    166,    159,\n     149,    136,    120,    100,\n      76,     60,     51,     51,\n      59,     71,     84,     98,\n     113,    125,    137,    144,\n     138,    128,    112,    103,\n     103,    115,    134,    162,\n     183,    199,    210,    207,\n     198,    192,    183,    181,\n     180,    181,    188,    197,\n     212,    221,    230,    222,\n     208,    181,    151,    121,\n      90,     71,     56,     54,\n      56,     63,     83,    100,\n     119,    124,    122,    108,\n      85,     66,     57,     66,\n      83,    113,    142,    178,\n     204,    226,    245,    254,\n     255,    225,    185,    142,\n     100,     69,     49,     41,\n      38,     43,     53,     68,\n      92,    108,    119,    120,\n     117,    103,     95,     90,\n     116,    127,    136,    147,\n     159,    170,    180,    186,\n     191,    196,    196,    194,\n     191,    184,    179,    169,\n     159,    149,    139,    127,\n     118,    109,    103,     96,\n      89,     86,     86,     84,\n      86,     84,     88,     94,\n      96,    104,    103,    107,\n     106,    106,    104,    103,\n      98,     91,     87,     78,\n      74,     65,     64,     59,\n      59,     58,     61,     64,\n      70,     78,     88,    101,\n     116,    126,    134,    150,\n     158,    176,    186,    192,\n     206,    208,    210,    214,\n     219,    221,    224,    229,\n     231,    235,    233,    240,\n     241,    250,    248,    251,\n     246,    245,    236,    228,\n     219,    203,    192,    171,\n     154,    130,    108,     89,\n      72,     53,     38,     24,\n      15,      5,      1,      2,\n       9,     17,     28,     41,\n      55,     68,     78,     93,\n     104,    118,    124,    128,\n     131,    127,    128,    125,\n     122,    115,    113,    105,\n     100,     97,     93,     92,\n      93,     97,    100,    108,\n     116,     10,     15,     35,\n      61,     98,    130,    164,\n     193,    207,    208,    193,\n     170,    149,    126,    114,\n     112,    112,    123,    136,\n     153,    175,    183,    183,\n     169,    137,    107,     74,\n      44,     21,      2,      3,\n      20,     46,     91,    135,\n     178,    210,    228,    242,\n     240,    227,    204,    175,\n     145,    113,     81,     66,\n      58,     59,     62,     66,\n      72,     75,     81,     87,\n      99,    112,    115,    121,\n     140,    158,    195,    212,\n     213,    208,    174,    131,\n     115,    109,    119,    136,\n     159,    173,    198,    223,\n     247,    255,    242,    211,\n     157,    107,     69,     39,\n      29,     27,     34,     58,\n      91,    136,    175,    202,\n     218,    208,    183,    150,\n     113,     81,     46,     25,\n      16,     28,     62,    105,\n     147,    185,    195,    196,\n     181,    162,    143,    106,\n      73,     46,     28,     42,\n      67,    108,    151,    186,\n     213,    223,    227,    216,\n     181,    146,     97,     52,\n      25,     10,    128,    129,\n     125,    124,    122,    121,\n     117,    110,    101,     92,\n      84,     79,     79,     79,\n      86,     88,     94,     99,\n     104,    108,    114,    120,\n     123,    130,    131,    134,\n     137,    142,    145,    149,\n     155,    161,    162,    165,\n     166,    167,    168,    165,\n     164,    158,    150,    139,\n     126,    118,    109,    102,\n      93,     87,     81,     76,\n      76,     77,     82,     82,\n      84,     82,     82,     79,\n      83,     96,    114,    138,\n     156,    170,    179,    177,\n     172,    169,    171,    170,\n     169,    164,    163,    170,\n     187,    209,    233,    249,\n     255,    240,    218,    194,\n     168,    151,    138,    132,\n     127,    125,    120,    120,\n     118,    121,    120,    111,\n      98,     75,     53,     29,\n      18,     16,     28,     45,\n      68,     85,     99,    106,\n     108,    112,    112,    114,\n     111,    113,    111,    114,\n     124,    140,    160,    174,\n     190,    193,    192,    183,\n     170,    155,    144,    138,\n     132,    130,    128,    168,\n     171,    166,    165,    162,\n     163,    158,    155,    147,\n     144,    137,    131,    126,\n     122,    119,    114,    111,\n     106,    107,    103,    107,\n     105,    107,    105,    104,\n     101,    102,    101,    100,\n     100,    101,    104,    104,\n     109,    109,    115,    117,\n     122,    125,    129,    130,\n     129,    125,    122,    120,\n     112,    111,    105,    103,\n      96,     96,     96,     97,\n     104,    108,    120,    126,\n     127,    125,    128,    132,\n     143,    150,    161,    166,\n     167,    172,    181,    196,\n     212,    226,    236,    242,\n     249,    250,    255,    255,\n     255,    249,    236,    221,\n     208,    193,    179,    167,\n     155,    148,    132,    121,\n     107,     99,     88,     82,\n      71,     65,     52,     42,\n      30,     23,     20,     14,\n      15,     14,     19,     21,\n      26,     31,     43,     52,\n      66,     76,     88,     98,\n     105,    115,    125,    139,\n     143,    153,    154,    161,\n     162,    166,    165,    169,\n     170,    171,    170,    168,\n     105,    117,    127,    138,\n     143,    147,    145,    139,\n     130,    122,    115,    108,\n     109,    111,    120,    126,\n     131,    142,    144,    145,\n     136,    122,     99,     79,\n      60,     58,     72,    100,\n     140,    181,    217,    233,\n     230,    203,    165,    124,\n      91,     76,     82,    113,\n     154,    198,    229,    242,\n     227,    186,    133,     76,\n      32,      1,      5,     27,\n      66,    108,    137,    158,\n     154,    132,     99,     73,\n      51,     49,     59,     86,\n     114,    143,    169,    186,\n     196,    194,    189,    178,\n     171,    167,    165,    174,\n     181,    191,    195,    194,\n     187,    180,    164,    146,\n     131,    114,    101,     87,\n      82,     81,     87,     94,\n     106,    114,    114,    111,\n     101,     87,     73,     63,\n      59,     65,     79,     95,\n     119,    141,    158,    166,\n     165,    158,    139,    125,\n     110,    106,    109,    121,\n     137,    154,    167,    171,\n     169,    156,    142,    121,\n     107,     96,     94,     95,\n     105,    194,    198,    207,\n     201,    202,    189,    181,\n     167,    168,    164,    165,\n     154,    154,    139,    135,\n     120,    109,    107,    100,\n      97,     86,     82,     73,\n      73,     66,     70,     63,\n      66,     58,     66,     71,\n      88,     89,     91,     80,\n      78,     71,     76,     80,\n      91,    102,    103,    103,\n     103,    103,    101,    106,\n     102,    110,     96,    100,\n      96,    111,    124,    141,\n     156,    167,    153,    147,\n     141,    151,    172,    194,\n     211,    200,    191,    178,\n     186,    195,    219,    225,\n     229,    213,    206,    189,\n     198,    204,    215,    210,\n     197,    175,    161,    146,\n     139,    143,    141,    135,\n     113,    102,     81,     84,\n      74,     86,     77,     74,\n      56,     52,     38,     41,\n      49,     47,     49,     35,\n      16,      7,      1,     35,\n      72,     93,    109,     93,\n      88,     80,    100,    125,\n     158,    171,    180,    168,\n     166,    168,    184,    205,\n     218,    222,    214,    205,\n     190,    194,    129,    151,\n     182,    191,    195,    181,\n     171,    155,    155,    155,\n     168,    175,    189,    185,\n     178,    154,    131,    115,\n     117,    133,    150,    156,\n     144,    118,     88,     81,\n      83,    107,    122,    133,\n     117,     99,     75,     71,\n      79,    101,    113,    114,\n      98,     81,     71,     73,\n      86,    101,    113,    107,\n     103,     91,     92,     90,\n      99,    103,    119,    127,\n     142,    145,    145,    128,\n     118,    120,    134,    153,\n     159,    154,    136,    132,\n     150,    185,    204,    204,\n     181,    159,    151,    180,\n     212,    245,    240,    213,\n     173,    153,    158,    186,\n     209,    211,    189,    157,\n     132,    122,    133,    143,\n     153,    139,    129,    107,\n      97,     82,     81,     73,\n      78,     86,     95,     92,\n      71,     36,      7,      1,\n      33,     82,    114,    117,\n      75,     34,      7,     35,\n      87,    144,    166,    154,\n     107,     75,     70,    105,\n     155,    191,    195,    172,\n     143,    123,    129,     72,\n      66,     89,    126,    157,\n     167,    154,    123,     92,\n      78,     89,    113,    148,\n     170,    175,    155,    123,\n      96,     85,     97,    126,\n     156,    173,    165,    136,\n     103,     81,     81,    104,\n     138,    164,    170,    148,\n     115,     86,     77,     92,\n     124,    154,    168,    158,\n     134,    106,     93,    101,\n     125,    154,    171,    170,\n     148,    119,     98,     99,\n     116,    147,    176,    184,\n     166,    130,     89,     59,\n      48,     58,     95,    136,\n     171,    185,    165,    120,\n      75,     61,     91,    156,\n     226,    255,    238,    174,\n     108,     73,     93,    153,\n     220,    250,    224,    160,\n      90,     51,     58,    105,\n     155,    183,    173,    132,\n      80,     44,     37,     59,\n      99,    135,    152,    144,\n     116,     78,     46,     41,\n      66,    117,    167,    194,\n     183,    138,     89,     62,\n      80,    129,    187,    220,\n     212,    165,    109,     74,\n      77,    116,    163,    194,\n     189,    156,    108,     72,\n      76,     47,     48,     80,\n     136,    189,    213,    190,\n     135,     78,     52,     75,\n     142,    218,    255,    245,\n     177,    101,     52,     59,\n     117,    186,    232,    215,\n     159,     83,     32,     26,\n      66,    125,    166,    172,\n     139,     88,     45,     29,\n      48,     92,    132,    159,\n     160,    139,    109,     87,\n      86,    107,    145,    180,\n     200,    194,    163,    128,\n     105,    108,    139,    180,\n     211,    205,    170,    111,\n      60,     31,     39,     84,\n     132,    177,    190,    161,\n     101,     44,     25,     60,\n     133,    210,    241,    224,\n     161,     93,     59,     79,\n     142,    212,    250,    232,\n     175,    108,     66,     69,\n     108,    162,    194,    192,\n     158,    108,     66,     46,\n      61,     93,    131,    155,\n     153,    123,     82,     42,\n      28,     48,     98,    152,\n     182,    173,    131,     80,\n      52,     66,    118,    174,\n     213,    211,    169,    114,\n      78,     82,    119,    168,\n     199,    197,    170,    121,\n      76,     59,     42,     38,\n      46,     74,     92,    110,\n     118,    135,    175,    174,\n     229,    247,    255,    241,\n     232,    208,    188,    151,\n     126,    114,    101,    108,\n      84,     68,     33,     15,\n      22,     59,    113,    139,\n     139,    124,    105,    114,\n     143,    168,    190,    169,\n     133,    121,    119,    130,\n     124,    104,     82,     65,\n      81,    109,    130,    134,\n     109,    104,    119,    166,\n     223,    240,    206,    154,\n      96,     73,     64,     84,\n     112,    113,    127,    139,\n     137,    121,     84,     68,\n      70,    109,    186,    221,\n     236,    186,    119,     68,\n      71,    121,    197,    227,\n     202,    143,     73,     37,\n      41,    101,    154,    177,\n     167,    135,    106,     89,\n      94,    120,    136,    154,\n     166,    163,    155,    128,\n      83,     50,     37,     76,\n     128,    175,    182,    129,\n      64,     19,     35,    113,\n     183,    238,    227,    164,\n     107,     79,    112,    170,\n     210,    219,    183,    140,\n      92,     59,    184,    157,\n      84,      7,    109,    254,\n     193,     59,     87,    155,\n     124,    180,    203,    108,\n      31,    149,    236,    173,\n      92,    101,    116,    126,\n     190,    184,     86,     48,\n     138,    189,    141,    110,\n     114,    102,    116,    170,\n     159,     72,     70,    167,\n     182,    114,     94,    103,\n     101,    131,    183,    158,\n      64,     62,    132,    152,\n     154,    131,    106,     66,\n     103,    184,    198,    111,\n      83,     89,    110,    118,\n     187,    177,     94,     79,\n     147,    172,    123,    108,\n     124,    106,    102,    150,\n     144,    101,    116,    166,\n     128,     66,     89,    144,\n     160,    151,    144,     91,\n      72,    116,    168,    179,\n     130,     87,     72,    131,\n     205,    170,     69,     58,\n     158,    177,    134,    125,\n     107,     80,    139,    223,\n     141,     52,     90,    151,\n     146,    173,    191,     74,\n      11,    122,    255,    188,\n      96,     72,     52,    122,\n     253,    227,     43,      1,\n     137,    207,    184,    153,\n      93,    110,    120,    152,\n     124,     90,    124,    181,\n     155,     58,    125,    183,\n     150,     80,    131,    157,\n     144,    115,    110,    128,\n     149,    173,     93,    113,\n     118,    146,    124,    145,\n     117,    140,    116,    117,\n     129,    136,    144,    114,\n     126,    128,    117,    142,\n     134,    127,     97,    163,\n     163,     90,     67,    161,\n     149,    149,     95,    124,\n     137,    119,    122,    168,\n     142,     96,     89,    170,\n     119,    117,    142,    148,\n      52,     93,    194,    178,\n      58,     75,    150,    194,\n     107,     82,    102,    193,\n     151,    108,     57,    135,\n     220,    142,     31,    109,\n     232,    171,     24,     58,\n     239,    198,     51,     24,\n     179,    255,     92,     37,\n     102,    227,    141,     56,\n     110,    186,    152,     74,\n     118,    143,    148,    119,\n     114,    132,    156,    120,\n      91,    143,    140,    145,\n     119,    133,    152,     75,\n     101,    174,    188,     96,\n      82,    115,    182,    153,\n     118,     58,      1,     22,\n      51,     63,     40,     51,\n      87,    124,    133,    165,\n     194,    200,    185,    176,\n     160,    146,    130,    126,\n     132,    143,    134,    113,\n     120,    137,    141,    130,\n     129,    131,    129,    111,\n     100,     99,    106,    117,\n     110,    115,    121,    121,\n     125,    128,    129,    133,\n     143,    142,    119,    118,\n     135,    144,    151,    142,\n     137,    146,    154,    167,\n     173,    155,    128,    114,\n     132,    135,    123,     97,\n      75,     65,     85,    117,\n     118,    106,    109,    121,\n     136,    138,    137,    135,\n     139,    137,    131,    121,\n     116,    136,    138,    125,\n     135,    145,    144,    138,\n     143,    151,    139,    126,\n     124,    146,    153,    130,\n     106,     93,    108,    114,\n     114,    109,    106,    106,\n     116,    137,    131,    133,\n     150,    160,    152,    137,\n     119,    104,     98,     97,\n     121,    122,    119,    137,\n     167,    208,    214,    184,\n     171,    199,    208,    148,\n     118,     95,     66,      1,\n       2,     32,     50,     41,\n      56,     97,    138,    149,\n     166,    181,    186,    173,\n     165,    156,    149,    134,\n     122,    125,    138,    136,\n     123,    126,    140,    146,\n     136,    125,    120,    122,\n     118,    109,    102,    101,\n     107,    108,    110,    115,\n     120,    127,    132,    131,\n     134,    144,    146,    137,\n     137,    144,    144,    142,\n     139,    142,    147,    146,\n     143,    148,    147,    138,\n     129,    128,    122,    117,\n     111,    104,     94,    101,\n     114,    116,    112,    115,\n     122,    130,    132,    127,\n     123,    123,    122,    122,\n     115,    115,    126,    129,\n     123,    132,    144,    145,\n     140,    143,    151,    153,\n     143,    135,    137,    141,\n     133,    119,    108,    109,\n     111,    114,    113,    112,\n     112,    125,    139,    137,\n     132,    138,    138,    125,\n     110,    102,     98,     93,\n      95,    121,    147,    159,\n     164,    187,    229,    255,\n     220,    180,    192,    167,\n     113,     95,     94,     72,\n       1,     37,     86,    124,\n      92,     61,     71,     94,\n      94,    129,    170,    194,\n     167,    141,    133,    146,\n     149,    148,    153,    163,\n     152,    125,    110,    119,\n     131,    127,    116,    113,\n     118,    113,    105,    100,\n     105,    122,    126,    126,\n     120,    124,    127,    125,\n     126,    132,    143,    148,\n     139,    144,    154,    153,\n     148,    141,    146,    151,\n     147,    139,    134,    128,\n     124,    123,    128,    130,\n     133,    127,    117,     99,\n     103,    113,    121,    118,\n     113,    109,    109,    110,\n     109,    110,    120,    123,\n     125,    118,    120,    130,\n     133,    126,    140,    157,\n     163,    146,    129,    126,\n     131,    133,    136,    142,\n     149,    139,    127,    114,\n     118,    128,    141,    135,\n     119,    101,     97,     95,\n      89,     94,    121,    134,\n     130,    122,    137,    158,\n     153,    130,    152,    196,\n     215,    174,    181,    180,\n     146,    131,    130,    177,\n     173,    109,     94,    155,\n     118,      1,     15,     70,\n      93,     43,     12,     48,\n     118,    160,    171,    188,\n     200,    181,    171,    145,\n     131,    105,     97,    102,\n     103,     97,     93,    111,\n     147,    168,    159,    136,\n     130,    144,    152,    143,\n     123,     98,    103,    111,\n     111,    107,    104,    114,\n     121,    131,    136,    144,\n     153,    150,    164,    169,\n     162,    152,    140,    138,\n     127,    124,    118,    124,\n     130,    124,    128,    133,\n     138,    141,    137,    129,\n     108,    108,    109,    110,\n     105,     97,     92,    104,\n     123,    129,    123,    118,\n     114,    125,    129,    132,\n     137,    143,    133,    133,\n     140,    143,    137,    131,\n     128,    128,    123,    126,\n     135,    147,    145,    138,\n     124,    121,    123,    127,\n     114,     88,     66,     81,\n     107,    130,    139,    167,\n     192,    190,    170,    159,\n     178,    183,    133,     99,\n     103,     60,     59,    137,\n     196,    175,    126,    121,\n     195,    245,    192,    155,\n     149,    113,     27,     24,\n      64,     82,     52,     29,\n      56,    109,    146,    164,\n     175,    201,    218,    196,\n     154,    129,    101,     93,\n     106,    110,     98,     78,\n      85,    105,    127,    140,\n     144,    146,    158,    163,\n     149,    127,    115,    124,\n     132,    129,    120,    110,\n     116,    124,    131,    137,\n     145,    154,    154,    154,\n     145,    132,    125,    124,\n     128,    124,    118,    108,\n     110,    117,    119,    124,\n     128,    138,    143,    139,\n     133,    120,    118,    124,\n     133,    134,    127,    118,\n     118,    125,    127,    124,\n     126,    130,    135,    126,\n     113,    103,    109,    118,\n     125,    128,    123,    118,\n     121,    127,    139,    145,\n     149,    151,    156,    148,\n     132,    115,    107,    105,\n     115,    115,    101,     97,\n     128,    156,    162,    149,\n     164,    197,    212,    173,\n     136,    103,     58,     59,\n      75,     91,     70,     64,\n     112,    171,    189,    179,\n     180,    226,    255,    212,\n     149,    154,    122,     34,\n       1,     46,     77,     58,\n      26,     34,     75,    119,\n     152,    177,    192,    193,\n     174,    158,    154,    148,\n     132,    121,    108,     85,\n      81,    105,    133,    143,\n     138,    127,    124,    143,\n     160,    157,    134,    115,\n     111,    117,    121,    116,\n     113,    119,    123,    129,\n     131,    138,    146,    149,\n     150,    148,    140,    139,\n     135,    137,    129,    117,\n     106,    109,    122,    127,\n     122,    117,    118,    126,\n     132,    135,    132,    125,\n     125,    128,    130,    130,\n     128,    132,    139,    140,\n     131,    120,    114,    118,\n     116,    112,    100,    101,\n     105,    119,    131,    132,\n     130,    135,    145,    160,\n     157,    143,    135,    128,\n     125,    113,    104,    100,\n     103,    129,    148,    146,\n     131,    139,    178,    209,\n     201,    163,    156,    123,\n      82,     87,     90,     57,\n      30,     34,     68,     87,\n     109,    165,    224,    238,\n     207,    184,    215,    250,\n     221,    154,    177,    137,\n      65,      3,     35,     72,\n      77,     40,     25,     47,\n      85,    114,    136,    155,\n     167,    159,    153,    145,\n     139,    134,    135,    140,\n     159,    160,    145,    147,\n     148,    130,    120,    115,\n     123,    128,    126,    114,\n     101,    104,    120,    138,\n     143,    136,    130,    119,\n     106,    107,    121,    134,\n     135,    138,    146,    151,\n     146,    144,    145,    138,\n     129,    121,    112,    108,\n     107,    106,    108,    119,\n     136,    143,    145,    139,\n     138,    140,    137,    142,\n     145,    136,    125,    123,\n     123,    118,    113,    108,\n     108,    108,    111,    114,\n     114,    114,    121,    137,\n     136,    126,    130,    124,\n     114,    114,    112,    115,\n     127,    153,    174,    180,\n     171,    152,    161,    190,\n     203,    172,    134,    127,\n      89,     79,     94,    113,\n      98,     54,     54,     79,\n      77,     70,     79,    110,\n     124,    137,    174,    218,\n     232,    206,    176,    207,\n     255,    244,    177,    208,\n     145,     94,     36,     46,\n      74,     66,     36,     26,\n      53,     90,    117,    138,\n     155,    163,    157,    149,\n     143,    134,    127,    134,\n     144,    147,    135,    123,\n     142,    166,    175,    155,\n     129,    122,    124,    135,\n     131,    114,     99,    100,\n     105,    106,    111,    120,\n     124,    123,    124,    131,\n     139,    141,    141,    147,\n     144,    133,    124,    117,\n     120,    123,    117,    110,\n     112,    122,    134,    139,\n     139,    145,    150,    148,\n     142,    139,    142,    135,\n     126,    116,    111,    116,\n     121,    128,    125,    123,\n     128,    123,    122,    124,\n     125,    120,    109,    100,\n     102,    102,     94,     95,\n     105,    119,    137,    152,\n     171,    188,    199,    189,\n     187,    192,    190,    169,\n     141,    111,     63,     61,\n      92,     95,     78,     72,\n      96,    116,    112,    118,\n     130,    123,    101,     89,\n      96,    104,    110,    135,\n     178,    209,    201,    177,\n     194,    238,    255,    208,\n     231,    155,    102,     42,\n      38,     70,     72,     50,\n      28,     42,     81,    116,\n     138,    158,    176,    180,\n     173,    160,    145,    131,\n     121,    119,    117,    111,\n     111,    130,    151,    159,\n     148,    136,    143,    168,\n     176,    149,    119,     99,\n      95,    104,    105,    100,\n      98,    102,    106,    110,\n     117,    128,    139,    146,\n     151,    149,    141,    130,\n     124,    127,    129,    124,\n     117,    118,    129,    134,\n     132,    135,    149,    157,\n     153,    143,    135,    131,\n     132,    131,    119,    108,\n     116,    126,    129,    126,\n     120,    120,    114,    115,\n     120,    116,    101,     89,\n      85,     93,    105,    116,\n     138,    161,    170,    170,\n     169,    184,    210,    223,\n     191,    155,    110,     82,\n      98,    106,     93,     53,\n      48,     82,    114,    125,\n     130,    143,    154,    143,\n     138,    131,    115,     92,\n      78,     80,     92,     99,\n     124,    167,    205,    206,\n     179,    174,    215,    255,\n     231,    252,    166,    112,\n      42,     12,     55,     63,\n      37,     11,     31,     78,\n     118,    140,    164,    184,\n     188,    180,    169,    152,\n     136,    120,    120,    121,\n     115,    107,    117,    136,\n     147,    141,    135,    140,\n     162,    163,    144,    127,\n     123,    139,    139,    120,\n      96,     82,     94,    101,\n     100,     94,     96,    106,\n     120,    133,    146,    150,\n     149,    145,    147,    146,\n     139,    130,    133,    151,\n     159,    145,    133,    133,\n     145,    152,    143,    119,\n     103,    112,    121,    120,\n     111,    112,    126,    135,\n     132,    122,    113,     98,\n      89,     87,     89,     86,\n      90,    107,    140,    168,\n     170,    167,    181,    215,\n     234,    201,    159,    144,\n     121,    116,    116,     89,\n      58,     56,     78,     98,\n      86,     90,    124,    154,\n     158,    151,    149,    153,\n     141,    129,    121,    105,\n      81,     65,     70,     89,\n     101,    118,    155,    207,\n     228,    204,    183,    210,\n     255,    252,    255,    166,\n     114,     48,      5,     56,\n      79,     67,     35,     40,\n      78,    118,    142,    163,\n     177,    180,    170,    163,\n     153,    143,    127,    126,\n     126,    129,    126,    126,\n     136,    142,    129,    112,\n     104,    121,    138,    141,\n     127,    109,    110,    119,\n     119,    120,    132,    136,\n     118,    104,     97,    102,\n     123,    137,    139,    139,\n     139,    138,    139,    149,\n     155,    153,    138,    123,\n     128,    138,    134,    121,\n     112,    122,    141,    149,\n     140,    131,    135,    136,\n     129,    123,    127,    126,\n     115,     99,     82,     77,\n      85,    104,    127,    146,\n     143,    128,    128,    161,\n     208,    210,    170,    147,\n     121,    111,    124,    125,\n     116,     96,     95,    108,\n     107,    104,    120,    139,\n     145,    120,    107,    122,\n     141,    138,    127,    125,\n     134,    130,    128,    132,\n     130,    104,     77,     70,\n      91,    111,    128,    150,\n     186,    205,    187,    165,\n     193,    246,    255,    255,\n     181,    131,     75,     25,\n      67,     89,     76,     38,\n      38,     70,    111,    136,\n     161,    178,    181,    170,\n     164,    156,    149,    129,\n     119,    116,    120,    117,\n     119,    131,    143,    140,\n     131,    125,    129,    131,\n     119,    102,     86,     87,\n      99,    106,    110,    115,\n     124,    134,    144,    156,\n     165,    158,    152,    139,\n     137,    147,    144,    129,\n     110,    103,    110,    119,\n     123,    125,    130,    135,\n     140,    141,    143,    148,\n     153,    143,    128,    122,\n     117,    107,     95,     92,\n     100,    109,    118,    129,\n     149,    162,    158,    148,\n     160,    181,    183,    141,\n     113,    102,     79,     84,\n      99,    100,     89,     90,\n     107,    135,    151,    163,\n     167,    158,    139,    134,\n     136,    130,    105,     93,\n     102,    122,    127,    125,\n     132,    149,    149,    140,\n     131,    127,    111,     91,\n      74,     76,     88,    112,\n     141,    178,    193,    181,\n     162,    188,    235,    255,\n     255,    192,    135,     89,\n      28,     55,     80,     77,\n      51,     46,     76,    116,\n     138,    155,    171,    184,\n     180,    164,    145,    134,\n     119,    112,    111,    111,\n     109,    113,    127,    140,\n     139,    129,    126,    135,\n     147,    145,    125,    101,\n      94,     99,     98,     94,\n      95,    103,    119,    129,\n     135,    143,    158,    174,\n     184,    188,    172,    150,\n     139,    114,    102,    103,\n     104,    101,    102,    109,\n     120,    132,    140,    148,\n     155,    152,    133,    112,\n     105,    107,    109,    112,\n     127,    150,    161,    157,\n     147,    161,    184,    181,\n     149,    134,    103,     79,\n      84,     92,     93,     78,\n      79,    102,    119,    125,\n     132,    138,    145,    151,\n     158,    156,    140,    122,\n     123,    134,    140,    125,\n     110,    118,    138,    144,\n     133,    124,    131,    139,\n     137,    123,    110,     94,\n      81,     73,     78,     90,\n     112,    139,    174,    197,\n     193,    173,    184,    226,\n     255,    255,    213,    143,\n      96,     27,     35,     73,\n      82,     59,     44,     70,\n     111,    138,    151,    160,\n     168,    164,    153,    139,\n     130,    124,    119,    120,\n     119,    119,    129,    142,\n     148,    140,    122,    115,\n     125,    135,    133,    119,\n     101,     98,    108,    113,\n     111,    108,    109,    117,\n     123,    121,    121,    134,\n     156,    172,    173,    156,\n     145,    151,    166,    162,\n     136,    114,     97,    107,\n     120,    118,    107,     95,\n      97,    109,    124,    128,\n     126,    136,    157,    172,\n     164,    148,    154,    178,\n     195,    166,    133,    117,\n      89,     86,     99,     94,\n      71,     62,     78,     99,\n     107,    117,    136,    149,\n     150,    147,    144,    145,\n     147,    150,    147,    133,\n     117,    116,    127,    139,\n     127,    110,    109,    125,\n     142,    141,    130,    127,\n     129,    131,    124,    113,\n      96,     82,     76,     79,\n      87,    104,    136,    179,\n     214,    214,    189,    187,\n     221,    255,    255,    234,\n     160,    106,     41,     16,\n      50,     75,     66,     38,\n      43,     83,    122,    144,\n     158,    171,    178,    171,\n     155,    141,    127,    110,\n     102,    106,    108,    111,\n     119,    129,    132,    126,\n     125,    135,    146,    150,\n     142,    125,    113,    114,\n     117,    122,    124,    119,\n     115,    114,    113,    108,\n     107,    116,    130,    144,\n     148,    151,    153,    159,\n     162,    156,    145,    143,\n     143,    120,     96,     85,\n      81,    100,    131,    159,\n     164,    145,    137,    160,\n     200,    214,    180,    149,\n     127,    102,     98,    102,\n      99,     70,     55,     73,\n      90,     95,    101,    116,\n     124,    120,    125,    139,\n     144,    142,    138,    135,\n     138,    145,    154,    161,\n     156,    139,    123,    121,\n     128,    126,    119,    114,\n     117,    126,    123,    115,\n     115,    118,    125,    126,\n     110,     89,     76,     73,\n      81,    100,    125,    152,\n     184,    219,    230,    211,\n     194,    215,    255,    249,\n     255,    199,    133,     78,\n      21,     33,     62,     63,\n      44,     42,     73,    110,\n     133,    155,    173,    177,\n     164,    143,    128,    113,\n      98,     90,     95,    101,\n     107,    118,    131,    143,\n     148,    151,    151,    151,\n     154,    152,    145,    133,\n     119,    109,    104,    106,\n     111,    110,    106,    101,\n     104,    117,    132,    142,\n     147,    151,    153,    140,\n     126,    119,    120,    119,\n     119,    115,    108,    124,\n     157,    195,    206,    184,\n     169,    174,    193,    186,\n     144,    119,     89,     61,\n      79,    100,     95,     78,\n      84,    106,    109,    107,\n     117,    125,    125,    117,\n     115,    111,    107,    113,\n     128,    136,    137,    137,\n     141,    150,    157,    161,\n     162,    158,    145,    129,\n     121,    121,    114,    103,\n      96,     99,    109,    113,\n     116,    125,    132,    136,\n     136,    127,    118,    107,\n      96,     85,     86,    101,\n     122,    159,    198,    223,\n     212,    191,    207,    249,\n     183,    177,    165,    151,\n     137,    117,    105,     93,\n      85,     76,     71,     62,\n      52,     45,     38,     38,\n      38,     38,     35,     27,\n      19,      8,      2,      1,\n       7,     15,     26,     32,\n      36,     40,     43,     48,\n      58,     67,     78,     88,\n      96,    105,    116,    130,\n     145,    160,    173,    182,\n     186,    191,    198,    209,\n     222,    236,    245,    252,\n     252,    247,    243,    238,\n     235,    235,    235,    234,\n     232,    228,    222,    215,\n     207,    199,    188,    178,\n     164,    149,    139,    132,\n     124,    118,    111,     97,\n      83,     68,     58,     47,\n      43,     40,     36,     32,\n      26,     23,     20,     20,\n      26,     32,     39,     45,\n      51,     55,     60,     65,\n      74,     81,     90,     98,\n     104,    113,    125,    139,\n     153,    166,    178,    185,\n     190,    195,    204,    211,\n     219,    226,    226,    225,\n     218,    213,    210,    211,\n     215,    221,    223,    222,\n     215,    207,    197,    190,\n     183,    201,    199,    193,\n     181,    163,    143,    128,\n     115,    110,    107,    107,\n      99,     90,     76,     65,\n      56,     47,     42,     35,\n      25,     18,      9,      3,\n       1,      5,     11,     17,\n      20,     23,     25,     30,\n      35,     44,     49,     54,\n      56,     57,     59,     64,\n      74,     88,    101,    109,\n     112,    113,    113,    116,\n     127,    139,    153,    167,\n     177,    185,    190,    195,\n     202,    211,    218,    226,\n     230,    235,    239,    244,\n     247,    247,    242,    232,\n     218,    202,    186,    181,\n     178,    176,    174,    166,\n     153,    140,    125,    118,\n     114,    115,    114,    111,\n     101,     87,     76,     71,\n      68,     74,     80,     86,\n      90,     93,     98,    102,\n     108,    116,    119,    118,\n     116,    111,    111,    116,\n     126,    136,    144,    145,\n     140,    135,    130,    133,\n     143,    156,    172,    177,\n     178,    172,    168,    170,\n     179,    193,    209,    219,\n     224,    219,    211,    203,\n     199,    201,    115,    116,\n     117,    118,    115,    108,\n      99,     91,     84,     81,\n      81,     81,     79,     73,\n      64,     53,     42,     34,\n      29,     27,     26,     27,\n      26,     24,     22,     20,\n      19,     17,     16,     16,\n      16,     15,     16,     15,\n      17,     21,     27,     33,\n      40,     46,     53,     59,\n      65,     69,     75,     80,\n      87,     95,    104,    113,\n     120,    127,    135,    139,\n     143,    147,    149,    150,\n     151,    150,    152,    153,\n     158,    161,    166,    169,\n     169,    168,    164,    159,\n     157,    157,    158,    160,\n     164,    165,    167,    166,\n     167,    170,    175,    181,\n     188,    197,    203,    210,\n     216,    219,    225,    228,\n     233,    237,    242,    247,\n     251,    253,    255,    253,\n     246,    239,    228,    219,\n     211,    206,    201,    195,\n     189,    180,    171,    161,\n     154,    150,    147,    148,\n     145,    140,    133,    126,\n     121,    120,    122,    127,\n     133,    135,    132,    127,\n     120,    116,    115,    190,\n     185,    179,    173,    166,\n     159,    154,    149,    142,\n     136,    127,    118,    107,\n      97,     87,     78,     69,\n      60,     50,     40,     29,\n      19,     12,      5,      3,\n       1,      1,      3,      5,\n       8,     11,     13,     16,\n      18,     20,     23,     28,\n      34,     42,     50,     59,\n      65,     71,     76,     82,\n      89,     99,    110,    122,\n     133,    141,    147,    151,\n     154,    157,    161,    165,\n     168,    172,    174,    178,\n     181,    185,    187,    190,\n     190,    188,    186,    183,\n     181,    181,    181,    182,\n     183,    183,    180,    177,\n     172,    169,    167,    165,\n     165,    163,    162,    158,\n     155,    151,    147,    142,\n     138,    136,    133,    132,\n     132,    133,    134,    135,\n     135,    132,    131,    129,\n     128,    130,    131,    133,\n     135,    134,    134,    135,\n     137,    141,    147,    152,\n     159,    164,    169,    173,\n     178,    184,    190,    197,\n     201,    204,    204,    202,\n     199,    195,    192,    190,\n     146,    143,    139,    133,\n     123,    113,    102,     94,\n      86,     80,     75,     70,\n      65,     60,     53,     47,\n      41,     35,     30,     26,\n      21,     17,     13,      9,\n       5,      3,      1,      1,\n       1,      3,      5,      6,\n       6,      5,      5,      4,\n       4,      5,      8,     11,\n      14,     17,     19,     20,\n      21,     22,     23,     27,\n      33,     40,     48,     54,\n      60,     65,     69,     74,\n      80,     87,     97,    107,\n     119,    131,    143,    155,\n     165,    174,    181,    186,\n     190,    194,    200,    206,\n     214,    222,    230,    235,\n     237,    237,    236,    235,\n     236,    239,    241,    245,\n     246,    247,    245,    241,\n     236,    231,    229,    227,\n     226,    227,    229,    231,\n     232,    231,    228,    224,\n     217,    211,    205,    200,\n     197,    195,    193,    193,\n     194,    193,    191,    188,\n     184,    180,    176,    172,\n     170,    169,    170,    170,\n     169,    168,    165,    161,\n     156,    152,    149,    147,\n     146,    171,    166,    162,\n     155,    148,    139,    128,\n     117,    103,     92,     83,\n      77,     74,     71,     70,\n      68,     63,     57,     47,\n      37,     27,     18,     10,\n       5,      2,      1,      2,\n       5,      6,      9,     11,\n      12,     11,     12,     12,\n      15,     19,     24,     28,\n      30,     30,     27,     24,\n      22,     21,     25,     31,\n      41,     53,     64,     75,\n      83,     90,     95,    100,\n     107,    113,    120,    130,\n     139,    150,    160,    169,\n     176,    182,    186,    186,\n     187,    187,    187,    190,\n     193,    198,    202,    205,\n     204,    201,    199,    196,\n     195,    196,    198,    199,\n     200,    201,    199,    198,\n     194,    191,    189,    190,\n     190,    191,    193,    195,\n     199,    203,    205,    207,\n     206,    203,    198,    192,\n     186,    181,    178,    176,\n     175,    178,    178,    179,\n     176,    173,    171,    168,\n     167,    167,    170,    174,\n     178,    181,    184,    185,\n     185,    183,    181,    177,\n     174,    171,    189,    188,\n     189,    188,    188,    187,\n     185,    179,    170,    160,\n     150,    142,    136,    131,\n     129,    124,    118,    112,\n     104,     95,     86,     76,\n      65,     52,     40,     29,\n      22,     19,     19,     19,\n      19,     17,     12,      8,\n       6,      6,     10,     14,\n      17,     18,     17,     14,\n      13,     12,     17,     24,\n      32,     39,     46,     51,\n      57,     64,     72,     81,\n      89,     95,     98,     99,\n     101,    105,    112,    120,\n     130,    138,    144,    146,\n     147,    151,    158,    168,\n     179,    190,    199,    204,\n     206,    205,    206,    209,\n     215,    223,    233,    241,\n     247,    251,    252,    252,\n     253,    252,    253,    253,\n     255,    255,    254,    249,\n     242,    232,    220,    206,\n     193,    181,    169,    157,\n     145,    132,    119,    106,\n      96,     89,     85,     85,\n      86,     89,     90,     93,\n      97,    101,    105,    110,\n     115,    119,    122,    128,\n     137,    146,    158,    170,\n     179,    185,    189,    154,\n     160,    167,    173,    179,\n     184,    187,    187,    183,\n     179,    174,    172,    172,\n     174,    178,    180,    178,\n     177,    171,    165,    161,\n     157,    153,    149,    143,\n     134,    125,    115,    106,\n      97,     91,     83,     76,\n      69,     60,     54,     49,\n      45,     42,     39,     33,\n      27,     21,     16,     15,\n      17,     21,     25,     30,\n      33,     35,     36,     39,\n      42,     48,     55,     62,\n      67,     73,     79,     89,\n     100,    115,    129,    141,\n     151,    158,    164,    170,\n     177,    186,    195,    204,\n     212,    219,    222,    226,\n     230,    235,    239,    246,\n     250,    253,    255,    255,\n     253,    250,    245,    237,\n     227,    217,    206,    197,\n     187,    178,    169,    159,\n     146,    133,    121,    107,\n      96,     88,     79,     72,\n      66,     60,     55,     54,\n      53,     54,     58,     60,\n      65,     67,     71,     76,\n      82,     87,     94,    100,\n     105,    112,    118,    125,\n     133,    140,    148,    154,\n     109,    106,    104,    104,\n     102,     99,     93,     87,\n      79,     73,     68,     66,\n      63,     60,     58,     54,\n      50,     50,     52,     56,\n      62,     67,     70,     70,\n      68,     65,     64,     64,\n      66,     68,     69,     67,\n      64,     59,     55,     53,\n      53,     56,     58,     60,\n      59,     56,     52,     48,\n      46,     45,     44,     44,\n      44,     43,     42,     40,\n      40,     40,     42,     45,\n      48,     52,     58,     64,\n      73,     83,     93,    103,\n     111,    118,    123,    129,\n     136,    143,    153,    162,\n     171,    179,    185,    189,\n     194,    199,    207,    214,\n     223,    231,    236,    239,\n     240,    242,    243,    246,\n     249,    252,    255,    255,\n     254,    252,    251,    249,\n     248,    246,    243,    237,\n     230,    222,    215,    209,\n     204,    201,    199,    195,\n     191,    187,    182,    179,\n     178,    179,    178,    177,\n     173,    166,    157,    147,\n     139,    133,    130,    128,\n     127,    124,    119,    114,\n     109,    133,    118,    105,\n      94,     83,     73,     63,\n      53,     42,     32,     24,\n      19,     15,     12,     11,\n       7,      3,      2,      4,\n       8,     17,     27,     37,\n      43,     46,     49,     52,\n      57,     64,     70,     76,\n      80,     81,     80,     79,\n      80,     83,     88,     92,\n      97,     98,     98,     98,\n      98,    100,    102,    103,\n     104,    102,    100,     96,\n      93,     92,     93,     95,\n      96,     96,     97,    100,\n     104,    113,    123,    133,\n     142,    150,    156,    159,\n     163,    167,    170,    173,\n     175,    175,    173,    170,\n     166,    162,    159,    154,\n     150,    147,    144,    142,\n     141,    142,    143,    143,\n     143,    143,    142,    143,\n     145,    148,    152,    157,\n     162,    166,    168,    171,\n     176,    181,    188,    195,\n     202,    210,    218,    224,\n     230,    237,    243,    246,\n     249,    251,    254,    254,\n     255,    254,    249,    242,\n     231,    218,    206,    194,\n     185,    177,    167,    158,\n     146,    133,    187,    182,\n     180,    178,    172,    161,\n     145,    127,    108,     94,\n      84,     79,     72,     64,\n      55,     42,     29,     23,\n      22,     27,     36,     46,\n      54,     55,     54,     51,\n      50,     48,     48,     47,\n      45,     39,     31,     23,\n      19,     18,     20,     26,\n      31,     36,     41,     45,\n      53,     63,     77,     91,\n     105,    114,    121,    126,\n     128,    131,    138,    145,\n     152,    159,    165,    169,\n     173,    178,    189,    200,\n     214,    227,    238,    245,\n     247,    246,    242,    237,\n     232,    226,    216,    205,\n     191,    173,    155,    137,\n     120,    107,     98,     92,\n      88,     85,     81,     79,\n      77,     76,     77,     78,\n      78,     78,     76,     72,\n      70,     70,     72,     75,\n      79,     85,     90,     97,\n     108,    121,    138,    159,\n     180,    198,    212,    220,\n     224,    229,    234,    242,\n     249,    254,    255,    250,\n     240,    229,    217,    210,\n     207,    206,    206,    203,\n     197,    192,    187,    133,\n     128,    125,    120,    111,\n      95,     78,     60,     47,\n      39,     36,     37,     37,\n      34,     27,     17,      7,\n       1,      1,      7,     16,\n      27,     34,     36,     36,\n      33,     31,     30,     34,\n      38,     43,     45,     45,\n      42,     38,     35,     33,\n      34,     36,     37,     37,\n      36,     34,     33,     35,\n      37,     41,     43,     45,\n      44,     42,     42,     44,\n      50,     59,     68,     76,\n      80,     83,     83,     86,\n      94,    106,    123,    141,\n     157,    169,    177,    182,\n     186,    192,    199,    206,\n     213,    217,    218,    216,\n     213,    211,    209,    209,\n     208,    208,    207,    206,\n     206,    207,    209,    212,\n     212,    210,    206,    200,\n     196,    194,    196,    200,\n     203,    205,    204,    202,\n     200,    202,    206,    214,\n     223,    231,    236,    237,\n     237,    234,    235,    237,\n     241,    242,    242,    237,\n     229,    220,    211,    204,\n     198,    192,    184,    173,\n     161,    148,    139,    133,\n     135,    131,    128,    125,\n     119,    110,     98,     85,\n      73,     63,     56,     52,\n      48,     43,     39,     33,\n      28,     26,     26,     29,\n      34,     38,     40,     39,\n      36,     33,     30,     27,\n      25,     24,     22,     17,\n      12,      8,      4,      1,\n       1,      3,      6,      9,\n      12,     15,     17,     19,\n      23,     26,     30,     33,\n      36,     37,     39,     42,\n      46,     52,     59,     67,\n      75,     83,     90,     96,\n     106,    116,    127,    139,\n     150,    161,    168,    175,\n     180,    186,    192,    198,\n     204,    209,    210,    209,\n     207,    205,    204,    204,\n     208,    211,    214,    216,\n     218,    219,    221,    223,\n     226,    230,    230,    230,\n     226,    223,    217,    213,\n     211,    209,    209,    210,\n     211,    212,    214,    217,\n     221,    226,    230,    234,\n     235,    236,    235,    235,\n     233,    232,    228,    223,\n     214,    204,    195,    186,\n     179,    174,    171,    167,\n     162,    155,    148,    141,\n     135,    154,    150,    146,\n     140,    130,    114,     97,\n      81,     70,     63,     59,\n      56,     52,     46,     37,\n      27,     19,     14,     13,\n      15,     17,     18,     16,\n      11,      6,      2,      1,\n       2,      6,     11,     16,\n      18,     19,     21,     25,\n      32,     42,     55,     68,\n      79,     87,     90,     91,\n      93,     96,    101,    111,\n     121,    129,    134,    135,\n     134,    132,    132,    135,\n     139,    145,    149,    150,\n     147,    145,    142,    142,\n     145,    150,    155,    158,\n     158,    155,    152,    149,\n     149,    150,    153,    155,\n     154,    152,    147,    143,\n     141,    142,    144,    147,\n     148,    148,    147,    146,\n     146,    147,    151,    154,\n     156,    156,    156,    155,\n     153,    154,    156,    161,\n     168,    175,    183,    192,\n     200,    207,    212,    217,\n     220,    223,    228,    233,\n     240,    245,    248,    246,\n     242,    234,    226,    220,\n     217,    216,    214,    211,\n     205,    194,    181,    169,\n     159,    154,    107,    103,\n     100,     98,     94,     89,\n      82,     76,     71,     68,\n      66,     66,     65,     63,\n      59,     54,     48,     44,\n      42,     41,     41,     40,\n      37,     31,     26,     19,\n      15,     13,     12,     13,\n      13,     13,     11,     10,\n      10,     12,     17,     22,\n      27,     31,     33,     36,\n      38,     42,     47,     52,\n      58,     62,     64,     65,\n      65,     67,     69,     74,\n      79,     83,     86,     88,\n      90,     92,     98,    105,\n     113,    119,    125,    129,\n     129,    131,    133,    139,\n     145,    154,    162,    168,\n     172,    175,    179,    182,\n     189,    195,    202,    208,\n     212,    215,    216,    220,\n     224,    230,    236,    241,\n     244,    244,    243,    242,\n     241,    242,    245,    248,\n     250,    252,    253,    254,\n     254,    254,    255,    254,\n     252,    249,    244,    239,\n     233,    228,    224,    219,\n     213,    206,    196,    185,\n     175,    166,    158,    152,\n     147,    142,    135,    128,\n     120,    112,    107,     80,\n      78,     75,     71,     64,\n      56,     48,     40,     35,\n      33,     34,     35,     37,\n      38,     39,     37,     36,\n      38,     41,     47,     54,\n      61,     68,     71,     74,\n      76,     78,     81,     88,\n      94,    103,    109,    113,\n     114,    114,    112,    114,\n     117,    123,    128,    134,\n     137,    138,    136,    134,\n     131,    128,    124,    119,\n     112,    104,     97,     89,\n      82,     77,     70,     65,\n      60,     56,     54,     56,\n      61,     67,     73,     77,\n      79,     78,     78,     79,\n      84,     92,    101,    111,\n     119,    124,    127,    130,\n     134,    140,    146,    155,\n     162,    169,    175,    180,\n     187,    195,    204,    215,\n     222,    229,    231,    232,\n     232,    233,    235,    237,\n     239,    241,    244,    245,\n     247,    250,    252,    255,\n     255,    255,    253,    250,\n     246,    241,    235,    227,\n     216,    204,    190,    177,\n     163,    153,    144,    136,\n     129,    120,    110,    101,\n      92,     86,     81,     80,\n     200,    194,    180,    193,\n     171,    165,    153,    139,\n     129,    118,     96,     87,\n      76,     59,     64,     36,\n      34,     28,      1,     17,\n      11,      1,     17,     11,\n      22,     39,     37,     52,\n      69,     72,     93,     92,\n     110,    127,    116,    134,\n     156,    168,    206,    205,\n     236,    242,    233,    239,\n     248,    244,    246,    240,\n     231,    218,    184,    175,\n     165,    143,    139,    105,\n     112,     97,     65,     64,\n      57,     57,     66,     38,\n      48,     52,     39,     43,\n      54,     69,     80,    106,\n     119,    144,    133,    148,\n     159,    141,    158,    154,\n     163,    155,    136,    149,\n     125,    116,    134,    122,\n     138,    135,    128,    126,\n     114,    105,    111,    104,\n     101,    103,     83,     92,\n      88,     86,    116,    107,\n     140,    146,    149,    173,\n     182,    179,    198,    202,\n     202,    198,    178,    178,\n     165,    148,    168,    159,\n     171,    171,    165,    181,\n     172,    175,    199,    175,\n     200,    239,    237,    227,\n     238,    215,    198,    194,\n     175,    162,    143,    136,\n     118,    103,     90,     84,\n      70,     54,     36,     27,\n      11,      7,      1,     10,\n      23,     26,     46,     50,\n      58,     83,     66,     79,\n      78,     83,     86,     90,\n     103,    120,    122,    151,\n     154,    167,    185,    192,\n     197,    218,    216,    222,\n     211,    212,    197,    189,\n     189,    188,    183,    178,\n     167,    173,    154,    150,\n     149,    142,    131,    119,\n     103,     87,     87,     77,\n      64,     72,     79,     88,\n      91,     90,    105,    103,\n     106,    113,    116,    128,\n     124,    130,    118,    109,\n     115,    103,    101,    121,\n     109,    128,    129,    133,\n     128,    123,    116,    109,\n      92,     91,     88,     74,\n      81,     76,     77,     91,\n      85,     98,    109,    116,\n     135,    148,    144,    163,\n     171,    160,    159,    154,\n     149,    144,    138,    155,\n     155,    172,    181,    188,\n     201,    209,    208,    228,\n     219,    239,    250,    252,\n     252,    255,    240,    228,\n     212,    201,    190,    168,\n     156,    148,    136,    124,\n     108,    100,     81,     56,\n      41,     24,     14,      4,\n      12,     26,     27,     38,\n      50,     54,     67,     67,\n      67,     74,     77,     80,\n      87,     92,    110,    115,\n     122,    140,    153,    171,\n     182,    190,    213,    209,\n     205,    206,    197,    194,\n     188,    189,    197,    193,\n     191,    190,    182,    180,\n     170,    161,    161,    143,\n     132,    115,     87,     90,\n      78,     71,     79,     80,\n      87,     95,     89,     90,\n      89,     92,     96,    104,\n     119,    126,    122,    115,\n     111,    105,    101,    109,\n     121,    120,    126,    131,\n     127,    130,    117,    112,\n     108,     86,     83,     76,\n      66,     79,     73,     75,\n      83,     85,     90,     90,\n      96,    118,    125,    134,\n     147,    157,    158,    143,\n     140,    138,    120,    126,\n     135,    143,    160,    160,\n     178,    188,    191,    210,\n     220,    229,    250,    238,\n     248,    250,    255,    242,\n     233,    216,    204,    191,\n     171,    168,    161,    149,\n     146,    135,    123,    105,\n      85,     67,     42,     30,\n      25,     23,     30,     37,\n      44,     45,     59,     69,\n      67,     73,     84,     84,\n      83,     91,     98,    101,\n     108,    120,    126,    136,\n     157,    171,    176,    191,\n     200,    191,    186,    192,\n     190,    175,    184,    194,\n     192,    192,    205,    207,\n     195,    190,    187,    175,\n     157,    146,    129,    104,\n      90,     82,     69,     74,\n      80,     79,     82,     84,\n      88,     76,     82,     91,\n      89,    104,    114,    112,\n     106,    101,    103,     97,\n     100,    119,    120,    122,\n     135,    131,    132,    122,\n     124,    117,     90,     86,\n      84,     69,     75,     77,\n      82,     80,     84,     91,\n      88,     91,    109,    119,\n     128,    143,    156,    157,\n     148,    138,    133,    114,\n     116,    123,    125,    143,\n     148,    156,    167,    173,\n     191,    204,    215,    238,\n     232,    252,    255,    255,\n     242,    229,    210,    197,\n     177,    173,    166,    161,\n     155,    153,    141,    129,\n     116,     98,     75,     60,\n      46,     38,     29,     32,\n      35,     37,     40,     52,\n      55,     61,     70,     83,\n      85,     95,    104,    109,\n     110,    118,    122,    127,\n     138,    157,    167,    175,\n     189,    200,    188,    184,\n     181,    176,    166,    175,\n     185,    198,    207,    225,\n     226,    213,    204,    194,\n     173,    158,    145,    128,\n     103,     89,     74,     66,\n      68,     77,     78,     89,\n      90,     88,     80,     82,\n      79,     82,     90,    104,\n     101,     98,     96,     97,\n      92,    102,    114,    128,\n     137,    147,    148,    146,\n     134,    130,    113,     97,\n      87,     88,     79,     84,\n      87,     90,     89,     93,\n      92,     93,     99,    113,\n     120,    133,    144,    160,\n     154,    147,    135,    126,\n     107,    108,    107,    115,\n     123,    129,    131,    141,\n     148,    167,    189,    214,\n     232,    221,    251,    255,\n     242,    224,    198,    173,\n     158,    146,    153,    157,\n     155,    152,    148,    142,\n     128,    121,    111,     98,\n      84,     69,     56,     47,\n      43,     49,     57,     67,\n      72,     75,     76,     78,\n      83,     94,    105,    113,\n     116,    121,    124,    118,\n     117,    129,    143,    161,\n     177,    203,    215,    201,\n     186,    171,    152,    135,\n     143,    166,    191,    217,\n     230,    236,    217,    196,\n     182,    168,    161,    147,\n     123,    101,     75,     63,\n      66,     74,     82,     90,\n     105,    101,     90,     82,\n      80,     72,     75,     84,\n      99,     99,     92,     84,\n      81,     81,    100,    119,\n     141,    156,    165,    158,\n     154,    140,    128,    116,\n     102,     94,     96,     91,\n      96,    100,    103,    105,\n     111,    104,    103,    107,\n     115,    123,    139,    150,\n     162,    160,    152,    135,\n     123,    104,    101,    102,\n     108,    119,    125,    118,\n     120,    122,    137,    164,\n     194,    221,    209,    247,\n     255,    228,    197,    158,\n     119,     99,    105,    126,\n     137,    141,    135,    131,\n     124,    109,    113,    115,\n     109,     96,     85,     76,\n      68,     73,     77,     91,\n      95,     88,     81,     78,\n      72,     79,     98,    109,\n     118,    131,    133,    136,\n     115,    110,    123,    137,\n     155,    178,    218,    235,\n     213,    187,    159,    134,\n     103,    112,    149,    190,\n     221,    225,    227,    202,\n     172,    159,    157,    167,\n     154,    130,    110,     81,\n      69,     76,     93,    121,\n     139,    140,    122,    100,\n      71,     63,     65,     83,\n      94,    101,     95,     73,\n      53,     36,     46,     86,\n     112,    140,    158,    163,\n     147,    133,    128,    123,\n     117,    103,    103,    110,\n     107,    115,    126,    142,\n     134,    131,    132,    122,\n     119,    122,    139,    158,\n     167,    180,    187,    178,\n     144,    124,    109,    103,\n     105,    113,    141,    146,\n     124,    110,     95,    103,\n     119,    160,    209,    222,\n     255,    249,    216,    184,\n     141,    100,     89,    107,\n     128,    138,    137,    137,\n     132,    118,    104,    117,\n     117,    109,     95,     90,\n      76,     68,     75,     84,\n     102,    101,     92,     82,\n      74,     68,     82,    100,\n     110,    128,    142,    142,\n     134,    111,    109,    125,\n     140,    163,    197,    237,\n     245,    215,    185,    153,\n     125,     99,    121,    163,\n     209,    231,    236,    233,\n     199,    172,    161,    169,\n     170,    147,    120,     96,\n      70,     60,     70,     94,\n     123,    133,    125,    104,\n      82,     49,     46,     60,\n      76,     83,     91,     82,\n      58,     34,     25,     51,\n      94,    119,    149,    166,\n     164,    146,    137,    133,\n     127,    116,    109,    109,\n     117,    120,    131,    148,\n     159,    147,    144,    140,\n     125,    125,    129,    152,\n     167,    175,    188,    191,\n     169,    131,    115,    103,\n      99,    101,    119,    147,\n     136,    109,     87,     78,\n      89,    114,    166,    222,\n     242,    255,    236,    199,\n     155,    110,     84,     87,\n     103,    121,    127,    131,\n     129,    120,    109,    107,\n     111,    106,     96,     88,\n      77,     71,     72,     83,\n      94,    104,     96,     86,\n      74,     71,     75,     94,\n     109,    131,    143,    151,\n     139,    129,    116,    122,\n     136,    160,    194,    232,\n     254,    245,    211,    175,\n     138,    113,    110,    144,\n     190,    229,    248,    246,\n     226,    195,    175,    171,\n     170,    158,    131,    101,\n      73,     58,     59,     83,\n     106,    128,    124,    111,\n      83,     55,     33,     43,\n      56,     70,     76,     76,\n      56,     30,     11,     27,\n      58,    102,    132,    158,\n     163,    155,    141,    134,\n     125,    118,    112,    107,\n     109,    120,    130,    151,\n     161,    166,    161,    152,\n     139,    129,    133,    150,\n     168,    185,    197,    204,\n     187,    156,    124,    109,\n     100,    102,    120,    140,\n     140,    118,     86,     70,\n      69,     95,    142,    201,\n     242,    245,    243,    214,\n     161,    119,     88,     76,\n      80,     93,    109,    116,\n     119,    110,    103,    105,\n      99,     97,     93,     84,\n      72,     69,     66,     72,\n      93,     96,     98,     86,\n      77,     72,     77,     87,\n     106,    133,    149,    154,\n     150,    134,    131,    123,\n     139,    163,    204,    239,\n     254,    255,    236,    189,\n     153,    123,    128,    142,\n     183,    222,    251,    252,\n     236,    215,    196,    185,\n     171,    153,    136,     99,\n      75,     59,     62,     79,\n     101,    114,    116,    105,\n      81,     52,     42,     33,\n      41,     48,     57,     50,\n      40,     21,      6,     15,\n      40,     74,    118,    139,\n     156,    156,    150,    135,\n     125,    113,    107,    105,\n     107,    117,    136,    154,\n     169,    172,    178,    162,\n     151,    142,    142,    159,\n     175,    201,    218,    219,\n     201,    172,    145,    117,\n     109,    111,    129,    142,\n     131,    118,     90,     67,\n      64,     87,    136,    188,\n     230,    245,    238,    231,\n     193,    141,     96,     76,\n      66,     74,     86,    107,\n     115,    126,    114,    109,\n     103,     91,     80,     77,\n      67,     63,     66,     74,\n      83,    101,     90,     83,\n      70,     68,     73,     92,\n     107,    133,    157,    161,\n     151,    136,    120,    125,\n     128,    157,    187,    230,\n     253,    250,    235,    209,\n     165,    136,    118,    134,\n     153,    195,    228,    255,\n     251,    237,    220,    206,\n     194,    164,    127,    106,\n      72,     61,     54,     74,\n      98,    119,    121,    109,\n      88,     59,     38,     47,\n      45,     54,     56,     59,\n      38,     23,     10,      5,\n      32,     62,     93,    134,\n     147,    157,    153,    149,\n     130,    120,    103,    100,\n     101,    113,    129,    152,\n     173,    184,    178,    179,\n     152,    145,    146,    153,\n     174,    197,    219,    230,\n     211,    182,    150,    133,\n     115,    121,    126,    146,\n     146,    118,     92,     70,\n      56,     74,    107,    169,\n     210,    241,    238,    243,\n     242,    199,    144,     94,\n      52,     50,     57,     87,\n     122,    147,    165,    156,\n     131,     97,     73,     54,\n      52,     61,     66,     90,\n     100,    112,    116,     83,\n      71,     53,     58,     82,\n     102,    134,    161,    172,\n     162,    145,    115,     99,\n     103,    110,    147,    171,\n     215,    242,    236,    229,\n     192,    157,    133,    107,\n     101,    115,    158,    207,\n     249,    255,    252,    238,\n     208,    188,    139,    103,\n      83,     66,     80,     80,\n     101,    119,    128,    123,\n      97,     77,     58,     65,\n      69,     77,     88,     84,\n      91,     75,     52,     38,\n      21,     38,     66,    107,\n     146,    169,    177,    171,\n     153,    120,     96,     70,\n      70,     89,    106,    152,\n     171,    193,    191,    160,\n     135,    108,    110,    132,\n     157,    184,    207,    219,\n     202,    183,    146,    131,\n     130,    128,    145,    142,\n     150,    152,    125,    102,\n      64,     51,     66,    105,\n     153,    200,    236,    243,\n     252,    250,    219,    157,\n      97,     59,     49,     57,\n      93,    126,    154,    173,\n     164,    139,     99,     65,\n      50,     46,     57,     65,\n      84,    101,    106,    112,\n      89,     64,     54,     51,\n      67,     94,    125,    155,\n     172,    166,    146,    114,\n      95,     90,    100,    129,\n     162,    210,    244,    251,\n     238,    206,    168,    136,\n     115,     98,    104,    143,\n     191,    237,    255,    255,\n     243,    219,    198,    150,\n     109,     82,     67,     78,\n      82,    103,    124,    131,\n     127,    101,     73,     50,\n      54,     70,     83,     98,\n      96,     95,     84,     57,\n      38,     24,     32,     63,\n     108,    149,    174,    186,\n     176,    152,    121,     93,\n      69,     69,     86,    109,\n     145,    169,    191,    187,\n     161,    133,    105,    103,\n     120,    150,    179,    202,\n     218,    207,    177,    141,\n     124,    121,    133,    148,\n     149,    154,    153,    133,\n     109,     68,     50,     58,\n      95,    146,    195,    238,\n     252,    239,    224,    241,\n     204,    175,    154,    176,\n     161,    168,    165,    146,\n     142,    143,    143,    142,\n     126,    128,    111,    120,\n     108,     87,     92,    121,\n     157,    139,    142,    137,\n     131,    152,    172,    179,\n     175,    162,    134,    144,\n     157,    149,    159,    170,\n     207,    212,    214,    206,\n     188,    181,    198,    175,\n     183,    163,    151,    152,\n     169,    203,    224,    183,\n     167,    162,    158,    190,\n     170,    119,    123,    110,\n      77,     78,     84,     98,\n     122,    131,    128,     93,\n      60,     72,     63,     51,\n      44,      1,     15,     37,\n      29,     40,     20,     37,\n      53,     68,     93,     82,\n      34,     45,     69,     67,\n      74,     57,     30,     45,\n      41,     55,     61,     91,\n     106,    104,    117,    101,\n      65,     94,    113,    131,\n     146,    176,    147,    133,\n     127,    134,    125,    140,\n     136,    113,    108,    133,\n     106,    137,    142,    138,\n     144,    178,    193,    222,\n     243,    239,    226,    200,\n     199,    208,    212,    171,\n     153,    134,    145,    138,\n     119,    114,     97,    110,\n     133,    111,     99,     88,\n      62,     74,     83,     86,\n      88,     93,    107,    137,\n     122,     93,     75,     98,\n     141,    139,    123,     83,\n      98,     88,     89,     88,\n      93,    132,    149,    150,\n     150,    138,    116,    135,\n     122,    134,    119,    111,\n     113,    118,    148,    155,\n     107,     96,    120,    141,\n     172,    142,    111,    120,\n     123,    116,    106,    114,\n     128,    157,    175,    175,\n     151,    135,    135,    139,\n     118,    102,     90,     86,\n      99,    110,    106,     75,\n      81,    122,    174,    189,\n     163,    124,    117,    162,\n     156,    132,    112,    117,\n     126,    128,     85,     63,\n      94,    118,    134,    113,\n      78,     56,     77,    108,\n     130,    115,    117,    120,\n     135,    151,    156,    145,\n     124,    142,    157,    159,\n     121,    113,    147,    185,\n     171,    152,    151,    192,\n     254,    255,    226,    224,\n     232,    238,    227,    203,\n     174,    138,    158,    177,\n     149,    116,    129,    104,\n      83,     74,     46,     82,\n      85,     67,     60,     53,\n      56,     66,     72,     69,\n      79,     75,    103,     91,\n      88,     99,     99,    107,\n      69,    103,     79,     47,\n      83,    102,    112,    106,\n      75,     69,    113,     97,\n      88,     70,     89,     88,\n      78,     95,     52,     79,\n     111,     68,     79,     90,\n      91,    121,     92,     66,\n     105,    114,    113,     76,\n     104,    147,    149,    163,\n     151,    144,    192,    176,\n     169,    195,    162,    168,\n     194,    179,    179,    188,\n     150,    143,    170,    207,\n     217,    193,    200,    200,\n     244,    212,    174,    171,\n     180,    151,    151,    109,\n     101,    144,    105,     92,\n      85,     56,     60,     62,\n      55,     80,    111,    113,\n      97,    109,    123,    126,\n     133,    117,    129,    159,\n     191,    167,    168,    185,\n     188,    180,    183,    181,\n     209,    255,    246,    224,\n     237,    236,    240,    210,\n     205,    172,    156,    131,\n     147,    161,    155,    146,\n     113,     73,     63,     48,\n      68,     78,     72,     62,\n      50,     42,     61,     54,\n      36,     49,     77,    110,\n     114,     96,     95,    111,\n     137,    100,     78,     50,\n      56,    116,    129,     92,\n      64,     41,     54,     61,\n      48,     72,     33,     37,\n      45,     50,     55,     19,\n      32,     52,     37,     76,\n      75,     84,     89,     63,\n      61,     73,     74,     94,\n      71,     98,    111,    129,\n     137,    171,    170,    199,\n     214,    204,    234,    247,\n     239,    248,    254,    237,\n     254,    217,    196,    201,\n     212,    241,    248,    244,\n     242,    222,    223,    226,\n     198,    217,    164,    153,\n     140,    145,    171,    126,\n      97,     86,     50,     35,\n      50,     30,     47,     65,\n      91,     69,     73,     86,\n     115,    122,    114,    115,\n     134,    177,    182,    199,\n     201,    175,    169,    195,\n     195,    198,    236,    255,\n     237,    190,    198,    186,\n     157,    164,    142,    122,\n     113,    134,    148,    142,\n     150,    124,     83,     73,\n      53,     91,    121,     87,\n      72,     71,     67,     89,\n      75,     71,     80,     97,\n     127,    147,    117,    118,\n     120,    139,    105,     82,\n      79,     82,    128,    119,\n      77,     62,     41,     57,\n      80,     49,     35,     44,\n      57,     75,     51,     38,\n      22,     42,     67,     70,\n      73,     73,     77,     96,\n      69,     38,     56,     74,\n      94,     78,     84,    107,\n     123,    131,    149,    155,\n     207,    220,    213,    225,\n     211,    228,    255,    244,\n     224,    217,    214,    205,\n     217,    229,    243,    230,\n     229,    214,    219,    207,\n     189,    200,    202,    162,\n     167,    152,    160,    186,\n     150,    119,     98,     71,\n      84,     87,     67,     57,\n      70,     84,     87,    107,\n     128,    124,    137,    116,\n     110,    152,    182,    178,\n     171,    154,    152,    152,\n     150,    154,    166,    197,\n     200,    190,    166,    171,\n     179,    162,    155,    144,\n     139,    134,    137,    140,\n     124,    133,    137,    126,\n     115,     93,    100,     95,\n      88,     76,     84,     80,\n      96,     80,     80,     84,\n     106,    119,    138,    125,\n     135,    139,    150,    120,\n     111,    109,    109,    128,\n     105,     80,     77,     66,\n      77,     60,     45,     40,\n      43,     35,     48,     40,\n      39,     25,     50,     49,\n      55,     50,     48,     67,\n      84,     64,     45,     46,\n      55,     75,     60,     58,\n      73,    100,    108,    113,\n     133,    174,    188,    199,\n     209,    225,    226,    244,\n     255,    247,    247,    238,\n     239,    252,    252,    253,\n     246,    254,    252,    239,\n     225,    216,    208,    217,\n     213,    195,    173,    181,\n     186,    181,    152,    135,\n     111,    107,     90,     80,\n      63,     66,     75,     76,\n      72,     84,     95,    110,\n     114,    112,    121,    128,\n     132,    133,    144,    144,\n     139,    138,    144,    144,\n     155,    163,    166,    156,\n     151,    160,    157,    158,\n     141,    128,    125,    147,\n     152,    146,    157,    161,\n     146,    127,    117,    119,\n      99,    106,    107,    107,\n      99,    119,    111,    107,\n     108,    126,    138,    169,\n     165,    172,    165,    169,\n     152,    151,    144,    120,\n     126,    133,    133,    114,\n     102,    100,     77,     74,\n      64,     65,     44,     64,\n      64,     64,     57,     52,\n      43,     60,     67,     54,\n      55,     61,     56,     35,\n      48,     37,     39,     37,\n      50,     62,     88,    107,\n     102,    137,    167,    173,\n     184,    198,    205,    223,\n     239,    241,    229,    231,\n     234,    234,    255,    247,\n     243,    230,    242,    228,\n     215,    203,    207,    206,\n     202,    206,    180,    158,\n     175,    181,    157,    138,\n     124,     88,     82,     78,\n      63,     49,     46,     40,\n      58,     72,     68,     80,\n      98,     88,     81,     99,\n     115,    116,    113,    135,\n     136,    129,    115,    120,\n     127,    136,    147,    156,\n     151,    151,    147,    155,\n     145,    139,    136,    133,\n     148,    167,    151,    164,\n     164,    157,    157,    155,\n     156,    145,    151,    168,\n     157,    143,    147,    124,\n     125,    132,    153,    162,\n     157,    155,    149,    137,\n     144,    136,    129,    123,\n     117,    119,    114,    106,\n      91,     68,     75,     47,\n      46,     56,     44,     19,\n      37,     22,     18,     21,\n      29,     27,     35,     50,\n      41,     59,     67,     56,\n      64,     78,     67,     88,\n      97,    105,    102,    122,\n     151,    166,    199,    208,\n     201,    204,    220,    226,\n     242,    242,    253,    255,\n     247,    248,    251,    247,\n     245,    237,    219,    225,\n     211,    187,    162,    163,\n     157,    155,    153,    134,\n     114,    140,    146,    125,\n     109,     96,     66,     63,\n      69,     63,     54,     59,\n      51,     50,     60,     71,\n      78,     83,     86,     86,\n      94,    108,    111,    110,\n     125,    127,    123,    125,\n     129,    136,    156,    159,\n     151,    180,    188,    196,\n     204,    202,    214,    202,\n     208,    211,    213,    215,\n     195,    174,    181,    186,\n     182,    167,    148,    134,\n     138,    135,    118,    130,\n     102,    106,    126,    130,\n     110,    112,     97,     88,\n      83,     78,     78,     67,\n      38,     31,     42,     27,\n      22,     25,     21,     20,\n      10,     17,     24,     30,\n       1,     28,     21,     26,\n      56,     95,     85,     85,\n      82,     98,    119,    132,\n     122,    118,    118,    122,\n     155,    144,    148,    147,\n     178,    207,    232,    245,\n     230,    232,    233,    252,\n     255,    236,    208,    226,\n     241,    242,    226,    212,\n     205,    216,    211,    193,\n     195,    176,    149,    134,\n     144,    142,    150,    136,\n     110,    103,    116,    116,\n      99,     79,     56,     51,\n      54,     43,     42,     38,\n      46,     53,     52,     53,\n      68,     81,     84,    111,\n     113,     87,     86,     94,\n     116,    127,    133,    125,\n     138,    149,    168,    183,\n     193,    180,    218,    223,\n     211,    198,    193,    208,\n     199,    195,    191,    177,\n     155,    151,    127,    142,\n     136,    117,    122,    109,\n      96,     87,     73,     49,\n      50,     34,     40,     37,\n      57,     24,     34,     20,\n      16,      1,     41,     49,\n      41,     38,     41,     39,\n      71,     56,     70,     75,\n      85,     89,    126,    124,\n     125,    101,    127,    111,\n     133,    147,    168,    160,\n     149,    147,    162,    156,\n     161,    166,    161,    156,\n     158,    149,    138,    156,\n     151,    144,    159,    140,\n     146,    160,    167,    154,\n     163,    173,    151,    148,\n     167,    165,    172,    177,\n     164,    164,    164,    168,\n     159,    181,    165,    146,\n     126,    123,    126,    147,\n     140,    128,     98,    114,\n     129,    134,    117,    103,\n      87,     93,     86,    107,\n      98,     98,     81,     84,\n      84,    109,     92,     99,\n     120,    134,    118,    148,\n     136,    147,    160,    184,\n     172,    181,    191,    217,\n     228,    233,    218,    204,\n     211,    206,    200,    178,\n     175,    169,    153,    147,\n     135,    120,    117,    110,\n     105,     96,     80,     86,\n      59,     51,     35,     17,\n      15,     32,      4,      2,\n       1,     10,      4,     29,\n      32,     26,     16,     54,\n      81,     88,     76,     89,\n     100,    115,    134,    163,\n     165,    151,    148,    183,\n     200,    193,    165,    182,\n     181,    183,    199,    207,\n     184,    162,    177,    194,\n     185,    186,    168,    145,\n     152,    149,    134,    117,\n     108,     99,    103,    111,\n     107,     99,    106,    110,\n     111,    120,    124,    116,\n     118,    124,    123,    118,\n     141,    143,    131,    135,\n     139,    115,    141,    148,\n     120,    100,    115,    124,\n     129,    138,    124,     99,\n     112,    131,    133,    129,\n     110,     98,    123,    116,\n     116,     97,    104,     91,\n      85,    108,    133,    118,\n     134,    148,    155,    162,\n     188,    200,    189,    192,\n     212,    203,    223,    231,\n     224,    228,    216,    204,\n     181,    178,    173,    167,\n     153,    137,    128,    116,\n     109,     97,     86,     73,\n      68,     62,     54,     38,\n      38,     24,     19,     14,\n      11,      1,      8,      4,\n       7,      9,     20,     30,\n      43,     47,     59,     65,\n      89,     98,     99,    104,\n     116,    125,    149,    163,\n     165,    166,    174,    178,\n     189,    188,    185,    178,\n     177,    174,    175,    177,\n     172,    167,    158,    153,\n     156,    151,    141,    128,\n     117,    114,    111,    103,\n      90,     89,     90,     91,\n      93,     91,     91,    101,\n     111,    112,    112,    117,\n     115,    120,    122,    130,\n     132,    140,    144,    147,\n     146,    149,    144,    146,\n     150,    147,    137,    142,\n     148,    151,    154,    148,\n     136,    141,    150,    152,\n     146,    140,    136,    142,\n     141,    141,    131,    131,\n     134,    143,    154,    165,\n     170,    170,    181,    190,\n     196,    202,    206,    202,\n     210,    212,    208,    202,\n     206,    203,    198,    187,\n     181,    165,    156,    144,\n     142,    132,    118,    102,\n      90,     78,     71,     63,\n      57,     45,     36,     33,\n      18,     20,     13,     10,\n       9,      8,      1,      6,\n      10,     15,     22,     39,\n      49,     59,     74,     89,\n      94,    110,    117,    126,\n     130,    145,    159,    170,\n     181,    184,    187,    196,\n     194,    196,    195,    197,\n     190,    183,    181,    175,\n     169,    167,    161,    151,\n     147,    144,    128,    126,\n     118,    103,     94,     88,\n      80,     79,     88,     87,\n      79,     77,     77,     87,\n     101,    109,    104,    111,\n     109,    111,    116,    123,\n     129,    129,    139,    140,\n     136,    136,    144,    142,\n     140,    143,    144,    136,\n     143,    154,    152,    150,\n     145,    137,    143,    152,\n     153,    153,    146,    139,\n     144,    148,    151,    141,\n     153,    157,    162,    170,\n     183,    187,    192,    198,\n     207,    207,    213,    220,\n     220,    215,    216,    209,\n     199,    200,    194,    185,\n     173,    165,    166,    158,\n     146,    137,    126,    114,\n     102,     90,     79,     67,\n      56,     49,     40,     30,\n      24,     11,      9,      7,\n       4,      3,      3,      1,\n       3,      7,      9,     13,\n      19,     26,     39,     53,\n      63,     73,     84,     97,\n     106,    117,    133,    146,\n     156,    167,    171,    182,\n     186,    184,    190,    192,\n     195,    194,    190,    184,\n     181,    182,    177,    171,\n     162,    152,    144,    140,\n     129,    120,    109,     97,\n      90,     86,     81,     78,\n      78,     75,     73,     76,\n      83,     87,     95,    100,\n     103,    105,    109,    115,\n     123,    130,    134,    140,\n     142,    143,    145,    154,\n     156,    154,    156,    158,\n     154,    154,    159,    156,\n     157,    154,    150,    152,\n     159,    161,    163,    158,\n     153,    157,    163,    165,\n     163,    169,    168,    169,\n     178,    186,    188,    195,\n     203,    208,    214,    218,\n     219,    219,    222,    219,\n     215,    210,    202,    194,\n     191,    178,    166,    178,\n     171,    162,    153,    141,\n     128,    118,    106,     98,\n      87,     76,     70,     61,\n      51,     43,     33,     28,\n      23,     17,     11,      6,\n       1,      1,      3,      7,\n      10,     14,     21,     33,\n      44,     55,     65,     73,\n      83,     94,    103,    115,\n     126,    138,    148,    153,\n     163,    171,    174,    182,\n     185,    187,    188,    185,\n     184,    183,    183,    181,\n     177,    175,    169,    162,\n     157,    151,    141,    133,\n     121,    110,    105,    100,\n      95,     90,     86,     83,\n      84,     88,     89,     92,\n      97,    100,    101,    104,\n     105,    110,    119,    123,\n     127,    130,    134,    138,\n     144,    150,    149,    147,\n     149,    149,    152,    158,\n     157,    156,    155,    155,\n     157,    161,    163,    163,\n     160,    159,    159,    161,\n     161,    158,    159,    160,\n     163,    170,    176,    180,\n     184,    187,    190,    194,\n     200,    203,    203,    205,\n     204,    201,    200,    200,\n     195,    193,    185,    178,\n     193,    190,    184,    170,\n     155,    145,    141,    127,\n     119,    105,     92,     83,\n      80,     69,     58,     43,\n      36,     32,     31,     23,\n      10,      2,      1,      1,\n       7,      5,      4,      7,\n      20,     27,     36,     44,\n      46,     53,     67,     77,\n      89,     98,    108,    121,\n     127,    142,    152,    154,\n     161,    169,    175,    180,\n     180,    179,    180,    188,\n     189,    181,    181,    178,\n     172,    170,    161,    148,\n     137,    131,    117,    108,\n     102,     91,     83,     82,\n      78,     78,     85,     82,\n      81,     86,     93,     94,\n      99,    106,    110,    121,\n     133,    139,    145,    158,\n     161,    168,    178,    182,\n     181,    185,    182,    179,\n     187,    186,    182,    178,\n     175,    170,    174,    171,\n     162,    156,    153,    151,\n     150,    149,    144,    142,\n     143,    143,    150,    158,\n     158,    160,    166,    168,\n     173,    179,    186,    185,\n     187,    189,    194,    199,\n     203,    199,    199,    194,\n     193,    201,    194,    182,\n     167,    152,    137,    128,\n     120,    115,    113,    110,\n     107,    102,     97,     93,\n      88,     85,     84,     81,\n      75,     64,     49,     33,\n      18,      7,      1,      2,\n       9,     21,     33,     45,\n      56,     64,     71,     78,\n      84,     91,     99,    106,\n     111,    114,    118,    122,\n     125,    129,    136,    146,\n     156,    165,    175,    181,\n     186,    190,    193,    196,\n     201,    202,    201,    197,\n     190,    182,    176,    169,\n     163,    158,    152,    150,\n     145,    143,    140,    136,\n     129,    121,    112,    107,\n     102,    100,     99,     99,\n      97,     95,     92,     90,\n      91,     93,     96,    101,\n     105,    108,    109,    111,\n     113,    116,    116,    117,\n     115,    116,    117,    121,\n     125,    129,    133,    136,\n     138,    139,    141,    144,\n     150,    155,    163,    170,\n     175,    177,    177,    175,\n     172,    169,    166,    167,\n     172,    179,    190,    199,\n     207,    212,    211,    211,\n     206,    201,    200,    195,\n     188,    180,    170,    162,\n     156,    150,    145,    139,\n     130,    118,    104,     90,\n      78,     70,     66,     64,\n      62,     57,     47,     34,\n      23,     10,      3,      1,\n       3,     12,     21,     27,\n      34,     38,     39,     41,\n      43,     45,     46,     48,\n      51,     54,     57,     62,\n      68,     73,     77,     84,\n      94,    103,    112,    124,\n     135,    147,    157,    166,\n     175,    182,    185,    186,\n     187,    189,    192,    195,\n     198,    200,    200,    197,\n     195,    192,    189,    186,\n     181,    171,    160,    150,\n     143,    138,    137,    136,\n     136,    134,    131,    127,\n     123,    122,    122,    125,\n     128,    130,    129,    126,\n     121,    114,    109,    103,\n      98,     96,     96,    100,\n     104,    110,    115,    120,\n     125,    128,    131,    136,\n     142,    149,    156,    165,\n     174,    178,    181,    184,\n     190,    196,    201,    204,\n     207,    207,    205,    204,\n     205,    208,    210,    209,\n     208,    204,    200,    217,\n     230,    230,    212,    183,\n     148,    115,     97,     98,\n     114,    133,    142,    143,\n     129,    104,     87,     79,\n      82,     91,    102,    112,\n     113,    109,    102,     95,\n      86,     83,     88,     97,\n      89,     71,     47,     18,\n       1,      2,     16,     36,\n      56,     69,     73,     74,\n      74,     80,     82,     87,\n      97,    109,    123,    133,\n     151,    170,    186,    195,\n     203,    209,    207,    197,\n     186,    181,    185,    194,\n     207,    215,    216,    214,\n     205,    203,    200,    198,\n     191,    176,    147,    118,\n      90,     71,     55,     49,\n      55,     65,     68,     71,\n      79,     85,     96,    115,\n     141,    164,    176,    172,\n     162,    141,    121,    100,\n      84,     72,     65,     75,\n      93,    109,    118,    128,\n     131,    136,    139,    140,\n     136,    126,    109,     95,\n      94,    104,    115,    125,\n     143,    162,    174,    175,\n     170,    166,    157,    149,\n     156,    170,    184,    193,\n     192,    200,    206,    217,\n     163,    160,    155,    147,\n     138,    127,    115,    105,\n      99,     94,     91,     89,\n      85,     81,     76,     71,\n      66,     61,     57,     52,\n      47,     43,     41,     40,\n      40,     39,     36,     32,\n      26,     19,     13,      8,\n       4,      2,      1,      1,\n       2,      4,      8,     13,\n      18,     22,     25,     26,\n      27,     28,     33,     41,\n      49,     58,     66,     73,\n      80,     89,     99,    109,\n     117,    122,    128,    132,\n     136,    145,    152,    159,\n     165,    170,    175,    179,\n     183,    186,    188,    186,\n     185,    183,    183,    185,\n     188,    193,    196,    197,\n     196,    194,    192,    192,\n     195,    198,    201,    204,\n     207,    209,    211,    212,\n     212,    210,    206,    201,\n     196,    191,    187,    185,\n     183,    182,    183,    182,\n     181,    179,    176,    173,\n     170,    167,    164,    162,\n     163,    169,    178,    189,\n     197,    201,    201,    198,\n     194,    192,    190,    186,\n     182,    176,    171,    167,\n     163,    219,    210,    199,\n     186,    169,    150,    129,\n     112,     98,     89,     85,\n      84,     83,     80,     74,\n      66,     59,     53,     48,\n      46,     47,     52,     56,\n      59,     59,     56,     49,\n      42,     33,     23,     15,\n       8,      3,      1,      1,\n       4,      9,     15,     23,\n      30,     35,     38,     41,\n      42,     41,     42,     46,\n      50,     56,     62,     66,\n      69,     71,     76,     88,\n     106,    127,    147,    166,\n     179,    186,    190,    193,\n     194,    197,    199,    205,\n     209,    215,    219,    220,\n     215,    208,    200,    196,\n     191,    185,    181,    176,\n     169,    162,    158,    155,\n     155,    159,    164,    170,\n     177,    183,    187,    189,\n     188,    186,    183,    178,\n     172,    164,    151,    136,\n     120,    108,     98,     94,\n      92,     94,     95,     95,\n      94,     93,     96,    102,\n     113,    127,    148,    175,\n     200,    220,    235,    246,\n     251,    249,    251,    250,\n     248,    245,    240,    235,\n     228,    219,    159,    156,\n     152,    147,    139,    129,\n     117,    106,     96,     90,\n      86,     85,     84,     82,\n      79,     74,     67,     61,\n      55,     49,     45,     43,\n      41,     39,     37,     33,\n      29,     24,     19,     13,\n       9,      5,      3,      1,\n       1,      4,      8,     14,\n      21,     28,     34,     38,\n      42,     43,     42,     41,\n      41,     42,     44,     46,\n      48,     50,     52,     56,\n      66,     82,    101,    121,\n     139,    151,    157,    158,\n     157,    157,    159,    164,\n     172,    179,    186,    190,\n     192,    191,    191,    191,\n     193,    195,    196,    196,\n     193,    190,    185,    182,\n     180,    181,    184,    189,\n     195,    203,    210,    215,\n     219,    219,    218,    215,\n     212,    211,    211,    210,\n     208,    204,    197,    188,\n     178,    170,    164,    160,\n     157,    157,    157,    161,\n     166,    173,    180,    188,\n     195,    200,    202,    202,\n     201,    197,    192,    189,\n     185,    182,    178,    172,\n     167,    163,    159,    153,\n     149,    143,    137,    130,\n     122,    112,    101,     91,\n      82,     75,     70,     65,\n      61,     56,     50,     44,\n      39,     35,     31,     26,\n      23,     18,     15,     12,\n       9,      6,      4,      3,\n       2,      1,      1,      2,\n       2,      5,      6,      8,\n       9,     10,     10,     10,\n      11,     14,     18,     21,\n      24,     27,     29,     31,\n      33,     37,     43,     50,\n      58,     68,     82,     97,\n     110,    122,    133,    141,\n     147,    151,    155,    160,\n     165,    170,    175,    181,\n     186,    190,    194,    197,\n     200,    203,    205,    206,\n     206,    205,    203,    202,\n     202,    202,    203,    206,\n     209,    213,    218,    222,\n     226,    228,    228,    226,\n     224,    221,    218,    216,\n     215,    213,    211,    210,\n     207,    204,    202,    201,\n     201,    202,    203,    204,\n     205,    206,    207,    208,\n     211,    212,    212,    209,\n     206,    202,    197,    191,\n     186,    181,    176,    172,\n     167,    163,    158,    153,\n     173,    168,    163,    159,\n     154,    146,    134,    120,\n     106,     93,     84,     78,\n      74,     69,     63,     55,\n      48,     41,     37,     32,\n      29,     26,     22,     19,\n      16,     14,     11,      8,\n       5,      3,      1,      1,\n       1,      2,      5,      8,\n      12,     15,     19,     22,\n      25,     29,     35,     42,\n      48,     54,     59,     64,\n      70,     77,     85,     94,\n     101,    108,    115,    124,\n     135,    145,    156,    165,\n     170,    171,    170,    167,\n     167,    167,    170,    174,\n     179,    184,    187,    188,\n     189,    189,    190,    189,\n     188,    185,    180,    175,\n     169,    164,    161,    160,\n     162,    165,    169,    173,\n     177,    178,    178,    176,\n     173,    170,    166,    164,\n     162,    160,    159,    160,\n     162,    164,    171,    180,\n     191,    201,    210,    215,\n     215,    213,    210,    207,\n     206,    209,    211,    213,\n     212,    209,    204,    199,\n     194,    191,    188,    186,\n     185,    184,    181,    178,\n     173,    168,    159,    151,\n     146,    143,    137,    130,\n     119,    106,     92,     80,\n      69,     58,     49,     40,\n      32,     26,     21,     19,\n      15,     13,     13,     12,\n      12,     11,     10,      8,\n       5,      3,      1,      1,\n       2,      4,      9,     14,\n      19,     25,     31,     35,\n      38,     43,     50,     60,\n      71,     79,     87,     92,\n      97,    102,    107,    115,\n     124,    131,    137,    143,\n     149,    154,    158,    162,\n     166,    168,    168,    167,\n     164,    161,    160,    160,\n     161,    164,    166,    168,\n     168,    167,    166,    165,\n     164,    164,    163,    161,\n     157,    153,    150,    146,\n     143,    142,    142,    145,\n     149,    153,    154,    154,\n     152,    151,    149,    149,\n     154,    162,    168,    173,\n     178,    181,    182,    184,\n     190,    198,    207,    213,\n     218,    218,    218,    217,\n     217,    217,    220,    223,\n     224,    224,    222,    218,\n     214,    210,    208,    204,\n     201,    197,    193,    186,\n     178,    168,    152,    140,\n     130,    120,    113,    106,\n      97,     86,     75,     64,\n      53,     42,     32,     24,\n      16,     12,     12,     17,\n      22,     26,     28,     29,\n      26,     23,     20,     16,\n      13,     10,      8,      6,\n       4,      2,      1,      2,\n       6,     10,     12,     13,\n      13,     11,     10,     12,\n      19,     28,     38,     50,\n      60,     69,     76,     81,\n      83,     86,     88,     90,\n      93,     98,    105,    112,\n     118,    125,    129,    132,\n     134,    139,    147,    158,\n     171,    183,    192,    197,\n     199,    200,    201,    204,\n     207,    210,    212,    214,\n     212,    206,    198,    191,\n     182,    176,    172,    170,\n     170,    169,    169,    168,\n     167,    166,    163,    160,\n     158,    158,    163,    169,\n     179,    189,    198,    206,\n     214,    222,    229,    237,\n     245,    250,    253,    253,\n     251,    250,    248,    248,\n     247,    245,    242,    237,\n     230,    224,    217,    210,\n     204,    198,    191,    184,\n     175,    165,    152,    144,\n     135,    128,    120,    114,\n     105,     95,     85,     72,\n      63,     55,     48,     42,\n      37,     31,     26,     21,\n      19,     18,     17,     17,\n      18,     16,     13,      8,\n       4,      2,      1,      3,\n       4,      6,      7,      8,\n      10,     14,     18,     24,\n      32,     39,     45,     51,\n      57,     64,     71,     80,\n      87,     93,     97,     99,\n     100,     99,    100,    101,\n     102,    103,    106,    112,\n     121,    129,    136,    139,\n     140,    139,    137,    141,\n     147,    154,    161,    167,\n     171,    175,    178,    182,\n     184,    184,    183,    179,\n     174,    169,    163,    158,\n     155,    152,    150,    149,\n     148,    149,    149,    150,\n     152,    158,    165,    172,\n     179,    183,    187,    191,\n     194,    200,    209,    217,\n     224,    231,    237,    242,\n     245,    250,    253,    253,\n     251,    249,    245,    241,\n     238,    236,    233,    230,\n     228,    223,    217,    210,\n     201,    193,    185,    177,\n     169,    161,    154,    144,\n     127,    120,    115,    110,\n     106,    102,     96,     89,\n      81,     73,     66,     60,\n      54,     49,     41,     33,\n      26,     20,     17,     17,\n      17,     18,     18,     18,\n      15,     10,      7,      3,\n       2,      2,      3,      4,\n       7,     12,     19,     26,\n      36,     49,     60,     70,\n      79,     87,     93,     97,\n     101,    104,    106,    108,\n     110,    111,    111,    112,\n     111,    109,    107,    106,\n     107,    111,    115,    117,\n     116,    114,    113,    113,\n     117,    126,    134,    140,\n     144,    148,    154,    162,\n     170,    177,    182,    186,\n     184,    179,    174,    169,\n     163,    159,    155,    151,\n     148,    146,    146,    146,\n     148,    150,    154,    161,\n     172,    183,    193,    202,\n     209,    213,    216,    221,\n     226,    232,    238,    244,\n     248,    250,    254,    255,\n     255,    253,    251,    248,\n     244,    238,    232,    224,\n     217,    212,    206,    202,\n     196,    188,    178,    169,\n     159,    150,    141,    134,\n     127,    141,    132,    123,\n     116,    111,    105,     98,\n      92,     84,     77,     70,\n      64,     57,     48,     38,\n      27,     18,     12,     10,\n      13,     16,     19,     19,\n      18,     14,     10,      7,\n       5,      5,      5,      3,\n       2,      1,      3,      7,\n      14,     23,     32,     38,\n      44,     51,     56,     62,\n      70,     79,     89,     97,\n     106,    113,    118,    119,\n     121,    123,    126,    129,\n     133,    139,    144,    148,\n     150,    149,    148,    148,\n     148,    151,    153,    155,\n     154,    153,    152,    153,\n     155,    160,    162,    162,\n     162,    159,    155,    151,\n     147,    145,    145,    147,\n     148,    150,    150,    151,\n     149,    149,    148,    151,\n     156,    162,    169,    177,\n     183,    188,    192,    198,\n     208,    217,    226,    233,\n     239,    240,    240,    241,\n     242,    244,    245,    247,\n     248,    246,    243,    240,\n     235,    230,    224,    217,\n     212,    206,    198,    191,\n     185,    177,    169,    160,\n     151,    141,    148,    134,\n     119,    105,     97,     91,\n      89,     85,     81,     75,\n      67,     60,     53,     46,\n      38,     32,     26,     25,\n      26,     30,     33,     35,\n      33,     31,     28,     24,\n      21,     19,     17,     18,\n      20,     21,     24,     28,\n      33,     37,     44,     55,\n      68,     81,     95,    108,\n     119,    128,    135,    142,\n     150,    160,    169,    177,\n     181,    185,    186,    185,\n     183,    183,    186,    189,\n     193,    195,    196,    194,\n     190,    181,    169,    157,\n     146,    135,    126,    122,\n     121,    121,    120,    115,\n     108,     99,     90,     82,\n      77,     73,     74,     79,\n      84,     92,     97,    101,\n     102,     99,     95,     92,\n      92,     97,    107,    120,\n     133,    145,    154,    162,\n     169,    178,    189,    201,\n     213,    223,    231,    238,\n     244,    249,    253,    254,\n     255,    255,    253,    251,\n     248,    241,    233,    225,\n     216,    209,    203,    197,\n     192,    187,    182,    175,\n     167,    158,    148,    156,\n     150,    144,    135,    123,\n     111,     97,     83,     73,\n      66,     62,     63,     64,\n      63,     60,     56,     49,\n      43,     39,     37,     36,\n      36,     34,     33,     33,\n      33,     36,     38,     39,\n      39,     37,     33,     29,\n      26,     25,     26,     31,\n      41,     53,     66,     79,\n      90,     98,    105,    110,\n     118,    129,    143,    159,\n     172,    182,    191,    195,\n     197,    202,    208,    217,\n     224,    229,    231,    230,\n     225,    220,    213,    205,\n     199,    193,    186,    177,\n     171,    164,    156,    148,\n     138,    129,    118,    103,\n      88,     73,     60,     49,\n      44,     42,     45,     47,\n      48,     46,     40,     35,\n      30,     29,     33,     44,\n      61,     82,    102,    120,\n     136,    148,    161,    175,\n     191,    208,    223,    235,\n     243,    248,    248,    248,\n     249,    250,    253,    255,\n     254,    252,    246,    238,\n     229,    220,    213,    209,\n     203,    198,    192,    184,\n     176,    169,    162,    156,\n     135,    128,    123,    117,\n     110,    102,     93,     84,\n      78,     73,     70,     68,\n      65,     61,     55,     51,\n      48,     47,     49,     53,\n      56,     58,     60,     60,\n      59,     58,     56,     52,\n      47,     40,     32,     25,\n      20,     18,     16,     15,\n      14,     13,     13,     11,\n      11,     11,     13,     15,\n      19,     25,     34,     43,\n      52,     61,     68,     73,\n      78,     85,     97,    112,\n     128,    142,    154,    162,\n     168,    176,    187,    198,\n     209,    217,    221,    219,\n     214,    210,    206,    203,\n     201,    200,    200,    198,\n     194,    186,    176,    166,\n     157,    151,    148,    149,\n     148,    144,    138,    129,\n     120,    114,    111,    114,\n     121,    130,    140,    149,\n     155,    159,    163,    172,\n     182,    195,    209,    220,\n     228,    231,    231,    231,\n     234,    239,    245,    251,\n     255,    254,    248,    238,\n     228,    217,    208,    200,\n     194,    188,    183,    176,\n     168,    159,    150,    142,\n     135,    107,     95,     84,\n      72,     61,     52,     43,\n      34,     27,     21,     15,\n      12,      9,      7,      6,\n       7,     10,     14,     18,\n      23,     29,     34,     40,\n      43,     47,     51,     53,\n      55,     55,     55,     54,\n      51,     49,     45,     41,\n      36,     31,     26,     21,\n      18,     15,     11,     10,\n      10,     10,     11,     13,\n      16,     19,     23,     27,\n      33,     38,     43,     49,\n      57,     68,     77,     88,\n      99,    110,    123,    134,\n     147,    157,    167,    178,\n     186,    195,    203,    211,\n     218,    223,    228,    232,\n     234,    235,    235,    233,\n     232,    229,    225,    222,\n     219,    214,    209,    204,\n     199,    194,    191,    189,\n     188,    191,    193,    197,\n     202,    207,    213,    217,\n     224,    229,    234,    239,\n     243,    247,    250,    253,\n     254,    255,    255,    254,\n     254,    251,    249,    245,\n     239,    232,    224,    216,\n     207,    198,    188,    177,\n     166,    155,    144,    131,\n     120,    107,    118,    104,\n      89,     73,     59,     48,\n      40,     32,     24,     15,\n       7,      3,      1,      1,\n       4,      7,     11,     15,\n      19,     24,     31,     36,\n      43,     46,     50,     55,\n      59,     63,     62,     62,\n      61,     62,     61,     61,\n      58,     54,     45,     37,\n      31,     29,     29,     30,\n      31,     33,     29,     25,\n      22,     24,     29,     35,\n      41,     46,     47,     47,\n      47,     50,     57,     64,\n      72,     79,     90,    104,\n     118,    133,    143,    155,\n     165,    174,    185,    194,\n     207,    215,    221,    228,\n     233,    238,    242,    244,\n     242,    241,    234,    227,\n     224,    223,    223,    219,\n     212,    205,    195,    189,\n     187,    189,    194,    198,\n     203,    206,    209,    211,\n     213,    216,    217,    218,\n     221,    225,    232,    235,\n     238,    239,    240,    240,\n     240,    242,    243,    242,\n     238,    231,    224,    216,\n     210,    205,    199,    189,\n     179,    165,    154,    147,\n     139,    131,    118,    132,\n     113,     91,     69,     52,\n      43,     39,     35,     30,\n      18,      7,      1,      2,\n       7,     16,     23,     29,\n      29,     29,     31,     37,\n      45,     54,     56,     58,\n      62,     65,     66,     63,\n      60,     58,     59,     60,\n      62,     62,     55,     42,\n      28,     18,     17,     20,\n      28,     36,     40,     35,\n      25,     17,     16,     23,\n      35,     47,     55,     57,\n      52,     46,     45,     49,\n      54,     57,     62,     74,\n      91,    110,    128,    140,\n     151,    159,    164,    175,\n     188,    204,    216,    222,\n     230,    235,    241,    246,\n     249,    249,    246,    234,\n     223,    216,    216,    220,\n     219,    213,    201,    186,\n     177,    178,    186,    197,\n     206,    212,    215,    218,\n     219,    219,    219,    216,\n     212,    212,    215,    222,\n     226,    231,    236,    240,\n     244,    246,    247,    248,\n     246,    239,    230,    221,\n     212,    208,    205,    199,\n     189,    175,    159,    150,\n     148,    148,    145,    132,\n     146,    122,     94,     67,\n      46,     40,     44,     47,\n      47,     34,     20,     15,\n      19,     33,     50,     62,\n      67,     64,     57,     53,\n      58,     66,     76,     79,\n      77,     78,     77,     75,\n      69,     61,     57,     58,\n      59,     64,     63,     56,\n      40,     22,      6,      6,\n      12,     26,     40,     48,\n      42,     27,     12,     10,\n      19,     36,     57,     72,\n      75,     68,     58,     52,\n      50,     51,     51,     52,\n      63,     83,    106,    125,\n     137,    146,    150,    151,\n     160,    175,    196,    210,\n     218,    225,    228,    231,\n     237,    242,    242,    239,\n     221,    203,    192,    189,\n     198,    201,    196,    183,\n     166,    155,    161,    175,\n     192,    207,    215,    216,\n     219,    218,    219,    217,\n     209,    199,    196,    200,\n     209,    213,    220,    231,\n     244,    251,    255,    255,\n     254,    247,    236,    226,\n     215,    206,    200,    197,\n     193,    181,    163,    146,\n     139,    148,    157,    160,\n     146,    154,    127,     96,\n      69,     49,     46,     54,\n      64,     68,     58,     45,\n      41,     49,     69,     92,\n     108,    113,    105,     93,\n      86,     88,     97,    107,\n     109,    105,    102,     99,\n      93,     85,     74,     68,\n      68,     69,     73,     73,\n      65,     49,     28,     11,\n      10,     17,     34,     52,\n      60,     53,     33,     15,\n      11,     21,     41,     67,\n      87,     92,     86,     75,\n      66,     61,     57,     54,\n      52,     61,     81,    104,\n     124,    135,    141,    141,\n     138,    145,    161,    182,\n     197,    204,    209,    210,\n     211,    216,    221,    222,\n     217,    197,    175,    159,\n     155,    165,    172,    169,\n     157,    140,    129,    139,\n     158,    178,    196,    204,\n     204,    206,    206,    207,\n     203,    194,    183,    178,\n     181,    189,    195,    206,\n     222,    239,    251,    255,\n     253,    249,    239,    225,\n     214,    202,    192,    187,\n     185,    179,    165,    147,\n     130,    127,    140,    158,\n     165,    154,    157,    129,\n      97,     71,     52,     51,\n      64,     79,     87,     79,\n      68,     65,     76,    101,\n     128,    147,    151,    141,\n     126,    115,    115,    124,\n     134,    135,    128,    122,\n     116,    108,     98,     84,\n      76,     75,     75,     79,\n      77,     70,     52,     30,\n      11,     10,     17,     36,\n      55,     64,     56,     35,\n      14,      9,     20,     42,\n      71,     95,    103,     99,\n      89,     77,     71,     65,\n      59,     56,     64,     84,\n     108,    126,    136,    141,\n     138,    132,    137,    152,\n     174,    189,    195,    198,\n     197,    196,    199,    203,\n     204,    199,    175,    152,\n     134,    127,    138,    146,\n     145,    134,    119,    109,\n     121,    144,    166,    185,\n     194,    193,    195,    195,\n     196,    193,    184,    170,\n     165,    169,    178,    184,\n     197,    217,    238,    251,\n     255,    250,    245,    232,\n     215,    204,    192,    182,\n     176,    173,    166,    152,\n     132,    117,    116,    133,\n     155,    166,    157,    144,\n     117,     86,     61,     43,\n      45,     63,     84,     97,\n      92,     83,     84,    100,\n     126,    155,    175,    178,\n     167,    148,    133,    129,\n     136,    145,    145,    135,\n     126,    117,    106,     95,\n      79,     70,     67,     66,\n      68,     65,     57,     39,\n      18,      1,      1,     10,\n      31,     52,     64,     57,\n      37,     19,     18,     31,\n      55,     86,    112,    120,\n     117,    107,     92,     82,\n      72,     61,     53,     60,\n      81,    103,    121,    129,\n     132,    128,    123,    130,\n     147,    169,    187,    198,\n     204,    203,    201,    206,\n     212,    212,    204,    175,\n     148,    126,    115,    127,\n     136,    137,    128,    114,\n     104,    117,    142,    163,\n     180,    187,    185,    187,\n     186,    189,    189,    184,\n     171,    163,    162,    171,\n     177,    191,    212,    233,\n     249,    252,    245,    238,\n     226,    213,    205,    194,\n     183,    176,    172,    164,\n     147,    124,    106,    103,\n     118,    141,    152,    144,\n     117,     89,     64,     47,\n      31,     34,     55,     84,\n     102,    100,     96,    104,\n     126,    153,    178,    196,\n     196,    184,    163,    144,\n     136,    140,    145,    142,\n     128,    115,    107,     97,\n      88,     73,     65,     62,\n      58,     61,     58,     51,\n      35,     16,      1,      2,\n      11,     30,     53,     67,\n      64,     49,     35,     39,\n      54,     82,    113,    139,\n     147,    144,    132,    114,\n     100,     87,     72,     59,\n      61,     79,     97,    111,\n     115,    117,    114,    112,\n     124,    142,    162,    186,\n     206,    220,    222,    218,\n     228,    235,    231,    219,\n     185,    157,    131,    116,\n     125,    132,    134,    130,\n     118,    110,    122,    143,\n     161,    171,    177,    174,\n     174,    171,    176,    183,\n     181,    168,    156,    152,\n     158,    161,    171,    192,\n     212,    228,    232,    225,\n     221,    212,    205,    203,\n     195,    185,    177,    174,\n     167,    146,    118,     97,\n      89,     98,    114,    125,\n     117,     84,     61,     48,\n      40,     29,     31,     48,\n      78,    100,    105,    109,\n     124,    147,    171,    187,\n     195,    193,    181,    163,\n     142,    128,    128,    131,\n     125,    107,     94,     86,\n      79,     73,     63,     61,\n      63,     61,     63,     58,\n      52,     44,     33,     24,\n      24,     29,     45,     63,\n      76,     75,     69,     64,\n      71,     88,    113,    140,\n     161,    168,    167,    158,\n     139,    123,    106,     92,\n      77,     75,     88,     94,\n     103,    104,    102,    101,\n     101,    117,    134,    150,\n     176,    206,    229,    233,\n     231,    247,    255,    249,\n     236,    202,    179,    153,\n     133,    139,    141,    142,\n     142,    134,    128,    135,\n     151,    161,    160,    161,\n     156,    156,    155,    159,\n     173,    178,    165,    153,\n     144,    147,    144,    146,\n     160,    174,    188,    192,\n     187,    190,    186,    186,\n     191,    190,    183,    177,\n     176,    169,    147,    121,\n     100,     84,     83,     90,\n      94,     84,     69,     52,\n      46,     45,     37,     35,\n      45,     71,     93,    105,\n     116,    134,    154,    169,\n     175,    175,    168,    159,\n     145,    127,    113,    110,\n     110,    103,     86,     74,\n      69,     66,     64,     61,\n      63,     68,     71,     73,\n      68,     65,     66,     64,\n      62,     64,     67,     75,\n      83,     91,     91,     91,\n      94,    103,    119,    137,\n     156,    170,    176,    179,\n     173,    159,    145,    128,\n     114,    100,     96,    102,\n     100,    103,    102,     99,\n      98,    102,    120,    134,\n     141,    163,    193,    220,\n     225,    224,    244,    255,\n     251,    239,    212,    197,\n     176,    157,    158,    155,\n     155,    157,    150,    145,\n     146,    156,    160,    152,\n     150,    146,    145,    144,\n     148,    164,    170,    159,\n     146,    133,    133,    127,\n     124,    132,    139,    150,\n     154,    151,    156,    156,\n     161,    169,    170,    166,\n     162,    164,    162,    146,\n     127,    112,     95,     85,\n      81,     80,     69,     58,\n      44,     42,     42,     36,\n      33,     40,     61,     83,\n      99,    114,    133,    152,\n     161,    163,    160,    152,\n     145,    134,    119,    106,\n     100,     99,     92,     76,\n      66,     62,     62,     65,\n      67,     72,     80,     86,\n      88,     84,     81,     84,\n      87,     89,     91,     93,\n      96,     99,    103,    105,\n     110,    117,    126,    139,\n     153,    166,    174,    179,\n     183,    182,    173,    161,\n     146,    135,    124,    121,\n     124,    116,    115,    111,\n     105,    103,    109,    128,\n     138,    139,    157,    187,\n     215,    221,    220,    242,\n     255,    251,    237,    214,\n     202,    185,    166,    166,\n     160,    161,    164,    159,\n     154,    151,    156,    156,\n     142,    139,    135,    133,\n     131,    134,    152,    161,\n     155,    141,    127,    123,\n     117,    113,    117,    120,\n     127,    129,    126,    130,\n     132,    140,    149,    151,\n     149,    148,    152,    152,\n     139,    125,    113,     97,\n      82,     73,     68,     58,\n      59,     47,     44,     42,\n      37,     38,     43,     60,\n      80,     95,    108,    126,\n     147,    158,    158,    156,\n     152,    147,    135,    121,\n     108,    102,    101,     96,\n      82,     72,     65,     66,\n      70,     71,     76,     86,\n      94,     96,     91,     88,\n      89,     91,     95,     96,\n      94,     96,     98,    102,\n     103,    108,    117,    129,\n     142,    157,    170,    178,\n     183,    187,    188,    181,\n     172,    161,    152,    144,\n     144,    148,    140,    135,\n     127,    119,    118,    126,\n     147,    155,    150,    165,\n     195,    221,    224,    219,\n     242,    255,    249,    231,\n     205,    195,    177,    155,\n     156,    152,    151,    157,\n     153,    149,    146,    152,\n     153,    137,    131,    129,\n     129,    129,    135,    156,\n     170,    165,    149,    130,\n     118,    106,    102,    104,\n     103,    104,    106,    102,\n     101,    102,    113,    125,\n     131,    131,    134,    140,\n     140,    132,    123,    114,\n      99,     86,     76,     69,\n      59,     76,     67,     63,\n      60,     58,     61,     63,\n      71,     83,     95,    102,\n     119,    144,    163,    164,\n     161,    161,    155,    136,\n     121,    109,    104,    103,\n     100,     87,     73,     60,\n      59,     61,     61,     61,\n      72,     84,     85,     78,\n      70,     66,     65,     71,\n      75,     73,     75,     83,\n      92,     92,     96,    110,\n     131,    147,    168,    187,\n     196,    200,    202,    203,\n     197,    189,    182,    178,\n     171,    176,    183,    171,\n     161,    145,    135,    136,\n     148,    173,    178,    167,\n     177,    206,    233,    229,\n     220,    243,    255,    243,\n     218,    187,    176,    154,\n     128,    131,    130,    131,\n     143,    146,    146,    147,\n     158,    166,    146,    138,\n     142,    147,    152,    161,\n     188,    205,    195,    175,\n     146,    117,     92,     87,\n      88,     81,     72,     71,\n      63,     56,     51,     62,\n      79,     89,     92,    102,\n     114,    121,    122,    123,\n     122,    112,    105,     96,\n      87,     76,    107,    106,\n     107,    109,    113,    121,\n     120,    114,    110,    109,\n     109,    124,    155,    181,\n     187,    185,    187,    179,\n     150,    132,    124,    119,\n     116,    114,    100,     81,\n      59,     47,     47,     38,\n      26,     32,     44,     42,\n      27,     14,      2,      1,\n      14,     29,     34,     41,\n      63,     85,     88,     94,\n     116,    152,    176,    202,\n     228,    240,    239,    231,\n     225,    214,    207,    207,\n     207,    201,    205,    210,\n     194,    169,    141,    127,\n     132,    149,    175,    180,\n     163,    166,    192,    218,\n     207,    196,    222,    234,\n     220,    191,    157,    147,\n     125,     96,    106,    108,\n     106,    125,    136,    142,\n     147,    162,    177,    155,\n     141,    153,    161,    168,\n     183,    213,    232,    217,\n     198,    175,    131,     92,\n      88,     90,     77,     59,\n      59,     49,     29,     16,\n      20,     32,     41,     43,\n      56,     74,     89,    104,\n     120,    132,    135,    139,\n     134,    117,    107,    147,\n     152,    155,    158,    167,\n     174,    169,    154,    140,\n     129,    120,    124,    146,\n     170,    176,    175,    178,\n     170,    145,    133,    130,\n     129,    129,    128,    120,\n     104,     85,     75,     72,\n      60,     43,     43,     48,\n      41,     26,     14,      3,\n       1,     12,     29,     40,\n      48,     71,     92,     97,\n     102,    122,    154,    178,\n     202,    226,    234,    228,\n     214,    205,    195,    191,\n     196,    201,    198,    199,\n     200,    183,    158,    131,\n     119,    123,    134,    149,\n     151,    136,    134,    147,\n     160,    151,    142,    156,\n     165,    157,    140,    119,\n     118,    106,     88,     96,\n     101,    102,    116,    127,\n     135,    140,    154,    171,\n     157,    146,    156,    163,\n     168,    177,    197,    208,\n     196,    189,    179,    143,\n     112,    108,    111,    101,\n      85,     86,     79,     59,\n      45,     42,     43,     41,\n      38,     48,     63,     79,\n      99,    122,    143,    153,\n     162,    162,    151,    147,\n     173,    181,    185,    189,\n     199,    207,    198,    176,\n     154,    136,    122,    120,\n     136,    158,    164,    163,\n     165,    157,    131,    119,\n     119,    119,    120,    122,\n     118,    105,     90,     82,\n      79,     67,     52,     50,\n      54,     47,     31,     18,\n       6,      1,     12,     28,\n      37,     46,     65,     84,\n      87,     92,    112,    145,\n     172,    197,    222,    233,\n     225,    210,    200,    192,\n     191,    199,    207,    208,\n     209,    208,    191,    164,\n     135,    121,    123,    131,\n     140,    142,    129,    124,\n     128,    134,    125,    117,\n     125,    131,    126,    112,\n      97,     98,     93,     79,\n      87,     93,     94,    107,\n     118,    128,    138,    154,\n     177,    169,    160,    172,\n     180,    184,    191,    204,\n     212,    199,    195,    191,\n     156,    123,    118,    120,\n     108,     88,     89,     85,\n      65,     51,     43,     40,\n      32,     26,     35,     51,\n      68,     93,    125,    150,\n     167,    180,    182,    173,\n     173,    152,    160,    167,\n     161,    161,    184,    204,\n     199,    152,     92,     78,\n     104,    128,    147,    142,\n     151,    165,    178,    157,\n     145,    154,    154,    159,\n     147,    103,     68,     79,\n     113,    118,    100,     68,\n      84,    118,    132,     98,\n      79,     76,     85,    117,\n      99,     43,      9,     12,\n      46,     74,     83,     85,\n     113,    142,    188,    199,\n     165,    126,     84,     97,\n     107,    121,    119,    133,\n     156,    200,    255,    244,\n     196,    163,    120,    127,\n     160,    157,    145,    122,\n     140,    198,    232,    213,\n     215,    223,    201,    191,\n     166,    113,    103,     79,\n      68,     93,    117,    135,\n     169,    161,    139,    148,\n     166,    188,    143,     87,\n      79,     80,     63,     63,\n      98,    116,    124,    143,\n     156,    121,     70,     70,\n      92,     97,     70,     83,\n      82,     81,     83,     83,\n      99,    108,     94,     99,\n     120,    113,    103,    122,\n     162,    178,    174,    154,\n     141,    152,    159,    145,\n     116,    132,    154,    160,\n     154,    134,     88,     68,\n      67,     64,     70,    106,\n     156,    194,    198,    165,\n     118,    122,    166,    184,\n     186,    145,    109,     84,\n     118,    179,    202,    147,\n      73,     56,    108,    147,\n      90,     61,     47,     72,\n     108,    121,     82,     45,\n       6,     14,     61,    102,\n      97,     71,     87,    138,\n     170,    166,    127,     71,\n      80,    111,    141,    143,\n     140,    142,    181,    226,\n     233,    182,    126,     98,\n     123,    192,    204,    157,\n     106,    135,    218,    255,\n     207,    127,     88,    102,\n     154,    190,    179,    159,\n     110,     74,    102,    122,\n     122,    111,     91,     99,\n     139,    158,    171,    152,\n     155,    162,    145,    114,\n      92,    115,    148,    168,\n     192,    180,    101,     40,\n      61,     97,    105,     91,\n      97,    112,    140,    147,\n     131,    122,    108,     63,\n      55,     93,    128,    153,\n     158,    155,    163,    176,\n     179,    169,    159,    160,\n     162,    152,    149,    152,\n     148,    142,    125,    110,\n     103,    101,    103,    110,\n     121,    137,    159,    176,\n     188,    166,    153,    161,\n     179,    186,    168,    142,\n     108,    118,    134,    130,\n     115,     89,     79,     98,\n     113,     93,     73,     49,\n      50,     61,     68,     54,\n      42,     44,     54,     59,\n      65,     72,     80,     91,\n     104,    106,     90,     83,\n      92,    109,    132,    143,\n     144,    149,    159,    168,\n     183,    184,    164,    150,\n     148,    158,    163,    176,\n     187,    184,    194,    225,\n     255,    252,    233,    214,\n     188,    176,    180,    180,\n     175,    156,    135,    148,\n     167,    175,    165,    149,\n     141,    155,    168,    168,\n     143,    121,    114,    120,\n     120,    125,    123,    102,\n      86,    104,    115,     91,\n      63,     54,     53,     62,\n      64,     70,     71,     73,\n      79,     95,    105,    102,\n      95,     99,    117,    118,\n     120,    126,    133,    138,\n     136,    140,    144,    160,\n     147,    159,    148,    140,\n     131,    128,    128,    130,\n     114,     99,     99,    115,\n     129,    136,    143,    157,\n     184,    214,    222,    211,\n     202,    219,    233,    236,\n     212,    175,    168,    170,\n     162,    144,    115,     97,\n      99,    112,    108,     85,\n      60,     51,     48,     58,\n      51,     48,     44,     38,\n      33,     29,     34,     40,\n      54,     70,     74,     71,\n      71,     79,     93,    104,\n     109,    119,    131,    146,\n     163,    174,    173,    165,\n     164,    179,    193,    191,\n     190,    195,    207,    226,\n     241,    249,    255,    243,\n     235,    221,    201,    183,\n     172,    177,    179,    170,\n     168,    159,    152,    146,\n     135,    132,    145,    146,\n     133,    111,    111,    117,\n     126,    123,    114,    109,\n      87,     56,     44,     46,\n      39,     32,     43,     53,\n      57,     45,     48,     62,\n      78,     78,     80,     84,\n      93,     97,    104,    123,\n     127,    128,    131,    138,\n     142,    125,    116,    129,\n     147,    135,    158,    148,\n     144,    129,    108,    119,\n     122,    110,     88,     75,\n      97,    110,    128,    139,\n     133,    166,    202,    225,\n     220,    199,    210,    231,\n     230,    216,    179,    175,\n     167,    158,    140,    107,\n      90,     88,    103,    109,\n      96,     78,     71,     68,\n      78,     77,     83,     81,\n      61,     40,     35,     38,\n      37,     45,     65,     75,\n      75,     81,     98,    115,\n     112,    110,    118,    134,\n     143,    155,    162,    156,\n     151,    162,    174,    183,\n     183,    178,    182,    193,\n     213,    227,    238,    255,\n     255,    246,    233,    213,\n     195,    177,    174,    168,\n     154,    149,    143,    138,\n     140,    139,    142,    142,\n     137,    129,    116,    122,\n     134,    132,    116,    107,\n     113,     97,     56,     33,\n      30,     28,     26,     35,\n      55,     71,     68,     65,\n      73,     93,     95,     92,\n      90,    103,    117,    123,\n     126,    115,    118,    131,\n     141,    143,    126,    113,\n     124,    135,    119,    140,\n     135,    131,    113,     91,\n     100,    114,    112,     81,\n      69,     87,    109,    121,\n     124,    115,    149,    193,\n     225,    214,    191,    196,\n     233,    234,    216,    177,\n     164,    159,    156,    135,\n     112,     96,     90,    110,\n     122,    113,     89,     75,\n      68,     80,     88,    100,\n     101,     80,     53,     50,\n      56,     55,     56,     69,\n      83,     87,     90,    112,\n     131,    124,    115,    124,\n     141,    151,    159,    159,\n     149,    145,    161,    188,\n     204,    208,    202,    195,\n     206,    222,    228,    234,\n     248,    255,    247,    234,\n     226,    208,    192,    181,\n     175,    165,    157,    148,\n     138,    136,    143,    145,\n     146,    138,    127,    111,\n     113,    122,    124,    108,\n     106,    105,     96,     60,\n      32,     19,     23,     22,\n      26,     44,     61,     56,\n      53,     62,     88,     94,\n      89,     84,     97,    117,\n     129,    127,    106,    106,\n     116,    131,    126,    117,\n     105,    116,    119,    133,\n     148,    139,    130,    110,\n      83,     96,    117,    112,\n      84,     79,     98,    116,\n     131,    130,    122,    158,\n     204,    232,    228,    205,\n     213,    239,    244,    232,\n     196,    173,    165,    159,\n     144,    127,    107,     92,\n     108,    131,    122,     97,\n      72,     58,     71,     91,\n     108,    111,     87,     57,\n      51,     60,     58,     58,\n      66,     77,     78,     82,\n     106,    129,    121,    104,\n     115,    135,    150,    161,\n     154,    137,    134,    153,\n     185,    209,    215,    208,\n     199,    209,    226,    229,\n     227,    243,    255,    245,\n     235,    225,    205,    185,\n     180,    178,    170,    150,\n     136,    128,    130,    139,\n     140,    138,    133,    121,\n     102,    104,    115,    112,\n     101,     96,     93,     84,\n      54,     19,      7,     10,\n      11,     15,     35,     53,\n      48,     40,     54,     82,\n      95,     93,     85,     97,\n     121,    140,    136,    109,\n     106,    120,    136,    134,\n     115,    112,    119,    133,\n     129,    153,    151,    140,\n     114,     77,     84,    120,\n     118,     88,     71,     94,\n     122,    133,    131,    116,\n     142,    195,    240,    241,\n     212,    198,    234,    250,\n     241,    202,    172,    160,\n     159,    143,    121,    108,\n      94,    116,    130,    124,\n     100,     81,     68,     78,\n      93,    108,    115,    101,\n      72,     58,     65,     60,\n      60,     66,     84,     87,\n      89,    108,    130,    124,\n     109,    118,    135,    147,\n     153,    148,    130,    130,\n     144,    175,    205,    209,\n     198,    187,    197,    217,\n     214,    209,    229,    248,\n     240,    230,    218,    194,\n     175,    168,    169,    165,\n     145,    128,    116,    119,\n     133,    136,    134,    129,\n     118,     94,     96,    114,\n     113,    106,     92,     87,\n      84,     58,     21,      1,\n       4,     10,     13,     40,\n      55,     49,     45,     57,\n      95,    111,    106,     98,\n     113,    133,    152,    145,\n     121,    117,    123,    134,\n     137,    121,    123,    124,\n     129,     76,    122,    115,\n      84,     60,     22,     58,\n     125,    133,    107,    104,\n      82,     49,     34,     62,\n      75,    117,    145,    183,\n     176,    146,    114,    173,\n     181,    179,    127,    107,\n     111,    116,    107,    100,\n     134,    151,    190,    186,\n     152,    102,     91,     89,\n     121,    146,    141,    135,\n     126,    121,    130,    158,\n     155,    145,    136,    133,\n     125,    145,    189,    212,\n     183,    160,    175,    183,\n     170,    191,    190,    144,\n     113,     19,     46,    120,\n     183,    184,    218,    171,\n     146,    134,    156,    220,\n     255,    229,    190,    172,\n     130,    101,    130,    195,\n     234,    206,    157,    108,\n      86,     98,    124,    162,\n     177,    159,     90,     76,\n     102,    139,    170,    190,\n     176,    145,     82,     15,\n       6,     50,     82,     86,\n      96,     99,     65,     60,\n      66,    124,    139,    144,\n     119,    120,    104,     99,\n     105,    116,    142,    155,\n     137,     83,     55,     69,\n      56,     76,      3,      1,\n       4,     19,     34,     47,\n      80,    115,    127,    108,\n      67,     35,     22,     17,\n      23,     31,     53,     83,\n     117,    147,    161,    159,\n     147,    111,     80,     53,\n      42,     45,     61,     84,\n     106,    126,    142,    160,\n     165,    147,    112,     77,\n      55,     60,     82,    115,\n     150,    175,    191,    210,\n     232,    230,    196,    151,\n     122,    121,    139,    155,\n     160,    170,    192,    220,\n     244,    249,    239,    205,\n     157,    125,    125,    130,\n     145,    156,    171,    204,\n     230,    241,    246,    241,\n     231,    208,    181,    169,\n     163,    157,    162,    179,\n     206,    227,    231,    228,\n     215,    192,    160,    133,\n     120,    114,    105,     96,\n     108,    138,    170,    188,\n     189,    174,    146,    102,\n      69,     55,     59,     65,\n      68,     86,    116,    145,\n     161,    154,    141,    117,\n      87,     56,     46,     51,\n      58,     63,     75,    102,\n     129,    136,    122,     91,\n      64,     31,      3,      9,\n      17,     29,     44,     64,\n      89,    117,    134,    129,\n     104,     67,     36,     22,\n      22,     27,     33,     51,\n      88,    131,    155,    152,\n     131,    101,     70,     44,\n      30,     26,     34,     50,\n      75,    104,    131,    146,\n     151,    144,    125,     91,\n      55,     39,     51,     83,\n     114,    142,    170,    194,\n     211,    212,    193,    159,\n     125,    104,    102,    113,\n     126,    138,    157,    190,\n     228,    244,    231,    201,\n     163,    131,    111,    113,\n     115,    124,    144,    176,\n     217,    246,    255,    250,\n     237,    215,    189,    166,\n     155,    149,    149,    162,\n     187,    215,    237,    245,\n     242,    220,    183,    144,\n     119,    112,    112,    111,\n     118,    139,    170,    194,\n     203,    198,    177,    148,\n     114,     89,     80,     79,\n      87,    107,    140,    170,\n     186,    185,    168,    143,\n     114,     86,     65,     58,\n      60,     68,     83,    103,\n     127,    141,    138,    124,\n      94,     56,     22,      9,\n      18,     28,     39,     55,\n      80,    110,    134,    138,\n     116,     80,     47,     28,\n      24,     30,     37,     48,\n      68,     95,    121,    132,\n     118,     89,     58,     35,\n      24,     17,     16,     26,\n      47,     73,     99,    121,\n     129,    120,    101,     77,\n      56,     44,     48,     66,\n      91,    116,    141,    165,\n     183,    190,    178,    148,\n     116,     98,     96,    104,\n     118,    133,    148,    170,\n     193,    210,    211,    191,\n     164,    138,    121,    113,\n     116,    126,    142,    165,\n     196,    230,    251,    251,\n     241,    225,    204,    181,\n     165,    162,    168,    177,\n     192,    215,    240,    255,\n     252,    232,    203,    176,\n     151,    137,    136,    137,\n     136,    146,    173,    205,\n     219,    210,    188,    162,\n     140,    118,    103,    101,\n     108,    124,    149,    177,\n     198,    199,    185,    160,\n     135,    109,     85,     72,\n      72,     83,     97,    110,\n     126,    142,    144,    128,\n      99,     67,     42,     22,\n      18,     47,     56,     67,\n      83,    101,    113,    115,\n     102,     79,     52,     30,\n      25,     31,     46,     58,\n      66,     81,     97,    109,\n     105,     84,     54,     28,\n      14,     16,     28,     39,\n      48,     60,     73,     89,\n     102,     97,     78,     55,\n      38,     32,     38,     57,\n      77,     98,    115,    134,\n     152,    158,    152,    130,\n     104,     86,     84,     96,\n     112,    127,    140,    154,\n     173,    187,    190,    178,\n     155,    133,    118,    118,\n     127,    127,    141,    160,\n     187,    214,    237,    246,\n     238,    221,    198,    178,\n     169,    170,    179,    190,\n     198,    211,    229,    248,\n     255,    241,    215,    185,\n     167,    159,    159,    163,\n     166,    174,    188,    208,\n     223,    220,    204,    181,\n     162,    147,    138,    136,\n     139,    146,    159,    178,\n     194,    200,    193,    174,\n     144,    119,    102,     96,\n      99,    106,    111,    118,\n     128,    140,    145,    136,\n     109,     80,     56,     47,\n      45,     47,     75,     86,\n      93,    100,    106,    107,\n      98,     80,     56,     37,\n      28,     34,     48,     64,\n      77,     81,     85,     87,\n      85,     72,     52,     28,\n       7,      1,     11,     28,\n      44,     54,     63,     70,\n      76,     76,     65,     44,\n      24,     16,     22,     39,\n      62,     80,     94,    106,\n     119,    128,    130,    120,\n      99,     79,     72,     79,\n      98,    120,    137,    147,\n     155,    163,    164,    159,\n     147,    128,    111,    106,\n     114,    131,    146,    167,\n     184,    201,    216,    229,\n     230,    217,    196,    177,\n     170,    176,    190,    205,\n     217,    227,    238,    247,\n     249,    238,    217,    194,\n     174,    166,    171,    183,\n     194,    202,    209,    217,\n     225,    227,    215,    194,\n     170,    153,    149,    156,\n     169,    179,    185,    192,\n     199,    204,    201,    185,\n     161,    136,    121,    115,\n     119,    127,    133,    136,\n     143,    148,    149,    138,\n     117,     88,     65,     53,\n      54,     64,     75,     97,\n     108,    114,    112,    109,\n      99,     81,     62,     44,\n      35,     37,     51,     69,\n      87,     96,     97,     92,\n      83,     72,     53,     30,\n      11,      1,      7,     26,\n      48,     63,     68,     68,\n      62,     56,     50,     36,\n      20,     10,     12,     27,\n      50,     74,     94,    104,\n     109,    113,    108,    100,\n      87,     72,     65,     70,\n      85,    107,    131,    145,\n     151,    150,    147,    138,\n     127,    114,    100,     94,\n     100,    119,    146,    156,\n     179,    192,    200,    208,\n     211,    203,    186,    169,\n     160,    167,    185,    204,\n     224,    236,    242,    244,\n     243,    235,    218,    197,\n     179,    168,    170,    181,\n     199,    212,    221,    224,\n     222,    218,    212,    196,\n     178,    163,    156,    161,\n     176,    195,    207,    213,\n     215,    212,    208,    197,\n     176,    152,    131,    124,\n     129,    142,    156,    162,\n     161,    158,    151,    141,\n     122,     98,     74,     60,\n      59,     69,     84,     97,\n     114,    118,    113,    101,\n      88,     73,     57,     47,\n      42,     45,     56,     72,\n      87,     96,     95,     86,\n      71,     55,     40,     24,\n       9,      3,      5,     19,\n      39,     56,     61,     57,\n      48,     39,     28,     20,\n      11,      4,      6,     18,\n      39,     64,     84,     95,\n      98,     95,     88,     77,\n      67,     61,     60,     65,\n      81,    101,    120,    135,\n     143,    141,    133,    123,\n     109,     98,     92,     90,\n      97,    114,    141,    166,\n     178,    194,    201,    200,\n     197,    191,    182,    171,\n     164,    171,    190,    215,\n     235,    249,    255,    252,\n     245,    235,    222,    206,\n     188,    180,    182,    193,\n     209,    223,    231,    233,\n     228,    217,    204,    192,\n     179,    171,    169,    176,\n     190,    205,    220,    229,\n     229,    223,    212,    200,\n     185,    168,    153,    144,\n     149,    159,    172,    179,\n     177,    167,    154,    139,\n     123,    102,     85,     71,\n      68,     76,     91,    107,\n     114,    113,    111,    102,\n      88,     74,     60,     49,\n      47,     51,     61,     72,\n      82,     89,     89,     79,\n      61,     40,     25,     19,\n      16,     13,     15,     22,\n      36,     49,     56,     54,\n      42,     28,     16,      7,\n       6,      7,     12,     24,\n      42,     59,     73,     81,\n      80,     78,     72,     67,\n      58,     53,     55,     63,\n      77,     96,    111,    121,\n     128,    128,    120,    108,\n      97,     90,     91,     99,\n     109,    122,    140,    159,\n     172,    182,    188,    185,\n     179,    176,    175,    173,\n     172,    176,    189,    212,\n     233,    248,    255,    254,\n     244,    231,    219,    206,\n     195,    191,    197,    208,\n     219,    228,    234,    236,\n     233,    222,    208,    194,\n     184,    178,    179,    190,\n     202,    215,    225,    231,\n     232,    223,    211,    199,\n     190,    181,    170,    163,\n     161,    169,    178,    184,\n     183,    175,    160,    143,\n     125,    110,     95,     89,\n      87,     95,    105,    113,\n     115,    113,    106,     96,\n      85,     72,     63,     57,\n      57,     63,     69,     75,\n      80,     82,     79,     73,\n      59,     42,     28,     18,\n      16,     16,     18,     22,\n      29,     38,     41,     38,\n      27,     14,      6,      2,\n       1,      5,     11,     19,\n      33,     48,     60,     67,\n      68,     64,     60,     56,\n      54,     53,     56,     65,\n      77,     90,    102,    109,\n     112,    112,    107,     98,\n      89,     86,     88,     97,\n     109,    121,    134,    148,\n     162,    169,    176,    174,\n     169,    164,    165,    170,\n     177,    184,    195,    213,\n     234,    247,    249,    244,\n     236,    228,    220,    213,\n     208,    206,    209,    219,\n     229,    236,    239,    239,\n     234,    225,    213,    201,\n     194,    194,    199,    205,\n     214,    222,    230,    235,\n     235,    228,    215,    203,\n     194,    188,    185,    182,\n     181,    184,    190,    192,\n     188,    177,    162,    146,\n     131,    118,    109,    102,\n      99,    102,    109,    115,\n     118,    114,    106,     97,\n      87,     78,     70,     67,\n      67,     70,     74,     76,\n      79,     79,     74,     67,\n      56,     43,     32,     25,\n      21,     21,     22,     24,\n      27,     29,     30,     27,\n      21,     13,      4,      1,\n       1,      5,     13,     22,\n      31,     40,     48,     51,\n      55,     55,     53,     52,\n      51,     53,     58,     65,\n      74,     82,     90,     96,\n      97,     96,     94,     89,\n      86,     86,     90,     96,\n     104,    116,    126,    136,\n     146,    154,    155,    163,\n     161,    159,    161,    167,\n     176,    187,    200,    214,\n     227,    238,    242,    240,\n     235,    228,    223,    219,\n     217,    218,    221,    225,\n     232,    237,    238,    237,\n     232,    225,    215,    206,\n     202,    202,    207,    213,\n     219,    225,    230,    233,\n     231,    226,    219,    209,\n     203,    198,    196,    195,\n     195,    197,    197,    196,\n     190,    181,    168,    155,\n     141,    129,    121,    117,\n     114,    115,    116,    116,\n     116,    113,    107,     97,\n      94,     89,     84,     81,\n      81,     80,     79,     77,\n      73,     70,     65,     60,\n      53,     45,     38,     32,\n      29,     27,     25,     24,\n      21,     18,     15,     12,\n       9,      5,      3,      1,\n       2,      6,     10,     16,\n      21,     26,     30,     32,\n      35,     37,     39,     42,\n      44,     49,     54,     60,\n      65,     70,     74,     76,\n      78,     79,     79,     80,\n      81,     83,     88,     94,\n     102,    109,    115,    122,\n     128,    134,    140,    144,\n     152,    157,    163,    170,\n     180,    191,    201,    211,\n     218,    225,    229,    231,\n     231,    231,    230,    231,\n     231,    233,    236,    238,\n     239,    239,    239,    237,\n     234,    229,    225,    222,\n     221,    221,    223,    225,\n     228,    230,    229,    230,\n     229,    226,    222,    218,\n     214,    211,    209,    208,\n     207,    205,    201,    195,\n     189,    182,    174,    164,\n     156,    148,    142,    137,\n     133,    130,    127,    122,\n     118,    113,    108,    102,\n      94,    107,    103,    100,\n      96,     93,     90,     86,\n      80,     75,     71,     66,\n      62,     57,     51,     45,\n      40,     36,     30,     26,\n      20,     15,     11,      8,\n       5,      4,      2,      2,\n       1,      2,      3,      4,\n       7,      9,     12,     15,\n      17,     21,     26,     30,\n      33,     36,     40,     44,\n      48,     51,     53,     55,\n      57,     61,     64,     67,\n      71,     74,     77,     81,\n      85,     92,     95,    101,\n     107,    114,    121,    129,\n     136,    146,    152,    161,\n     169,    177,    185,    192,\n     199,    205,    210,    216,\n     221,    225,    228,    231,\n     233,    235,    236,    237,\n     237,    237,    236,    236,\n     237,    237,    237,    238,\n     238,    238,    239,    239,\n     239,    239,    239,    237,\n     238,    238,    237,    235,\n     232,    230,    227,    224,\n     221,    216,    210,    205,\n     199,    193,    187,    181,\n     175,    169,    163,    157,\n     151,    145,    139,    134,\n     128,    123,    118,    115,\n     112,    107,    118,    145,\n     115,    103,    137,    172,\n     138,    118,     93,    169,\n     152,    137,    134,    149,\n     145,     98,    107,    119,\n      93,     95,     70,     56,\n      47,     52,     80,     36,\n      55,     49,     64,     37,\n      22,     63,     39,     39,\n      34,     30,     45,     47,\n      43,     34,     37,     57,\n      97,    109,     98,     94,\n      90,     81,    104,    103,\n      82,    110,     98,     79,\n      70,     74,    127,     92,\n      86,     80,    113,    126,\n     118,     79,    199,    181,\n     201,    163,    192,    200,\n     176,    191,    189,    208,\n     220,    229,    213,    209,\n     232,    255,    213,    225,\n     218,    196,    214,    181,\n     216,    227,    235,    186,\n     215,    163,    195,    169,\n     173,    156,    200,    181,\n     129,    135,    129,    172,\n     149,    128,    137,    138,\n     118,    132,    143,    127,\n      75,    127,    118,    103,\n     105,    100,    130,    131,\n     109,    140,    156,    124,\n     128,    135,    160,    140,\n     138,    120,    118,    108,\n      77,     93,     91,     95,\n     100,     81,     85,     75,\n     111,     84,     68,     74,\n      65,     65,     50,     50,\n      79,     54,     37,     26,\n      45,      1,     33,     65,\n      33,     32,     16,     20,\n      29,     30,     52,     46,\n      41,     32,     43,     67,\n      94,     94,     68,     72,\n      69,    100,    158,    162,\n     150,    124,    103,    130,\n     138,    163,    176,    174,\n     146,    114,    146,    163,\n     150,    139,    133,    150,\n     171,    170,    139,    141,\n     155,    155,    153,    178,\n     173,    145,    141,    159,\n     163,    158,    163,    160,\n     162,    215,    248,    231,\n     221,    194,    175,    212,\n     210,    215,    239,    237,\n     210,    213,    189,    225,\n     206,    205,    203,    231,\n     207,    184,    164,    160,\n     196,    180,    159,    158,\n     159,    168,    179,    172,\n     159,    124,    148,    136,\n     141,    146,    128,    135,\n     121,    103,    105,    115,\n     105,    107,    117,    112,\n      91,     89,     86,    108,\n      90,     55,     83,     79,\n      62,     60,     57,     73,\n      77,     83,     52,     60,\n      49,     39,     42,     37,\n      39,     52,     41,     30,\n      25,     44,      1,     29,\n      44,     41,     48,     33,\n      26,     37,     46,     64,\n      50,     58,     52,     66,\n      91,    117,    124,     98,\n      82,     81,    113,    194,\n     197,    178,    150,    124,\n     146,    169,    198,    206,\n     199,    187,    154,    181,\n     205,    192,    154,    149,\n     174,    210,    215,    194,\n     122,    117,    131,    150,\n     190,    194,    158,    122,\n     129,    150,    163,    149,\n     153,    145,    206,    249,\n     239,    229,    198,    173,\n     198,    218,    232,    247,\n     234,    212,    205,    200,\n     222,    211,    214,    211,\n     229,    203,    199,    180,\n     171,    189,    177,    151,\n     145,    149,    162,    158,\n     147,    147,    122,    123,\n     111,    119,    139,    127,\n     114,     90,     94,     69,\n      69,     85,     98,    100,\n      76,     46,     48,     69,\n      90,     57,     29,     58,\n      68,     51,     40,     39,\n      53,     59,     53,     39,\n      69,     59,     34,     31,\n      28,     33,     46,     43,\n      38,     47,     43,      1,\n      23,     45,     53,     53,\n      44,     41,     44,     57,\n      73,     58,     80,     63,\n      72,    107,    142,    145,\n     114,     95,     98,    127,\n     223,    227,    210,    181,\n     148,    167,    196,    223,\n     229,    224,    217,    180,\n     194,    240,    222,    169,\n     149,    189,    238,    241,\n     217,    136,    100,    128,\n     144,    197,    214,    170,\n     123,    128,    161,    168,\n     142,    155,    137,    181,\n     235,    239,    225,    189,\n     157,    170,    209,    255,\n     251,    241,    216,    189,\n     195,    223,    219,    211,\n     201,    216,    188,    189,\n     178,    167,    174,    163,\n     143,    146,    150,    149,\n     115,    122,    128,    110,\n     106,     98,     98,    114,\n     105,     80,     70,     96,\n      67,     50,     64,     80,\n      80,     59,     33,     37,\n      65,     57,     37,     25,\n      47,     60,     52,     43,\n      42,     46,     52,     55,\n      61,     79,     70,     51,\n      45,     42,     40,     53,\n      62,     57,     57,     42,\n      23,     41,     53,     62,\n      66,     62,     60,     63,\n      77,     81,     77,     96,\n      87,     84,    114,    154,\n     159,    127,    110,    116,\n     147,    230,    236,    227,\n     211,    173,    175,    208,\n     236,    237,    232,    231,\n     210,    197,    239,    233,\n     188,    158,    191,    239,\n     248,    228,    140,     88,\n     117,    131,    181,    201,\n     162,    115,    120,    159,\n     145,    121,    154,    133,\n     153,    216,    231,    214,\n     173,    140,    150,    208,\n     255,    239,    228,    206,\n     180,    181,    210,    213,\n     199,    194,    199,    172,\n     170,    174,    157,    154,\n     145,    136,    137,    136,\n     126,     98,     97,    107,\n      98,     99,     97,     86,\n      89,     88,     77,     77,\n      88,     73,     55,     58,\n      69,     72,     60,     41,\n      41,     49,     37,     20,\n      17,     33,     46,     47,\n      43,     39,     37,     44,\n      57,     71,     86,     79,\n      63,     53,     45,     41,\n      55,     68,     64,     56,\n      40,     33,     46,     55,\n      63,     73,     72,     68,\n      71,     84,     89,     87,\n     101,    101,     96,    116,\n     159,    171,    145,    126,\n     131,    167,    235,    251,\n     250,    239,    202,    191,\n     220,    255,    254,    253,\n     251,    237,    215,    241,\n     251,    214,    172,    191,\n     236,    253,    229,    149,\n      85,    106,    121,    155,\n     183,    157,    107,    111,\n     146,    131,    108,    135,\n     131,    135,    194,    228,\n     210,    168,    133,    144,\n     204,    255,    242,    228,\n     210,    183,    177,    205,\n     211,    196,    193,    191,\n     167,    160,    167,    156,\n     142,    138,    132,    131,\n     127,    111,     82,     75,\n      82,     84,     90,     89,\n      75,     67,     70,     75,\n      80,     85,     74,     58,\n      49,     54,     59,     58,\n      45,     35,     31,     20,\n      27,     26,     38,     52,\n      61,     62,     57,     51,\n      55,     68,     82,     96,\n      95,     82,     67,     59,\n      58,     67,     76,     76,\n      69,     59,     56,     62,\n      72,     79,     86,     88,\n      84,     86,     94,    100,\n     103,    109,    111,    109,\n     121,    150,    168,    163,\n     146,    146,    171,    216,\n     245,    253,    240,    214,\n     199,    211,    240,    255,\n     254,    245,    234,    222,\n     230,    238,    217,    183,\n     180,    203,    220,    206,\n     158,    106,     99,    113,\n     130,    150,    144,    115,\n     104,    121,    122,    108,\n     113,    119,    126,    162,\n     198,    195,    168,    143,\n     145,    184,    225,    226,\n     212,    196,    179,    173,\n     186,    192,    185,    178,\n     172,    160,    156,    157,\n     148,    133,    125,    126,\n     125,    121,    104,     80,\n      70,     74,     82,     89,\n      88,     80,     71,     69,\n      76,     88,     91,     83,\n      70,     57,     52,     55,\n      60,     58,     51,     40,\n      27,     26,     23,     31,\n      46,     62,     69,     67,\n      60,     59,     67,     82,\n      97,     99,     88,     74,\n      62,     60,     67,     74,\n      76,     74,     67,     62,\n      68,     76,     83,     91,\n      96,     95,     96,    100,\n     107,    111,    115,    116,\n     118,    130,    153,    173,\n     176,    166,    163,    179,\n     213,    241,    254,    245,\n     226,    211,    213,    231,\n     249,    255,    246,    240,\n     234,    237,    240,    227,\n     199,    184,    191,    203,\n     198,    171,    125,    106,\n     110,    123,    138,    139,\n     123,    107,    110,    116,\n     112,    109,    110,    118,\n     146,    180,    191,    176,\n     158,    156,    179,    211,\n     223,    214,    199,    181,\n     171,    174,    183,    181,\n     174,    165,    157,    151,\n     151,    142,    127,    115,\n     114,    115,    111,     97,\n      78,     64,     64,     75,\n      86,     88,     82,     72,\n      66,     69,     80,     87,\n      82,     70,     53,     41,\n      41,     48,     52,     50,\n      39,     26,      1,      1,\n       5,     13,     22,     34,\n      45,     56,     64,     72,\n      77,     79,     77,     72,\n      66,     58,     52,     45,\n      40,     38,     37,     37,\n      40,     46,     55,     64,\n      72,     78,     85,     92,\n      98,    103,    107,    111,\n     116,    123,    131,    141,\n     152,    162,    171,    182,\n     192,    202,    207,    212,\n     214,    215,    215,    215,\n     214,    212,    210,    204,\n     199,    191,    183,    173,\n     162,    148,    135,    129,\n     125,    123,    122,    118,\n     121,    125,    129,    132,\n     131,    129,    127,    125,\n     124,    126,    130,    137,\n     146,    161,    180,    197,\n     210,    221,    231,    240,\n     246,    247,    245,    242,\n     237,    231,    225,    221,\n     217,    211,    204,    197,\n     189,    183,    173,    163,\n     151,    139,    127,    118,\n     110,    104,     99,     97,\n      98,    102,    106,    109,\n     112,    114,    116,    114,\n     109,    101,     91,     78,\n      64,     50,     36,     25,\n      13,      5,      1,      7,\n       1,      6,     20,     38,\n      59,     78,     94,    110,\n     125,    136,    143,    142,\n     134,    122,    107,     91,\n      75,     59,     46,     38,\n      34,     38,     46,     56,\n      67,     76,     84,     94,\n     106,    115,    120,    115,\n     106,     97,     91,     91,\n      98,    106,    113,    119,\n     126,    135,    149,    163,\n     177,    189,    194,    190,\n     181,    165,    146,    123,\n      99,     81,     67,     57,\n      46,     36,     24,     22,\n      34,     65,    105,    147,\n     173,    191,    197,    202,\n     210,    219,    227,    231,\n     225,    208,    186,    166,\n     158,    162,    176,    195,\n     209,    215,    215,    216,\n     219,    225,    230,    235,\n     237,    233,    222,    209,\n     197,    185,    179,    173,\n     169,    165,    159,    150,\n     139,    128,    119,    116,\n     116,    116,    114,    112,\n     114,    118,    124,    129,\n     137,    144,    152,    158,\n     160,    157,    148,    135,\n     116,     98,     79,     63,\n      49,     34,     19,      7,\n      78,     68,     70,     83,\n     101,    119,    134,    148,\n     161,    171,    178,    184,\n     184,    178,    168,    155,\n     139,    119,    100,     82,\n      73,     70,     75,     84,\n      94,    101,    106,    110,\n     118,    129,    140,    149,\n     149,    140,    124,    106,\n      93,     91,    100,    116,\n     130,    141,    147,    153,\n     161,    175,    191,    208,\n     219,    218,    200,    167,\n     123,     81,     51,     39,\n      39,     42,     37,     20,\n       2,      1,     30,     85,\n     150,    201,    228,    231,\n     220,    208,    204,    210,\n     220,    220,    199,    162,\n     117,     81,     62,     65,\n      83,    103,    116,    118,\n     117,    114,    116,    122,\n     134,    149,    159,    157,\n     146,    129,    115,    108,\n     108,    116,    125,    133,\n     136,    134,    128,    125,\n     127,    133,    138,    141,\n     141,    139,    136,    131,\n     128,    129,    134,    142,\n     149,    154,    156,    152,\n     145,    136,    127,    120,\n     113,    108,    101,     91,\n      78,    117,    113,    110,\n     107,    103,    100,     97,\n      94,     92,     89,     88,\n      87,     86,     85,     85,\n      85,     85,     86,     87,\n      88,     89,     90,     92,\n      93,     94,     95,     96,\n      95,     95,     95,     94,\n      92,     90,     87,     85,\n      81,     77,     74,     69,\n      65,     61,     56,     52,\n      49,     46,     43,     41,\n      39,     38,     39,     39,\n      42,     45,     48,     53,\n      59,     66,     74,     83,\n      92,    102,    112,    124,\n     136,    148,    159,    171,\n     182,    193,    203,    213,\n     221,    230,    237,    242,\n     247,    251,    253,    255,\n     255,    254,    253,    249,\n     245,    241,    235,    229,\n     222,    215,    207,    200,\n     192,    185,    178,    170,\n     164,    157,    152,    147,\n     143,    139,    136,    133,\n     131,    130,    129,    129,\n     129,    130,    131,    132,\n     133,    134,    136,    136,\n     137,    138,    138,    138,\n     138,    137,    135,    134,\n     132,    129,    127,    124,\n     121,    117,    124,    119,\n     113,    108,    104,     99,\n      95,     91,     88,     86,\n      84,     83,     83,     83,\n      84,     86,     88,     91,\n      94,     98,    101,    105,\n     109,    112,    115,    117,\n     119,    121,    122,    122,\n     121,    120,    117,    114,\n     110,    105,     99,     93,\n      87,     80,     72,     65,\n      58,     51,     45,     39,\n      34,     30,     26,     24,\n      23,     24,     25,     28,\n      33,     38,     45,     53,\n      63,     73,     85,     97,\n     110,    123,    137,    150,\n     164,    176,    189,    201,\n     212,    222,    231,    239,\n     245,    249,    253,    255,\n     255,    254,    252,    249,\n     244,    238,    231,    224,\n     216,    207,    197,    188,\n     179,    170,    162,    154,\n     147,    140,    134,    130,\n     126,    123,    121,    119,\n     119,    120,    121,    123,\n     125,    128,    131,    135,\n     138,    142,    145,    148,\n     151,    153,    155,    156,\n     156,    155,    154,    152,\n     149,    147,    143,    139,\n     134,    129,    124,    129,\n     129,    129,    128,    128,\n     127,    126,    124,    121,\n     119,    115,    112,    109,\n     105,    102,     99,     96,\n      94,     93,     92,     92,\n      92,     93,     95,     98,\n     101,    104,    108,    112,\n     116,    119,    122,    125,\n     125,    126,    125,    123,\n     120,    115,    109,    101,\n      94,     85,     76,     66,\n      56,     46,     37,     29,\n      22,     16,     13,     10,\n      10,     12,     16,     23,\n      32,     42,     54,     69,\n      85,    101,    118,    136,\n     153,    169,    185,    201,\n     215,    226,    236,    244,\n     250,    254,    255,    255,\n     252,    248,    242,    235,\n     227,    218,    208,    198,\n     188,    179,    170,    162,\n     155,    149,    143,    140,\n     137,    135,    134,    134,\n     135,    136,    138,    140,\n     142,    144,    145,    147,\n     147,    148,    148,    147,\n     147,    145,    144,    142,\n     140,    137,    135,    133,\n     131,    129,    128,    127,\n     126,    126,    126,    126,\n     127,    127,    128,    129,\n     155,    151,    139,    122,\n     110,    106,    110,    120,\n     129,    135,    133,    126,\n     117,    110,    105,    103,\n     101,     99,     97,     95,\n      97,    100,    105,    109,\n     109,    107,    103,    102,\n     107,    117,    128,    138,\n     141,    135,    124,    111,\n     103,    103,    109,    118,\n     122,    119,    106,     87,\n      65,     48,     35,     29,\n      27,     27,     28,     28,\n      30,     32,     34,     34,\n      32,     29,     29,     35,\n      52,     78,    109,    138,\n     160,    171,    173,    172,\n     174,    183,    199,    219,\n     238,    251,    255,    252,\n     246,    239,    233,    228,\n     222,    214,    205,    195,\n     187,    182,    177,    171,\n     162,    150,    138,    130,\n     127,    131,    139,    145,\n     146,    141,    131,    121,\n     117,    122,    135,    150,\n     164,    168,    165,    154,\n     142,    132,    128,    129,\n     133,    137,    141,    143,\n     145,    145,    143,    138,\n     129,    117,    107,    102,\n     106,    118,    134,    149,\n     155,    146,    163,    167,\n     157,    139,    123,    115,\n     118,    128,    139,    146,\n     146,    141,    133,    127,\n     122,    118,    113,    105,\n      96,     89,     88,     93,\n     103,    111,    114,    108,\n      98,     88,     86,     93,\n     108,    123,    131,    129,\n     116,     99,     86,     80,\n      85,     95,    102,    102,\n      92,     74,     55,     38,\n      27,     21,     19,     16,\n      15,     16,     21,     30,\n      41,     50,     52,     49,\n      42,     42,     53,     78,\n     114,    151,    180,    196,\n     198,    193,    188,    190,\n     201,    219,    238,    251,\n     255,    252,    246,    240,\n     234,    229,    220,    208,\n     194,    182,    176,    175,\n     178,    180,    176,    165,\n     149,    135,    130,    134,\n     147,    161,    169,    168,\n     156,    142,    132,    132,\n     141,    156,    169,    175,\n     170,    158,    143,    132,\n     124,    122,    121,    119,\n     117,    117,    120,    125,\n     131,    132,    126,    114,\n      98,     87,     87,     99,\n     122,    146,    143,    185,\n     207,    203,    181,    153,\n     134,    131,    144,    164,\n     181,    189,    187,    178,\n     167,    158,    148,    136,\n     118,     97,     79,     70,\n      75,     89,    104,    109,\n      99,     75,     50,     34,\n      35,     54,     82,    105,\n     112,     98,     74,     48,\n      35,     41,     58,     80,\n      93,     93,     78,     57,\n      37,     23,     16,     14,\n      11,      9,     11,     20,\n      37,     58,     76,     81,\n      70,     49,     31,     29,\n      50,     94,    149,    196,\n     223,    225,    208,    186,\n     171,    174,    192,    218,\n     240,    253,    255,    250,\n     244,    239,    234,    225,\n     210,    192,    177,    172,\n     179,    195,    212,    219,\n     210,    189,    163,    148,\n     150,    170,    197,    220,\n     225,    211,    185,    159,\n     145,    147,    163,    182,\n     192,    189,    171,    146,\n     123,    105,     95,     88,\n      81,     74,     71,     75,\n      87,    103,    115,    115,\n      99,     73,     49,     41,\n      57,     94,    143,    132,\n     163,    178,    172,    152,\n     135,    133,    149,    177,\n     200,    205,    189,    160,\n     132,    119,    126,    144,\n     159,    158,    137,    104,\n      74,     61,     69,     90,\n     109,    113,     98,     72,\n      49,     42,     56,     83,\n     108,    116,    103,     78,\n      55,     48,     60,     83,\n     104,    107,     90,     60,\n      32,     20,     29,     50,\n      70,     73,     58,     31,\n       9,      4,     21,     51,\n      81,     96,     91,     76,\n      65,     70,     96,    136,\n     171,    190,    189,    175,\n     162,    164,    185,    217,\n     245,    255,    243,    217,\n     193,    184,    194,    216,\n     235,    237,    218,    187,\n     160,    149,    159,    183,\n     203,    209,    195,    169,\n     147,    141,    156,    183,\n     207,    214,    201,    174,\n     150,    142,    152,    174,\n     192,    193,    173,    140,\n     110,     95,    100,    118,\n     134,    134,    114,     84,\n      57,     48,     60,     87,\n     112,    121,    113,     93,\n      76,     77,     98,    132,\n     128,    146,    162,    178,\n     193,    205,    216,    224,\n     230,    234,    234,    232,\n     229,    223,    215,    205,\n     195,    184,    172,    160,\n     149,    139,    130,    122,\n     115,    110,    106,    103,\n     102,    103,    104,    105,\n     107,    109,    111,    112,\n     113,    112,    110,    107,\n     102,     96,     89,     80,\n      71,     60,     50,     40,\n      30,     21,     13,      7,\n       3,      2,      2,      5,\n      10,     18,     29,     42,\n      57,     74,     91,    110,\n     130,    149,    167,    185,\n     202,    217,    229,    239,\n     247,    252,    255,    255,\n     253,    248,    242,    234,\n     225,    216,    205,    195,\n     185,    175,    167,    160,\n     154,    149,    147,    145,\n     144,    144,    145,    147,\n     149,    151,    153,    154,\n     154,    152,    150,    146,\n     140,    133,    125,    116,\n     105,     94,     82,     70,\n      59,     49,     40,     32,\n      26,     22,     21,     22,\n      26,     32,     41,     51,\n      64,     79,     95,    111,\n     128,    129,    150,    170,\n     190,    208,    223,    235,\n     245,    252,    255,    255,\n     252,    246,    237,    226,\n     213,    200,    185,    171,\n     156,    143,    131,    121,\n     113,    107,    103,    102,\n     102,    105,    109,    115,\n     121,    128,    136,    142,\n     148,    152,    154,    154,\n     153,    149,    143,    134,\n     124,    112,     99,     84,\n      69,     55,     41,     29,\n      18,     10,      4,      1,\n       1,      5,     12,     22,\n      34,     50,     68,     87,\n     108,    129,    150,    170,\n     190,    208,    223,    235,\n     245,    252,    255,    255,\n     252,    246,    237,    226,\n     213,    200,    185,    171,\n     156,    143,    131,    121,\n     113,    107,    103,    102,\n     102,    105,    109,    115,\n     121,    128,    136,    142,\n     148,    152,    154,    155,\n     153,    149,    143,    134,\n     124,    112,     99,     84,\n      70,     55,     41,     29,\n      18,     10,      4,      1,\n       1,      5,     12,     22,\n      34,     50,     68,     87,\n     108,    129,    123,    149,\n     167,    173,    171,    169,\n     173,    188,    209,    228,\n     236,    230,    213,    193,\n     180,    177,    180,    184,\n     179,    164,    141,    120,\n     109,    110,    121,    133,\n     138,    130,    116,    101,\n      95,    100,    114,    127,\n     133,    128,    114,    101,\n      95,    101,    114,    124,\n     126,    114,     92,     69,\n      54,     49,     54,     59,\n      57,     46,     28,     14,\n      10,     20,     40,     62,\n      78,     82,     80,     78,\n      85,    104,    131,    158,\n     177,    185,    184,    182,\n     188,    204,    226,    246,\n     255,    250,    233,    215,\n     202,    200,    204,    208,\n     205,    189,    167,    146,\n     136,    137,    148,    160,\n     165,    158,    143,    128,\n     122,    127,    140,    153,\n     159,    153,    139,    125,\n     118,    123,    135,    145,\n     145,    133,    110,     86,\n      69,     64,     67,     71,\n      68,     55,     37,     21,\n      15,     24,     43,     64,\n      78,     82,     78,     75,\n      80,     97,    123,    116,\n     146,    168,    179,    179,\n     168,    152,    136,    124,\n     119,    124,    136,    152,\n     167,    177,    179,    172,\n     158,    138,    117,     99,\n      85,     79,     79,     84,\n      94,    105,    114,    120,\n     121,    118,    109,     99,\n      86,     76,     69,     67,\n      71,     80,     92,    103,\n     111,    111,    103,     88,\n      65,     41,     19,      5,\n       1,      8,     24,     45,\n      65,     80,     86,     82,\n      72,     59,     48,     46,\n      56,     78,    110,    147,\n     181,    210,    227,    232,\n     226,    213,    201,    192,\n     190,    197,    210,    227,\n     242,    252,    253,    246,\n     230,    209,    187,    166,\n     151,    143,    142,    147,\n     155,    166,    175,    181,\n     182,    179,    172,    162,\n     152,    142,    137,    137,\n     143,    153,    166,    179,\n     187,    189,    181,    165,\n     142,    116,     93,     76,\n      70,     73,     84,    100,\n     114,    123,    122,    113,\n      95,     74,     57,     47,\n      49,     63,     88,    116,\n     117,    142,    159,    163,\n     154,    135,    110,     87,\n      72,     69,     78,     98,\n     121,    143,    158,    165,\n     160,    149,    134,    121,\n     112,    109,    113,    121,\n     131,    141,    147,    149,\n     148,    143,    136,    127,\n     116,    105,     93,     82,\n      73,     67,     66,     69,\n      75,     82,     86,     84,\n      76,     60,     41,     20,\n       6,      1,      8,     26,\n      50,     78,     99,    111,\n     112,    101,     84,     67,\n      58,     61,     78,    108,\n     144,    177,    204,    218,\n     218,    206,    186,    169,\n     158,    159,    170,    189,\n     213,    234,    247,    249,\n     241,    225,    205,    185,\n     171,    163,    162,    165,\n     170,    175,    178,    178,\n     174,    167,    160,    151,\n     142,    133,    125,    118,\n     113,    112,    116,    125,\n     137,    149,    158,    161,\n     156,    145,    129,    111,\n      97,     92,     98,    113,\n     134,    156,    171,    177,\n     169,    150,    123,     97,\n      77,     69,     75,     93,\n     117,    121,    162,    185,\n     184,    161,    125,     90,\n      68,     61,     69,     85,\n     103,    119,    132,    145,\n     154,    159,    155,    141,\n     121,    100,     90,     94,\n     113,    138,    159,    169,\n     163,    146,    129,    117,\n     116,    121,    124,    118,\n     102,     79,     58,     50,\n      56,     73,     92,    102,\n      97,     79,     52,     27,\n       8,      1,      3,     10,\n      22,     37,     57,     79,\n     100,    114,    112,     96,\n      68,     43,     33,     47,\n      87,    140,    191,    227,\n     237,    224,    197,    171,\n     155,    154,    167,    186,\n     205,    222,    235,    245,\n     251,    251,    242,    222,\n     195,    168,    151,    148,\n     159,    178,    194,    198,\n     188,    168,    148,    136,\n     134,    139,    144,    142,\n     129,    111,     96,     93,\n     105,    129,    155,    172,\n     175,    162,    141,    120,\n     105,    100,    103,    111,\n     122,    134,    149,    167,\n     182,    187,    176,    150,\n     112,     75,     53,     55,\n      81,    121,    126,    177,\n     206,    202,    170,    123,\n      83,     61,     62,     79,\n     100,    119,    129,    135,\n     142,    151,    161,    162,\n     152,    132,    109,     95,\n      97,    116,    142,    160,\n     159,    139,    107,     79,\n      70,     82,    109,    134,\n     143,    128,     97,     62,\n      39,     37,     52,     74,\n      88,     84,     65,     38,\n      15,      2,      2,      9,\n      17,     24,     31,     45,\n      67,     94,    117,    123,\n     108,     76,     41,     22,\n      32,     75,    138,    198,\n     238,    245,    222,    185,\n     152,    138,    145,    167,\n     193,    213,    226,    233,\n     240,    248,    255,    254,\n     240,    216,    189,    170,\n     167,    182,    202,    216,\n     212,    188,    153,    124,\n     113,    124,    151,    177,\n     188,    176,    147,    116,\n      97,     99,    119,    145,\n     164,    166,    150,    127,\n     106,     96,     97,    105,\n     112,    118,    123,    132,\n     150,    170,    186,    185,\n     162,    120,     74,     44,\n      44,     75,    126,    134,\n     184,    215,    219,    199,\n     163,    128,    104,     96,\n      99,    106,    112,    114,\n     116,    120,    128,    136,\n     138,    129,    113,     93,\n      80,     81,     96,    118,\n     137,    144,    136,    119,\n     104,    100,    112,    133,\n     153,    161,    153,    132,\n     109,     95,     94,    106,\n     120,    126,    117,     97,\n      70,     47,     34,     32,\n      36,     42,     47,     50,\n      56,     67,     81,     92,\n      91,     77,     52,     29,\n      20,     37,     81,    141,\n     200,    241,    255,    242,\n     215,    187,    170,    166,\n     174,    184,    192,    195,\n     196,    200,    205,    209,\n     207,    194,    172,    146,\n     128,    122,    132,    148,\n     162,    164,    151,    131,\n     113,    108,    118,    139,\n     160,    171,    165,    147,\n     129,    119,    124,    141,\n     161,    173,    171,    156,\n     134,    115,    106,    107,\n     114,    122,    126,    129,\n     133,    141,    150,    156,\n     149,    127,     94,     61,\n      44,     51,     85,    134,\n      24,     25,     27,     28,\n      29,     31,     32,     33,\n      34,     36,     37,     38,\n      40,     41,     42,     44,\n      45,     47,     48,     49,\n      51,     52,     54,     55,\n      57,     58,     60,     61,\n      63,     64,     66,     67,\n      69,     70,     72,     73,\n      75,     76,     78,     80,\n      81,     83,     84,     86,\n      88,     89,     91,     93,\n      94,     96,     98,     99,\n     101,    103,    104,    106,\n     108,    110,    111,    113,\n     115,    117,    119,    120,\n     122,    124,    126,    128,\n     130,    131,    133,    135,\n     137,    139,    141,    143,\n     145,    147,    149,    151,\n     153,    154,    156,    158,\n     160,    162,    164,    167,\n     169,    171,    173,    175,\n     177,    179,    181,    183,\n     185,    187,    189,    192,\n     194,    196,    198,    200,\n     202,    205,    207,    209,\n     211,    213,    216,    218,\n     220,    222,    225,    227,\n     229,    232,    234,    236,\n     238,    241,    243,    245,\n     248,    250,    253,    255,\n      24,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,    128,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,      2,      0,      6,\n      13,     19,     25,     31,\n      38,     44,     50,     55,\n      61,     67,     72,     77,\n      82,     87,     92,     96,\n     100,    104,    108,    111,\n     114,    117,    120,    122,\n     124,    126,    127,    128,\n     129,    129,    130,    129,\n     129,    128,    127,    126,\n     124,    122,    120,    117,\n     114,    111,    108,    104,\n     100,     96,     92,     87,\n      82,     77,     72,     67,\n      61,     55,     50,     44,\n      38,     31,     25,     19,\n      13,      6,      0,    253,\n     246,    240,    234,    228,\n     221,    215,    209,    204,\n     198,    192,    187,    182,\n     177,    172,    167,    163,\n     159,    155,    151,    148,\n     145,    142,    139,    137,\n     135,    133,    132,    131,\n     130,    130,    130,    130,\n     130,    131,    132,    133,\n     135,    137,    139,    142,\n     145,    148,    151,    155,\n     159,    163,    167,    172,\n     177,    182,    187,    192,\n     198,    204,    209,    215,\n     221,    228,    234,    240,\n     246,    253,      0,    128,\n     128,    128,    128,    128,\n     128,    128,    128,    176,\n     176,    176,    176,    176,\n     176,    176,    176,    218,\n     218,    218,    218,    218,\n     218,    218,    218,    245,\n     245,    245,    245,    245,\n     245,    245,    245,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    245,\n     245,    245,    245,    245,\n     245,    245,    245,    218,\n     218,    218,    218,    218,\n     218,    218,    218,    176,\n     176,    176,    176,    176,\n     176,    176,    176,    128,\n     128,    128,    128,    128,\n     128,    128,    128,     79,\n      79,     79,     79,     79,\n      79,     79,     79,     37,\n      37,     37,     37,     37,\n      37,     37,     37,     10,\n      10,     10,     10,     10,\n      10,     10,     10,      0,\n       0,      0,      0,      0,\n       0,      0,      0,     10,\n      10,     10,     10,     10,\n      10,     10,     10,     37,\n      37,     37,     37,     37,\n      37,     37,     37,     79,\n      79,     79,     79,     79,\n      79,     79,     79,    128,\n     127,    134,    140,    146,\n     152,    158,    165,    170,\n     176,    182,    188,    193,\n     198,    203,    208,    213,\n     218,    222,    226,    230,\n     234,    237,    240,    243,\n     245,    248,    250,    251,\n     253,    254,    254,    255,\n     255,    255,    254,    254,\n     253,    251,    250,    248,\n     245,    243,    240,    237,\n     234,    230,    226,    222,\n     218,    213,    208,    203,\n     198,    193,    188,    182,\n     176,    170,    165,    158,\n     152,    146,    140,    134,\n     128,    121,    115,    109,\n     103,     97,     90,     85,\n      79,     73,     67,     62,\n      57,     52,     47,     42,\n      37,     33,     29,     25,\n      21,     18,     15,     12,\n      10,      7,      5,      4,\n       2,      1,      1,      0,\n       0,      0,      1,      1,\n       2,      4,      5,      7,\n      10,     12,     15,     18,\n      21,     25,     29,     33,\n      37,     42,     47,     52,\n      57,     62,     67,     73,\n      79,     85,     90,     97,\n     103,    109,    115,    121,\n     127,    128,    128,    128,\n     128,    128,    129,    131,\n     132,    135,    137,    141,\n     145,    149,    154,    160,\n     166,    173,    179,    186,\n     194,    201,    208,    215,\n     222,    228,    234,    239,\n     244,    248,    251,    253,\n     255,    255,    255,    253,\n     251,    248,    244,    239,\n     234,    228,    222,    215,\n     208,    201,    194,    186,\n     179,    173,    166,    160,\n     154,    149,    145,    141,\n     137,    135,    132,    131,\n     129,    128,    128,    128,\n     128,    128,    127,    127,\n     127,    127,    126,    124,\n     123,    120,    118,    114,\n     110,    106,    101,     95,\n      89,     82,     76,     69,\n      61,     54,     47,     40,\n      33,     27,     21,     16,\n      11,      7,      4,      2,\n       0,      0,      0,      2,\n       4,      7,     11,     16,\n      21,     27,     33,     40,\n      47,     54,     61,     69,\n      76,     82,     89,     95,\n     101,    106,    110,    114,\n     118,    120,    123,    124,\n     126,    127,    127,    127,\n     127,    128,    128,    128,\n     128,    128,    128,    128,\n     128,    128,    129,    129,\n     130,    132,    134,    137,\n     141,    145,    150,    156,\n     163,    170,    178,    187,\n     196,    204,    213,    222,\n     230,    237,    243,    248,\n     252,    254,    255,    254,\n     252,    248,    243,    237,\n     230,    222,    213,    204,\n     196,    187,    178,    170,\n     163,    156,    150,    145,\n     141,    137,    134,    132,\n     130,    129,    129,    128,\n     128,    128,    128,    128,\n     128,    128,    128,    127,\n     127,    127,    127,    127,\n     127,    127,    126,    126,\n     125,    123,    121,    118,\n     114,    110,    105,     99,\n      92,     85,     77,     68,\n      59,     51,     42,     33,\n      25,     18,     12,      7,\n       3,      1,      0,      1,\n       3,      7,     12,     18,\n      25,     33,     42,     51,\n      59,     68,     77,     85,\n      92,     99,    105,    110,\n     114,    118,    121,    123,\n     125,    126,    126,    127,\n     127,    127,    127,    127,\n     127,    127,    128,      0,\n       4,      8,     12,     16,\n      20,     24,     28,     32,\n      36,     40,     45,     49,\n      53,     57,     61,     65,\n      69,     73,     77,     81,\n      85,     89,     93,     97,\n     101,    105,    109,    113,\n     117,    121,    125,    130,\n     134,    138,    142,    146,\n     150,    154,    158,    162,\n     166,    170,    174,    178,\n     182,    186,    190,    194,\n     198,    202,    206,    210,\n     215,    219,    223,    227,\n     231,    235,    239,    243,\n     247,    251,    255,    255,\n     251,    247,    243,    239,\n     235,    231,    227,    223,\n     219,    215,    210,    206,\n     202,    198,    194,    190,\n     186,    182,    178,    174,\n     170,    166,    162,    158,\n     154,    150,    146,    142,\n     138,    134,    130,    125,\n     121,    117,    113,    109,\n     105,    101,     97,     93,\n      89,     85,     81,     77,\n      73,     69,     65,     61,\n      57,     53,     49,     45,\n      40,     36,     32,     28,\n      24,     20,     16,     12,\n       8,      4,      0,      0,\n      24,     26,     29,     32,\n      34,     37,     40,     42,\n      45,     48,     51,     54,\n      57,     60,     63,     66,\n      69,     72,     75,     78,\n      81,     85,     88,     91,\n      95,     98,    102,    105,\n     109,    112,    116,    119,\n     123,    127,    131,    134,\n     138,    142,    146,    150,\n     154,    158,    162,    166,\n     170,    174,    178,    182,\n     187,    191,    195,    200,\n     204,    209,    213,    218,\n     222,    227,    231,    236,\n     241,    245,    250,    255,\n      24,     26,     29,     32,\n      34,     37,     40,     42,\n      45,     48,     51,     54,\n      57,     60,     63,     66,\n      69,     72,     75,     78,\n      81,     85,     88,     91,\n      95,     98,    102,    105,\n     109,    112,    116,    119,\n     123,    127,    131,    134,\n     138,    142,    146,    150,\n     154,    158,    162,    166,\n     170,    174,    178,    182,\n     187,    191,    195,    200,\n     204,    209,    213,    218,\n     222,    227,    231,    236,\n     241,    245,    250,    255,\n      24,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,    129,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      4,      4,\n       4,    129,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,    255,    255,    255,\n     255,      4,      0,     13,\n      26,     38,     50,     62,\n      73,     83,     93,    102,\n     109,    116,    122,    126,\n     129,    131,    132,    131,\n     129,    126,    122,    116,\n     109,    102,     93,     83,\n      73,     62,     50,     38,\n      26,     13,      0,    250,\n     238,    225,    213,    201,\n     190,    180,    170,    161,\n     154,    147,    142,    137,\n     134,    132,    132,    132,\n     134,    137,    142,    147,\n     154,    161,    170,    180,\n     190,    201,    213,    225,\n     238,    250,      0,     13,\n      26,     38,     50,     62,\n      73,     83,     93,    102,\n     109,    116,    122,    126,\n     129,    131,    132,    131,\n     129,    126,    122,    116,\n     109,    102,     93,     83,\n      73,     62,     50,     38,\n      26,     13,      0,    250,\n     238,    225,    213,    201,\n     190,    180,    170,    161,\n     154,    147,    142,    137,\n     134,    132,    132,    132,\n     134,    137,    142,    147,\n     154,    161,    170,    180,\n     190,    201,    213,    225,\n     238,    250,      0,    128,\n     128,    128,    128,    176,\n     176,    176,    176,    218,\n     218,    218,    218,    245,\n     245,    245,    245,    255,\n     255,    255,    255,    245,\n     245,    245,    245,    218,\n     218,    218,    218,    176,\n     176,    176,    176,    128,\n     128,    128,    128,     79,\n      79,     79,     79,     37,\n      37,     37,     37,     10,\n      10,     10,     10,      0,\n       0,      0,      0,     10,\n      10,     10,     10,     37,\n      37,     37,     37,     79,\n      79,     79,     79,    128,\n     128,    128,    128,    176,\n     176,    176,    176,    218,\n     218,    218,    218,    245,\n     245,    245,    245,    255,\n     255,    255,    255,    245,\n     245,    245,    245,    218,\n     218,    218,    218,    176,\n     176,    176,    176,    128,\n     128,    128,    128,     79,\n      79,     79,     79,     37,\n      37,     37,     37,     10,\n      10,     10,     10,      0,\n       0,      0,      0,     10,\n      10,     10,     10,     37,\n      37,     37,     37,     79,\n      79,     79,     79,    128,\n     128,    140,    152,    165,\n     176,    188,    198,    208,\n     218,    226,    234,    240,\n     245,    250,    253,    254,\n     255,    254,    253,    250,\n     245,    240,    234,    226,\n     218,    208,    198,    188,\n     176,    165,    152,    140,\n     128,    115,    103,     90,\n      79,     67,     57,     47,\n      37,     29,     21,     15,\n      10,      5,      2,      1,\n       0,      1,      2,      5,\n      10,     15,     21,     29,\n      37,     47,     57,     67,\n      79,     90,    103,    115,\n     128,    140,    152,    165,\n     176,    188,    198,    208,\n     218,    226,    234,    240,\n     245,    250,    253,    254,\n     255,    254,    253,    250,\n     245,    240,    234,    226,\n     218,    208,    198,    188,\n     176,    165,    152,    140,\n     128,    115,    103,     90,\n      79,     67,     57,     47,\n      37,     29,     21,     15,\n      10,      5,      2,      1,\n       0,      1,      2,      5,\n      10,     15,     21,     29,\n      37,     47,     57,     67,\n      79,     90,    103,    115,\n     128,    128,    128,    128,\n     131,    135,    141,    149,\n     160,    173,    186,    201,\n     215,    228,    239,    248,\n     253,    255,    253,    248,\n     239,    228,    215,    201,\n     186,    173,    160,    149,\n     141,    135,    131,    128,\n     128,    128,    127,    127,\n     124,    120,    114,    106,\n      95,     82,     69,     54,\n      40,     27,     16,      7,\n       2,      0,      2,      7,\n      16,     27,     40,     54,\n      69,     82,     95,    106,\n     114,    120,    124,    127,\n     127,    128,    128,    128,\n     131,    135,    141,    149,\n     160,    173,    186,    201,\n     215,    228,    239,    248,\n     253,    255,    253,    248,\n     239,    228,    215,    201,\n     186,    173,    160,    149,\n     141,    135,    131,    128,\n     128,    128,    127,    127,\n     124,    120,    114,    106,\n      95,     82,     69,     54,\n      40,     27,     16,      7,\n       2,      0,      2,      7,\n      16,     27,     40,     54,\n      69,     82,     95,    106,\n     114,    120,    124,    127,\n     127,    128,    128,    128,\n     128,    128,    129,    130,\n     134,    141,    150,    163,\n     178,    196,    213,    230,\n     243,    252,    255,    252,\n     243,    230,    213,    196,\n     178,    163,    150,    141,\n     134,    130,    129,    128,\n     128,    128,    128,    127,\n     127,    127,    126,    125,\n     121,    114,    105,     92,\n      77,     59,     42,     25,\n      12,      3,      0,      3,\n      12,     25,     42,     59,\n      77,     92,    105,    114,\n     121,    125,    126,    127,\n     127,    127,    128,    128,\n     128,    128,    129,    130,\n     134,    141,    150,    163,\n     178,    196,    213,    230,\n     243,    252,    255,    252,\n     243,    230,    213,    196,\n     178,    163,    150,    141,\n     134,    130,    129,    128,\n     128,    128,    128,    127,\n     127,    127,    126,    125,\n     121,    114,    105,     92,\n      77,     59,     42,     25,\n      12,      3,      0,      3,\n      12,     25,     42,     59,\n      77,     92,    105,    114,\n     121,    125,    126,    127,\n     127,    127,    128,      0,\n       8,     16,     24,     32,\n      40,     49,     57,     65,\n      73,     81,     89,     97,\n     105,    113,    121,    130,\n     138,    146,    154,    162,\n     170,    178,    186,    194,\n     202,    210,    219,    227,\n     235,    243,    251,    255,\n     247,    239,    231,    223,\n     215,    206,    198,    190,\n     182,    174,    166,    158,\n     150,    142,    134,    125,\n     117,    109,    101,     93,\n      85,     77,     69,     61,\n      53,     45,     36,     28,\n      20,     12,      4,      0,\n       8,     16,     24,     32,\n      40,     49,     57,     65,\n      73,     81,     89,     97,\n     105,    113,    121,    130,\n     138,    146,    154,    162,\n     170,    178,    186,    194,\n     202,    210,    219,    227,\n     235,    243,    251,    255,\n     247,    239,    231,    223,\n     215,    206,    198,    190,\n     182,    174,    166,    158,\n     150,    142,    134,    125,\n     117,    109,    101,     93,\n      85,     77,     69,     61,\n      53,     45,     36,     28,\n      20,     12,      4,      0,\n     122,    110,     98,     84,\n      71,     59,     49,     39,\n      28,     18,     12,     10,\n       8,      6,      2,      3,\n       7,     14,     19,     24,\n      28,     35,     42,     49,\n      56,     64,     72,     77,\n      81,     85,     88,     91,\n      93,     94,     93,     90,\n      86,     82,     77,     72,\n      67,     61,     55,     47,\n      41,     34,     28,     25,\n      21,     17,     15,     14,\n      15,     20,     24,     30,\n      37,     45,     55,     64,\n      77,     91,    105,    119,\n     135,    147,    162,    175,\n     188,    201,    211,    220,\n     229,    237,    244,    249,\n     252,    255,    255,    253,\n     249,    245,    242,    238,\n     232,    224,    214,    207,\n     201,    195,    189,    181,\n     175,    170,    166,    162,\n     160,    161,    164,    165,\n     167,    170,    174,    180,\n     188,    196,    202,    208,\n     212,    217,    225,    231,\n     234,    236,    237,    236,\n     236,    233,    230,    225,\n     219,    211,    199,    187,\n     176,    166,    153,    138,\n     122,    133,    117,    100,\n      84,     70,     55,     42,\n      30,     19,     10,      4,\n       2,      1,      3,      5,\n      10,     19,     31,     43,\n      55,     68,     83,     98,\n     112,    127,    142,    156,\n     167,    178,    188,    197,\n     202,    205,    207,    206,\n     204,    198,    191,    183,\n     174,    162,    149,    137,\n     122,    108,     93,     79,\n      66,     54,     44,     34,\n      27,     22,     20,     19,\n      21,     26,     32,     40,\n      50,     63,     78,     93,\n     109,    125,    141,    158,\n     174,    188,    203,    215,\n     227,    236,    243,    249,\n     253,    255,    253,    249,\n     244,    236,    227,    216,\n     203,    190,    175,    159,\n     144,    130,    116,    102,\n      88,     77,     67,     59,\n      52,     48,     47,     48,\n      51,     55,     63,     72,\n      83,     95,    109,    123,\n     136,    149,    163,    178,\n     191,    202,    211,    219,\n     226,    231,    234,    235,\n     233,    230,    223,    214,\n     204,    193,    180,    165,\n     150,    133,    123,    110,\n      95,     79,     66,     53,\n      42,     30,     19,     12,\n       5,      1,      1,      4,\n       5,      8,     16,     31,\n      42,     53,     63,     77,\n      92,    105,    118,    133,\n     149,    160,    170,    180,\n     190,    196,    199,    202,\n     202,    204,    199,    195,\n     189,    181,    171,    160,\n     151,    140,    126,    112,\n      98,     86,     75,     66,\n      59,     52,     46,     43,\n      42,     44,     47,     51,\n      59,     68,     80,     93,\n     107,    122,    137,    149,\n     164,    180,    193,    205,\n     215,    225,    234,    241,\n     248,    252,    255,    253,\n     248,    245,    238,    229,\n     217,    207,    196,    182,\n     167,    153,    139,    125,\n     110,     96,     85,     74,\n      64,     57,     52,     52,\n      52,     52,     54,     59,\n      67,     77,     88,     99,\n     110,    121,    131,    144,\n     159,    171,    181,    188,\n     193,    200,    206,    210,\n     210,    210,    208,    203,\n     195,    187,    178,    167,\n     152,    137,    123,     58,\n      62,     54,     37,     30,\n      29,     28,     18,     10,\n       9,      5,      1,      7,\n      23,     25,     18,     29,\n      59,     80,     83,     85,\n     104,    123,    127,    126,\n     145,    179,    190,    196,\n     204,    219,    227,    224,\n     221,    228,    242,    241,\n     241,    239,    232,    222,\n     217,    221,    216,    204,\n     186,    176,    173,    164,\n     159,    159,    157,    143,\n     135,    135,    141,    143,\n     140,    145,    150,    159,\n     165,    181,    198,    208,\n     203,    208,    226,    235,\n     238,    230,    229,    236,\n     239,    245,    251,    252,\n     239,    227,    222,    219,\n     205,    189,    181,    177,\n     168,    150,    136,    126,\n     109,     81,     65,     56,\n      47,     36,     26,     20,\n      26,     24,     13,      9,\n       8,     17,     31,     44,\n      46,     46,     48,     50,\n      63,     78,     92,     96,\n      89,     85,     88,    103,\n     105,    103,    107,    115,\n     116,    108,    106,    105,\n      99,     78,     61,     58,\n      89,    104,    103,     92,\n      95,    106,    118,    114,\n     111,    116,    116,    114,\n     117,    131,    135,    123,\n     133,    165,    186,    182,\n     167,    164,    170,    161,\n     153,    173,    219,    232,\n     230,    224,    223,    220,\n     213,    208,    216,    233,\n     229,    226,    220,    215,\n     207,    204,    203,    198,\n     185,    174,    178,    185,\n     179,    171,    167,    160,\n     145,    140,    147,    159,\n     160,    151,    144,    139,\n     139,    138,    153,    167,\n     168,    155,    155,    177,\n     192,    186,    161,    145,\n     139,    139,    151,    167,\n     175,    162,    139,    127,\n     122,    110,    100,    103,\n     114,    115,    104,     96,\n      92,     78,     54,     43,\n      39,     38,     40,     41,\n      43,     55,     47,     24,\n       8,      1,     16,     42,\n      63,     61,     53,     44,\n      34,     39,     46,     60,\n      69,     64,     59,     64,\n      79,     85,     81,     85,\n      92,     99,     94,     98,\n     111,    114,     98,     86,\n      89,     76,     76,     69,\n      64,     76,     92,    111,\n     110,    104,    103,     95,\n      92,     86,     86,     94,\n      99,    128,    163,    181,\n     169,    131,     90,     59,\n      38,     42,     82,    142,\n     174,    176,    151,    121,\n      97,     97,    105,    120,\n     138,    132,    133,    129,\n     140,    148,    144,    127,\n     106,     88,     93,    119,\n     146,    151,    133,    104,\n      77,     67,     82,    114,\n     150,    165,    156,    141,\n     123,    125,    130,    147,\n     166,    175,    182,    198,\n     231,    255,    254,    217,\n     179,    148,    143,    173,\n     210,    243,    252,    231,\n     208,    184,    165,    161,\n     170,    188,    196,    200,\n     202,    201,    186,    163,\n     143,    129,    125,    145,\n     170,    185,    190,    157,\n     103,     61,     47,     79,\n     131,    171,    172,    148,\n     104,     66,     50,     44,\n      58,     68,     66,     66,\n      67,     82,     94,     91,\n      91,     76,     66,     57,\n      58,     75,     87,     90,\n      86,     76,    124,    128,\n     127,    120,    116,    111,\n     104,     91,     75,     59,\n      48,     45,     45,     53,\n      67,     81,    104,    118,\n     120,    108,     81,     47,\n      20,      1,      1,     16,\n      37,     52,     55,     46,\n      36,     28,     34,     41,\n      46,     53,     46,     47,\n      43,     48,     45,     39,\n      23,      9,      4,     15,\n      39,     61,     76,     77,\n      71,     64,     68,     80,\n      95,    110,    112,    101,\n      90,     80,     85,     98,\n     117,    137,    156,    174,\n     195,    218,    232,    234,\n     213,    192,    166,    157,\n     167,    187,    211,    230,\n     234,    235,    229,    225,\n     227,    233,    244,    251,\n     253,    250,    244,    230,\n     217,    204,    197,    199,\n     216,    237,    251,    255,\n     240,    212,    190,    177,\n     186,    203,    214,    207,\n     189,    163,    143,    138,\n     141,    150,    157,    162,\n     167,    170,    174,    173,\n     166,    152,    130,    112,\n      95,     86,     89,     97,\n     107,    120,    124,    176,\n     193,    200,    196,    181,\n     158,    131,    101,     76,\n      57,     50,     56,     69,\n      90,    113,    133,    150,\n     158,    155,    141,    121,\n      98,     78,     60,     49,\n      43,     43,     44,     46,\n      47,     49,     56,     65,\n      75,     81,     87,     83,\n      79,     69,     57,     43,\n      28,     13,      4,      1,\n       7,     21,     36,     53,\n      68,     80,     92,    104,\n     110,    111,    106,     94,\n      82,     71,     67,     72,\n      85,    105,    127,    147,\n     167,    183,    197,    202,\n     199,    184,    167,    146,\n     133,    128,    132,    144,\n     159,    173,    187,    199,\n     207,    217,    224,    229,\n     228,    222,    209,    194,\n     175,    162,    153,    152,\n     160,    175,    193,    208,\n     221,    223,    217,    207,\n     194,    182,    172,    159,\n     145,    135,    128,    129,\n     137,    147,    160,    171,\n     178,    184,    185,    182,\n     178,    168,    155,    139,\n     122,    108,    101,    104,\n     114,    132,    154,    176,\n     205,    232,    241,    231,\n     208,    176,    142,    105,\n      72,     51,     48,     60,\n      82,    111,    141,    163,\n     179,    186,    182,    171,\n     153,    134,    120,    101,\n      82,     66,     60,     54,\n      51,     50,     50,     58,\n      67,     79,     92,    102,\n     101,     95,     79,     62,\n      41,     26,     17,     11,\n       1,      1,     16,     35,\n      54,     69,     87,    109,\n     127,    131,    132,    127,\n     112,     94,     79,     74,\n      77,     88,    107,    130,\n     151,    170,    184,    198,\n     202,    192,    172,    150,\n     124,    107,    101,    103,\n     112,    127,    140,    159,\n     177,    188,    200,    211,\n     218,    215,    203,    183,\n     162,    139,    122,    111,\n     113,    125,    144,    167,\n     186,    203,    207,    201,\n     188,    170,    154,    140,\n     124,    108,    101,    104,\n     116,    134,    151,    164,\n     179,    188,    195,    198,\n     193,    186,    173,    156,\n     137,    119,    104,     98,\n     106,    120,    145,    175,\n     205,    186,    220,    228,\n     208,    186,    165,    151,\n     133,    100,     81,     90,\n     106,    128,    162,    188,\n     194,    204,    215,    210,\n     201,    191,    179,    186,\n     170,    128,    107,    109,\n     104,     95,     86,     70,\n      58,     53,     61,     80,\n      86,     78,     79,     59,\n      35,     12,     27,     86,\n      92,     29,      1,     33,\n      75,     97,     85,     93,\n     144,    173,    162,    173,\n     185,    174,    156,    136,\n     140,    145,    140,    152,\n     168,    171,    170,    170,\n     190,    204,    183,    150,\n     123,     90,     70,     78,\n      93,    102,    107,    107,\n     117,    131,    129,    129,\n     150,    172,    166,    151,\n     139,    116,     98,     88,\n      71,     74,     84,     92,\n     117,    135,    150,    151,\n     136,    119,    103,     99,\n     120,    122,     98,     86,\n      90,    105,    140,    157,\n     153,    172,    176,    175,\n     186,    178,    166,    158,\n     140,    130,    122,    111,\n     105,    110,    123,    138,\n     155,    186,    151,    172,\n     170,    174,    166,    164,\n     178,    179,    164,    150,\n     168,    178,    186,    226,\n     242,    218,    217,    243,\n     225,    213,    233,    217,\n     230,    225,    168,    155,\n     162,    160,    145,    131,\n     108,     63,     47,     49,\n      59,     66,     52,     61,\n      54,     22,      1,     48,\n     168,    192,     86,     36,\n      79,    124,    152,    132,\n     116,    174,    208,    166,\n     170,    202,    192,    176,\n     177,    187,    181,    163,\n     168,    164,    150,    139,\n     117,    128,    144,    117,\n      91,     76,     55,     53,\n      69,     91,     96,     82,\n      73,     69,     75,     70,\n      59,     87,    111,    102,\n      91,    103,     91,     68,\n      78,     66,     56,     64,\n      64,     76,     76,    106,\n      95,     59,     83,     62,\n      57,    121,    138,    118,\n     108,    118,    123,    150,\n     175,    146,    147,    147,\n     138,    150,    143,    140,\n     142,    124,    132,    143,\n     135,    130,    129,    131,\n     129,    126,    151,    197,\n     211,    174,    218,    219,\n     189,    217,    217,    208,\n     192,    213,    210,    192,\n     226,    229,    193,    181,\n     226,    192,    153,    221,\n     179,    154,    188,    144,\n     119,    117,    123,     91,\n      80,     78,     39,     39,\n      31,     18,     36,     29,\n      24,     32,     31,     20,\n      38,     96,    109,     59,\n      60,     89,     73,    103,\n     122,     84,    116,    155,\n     114,    125,    165,    151,\n     136,    178,    180,    139,\n     168,    191,    156,    162,\n     194,    164,    159,    189,\n     172,    151,    156,    160,\n     150,    141,    158,    158,\n     131,    148,    134,    126,\n     147,    120,    128,    140,\n     130,    108,    115,    125,\n      73,     92,    110,     62,\n      58,     97,     76,     23,\n     119,     83,      1,    119,\n      67,     21,    106,     95,\n      79,     70,    111,     98,\n      72,    140,    113,     94,\n     121,    122,    121,    112,\n     126,    137,    116,    118,\n     156,    146,    132,    169,\n     167,    169,    169,    197,\n     213,    230,    195,    239,\n     245,    206,    239,    245,\n     228,    220,    239,    230,\n     213,    229,    232,    211,\n     187,    232,    205,    147,\n     228,    186,    138,    190,\n     158,    129,    120,    126,\n      98,     74,     80,     56,\n      41,     35,     19,     28,\n      24,     13,     23,     30,\n      25,     25,     48,     56,\n      30,     40,     59,     38,\n      56,     74,     45,     66,\n      92,     59,     76,    107,\n      91,     82,    132,    130,\n      89,    142,    162,    121,\n     138,    184,    156,    142,\n     186,    183,    157,    167,\n     195,    165,    149,    195,\n     172,    139,    191,    159,\n     140,    182,    147,    148,\n     162,    157,    130,    130,\n     161,    101,    100,    147,\n      95,     65,    134,    109,\n      20,    139,    106,      1,\n     136,     86,     31,    103,\n      87,     78,     57,    107,\n     100,     44,    121,    113,\n      74,    112,    116,    106,\n     108,    116,    136,    125,\n     122,    168,    156,    143,\n     189,    184,    185,    195,\n     213,    167,    178,    151,\n     205,    190,    126,    206,\n     209,    175,    183,    206,\n     168,    169,    202,    198,\n     155,    130,    197,    186,\n      86,    216,    161,    111,\n     192,    140,    153,    111,\n     113,    128,     83,     62,\n     100,     51,     37,      2,\n      60,     71,      3,     90,\n      50,     38,     93,     71,\n     133,     98,     49,    101,\n     103,     92,     95,     92,\n     108,    109,     41,    119,\n     125,     54,    101,    161,\n      95,     84,    175,    121,\n     113,    139,    159,    148,\n     105,    194,    191,    108,\n     143,    217,    108,    110,\n     209,    126,    124,    192,\n     130,    104,    201,    155,\n     131,    198,    189,    123,\n     114,    215,    146,     90,\n     206,    150,     49,    195,\n     201,      1,    163,    193,\n       2,    177,    117,     76,\n     131,     90,    163,     70,\n      98,    162,     71,    109,\n     172,    113,     87,    114,\n     120,    106,     78,    125,\n     106,    118,    134,    107,\n     136,    147,    146,    116,\n     171,    167,    125,    125,\n     163,    156,    129,     76,\n     157,    199,    134,    150,\n     194,    125,    102,    161,\n     174,     90,     77,    144,\n     167,     35,    163,    129,\n      65,    150,    105,    177,\n      87,     93,    170,     69,\n      49,    146,     63,     66,\n       1,     96,    126,      5,\n     153,     63,     64,    149,\n      80,    186,    147,     93,\n     141,    150,    133,    139,\n     135,    153,    154,     26,\n     165,    163,     42,    142,\n     183,     80,    117,    208,\n      94,    136,    152,    115,\n     174,     75,    185,    214,\n      71,    128,    227,     71,\n      76,    204,     99,    122,\n     180,     98,     75,    199,\n     159,     98,    213,    192,\n      90,     80,    229,    172,\n      75,    220,    177,     48,\n     208,    226,     17,    131,\n     213,     54,    164,    111,\n     124,    137,     74,    199,\n      92,     87,    194,    123,\n      94,    208,    176,     60,\n     116,    153,    124,     60,\n     113,    128,    160,    108,\n      98,    160,    115,    138,\n      71,    189,    125,    115,\n     116,    114,    109,    102,\n      96,     90,     83,     74,\n      67,     62,     60,     60,\n      60,     57,     50,     43,\n      36,     30,     24,     21,\n      19,     19,     21,     22,\n      23,     21,     17,     10,\n       4,      1,      1,      2,\n       5,      9,     14,     19,\n      21,     20,     17,     15,\n      16,     20,     28,     34,\n      40,     47,     53,     56,\n      57,     58,     58,     60,\n      63,     73,     84,     94,\n     101,    106,    108,    111,\n     112,    114,    122,    131,\n     141,    151,    159,    169,\n     175,    177,    176,    177,\n     178,    183,    190,    198,\n     207,    214,    220,    224,\n     225,    224,    224,    225,\n     228,    232,    237,    243,\n     248,    250,    250,    247,\n     244,    242,    240,    239,\n     242,    247,    249,    250,\n     246,    240,    233,    227,\n     223,    220,    218,    219,\n     221,    223,    221,    214,\n     204,    194,    186,    179,\n     173,    171,    172,    172,\n     168,    162,    155,    146,\n     135,    124,    118,    115,\n     155,    157,    157,    159,\n     162,    169,    176,    183,\n     185,    186,    186,    187,\n     188,    192,    197,    199,\n     198,    194,    190,    186,\n     182,    180,    180,    181,\n     179,    173,    164,    153,\n     141,    134,    128,    125,\n     119,    110,     99,     89,\n      78,     67,     59,     53,\n      49,     47,     42,     35,\n      25,     16,     14,     16,\n      21,     24,     26,     26,\n      23,     22,     28,     38,\n      51,     66,     80,     89,\n      97,    103,    111,    126,\n     147,    167,    183,    194,\n     203,    209,    214,    218,\n     226,    234,    244,    252,\n     255,    254,    246,    238,\n     233,    233,    233,    232,\n     227,    216,    202,    187,\n     175,    165,    158,    152,\n     145,    134,    122,    106,\n      92,     82,     77,     74,\n      72,     69,     62,     54,\n      46,     41,     40,     41,\n      47,     55,     61,     64,\n      62,     59,     60,     66,\n      75,     86,     99,    107,\n     111,    112,    114,    118,\n     125,    134,    143,    151,\n     155,    134,    126,    120,\n     116,    114,    113,    112,\n     110,    104,     98,     93,\n      90,     90,     92,     92,\n      90,     87,     82,     79,\n      77,     76,     76,     78,\n      79,     78,     74,     67,\n      62,     58,     57,     56,\n      55,     53,     47,     40,\n      34,     29,     25,     23,\n      22,     20,     18,     13,\n       9,      4,      2,      2,\n       5,      9,     13,     15,\n      17,     17,     19,     26,\n      35,     47,     59,     70,\n      78,     85,     93,    103,\n     119,    136,    154,    168,\n     177,    186,    193,    200,\n     207,    218,    228,    238,\n     245,    247,    249,    248,\n     247,    249,    252,    255,\n     255,    253,    248,    241,\n     233,    229,    225,    224,\n     222,    218,    214,    208,\n     199,    191,    187,    186,\n     186,    186,    184,    179,\n     173,    169,    167,    167,\n     169,    171,    173,    174,\n     172,    168,    163,    161,\n     162,    165,    167,    167,\n     165,    158,    153,    149,\n     147,    147,    146,    145,\n     141,    134,    133,    125,\n     119,    117,    116,    115,\n     115,    117,    121,    125,\n     126,    126,    123,    118,\n     109,     96,     80,     66,\n      58,     54,     55,     58,\n      60,     61,     64,     67,\n      69,     69,     68,     69,\n      71,     73,     73,     70,\n      66,     60,     55,     49,\n      43,     37,     36,     39,\n      45,     50,     52,     52,\n      51,     50,     48,     45,\n      41,     37,     31,     26,\n      21,     14,      7,      2,\n       2,      7,     18,     36,\n      66,    106,    151,    191,\n     221,    241,    252,    255,\n     251,    241,    230,    220,\n     215,    213,    214,    214,\n     215,    217,    220,    222,\n     222,    221,    219,    218,\n     217,    216,    213,    208,\n     200,    191,    185,    181,\n     178,    175,    175,    179,\n     185,    188,    190,    191,\n     192,    193,    193,    192,\n     192,    191,    191,    191,\n     187,    178,    166,    154,\n     144,    138,    134,    131,\n     132,    135,    139,    142,\n     143,    144,    144,    143,\n     142,    140,    133,    133,\n     130,    126,    128,    133,\n     138,    137,    137,    142,\n     150,    156,    158,    159,\n     159,    153,    140,    124,\n     110,    104,    104,    108,\n     113,    115,    115,    117,\n     121,    124,    125,    127,\n     132,    138,    142,    143,\n     145,    146,    142,    132,\n     118,    105,     95,     91,\n      95,    102,    106,    105,\n     102,     96,     88,     79,\n      72,     69,     65,     56,\n      47,     41,     35,     26,\n      16,      8,      7,     11,\n      23,     51,     96,    147,\n     191,    223,    244,    255,\n     254,    243,    228,    216,\n     207,    201,    195,    189,\n     187,    187,    187,    184,\n     178,    170,    165,    161,\n     158,    158,    159,    159,\n     154,    142,    126,    111,\n     104,    102,    104,    107,\n     112,    119,    125,    129,\n     132,    135,    138,    140,\n     140,    138,    138,    141,\n     145,    145,    139,    126,\n     112,    102,     97,     98,\n     100,    105,    112,    116,\n     119,    121,    125,    129,\n     131,    132,    133,    133,\n     125,    148,    134,    127,\n     159,    184,    152,     96,\n      85,    117,    135,    127,\n     138,    180,    202,    163,\n      89,     35,     32,     74,\n     130,    159,    135,     93,\n      92,    128,    142,    104,\n      67,     78,    107,    106,\n      94,    121,    182,    213,\n     189,    143,    104,     72,\n      54,     77,    135,    176,\n     173,    149,    128,     95,\n      51,     34,     65,     96,\n      74,     30,     37,     98,\n     142,    130,     99,     81,\n      55,     12,      1,     70,\n     176,    231,    217,    196,\n     207,    210,    163,    104,\n     105,    169,    225,    219,\n     180,    167,    190,    209,\n     200,    172,    140,    107,\n      82,     86,    124,    172,\n     198,    190,    153,    101,\n      55,     49,     89,    136,\n     154,    149,    157,    179,\n     180,    151,    124,    132,\n     156,    156,    127,    105,\n     123,    175,    221,    219,\n     162,     92,     63,     79,\n     102,    115,    137,    173,\n     179,    133,     82,     86,\n     122,    127,     96,     90,\n     125,    107,    156,    149,\n     126,    148,    184,    164,\n     101,     71,     95,    119,\n     116,    125,    163,    184,\n     146,     70,     16,     15,\n      61,    119,    143,    112,\n      66,     69,    111,    121,\n      75,     38,     59,     94,\n      84,     62,     97,    175,\n     212,    174,    115,     79,\n      54,     34,     51,    113,\n     166,    167,    139,    111,\n      75,     26,      5,     40,\n      84,     64,      8,      6,\n      81,    148,    142,     95,\n      65,     50,     24,     15,\n      71,    168,    226,    218,\n     200,    213,    218,    167,\n     100,    104,    186,    255,\n     244,    192,    179,    216,\n     244,    228,    190,    154,\n     119,     89,     95,    145,\n     201,    221,    207,    178,\n     132,     74,     50,     91,\n     161,    189,    172,    167,\n     197,    212,    181,    141,\n     147,    181,    185,    148,\n     117,    135,    190,    238,\n     238,    182,    110,     76,\n      93,    119,    130,    147,\n     182,    190,    138,     75,\n      77,    126,    134,     85,\n      62,    107,    103,    148,\n     144,    119,    127,    155,\n     146,     97,     65,     77,\n      94,     94,     96,    120,\n     133,    105,     50,     10,\n      11,     43,     83,     96,\n      70,     37,     40,     71,\n      75,     39,     12,     31,\n      59,     48,     28,     55,\n     119,    148,    116,     69,\n      45,     31,     17,     27,\n      73,    118,    121,    100,\n      79,     54,     18,      1,\n      30,     68,     58,     15,\n      11,     71,    130,    132,\n      93,     68,     63,     56,\n      53,     88,    153,    197,\n     198,    188,    200,    205,\n     170,    122,    128,    194,\n     251,    243,    202,    195,\n     229,    254,    241,    210,\n     184,    159,    137,    144,\n     185,    229,    241,    229,\n     213,    184,    138,    112,\n     142,    201,    227,    208,\n     199,    224,    241,    217,\n     183,    185,    212,    216,\n     185,    159,    170,    209,\n     242,    241,    202,    150,\n     123,    132,    150,    156,\n     163,    185,    190,    149,\n      97,     97,    135,    140,\n      95,     68,    103,    110,\n     136,    132,    112,    112,\n     127,    122,     91,     68,\n      70,     78,     76,     75,\n      85,     89,     71,     38,\n      15,     15,     32,     52,\n      57,     40,     20,     21,\n      37,     38,     16,      1,\n      12,     28,     22,      8,\n      25,     63,     79,     60,\n      33,     21,     16,      9,\n      15,     42,     70,     74,\n      64,     53,     40,     21,\n      13,     33,     58,     55,\n      33,     31,     69,    109,\n     113,     92,     79,     81,\n      82,     84,    104,    142,\n     171,    175,    173,    183,\n     188,    171,    146,    152,\n     194,    231,    228,    206,\n     204,    228,    245,    239,\n     222,    208,    196,    185,\n     191,    217,    243,    250,\n     244,    237,    223,    196,\n     179,    196,    231,    247,\n     235,    228,    242,    254,\n     240,    218,    217,    232,\n     233,    214,    197,    201,\n     221,    237,    236,    214,\n     182,    163,    166,    175,\n     174,    174,    183,    184,\n     158,    125,    122,    143,\n     143,    112,     92,    110,\n     120,    125,    119,    108,\n     103,    104,     99,     87,\n      75,     72,     70,     64,\n      60,     60,     58,     49,\n      35,     26,     24,     28,\n      30,     29,     22,     14,\n      13,     16,     14,      6,\n       1,      4,      9,      6,\n       2,      7,     19,     24,\n      19,     12,     10,     10,\n      10,     13,     23,     34,\n      38,     37,     36,     34,\n      31,     32,     42,     53,\n      57,     53,     57,     73,\n      89,     95,     92,     92,\n      96,    101,    107,    117,\n     134,    148,    155,    159,\n     166,    171,    170,    166,\n     172,    189,    205,    208,\n     204,    207,    218,    228,\n     229,    226,    224,    223,\n     221,    225,    235,    245,\n     249,    248,    248,    245,\n     238,    233,    238,    249,\n     254,    250,    247,    251,\n     254,    249,    241,    239,\n     241,    239,    232,    224,\n     223,    226,    228,    226,\n     216,    204,    194,    191,\n     190,    186,    182,    180,\n     176,    164,    150,    146,\n     149,    145,    130,    118,\n     120,    120,    117,    113,\n     109,    105,    103,    100,\n      97,     93,     91,     89,\n      86,     83,     80,     79,\n      77,     74,     71,     69,\n      68,     66,     63,     61,\n      58,     56,     54,     52,\n      49,     47,     45,     43,\n      40,     37,     34,     31,\n      28,     24,     20,     16,\n      12,      8,      6,      5,\n       5,      3,      2,      2,\n       1,      2,      4,      9,\n      14,     19,     25,     31,\n      40,     49,     58,     66,\n      75,     85,     95,    106,\n     119,    132,    144,    156,\n     166,    176,    186,    194,\n     202,    211,    219,    227,\n     233,    238,    242,    246,\n     250,    253,    253,    253,\n     253,    251,    251,    251,\n     250,    249,    246,    243,\n     240,    236,    233,    230,\n     227,    223,    220,    215,\n     212,    209,    206,    203,\n     200,    198,    196,    193,\n     190,    189,    188,    188,\n     186,    183,    181,    179,\n     177,    175,    171,    167,\n     164,    160,    154,    149,\n     145,    141,    136,    130,\n     124,    120,    117,    118,\n     120,    121,    121,    120,\n     119,    117,    114,    112,\n     110,    109,    108,    107,\n     106,    105,    105,    105,\n     106,    107,    106,    105,\n     103,    100,     98,     96,\n      93,     91,     88,     85,\n      82,     79,     75,     71,\n      67,     61,     54,     46,\n      37,     30,     24,     20,\n      17,     14,     11,      9,\n       6,      3,      3,      3,\n       5,      8,     11,     16,\n      22,     28,     34,     41,\n      47,     55,     64,     76,\n      93,    114,    135,    154,\n     171,    184,    194,    202,\n     208,    215,    221,    227,\n     232,    237,    241,    245,\n     249,    253,    255,    255,\n     253,    249,    244,    240,\n     237,    233,    229,    224,\n     217,    210,    202,    196,\n     192,    190,    188,    186,\n     182,    178,    173,    168,\n     164,    160,    157,    154,\n     150,    147,    145,    145,\n     146,    148,    151,    153,\n     154,    155,    155,    154,\n     152,    149,    146,    141,\n     136,    131,    127,    122,\n     119,    117,    117,    117,\n     128,    137,    142,    143,\n     142,    138,    133,    128,\n     125,    125,    129,    133,\n     138,    142,    145,    147,\n     151,    154,    158,    159,\n     158,    154,    149,    143,\n     138,    135,    131,    127,\n     124,    121,    121,    120,\n     118,    112,    102,     89,\n      75,     62,     51,     42,\n      35,     30,     25,     19,\n      14,      9,      7,      5,\n       5,      6,      9,     13,\n      19,     27,     35,     40,\n      41,     38,     34,     32,\n      39,     61,     97,    139,\n     176,    203,    217,    219,\n     217,    213,    213,    216,\n     222,    228,    232,    235,\n     239,    245,    251,    255,\n     255,    252,    246,    238,\n     229,    221,    216,    211,\n     204,    193,    179,    164,\n     152,    144,    142,    143,\n     145,    144,    140,    134,\n     126,    120,    116,    112,\n     109,    103,     98,     95,\n      96,     98,    102,    108,\n     113,    119,    124,    129,\n     132,    133,    132,    130,\n     126,    120,    115,    110,\n     107,    105,    108,    117,\n     115,    130,    142,    146,\n     144,    141,    138,    135,\n     133,    134,    137,    142,\n     145,    147,    151,    154,\n     158,    162,    166,    170,\n     172,    168,    162,    153,\n     145,    140,    137,    136,\n     135,    136,    137,    136,\n     134,    128,    118,    105,\n      91,     79,     70,     65,\n      62,     59,     54,     46,\n      37,     29,     25,     22,\n      21,     20,     19,     17,\n      15,     17,     25,     34,\n      40,     39,     29,     14,\n       1,      3,     29,     78,\n     140,    197,    236,    254,\n     251,    237,    223,    215,\n     215,    222,    229,    232,\n     231,    230,    231,    234,\n     237,    237,    235,    229,\n     219,    208,    199,    195,\n     194,    192,    187,    178,\n     166,    152,    140,    132,\n     129,    128,    127,    126,\n     123,    119,    114,    110,\n     106,    100,     93,     86,\n      83,     83,     87,     92,\n      99,    106,    111,    115,\n     118,    121,    124,    128,\n     129,    128,    123,    115,\n     107,    101,     98,    103,\n     115,    116,    131,    142,\n     143,    137,    132,    131,\n     133,    137,    143,    148,\n     149,    144,    140,    139,\n     139,    142,    146,    150,\n     154,    154,    150,    143,\n     137,    132,    129,    129,\n     132,    137,    142,    143,\n     140,    132,    120,    107,\n      95,     87,     85,     86,\n      89,     93,     98,    100,\n      96,     89,     84,     82,\n      82,     80,     75,     69,\n      62,     53,     47,     49,\n      56,     60,     55,     40,\n      20,      3,      1,     23,\n      74,    138,    199,    239,\n     255,    250,    233,    214,\n     199,    195,    200,    205,\n     205,    198,    189,    182,\n     178,    176,    175,    175,\n     172,    166,    158,    154,\n     157,    163,    169,    172,\n     173,    172,    165,    153,\n     140,    129,    122,    118,\n     117,    119,    122,    123,\n     120,    117,    113,    108,\n     102,     98,     98,    102,\n     109,    116,    122,    123,\n     122,    117,    115,    116,\n     122,    129,    132,    130,\n     123,    115,    107,    102,\n     104,    116,    109,    131,\n     148,    151,    153,    163,\n     175,    177,    172,    169,\n     163,    148,    130,    122,\n     127,    129,    122,    116,\n     121,    127,    126,    123,\n     130,    146,    159,    164,\n     167,    171,    172,    167,\n     158,    150,    141,    127,\n     109,     94,     86,     82,\n      78,     72,     74,     88,\n     104,    111,    112,    120,\n     138,    153,    148,    127,\n     108,     96,     83,     67,\n      61,     65,     66,     52,\n      32,     20,     10,      1,\n      10,     61,    142,    213,\n     242,    242,    238,    236,\n     225,    204,    190,    193,\n     200,    195,    177,    159,\n     142,    122,    106,    104,\n     121,    139,    143,    139,\n     144,    163,    180,    182,\n     172,    170,    175,    171,\n     154,    134,    122,    114,\n     101,     87,     84,     89,\n      92,     89,     91,    105,\n     122,    128,    123,    119,\n     124,    132,    138,    139,\n     140,    138,    129,    113,\n      99,     94,     93,     88,\n      83,     88,    102,    111,\n     107,    100,    109,    109,\n     131,    148,    154,    163,\n     182,    197,    196,    187,\n     180,    171,    149,    122,\n     113,    119,    121,    111,\n     104,    110,    115,    112,\n     110,    126,    153,    172,\n     178,    182,    190,    191,\n     180,    164,    155,    145,\n     129,    107,     91,     84,\n      79,     71,     62,     64,\n      83,    107,    119,    121,\n     132,    161,    186,    183,\n     153,    124,    110,     96,\n      76,     64,     67,     66,\n      47,     24,     16,     15,\n       3,      1,     49,    144,\n     226,    252,    240,    233,\n     240,    234,    210,    190,\n     192,    196,    186,    165,\n     147,    126,     97,     71,\n      71,     98,    126,    134,\n     132,    142,    169,    190,\n     191,    178,    173,    176,\n     174,    154,    131,    117,\n     109,     94,     74,     65,\n      71,     78,     77,     79,\n      99,    127,    142,    138,\n     131,    135,    145,    148,\n     146,    146,    146,    135,\n     112,     90,     80,     76,\n      67,     60,     69,     94,\n     111,    109,    101,    109,\n      82,     80,     81,     82,\n      86,     89,     93,     95,\n      97,     99,    100,    101,\n     101,    100,     99,     96,\n      94,     94,     95,     98,\n     104,    113,    120,    125,\n     126,    124,    120,    117,\n     117,    117,    116,    119,\n     123,    128,    133,    139,\n     143,    146,    146,    143,\n     137,    128,    117,    105,\n      93,     83,     77,     70,\n      66,     60,     55,     50,\n      46,     41,     37,     33,\n      29,     26,     26,     31,\n      41,     56,     79,    111,\n     146,    178,    206,    227,\n     239,    247,    250,    250,\n     247,    242,    235,    227,\n     220,    212,    206,    196,\n     186,    172,    159,    143,\n     125,    107,     90,     77,\n      67,     61,     57,     58,\n      59,     62,     67,     76,\n      85,     99,    112,    126,\n     140,    154,    168,    181,\n     196,    213,    229,    243,\n     251,    255,    253,    246,\n     235,    224,    211,    197,\n     182,    169,    154,    142,\n     131,    122,    114,    107,\n     102,     96,     91,     86,\n      82,     76,     82,     91,\n      94,     93,     89,     82,\n      75,     75,     78,     83,\n      89,     95,     97,    102,\n     108,    115,    131,    143,\n     152,    159,    162,    162,\n     159,    154,    146,    140,\n     131,    122,    113,    100,\n      91,     90,     90,     89,\n      89,     84,     81,     78,\n      77,     81,     88,     95,\n     100,    102,    101,    100,\n      99,     99,     98,     95,\n      86,     79,     70,     62,\n      58,     59,     61,     67,\n      73,     75,     79,     90,\n     105,    133,    157,    176,\n     192,    199,    199,    201,\n     203,    206,    208,    208,\n     200,    191,    177,    166,\n     159,    156,    153,    157,\n     155,    147,    139,    131,\n     123,    119,    117,    110,\n     104,     90,     72,     63,\n      60,     62,     79,     95,\n     109,    125,    138,    149,\n     165,    185,    206,    229,\n     245,    252,    255,    252,\n     246,    243,    242,    238,\n     228,    212,    190,    167,\n     147,    128,    118,    106,\n      96,     91,     82,     74,\n      74,     76,     91,     93,\n     102,    101,     89,     76,\n      58,     39,     36,     36,\n      37,     46,     48,     45,\n      48,     55,     67,    100,\n     128,    151,    176,    189,\n     195,    203,    207,    209,\n     217,    211,    200,    189,\n     168,    148,    143,    137,\n     133,    132,    119,    105,\n      95,     85,     84,     95,\n     103,    110,    113,    104,\n      92,     83,     77,     77,\n      80,     70,     60,     48,\n      31,     25,     32,     40,\n      57,     76,     82,     91,\n     105,    120,    150,    181,\n     204,    222,    228,    218,\n     213,    210,    207,    212,\n     216,    206,    194,    177,\n     154,    144,    143,    140,\n     149,    155,    146,    138,\n     129,    116,    114,    113,\n     104,     97,     81,     53,\n      34,     23,     15,     29,\n      44,     52,     64,     75,\n      79,    100,    130,    158,\n     198,    227,    240,    248,\n     249,    245,    249,    255,\n     253,    250,    238,    212,\n     189,    169,    150,    147,\n     140,    128,    124,    109,\n      92,     90,     91,    120,\n     116,    123,    120,    104,\n      91,     69,     45,     39,\n      35,     29,     32,     27,\n      16,     14,     17,     26,\n      58,     89,    115,    146,\n     164,    175,    191,    204,\n     214,    230,    234,    230,\n     228,    213,    197,    197,\n     192,    189,    189,    176,\n     160,    147,    133,    125,\n     131,    134,    134,    131,\n     116,     96,     82,     69,\n      65,     66,     55,     44,\n      30,      9,      1,      7,\n      16,     35,     59,     72,\n      87,    106,    122,    153,\n     185,    208,    229,    237,\n     227,    220,    218,    213,\n     217,    224,    217,    207,\n     192,    167,    155,    152,\n     144,    149,    154,    141,\n     131,    120,    104,    100,\n     101,     93,     89,     79,\n      52,     33,     21,      8,\n      13,     24,     26,     34,\n      40,     41,     61,     89,\n     117,    157,    187,    200,\n     211,    214,    209,    216,\n     226,    228,    231,    227,\n     208,    194,    181,    169,\n     171,    169,    161,    159,\n     145,    126,    123,    120,\n     150,    143,    144,    142,\n     130,    120,    104,     87,\n      84,     85,     84,     88,\n      83,     67,     59,     57,\n      64,     93,    123,    149,\n     176,    192,    198,    207,\n     210,    209,    214,    207,\n     196,    185,    168,    151,\n     150,    149,    149,    152,\n     143,    134,    127,    118,\n     109,    112,    112,    111,\n     108,     97,     82,     72,\n      68,     72,     81,     76,\n      65,     49,     23,      6,\n       1,      1,     13,     31,\n      42,     57,     78,     98,\n     133,    171,    201,    225,\n     237,    229,    225,    226,\n     228,    237,    248,    247,\n     241,    231,    211,    200,\n     194,    183,    183,    183,\n     167,    150,    134,    115,\n     110,    112,    110,    113,\n     110,     92,     78,     64,\n      47,     43,     43,     34,\n      30,     24,     17,     28,\n      50,     75,    108,    130,\n     137,    141,    139,    133,\n     137,    145,    148,    155,\n     158,    151,    149,    151,\n     154,    171,    181,    184,\n     188,    177,    160,    156,\n     150,    166,    153,    148,\n     144,    138,    137,    134,\n     131,    139,    151,    161,\n     169,    164,    148,    135,\n     129,    134,    157,    181,\n     202,    221,    230,    231,\n     229,    222,    211,    199,\n     180,    157,    134,    110,\n      91,     87,     86,     88,\n      91,     91,     92,     95,\n      95,     88,     86,     80,\n      73,     67,     58,     49,\n      47,     55,     74,     93,\n      99,     95,     79,     54,\n      32,     17,      8,     12,\n      22,     31,     46,     67,\n      91,    127,    166,    201,\n     226,    237,    233,    230,\n     232,    237,    247,    255,\n     254,    252,    248,    237,\n     230,    224,    214,    209,\n     203,    184,    161,    139,\n     119,    111,    114,    120,\n     132,    141,    141,    136,\n     125,    110,     97,     85,\n      65,     48,     29,     13,\n      13,     27,     44,     64,\n      76,     74,     67,     62,\n      57,     58,     61,     63,\n      68,     73,     77,     86,\n     101,    121,    151,    176,\n     191,    199,    195,    185,\n     177,    166,    169,    152,\n     139,    134,    135,    141,\n     149,    160,    178,    198,\n     217,    228,    226,    214,\n     200,    192,    196,    210,\n     227,    242,    252,    255,\n     253,    244,    230,    213,\n     189,    162,    132,     99,\n      70,     49,     40,     37,\n      39,     42,     49,     60,\n      71,     79,     75,     67,\n      55,     44,     32,     25,\n      21,     26,     45,     73,\n     100,    115,    117,    105,\n      84,     61,     40,     28,\n      25,     28,     36,     50,\n      68,     94,    128,    165,\n     201,    226,    236,    235,\n     233,    235,    241,    246,\n     248,    247,    245,    243,\n     242,    240,    235,    229,\n     222,    211,    191,    163,\n     137,    118,    109,    112,\n     124,    142,    161,    174,\n     178,    172,    159,    142,\n     122,     97,     71,     45,\n      24,     16,     21,     31,\n      39,     41,     33,     21,\n      14,     11,     11,      9,\n       9,     11,     15,     23,\n      36,     58,     90,    129,\n     163,    188,    200,    200,\n     195,    184,    169,    174,\n     154,    140,    133,    133,\n     138,    146,    159,    179,\n     206,    231,    246,    246,\n     232,    215,    202,    201,\n     211,    226,    240,    249,\n     252,    249,    240,    225,\n     206,    182,    154,    125,\n      95,     71,     54,     45,\n      39,     37,     37,     43,\n      55,     69,     78,     75,\n      65,     47,     30,     14,\n       4,      1,      6,     28,\n      61,     92,    113,    120,\n     112,     91,     68,     45,\n      30,     23,     22,     27,\n      40,     61,     93,    134,\n     176,    215,    238,    247,\n     243,    241,    243,    248,\n     254,    254,    252,    249,\n     245,    244,    243,    240,\n     237,    233,    227,    210,\n     185,    159,    137,    125,\n     125,    133,    150,    169,\n     181,    184,    175,    160,\n     139,    116,     87,     60,\n      33,     13,      7,     15,\n      28,     38,     38,     30,\n      17,     10,      7,      8,\n       6,      4,      2,      1,\n       7,     19,     42,     76,\n     117,    153,    181,    198,\n     204,    201,    191,    174,\n     185,    163,    143,    133,\n     128,    131,    141,    158,\n     182,    211,    239,    255,\n     254,    237,    214,    197,\n     192,    199,    211,    224,\n     232,    233,    227,    214,\n     196,    176,    154,    134,\n     119,    109,    104,    101,\n      96,     87,     75,     66,\n      62,     67,     77,     85,\n      82,     74,     57,     40,\n      25,     14,      9,     13,\n      32,     61,     91,    115,\n     128,    126,    113,     93,\n      72,     52,     39,     30,\n      28,     38,     60,     96,\n     140,    180,    210,    222,\n     220,    210,    204,    206,\n     215,    225,    229,    227,\n     221,    212,    205,    197,\n     193,    195,    202,    210,\n     211,    200,    180,    157,\n     136,    125,    127,    139,\n     155,    168,    171,    162,\n     145,    122,     95,     67,\n      43,     26,     20,     27,\n      46,     63,     74,     71,\n      57,     39,     25,     22,\n      23,     26,     28,     29,\n      29,     32,     37,     50,\n      70,     98,    126,    155,\n     181,    199,    207,    201,\n     185,    197,    175,    152,\n     136,    126,    125,    133,\n     152,    180,    211,    240,\n     255,    252,    233,    207,\n     186,    176,    179,    188,\n     198,    205,    205,    198,\n     184,    164,    142,    123,\n     113,    116,    129,    147,\n     162,    164,    154,    135,\n     114,     97,     91,     90,\n      92,     90,     85,     76,\n      67,     59,     54,     49,\n      47,     55,     71,     93,\n     117,    134,    142,    137,\n     125,    108,     86,     65,\n      45,     32,     36,     58,\n      97,    143,    179,    198,\n     193,    176,    153,    141,\n     142,    153,    169,    181,\n     185,    181,    167,    151,\n     133,    125,    129,    146,\n     171,    194,    203,    195,\n     172,    142,    120,    109,\n     113,    125,    137,    141,\n     136,    121,     99,     74,\n      51,     34,     29,     39,\n      60,     90,    114,    126,\n     120,    100,     74,     54,\n      45,     46,     54,     64,\n      72,     78,     81,     81,\n      81,     81,     86,     98,\n     122,    154,    184,    205,\n     209,    197,    195,    172,\n     147,    130,    119,    114,\n     115,    130,    156,    185,\n     209,    225,    230,    220,\n     204,    195,    196,    202,\n     208,    217,    228,    229,\n     223,    211,    195,    173,\n     148,    129,    123,    125,\n     130,    136,    136,    127,\n     110,     95,     84,     79,\n      76,     79,     87,     93,\n      93,     98,    105,    107,\n     101,     95,     95,     99,\n     103,    111,    120,    120,\n     112,    101,     85,     61,\n      36,     14,      1,      4,\n      25,     68,    119,    160,\n     186,    190,    183,    167,\n     157,    159,    172,    186,\n     196,    203,    200,    181,\n     154,    129,    116,    112,\n     120,    139,    158,    166,\n     156,    140,    122,    107,\n      99,    106,    122,    140,\n     150,    155,    152,    137,\n     113,     92,     76,     67,\n      66,     77,     96,    106,\n     106,     97,     80,     53,\n      29,     22,     26,     36,\n      48,     63,     81,     93,\n      97,    102,    109,    118,\n     127,    145,    172,    195,\n     208,    207,    195,    159,\n     138,    116,    105,    100,\n      96,     92,    101,    123,\n     144,    159,    175,    191,\n     194,    194,    200,    216,\n     226,    224,    225,    231,\n     230,    219,    206,    194,\n     175,    147,    123,    110,\n     104,     97,     93,     93,\n      91,     84,     83,     88,\n      91,     91,     98,    116,\n     130,    137,    148,    162,\n     166,    154,    141,    133,\n     122,    105,     96,     94,\n      83,     69,     59,     48,\n      30,     12,      2,      1,\n       6,     23,     61,    108,\n     144,    169,    183,    191,\n     185,    181,    186,    200,\n     207,    207,    207,    202,\n     179,    146,    116,    104,\n      97,     97,    105,    121,\n     126,    121,    118,    120,\n     121,    121,    132,    152,\n     170,    181,    191,    194,\n     181,    156,    135,    122,\n     108,     93,     89,     91,\n      84,     71,     61,     52,\n      34,     16,     16,     32,\n      49,     62,     83,    107,\n     123,    126,    133,    146,\n     157,    161,    167,    179,\n     186,    182,    173,    159,\n     119,    101,     83,     79,\n      83,     83,     76,     81,\n      97,    111,    119,    134,\n     159,    175,    187,    205,\n     231,    243,    234,    224,\n     223,    217,    200,    188,\n     181,    167,    140,    113,\n      98,     87,     73,     63,\n      63,     66,     70,     82,\n     103,    117,    122,    131,\n     151,    168,    173,    184,\n     196,    197,    179,    162,\n     149,    129,    101,     82,\n      71,     54,     35,     25,\n      19,      9,      1,      4,\n      14,     23,     36,     69,\n     110,    139,    159,    178,\n     195,    198,    199,    206,\n     219,    217,    203,    196,\n     189,    167,    135,    109,\n     100,     92,     85,     87,\n      97,    100,    100,    108,\n     125,    139,    148,    165,\n     187,    202,    209,    217,\n     221,    207,    181,    161,\n     150,    133,    108,     93,\n      84,     66,     44,     34,\n      32,     25,     15,     25,\n      53,     77,     90,    109,\n     133,    150,    151,    157,\n     172,    183,    182,    177,\n     177,    168,    152,    134,\n     119,    104,    118,    119,\n     108,     93,     67,     42,\n      54,     91,    125,    153,\n     162,    157,    148,    141,\n     153,    199,    232,    234,\n     222,    198,    163,    138,\n     134,    149,    171,    167,\n     140,    113,     79,     53,\n      58,     79,    108,    133,\n     137,    130,    121,    105,\n     114,    159,    197,    214,\n     224,    204,    170,    141,\n     123,    132,    147,    132,\n     109,     84,     35,      1,\n       5,     16,     34,     51,\n      44,     30,     14,      4,\n      38,     97,    144,    180,\n     196,    187,    168,    155,\n     161,    197,    222,    222,\n     214,    185,    135,     95,\n      79,     93,    119,    133,\n     131,    122,     98,     80,\n      94,    130,    165,    191,\n     202,    194,    182,    172,\n     177,    201,    213,    201,\n     181,    149,    104,     66,\n      57,     65,     77,     78,\n      66,     50,     25,      3,\n      21,     70,    117,    149,\n     162,    158,    147,    131,\n     133,    169,    204,    214,\n     207,    181,    141,    112,\n      99,    104,    114,    162,\n     172,    154,    125,     71,\n      39,     62,    101,    148,\n     185,    171,    136,    105,\n      78,     90,    147,    188,\n     202,    192,    142,     93,\n      74,     78,    120,    174,\n     186,    170,    138,     84,\n      60,     81,    111,    160,\n     196,    176,    144,    114,\n      78,     94,    154,    196,\n     224,    227,    176,    125,\n      99,     88,    124,    173,\n     170,    151,    115,     45,\n      13,     31,     55,    102,\n     133,    109,     75,     32,\n       1,     35,     91,    140,\n     188,    188,    153,    125,\n     102,    110,    168,    210,\n     220,    217,    168,    105,\n      79,     75,    107,    163,\n     184,    171,    146,    100,\n      70,     93,    134,    177,\n     213,    202,    162,    131,\n     104,    108,    155,    188,\n     193,    184,    134,     74,\n      46,     42,     69,    115,\n     127,    111,     87,     44,\n      18,     49,    103,    157,\n     199,    195,    161,    132,\n     101,    107,    159,    200,\n     216,    211,    163,    107,\n      87,     85,    114,    130,\n     202,    213,    191,    154,\n      80,     46,     78,    114,\n     165,    209,    174,    117,\n      75,     31,     46,    113,\n     152,    174,    166,     97,\n      42,     30,     40,    102,\n     178,    196,    188,    155,\n      87,     69,    104,    135,\n     196,    236,    195,    145,\n     103,     53,     76,    146,\n     188,    223,    221,    149,\n      94,     75,     69,    126,\n     195,    199,    184,    141,\n      58,     33,     61,     93,\n     158,    192,    152,    107,\n      45,      1,     39,     88,\n     137,    191,    174,    121,\n      93,     65,     77,    154,\n     203,    219,    221,    159,\n      90,     78,     82,    124,\n     199,    218,    196,    165,\n     100,     64,     97,    133,\n     176,    216,    186,    125,\n      86,     49,     56,    122,\n     165,    179,    178,    116,\n      52,     38,     41,     80,\n     149,    164,    145,    115,\n      57,     31,     74,    126,\n     183,    232,    211,    157,\n     119,     77,     85,    148,\n     188,    208,    206,    143,\n      84,     77,     83,    130,\n      90,     82,     58,     65,\n      78,     72,     93,    140,\n     157,    158,    177,    178,\n     153,    154,    175,    174,\n     164,    170,    161,    128,\n     119,    139,    148,    151,\n     170,    167,    134,    116,\n     114,    101,    106,    133,\n     135,    120,    120,     99,\n      56,     56,     85,     91,\n     112,    169,    183,    147,\n     143,    159,    131,    123,\n     185,    211,    168,    160,\n     155,     68,      7,     42,\n      47,     22,     73,    105,\n      42,     13,     41,     28,\n      37,    123,    176,    188,\n     230,    236,    183,    174,\n     188,    162,    167,    210,\n     192,    140,    124,     89,\n      25,     20,     59,     70,\n      87,    130,    137,    113,\n     116,    128,    130,    166,\n     221,    242,    251,    255,\n     220,    173,    157,    140,\n     118,    127,    129,     93,\n      66,     54,     22,      6,\n      37,     67,     83,    120,\n     156,    158,    159,    178,\n     189,    196,    212,    217,\n     201,    185,    160,    120,\n      98,     93,     80,     76,\n      90,    108,     89,     71,\n      90,     90,     70,     87,\n     111,    106,    120,    150,\n     148,    142,    165,    173,\n     164,    173,    178,    158,\n     150,    163,    166,    168,\n     179,    169,    138,    114,\n      97,     78,     79,     97,\n     102,     95,     91,     76,\n      52,     45,     60,     83,\n     112,    149,    174,    179,\n     167,    151,    146,    151,\n     158,    177,    193,    171,\n     128,     91,     43,      1,\n       9,     35,     44,     63,\n      78,     49,     19,     33,\n      56,     86,    147,    200,\n     214,    221,    214,    181,\n     159,    167,    169,    170,\n     183,    173,    130,     92,\n      65,     39,     36,     73,\n     109,    126,    145,    155,\n     142,    131,    143,    163,\n     189,    224,    247,    247,\n     232,    200,    162,    142,\n     132,    125,    131,    126,\n     103,     90,     83,     58,\n      51,     67,     63,     59,\n      93,    121,    126,    152,\n     177,    170,    176,    197,\n     190,    182,    202,    194,\n     161,    156,    148,    110,\n      97,    108,    140,    128,\n     105,     96,     82,     53,\n      34,     41,     62,     88,\n     109,    124,    131,    128,\n     127,    141,    159,    169,\n     184,    199,    203,    201,\n     198,    186,    163,    138,\n     113,     95,     80,     65,\n      58,     49,     27,     15,\n      15,     11,     21,     56,\n      88,    112,    146,    173,\n     180,    175,    158,    143,\n     147,    156,    170,    203,\n     210,    163,    115,     80,\n      37,     21,     49,     78,\n      95,    108,     80,     20,\n       1,     23,     47,     90,\n     152,    194,    213,    217,\n     188,    152,    151,    168,\n     182,    209,    223,    182,\n     118,     80,     53,     36,\n      57,     98,    124,    145,\n     154,    130,     98,     99,\n     118,    143,    183,    224,\n     248,    251,    221,    176,\n     155,    158,    156,    163,\n     183,    180,    147,    116,\n      93,     69,     51,     43,\n      47,     75,    114,    132,\n     131,    132,    142,    157,\n     173,    190,    213,    238,\n     237,    210,    187,    165,\n     142,    135,    140,    176,\n     161,    143,    131,    112,\n      98,    101,    110,    113,\n     111,    105,     92,     80,\n      77,     88,    106,    124,\n     138,    147,    148,    147,\n     151,    163,    172,    175,\n     171,    159,    135,    109,\n      93,     79,     64,     57,\n      57,     45,     28,     23,\n      24,     28,     47,     85,\n     120,    140,    149,    149,\n     138,    131,    142,    170,\n     197,    211,    205,    176,\n     129,     82,     57,     56,\n      67,     79,     86,     75,\n      41,     13,     11,     23,\n      52,    106,    162,    192,\n     200,    198,    182,    167,\n     172,    193,    213,    225,\n     217,    184,    136,     92,\n      61,     53,     68,     94,\n     115,    126,    122,    104,\n      91,     97,    120,    158,\n     208,    245,    255,    248,\n     229,    199,    175,    174,\n     180,    179,    175,    164,\n     135,    103,     88,     88,\n      95,    107,    121,    127,\n     122,    115,    115,    121,\n     133,    144,    153,    163,\n     163,    151,    146,    154,\n     156,    157,    170,    176,\n     172,    147,    130,    115,\n      90,     82,     87,     87,\n      94,    109,    106,     97,\n     105,    110,    103,    109,\n     120,    109,     92,     94,\n     101,    105,    124,    147,\n     150,    144,    142,    138,\n     135,    143,    150,    147,\n     139,    122,     84,     51,\n      36,     25,     21,     42,\n      68,     71,     68,     74,\n      65,     56,     82,    122,\n     150,    183,    214,    204,\n     170,    147,    127,    110,\n     115,    128,    124,    107,\n      79,     35,      1,      1,\n      13,     36,     87,    131,\n     144,    151,    162,    152,\n     152,    189,    222,    231,\n     246,    247,    200,    152,\n     134,    110,     89,    104,\n     122,    113,    105,    101,\n      83,     75,     98,    130,\n     162,    202,    230,    235,\n     235,    231,    215,    205,\n     209,    208,    195,    184,\n     167,    131,    103,     96,\n      90,     90,    111,    120,\n     106,    107,    115,    105,\n     112,    150,    164,    161,\n     183,    193,    166,    156,\n     171,    164,    157,    172,\n     172,    155,    149,    143,\n     145,    139,    126,    123,\n     128,    132,    131,    130,\n     127,    111,     96,     98,\n      97,     88,     92,     95,\n      79,     79,    100,    106,\n     115,    145,    156,    153,\n     175,    187,    167,    163,\n     171,    152,    135,    127,\n     101,     74,     76,     65,\n      36,     39,     59,     52,\n      51,     76,     92,     98,\n     128,    162,    170,    186,\n     207,    195,    182,    192,\n     179,    147,    145,    136,\n     100,     88,     74,     37,\n      45,     66,     35,     35,\n      88,     83,     60,    117,\n     155,    139,    178,    224,\n     202,    210,    255,    229,\n     184,    191,    173,    125,\n     118,    110,     68,     63,\n      83,     58,     35,     72,\n     108,    105,    124,    163,\n     175,    187,    219,    213,\n     190,    212,    227,    191,\n     178,    192,    158,    120,\n     125,    115,     88,    106,\n     128,    117,    116,    125,\n     112,    114,    134,    128,\n     118,    139,    147,    125,\n     118,    127,    121,    118,\n     139,    155,    129,    127,\n     122,    126,    124,    109,\n      99,    100,     92,     84,\n      87,     83,     68,     68,\n      74,     66,     70,     91,\n      93,     85,    100,    108,\n      94,    102,    119,    101,\n      87,    108,    104,     68,\n      58,     55,     29,     25,\n      37,     16,      1,     25,\n      34,     26,     42,     52,\n      41,     63,     98,     90,\n      84,    113,    123,    110,\n     119,    126,    115,    122,\n     128,     99,     82,     93,\n      81,     62,     75,     80,\n      69,     89,    110,     96,\n     102,    135,    135,    133,\n     168,    182,    172,    194,\n     207,    179,    182,    211,\n     192,    165,    177,    171,\n     143,    146,    149,    126,\n     134,    163,    153,    142,\n     175,    198,    191,    199,\n     218,    220,    231,    248,\n     235,    219,    226,    215,\n     186,    186,    193,    174,\n     169,    180,    167,    153,\n     170,    177,    170,    184,\n     195,    186,    189,    200,\n     184,    164,    169,    171,\n     154,    142,    141,    135,\n     126,    124,    129,    150,\n     169,    148,    129,    127,\n     116,    104,    101,     91,\n      89,     94,     85,     83,\n     107,    112,     89,     97,\n     109,     76,     54,     70,\n      63,     35,     42,     55,\n      34,     20,     30,     26,\n      12,     13,     18,      9,\n       3,      2,      2,      6,\n      14,     19,     30,     44,\n      34,     20,     31,     40,\n      23,     28,     58,     58,\n      45,     70,     87,     73,\n      85,    108,     93,     84,\n     106,    103,     87,    101,\n     112,    106,    120,    136,\n     132,    140,    144,    126,\n     127,    149,    144,    141,\n     174,    188,    173,    188,\n     211,    196,    184,    202,\n     209,    203,    213,    224,\n     217,    204,    204,    202,\n     192,    196,    214,    224,\n     216,    214,    223,    227,\n     223,    226,    240,    244,\n     234,    230,    239,    240,\n     232,    241,    255,    251,\n     247,    255,    251,    229,\n     213,    210,    197,    175,\n     165,    161,    139,    112,\n     103,     97,     74,     71,\n     103,    120,    123,    150,\n     131,    115,    109,    122,\n     114,    100,    108,    114,\n     105,    106,     99,     71,\n      56,     60,     48,     40,\n      63,     74,     55,     60,\n      75,     60,     56,     89,\n     102,     97,    115,    127,\n     102,     85,     79,     59,\n      40,     41,     38,     25,\n      22,     20,      8,      4,\n      11,     19,     33,     58,\n      78,     87,     99,    109,\n     109,    113,    131,    138,\n     137,    146,    142,    112,\n      95,     90,     68,     57,\n      74,     78,     73,     92,\n     102,     93,    104,    124,\n     131,    150,    185,    199,\n     200,    212,    212,    193,\n     190,    199,    189,    176,\n     179,    167,    137,    130,\n     135,    122,    123,    152,\n     163,    160,    184,    205,\n     200,    207,    229,    235,\n     238,    254,    255,    240,\n     227,    211,    189,    179,\n     178,    169,    170,    177,\n     167,    156,    166,    170,\n     163,    177,    202,    199,\n     192,    206,    201,    173,\n     177,    186,    160,    143,\n     158,    144,    113,    118,\n     131,    142,    142,    135,\n     122,    110,     97,     88,\n      85,     84,     81,     73,\n      63,     53,     47,     44,\n      42,     40,     34,     21,\n      11,      5,      2,      7,\n      19,     28,     33,     34,\n      30,     24,     22,     21,\n      23,     29,     31,     28,\n      22,     15,      5,      1,\n       2,      7,     15,     22,\n      28,     32,     34,     36,\n      43,     55,     67,     81,\n      94,    101,    103,    103,\n      99,     96,    100,    104,\n     109,    113,    113,    111,\n     108,    106,    108,    116,\n     126,    138,    152,    162,\n     167,    172,    178,    183,\n     191,    202,    212,    217,\n     216,    212,    207,    200,\n     195,    197,    200,    202,\n     205,    206,    202,    201,\n     204,    211,    220,    230,\n     242,    250,    253,    252,\n     252,    249,    246,    248,\n     253,    250,    244,    239,\n     228,    214,    206,    205,\n     203,    203,    205,    205,\n     197,    189,    185,    183,\n     184,    189,    194,    194,\n     185,    174,    163,    151,\n     143,    142,    142,    149,\n     151,    146,    136,    119,\n     103,     91,     86,     87,\n      84,     73,     64,     63,\n      59,     57,     63,     63,\n      47,     29,     17,      5,\n       1,     11,     27,     37,\n      41,     39,     34,     27,\n      21,     27,     42,     53,\n      59,     63,     58,     41,\n      30,     28,     29,     34,\n      45,     54,     55,     48,\n      41,     40,     43,     52,\n      72,     95,    107,    112,\n     115,    108,     99,    104,\n     117,    127,    138,    145,\n     143,    131,    117,    109,\n     111,    119,    132,    148,\n     158,    155,    151,    151,\n     151,    156,    176,    199,\n     212,    216,    216,    207,\n     193,    186,    190,    198,\n     203,    210,    211,    199,\n     184,    178,    178,    180,\n     192,    210,    223,    225,\n     222,    219,    214,    212,\n     219,    235,    245,    245,\n     242,    233,    212,    194,\n     193,    194,    194,    198,\n     201,    190,    171,    160,\n     154,    150,    156,    172,\n     182,    180,    173,    164,\n     150,    139,    142,    146,\n     144,    142,    141,    141,\n     138,    133,    128,    122,\n     110,     92,     76,     61,\n      53,     52,     53,     51,\n      45,     33,     21,     11,\n       4,      1,      3,      6,\n       6,      8,      9,      7,\n       7,      5,      4,     11,\n      20,     30,     43,     52,\n      52,     51,     49,     45,\n      44,     50,     54,     59,\n      60,     55,     50,     48,\n      44,     48,     60,     72,\n      83,     96,     99,     99,\n     106,    112,    118,    132,\n     147,    153,    157,    156,\n     148,    142,    140,    142,\n     149,    155,    155,    157,\n     158,    152,    149,    157,\n     168,    180,    194,    204,\n     209,    211,    208,    207,\n     209,    213,    221,    228,\n     226,    220,    213,    203,\n     195,    192,    195,    201,\n     207,    210,    211,    208,\n     203,    205,    214,    222,\n     230,    242,    245,    239,\n     232,    225,    216,    213,\n     213,    211,    205,    197,\n     185,    171,    157,    150,\n     150,    151,    153,    156,\n     157,    152,    147,    146,\n     121,    121,    118,    117,\n     121,    122,    121,    122,\n     121,    117,    109,     98,\n      89,     82,     72,     63,\n      57,     46,     36,     33,\n      31,     27,     24,     23,\n      21,     19,     20,     22,\n      21,     17,     11,      6,\n       2,      1,      6,     16,\n      26,     37,     45,     51,\n      53,     56,     60,     67,\n      75,     80,     83,     84,\n      79,     71,     69,     69,\n      67,     74,     84,     85,\n      86,     93,     96,     99,\n     110,    125,    136,    149,\n     160,    164,    166,    165,\n     164,    168,    171,    173,\n     175,    176,    169,    161,\n     158,    157,    157,    162,\n     172,    180,    183,    186,\n     193,    195,    199,    210,\n     219,    223,    227,    230,\n     227,    220,    215,    211,\n     209,    207,    205,    204,\n     199,    192,    188,    189,\n     191,    193,    203,    211,\n     213,    216,    220,    218,\n     215,    218,    219,    214,\n     210,    205,    195,    184,\n     173,    163,    154,    146,\n     140,    137,    131,    124,\n     121,    156,    155,    145,\n     135,    129,    123,    117,\n     117,    119,    114,    101,\n      87,     73,     58,     49,\n      46,     44,     40,     40,\n      39,     33,     24,     16,\n       9,      5,      8,     17,\n      24,     25,     23,     16,\n       7,      1,      1,      7,\n      15,     27,     38,     47,\n      54,     56,     52,     48,\n      48,     51,     55,     66,\n      76,     78,     76,     77,\n      73,     69,     78,     92,\n     101,    112,    128,    132,\n     128,    130,    135,    138,\n     144,    156,    164,    165,\n     164,    160,    155,    151,\n     151,    156,    165,    169,\n     167,    170,    171,    165,\n     166,    179,    186,    189,\n     200,    209,    204,    200,\n     203,    203,    200,    205,\n     211,    211,    209,    204,\n     197,    193,    190,    190,\n     197,    202,    202,    206,\n     210,    204,    200,    207,\n     211,    210,    217,    225,\n     220,    212,    211,    205,\n     193,    191,    194,    190,\n     183,    181,    176,    165,\n     156,    154,    153,    152,\n     152,    156,    163,    152,\n     138,    131,    133,    132,\n     127,    121,    113,     96,\n      76,     64,     59,     55,\n      55,     57,     51,     37,\n      26,     19,     14,     14,\n      17,     17,     14,     11,\n       8,      5,      3,      3,\n       7,      8,      4,      1,\n       4,      9,     18,     31,\n      45,     53,     48,     38,\n      35,     38,     42,     54,\n      75,     87,     85,     84,\n      85,     80,     79,     93,\n     110,    121,    130,    137,\n     131,    120,    120,    125,\n     132,    144,    156,    161,\n     157,    149,    143,    144,\n     145,    151,    167,    180,\n     180,    176,    176,    170,\n     163,    171,    189,    198,\n     202,    207,    205,    192,\n     186,    190,    194,    198,\n     207,    213,    210,    203,\n     196,    191,    190,    195,\n     205,    217,    220,    213,\n     209,    207,    199,    200,\n     213,    220,    217,    221,\n     220,    205,    194,    195,\n     195,    193,    200,    206,\n     200,    189,    181,    175,\n     170,    171,    179,    184,\n     179,    170,    163,    155,\n     155,    147,    135,    126,\n     120,    110,    102,    104,\n     103,     93,     85,     78,\n      67,     56,     52,     49,\n      45,     41,     39,     37,\n      30,     17,      8,      5,\n       1,      2,     13,     18,\n      14,     10,      8,      4,\n       2,      9,     19,     24,\n      29,     36,     43,     44,\n      46,     53,     59,     58,\n      60,     71,     79,     82,\n      88,     96,     95,     93,\n      98,    103,    104,    109,\n     119,    125,    126,    128,\n     131,    135,    135,    139,\n     148,    154,    155,    160,\n     165,    162,    158,    164,\n     169,    169,    172,    179,\n     180,    175,    174,    179,\n     180,    180,    187,    194,\n     193,    193,    195,    195,\n     192,    196,    202,    206,\n     207,    207,    208,    207,\n     199,    198,    205,    207,\n     204,    209,    212,    205,\n     200,    202,    199,    195,\n     200,    206,    205,    203,\n     201,    199,    195,    190,\n     192,    195,    192,    190,\n     191,    188,    177,    170,\n     168,    162,    156,    155,\n     170,    194,    214,    229,\n     240,    245,    243,    231,\n     213,    189,    162,    132,\n     107,     89,     79,     76,\n      77,     80,     83,     84,\n      84,     81,     73,     62,\n      53,     50,     49,     51,\n      54,     58,     63,     65,\n      65,     65,     65,     65,\n      65,     68,     72,     80,\n      87,     97,    106,    114,\n     120,    125,    132,    138,\n     142,    145,    149,    151,\n     149,    143,    133,    120,\n     105,     92,     82,     78,\n      82,     96,    119,    149,\n     180,    209,    233,    248,\n     255,    252,    243,    229,\n     213,    195,    177,    162,\n     150,    139,    128,    117,\n     108,    102,     98,     98,\n     100,    104,    110,    115,\n     116,    114,    110,    105,\n      99,     93,     90,     90,\n      95,    100,    108,    117,\n     124,    126,    126,    127,\n     126,    125,    124,    128,\n     137,    148,    160,    172,\n     184,    189,    188,    183,\n     173,    159,    142,    126,\n     113,    105,    101,    104,\n     111,    121,    132,    148,\n     170,    145,    168,    191,\n     211,    228,    242,    248,\n     244,    227,    201,    169,\n     136,    107,     88,     82,\n      86,     97,    111,    122,\n     130,    133,    131,    123,\n     114,    108,    106,    106,\n     108,    109,    111,    113,\n     112,    109,    105,    102,\n      97,     92,     89,     87,\n      88,     92,     99,    108,\n     119,    130,    138,    144,\n     147,    147,    143,    140,\n     136,    132,    127,    119,\n     105,     88,     70,     53,\n      40,     38,     48,     74,\n     111,    153,    194,    227,\n     248,    255,    249,    233,\n     214,    194,    175,    162,\n     152,    144,    136,    127,\n     116,    106,    100,     97,\n     100,    108,    120,    131,\n     140,    143,    142,    137,\n     129,    119,    111,    105,\n     102,    103,    104,    107,\n     111,    114,    114,    113,\n     111,    110,    107,    105,\n     105,    109,    118,    131,\n     146,    162,    173,    177,\n     172,    158,    135,    109,\n      83,     62,     51,     49,\n      57,     71,     88,    105,\n     123,    145,    135,    157,\n     179,    200,    221,    239,\n     250,    249,    233,    206,\n     171,    137,    106,     85,\n      77,     83,     98,    114,\n     130,    140,    146,    145,\n     139,    131,    126,    125,\n     126,    128,    130,    132,\n     133,    131,    126,    121,\n     114,    106,     97,     90,\n      87,     87,     92,    101,\n     113,    128,    141,    150,\n     154,    154,    149,    142,\n     135,    129,    125,    120,\n     113,    100,     82,     61,\n      40,     25,     19,     28,\n      55,     96,    142,    189,\n     225,    248,    255,    247,\n     229,    207,    186,    168,\n     156,    148,    143,    136,\n     127,    115,    105,     97,\n      93,     96,    106,    120,\n     135,    148,    156,    157,\n     154,    145,    134,    124,\n     115,    110,    107,    106,\n     106,    109,    111,    111,\n     110,    110,    109,    106,\n     102,    101,    103,    113,\n     126,    143,    161,    174,\n     179,    173,    154,    127,\n      95,     64,     41,     28,\n      28,     40,     58,     78,\n      97,    115,    135,    125,\n     141,    161,    182,    207,\n     230,    247,    255,    247,\n     225,    190,    147,    104,\n      68,     44,     35,     40,\n      55,     76,     97,    115,\n     125,    129,    128,    126,\n     126,    131,    140,    151,\n     163,    171,    170,    159,\n     138,    112,     86,     66,\n      56,     60,     77,    106,\n     140,    173,    199,    214,\n     217,    208,    191,    171,\n     152,    137,    128,    122,\n     117,    108,     92,     71,\n      46,     23,      6,      1,\n      12,     41,     84,    134,\n     182,    220,    244,    253,\n     246,    228,    205,    182,\n     163,    150,    142,    138,\n     131,    119,    103,     82,\n      62,     44,     35,     40,\n      59,     88,    122,    155,\n     181,    196,    197,    184,\n     163,    137,    114,     95,\n      87,     90,     99,    109,\n     119,    124,    126,    125,\n     122,    122,    128,    142,\n     162,    184,    205,    219,\n     221,    210,    184,    147,\n     104,     64,     31,     12,\n       7,     15,     32,     54,\n      75,     94,    109,    125,\n};\nconst uint8_t FLASHMEM wt_map[] = {\n     176,    255,    202,    193,\n     121,    122,    124,    123,\n      95,    197,      3,      8,\n       9,     35,     34,     32,\n     177,     30,    201,    185,\n     186,     83,     80,     54,\n     195,    196,     42,     41,\n      36,     37,     38,     33,\n     178,     31,    199,    184,\n     165,     82,     79,     86,\n      78,     45,     46,     47,\n      43,     44,     40,     39,\n     192,    198,    200,    183,\n     164,     81,     25,     26,\n     126,    125,      0,      1,\n       2,      6,     23,     22,\n     191,    179,    227,    228,\n     166,     84,     85,     14,\n     127,    128,    129,    130,\n     131,    132,      7,    209,\n     190,    134,    226,    229,\n     253,    204,     55,     12,\n      15,     10,     11,    163,\n     162,    167,    171,    208,\n     189,    133,    225,    230,\n     254,    216,    215,    214,\n     157,    158,    159,    160,\n     161,    168,    169,    170,\n     174,    234,    233,    231,\n     218,    217,    206,    205,\n     213,     56,    244,    242,\n     116,    115,    114,    243,\n     188,    235,    238,    232,\n     219,    207,    210,    211,\n     194,    145,    203,    245,\n     111,    112,    113,    108,\n      63,     27,    156,    237,\n       5,    149,    148,    246,\n     143,    144,    212,     52,\n     110,    109,    104,    172,\n     187,     28,     17,    236,\n     120,    150,    147,     50,\n     142,    141,     62,     60,\n      59,    102,    103,     57,\n     182,     29,     13,    239,\n     119,    151,    135,    138,\n     139,    140,    248,     99,\n      98,    100,    101,     61,\n      21,     19,      4,    240,\n     118,    152,    136,    137,\n     250,    251,    249,    247,\n      96,     53,    105,    106,\n     175,     24,     16,    241,\n     117,    153,    154,    155,\n     146,     51,     94,     93,\n      49,     97,     58,    107,\n     181,    252,     18,    220,\n     221,     64,     89,     90,\n      92,     91,     88,     87,\n      65,     66,     67,     68,\n     173,     20,    224,    223,\n     222,     48,    180,     77,\n      76,     75,     74,     73,\n      72,     71,     70,     69,\n};\nconst uint8_t FLASHMEM wt_code[] = {\n       5,      0,    132,      0,\n      20,     16,     20,     81,\n      16,     65,      8,     17,\n       4,     65,     17,      5,\n       0,     69,      1,     88,\n      17,     25,      0,    132,\n     144,      0,     64,     80,\n       0,     21,    148,      0,\n      65,     17,      5,    129,\n       4,      1,     68,      1,\n      65,      5,     65,     17,\n      21,      4,     20,     16,\n       4,    128,     80,      0,\n       4,     64,     20,     21,\n       0,      4,      1,     20,\n      16,      9,     17,     68,\n      17,      5,     17,      4,\n       1,    132,      0,     65,\n      16,     20,     81,    145,\n       1,     81,     17,     21,\n      16,     21,     81,      1,\n      20,     16,     21,     68,\n      16,     16,    144,      5,\n       0,    132,     17,      4,\n      65,     68,    129,     65,\n      20,     81,    129,      0,\n       4,     20,     65,    129,\n      17,      5,     80,      5,\n      64,     64,      1,    132,\n      64,     65,     17,     68,\n      65,     64,     17,      5,\n      80,      0,      4,      1,\n      20,     16,     25,     64,\n       4,     17,      4,     20,\n      16,     84,     20,    128,\n       5,      0,    132,      0,\n      65,     80,      1,     65,\n      24,     81,      0,    129,\n      80,    129,     17,      5,\n      64,      1,     65,     64,\n      16,     64,     16,     64,\n      17,      5,     64,      1,\n      65,     17,      5,     17,\n     132,      5,     80,      1,\n      64,     20,      1,     16,\n      25,     81,      0,     80,\n       4,    129,     16,      5,\n       0,      4,     20,     16,\n       4,      0,      8,     16,\n       4,      1,     20,     81,\n      16,     69,      1,      8,\n      21,     72,      0,     80,\n       4,     65,      1,      0,\n      80,      1,     65,      0,\n      64,     80,     65,     17,\n       4,     20,     20,    129,\n       1,      4,     21,     20,\n      16,    132,     17,      5,\n      16,      8,      1,      4,\n       4,     64,      0,      4,\n       5,     17,     21,     81,\n       0,      5,    128,      0,\n      65,     64,     17,      4,\n      80,     16,     68,      0,\n       4,      1,      1,     89,\n      17,     21,     64,     80,\n       1,    145,      0,     68,\n      20,     69,      1,     88,\n      17,     25,      0,    132,\n      16,     65,     80,      1,\n      81,      1,      4,     21,\n      16,     21,      1,     16,\n       9,     21,     20,    128,\n       4,      0,     69,     16,\n      20,     16,     21,     81,\n      65,      8,     20,      4,\n      64,     64,      1,    132,\n      21,    145,      1,     64,\n      24,     64,     16,      4,\n      80,     65,      1,      9,\n       5,      1,      4,     65,\n       4,     21,     64,      1,\n      81,     16,     16,    144,\n      17,      4,      1,      4,\n       5,     65,     20,    128,\n      80,      9,      5,      1,\n       4,      1,     88,      0,\n      64,      8,     81,     80,\n       1,     81,     17,      0,\n     145,     17,     69,      1,\n       4,      4,     17,      4,\n       9,     21,     20,    128,\n      81,     84,     17,     64,\n      17,     68,     16,      8,\n      16,     20,     81,      0,\n      21,     20,    128,    144,\n       5,     21,      0,      4,\n       1,    132,     64,    129,\n       1,     64,     80,      1,\n      65,      1,      5,      1,\n       1,      9,      9,     81,\n      64,     17,     64,     20,\n      68,      1,     24,      0,\n       4,      5,     65,     69,\n      65,      1,     68,     16,\n       8,     81,      4,      5,\n      65,     64,     65,     17,\n       8,     64,      0,     64,\n      80,      1,     68,      0,\n      24,      5,     85,      4,\n      65,     64,     80,     16,\n      64,     64,     17,     64,\n      20,    128,     80,     65,\n       1,     24,     69,     21,\n       1,     20,     65,      4,\n     129,     17,      5,     65,\n       1,     68,     16,     68,\n       1,     24,      0,     20,\n      81,      0,      5,     65,\n       1,     64,     17,     21,\n       4,      1,      1,     25,\n      81,     20,     64,     64,\n      16,     65,     80,     17,\n       0,    145,      1,     65,\n       0,     64,     20,     16,\n      20,     80,     64,     65,\n      17,     88,      0,     64,\n      24,      0,      4,      5,\n      65,     17,      0,    145,\n      17,      4,     65,      4,\n     145,     65,      4,     65,\n       0,     80,     17,      5,\n      80,      0,      4,      1,\n       1,     89,      0,     64,\n       4,     65,      8,     81,\n      80,      0,     88,      0,\n      64,     64,      0,      8,\n      17,    133,     65,      8,\n      64,     80,     64,      0,\n      24,      1,      5,     80,\n      17,      5,      8,     21,\n       0,     20,     81,      0,\n     149,      5,      0,    132,\n       0,     20,     16,     20,\n      81,     16,     65,     24,\n      16,      4,     65,     17,\n       5,     81,      1,     20,\n      17,      0,     88,      0,\n      64,     20,     16,      9,\n       5,      1,      4,      1,\n       8,     81,     17,      5,\n      65,     24,     65,     16,\n      64,     80,      0,      4,\n      64,      4,    128,     80,\n      65,      1,      8,     64,\n       5,      5,     65,     20,\n     128,     80,     25,     16,\n      21,     81,      0,     21,\n       1,     16,      9,     64,\n      64,     16,     64,     20,\n      84,     16,     16,    144,\n      20,      0,     21,     16,\n      68,     16,     65,      9,\n      16,     20,     81,     16,\n       8,     25,     16,     20,\n      81,      0,      5,     17,\n       4,      1,     68,      1,\n       0,     80,      5,      0,\n       4,     65,    132,     65,\n       4,      5,     65,      4,\n     129,      5,      0,    132,\n       1,     20,     81,     17,\n       5,     65,     17,      0,\n     145,     16,      5,      0,\n      20,    145,     16,     69,\n      16,    132,     20,     20,\n      65,     80,     17,     68,\n       1,      8,     20,      8,\n      25,     20,     81,      0,\n      68,      1,      0,     80,\n      16,     65,     64,      1,\n      65,      1,      5,     20,\n      20,    129,      1,     65,\n      17,     21,     84,      4,\n      64,     21,      1,     16,\n       9,     64,     68,     64,\n      65,     17,      8,      0,\n      20,     81,     16,      9,\n      16,      4,      5,    129,\n       5,      0,     68,      1,\n     145,      1,     65,     17,\n       5,     80,     16,     64,\n       1,      8,     16,      4,\n       1,      4,     20,     16,\n      20,    144,     64,      9,\n      21,     16,      4,     65,\n      17,      5,     64,      0,\n      88,      0,     64,      8,\n      65,     17,     21,     81,\n      81,     16,     16,    144,\n     144,      0,      4,     80,\n       1,     20,     64,     20,\n      24,     16,      4,      0,\n      20,     81,     16,      4,\n      80,      0,     24,     81,\n       0,    129,     16,      5,\n       0,     20,     81,     17,\n       5,     17,      4,    128,\n      80,     65,      1,     24,\n      16,      5,     20,      0,\n      20,      0,      4,      1,\n      68,      0,     24,      0,\n       4,     80,     16,      4,\n      64,      9,     16,      4,\n      65,     17,     21,      9,\n      25,     80,     64,     65,\n       1,     24,     81,      0,\n     129,     16,     81,      0,\n      21,     80,     24,      0,\n      20,     81,      1,    144,\n      80,     89,      0,     64,\n       8,     16,      4,      5,\n     129,     20,     20,    128,\n      17,      5,     16,     88,\n       0,     64,      8,     65,\n      17,     21,     81,     81,\n      16,     16,    144,      4,\n       0,     69,     16,     20,\n      16,     21,      0,     20,\n      81,      1,     20,     16,\n      25,      1,      5,     80,\n      64,     89,     80,     16,\n      64,      1,      5,     20,\n      20,     65,     16,     16,\n     144,      5,      0,    132,\n       1,     64,     80,     16,\n      84,     20,     20,     64,\n       4,    129,      5,      4,\n      17,     84,     17,     69,\n       1,     24,      0,      4,\n      21,     16,     20,     80,\n      17,      0,    145,     16,\n       5,     84,      0,    128,\n       5,      0,    132,      1,\n       4,     65,     64,     65,\n       1,      5,     64,     16,\n      16,    144,     16,      5,\n       0,      4,     85,     16,\n      17,     65,      0,      8,\n       0,      4,      5,     17,\n       4,     17,     68,     65,\n      64,     65,     17,      4,\n      16,      1,     24,     81,\n      20,     64,     64,     16,\n      65,    144,     16,      5,\n       0,      4,      4,     64,\n      16,     65,      4,     65,\n      20,     64,     16,     16,\n     144,      5,      0,      4,\n      85,     16,     17,     65,\n       0,     24,      0,     20,\n      16,      9,     64,     21,\n      81,      1,     65,      1,\n       5,      0,      4,      5,\n      80,      0,     68,     65,\n      16,     16,     80,    255,\n};\n\n\nconst uint8_t* wt_table[] = {\n  wt_waves,\n  wt_map,\n  wt_code,\n};\n\nconst uint16_t FLASHMEM chr_characters[] = {\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,    272,   1280,  29012,\n   46420,   9352,  39716,    256,\n   39936,  61440,    952,    340,\n       8,     68,     16,    136,\n   64648,  24704,  55364,  61504,\n   25668,  46148,  48196,  32912,\n   64580,  62532,    272,    264,\n     160,   4164,    520,  33936,\n   64592,  60484,  61776,  39936,\n   61712,  40004,  35908,  48192,\n   27716,  37136,  30720,   3236,\n    7168,  28288,  28192,  64512,\n   52292,  64544,  52324,  46148,\n   33040,  31744,   3208,  27688,\n     680,    656,  37000,  39936,\n     544,  61440,     40,   4096,\n     512,  63556,   7204,   6212,\n   28744,  39940,  35844,  62016,\n   11332,   4180,  12352,    432,\n     272,  10324,   8272,  14404,\n   35972,  50276,     80,  45632,\n    7172,  14336,   2056,  10280,\n     680,  29248,   4108,  37388,\n     272,  37088,     68,      0,\n   24736,   3592,  33408,   4136,\n     224,    524,    896,     56,\n   24712,  18568,     24,     40,\n   60416,  10308,   4368,   3616,\n   64520,  64516,  65024,  64768,\n   64640,  64576,  64544,  64528,\n   49152,  57344,  28672,  14336,\n    6144,   7168,  35840,  50176,\n   65532,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,  65532,\n};\n\n\nconst uint16_t* char_table[] = {\n  chr_characters,\n};\n\n\n}  // namespace braids\n"
  },
  {
    "path": "lib/braids/resources.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef BRAIDS_RESOURCES_H_\n#define BRAIDS_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace braids {\n\ntypedef uint8_t ResourceId;\n\nextern const char* string_table[];\n\nextern const uint16_t* lookup_table_table[];\n\nextern const int16_t* lookup_table_signed_table[];\n\nextern const uint32_t* lookup_table_hr_table[];\n\nextern const int16_t* waveform_table[];\n\nextern const int16_t* waveshaper_table[];\n\nextern const uint8_t* wt_table[];\n\nextern const uint16_t* char_table[];\n\nextern const uint16_t lut_resonator_coefficient[];\nextern const uint16_t lut_resonator_scale[];\nextern const uint16_t lut_svf_cutoff[];\nextern const uint16_t lut_svf_damp[];\nextern const uint16_t lut_svf_scale[];\nextern const uint16_t lut_granular_envelope[];\nextern const uint16_t lut_granular_envelope_rate[];\nextern const uint16_t lut_bowing_envelope[];\nextern const uint16_t lut_bowing_friction[];\nextern const uint16_t lut_blowing_envelope[];\nextern const uint16_t lut_flute_body_filter[];\nextern const uint16_t lut_fm_frequency_quantizer[];\nextern const uint16_t lut_vco_detune[];\nextern const uint16_t lut_bell[];\nextern const uint16_t lut_env_expo[];\nextern const int16_t lut_blowing_jet[];\nextern const uint32_t lut_oscillator_increments[];\nextern const uint32_t lut_oscillator_delays[];\nextern const uint32_t lut_env_portamento_increments[];\nextern const int16_t wav_formant_sine[];\nextern const int16_t wav_formant_square[];\nextern const int16_t wav_sine[];\nextern const int16_t wav_bandlimited_comb_0[];\nextern const int16_t wav_bandlimited_comb_1[];\nextern const int16_t wav_bandlimited_comb_2[];\nextern const int16_t wav_bandlimited_comb_3[];\nextern const int16_t wav_bandlimited_comb_4[];\nextern const int16_t wav_bandlimited_comb_5[];\nextern const int16_t wav_bandlimited_comb_6[];\nextern const int16_t wav_bandlimited_comb_7[];\nextern const int16_t wav_bandlimited_comb_8[];\nextern const int16_t wav_bandlimited_comb_9[];\nextern const int16_t wav_bandlimited_comb_10[];\nextern const int16_t wav_bandlimited_comb_11[];\nextern const int16_t wav_bandlimited_comb_12[];\nextern const int16_t wav_bandlimited_comb_13[];\nextern const int16_t wav_bandlimited_comb_14[];\nextern const int16_t ws_moderate_overdrive[];\nextern const int16_t ws_violent_overdrive[];\nextern const int16_t ws_sine_fold[];\nextern const int16_t ws_tri_fold[];\nextern const uint8_t wt_waves[];\nextern const uint8_t wt_map[];\nextern const uint8_t wt_code[];\nextern const uint16_t chr_characters[];\n#define STR_DUMMY 0  // dummy\n#define LUT_RESONATOR_COEFFICIENT 0\n#define LUT_RESONATOR_COEFFICIENT_SIZE 129\n#define LUT_RESONATOR_SCALE 1\n#define LUT_RESONATOR_SCALE_SIZE 129\nconst int LUT_SVF_CUTOFF = 2;\n#define LUT_SVF_CUTOFF_SIZE 257\nconst int LUT_SVF_DAMP = 3;\n#define LUT_SVF_DAMP_SIZE 257\nconst int LUT_SVF_SCALE = 4;\n#define LUT_SVF_SCALE_SIZE 257\n#define LUT_GRANULAR_ENVELOPE 5\n#define LUT_GRANULAR_ENVELOPE_SIZE 513\n#define LUT_GRANULAR_ENVELOPE_RATE 6\n#define LUT_GRANULAR_ENVELOPE_RATE_SIZE 257\n#define LUT_BOWING_ENVELOPE 7\n#define LUT_BOWING_ENVELOPE_SIZE 752\n#define LUT_BOWING_FRICTION 8\n#define LUT_BOWING_FRICTION_SIZE 257\n#define LUT_BLOWING_ENVELOPE 9\n#define LUT_BLOWING_ENVELOPE_SIZE 392\n#define LUT_FLUTE_BODY_FILTER 10\n#define LUT_FLUTE_BODY_FILTER_SIZE 128\nconst int LUT_FM_FREQUENCY_QUANTIZER = 11;\nconst int LUT_FM_FREQUENCY_QUANTIZER_SIZE = 129;\n#define LUT_VCO_DETUNE 12\n#define LUT_VCO_DETUNE_SIZE 257\n#define LUT_BELL 13\n#define LUT_BELL_SIZE 257\nconst int LUT_ENV_EXPO = 14;\n#define LUT_ENV_EXPO_SIZE 257\n#define LUT_BLOWING_JET 0\n#define LUT_BLOWING_JET_SIZE 257\nconst int LUT_OSCILLATOR_INCREMENTS = 0;\n#define LUT_OSCILLATOR_INCREMENTS_SIZE 97\n#define LUT_OSCILLATOR_DELAYS 1\n#define LUT_OSCILLATOR_DELAYS_SIZE 97\n#define LUT_ENV_PORTAMENTO_INCREMENTS 2\n#define LUT_ENV_PORTAMENTO_INCREMENTS_SIZE 128\n#define WAV_FORMANT_SINE 0\n#define WAV_FORMANT_SINE_SIZE 256\n#define WAV_FORMANT_SQUARE 1\n#define WAV_FORMANT_SQUARE_SIZE 256\nconst int WAV_SINE = 2;\nconst int WAV_SINE_SIZE = 257;\n#define WAV_BANDLIMITED_COMB_0 3\n#define WAV_BANDLIMITED_COMB_0_SIZE 257\n#define WAV_BANDLIMITED_COMB_1 4\n#define WAV_BANDLIMITED_COMB_1_SIZE 257\n#define WAV_BANDLIMITED_COMB_2 5\n#define WAV_BANDLIMITED_COMB_2_SIZE 257\n#define WAV_BANDLIMITED_COMB_3 6\n#define WAV_BANDLIMITED_COMB_3_SIZE 257\n#define WAV_BANDLIMITED_COMB_4 7\n#define WAV_BANDLIMITED_COMB_4_SIZE 257\n#define WAV_BANDLIMITED_COMB_5 8\n#define WAV_BANDLIMITED_COMB_5_SIZE 257\n#define WAV_BANDLIMITED_COMB_6 9\n#define WAV_BANDLIMITED_COMB_6_SIZE 257\n#define WAV_BANDLIMITED_COMB_7 10\n#define WAV_BANDLIMITED_COMB_7_SIZE 257\n#define WAV_BANDLIMITED_COMB_8 11\n#define WAV_BANDLIMITED_COMB_8_SIZE 257\n#define WAV_BANDLIMITED_COMB_9 12\n#define WAV_BANDLIMITED_COMB_9_SIZE 257\n#define WAV_BANDLIMITED_COMB_10 13\n#define WAV_BANDLIMITED_COMB_10_SIZE 257\n#define WAV_BANDLIMITED_COMB_11 14\n#define WAV_BANDLIMITED_COMB_11_SIZE 257\n#define WAV_BANDLIMITED_COMB_12 15\n#define WAV_BANDLIMITED_COMB_12_SIZE 257\n#define WAV_BANDLIMITED_COMB_13 16\n#define WAV_BANDLIMITED_COMB_13_SIZE 257\n#define WAV_BANDLIMITED_COMB_14 17\n#define WAV_BANDLIMITED_COMB_14_SIZE 257\n#define WS_MODERATE_OVERDRIVE 0\n#define WS_MODERATE_OVERDRIVE_SIZE 257\n#define WS_VIOLENT_OVERDRIVE 1\n#define WS_VIOLENT_OVERDRIVE_SIZE 257\n#define WS_SINE_FOLD 2\n#define WS_SINE_FOLD_SIZE 257\n#define WS_TRI_FOLD 3\n#define WS_TRI_FOLD_SIZE 257\n#define WT_WAVES 0\n#define WT_WAVES_SIZE 33024\n#define WT_MAP 1\n#define WT_MAP_SIZE 256\n#define WT_CODE 2\n#define WT_CODE_SIZE 1064\n#define CHR_CHARACTERS 0\n#define CHR_CHARACTERS_SIZE 256\n\n}  // namespace braids\n\n#endif  // BRAIDS_RESOURCES_H_\n"
  },
  {
    "path": "lib/braids/settings.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Settings\n\n#include \"settings.h\"\n\n#include <cstring>\n\n//#include \"stmlib/system/storage.h\"\n//#include \"stmlib/utils/murmurhash3.h\"\n\nnamespace braids {\n\nusing namespace stmlib;\n\nconst SettingsData kInitSettings = {\n  MACRO_OSC_SHAPE_CSAW,\n  \n  RESOLUTION_16_BIT,\n  SAMPLE_RATE_48K,\n  \n  0,  // AD->timbre\n  false,  // Trig source\n  1,  // Trig delay\n  false,  // Meta modulation\n  \n  PITCH_RANGE_EXTERNAL,\n  2,\n  0,  // Quantizer is off\n  false,\n  false,\n  false,\n  \n  2,  // Brightness\n  0,  // AD attack\n  5,  // AD decay\n  0,  // AD->FM\n  0,  // AD->COLOR\n  0,  // AD->VCA\n  0,  // Quantizer root\n  \n  50,\n  15401,\n  2048,\n  \n  { 0, 0 },\n  { 32768, 32768 },\n  \"GREETINGS FROM MUTABLE INSTRUMENTS *EDIT ME*\",\n};\n\n//Storage<0x8020000, 4> storage;\n\nvoid Settings::Init() {\n//  if (!storage.ParsimoniousLoad(&data_, &version_token_)) {\n    Reset();\n//  }\n  bool settings_within_range = true;\n  for (int32_t i = 0; i <= SETTING_LAST_EDITABLE_SETTING; ++i) {\n    const Setting setting = static_cast<Setting>(i);\n    const SettingMetadata& setting_metadata = metadata(setting);\n    uint8_t value = GetValue(setting);\n    settings_within_range = settings_within_range && \\\n        value >= setting_metadata.min_value && \\\n        value <= setting_metadata.max_value;\n  }\n  settings_within_range = settings_within_range && data_.magic_byte == 'M';\n  for (int i = 0; i < 2; ++i) {\n    settings_within_range = settings_within_range && \\\n        data_.parameter_cv_scale[i] > 16384;\n    settings_within_range = settings_within_range && \\\n        data_.parameter_cv_offset[i] < 8000;\n    settings_within_range = settings_within_range && \\\n        data_.parameter_cv_offset[i] > -8000;\n  }\n  if (!settings_within_range) {\n    Reset();\n  }\n  CheckPaques();\n}\n\nvoid Settings::Reset() {\n  memcpy(&data_, &kInitSettings, sizeof(SettingsData));\n  data_.magic_byte = 'M';\n}\n\nvoid Settings::Save() {\n  data_.magic_byte = 'M';\n  //storage.ParsimoniousSave(data_, &version_token_);\n  CheckPaques();\n}\n\nvoid Settings::CheckPaques() {\n  paques_ = !strcmp(data_.marquee_text, \"49\");\n}\n\nconst char* const boolean_values[] = { \"OFF \", \"ON \" };\nconst char* const intensity_values[] = {\n    \"OFF \",\n    \"   1\",\n    \"   2\",\n    \"   3\",\n    \"FULL\" };\n\nconst char* const zero_to_fifteen_values[] = {\n    \"   0\",\n    \"   1\",\n    \"   2\",\n    \"   3\",\n    \"   4\",\n    \"   5\",\n    \"   6\",\n    \"   7\",\n    \"   8\",\n    \"   9\",\n    \"  10\",\n    \"  11\",\n    \"  12\",\n    \"  13\",\n    \"  14\",\n    \"  15\"};\n\nconst char* const algo_values[] = {\n\t\"CSAW\",\n\t\"/\\\\-_\", //\"^\\x88\\x8D_\"\n\t\"//-_\",  //\"\\x88\\x8A\\x8C\\x8D\"\n\t\"FOLD\",\n\t\"UUUU\",  //\"\\x8E\\x8E\\x8E\\x8E\",\n\t\"SUB-\",  //\"SUB\\x8C\"\n  \"SUB/\",  //\"SUB\\x88\",\n\t\"SYN-\",  //\"SYN\\x8C\"\n\t\"SYN/\",  //\"SYN\\x88\",\n\t\"//x3\",  //\"\\x88\\x88x3\",\n\t\"-_x3\",  //\"\\x8C_x3\",\n\t\"/\\\\x3\",\n\t\"SIx3\",\n\t\"RING\",\n  \"////\", //\"\\x88\\x89\\x88\\x89\",\n  \"//UU\", //\"\\x88\\x88\\x8E\\x8E\",\n\t\"TOY*\",\n\t\"ZLPF\",\n\t\"ZPKF\",\n\t\"ZBPF\",\n\t\"ZHPF\",\n\t\"VOSM\",\n\t\"VOWL\",\n\t\"VFOF\",\n\t\"HARM\",\n\t\"FM  \",\n\t\"FBFM\",\n\t\"WTFM\",\n\t\"PLUK\",\n\t\"BOWD\",\n\t\"BLOW\",\n\t\"FLUT\",\n\t\"BELL\",\n\t\"DRUM\",\n\t\"KICK\",\n\t\"CYMB\",\n\t\"SNAR\",\n\t\"WTBL\",\n\t\"WMAP\",\n\t\"WLIN\",\n\t\"WTx4\",\n\t\"NOIS\",\n\t\"TWNQ\",\n\t\"CLKN\",\n\t\"CLOU\",\n\t\"PRTC\",\n\t\"QPSK\",\n  \"****\",\n    // \"NAME\" // For your algorithm\n \n  // Braids Renaissance https://burns.ca/eurorack.html\n  \"//CH\", //  \"\\x88\\x88\" \"CH\",\n  \"-_CH\", //  \"\\x8C_CH\",\n  \"/\\\\CH\",\n  \"SICH\",\n  \"WTCH\",\n  \"//x6\", //\"\\x88\\x88x6\",\n  \"-_x6\", //\"\\x8C_x6\",\n  \"/\\\\x6\",\n  \"SIx6\",\n  \"WTx6\",\n\n};\n\nconst char* const bits_values[] = {\n    \"2BIT\",\n    \"3BIT\",\n    \"4BIT\",\n    \"6BIT\",\n    \"8BIT\",\n    \"12B\",\n    \"16B \" };\n    \nconst char* const rates_values[] = {\n    \"4KHZ\",\n    \"8KHZ\",\n    \"16K \",\n    \"24K \",\n    \"32K \",\n    \"48K \",\n    \"96K \" };\n    \nconst char* const quantization_values[] = {\n    \"OFF \",\n    \"SEMI\",\n    \"IONI\",\n    \"DORI\",\n    \"PHRY\",\n    \"LYDI\",\n    \"MIXO\",\n    \"AEOL\",\n    \"LOCR\",\n    \"BLU+\",\n    \"BLU-\",\n    \"PEN+\",\n    \"PEN-\",\n    \"FOLK\",\n    \"JAPA\",\n    \"GAME\",\n    \"GYPS\",\n    \"ARAB\",\n    \"FLAM\",\n    \"WHOL\",\n    \"PYTH\",\n    \"EB/4\",\n    \"E /4\",\n    \"EA/4\",\n    \"BHAI\",\n    \"GUNA\",\n    \"MARW\",\n    \"SHRI\",\n    \"PURV\",\n    \"BILA\",\n    \"YAMA\",\n    \"KAFI\",\n    \"BHIM\",\n    \"DARB\",\n    \"RAGE\",\n    \"KHAM\",\n    \"MIMA\",\n    \"PARA\",\n    \"RANG\",\n    \"GANG\",\n    \"KAME\",\n    \"PAKA\",\n    \"NATB\",\n    \"KAUN\",\n    \"BAIR\",\n    \"BTOD\",\n    \"CHAN\",\n    \"KTOD\",\n    \"JOGE\" };\n\nconst char* const trig_source_values[] = { \"EXT.\", \"AUTO\" };\n\nconst char* const pitch_range_values[] = {\n    \"EXT.\",\n    \"FREE\",\n    \"XTND\",\n    \"440 \",\n    \"LFO \"\n};\n\nconst char* const octave_values[] = { \"-2\", \"-1\", \"0\", \"1\", \"2\" };\n\nconst char* const trig_delay_values[] = {\n    \"NONE\",\n    \"125u\",\n    \"250u\",\n    \"500u\",\n    \"1ms \",\n    \"2ms \",\n    \"4ms \"\n};\n\nconst char* const brightness_values[] = {\n    \"\\xff   \",\n    \"\\xff\\xff  \",\n    \"\\xff\\xff\\xff\\xff\",\n};\n\nconst char* const note_values[] = {\n    \"C\",\n    \"Db\",\n    \"D\",\n    \"Eb\",\n    \"E\",\n    \"F\",\n    \"Gb\",\n    \"G\",\n    \"Ab\",\n    \"A\",\n    \"Bb\",\n    \"B\",\n};\n\n/* static */\nconst SettingMetadata Settings::metadata_[] = {\n  { 0, MACRO_OSC_SHAPE_LAST - 2, \"WAVE\", algo_values },\n  { 0, RESOLUTION_LAST - 1, \"BITS\", bits_values },\n  { 0, SAMPLE_RATE_LAST - 1, \"RATE\", rates_values },\n  { 0, 15, \"\\x8F\"\"TIM\", zero_to_fifteen_values },\n  { 0, 1, \"TSRC\", trig_source_values },\n  { 0, 6, \"TDLY\", trig_delay_values },\n  { 0, 1, \"META\", boolean_values },\n  { 0, 3, \"RANG\", pitch_range_values },\n  { 0, 4, \"OCTV\", octave_values },\n  { 0, 48, \"QNTZ\", quantization_values },\n  { 0, 1, \"FLAT\", boolean_values },\n  { 0, 4, \"DRFT\", intensity_values },\n  { 0, 4, \"SIGN\", intensity_values },\n  { 0, 2, \"BRIG\", brightness_values },\n  { 0, 15, \"\\x8F\"\"ATT\", zero_to_fifteen_values },\n  { 0, 15, \"\\x8F\"\"DEC\", zero_to_fifteen_values },\n  { 0, 15, \"\\x8F\"\"FM \", zero_to_fifteen_values },\n  { 0, 15, \"\\x8F\"\"COL\", zero_to_fifteen_values },\n  { 0, 1, \"\\x8F\"\"VCA\", boolean_values },\n  { 0, 11, \"ROOT\", note_values },\n  { 0, 0, \"CAL.\", NULL },\n  { 0, 0, \"    \", NULL },  // Placeholder for CV tester\n  { 0, 0, \"    \", NULL },  // Placeholder for marquee\n  { 0, 0, \"v1.9\", NULL },  // Placeholder for version string\n};\n\n/* static */\nconst Setting Settings::settings_order_[] = {\n  SETTING_OSCILLATOR_SHAPE,\n  SETTING_META_MODULATION,\n  SETTING_RESOLUTION,\n  SETTING_SAMPLE_RATE,\n  SETTING_TRIG_SOURCE,\n  SETTING_TRIG_DELAY,\n  SETTING_AD_ATTACK,\n  SETTING_AD_DECAY,\n  SETTING_AD_FM,\n  SETTING_AD_TIMBRE,\n  SETTING_AD_COLOR,\n  SETTING_AD_VCA,\n  SETTING_PITCH_RANGE,\n  SETTING_PITCH_OCTAVE,\n  SETTING_QUANTIZER_SCALE,\n  SETTING_QUANTIZER_ROOT,\n  SETTING_VCO_FLATTEN,\n  SETTING_VCO_DRIFT,\n  SETTING_SIGNATURE,\n  SETTING_BRIGHTNESS,\n  SETTING_CALIBRATION,\n  SETTING_CV_TESTER,\n  SETTING_MARQUEE,\n  SETTING_VERSION,\n};\n\n/* extern */\nSettings settings;\n\n}  // namespace braids"
  },
  {
    "path": "lib/braids/settings.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Settings\n\n#ifndef BRAIDS_SETTINGS_H_\n#define BRAIDS_SETTINGS_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace braids {\n\nenum MacroOscillatorShape {\n  MACRO_OSC_SHAPE_CSAW,\n  MACRO_OSC_SHAPE_MORPH,\n  MACRO_OSC_SHAPE_SAW_SQUARE,\n  MACRO_OSC_SHAPE_SINE_TRIANGLE,\n  MACRO_OSC_SHAPE_BUZZ,\n  \n  MACRO_OSC_SHAPE_SQUARE_SUB,\n  MACRO_OSC_SHAPE_SAW_SUB,\n  MACRO_OSC_SHAPE_SQUARE_SYNC,\n  MACRO_OSC_SHAPE_SAW_SYNC,\n  MACRO_OSC_SHAPE_TRIPLE_SAW,\n  MACRO_OSC_SHAPE_TRIPLE_SQUARE,\n  MACRO_OSC_SHAPE_TRIPLE_TRIANGLE,\n  MACRO_OSC_SHAPE_TRIPLE_SINE,\n  MACRO_OSC_SHAPE_TRIPLE_RING_MOD,\n\n  MACRO_OSC_SHAPE_SAW_SWARM,\n  MACRO_OSC_SHAPE_SAW_COMB,\n  MACRO_OSC_SHAPE_TOY,\n\n  MACRO_OSC_SHAPE_DIGITAL_FILTER_LP,\n  MACRO_OSC_SHAPE_DIGITAL_FILTER_PK,\n  MACRO_OSC_SHAPE_DIGITAL_FILTER_BP,\n  MACRO_OSC_SHAPE_DIGITAL_FILTER_HP,\n  MACRO_OSC_SHAPE_VOSIM,\n  MACRO_OSC_SHAPE_VOWEL,\n  MACRO_OSC_SHAPE_VOWEL_FOF,\n  \n  MACRO_OSC_SHAPE_HARMONICS,\n\n  MACRO_OSC_SHAPE_FM,\n  MACRO_OSC_SHAPE_FEEDBACK_FM,\n  MACRO_OSC_SHAPE_CHAOTIC_FEEDBACK_FM,\n\n  MACRO_OSC_SHAPE_PLUCKED,\n  MACRO_OSC_SHAPE_BOWED,\n  MACRO_OSC_SHAPE_BLOWN,\n  MACRO_OSC_SHAPE_FLUTED,\n  MACRO_OSC_SHAPE_STRUCK_BELL,\n  MACRO_OSC_SHAPE_STRUCK_DRUM,\n  MACRO_OSC_SHAPE_KICK,\n  MACRO_OSC_SHAPE_CYMBAL,\n  MACRO_OSC_SHAPE_SNARE,\n\n  MACRO_OSC_SHAPE_WAVETABLES,\n  MACRO_OSC_SHAPE_WAVE_MAP,\n  MACRO_OSC_SHAPE_WAVE_LINE,\n  MACRO_OSC_SHAPE_WAVE_PARAPHONIC,\n\n  MACRO_OSC_SHAPE_FILTERED_NOISE,\n  MACRO_OSC_SHAPE_TWIN_PEAKS_NOISE,\n  MACRO_OSC_SHAPE_CLOCKED_NOISE,\n  MACRO_OSC_SHAPE_GRANULAR_CLOUD,\n  MACRO_OSC_SHAPE_PARTICLE_NOISE,\n  \n  MACRO_OSC_SHAPE_DIGITAL_MODULATION,\n\n  MACRO_OSC_SHAPE_QUESTION_MARK,\n  // MACRO_OSC_SHAPE_YOUR_ALGO\n\n  // Braids Renaissance https://burns.ca/eurorack.html\n  MACRO_OSC_SHAPE_CHORD_SAW,\n  MACRO_OSC_SHAPE_CHORD_SQUARE,\n  MACRO_OSC_SHAPE_CHORD_TRIANGLE,\n  MACRO_OSC_SHAPE_CHORD_SINE,\n  MACRO_OSC_SHAPE_CHORD_WAVETABLE,\n\n  MACRO_OSC_SHAPE_STACK_SAW,\n  MACRO_OSC_SHAPE_STACK_SQUARE,\n  MACRO_OSC_SHAPE_STACK_TRIANGLE,\n  MACRO_OSC_SHAPE_STACK_SINE,\n  MACRO_OSC_SHAPE_STACK_WAVETABLE,\n\n  MACRO_OSC_SHAPE_LAST,\n  MACRO_OSC_SHAPE_LAST_ACCESSIBLE_FROM_META = MACRO_OSC_SHAPE_DIGITAL_MODULATION\n};\n\nenum Resolution {\n  RESOLUTION_2_BIT,\n  RESOLUTION_3_BIT,\n  RESOLUTION_4_BIT,\n  RESOLUTION_6_BIT,\n  RESOLUTION_8_BIT,\n  RESOLUTION_12_BIT,\n  RESOLUTION_16_BIT,\n  RESOLUTION_LAST\n};\n\nenum SampleRate {\n  SAMPLE_RATE_4K,\n  SAMPLE_RATE_8K,\n  SAMPLE_RATE_16K,\n  SAMPLE_RATE_24k,\n  SAMPLE_RATE_32k,\n  SAMPLE_RATE_48K,\n  SAMPLE_RATE_96K,\n  SAMPLE_RATE_LAST\n};\n\nenum PitchRange {\n  PITCH_RANGE_EXTERNAL,\n  PITCH_RANGE_FREE,\n  PITCH_RANGE_EXTENDED,\n  PITCH_RANGE_440,\n  PITCH_RANGE_LFO  // This setting is hidden by default!\n};\n\nenum Setting {\n  SETTING_OSCILLATOR_SHAPE,\n  SETTING_RESOLUTION,\n  SETTING_SAMPLE_RATE,\n  SETTING_AD_TIMBRE,\n  SETTING_TRIG_SOURCE,\n  SETTING_TRIG_DELAY,\n  SETTING_META_MODULATION,\n  SETTING_PITCH_RANGE,\n  SETTING_PITCH_OCTAVE,\n  SETTING_QUANTIZER_SCALE,\n  SETTING_VCO_FLATTEN,\n  SETTING_VCO_DRIFT,\n  SETTING_SIGNATURE,\n  SETTING_BRIGHTNESS,\n  SETTING_AD_ATTACK,\n  SETTING_AD_DECAY,\n  SETTING_AD_FM,\n  SETTING_AD_COLOR,\n  SETTING_AD_VCA,\n  SETTING_QUANTIZER_ROOT,\n  SETTING_LAST_EDITABLE_SETTING = SETTING_QUANTIZER_ROOT,\n  \n  // Not settings per-se, but used for menu display!\n  SETTING_CALIBRATION,\n  SETTING_CV_TESTER,\n  SETTING_MARQUEE,\n  SETTING_VERSION,\n  SETTING_LAST\n};\n\nstruct SettingsData {\n  uint8_t shape;\n  uint8_t resolution;\n  uint8_t sample_rate;\n  uint8_t ad_timbre;\n  uint8_t auto_trig;\n  uint8_t trig_delay;\n  uint8_t meta_modulation;\n  uint8_t pitch_range;\n  uint8_t pitch_octave;\n  uint8_t quantizer_scale;\n  uint8_t vco_flatten;\n  uint8_t vco_drift;\n  uint8_t signature;\n  uint8_t brightness;\n  uint8_t ad_attack;\n  uint8_t ad_decay;\n  uint8_t ad_fm;\n  uint8_t ad_color;\n  uint8_t ad_vca;\n  uint8_t quantizer_root;\n  \n  int32_t pitch_cv_offset;\n  int32_t pitch_cv_scale;\n  int32_t fm_cv_offset;\n  \n  int16_t parameter_cv_offset[2];\n  uint16_t parameter_cv_scale[2];\n  \n  char marquee_text[55];\n  char magic_byte;\n};\n\nstruct SettingMetadata {\n  uint8_t min_value;\n  uint8_t max_value;\n  const char name[5];\n  const char* const* strings;\n  \n  int16_t Clip(int16_t value) const {\n    if (value > max_value) {\n      value = max_value;\n    } else if (value < min_value) {\n      value = min_value;\n    }\n    return value;\n  }\n};\n\nclass Settings {\n public:\n  Settings() { }\n  ~Settings() { }\n  \n  void Init();\n  void Save();\n  void Reset();\n  \n  void SetValue(Setting setting, uint8_t value) {\n    uint8_t* data = static_cast<uint8_t*>(static_cast<void*>(&data_));\n    data[setting] = value;\n  }\n  \n  uint8_t GetValue(Setting setting) const {\n    const uint8_t* data = static_cast<const uint8_t*>(\n        static_cast<const void*>(&data_));\n    return data[setting];\n  }\n  \n  inline MacroOscillatorShape shape() const {\n    return static_cast<MacroOscillatorShape>(data_.shape);\n  }\n  \n  inline Resolution resolution() const {\n    return static_cast<Resolution>(data_.resolution);\n  }\n  \n  inline SampleRate sample_rate() const {\n    return static_cast<SampleRate>(data_.sample_rate);\n  }\n  \n  inline bool vco_flatten() const {\n    return data_.vco_flatten;\n  }\n\n  inline uint8_t vco_drift() const {\n    return data_.vco_drift;\n  }\n\n  inline uint8_t signature() const {\n    return data_.signature;\n  }\n\n  inline bool meta_modulation() const {\n    return data_.meta_modulation;\n  }\n  \n  inline uint8_t trig_delay() const {\n    return data_.trig_delay;\n  }\n  \n  inline int32_t quantizer_root() const {\n    return data_.quantizer_root;\n  }\n  \n  inline const char* marquee_text() const {\n    return data_.marquee_text;\n  }\n  \n  inline char* mutable_marquee_text() {\n    return data_.marquee_text;\n  }\n  \n  inline const SettingsData& data() const { return data_; }\n  inline SettingsData* mutable_data() { return &data_; }\n  \n  void Calibrate(\n      int32_t adc_code_c2,\n      int32_t adc_code_c4,\n      int32_t adc_code_fm,\n      int32_t adc_code_p0_min,\n      int32_t adc_code_p0_max,\n      int32_t adc_code_p1_min,\n      int32_t adc_code_p1_max) {\n    if (adc_code_c4 != adc_code_c2) {\n      int32_t scale = (24 * 128 * 4096L) / (adc_code_c4 - adc_code_c2);\n      data_.pitch_cv_scale = scale;\n      data_.pitch_cv_offset = (60 << 7) - \n          (scale * ((adc_code_c2 + adc_code_c4) >> 1) >> 12);\n      data_.fm_cv_offset = adc_code_fm;\n    }\n    \n    // int32_t min_code[2] = { adc_code_p0_min, adc_code_p1_min };\n    // int32_t max_code[2] = { adc_code_p0_max, adc_code_p1_max };\n    //\n    // for (int i = 0; i < 2; ++i) {\n    //   int32_t d = max_code[i] - min_code[i];\n    //   if (d > 3700) {\n    //     int32_t scale = (32768 * 4106) / d;\n    //     int32_t offset = -(min_code[i] * scale >> 12) - 40;\n    //     data_.parameter_cv_offset[i] = offset;\n    //     data_.parameter_cv_scale[i] = scale;\n    //   }\n    // }\n    Save();\n  }\n  \n  inline int32_t adc_to_pitch(int32_t pitch_adc_code) const {\n    if (data_.pitch_range == PITCH_RANGE_EXTERNAL ||\n        data_.pitch_range == PITCH_RANGE_LFO) {\n      pitch_adc_code = pitch_adc_code * data_.pitch_cv_scale >> 12;\n      pitch_adc_code += data_.pitch_cv_offset;\n    } else if (data_.pitch_range == PITCH_RANGE_FREE) {\n      pitch_adc_code = (pitch_adc_code - 1638);\n      pitch_adc_code = pitch_adc_code * data_.pitch_cv_scale >> 12;\n      pitch_adc_code += 60 << 7;\n    } else if (data_.pitch_range == PITCH_RANGE_440) {\n      pitch_adc_code = 69 << 7;\n    } else {\n      pitch_adc_code = (pitch_adc_code - 1638) * 9 >> 1;\n      pitch_adc_code += 60 << 7;\n    }\n    return pitch_adc_code;\n  }\n  \n  inline int32_t pitch_transposition() const {\n    int32_t t = data_.pitch_range == PITCH_RANGE_LFO ? (unsigned)-36 << 7 : 0;\n    t += (static_cast<int32_t>(data_.pitch_octave) - 2) * 12 * 128;\n    return t;\n  }\n  \n  inline int32_t adc_to_fm(int32_t fm_adc_code) const {\n    fm_adc_code -= data_.fm_cv_offset;\n    fm_adc_code = fm_adc_code * 7680 >> 12;\n    if (data_.pitch_range == PITCH_RANGE_440) {\n      fm_adc_code = 0;\n    }\n    return fm_adc_code;\n  }\n  \n  inline int32_t adc_to_parameter(int index, int32_t adc_code) const {\n    int32_t scale = static_cast<int32_t>(data_.parameter_cv_scale[index]);\n    int32_t offset = static_cast<int32_t>(data_.parameter_cv_offset[index]);\n    return (scale * adc_code >> 12) + offset;\n  }\n\n  inline bool paques() const {\n    return paques_;\n  }\n  \n  static const SettingMetadata& metadata(Setting setting) {\n    return metadata_[setting];\n  }\n\n  static const Setting& setting_at_index(int16_t index) {\n    return settings_order_[index];\n  }\n  \n private:\n  void CheckPaques();\n\n  SettingsData data_;\n  \n  uint16_t version_token_;\n  bool paques_;\n  \n  static const SettingMetadata metadata_[SETTING_LAST];\n  static const Setting settings_order_[SETTING_LAST];\n\n  DISALLOW_COPY_AND_ASSIGN(Settings);\n};\n\nextern Settings settings;\n\n}  // namespace braids\n\n#endif  // BRAIDS_SETTINGS_H_\n"
  },
  {
    "path": "lib/braids/svf.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SVF used for modeling the bridged T-networks.\n\n#ifndef BRAIDS_SVF_H_\n#define BRAIDS_SVF_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"braids/resources.h\"\n#include \"stmlib/utils/dsp.h\"\n\nnamespace braids {\n\nenum SvfMode {\n  SVF_MODE_LP,\n  SVF_MODE_BP,\n  SVF_MODE_HP\n};\n\nclass Svf {\n public:\n  Svf() { }\n  ~Svf() { }\n  \n  void Init() {\n    lp_ = 0;\n    bp_ = 0;\n    frequency_ = 33 << 7;\n    resonance_ = 16384;\n    dirty_ = true;\n    punch_ = 0;\n    mode_ = SVF_MODE_BP;\n  }\n  \n  void set_frequency(int16_t frequency) {\n    dirty_ = dirty_ || (frequency_ != frequency);\n    frequency_ = frequency;\n  }\n  \n  void set_resonance(int16_t resonance) {\n    resonance_ = resonance;\n    dirty_ = true;\n  }\n  \n  void set_punch(uint16_t punch) {\n    punch_ = (static_cast<uint32_t>(punch) * punch) >> 24;\n  }\n  \n  void set_mode(SvfMode mode) {\n    mode_ = mode;\n  }\n\n  inline int32_t Process(int32_t in) {\n    if (dirty_) {\n      f_ = stmlib::Interpolate824(lut_svf_cutoff, frequency_ << 17);\n      damp_ = stmlib::Interpolate824(lut_svf_damp, resonance_ << 17);\n      dirty_ = false;\n    }\n    int32_t f = f_;\n    int32_t damp = damp_;\n    if (punch_) {\n      int32_t punch_signal = lp_ > 4096 ? lp_ : 2048;\n      f += ((punch_signal >> 4) * punch_) >> 9;\n      damp += ((punch_signal - 2048) >> 3);\n    }\n    int32_t notch = in - (bp_ * damp >> 15);\n    lp_ += f * bp_ >> 15;\n    CLIP(lp_)\n    int32_t hp = notch - lp_;\n    bp_ += f * hp >> 15;\n    CLIP(bp_)\n    return mode_ == SVF_MODE_BP ? bp_ : (mode_ == SVF_MODE_HP ? hp : lp_);\n  }\n  \n private:\n  bool dirty_;\n  \n  int16_t frequency_;\n  int16_t resonance_;\n  \n  int32_t punch_;\n  int32_t f_;\n  int32_t damp_;\n\n  int32_t lp_;\n  int32_t bp_;\n  \n  SvfMode mode_;\n\n  DISALLOW_COPY_AND_ASSIGN(Svf);\n};\n\n}  // namespace braids\n\n#endif  // BRAIDS_SVF_H_\n"
  },
  {
    "path": "lib/braids/vco_jitter_source.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A noise source used to add jitter to the VCO.\n\n#ifndef BRAIDS_VCO_JITTER_SOURCE_H_\n#define BRAIDS_VCO_JITTER_SOURCE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n\n#include \"braids/resources.h\"\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace braids {\n\nusing namespace stmlib;\n\nclass VcoJitterSource {\n public:\n  VcoJitterSource() { }\n  ~VcoJitterSource() { }\n  \n  inline void Init() {\n    external_temperature_ = 0;\n    room_temperature_ = 0;\n    phase_ = 0;\n    phase_step_ = 0;\n  }\n  \n  inline int16_t Render(int32_t intensity) {\n    // External temperature change, with 1-order filtering.\n    uint16_t external_temperature_toss = Random::GetWord();\n    if (external_temperature_toss == 0) {\n      phase_step_ = phase_step_ * 1664525L + 1013904223L;\n      phase_ += (phase_step_ >> 16) * (phase_step_ >> 16);\n      external_temperature_ = wav_sine[phase_ >> 24] << 8;\n    }\n    room_temperature_ += (external_temperature_ - room_temperature_) >> 16;\n    int32_t pitch_noise = room_temperature_ * intensity >> 19;\n    return pitch_noise;\n  }\n  \n private:\n  uint32_t phase_step_;\n  uint32_t phase_;\n  int32_t external_temperature_;\n  int32_t room_temperature_;\n   \n  DISALLOW_COPY_AND_ASSIGN(VcoJitterSource);\n};\n\n}  // namespace braids\n\n#endif // BRAIDS_VCO_JITTER_SOURCE_H_\n"
  },
  {
    "path": "lib/claps/cp808.h",
    "content": "const uint8_t FLASHMEM cp808_raw[] = {\n  0xb9, 0xff, 0xb5, 0xff, 0x05, 0x00, 0x05, 0x00, 0x88, 0x00, 0x15, 0x00,\n  0xc6, 0x01, 0x9e, 0xff, 0xe4, 0x17, 0xfa, 0x2e, 0xb8, 0x35, 0x8b, 0x36,\n  0x19, 0x1c, 0xa2, 0x01, 0x5d, 0xed, 0x17, 0xe3, 0xea, 0xe7, 0x43, 0xd3,\n  0x24, 0xcf, 0x2e, 0xdf, 0x26, 0xf7, 0x24, 0xfe, 0x25, 0x02, 0x01, 0x02,\n  0xdf, 0xe9, 0x59, 0xe2, 0x10, 0xc6, 0x10, 0xd9, 0x1a, 0x07, 0x21, 0x08,\n  0xa2, 0x19, 0xb2, 0x25, 0xee, 0x16, 0xa7, 0x09, 0x01, 0xfd, 0x67, 0xea,\n  0x35, 0xf1, 0xac, 0xff, 0x21, 0xf5, 0x13, 0xe7, 0x9e, 0xda, 0x77, 0xf3,\n  0x62, 0x15, 0xea, 0x1a, 0x31, 0x25, 0x9c, 0x25, 0xa4, 0x20, 0x03, 0x30,\n  0x3c, 0x38, 0x20, 0x49, 0x3f, 0x38, 0x76, 0x20, 0x74, 0x22, 0x05, 0x27,\n  0x9f, 0x1a, 0x24, 0xfe, 0xad, 0xe5, 0x77, 0xd3, 0x6a, 0xdb, 0xf8, 0xe3,\n  0xe6, 0xf4, 0x9c, 0xec, 0x5f, 0xe0, 0xe4, 0xe7, 0x3e, 0xe9, 0xc7, 0xe3,\n  0x66, 0xdd, 0x84, 0xf2, 0x99, 0x00, 0x8b, 0x07, 0xe7, 0x0b, 0xa4, 0xfc,\n  0x83, 0xee, 0x20, 0xe9, 0x44, 0xf0, 0xf9, 0xf8, 0x59, 0xf5, 0x09, 0xef,\n  0xc3, 0xf5, 0xb6, 0xfc, 0x5d, 0xf8, 0x0f, 0xf6, 0x13, 0x02, 0xda, 0x09,\n  0x27, 0x12, 0x37, 0x19, 0xbe, 0x20, 0x20, 0x2e, 0x3b, 0x38, 0x50, 0x37,\n  0x08, 0x36, 0x3d, 0x36, 0x20, 0x29, 0xe5, 0x18, 0x67, 0x0b, 0xb1, 0x06,\n  0x47, 0xfd, 0xa4, 0xf5, 0x8a, 0xeb, 0xe1, 0xdd, 0x6c, 0xd4, 0x0e, 0xce,\n  0x69, 0xc4, 0xd4, 0xbf, 0xd7, 0xd1, 0x90, 0xdb, 0x41, 0xe3, 0x92, 0xf4,\n  0xaf, 0x03, 0x7a, 0x05, 0x8f, 0x06, 0xf0, 0x07, 0x12, 0x05, 0x5b, 0x08,\n  0xcf, 0x10, 0x3c, 0x15, 0x98, 0x0b, 0xeb, 0x02, 0x76, 0xfd, 0xe7, 0xf9,\n  0x6a, 0xfd, 0xad, 0x05, 0xef, 0x06, 0xe4, 0x0a, 0xa3, 0x0e, 0xfb, 0x0e,\n  0x0a, 0x13, 0x0f, 0x0d, 0x2f, 0x08, 0x20, 0x05, 0x2c, 0x07, 0xf3, 0x0b,\n  0x18, 0x0c, 0xbf, 0x0e, 0x16, 0x0b, 0xa4, 0x07, 0x93, 0x07, 0x60, 0xff,\n  0x9b, 0x00, 0xde, 0xf3, 0xdb, 0xea, 0x61, 0xec, 0x59, 0xe9, 0x80, 0xea,\n  0xeb, 0xe7, 0x77, 0xe2, 0x46, 0xe0, 0xdb, 0xe4, 0xa4, 0xec, 0x6f, 0xea,\n  0xcb, 0xe6, 0x25, 0xeb, 0x8b, 0xef, 0x6a, 0xfc, 0x62, 0x04, 0x6f, 0x01,\n  0x7b, 0x00, 0x77, 0xff, 0x76, 0x0a, 0x92, 0x0d, 0x60, 0x10, 0xf1, 0x14,\n  0x30, 0x18, 0xed, 0x15, 0xed, 0x0c, 0xa8, 0x0c, 0x64, 0x0f, 0x3a, 0x0e,\n  0x05, 0x0c, 0x22, 0x10, 0x52, 0x15, 0xb3, 0x19, 0x19, 0x12, 0xc8, 0x05,\n  0xd8, 0xfc, 0x5a, 0xf5, 0xdf, 0xf6, 0x0e, 0xf7, 0xdf, 0xf2, 0x15, 0xf0,\n  0x30, 0xf6, 0xfc, 0xf9, 0x2b, 0x00, 0x47, 0x05, 0xe7, 0x07, 0x8d, 0x08,\n  0x42, 0x07, 0xec, 0x06, 0xf5, 0x01, 0xd5, 0xfd, 0xb7, 0xfa, 0x95, 0xf9,\n  0x8b, 0xf6, 0xa6, 0xf4, 0x66, 0xf2, 0xfb, 0xed, 0x86, 0xee, 0x54, 0xf1,\n  0x39, 0xf2, 0xd2, 0xf3, 0x4b, 0xfc, 0x88, 0x03, 0x1a, 0x06, 0x38, 0x05,\n  0xe7, 0x05, 0x4a, 0x06, 0x99, 0x06, 0x57, 0x07, 0x93, 0x03, 0xcf, 0x01,\n  0xc3, 0x04, 0xac, 0x03, 0xd6, 0x01, 0xe0, 0x02, 0x36, 0x02, 0xed, 0xfe,\n  0x2b, 0xfa, 0x48, 0xf8, 0x52, 0xfc, 0xdc, 0x00, 0xd6, 0xfd, 0x96, 0xfb,\n  0x98, 0xfc, 0x38, 0xff, 0x8d, 0x02, 0x3e, 0x07, 0xd2, 0x0a, 0xdd, 0x08,\n  0xb6, 0x08, 0xbe, 0x06, 0x99, 0x04, 0xb6, 0x01, 0x49, 0x00, 0xbd, 0x03,\n  0x26, 0x04, 0x81, 0x01, 0x91, 0xfe, 0xf6, 0xf6, 0x5f, 0xf2, 0x57, 0xf4,\n  0x26, 0xf6, 0x97, 0xf6, 0xa8, 0xf7, 0xb6, 0xf8, 0x59, 0xfe, 0xd8, 0x00,\n  0x54, 0x01, 0x1d, 0x03, 0xe8, 0x02, 0xd0, 0x02, 0xb9, 0x00, 0xb3, 0xfd,\n  0x2c, 0xf9, 0x64, 0xf8, 0xd3, 0xf8, 0x4d, 0xfc, 0xdf, 0x00, 0x54, 0x03,\n  0xc0, 0x03, 0x63, 0x04, 0x55, 0x09, 0xf4, 0x07, 0xc9, 0x04, 0x15, 0x02,\n  0x2c, 0xff, 0x29, 0xfc, 0x4c, 0xfb, 0x1a, 0xf9, 0xfa, 0xfb, 0x13, 0x01,\n  0x84, 0x03, 0x8d, 0x07, 0x3c, 0x08, 0xf1, 0x04, 0x59, 0x03, 0x84, 0x02,\n  0x16, 0x00, 0x55, 0xff, 0x6d, 0x01, 0x97, 0x04, 0x52, 0x06, 0x51, 0x07,\n  0x95, 0x05, 0x48, 0x02, 0xed, 0x01, 0x33, 0x02, 0x76, 0x00, 0xa9, 0xfc,\n  0x54, 0xfa, 0xb3, 0xf9, 0x08, 0xfa, 0x2f, 0xf9, 0xfa, 0xf6, 0x21, 0xf6,\n  0xd6, 0xf5, 0xc8, 0xf7, 0x22, 0xf9, 0x9c, 0xfb, 0xd2, 0xfc, 0xbb, 0xfa,\n  0xf2, 0xf9, 0x57, 0xfb, 0x9d, 0xfe, 0x38, 0x00, 0x2a, 0x00, 0xc3, 0x01,\n  0xf6, 0x03, 0xf6, 0x04, 0x23, 0x05, 0x1f, 0x05, 0xa3, 0x02, 0x26, 0x01,\n  0x09, 0x04, 0x75, 0x06, 0xff, 0x06, 0x5e, 0x07, 0xf5, 0x04, 0xfe, 0x02,\n  0x9c, 0x02, 0x21, 0x03, 0x0a, 0x03, 0x6b, 0x02, 0xcd, 0x01, 0x0e, 0xfe,\n  0xc9, 0xfb, 0xa3, 0xfb, 0x72, 0xfd, 0x69, 0x00, 0xcd, 0x00, 0x2c, 0x03,\n  0x3f, 0x05, 0x78, 0x02, 0x98, 0x01, 0x2e, 0x01, 0xec, 0x00, 0x75, 0x00,\n  0x8f, 0xff, 0x9c, 0xfd, 0x8a, 0xfb, 0xd4, 0xfb, 0x9c, 0xfb, 0x99, 0xfc,\n  0x63, 0xfc, 0xb0, 0xfb, 0x51, 0xfd, 0xd5, 0xfe, 0x66, 0xff, 0xe3, 0xff,\n  0x77, 0x00, 0x0d, 0x01, 0x28, 0x00, 0x19, 0xfe, 0xb4, 0xfc, 0xa1, 0xfa,\n  0x40, 0xfa, 0x33, 0xfa, 0x52, 0xfa, 0x4b, 0xfb, 0xad, 0xfd, 0xfd, 0xfe,\n  0x2f, 0xff, 0x43, 0x01, 0x6f, 0x02, 0x65, 0x03, 0x6c, 0x03, 0xca, 0x03,\n  0x08, 0x04, 0xa4, 0x03, 0xdf, 0x02, 0xa6, 0x01, 0x1f, 0x02, 0x47, 0x02,\n  0xd6, 0x00, 0xa8, 0xff, 0x99, 0xff, 0x45, 0x00, 0x6d, 0x01, 0xef, 0x01,\n  0x30, 0x00, 0x9e, 0xff, 0xfe, 0xff, 0xb6, 0xff, 0xc2, 0xff, 0x2f, 0x00,\n  0x5d, 0x00, 0xe0, 0xff, 0x66, 0xfe, 0x3a, 0xfd, 0xb3, 0xfd, 0x2d, 0xfe,\n  0xdb, 0xfe, 0x00, 0x00, 0x28, 0x01, 0x2a, 0x01, 0x2c, 0x01, 0xcc, 0x01,\n  0x32, 0x02, 0x7d, 0x01, 0x6a, 0x00, 0x93, 0xff, 0x1b, 0x00, 0xc2, 0xff,\n  0xf7, 0xfe, 0x4d, 0xff, 0x4e, 0xff, 0x20, 0xff, 0x25, 0xfe, 0x29, 0xfe,\n  0x56, 0xfe, 0xe6, 0xfd, 0x4d, 0xfe, 0x84, 0xfe, 0xe8, 0xfe, 0x63, 0xff,\n  0x77, 0xff, 0x1d, 0xff, 0x50, 0xff, 0x11, 0x00, 0xe5, 0x00, 0x29, 0x02,\n  0xbb, 0x01, 0x35, 0x00, 0xfc, 0xfe, 0xb2, 0xff, 0x44, 0x00, 0x14, 0x01,\n  0x39, 0x01, 0x65, 0x00, 0xf7, 0x00, 0x22, 0x01, 0x17, 0x01, 0x7e, 0x01,\n  0xa5, 0x01, 0xa5, 0x01, 0x38, 0x01, 0x3a, 0x00, 0x1f, 0x00, 0x1e, 0x00,\n  0xc7, 0xfe, 0x52, 0xfe, 0x3d, 0xfe, 0xce, 0xfd, 0xbe, 0xfd, 0x81, 0xfd,\n  0x1a, 0xfd, 0x66, 0xfd, 0x87, 0xfe, 0x65, 0xff, 0x79, 0x00, 0x22, 0x02,\n  0xc6, 0x02, 0x65, 0x03, 0x5b, 0x03, 0x69, 0x02, 0x78, 0x01, 0xc8, 0x00,\n  0x1c, 0x00, 0xa6, 0xff, 0x0e, 0xff, 0xb1, 0xfe, 0xfe, 0xfe, 0x6d, 0xff,\n  0xf2, 0xfe, 0x12, 0xfe, 0x4b, 0xfe, 0x01, 0xff, 0xb1, 0xff, 0x3e, 0x00,\n  0x76, 0x00, 0x23, 0x00, 0x64, 0xff, 0x01, 0xff, 0x83, 0xff, 0x0f, 0x00,\n  0x92, 0xff, 0x34, 0xff, 0xea, 0xff, 0x08, 0x00, 0x47, 0x00, 0xb2, 0x00,\n  0xcb, 0x00, 0xa0, 0x00, 0x16, 0x00, 0x09, 0xff, 0xc9, 0xff, 0xc5, 0xf9,\n  0xdb, 0xfe, 0x34, 0x03, 0x0b, 0xee, 0xe0, 0xf7, 0x9d, 0x10, 0xa9, 0x0b,\n  0x5a, 0x11, 0xd8, 0x35, 0xe5, 0x55, 0xd5, 0x3b, 0x50, 0x0c, 0xb6, 0x01,\n  0xd7, 0xf9, 0xb4, 0xe9, 0x72, 0xe6, 0x61, 0xe4, 0x99, 0xea, 0xd0, 0x02,\n  0x33, 0x14, 0x74, 0xf8, 0x0a, 0xdc, 0x13, 0xd3, 0xa8, 0xd4, 0xce, 0xe4,\n  0x25, 0xe7, 0x9b, 0xd5, 0x73, 0xd3, 0xce, 0xd8, 0x7d, 0xdb, 0xbf, 0xe5,\n  0xc5, 0xfc, 0xb4, 0x1b, 0x4e, 0x32, 0x86, 0x3d, 0xd4, 0x38, 0xfa, 0x19,\n  0x62, 0x0e, 0xfa, 0x10, 0x3c, 0x1a, 0xe1, 0x20, 0xfb, 0x1d, 0xa2, 0x18,\n  0x57, 0x10, 0xf8, 0x20, 0x7c, 0x3d, 0x5e, 0x3a, 0xa2, 0x2a, 0x5f, 0x29,\n  0x29, 0x26, 0xee, 0x11, 0xc7, 0x03, 0x1c, 0xfb, 0xda, 0xe5, 0x25, 0xde,\n  0x77, 0xcf, 0xea, 0xca, 0x0a, 0xbc, 0xb4, 0xbd, 0x51, 0xbb, 0x9c, 0x9d,\n  0x2d, 0x95, 0xea, 0xa1, 0xc4, 0xb5, 0x76, 0xc6, 0x45, 0xe4, 0x3d, 0xe7,\n  0x4e, 0xf0, 0xa9, 0x01, 0xde, 0x11, 0x1d, 0x27, 0xd5, 0x21, 0x72, 0x1f,\n  0x92, 0x29, 0xe5, 0x29, 0xf9, 0x27, 0x88, 0x24, 0x09, 0x17, 0xd8, 0x1b,\n  0x76, 0x1d, 0x00, 0x09, 0xab, 0x10, 0x48, 0x26, 0xdb, 0x2f, 0x33, 0x3b,\n  0x75, 0x37, 0xb0, 0x28, 0x1c, 0x1a, 0x22, 0x15, 0xbf, 0x1a, 0x8a, 0x18,\n  0x23, 0x11, 0x8b, 0x0f, 0x9f, 0x00, 0x72, 0xec, 0x32, 0xed, 0x1d, 0xee,\n  0xa3, 0xde, 0x26, 0xdd, 0x12, 0xe4, 0x43, 0xe7, 0x8f, 0xe1, 0x4f, 0xde,\n  0xfe, 0xdb, 0x4b, 0xe8, 0xb3, 0xf1, 0x48, 0xed, 0x4c, 0xe8, 0xd8, 0xef,\n  0x4f, 0xf1, 0x07, 0xf2, 0x07, 0xf1, 0x1d, 0xe8, 0xc0, 0xe4, 0x71, 0xe6,\n  0xc8, 0xe7, 0xc9, 0xe9, 0x0c, 0xfb, 0x02, 0x12, 0xea, 0x23, 0xe1, 0x24,\n  0xc5, 0x22, 0x8f, 0x1f, 0xe2, 0x21, 0x5b, 0x2e, 0x61, 0x35, 0xae, 0x27,\n  0x53, 0x15, 0xe2, 0x00, 0xd5, 0xf8, 0x84, 0xfd, 0x64, 0x07, 0x81, 0x04,\n  0x90, 0xf4, 0x37, 0xed, 0xe4, 0xef, 0xb8, 0xed, 0xfd, 0xef, 0xae, 0xf4,\n  0x07, 0xf0, 0x9e, 0xed, 0xea, 0xe8, 0x79, 0xea, 0xb2, 0xe0, 0xce, 0xd5,\n  0xd6, 0xe2, 0xf4, 0xed, 0x6d, 0xf6, 0x43, 0xfd, 0x27, 0x07, 0x78, 0x14,\n  0x51, 0x13, 0x7f, 0x08, 0x13, 0xfe, 0x7a, 0x04, 0xcd, 0x00, 0x04, 0xfc,\n  0x81, 0x0c, 0xcc, 0x17, 0x79, 0x19, 0x77, 0x16, 0x07, 0x1c, 0xb5, 0x1b,\n  0x48, 0x0f, 0xc1, 0x08, 0x82, 0x0a, 0x4c, 0x0f, 0x23, 0x17, 0x5a, 0x1b,\n  0x18, 0x22, 0x96, 0x1a, 0xb0, 0x0b, 0xcc, 0x01, 0xb9, 0x03, 0x6f, 0x09,\n  0x1f, 0x06, 0xa0, 0xfa, 0xb5, 0xf2, 0xde, 0xf1, 0x7e, 0xe5, 0x65, 0xde,\n  0xad, 0xda, 0xb5, 0xd9, 0xc5, 0xd8, 0xe7, 0xda, 0x08, 0xde, 0xab, 0xe6,\n  0x88, 0xea, 0xa9, 0xed, 0xd8, 0xf9, 0xb1, 0xff, 0xe4, 0xff, 0xbb, 0x02,\n  0xc7, 0x03, 0xca, 0x07, 0x42, 0x0b, 0xc0, 0x0b, 0xa8, 0x10, 0xd6, 0x11,\n  0x12, 0x14, 0xa2, 0x14, 0x68, 0x10, 0x14, 0x10, 0x1b, 0x11, 0xfe, 0x09,\n  0x7e, 0x05, 0x25, 0xfc, 0xf1, 0xf3, 0x91, 0xfa, 0x5d, 0xfc, 0xc4, 0xfc,\n  0x34, 0x02, 0xac, 0x04, 0xf3, 0x03, 0x7c, 0x03, 0x13, 0x00, 0x45, 0xfd,\n  0xa4, 0xfa, 0xe4, 0xfd, 0x3b, 0x00, 0xa5, 0xf5, 0x1f, 0xef, 0x92, 0xef,\n  0xe9, 0xf0, 0x3e, 0xf3, 0x0c, 0xff, 0x1e, 0x09, 0xa6, 0x08, 0xaf, 0x03,\n  0xec, 0xfc, 0xc6, 0xfc, 0xeb, 0xf9, 0x80, 0xf7, 0xbc, 0xf5, 0x84, 0xfb,\n  0xbf, 0x04, 0xfa, 0x0a, 0xfe, 0x0d, 0x96, 0x0d, 0xfb, 0x0c, 0x14, 0x0d,\n  0x2f, 0x10, 0xf1, 0x11, 0x27, 0x12, 0xf8, 0x0f, 0x1e, 0x0a, 0x6a, 0xff,\n  0xb1, 0xfa, 0xf2, 0xfa, 0xcd, 0xfb, 0xf3, 0xfb, 0x30, 0xfd, 0xa1, 0xfb,\n  0xed, 0xf6, 0xbc, 0xf6, 0x50, 0xf6, 0x92, 0xf4, 0xc3, 0xf2, 0xa5, 0xf6,\n  0x68, 0xf8, 0x3d, 0xfa, 0xae, 0xfa, 0x20, 0xfb, 0xf3, 0xfd, 0xf5, 0xf9,\n  0xda, 0xf8, 0x6d, 0xfa, 0x40, 0xfe, 0x8c, 0x04, 0xf2, 0x07, 0xc1, 0x0b,\n  0x71, 0x0b, 0x52, 0x0a, 0xdf, 0x07, 0x47, 0x06, 0x7b, 0x04, 0xe2, 0xfe,\n  0x84, 0xfc, 0x4c, 0xfc, 0x17, 0x00, 0x81, 0x00, 0xb5, 0x01, 0x70, 0x02,\n  0x27, 0x05, 0x94, 0x09, 0xd6, 0x0a, 0xc8, 0x09, 0xe2, 0x07, 0x01, 0x05,\n  0x86, 0xfe, 0x0f, 0xfa, 0x83, 0xf9, 0x6a, 0xfb, 0x82, 0xfa, 0x8e, 0xf8,\n  0xaa, 0xf7, 0x94, 0xf6, 0x44, 0xf7, 0x6a, 0xf6, 0x1a, 0xf4, 0x59, 0xf1,\n  0x44, 0xf4, 0x3f, 0xfb, 0xd0, 0xfe, 0xdd, 0x00, 0xd7, 0x02, 0xb4, 0x03,\n  0xe6, 0x06, 0xd5, 0x07, 0x76, 0x06, 0x4e, 0x06, 0x4a, 0x04, 0x50, 0x02,\n  0x07, 0xff, 0x41, 0xfe, 0xb9, 0xff, 0xea, 0xfe, 0x7f, 0xfe, 0x4e, 0xfe,\n  0x46, 0xfc, 0x66, 0xfb, 0x5c, 0xfc, 0x82, 0xfe, 0xc1, 0x01, 0xca, 0x02,\n  0xca, 0x01, 0x82, 0x01, 0xd0, 0x02, 0x89, 0x05, 0xce, 0x04, 0x1e, 0x01,\n  0xe8, 0xfd, 0xf8, 0xfe, 0x90, 0x00, 0xb3, 0x00, 0x7d, 0x02, 0x4a, 0x03,\n  0x41, 0x02, 0x77, 0x00, 0x7b, 0xfe, 0x32, 0xfd, 0x4d, 0xfe, 0xd1, 0x01,\n  0x2e, 0x03, 0x0c, 0x04, 0xff, 0x04, 0x78, 0x06, 0x2f, 0x06, 0xa2, 0x02,\n  0x7a, 0x00, 0xc5, 0xfe, 0x56, 0xfc, 0x04, 0xfc, 0x60, 0xfb, 0x39, 0xfc,\n  0x02, 0xfe, 0x49, 0xfe, 0xd3, 0xfd, 0xc6, 0xfe, 0x81, 0xfe, 0xd9, 0xfd,\n  0x25, 0xff, 0xfb, 0xfd, 0x5d, 0xfd, 0x16, 0xfc, 0x44, 0xfd, 0x54, 0xfd,\n  0xe2, 0xfd, 0x27, 0xff, 0x3d, 0xfe, 0x89, 0xfe, 0x24, 0xff, 0xb9, 0xff,\n  0xe4, 0xff, 0xb0, 0x00, 0xa3, 0x01, 0x16, 0x02, 0x0e, 0x03, 0x9b, 0x03,\n  0xc2, 0x03, 0x7b, 0x01, 0x1f, 0x01, 0x63, 0x01, 0x4a, 0xff, 0xab, 0xff,\n  0x64, 0x00, 0x39, 0x00, 0x5a, 0xfe, 0x3c, 0xfd, 0x14, 0xfd, 0x61, 0xfc,\n  0x4c, 0xfd, 0x16, 0xff, 0xc0, 0x00, 0x3c, 0x01, 0x70, 0x00, 0x7f, 0xff,\n  0x4b, 0x00, 0x7e, 0x01, 0xd8, 0x01, 0xd9, 0x01, 0xb0, 0x00, 0x82, 0x00,\n  0xcc, 0x00, 0x7d, 0xff, 0x6e, 0xfe, 0x17, 0xfe, 0xe3, 0xfd, 0x36, 0xfd,\n  0x57, 0xfd, 0x5b, 0xff, 0x41, 0x00, 0x89, 0xff, 0xe7, 0xff, 0xc3, 0x01,\n  0x0c, 0x04, 0xdf, 0x04, 0x42, 0x03, 0x0d, 0x03, 0x00, 0x04, 0xc7, 0x04,\n  0x9d, 0x03, 0x30, 0x02, 0xeb, 0x01, 0x8d, 0x01, 0x1f, 0x01, 0x60, 0x01,\n  0x31, 0x01, 0x0f, 0x01, 0xa5, 0x00, 0x19, 0xff, 0xab, 0xfd, 0x7f, 0xfd,\n  0x3a, 0xfd, 0xde, 0xfc, 0x25, 0xfd, 0x4d, 0xfd, 0x53, 0xfc, 0x90, 0xfc,\n  0x3f, 0xfc, 0x76, 0xfb, 0x63, 0xfb, 0x50, 0xfb, 0xf6, 0xfb, 0xc3, 0xfc,\n  0x6d, 0xfc, 0x0e, 0xfe, 0xeb, 0x00, 0x5f, 0x02, 0xac, 0x03, 0xc9, 0x03,\n  0xca, 0x03, 0x3f, 0x04, 0xd4, 0x04, 0x9e, 0x04, 0x53, 0x03, 0xf3, 0x01,\n  0x48, 0x01, 0x4a, 0x00, 0x9e, 0xff, 0x96, 0xff, 0x5e, 0xff, 0x1d, 0xff,\n  0x5b, 0xff, 0x64, 0x00, 0xb6, 0x00, 0x35, 0x00, 0xba, 0xff, 0xb9, 0xff,\n  0xec, 0xff, 0x0d, 0x00, 0xaf, 0xfe, 0x5b, 0xfd, 0x5e, 0xfd, 0xbe, 0xfd,\n  0xb8, 0xfe, 0xc2, 0xff, 0x3e, 0x00, 0x30, 0x00, 0x82, 0xff, 0xa7, 0xff,\n  0x9e, 0x00, 0x8d, 0x01, 0x4f, 0x01, 0x6b, 0x01, 0xe3, 0x00, 0xc7, 0xff,\n  0x00, 0x00, 0x4f, 0xff, 0x89, 0xfe, 0x5d, 0xfe, 0x9c, 0xfe, 0x63, 0xff,\n  0x46, 0x00, 0xee, 0x00, 0x4f, 0x01, 0x51, 0x01, 0x5e, 0x01, 0x26, 0x02,\n  0xf2, 0x01, 0xea, 0x00, 0xb7, 0x00, 0x4f, 0x00, 0x66, 0x00, 0x3f, 0x00,\n  0x66, 0xff, 0xa6, 0xfe, 0x54, 0xfd, 0x2d, 0xfd, 0x69, 0xfe, 0x28, 0xff,\n  0x57, 0xff, 0xbe, 0xff, 0xbc, 0xff, 0xea, 0xff, 0x36, 0xff, 0xc8, 0xfe,\n  0x6f, 0xfe, 0xf6, 0xfe, 0xf5, 0xff, 0x36, 0x00, 0xc4, 0xff, 0x87, 0xff,\n  0xb8, 0x00, 0xa3, 0x01, 0x1b, 0x02, 0x5e, 0x02, 0xd3, 0x01, 0xf4, 0x00,\n  0x7f, 0x00, 0xfc, 0xff, 0xdb, 0xff, 0x98, 0x00, 0xb2, 0x00, 0x2c, 0x00,\n  0x6f, 0xff, 0xbe, 0xff, 0xa4, 0xff, 0x60, 0x00, 0x27, 0xff, 0x68, 0xff,\n  0x4b, 0xfe, 0x54, 0xff, 0x09, 0xfe, 0x32, 0x01, 0x48, 0xf6, 0x57, 0xe7,\n  0x06, 0xf3, 0xf8, 0x02, 0x7a, 0x2f, 0x68, 0x29, 0xcf, 0x25, 0x70, 0x2d,\n  0x1e, 0x13, 0x87, 0x02, 0x84, 0xec, 0x5b, 0xf3, 0x70, 0xf8, 0xda, 0xd7,\n  0x7f, 0xd1, 0x9f, 0xce, 0x99, 0xce, 0xbc, 0xe2, 0xb4, 0x06, 0x46, 0x08,\n  0xe7, 0xfa, 0xde, 0xed, 0xfa, 0xe1, 0xf2, 0xe0, 0x7a, 0xdd, 0xbf, 0xcc,\n  0x48, 0xd6, 0xdd, 0x00, 0x75, 0x01, 0x75, 0x04, 0xe5, 0x0c, 0x1b, 0x14,\n  0xe9, 0x26, 0xe3, 0x40, 0x40, 0x4d, 0xe5, 0x35, 0x8e, 0x2b, 0x43, 0x34,\n  0x19, 0x3a, 0x77, 0x40, 0x60, 0x40, 0x3e, 0x3d, 0xb0, 0x2a, 0x5b, 0x11,\n  0xe3, 0xfa, 0x68, 0xee, 0x05, 0xeb, 0xac, 0xe7, 0xb1, 0xdc, 0x4b, 0xc7,\n  0xdf, 0xc8, 0x88, 0xdb, 0xb1, 0xe7, 0x3a, 0xee, 0x8c, 0xf3, 0x83, 0xf7,\n  0x06, 0x0c, 0xd0, 0x12, 0x6f, 0x05, 0x69, 0x01, 0xa1, 0xed, 0x28, 0xe7,\n  0x50, 0xf9, 0x8b, 0xef, 0x62, 0xe7, 0x38, 0xf4, 0x6e, 0x07, 0xf4, 0x15,\n  0x71, 0x1a, 0x79, 0x20, 0x92, 0x26, 0xad, 0x21, 0xc9, 0x1d, 0xe9, 0x0a,\n  0xc1, 0xe7, 0x34, 0xec, 0x0d, 0xf1, 0x74, 0xec, 0x05, 0xdf, 0x7c, 0xce,\n  0x38, 0xc3, 0xe1, 0xb1, 0xb7, 0xb8, 0xc6, 0xc6, 0x9e, 0xd7, 0xb1, 0xea,\n  0x12, 0x00, 0xbd, 0x0d, 0xac, 0x10, 0x48, 0x2c, 0x46, 0x4b, 0x45, 0x49,\n  0x26, 0x3a, 0x96, 0x2c, 0x5f, 0x2b, 0xcf, 0x30, 0x12, 0x35, 0x8d, 0x2d,\n  0x7d, 0x20, 0xdf, 0x1a, 0x6f, 0x0e, 0xc0, 0x02, 0x78, 0xf7, 0x1e, 0xec,\n  0x3f, 0xda, 0x71, 0xd3, 0x6b, 0xd2, 0x99, 0xcf, 0x05, 0xd0, 0x87, 0xcc,\n  0xeb, 0xcc, 0x04, 0xdb, 0xea, 0xe0, 0xa4, 0xef, 0xca, 0x06, 0x29, 0x18,\n  0x94, 0x21, 0x89, 0x17, 0x86, 0x0f, 0xab, 0x10, 0x6e, 0x12, 0x02, 0x05,\n  0xef, 0xf6, 0xea, 0xf5, 0x32, 0xfe, 0xa3, 0xff, 0x3a, 0xf6, 0xdb, 0xf8,\n  0x13, 0xfd, 0xf1, 0x04, 0xae, 0x11, 0x64, 0x10, 0xff, 0x15, 0x98, 0x0a,\n  0x9a, 0x00, 0xa1, 0xf7, 0xd6, 0xf3, 0xfe, 0xf9, 0x59, 0xf9, 0xfe, 0xfe,\n  0xce, 0x02, 0x48, 0x07, 0x29, 0x0a, 0x96, 0x03, 0x49, 0xff, 0xb5, 0xfb,\n  0x5d, 0xf7, 0xb1, 0xe3, 0x8e, 0xe1, 0xfd, 0xee, 0xf8, 0xf9, 0x59, 0xfc,\n  0xc9, 0x03, 0xa9, 0x0d, 0x2b, 0x1b, 0x3e, 0x21, 0x3a, 0x1b, 0x30, 0x1c,\n  0xca, 0x21, 0x4e, 0x23, 0xec, 0x17, 0xec, 0x0c, 0xab, 0x02, 0x0a, 0x0b,\n  0x57, 0x0a, 0x1c, 0xfc, 0xb3, 0xf4, 0xe4, 0xf0, 0x75, 0xef, 0x08, 0xea,\n  0x66, 0xe6, 0x4c, 0xeb, 0x07, 0xf7, 0xf2, 0x03, 0x73, 0x03, 0xfd, 0x00,\n  0x5e, 0x00, 0xfe, 0x01, 0x6d, 0x04, 0xc8, 0xff, 0x26, 0xfe, 0x8a, 0x01,\n  0x86, 0x02, 0xc0, 0x01, 0xe4, 0xff, 0x53, 0xf6, 0xfa, 0xf0, 0x5d, 0xf0,\n  0x84, 0xf2, 0x3e, 0xf6, 0x23, 0xf4, 0x05, 0xf1, 0x2f, 0xed, 0xc1, 0xeb,\n  0x10, 0xed, 0x1f, 0xee, 0x28, 0xf9, 0x43, 0x01, 0xd4, 0x06, 0x4d, 0x07,\n  0x64, 0x0a, 0xc4, 0x13, 0x6a, 0x1a, 0x42, 0x17, 0x10, 0x0f, 0xba, 0x0f,\n  0x00, 0x0b, 0x04, 0x04, 0xb9, 0x02, 0x11, 0x03, 0x2a, 0x0b, 0x20, 0x0d,\n  0x30, 0x03, 0x29, 0x02, 0x65, 0x05, 0xa6, 0x0a, 0x9a, 0x0a, 0xaa, 0x09,\n  0x7b, 0x05, 0x32, 0xfd, 0xc4, 0xf5, 0x6f, 0xf3, 0x3c, 0xef, 0xc8, 0xe8,\n  0xc9, 0xe7, 0x9d, 0xeb, 0xa5, 0xf0, 0xff, 0xf0, 0x94, 0xf7, 0xb2, 0xfc,\n  0x97, 0xff, 0x64, 0x00, 0x1f, 0xff, 0x3c, 0xfd, 0x7d, 0xfd, 0x56, 0x06,\n  0xfd, 0x09, 0x6d, 0x06, 0x27, 0x01, 0xd3, 0x01, 0xaf, 0x00, 0xeb, 0xff,\n  0x22, 0x00, 0xb4, 0xfe, 0xb5, 0xfb, 0xeb, 0xfc, 0x5e, 0x03, 0xdb, 0x05,\n  0x09, 0x04, 0x3e, 0x04, 0x5e, 0x07, 0x2d, 0x07, 0x21, 0x05, 0xd2, 0x03,\n  0x8a, 0x02, 0x7d, 0x02, 0xf9, 0x05, 0x6f, 0x0a, 0x3b, 0x0f, 0xfc, 0x13,\n  0x80, 0x11, 0x23, 0x0a, 0x19, 0x05, 0xa5, 0xfe, 0xfb, 0xfb, 0xca, 0xfb,\n  0x00, 0xf7, 0x71, 0xf3, 0xff, 0xef, 0x77, 0xee, 0x9b, 0xf2, 0x58, 0xf1,\n  0x54, 0xf0, 0x5b, 0xf3, 0x2b, 0xf5, 0xae, 0xf6, 0xa7, 0xfa, 0x3c, 0xfc,\n  0x38, 0xfd, 0xab, 0xfd, 0xb6, 0xf5, 0x9f, 0xf5, 0x96, 0xf9, 0xe0, 0xfa,\n  0xad, 0xff, 0xc3, 0x07, 0xf9, 0x0c, 0xff, 0x08, 0xaf, 0x07, 0x82, 0x07,\n  0xfb, 0x08, 0x49, 0x0a, 0x8b, 0x0a, 0xd3, 0x09, 0xc3, 0x08, 0x86, 0x0a,\n  0x89, 0x0d, 0xff, 0x0e, 0x08, 0x0c, 0x17, 0x06, 0x9f, 0x00, 0xb6, 0xff,\n  0x5f, 0xfe, 0xb5, 0xfe, 0x6c, 0xfe, 0x53, 0xfc, 0xfe, 0xf8, 0x08, 0xf8,\n  0xda, 0xf7, 0x5d, 0xf8, 0x64, 0xf9, 0xeb, 0xf9, 0x6b, 0xf8, 0x12, 0xf8,\n  0x7a, 0xfa, 0x80, 0xfa, 0xa7, 0xfa, 0x71, 0xfd, 0xc9, 0x00, 0xa8, 0x05,\n  0x69, 0x08, 0x3b, 0x04, 0x43, 0xfd, 0x28, 0xfc, 0xb3, 0x00, 0x3c, 0x02,\n  0x7e, 0x02, 0x8e, 0x00, 0x0b, 0x00, 0x4c, 0x02, 0x23, 0x01, 0x5a, 0x05,\n  0x88, 0x10, 0x53, 0x15, 0xd0, 0x17, 0xe1, 0x38, 0x53, 0x3e, 0x12, 0x2b,\n  0x61, 0x3c, 0x89, 0x3a, 0x2f, 0x30, 0x10, 0x06, 0xd7, 0xec, 0x55, 0xde,\n  0x7e, 0xc2, 0xd9, 0xb8, 0x3b, 0x9d, 0x73, 0x9f, 0x31, 0xba, 0x3b, 0xe9,\n  0xaa, 0x01, 0xb7, 0x04, 0xef, 0xfe, 0x37, 0x0b, 0x22, 0x12, 0xaf, 0x07,\n  0x7a, 0x03, 0x21, 0xe0, 0xc2, 0xe2, 0xfc, 0xf7, 0x36, 0xf1, 0x69, 0xe3,\n  0x74, 0xd3, 0x42, 0xc2, 0xb4, 0xd7, 0x36, 0x01, 0x8e, 0x33, 0x8d, 0x3d,\n  0x1b, 0x1e, 0x66, 0x1c, 0xd7, 0x25, 0xf1, 0x21, 0x9a, 0x21, 0xb2, 0x23,\n  0xa2, 0x0f, 0xa3, 0x04, 0xca, 0x09, 0xcc, 0x0c, 0xd0, 0x08, 0x74, 0xfa,\n  0xee, 0x01, 0xc3, 0x19, 0x3c, 0x37, 0xc2, 0x33, 0x92, 0x27, 0x7b, 0x23,\n  0x52, 0xfd, 0xb2, 0xdb, 0x6c, 0xcd, 0xb9, 0xd5, 0x90, 0xdf, 0xe5, 0xd4,\n  0x5b, 0xd4, 0x51, 0xe0, 0xc9, 0x0f, 0x68, 0x34, 0x13, 0x32, 0x81, 0x2d,\n  0x6f, 0x27, 0x33, 0x1c, 0xbd, 0x06, 0x7e, 0x05, 0x9e, 0x10, 0xfb, 0x07,\n  0xe3, 0xea, 0x87, 0xd7, 0xf9, 0xbd, 0xe6, 0xba, 0xb2, 0xcc, 0xc1, 0xe4,\n  0xf8, 0x04, 0xd2, 0x08, 0x24, 0xf8, 0x7e, 0xfd, 0xf3, 0xfc, 0x5a, 0x0c,\n  0x8e, 0x11, 0x2a, 0x04, 0x55, 0xf5, 0x93, 0x07, 0x6d, 0x16, 0x11, 0x12,\n  0x9f, 0x01, 0x57, 0xff, 0x0f, 0xf6, 0x61, 0xf0, 0x9b, 0xee, 0x14, 0xfe,\n  0x2e, 0x08, 0x6f, 0x12, 0xbb, 0x08, 0xa5, 0xe6, 0x29, 0xde, 0x8c, 0xdd,\n  0x5e, 0xd4, 0xa2, 0xdd, 0x6b, 0xf4, 0x82, 0x01, 0xf9, 0x10, 0x7e, 0x0c,\n  0x3b, 0x0a, 0x0f, 0x05, 0x0a, 0x12, 0x7e, 0x1c, 0x76, 0x16, 0x46, 0x1c,\n  0x80, 0x0b, 0x6d, 0x15, 0xdf, 0x1d, 0xe9, 0x05, 0xb6, 0xe9, 0xf6, 0xd6,\n  0x42, 0xe8, 0xff, 0x00, 0x28, 0x0c, 0xf6, 0xf6, 0xd1, 0xe2, 0x9f, 0xea,\n  0x16, 0x05, 0x6a, 0x15, 0x1a, 0x2d, 0x49, 0x23, 0x31, 0x0c, 0x17, 0x1e,\n  0xfc, 0x34, 0xaa, 0x2f, 0x4a, 0x0d, 0x23, 0xf1, 0xf9, 0xe1, 0x22, 0xec,\n  0xb8, 0xfb, 0xd0, 0xe1, 0xa5, 0xcb, 0xbd, 0xd3, 0x37, 0xdd, 0x34, 0xf1,\n  0x2e, 0x10, 0x1f, 0x1c, 0x5d, 0x14, 0xc9, 0x0a, 0xf0, 0x04, 0x77, 0xf7,\n  0xbe, 0xf6, 0x30, 0x06, 0xc8, 0x04, 0xbc, 0xf6, 0x62, 0xe9, 0x23, 0xed,\n  0xd7, 0xf9, 0x57, 0x09, 0xe1, 0x07, 0x62, 0x0b, 0xc9, 0x23, 0xec, 0x36,\n  0xc6, 0x38, 0xb8, 0x23, 0xaa, 0x20, 0xc6, 0x27, 0x42, 0x2c, 0x36, 0x36,\n  0xa2, 0x2c, 0x6d, 0x12, 0x4c, 0xf3, 0x70, 0xcf, 0xc6, 0xae, 0xc4, 0x9e,\n  0x55, 0xa4, 0xf0, 0xbe, 0x8e, 0xc6, 0xd9, 0xbf, 0x2e, 0xcd, 0x5a, 0xe6,\n  0x83, 0xe5, 0x83, 0xfc, 0xe8, 0x03, 0x56, 0x02, 0x4f, 0x12, 0xa3, 0x05,\n  0x7d, 0x06, 0x31, 0x21, 0x29, 0x26, 0xb4, 0x34, 0xb7, 0x41, 0x0f, 0x28,\n  0x44, 0x24, 0x40, 0x20, 0x21, 0x10, 0x64, 0x11, 0x3e, 0x18, 0x83, 0x1b,\n  0x07, 0x1e, 0xc4, 0x22, 0xa9, 0x17, 0xdb, 0x05, 0x42, 0xf4, 0x60, 0xdc,\n  0x66, 0xda, 0x9d, 0xe2, 0x38, 0xd9, 0x81, 0xdc, 0x3f, 0xda, 0xf0, 0xe2,\n  0xb3, 0xfa, 0xbb, 0x0a, 0xab, 0xff, 0x19, 0xd8, 0x15, 0xed, 0x84, 0x0b,\n  0x89, 0x0b, 0xdc, 0x09, 0x0d, 0x00, 0xd4, 0x00, 0x6e, 0x02, 0xf9, 0xfe,\n  0x27, 0xf0, 0xbe, 0xef, 0xac, 0x00, 0xf5, 0x1f, 0xaf, 0x32, 0xa3, 0x26,\n  0x3e, 0x10, 0x3a, 0x0b, 0xe4, 0x19, 0x9f, 0x18, 0xc7, 0x13, 0x82, 0xfe,\n  0x83, 0xdd, 0xa8, 0xce, 0x91, 0xc9, 0xf9, 0xb9, 0x99, 0xad, 0x51, 0xb6,\n  0xa0, 0xb1, 0xa4, 0xbe, 0x9e, 0xcd, 0xc6, 0xd0, 0x09, 0xf1, 0xd0, 0x1f,\n  0x71, 0x38, 0x71, 0x1a, 0x68, 0x01, 0x23, 0x08, 0x17, 0x18, 0x33, 0x27,\n  0x36, 0x44, 0x59, 0x62, 0x15, 0x72, 0x0c, 0x65, 0x89, 0x54, 0x5f, 0x46,\n  0x43, 0x37, 0x5f, 0x34, 0xfe, 0x3b, 0xfd, 0x38, 0x85, 0x30, 0x87, 0x19,\n  0x68, 0xfd, 0x27, 0xe2, 0xc8, 0xd0, 0xaf, 0xcb, 0x45, 0xb9, 0x7c, 0xb4,\n  0xc2, 0xbc, 0x94, 0xc8, 0x31, 0xd7, 0x98, 0xe2, 0x59, 0xf1, 0x8c, 0x0b,\n  0xdd, 0x0d, 0x30, 0x04, 0x2c, 0xea, 0x55, 0xd4, 0x69, 0xc8, 0x1b, 0xc6,\n  0x9b, 0xda, 0xe3, 0xe3, 0xc0, 0xe9, 0x86, 0xef, 0xc2, 0xe5, 0x35, 0xe8,\n  0xdd, 0xea, 0xdf, 0xf2, 0xbc, 0x05, 0xe6, 0x18, 0x35, 0x1d, 0xb0, 0x2e,\n  0xcd, 0x3c, 0x75, 0x41, 0x9f, 0x2e, 0xca, 0x13, 0xc3, 0x03, 0x4e, 0xf6,\n  0xd9, 0x01, 0x8e, 0x05, 0x9f, 0x08, 0xb7, 0x0e, 0x1c, 0x22, 0x5b, 0x26,\n  0x51, 0x22, 0x05, 0x1c, 0x49, 0x0c, 0x76, 0xf8, 0xfb, 0xf2, 0x1a, 0xfb,\n  0x3b, 0xfb, 0x97, 0xf8, 0xf5, 0xf4, 0x68, 0xe5, 0xb0, 0xe9, 0x18, 0xe6,\n  0x9e, 0xdc, 0x5d, 0xe2, 0x64, 0xe8, 0xe2, 0xe3, 0x76, 0xe4, 0x0b, 0xea,\n  0xfa, 0xf6, 0xe5, 0x00, 0x25, 0x05, 0x3c, 0x06, 0x22, 0x0b, 0xd6, 0x1c,\n  0x92, 0x22, 0x51, 0x22, 0x2f, 0x30, 0x0c, 0x34, 0x8b, 0x24, 0x38, 0x20,\n  0x80, 0x26, 0x54, 0x14, 0xa6, 0xfc, 0x5a, 0xed, 0xa0, 0xef, 0x8f, 0xea,\n  0xcf, 0xe4, 0x95, 0xe6, 0xed, 0xef, 0x3e, 0xeb, 0x1b, 0xd9, 0xeb, 0xe2,\n  0x90, 0xd7, 0x74, 0xd4, 0x2e, 0xcd, 0x38, 0xc4, 0x5a, 0xd5, 0x1f, 0xd9,\n  0x0f, 0xd1, 0x6d, 0xcc, 0x0e, 0xd6, 0x58, 0xed, 0x2a, 0x06, 0xad, 0x1a,\n  0xb4, 0x2f, 0x6d, 0x3f, 0xdc, 0x48, 0xd8, 0x54, 0xa3, 0x63, 0x21, 0x63,\n  0x27, 0x4d, 0x9f, 0x31, 0x7a, 0x21, 0xfd, 0x0a, 0xd8, 0xf8, 0x71, 0x05,\n  0x59, 0x27, 0x15, 0x36, 0xd2, 0x32, 0x5f, 0x2c, 0x40, 0x11, 0x58, 0xfe,\n  0x9a, 0xf6, 0xe1, 0x01, 0xd3, 0x16, 0x05, 0x0f, 0x27, 0x00, 0xac, 0xe9,\n  0xa3, 0xdf, 0x3b, 0xd0, 0x52, 0xbb, 0x50, 0xb6, 0x9c, 0xbd, 0x03, 0xb7,\n  0xd4, 0xb3, 0xf0, 0xc5, 0xaa, 0xc9, 0x30, 0xd0, 0xa2, 0xe2, 0xb5, 0xf6,\n  0x6f, 0xf3, 0xcc, 0xe6, 0xb4, 0xe6, 0x83, 0xed, 0xc7, 0xf9, 0x2d, 0x01,\n  0x1c, 0x05, 0x59, 0x08, 0x1e, 0x11, 0x82, 0x21, 0x27, 0x28, 0x1d, 0x13,\n  0xd7, 0xfa, 0xb9, 0x00, 0xa8, 0x03, 0x6d, 0xee, 0x58, 0xf1, 0x60, 0x05,\n  0xc6, 0x13, 0xb4, 0x21, 0x90, 0x31, 0x04, 0x48, 0x42, 0x44, 0x0a, 0x3b,\n  0xca, 0x43, 0xd5, 0x3d, 0x78, 0x3c, 0x89, 0x42, 0x0a, 0x3a, 0xe8, 0x22,\n  0x65, 0x19, 0xff, 0x13, 0x20, 0xf3, 0x72, 0xe8, 0xf7, 0xd9, 0xef, 0xcd,\n  0x30, 0xdb, 0x76, 0xd5, 0xa3, 0xc9, 0x80, 0xc9, 0x7f, 0xc8, 0xbc, 0xb5,\n  0xb6, 0xb2, 0x5d, 0xc0, 0xdc, 0xdb, 0x8b, 0xfb, 0xbf, 0x00, 0xee, 0xec,\n  0x5c, 0xe6, 0xed, 0xf6, 0xee, 0x0d, 0x02, 0x16, 0xf2, 0x1f, 0xfc, 0x1d,\n  0x75, 0x13, 0x58, 0x15, 0x00, 0x22, 0x49, 0x2f, 0x03, 0x40, 0x41, 0x3c,\n  0x26, 0x25, 0xc9, 0x24, 0x09, 0x24, 0x87, 0x12, 0xf8, 0x04, 0xb8, 0xf7,\n  0x92, 0xe9, 0x4e, 0xd6, 0x7c, 0xd4, 0x48, 0xe3, 0xc8, 0xec, 0x7d, 0xeb,\n  0xe4, 0xee, 0x76, 0xf4, 0xaa, 0xfa, 0x5f, 0x03, 0x6a, 0x03, 0x1f, 0x05,\n  0x8f, 0x01, 0x30, 0xfb, 0x56, 0xf6, 0x4a, 0xfa, 0x73, 0x03, 0x56, 0x01,\n  0x6b, 0xfb, 0x91, 0xf5, 0xd5, 0xec, 0x3c, 0xe9, 0xd0, 0xdd, 0xa3, 0xe5,\n  0x53, 0x02, 0x94, 0x11, 0x3f, 0x1a, 0xfe, 0x0c, 0xb9, 0x02, 0xd7, 0x0e,\n  0x1c, 0x0b, 0x46, 0x0a, 0x5c, 0x00, 0x6a, 0xec, 0x87, 0xe9, 0x68, 0xec,\n  0xa9, 0xed, 0xb1, 0xee, 0x73, 0xfe, 0xc4, 0x0f, 0x51, 0x15, 0xc3, 0x16,\n  0x09, 0x0b, 0x75, 0x0f, 0xa6, 0x1c, 0x13, 0x2f, 0x79, 0x3e, 0x28, 0x39,\n  0x87, 0x2a, 0x79, 0x16, 0x93, 0xfd, 0x5f, 0xdc, 0x37, 0xd6, 0x73, 0xdb,\n  0x07, 0xe7, 0x26, 0xed, 0x88, 0xe9, 0xeb, 0xdd, 0xbf, 0xdb, 0xc6, 0xe0,\n  0x36, 0xf0, 0xe0, 0x09, 0xa8, 0x12, 0xa1, 0x10, 0xad, 0x0c, 0x4f, 0x10,\n  0x39, 0x1a, 0xda, 0x26, 0xe0, 0x27, 0xf3, 0x1f, 0xdd, 0x16, 0x2b, 0x05,\n  0x48, 0xf8, 0x31, 0xef, 0xed, 0xeb, 0x47, 0xf8, 0x59, 0x02, 0xe0, 0x06,\n  0xbf, 0xfa, 0x3e, 0x01, 0xe9, 0x0d, 0xfc, 0x0c, 0x9b, 0x09, 0x8f, 0x0c,\n  0x3f, 0x09, 0xea, 0xfd, 0xf6, 0xf9, 0x72, 0xf8, 0x9c, 0xf5, 0xe8, 0xec,\n  0xf6, 0xf4, 0x09, 0x0a, 0xd8, 0xfe, 0xd8, 0xef, 0x28, 0xe2, 0x7b, 0xd5,\n  0x52, 0xd5, 0x09, 0xdf, 0x0b, 0xf8, 0x16, 0x0b, 0x53, 0x25, 0xa2, 0x33,\n  0x80, 0x27, 0xcb, 0x15, 0xfb, 0x0a, 0xda, 0x02, 0x67, 0xf4, 0x1d, 0xe8,\n  0x3e, 0xe9, 0x78, 0xf4, 0xc3, 0xf5, 0x4c, 0xf4, 0x41, 0xfa, 0xe4, 0xfa,\n  0x5d, 0xef, 0x10, 0xec, 0x7f, 0xf1, 0x7a, 0xf8, 0x79, 0xfd, 0x3d, 0x04,\n  0x7e, 0x04, 0x13, 0xf6, 0x81, 0xf4, 0xc8, 0xf5, 0x17, 0x0f, 0xb6, 0x17,\n  0x7b, 0x0f, 0x30, 0x19, 0x4a, 0x26, 0x1d, 0x30, 0x42, 0x2f, 0x0e, 0x1e,\n  0x6d, 0x08, 0x7b, 0xfb, 0x90, 0xfe, 0x03, 0x06, 0x7c, 0x16, 0x9b, 0x1d,\n  0xe9, 0x11, 0x88, 0x03, 0x53, 0xf7, 0xea, 0xf8, 0x1a, 0x05, 0x51, 0x0c,\n  0x78, 0x03, 0x3c, 0xf8, 0xa5, 0xec, 0x4e, 0xef, 0xb8, 0xf0, 0xc4, 0xeb,\n  0xe0, 0xdf, 0xaa, 0xd4, 0x9d, 0xd9, 0xbd, 0xd5, 0xff, 0xdd, 0x9a, 0xe9,\n  0x4d, 0xed, 0xfa, 0xf1, 0xda, 0xf2, 0xf7, 0xe5, 0x05, 0xec, 0x8b, 0x02,\n  0x9a, 0x11, 0x30, 0x0e, 0x66, 0x08, 0x1e, 0x0f, 0xc6, 0x16, 0x2c, 0x1d,\n  0x8f, 0x1f, 0x42, 0x19, 0x28, 0xfe, 0x02, 0xf0, 0x0a, 0xf4, 0x38, 0xfd,\n  0x24, 0x05, 0x2c, 0x0c, 0x74, 0x0e, 0xf2, 0x14, 0x3d, 0x13, 0xae, 0x12,\n  0xfd, 0x1d, 0x21, 0x1c, 0xec, 0x1b, 0x4b, 0x18, 0xb4, 0x1b, 0xf6, 0x12,\n  0xce, 0x04, 0xde, 0x0a, 0x3e, 0x0e, 0xe6, 0x0e, 0x7f, 0x07, 0x79, 0x04,\n  0x74, 0xf4, 0x1e, 0xec, 0x80, 0xec, 0xcd, 0xe1, 0x06, 0xe5, 0x4f, 0xf2,\n  0x50, 0xf7, 0xc1, 0x00, 0x85, 0xfc, 0x88, 0xec, 0xcf, 0xdd, 0xeb, 0xda,\n  0x5d, 0xe7, 0xbd, 0xf0, 0x14, 0xf0, 0xf5, 0xf9, 0x64, 0x0c, 0x0b, 0x12,\n  0xf1, 0x17, 0x2a, 0x1a, 0x21, 0x0e, 0x4f, 0x09, 0xdc, 0x06, 0xe3, 0xfe,\n  0xfd, 0x07, 0x7e, 0x0d, 0x64, 0x0e, 0xf1, 0x07, 0x0a, 0xff, 0x38, 0xfa,\n  0x58, 0xfe, 0x08, 0xfe, 0xb1, 0xf5, 0x89, 0xf7, 0x19, 0xf8, 0x83, 0xfd,\n  0x68, 0xf7, 0x4b, 0xf6, 0x2d, 0xfe, 0xc9, 0x04, 0x79, 0x0a, 0x52, 0x0e,\n  0xae, 0x08, 0xd4, 0x02, 0xbd, 0xf9, 0x0f, 0xfd, 0x46, 0x0f, 0x4f, 0x19,\n  0xdc, 0x14, 0x90, 0x12, 0xf9, 0x17, 0xf4, 0x16, 0x0b, 0x10, 0xf5, 0x06,\n  0x61, 0xf4, 0x98, 0xe7, 0xcf, 0xe9, 0xe7, 0xe3, 0x87, 0xe2, 0x30, 0xee,\n  0x16, 0xf1, 0x83, 0xed, 0x25, 0xe7, 0x13, 0xdf, 0x2e, 0xd9, 0x5b, 0xda,\n  0x33, 0xec, 0x92, 0xfa, 0x0e, 0x00, 0x35, 0x15, 0x0a, 0x1f, 0x71, 0x24,\n  0x90, 0x1d, 0xd8, 0x1b, 0x02, 0x20, 0xa0, 0x1e, 0xcc, 0x1d, 0x73, 0x19,\n  0x0e, 0x1b, 0x71, 0x12, 0x11, 0x0e, 0xa1, 0x0d, 0x7a, 0xff, 0xef, 0xe9,\n  0x95, 0xd7, 0x50, 0xd6, 0x9b, 0xe1, 0x84, 0xe6, 0x59, 0xee, 0x83, 0xf2,\n  0xe2, 0xed, 0x52, 0xef, 0x9f, 0xed, 0x3f, 0xf8, 0xa3, 0xff, 0x44, 0x03,\n  0xe9, 0x0a, 0xeb, 0x05, 0x07, 0xfc, 0x37, 0xf7, 0x89, 0xff, 0x33, 0x08,\n  0x49, 0x0b, 0x28, 0x0f, 0x39, 0x16, 0x98, 0x13, 0x4a, 0x17, 0xb0, 0x14,\n  0x45, 0x05, 0x3e, 0xfc, 0xb3, 0xfc, 0x70, 0x09, 0x00, 0x14, 0x1b, 0x12,\n  0xbf, 0x12, 0xf4, 0x15, 0x81, 0x20, 0x65, 0x21, 0x97, 0x0e, 0xdd, 0x07,\n  0xfe, 0x0b, 0x96, 0x06, 0xee, 0xef, 0x57, 0xe6, 0x92, 0xdf, 0xfd, 0xd7,\n  0x0f, 0xdc, 0xa5, 0xe8, 0x80, 0xf1, 0x94, 0xee, 0x76, 0xe5, 0xcd, 0xeb,\n  0xcf, 0xfa, 0xac, 0x04, 0x60, 0x02, 0x4b, 0xff, 0xe2, 0x07, 0x77, 0x00,\n  0xe8, 0xf8, 0x93, 0xf6, 0x57, 0xfb, 0x11, 0x06, 0x08, 0x08, 0x95, 0x07,\n  0xa6, 0x0a, 0xf3, 0x08, 0xd7, 0x01, 0x5e, 0xfe, 0xb3, 0xfe, 0x9a, 0xff,\n  0x9d, 0xf9, 0x4d, 0xf6, 0x88, 0x00, 0x48, 0x07, 0xe9, 0x02, 0x51, 0x08,\n  0x63, 0x1a, 0x4d, 0x1a, 0x80, 0x0c, 0x64, 0x04, 0x6d, 0xec, 0xb9, 0xe4,\n  0x8f, 0xf2, 0x7e, 0xfe, 0x99, 0xfc, 0x32, 0x00, 0xba, 0x05, 0x45, 0x0c,\n  0xc0, 0x00, 0x2e, 0xfb, 0xa6, 0xfa, 0x32, 0xfc, 0x3b, 0x03, 0x12, 0x05,\n  0xe0, 0x06, 0xef, 0x07, 0xc3, 0x01, 0x5f, 0xfb, 0xb2, 0xff, 0x4e, 0x00,\n  0x3f, 0xf7, 0x3c, 0xf1, 0xf1, 0xfa, 0x2f, 0x05, 0x2c, 0x0c, 0x5c, 0x12,\n  0xd7, 0x20, 0xfc, 0x26, 0x38, 0x1f, 0x2b, 0x12, 0x97, 0x03, 0x8b, 0xfd,\n  0x8a, 0x02, 0x68, 0xfc, 0x9d, 0xfb, 0x3b, 0xfd, 0x60, 0xf8, 0x15, 0xf2,\n  0x20, 0xe9, 0xae, 0xed, 0xe4, 0xef, 0xa0, 0xed, 0x20, 0xde, 0xb8, 0xe1,\n  0x6c, 0xf2, 0xac, 0xec, 0xa1, 0xed, 0x67, 0xfc, 0x56, 0x0a, 0xf7, 0x07,\n  0xef, 0xfe, 0x5f, 0xfc, 0x7a, 0x06, 0xce, 0x12, 0x37, 0x15, 0xc7, 0x14,\n  0x0f, 0x1d, 0x54, 0x18, 0x90, 0x0f, 0x2b, 0x0e, 0xc6, 0x0c, 0x18, 0x11,\n  0x3c, 0x15, 0xaa, 0x15, 0xdd, 0x14, 0xb7, 0x0e, 0xbe, 0x0c, 0x9d, 0x0b,\n  0x48, 0x06, 0x50, 0xf9, 0x33, 0xee, 0x85, 0xf8, 0x63, 0x07, 0x9e, 0x06,\n  0x7d, 0x07, 0x27, 0x0b, 0xa4, 0xfc, 0x03, 0xfa, 0x0b, 0xf2, 0x9d, 0xe0,\n  0x92, 0xde, 0xd0, 0xdf, 0x71, 0xe1, 0x02, 0xe2, 0x3c, 0xdb, 0xb9, 0xd1,\n  0xe7, 0xcb, 0xa5, 0xd4, 0xad, 0xe3, 0xd1, 0xeb, 0xa6, 0xf4, 0x34, 0xf9,\n  0x4d, 0xfb, 0xd5, 0x08, 0x39, 0x16, 0x37, 0x1a, 0xa7, 0x14, 0x24, 0x13,\n  0x07, 0x13, 0xa6, 0x14, 0xf2, 0x14, 0xdf, 0x12, 0x59, 0x19, 0x86, 0x1e,\n  0xe8, 0x1b, 0x4f, 0x12, 0x16, 0x18, 0xdd, 0x1f, 0xed, 0x1b, 0xab, 0x10,\n  0x63, 0x06, 0xa6, 0xfd, 0x86, 0xfc, 0x9e, 0xf6, 0xdc, 0xed, 0xff, 0xe6,\n  0xc0, 0xe6, 0xdf, 0xe7, 0xbb, 0xe8, 0x3b, 0xef, 0x75, 0xf2, 0xab, 0xff,\n  0x56, 0x0a, 0xc1, 0x08, 0xa7, 0x04, 0x7c, 0x0a, 0xc2, 0x10, 0x62, 0x0e,\n  0xd7, 0xfc, 0xad, 0xef, 0xee, 0xf1, 0x60, 0xe8, 0x2f, 0xe6, 0x16, 0xf3,\n  0xd3, 0xf7, 0x97, 0xf6, 0xaf, 0xf2, 0x1a, 0xf4, 0xe2, 0x02, 0x17, 0x03,\n  0x27, 0xf8, 0xbd, 0xf4, 0x13, 0xf2, 0xd7, 0xf6, 0x45, 0xfc, 0x7a, 0x00,\n  0xd9, 0x07, 0x25, 0x0c, 0x76, 0x0e, 0x2b, 0x11, 0xc4, 0x12, 0x6c, 0x19,\n  0xa5, 0x20, 0x36, 0x20, 0xed, 0x1a, 0xf7, 0x09, 0x57, 0x04, 0xd6, 0x04,\n  0x5d, 0x02, 0x65, 0x08, 0x06, 0x02, 0x32, 0x02, 0x96, 0x02, 0x04, 0xfc,\n  0x85, 0xf8, 0xf3, 0x03, 0x9b, 0x0e, 0xa9, 0x08, 0x36, 0x03, 0x48, 0x09,\n  0x73, 0x0e, 0x73, 0x03, 0x86, 0xf8, 0xf9, 0xed, 0x9c, 0xe1, 0x95, 0xe4,\n  0x7b, 0xf0, 0x15, 0xf8, 0x9c, 0xf6, 0x6a, 0xf6, 0x18, 0xf5, 0x6a, 0xf1,\n  0xf2, 0xf2, 0x5f, 0xef, 0x90, 0xef, 0x0a, 0xf1, 0x29, 0xf1, 0xaf, 0xeb,\n  0xee, 0xef, 0xd1, 0xfa, 0xad, 0x01, 0xeb, 0x06, 0x5d, 0x09, 0x80, 0x0c,\n  0x45, 0x0d, 0x2b, 0x0d, 0x13, 0x12, 0x98, 0x19, 0xc2, 0x1c, 0x03, 0x26,\n  0xf5, 0x22, 0x07, 0x1c, 0xcb, 0x18, 0xdc, 0x0d, 0xac, 0x06, 0x73, 0x09,\n  0x84, 0x04, 0xac, 0xf9, 0x7e, 0xf9, 0xe7, 0xfa, 0x0b, 0xf7, 0x46, 0xed,\n  0xe2, 0xec, 0x96, 0xf3, 0x95, 0xf2, 0x4d, 0xec, 0x70, 0xeb, 0xdb, 0xf0,\n  0x67, 0xf6, 0x1e, 0xf6, 0xfb, 0xec, 0x31, 0xf1, 0x81, 0xf5, 0x91, 0xf0,\n  0x66, 0xf1, 0x64, 0xf3, 0x24, 0xf6, 0xcd, 0xf7, 0x21, 0xfa, 0x0b, 0x03,\n  0xd9, 0x0e, 0x1c, 0x11, 0x92, 0x0e, 0x1b, 0x0d, 0x96, 0xff, 0xe3, 0xf2,\n  0xd4, 0xec, 0x6f, 0xee, 0x01, 0xfb, 0x92, 0x01, 0x86, 0x02, 0x19, 0x02,\n  0xb2, 0x05, 0xa9, 0x0a, 0x18, 0x0f, 0x41, 0x18, 0x8e, 0x1a, 0x8e, 0x1d,\n  0xff, 0x26, 0xf8, 0x26, 0xab, 0x1d, 0x16, 0x16, 0x40, 0x12, 0x2f, 0x09,\n  0x73, 0x07, 0xc5, 0x0c, 0xe6, 0x0b, 0x1f, 0x0b, 0x57, 0x09, 0x5a, 0xff,\n  0x60, 0xfe, 0xf3, 0xf7, 0x0e, 0xee, 0x8b, 0xe5, 0x65, 0xe8, 0xa1, 0xec,\n  0x12, 0xe6, 0x51, 0xe6, 0xe5, 0xe5, 0x62, 0xea, 0x05, 0xef, 0xad, 0xee,\n  0xe6, 0xe7, 0x41, 0xe0, 0xe9, 0xe3, 0x53, 0xe6, 0xa1, 0xe5, 0x62, 0xeb,\n  0xab, 0xf4, 0xcb, 0xf3, 0xdc, 0xee, 0x2b, 0xf6, 0x60, 0xfa, 0x2c, 0xff,\n  0x38, 0x06, 0x8e, 0x0e, 0xe6, 0x14, 0x3c, 0x14, 0x9f, 0x10, 0x63, 0x0d,\n  0x17, 0x15, 0xa9, 0x1b, 0x4c, 0x1c, 0x80, 0x1c, 0x8a, 0x16, 0xc9, 0x0f,\n  0xc9, 0x09, 0xc3, 0x03, 0xb2, 0x03, 0xa9, 0x10, 0x6d, 0x14, 0xa1, 0x15,\n  0x9b, 0x14, 0xc2, 0x09, 0x76, 0x03, 0x0c, 0x05, 0x91, 0x08, 0x02, 0x07,\n  0xdb, 0x01, 0x58, 0xf6, 0x52, 0xf3, 0x74, 0xf6, 0x7d, 0xf3, 0x32, 0xed,\n  0xfe, 0xe9, 0xd3, 0xea, 0x5c, 0xed, 0x89, 0xe9, 0x80, 0xe4, 0x8a, 0xe7,\n  0xf9, 0xe6, 0x84, 0xec, 0x9d, 0xf7, 0xa9, 0x00, 0x22, 0x0b, 0x31, 0x0f,\n  0xa0, 0x08, 0xa5, 0x06, 0x3a, 0x06, 0xde, 0x06, 0x2c, 0x07, 0x54, 0x0b,\n  0x1c, 0x0d, 0x1d, 0x07, 0x5d, 0x00, 0xea, 0xf8, 0xa7, 0xf2, 0x2d, 0xf3,\n  0x99, 0xfc, 0xc9, 0x03, 0xa3, 0x06, 0x72, 0xff, 0x3a, 0xff, 0x6b, 0x07,\n  0x50, 0x0a, 0xa0, 0x01, 0x2b, 0xfc, 0xae, 0xff, 0x28, 0x04, 0x58, 0x02,\n  0x78, 0xfe, 0xb0, 0x05, 0xca, 0x11, 0x97, 0x13, 0x50, 0x0d, 0x97, 0x0c,\n  0x8f, 0x0b, 0x81, 0x08, 0xae, 0x02, 0x20, 0xf7, 0x98, 0xe9, 0xd7, 0xe7,\n  0x62, 0xee, 0x2b, 0xf0, 0x9a, 0xea, 0x9e, 0xe9, 0x42, 0xf1, 0x71, 0xfb,\n  0x18, 0x05, 0x25, 0x04, 0x44, 0xff, 0xab, 0x00, 0xcc, 0x0b, 0xf1, 0x13,\n  0x95, 0x17, 0xf8, 0x15, 0x29, 0x0f, 0xed, 0x05, 0x38, 0xff, 0xe9, 0xff,\n  0x15, 0x09, 0xb4, 0x0b, 0xae, 0x09, 0x13, 0x07, 0x81, 0x04, 0x12, 0x02,\n  0x5f, 0xfc, 0x54, 0xfd, 0x13, 0xf7, 0x34, 0xed, 0x05, 0xec, 0xaf, 0xf3,\n  0xe5, 0xfd, 0x37, 0x00, 0x05, 0xfc, 0x8e, 0xfc, 0xc7, 0xfe, 0xf1, 0xff,\n  0x6d, 0xff, 0x0f, 0xfb, 0x49, 0xee, 0x82, 0xed, 0xe7, 0xf9, 0x7a, 0x02,\n  0x73, 0x05, 0x01, 0x05, 0xb2, 0x08, 0x2a, 0x05, 0x0f, 0x01, 0xd5, 0x03,\n  0x9a, 0x04, 0x13, 0x05, 0x23, 0x05, 0x7a, 0xfe, 0x32, 0xf5, 0xc9, 0xf6,\n  0x23, 0xfb, 0x21, 0xfd, 0x2a, 0xfd, 0xa4, 0xff, 0x22, 0x01, 0x72, 0x00,\n  0xb0, 0x01, 0xe5, 0x00, 0xc0, 0xff, 0x47, 0x00, 0x89, 0x01, 0x5e, 0xfe,\n  0x1c, 0xfb, 0x0d, 0x01, 0x67, 0x04, 0x9e, 0x06, 0x8d, 0x06, 0xb0, 0xff,\n  0x2b, 0xff, 0x9c, 0xf8, 0xac, 0xfb, 0xe2, 0x01, 0x00, 0xfe, 0x58, 0xff,\n  0x44, 0x05, 0xb1, 0x06, 0x0a, 0x08, 0x4c, 0x08, 0xd3, 0x08, 0xef, 0x08,\n  0x92, 0x02, 0xa4, 0xfd, 0x73, 0xf7, 0x58, 0xf3, 0xde, 0xf2, 0xd2, 0xf4,\n  0xdc, 0xf7, 0x0d, 0xfb, 0x19, 0xfa, 0x57, 0xfa, 0x37, 0xfa, 0x5b, 0xf9,\n  0xed, 0xf6, 0x64, 0xf8, 0x91, 0xfc, 0x3c, 0xf8, 0xfc, 0xf7, 0x20, 0xfe,\n  0x98, 0x09, 0x6f, 0x0d, 0xcf, 0x0e, 0x76, 0x10, 0xb4, 0x0c, 0xfd, 0x0d,\n  0x53, 0x13, 0x21, 0x19, 0x26, 0x17, 0x5c, 0x10, 0xea, 0x0a, 0xbe, 0x05,\n  0x9d, 0x03, 0xbc, 0xfd, 0x50, 0xfb, 0x67, 0xfb, 0xf2, 0xfc, 0x7c, 0xfc,\n  0xfb, 0xfc, 0x8f, 0xff, 0x5a, 0xfd, 0xa1, 0xf8, 0x53, 0xfb, 0xf8, 0xff,\n  0xbb, 0xfd, 0x46, 0xf7, 0x26, 0xf0, 0x19, 0xed, 0xa1, 0xec, 0x1b, 0xf0,\n  0xfe, 0xf4, 0xad, 0xf4, 0x5b, 0xf2, 0x8b, 0xf2, 0xb8, 0xf9, 0x2f, 0x00,\n  0xc3, 0xfd, 0x26, 0xf8, 0x81, 0xf6, 0xc1, 0xfa, 0xae, 0xfc, 0x50, 0xfd,\n  0x44, 0x00, 0x3b, 0x06, 0xf0, 0x0c, 0x69, 0x15, 0xbb, 0x13, 0x11, 0x0d,\n  0xa6, 0x11, 0xb6, 0x15, 0xf1, 0x11, 0x3f, 0x0a, 0x9c, 0xfd, 0x9c, 0xf9,\n  0xf2, 0xf9, 0x21, 0xfd, 0x8a, 0xfd, 0x39, 0xf7, 0x6c, 0xf5, 0xd0, 0xfb,\n  0x2a, 0xfd, 0x8e, 0xf8, 0x57, 0xfa, 0xa2, 0xfd, 0xc8, 0xfe, 0xcb, 0x00,\n  0x94, 0x03, 0x13, 0x02, 0x9e, 0xff, 0xef, 0xf8, 0x96, 0xf7, 0xae, 0xfa,\n  0x79, 0xfe, 0xb4, 0xff, 0x99, 0x00, 0xa5, 0x08, 0x26, 0x09, 0x01, 0x05,\n  0x14, 0x02, 0x3b, 0xfc, 0xb2, 0xfa, 0x7e, 0xfc, 0x5f, 0xff, 0xf2, 0x01,\n  0x1d, 0x04, 0x4d, 0x0b, 0x78, 0x10, 0x37, 0x0b, 0xa0, 0x05, 0xeb, 0xfd,\n  0x2e, 0xf9, 0x2c, 0xfa, 0xb6, 0xfa, 0xfd, 0xfa, 0x97, 0xf8, 0xf6, 0xf6,\n  0x09, 0xf7, 0xfe, 0xf6, 0xe5, 0xf3, 0xb0, 0xf5, 0xac, 0xf9, 0x4a, 0xfe,\n  0xdd, 0x01, 0x04, 0x00, 0xfe, 0xfa, 0x11, 0xfc, 0xc3, 0xfe, 0x5b, 0x01,\n  0xed, 0xfe, 0xb6, 0xfd, 0x0d, 0x05, 0x17, 0x05, 0x68, 0xff, 0x8e, 0xfe,\n  0x3c, 0x04, 0x1e, 0x04, 0xbc, 0x03, 0x9a, 0x01, 0xc8, 0xff, 0x04, 0x00,\n  0x13, 0x03, 0x5d, 0x03, 0xb1, 0xff, 0xb9, 0xfd, 0x48, 0xff, 0x14, 0x04,\n  0x23, 0x03, 0xe8, 0x04, 0x27, 0x06, 0x1c, 0x03, 0x06, 0xfe, 0xdd, 0xfe,\n  0xd3, 0x01, 0x06, 0x02, 0xa6, 0x02, 0x08, 0x01, 0xa9, 0x06, 0x10, 0x04,\n  0xdd, 0x00, 0x5d, 0x04, 0xa1, 0x09, 0xf3, 0x0b, 0x4b, 0x0b, 0xc5, 0x05,\n  0xc6, 0xfd, 0xc7, 0xf0, 0x91, 0xeb, 0x83, 0xf0, 0x48, 0xee, 0x6f, 0xea,\n  0xc4, 0xe8, 0x2c, 0xeb, 0x71, 0xf2, 0xc2, 0xf6, 0xbb, 0xf5, 0x2e, 0xfe,\n  0x11, 0x05, 0x5b, 0x0a, 0x07, 0x0f, 0xc9, 0x13, 0xb6, 0x17, 0xaf, 0x14,\n  0x79, 0x10, 0xa3, 0x0d, 0xf0, 0x06, 0x4f, 0x05, 0x27, 0x06, 0xac, 0x03,\n  0x52, 0x03, 0xd1, 0x01, 0x82, 0x00, 0x4f, 0xfe, 0x53, 0xf9, 0x9a, 0xf9,\n  0xec, 0xfe, 0x36, 0xff, 0x2f, 0x00, 0xa5, 0x05, 0xe0, 0x06, 0xea, 0x05,\n  0x77, 0x03, 0x81, 0x00, 0x05, 0xfb, 0x12, 0xf5, 0x9d, 0xf1, 0x9e, 0xf2,\n  0x07, 0xf3, 0xbc, 0xf1, 0x91, 0xf4, 0xcf, 0xf6, 0x8d, 0xf9, 0xfa, 0x00,\n  0xf4, 0x06, 0xcd, 0x06, 0xd5, 0x07, 0x3c, 0x08, 0x5e, 0x05, 0xb4, 0x02,\n  0xfe, 0x01, 0x8c, 0x07, 0xe4, 0x05, 0x89, 0xff, 0xa9, 0xfc, 0xee, 0xfb,\n  0xd8, 0xfa, 0x77, 0xfb, 0xdc, 0xfb, 0x05, 0xfc, 0x2d, 0xfb, 0xcc, 0xfc,\n  0x54, 0xf9, 0x15, 0xf3, 0x91, 0xf5, 0x43, 0xfa, 0xb3, 0xff, 0x74, 0x05,\n  0xef, 0x07, 0xfe, 0x05, 0xf2, 0x01, 0x3e, 0x00, 0xfa, 0x01, 0x51, 0x06,\n  0xc9, 0x08, 0xd3, 0x05, 0x4a, 0x07, 0x32, 0x0a, 0x95, 0x07, 0xc0, 0x02,\n  0x05, 0xfe, 0x28, 0x04, 0x5b, 0x0b, 0x39, 0x0b, 0x2f, 0x07, 0xce, 0x01,\n  0x6a, 0x02, 0xb4, 0x03, 0xda, 0x05, 0x95, 0x01, 0xf7, 0xfd, 0x8e, 0xfb,\n  0x27, 0xf7, 0xd4, 0xf3, 0x45, 0xf5, 0xd4, 0xf5, 0x4b, 0xf6, 0x5b, 0xf8,\n  0x40, 0xf5, 0xb1, 0xf5, 0x69, 0xf3, 0xbd, 0xf0, 0xf6, 0xf0, 0x38, 0xf2,\n  0xc5, 0xef, 0x6f, 0xef, 0x97, 0xf3, 0x6f, 0xf4, 0xfb, 0xf7, 0xff, 0xfb,\n  0x51, 0xfe, 0x7a, 0x00, 0x04, 0x05, 0x2a, 0x0d, 0xc7, 0x0e, 0x32, 0x0b,\n  0x2f, 0x09, 0xf5, 0x0a, 0xea, 0x0d, 0xcf, 0x0c, 0x3d, 0x0f, 0xb8, 0x0b,\n  0x2f, 0x08, 0xeb, 0x08, 0x5f, 0x0c, 0x57, 0x0a, 0xc4, 0x04, 0xeb, 0x08,\n  0x37, 0x08, 0x46, 0x06, 0xa8, 0x05, 0xc6, 0x04, 0x5f, 0x04, 0x60, 0xfe,\n  0x19, 0xf9, 0x15, 0xf7, 0x4b, 0xf8, 0x2b, 0xfa, 0x03, 0xfd, 0x89, 0xfd,\n  0x7f, 0xfa, 0x5b, 0xf9, 0xd6, 0xf5, 0xe8, 0xf1, 0x72, 0xf3, 0xa9, 0xf3,\n  0x89, 0xf4, 0x2d, 0xf9, 0x98, 0xfd, 0xbc, 0xff, 0xb3, 0x01, 0x2e, 0xff,\n  0xe5, 0xfc, 0xb4, 0xfd, 0x79, 0xfa, 0xbf, 0xfb, 0x8d, 0xfd, 0xc7, 0x01,\n  0xd5, 0x09, 0x8f, 0x0d, 0xea, 0x0b, 0x68, 0x0b, 0x60, 0x0b, 0xac, 0x09,\n  0xe1, 0x0c, 0x0d, 0x0f, 0x65, 0x0c, 0x75, 0x0a, 0x9d, 0x06, 0x92, 0x03,\n  0xd6, 0x01, 0x97, 0x00, 0xf5, 0xfe, 0x4b, 0xfa, 0x54, 0xf7, 0x66, 0xfb,\n  0xca, 0xfe, 0x40, 0xfd, 0xd9, 0xfb, 0x40, 0xfa, 0x8c, 0xf5, 0xc6, 0xf4,\n  0x42, 0xf3, 0x48, 0xf2, 0xed, 0xf7, 0x26, 0xfa, 0x0d, 0xf8, 0x66, 0xfb,\n  0x97, 0x00, 0x9c, 0x01, 0x2a, 0x02, 0x37, 0x02, 0xfd, 0xfe, 0xbc, 0xfc,\n  0xd6, 0x00, 0x89, 0x03, 0x71, 0xff, 0x57, 0xfb, 0x2c, 0xfa, 0x66, 0xfb,\n  0xf1, 0xfc, 0x7d, 0xfe, 0x1c, 0x00, 0x2a, 0xff, 0x56, 0x00, 0x36, 0x01,\n  0x68, 0x02, 0x3e, 0x03, 0xfc, 0x01, 0x56, 0xfe, 0x70, 0xf9, 0xb2, 0xfa,\n  0x2c, 0xfd, 0x75, 0xfc, 0x8e, 0xfa, 0xa5, 0xf7, 0xa1, 0xf9, 0x6e, 0x00,\n  0xf1, 0x04, 0xb5, 0x07, 0xcc, 0x05, 0x46, 0x05, 0xb5, 0x03, 0xa5, 0x01,\n  0x8e, 0x04, 0x04, 0x07, 0x4c, 0x07, 0x03, 0x05, 0x54, 0x00, 0x74, 0x00,\n  0x62, 0x05, 0x71, 0x04, 0xaf, 0x03, 0x08, 0x05, 0xc1, 0x08, 0xbe, 0x07,\n  0xeb, 0x00, 0x38, 0xfd, 0x6a, 0xfa, 0x95, 0xfa, 0xb3, 0xfc, 0x75, 0xfd,\n  0xb7, 0xf7, 0x1e, 0xf5, 0x86, 0xf6, 0xee, 0xf8, 0x4e, 0xfc, 0x2d, 0xfe,\n  0xd6, 0xfe, 0xde, 0xfd, 0xf8, 0xfc, 0x36, 0xfe, 0xa0, 0xff, 0x7f, 0x02,\n  0xc9, 0x05, 0x85, 0x05, 0xe9, 0x04, 0xd3, 0x01, 0x5a, 0xfe, 0x43, 0xff,\n  0x04, 0x06, 0x53, 0x0c, 0x6e, 0x0b, 0x19, 0x04, 0xb9, 0x01, 0x02, 0x03,\n  0x95, 0xff, 0x0f, 0xfd, 0x8d, 0xfd, 0x7e, 0xfe, 0x7b, 0xff, 0x91, 0x01,\n  0x10, 0x04, 0xa9, 0x04, 0x12, 0x02, 0xbf, 0xfd, 0xc6, 0xfb, 0x75, 0xf8,\n  0x46, 0xf9, 0x00, 0xfd, 0xc7, 0xfd, 0xc6, 0xfc, 0x9c, 0xfb, 0xcb, 0xfb,\n  0x80, 0xfc, 0xf0, 0xfb, 0xdf, 0xf9, 0xbb, 0xf8, 0xd2, 0xf7, 0x44, 0xf8,\n  0x75, 0xf7, 0xbb, 0xf9, 0x34, 0x00, 0x6d, 0x05, 0x30, 0x04, 0x4d, 0x02,\n  0x93, 0x01, 0xdb, 0xff, 0x4f, 0x01, 0x58, 0xff, 0x65, 0xfe, 0x57, 0x02,\n  0x54, 0x06, 0xb5, 0x09, 0x9a, 0x0a, 0x5a, 0x07, 0x5b, 0x02, 0x42, 0xff,\n  0x80, 0x00, 0x98, 0x04, 0x44, 0x09, 0xd8, 0x07, 0xf8, 0x01, 0xfc, 0xfc,\n  0x80, 0xfc, 0xe4, 0xfc, 0xf8, 0xf7, 0x36, 0xf4, 0x74, 0xf4, 0x77, 0xf9,\n  0x25, 0xfd, 0x18, 0xff, 0x80, 0x02, 0xa8, 0x02, 0x6f, 0x01, 0xd3, 0xfe,\n  0xbf, 0xfd, 0x75, 0xfd, 0x06, 0xfd, 0xbf, 0xfe, 0x4f, 0x01, 0x5c, 0xfe,\n  0xb1, 0xf7, 0x38, 0xf7, 0x40, 0xfd, 0x8b, 0xfc, 0xc9, 0xf9, 0x2b, 0xfc,\n  0xfe, 0x02, 0x14, 0x09, 0xde, 0x09, 0xd6, 0x0a, 0x15, 0x0a, 0x24, 0x07,\n  0x7e, 0x03, 0x40, 0x03, 0xb0, 0x05, 0xa4, 0x0c, 0x83, 0x0e, 0x50, 0x0e,\n  0x10, 0x0f, 0x18, 0x0b, 0x47, 0x08, 0x53, 0x06, 0x63, 0x03, 0x65, 0xfe,\n  0x12, 0xf9, 0xa8, 0xf6, 0x82, 0xf4, 0xad, 0xf2, 0x25, 0xef, 0x98, 0xed,\n  0x15, 0xed, 0xda, 0xec, 0x61, 0xf2, 0xa5, 0xf5, 0x1b, 0xfa, 0xf8, 0xfc,\n  0xf0, 0xfb, 0x13, 0xf8, 0x9a, 0xf5, 0x42, 0xf5, 0xb8, 0xf8, 0x20, 0xfb,\n  0x14, 0xfd, 0xf7, 0x00, 0x50, 0x03, 0x2d, 0x07, 0x4c, 0x0c, 0x42, 0x10,\n  0x41, 0x12, 0x77, 0x11, 0x3d, 0x10, 0x39, 0x11, 0x4b, 0x10, 0x64, 0x0d,\n  0x84, 0x08, 0xa0, 0x05, 0xa5, 0x05, 0x3c, 0x05, 0x4b, 0x05, 0x6f, 0x07,\n  0xb8, 0x05, 0x25, 0x01, 0x83, 0xff, 0x99, 0xfe, 0x0c, 0xfc, 0x1b, 0xfb,\n  0x5a, 0xfa, 0xf6, 0xf5, 0x1e, 0xf2, 0xfb, 0xf3, 0x32, 0xf9, 0x6d, 0xfe,\n  0xb1, 0xff, 0xde, 0xfb, 0x7a, 0xf7, 0xe5, 0xf4, 0xfc, 0xf3, 0xa0, 0xf3,\n  0x58, 0xf7, 0x6a, 0xfb, 0xf9, 0xfb, 0x7d, 0xfc, 0x4a, 0xfe, 0xcb, 0xfc,\n  0x83, 0xfb, 0x2b, 0xfe, 0xba, 0xff, 0x99, 0x04, 0xe4, 0x05, 0xc1, 0x04,\n  0x2d, 0x03, 0xf8, 0x02, 0xfe, 0x05, 0xa5, 0x04, 0xe7, 0x03, 0xf1, 0x03,\n  0x60, 0x04, 0x86, 0x03, 0xf6, 0x03, 0x0b, 0x06, 0xd3, 0x02, 0xc6, 0xfb,\n  0x35, 0xf7, 0xa1, 0xf6, 0x04, 0xf5, 0x8a, 0xf4, 0xbb, 0xf4, 0x27, 0xf5,\n  0x50, 0xf4, 0x51, 0xf5, 0xa3, 0xf5, 0x82, 0xf7, 0x2a, 0xfc, 0x8d, 0xfe,\n  0x14, 0x01, 0x62, 0x03, 0x99, 0x07, 0x94, 0x08, 0x29, 0x08, 0xb0, 0x08,\n  0x33, 0x07, 0x1b, 0x08, 0xcd, 0x08, 0x8d, 0x07, 0x05, 0x07, 0x73, 0x08,\n  0x02, 0x08, 0x1f, 0x08, 0x33, 0x08, 0xb8, 0x05, 0x79, 0x03, 0x4d, 0x01,\n  0xa4, 0xfb, 0xdb, 0xf6, 0x90, 0xf5, 0xd8, 0xf5, 0x92, 0xf9, 0xaf, 0xfc,\n  0x77, 0xfb, 0xb6, 0xfb, 0x34, 0xfc, 0x01, 0xfe, 0xa6, 0x00, 0xe3, 0x00,\n  0xd9, 0xff, 0xd0, 0xfd, 0xf5, 0xfb, 0xa2, 0xfb, 0xf4, 0xfc, 0x5a, 0x00,\n  0xbc, 0x01, 0x11, 0x00, 0x14, 0x02, 0x7a, 0x06, 0x1c, 0x09, 0x83, 0x0a,\n  0x39, 0x0c, 0x30, 0x0b, 0x7a, 0x08, 0x62, 0x08, 0x6b, 0x08, 0xb9, 0x05,\n  0xcb, 0x03, 0xfa, 0x01, 0x5d, 0xfd, 0xe2, 0xf8, 0x9d, 0xf4, 0x4b, 0xf2,\n  0xe6, 0xf4, 0xff, 0xf8, 0x24, 0xf7, 0x03, 0xf6, 0x02, 0xf5, 0x9e, 0xf4,\n  0x89, 0xf7, 0x62, 0xf8, 0x2c, 0xf7, 0x34, 0xf6, 0xd6, 0xf6, 0x0a, 0xfa,\n  0xa7, 0xfd, 0xcd, 0xff, 0xf7, 0x02, 0x10, 0x05, 0x9c, 0x06, 0x5f, 0x09,\n  0x17, 0x0c, 0x1a, 0x0c, 0x2f, 0x0c, 0x56, 0x0f, 0x8f, 0x10, 0xa2, 0x10,\n  0x7c, 0x10, 0xaf, 0x0d, 0x5b, 0x0a, 0xbb, 0x0a, 0xfc, 0x09, 0x42, 0x08,\n  0x0a, 0x05, 0x65, 0x02, 0x80, 0x02, 0xab, 0x01, 0xc5, 0xfe, 0x7e, 0xff,\n  0xfd, 0xff, 0x00, 0xff, 0xae, 0xfc, 0x7b, 0xfa, 0x94, 0xf9, 0xe8, 0xf7,\n  0xc7, 0xf4, 0x52, 0xf2, 0x39, 0xf2, 0x0d, 0xf1, 0xf3, 0xed, 0x27, 0xee,\n  0xeb, 0xf2, 0xc8, 0xf4, 0x18, 0xf3, 0x83, 0xf0, 0x42, 0xf1, 0x59, 0xf1,\n  0xfe, 0xf2, 0x2c, 0xf6, 0xca, 0xfa, 0xa1, 0x00, 0x85, 0x04, 0x14, 0x04,\n  0xa2, 0x06, 0x28, 0x08, 0xb1, 0x05, 0xb2, 0x03, 0x1a, 0x03, 0xa0, 0x06,\n  0xec, 0x06, 0xad, 0x08, 0x21, 0x0b, 0x68, 0x0b, 0x8e, 0x0c, 0x0e, 0x0c,\n  0xa7, 0x08, 0x28, 0x06, 0xaa, 0x05, 0x13, 0x03, 0xe2, 0xff, 0x46, 0xfe,\n  0x90, 0xff, 0x3e, 0x00, 0x1e, 0x01, 0x62, 0x01, 0xf9, 0xfd, 0x59, 0xfb,\n  0xcc, 0xfb, 0x4b, 0xfe, 0x6b, 0x01, 0xf5, 0xff, 0x55, 0xfd, 0x57, 0xff,\n  0x55, 0x02, 0x0b, 0x02, 0x50, 0x00, 0x9f, 0xff, 0x3a, 0xff, 0x43, 0xff,\n  0xb8, 0xfe, 0x49, 0xfd, 0x23, 0xfb, 0xa2, 0xf8, 0x9b, 0xf8, 0x6a, 0xf8,\n  0x0e, 0xf9, 0x19, 0xfd, 0x1b, 0xfe, 0xa4, 0x00, 0x4f, 0x03, 0x32, 0x05,\n  0x4c, 0x05, 0x1c, 0x04, 0x32, 0x05, 0xb1, 0x04, 0xc6, 0x02, 0x57, 0x02,\n  0x10, 0x03, 0xdb, 0x01, 0x39, 0x03, 0xf7, 0x02, 0xea, 0x02, 0x44, 0x04,\n  0x77, 0x02, 0x94, 0xfd, 0x54, 0xf8, 0xef, 0xf6, 0xb5, 0xf4, 0xce, 0xf4,\n  0x4f, 0xf7, 0xca, 0xf6, 0x2f, 0xf6, 0x22, 0xf9, 0xbc, 0xfc, 0x80, 0xfe,\n  0x66, 0x00, 0x56, 0x02, 0x87, 0x00, 0x26, 0xfe, 0xd5, 0xfb, 0x4a, 0xfc,\n  0x33, 0xfc, 0x2b, 0xfb, 0xa6, 0xfc, 0x5d, 0xfe, 0x60, 0xfc, 0xd5, 0xfc,\n  0xcf, 0x00, 0x28, 0x03, 0x46, 0x02, 0x77, 0x03, 0x75, 0x04, 0x82, 0x04,\n  0xab, 0x04, 0x64, 0x03, 0xf4, 0x03, 0xb6, 0x04, 0x42, 0x05, 0xe7, 0x06,\n  0xef, 0x06, 0xe9, 0x06, 0xab, 0x06, 0xdd, 0x06, 0x87, 0x06, 0x02, 0x04,\n  0xfc, 0x02, 0x51, 0x02, 0x32, 0x03, 0x0c, 0x04, 0x63, 0x01, 0x0e, 0x00,\n  0xf1, 0x02, 0x9b, 0x04, 0xec, 0x02, 0x5c, 0x02, 0xd1, 0x01, 0x09, 0x02,\n  0xc9, 0x01, 0x5b, 0xfe, 0xfe, 0xfc, 0x32, 0xfc, 0xca, 0xfa, 0x1e, 0xfa,\n  0xe8, 0xfb, 0xf7, 0xf8, 0xbd, 0xf6, 0x22, 0xf5, 0xe3, 0xf4, 0xac, 0xf4,\n  0x94, 0xf2, 0x76, 0xf3, 0xa6, 0xf3, 0x27, 0xf4, 0x04, 0xf7, 0x25, 0xfa,\n  0xcc, 0xfa, 0x91, 0xfb, 0x4a, 0xfe, 0x62, 0x02, 0xb9, 0x06, 0xea, 0x08,\n  0xa6, 0x0b, 0x98, 0x0d, 0xa1, 0x0d, 0x6f, 0x0e, 0x1c, 0x0e, 0x87, 0x0d,\n  0xa7, 0x0c, 0x35, 0x08, 0x0a, 0x03, 0x61, 0x00, 0xf4, 0xfe, 0x18, 0xfe,\n  0x08, 0xfb, 0x3c, 0xf8, 0xae, 0xf8, 0xac, 0xfb, 0x78, 0xfc, 0x57, 0xfc,\n  0xad, 0xfb, 0xe7, 0xfa, 0x0f, 0xfb, 0x3a, 0xfb, 0x15, 0xfb, 0xbd, 0xf8,\n  0x09, 0xf7, 0x73, 0xf4, 0x63, 0xf4, 0x20, 0xf7, 0xf5, 0xf8, 0x87, 0xfc,\n  0xaa, 0xff, 0x5c, 0x03, 0xcd, 0x06, 0xdd, 0x08, 0x0f, 0x09, 0xba, 0x09,\n  0xa1, 0x0a, 0x9e, 0x0b, 0x02, 0x0b, 0xfe, 0x09, 0x5a, 0x07, 0x7c, 0x04,\n  0x50, 0x05, 0x07, 0x04, 0x77, 0x00, 0x69, 0xff, 0x21, 0x00, 0xd7, 0x01,\n  0x5a, 0x01, 0x4c, 0xff, 0x45, 0xfa, 0x0e, 0xf8, 0x41, 0xfa, 0xf1, 0xfb,\n  0xb5, 0xfd, 0xc1, 0xfd, 0x8e, 0xfd, 0x0c, 0xfe, 0x20, 0xfe, 0x93, 0xfe,\n  0xd1, 0xfe, 0xb9, 0xff, 0x43, 0xfe, 0x80, 0xfc, 0x70, 0xff, 0x52, 0x02,\n  0x17, 0x03, 0xcc, 0x04, 0xbf, 0x07, 0x59, 0x07, 0x8d, 0x05, 0x5c, 0x02,\n  0x5b, 0x00, 0xee, 0x00, 0x46, 0x01, 0x07, 0xff, 0xe9, 0xfa, 0x34, 0xf9,\n  0x54, 0xf8, 0xba, 0xf6, 0x8d, 0xf5, 0x5a, 0xf7, 0x86, 0xf9, 0x62, 0xfc,\n  0xb1, 0xff, 0xbf, 0x00, 0xbe, 0x01, 0x7f, 0x01, 0x62, 0x01, 0x83, 0x02,\n  0x7a, 0x04, 0x7d, 0x03, 0x5b, 0x03, 0xac, 0x04, 0x6c, 0x04, 0xeb, 0x03,\n  0xcd, 0x00, 0x78, 0xfd, 0x7a, 0xfb, 0x22, 0xfb, 0xc9, 0xfa, 0xbf, 0xfa,\n  0x7e, 0xfd, 0xc0, 0xff, 0x62, 0x01, 0xda, 0x02, 0x48, 0x07, 0xcb, 0x08,\n  0x1f, 0x07, 0xac, 0x05, 0xdf, 0x01, 0xde, 0xff, 0xdf, 0xfc, 0x8b, 0xfa,\n  0x10, 0xf9, 0xc6, 0xf8, 0x21, 0xf7, 0x40, 0xf5, 0xcf, 0xf6, 0x89, 0xf7,\n  0x9a, 0xf8, 0xa7, 0xfb, 0x7a, 0xfe, 0x91, 0xfc, 0xf0, 0xfb, 0xde, 0xfd,\n  0xf1, 0xfe, 0xaa, 0xff, 0x00, 0x00, 0xe7, 0xff, 0xde, 0xfd, 0x63, 0xfd,\n  0xd7, 0xfe, 0x4b, 0x02, 0x2c, 0x04, 0x98, 0x03, 0x78, 0x03, 0x37, 0x04,\n  0xf6, 0x06, 0x65, 0x09, 0x5d, 0x09, 0xff, 0x08, 0x20, 0x07, 0x21, 0x06,\n  0xa6, 0x06, 0xd6, 0x07, 0x49, 0x0a, 0x37, 0x0c, 0x2d, 0x0b, 0x41, 0x07,\n  0x99, 0x03, 0x01, 0x01, 0x39, 0x00, 0xa8, 0xfe, 0xe0, 0xfd, 0xeb, 0xfc,\n  0xbe, 0xfa, 0x30, 0xf9, 0xec, 0xf8, 0xd8, 0xf9, 0x67, 0xfb, 0xf4, 0xfb,\n  0x8b, 0xfb, 0x8e, 0xfb, 0xd9, 0xf9, 0xa7, 0xf8, 0x1b, 0xf8, 0x9d, 0xf8,\n  0xcd, 0xf9, 0xe1, 0xfa, 0xe5, 0xfc, 0x26, 0xfd, 0x51, 0xfa, 0x2b, 0xfb,\n  0x5c, 0xfd, 0x48, 0xff, 0xb6, 0x02, 0x28, 0x03, 0x7a, 0x04, 0xa8, 0x04,\n  0xf3, 0x02, 0xf0, 0x00, 0x40, 0x00, 0x78, 0x00, 0x66, 0x01, 0x81, 0x02,\n  0xf9, 0x02, 0x27, 0x03, 0x2d, 0x02, 0x9a, 0x01, 0x43, 0x02, 0xb4, 0x03,\n  0x32, 0x05, 0xaf, 0x05, 0x60, 0x06, 0x14, 0x08, 0xc4, 0x06, 0x47, 0x04,\n  0xc4, 0x01, 0x59, 0x00, 0x2b, 0xfe, 0x99, 0xfb, 0x8f, 0xfb, 0x10, 0xfb,\n  0x4b, 0xfa, 0xff, 0xf9, 0x0d, 0xf9, 0xb2, 0xf6, 0x91, 0xf6, 0x7d, 0xf9,\n  0x00, 0xfa, 0x65, 0xf9, 0x6a, 0xfa, 0x21, 0xfc, 0x0a, 0xfd, 0xf4, 0xfc,\n  0xd6, 0xfe, 0xd8, 0xff, 0x41, 0x01, 0x25, 0x03, 0x3a, 0x04, 0x09, 0x05,\n  0x98, 0x05, 0xb0, 0x05, 0x84, 0x05, 0x5e, 0x04, 0x63, 0x01, 0xf5, 0xfe,\n  0xad, 0xfd, 0x76, 0xfe, 0x2d, 0xff, 0xec, 0xfe, 0xef, 0xfe, 0x33, 0xfe,\n  0xa9, 0xfb, 0xd9, 0xfa, 0xf4, 0xfb, 0x4e, 0xfd, 0xb6, 0xfd, 0xbc, 0xfe,\n  0x1d, 0x01, 0x8b, 0x02, 0x47, 0x03, 0xc2, 0x03, 0xab, 0x01, 0x01, 0xff,\n  0x7d, 0xfe, 0xa1, 0xff, 0x94, 0x00, 0xfb, 0x00, 0xb0, 0x02, 0x34, 0x04,\n  0x9a, 0x04, 0x51, 0x04, 0x95, 0x02, 0x1f, 0x01, 0x33, 0xff, 0xe3, 0xfc,\n  0x13, 0xfd, 0xc7, 0xfd, 0x03, 0xfe, 0x42, 0xff, 0x39, 0x01, 0xac, 0x02,\n  0x5a, 0x02, 0x38, 0x02, 0x04, 0x02, 0xbb, 0x00, 0xf5, 0xff, 0xaa, 0xfd,\n  0xb3, 0xfd, 0x00, 0xff, 0x9c, 0x00, 0xdb, 0x00, 0xdf, 0x00, 0x4e, 0x01,\n  0xfb, 0x00, 0x63, 0x01, 0x6c, 0x01, 0x30, 0x01, 0xe4, 0x00, 0x45, 0x01,\n  0xbe, 0xff, 0x30, 0xfe, 0x46, 0xfd, 0x1f, 0xfb, 0x27, 0xfc, 0xa3, 0xfd,\n  0x8c, 0xfe, 0x6b, 0xfe, 0xb0, 0xfe, 0x05, 0xff, 0x16, 0xfe, 0x5c, 0xff,\n  0x30, 0xfe, 0x29, 0xfd, 0xb5, 0xfb, 0xfd, 0xf8, 0x50, 0xf9, 0x0d, 0xfc,\n  0xef, 0xfe, 0xde, 0xff, 0x33, 0xff, 0xb8, 0xfe, 0x0a, 0x00, 0x86, 0x00,\n  0xaa, 0x02, 0xd8, 0x03, 0xa1, 0x05, 0x7d, 0x07, 0xca, 0x08, 0x9a, 0x0a,\n  0x93, 0x09, 0x83, 0x07, 0x35, 0x07, 0x4e, 0x06, 0xe4, 0x03, 0x9a, 0x02,\n  0xec, 0x02, 0xa2, 0x01, 0x1e, 0x00, 0x80, 0xfe, 0xc3, 0xfb, 0xc7, 0xf9,\n  0x8d, 0xf8, 0x75, 0xf8, 0x9c, 0xf8, 0xcb, 0xf8, 0x2d, 0xf8, 0x7f, 0xf9,\n  0xae, 0xfb, 0xa5, 0xfc, 0x7a, 0xfe, 0x64, 0x00, 0x43, 0x00, 0xe3, 0xff,\n  0xd0, 0xff, 0x5d, 0x00, 0x32, 0x01, 0x9b, 0x00, 0xd9, 0xfe, 0xde, 0xfd,\n  0x8e, 0xfc, 0x6f, 0xfb, 0xd9, 0xfc, 0x22, 0xfe, 0x02, 0xff, 0xdd, 0xff,\n  0x1b, 0x01, 0x5b, 0x01, 0xb8, 0x00, 0x23, 0x01, 0x73, 0xff, 0xb8, 0xfe,\n  0xc0, 0xfe, 0x04, 0xff, 0x76, 0x00, 0x67, 0x02, 0x00, 0x04, 0xa2, 0x03,\n  0x8e, 0x04, 0x5f, 0x05, 0xee, 0x04, 0xc1, 0x04, 0x7a, 0x05, 0xaf, 0x06,\n  0x0a, 0x07, 0xa5, 0x04, 0x9a, 0x02, 0x2a, 0x00, 0x22, 0xff, 0x22, 0xff,\n  0xcf, 0xfe, 0x6a, 0xfd, 0xc3, 0xfc, 0xcc, 0xfd, 0xa3, 0xfd, 0x60, 0xfd,\n  0xae, 0xfe, 0xc4, 0xfe, 0xba, 0xfc, 0x77, 0xfa, 0x06, 0xf9, 0x73, 0xf8,\n  0x0d, 0xf8, 0x20, 0xf8, 0xb0, 0xf8, 0x93, 0xf8, 0x52, 0xf9, 0x11, 0xfd,\n  0x62, 0x00, 0x39, 0x02, 0x1d, 0x04, 0xed, 0x04, 0xaa, 0x05, 0x7b, 0x06,\n  0x55, 0x06, 0x0d, 0x07, 0xc2, 0x06, 0xa0, 0x05, 0x0f, 0x05, 0xc2, 0x04,\n  0xef, 0x02, 0xa0, 0x01, 0x43, 0x01, 0x1e, 0x02, 0xdf, 0x01, 0xd0, 0x00,\n  0x39, 0x01, 0x39, 0x00, 0x45, 0xff, 0xd6, 0xfe, 0x4d, 0xfe, 0xcd, 0xfc,\n  0x3f, 0xfa, 0x32, 0xf8, 0x75, 0xf8, 0x76, 0xf8, 0x53, 0xf7, 0x55, 0xf6,\n  0x41, 0xf6, 0x93, 0xf7, 0xf7, 0xf6, 0x34, 0xf5, 0xb3, 0xf6, 0xdb, 0xf9,\n  0x0d, 0xfc, 0x37, 0xfe, 0x36, 0x00, 0x29, 0x01, 0x09, 0x02, 0x37, 0x04,\n  0x47, 0x06, 0xcb, 0x08, 0x57, 0x0b, 0x6e, 0x0d, 0x12, 0x0e, 0x26, 0x0d,\n  0x38, 0x0b, 0xaa, 0x09, 0xe2, 0x08, 0x2e, 0x08, 0x76, 0x07, 0x2e, 0x07,\n  0xa0, 0x05, 0xaa, 0x03, 0xee, 0x01, 0xb3, 0xff, 0xf8, 0xfd, 0x0b, 0xfc,\n  0x2c, 0xfa, 0x3f, 0xf9, 0x82, 0xf9, 0x7a, 0xfa, 0x4c, 0xfa, 0x6d, 0xfb,\n  0xf9, 0xfc, 0x30, 0xfd, 0x87, 0xfc, 0x19, 0xfc, 0xe9, 0xfc, 0x62, 0xfd,\n  0xdf, 0xfd, 0x1e, 0xff, 0xc6, 0xff, 0xbc, 0xff, 0x1f, 0xfe, 0xd8, 0xfc,\n  0x65, 0xfc, 0xb6, 0xfc, 0x37, 0xfd, 0x02, 0xfe, 0x43, 0xff, 0x81, 0xff,\n  0xb8, 0xff, 0x8f, 0xff, 0x16, 0xfe, 0x7e, 0xfe, 0xcd, 0x00, 0x31, 0x02,\n  0x6b, 0x02, 0x0e, 0x03, 0xa4, 0x04, 0x97, 0x06, 0xf2, 0x06, 0x18, 0x06,\n  0x48, 0x04, 0x46, 0x04, 0x5a, 0x05, 0x31, 0x06, 0xea, 0x06, 0x6b, 0x05,\n  0xd7, 0x02, 0x76, 0xfe, 0x29, 0xfb, 0xea, 0xf9, 0x8e, 0xf8, 0xa9, 0xf6,\n  0x4b, 0xf6, 0xcc, 0xf6, 0x17, 0xf8, 0xe5, 0xf8, 0x8e, 0xf8, 0xb3, 0xf8,\n  0x7c, 0xf9, 0xdd, 0xfa, 0xc2, 0xfc, 0xaf, 0xff, 0xc2, 0x01, 0x88, 0x02,\n  0xca, 0x03, 0x2d, 0x05, 0x7c, 0x06, 0x66, 0x07, 0x2d, 0x07, 0x99, 0x05,\n  0x32, 0x03, 0x85, 0x01, 0xd0, 0xff, 0xc6, 0xff, 0xcb, 0xff, 0xa2, 0xff,\n  0x87, 0xff, 0x24, 0xff, 0xf4, 0xfe, 0x00, 0x00, 0x7a, 0x00, 0xa2, 0xff,\n  0x27, 0xfe, 0xd0, 0xfc, 0x3e, 0xfd, 0x00, 0xfd, 0x6b, 0xfc, 0x09, 0xfd,\n  0x6a, 0xfe, 0xfa, 0xfd, 0x4e, 0xfd, 0x5f, 0xfd, 0xd5, 0xfd, 0xa5, 0xfe,\n  0x1f, 0xff, 0xe6, 0xfd, 0x4e, 0xfc, 0x45, 0xfc, 0x37, 0xfe, 0x3e, 0x01,\n  0x4b, 0x02, 0x22, 0x04, 0xbd, 0x05, 0x6d, 0x05, 0xae, 0x05, 0x25, 0x06,\n  0xe8, 0x04, 0x08, 0x04, 0x03, 0x03, 0xcc, 0x01, 0x2e, 0x01, 0x04, 0x00,\n  0xb8, 0xff, 0x87, 0xff, 0xdf, 0xfe, 0xab, 0xfc, 0x9a, 0xfa, 0xf5, 0xf9,\n  0x63, 0xfa, 0xc1, 0xfb, 0x20, 0xfd, 0xbe, 0xfd, 0xce, 0xfe, 0xdc, 0xfe,\n  0x56, 0xfe, 0x39, 0xfe, 0x32, 0xfe, 0xd4, 0xfe, 0xa7, 0x00, 0x12, 0x02,\n  0xa5, 0x02, 0x1b, 0x03, 0x79, 0x03, 0xbd, 0x04, 0x04, 0x05, 0x7e, 0x04,\n  0xec, 0x03, 0xd9, 0x03, 0x3a, 0x03, 0x9f, 0x01, 0xaa, 0x00, 0xb6, 0xff,\n  0xcb, 0xfe, 0x99, 0xfe, 0xb7, 0xfe, 0x3a, 0xfe, 0x04, 0xfe, 0x3d, 0xfe,\n  0xe7, 0xfd, 0x44, 0xfd, 0x6e, 0xfd, 0x2b, 0xfe, 0x0c, 0xff, 0xf2, 0xff,\n  0x4c, 0x00, 0x05, 0x00, 0xff, 0xff, 0xcb, 0xfe, 0x2e, 0xfe, 0x38, 0xff,\n  0x7e, 0x00, 0xf3, 0x00, 0xbf, 0x00, 0x55, 0x00, 0x2c, 0x00, 0xac, 0x00,\n  0x69, 0x01, 0x64, 0x02, 0x63, 0x01, 0xb4, 0xff, 0x7d, 0xff, 0xea, 0xff,\n  0x26, 0xff, 0xff, 0xfd, 0xee, 0xfd, 0xb8, 0xfe, 0x33, 0xff, 0x88, 0xff,\n  0x4b, 0xff, 0xa4, 0xfe, 0xd9, 0xfd, 0xe5, 0xfd, 0xed, 0xfc, 0xe2, 0xfb,\n  0x70, 0xfc, 0xdf, 0xfc, 0x97, 0xfd, 0x2d, 0xfd, 0x55, 0xfd, 0x8e, 0xfd,\n  0x04, 0xfd, 0xed, 0xfd, 0x2f, 0xff, 0x55, 0x00, 0x93, 0x02, 0x89, 0x03,\n  0x19, 0x03, 0x4c, 0x04, 0x40, 0x05, 0x93, 0x05, 0x92, 0x05, 0xba, 0x04,\n  0x23, 0x03, 0xc6, 0x00, 0x8c, 0xfe, 0x9d, 0xfe, 0x56, 0xfe, 0xa8, 0xfd,\n  0xab, 0xfe, 0xa0, 0xfe, 0x03, 0xfd, 0x78, 0xfc, 0x03, 0xfd, 0x2e, 0xfd,\n  0xca, 0xfd, 0x07, 0xff, 0x64, 0xff, 0xbf, 0xff, 0x5f, 0x01, 0x33, 0x03,\n  0x83, 0x04, 0x12, 0x06, 0x64, 0x07, 0x7d, 0x07, 0xd3, 0x05, 0xd4, 0x03,\n  0x3d, 0x02, 0xfd, 0x00, 0x2f, 0x00, 0x4f, 0x00, 0xbf, 0xff, 0xf1, 0xfe,\n  0x4b, 0xfe, 0x03, 0xfd, 0xff, 0xfb, 0xed, 0xfb, 0x2b, 0xfd, 0x48, 0xfe,\n  0xd2, 0xfd, 0xf0, 0xfc, 0x35, 0xfd, 0x22, 0xff, 0xf9, 0x00, 0x89, 0x01,\n  0xa3, 0x01, 0xef, 0x00, 0x67, 0x01, 0x71, 0x02, 0xd9, 0x02, 0xe4, 0x00,\n  0xf0, 0xfe, 0xf6, 0xfd, 0xfa, 0xfc, 0x7f, 0xfd, 0x6b, 0xfd, 0xc5, 0xfd,\n  0x6b, 0xfd, 0xf8, 0xfc, 0x1a, 0xfd, 0x99, 0xfb, 0xa0, 0xfa, 0x6e, 0xfa,\n  0xe5, 0xfa, 0xfa, 0xfa, 0xc6, 0xfa, 0xd8, 0xfb, 0x5c, 0xfd, 0x46, 0xfe,\n  0x00, 0x00, 0xdb, 0x00, 0x65, 0x00, 0x62, 0x00, 0xc6, 0x01, 0x96, 0x02,\n  0x27, 0x03, 0x47, 0x04, 0x69, 0x04, 0x57, 0x04, 0x6a, 0x04, 0x16, 0x05,\n  0xa9, 0x05, 0x64, 0x04, 0xd4, 0x01, 0xde, 0xff, 0x31, 0xff, 0x2d, 0xff,\n  0x88, 0xfe, 0xf8, 0xfe, 0xc6, 0xfe, 0x62, 0xfe, 0xd7, 0xfe, 0xc4, 0xff,\n  0x65, 0x00, 0x9b, 0x01, 0x35, 0x04, 0xa4, 0x06, 0xe8, 0x06, 0x32, 0x06,\n  0x75, 0x06, 0x63, 0x05, 0x14, 0x04, 0x58, 0x03, 0x3c, 0x02, 0xe4, 0x01,\n  0xaf, 0x01, 0x7a, 0x00, 0x0b, 0xff, 0x89, 0xfe, 0x8b, 0xfd, 0xe9, 0xfb,\n  0x25, 0xfb, 0xe3, 0xf9, 0x9f, 0xf9, 0x44, 0xfa, 0x6f, 0xfb, 0x7b, 0xfc,\n  0xaa, 0xfc, 0x2c, 0xfc, 0x28, 0xfc, 0x2c, 0xfb, 0xd5, 0xfa, 0xa9, 0xfb,\n  0x85, 0xfb, 0x75, 0xfb, 0x8d, 0xfb, 0x0b, 0xfc, 0xf3, 0xfb, 0x3e, 0xfb,\n  0xcc, 0xfb, 0x22, 0xfd, 0x86, 0xfd, 0x14, 0xfe, 0x82, 0xfe, 0xb9, 0xfe,\n  0x9d, 0x00, 0xe5, 0x02, 0xaa, 0x04, 0xf6, 0x05, 0x41, 0x06, 0xa6, 0x06,\n  0xa9, 0x07, 0x24, 0x06, 0x98, 0x04, 0xf1, 0x03, 0x12, 0x04, 0x6e, 0x04,\n  0x90, 0x03, 0xd2, 0x03, 0xd1, 0x03, 0xd1, 0x03, 0x70, 0x03, 0xf9, 0x02,\n  0xf3, 0x02, 0xd2, 0x01, 0xf5, 0x00, 0xc8, 0xff, 0x39, 0xfe, 0x3f, 0xfc,\n  0xd1, 0xfa, 0x59, 0xfa, 0x6f, 0xfa, 0x13, 0xfb, 0xda, 0xfb, 0x4c, 0xfd,\n  0x4a, 0xfe, 0x56, 0xfe, 0x77, 0xfe, 0x57, 0xff, 0xc3, 0xff, 0x0a, 0xff,\n  0x9a, 0xff, 0xde, 0x00, 0x5e, 0x01, 0x50, 0x00, 0x0d, 0xfe, 0x7e, 0xfc,\n  0x11, 0xfc, 0x58, 0xfc, 0x38, 0xfd, 0x1c, 0xfe, 0x81, 0xfe, 0xb1, 0xff,\n  0x98, 0x00, 0x76, 0x01, 0xbb, 0x01, 0xd9, 0x02, 0x98, 0x03, 0xe7, 0x02,\n  0x0c, 0x03, 0xee, 0x02, 0x30, 0x03, 0xb9, 0x03, 0xd2, 0x03, 0x05, 0x03,\n  0xd9, 0x01, 0x05, 0x01, 0x13, 0x00, 0xf8, 0xfe, 0x48, 0xfe, 0xeb, 0xfd,\n  0x13, 0xfe, 0x01, 0xfe, 0x38, 0xfd, 0xd0, 0xfc, 0x4a, 0xfc, 0xe2, 0xfb,\n  0xa5, 0xfc, 0xdb, 0xfc, 0x51, 0xfc, 0xe7, 0xfb, 0xe3, 0xfb, 0x92, 0xfc,\n  0x69, 0xfd, 0xa8, 0xfd, 0x2a, 0xfe, 0x05, 0xff, 0xee, 0xff, 0x87, 0x00,\n  0x08, 0x00, 0x2a, 0x00, 0x02, 0x00, 0x6b, 0xff, 0xb1, 0xfe, 0x50, 0xff,\n  0x6b, 0x00, 0x5a, 0x01, 0x8d, 0x01, 0x9c, 0x01, 0xc6, 0x01, 0x91, 0x02,\n  0x86, 0x03, 0x11, 0x04, 0xd0, 0x04, 0x7f, 0x04, 0xaa, 0x04, 0xca, 0x04,\n  0x49, 0x04, 0x90, 0x04, 0x1f, 0x04, 0x0e, 0x03, 0x03, 0x02, 0x82, 0x00,\n  0x15, 0xff, 0xd0, 0xfe, 0xf1, 0xfd, 0x69, 0xfc, 0x0a, 0xfb, 0x6a, 0xfa,\n  0x22, 0xfa, 0x03, 0xfb, 0x7f, 0xfc, 0x90, 0xfd, 0x9b, 0xfe, 0x25, 0xff,\n  0x9b, 0xff, 0xeb, 0xff, 0xe6, 0xff, 0xb4, 0x00, 0x74, 0x02, 0x84, 0x03,\n  0x51, 0x03, 0x3f, 0x03, 0x1b, 0x03, 0xd4, 0x01, 0xb7, 0x00, 0x52, 0x00,\n  0x43, 0x00, 0x6f, 0x00, 0xae, 0xff, 0x7e, 0xff, 0xcc, 0xff, 0xa2, 0xff,\n  0x98, 0xfe, 0x01, 0xfe, 0xc2, 0xfc, 0x89, 0xfc, 0xa8, 0xfc, 0x20, 0xfd,\n  0x0b, 0xff, 0xfa, 0xff, 0xd1, 0x00, 0x28, 0x01, 0x1e, 0x00, 0x23, 0xff,\n  0x94, 0xfe, 0x0c, 0xfe, 0x64, 0xfd, 0x80, 0xfd, 0x42, 0xfe, 0x38, 0xff,\n  0xd0, 0xff, 0x1a, 0x00, 0x73, 0xff, 0x09, 0xff, 0x00, 0xff, 0x29, 0xff,\n  0x6c, 0xff, 0x47, 0xff, 0x3b, 0xff, 0x22, 0x00, 0x3f, 0x00, 0x2b, 0x00,\n  0xbb, 0xff, 0xdc, 0x00, 0xc3, 0x02, 0x3f, 0x03, 0x84, 0x03, 0x3f, 0x03,\n  0xb5, 0x02, 0x2b, 0x02, 0xda, 0x02, 0xdf, 0x02, 0x26, 0x02, 0xdc, 0x01,\n  0xf0, 0x01, 0x92, 0x02, 0xc7, 0x02, 0x49, 0x03, 0xb3, 0x03, 0xe5, 0x02,\n  0x62, 0x01, 0x5f, 0x00, 0x51, 0x00, 0x67, 0x00, 0x61, 0x00, 0x67, 0x00,\n  0xef, 0xff, 0xf2, 0xfd, 0x1a, 0xfc, 0xcc, 0xfb, 0x6a, 0xfb, 0xbd, 0xfa,\n  0x04, 0xf9, 0xb2, 0xf8, 0x31, 0xf9, 0x94, 0xf9, 0x8e, 0xfa, 0xc5, 0xfb,\n  0xfb, 0xfc, 0x72, 0xfd, 0xf0, 0xfd, 0x8b, 0xfe, 0x8d, 0xfe, 0x02, 0xfe,\n  0x13, 0xfe, 0x41, 0xff, 0x8c, 0x00, 0xa8, 0x01, 0xe2, 0x01, 0xb3, 0x02,\n  0x5b, 0x03, 0x58, 0x03, 0xce, 0x02, 0xde, 0x01, 0x35, 0x02, 0x98, 0x02,\n  0x22, 0x03, 0x9d, 0x03, 0x37, 0x04, 0xef, 0x04, 0x09, 0x05, 0x7a, 0x04,\n  0x24, 0x04, 0x64, 0x03, 0xb7, 0x01, 0x13, 0x01, 0x6e, 0x01, 0x37, 0x01,\n  0x76, 0x00, 0xdc, 0xff, 0xb0, 0xff, 0xc7, 0xff, 0x15, 0x00, 0x41, 0xff,\n  0xfc, 0xfd, 0xfe, 0xfd, 0xf0, 0xfd, 0xb8, 0xfd, 0x02, 0xfe, 0x21, 0xfe,\n  0xce, 0xfd, 0x85, 0xfd, 0xda, 0xfc, 0x4e, 0xfc, 0x92, 0xfc, 0x80, 0xfd,\n  0xf9, 0xfd, 0x4a, 0xfd, 0x26, 0xfc, 0xf8, 0xfb, 0x3d, 0xfc, 0x96, 0xfc,\n  0x07, 0xfd, 0x08, 0xfe, 0x9e, 0xff, 0x2b, 0x00, 0x2c, 0x00, 0xd0, 0xff,\n  0x67, 0xff, 0x86, 0xff, 0x3a, 0x00, 0xfd, 0x00, 0x91, 0x00, 0x00, 0x00,\n  0xb7, 0x00, 0xf3, 0x01, 0xbd, 0x02, 0xd9, 0x02, 0x03, 0x02, 0x09, 0x02,\n  0x9b, 0x02, 0x5e, 0x03, 0x03, 0x04, 0xd5, 0x03, 0x55, 0x04, 0x78, 0x04,\n  0x07, 0x04, 0xd8, 0x02, 0x60, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x44, 0x00,\n  0xb3, 0xff, 0xfd, 0xff, 0x22, 0x00, 0xa4, 0xff, 0xf0, 0xfe, 0x4a, 0xfe,\n  0x3d, 0xfe, 0xd9, 0xfe, 0xd5, 0xfe, 0x4c, 0xfe, 0x73, 0xfd, 0xd7, 0xfc,\n  0x87, 0xfc, 0x48, 0xfd, 0x55, 0xfd, 0x79, 0xfd, 0x5b, 0xfd, 0xb7, 0xfd,\n  0x90, 0xfe, 0x7c, 0xfe, 0x34, 0xfe, 0xe2, 0xfd, 0x0d, 0xfe, 0x1a, 0xfe,\n  0xef, 0xfd, 0xfe, 0xfc, 0xd9, 0xfb, 0x15, 0xfc, 0xea, 0xfc, 0xbb, 0xfd,\n  0x75, 0xfe, 0x50, 0xff, 0xd6, 0x00, 0x7b, 0x02, 0x87, 0x03, 0xbb, 0x04,\n  0x71, 0x05, 0x09, 0x05, 0x6f, 0x05, 0xb2, 0x05, 0xdc, 0x04, 0x2a, 0x04,\n  0x4c, 0x03, 0x3f, 0x02, 0x98, 0x01, 0xe2, 0x01, 0x19, 0x02, 0xe2, 0x01,\n  0x02, 0x01, 0x77, 0x00, 0x5e, 0x00, 0x2f, 0x00, 0x79, 0xff, 0x1d, 0xff,\n  0xb6, 0xfe, 0x01, 0xfe, 0xa5, 0xfd, 0x62, 0xfd, 0xca, 0xfc, 0x1e, 0xfc,\n  0x1e, 0xfc, 0xb9, 0xfb, 0x58, 0xfb, 0x06, 0xfb, 0x26, 0xfb, 0x37, 0xfb,\n  0xb0, 0xfb, 0x9a, 0xfc, 0xcb, 0xfc, 0x3e, 0xfd, 0xfd, 0xfd, 0x2f, 0xff,\n  0xc2, 0xff, 0x64, 0x00, 0xa3, 0x00, 0x5f, 0x00, 0xb7, 0x00, 0x6e, 0x01,\n  0xc8, 0x01, 0xcf, 0x01, 0x1e, 0x02, 0x9e, 0x02, 0xd2, 0x02, 0xe9, 0x02,\n  0xdd, 0x02, 0xbd, 0x02, 0xdb, 0x02, 0xa4, 0x02, 0x0e, 0x03, 0x9f, 0x03,\n  0xf0, 0x03, 0xeb, 0x03, 0xe2, 0x03, 0x14, 0x04, 0xda, 0x03, 0x77, 0x03,\n  0xcb, 0x02, 0x2d, 0x02, 0x6c, 0x01, 0x96, 0x00, 0x08, 0x00, 0x57, 0xff,\n  0x3a, 0xff, 0x7b, 0xff, 0xcf, 0xff, 0x1b, 0x00, 0xf4, 0xff, 0xf4, 0xff,\n  0xa9, 0xff, 0x88, 0xfe, 0x40, 0xfd, 0xe3, 0xfc, 0x95, 0xfc, 0xb0, 0xfc,\n  0x0c, 0xfd, 0xfe, 0xfc, 0x33, 0xfc, 0x69, 0xfc, 0x59, 0xfc, 0x47, 0xfc,\n  0x79, 0xfc, 0x30, 0xfc, 0xa4, 0xfc, 0xa5, 0xfd, 0xe4, 0xfe, 0xe6, 0xff,\n  0xfd, 0xff, 0xf9, 0xff, 0x21, 0x00, 0x63, 0x00, 0xa1, 0x00, 0x99, 0x00,\n  0xce, 0x00, 0x16, 0x01, 0xa6, 0x01, 0xff, 0x01, 0x15, 0x02, 0x5d, 0x02,\n  0x52, 0x02, 0x26, 0x02, 0x03, 0x02, 0xe3, 0x01, 0x8a, 0x00, 0xfa, 0xfe,\n  0xe2, 0xfd, 0x3e, 0xfd, 0x4e, 0xfd, 0x30, 0xfd, 0x1f, 0xfd, 0x09, 0xfd,\n  0xdf, 0xfd, 0x97, 0xfe, 0x1a, 0xff, 0x9e, 0xff, 0xbd, 0xff, 0x5b, 0x00,\n  0x68, 0x00, 0x59, 0x00, 0x12, 0x00, 0x01, 0x00, 0x1e, 0x00, 0xf6, 0xff,\n  0xea, 0xff, 0x91, 0xff, 0x42, 0xff, 0x3b, 0xff, 0x29, 0x00, 0x2f, 0x01,\n  0x67, 0x02, 0xc8, 0x02, 0x2b, 0x02, 0x25, 0x01, 0x07, 0x00, 0xcf, 0xfe,\n  0xee, 0xfc, 0xec, 0xfb, 0x1e, 0xfc, 0x39, 0xfc, 0x67, 0xfc, 0x4c, 0xfc,\n  0x72, 0xfc, 0x1c, 0xfd, 0x5e, 0xfe, 0xf1, 0xff, 0x37, 0x01, 0x2f, 0x02,\n  0x2b, 0x03, 0x62, 0x04, 0x5c, 0x05, 0xed, 0x05, 0x53, 0x06, 0xf3, 0x05,\n  0xe2, 0x04, 0xdf, 0x03, 0x2c, 0x03, 0x8c, 0x02, 0x49, 0x02, 0x6e, 0x01,\n  0x2f, 0x00, 0xa3, 0xff, 0xab, 0xff, 0x96, 0xff, 0xd3, 0xfe, 0x35, 0xfe,\n  0x50, 0xfd, 0x59, 0xfc, 0x01, 0xfc, 0xbb, 0xfc, 0xee, 0xfc, 0x0e, 0xfc,\n  0x93, 0xfb, 0x0c, 0xfc, 0xd6, 0xfc, 0x03, 0xfe, 0xe8, 0xfe, 0x83, 0xff,\n  0xa9, 0x00, 0x98, 0x01, 0xfb, 0x01, 0x04, 0x03, 0x21, 0x04, 0x1b, 0x04,\n  0x7b, 0x03, 0x82, 0x03, 0x64, 0x03, 0x07, 0x03, 0xa5, 0x02, 0x80, 0x02,\n  0x1a, 0x02, 0x62, 0x01, 0x5c, 0x00, 0x9a, 0xff, 0x96, 0xff, 0x1b, 0xff,\n  0xa9, 0xfe, 0x4c, 0xfe, 0xf4, 0xfd, 0xdb, 0xfd, 0x8e, 0xfd, 0xdc, 0xfd,\n  0xc8, 0xfe, 0x4e, 0xff, 0x47, 0x00, 0xf7, 0x00, 0xd0, 0x00, 0xf4, 0x00,\n  0xc9, 0x00, 0x26, 0x00, 0x4f, 0x00, 0x3a, 0x00, 0xb4, 0xff, 0x28, 0xff,\n  0x73, 0xfe, 0x32, 0xfe, 0x76, 0xfd, 0x70, 0xfc, 0xf2, 0xfb, 0xdc, 0xfb,\n  0xf4, 0xfb, 0x35, 0xfc, 0x68, 0xfc, 0x1c, 0xfd, 0x65, 0xfe, 0x40, 0xff,\n  0x25, 0x00, 0x3e, 0x01, 0x7b, 0x02, 0x8a, 0x03, 0xf8, 0x03, 0x60, 0x03,\n  0x22, 0x03, 0x07, 0x02, 0xdf, 0x00, 0xb3, 0x00, 0xbd, 0x00, 0x33, 0x00,\n  0x12, 0xff, 0x9f, 0xfe, 0xec, 0xfd, 0xbb, 0xfc, 0xac, 0xfb, 0x9f, 0xfb,\n  0x18, 0xfc, 0xa8, 0xfc, 0x5a, 0xfd, 0xf7, 0xfd, 0xd9, 0xfe, 0x0a, 0xff,\n  0xd9, 0xfe, 0x05, 0xff, 0x79, 0xff, 0x70, 0x00, 0x66, 0x01, 0x28, 0x02,\n  0x5e, 0x03, 0x97, 0x04, 0xbc, 0x04, 0xa9, 0x04, 0xfe, 0x04, 0x9c, 0x05,\n  0x98, 0x05, 0x63, 0x05, 0x7f, 0x04, 0xe1, 0x02, 0xfc, 0x01, 0xe4, 0x00,\n  0xf6, 0xff, 0x9c, 0xff, 0xf1, 0xff, 0x73, 0x00, 0x6a, 0x00, 0x74, 0x00,\n  0xf2, 0xff, 0xcf, 0xfe, 0x37, 0xfe, 0x59, 0xfd, 0xe0, 0xfc, 0x0f, 0xfd,\n  0x0f, 0xfd, 0x45, 0xfd, 0x3f, 0xfd, 0xbb, 0xfd, 0x10, 0xfe, 0xce, 0xfd,\n  0x5a, 0xfd, 0x27, 0xfd, 0xc3, 0xfd, 0x12, 0xfe, 0xca, 0xfe, 0x8d, 0xff,\n  0xab, 0xff, 0x8d, 0xff, 0x98, 0xff, 0x65, 0x00, 0x44, 0x01, 0xc2, 0x01,\n  0xce, 0x01, 0x19, 0x01, 0x9b, 0x00, 0x5c, 0x00, 0xe7, 0xff, 0x52, 0xff,\n  0x8d, 0xfe, 0x2a, 0xfe, 0x8e, 0xfd, 0xea, 0xfc, 0xc0, 0xfc, 0x7d, 0xfc,\n  0xaf, 0xfc, 0x3f, 0xfd, 0xad, 0xfd, 0xa5, 0xfe, 0x8e, 0xff, 0x62, 0x00,\n  0x07, 0x01, 0xaf, 0x01, 0xd4, 0x02, 0xd5, 0x03, 0xae, 0x04, 0x01, 0x05,\n  0xbd, 0x04, 0xfd, 0x03, 0xa0, 0x02, 0x9d, 0x01, 0xf4, 0x00, 0xb1, 0x00,\n  0x9f, 0x00, 0xb3, 0x00, 0xee, 0x00, 0x2f, 0x01, 0xa1, 0x00, 0x0c, 0x00,\n  0x4e, 0xff, 0xbf, 0xfe, 0x77, 0xfe, 0xa7, 0xfd, 0xd1, 0xfc, 0x5c, 0xfc,\n  0xc9, 0xfb, 0x1c, 0xfb, 0xb5, 0xfa, 0xfb, 0xfa, 0x74, 0xfb, 0x2d, 0xfc,\n  0x62, 0xfd, 0x31, 0xfe, 0xba, 0xfe, 0xa1, 0xff, 0x85, 0x00, 0x1f, 0x01,\n  0x9d, 0x01, 0xd7, 0x01, 0x5b, 0x02, 0xb4, 0x02, 0x47, 0x03, 0xfc, 0x02,\n  0xc4, 0x02, 0x37, 0x03, 0x14, 0x04, 0xc2, 0x04, 0xec, 0x04, 0xa6, 0x04,\n  0x54, 0x04, 0x7b, 0x04, 0xbb, 0x04, 0x05, 0x04, 0x33, 0x03, 0xc3, 0x02,\n  0x5f, 0x01, 0x46, 0x00, 0x2b, 0xff, 0xc6, 0xfd, 0xe7, 0xfc, 0x8e, 0xfc,\n  0x68, 0xfc, 0xbf, 0xfb, 0x18, 0xfb, 0xb2, 0xfa, 0x10, 0xfb, 0x93, 0xfb,\n  0x88, 0xfb, 0xab, 0xfb, 0xed, 0xfb, 0xfd, 0xfc, 0xa8, 0xfd, 0xaf, 0xfe,\n  0x93, 0x00, 0x33, 0x02, 0xe5, 0x03, 0xcc, 0x04, 0x60, 0x05, 0x18, 0x06,\n  0x3a, 0x06, 0xcd, 0x05, 0x95, 0x05, 0x83, 0x05, 0xbb, 0x04, 0x22, 0x03,\n  0x24, 0x01, 0xb2, 0xff, 0x25, 0xff, 0xff, 0xfe, 0xe1, 0xfe, 0x92, 0xfe,\n  0x3b, 0xfe, 0xd9, 0xfd, 0x18, 0xfd, 0xa6, 0xfc, 0xcc, 0xfb, 0x22, 0xfb,\n  0x2d, 0xfb, 0xcb, 0xfa, 0xa1, 0xfa, 0xd5, 0xfa, 0x0d, 0xfb, 0xa7, 0xfb,\n  0x6c, 0xfc, 0x58, 0xfd, 0x40, 0xfe, 0x79, 0xfe, 0xb0, 0xfe, 0x97, 0xff,\n  0x12, 0x00, 0xaa, 0x00, 0x55, 0x01, 0x78, 0x01, 0x9a, 0x01, 0x8e, 0x01,\n  0xb6, 0x01, 0x1c, 0x02, 0x93, 0x02, 0xc2, 0x02, 0xfb, 0x02, 0xa3, 0x02,\n  0x72, 0x02, 0x4b, 0x02, 0xdc, 0x01, 0x17, 0x02, 0x3f, 0x02, 0x5e, 0x02,\n  0x32, 0x02, 0xf8, 0x01, 0xd6, 0x01, 0xda, 0x01, 0xe1, 0x01, 0xc2, 0x01,\n  0x51, 0x01, 0x92, 0x00, 0x6b, 0x00, 0x3f, 0x00, 0x01, 0x00, 0x7d, 0xff,\n  0x20, 0xff, 0xac, 0xfe, 0x69, 0xfd, 0x27, 0xfc, 0x7a, 0xfb, 0x02, 0xfb,\n  0x48, 0xfa, 0xa9, 0xf9, 0x89, 0xf9, 0xa7, 0xf9, 0xed, 0xf9, 0x25, 0xfa,\n  0xa6, 0xfa, 0xa8, 0xfb, 0xc7, 0xfc, 0x90, 0xfd, 0x81, 0xfe, 0x66, 0xff,\n  0x06, 0x00, 0xab, 0x00, 0x92, 0x01, 0x66, 0x02, 0x34, 0x03, 0xfb, 0x03,\n  0x6f, 0x04, 0xe9, 0x04, 0x41, 0x05, 0x06, 0x05, 0xb9, 0x04, 0x86, 0x04,\n  0x67, 0x04, 0x29, 0x05, 0xfb, 0x05, 0xce, 0x05, 0x98, 0x05, 0xf6, 0x04,\n  0x26, 0x04, 0x48, 0x03, 0xae, 0x02, 0xa5, 0x02, 0x25, 0x02, 0x26, 0x01,\n  0x6e, 0x00, 0xcc, 0xff, 0xef, 0xfe, 0x72, 0xfe, 0xae, 0xfd, 0xc2, 0xfc,\n  0xbe, 0xfb, 0x50, 0xfb, 0x1e, 0xfb, 0xab, 0xfa, 0xa7, 0xfa, 0x98, 0xfa,\n  0xd9, 0xfa, 0x07, 0xfb, 0x77, 0xfb, 0xc2, 0xfb, 0x22, 0xfc, 0xf4, 0xfc,\n  0x92, 0xfd, 0xf6, 0xfd, 0xb7, 0xfe, 0x3f, 0xff, 0x5a, 0xff, 0xf3, 0xff,\n  0x70, 0x00, 0xe2, 0x00, 0x94, 0x01, 0x67, 0x02, 0xd6, 0x02, 0x23, 0x03,\n  0x8c, 0x03, 0xba, 0x03, 0xed, 0x03, 0x3d, 0x04, 0x2f, 0x04, 0x18, 0x04,\n  0x31, 0x04, 0x8c, 0x04, 0x94, 0x04, 0xe5, 0x03, 0xf7, 0x02, 0xc5, 0x01,\n  0x18, 0x01, 0x38, 0x00, 0xf1, 0xfe, 0x21, 0xfe, 0x6e, 0xfd, 0x00, 0xfd,\n  0xc5, 0xfd, 0x8f, 0xfe, 0xbc, 0xfe, 0xcd, 0xfe, 0xf6, 0xfe, 0xe7, 0xfe,\n  0xc5, 0xfe, 0x70, 0xfe, 0xe5, 0xfd, 0x8b, 0xfd, 0x50, 0xfd, 0x55, 0xfd,\n  0x76, 0xfd, 0x71, 0xfd, 0x50, 0xfd, 0x42, 0xfd, 0x67, 0xfd, 0x99, 0xfd,\n  0x8e, 0xfd, 0x58, 0xfd, 0x45, 0xfd, 0xc0, 0xfd, 0x67, 0xfe, 0x54, 0xfe,\n  0xbf, 0xfe, 0x74, 0xff, 0x3b, 0x00, 0xf2, 0x00, 0x65, 0x01, 0xc5, 0x01,\n  0xeb, 0x01, 0x7b, 0x01, 0x26, 0x01, 0xf5, 0x00, 0xf1, 0x00, 0x3d, 0x01,\n  0x2b, 0x01, 0xcd, 0x00, 0xc3, 0xff, 0xbd, 0xfe, 0x53, 0xfe, 0x83, 0xfe,\n  0x7e, 0xfe, 0x6b, 0xfe, 0x85, 0xfe, 0x1f, 0xfe, 0xd0, 0xfd, 0xa0, 0xfd,\n  0x90, 0xfd, 0x2e, 0xfe, 0xd5, 0xfe, 0x97, 0xff, 0x8c, 0x00, 0x78, 0x01,\n  0x34, 0x02, 0xd5, 0x02, 0x72, 0x03, 0xe6, 0x03, 0x1b, 0x04, 0x50, 0x04,\n  0x37, 0x04, 0xf5, 0x03, 0xf3, 0x03, 0x62, 0x03, 0xaa, 0x02, 0xd1, 0x01,\n  0xf7, 0x00, 0x30, 0x00, 0xc4, 0xff, 0x66, 0xff, 0x29, 0xff, 0xf2, 0xfe,\n  0xf2, 0xfe, 0xe5, 0xfe, 0x47, 0xff, 0xab, 0xff, 0xa9, 0xff, 0xa5, 0xff,\n  0xd4, 0xff, 0x3b, 0x00, 0x0a, 0x00, 0x80, 0xff, 0x9a, 0xff, 0xfb, 0xff,\n  0x61, 0x00, 0xf9, 0x00, 0x9b, 0x01, 0x78, 0x01, 0x03, 0x01, 0x8c, 0x00,\n  0xf6, 0xff, 0x5a, 0xff, 0xd1, 0xfe, 0x5d, 0xfe, 0xea, 0xfd, 0xb0, 0xfd,\n  0x47, 0xfd, 0x0b, 0xfd, 0xc3, 0xfc, 0x7f, 0xfc, 0xb1, 0xfc, 0xc4, 0xfc,\n  0x97, 0xfc, 0x4f, 0xfc, 0x55, 0xfc, 0xaa, 0xfc, 0x8a, 0xfd, 0x0c, 0xfe,\n  0x34, 0xfe, 0x4a, 0xfe, 0x89, 0xfe, 0xe1, 0xfe, 0x2f, 0xff, 0xa5, 0xff,\n  0x92, 0x00, 0x91, 0x01, 0x2c, 0x02, 0xb0, 0x02, 0xf1, 0x02, 0xe7, 0x02,\n  0x9c, 0x02, 0x9b, 0x02, 0x1a, 0x03, 0xf1, 0x03, 0x73, 0x04, 0x6c, 0x04,\n  0x93, 0x04, 0x8e, 0x04, 0xf0, 0x03, 0x66, 0x03, 0xc0, 0x02, 0x19, 0x02,\n  0x44, 0x01, 0x6c, 0x00, 0xe4, 0xff, 0x5c, 0xff, 0x16, 0xff, 0xbe, 0xfe,\n  0x4b, 0xfe, 0xef, 0xfd, 0x9d, 0xfd, 0x0a, 0xfd, 0x98, 0xfc, 0x3e, 0xfc,\n  0x23, 0xfc, 0x0a, 0xfc, 0x0b, 0xfc, 0x9b, 0xfc, 0x36, 0xfd, 0xb9, 0xfd,\n  0x11, 0xfe, 0x20, 0xfe, 0x69, 0xfe, 0xc2, 0xfe, 0x43, 0xff, 0xa8, 0xff,\n  0x2e, 0x00, 0xc2, 0x00, 0xb9, 0x00, 0x02, 0x01, 0xb2, 0x01, 0x68, 0x02,\n  0x6f, 0x02, 0x11, 0x02, 0x34, 0x02, 0x52, 0x02, 0x10, 0x02, 0xd5, 0x01,\n  0x6f, 0x01, 0x27, 0x01, 0xdf, 0x00, 0x86, 0x00, 0x9e, 0x00, 0x90, 0x00,\n  0x60, 0x00, 0x84, 0x00, 0x18, 0x01, 0x95, 0x01, 0xeb, 0x01, 0x18, 0x02,\n  0x8a, 0x01, 0x2b, 0x01, 0xd7, 0x00, 0x99, 0x00, 0x8c, 0x00, 0xb7, 0x00,\n  0xce, 0x00, 0x95, 0x00, 0xfb, 0xff, 0x48, 0xff, 0xf6, 0xfe, 0x38, 0xff,\n  0x80, 0xff, 0xa1, 0xff, 0x6e, 0xff, 0xd8, 0xfe, 0x5d, 0xfe, 0x04, 0xfe,\n  0xcb, 0xfd, 0xad, 0xfd, 0x98, 0xfd, 0x54, 0xfd, 0x6e, 0xfd, 0x94, 0xfd,\n  0xa7, 0xfd, 0xd7, 0xfd, 0xf6, 0xfd, 0x3e, 0xfe, 0xdb, 0xfe, 0x9b, 0xff,\n  0xd1, 0xff, 0xbb, 0xff, 0xa7, 0xff, 0xc2, 0xff, 0x2b, 0x00, 0x9c, 0x00,\n  0xd7, 0x00, 0x0b, 0x01, 0xe9, 0x00, 0x90, 0x00, 0xf5, 0x00, 0x6f, 0x01,\n  0x62, 0x01, 0xba, 0x01, 0x3a, 0x02, 0x91, 0x02, 0x97, 0x02, 0x4d, 0x02,\n  0x00, 0x02, 0xa8, 0x01, 0x6e, 0x01, 0xe0, 0x00, 0x5e, 0x00, 0x8f, 0xff,\n  0x0a, 0xff, 0xd1, 0xfe, 0x72, 0xfe, 0xeb, 0xfd, 0x87, 0xfd, 0x50, 0xfd,\n  0x45, 0xfd, 0x7a, 0xfd, 0x60, 0xfd, 0x44, 0xfd, 0x34, 0xfd, 0x77, 0xfd,\n  0x95, 0xfd, 0xc8, 0xfd, 0x55, 0xfe, 0xe6, 0xfe, 0x5e, 0xff, 0xc5, 0xff,\n  0x14, 0x00, 0xa9, 0x00, 0x93, 0x01, 0x40, 0x02, 0x39, 0x02, 0x93, 0x01,\n  0xd0, 0x00, 0x6d, 0x00, 0x60, 0x00, 0x4a, 0x00, 0x7a, 0x00, 0x2d, 0x00,\n  0xd6, 0xff, 0x02, 0x00, 0x74, 0x00, 0x0b, 0x01, 0x9e, 0x01, 0x22, 0x02,\n  0x12, 0x02, 0xee, 0x01, 0xef, 0x01, 0xb0, 0x01, 0x6e, 0x01, 0x1f, 0x01,\n  0x42, 0x01, 0x66, 0x01, 0x8a, 0x01, 0xad, 0x01, 0x00, 0x01, 0x4f, 0x00,\n  0x9e, 0xff, 0x16, 0xff, 0xea, 0xfe, 0xd6, 0xfe, 0xb6, 0xfe, 0x2c, 0xfe,\n  0xc7, 0xfd, 0x0b, 0xfe, 0x3e, 0xfe, 0x16, 0xfe, 0x00, 0xfe, 0x25, 0xfe,\n  0x30, 0xfe, 0x1a, 0xfe, 0x6f, 0xfe, 0x5c, 0xfe, 0x2a, 0xfe, 0xf4, 0xfd,\n  0xf6, 0xfd, 0x6a, 0xfe, 0xb5, 0xfe, 0x22, 0xff, 0x9e, 0xff, 0x06, 0x00,\n  0x3b, 0x00, 0x67, 0x00, 0xd5, 0x00, 0x5c, 0x01, 0xc9, 0x01, 0x8d, 0x02,\n  0x2a, 0x03, 0x5a, 0x03, 0x36, 0x03, 0xd5, 0x02, 0x70, 0x02, 0x07, 0x02,\n  0x8d, 0x01, 0x0c, 0x01, 0xba, 0x00, 0x67, 0x00, 0x36, 0x00, 0xf0, 0xff,\n  0xcc, 0xff, 0xc5, 0xff, 0xfb, 0xfe, 0x97, 0xfe, 0xab, 0xfe, 0x3f, 0xfe,\n  0xdc, 0xfd, 0xf1, 0xfd, 0xc2, 0xfe, 0xb3, 0xff, 0x75, 0x00, 0xee, 0x00,\n  0x81, 0x01, 0xd1, 0x01, 0xf1, 0x01, 0xca, 0x01, 0x4f, 0x01, 0xd5, 0x00,\n  0x8a, 0x00, 0x45, 0x00, 0xb1, 0xff, 0x44, 0xff, 0x45, 0xff, 0x7d, 0xff,\n  0x72, 0xff, 0x2a, 0xff, 0x1f, 0xff, 0x1c, 0xff, 0x11, 0xff, 0xe8, 0xfe,\n  0xbc, 0xfe, 0xcb, 0xfe, 0xe4, 0xfe, 0x1a, 0xff, 0x73, 0xff, 0x07, 0x00,\n  0x92, 0x00, 0xd9, 0x00, 0xd8, 0x00, 0x9f, 0x00, 0x3a, 0x00, 0x3b, 0x00,\n  0x53, 0x00, 0x07, 0x00, 0x40, 0x00, 0xbc, 0x00, 0xd5, 0x00, 0xc5, 0x00,\n  0xdf, 0x00, 0x20, 0x01, 0x00, 0x01, 0xd3, 0x00, 0xa4, 0x00, 0x77, 0x00,\n  0x62, 0x00, 0x1b, 0x00, 0xc5, 0xff, 0x19, 0xff, 0x87, 0xfe, 0xf4, 0xfd,\n  0x72, 0xfd, 0x34, 0xfd, 0xe3, 0xfc, 0x89, 0xfc, 0xc0, 0xfc, 0x42, 0xfd,\n  0x85, 0xfd, 0xee, 0xfd, 0x39, 0xfe, 0xcb, 0xfe, 0x8b, 0xff, 0x2f, 0x00,\n  0x99, 0x00, 0xa7, 0x00, 0x82, 0x00, 0xb5, 0xff, 0x23, 0xff, 0x03, 0xff,\n  0x02, 0xff, 0x1d, 0xff, 0x69, 0xff, 0xb4, 0xff, 0xbc, 0xff, 0x0e, 0x00,\n  0xbf, 0x00, 0x55, 0x01, 0xfd, 0x01, 0x9b, 0x02, 0x27, 0x03, 0x4a, 0x03,\n  0x04, 0x03, 0xb9, 0x02, 0x45, 0x02, 0x81, 0x01, 0xe5, 0x00, 0x38, 0x00,\n  0xea, 0xff, 0xf1, 0xff, 0xe5, 0xff, 0x02, 0x00, 0xf1, 0xff, 0x0b, 0x00,\n  0x20, 0x00, 0x25, 0x00, 0x1b, 0x00, 0xc8, 0xff, 0x6a, 0xff, 0x0a, 0xff,\n  0xf6, 0xfe, 0x32, 0xff, 0x4a, 0xff, 0xb2, 0xff, 0x34, 0x00, 0x5e, 0x00,\n  0x8c, 0x00, 0x97, 0x00, 0x80, 0x00, 0x67, 0x00, 0x42, 0x00, 0x2c, 0x00,\n  0x74, 0x00, 0x94, 0x00, 0x79, 0x00, 0x93, 0x00, 0x01, 0x01, 0x1b, 0x01,\n  0x0e, 0x01, 0xf5, 0x00, 0x83, 0x00, 0x1e, 0x00, 0xb9, 0xff, 0x32, 0xff,\n  0x9e, 0xfe, 0x21, 0xfe, 0x03, 0xfe, 0x14, 0xfe, 0x3d, 0xfe, 0x85, 0xfe,\n  0xe7, 0xfe, 0x00, 0xff, 0xd5, 0xfe, 0x70, 0xfe, 0x25, 0xfe, 0xa1, 0xfd,\n  0x0f, 0xfd, 0xe4, 0xfc, 0xa7, 0xfc, 0x74, 0xfc, 0x87, 0xfc, 0xca, 0xfc,\n  0x5c, 0xfd, 0x3e, 0xfe, 0x5e, 0xff, 0xa8, 0x00, 0xa6, 0x01, 0xb1, 0x02,\n  0xaa, 0x03, 0x62, 0x04, 0x92, 0x04, 0x84, 0x04, 0x7c, 0x04, 0x31, 0x04,\n  0xa8, 0x03, 0x2c, 0x03, 0xf5, 0x02, 0xea, 0x02, 0x8b, 0x02, 0x4b, 0x02,\n  0x22, 0x02, 0xda, 0x01, 0xcd, 0x01, 0xaa, 0x01, 0x37, 0x01, 0x96, 0x00,\n  0xe6, 0xff, 0x0e, 0xff, 0x7f, 0xfe, 0x20, 0xfe, 0xa8, 0xfd, 0xa2, 0xfd,\n  0xc0, 0xfd, 0xa4, 0xfd, 0x51, 0xfd, 0xc3, 0xfc, 0x92, 0xfc, 0x6c, 0xfc,\n  0x39, 0xfc, 0x93, 0xfc, 0x3e, 0xfd, 0x00, 0xfe, 0xe0, 0xfe, 0xe1, 0xff,\n  0x91, 0x00, 0x19, 0x01, 0xab, 0x01, 0x34, 0x02, 0x63, 0x02, 0x83, 0x02,\n  0xa0, 0x02, 0x73, 0x02, 0xde, 0x01, 0x2c, 0x01, 0x9e, 0x00, 0x0f, 0x00,\n  0xc0, 0xff, 0x6d, 0xff, 0x3b, 0xff, 0x2f, 0xff, 0x60, 0xff, 0x64, 0xff,\n  0x55, 0xff, 0x7b, 0xff, 0x9c, 0xff, 0x8b, 0xff, 0x32, 0xff, 0xbb, 0xfe,\n  0xce, 0xfe, 0xfb, 0xfe, 0x2c, 0xff, 0x68, 0xff, 0xc9, 0xff, 0x23, 0x00,\n  0x4b, 0x00, 0x55, 0x00, 0xa0, 0x00, 0xef, 0x00, 0x33, 0x01, 0x98, 0x01,\n  0x43, 0x02, 0xf9, 0x02, 0x45, 0x03, 0x22, 0x03, 0xf5, 0x02, 0xb9, 0x02,\n  0x78, 0x02, 0x24, 0x02, 0xb2, 0x01, 0x4a, 0x01, 0xf0, 0x00, 0x3f, 0x00,\n  0x77, 0xff, 0xd5, 0xfe, 0x24, 0xfe, 0x95, 0xfd, 0x44, 0xfd, 0xce, 0xfc,\n  0x22, 0xfc, 0xad, 0xfb, 0x8a, 0xfb, 0x7e, 0xfb, 0x90, 0xfb, 0x79, 0xfb,\n  0x66, 0xfb, 0xdc, 0xfb, 0x65, 0xfc, 0x0f, 0xfd, 0xac, 0xfd, 0x33, 0xfe,\n  0xa6, 0xfe, 0x4b, 0xff, 0xd9, 0xff, 0x28, 0x00, 0x98, 0x00, 0x18, 0x01,\n  0xc6, 0x01, 0xb3, 0x02, 0x61, 0x03, 0xa5, 0x03, 0xfb, 0x03, 0xcd, 0x04,\n  0xc3, 0x05, 0x74, 0x06, 0x39, 0x07, 0x9b, 0x07, 0x98, 0x07, 0x1f, 0x07,\n  0x7b, 0x06, 0xaf, 0x05, 0xf9, 0x04, 0xb5, 0x04, 0xe9, 0x03, 0xba, 0x02,\n  0x09, 0x01, 0x5c, 0xff, 0xcf, 0xfd, 0x8a, 0xfc, 0x82, 0xfb, 0xc3, 0xfa,\n  0x4a, 0xfa, 0xcf, 0xf9, 0xaa, 0xf9, 0xd0, 0xf9, 0x41, 0xfa, 0xbe, 0xfa,\n  0xc9, 0xfa, 0xb7, 0xfa, 0xad, 0xfa, 0xc4, 0xfa, 0x13, 0xfb, 0x88, 0xfb,\n  0x2c, 0xfc, 0x6e, 0xfc, 0xd0, 0xfc, 0x4d, 0xfd, 0xfe, 0xfd, 0xae, 0xfe,\n  0x48, 0xff, 0x03, 0x00, 0x9c, 0x00, 0x69, 0x01, 0xea, 0x01, 0x77, 0x02,\n  0x4b, 0x03, 0xfc, 0x03, 0x74, 0x04, 0xa9, 0x04, 0x27, 0x05, 0xab, 0x05,\n  0xe6, 0x05, 0x7f, 0x05, 0xdc, 0x04, 0x35, 0x04, 0x99, 0x03, 0x98, 0x02,\n  0x88, 0x01, 0xfa, 0x00, 0x96, 0x00, 0xf0, 0xff, 0x93, 0xff, 0x49, 0xff,\n  0x19, 0xff, 0x07, 0xff, 0xcd, 0xfe, 0x71, 0xfe, 0xdc, 0xfd, 0x8c, 0xfd,\n  0x28, 0xfd, 0xf3, 0xfc, 0x0e, 0xfd, 0x80, 0xfd, 0xed, 0xfd, 0x09, 0xfe,\n  0x2e, 0xfe, 0x5b, 0xfe, 0x61, 0xfe, 0x76, 0xfe, 0xa4, 0xfe, 0xec, 0xfe,\n  0x5f, 0xff, 0xa6, 0xff, 0xe0, 0xff, 0x09, 0x00, 0xf1, 0xff, 0xa4, 0xff,\n  0x46, 0xff, 0xf7, 0xfe, 0x86, 0xfe, 0x7a, 0xfe, 0x70, 0xfe, 0xba, 0xfe,\n  0x27, 0xff, 0xab, 0xff, 0x30, 0x00, 0xab, 0x00, 0x6a, 0x01, 0x28, 0x02,\n  0xbf, 0x02, 0x3d, 0x03, 0x66, 0x03, 0x8c, 0x03, 0xa2, 0x03, 0x6e, 0x03,\n  0x5f, 0x03, 0x68, 0x03, 0x17, 0x03, 0x7d, 0x02, 0xdb, 0x01, 0x0b, 0x01,\n  0x66, 0x00, 0xd5, 0xff, 0x38, 0xff, 0x8e, 0xfe, 0xf3, 0xfd, 0x92, 0xfd,\n  0x5b, 0xfd, 0x96, 0xfd, 0xb8, 0xfd, 0x84, 0xfd, 0x1c, 0xfd, 0xc5, 0xfc,\n  0xcb, 0xfc, 0xe4, 0xfc, 0x26, 0xfd, 0x7f, 0xfd, 0x94, 0xfd, 0x98, 0xfd,\n  0xef, 0xfd, 0x2c, 0xfe, 0x48, 0xfe, 0x95, 0xfe, 0xe1, 0xfe, 0x62, 0xff,\n  0xb9, 0xff, 0xd7, 0xff, 0x18, 0x00, 0x68, 0x00, 0xb6, 0x00, 0x05, 0x01,\n  0x2b, 0x01, 0x49, 0x01, 0x62, 0x01, 0x6e, 0x01, 0x2a, 0x01, 0xf8, 0x00,\n  0xdb, 0x00, 0xe7, 0x00, 0x2d, 0x01, 0x3c, 0x01, 0x1f, 0x01, 0x04, 0x01,\n  0x1b, 0x01, 0x0b, 0x01, 0xa6, 0x00, 0x7d, 0x00, 0x27, 0x00, 0xec, 0xff,\n  0xde, 0xff, 0xa2, 0xff, 0x4f, 0xff, 0x10, 0xff, 0xc9, 0xfe, 0xcd, 0xfe,\n  0xe6, 0xfe, 0x22, 0xff, 0x4f, 0xff, 0x95, 0xff, 0xdf, 0xff, 0x05, 0x00,\n  0x07, 0x00, 0xe0, 0xff, 0xbd, 0xff, 0xb6, 0xff, 0x7f, 0xff, 0x63, 0xff,\n  0x8a, 0xff, 0xff, 0xff, 0xa7, 0x00, 0x76, 0x01, 0x6b, 0x02, 0x55, 0x03,\n  0xf5, 0x03, 0x49, 0x04, 0xa5, 0x04, 0xe2, 0x04, 0xab, 0x04, 0xf7, 0x03,\n  0x5a, 0x03, 0xf8, 0x02, 0x42, 0x02, 0x4c, 0x01, 0x86, 0x00, 0xd7, 0xff,\n  0x23, 0xff, 0x8f, 0xfe, 0x12, 0xfe, 0xa7, 0xfd, 0x7b, 0xfd, 0x7a, 0xfd,\n  0xa5, 0xfd, 0xdc, 0xfd, 0x22, 0xfe, 0x93, 0xfe, 0xee, 0xfe, 0xc3, 0xfe,\n  0x63, 0xfe, 0xcf, 0xfd, 0x3a, 0xfd, 0xbe, 0xfc, 0x60, 0xfc, 0x5e, 0xfc,\n  0x7b, 0xfc, 0x01, 0xfd, 0xbb, 0xfd, 0x4a, 0xfe, 0x93, 0xfe, 0x20, 0xff,\n  0x87, 0xff, 0xb3, 0xff, 0xa8, 0xff, 0x8f, 0xff, 0x48, 0xff, 0x15, 0xff,\n  0xfe, 0xfe, 0x0f, 0xff, 0x6b, 0xff, 0xf6, 0xff, 0x93, 0x00, 0x54, 0x01,\n  0x43, 0x02, 0x5c, 0x03, 0x41, 0x04, 0xb0, 0x04, 0xed, 0x04, 0x95, 0x04,\n  0x05, 0x04, 0x70, 0x03, 0xec, 0x02, 0x5d, 0x02, 0xcb, 0x01, 0x51, 0x01,\n  0xff, 0x00, 0x59, 0x00, 0x98, 0xff, 0xed, 0xfe, 0xae, 0xfe, 0x6e, 0xfe,\n  0x16, 0xfe, 0xf4, 0xfd, 0xf3, 0xfd, 0xf6, 0xfd, 0x46, 0xfe, 0xb2, 0xfe,\n  0x09, 0xff, 0x58, 0xff, 0xa3, 0xff, 0xed, 0xff, 0xe6, 0xff, 0xb6, 0xff,\n  0x94, 0xff, 0x49, 0xff, 0xc3, 0xfe, 0x98, 0xfe, 0x90, 0xfe, 0x79, 0xfe,\n  0x6a, 0xfe, 0x5e, 0xfe, 0x91, 0xfe, 0xce, 0xfe, 0x60, 0xff, 0xcd, 0xff,\n  0xd9, 0xff, 0xee, 0xff, 0x1f, 0x00, 0x1c, 0x00, 0x46, 0x00, 0xa4, 0x00,\n  0xdb, 0x00, 0x16, 0x01, 0x2a, 0x01, 0x05, 0x01, 0xac, 0x00, 0x4a, 0x00,\n  0xdf, 0xff, 0xd5, 0xff, 0x09, 0x00, 0x2b, 0x00, 0x32, 0x00, 0x34, 0x00,\n  0x2d, 0x00, 0x19, 0x00, 0xd8, 0xff, 0xa0, 0xff, 0x89, 0xff, 0x9c, 0xff,\n  0x98, 0xff, 0xad, 0xff, 0x92, 0xff, 0x2b, 0xff, 0xe7, 0xfe, 0x13, 0xff,\n  0x23, 0xff, 0xef, 0xfe, 0xd0, 0xfe, 0xf8, 0xfe, 0x0b, 0xff, 0x14, 0xff,\n  0x71, 0xff, 0x18, 0x00, 0xc4, 0x00, 0x70, 0x01, 0xf0, 0x01, 0x53, 0x02,\n  0x28, 0x02, 0xe5, 0x01, 0x87, 0x01, 0x04, 0x01, 0xbe, 0x00, 0xc1, 0x00,\n  0xc8, 0x00, 0xa8, 0x00, 0x5a, 0x00, 0xec, 0xff, 0xc4, 0xff, 0xc7, 0xff,\n  0xe8, 0xff, 0x16, 0x00, 0x66, 0x00, 0xb6, 0x00, 0xc4, 0x00, 0xe6, 0x00,\n  0xf5, 0x00, 0xfd, 0x00, 0xcd, 0x00, 0x6c, 0x00, 0xea, 0xff, 0x5c, 0xff,\n  0xde, 0xfe, 0x8e, 0xfe, 0x61, 0xfe, 0x2a, 0xfe, 0xcf, 0xfd, 0x98, 0xfd,\n  0x84, 0xfd, 0x5b, 0xfd, 0x41, 0xfd, 0x29, 0xfd, 0x30, 0xfd, 0x70, 0xfd,\n  0xd7, 0xfd, 0x3a, 0xfe, 0x31, 0xfe, 0x72, 0xfe, 0xfd, 0xfe, 0x9a, 0xff,\n  0x5b, 0x00, 0x30, 0x01, 0x0f, 0x02, 0x9a, 0x02, 0xe4, 0x02, 0xd2, 0x02,\n  0xa5, 0x02, 0x6c, 0x02, 0x31, 0x02, 0x35, 0x02, 0x17, 0x02, 0xb0, 0x01,\n  0x3d, 0x01, 0xdb, 0x00, 0x88, 0x00, 0x38, 0x00, 0xf7, 0xff, 0x73, 0xff,\n  0x3f, 0xff, 0x0b, 0xff, 0xe9, 0xfe, 0x0d, 0xff, 0x43, 0xff, 0x75, 0xff,\n  0xa5, 0xff, 0xd7, 0xff, 0x75, 0x00, 0x3f, 0x01, 0xcd, 0x01, 0xfa, 0x01,\n  0xc0, 0x01, 0x3a, 0x01, 0xbf, 0x00, 0x51, 0x00, 0xff, 0xff, 0xb7, 0xff,\n  0x45, 0xff, 0xa8, 0xfe, 0x18, 0xfe, 0x9e, 0xfd, 0x57, 0xfd, 0x33, 0xfd,\n  0x2e, 0xfd, 0x83, 0xfd, 0xf8, 0xfd, 0x7e, 0xfe, 0xe3, 0xfe, 0x09, 0xff,\n  0x09, 0xff, 0x5a, 0xff, 0xe3, 0xff, 0x2a, 0x00, 0xb9, 0x00, 0x44, 0x01,\n  0xd5, 0x01, 0xed, 0x01, 0x0b, 0x02, 0xfa, 0x01, 0x90, 0x01, 0x28, 0x01,\n  0xf1, 0x00, 0x12, 0x01, 0x30, 0x01, 0x18, 0x01, 0x87, 0x00, 0x49, 0x00,\n  0x2a, 0x00, 0x04, 0x00, 0x24, 0x00, 0x37, 0x00, 0x54, 0x00, 0x5d, 0x00,\n  0x41, 0x00, 0x52, 0x00, 0x5c, 0x00, 0x35, 0x00, 0xf6, 0xff, 0xbe, 0xff,\n  0xd3, 0xff, 0x21, 0x00, 0x63, 0x00, 0x69, 0x00, 0x2a, 0x00, 0xe3, 0xff,\n  0x92, 0xff, 0x80, 0xff, 0xb9, 0xff, 0xc4, 0xff, 0x96, 0xff, 0x39, 0xff,\n  0xe1, 0xfe, 0xb1, 0xfe, 0xbd, 0xfe, 0xf5, 0xfe, 0x50, 0xff, 0xcc, 0xff,\n  0x4d, 0x00, 0x72, 0x00, 0x24, 0x00, 0xc3, 0xff, 0x6e, 0xff, 0x45, 0xff,\n  0x2b, 0xff, 0x26, 0xff, 0x52, 0xff, 0x8d, 0xff, 0xe9, 0xff, 0x31, 0x00,\n  0x84, 0x00, 0xf9, 0x00, 0x53, 0x01, 0x70, 0x01, 0x42, 0x01, 0xeb, 0x00,\n  0x90, 0x00, 0x3e, 0x00, 0x31, 0x00, 0x50, 0x00, 0x7b, 0x00, 0x5d, 0x00,\n  0x8b, 0x00, 0xb2, 0x00, 0xdd, 0x00, 0x67, 0x01, 0xcc, 0x01, 0xbf, 0x01,\n  0x7e, 0x01, 0x48, 0x01, 0x0e, 0x01, 0xdf, 0x00, 0x7b, 0x00, 0xf7, 0xff,\n  0x98, 0xff, 0x0a, 0xff, 0x8e, 0xfe, 0x61, 0xfe, 0x81, 0xfe, 0x9f, 0xfe,\n  0x9f, 0xfe, 0xa3, 0xfe, 0x90, 0xfe, 0x79, 0xfe, 0x53, 0xfe, 0x49, 0xfe,\n  0x39, 0xfe, 0x50, 0xfe, 0x44, 0xfe, 0x7f, 0xfe, 0xb1, 0xfe, 0xee, 0xfe,\n  0x2e, 0xff, 0x50, 0xff, 0xa1, 0xff, 0xa6, 0xff, 0x7f, 0xff, 0x47, 0xff,\n  0x53, 0xff, 0x69, 0xff, 0x70, 0xff, 0x8d, 0xff, 0xb9, 0xff, 0x01, 0x00,\n  0x84, 0x00, 0xea, 0x00, 0x5d, 0x01, 0xeb, 0x01, 0x7f, 0x02, 0x24, 0x03,\n  0xb0, 0x03, 0x15, 0x04, 0x2c, 0x04, 0x01, 0x04, 0xbf, 0x03, 0x75, 0x03,\n  0x05, 0x03, 0xac, 0x02, 0x1b, 0x02, 0x63, 0x01, 0xad, 0x00, 0xa3, 0xff,\n  0x79, 0xfe, 0x8f, 0xfd, 0xea, 0xfc, 0x4c, 0xfc, 0xd1, 0xfb, 0xbc, 0xfb,\n  0xab, 0xfb, 0xb0, 0xfb, 0xb4, 0xfb, 0xec, 0xfb, 0x2f, 0xfc, 0x61, 0xfc,\n  0xfd, 0xfc, 0xcd, 0xfd, 0x9a, 0xfe, 0x64, 0xff, 0x31, 0x00, 0xf5, 0x00,\n  0xb8, 0x01, 0x59, 0x02, 0xb3, 0x02, 0x09, 0x03, 0xc4, 0x02, 0x46, 0x02,\n  0xc3, 0x01, 0x5d, 0x01, 0xfc, 0x00, 0xcf, 0x00, 0xdc, 0x00, 0x1d, 0x01,\n  0x95, 0x01, 0xe9, 0x01, 0xfb, 0x01, 0xb8, 0x01, 0x9f, 0x01, 0x4d, 0x01,\n  0x04, 0x01, 0xe5, 0x00, 0xf7, 0x00, 0xd1, 0x00, 0x9b, 0x00, 0x3b, 0x00,\n  0xa8, 0xff, 0x33, 0xff, 0xd8, 0xfe, 0xf1, 0xfe, 0x2a, 0xff, 0x7d, 0xff,\n  0x91, 0xff, 0xac, 0xff, 0xb3, 0xff, 0x9a, 0xff, 0xaa, 0xff, 0xca, 0xff,\n  0xe8, 0xff, 0xb6, 0xff, 0x63, 0xff, 0x0a, 0xff, 0xf4, 0xfe, 0xfc, 0xfe,\n  0xf6, 0xfe, 0x1f, 0xff, 0x0b, 0xff, 0x0d, 0xff, 0x44, 0xff, 0x15, 0xff,\n  0xdd, 0xfe, 0xdd, 0xfe, 0x0d, 0xff, 0x75, 0xff, 0xe9, 0xff, 0x45, 0x00,\n  0x63, 0x00, 0x56, 0x00, 0x73, 0x00, 0x89, 0x00, 0xa1, 0x00, 0xc9, 0x00,\n  0xb6, 0x00, 0x7b, 0x00, 0x3b, 0x00, 0x21, 0x00, 0x1a, 0x00, 0x1b, 0x00,\n  0x12, 0x00, 0xfe, 0xff, 0xd7, 0xff, 0x87, 0xff, 0x70, 0xff, 0x66, 0xff,\n  0xff, 0xfe, 0xb6, 0xfe, 0x79, 0xfe, 0x1e, 0xfe, 0xdc, 0xfd, 0xf8, 0xfd,\n  0x3d, 0xfe, 0x83, 0xfe, 0xdd, 0xfe, 0x1b, 0xff, 0x5c, 0xff, 0x67, 0xff,\n  0xa3, 0xff, 0xfa, 0xff, 0x5a, 0x00, 0x48, 0x00, 0x23, 0x00, 0x42, 0x00,\n  0x7a, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x99, 0x00, 0x72, 0x00, 0x97, 0x00,\n  0x14, 0x01, 0xaa, 0x01, 0x27, 0x02, 0x96, 0x02, 0x19, 0x03, 0x47, 0x03,\n  0x49, 0x03, 0x50, 0x03, 0x51, 0x03, 0x46, 0x03, 0xd0, 0x02, 0x1d, 0x02,\n  0x53, 0x01, 0x9c, 0x00, 0x1d, 0x00, 0x9e, 0xff, 0x0c, 0xff, 0x8e, 0xfe,\n  0x46, 0xfe, 0x08, 0xfe, 0xfc, 0xfd, 0x0c, 0xfe, 0x2b, 0xfe, 0x42, 0xfe,\n  0x2c, 0xfe, 0x25, 0xfe, 0x5c, 0xfe, 0xaa, 0xfe, 0x00, 0xff, 0x71, 0xff,\n  0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0xb8, 0xff, 0xbc, 0xff, 0xd6, 0xff,\n  0xf1, 0xff, 0x06, 0x00, 0xfb, 0xff, 0xf7, 0xff, 0xec, 0xff, 0xda, 0xff,\n  0xc2, 0xff, 0x76, 0xff, 0x42, 0xff, 0x44, 0xff, 0x88, 0xff, 0xa0, 0xff,\n  0x69, 0xff, 0x48, 0xff, 0x31, 0xff, 0x4c, 0xff, 0x51, 0xff, 0x2f, 0xff,\n  0x29, 0xff, 0x24, 0xff, 0x00, 0xff, 0x27, 0xff, 0x7a, 0xff, 0xe8, 0xff,\n  0xa8, 0x00, 0x50, 0x01, 0xc7, 0x01, 0x05, 0x02, 0x1f, 0x02, 0x0a, 0x02,\n  0xce, 0x01, 0xad, 0x01, 0x54, 0x01, 0xcb, 0x00, 0x66, 0x00, 0xfd, 0xff,\n  0xc7, 0xff, 0xaf, 0xff, 0xa5, 0xff, 0x9c, 0xff, 0x66, 0xff, 0x56, 0xff,\n  0x71, 0xff, 0x7d, 0xff, 0x52, 0xff, 0x13, 0xff, 0xff, 0xfe, 0xf2, 0xfe,\n  0xdf, 0xfe, 0xc4, 0xfe, 0xbf, 0xfe, 0xa3, 0xfe, 0xba, 0xfe, 0xe0, 0xfe,\n  0x24, 0xff, 0x76, 0xff, 0xca, 0xff, 0x1a, 0x00, 0x4d, 0x00, 0x59, 0x00,\n  0x64, 0x00, 0x46, 0x00, 0x10, 0x00, 0x52, 0x00, 0x87, 0x00, 0x97, 0x00,\n  0xdd, 0x00, 0x2f, 0x01, 0x16, 0x01, 0xd0, 0x00, 0x8d, 0x00, 0x88, 0x00,\n  0x94, 0x00, 0x6b, 0x00, 0x73, 0x00, 0x84, 0x00, 0xa4, 0x00, 0xb4, 0x00,\n  0xae, 0x00, 0x9b, 0x00, 0x81, 0x00, 0x50, 0x00, 0xf5, 0xff, 0xd4, 0xff,\n  0x98, 0xff, 0x90, 0xff, 0xdd, 0xff, 0x3a, 0x00, 0xc1, 0x00, 0x48, 0x01,\n  0x83, 0x01, 0x51, 0x01, 0xfe, 0x00, 0x99, 0x00, 0x50, 0x00, 0x3b, 0x00,\n  0x39, 0x00, 0x2d, 0x00, 0x10, 0x00, 0xd5, 0xff, 0x71, 0xff, 0x12, 0xff,\n  0xba, 0xfe, 0xb4, 0xfe, 0xb2, 0xfe, 0x7a, 0xfe, 0x2e, 0xfe, 0x07, 0xfe,\n  0xce, 0xfd, 0xc2, 0xfd, 0xc7, 0xfd, 0xe2, 0xfd, 0x44, 0xfe, 0xd1, 0xfe,\n  0x7f, 0xff, 0x1f, 0x00, 0xe6, 0x00, 0xdd, 0x01, 0x6d, 0x02, 0xc0, 0x02,\n  0xc5, 0x02, 0x9c, 0x02, 0x7e, 0x02, 0x5e, 0x02, 0x2d, 0x02, 0xe1, 0x01,\n  0xa0, 0x01, 0x68, 0x01, 0x5e, 0x01, 0x86, 0x01, 0xb7, 0x01, 0xbf, 0x01,\n  0xc1, 0x01, 0x99, 0x01, 0x47, 0x01, 0xdc, 0x00, 0x61, 0x00, 0xd4, 0xff,\n  0x62, 0xff, 0xf2, 0xfe, 0x89, 0xfe, 0x46, 0xfe, 0xf5, 0xfd, 0x9a, 0xfd,\n  0x52, 0xfd, 0x21, 0xfd, 0xe1, 0xfc, 0xbe, 0xfc, 0xba, 0xfc, 0xbc, 0xfc,\n  0x13, 0xfd, 0x78, 0xfd, 0xf7, 0xfd, 0xa4, 0xfe, 0x2f, 0xff, 0x88, 0xff,\n  0xfe, 0xff, 0x50, 0x00, 0x77, 0x00, 0x8d, 0x00, 0xa2, 0x00, 0xc5, 0x00,\n  0xd6, 0x00, 0x14, 0x01, 0x5d, 0x01, 0x8a, 0x01, 0x9b, 0x01, 0xc5, 0x01,\n  0x27, 0x02, 0x44, 0x02, 0x1a, 0x02, 0x9d, 0x01, 0x1b, 0x01, 0xb6, 0x00,\n  0x37, 0x00, 0xc5, 0xff, 0x60, 0xff, 0x18, 0xff, 0xc3, 0xfe, 0x8a, 0xfe,\n  0x3f, 0xfe, 0xde, 0xfd, 0x8f, 0xfd, 0x68, 0xfd, 0x87, 0xfd, 0xf0, 0xfd,\n  0x6a, 0xfe, 0x0f, 0xff, 0xd1, 0xff, 0x5b, 0x00, 0x63, 0x00, 0x69, 0x00,\n  0x6b, 0x00, 0x81, 0x00, 0xb4, 0x00, 0xdf, 0x00, 0x0e, 0x01, 0x31, 0x01,\n  0x30, 0x01, 0x3d, 0x01, 0x6c, 0x01, 0xb6, 0x01, 0x3d, 0x02, 0xd3, 0x02,\n  0x69, 0x03, 0xd0, 0x03, 0xc0, 0x03, 0x5d, 0x03, 0x20, 0x03, 0xd2, 0x02,\n  0x53, 0x02, 0xbf, 0x01, 0x46, 0x01, 0xd4, 0x00, 0x84, 0x00, 0x0f, 0x00,\n  0x66, 0xff, 0xb6, 0xfe, 0x41, 0xfe, 0xeb, 0xfd, 0x85, 0xfd, 0x36, 0xfd,\n  0x07, 0xfd, 0xed, 0xfc, 0x1c, 0xfd, 0x55, 0xfd, 0x80, 0xfd, 0x96, 0xfd,\n  0xad, 0xfd, 0xd1, 0xfd, 0x15, 0xfe, 0x87, 0xfe, 0xe1, 0xfe, 0x02, 0xff,\n  0x27, 0xff, 0x40, 0xff, 0x4e, 0xff, 0x3a, 0xff, 0xf2, 0xfe, 0xe5, 0xfe,\n  0xcc, 0xfe, 0xd2, 0xfe, 0xb7, 0xfe, 0xa8, 0xfe, 0xa7, 0xfe, 0xc6, 0xfe,\n  0xfe, 0xfe, 0x06, 0xff, 0x39, 0xff, 0x8c, 0xff, 0x0a, 0x00, 0xd1, 0x00,\n  0x87, 0x01, 0x39, 0x02, 0x2f, 0x03, 0xf5, 0x03, 0x24, 0x04, 0x40, 0x04,\n  0x2f, 0x04, 0xe2, 0x03, 0x57, 0x03, 0x7d, 0x02, 0x77, 0x01, 0x76, 0x00,\n  0xb9, 0xff, 0x36, 0xff, 0xd3, 0xfe, 0x90, 0xfe, 0x35, 0xfe, 0xc8, 0xfd,\n  0x7f, 0xfd, 0x7d, 0xfd, 0xac, 0xfd, 0x0c, 0xfe, 0xa8, 0xfe, 0xfd, 0xfe,\n  0x35, 0xff, 0x3e, 0xff, 0x2b, 0xff, 0x18, 0xff, 0x12, 0xff, 0x2f, 0xff,\n  0x63, 0xff, 0x9f, 0xff, 0x02, 0x00, 0x62, 0x00, 0xa0, 0x00, 0xd3, 0x00,\n  0xdb, 0x00, 0xf5, 0x00, 0x0f, 0x01, 0x43, 0x01, 0x8b, 0x01, 0xc5, 0x01,\n  0xee, 0x01, 0xe3, 0x01, 0xa0, 0x01, 0x4d, 0x01, 0x26, 0x01, 0x15, 0x01,\n  0xf9, 0x00, 0xdc, 0x00, 0xd5, 0x00, 0xbe, 0x00, 0x89, 0x00, 0x53, 0x00,\n  0x07, 0x00, 0xf5, 0xff, 0xf2, 0xff, 0xce, 0xff, 0xab, 0xff, 0xcd, 0xff,\n  0xf2, 0xff, 0xed, 0xff, 0xdc, 0xff, 0xc0, 0xff, 0xab, 0xff, 0x98, 0xff,\n  0xba, 0xff, 0xc4, 0xff, 0xfb, 0xff, 0x5a, 0x00, 0xd2, 0x00, 0x34, 0x01,\n  0x1a, 0x01, 0xbf, 0x00, 0x67, 0x00, 0x1f, 0x00, 0xe5, 0xff, 0xad, 0xff,\n  0x81, 0xff, 0x43, 0xff, 0xd7, 0xfe, 0x75, 0xfe, 0x2c, 0xfe, 0x05, 0xfe,\n  0xe3, 0xfd, 0xed, 0xfd, 0x13, 0xfe, 0x3e, 0xfe, 0x8d, 0xfe, 0x9b, 0xfe,\n  0x8c, 0xfe, 0x88, 0xfe, 0x86, 0xfe, 0x74, 0xfe, 0x5c, 0xfe, 0x4a, 0xfe,\n  0x63, 0xfe, 0x7a, 0xfe, 0xae, 0xfe, 0x1f, 0xff, 0xa5, 0xff, 0x32, 0x00,\n  0xb2, 0x00, 0x11, 0x01, 0x6e, 0x01, 0xe0, 0x01, 0x2f, 0x02, 0x49, 0x02,\n  0x6b, 0x02, 0xcf, 0x02, 0x2c, 0x03, 0x50, 0x03, 0x4f, 0x03, 0x35, 0x03,\n  0x09, 0x03, 0xce, 0x02, 0x87, 0x02, 0x29, 0x02, 0xbe, 0x01, 0x53, 0x01,\n  0xf1, 0x00, 0xb5, 0x00, 0x64, 0x00, 0x1e, 0x00, 0xb8, 0xff, 0x6e, 0xff,\n  0x1a, 0xff, 0xc5, 0xfe, 0x6d, 0xfe, 0x50, 0xfe, 0x6e, 0xfe, 0x9a, 0xfe,\n  0xd7, 0xfe, 0xed, 0xfe, 0xc5, 0xfe, 0x66, 0xfe, 0xec, 0xfd, 0x97, 0xfd,\n  0x43, 0xfd, 0x28, 0xfd, 0x74, 0xfd, 0xee, 0xfd, 0x4d, 0xfe, 0x7a, 0xfe,\n  0x96, 0xfe, 0xb1, 0xfe, 0xc4, 0xfe, 0xdf, 0xfe, 0xee, 0xfe, 0xf9, 0xfe,\n  0xe8, 0xfe, 0xed, 0xfe, 0x36, 0xff, 0x95, 0xff, 0xee, 0xff, 0x3c, 0x00,\n  0x8c, 0x00, 0xdd, 0x00, 0x40, 0x01, 0x7d, 0x01, 0xa4, 0x01, 0xb6, 0x01,\n  0xbe, 0x01, 0x9b, 0x01, 0x58, 0x01, 0x25, 0x01, 0x10, 0x01, 0x2d, 0x01,\n  0x47, 0x01, 0x5d, 0x01, 0x57, 0x01, 0x4e, 0x01, 0x0d, 0x01, 0x8d, 0x00,\n  0x2b, 0x00, 0xd7, 0xff, 0x86, 0xff, 0x3b, 0xff, 0x24, 0xff, 0xff, 0xfe,\n  0xca, 0xfe, 0x87, 0xfe, 0x3e, 0xfe, 0x22, 0xfe, 0x1b, 0xfe, 0x35, 0xfe,\n  0x62, 0xfe, 0xc2, 0xfe, 0x3e, 0xff, 0xb5, 0xff, 0xfe, 0xff, 0x37, 0x00,\n  0x83, 0x00, 0xbe, 0x00, 0xeb, 0x00, 0x1a, 0x01, 0x6a, 0x01, 0x9a, 0x01,\n  0x94, 0x01, 0x73, 0x01, 0x37, 0x01, 0xbe, 0x00, 0x17, 0x00, 0x7d, 0xff,\n  0x00, 0xff, 0xc9, 0xfe, 0xc7, 0xfe, 0xc8, 0xfe, 0xe9, 0xfe, 0xfc, 0xfe,\n  0xfd, 0xfe, 0x0a, 0xff, 0x2e, 0xff, 0x52, 0xff, 0x70, 0xff, 0x7a, 0xff,\n  0x8c, 0xff, 0xc4, 0xff, 0x1a, 0x00, 0x94, 0x00, 0xe7, 0x00, 0xfc, 0x00,\n  0x04, 0x01, 0x25, 0x01, 0x2f, 0x01, 0x68, 0x01, 0xb1, 0x01, 0xd2, 0x01,\n  0x9a, 0x01, 0x4f, 0x01, 0xf9, 0x00, 0xb2, 0x00, 0x56, 0x00, 0xef, 0xff,\n  0xb3, 0xff, 0xb1, 0xff, 0xac, 0xff, 0x9c, 0xff, 0x81, 0xff, 0x71, 0xff,\n  0x70, 0xff, 0x8f, 0xff, 0x8e, 0xff, 0x7b, 0xff, 0x47, 0xff, 0x39, 0xff,\n  0x61, 0xff, 0x90, 0xff, 0xb7, 0xff, 0xc8, 0xff, 0xe4, 0xff, 0x26, 0x00,\n  0x4c, 0x00, 0x9d, 0x00, 0x34, 0x01, 0x01, 0x02, 0xc2, 0x02, 0x53, 0x03,\n  0xc6, 0x03, 0xc1, 0x03, 0x5f, 0x03, 0xe4, 0x02, 0x78, 0x02, 0xf6, 0x01,\n  0x7b, 0x01, 0xd3, 0x00, 0x0b, 0x00, 0x3e, 0xff, 0x98, 0xfe, 0x1f, 0xfe,\n  0xaa, 0xfd, 0x58, 0xfd, 0x14, 0xfd, 0xd0, 0xfc, 0xb2, 0xfc, 0xa1, 0xfc,\n  0xa1, 0xfc, 0xcf, 0xfc, 0x18, 0xfd, 0x70, 0xfd, 0xa9, 0xfd, 0x19, 0xfe,\n  0x99, 0xfe, 0x1c, 0xff, 0x95, 0xff, 0xf3, 0xff, 0x29, 0x00, 0x27, 0x00,\n  0x2c, 0x00, 0x4e, 0x00, 0x44, 0x00, 0x10, 0x00, 0xe9, 0xff, 0xd2, 0xff,\n  0xe1, 0xff, 0xf2, 0xff, 0xd1, 0xff, 0x89, 0xff, 0x4d, 0xff, 0x59, 0xff,\n  0xd1, 0xff, 0x7b, 0x00, 0x2d, 0x01, 0xb6, 0x01, 0x31, 0x02, 0x97, 0x02,\n  0xfb, 0x02, 0x86, 0x03, 0x1a, 0x04, 0x74, 0x04, 0x55, 0x04, 0xbf, 0x03,\n  0xf8, 0x02, 0x1c, 0x02, 0x69, 0x01, 0xcf, 0x00, 0x41, 0x00, 0xa3, 0xff,\n  0xf3, 0xfe, 0x5d, 0xfe, 0x03, 0xfe, 0x21, 0xfe, 0x67, 0xfe, 0xb3, 0xfe,\n  0xe5, 0xfe, 0x27, 0xff, 0x52, 0xff, 0x57, 0xff, 0x3a, 0xff, 0x01, 0xff,\n  0xc4, 0xfe, 0x80, 0xfe, 0x47, 0xfe, 0x2c, 0xfe, 0x32, 0xfe, 0x3a, 0xfe,\n  0x26, 0xfe, 0x34, 0xfe, 0x73, 0xfe, 0xa3, 0xfe, 0xd5, 0xfe, 0x04, 0xff,\n  0x56, 0xff, 0xaa, 0xff, 0xca, 0xff, 0xe7, 0xff, 0x0f, 0x00, 0x44, 0x00,\n  0x57, 0x00, 0x80, 0x00, 0xac, 0x00, 0xf1, 0x00, 0x3c, 0x01, 0xa2, 0x01,\n  0x21, 0x02, 0xa9, 0x02, 0xd3, 0x02, 0xe0, 0x02, 0x09, 0x03, 0xed, 0x02,\n  0x90, 0x02, 0xee, 0x01, 0x42, 0x01, 0xb6, 0x00, 0x55, 0x00, 0xfa, 0xff,\n  0x9a, 0xff, 0x44, 0xff, 0x0a, 0xff, 0xe5, 0xfe, 0xcc, 0xfe, 0xbd, 0xfe,\n  0xae, 0xfe, 0xca, 0xfe, 0x09, 0xff, 0x3b, 0xff, 0x30, 0xff, 0xfa, 0xfe,\n  0xaf, 0xfe, 0x69, 0xfe, 0x2c, 0xfe, 0x02, 0xfe, 0xf2, 0xfd, 0x19, 0xfe,\n  0x64, 0xfe, 0x99, 0xfe, 0xbd, 0xfe, 0xc8, 0xfe, 0xef, 0xfe, 0x2f, 0xff,\n  0x7f, 0xff, 0xa6, 0xff, 0xcb, 0xff, 0xe3, 0xff, 0xef, 0xff, 0xe1, 0xff,\n  0xe7, 0xff, 0xe7, 0xff, 0xdd, 0xff, 0xbb, 0xff, 0x9f, 0xff, 0xb1, 0xff,\n  0x0b, 0x00, 0x5c, 0x00, 0x97, 0x00, 0xc5, 0x00, 0x17, 0x01, 0x63, 0x01,\n  0x91, 0x01, 0xa8, 0x01, 0xc2, 0x01, 0xfb, 0x01, 0x4b, 0x02, 0xaf, 0x02,\n  0x26, 0x03, 0x7a, 0x03, 0x7b, 0x03, 0x58, 0x03, 0xf4, 0x02, 0x81, 0x02,\n  0xfc, 0x01, 0x48, 0x01, 0x98, 0x00, 0x06, 0x00, 0x88, 0xff, 0x25, 0xff,\n  0xb7, 0xfe, 0x6b, 0xfe, 0x13, 0xfe, 0xc6, 0xfd, 0xa7, 0xfd, 0xb1, 0xfd,\n  0xd5, 0xfd, 0x09, 0xfe, 0x58, 0xfe, 0x90, 0xfe, 0xef, 0xfe, 0x4e, 0xff,\n  0xa1, 0xff, 0x73, 0xff, 0x12, 0xff, 0x9e, 0xfe, 0x52, 0xfe, 0x52, 0xfe,\n  0x7d, 0xfe, 0xc0, 0xfe, 0xcf, 0xfe, 0xe7, 0xfe, 0xdc, 0xfe, 0xac, 0xfe,\n  0x87, 0xfe, 0x72, 0xfe, 0x7d, 0xfe, 0xa0, 0xfe, 0xe6, 0xfe, 0x57, 0xff,\n  0xd4, 0xff, 0x43, 0x00, 0x9d, 0x00, 0x10, 0x01, 0xb9, 0x01, 0x41, 0x02,\n  0x87, 0x02, 0x90, 0x02, 0x5f, 0x02, 0xfd, 0x01, 0x9c, 0x01, 0x41, 0x01,\n  0xf0, 0x00, 0xab, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0xc7, 0x00, 0x1d, 0x01,\n  0x49, 0x01, 0x61, 0x01, 0x63, 0x01, 0x63, 0x01, 0x56, 0x01, 0x2a, 0x01,\n  0xd1, 0x00, 0x40, 0x00, 0x92, 0xff, 0xdf, 0xfe, 0x43, 0xfe, 0xcd, 0xfd,\n  0x8c, 0xfd, 0x8b, 0xfd, 0xb9, 0xfd, 0xf4, 0xfd, 0x29, 0xfe, 0x56, 0xfe,\n  0x81, 0xfe, 0x9c, 0xfe, 0xd9, 0xfe, 0x10, 0xff, 0x40, 0xff, 0x54, 0xff,\n  0x5b, 0xff, 0x4e, 0xff, 0x67, 0xff, 0xc8, 0xff, 0x2c, 0x00, 0x8e, 0x00,\n  0xde, 0x00, 0x08, 0x01, 0x0f, 0x01, 0xf7, 0x00, 0xcd, 0x00, 0x83, 0x00,\n  0x59, 0x00, 0x49, 0x00, 0x5c, 0x00, 0x74, 0x00, 0xa7, 0x00, 0xe1, 0x00,\n  0x25, 0x01, 0x61, 0x01, 0x60, 0x01, 0x5d, 0x01, 0x42, 0x01, 0x1b, 0x01,\n  0x20, 0x01, 0x0b, 0x01, 0xf3, 0x00, 0xcb, 0x00, 0xab, 0x00, 0x91, 0x00,\n  0x9d, 0x00, 0xe0, 0x00, 0xdd, 0x00, 0xb6, 0x00, 0xa1, 0x00, 0x86, 0x00,\n  0x80, 0x00, 0x69, 0x00, 0x01, 0x00, 0x77, 0xff, 0x0c, 0xff, 0xbe, 0xfe,\n  0x8e, 0xfe, 0x71, 0xfe, 0x57, 0xfe, 0x6e, 0xfe, 0x9d, 0xfe, 0xd2, 0xfe,\n  0x10, 0xff, 0x54, 0xff, 0x73, 0xff, 0xa0, 0xff, 0xb2, 0xff, 0xbb, 0xff,\n  0xd9, 0xff, 0xe2, 0xff, 0xde, 0xff, 0xe5, 0xff, 0xf7, 0xff, 0x12, 0x00,\n  0x17, 0x00, 0xe3, 0xff, 0xa3, 0xff, 0x51, 0xff, 0x0d, 0xff, 0xf0, 0xfe,\n  0x02, 0xff, 0x18, 0xff, 0x56, 0xff, 0x91, 0xff, 0xc4, 0xff, 0xd1, 0xff,\n  0xad, 0xff, 0x6f, 0xff, 0x34, 0xff, 0x01, 0xff, 0xd3, 0xfe, 0xa8, 0xfe,\n  0x9d, 0xfe, 0xa3, 0xfe, 0xc1, 0xfe, 0x04, 0xff, 0x6d, 0xff, 0xfa, 0xff,\n  0xb4, 0x00, 0x68, 0x01, 0xf3, 0x01, 0x9b, 0x02, 0x4f, 0x03, 0xb5, 0x03,\n  0xd3, 0x03, 0xc7, 0x03, 0xa9, 0x03, 0x7a, 0x03, 0x20, 0x03, 0xa9, 0x02,\n  0x18, 0x02, 0xa6, 0x01, 0x35, 0x01, 0xb6, 0x00, 0x46, 0x00, 0xd3, 0xff,\n  0x76, 0xff, 0xea, 0xfe, 0x77, 0xfe, 0x2f, 0xfe, 0xfc, 0xfd, 0xce, 0xfd,\n  0x8e, 0xfd, 0x5a, 0xfd, 0x1e, 0xfd, 0x02, 0xfd, 0xf9, 0xfc, 0x17, 0xfd,\n  0x59, 0xfd, 0x8b, 0xfd, 0xa9, 0xfd, 0xb4, 0xfd, 0xe8, 0xfd, 0x1e, 0xfe,\n  0x54, 0xfe, 0x84, 0xfe, 0xec, 0xfe, 0x60, 0xff, 0xe8, 0xff, 0x7e, 0x00,\n  0x2e, 0x01, 0xd6, 0x01, 0x62, 0x02, 0xe7, 0x02, 0x53, 0x03, 0xa8, 0x03,\n  0xbf, 0x03, 0x9a, 0x03, 0x6e, 0x03, 0x3d, 0x03, 0xff, 0x02, 0xc8, 0x02,\n  0x98, 0x02, 0x67, 0x02, 0x38, 0x02, 0xf8, 0x01, 0x93, 0x01, 0x3b, 0x01,\n  0xef, 0x00, 0xab, 0x00, 0x47, 0x00, 0xce, 0xff, 0x70, 0xff, 0xf3, 0xfe,\n  0x6b, 0xfe, 0x02, 0xfe, 0xb5, 0xfd, 0x90, 0xfd, 0x9b, 0xfd, 0xc9, 0xfd,\n  0xda, 0xfd, 0xf2, 0xfd, 0xff, 0xfd, 0xea, 0xfd, 0xe8, 0xfd, 0xfa, 0xfd,\n  0x3c, 0xfe, 0x55, 0xfe, 0x64, 0xfe, 0x71, 0xfe, 0x8b, 0xfe, 0xb6, 0xfe,\n  0x1d, 0xff, 0x7e, 0xff, 0xb7, 0xff, 0xc0, 0xff, 0xaa, 0xff, 0x8f, 0xff,\n  0x8f, 0xff, 0xa6, 0xff, 0xcb, 0xff, 0x17, 0x00, 0x46, 0x00, 0x7e, 0x00,\n  0xac, 0x00, 0xf0, 0x00, 0x2d, 0x01, 0x56, 0x01, 0x9a, 0x01, 0xc8, 0x01,\n  0xef, 0x01, 0x0e, 0x02, 0x1d, 0x02, 0x43, 0x02, 0x90, 0x02, 0xa5, 0x02,\n  0xa7, 0x02, 0x7e, 0x02, 0x29, 0x02, 0xd2, 0x01, 0x48, 0x01, 0xae, 0x00,\n  0x04, 0x00, 0x3a, 0xff, 0x88, 0xfe, 0xf4, 0xfd, 0x99, 0xfd, 0x39, 0xfd,\n  0x14, 0xfd, 0xfd, 0xfc, 0x06, 0xfd, 0x39, 0xfd, 0x86, 0xfd, 0xae, 0xfd,\n  0xe1, 0xfd, 0x2f, 0xfe, 0xa3, 0xfe, 0x10, 0xff, 0x83, 0xff, 0xf1, 0xff,\n  0x67, 0x00, 0xd3, 0x00, 0x55, 0x01, 0xe6, 0x01, 0x88, 0x02, 0x13, 0x03,\n  0x5b, 0x03, 0x65, 0x03, 0x74, 0x03, 0x5c, 0x03, 0x1e, 0x03, 0xbf, 0x02,\n  0x59, 0x02, 0xc9, 0x01, 0x4a, 0x01, 0xe7, 0x00, 0x8c, 0x00, 0x5a, 0x00,\n  0x2a, 0x00, 0xff, 0xff, 0xdb, 0xff, 0x96, 0xff, 0x30, 0xff, 0xb6, 0xfe,\n  0x60, 0xfe, 0x2a, 0xfe, 0x1d, 0xfe, 0x1f, 0xfe, 0x42, 0xfe, 0x62, 0xfe,\n  0x89, 0xfe, 0xb9, 0xfe, 0xc1, 0xfe, 0x97, 0xfe, 0x64, 0xfe, 0x37, 0xfe,\n  0x27, 0xfe, 0x0b, 0xfe, 0x05, 0xfe, 0xf2, 0xfd, 0xe0, 0xfd, 0xd6, 0xfd,\n  0xd4, 0xfd, 0xeb, 0xfd, 0x3e, 0xfe, 0xc4, 0xfe, 0x50, 0xff, 0xcf, 0xff,\n  0x21, 0x00, 0x63, 0x00, 0xb8, 0x00, 0x53, 0x01, 0x03, 0x02, 0x6b, 0x02,\n  0x86, 0x02, 0x8e, 0x02, 0xa1, 0x02, 0xac, 0x02, 0x8d, 0x02, 0x74, 0x02,\n  0x6f, 0x02, 0x79, 0x02, 0x73, 0x02, 0x4e, 0x02, 0x08, 0x02, 0xbe, 0x01,\n  0x76, 0x01, 0xf4, 0x00, 0x53, 0x00, 0xa0, 0xff, 0x0c, 0xff, 0x84, 0xfe,\n  0xff, 0xfd, 0x86, 0xfd, 0x25, 0xfd, 0x00, 0xfd, 0xed, 0xfc, 0x02, 0xfd,\n  0x2a, 0xfd, 0x6f, 0xfd, 0xb2, 0xfd, 0x1f, 0xfe, 0xa1, 0xfe, 0x1d, 0xff,\n  0x98, 0xff, 0x26, 0x00, 0xb0, 0x00, 0x31, 0x01, 0xc2, 0x01, 0x1d, 0x02,\n  0x3e, 0x02, 0x39, 0x02, 0x12, 0x02, 0xdf, 0x01, 0x96, 0x01, 0x53, 0x01,\n  0x10, 0x01, 0xd1, 0x00, 0xaa, 0x00, 0x9f, 0x00, 0xb0, 0x00, 0xb1, 0x00,\n  0x97, 0x00, 0x73, 0x00, 0x3f, 0x00, 0x01, 0x00, 0xd4, 0xff, 0xb5, 0xff,\n  0x7e, 0xff, 0x4e, 0xff, 0x2a, 0xff, 0x35, 0xff, 0x73, 0xff, 0x96, 0xff,\n  0xa0, 0xff, 0xa9, 0xff, 0x9c, 0xff, 0x91, 0xff, 0x69, 0xff, 0x3c, 0xff,\n  0x2e, 0xff, 0x39, 0xff, 0x5c, 0xff, 0x64, 0xff, 0x6c, 0xff, 0x86, 0xff,\n  0xa6, 0xff, 0xa2, 0xff, 0xa2, 0xff, 0xb4, 0xff, 0xc9, 0xff, 0xca, 0xff,\n  0xce, 0xff, 0xb4, 0xff, 0x79, 0xff, 0x48, 0xff, 0x1e, 0xff, 0x07, 0xff,\n  0xf8, 0xfe, 0xd9, 0xfe, 0xab, 0xfe, 0x94, 0xfe, 0xa3, 0xfe, 0xb3, 0xfe,\n  0xd2, 0xfe, 0xf2, 0xfe, 0x41, 0xff, 0x9e, 0xff, 0xe0, 0xff, 0xfa, 0xff,\n  0x21, 0x00, 0x5d, 0x00, 0xaa, 0x00, 0xe1, 0x00, 0xf8, 0x00, 0x01, 0x01,\n  0xd0, 0x00, 0x9e, 0x00, 0x77, 0x00, 0x71, 0x00, 0x9c, 0x00, 0xd9, 0x00,\n  0x0f, 0x01, 0x3c, 0x01, 0x88, 0x01, 0xec, 0x01, 0x68, 0x02, 0xc9, 0x02,\n  0xf1, 0x02, 0xe2, 0x02, 0xa5, 0x02, 0x3e, 0x02, 0xd3, 0x01, 0x66, 0x01,\n  0x1a, 0x01, 0xac, 0x00, 0xf8, 0xff, 0x3e, 0xff, 0xac, 0xfe, 0x35, 0xfe,\n  0xf7, 0xfd, 0xc9, 0xfd, 0xc1, 0xfd, 0xd8, 0xfd, 0x00, 0xfe, 0x1d, 0xfe,\n  0x13, 0xfe, 0xee, 0xfd, 0xd2, 0xfd, 0xe5, 0xfd, 0x42, 0xfe, 0xae, 0xfe,\n  0x15, 0xff, 0x5f, 0xff, 0xad, 0xff, 0xf5, 0xff, 0x3a, 0x00, 0x89, 0x00,\n  0xec, 0x00, 0x50, 0x01, 0xb2, 0x01, 0xe7, 0x01, 0xda, 0x01, 0xc8, 0x01,\n  0xa3, 0x01, 0x92, 0x01, 0x5a, 0x01, 0x27, 0x01, 0xf9, 0x00, 0xc5, 0x00,\n  0xc1, 0x00, 0xda, 0x00, 0x92, 0x00, 0x24, 0x00, 0x9d, 0xff, 0x3e, 0xff,\n  0xe6, 0xfe, 0x86, 0xfe, 0x55, 0xfe, 0x38, 0xfe, 0x1a, 0xfe, 0x06, 0xfe,\n  0xfc, 0xfd, 0xed, 0xfd, 0x19, 0xfe, 0x63, 0xfe, 0xa6, 0xfe, 0xc5, 0xfe,\n  0x11, 0xff, 0x57, 0xff, 0x99, 0xff, 0x14, 0x00, 0x59, 0x00, 0x9d, 0x00,\n  0xe4, 0x00, 0x03, 0x01, 0x2d, 0x01, 0x5b, 0x01, 0xa2, 0x01, 0xfb, 0x01,\n  0x1d, 0x02, 0x07, 0x02, 0xfd, 0x01, 0x19, 0x02, 0x3d, 0x02, 0x8b, 0x02,\n  0xe4, 0x02, 0x19, 0x03, 0x1b, 0x03, 0x08, 0x03, 0xf2, 0x02, 0xa6, 0x02,\n  0x35, 0x02, 0xa8, 0x01, 0x27, 0x01, 0xbe, 0x00, 0x7e, 0x00, 0x4d, 0x00,\n  0xe2, 0xff, 0x54, 0xff, 0xaf, 0xfe, 0x3e, 0xfe, 0xd4, 0xfd, 0x98, 0xfd,\n  0x50, 0xfd, 0x29, 0xfd, 0x24, 0xfd, 0x0c, 0xfd, 0x03, 0xfd, 0xfa, 0xfc,\n  0x1e, 0xfd, 0x5f, 0xfd, 0x9f, 0xfd, 0xd1, 0xfd, 0xdd, 0xfd, 0xde, 0xfd,\n  0x04, 0xfe, 0x2c, 0xfe, 0x77, 0xfe, 0xd5, 0xfe, 0x4e, 0xff, 0xb2, 0xff,\n  0x06, 0x00, 0x17, 0x00, 0x1a, 0x00, 0x20, 0x00, 0x29, 0x00, 0x3c, 0x00,\n  0x9f, 0x00, 0x53, 0x01, 0x04, 0x02, 0xb1, 0x02, 0x2c, 0x03, 0x6c, 0x03,\n  0xc5, 0x03, 0xf1, 0x03, 0x04, 0x04, 0xec, 0x03, 0x76, 0x03, 0xb1, 0x02,\n  0xff, 0x01, 0x50, 0x01, 0xc9, 0x00, 0x5d, 0x00, 0x0c, 0x00, 0xaa, 0xff,\n  0x38, 0xff, 0xc2, 0xfe, 0x4a, 0xfe, 0xd7, 0xfd, 0x71, 0xfd, 0x2a, 0xfd,\n  0x05, 0xfd, 0x11, 0xfd, 0x45, 0xfd, 0x91, 0xfd, 0xee, 0xfd, 0x3e, 0xfe,\n  0x64, 0xfe, 0xc3, 0xfe, 0x1d, 0xff, 0x65, 0xff, 0xa7, 0xff, 0xf7, 0xff,\n  0x69, 0x00, 0xdb, 0x00, 0x33, 0x01, 0x75, 0x01, 0x8d, 0x01, 0x86, 0x01,\n  0x7e, 0x01, 0x39, 0x01, 0xec, 0x00, 0xa9, 0x00, 0x68, 0x00, 0x19, 0x00,\n  0xe0, 0xff, 0x8d, 0xff, 0x34, 0xff, 0xe3, 0xfe, 0xb7, 0xfe, 0x9b, 0xfe,\n  0x88, 0xfe, 0xa8, 0xfe, 0xf8, 0xfe, 0x60, 0xff, 0xc5, 0xff, 0x24, 0x00,\n  0x90, 0x00, 0xea, 0x00, 0x11, 0x01, 0x32, 0x01, 0x2b, 0x01, 0x08, 0x01,\n  0xbb, 0x00, 0x66, 0x00, 0x09, 0x00, 0xbb, 0xff, 0x8c, 0xff, 0x8e, 0xff,\n  0xa6, 0xff, 0xc4, 0xff, 0xf3, 0xff, 0xf9, 0xff, 0xe0, 0xff, 0xcf, 0xff,\n  0xc8, 0xff, 0xd6, 0xff, 0xdb, 0xff, 0xc6, 0xff, 0xbd, 0xff, 0xad, 0xff,\n  0xa0, 0xff, 0x9b, 0xff, 0x9a, 0xff, 0x81, 0xff, 0x34, 0xff, 0xfb, 0xfe,\n  0xfb, 0xfe, 0x39, 0xff, 0x87, 0xff, 0xe0, 0xff, 0x5c, 0x00, 0xf6, 0x00,\n  0xa3, 0x01, 0x3d, 0x02, 0xa4, 0x02, 0xea, 0x02, 0x1e, 0x03, 0x20, 0x03,\n  0xe0, 0x02, 0x43, 0x02, 0x73, 0x01, 0x8e, 0x00, 0xb4, 0xff, 0xeb, 0xfe,\n  0x4a, 0xfe, 0xcd, 0xfd, 0x69, 0xfd, 0x38, 0xfd, 0x40, 0xfd, 0x6c, 0xfd,\n  0x9f, 0xfd, 0xec, 0xfd, 0x2d, 0xfe, 0x6a, 0xfe, 0xab, 0xfe, 0xe5, 0xfe,\n  0x27, 0xff, 0x57, 0xff, 0x95, 0xff, 0xe8, 0xff, 0x28, 0x00, 0xb3, 0x00,\n  0x49, 0x01, 0xdc, 0x01, 0x40, 0x02, 0x88, 0x02, 0x9c, 0x02, 0x82, 0x02,\n  0x77, 0x02, 0x8b, 0x02, 0xac, 0x02, 0x95, 0x02, 0x59, 0x02, 0xfd, 0x01,\n  0xbd, 0x01, 0xaa, 0x01, 0x84, 0x01, 0x3b, 0x01, 0xc1, 0x00, 0x35, 0x00,\n  0xbf, 0xff, 0x48, 0xff, 0xbb, 0xfe, 0x29, 0xfe, 0x9e, 0xfd, 0x36, 0xfd,\n  0x1b, 0xfd, 0x30, 0xfd, 0x4f, 0xfd, 0x76, 0xfd, 0x88, 0xfd, 0x8e, 0xfd,\n  0x8f, 0xfd, 0xad, 0xfd, 0xe2, 0xfd, 0x3b, 0xfe, 0x7d, 0xfe, 0xc1, 0xfe,\n  0x1a, 0xff, 0x63, 0xff, 0x9d, 0xff, 0x13, 0x00, 0x6a, 0x00, 0x82, 0x00,\n  0x6f, 0x00, 0x66, 0x00, 0x78, 0x00, 0xa3, 0x00, 0xdd, 0x00, 0xfe, 0x00,\n  0x06, 0x01, 0x2f, 0x01, 0x35, 0x01, 0x24, 0x01, 0xf7, 0x00, 0xaa, 0x00,\n  0x50, 0x00, 0x17, 0x00, 0x11, 0x00, 0x22, 0x00, 0x44, 0x00, 0x6e, 0x00,\n  0xb3, 0x00, 0xc0, 0x00, 0xa5, 0x00, 0xaa, 0x00, 0xdf, 0x00, 0xff, 0x00,\n  0x2e, 0x01, 0x44, 0x01, 0x61, 0x01, 0x61, 0x01, 0x3c, 0x01, 0xf3, 0x00,\n  0x9e, 0x00, 0x3d, 0x00, 0xe4, 0xff, 0x78, 0xff, 0x23, 0xff, 0xef, 0xfe,\n  0xbc, 0xfe, 0x7e, 0xfe, 0x51, 0xfe, 0x45, 0xfe, 0x4d, 0xfe, 0x7b, 0xfe,\n  0xba, 0xfe, 0x29, 0xff, 0xc3, 0xff, 0x4f, 0x00, 0xb0, 0x00, 0x00, 0x01,\n  0x32, 0x01, 0x2b, 0x01, 0x1e, 0x01, 0x04, 0x01, 0xd9, 0x00, 0xa9, 0x00,\n  0x59, 0x00, 0x0a, 0x00, 0xd4, 0xff, 0x98, 0xff, 0x99, 0xff, 0x85, 0xff,\n  0x6d, 0xff, 0x60, 0xff, 0x33, 0xff, 0x18, 0xff, 0x11, 0xff, 0x11, 0xff,\n  0x04, 0xff, 0x05, 0xff, 0x0e, 0xff, 0x4d, 0xff, 0xa4, 0xff, 0xe8, 0xff,\n  0x05, 0x00, 0x0a, 0x00, 0x33, 0x00, 0x4f, 0x00, 0x70, 0x00, 0x95, 0x00,\n  0xac, 0x00, 0xc2, 0x00, 0xc8, 0x00, 0xdc, 0x00, 0x0e, 0x01, 0x1e, 0x01,\n  0xf9, 0x00, 0xa9, 0x00, 0x43, 0x00, 0xe9, 0xff, 0x9e, 0xff, 0x86, 0xff,\n  0x73, 0xff, 0x7d, 0xff, 0x97, 0xff, 0xc0, 0xff, 0xeb, 0xff, 0x28, 0x00,\n  0x49, 0x00, 0x6e, 0x00, 0xa4, 0x00, 0xfb, 0x00, 0x63, 0x01, 0x9b, 0x01,\n  0xbb, 0x01, 0xe1, 0x01, 0x0c, 0x02, 0xdf, 0x01, 0x7d, 0x01, 0x00, 0x01,\n  0x97, 0x00, 0x57, 0x00, 0x34, 0x00, 0x2f, 0x00, 0x23, 0x00, 0x01, 0x00,\n  0xee, 0xff, 0xc8, 0xff, 0xab, 0xff, 0xc5, 0xff, 0xc6, 0xff, 0x9f, 0xff,\n  0x7d, 0xff, 0x65, 0xff, 0x5a, 0xff, 0x4d, 0xff, 0x40, 0xff, 0x27, 0xff,\n  0xf4, 0xfe, 0xdc, 0xfe, 0xc8, 0xfe, 0xbb, 0xfe, 0x9b, 0xfe, 0x67, 0xfe,\n  0x49, 0xfe, 0x40, 0xfe, 0x3d, 0xfe, 0x32, 0xfe, 0x22, 0xfe, 0x15, 0xfe,\n  0xf8, 0xfd, 0xe1, 0xfd, 0xda, 0xfd, 0xfc, 0xfd, 0x43, 0xfe, 0x96, 0xfe,\n  0xe8, 0xfe, 0x14, 0xff, 0x41, 0xff, 0x74, 0xff, 0xda, 0xff, 0x46, 0x00,\n  0xbf, 0x00, 0x30, 0x01, 0x8f, 0x01, 0xd9, 0x01, 0x29, 0x02, 0x61, 0x02,\n  0x8c, 0x02, 0x9f, 0x02, 0x74, 0x02, 0x2f, 0x02, 0xc6, 0x01, 0x6c, 0x01,\n  0x0a, 0x01, 0x9b, 0x00, 0x4f, 0x00, 0x05, 0x00, 0xbd, 0xff, 0x96, 0xff,\n  0x8b, 0xff, 0x90, 0xff, 0xb0, 0xff, 0xf1, 0xff, 0x20, 0x00, 0x55, 0x00,\n  0x80, 0x00, 0xa2, 0x00, 0xa9, 0x00, 0xa3, 0x00, 0x7b, 0x00, 0x49, 0x00,\n  0x53, 0x00, 0x84, 0x00, 0xbc, 0x00, 0xc7, 0x00, 0xa4, 0x00, 0x64, 0x00,\n  0x32, 0x00, 0x0a, 0x00, 0xf9, 0xff, 0xd3, 0xff, 0xb5, 0xff, 0x7c, 0xff,\n  0x4d, 0xff, 0xfd, 0xfe, 0xec, 0xfe, 0x07, 0xff, 0x3e, 0xff, 0x92, 0xff,\n  0xed, 0xff, 0x58, 0x00, 0xc5, 0x00, 0x30, 0x01, 0x85, 0x01, 0x80, 0x01,\n  0x48, 0x01, 0x1e, 0x01, 0x11, 0x01, 0xfa, 0x00, 0xd1, 0x00, 0x95, 0x00,\n  0x36, 0x00, 0xb7, 0xff, 0x3c, 0xff, 0xf5, 0xfe, 0xb3, 0xfe, 0x86, 0xfe,\n  0x76, 0xfe, 0x89, 0xfe, 0xce, 0xfe, 0x1c, 0xff, 0x5f, 0xff, 0x91, 0xff,\n  0xbb, 0xff, 0xc5, 0xff, 0xb6, 0xff, 0x9b, 0xff, 0x82, 0xff, 0x77, 0xff,\n  0x4a, 0xff, 0x31, 0xff, 0x2f, 0xff, 0x27, 0xff, 0x1a, 0xff, 0x0d, 0xff,\n  0x0b, 0xff, 0xfe, 0xfe, 0x14, 0xff, 0x3b, 0xff, 0x65, 0xff, 0x94, 0xff,\n  0xd8, 0xff, 0x36, 0x00, 0x8f, 0x00, 0xe4, 0x00, 0x21, 0x01, 0x6e, 0x01,\n  0xb3, 0x01, 0xc4, 0x01, 0xcf, 0x01, 0xae, 0x01, 0x9e, 0x01, 0x69, 0x01,\n  0x25, 0x01, 0xd8, 0x00, 0x92, 0x00, 0x56, 0x00, 0x2a, 0x00, 0xda, 0xff,\n  0x9f, 0xff, 0x87, 0xff, 0x9e, 0xff, 0xb4, 0xff, 0x95, 0xff, 0x70, 0xff,\n  0x6f, 0xff, 0x94, 0xff, 0xc5, 0xff, 0x01, 0x00, 0x15, 0x00, 0xee, 0xff,\n  0xb8, 0xff, 0x7a, 0xff, 0x4d, 0xff, 0x25, 0xff, 0x0e, 0xff, 0x10, 0xff,\n  0x19, 0xff, 0x1d, 0xff, 0x1c, 0xff, 0x5b, 0xff, 0xc1, 0xff, 0x5b, 0x00,\n  0xe3, 0x00, 0x3e, 0x01, 0x79, 0x01, 0x97, 0x01, 0x92, 0x01, 0x60, 0x01,\n  0x38, 0x01, 0x10, 0x01, 0xcf, 0x00, 0x6b, 0x00, 0xfe, 0xff, 0xab, 0xff,\n  0x54, 0xff, 0x0d, 0xff, 0xd0, 0xfe, 0xae, 0xfe, 0xc0, 0xfe, 0xe7, 0xfe,\n  0x22, 0xff, 0x67, 0xff, 0x96, 0xff, 0x9c, 0xff, 0x7f, 0xff, 0x55, 0xff,\n  0x2d, 0xff, 0x24, 0xff, 0x40, 0xff, 0x66, 0xff, 0xac, 0xff, 0xfa, 0xff,\n  0x48, 0x00, 0x77, 0x00, 0x86, 0x00, 0x8a, 0x00, 0xa4, 0x00, 0xc8, 0x00,\n  0xd5, 0x00, 0x01, 0x01, 0x2f, 0x01, 0x21, 0x01, 0xe8, 0x00, 0xb7, 0x00,\n  0x93, 0x00, 0x75, 0x00, 0x44, 0x00, 0x0c, 0x00, 0xef, 0xff, 0xe0, 0xff,\n  0xe2, 0xff, 0xc2, 0xff, 0x91, 0xff, 0x80, 0xff, 0x80, 0xff, 0x7c, 0xff,\n  0x97, 0xff, 0xb5, 0xff, 0xd3, 0xff, 0xeb, 0xff, 0xe3, 0xff, 0xcb, 0xff,\n  0xd6, 0xff, 0xe9, 0xff, 0xf8, 0xff, 0xdc, 0xff, 0xab, 0xff, 0x67, 0xff,\n  0x45, 0xff, 0x37, 0xff, 0x40, 0xff, 0x5b, 0xff, 0x61, 0xff, 0x76, 0xff,\n  0x77, 0xff, 0x9d, 0xff, 0xb5, 0xff, 0xcd, 0xff, 0xd9, 0xff, 0x00, 0x00,\n  0x3f, 0x00, 0x62, 0x00, 0x86, 0x00, 0x99, 0x00, 0xbf, 0x00, 0x02, 0x01,\n  0x56, 0x01, 0xb9, 0x01, 0x2f, 0x02, 0x8b, 0x02, 0xb6, 0x02, 0xa1, 0x02,\n  0x4f, 0x02, 0x01, 0x02, 0xbe, 0x01, 0x6a, 0x01, 0x04, 0x01, 0x95, 0x00,\n  0x30, 0x00, 0xf1, 0xff, 0xc6, 0xff, 0xa7, 0xff, 0x9e, 0xff, 0xc0, 0xff,\n  0xea, 0xff, 0xf8, 0xff, 0xe7, 0xff, 0xcf, 0xff, 0x94, 0xff, 0x43, 0xff,\n  0xd2, 0xfe, 0x68, 0xfe, 0x0e, 0xfe, 0xd4, 0xfd, 0xb5, 0xfd, 0xba, 0xfd,\n  0xd5, 0xfd, 0xe3, 0xfd, 0xf7, 0xfd, 0x0d, 0xfe, 0x16, 0xfe, 0x09, 0xfe,\n  0xf9, 0xfd, 0x06, 0xfe, 0x2f, 0xfe, 0x66, 0xfe, 0xdc, 0xfe, 0x66, 0xff,\n  0x15, 0x00, 0xdd, 0x00, 0xcf, 0x01, 0xaa, 0x02, 0x57, 0x03, 0xb6, 0x03,\n  0x08, 0x04, 0x31, 0x04, 0x0e, 0x04, 0xd2, 0x03, 0x68, 0x03, 0xea, 0x02,\n  0x6e, 0x02, 0xe0, 0x01, 0x58, 0x01, 0xc3, 0x00, 0x46, 0x00, 0xba, 0xff,\n  0x31, 0xff, 0xc1, 0xfe, 0x43, 0xfe, 0xd2, 0xfd, 0x82, 0xfd, 0x6c, 0xfd,\n  0x6d, 0xfd, 0x6a, 0xfd, 0x82, 0xfd, 0x92, 0xfd, 0x96, 0xfd, 0x98, 0xfd,\n  0xb1, 0xfd, 0x01, 0xfe, 0x5c, 0xfe, 0xa4, 0xfe, 0xe9, 0xfe, 0x30, 0xff,\n  0xa1, 0xff, 0x16, 0x00, 0x91, 0x00, 0x0e, 0x01, 0x7e, 0x01, 0xf6, 0x01,\n  0x61, 0x02, 0xb5, 0x02, 0xaf, 0x02, 0xa0, 0x02, 0x97, 0x02, 0xb2, 0x02,\n  0xf5, 0x02, 0x18, 0x03, 0xf1, 0x02, 0xa9, 0x02, 0x4a, 0x02, 0xd2, 0x01,\n  0x22, 0x01, 0x6d, 0x00, 0xcb, 0xff, 0x23, 0xff, 0x98, 0xfe, 0x1f, 0xfe,\n  0xc9, 0xfd, 0x9f, 0xfd, 0x94, 0xfd, 0x9f, 0xfd, 0xc5, 0xfd, 0xde, 0xfd,\n  0xfc, 0xfd, 0x1e, 0xfe, 0x4f, 0xfe, 0x88, 0xfe, 0xdc, 0xfe, 0x42, 0xff,\n  0x94, 0xff, 0xbb, 0xff, 0xba, 0xff, 0xd5, 0xff, 0x02, 0x00, 0x51, 0x00,\n  0x82, 0x00, 0x90, 0x00, 0x8d, 0x00, 0x6f, 0x00, 0x5f, 0x00, 0x46, 0x00,\n  0x1f, 0x00, 0xff, 0xff, 0xe1, 0xff, 0xc5, 0xff, 0xa8, 0xff, 0xac, 0xff,\n  0xbf, 0xff, 0xd1, 0xff, 0xe8, 0xff, 0x03, 0x00, 0xfe, 0xff, 0xf4, 0xff,\n  0x14, 0x00, 0x34, 0x00, 0x40, 0x00, 0x4c, 0x00, 0x43, 0x00, 0x37, 0x00,\n  0x29, 0x00, 0x3b, 0x00, 0x3a, 0x00, 0x42, 0x00, 0x19, 0x00, 0xe6, 0xff,\n  0xab, 0xff, 0x73, 0xff, 0x39, 0xff, 0x21, 0xff, 0x07, 0xff, 0x0f, 0xff,\n  0x4b, 0xff, 0xb5, 0xff, 0xfe, 0xff, 0x40, 0x00, 0xb7, 0x00, 0x59, 0x01,\n  0xd4, 0x01, 0x2c, 0x02, 0x55, 0x02, 0x93, 0x02, 0xdd, 0x02, 0x04, 0x03,\n  0xb3, 0x02, 0x11, 0x02, 0x79, 0x01, 0x05, 0x01, 0xab, 0x00, 0x43, 0x00,\n  0xcf, 0xff, 0x5e, 0xff, 0xf2, 0xfe, 0x87, 0xfe, 0x20, 0xfe, 0xbd, 0xfd,\n  0x78, 0xfd, 0x45, 0xfd, 0x43, 0xfd, 0x68, 0xfd, 0x9a, 0xfd, 0xb5, 0xfd,\n  0xdb, 0xfd, 0x23, 0xfe, 0x86, 0xfe, 0x05, 0xff, 0x8c, 0xff, 0x09, 0x00,\n  0x8b, 0x00, 0x01, 0x01, 0x60, 0x01, 0x9d, 0x01, 0xca, 0x01, 0xe8, 0x01,\n  0xb1, 0x01, 0x3f, 0x01, 0xba, 0x00, 0x5e, 0x00, 0x12, 0x00, 0xe2, 0xff,\n  0xbc, 0xff, 0xd2, 0xff, 0xf2, 0xff, 0x1b, 0x00, 0x45, 0x00, 0x72, 0x00,\n  0xa2, 0x00, 0xac, 0x00, 0x9a, 0x00, 0x95, 0x00, 0x9b, 0x00, 0x77, 0x00,\n  0x41, 0x00, 0x0c, 0x00, 0xe2, 0xff, 0xea, 0xff, 0xf2, 0xff, 0x27, 0x00,\n  0x49, 0x00, 0x6c, 0x00, 0x6a, 0x00, 0x5d, 0x00, 0x34, 0x00, 0xfa, 0xff,\n  0xbb, 0xff, 0x6c, 0xff, 0x34, 0xff, 0x06, 0xff, 0xfc, 0xfe, 0xf3, 0xfe,\n  0xf0, 0xfe, 0xe5, 0xfe, 0xe0, 0xfe, 0xd4, 0xfe, 0xdf, 0xfe, 0xff, 0xfe,\n  0x1e, 0xff, 0x49, 0xff, 0x78, 0xff, 0xb7, 0xff, 0xfd, 0xff, 0x8b, 0x00,\n  0x0b, 0x01, 0x5c, 0x01, 0x77, 0x01, 0x87, 0x01, 0x6f, 0x01, 0x25, 0x01,\n  0xda, 0x00, 0x9a, 0x00, 0xae, 0x00, 0x8c, 0x00, 0x5b, 0x00, 0x2a, 0x00,\n  0xff, 0xff, 0xf1, 0xff, 0xd9, 0xff, 0xad, 0xff, 0x75, 0xff, 0x63, 0xff,\n  0x6f, 0xff, 0x8c, 0xff, 0xab, 0xff, 0xd4, 0xff, 0xdb, 0xff, 0xbf, 0xff,\n  0xa0, 0xff, 0x79, 0xff, 0x51, 0xff, 0x2c, 0xff, 0x13, 0xff, 0x1d, 0xff,\n  0x24, 0xff, 0x3b, 0xff, 0x59, 0xff, 0x95, 0xff, 0xcb, 0xff, 0xfa, 0xff,\n  0x24, 0x00, 0x49, 0x00, 0x5e, 0x00, 0x64, 0x00, 0x7b, 0x00, 0x94, 0x00,\n  0xa4, 0x00, 0x94, 0x00, 0x7b, 0x00, 0x38, 0x00, 0xe1, 0xff, 0x7f, 0xff,\n  0x61, 0xff, 0x4d, 0xff, 0x4c, 0xff, 0x59, 0xff, 0x62, 0xff, 0x7b, 0xff,\n  0xa0, 0xff, 0xbb, 0xff, 0xda, 0xff, 0x07, 0x00, 0x23, 0x00, 0x3a, 0x00,\n  0x5a, 0x00, 0x9d, 0x00, 0x06, 0x01, 0x55, 0x01, 0x6f, 0x01, 0x5a, 0x01,\n  0x35, 0x01, 0x22, 0x01, 0x0c, 0x01, 0xee, 0x00, 0xc7, 0x00, 0xa2, 0x00,\n  0x71, 0x00, 0x4e, 0x00, 0x2a, 0x00, 0x03, 0x00, 0xf6, 0xff, 0xeb, 0xff,\n  0xe2, 0xff, 0xd7, 0xff, 0xb6, 0xff, 0x8b, 0xff, 0x51, 0xff, 0x27, 0xff,\n  0x0a, 0xff, 0x10, 0xff, 0x1e, 0xff, 0x20, 0xff, 0x22, 0xff, 0x45, 0xff,\n  0x76, 0xff, 0x96, 0xff, 0xb1, 0xff, 0xd0, 0xff, 0xf9, 0xff, 0x23, 0x00,\n  0x48, 0x00, 0x7b, 0x00, 0xa3, 0x00, 0xda, 0x00, 0xd5, 0x00, 0xc8, 0x00,\n  0xcc, 0x00, 0xf0, 0x00, 0x18, 0x01, 0xf0, 0x00, 0x8f, 0x00, 0x42, 0x00,\n  0x17, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x16, 0x00, 0x2b, 0x00, 0x46, 0x00,\n  0x3d, 0x00, 0x30, 0x00, 0x29, 0x00, 0x24, 0x00, 0x2f, 0x00, 0x22, 0x00,\n  0x0c, 0x00, 0xc3, 0xff, 0x83, 0xff, 0x5a, 0xff, 0x2a, 0xff, 0x18, 0xff,\n  0x0e, 0xff, 0x25, 0xff, 0x42, 0xff, 0x6a, 0xff, 0x83, 0xff, 0x66, 0xff,\n  0x3e, 0xff, 0x13, 0xff, 0x22, 0xff, 0x43, 0xff, 0x63, 0xff, 0x76, 0xff,\n  0xa3, 0xff, 0xb8, 0xff, 0xdd, 0xff, 0x12, 0x00, 0x50, 0x00, 0x76, 0x00,\n  0x8a, 0x00, 0x87, 0x00, 0x7e, 0x00, 0x81, 0x00, 0x9d, 0x00, 0x9d, 0x00,\n  0xa2, 0x00, 0x8c, 0x00, 0x60, 0x00, 0x27, 0x00, 0x1c, 0x00, 0x2c, 0x00,\n  0x5a, 0x00, 0x82, 0x00, 0x74, 0x00, 0x64, 0x00, 0x2d, 0x00, 0xf9, 0xff,\n  0xb5, 0xff, 0x92, 0xff, 0x89, 0xff, 0xa2, 0xff, 0xcf, 0xff, 0x05, 0x00,\n  0x2d, 0x00, 0x37, 0x00, 0x5d, 0x00, 0x9d, 0x00, 0xe7, 0x00, 0x0e, 0x01,\n  0x0e, 0x01, 0xf3, 0x00, 0xe3, 0x00, 0xdd, 0x00, 0xaf, 0x00, 0x5b, 0x00,\n  0x19, 0x00, 0xd2, 0xff, 0x8d, 0xff, 0x47, 0xff, 0x36, 0xff, 0x36, 0xff,\n  0x3a, 0xff, 0x22, 0xff, 0x06, 0xff, 0xf7, 0xfe, 0xeb, 0xfe, 0xe0, 0xfe,\n  0xe3, 0xfe, 0xef, 0xfe, 0xfc, 0xfe, 0x2a, 0xff, 0x50, 0xff, 0xbe, 0xff,\n  0x2c, 0x00, 0x6b, 0x00, 0x81, 0x00, 0x95, 0x00, 0xba, 0x00, 0xcd, 0x00,\n  0xd3, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xe0, 0x00, 0x05, 0x01, 0x1d, 0x01,\n  0xec, 0x00, 0x97, 0x00, 0x39, 0x00, 0x02, 0x00, 0xe1, 0xff, 0xdb, 0xff,\n  0xe0, 0xff, 0x06, 0x00, 0x2d, 0x00, 0x48, 0x00, 0x42, 0x00, 0x23, 0x00,\n  0x21, 0x00, 0x20, 0x00, 0x25, 0x00, 0x29, 0x00, 0x3e, 0x00, 0x56, 0x00,\n  0x62, 0x00, 0x69, 0x00, 0x8e, 0x00, 0x99, 0x00, 0x84, 0x00, 0x4f, 0x00,\n  0xf9, 0xff, 0xa3, 0xff, 0x57, 0xff, 0x32, 0xff, 0x20, 0xff, 0x24, 0xff,\n  0x37, 0xff, 0x45, 0xff, 0x44, 0xff, 0x28, 0xff, 0x06, 0xff, 0xf1, 0xfe,\n  0x00, 0xff, 0x0f, 0xff, 0x33, 0xff, 0x2d, 0xff, 0x46, 0xff, 0x58, 0xff,\n  0x7f, 0xff, 0xb0, 0xff, 0xff, 0xff, 0x3d, 0x00, 0x6d, 0x00, 0x92, 0x00,\n  0x8c, 0x00, 0x71, 0x00, 0x4b, 0x00, 0x1b, 0x00, 0xf1, 0xff, 0xdc, 0xff,\n  0xe1, 0xff, 0xc8, 0xff, 0x9e, 0xff, 0x71, 0xff, 0x64, 0xff, 0x6d, 0xff,\n  0x7c, 0xff, 0xa1, 0xff, 0xc3, 0xff, 0xc2, 0xff, 0xb7, 0xff, 0x9e, 0xff,\n  0x97, 0xff, 0x7d, 0xff, 0x8f, 0xff, 0xa5, 0xff, 0xb9, 0xff, 0xef, 0xff,\n  0x45, 0x00, 0xba, 0x00, 0xfb, 0x00, 0x1a, 0x01, 0x47, 0x01, 0x8e, 0x01,\n  0xc6, 0x01, 0xfc, 0x01, 0x0a, 0x02, 0xfc, 0x01, 0xf3, 0x01, 0xf8, 0x01,\n  0xfb, 0x01, 0xe4, 0x01, 0xc9, 0x01, 0xb6, 0x01, 0xa6, 0x01, 0x70, 0x01,\n  0x30, 0x01, 0xde, 0x00, 0x84, 0x00, 0x3a, 0x00, 0xde, 0xff, 0x7f, 0xff,\n  0x49, 0xff, 0x1d, 0xff, 0xf0, 0xfe, 0xc3, 0xfe, 0xc2, 0xfe, 0xe7, 0xfe,\n  0x26, 0xff, 0x55, 0xff, 0x7d, 0xff, 0xa6, 0xff, 0x9b, 0xff, 0x9c, 0xff,\n  0xb3, 0xff, 0xc1, 0xff, 0xbe, 0xff, 0xa4, 0xff, 0x7a, 0xff, 0x55, 0xff,\n  0x59, 0xff, 0x4f, 0xff, 0x3f, 0xff, 0x32, 0xff, 0x3e, 0xff, 0x55, 0xff,\n  0x35, 0xff, 0x27, 0xff, 0x31, 0xff, 0x3d, 0xff, 0x29, 0xff, 0x07, 0xff,\n  0x05, 0xff, 0x0a, 0xff, 0x06, 0xff, 0xf6, 0xfe, 0xec, 0xfe, 0xf7, 0xfe,\n  0xf4, 0xfe, 0xed, 0xfe, 0xd7, 0xfe, 0xd8, 0xfe, 0x03, 0xff, 0x4c, 0xff,\n  0x9b, 0xff, 0xeb, 0xff, 0x07, 0x00, 0x14, 0x00, 0x1a, 0x00, 0x23, 0x00,\n  0x28, 0x00, 0x50, 0x00, 0x8d, 0x00, 0xde, 0x00, 0x41, 0x01, 0xa9, 0x01,\n  0x1f, 0x02, 0x94, 0x02, 0xcb, 0x02, 0xc2, 0x02, 0x98, 0x02, 0x4c, 0x02,\n  0xed, 0x01, 0xca, 0x01, 0xc1, 0x01, 0xa5, 0x01, 0x81, 0x01, 0x63, 0x01,\n  0x26, 0x01, 0xf7, 0x00, 0xc4, 0x00, 0x81, 0x00, 0x2f, 0x00, 0xe2, 0xff,\n  0x70, 0xff, 0x09, 0xff, 0xc9, 0xfe, 0xb1, 0xfe, 0xb6, 0xfe, 0xbd, 0xfe,\n  0xcf, 0xfe, 0xf2, 0xfe, 0x10, 0xff, 0x25, 0xff, 0x3e, 0xff, 0x45, 0xff,\n  0x5a, 0xff, 0x41, 0xff, 0x1d, 0xff, 0xf8, 0xfe, 0xed, 0xfe, 0xe4, 0xfe,\n  0xf7, 0xfe, 0x28, 0xff, 0x48, 0xff, 0x64, 0xff, 0x6a, 0xff, 0x86, 0xff,\n  0xba, 0xff, 0xfc, 0xff, 0x42, 0x00, 0x6e, 0x00, 0x9d, 0x00, 0xd5, 0x00,\n  0x06, 0x01, 0x14, 0x01, 0x20, 0x01, 0x1b, 0x01, 0x0d, 0x01, 0x0a, 0x01,\n  0x1d, 0x01, 0x36, 0x01, 0x2e, 0x01, 0xe5, 0x00, 0x98, 0x00, 0x32, 0x00,\n  0xe1, 0xff, 0x92, 0xff, 0x4f, 0xff, 0x17, 0xff, 0xfa, 0xfe, 0xe0, 0xfe,\n  0xcf, 0xfe, 0xd5, 0xfe, 0xd9, 0xfe, 0xe0, 0xfe, 0xde, 0xfe, 0xe3, 0xfe,\n  0xf0, 0xfe, 0x15, 0xff, 0x35, 0xff, 0x72, 0xff, 0xaa, 0xff, 0xfd, 0xff,\n  0x6f, 0x00, 0xd1, 0x00, 0x24, 0x01, 0x68, 0x01, 0x68, 0x01, 0x54, 0x01,\n  0x37, 0x01, 0x2c, 0x01, 0x4a, 0x01, 0x63, 0x01, 0x64, 0x01, 0x35, 0x01,\n  0xf4, 0x00, 0xa7, 0x00, 0x5e, 0x00, 0x00, 0x00, 0xaa, 0xff, 0x65, 0xff,\n  0x39, 0xff, 0x18, 0xff, 0x05, 0xff, 0x25, 0xff, 0x5d, 0xff, 0xa3, 0xff,\n  0xcf, 0xff, 0xe1, 0xff, 0xde, 0xff, 0xb1, 0xff, 0x86, 0xff, 0x68, 0xff,\n  0x5e, 0xff, 0x67, 0xff, 0x8b, 0xff, 0xb9, 0xff, 0xe8, 0xff, 0x20, 0x00,\n  0x4e, 0x00, 0x7d, 0x00, 0x9e, 0x00, 0x99, 0x00, 0xa0, 0x00, 0xc4, 0x00,\n  0xed, 0x00, 0xf2, 0x00, 0xf2, 0x00, 0xdc, 0x00, 0xb0, 0x00, 0x91, 0x00,\n  0x83, 0x00, 0x71, 0x00, 0x25, 0x00, 0xbb, 0xff, 0x40, 0xff, 0xe2, 0xfe,\n  0x8e, 0xfe, 0x6a, 0xfe, 0x6a, 0xfe, 0x85, 0xfe, 0xb3, 0xfe, 0xec, 0xfe,\n  0x21, 0xff, 0x44, 0xff, 0x61, 0xff, 0x75, 0xff, 0x85, 0xff, 0x9b, 0xff,\n  0xd0, 0xff, 0x10, 0x00, 0x36, 0x00, 0x3e, 0x00, 0x14, 0x00, 0x0e, 0x00,\n  0x2a, 0x00, 0x6c, 0x00, 0xa6, 0x00, 0xd9, 0x00, 0xfb, 0x00, 0x41, 0x01,\n  0x83, 0x01, 0x94, 0x01, 0x9b, 0x01, 0x85, 0x01, 0x66, 0x01, 0x46, 0x01,\n  0x5a, 0x01, 0x45, 0x01, 0x33, 0x01, 0xf4, 0x00, 0xb6, 0x00, 0x62, 0x00,\n  0x2b, 0x00, 0xfa, 0xff, 0xcf, 0xff, 0x9e, 0xff, 0x88, 0xff, 0x66, 0xff,\n  0x54, 0xff, 0x2d, 0xff, 0xe6, 0xfe, 0xa8, 0xfe, 0x71, 0xfe, 0x41, 0xfe,\n  0x39, 0xfe, 0x38, 0xfe, 0x4e, 0xfe, 0x82, 0xfe, 0xca, 0xfe, 0x18, 0xff,\n  0x49, 0xff, 0x58, 0xff, 0x7f, 0xff, 0x97, 0xff, 0xa3, 0xff, 0xb9, 0xff,\n  0xd1, 0xff, 0xd4, 0xff, 0xe0, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf1, 0xff,\n  0xd7, 0xff, 0xcf, 0xff, 0xf5, 0xff, 0x2d, 0x00, 0x79, 0x00, 0xb4, 0x00,\n  0xec, 0x00, 0x08, 0x01, 0x1b, 0x01, 0x2b, 0x01, 0x1f, 0x01, 0x29, 0x01,\n  0x53, 0x01, 0x64, 0x01, 0x46, 0x01, 0x25, 0x01, 0x16, 0x01, 0xea, 0x00,\n  0xc0, 0x00, 0x79, 0x00, 0x30, 0x00, 0xe6, 0xff, 0xae, 0xff, 0x84, 0xff,\n  0x53, 0xff, 0x22, 0xff, 0x03, 0xff, 0xf3, 0xfe, 0xec, 0xfe, 0xf1, 0xfe,\n  0xe9, 0xfe, 0xe4, 0xfe, 0xdb, 0xfe, 0xcd, 0xfe, 0xc7, 0xfe, 0xdd, 0xfe,\n  0x11, 0xff, 0x52, 0xff, 0xcc, 0xff, 0x80, 0x00, 0x2b, 0x01, 0xa8, 0x01,\n  0xf5, 0x01, 0x19, 0x02, 0x0b, 0x02, 0xe4, 0x01, 0xda, 0x01, 0xe1, 0x01,\n  0xb2, 0x01, 0x67, 0x01, 0x1f, 0x01, 0xe4, 0x00, 0xa9, 0x00, 0x4e, 0x00,\n  0x00, 0x00, 0xb3, 0xff, 0x92, 0xff, 0x86, 0xff, 0x8a, 0xff, 0xa5, 0xff,\n  0x94, 0xff, 0x60, 0xff, 0x3f, 0xff, 0x17, 0xff, 0xfc, 0xfe, 0xd8, 0xfe,\n  0xcf, 0xfe, 0xc8, 0xfe, 0xcb, 0xfe, 0xdc, 0xfe, 0x07, 0xff, 0x38, 0xff,\n  0x70, 0xff, 0xca, 0xff, 0x15, 0x00, 0x48, 0x00, 0x57, 0x00, 0x47, 0x00,\n  0x64, 0x00, 0x75, 0x00, 0x82, 0x00, 0x82, 0x00, 0x7f, 0x00, 0x72, 0x00,\n  0x65, 0x00, 0x60, 0x00, 0x6f, 0x00, 0x97, 0x00, 0xba, 0x00, 0xa4, 0x00,\n  0x6f, 0x00, 0x30, 0x00, 0xe9, 0xff, 0xb8, 0xff, 0x8d, 0xff, 0x68, 0xff,\n  0x41, 0xff, 0x28, 0xff, 0x1e, 0xff, 0x19, 0xff, 0x28, 0xff, 0x3c, 0xff,\n  0x49, 0xff, 0x59, 0xff, 0x64, 0xff, 0x76, 0xff, 0x98, 0xff, 0xc6, 0xff,\n  0xed, 0xff, 0x16, 0x00, 0x33, 0x00, 0x34, 0x00, 0x0f, 0x00, 0xdb, 0xff,\n  0xb1, 0xff, 0xad, 0xff, 0xb9, 0xff, 0xc0, 0xff, 0xc6, 0xff, 0xce, 0xff,\n  0xe9, 0xff, 0xef, 0xff, 0x04, 0x00, 0x42, 0x00, 0x9e, 0x00, 0x04, 0x01,\n  0x50, 0x01, 0x5e, 0x01, 0x54, 0x01, 0x49, 0x01, 0x30, 0x01, 0xfd, 0x00,\n  0xd4, 0x00, 0xc2, 0x00, 0xa0, 0x00, 0x99, 0x00, 0x9f, 0x00, 0xa7, 0x00,\n  0xa1, 0x00, 0x8d, 0x00, 0x54, 0x00, 0x21, 0x00, 0xf9, 0xff, 0xe4, 0xff,\n  0xc2, 0xff, 0xb2, 0xff, 0x97, 0xff, 0x72, 0xff, 0x4f, 0xff, 0x46, 0xff,\n  0x59, 0xff, 0x66, 0xff, 0x4e, 0xff, 0x39, 0xff, 0x2c, 0xff, 0x20, 0xff,\n  0x11, 0xff, 0x09, 0xff, 0xed, 0xfe, 0xd8, 0xfe, 0xd8, 0xfe, 0xd2, 0xfe,\n  0xd0, 0xfe, 0xcc, 0xfe, 0xd1, 0xfe, 0xd2, 0xfe, 0xe0, 0xfe, 0x00, 0xff,\n  0x4d, 0xff, 0xa3, 0xff, 0xf7, 0xff, 0x36, 0x00, 0x66, 0x00, 0x8c, 0x00,\n  0xb0, 0x00, 0x03, 0x01, 0x58, 0x01, 0xb1, 0x01, 0x07, 0x02, 0x5c, 0x02,\n  0x76, 0x02, 0x5c, 0x02, 0x33, 0x02, 0x17, 0x02, 0x1f, 0x02, 0x05, 0x02,\n  0x0a, 0x02, 0x1a, 0x02, 0x11, 0x02, 0xc8, 0x01, 0x64, 0x01, 0xf9, 0x00,\n  0x99, 0x00, 0x65, 0x00, 0x30, 0x00, 0xe5, 0xff, 0x93, 0xff, 0x4b, 0xff,\n  0xef, 0xfe, 0xa5, 0xfe, 0x5e, 0xfe, 0x36, 0xfe, 0x14, 0xfe, 0xf7, 0xfd,\n  0xd7, 0xfd, 0xcb, 0xfd, 0xd9, 0xfd, 0xfc, 0xfd, 0x20, 0xfe, 0x51, 0xfe,\n  0x79, 0xfe, 0xa7, 0xfe, 0xbe, 0xfe, 0xe1, 0xfe, 0xf0, 0xfe, 0x12, 0xff,\n  0x36, 0xff, 0x73, 0xff, 0xb6, 0xff, 0xf5, 0xff, 0x27, 0x00, 0x61, 0x00,\n  0xa5, 0x00, 0xde, 0x00, 0x06, 0x01, 0x25, 0x01, 0x3e, 0x01, 0x75, 0x01,\n  0xc4, 0x01, 0x17, 0x02, 0x60, 0x02, 0x79, 0x02, 0x8c, 0x02, 0x86, 0x02,\n  0xa1, 0x02, 0x8a, 0x02, 0x0e, 0x02, 0x61, 0x01, 0x9b, 0x00, 0xe8, 0xff,\n  0x64, 0xff, 0x10, 0xff, 0xc2, 0xfe, 0x77, 0xfe, 0x3a, 0xfe, 0x25, 0xfe,\n  0x2b, 0xfe, 0x58, 0xfe, 0x89, 0xfe, 0xbd, 0xfe, 0xeb, 0xfe, 0x23, 0xff,\n  0x47, 0xff, 0x6f, 0xff, 0x78, 0xff, 0x7e, 0xff, 0x98, 0xff, 0xb4, 0xff,\n  0xf9, 0xff, 0x48, 0x00, 0x82, 0x00, 0xc1, 0x00, 0xed, 0x00, 0x03, 0x01,\n  0x00, 0x01, 0x05, 0x01, 0x15, 0x01, 0x2e, 0x01, 0x22, 0x01, 0x02, 0x01,\n  0xc4, 0x00, 0x7a, 0x00, 0x29, 0x00, 0xd2, 0xff, 0x88, 0xff, 0x64, 0xff,\n  0x49, 0xff, 0x3c, 0xff, 0x16, 0xff, 0xf9, 0xfe, 0xf1, 0xfe, 0x01, 0xff,\n  0x09, 0xff, 0x07, 0xff, 0xee, 0xfe, 0xdc, 0xfe, 0xcb, 0xfe, 0xd0, 0xfe,\n  0xd8, 0xfe, 0xf0, 0xfe, 0x1c, 0xff, 0x46, 0xff, 0x8e, 0xff, 0xc8, 0xff,\n  0x12, 0x00, 0x51, 0x00, 0x9c, 0x00, 0xd9, 0x00, 0x0f, 0x01, 0x0e, 0x01,\n  0x05, 0x01, 0x0a, 0x01, 0x12, 0x01, 0x09, 0x01, 0xfd, 0x00, 0xfc, 0x00,\n  0xe5, 0x00, 0xcb, 0x00, 0xba, 0x00, 0xc2, 0x00, 0xb3, 0x00, 0x9d, 0x00,\n  0x76, 0x00, 0x42, 0x00, 0x07, 0x00, 0xcf, 0xff, 0xa4, 0xff, 0x6a, 0xff,\n  0x3e, 0xff, 0x23, 0xff, 0x17, 0xff, 0x23, 0xff, 0x2b, 0xff, 0x2e, 0xff,\n  0x25, 0xff, 0x1e, 0xff, 0x2d, 0xff, 0x32, 0xff, 0x3d, 0xff, 0x49, 0xff,\n  0x5e, 0xff, 0x78, 0xff, 0x91, 0xff, 0x92, 0xff, 0x8b, 0xff, 0x80, 0xff,\n  0x8e, 0xff, 0xb4, 0xff, 0xdd, 0xff, 0x02, 0x00, 0x0e, 0x00, 0x2b, 0x00,\n  0x4e, 0x00, 0x7c, 0x00, 0xbb, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0x9a, 0x00,\n  0x7a, 0x00, 0x63, 0x00, 0x66, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x59, 0x00,\n  0x42, 0x00, 0x2a, 0x00, 0x23, 0x00, 0x2c, 0x00, 0x16, 0x00, 0x00, 0x00,\n  0x05, 0x00, 0x2b, 0x00, 0x3c, 0x00, 0x54, 0x00, 0x52, 0x00, 0x4a, 0x00,\n  0x63, 0x00, 0x87, 0x00, 0x97, 0x00, 0xb4, 0x00, 0xd0, 0x00, 0xe1, 0x00,\n  0xe3, 0x00, 0xf0, 0x00, 0xf2, 0x00, 0xf6, 0x00, 0xe5, 0x00, 0xa5, 0x00,\n  0x4a, 0x00, 0xdd, 0xff, 0x7e, 0xff, 0x3b, 0xff, 0x1c, 0xff, 0xef, 0xfe,\n  0xdb, 0xfe, 0xc6, 0xfe, 0xd0, 0xfe, 0xf2, 0xfe, 0x1c, 0xff, 0x46, 0xff,\n  0x5a, 0xff, 0x57, 0xff, 0x5b, 0xff, 0x5b, 0xff, 0x80, 0xff, 0xdf, 0xff,\n  0x38, 0x00, 0x79, 0x00, 0x95, 0x00, 0xba, 0x00, 0xbe, 0x00, 0xb7, 0x00,\n  0x8d, 0x00, 0x55, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x4b, 0x00, 0x58, 0x00,\n  0x48, 0x00, 0x3c, 0x00, 0x41, 0x00, 0x54, 0x00, 0x65, 0x00, 0x67, 0x00,\n  0x45, 0x00, 0x07, 0x00, 0xcf, 0xff, 0xbb, 0xff, 0xaf, 0xff, 0x9e, 0xff,\n  0x96, 0xff, 0xa2, 0xff, 0xc0, 0xff, 0xe1, 0xff, 0xd8, 0xff, 0xc5, 0xff,\n  0xbf, 0xff, 0xbd, 0xff, 0xbc, 0xff, 0x8c, 0xff, 0x51, 0xff, 0x31, 0xff,\n  0x3f, 0xff, 0x85, 0xff, 0xd6, 0xff, 0x15, 0x00, 0x42, 0x00, 0x64, 0x00,\n  0x8b, 0x00, 0x80, 0x00, 0x7d, 0x00, 0x71, 0x00, 0x62, 0x00, 0x69, 0x00,\n  0x8d, 0x00, 0xc3, 0x00, 0x02, 0x01, 0x1f, 0x01, 0x19, 0x01, 0x0f, 0x01,\n  0x17, 0x01, 0x22, 0x01, 0x23, 0x01, 0x04, 0x01, 0xe5, 0x00, 0x9f, 0x00,\n  0x55, 0x00, 0xf9, 0xff, 0xa4, 0xff, 0x46, 0xff, 0xf8, 0xfe, 0xb4, 0xfe,\n  0x8a, 0xfe, 0x60, 0xfe, 0x35, 0xfe, 0x0d, 0xfe, 0xfe, 0xfd, 0xf9, 0xfd,\n  0x18, 0xfe, 0x65, 0xfe, 0xc6, 0xfe, 0x33, 0xff, 0x6f, 0xff, 0x94, 0xff,\n  0xa3, 0xff, 0xc3, 0xff, 0xf1, 0xff, 0x0a, 0x00, 0xff, 0xff, 0xf9, 0xff,\n  0x0a, 0x00, 0x47, 0x00, 0x7d, 0x00, 0xab, 0x00, 0xb3, 0x00, 0xb1, 0x00,\n  0x9a, 0x00, 0x97, 0x00, 0x9b, 0x00, 0x9e, 0x00, 0xaa, 0x00, 0xb6, 0x00,\n  0x9d, 0x00, 0x91, 0x00, 0x92, 0x00, 0xa2, 0x00, 0xc2, 0x00, 0x01, 0x01,\n  0x4e, 0x01, 0x8f, 0x01, 0xb8, 0x01, 0xb2, 0x01, 0x9b, 0x01, 0x57, 0x01,\n  0x0d, 0x01, 0xc6, 0x00, 0x90, 0x00, 0x5c, 0x00, 0x2d, 0x00, 0x0d, 0x00,\n  0xee, 0xff, 0xb4, 0xff, 0x6a, 0xff, 0x1c, 0xff, 0xcd, 0xfe, 0x8a, 0xfe,\n  0x5a, 0xfe, 0x3f, 0xfe, 0x35, 0xfe, 0x38, 0xfe, 0x41, 0xfe, 0x3c, 0xfe,\n  0x38, 0xfe, 0x52, 0xfe, 0x90, 0xfe, 0xe7, 0xfe, 0x30, 0xff, 0x75, 0xff,\n  0xb5, 0xff, 0xff, 0xff, 0x63, 0x00, 0xcd, 0x00, 0x37, 0x01, 0x96, 0x01,\n  0xe6, 0x01, 0x32, 0x02, 0x7d, 0x02, 0xba, 0x02, 0xe5, 0x02, 0xde, 0x02,\n  0xcf, 0x02, 0xa7, 0x02, 0x57, 0x02, 0xe4, 0x01, 0x83, 0x01, 0x22, 0x01,\n  0xb7, 0x00, 0x5c, 0x00, 0x05, 0x00, 0xc3, 0xff, 0x86, 0xff, 0x4d, 0xff,\n  0x04, 0xff, 0xc7, 0xfe, 0x9c, 0xfe, 0x6a, 0xfe, 0x4e, 0xfe, 0x3f, 0xfe,\n  0x28, 0xfe, 0x0b, 0xfe, 0xdb, 0xfd, 0xc2, 0xfd, 0xbb, 0xfd, 0xca, 0xfd,\n  0xdb, 0xfd, 0xf3, 0xfd, 0xf9, 0xfd, 0x12, 0xfe, 0x42, 0xfe, 0x82, 0xfe,\n  0xd6, 0xfe, 0x28, 0xff, 0x70, 0xff, 0xc4, 0xff, 0x30, 0x00, 0xb5, 0x00,\n  0x29, 0x01, 0x8e, 0x01, 0xea, 0x01, 0x52, 0x02, 0xbd, 0x02, 0xfe, 0x02,\n  0x1b, 0x03, 0x09, 0x03, 0xf8, 0x02, 0xe0, 0x02, 0xa0, 0x02, 0x51, 0x02,\n  0x10, 0x02, 0xe9, 0x01, 0x7a, 0x01, 0x01, 0x01, 0x93, 0x00, 0x23, 0x00,\n  0xc7, 0xff, 0x66, 0xff, 0xf6, 0xfe, 0xa7, 0xfe, 0x87, 0xfe, 0x6b, 0xfe,\n  0x74, 0xfe, 0x74, 0xfe, 0x81, 0xfe, 0x85, 0xfe, 0x83, 0xfe, 0x87, 0xfe,\n  0x99, 0xfe, 0xc1, 0xfe, 0xea, 0xfe, 0x1e, 0xff, 0x6c, 0xff, 0xce, 0xff,\n  0x29, 0x00, 0x68, 0x00, 0xaf, 0x00, 0xed, 0x00, 0x2c, 0x01, 0x3d, 0x01,\n  0x46, 0x01, 0x1e, 0x01, 0xd8, 0x00, 0x72, 0x00, 0x1d, 0x00, 0xef, 0xff,\n  0xba, 0xff, 0x8b, 0xff, 0x3e, 0xff, 0x07, 0xff, 0xcf, 0xfe, 0xb8, 0xfe,\n  0xb0, 0xfe, 0xc7, 0xfe, 0xd9, 0xfe, 0xe2, 0xfe, 0xd1, 0xfe, 0xc6, 0xfe,\n  0xb4, 0xfe, 0xba, 0xfe, 0xca, 0xfe, 0xf5, 0xfe, 0x02, 0xff, 0x0a, 0xff,\n  0x27, 0xff, 0x43, 0xff, 0x50, 0xff, 0x6a, 0xff, 0xbc, 0xff, 0x20, 0x00,\n  0x97, 0x00, 0x06, 0x01, 0x7c, 0x01, 0xf7, 0x01, 0x38, 0x02, 0x66, 0x02,\n  0x80, 0x02, 0x81, 0x02, 0x71, 0x02, 0x58, 0x02, 0x50, 0x02, 0x4f, 0x02,\n  0x30, 0x02, 0xe4, 0x01, 0x85, 0x01, 0x15, 0x01, 0xa1, 0x00, 0x1c, 0x00,\n  0x99, 0xff, 0x33, 0xff, 0xe6, 0xfe, 0xb5, 0xfe, 0xa7, 0xfe, 0x96, 0xfe,\n  0x70, 0xfe, 0x39, 0xfe, 0x2a, 0xfe, 0x27, 0xfe, 0x2f, 0xfe, 0x44, 0xfe,\n  0x5f, 0xfe, 0x78, 0xfe, 0x98, 0xfe, 0xaf, 0xfe, 0xbf, 0xfe, 0xe1, 0xfe,\n  0x0c, 0xff, 0x34, 0xff, 0x59, 0xff, 0x7c, 0xff, 0xa6, 0xff, 0xd8, 0xff,\n  0x09, 0x00, 0x3d, 0x00, 0x6d, 0x00, 0xa6, 0x00, 0xb3, 0x00, 0xac, 0x00,\n  0xc3, 0x00, 0xe7, 0x00, 0x35, 0x01, 0x7f, 0x01, 0xa6, 0x01, 0xdd, 0x01,\n  0x29, 0x02, 0x7f, 0x02, 0xad, 0x02, 0x96, 0x02, 0x62, 0x02, 0x20, 0x02,\n  0xcb, 0x01, 0x71, 0x01, 0x2a, 0x01, 0xee, 0x00, 0xa4, 0x00, 0x2b, 0x00,\n  0xb0, 0xff, 0x35, 0xff, 0xc6, 0xfe, 0x76, 0xfe, 0x31, 0xfe, 0x14, 0xfe,\n  0x09, 0xfe, 0x22, 0xfe, 0x56, 0xfe, 0x9f, 0xfe, 0xd4, 0xfe, 0x1e, 0xff,\n  0x4f, 0xff, 0x75, 0xff, 0x80, 0xff, 0x82, 0xff, 0x8b, 0xff, 0x9e, 0xff,\n  0xbf, 0xff, 0xda, 0xff, 0xf5, 0xff, 0xf3, 0xff, 0xe3, 0xff, 0xdc, 0xff,\n  0xec, 0xff, 0xe9, 0xff, 0xdb, 0xff, 0xce, 0xff, 0xc5, 0xff, 0xbf, 0xff,\n  0xcf, 0xff, 0xe9, 0xff, 0x0e, 0x00, 0x4a, 0x00, 0x8b, 0x00, 0xc8, 0x00,\n  0xf3, 0x00, 0x17, 0x01, 0x20, 0x01, 0x18, 0x01, 0x26, 0x01, 0x38, 0x01,\n  0x37, 0x01, 0x17, 0x01, 0xd5, 0x00, 0x7c, 0x00, 0x2b, 0x00, 0xf7, 0xff,\n  0xc2, 0xff, 0x87, 0xff, 0x40, 0xff, 0xeb, 0xfe, 0xa5, 0xfe, 0x78, 0xfe,\n  0x64, 0xfe, 0x54, 0xfe, 0x63, 0xfe, 0x5b, 0xfe, 0x61, 0xfe, 0x81, 0xfe,\n  0x8f, 0xfe, 0x97, 0xfe, 0x9e, 0xfe, 0xc5, 0xfe, 0xfe, 0xfe, 0x29, 0xff,\n  0x4f, 0xff, 0x81, 0xff, 0xc6, 0xff, 0x21, 0x00, 0x80, 0x00, 0xd4, 0x00,\n  0x2a, 0x01, 0x62, 0x01, 0x8e, 0x01, 0xd2, 0x01, 0x25, 0x02, 0x69, 0x02,\n  0x95, 0x02, 0x75, 0x02, 0x35, 0x02, 0x0b, 0x02, 0xdc, 0x01, 0xc4, 0x01,\n  0x8b, 0x01, 0x33, 0x01, 0xdd, 0x00, 0x84, 0x00, 0x3f, 0x00, 0xfd, 0xff,\n  0xd4, 0xff, 0xa4, 0xff, 0x7d, 0xff, 0x35, 0xff, 0xf9, 0xfe, 0xcc, 0xfe,\n  0xaa, 0xfe, 0x9c, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x80, 0xfe, 0xa8, 0xfe,\n  0xcf, 0xfe, 0x14, 0xff, 0x3f, 0xff, 0x77, 0xff, 0xa4, 0xff, 0xd8, 0xff,\n  0xf0, 0xff, 0x03, 0x00, 0x02, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00,\n  0xfd, 0xff, 0xf9, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x73, 0x00, 0xa8, 0x00,\n  0xc6, 0x00, 0xcc, 0x00, 0xf6, 0x00, 0x22, 0x01, 0x65, 0x01, 0x94, 0x01,\n  0x9a, 0x01, 0x7b, 0x01, 0x21, 0x01, 0xb9, 0x00, 0x5d, 0x00, 0x26, 0x00,\n  0xd9, 0xff, 0x97, 0xff, 0x64, 0xff, 0x3c, 0xff, 0x1b, 0xff, 0x0c, 0xff,\n  0x32, 0xff, 0x62, 0xff, 0x89, 0xff, 0xa4, 0xff, 0xc2, 0xff, 0xdc, 0xff,\n  0xee, 0xff, 0xfb, 0xff, 0x02, 0x00, 0x05, 0x00, 0xed, 0xff, 0xd3, 0xff,\n  0xab, 0xff, 0x77, 0xff, 0x2f, 0xff, 0xec, 0xfe, 0xcf, 0xfe, 0xcb, 0xfe,\n  0xec, 0xfe, 0x09, 0xff, 0x31, 0xff, 0x4f, 0xff, 0x85, 0xff, 0xb4, 0xff,\n  0xc8, 0xff, 0xcb, 0xff, 0xc6, 0xff, 0xe6, 0xff, 0x2a, 0x00, 0x6d, 0x00,\n  0xa2, 0x00, 0xda, 0x00, 0xd5, 0x00, 0xce, 0x00, 0xdb, 0x00, 0xfc, 0x00,\n  0xfc, 0x00, 0xe1, 0x00, 0xa1, 0x00, 0x55, 0x00, 0x11, 0x00, 0xed, 0xff,\n  0xe7, 0xff, 0xc5, 0xff, 0xa3, 0xff, 0x6c, 0xff, 0x48, 0xff, 0x3e, 0xff,\n  0x47, 0xff, 0x5d, 0xff, 0x6a, 0xff, 0x84, 0xff, 0xa7, 0xff, 0xfb, 0xff,\n  0x29, 0x00, 0x45, 0x00, 0x44, 0x00, 0x38, 0x00, 0x39, 0x00, 0x2f, 0x00,\n  0x12, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00, 0x14, 0x00,\n  0x0e, 0x00, 0x0a, 0x00, 0xfb, 0xff, 0x20, 0x00, 0x43, 0x00, 0x5e, 0x00,\n  0x61, 0x00, 0x51, 0x00, 0x49, 0x00, 0x47, 0x00, 0x3f, 0x00, 0x4c, 0x00,\n  0x4e, 0x00, 0x50, 0x00, 0x50, 0x00, 0x3f, 0x00, 0x1a, 0x00, 0xf7, 0xff,\n  0xed, 0xff, 0xf8, 0xff, 0xfe, 0xff, 0xe8, 0xff, 0xb8, 0xff, 0x7c, 0xff,\n  0x41, 0xff, 0x12, 0xff, 0xea, 0xfe, 0xbe, 0xfe, 0x95, 0xfe, 0x7b, 0xfe,\n  0x5b, 0xfe, 0x5e, 0xfe, 0x72, 0xfe, 0xb1, 0xfe, 0x10, 0xff, 0x86, 0xff,\n  0xf1, 0xff, 0x50, 0x00, 0xc4, 0x00, 0x34, 0x01, 0xae, 0x01, 0xff, 0x01,\n  0x37, 0x02, 0x68, 0x02, 0x6d, 0x02, 0x48, 0x02, 0xf5, 0x01, 0x9e, 0x01,\n  0x48, 0x01, 0x1d, 0x01, 0x17, 0x01, 0x15, 0x01, 0x04, 0x01, 0xed, 0x00,\n  0xcb, 0x00, 0xc9, 0x00, 0xc4, 0x00, 0xc2, 0x00, 0xaa, 0x00, 0x7a, 0x00,\n  0x4a, 0x00, 0x19, 0x00, 0xf1, 0xff, 0xd5, 0xff, 0xc1, 0xff, 0xa6, 0xff,\n  0x71, 0xff, 0x29, 0xff, 0xea, 0xfe, 0xb6, 0xfe, 0x96, 0xfe, 0x8a, 0xfe,\n  0x85, 0xfe, 0x98, 0xfe, 0xa9, 0xfe, 0xcf, 0xfe, 0xfa, 0xfe, 0x38, 0xff,\n  0x8e, 0xff, 0xda, 0xff, 0x0d, 0x00, 0x47, 0x00, 0x7d, 0x00, 0xa4, 0x00,\n  0xbc, 0x00, 0xd1, 0x00, 0x02, 0x01, 0x32, 0x01, 0x8a, 0x01, 0xc3, 0x01,\n  0xd8, 0x01, 0xca, 0x01, 0xa5, 0x01, 0x8f, 0x01, 0x73, 0x01, 0x43, 0x01,\n  0xeb, 0x00, 0x8e, 0x00, 0x2c, 0x00, 0xda, 0xff, 0x7b, 0xff, 0x37, 0xff,\n  0xf0, 0xfe, 0xc2, 0xfe, 0x96, 0xfe, 0x87, 0xfe, 0x81, 0xfe, 0x7e, 0xfe,\n  0x5f, 0xfe, 0x4e, 0xfe, 0x44, 0xfe, 0x45, 0xfe, 0x50, 0xfe, 0x5a, 0xfe,\n  0x59, 0xfe, 0x66, 0xfe, 0x73, 0xfe, 0x82, 0xfe, 0xa3, 0xfe, 0xd3, 0xfe,\n  0x08, 0xff, 0x3d, 0xff, 0x76, 0xff, 0xc5, 0xff, 0x16, 0x00, 0x77, 0x00,\n  0xc9, 0x00, 0x10, 0x01, 0x27, 0x01, 0x32, 0x01, 0x2f, 0x01, 0x47, 0x01,\n  0x75, 0x01, 0x91, 0x01, 0x96, 0x01, 0x8e, 0x01, 0x84, 0x01, 0x9e, 0x01,\n  0x92, 0x01, 0x6e, 0x01, 0x4b, 0x01, 0x13, 0x01, 0xdb, 0x00, 0x82, 0x00,\n  0x3a, 0x00, 0x02, 0x00, 0xda, 0xff, 0xc6, 0xff, 0xad, 0xff, 0xa3, 0xff,\n  0x86, 0xff, 0x9a, 0xff, 0xd7, 0xff, 0x1f, 0x00, 0x2f, 0x00, 0x19, 0x00,\n  0xec, 0xff, 0xac, 0xff, 0x5e, 0xff, 0x1c, 0xff, 0xed, 0xfe, 0xcf, 0xfe,\n  0xb6, 0xfe, 0xc9, 0xfe, 0xe0, 0xfe, 0x10, 0xff, 0x36, 0xff, 0x4f, 0xff,\n  0x85, 0xff, 0xd5, 0xff, 0x38, 0x00, 0x6f, 0x00, 0x96, 0x00, 0xb7, 0x00,\n  0xc8, 0x00, 0xe1, 0x00, 0xf8, 0x00, 0xfd, 0x00, 0xee, 0x00, 0xdb, 0x00,\n  0xb9, 0x00, 0x7b, 0x00, 0x51, 0x00, 0x16, 0x00, 0xe5, 0xff, 0xab, 0xff,\n  0x78, 0xff, 0x68, 0xff, 0x70, 0xff, 0x77, 0xff, 0x54, 0xff, 0x16, 0xff,\n  0xf6, 0xfe, 0xf3, 0xfe, 0xfc, 0xfe, 0xf3, 0xfe, 0x03, 0xff, 0x05, 0xff,\n  0x2a, 0xff, 0x6b, 0xff, 0xab, 0xff, 0xe4, 0xff, 0x33, 0x00, 0x73, 0x00,\n  0x94, 0x00, 0xa9, 0x00, 0xca, 0x00, 0xf3, 0x00, 0xfe, 0x00, 0xfe, 0x00,\n  0xfd, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0x0c, 0x01, 0x1e, 0x01,\n  0x0c, 0x01, 0x12, 0x01, 0x11, 0x01, 0x09, 0x01, 0xe3, 0x00, 0x99, 0x00,\n  0x61, 0x00, 0x21, 0x00, 0xe4, 0xff, 0x8d, 0xff, 0x55, 0xff, 0x20, 0xff,\n  0xf7, 0xfe, 0xc1, 0xfe, 0x92, 0xfe, 0x75, 0xfe, 0x60, 0xfe, 0x4e, 0xfe,\n  0x56, 0xfe, 0x60, 0xfe, 0x76, 0xfe, 0x95, 0xfe, 0xc3, 0xfe, 0xeb, 0xfe,\n  0x19, 0xff, 0x5c, 0xff, 0x80, 0xff, 0xa9, 0xff, 0xcd, 0xff, 0x00, 0x00,\n  0x3f, 0x00, 0x59, 0x00, 0x67, 0x00, 0x6d, 0x00, 0xa7, 0x00, 0xe2, 0x00,\n  0x15, 0x01, 0x56, 0x01, 0xa2, 0x01, 0xc1, 0x01, 0xb6, 0x01, 0x90, 0x01,\n  0x60, 0x01, 0x17, 0x01, 0xc8, 0x00, 0x5e, 0x00, 0x02, 0x00, 0xbb, 0xff,\n  0x94, 0xff, 0x89, 0xff, 0x9c, 0xff, 0xae, 0xff, 0xd2, 0xff, 0x07, 0x00,\n  0x3e, 0x00, 0x72, 0x00, 0x93, 0x00, 0x9b, 0x00, 0xc4, 0x00, 0xf1, 0x00,\n  0x15, 0x01, 0x40, 0x01, 0x63, 0x01, 0x6c, 0x01, 0x38, 0x01, 0xeb, 0x00,\n  0x98, 0x00, 0x4e, 0x00, 0x01, 0x00, 0xd6, 0xff, 0xb3, 0xff, 0xa6, 0xff,\n  0x98, 0xff, 0x6b, 0xff, 0x41, 0xff, 0x2b, 0xff, 0x11, 0xff, 0xf5, 0xfe,\n  0xec, 0xfe, 0xeb, 0xfe, 0xe6, 0xfe, 0xe6, 0xfe, 0xd9, 0xfe, 0xd4, 0xfe,\n  0xd0, 0xfe, 0xc9, 0xfe, 0xd1, 0xfe, 0xd6, 0xfe, 0xe3, 0xfe, 0xfe, 0xfe,\n  0x1a, 0xff, 0x55, 0xff, 0xa4, 0xff, 0x0a, 0x00, 0x6c, 0x00, 0xc8, 0x00,\n  0x2a, 0x01, 0x70, 0x01, 0x8b, 0x01, 0x79, 0x01, 0x5d, 0x01, 0x55, 0x01,\n  0x50, 0x01, 0x53, 0x01, 0x3f, 0x01, 0x37, 0x01, 0x17, 0x01, 0xe2, 0x00,\n  0x9e, 0x00, 0x61, 0x00, 0x1e, 0x00, 0xe5, 0xff, 0x9a, 0xff, 0x5c, 0xff,\n  0x19, 0xff, 0xf6, 0xfe, 0xdf, 0xfe, 0xdc, 0xfe, 0xdd, 0xfe, 0xda, 0xfe,\n  0xc7, 0xfe, 0xe0, 0xfe, 0xfb, 0xfe, 0x31, 0xff, 0x55, 0xff, 0x82, 0xff,\n  0xa9, 0xff, 0xd1, 0xff, 0xe5, 0xff, 0xf5, 0xff, 0x01, 0x00, 0x16, 0x00,\n  0x35, 0x00, 0x4d, 0x00, 0x60, 0x00, 0x73, 0x00, 0x73, 0x00, 0x77, 0x00,\n  0x81, 0x00, 0x76, 0x00, 0x55, 0x00, 0x1f, 0x00, 0xf5, 0xff, 0xcb, 0xff,\n  0xae, 0xff, 0xa5, 0xff, 0x9a, 0xff, 0x8f, 0xff, 0x89, 0xff, 0x73, 0xff,\n  0x68, 0xff, 0x58, 0xff, 0x50, 0xff, 0x4d, 0xff, 0x5a, 0xff, 0x66, 0xff,\n  0x75, 0xff, 0x95, 0xff, 0xc4, 0xff, 0xe6, 0xff, 0x02, 0x00, 0x1a, 0x00,\n  0x2f, 0x00, 0x44, 0x00, 0x51, 0x00, 0x5d, 0x00, 0x6f, 0x00, 0x8a, 0x00,\n  0x99, 0x00, 0xa4, 0x00, 0xc7, 0x00, 0xed, 0x00, 0x06, 0x01, 0x10, 0x01,\n  0x11, 0x01, 0x0c, 0x01, 0xf6, 0x00, 0xf1, 0x00, 0xda, 0x00, 0xda, 0x00,\n  0xbb, 0x00, 0x99, 0x00, 0x82, 0x00, 0x78, 0x00, 0x67, 0x00, 0x4c, 0x00,\n  0x10, 0x00, 0x13, 0x00, 0x05, 0x00, 0x08, 0x00, 0x03, 0x00, 0x21, 0x00,\n  0x39, 0x00, 0x56, 0x00, 0x68, 0x00, 0x4c, 0x00, 0x29, 0x00, 0xee, 0xff,\n  0xc2, 0xff, 0x95, 0xff, 0x7c, 0xff, 0x50, 0xff, 0x25, 0xff, 0xf2, 0xfe,\n  0xd9, 0xfe, 0xdd, 0xfe, 0xf3, 0xfe, 0xfc, 0xfe, 0x17, 0xff, 0x33, 0xff,\n  0x3c, 0xff, 0x48, 0xff, 0x42, 0xff, 0x40, 0xff, 0x50, 0xff, 0x7d, 0xff,\n  0xbc, 0xff, 0x19, 0x00, 0x78, 0x00, 0xe3, 0x00, 0x6c, 0x01, 0xee, 0x01,\n  0x36, 0x02, 0x58, 0x02, 0x54, 0x02, 0x22, 0x02, 0xd6, 0x01, 0x84, 0x01,\n  0x39, 0x01, 0xe5, 0x00, 0x97, 0x00, 0x3d, 0x00, 0xe9, 0xff, 0x90, 0xff,\n  0x3c, 0xff, 0xe3, 0xfe, 0x9a, 0xfe, 0x79, 0xfe, 0x7c, 0xfe, 0x82, 0xfe,\n  0x87, 0xfe, 0x8d, 0xfe, 0x8f, 0xfe, 0x9b, 0xfe, 0xb6, 0xfe, 0xe2, 0xfe,\n  0x14, 0xff, 0x37, 0xff, 0x61, 0xff, 0x80, 0xff, 0x94, 0xff, 0xaa, 0xff,\n  0xcc, 0xff, 0xf7, 0xff, 0x2c, 0x00, 0x46, 0x00, 0x4e, 0x00, 0x56, 0x00,\n  0x8e, 0x00, 0xf2, 0x00, 0x37, 0x01, 0x67, 0x01, 0x5a, 0x01, 0x39, 0x01,\n  0x01, 0x01, 0xd5, 0x00, 0xa3, 0x00, 0x7a, 0x00, 0x5d, 0x00, 0x5d, 0x00,\n  0x50, 0x00, 0x48, 0x00, 0x4d, 0x00, 0x63, 0x00, 0x85, 0x00, 0x90, 0x00,\n  0x8a, 0x00, 0x5b, 0x00, 0x33, 0x00, 0x12, 0x00, 0xef, 0xff, 0xc9, 0xff,\n  0xa4, 0xff, 0x79, 0xff, 0x55, 0xff, 0x35, 0xff, 0x04, 0xff, 0xf2, 0xfe,\n  0xd3, 0xfe, 0xdb, 0xfe, 0xdb, 0xfe, 0xf7, 0xfe, 0x25, 0xff, 0x61, 0xff,\n  0xb6, 0xff, 0x07, 0x00, 0x5f, 0x00, 0xa8, 0x00, 0xe7, 0x00, 0x1b, 0x01,\n  0x33, 0x01, 0x32, 0x01, 0x26, 0x01, 0x1a, 0x01, 0xf6, 0x00, 0xbd, 0x00,\n  0x86, 0x00, 0x4c, 0x00, 0x2c, 0x00, 0x0d, 0x00, 0xe2, 0xff, 0xd1, 0xff,\n  0xb6, 0xff, 0xaf, 0xff, 0x90, 0xff, 0x75, 0xff, 0x59, 0xff, 0x48, 0xff,\n  0x48, 0xff, 0x40, 0xff, 0x2f, 0xff, 0x0f, 0xff, 0xf5, 0xfe, 0xe3, 0xfe,\n  0xed, 0xfe, 0x00, 0xff, 0x2e, 0xff, 0x88, 0xff, 0xed, 0xff, 0x55, 0x00,\n  0xbf, 0x00, 0xff, 0x00, 0x18, 0x01, 0xf4, 0x00, 0xb5, 0x00, 0x59, 0x00,\n  0x0c, 0x00, 0xb8, 0xff, 0x78, 0xff, 0x56, 0xff, 0x33, 0xff, 0x2e, 0xff,\n  0x41, 0xff, 0x64, 0xff, 0xaa, 0xff, 0xe7, 0xff, 0x27, 0x00, 0x4e, 0x00,\n  0x73, 0x00, 0x8e, 0x00, 0xae, 0x00, 0xd0, 0x00, 0xea, 0x00, 0xee, 0x00,\n  0xea, 0x00, 0xe7, 0x00, 0xe9, 0x00, 0xca, 0x00, 0xbe, 0x00, 0xa1, 0x00,\n  0x93, 0x00, 0x82, 0x00, 0x71, 0x00, 0x54, 0x00, 0x3b, 0x00, 0x1e, 0x00,\n  0xf0, 0xff, 0xc5, 0xff, 0x86, 0xff, 0x47, 0xff, 0x18, 0xff, 0x07, 0xff,\n  0x0b, 0xff, 0x11, 0xff, 0x16, 0xff, 0x27, 0xff, 0x2f, 0xff, 0x48, 0xff,\n  0x62, 0xff, 0xa5, 0xff, 0xfe, 0xff, 0x74, 0x00, 0xd8, 0x00, 0x33, 0x01,\n  0x64, 0x01, 0x98, 0x01, 0xa7, 0x01, 0x9c, 0x01, 0x74, 0x01, 0x3a, 0x01,\n  0xfb, 0x00, 0xb4, 0x00, 0x7a, 0x00, 0x43, 0x00, 0x05, 0x00, 0xc3, 0xff,\n  0x82, 0xff, 0x4e, 0xff, 0x29, 0xff, 0xfb, 0xfe, 0xe4, 0xfe, 0xcf, 0xfe,\n  0xc0, 0xfe, 0xc8, 0xfe, 0xcf, 0xfe, 0xf2, 0xfe, 0x03, 0xff, 0x19, 0xff,\n  0x47, 0xff, 0x74, 0xff, 0xb0, 0xff, 0xc8, 0xff, 0xed, 0xff, 0x01, 0x00,\n  0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x11, 0x00, 0x24, 0x00, 0x33, 0x00,\n  0x4c, 0x00, 0x7c, 0x00, 0xb2, 0x00, 0xea, 0x00, 0x1f, 0x01, 0x42, 0x01,\n  0x6c, 0x01, 0x6d, 0x01, 0x6c, 0x01, 0x3d, 0x01, 0x13, 0x01, 0xcf, 0x00,\n  0x74, 0x00, 0x18, 0x00, 0xc4, 0xff, 0x86, 0xff, 0x4d, 0xff, 0x13, 0xff,\n  0xdc, 0xfe, 0xb1, 0xfe, 0xa6, 0xfe, 0x99, 0xfe, 0x91, 0xfe, 0x82, 0xfe,\n  0x85, 0xfe, 0x98, 0xfe, 0xa6, 0xfe, 0xbe, 0xfe, 0xdc, 0xfe, 0x07, 0xff,\n  0x40, 0xff, 0x88, 0xff, 0xf4, 0xff, 0x3c, 0x00, 0x8b, 0x00, 0xcd, 0x00,\n  0xff, 0x00, 0x28, 0x01, 0x50, 0x01, 0x77, 0x01, 0x94, 0x01, 0xb0, 0x01,\n  0xaf, 0x01, 0x91, 0x01, 0x5c, 0x01, 0x32, 0x01, 0xf1, 0x00, 0xaa, 0x00,\n  0x6b, 0x00, 0x41, 0x00, 0x10, 0x00, 0xeb, 0xff, 0xc1, 0xff, 0xc0, 0xff,\n  0xb7, 0xff, 0xb6, 0xff, 0xbe, 0xff, 0xc9, 0xff, 0xb3, 0xff, 0x98, 0xff,\n  0x71, 0xff, 0x5b, 0xff, 0x47, 0xff, 0x23, 0xff, 0x0f, 0xff, 0x06, 0xff,\n  0x19, 0xff, 0x4a, 0xff, 0x80, 0xff, 0xaa, 0xff, 0xc8, 0xff, 0xdb, 0xff,\n  0xfc, 0xff, 0x0c, 0x00, 0x2e, 0x00, 0x6c, 0x00, 0x98, 0x00, 0xbb, 0x00,\n  0xda, 0x00, 0xe9, 0x00, 0x03, 0x01, 0x11, 0x01, 0x11, 0x01, 0x05, 0x01,\n  0x05, 0x01, 0xdc, 0x00, 0xb2, 0x00, 0x70, 0x00, 0x22, 0x00, 0xd6, 0xff,\n  0x82, 0xff, 0x4e, 0xff, 0x22, 0xff, 0x08, 0xff, 0xeb, 0xfe, 0xcd, 0xfe,\n  0xbc, 0xfe, 0xbd, 0xfe, 0xf5, 0xfe, 0x39, 0xff, 0x8b, 0xff, 0xd4, 0xff,\n  0x1e, 0x00, 0x5a, 0x00, 0xa5, 0x00, 0xe4, 0x00, 0x06, 0x01, 0x14, 0x01,\n  0x03, 0x01, 0xf6, 0x00, 0xea, 0x00, 0xcd, 0x00, 0x9d, 0x00, 0x5d, 0x00,\n  0x2f, 0x00, 0xf0, 0xff, 0xc6, 0xff, 0x95, 0xff, 0x84, 0xff, 0x8d, 0xff,\n  0x87, 0xff, 0x8e, 0xff, 0xab, 0xff, 0xc9, 0xff, 0xf0, 0xff, 0x26, 0x00,\n  0x44, 0x00, 0x50, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x13, 0x00, 0xd3, 0xff,\n  0x81, 0xff, 0x2e, 0xff, 0xf0, 0xfe, 0xc7, 0xfe, 0xa6, 0xfe, 0xba, 0xfe,\n  0xcf, 0xfe, 0xf5, 0xfe, 0x09, 0xff, 0x3a, 0xff, 0x6e, 0xff, 0xd3, 0xff,\n  0x25, 0x00, 0x5c, 0x00, 0x7d, 0x00, 0x91, 0x00, 0x9c, 0x00, 0xa2, 0x00,\n  0xb4, 0x00, 0xd3, 0x00, 0xf9, 0x00, 0x1a, 0x01, 0x3c, 0x01, 0x4f, 0x01,\n  0x50, 0x01, 0x3f, 0x01, 0x29, 0x01, 0x04, 0x01, 0xc9, 0x00, 0x82, 0x00,\n  0x37, 0x00, 0x02, 0x00, 0xd4, 0xff, 0xc1, 0xff, 0xb2, 0xff, 0xa2, 0xff,\n  0x97, 0xff, 0x92, 0xff, 0x8b, 0xff, 0x9a, 0xff, 0xa4, 0xff, 0xc2, 0xff,\n  0xc3, 0xff, 0xc8, 0xff, 0xc8, 0xff, 0xcf, 0xff, 0xc3, 0xff, 0xcd, 0xff,\n  0xae, 0xff, 0x8e, 0xff, 0x66, 0xff, 0x44, 0xff, 0x29, 0xff, 0x28, 0xff,\n  0x30, 0xff, 0x30, 0xff, 0x4d, 0xff, 0x70, 0xff, 0xa8, 0xff, 0x02, 0x00,\n  0x1a, 0x00, 0x31, 0x00, 0x18, 0x00, 0x12, 0x00, 0xfe, 0xff, 0x14, 0x00,\n  0x3d, 0x00, 0x73, 0x00, 0x96, 0x00, 0xb2, 0x00, 0xdd, 0x00, 0x10, 0x01,\n  0x31, 0x01, 0x24, 0x01, 0x0d, 0x01, 0xde, 0x00, 0xaf, 0x00, 0x87, 0x00,\n  0x84, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00, 0x72, 0x00, 0x70, 0x00,\n  0x74, 0x00, 0x85, 0x00, 0x7f, 0x00, 0x69, 0x00, 0x48, 0x00, 0x32, 0x00,\n  0x0b, 0x00, 0xf2, 0xff, 0xc1, 0xff, 0x91, 0xff, 0x53, 0xff, 0x0a, 0xff,\n  0xcc, 0xfe, 0x8b, 0xfe, 0x67, 0xfe, 0x54, 0xfe, 0x54, 0xfe, 0x55, 0xfe,\n  0x6d, 0xfe, 0x93, 0xfe, 0xd6, 0xfe, 0x05, 0xff, 0x5a, 0xff, 0x83, 0xff,\n  0xd3, 0xff, 0x17, 0x00, 0x51, 0x00, 0x90, 0x00, 0xc3, 0x00, 0x10, 0x01,\n  0x4a, 0x01, 0x9a, 0x01, 0xc1, 0x01, 0xd0, 0x01, 0xa8, 0x01, 0x62, 0x01,\n  0xf8, 0x00, 0x8d, 0x00, 0x2b, 0x00, 0xd6, 0xff, 0x9e, 0xff, 0x7d, 0xff,\n  0x5f, 0xff, 0x56, 0xff, 0x5e, 0xff, 0x69, 0xff, 0x75, 0xff, 0x6c, 0xff,\n  0x6b, 0xff, 0x5a, 0xff, 0x6f, 0xff, 0x91, 0xff, 0xcb, 0xff, 0x18, 0x00,\n  0x69, 0x00, 0xb0, 0x00, 0xda, 0x00, 0xf5, 0x00, 0x02, 0x01, 0xfa, 0x00,\n  0xe8, 0x00, 0xce, 0x00, 0xbd, 0x00, 0xa6, 0x00, 0x84, 0x00, 0x54, 0x00,\n  0x17, 0x00, 0xc8, 0xff, 0x82, 0xff, 0x50, 0xff, 0x30, 0xff, 0x0f, 0xff,\n  0x01, 0xff, 0x09, 0xff, 0x27, 0xff, 0x6a, 0xff, 0xaf, 0xff, 0xf6, 0xff,\n  0x21, 0x00, 0x40, 0x00, 0x77, 0x00, 0x8f, 0x00, 0xa2, 0x00, 0x88, 0x00,\n  0x58, 0x00, 0x1f, 0x00, 0xe6, 0xff, 0xb8, 0xff, 0x99, 0xff, 0x81, 0xff,\n  0x7d, 0xff, 0x92, 0xff, 0xc9, 0xff, 0xfa, 0xff, 0x06, 0x00, 0x09, 0x00,\n  0xea, 0xff, 0xdb, 0xff, 0xc9, 0xff, 0xb0, 0xff, 0xa9, 0xff, 0xc1, 0xff,\n  0xe5, 0xff, 0x11, 0x00, 0x46, 0x00, 0x7f, 0x00, 0xb6, 0x00, 0xcb, 0x00,\n  0xca, 0x00, 0xc5, 0x00, 0xc1, 0x00, 0xc3, 0x00, 0xc3, 0x00, 0xae, 0x00,\n  0x97, 0x00, 0x84, 0x00, 0x6f, 0x00, 0x69, 0x00, 0x61, 0x00, 0x4b, 0x00,\n  0x32, 0x00, 0x0b, 0x00, 0xe0, 0xff, 0xc8, 0xff, 0xb5, 0xff, 0x94, 0xff,\n  0x6d, 0xff, 0x34, 0xff, 0x0b, 0xff, 0xe1, 0xfe, 0xd3, 0xfe, 0xd3, 0xfe,\n  0xec, 0xfe, 0x11, 0xff, 0x48, 0xff, 0x78, 0xff, 0xa0, 0xff, 0xbe, 0xff,\n  0xc6, 0xff, 0xcc, 0xff, 0xc9, 0xff, 0xd9, 0xff, 0xed, 0xff, 0x05, 0x00,\n  0x1b, 0x00, 0x36, 0x00, 0x50, 0x00, 0x54, 0x00, 0x5d, 0x00, 0x78, 0x00,\n  0x91, 0x00, 0x8a, 0x00, 0x86, 0x00, 0x81, 0x00, 0x86, 0x00, 0x66, 0x00,\n  0x3f, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x0d, 0x00, 0x0f, 0x00,\n  0x0a, 0x00, 0xf4, 0xff, 0xdc, 0xff, 0xb6, 0xff, 0xa5, 0xff, 0xa0, 0xff,\n  0xa3, 0xff, 0xb4, 0xff, 0xd3, 0xff, 0xef, 0xff, 0x0c, 0x00, 0x2d, 0x00,\n  0x3d, 0x00, 0x52, 0x00, 0x61, 0x00, 0x84, 0x00, 0xae, 0x00, 0xb5, 0x00,\n  0xb1, 0x00, 0x86, 0x00, 0x73, 0x00, 0x38, 0x00, 0xf7, 0xff, 0xb6, 0xff,\n  0x81, 0xff, 0x56, 0xff, 0x3b, 0xff, 0x35, 0xff, 0x2e, 0xff, 0x39, 0xff,\n  0x40, 0xff, 0x40, 0xff, 0x56, 0xff, 0x64, 0xff, 0x69, 0xff, 0x69, 0xff,\n  0x67, 0xff, 0x57, 0xff, 0x54, 0xff, 0x3b, 0xff, 0x4c, 0xff, 0x6c, 0xff,\n  0x9b, 0xff, 0xd2, 0xff, 0x0d, 0x00, 0x63, 0x00, 0xc3, 0x00, 0x12, 0x01,\n  0x45, 0x01, 0x7d, 0x01, 0xb4, 0x01, 0xd7, 0x01, 0xf9, 0x01, 0x0b, 0x02,\n  0xe8, 0x01, 0xcd, 0x01, 0xad, 0x01, 0x7f, 0x01, 0x3f, 0x01, 0x01, 0x01,\n  0xb6, 0x00, 0x5d, 0x00, 0xeb, 0xff, 0x81, 0xff, 0x09, 0xff, 0xa9, 0xfe,\n  0x62, 0xfe, 0x43, 0xfe, 0x38, 0xfe, 0x48, 0xfe, 0x72, 0xfe, 0x9d, 0xfe,\n  0xe2, 0xfe, 0x33, 0xff, 0x90, 0xff, 0xf1, 0xff, 0x39, 0x00, 0x5a, 0x00,\n  0x53, 0x00, 0x43, 0x00, 0x37, 0x00, 0x39, 0x00, 0x52, 0x00, 0x75, 0x00,\n  0xa2, 0x00, 0xb5, 0x00, 0xbc, 0x00, 0xa6, 0x00, 0x87, 0x00, 0x53, 0x00,\n  0x23, 0x00, 0x1d, 0x00, 0x2c, 0x00, 0x31, 0x00, 0x1c, 0x00, 0xef, 0xff,\n  0xbb, 0xff, 0x96, 0xff, 0x7d, 0xff, 0x77, 0xff, 0x87, 0xff, 0x8d, 0xff,\n  0x9b, 0xff, 0xac, 0xff, 0xda, 0xff, 0x0c, 0x00, 0x43, 0x00, 0x54, 0x00,\n  0x41, 0x00, 0x01, 0x00, 0xb3, 0xff, 0x94, 0xff, 0x8a, 0xff, 0x99, 0xff,\n  0xa3, 0xff, 0xa6, 0xff, 0xbc, 0xff, 0xd1, 0xff, 0xf2, 0xff, 0x0e, 0x00,\n  0x13, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x26, 0x00,\n  0x27, 0x00, 0x29, 0x00, 0x29, 0x00, 0x3e, 0x00, 0x57, 0x00, 0x7c, 0x00,\n  0xab, 0x00, 0xd5, 0x00, 0xf0, 0x00, 0xf7, 0x00, 0xf1, 0x00, 0xe6, 0x00,\n  0xc0, 0x00, 0x92, 0x00, 0x53, 0x00, 0x1d, 0x00, 0xf7, 0xff, 0xd6, 0xff,\n  0xa3, 0xff, 0x7f, 0xff, 0x59, 0xff, 0x3c, 0xff, 0x36, 0xff, 0x3d, 0xff,\n  0x4f, 0xff, 0x50, 0xff, 0x4c, 0xff, 0x43, 0xff, 0x3a, 0xff, 0x29, 0xff,\n  0x26, 0xff, 0x39, 0xff, 0x5f, 0xff, 0x81, 0xff, 0xa6, 0xff, 0xc1, 0xff,\n  0xe1, 0xff, 0x1c, 0x00, 0x5b, 0x00, 0xb0, 0x00, 0xeb, 0x00, 0xff, 0x00,\n  0x02, 0x01, 0xf7, 0x00, 0xdb, 0x00, 0xab, 0x00, 0x97, 0x00, 0x90, 0x00,\n  0x81, 0x00, 0x5e, 0x00, 0x2f, 0x00, 0x11, 0x00, 0xf9, 0xff, 0xe9, 0xff,\n  0xf3, 0xff, 0x0f, 0x00, 0x25, 0x00, 0xff, 0xff, 0xe1, 0xff, 0xbe, 0xff,\n  0xa0, 0xff, 0x80, 0xff, 0x6b, 0xff, 0x59, 0xff, 0x44, 0xff, 0x2b, 0xff,\n  0x19, 0xff, 0x1c, 0xff, 0x28, 0xff, 0x42, 0xff, 0x3f, 0xff, 0x5d, 0xff,\n  0x83, 0xff, 0x9d, 0xff, 0xbc, 0xff, 0xd7, 0xff, 0x05, 0x00, 0x18, 0x00,\n  0x1e, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x21, 0x00, 0x2e, 0x00,\n  0x2f, 0x00, 0x28, 0x00, 0x23, 0x00, 0x35, 0x00, 0x34, 0x00, 0x22, 0x00,\n  0xf4, 0xff, 0xd0, 0xff, 0xca, 0xff, 0xdd, 0xff, 0x0b, 0x00, 0x2d, 0x00,\n  0x59, 0x00, 0x82, 0x00, 0xae, 0x00, 0xdf, 0x00, 0x13, 0x01, 0x65, 0x01,\n  0xb5, 0x01, 0xe8, 0x01, 0x03, 0x02, 0x02, 0x02, 0xdd, 0x01, 0x9f, 0x01,\n  0x5a, 0x01, 0x0c, 0x01, 0xab, 0x00, 0x3e, 0x00, 0xd9, 0xff, 0x7b, 0xff,\n  0x25, 0xff, 0xd9, 0xfe, 0x9e, 0xfe, 0x7c, 0xfe, 0x68, 0xfe, 0x56, 0xfe,\n  0x51, 0xfe, 0x60, 0xfe, 0x72, 0xfe, 0x9a, 0xfe, 0xd2, 0xfe, 0x0d, 0xff,\n  0x3a, 0xff, 0x6b, 0xff, 0x94, 0xff, 0xba, 0xff, 0xd7, 0xff, 0xee, 0xff,\n  0x10, 0x00, 0x12, 0x00, 0x2c, 0x00, 0x32, 0x00, 0x33, 0x00, 0x3f, 0x00,\n  0x5a, 0x00, 0x86, 0x00, 0xc3, 0x00, 0xef, 0x00, 0x02, 0x01, 0xef, 0x00,\n  0xd5, 0x00, 0xb7, 0x00, 0xa1, 0x00, 0x91, 0x00, 0x7e, 0x00, 0x61, 0x00,\n  0x3c, 0x00, 0x14, 0x00, 0xf9, 0xff, 0xde, 0xff, 0xcc, 0xff, 0xc3, 0xff,\n  0xb2, 0xff, 0xa1, 0xff, 0x9e, 0xff, 0x8d, 0xff, 0x8a, 0xff, 0x85, 0xff,\n  0x80, 0xff, 0x8d, 0xff, 0xa1, 0xff, 0xb8, 0xff, 0xdf, 0xff, 0x03, 0x00,\n  0x24, 0x00, 0x52, 0x00, 0x63, 0x00, 0x6e, 0x00, 0x68, 0x00, 0x49, 0x00,\n  0x17, 0x00, 0xe2, 0xff, 0xb5, 0xff, 0x9b, 0xff, 0x8e, 0xff, 0x91, 0xff,\n  0x82, 0xff, 0x7a, 0xff, 0x86, 0xff, 0x9d, 0xff, 0xc5, 0xff, 0xda, 0xff,\n  0xfe, 0xff, 0x2d, 0x00, 0x62, 0x00, 0xa6, 0x00, 0xdb, 0x00, 0x07, 0x01,\n  0x17, 0x01, 0x11, 0x01, 0x0c, 0x01, 0xf4, 0x00, 0xcf, 0x00, 0x9a, 0x00,\n  0x5d, 0x00, 0x23, 0x00, 0xe1, 0xff, 0xba, 0xff, 0x9f, 0xff, 0xa8, 0xff,\n  0xa0, 0xff, 0xa8, 0xff, 0x8a, 0xff, 0x6e, 0xff, 0x5c, 0xff, 0x5d, 0xff,\n  0x7a, 0xff, 0xa0, 0xff, 0xd2, 0xff, 0x15, 0x00, 0x56, 0x00, 0x87, 0x00,\n  0xac, 0x00, 0xa8, 0x00, 0x78, 0x00, 0x45, 0x00, 0x24, 0x00, 0x13, 0x00,\n  0x21, 0x00, 0x28, 0x00, 0x11, 0x00, 0xf2, 0xff, 0xca, 0xff, 0xa5, 0xff,\n  0x81, 0xff, 0x71, 0xff, 0x6a, 0xff, 0x60, 0xff, 0x5a, 0xff, 0x5b, 0xff,\n  0x7c, 0xff, 0x94, 0xff, 0xbf, 0xff, 0xf4, 0xff, 0x03, 0x00, 0x11, 0x00,\n  0x00, 0x00, 0xfa, 0xff, 0xe7, 0xff, 0xe6, 0xff, 0xf8, 0xff, 0x05, 0x00,\n  0x1a, 0x00, 0x33, 0x00, 0x5a, 0x00, 0x84, 0x00, 0xa5, 0x00, 0xb5, 0x00,\n  0xc2, 0x00, 0xba, 0x00, 0xa6, 0x00, 0x79, 0x00, 0x3d, 0x00, 0x0d, 0x00,\n  0xd9, 0xff, 0xbb, 0xff, 0x92, 0xff, 0x79, 0xff, 0x62, 0xff, 0x4f, 0xff,\n  0x39, 0xff, 0x29, 0xff, 0x2e, 0xff, 0x48, 0xff, 0x6d, 0xff, 0x85, 0xff,\n  0xa8, 0xff, 0xc7, 0xff, 0xf8, 0xff, 0x1c, 0x00, 0x38, 0x00, 0x6e, 0x00,\n  0xba, 0x00, 0x15, 0x01, 0x5d, 0x01, 0x92, 0x01, 0xa4, 0x01, 0xc5, 0x01,\n  0xb0, 0x01, 0x81, 0x01, 0x3b, 0x01, 0xe9, 0x00, 0x85, 0x00, 0x25, 0x00,\n  0xd7, 0xff, 0xa0, 0xff, 0x7f, 0xff, 0x60, 0xff, 0x5d, 0xff, 0x60, 0xff,\n  0x68, 0xff, 0x69, 0xff, 0x67, 0xff, 0x6a, 0xff, 0x7c, 0xff, 0x83, 0xff,\n  0x9f, 0xff, 0xc0, 0xff, 0xd6, 0xff, 0xe0, 0xff, 0xf5, 0xff, 0x18, 0x00,\n  0x3e, 0x00, 0x5e, 0x00, 0x76, 0x00, 0x9a, 0x00, 0xab, 0x00, 0xc4, 0x00,\n  0xe0, 0x00, 0xe6, 0x00, 0xf4, 0x00, 0xe4, 0x00, 0xd3, 0x00, 0xaa, 0x00,\n  0x75, 0x00, 0x2e, 0x00, 0xf0, 0xff, 0xa9, 0xff, 0x79, 0xff, 0x3a, 0xff,\n  0x16, 0xff, 0xfc, 0xfe, 0xf6, 0xfe, 0x03, 0xff, 0x1e, 0xff, 0x1e, 0xff,\n  0x27, 0xff, 0x1e, 0xff, 0x26, 0xff, 0x2a, 0xff, 0x42, 0xff, 0x51, 0xff,\n  0x68, 0xff, 0x68, 0xff, 0x67, 0xff, 0x59, 0xff, 0x52, 0xff, 0x55, 0xff,\n  0x67, 0xff, 0x66, 0xff, 0x5b, 0xff, 0x58, 0xff, 0x54, 0xff, 0x52, 0xff,\n  0x53, 0xff, 0x4f, 0xff, 0x68, 0xff, 0x87, 0xff, 0xa5, 0xff, 0xca, 0xff,\n  0xea, 0xff, 0xfd, 0xff, 0x02, 0x00, 0x0d, 0x00, 0x13, 0x00, 0x20, 0x00,\n  0x3a, 0x00, 0x5d, 0x00, 0x73, 0x00, 0x7a, 0x00, 0x97, 0x00, 0xc1, 0x00,\n  0x02, 0x01, 0x2b, 0x01, 0x47, 0x01, 0x70, 0x01, 0x7b, 0x01, 0x7a, 0x01,\n  0x64, 0x01, 0x59, 0x01, 0x5f, 0x01, 0x7d, 0x01, 0x93, 0x01, 0x92, 0x01,\n  0x8e, 0x01, 0x88, 0x01, 0x73, 0x01, 0x5a, 0x01, 0x48, 0x01, 0x33, 0x01,\n  0xee, 0x00, 0x86, 0x00, 0x2d, 0x00, 0xe5, 0xff, 0x92, 0xff, 0x42, 0xff,\n  0xf5, 0xfe, 0xc3, 0xfe, 0xad, 0xfe, 0x90, 0xfe, 0x89, 0xfe, 0x72, 0xfe,\n  0x6d, 0xfe, 0x6f, 0xfe, 0x77, 0xfe, 0x96, 0xfe, 0xac, 0xfe, 0xc3, 0xfe,\n  0xd9, 0xfe, 0xf0, 0xfe, 0xfb, 0xfe, 0x0e, 0xff, 0x09, 0xff, 0x1c, 0xff,\n  0x34, 0xff, 0x6d, 0xff, 0x9c, 0xff, 0xd0, 0xff, 0x0a, 0x00, 0x36, 0x00,\n  0x63, 0x00, 0x7a, 0x00, 0x7e, 0x00, 0x8d, 0x00, 0xa7, 0x00, 0xbd, 0x00,\n  0xbe, 0x00, 0xbd, 0x00, 0xc6, 0x00, 0xd5, 0x00, 0xf5, 0x00, 0x27, 0x01,\n  0x2f, 0x01, 0x18, 0x01, 0xd1, 0x00, 0x8f, 0x00, 0x52, 0x00, 0x24, 0x00,\n  0xeb, 0xff, 0xcb, 0xff, 0x9c, 0xff, 0x7e, 0xff, 0x55, 0xff, 0x28, 0xff,\n  0x0b, 0xff, 0xfe, 0xfe, 0x0d, 0xff, 0x2d, 0xff, 0x5a, 0xff, 0xa0, 0xff,\n  0xe7, 0xff, 0x38, 0x00, 0x74, 0x00, 0x9e, 0x00, 0xc1, 0x00, 0xe2, 0x00,\n  0xf0, 0x00, 0xe5, 0x00, 0xc1, 0x00, 0x99, 0x00, 0x74, 0x00, 0x62, 0x00,\n  0x69, 0x00, 0x7d, 0x00, 0xa2, 0x00, 0xb2, 0x00, 0x94, 0x00, 0x6b, 0x00,\n  0x4b, 0x00, 0x1f, 0x00, 0xff, 0xff, 0xe2, 0xff, 0xc8, 0xff, 0xb5, 0xff,\n  0x90, 0xff, 0x62, 0xff, 0x2d, 0xff, 0x04, 0xff, 0xef, 0xfe, 0xeb, 0xfe,\n  0xfc, 0xfe, 0x11, 0xff, 0x2f, 0xff, 0x4c, 0xff, 0x62, 0xff, 0x6f, 0xff,\n  0x87, 0xff, 0x86, 0xff, 0xa9, 0xff, 0xba, 0xff, 0xcf, 0xff, 0xe2, 0xff,\n  0x04, 0x00, 0x23, 0x00, 0x47, 0x00, 0x58, 0x00, 0x65, 0x00, 0x66, 0x00,\n  0x64, 0x00, 0x7b, 0x00, 0x99, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xbd, 0x00,\n  0xb2, 0x00, 0xa4, 0x00, 0x92, 0x00, 0x6e, 0x00, 0x3f, 0x00, 0x08, 0x00,\n  0xe3, 0xff, 0xb7, 0xff, 0xb2, 0xff, 0xc2, 0xff, 0xea, 0xff, 0x24, 0x00,\n  0x55, 0x00, 0x7d, 0x00, 0x83, 0x00, 0x88, 0x00, 0x5f, 0x00, 0x37, 0x00,\n  0x12, 0x00, 0xfb, 0xff, 0xfa, 0xff, 0x06, 0x00, 0x21, 0x00, 0x2f, 0x00,\n  0x27, 0x00, 0x13, 0x00, 0xfe, 0xff, 0xf9, 0xff, 0xe4, 0xff, 0xce, 0xff,\n  0xbc, 0xff, 0xc7, 0xff, 0xdf, 0xff, 0x04, 0x00, 0x31, 0x00, 0x36, 0x00,\n  0x46, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x3a, 0x00, 0x2d, 0x00, 0x11, 0x00,\n  0xe9, 0xff, 0xca, 0xff, 0xa0, 0xff, 0x78, 0xff, 0x51, 0xff, 0x3c, 0xff,\n  0x2e, 0xff, 0x33, 0xff, 0x2d, 0xff, 0x29, 0xff, 0x3c, 0xff, 0x57, 0xff,\n  0x64, 0xff, 0x6b, 0xff, 0x74, 0xff, 0x77, 0xff, 0x9a, 0xff, 0xb3, 0xff,\n  0xd7, 0xff, 0xf3, 0xff, 0x1e, 0x00, 0x65, 0x00, 0xae, 0x00, 0x02, 0x01,\n  0x3d, 0x01, 0x67, 0x01, 0x74, 0x01, 0x59, 0x01, 0x2e, 0x01, 0xfa, 0x00,\n  0xc5, 0x00, 0x9e, 0x00, 0x83, 0x00, 0x58, 0x00, 0x25, 0x00, 0xef, 0xff,\n  0xc8, 0xff, 0x95, 0xff, 0x5d, 0xff, 0x16, 0xff, 0xdb, 0xfe, 0xb2, 0xfe,\n  0x9c, 0xfe, 0xa9, 0xfe, 0xc6, 0xfe, 0xe8, 0xfe, 0x24, 0xff, 0x53, 0xff,\n  0x84, 0xff, 0xb4, 0xff, 0xee, 0xff, 0x1e, 0x00, 0x49, 0x00, 0x5b, 0x00,\n  0x75, 0x00, 0x88, 0x00, 0xa5, 0x00, 0xc9, 0x00, 0xee, 0x00, 0x21, 0x01,\n  0x3f, 0x01, 0x4a, 0x01, 0x34, 0x01, 0x0b, 0x01, 0xb9, 0x00, 0x72, 0x00,\n  0x2f, 0x00, 0x03, 0x00, 0xe6, 0xff, 0xcd, 0xff, 0xcb, 0xff, 0xc2, 0xff,\n  0xcd, 0xff, 0xb8, 0xff, 0xa3, 0xff, 0x83, 0xff, 0x7d, 0xff, 0x78, 0xff,\n  0x80, 0xff, 0x8e, 0xff, 0xab, 0xff, 0xc3, 0xff, 0xe3, 0xff, 0x02, 0x00,\n  0x21, 0x00, 0x30, 0x00, 0x27, 0x00, 0x10, 0x00, 0xe5, 0xff, 0xcb, 0xff,\n  0xc3, 0xff, 0xc9, 0xff, 0xe8, 0xff, 0xfd, 0xff, 0x01, 0x00, 0x06, 0x00,\n  0xe9, 0xff, 0xc8, 0xff, 0x98, 0xff, 0x75, 0xff, 0x61, 0xff, 0x65, 0xff,\n  0x84, 0xff, 0xaa, 0xff, 0xe4, 0xff, 0x27, 0x00, 0x4e, 0x00, 0x6a, 0x00,\n  0x9f, 0x00, 0xd0, 0x00, 0xe6, 0x00, 0xde, 0x00, 0xc3, 0x00, 0xa4, 0x00,\n  0x79, 0x00, 0x5d, 0x00, 0x4d, 0x00, 0x40, 0x00, 0x45, 0x00, 0x4d, 0x00,\n  0x52, 0x00, 0x4e, 0x00, 0x34, 0x00, 0x16, 0x00, 0xff, 0xff, 0xe6, 0xff,\n  0xcd, 0xff, 0xc2, 0xff, 0xc7, 0xff, 0xbe, 0xff, 0xb0, 0xff, 0x90, 0xff,\n  0x71, 0xff, 0x4c, 0xff, 0x29, 0xff, 0x1b, 0xff, 0x26, 0xff, 0x3b, 0xff,\n  0x4f, 0xff, 0x5c, 0xff, 0x68, 0xff, 0x87, 0xff, 0xac, 0xff, 0xe3, 0xff,\n  0xfe, 0xff, 0x12, 0x00, 0x2d, 0x00, 0x36, 0x00, 0x35, 0x00, 0x22, 0x00,\n  0x22, 0x00, 0x18, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x61, 0x00, 0x7a, 0x00,\n  0x91, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xa7, 0x00, 0x99, 0x00, 0x8c, 0x00,\n  0x72, 0x00, 0x5d, 0x00, 0x3c, 0x00, 0x10, 0x00, 0xf3, 0xff, 0xcc, 0xff,\n  0xbb, 0xff, 0xb0, 0xff, 0xb2, 0xff, 0xc0, 0xff, 0xd5, 0xff, 0xf7, 0xff,\n  0x00, 0x00, 0x08, 0x00, 0xfc, 0xff, 0xe9, 0xff, 0xe5, 0xff, 0xf0, 0xff,\n  0xf9, 0xff, 0xf0, 0xff, 0xdf, 0xff, 0xd4, 0xff, 0xde, 0xff, 0xee, 0xff,\n  0xea, 0xff, 0xd8, 0xff, 0xba, 0xff, 0x9f, 0xff, 0x83, 0xff, 0x7e, 0xff,\n  0x99, 0xff, 0xd1, 0xff, 0x05, 0x00, 0x26, 0x00, 0x35, 0x00, 0x29, 0x00,\n  0x25, 0x00, 0x27, 0x00, 0x39, 0x00, 0x70, 0x00, 0xaf, 0x00, 0xed, 0x00,\n  0x17, 0x01, 0x3e, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x4e, 0x01, 0x1a, 0x01,\n  0xe5, 0x00, 0xa1, 0x00, 0x6d, 0x00, 0x3a, 0x00, 0x0e, 0x00, 0xda, 0xff,\n  0xb5, 0xff, 0x8b, 0xff, 0x6a, 0xff, 0x61, 0xff, 0x5e, 0xff, 0x4f, 0xff,\n  0x3e, 0xff, 0x26, 0xff, 0x19, 0xff, 0x1c, 0xff, 0x1d, 0xff, 0x1a, 0xff,\n  0x1f, 0xff, 0x31, 0xff, 0x42, 0xff, 0x59, 0xff, 0x7c, 0xff, 0xa3, 0xff,\n  0xbe, 0xff, 0xbd, 0xff, 0xca, 0xff, 0xd3, 0xff, 0xf6, 0xff, 0x14, 0x00,\n  0x2d, 0x00, 0x36, 0x00, 0x3e, 0x00, 0x52, 0x00, 0x5a, 0x00, 0x59, 0x00,\n  0x52, 0x00, 0x53, 0x00, 0x6b, 0x00, 0x80, 0x00, 0xab, 0x00, 0xbb, 0x00,\n  0xc3, 0x00, 0xe6, 0x00, 0x0f, 0x01, 0x0f, 0x01, 0x0a, 0x01, 0xfc, 0x00,\n  0xe8, 0x00, 0xb3, 0x00, 0x68, 0x00, 0x20, 0x00, 0xe2, 0xff, 0xb4, 0xff,\n  0x9c, 0xff, 0x89, 0xff, 0x87, 0xff, 0xa3, 0xff, 0xb7, 0xff, 0xb6, 0xff,\n  0xa7, 0xff, 0xab, 0xff, 0xaa, 0xff, 0xb3, 0xff, 0xa0, 0xff, 0x99, 0xff,\n  0x7b, 0xff, 0x75, 0xff, 0x6b, 0xff, 0x64, 0xff, 0x4f, 0xff, 0x4c, 0xff,\n  0x3f, 0xff, 0x35, 0xff, 0x41, 0xff, 0x5d, 0xff, 0x6d, 0xff, 0x79, 0xff,\n  0x73, 0xff, 0x80, 0xff, 0x9e, 0xff, 0xb7, 0xff, 0xe1, 0xff, 0x06, 0x00,\n  0x2a, 0x00, 0x48, 0x00, 0x5d, 0x00, 0x7e, 0x00, 0xa1, 0x00, 0xb9, 0x00,\n  0xe5, 0x00, 0xee, 0x00, 0x05, 0x01, 0x0c, 0x01, 0x01, 0x01, 0x0b, 0x01,\n  0x0c, 0x01, 0x02, 0x01, 0xf9, 0x00, 0x01, 0x01, 0xe8, 0x00, 0xcc, 0x00,\n  0x8f, 0x00, 0x6b, 0x00, 0x3c, 0x00, 0x15, 0x00, 0xeb, 0xff, 0xda, 0xff,\n  0xb5, 0xff, 0x8d, 0xff, 0x65, 0xff, 0x37, 0xff, 0x05, 0xff, 0xd9, 0xfe,\n  0xb1, 0xfe, 0xa2, 0xfe, 0xb2, 0xfe, 0xc4, 0xfe, 0xdb, 0xfe, 0xe5, 0xfe,\n  0xec, 0xfe, 0xfb, 0xfe, 0x12, 0xff, 0x38, 0xff, 0x6e, 0xff, 0x9d, 0xff,\n  0xdf, 0xff, 0x1b, 0x00, 0x52, 0x00, 0x90, 0x00, 0xe7, 0x00, 0x37, 0x01,\n  0x82, 0x01, 0xc1, 0x01, 0xf6, 0x01, 0x32, 0x02, 0x58, 0x02, 0x6c, 0x02,\n  0x5b, 0x02, 0x1d, 0x02, 0xbe, 0x01, 0x4a, 0x01, 0xc8, 0x00, 0x47, 0x00,\n  0xda, 0xff, 0x8d, 0xff, 0x4f, 0xff, 0x23, 0xff, 0xf6, 0xfe, 0xd9, 0xfe,\n  0xd2, 0xfe, 0xc6, 0xfe, 0xc4, 0xfe, 0xc1, 0xfe, 0xc5, 0xfe, 0xd3, 0xfe,\n  0xea, 0xfe, 0x06, 0xff, 0x1f, 0xff, 0x33, 0xff, 0x3f, 0xff, 0x3f, 0xff,\n  0x53, 0xff, 0x60, 0xff, 0x81, 0xff, 0x9c, 0xff, 0xb1, 0xff, 0xde, 0xff,\n  0xfd, 0xff, 0x24, 0x00, 0x37, 0x00, 0x3d, 0x00, 0x4a, 0x00, 0x5f, 0x00,\n  0x74, 0x00, 0x8d, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xa5, 0x00, 0xa1, 0x00,\n  0x85, 0x00, 0x65, 0x00, 0x51, 0x00, 0x2e, 0x00, 0x06, 0x00, 0xe5, 0xff,\n  0xd7, 0xff, 0xe2, 0xff, 0xea, 0xff, 0xeb, 0xff, 0xee, 0xff, 0xdb, 0xff,\n  0xd5, 0xff, 0xd0, 0xff, 0xea, 0xff, 0xf0, 0xff, 0x0a, 0x00, 0x09, 0x00,\n  0x16, 0x00, 0x25, 0x00, 0x27, 0x00, 0x2d, 0x00, 0x20, 0x00, 0x03, 0x00,\n  0xd4, 0xff, 0xa8, 0xff, 0x8b, 0xff, 0x66, 0xff, 0x5b, 0xff, 0x56, 0xff,\n  0x59, 0xff, 0x6b, 0xff, 0x6c, 0xff, 0x79, 0xff, 0x87, 0xff, 0x95, 0xff,\n  0x99, 0xff, 0x8e, 0xff, 0x93, 0xff, 0x95, 0xff, 0x94, 0xff, 0xb1, 0xff,\n  0xd0, 0xff, 0xf9, 0xff, 0x0b, 0x00, 0x26, 0x00, 0x37, 0x00, 0x49, 0x00,\n  0x69, 0x00, 0xa4, 0x00, 0xe4, 0x00, 0x0c, 0x01, 0x31, 0x01, 0x49, 0x01,\n  0x64, 0x01, 0x69, 0x01, 0x53, 0x01, 0x2a, 0x01, 0xf1, 0x00, 0xb3, 0x00,\n  0x85, 0x00, 0x5e, 0x00, 0x56, 0x00, 0x33, 0x00, 0x15, 0x00, 0xe1, 0xff,\n  0xb1, 0xff, 0x84, 0xff, 0x62, 0xff, 0x4e, 0xff, 0x48, 0xff, 0x35, 0xff,\n  0x27, 0xff, 0x24, 0xff, 0x3b, 0xff, 0x60, 0xff, 0x94, 0xff, 0xbb, 0xff,\n  0xe2, 0xff, 0x00, 0x00, 0x19, 0x00, 0x3f, 0x00, 0x61, 0x00, 0x6e, 0x00,\n  0x6d, 0x00, 0x74, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x58, 0x00, 0x53, 0x00,\n  0x60, 0x00, 0x70, 0x00, 0x73, 0x00, 0x79, 0x00, 0x86, 0x00, 0x87, 0x00,\n  0x7c, 0x00, 0x7d, 0x00, 0x90, 0x00, 0xac, 0x00, 0xba, 0x00, 0xc0, 0x00,\n  0xa9, 0x00, 0xa6, 0x00, 0x8e, 0x00, 0x7f, 0x00, 0x64, 0x00, 0x39, 0x00,\n  0x0b, 0x00, 0xc3, 0xff, 0x71, 0xff, 0x25, 0xff, 0xd7, 0xfe, 0x9d, 0xfe,\n  0x6e, 0xfe, 0x40, 0xfe, 0x32, 0xfe, 0x27, 0xfe, 0x33, 0xfe, 0x4d, 0xfe,\n  0x75, 0xfe, 0x9c, 0xfe, 0xc2, 0xfe, 0xe1, 0xfe, 0x15, 0xff, 0x56, 0xff,\n  0x8e, 0xff, 0xd6, 0xff, 0x16, 0x00, 0x52, 0x00, 0xb1, 0x00, 0x17, 0x01,\n  0x74, 0x01, 0xba, 0x01, 0xe4, 0x01, 0xdd, 0x01, 0xca, 0x01, 0x96, 0x01,\n  0x66, 0x01, 0x3b, 0x01, 0x29, 0x01, 0xfc, 0x00, 0xc7, 0x00, 0x90, 0x00,\n  0x59, 0x00, 0x20, 0x00, 0xea, 0xff, 0xad, 0xff, 0x88, 0xff, 0x70, 0xff,\n  0x66, 0xff, 0x5e, 0xff, 0x4d, 0xff, 0x4b, 0xff, 0x42, 0xff, 0x46, 0xff,\n  0x53, 0xff, 0x58, 0xff, 0x53, 0xff, 0x4d, 0xff, 0x53, 0xff, 0x57, 0xff,\n  0x64, 0xff, 0x70, 0xff, 0x74, 0xff, 0x84, 0xff, 0x96, 0xff, 0xb4, 0xff,\n  0xc6, 0xff, 0xef, 0xff, 0x2b, 0x00, 0x6d, 0x00, 0x8a, 0x00, 0x97, 0x00,\n  0x91, 0x00, 0x9d, 0x00, 0xb0, 0x00, 0xca, 0x00, 0xdc, 0x00, 0xe8, 0x00,\n  0xe8, 0x00, 0xe4, 0x00, 0xc9, 0x00, 0x9d, 0x00, 0x6a, 0x00, 0x41, 0x00,\n  0x27, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x07, 0x00, 0xee, 0xff, 0xef, 0xff,\n  0xe7, 0xff, 0xe2, 0xff, 0xb9, 0xff, 0x83, 0xff, 0x4c, 0xff, 0x26, 0xff,\n  0x14, 0xff, 0x21, 0xff, 0x48, 0xff, 0x6b, 0xff, 0x90, 0xff, 0xb1, 0xff,\n  0xd0, 0xff, 0xfe, 0xff, 0x2c, 0x00, 0x4a, 0x00, 0x5e, 0x00, 0x5c, 0x00,\n  0x5c, 0x00, 0x52, 0x00, 0x3d, 0x00, 0x25, 0x00, 0x06, 0x00, 0xf1, 0xff,\n  0xd4, 0xff, 0xb1, 0xff, 0x8f, 0xff, 0x77, 0xff, 0x7d, 0xff, 0x8c, 0xff,\n  0x92, 0xff, 0x96, 0xff, 0x85, 0xff, 0x82, 0xff, 0x87, 0xff, 0x99, 0xff,\n  0xa6, 0xff, 0xb1, 0xff, 0xa6, 0xff, 0xa7, 0xff, 0xaa, 0xff, 0xb0, 0xff,\n  0xca, 0xff, 0xfb, 0xff, 0x38, 0x00, 0x57, 0x00, 0x7b, 0x00, 0xab, 0x00,\n  0xe6, 0x00, 0x1a, 0x01, 0x4f, 0x01, 0x84, 0x01, 0xc3, 0x01, 0xdd, 0x01,\n  0xda, 0x01, 0xbe, 0x01, 0x80, 0x01, 0x44, 0x01, 0x0b, 0x01, 0xd3, 0x00,\n  0x8f, 0x00, 0x54, 0x00, 0x09, 0x00, 0xc6, 0xff, 0x74, 0xff, 0x3b, 0xff,\n  0x0e, 0xff, 0xf9, 0xfe, 0xf2, 0xfe, 0xf5, 0xfe, 0x01, 0xff, 0x00, 0xff,\n  0xf6, 0xfe, 0xe9, 0xfe, 0xdd, 0xfe, 0xd9, 0xfe, 0xf1, 0xfe, 0x0d, 0xff,\n  0x3d, 0xff, 0x79, 0xff, 0xb3, 0xff, 0xea, 0xff, 0x05, 0x00, 0x28, 0x00,\n  0x38, 0x00, 0x4e, 0x00, 0x63, 0x00, 0x6e, 0x00, 0x5f, 0x00, 0x4a, 0x00,\n  0x30, 0x00, 0x09, 0x00, 0xf5, 0xff, 0xec, 0xff, 0xec, 0xff, 0x06, 0x00,\n  0x14, 0x00, 0x37, 0x00, 0x4f, 0x00, 0x5b, 0x00, 0x5b, 0x00, 0x3f, 0x00,\n  0x28, 0x00, 0x26, 0x00, 0x28, 0x00, 0x3b, 0x00, 0x42, 0x00, 0x30, 0x00,\n  0x16, 0x00, 0xf8, 0xff, 0xe3, 0xff, 0xd1, 0xff, 0xd9, 0xff, 0xe8, 0xff,\n  0xfe, 0xff, 0x13, 0x00, 0x18, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x05, 0x00,\n  0xeb, 0xff, 0xcc, 0xff, 0xbf, 0xff, 0xbf, 0xff, 0xd2, 0xff, 0xe6, 0xff,\n  0xef, 0xff, 0xeb, 0xff, 0xe6, 0xff, 0xe9, 0xff, 0xf1, 0xff, 0x0e, 0x00,\n  0x25, 0x00, 0x23, 0x00, 0x0e, 0x00, 0xf2, 0xff, 0xe0, 0xff, 0xc8, 0xff,\n  0xc0, 0xff, 0xa5, 0xff, 0xa6, 0xff, 0xab, 0xff, 0xd5, 0xff, 0xf9, 0xff,\n  0x2e, 0x00, 0x5c, 0x00, 0x8d, 0x00, 0xa7, 0x00, 0xb0, 0x00, 0x9c, 0x00,\n  0x83, 0x00, 0x64, 0x00, 0x36, 0x00, 0xfc, 0xff, 0xc8, 0xff, 0xb8, 0xff,\n  0xab, 0xff, 0xa8, 0xff, 0xa1, 0xff, 0x96, 0xff, 0x93, 0xff, 0x83, 0xff,\n  0x8e, 0xff, 0x98, 0xff, 0xa2, 0xff, 0xa8, 0xff, 0xb2, 0xff, 0xce, 0xff,\n  0xe3, 0xff, 0xed, 0xff, 0xf1, 0xff, 0xf1, 0xff, 0xeb, 0xff, 0xf7, 0xff,\n  0xfd, 0xff, 0x03, 0x00, 0xed, 0xff, 0xea, 0xff, 0xec, 0xff, 0xed, 0xff,\n  0xf0, 0xff, 0xf5, 0xff, 0xff, 0xff, 0x09, 0x00, 0x13, 0x00, 0x19, 0x00,\n  0x34, 0x00, 0x3d, 0x00, 0x54, 0x00, 0x53, 0x00, 0x60, 0x00, 0x5b, 0x00,\n  0x4a, 0x00, 0x40, 0x00, 0x41, 0x00, 0x5a, 0x00, 0x51, 0x00, 0x3c, 0x00,\n  0x18, 0x00, 0xfe, 0xff, 0xd3, 0xff, 0xc6, 0xff, 0xa7, 0xff, 0xa2, 0xff,\n  0xa3, 0xff, 0xb1, 0xff, 0xc3, 0xff, 0xd0, 0xff, 0xe2, 0xff, 0xf9, 0xff,\n  0x0d, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1e, 0x00, 0x24, 0x00, 0x22, 0x00,\n  0x32, 0x00, 0x42, 0x00, 0x44, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x81, 0x00,\n  0x84, 0x00, 0x9b, 0x00, 0x96, 0x00, 0x90, 0x00, 0x7b, 0x00, 0x70, 0x00,\n  0x63, 0x00, 0x48, 0x00, 0x2f, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x23, 0x00,\n  0x3b, 0x00, 0x3d, 0x00, 0x46, 0x00, 0x4f, 0x00, 0x3e, 0x00, 0x30, 0x00,\n  0x20, 0x00, 0x1b, 0x00, 0x10, 0x00, 0x10, 0x00, 0x17, 0x00, 0x0b, 0x00,\n  0x06, 0x00, 0xfa, 0xff, 0xea, 0xff, 0xd9, 0xff, 0xc5, 0xff, 0xac, 0xff,\n  0x8b, 0xff, 0x6d, 0xff, 0x52, 0xff, 0x42, 0xff, 0x3a, 0xff, 0x4d, 0xff,\n  0x54, 0xff, 0x68, 0xff, 0x69, 0xff, 0x6f, 0xff, 0x7f, 0xff, 0x94, 0xff,\n  0xbd, 0xff, 0xde, 0xff, 0xf5, 0xff, 0xf8, 0xff, 0xf9, 0xff, 0xf3, 0xff,\n  0xe7, 0xff, 0xd6, 0xff, 0xbc, 0xff, 0xba, 0xff, 0xb3, 0xff, 0xba, 0xff,\n  0xbe, 0xff, 0xcc, 0xff, 0xc9, 0xff, 0xd4, 0xff, 0xd8, 0xff, 0xe4, 0xff,\n  0xf1, 0xff, 0xe9, 0xff, 0xe4, 0xff, 0xd1, 0xff, 0xcc, 0xff, 0xd1, 0xff,\n  0xd8, 0xff, 0x00, 0x00, 0x1e, 0x00, 0x40, 0x00, 0x5a, 0x00, 0x63, 0x00,\n  0x74, 0x00, 0x79, 0x00, 0x7d, 0x00, 0x62, 0x00, 0x4d, 0x00, 0x38, 0x00,\n  0x2a, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x0e, 0x00, 0x17, 0x00, 0x20, 0x00,\n  0x1c, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x29, 0x00, 0x24, 0x00, 0x29, 0x00,\n  0x25, 0x00, 0x2c, 0x00, 0x36, 0x00, 0x39, 0x00, 0x30, 0x00, 0x36, 0x00,\n  0x42, 0x00, 0x50, 0x00, 0x4a, 0x00, 0x4c, 0x00, 0x52, 0x00, 0x55, 0x00,\n  0x41, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x43, 0x00, 0x48, 0x00, 0x46, 0x00,\n  0x46, 0x00, 0x59, 0x00, 0x6e, 0x00, 0x7f, 0x00, 0x82, 0x00, 0x5e, 0x00,\n  0x45, 0x00, 0x20, 0x00, 0x03, 0x00, 0xe2, 0xff, 0xce, 0xff, 0xd4, 0xff,\n  0xda, 0xff, 0xe2, 0xff, 0xd9, 0xff, 0xbd, 0xff, 0xa4, 0xff, 0x91, 0xff,\n  0x83, 0xff, 0x7e, 0xff, 0x89, 0xff, 0x90, 0xff, 0x9d, 0xff, 0x94, 0xff,\n  0xa0, 0xff, 0x8e, 0xff, 0x85, 0xff, 0x7e, 0xff, 0x83, 0xff, 0x81, 0xff,\n  0x8c, 0xff, 0x89, 0xff, 0x91, 0xff, 0x98, 0xff, 0x98, 0xff, 0xa0, 0xff,\n  0x91, 0xff, 0x8c, 0xff, 0x81, 0xff, 0x8b, 0xff, 0x99, 0xff, 0xad, 0xff,\n  0xca, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x17, 0x00, 0x3c, 0x00, 0x59, 0x00,\n  0x7d, 0x00, 0xb4, 0x00, 0xdf, 0x00, 0x07, 0x01, 0x1f, 0x01, 0x25, 0x01,\n  0x34, 0x01, 0x37, 0x01, 0x21, 0x01, 0x0b, 0x01, 0xe6, 0x00, 0xcc, 0x00,\n  0xb1, 0x00, 0xa8, 0x00, 0xa0, 0x00, 0x9e, 0x00, 0x8d, 0x00, 0x77, 0x00,\n  0x53, 0x00, 0x1f, 0x00, 0xe5, 0xff, 0xa7, 0xff, 0x77, 0xff, 0x4d, 0xff,\n  0x31, 0xff, 0x1c, 0xff, 0x0b, 0xff, 0xfa, 0xfe, 0xe8, 0xfe, 0xe2, 0xfe,\n  0xea, 0xfe, 0xf5, 0xfe, 0x06, 0xff, 0x19, 0xff, 0x32, 0xff, 0x53, 0xff,\n  0x8b, 0xff, 0xd8, 0xff, 0x33, 0x00, 0x82, 0x00, 0xd1, 0x00, 0x0c, 0x01,\n  0x42, 0x01, 0x6e, 0x01, 0x6a, 0x01, 0x59, 0x01, 0x26, 0x01, 0xfd, 0x00,\n  0xd3, 0x00, 0xa9, 0x00, 0x82, 0x00, 0x59, 0x00, 0x37, 0x00, 0x10, 0x00,\n  0xe2, 0xff, 0xc4, 0xff, 0x9e, 0xff, 0x93, 0xff, 0x73, 0xff, 0x6c, 0xff,\n  0x68, 0xff, 0x72, 0xff, 0x76, 0xff, 0x7f, 0xff, 0x9b, 0xff, 0xcc, 0xff,\n  0xf2, 0xff, 0x21, 0x00, 0x4c, 0x00, 0x66, 0x00, 0x6e, 0x00, 0x62, 0x00,\n  0x44, 0x00, 0x27, 0x00, 0x0f, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00,\n  0xfd, 0xff, 0xf9, 0xff, 0xe9, 0xff, 0xd6, 0xff, 0xbf, 0xff, 0x9c, 0xff,\n  0x6f, 0xff, 0x59, 0xff, 0x43, 0xff, 0x33, 0xff, 0x35, 0xff, 0x42, 0xff,\n  0x59, 0xff, 0x83, 0xff, 0xac, 0xff, 0xb6, 0xff, 0xc1, 0xff, 0xc6, 0xff,\n  0xea, 0xff, 0xf6, 0xff, 0xf6, 0xff, 0xf0, 0xff, 0xe5, 0xff, 0xdd, 0xff,\n  0xe5, 0xff, 0xf8, 0xff, 0x11, 0x00, 0x30, 0x00, 0x56, 0x00, 0x62, 0x00,\n  0x71, 0x00, 0x7b, 0x00, 0x8b, 0x00, 0x99, 0x00, 0xa8, 0x00, 0xbe, 0x00,\n  0xb1, 0x00, 0x86, 0x00, 0x55, 0x00, 0x20, 0x00, 0xe7, 0xff, 0xbf, 0xff,\n  0x99, 0xff, 0x78, 0xff, 0x51, 0xff, 0x1d, 0xff, 0x07, 0xff, 0xf1, 0xfe,\n  0xed, 0xfe, 0xfb, 0xfe, 0x0c, 0xff, 0x3e, 0xff, 0x70, 0xff, 0xb7, 0xff,\n  0x01, 0x00, 0x38, 0x00, 0x6e, 0x00, 0x90, 0x00, 0xab, 0x00, 0xcd, 0x00,\n  0xf0, 0x00, 0x18, 0x01, 0x4b, 0x01, 0x63, 0x01, 0x65, 0x01, 0x50, 0x01,\n  0x3b, 0x01, 0x0c, 0x01, 0xd6, 0x00, 0xa3, 0x00, 0x79, 0x00, 0x5a, 0x00,\n  0x3e, 0x00, 0x0f, 0x00, 0xed, 0xff, 0xd2, 0xff, 0xbc, 0xff, 0xbb, 0xff,\n  0xbe, 0xff, 0xb1, 0xff, 0x96, 0xff, 0x78, 0xff, 0x59, 0xff, 0x46, 0xff,\n  0x49, 0xff, 0x5b, 0xff, 0x78, 0xff, 0x8f, 0xff, 0xa0, 0xff, 0xaf, 0xff,\n  0xa7, 0xff, 0x9d, 0xff, 0x88, 0xff, 0x91, 0xff, 0xa1, 0xff, 0xb9, 0xff,\n  0xce, 0xff, 0xe0, 0xff, 0x04, 0x00, 0x30, 0x00, 0x6e, 0x00, 0x82, 0x00,\n  0x90, 0x00, 0x98, 0x00, 0x95, 0x00, 0x8b, 0x00, 0x85, 0x00, 0x83, 0x00,\n  0x84, 0x00, 0x94, 0x00, 0x96, 0x00, 0xa0, 0x00, 0x8e, 0x00, 0x75, 0x00,\n  0x58, 0x00, 0x3a, 0x00, 0x25, 0x00, 0x10, 0x00, 0xf7, 0xff, 0xe0, 0xff,\n  0xd8, 0xff, 0xcd, 0xff, 0xd7, 0xff, 0xdc, 0xff, 0xc9, 0xff, 0xb5, 0xff,\n  0x8c, 0xff, 0x68, 0xff, 0x3f, 0xff, 0x30, 0xff, 0x24, 0xff, 0x21, 0xff,\n  0x1b, 0xff, 0x29, 0xff, 0x24, 0xff, 0x21, 0xff, 0x17, 0xff, 0x29, 0xff,\n  0x42, 0xff, 0x6a, 0xff, 0x86, 0xff, 0xb2, 0xff, 0xe1, 0xff, 0x02, 0x00,\n  0x1b, 0x00, 0x34, 0x00, 0x61, 0x00, 0x7d, 0x00, 0xa4, 0x00, 0xcd, 0x00,\n  0xf6, 0x00, 0x21, 0x01, 0x2d, 0x01, 0x4c, 0x01, 0x72, 0x01, 0xa0, 0x01,\n  0xab, 0x01, 0x8d, 0x01, 0x66, 0x01, 0x3b, 0x01, 0xf5, 0x00, 0xa1, 0x00,\n  0x3c, 0x00, 0xe9, 0xff, 0xa3, 0xff, 0x6d, 0xff, 0x2f, 0xff, 0xfa, 0xfe,\n  0xd2, 0xfe, 0xaf, 0xfe, 0x9e, 0xfe, 0x92, 0xfe, 0x95, 0xfe, 0xa5, 0xfe,\n  0xbe, 0xfe, 0xd3, 0xfe, 0xd9, 0xfe, 0xd3, 0xfe, 0xcd, 0xfe, 0xd6, 0xfe,\n  0xf4, 0xfe, 0x24, 0xff, 0x4f, 0xff, 0x85, 0xff, 0xbb, 0xff, 0x0f, 0x00,\n  0x5d, 0x00, 0xa6, 0x00, 0xec, 0x00, 0x47, 0x01, 0x96, 0x01, 0xcf, 0x01,\n  0xfd, 0x01, 0x1e, 0x02, 0x28, 0x02, 0x19, 0x02, 0x05, 0x02, 0x08, 0x02,\n  0xf7, 0x01, 0xe7, 0x01, 0xcb, 0x01, 0xa0, 0x01, 0x75, 0x01, 0x25, 0x01,\n  0xcb, 0x00, 0x63, 0x00, 0x07, 0x00, 0xb1, 0xff, 0x55, 0xff, 0x15, 0xff,\n  0xcc, 0xfe, 0x9f, 0xfe, 0x6a, 0xfe, 0x50, 0xfe, 0x3f, 0xfe, 0x38, 0xfe,\n  0x38, 0xfe, 0x4e, 0xfe, 0x6b, 0xfe, 0x96, 0xfe, 0xb9, 0xfe, 0xd3, 0xfe,\n  0xef, 0xfe, 0xfb, 0xfe, 0x03, 0xff, 0x20, 0xff, 0x26, 0xff, 0x52, 0xff,\n  0x7e, 0xff, 0xc5, 0xff, 0x08, 0x00, 0x3b, 0x00, 0x62, 0x00, 0x88, 0x00,\n  0xab, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xd1, 0x00, 0xe7, 0x00, 0xfc, 0x00,\n  0x0a, 0x01, 0x0f, 0x01, 0x1a, 0x01, 0x09, 0x01, 0x06, 0x01, 0xfb, 0x00,\n  0xe3, 0x00, 0xd2, 0x00, 0xd6, 0x00, 0xcb, 0x00, 0xd6, 0x00, 0xba, 0x00,\n  0xac, 0x00, 0x85, 0x00, 0x63, 0x00, 0x39, 0x00, 0xfc, 0xff, 0xbd, 0xff,\n  0x78, 0xff, 0x45, 0xff, 0x1d, 0xff, 0xfe, 0xfe, 0xf9, 0xfe, 0xef, 0xfe,\n  0xf5, 0xfe, 0xf6, 0xfe, 0x09, 0xff, 0x28, 0xff, 0x4a, 0xff, 0x5a, 0xff,\n  0x7b, 0xff, 0x8d, 0xff, 0xb8, 0xff, 0xee, 0xff, 0x19, 0x00, 0x39, 0x00,\n  0x37, 0x00, 0x23, 0x00, 0x06, 0x00, 0xe4, 0xff, 0xc3, 0xff, 0xb7, 0xff,\n  0xad, 0xff, 0xba, 0xff, 0xcf, 0xff, 0xf1, 0xff, 0x17, 0x00, 0x41, 0x00,\n  0x71, 0x00, 0x8a, 0x00, 0xa1, 0x00, 0xa4, 0x00, 0x9b, 0x00, 0x8e, 0x00,\n  0x81, 0x00, 0x6b, 0x00, 0x53, 0x00, 0x3d, 0x00, 0x1b, 0x00, 0xf3, 0xff,\n  0xc9, 0xff, 0xa0, 0xff, 0x72, 0xff, 0x57, 0xff, 0x40, 0xff, 0x34, 0xff,\n  0x27, 0xff, 0x32, 0xff, 0x3b, 0xff, 0x5c, 0xff, 0x8b, 0xff, 0xbf, 0xff,\n  0x02, 0x00, 0x3d, 0x00, 0x69, 0x00, 0x71, 0x00, 0x6b, 0x00, 0x57, 0x00,\n  0x52, 0x00, 0x30, 0x00, 0x0e, 0x00, 0xf0, 0xff, 0xde, 0xff, 0xce, 0xff,\n  0xc0, 0xff, 0xaf, 0xff, 0xa1, 0xff, 0xa9, 0xff, 0xae, 0xff, 0xca, 0xff,\n  0xdf, 0xff, 0x00, 0x00, 0x30, 0x00, 0x69, 0x00, 0xa8, 0x00, 0xc5, 0x00,\n  0xd0, 0x00, 0xc4, 0x00, 0xb3, 0x00, 0x83, 0x00, 0x4e, 0x00, 0x11, 0x00,\n  0xec, 0xff, 0xd4, 0xff, 0xca, 0xff, 0xd4, 0xff, 0xe3, 0xff, 0xe5, 0xff,\n  0xdb, 0xff, 0xc6, 0xff, 0xaa, 0xff, 0x97, 0xff, 0x8f, 0xff, 0x9c, 0xff,\n  0xb9, 0xff, 0xcf, 0xff, 0xe3, 0xff, 0xe8, 0xff, 0xea, 0xff, 0xe5, 0xff,\n  0xeb, 0xff, 0xe6, 0xff, 0xde, 0xff, 0xdf, 0xff, 0xe7, 0xff, 0xfc, 0xff,\n  0x1f, 0x00, 0x28, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x58, 0x00, 0x78, 0x00,\n  0x9f, 0x00, 0xbd, 0x00, 0xd3, 0x00, 0xe2, 0x00, 0xcb, 0x00, 0xa6, 0x00,\n  0x80, 0x00, 0x5e, 0x00, 0x41, 0x00, 0x2c, 0x00, 0x25, 0x00, 0x19, 0x00,\n  0x0f, 0x00, 0x0a, 0x00, 0x11, 0x00, 0xfe, 0xff, 0xf0, 0xff, 0xc3, 0xff,\n  0xa2, 0xff, 0x79, 0xff, 0x53, 0xff, 0x27, 0xff, 0x16, 0xff, 0x01, 0xff,\n  0x04, 0xff, 0x07, 0xff, 0x23, 0xff, 0x54, 0xff, 0x6a, 0xff, 0x98, 0xff,\n  0xb0, 0xff, 0xda, 0xff, 0x03, 0x00, 0x1e, 0x00, 0x48, 0x00, 0x79, 0x00,\n  0xb4, 0x00, 0xf4, 0x00, 0x17, 0x01, 0x34, 0x01, 0x36, 0x01, 0x22, 0x01,\n  0xf8, 0x00, 0xb8, 0x00, 0x7d, 0x00, 0x40, 0x00, 0x14, 0x00, 0xe9, 0xff,\n  0xcb, 0xff, 0xa5, 0xff, 0x8a, 0xff, 0x77, 0xff, 0x64, 0xff, 0x63, 0xff,\n  0x6c, 0xff, 0x66, 0xff, 0x74, 0xff, 0x63, 0xff, 0x6d, 0xff, 0x6e, 0xff,\n  0x7f, 0xff, 0x92, 0xff, 0xae, 0xff, 0xbc, 0xff, 0xc8, 0xff, 0xd3, 0xff,\n  0xe0, 0xff, 0xf5, 0xff, 0x0c, 0x00, 0x28, 0x00, 0x4a, 0x00, 0x6d, 0x00,\n  0x95, 0x00, 0xb9, 0x00, 0xdb, 0x00, 0xd7, 0x00, 0xcb, 0x00, 0xb9, 0x00,\n  0xbb, 0x00, 0xc1, 0x00, 0xb6, 0x00, 0xa2, 0x00, 0x75, 0x00, 0x41, 0x00,\n  0x09, 0x00, 0xea, 0xff, 0xcd, 0xff, 0xae, 0xff, 0x86, 0xff, 0x5e, 0xff,\n  0x3d, 0xff, 0x1f, 0xff, 0x19, 0xff, 0x0e, 0xff, 0x1d, 0xff, 0x25, 0xff,\n  0x43, 0xff, 0x5a, 0xff, 0x6e, 0xff, 0x86, 0xff, 0x92, 0xff, 0xaf, 0xff,\n  0xd1, 0xff, 0xed, 0xff, 0x02, 0x00, 0x2f, 0x00, 0x40, 0x00, 0x50, 0x00,\n  0x40, 0x00, 0x3f, 0x00, 0x4a, 0x00, 0x5a, 0x00, 0x68, 0x00, 0x7b, 0x00,\n  0x89, 0x00, 0xa1, 0x00, 0xb7, 0x00, 0xbb, 0x00, 0xa9, 0x00, 0x93, 0x00,\n  0x84, 0x00, 0x71, 0x00, 0x66, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x48, 0x00,\n  0x3e, 0x00, 0x45, 0x00, 0x5a, 0x00, 0x7a, 0x00, 0x9c, 0x00, 0xba, 0x00,\n  0xce, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x86, 0x00, 0x57, 0x00, 0x2b, 0x00,\n  0x13, 0x00, 0xf7, 0xff, 0xcc, 0xff, 0xae, 0xff, 0x75, 0xff, 0x4b, 0xff,\n  0x15, 0xff, 0xfe, 0xfe, 0xda, 0xfe, 0xd2, 0xfe, 0xce, 0xfe, 0xcf, 0xfe,\n  0xcf, 0xfe, 0xcd, 0xfe, 0xe2, 0xfe, 0x02, 0xff, 0x29, 0xff, 0x5c, 0xff,\n  0x85, 0xff, 0xb9, 0xff, 0xdd, 0xff, 0xfb, 0xff, 0x26, 0x00, 0x5b, 0x00,\n  0x8a, 0x00, 0xad, 0x00, 0xc5, 0x00, 0xcb, 0x00, 0xc0, 0x00, 0xcf, 0x00,\n  0xcb, 0x00, 0xba, 0x00, 0xac, 0x00, 0xa9, 0x00, 0xb5, 0x00, 0xb2, 0x00,\n  0x89, 0x00, 0x6a, 0x00, 0x37, 0x00, 0x22, 0x00, 0xfa, 0xff, 0xcd, 0xff,\n  0xa6, 0xff, 0x80, 0xff, 0x68, 0xff, 0x67, 0xff, 0x6b, 0xff, 0x7a, 0xff,\n  0x83, 0xff, 0x80, 0xff, 0x79, 0xff, 0x79, 0xff, 0x81, 0xff, 0x89, 0xff,\n  0x8f, 0xff, 0xa1, 0xff, 0xcd, 0xff, 0x09, 0x00, 0x4e, 0x00, 0x7f, 0x00,\n  0xa0, 0x00, 0xbe, 0x00, 0xd0, 0x00, 0xe7, 0x00, 0xff, 0x00, 0x0a, 0x01,\n  0x0a, 0x01, 0xf6, 0x00, 0xd3, 0x00, 0x9b, 0x00, 0x68, 0x00, 0x40, 0x00,\n  0x0e, 0x00, 0xe7, 0xff, 0xba, 0xff, 0xa7, 0xff, 0x8e, 0xff, 0x84, 0xff,\n  0x7e, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x6c, 0xff, 0x65, 0xff, 0x64, 0xff,\n  0x71, 0xff, 0x8e, 0xff, 0xb6, 0xff, 0xd3, 0xff, 0xda, 0xff, 0xdb, 0xff,\n  0xd0, 0xff, 0xca, 0xff, 0xc9, 0xff, 0xc2, 0xff, 0xcd, 0xff, 0xc8, 0xff,\n  0xc2, 0xff, 0xa6, 0xff, 0x9c, 0xff, 0x83, 0xff, 0x72, 0xff, 0x60, 0xff,\n  0x54, 0xff, 0x51, 0xff, 0x4b, 0xff, 0x5b, 0xff, 0x73, 0xff, 0xa3, 0xff,\n  0xd0, 0xff, 0x04, 0x00, 0x2b, 0x00, 0x49, 0x00, 0x6a, 0x00, 0x94, 0x00,\n  0xb3, 0x00, 0xbb, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xa8, 0x00, 0xb3, 0x00,\n  0xc9, 0x00, 0xfa, 0x00, 0x2d, 0x01, 0x63, 0x01, 0x95, 0x01, 0xc1, 0x01,\n  0xca, 0x01, 0xb9, 0x01, 0x81, 0x01, 0x3e, 0x01, 0xe3, 0x00, 0x73, 0x00,\n  0x1d, 0x00, 0xce, 0xff, 0x86, 0xff, 0x42, 0xff, 0x06, 0xff, 0xd8, 0xfe,\n  0xc3, 0xfe, 0xb4, 0xfe, 0xc4, 0xfe, 0xd8, 0xfe, 0x05, 0xff, 0x1d, 0xff,\n  0x4a, 0xff, 0x62, 0xff, 0x86, 0xff, 0xa0, 0xff, 0xba, 0xff, 0xcd, 0xff,\n  0xe4, 0xff, 0xf2, 0xff, 0x15, 0x00, 0x2a, 0x00, 0x46, 0x00, 0x59, 0x00,\n  0x73, 0x00, 0x8f, 0x00, 0x8a, 0x00, 0x85, 0x00, 0x55, 0x00, 0x36, 0x00,\n  0x03, 0x00, 0xe8, 0xff, 0xca, 0xff, 0xb6, 0xff, 0xab, 0xff, 0xa4, 0xff,\n  0xa8, 0xff, 0x9d, 0xff, 0x9a, 0xff, 0x9b, 0xff, 0xab, 0xff, 0xb7, 0xff,\n  0xb5, 0xff, 0xb8, 0xff, 0xbd, 0xff, 0xca, 0xff, 0xce, 0xff, 0xd0, 0xff,\n  0xd5, 0xff, 0xe5, 0xff, 0xf7, 0xff, 0x15, 0x00, 0x33, 0x00, 0x4c, 0x00,\n  0x5a, 0x00, 0x60, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00, 0x4c, 0x00,\n  0x44, 0x00, 0x2d, 0x00, 0x0f, 0x00, 0xf2, 0xff, 0xe3, 0xff, 0xcf, 0xff,\n  0xc1, 0xff, 0xb0, 0xff, 0xa5, 0xff, 0xa7, 0xff, 0xa1, 0xff, 0xa9, 0xff,\n  0xbe, 0xff, 0xca, 0xff, 0xca, 0xff, 0xd3, 0xff, 0xe0, 0xff, 0xf4, 0xff,\n  0x0b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x11, 0x00, 0x0e, 0x00,\n  0x1e, 0x00, 0x1a, 0x00, 0x19, 0x00, 0xfe, 0xff, 0xf5, 0xff, 0xe3, 0xff,\n  0xf2, 0xff, 0xf2, 0xff, 0x06, 0x00, 0x14, 0x00, 0x39, 0x00, 0x41, 0x00,\n  0x56, 0x00, 0x63, 0x00, 0x70, 0x00, 0x61, 0x00, 0x5e, 0x00, 0x56, 0x00,\n  0x62, 0x00, 0x6f, 0x00, 0x7a, 0x00, 0x7d, 0x00, 0x6f, 0x00, 0x50, 0x00,\n  0x31, 0x00, 0x1c, 0x00, 0xf9, 0xff, 0xdf, 0xff, 0xcb, 0xff, 0xaf, 0xff,\n  0x8a, 0xff, 0x67, 0xff, 0x48, 0xff, 0x3e, 0xff, 0x40, 0xff, 0x55, 0xff,\n  0x63, 0xff, 0x78, 0xff, 0x87, 0xff, 0xa9, 0xff, 0xcd, 0xff, 0x04, 0x00,\n  0x37, 0x00, 0x5d, 0x00, 0x6a, 0x00, 0x63, 0x00, 0x56, 0x00, 0x4c, 0x00,\n  0x30, 0x00, 0x22, 0x00, 0x00, 0x00, 0xfa, 0xff, 0xe7, 0xff, 0xf3, 0xff,\n  0x01, 0x00, 0x1e, 0x00, 0x45, 0x00, 0x75, 0x00, 0x93, 0x00, 0xb1, 0x00,\n  0xb4, 0x00, 0xab, 0x00, 0x99, 0x00, 0x84, 0x00, 0x70, 0x00, 0x64, 0x00,\n  0x4f, 0x00, 0x4c, 0x00, 0x3d, 0x00, 0x26, 0x00, 0x04, 0x00, 0xdd, 0xff,\n  0xbc, 0xff, 0x97, 0xff, 0x7c, 0xff, 0x6c, 0xff, 0x64, 0xff, 0x66, 0xff,\n  0x6b, 0xff, 0x64, 0xff, 0x58, 0xff, 0x44, 0xff, 0x37, 0xff, 0x22, 0xff,\n  0x19, 0xff, 0x14, 0xff, 0x21, 0xff, 0x38, 0xff, 0x66, 0xff, 0x85, 0xff,\n  0x96, 0xff, 0xaf, 0xff, 0xc0, 0xff, 0xd3, 0xff, 0xe9, 0xff, 0x09, 0x00,\n  0x28, 0x00, 0x47, 0x00, 0x60, 0x00, 0x75, 0x00, 0x8a, 0x00, 0x9a, 0x00,\n  0xa8, 0x00, 0xbb, 0x00, 0xd4, 0x00, 0xdf, 0x00, 0xdd, 0x00, 0xda, 0x00,\n  0xb9, 0x00, 0x97, 0x00, 0x80, 0x00, 0x6d, 0x00, 0x73, 0x00, 0x75, 0x00,\n  0x76, 0x00, 0x63, 0x00, 0x53, 0x00, 0x3e, 0x00, 0x44, 0x00, 0x42, 0x00,\n  0x3c, 0x00, 0x42, 0x00, 0x45, 0x00, 0x48, 0x00, 0x44, 0x00, 0x36, 0x00,\n  0x11, 0x00, 0xe6, 0xff, 0xbe, 0xff, 0x91, 0xff, 0x70, 0xff, 0x52, 0xff,\n  0x4b, 0xff, 0x57, 0xff, 0x6a, 0xff, 0x85, 0xff, 0x99, 0xff, 0xaa, 0xff,\n  0xba, 0xff, 0xc3, 0xff, 0xe0, 0xff, 0xe9, 0xff, 0xf7, 0xff, 0xeb, 0xff,\n  0xdb, 0xff, 0xb8, 0xff, 0x9b, 0xff, 0x8c, 0xff, 0x89, 0xff, 0x87, 0xff,\n  0x91, 0xff, 0xa4, 0xff, 0xbb, 0xff, 0xc8, 0xff, 0xd8, 0xff, 0xd9, 0xff,\n  0xdd, 0xff, 0xdb, 0xff, 0xe1, 0xff, 0xe7, 0xff, 0xe3, 0xff, 0xe0, 0xff,\n  0xd9, 0xff, 0xdc, 0xff, 0xf5, 0xff, 0x11, 0x00, 0x4c, 0x00, 0x7c, 0x00,\n  0xaf, 0x00, 0xbf, 0x00, 0xce, 0x00, 0xe0, 0x00, 0xe2, 0x00, 0xd3, 0x00,\n  0xd0, 0x00, 0xb6, 0x00, 0x93, 0x00, 0x79, 0x00, 0x58, 0x00, 0x3c, 0x00,\n  0x21, 0x00, 0x03, 0x00, 0xfa, 0xff, 0xed, 0xff, 0xf0, 0xff, 0xf4, 0xff,\n  0xec, 0xff, 0xef, 0xff, 0xe4, 0xff, 0xd7, 0xff, 0xc6, 0xff, 0xb9, 0xff,\n  0x9e, 0xff, 0x94, 0xff, 0x81, 0xff, 0x77, 0xff, 0x7b, 0xff, 0x82, 0xff,\n  0x89, 0xff, 0x95, 0xff, 0x9d, 0xff, 0x9f, 0xff, 0xa4, 0xff, 0xa8, 0xff,\n  0xb9, 0xff, 0xd4, 0xff, 0xea, 0xff, 0xe7, 0xff, 0xe4, 0xff, 0xdd, 0xff,\n  0xe2, 0xff, 0xe9, 0xff, 0xf3, 0xff, 0xf9, 0xff, 0x07, 0x00, 0xf4, 0xff,\n  0xea, 0xff, 0xe8, 0xff, 0xf5, 0xff, 0xf9, 0xff, 0x0b, 0x00, 0x1f, 0x00,\n  0x44, 0x00, 0x6a, 0x00, 0x93, 0x00, 0xa5, 0x00, 0xb5, 0x00, 0xba, 0x00,\n  0xba, 0x00, 0xb4, 0x00, 0xa3, 0x00, 0x9b, 0x00, 0x8d, 0x00, 0x7c, 0x00,\n  0x54, 0x00, 0x46, 0x00, 0x1d, 0x00, 0x06, 0x00, 0xee, 0xff, 0xe7, 0xff,\n  0xd5, 0xff, 0xcc, 0xff, 0xb9, 0xff, 0xa7, 0xff, 0x88, 0xff, 0x70, 0xff,\n  0x5e, 0xff, 0x53, 0xff, 0x61, 0xff, 0x7b, 0xff, 0x9e, 0xff, 0xd5, 0xff,\n  0xf8, 0xff, 0x23, 0x00, 0x46, 0x00, 0x5d, 0x00, 0x6b, 0x00, 0x5a, 0x00,\n  0x61, 0x00, 0x64, 0x00, 0x74, 0x00, 0x7e, 0x00, 0x8a, 0x00, 0x9f, 0x00,\n  0xaf, 0x00, 0xba, 0x00, 0xab, 0x00, 0x90, 0x00, 0x6c, 0x00, 0x43, 0x00,\n  0x0f, 0x00, 0xd2, 0xff, 0x9d, 0xff, 0x75, 0xff, 0x55, 0xff, 0x48, 0xff,\n  0x45, 0xff, 0x48, 0xff, 0x4b, 0xff, 0x47, 0xff, 0x40, 0xff, 0x3a, 0xff,\n  0x29, 0xff, 0x21, 0xff, 0x1c, 0xff, 0x30, 0xff, 0x3e, 0xff, 0x4d, 0xff,\n  0x5e, 0xff, 0x72, 0xff, 0x79, 0xff, 0x90, 0xff, 0xaa, 0xff, 0xe0, 0xff,\n  0x0a, 0x00, 0x3a, 0x00, 0x75, 0x00, 0xb3, 0x00, 0xfa, 0x00, 0x2a, 0x01,\n  0x46, 0x01, 0x6a, 0x01, 0x87, 0x01, 0x95, 0x01, 0x9d, 0x01, 0x71, 0x01,\n  0x3d, 0x01, 0xfc, 0x00, 0xc0, 0x00, 0x77, 0x00, 0x37, 0x00, 0xf6, 0xff,\n  0xb5, 0xff, 0x7c, 0xff, 0x50, 0xff, 0x2d, 0xff, 0x0e, 0xff, 0xf3, 0xfe,\n  0xeb, 0xfe, 0xe8, 0xfe, 0xf7, 0xfe, 0x10, 0xff, 0x2d, 0xff, 0x55, 0xff,\n  0x8a, 0xff, 0xb2, 0xff, 0xdf, 0xff, 0xf1, 0xff, 0x11, 0x00, 0x29, 0x00,\n  0x49, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x56, 0x00, 0x52, 0x00, 0x5f, 0x00,\n  0x70, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x4f, 0x00,\n  0x60, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x5d, 0x00, 0x42, 0x00, 0x29, 0x00,\n  0x1c, 0x00, 0x12, 0x00, 0x06, 0x00, 0xed, 0xff, 0xca, 0xff, 0xc4, 0xff,\n  0xbc, 0xff, 0xad, 0xff, 0xa2, 0xff, 0x92, 0xff, 0x84, 0xff, 0x80, 0xff,\n  0x79, 0xff, 0x7a, 0xff, 0x91, 0xff, 0x9b, 0xff, 0xb7, 0xff, 0xc8, 0xff,\n  0xde, 0xff, 0x01, 0x00, 0x1d, 0x00, 0x3c, 0x00, 0x54, 0x00, 0x51, 0x00,\n  0x51, 0x00, 0x4c, 0x00, 0x43, 0x00, 0x30, 0x00, 0x33, 0x00, 0x39, 0x00,\n  0x43, 0x00, 0x41, 0x00, 0x43, 0x00, 0x3c, 0x00, 0x27, 0x00, 0x0e, 0x00,\n  0x03, 0x00, 0xf3, 0xff, 0xe2, 0xff, 0xca, 0xff, 0xa6, 0xff, 0x97, 0xff,\n  0x89, 0xff, 0x86, 0xff, 0x77, 0xff, 0x72, 0xff, 0x65, 0xff, 0x64, 0xff,\n  0x63, 0xff, 0x78, 0xff, 0x8c, 0xff, 0xc0, 0xff, 0xf2, 0xff, 0x49, 0x00,\n  0x9d, 0x00, 0xdc, 0x00, 0x0c, 0x01, 0x38, 0x01, 0x55, 0x01, 0x52, 0x01,\n  0x2b, 0x01, 0x1a, 0x01, 0xf9, 0x00, 0xe2, 0x00, 0xc6, 0x00, 0xa7, 0x00,\n  0x82, 0x00, 0x58, 0x00, 0x30, 0x00, 0xfd, 0xff, 0xcf, 0xff, 0xaa, 0xff,\n  0x79, 0xff, 0x5d, 0xff, 0x40, 0xff, 0x34, 0xff, 0x2a, 0xff, 0x2b, 0xff,\n  0x30, 0xff, 0x2b, 0xff, 0x43, 0xff, 0x53, 0xff, 0x69, 0xff, 0x7f, 0xff,\n  0x88, 0xff, 0xac, 0xff, 0xc9, 0xff, 0xe7, 0xff, 0xfe, 0xff, 0x0e, 0x00,\n  0x12, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf3, 0xff, 0xef, 0xff, 0xf3, 0xff,\n  0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x03, 0x00, 0x14, 0x00, 0x13, 0x00,\n  0x16, 0x00, 0x1a, 0x00, 0x35, 0x00, 0x66, 0x00, 0x7b, 0x00, 0x94, 0x00,\n  0x8f, 0x00, 0x8a, 0x00, 0x78, 0x00, 0x6f, 0x00, 0x56, 0x00, 0x56, 0x00,\n  0x47, 0x00, 0x37, 0x00, 0x27, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x10, 0x00,\n  0x0c, 0x00, 0x0b, 0x00, 0x06, 0x00, 0xfd, 0xff, 0xeb, 0xff, 0xca, 0xff,\n  0x9f, 0xff, 0x7f, 0xff, 0x50, 0xff, 0x44, 0xff, 0x36, 0xff, 0x37, 0xff,\n  0x2e, 0xff, 0x26, 0xff, 0x3a, 0xff, 0x4f, 0xff, 0x64, 0xff, 0x72, 0xff,\n  0x8f, 0xff, 0xae, 0xff, 0xd5, 0xff, 0xf9, 0xff, 0x15, 0x00, 0x2f, 0x00,\n  0x34, 0x00, 0x2f, 0x00, 0x2e, 0x00, 0x26, 0x00, 0x2b, 0x00, 0x34, 0x00,\n  0x4c, 0x00, 0x71, 0x00, 0xab, 0x00, 0xda, 0x00, 0xf2, 0x00, 0xf5, 0x00,\n  0xea, 0x00, 0xde, 0x00, 0xb7, 0x00, 0x86, 0x00, 0x60, 0x00, 0x2f, 0x00,\n  0x04, 0x00, 0xda, 0xff, 0xba, 0xff, 0xa9, 0xff, 0x9d, 0xff, 0x97, 0xff,\n  0x8e, 0xff, 0x96, 0xff, 0x8c, 0xff, 0x93, 0xff, 0x9a, 0xff, 0x97, 0xff,\n  0x96, 0xff, 0xa2, 0xff, 0xb0, 0xff, 0xce, 0xff, 0xe7, 0xff, 0x04, 0x00,\n  0x15, 0x00, 0x24, 0x00, 0x1a, 0x00, 0x17, 0x00, 0x10, 0x00, 0x02, 0x00,\n  0xf9, 0xff, 0xe3, 0xff, 0xc7, 0xff, 0xa6, 0xff, 0x97, 0xff, 0x97, 0xff,\n  0xa8, 0xff, 0xb9, 0xff, 0xcf, 0xff, 0x01, 0x00, 0x32, 0x00, 0x68, 0x00,\n  0xaf, 0x00, 0xfe, 0x00, 0x3e, 0x01, 0x54, 0x01, 0x5c, 0x01, 0x5a, 0x01,\n  0x49, 0x01, 0x10, 0x01, 0xce, 0x00, 0x7a, 0x00, 0x3a, 0x00, 0xfe, 0xff,\n  0xc4, 0xff, 0x9a, 0xff, 0x76, 0xff, 0x5c, 0xff, 0x37, 0xff, 0x23, 0xff,\n  0x1a, 0xff, 0x03, 0xff, 0x00, 0xff, 0xeb, 0xfe, 0xf7, 0xfe, 0x00, 0xff,\n  0x18, 0xff, 0x3b, 0xff, 0x67, 0xff, 0x8a, 0xff, 0xb6, 0xff, 0xe0, 0xff,\n  0x0d, 0x00, 0x3b, 0x00, 0x6b, 0x00, 0xa9, 0x00, 0xd9, 0x00, 0x0a, 0x01,\n  0x30, 0x01, 0x3c, 0x01, 0x26, 0x01, 0xf9, 0x00, 0xd3, 0x00, 0xa3, 0x00,\n  0x7b, 0x00, 0x60, 0x00, 0x42, 0x00, 0x2a, 0x00, 0x13, 0x00, 0xf7, 0xff,\n  0xe3, 0xff, 0xe1, 0xff, 0xf1, 0xff, 0x11, 0x00, 0x23, 0x00, 0x22, 0x00,\n  0x06, 0x00, 0xd9, 0xff, 0xab, 0xff, 0x72, 0xff, 0x42, 0xff, 0x20, 0xff,\n  0x0c, 0xff, 0x05, 0xff, 0x08, 0xff, 0x11, 0xff, 0x30, 0xff, 0x51, 0xff,\n  0x73, 0xff, 0xa5, 0xff, 0xc3, 0xff, 0xd7, 0xff, 0xf5, 0xff, 0x10, 0x00,\n  0x31, 0x00, 0x44, 0x00, 0x56, 0x00, 0x65, 0x00, 0x5f, 0x00, 0x64, 0x00,\n  0x68, 0x00, 0x84, 0x00, 0xb5, 0x00, 0xe5, 0x00, 0x0e, 0x01, 0x08, 0x01,\n  0xfb, 0x00, 0xe0, 0x00, 0xd0, 0x00, 0xaa, 0x00, 0x80, 0x00, 0x4d, 0x00,\n  0x18, 0x00, 0xee, 0xff, 0xc6, 0xff, 0xa3, 0xff, 0x87, 0xff, 0x6f, 0xff,\n  0x5d, 0xff, 0x3d, 0xff, 0x37, 0xff, 0x3a, 0xff, 0x4f, 0xff, 0x54, 0xff,\n  0x5b, 0xff, 0x64, 0xff, 0x6f, 0xff, 0x8c, 0xff, 0xa0, 0xff, 0xb9, 0xff,\n  0xc4, 0xff, 0xd6, 0xff, 0xe5, 0xff, 0xf4, 0xff, 0x0d, 0x00, 0x11, 0x00,\n  0x1c, 0x00, 0x26, 0x00, 0x2f, 0x00, 0x26, 0x00, 0x1e, 0x00, 0x09, 0x00,\n  0xf6, 0xff, 0xe4, 0xff, 0xe9, 0xff, 0xed, 0xff, 0xf8, 0xff, 0xf3, 0xff,\n  0xfb, 0xff, 0x0f, 0x00, 0x27, 0x00, 0x5b, 0x00, 0x85, 0x00, 0xab, 0x00,\n  0xcd, 0x00, 0xef, 0x00, 0x10, 0x01, 0x22, 0x01, 0x35, 0x01, 0x4c, 0x01,\n  0x47, 0x01, 0x22, 0x01, 0xfe, 0x00, 0xc7, 0x00, 0x8f, 0x00, 0x58, 0x00,\n  0x22, 0x00, 0x05, 0x00, 0xe4, 0xff, 0xd7, 0xff, 0xc2, 0xff, 0x9e, 0xff,\n  0x74, 0xff, 0x4e, 0xff, 0x2b, 0xff, 0x0d, 0xff, 0xfa, 0xfe, 0xe5, 0xfe,\n  0xdf, 0xfe, 0xdf, 0xfe, 0xe5, 0xfe, 0xe8, 0xfe, 0xf0, 0xfe, 0x05, 0xff,\n  0x1b, 0xff, 0x2f, 0xff, 0x45, 0xff, 0x59, 0xff, 0x63, 0xff, 0x70, 0xff,\n  0x79, 0xff, 0x9e, 0xff, 0xc5, 0xff, 0xf6, 0xff, 0x23, 0x00, 0x4c, 0x00,\n  0x65, 0x00, 0x79, 0x00, 0x81, 0x00, 0x92, 0x00, 0x90, 0x00, 0x92, 0x00,\n  0x7d, 0x00, 0x67, 0x00, 0x53, 0x00, 0x5a, 0x00, 0x6e, 0x00, 0x8f, 0x00,\n  0xc0, 0x00, 0xd1, 0x00, 0xd0, 0x00, 0xcb, 0x00, 0xb3, 0x00, 0x99, 0x00,\n  0x84, 0x00, 0x78, 0x00, 0x67, 0x00, 0x3e, 0x00, 0x25, 0x00, 0x0c, 0x00,\n  0xf4, 0xff, 0xcd, 0xff, 0xaf, 0xff, 0x91, 0xff, 0x7f, 0xff, 0x7b, 0xff,\n  0x78, 0xff, 0x75, 0xff, 0x6c, 0xff, 0x5c, 0xff, 0x53, 0xff, 0x57, 0xff,\n  0x5c, 0xff, 0x63, 0xff, 0x6e, 0xff, 0x70, 0xff, 0x87, 0xff, 0x82, 0xff,\n  0x8d, 0xff, 0x86, 0xff, 0x7a, 0xff, 0x86, 0xff, 0x9f, 0xff, 0xbb, 0xff,\n  0xd8, 0xff, 0xef, 0xff, 0x12, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x8a, 0x00,\n  0xaf, 0x00, 0xc5, 0x00, 0xdf, 0x00, 0x0b, 0x01, 0x2f, 0x01, 0x50, 0x01,\n  0x65, 0x01, 0x52, 0x01, 0x31, 0x01, 0x04, 0x01, 0xd4, 0x00, 0x9d, 0x00,\n  0x5e, 0x00, 0x2e, 0x00, 0xf2, 0xff, 0xce, 0xff, 0xa4, 0xff, 0x94, 0xff,\n  0x79, 0xff, 0x63, 0xff, 0x47, 0xff, 0x42, 0xff, 0x3b, 0xff, 0x4a, 0xff,\n  0x53, 0xff, 0x61, 0xff, 0x74, 0xff, 0x89, 0xff, 0xa5, 0xff, 0xc0, 0xff,\n  0xd5, 0xff, 0xd1, 0xff, 0xdd, 0xff, 0xde, 0xff, 0xec, 0xff, 0xfa, 0xff,\n  0x19, 0x00, 0x3a, 0x00, 0x4b, 0x00, 0x50, 0x00, 0x43, 0x00, 0x32, 0x00,\n  0x16, 0x00, 0xf9, 0xff, 0xe8, 0xff, 0xd3, 0xff, 0xc9, 0xff, 0xb5, 0xff,\n  0xac, 0xff, 0x9e, 0xff, 0x92, 0xff, 0x9a, 0xff, 0x94, 0xff, 0x8b, 0xff,\n  0x82, 0xff, 0x84, 0xff, 0x8b, 0xff, 0x98, 0xff, 0xa4, 0xff, 0xb1, 0xff,\n  0xd1, 0xff, 0xf7, 0xff, 0x2e, 0x00, 0x5a, 0x00, 0x88, 0x00, 0xb1, 0x00,\n  0xc9, 0x00, 0xec, 0x00, 0xf4, 0x00, 0xfc, 0x00, 0xf0, 0x00, 0xe0, 0x00,\n  0xcb, 0x00, 0xaa, 0x00, 0x7f, 0x00, 0x55, 0x00, 0x27, 0x00, 0x05, 0x00,\n  0xd8, 0xff, 0xc2, 0xff, 0x9e, 0xff, 0x83, 0xff, 0x62, 0xff, 0x47, 0xff,\n  0x44, 0xff, 0x3f, 0xff, 0x40, 0xff, 0x4b, 0xff, 0x5b, 0xff, 0x79, 0xff,\n  0xa5, 0xff, 0xcf, 0xff, 0xf2, 0xff, 0x0d, 0x00, 0x26, 0x00, 0x29, 0x00,\n  0x2d, 0x00, 0x28, 0x00, 0x25, 0x00, 0x2b, 0x00, 0x16, 0x00, 0x15, 0x00,\n  0x0c, 0x00, 0x12, 0x00, 0x06, 0x00, 0xf1, 0xff, 0xe5, 0xff, 0xea, 0xff,\n  0x09, 0x00, 0x2a, 0x00, 0x4b, 0x00, 0x62, 0x00, 0x75, 0x00, 0x71, 0x00,\n  0x73, 0x00, 0x70, 0x00, 0x63, 0x00, 0x4f, 0x00, 0x31, 0x00, 0x1a, 0x00,\n  0xf6, 0xff, 0xd9, 0xff, 0xb6, 0xff, 0xab, 0xff, 0x99, 0xff, 0x94, 0xff,\n  0x8d, 0xff, 0x91, 0xff, 0x93, 0xff, 0xa7, 0xff, 0xc2, 0xff, 0xdb, 0xff,\n  0xf4, 0xff, 0x14, 0x00, 0x32, 0x00, 0x69, 0x00, 0x8e, 0x00, 0xb4, 0x00,\n  0xc6, 0x00, 0xc6, 0x00, 0xae, 0x00, 0x94, 0x00, 0x72, 0x00, 0x53, 0x00,\n  0x33, 0x00, 0x21, 0x00, 0x13, 0x00, 0x03, 0x00, 0xec, 0xff, 0xd4, 0xff,\n  0xbf, 0xff, 0xd1, 0xff, 0xf6, 0xff, 0x00, 0x00, 0xfb, 0xff, 0xdc, 0xff,\n  0xd0, 0xff, 0xc0, 0xff, 0xba, 0xff, 0xbd, 0xff, 0xbf, 0xff, 0xd7, 0xff,\n  0xdd, 0xff, 0xe1, 0xff, 0xdd, 0xff, 0xe3, 0xff, 0xd8, 0xff, 0xde, 0xff,\n  0xc6, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xbf, 0xff, 0xb7, 0xff, 0xa8, 0xff,\n  0xad, 0xff, 0xb9, 0xff, 0xd1, 0xff, 0xde, 0xff, 0xe2, 0xff, 0xe9, 0xff,\n  0xfd, 0xff, 0x03, 0x00, 0x17, 0x00, 0x14, 0x00, 0x12, 0x00, 0x17, 0x00,\n  0x22, 0x00, 0x25, 0x00, 0x2f, 0x00, 0x20, 0x00, 0x23, 0x00, 0x1e, 0x00,\n  0x17, 0x00, 0x0a, 0x00, 0xfc, 0xff, 0xe0, 0xff, 0xd0, 0xff, 0xb5, 0xff,\n  0xb3, 0xff, 0xb7, 0xff, 0xaf, 0xff, 0xad, 0xff, 0xb5, 0xff, 0xcd, 0xff,\n  0xe8, 0xff, 0xf6, 0xff, 0x0d, 0x00, 0x22, 0x00, 0x2c, 0x00, 0x38, 0x00,\n  0x3e, 0x00, 0x45, 0x00, 0x4f, 0x00, 0x3e, 0x00, 0x33, 0x00, 0x30, 0x00,\n  0x2b, 0x00, 0x29, 0x00, 0x28, 0x00, 0x27, 0x00, 0x28, 0x00, 0x30, 0x00,\n  0x23, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x29, 0x00, 0x2b, 0x00,\n  0x28, 0x00, 0x2e, 0x00, 0x35, 0x00, 0x47, 0x00, 0x4e, 0x00, 0x4f, 0x00,\n  0x3d, 0x00, 0x26, 0x00, 0x0b, 0x00, 0xf2, 0xff, 0xd7, 0xff, 0xc0, 0xff,\n  0xaa, 0xff, 0x92, 0xff, 0x9b, 0xff, 0xb1, 0xff, 0xcd, 0xff, 0xd9, 0xff,\n  0xeb, 0xff, 0xdc, 0xff, 0xcf, 0xff, 0xaf, 0xff, 0x99, 0xff, 0x86, 0xff,\n  0x76, 0xff, 0x6a, 0xff, 0x63, 0xff, 0x72, 0xff, 0x83, 0xff, 0xa4, 0xff,\n  0xcd, 0xff, 0xf2, 0xff, 0x0e, 0x00, 0x2f, 0x00, 0x4e, 0x00, 0x7a, 0x00,\n  0xa0, 0x00, 0xc0, 0x00, 0xd4, 0x00, 0xdd, 0x00, 0xde, 0x00, 0xc8, 0x00,\n  0xb5, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0xa6, 0x00, 0x93, 0x00,\n  0x79, 0x00, 0x5c, 0x00, 0x38, 0x00, 0x10, 0x00, 0xde, 0xff, 0xae, 0xff,\n  0x88, 0xff, 0x7f, 0xff, 0x7e, 0xff, 0x8e, 0xff, 0x8b, 0xff, 0x89, 0xff,\n  0x82, 0xff, 0x7d, 0xff, 0x6b, 0xff, 0x6d, 0xff, 0x7a, 0xff, 0xa0, 0xff,\n  0xa5, 0xff, 0xa0, 0xff, 0x9a, 0xff, 0x90, 0xff, 0x9f, 0xff, 0xb2, 0xff,\n  0xc9, 0xff, 0xe8, 0xff, 0xfb, 0xff, 0x14, 0x00, 0x13, 0x00, 0x2c, 0x00,\n  0x3f, 0x00, 0x4f, 0x00, 0x66, 0x00, 0x88, 0x00, 0x9a, 0x00, 0x9b, 0x00,\n  0x82, 0x00, 0x68, 0x00, 0x4d, 0x00, 0x3e, 0x00, 0x3a, 0x00, 0x31, 0x00,\n  0x27, 0x00, 0x23, 0x00, 0x13, 0x00, 0x02, 0x00, 0xe5, 0xff, 0xcc, 0xff,\n  0xb5, 0xff, 0xa6, 0xff, 0x95, 0xff, 0x8a, 0xff, 0x77, 0xff, 0x74, 0xff,\n  0x84, 0xff, 0x9a, 0xff, 0xba, 0xff, 0xce, 0xff, 0xeb, 0xff, 0x08, 0x00,\n  0x28, 0x00, 0x43, 0x00, 0x52, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x48, 0x00,\n  0x38, 0x00, 0x37, 0x00, 0x1c, 0x00, 0x03, 0x00, 0xdf, 0xff, 0xba, 0xff,\n  0xab, 0xff, 0xa2, 0xff, 0xb1, 0xff, 0xb3, 0xff, 0xc8, 0xff, 0xd4, 0xff,\n  0xef, 0xff, 0x17, 0x00, 0x4a, 0x00, 0x71, 0x00, 0x93, 0x00, 0x9b, 0x00,\n  0xb4, 0x00, 0xae, 0x00, 0xae, 0x00, 0x91, 0x00, 0x88, 0x00, 0x73, 0x00,\n  0x64, 0x00, 0x46, 0x00, 0x23, 0x00, 0x00, 0x00, 0xd7, 0xff, 0xb7, 0xff,\n  0x99, 0xff, 0x89, 0xff, 0x85, 0xff, 0x80, 0xff, 0x80, 0xff, 0x9d, 0xff,\n  0xc5, 0xff, 0xef, 0xff, 0x15, 0x00, 0x26, 0x00, 0x25, 0x00, 0x17, 0x00,\n  0xfc, 0xff, 0xec, 0xff, 0xca, 0xff, 0xb2, 0xff, 0x98, 0xff, 0x92, 0xff,\n  0x7e, 0xff, 0x72, 0xff, 0x67, 0xff, 0x65, 0xff, 0x81, 0xff, 0x8b, 0xff,\n  0xb5, 0xff, 0xd6, 0xff, 0xf4, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x05, 0x00,\n  0x04, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x02, 0x00, 0xf4, 0xff, 0xe7, 0xff,\n  0xec, 0xff, 0x04, 0x00, 0x1b, 0x00, 0x36, 0x00, 0x4e, 0x00, 0x67, 0x00,\n  0xa1, 0x00, 0xd4, 0x00, 0x03, 0x01, 0x1f, 0x01, 0x24, 0x01, 0x08, 0x01,\n  0xe1, 0x00, 0xaf, 0x00, 0x92, 0x00, 0x7e, 0x00, 0x67, 0x00, 0x4d, 0x00,\n  0x30, 0x00, 0x1a, 0x00, 0xfb, 0xff, 0xd4, 0xff, 0xa3, 0xff, 0x84, 0xff,\n  0x62, 0xff, 0x4a, 0xff, 0x3d, 0xff, 0x36, 0xff, 0x31, 0xff, 0x2c, 0xff,\n  0x31, 0xff, 0x41, 0xff, 0x4b, 0xff, 0x5d, 0xff, 0x70, 0xff, 0x7d, 0xff,\n  0x80, 0xff, 0x8e, 0xff, 0xa2, 0xff, 0xbe, 0xff, 0xeb, 0xff, 0x08, 0x00,\n  0x1c, 0x00, 0x28, 0x00, 0x32, 0x00, 0x34, 0x00, 0x37, 0x00, 0x2f, 0x00,\n  0x2b, 0x00, 0x26, 0x00, 0x19, 0x00, 0x06, 0x00, 0xf6, 0xff, 0xf0, 0xff,\n  0xf4, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0x13, 0x00, 0x1f, 0x00, 0x2b, 0x00,\n  0x3e, 0x00, 0x5d, 0x00, 0x86, 0x00, 0xaf, 0x00, 0xc2, 0x00, 0xe6, 0x00,\n  0xf5, 0x00, 0xf6, 0x00, 0xeb, 0x00, 0xd9, 0x00, 0xae, 0x00, 0x7e, 0x00,\n  0x4a, 0x00, 0x19, 0x00, 0xec, 0xff, 0xc6, 0xff, 0xa0, 0xff, 0x8e, 0xff,\n  0x86, 0xff, 0x85, 0xff, 0x8d, 0xff, 0x8d, 0xff, 0x9f, 0xff, 0x9e, 0xff,\n  0xab, 0xff, 0x97, 0xff, 0x90, 0xff, 0x95, 0xff, 0x8d, 0xff, 0x8e, 0xff,\n  0x8e, 0xff, 0x91, 0xff, 0x87, 0xff, 0x7f, 0xff, 0x6c, 0xff, 0x74, 0xff,\n  0x92, 0xff, 0xcc, 0xff, 0x09, 0x00, 0x42, 0x00, 0x6f, 0x00, 0xae, 0x00,\n  0xd3, 0x00, 0xf7, 0x00, 0xf3, 0x00, 0xee, 0x00, 0xdf, 0x00, 0xd3, 0x00,\n  0xb1, 0x00, 0x95, 0x00, 0x6d, 0x00, 0x3c, 0x00, 0x0e, 0x00, 0xea, 0xff,\n  0xd2, 0xff, 0xb7, 0xff, 0xae, 0xff, 0xad, 0xff, 0xb1, 0xff, 0xbd, 0xff,\n  0xce, 0xff, 0xd9, 0xff, 0xd9, 0xff, 0xd3, 0xff, 0xc7, 0xff, 0xb7, 0xff,\n  0xaa, 0xff, 0x9b, 0xff, 0x99, 0xff, 0x9e, 0xff, 0xa0, 0xff, 0xad, 0xff,\n  0xcc, 0xff, 0xd0, 0xff, 0xee, 0xff, 0x00, 0x00, 0x25, 0x00, 0x3f, 0x00,\n  0x4a, 0x00, 0x5f, 0x00, 0x65, 0x00, 0x66, 0x00, 0x6a, 0x00, 0x63, 0x00,\n  0x52, 0x00, 0x29, 0x00, 0xfe, 0xff, 0xd0, 0xff, 0xb2, 0xff, 0x9a, 0xff,\n  0x87, 0xff, 0x73, 0xff, 0x70, 0xff, 0x82, 0xff, 0x8c, 0xff, 0x9d, 0xff,\n  0xb9, 0xff, 0xc7, 0xff, 0xd7, 0xff, 0xdc, 0xff, 0xe3, 0xff, 0xe5, 0xff,\n  0xf1, 0xff, 0x0b, 0x00, 0x24, 0x00, 0x4f, 0x00, 0x98, 0x00, 0xd9, 0x00,\n  0x25, 0x01, 0x5c, 0x01, 0x6c, 0x01, 0x5d, 0x01, 0x3a, 0x01, 0x11, 0x01,\n  0xdd, 0x00, 0xb5, 0x00, 0x7e, 0x00, 0x39, 0x00, 0x08, 0x00, 0xd2, 0xff,\n  0xa5, 0xff, 0x78, 0xff, 0x4d, 0xff, 0x25, 0xff, 0x06, 0xff, 0xf4, 0xfe,\n  0xf8, 0xfe, 0xf2, 0xfe, 0xfb, 0xfe, 0x07, 0xff, 0x1b, 0xff, 0x34, 0xff,\n  0x6d, 0xff, 0x9d, 0xff, 0xd1, 0xff, 0x00, 0x00, 0x26, 0x00, 0x31, 0x00,\n  0x39, 0x00, 0x24, 0x00, 0x1a, 0x00, 0x18, 0x00, 0x2b, 0x00, 0x33, 0x00,\n  0x50, 0x00, 0x58, 0x00, 0x5e, 0x00, 0x66, 0x00, 0x53, 0x00, 0x41, 0x00,\n  0x1e, 0x00, 0x04, 0x00, 0xe8, 0xff, 0xd6, 0xff, 0xd2, 0xff, 0xc0, 0xff,\n  0xc3, 0xff, 0xb7, 0xff, 0xac, 0xff, 0xa3, 0xff, 0x9c, 0xff, 0xa0, 0xff,\n  0xa8, 0xff, 0xb2, 0xff, 0xb8, 0xff, 0xc8, 0xff, 0xdc, 0xff, 0xf0, 0xff,\n  0xf5, 0xff, 0xe5, 0xff, 0xd1, 0xff, 0xbe, 0xff, 0xac, 0xff, 0xae, 0xff,\n  0xbb, 0xff, 0xcc, 0xff, 0xec, 0xff, 0xfc, 0xff, 0x27, 0x00, 0x4b, 0x00,\n  0x6e, 0x00, 0x81, 0x00, 0xa3, 0x00, 0xdf, 0x00, 0x17, 0x01, 0x4d, 0x01,\n  0x65, 0x01, 0x62, 0x01, 0x44, 0x01, 0x29, 0x01, 0xfc, 0x00, 0xdd, 0x00,\n  0x95, 0x00, 0x69, 0x00, 0x32, 0x00, 0x0a, 0x00, 0xd3, 0xff, 0xb7, 0xff,\n  0x92, 0xff, 0x7a, 0xff, 0x69, 0xff, 0x56, 0xff, 0x47, 0xff, 0x40, 0xff,\n  0x3e, 0xff, 0x4e, 0xff, 0x62, 0xff, 0x76, 0xff, 0x78, 0xff, 0x7a, 0xff,\n  0x7c, 0xff, 0x88, 0xff, 0x95, 0xff, 0xa0, 0xff, 0xa4, 0xff, 0xab, 0xff,\n  0xc0, 0xff, 0xe2, 0xff, 0x15, 0x00, 0x42, 0x00, 0x60, 0x00, 0x84, 0x00,\n  0x9e, 0x00, 0xa9, 0x00, 0xb3, 0x00, 0xaa, 0x00, 0x98, 0x00, 0x8a, 0x00,\n  0x7a, 0x00, 0x69, 0x00, 0x53, 0x00, 0x3c, 0x00, 0x1f, 0x00, 0xff, 0xff,\n  0xd7, 0xff, 0xc7, 0xff, 0xbb, 0xff, 0xa3, 0xff, 0x95, 0xff, 0x76, 0xff,\n  0x6c, 0xff, 0x58, 0xff, 0x4b, 0xff, 0x31, 0xff, 0x25, 0xff, 0x0c, 0xff,\n  0xff, 0xfe, 0x08, 0xff, 0x13, 0xff, 0x25, 0xff, 0x45, 0xff, 0x6b, 0xff,\n  0xa7, 0xff, 0xeb, 0xff, 0x0f, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x60, 0x00,\n  0x7b, 0x00, 0x80, 0x00, 0x81, 0x00, 0x81, 0x00, 0x84, 0x00, 0x85, 0x00,\n  0x94, 0x00, 0xae, 0x00, 0xb6, 0x00, 0xb2, 0x00, 0x9b, 0x00, 0x91, 0x00,\n  0x82, 0x00, 0x6d, 0x00, 0x6a, 0x00, 0x6c, 0x00, 0x80, 0x00, 0x7a, 0x00,\n  0x76, 0x00, 0x5a, 0x00, 0x3f, 0x00, 0x33, 0x00, 0x29, 0x00, 0x20, 0x00,\n  0x1b, 0x00, 0x23, 0x00, 0x0c, 0x00, 0x07, 0x00, 0xe9, 0xff, 0xce, 0xff,\n  0xac, 0xff, 0x90, 0xff, 0x6f, 0xff, 0x60, 0xff, 0x61, 0xff, 0x6a, 0xff,\n  0x6a, 0xff, 0x6d, 0xff, 0x79, 0xff, 0x86, 0xff, 0x84, 0xff, 0x7c, 0xff,\n  0x73, 0xff, 0x66, 0xff, 0x5a, 0xff, 0x4f, 0xff, 0x52, 0xff, 0x65, 0xff,\n  0x69, 0xff, 0x86, 0xff, 0x8f, 0xff, 0xc3, 0xff, 0xf5, 0xff, 0x30, 0x00,\n  0x65, 0x00, 0x8a, 0x00, 0xb9, 0x00, 0xd9, 0x00, 0xed, 0x00, 0xf5, 0x00,\n  0xef, 0x00, 0xfc, 0x00, 0xfb, 0x00, 0x01, 0x01, 0xe5, 0x00, 0xd0, 0x00,\n  0xaa, 0x00, 0x7d, 0x00, 0x47, 0x00, 0x19, 0x00, 0xeb, 0xff, 0xd5, 0xff,\n  0xbd, 0xff, 0xaf, 0xff, 0xbe, 0xff, 0xc3, 0xff, 0xe5, 0xff, 0xee, 0xff,\n  0xf9, 0xff, 0x0f, 0x00, 0x28, 0x00, 0x3c, 0x00, 0x4d, 0x00, 0x54, 0x00,\n  0x53, 0x00, 0x4a, 0x00, 0x45, 0x00, 0x1e, 0x00, 0xfe, 0xff, 0xda, 0xff,\n  0xc2, 0xff, 0xba, 0xff, 0xa4, 0xff, 0xa4, 0xff, 0x9b, 0xff, 0xa2, 0xff,\n  0x9d, 0xff, 0x9f, 0xff, 0x85, 0xff, 0x78, 0xff, 0x5c, 0xff, 0x47, 0xff,\n  0x36, 0xff, 0x49, 0xff, 0x4a, 0xff, 0x62, 0xff, 0x72, 0xff, 0x8e, 0xff,\n  0xab, 0xff, 0xc5, 0xff, 0xe3, 0xff, 0xfe, 0xff, 0x0f, 0x00, 0x1e, 0x00,\n  0x29, 0x00, 0x25, 0x00, 0x27, 0x00, 0x26, 0x00, 0x2c, 0x00, 0x29, 0x00,\n  0x1f, 0x00, 0x18, 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x1b, 0x00,\n  0x12, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x1d, 0x00, 0x2f, 0x00, 0x55, 0x00,\n  0x6a, 0x00, 0x66, 0x00, 0x67, 0x00, 0x5a, 0x00, 0x61, 0x00, 0x69, 0x00,\n  0x51, 0x00, 0x47, 0x00, 0x31, 0x00, 0x22, 0x00, 0x0b, 0x00, 0x04, 0x00,\n  0xf7, 0xff, 0xdf, 0xff, 0xd1, 0xff, 0xd7, 0xff, 0xda, 0xff, 0xea, 0xff,\n  0xde, 0xff, 0xe6, 0xff, 0xd8, 0xff, 0xe4, 0xff, 0xe4, 0xff, 0xf2, 0xff,\n  0xf8, 0xff, 0xf8, 0xff, 0xf5, 0xff, 0xe6, 0xff, 0xdd, 0xff, 0xe2, 0xff,\n  0xed, 0xff, 0x05, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x24, 0x00, 0x34, 0x00,\n  0x37, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x4d, 0x00, 0x62, 0x00, 0x69, 0x00,\n  0x6a, 0x00, 0x59, 0x00, 0x49, 0x00, 0x32, 0x00, 0x17, 0x00, 0xfc, 0xff,\n  0xda, 0xff, 0xc2, 0xff, 0xa9, 0xff, 0x93, 0xff, 0x7f, 0xff, 0x6e, 0xff,\n  0x6a, 0xff, 0x67, 0xff, 0x69, 0xff, 0x65, 0xff, 0x73, 0xff, 0x77, 0xff,\n  0x82, 0xff, 0x8c, 0xff, 0x9a, 0xff, 0xa7, 0xff, 0xc8, 0xff, 0xe1, 0xff,\n  0xf0, 0xff, 0x17, 0x00, 0x40, 0x00, 0x69, 0x00, 0x7f, 0x00, 0x8c, 0x00,\n  0x99, 0x00, 0x95, 0x00, 0x92, 0x00, 0x77, 0x00, 0x5e, 0x00, 0x36, 0x00,\n  0x0c, 0x00, 0xf5, 0xff, 0xde, 0xff, 0xdb, 0xff, 0xcd, 0xff, 0xc7, 0xff,\n  0xba, 0xff, 0xb2, 0xff, 0xb4, 0xff, 0xbd, 0xff, 0xb7, 0xff, 0xbb, 0xff,\n  0xb8, 0xff, 0xb8, 0xff, 0xc8, 0xff, 0xce, 0xff, 0xda, 0xff, 0xfe, 0xff,\n  0x1f, 0x00, 0x56, 0x00, 0x80, 0x00, 0x91, 0x00, 0xa8, 0x00, 0xb4, 0x00,\n  0xb8, 0x00, 0xb1, 0x00, 0xa1, 0x00, 0x8c, 0x00, 0x72, 0x00, 0x4e, 0x00,\n  0x30, 0x00, 0x09, 0x00, 0x02, 0x00, 0xfe, 0xff, 0xf6, 0xff, 0xe3, 0xff,\n  0xca, 0xff, 0xbe, 0xff, 0xaf, 0xff, 0x9d, 0xff, 0x8e, 0xff, 0x7d, 0xff,\n  0x72, 0xff, 0x5a, 0xff, 0x48, 0xff, 0x3a, 0xff, 0x3b, 0xff, 0x4c, 0xff,\n  0x5b, 0xff, 0x74, 0xff, 0x84, 0xff, 0xa6, 0xff, 0xc9, 0xff, 0xee, 0xff,\n  0x06, 0x00, 0x22, 0x00, 0x40, 0x00, 0x6c, 0x00, 0x8a, 0x00, 0xa9, 0x00,\n  0xce, 0x00, 0xe3, 0x00, 0xef, 0x00, 0xe9, 0x00, 0xe7, 0x00, 0xe6, 0x00,\n  0xd7, 0x00, 0xbd, 0x00, 0x9a, 0x00, 0x84, 0x00, 0x53, 0x00, 0x3e, 0x00,\n  0x25, 0x00, 0x13, 0x00, 0xff, 0xff, 0xdc, 0xff, 0xc3, 0xff, 0x9b, 0xff,\n  0x82, 0xff, 0x6e, 0xff, 0x5f, 0xff, 0x5b, 0xff, 0x50, 0xff, 0x4e, 0xff,\n  0x4b, 0xff, 0x53, 0xff, 0x69, 0xff, 0x81, 0xff, 0xaa, 0xff, 0xc6, 0xff,\n  0xcf, 0xff, 0xeb, 0xff, 0xfe, 0xff, 0x1a, 0x00, 0x28, 0x00, 0x2e, 0x00,\n  0x39, 0x00, 0x35, 0x00, 0x43, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3e, 0x00,\n  0x44, 0x00, 0x4a, 0x00, 0x4d, 0x00, 0x50, 0x00, 0x54, 0x00, 0x64, 0x00,\n  0x70, 0x00, 0x72, 0x00, 0x70, 0x00, 0x67, 0x00, 0x69, 0x00, 0x60, 0x00,\n  0x55, 0x00, 0x43, 0x00, 0x2b, 0x00, 0x19, 0x00, 0x01, 0x00, 0xe3, 0xff,\n  0xbf, 0xff, 0xa3, 0xff, 0x8c, 0xff, 0x70, 0xff, 0x5b, 0xff, 0x47, 0xff,\n  0x3d, 0xff, 0x2c, 0xff, 0x33, 0xff, 0x46, 0xff, 0x54, 0xff, 0x65, 0xff,\n  0x75, 0xff, 0x85, 0xff, 0x9c, 0xff, 0xbe, 0xff, 0xdc, 0xff, 0xf2, 0xff,\n  0x09, 0x00, 0x18, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00,\n  0x1c, 0x00, 0x18, 0x00, 0x07, 0x00, 0xf6, 0xff, 0xdc, 0xff, 0xd0, 0xff,\n  0xcc, 0xff, 0xc9, 0xff, 0xbc, 0xff, 0xac, 0xff, 0xa1, 0xff, 0x98, 0xff,\n  0xb0, 0xff, 0xcb, 0xff, 0xe6, 0xff, 0x0a, 0x00, 0x1f, 0x00, 0x34, 0x00,\n  0x47, 0x00, 0x5f, 0x00, 0x6b, 0x00, 0x7a, 0x00, 0x8c, 0x00, 0x99, 0x00,\n  0xad, 0x00, 0xbd, 0x00, 0xd7, 0x00, 0xd7, 0x00, 0xe0, 0x00, 0xe0, 0x00,\n  0xf4, 0x00, 0x04, 0x01, 0x15, 0x01, 0xfd, 0x00, 0xdf, 0x00, 0xaa, 0x00,\n  0x7c, 0x00, 0x49, 0x00, 0x1a, 0x00, 0xf5, 0xff, 0xcd, 0xff, 0xb5, 0xff,\n  0x98, 0xff, 0x99, 0xff, 0x95, 0xff, 0x99, 0xff, 0x8d, 0xff, 0x81, 0xff,\n  0x77, 0xff, 0x72, 0xff, 0x71, 0xff, 0x64, 0xff, 0x5c, 0xff, 0x4a, 0xff,\n  0x4d, 0xff, 0x50, 0xff, 0x6a, 0xff, 0x87, 0xff, 0xa4, 0xff, 0xb1, 0xff,\n  0xbf, 0xff, 0xd7, 0xff, 0xdd, 0xff, 0xf4, 0xff, 0x04, 0x00, 0x1c, 0x00,\n  0x20, 0x00, 0x1e, 0x00, 0x11, 0x00, 0x22, 0x00, 0x1e, 0x00, 0x33, 0x00,\n  0x37, 0x00, 0x53, 0x00, 0x55, 0x00, 0x64, 0x00, 0x56, 0x00, 0x4c, 0x00,\n  0x37, 0x00, 0x37, 0x00, 0x21, 0x00, 0x1a, 0x00, 0x04, 0x00, 0xfd, 0xff,\n  0xed, 0xff, 0xd9, 0xff, 0xcb, 0xff, 0xcc, 0xff, 0xd1, 0xff, 0xe5, 0xff,\n  0xeb, 0xff, 0xf6, 0xff, 0xeb, 0xff, 0xeb, 0xff, 0xe3, 0xff, 0xe4, 0xff,\n  0xce, 0xff, 0xbf, 0xff, 0xb6, 0xff, 0xb3, 0xff, 0xb1, 0xff, 0xa9, 0xff,\n  0xae, 0xff, 0xb0, 0xff, 0xba, 0xff, 0xb0, 0xff, 0xae, 0xff, 0xa1, 0xff,\n  0x96, 0xff, 0x95, 0xff, 0x9c, 0xff, 0xa3, 0xff, 0xb0, 0xff, 0xb2, 0xff,\n  0xc4, 0xff, 0xcf, 0xff, 0x00, 0x00, 0x1e, 0x00, 0x42, 0x00, 0x56, 0x00,\n  0x61, 0x00, 0x75, 0x00, 0x7c, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x8b, 0x00,\n  0x99, 0x00, 0xa4, 0x00, 0xb8, 0x00, 0xc1, 0x00, 0xd0, 0x00, 0xd9, 0x00,\n  0xdd, 0x00, 0xd5, 0x00, 0xcc, 0x00, 0xae, 0x00, 0x8a, 0x00, 0x67, 0x00,\n  0x39, 0x00, 0x01, 0x00, 0xcf, 0xff, 0x9e, 0xff, 0x70, 0xff, 0x59, 0xff,\n  0x41, 0xff, 0x46, 0xff, 0x4b, 0xff, 0x49, 0xff, 0x4e, 0xff, 0x49, 0xff,\n  0x5e, 0xff, 0x7a, 0xff, 0xaa, 0xff, 0xe3, 0xff, 0x0b, 0x00, 0x3c, 0x00,\n  0x72, 0x00, 0xad, 0x00, 0xcd, 0x00, 0xe4, 0x00, 0xf0, 0x00, 0xe2, 0x00,\n  0xcb, 0x00, 0x9b, 0x00, 0x6a, 0x00, 0x42, 0x00, 0x22, 0x00, 0x03, 0x00,\n  0xf5, 0xff, 0xdb, 0xff, 0xc6, 0xff, 0xad, 0xff, 0xa1, 0xff, 0x9e, 0xff,\n  0x9b, 0xff, 0x87, 0xff, 0x88, 0xff, 0x86, 0xff, 0x88, 0xff, 0x7c, 0xff,\n  0x85, 0xff, 0x82, 0xff, 0x8b, 0xff, 0x8a, 0xff, 0x86, 0xff, 0x8a, 0xff,\n  0x8d, 0xff, 0x9b, 0xff, 0xa8, 0xff, 0xb5, 0xff, 0xcd, 0xff, 0xe8, 0xff,\n  0xfd, 0xff, 0x1a, 0x00, 0x32, 0x00, 0x49, 0x00, 0x56, 0x00, 0x73, 0x00,\n  0x8e, 0x00, 0xae, 0x00, 0xc8, 0x00, 0xdf, 0x00, 0xd2, 0x00, 0xc5, 0x00,\n  0xae, 0x00, 0x8c, 0x00, 0x66, 0x00, 0x34, 0x00, 0x15, 0x00, 0xec, 0xff,\n  0xcc, 0xff, 0xb1, 0xff, 0x96, 0xff, 0x78, 0xff, 0x67, 0xff, 0x52, 0xff,\n  0x52, 0xff, 0x52, 0xff, 0x58, 0xff, 0x51, 0xff, 0x54, 0xff, 0x59, 0xff,\n  0x68, 0xff, 0x73, 0xff, 0x83, 0xff, 0x8a, 0xff, 0x97, 0xff, 0xa6, 0xff,\n  0xbc, 0xff, 0xd6, 0xff, 0xf2, 0xff, 0x0d, 0x00, 0x37, 0x00, 0x5d, 0x00,\n  0x7e, 0x00, 0x95, 0x00, 0x95, 0x00, 0x9b, 0x00, 0x8c, 0x00, 0x88, 0x00,\n  0x88, 0x00, 0x6d, 0x00, 0x4d, 0x00, 0x25, 0x00, 0x05, 0x00, 0xef, 0xff,\n  0xe1, 0xff, 0xd4, 0xff, 0xcc, 0xff, 0xd9, 0xff, 0xde, 0xff, 0xf0, 0xff,\n  0xf0, 0xff, 0x00, 0x00, 0x0b, 0x00, 0x1f, 0x00, 0x29, 0x00, 0x36, 0x00,\n  0x48, 0x00, 0x5c, 0x00, 0x67, 0x00, 0x6a, 0x00, 0x6d, 0x00, 0x5f, 0x00,\n  0x5a, 0x00, 0x48, 0x00, 0x43, 0x00, 0x37, 0x00, 0x23, 0x00, 0x13, 0x00,\n  0xf6, 0xff, 0xde, 0xff, 0xc1, 0xff, 0xa8, 0xff, 0x9e, 0xff, 0x8e, 0xff,\n  0x8c, 0xff, 0x8f, 0xff, 0x9c, 0xff, 0xbb, 0xff, 0xbe, 0xff, 0xbf, 0xff,\n  0xbb, 0xff, 0xab, 0xff, 0xb1, 0xff, 0xbb, 0xff, 0xdb, 0xff, 0x01, 0x00,\n  0x37, 0x00, 0x52, 0x00, 0x7a, 0x00, 0x86, 0x00, 0x9a, 0x00, 0x98, 0x00,\n  0x9f, 0x00, 0x8e, 0x00, 0x86, 0x00, 0x69, 0x00, 0x42, 0x00, 0x17, 0x00,\n  0xee, 0xff, 0xcb, 0xff, 0xa2, 0xff, 0x87, 0xff, 0x5e, 0xff, 0x4d, 0xff,\n  0x44, 0xff, 0x4f, 0xff, 0x53, 0xff, 0x66, 0xff, 0x6e, 0xff, 0x81, 0xff,\n  0x8b, 0xff, 0xa8, 0xff, 0xcf, 0xff, 0xf1, 0xff, 0x17, 0x00, 0x32, 0x00,\n  0x48, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x69, 0x00, 0x72, 0x00, 0x6a, 0x00,\n  0x73, 0x00, 0x7a, 0x00, 0x80, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x7d, 0x00,\n  0x79, 0x00, 0x72, 0x00, 0x5a, 0x00, 0x48, 0x00, 0x24, 0x00, 0x0c, 0x00,\n  0xf4, 0xff, 0xe6, 0xff, 0xe1, 0xff, 0xe5, 0xff, 0xea, 0xff, 0xdf, 0xff,\n  0xda, 0xff, 0xcd, 0xff, 0xcb, 0xff, 0xc5, 0xff, 0xbf, 0xff, 0xb0, 0xff,\n  0x98, 0xff, 0x7d, 0xff, 0x6b, 0xff, 0x74, 0xff, 0x70, 0xff, 0x8c, 0xff,\n  0x9d, 0xff, 0xb7, 0xff, 0xdd, 0xff, 0xf1, 0xff, 0x19, 0x00, 0x3d, 0x00,\n  0x69, 0x00, 0x78, 0x00, 0x8c, 0x00, 0x99, 0x00, 0xa7, 0x00, 0x9f, 0x00,\n  0x81, 0x00, 0x6f, 0x00, 0x61, 0x00, 0x4f, 0x00, 0x44, 0x00, 0x2b, 0x00,\n  0x17, 0x00, 0x0a, 0x00, 0x07, 0x00, 0x05, 0x00, 0xf2, 0xff, 0xe6, 0xff,\n  0xe3, 0xff, 0xce, 0xff, 0xbd, 0xff, 0xa8, 0xff, 0x95, 0xff, 0x8c, 0xff,\n  0x8b, 0xff, 0x91, 0xff, 0x94, 0xff, 0x9c, 0xff, 0xaf, 0xff, 0xc4, 0xff,\n  0xd6, 0xff, 0xea, 0xff, 0xe4, 0xff, 0xf3, 0xff, 0xfa, 0xff, 0x0d, 0x00,\n  0x1b, 0x00, 0x29, 0x00, 0x29, 0x00, 0x26, 0x00, 0x13, 0x00, 0x03, 0x00,\n  0x0c, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0xfd, 0xff, 0xff, 0xff, 0x02, 0x00,\n  0x0a, 0x00, 0x14, 0x00, 0x16, 0x00, 0x16, 0x00, 0x05, 0x00, 0x00, 0x00,\n  0xed, 0xff, 0xea, 0xff, 0xe9, 0xff, 0xeb, 0xff, 0xe9, 0xff, 0xee, 0xff,\n  0xf1, 0xff, 0xf8, 0xff, 0x04, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x13, 0x00,\n  0x1a, 0x00, 0x15, 0x00, 0x0e, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xe6, 0xff,\n  0xeb, 0xff, 0xf3, 0xff, 0xf5, 0xff, 0xf8, 0xff, 0xf6, 0xff, 0x01, 0x00,\n  0x01, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0xfe, 0xff,\n  0x00, 0x00, 0xf4, 0xff, 0xe6, 0xff, 0xdc, 0xff, 0xca, 0xff, 0xca, 0xff,\n  0xca, 0xff, 0xc7, 0xff, 0xc7, 0xff, 0xc8, 0xff, 0xcf, 0xff, 0xf1, 0xff,\n  0x15, 0x00, 0x34, 0x00, 0x4a, 0x00, 0x59, 0x00, 0x54, 0x00, 0x4b, 0x00,\n  0x31, 0x00, 0x22, 0x00, 0x0f, 0x00, 0x03, 0x00, 0x03, 0x00, 0x0f, 0x00,\n  0x19, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0xf7, 0xff, 0xe7, 0xff,\n  0xd1, 0xff, 0xc4, 0xff, 0xb9, 0xff, 0xa9, 0xff, 0xa3, 0xff, 0x9a, 0xff,\n  0x92, 0xff, 0x8c, 0xff, 0x91, 0xff, 0xad, 0xff, 0xd2, 0xff, 0xf4, 0xff,\n  0x15, 0x00, 0x27, 0x00, 0x3f, 0x00, 0x62, 0x00, 0x8b, 0x00, 0x97, 0x00,\n  0xa5, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xba, 0x00, 0xb4, 0x00, 0xb1, 0x00,\n  0x9e, 0x00, 0x91, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x41, 0x00, 0x1d, 0x00,\n  0xfd, 0xff, 0xd0, 0xff, 0xbd, 0xff, 0xa8, 0xff, 0x8d, 0xff, 0x78, 0xff,\n  0x6a, 0xff, 0x5a, 0xff, 0x4c, 0xff, 0x4c, 0xff, 0x3b, 0xff, 0x3e, 0xff,\n  0x2c, 0xff, 0x2e, 0xff, 0x3d, 0xff, 0x49, 0xff, 0x56, 0xff, 0x70, 0xff,\n  0x93, 0xff, 0xb1, 0xff, 0xcd, 0xff, 0xe5, 0xff, 0xf1, 0xff, 0x05, 0x00,\n  0x1b, 0x00, 0x2c, 0x00, 0x43, 0x00, 0x67, 0x00, 0x9b, 0x00, 0xc7, 0x00,\n  0xed, 0x00, 0x0e, 0x01, 0x32, 0x01, 0x55, 0x01, 0x64, 0x01, 0x5b, 0x01,\n  0x54, 0x01, 0x47, 0x01, 0x28, 0x01, 0xfd, 0x00, 0xd3, 0x00, 0xa2, 0x00,\n  0x58, 0x00, 0x18, 0x00, 0xd5, 0xff, 0xa8, 0xff, 0x6f, 0xff, 0x48, 0xff,\n  0x21, 0xff, 0x10, 0xff, 0xff, 0xfe, 0xf6, 0xfe, 0xf1, 0xfe, 0xf4, 0xfe,\n  0xf5, 0xfe, 0xf5, 0xfe, 0xf7, 0xfe, 0xfb, 0xfe, 0x03, 0xff, 0x16, 0xff,\n  0x36, 0xff, 0x5e, 0xff, 0x8a, 0xff, 0xd7, 0xff, 0x1b, 0x00, 0x6d, 0x00,\n  0xc1, 0x00, 0x02, 0x01, 0x49, 0x01, 0x89, 0x01, 0xbf, 0x01, 0xcb, 0x01,\n  0xbd, 0x01, 0x93, 0x01, 0x64, 0x01, 0x31, 0x01, 0xe5, 0x00, 0x98, 0x00,\n  0x4a, 0x00, 0x05, 0x00, 0xcf, 0xff, 0x9e, 0xff, 0x75, 0xff, 0x57, 0xff,\n  0x40, 0xff, 0x32, 0xff, 0x27, 0xff, 0x1d, 0xff, 0x1f, 0xff, 0x1e, 0xff,\n  0x29, 0xff, 0x3f, 0xff, 0x52, 0xff, 0x63, 0xff, 0x6d, 0xff, 0x72, 0xff,\n  0x78, 0xff, 0x7d, 0xff, 0x84, 0xff, 0x8b, 0xff, 0x9f, 0xff, 0xb2, 0xff,\n  0xcd, 0xff, 0xd5, 0xff, 0xe1, 0xff, 0xea, 0xff, 0xf8, 0xff, 0xf8, 0xff,\n  0x08, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x20, 0x00, 0x20, 0x00, 0x27, 0x00,\n  0x2f, 0x00, 0x2f, 0x00, 0x37, 0x00, 0x3e, 0x00, 0x4f, 0x00, 0x5b, 0x00,\n  0x70, 0x00, 0x87, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0x97, 0x00, 0x77, 0x00,\n  0x54, 0x00, 0x2f, 0x00, 0xff, 0xff, 0xd7, 0xff, 0xb2, 0xff, 0x94, 0xff,\n  0x7f, 0xff, 0x5f, 0xff, 0x52, 0xff, 0x39, 0xff, 0x2a, 0xff, 0x33, 0xff,\n  0x43, 0xff, 0x54, 0xff, 0x6c, 0xff, 0x8d, 0xff, 0xaa, 0xff, 0xc9, 0xff,\n  0xdf, 0xff, 0x09, 0x00, 0x1b, 0x00, 0x3a, 0x00, 0x43, 0x00, 0x57, 0x00,\n  0x6b, 0x00, 0x79, 0x00, 0x7f, 0x00, 0x94, 0x00, 0xa7, 0x00, 0xcd, 0x00,\n  0xe7, 0x00, 0xf9, 0x00, 0xf8, 0x00, 0xdf, 0x00, 0xce, 0x00, 0xbc, 0x00,\n  0xa3, 0x00, 0x93, 0x00, 0x7f, 0x00, 0x77, 0x00, 0x68, 0x00, 0x53, 0x00,\n  0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x02, 0x00, 0xea, 0xff, 0xd4, 0xff,\n  0xbc, 0xff, 0xab, 0xff, 0x8d, 0xff, 0x7b, 0xff, 0x5e, 0xff, 0x4d, 0xff,\n  0x44, 0xff, 0x42, 0xff, 0x48, 0xff, 0x53, 0xff, 0x5f, 0xff, 0x6c, 0xff,\n  0x78, 0xff, 0x8d, 0xff, 0xa7, 0xff, 0xc5, 0xff, 0xe0, 0xff, 0xfc, 0xff,\n  0x0f, 0x00, 0x2c, 0x00, 0x31, 0x00, 0x3e, 0x00, 0x2d, 0x00, 0x2a, 0x00,\n  0x0b, 0x00, 0xfd, 0xff, 0xe1, 0xff, 0xca, 0xff, 0xb6, 0xff, 0xa5, 0xff,\n  0x9e, 0xff, 0x98, 0xff, 0x98, 0xff, 0xa2, 0xff, 0xb5, 0xff, 0xbc, 0xff,\n  0xc4, 0xff, 0xc3, 0xff, 0xc4, 0xff, 0xc4, 0xff, 0xce, 0xff, 0xd1, 0xff,\n  0xd5, 0xff, 0xd0, 0xff, 0xe1, 0xff, 0xf3, 0xff, 0x17, 0x00, 0x1e, 0x00,\n  0x28, 0x00, 0x21, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x22, 0x00, 0x32, 0x00,\n  0x42, 0x00, 0x4f, 0x00, 0x58, 0x00, 0x54, 0x00, 0x4e, 0x00, 0x4f, 0x00,\n  0x53, 0x00, 0x63, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x5b, 0x00,\n  0x57, 0x00, 0x4d, 0x00, 0x4b, 0x00, 0x47, 0x00, 0x41, 0x00, 0x2f, 0x00,\n  0x10, 0x00, 0xf2, 0xff, 0xcf, 0xff, 0xad, 0xff, 0x91, 0xff, 0x77, 0xff,\n  0x6a, 0xff, 0x6c, 0xff, 0x6e, 0xff, 0x7c, 0xff, 0x83, 0xff, 0xa1, 0xff,\n  0xc6, 0xff, 0xdd, 0xff, 0xf9, 0xff, 0x0c, 0x00, 0x1e, 0x00, 0x2c, 0x00,\n  0x42, 0x00, 0x5a, 0x00, 0x5f, 0x00, 0x58, 0x00, 0x4c, 0x00, 0x44, 0x00,\n  0x3b, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x1a, 0x00, 0x13, 0x00, 0x14, 0x00,\n  0x1b, 0x00, 0x20, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x24, 0x00, 0x37, 0x00,\n  0x50, 0x00, 0x5d, 0x00, 0x6a, 0x00, 0x5f, 0x00, 0x54, 0x00, 0x4f, 0x00,\n  0x35, 0x00, 0x24, 0x00, 0x04, 0x00, 0xe7, 0xff, 0xd2, 0xff, 0xc5, 0xff,\n  0xc4, 0xff, 0xc5, 0xff, 0xd0, 0xff, 0xcb, 0xff, 0xc4, 0xff, 0xb1, 0xff,\n  0xb0, 0xff, 0xb5, 0xff, 0xb6, 0xff, 0xcc, 0xff, 0xce, 0xff, 0xe6, 0xff,\n  0xe9, 0xff, 0xed, 0xff, 0xf2, 0xff, 0xf6, 0xff, 0x00, 0x00, 0x08, 0x00,\n  0xf8, 0xff, 0xed, 0xff, 0xe0, 0xff, 0xc4, 0xff, 0xc0, 0xff, 0xae, 0xff,\n  0xb0, 0xff, 0xa6, 0xff, 0xa8, 0xff, 0xb5, 0xff, 0xbb, 0xff, 0xc5, 0xff,\n  0xc6, 0xff, 0xc9, 0xff, 0xc6, 0xff, 0xd4, 0xff, 0xe5, 0xff, 0x03, 0x00,\n  0x24, 0x00, 0x59, 0x00, 0x84, 0x00, 0x9e, 0x00, 0xa0, 0x00, 0x89, 0x00,\n  0x73, 0x00, 0x5a, 0x00, 0x42, 0x00, 0x2c, 0x00, 0x1d, 0x00, 0x1c, 0x00,\n  0x1f, 0x00, 0x1a, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x0f, 0x00, 0x0d, 0x00,\n  0x12, 0x00, 0x05, 0x00, 0xf9, 0xff, 0xf3, 0xff, 0xf3, 0xff, 0x00, 0x00,\n  0x08, 0x00, 0x16, 0x00, 0x19, 0x00, 0x10, 0x00, 0x02, 0x00, 0xf2, 0xff,\n  0xe9, 0xff, 0xea, 0xff, 0xef, 0xff, 0xfb, 0xff, 0xfc, 0xff, 0x06, 0x00,\n  0x01, 0x00, 0xf8, 0xff, 0xf5, 0xff, 0xf2, 0xff, 0xf7, 0xff, 0xe2, 0xff,\n  0xd9, 0xff, 0xc2, 0xff, 0xab, 0xff, 0x93, 0xff, 0x8b, 0xff, 0x89, 0xff,\n  0x8f, 0xff, 0x9f, 0xff, 0xb5, 0xff, 0xcc, 0xff, 0xe9, 0xff, 0xf7, 0xff,\n  0xf3, 0xff, 0xf6, 0xff, 0xee, 0xff, 0xef, 0xff, 0xed, 0xff, 0xf1, 0xff,\n  0x02, 0x00, 0x25, 0x00, 0x40, 0x00, 0x5e, 0x00, 0x74, 0x00, 0x7a, 0x00,\n  0x88, 0x00, 0x7a, 0x00, 0x73, 0x00, 0x64, 0x00, 0x56, 0x00, 0x39, 0x00,\n  0x1f, 0x00, 0x00, 0x00, 0xec, 0xff, 0xcc, 0xff, 0xc6, 0xff, 0xac, 0xff,\n  0x9a, 0xff, 0x91, 0xff, 0x73, 0xff, 0x60, 0xff, 0x57, 0xff, 0x4d, 0xff,\n  0x52, 0xff, 0x55, 0xff, 0x61, 0xff, 0x6d, 0xff, 0x7e, 0xff, 0x8f, 0xff,\n  0xa6, 0xff, 0xbe, 0xff, 0xda, 0xff, 0xff, 0xff, 0x24, 0x00, 0x4d, 0x00,\n  0x72, 0x00, 0x96, 0x00, 0xb8, 0x00, 0xe3, 0x00, 0xf6, 0x00, 0x04, 0x01,\n  0x02, 0x01, 0xfd, 0x00, 0x0f, 0x01, 0x16, 0x01, 0x26, 0x01, 0x1d, 0x01,\n  0x08, 0x01, 0xe1, 0x00, 0xb5, 0x00, 0x7f, 0x00, 0x46, 0x00, 0x19, 0x00,\n  0xf5, 0xff, 0xcd, 0xff, 0xa9, 0xff, 0x77, 0xff, 0x57, 0xff, 0x3c, 0xff,\n  0x2e, 0xff, 0x26, 0xff, 0x22, 0xff, 0x1d, 0xff, 0x1e, 0xff, 0x16, 0xff,\n  0x1f, 0xff, 0x22, 0xff, 0x43, 0xff, 0x5e, 0xff, 0x83, 0xff, 0x94, 0xff,\n  0xa7, 0xff, 0xa5, 0xff, 0xb0, 0xff, 0xc2, 0xff, 0xcc, 0xff, 0xed, 0xff,\n  0x06, 0x00, 0x29, 0x00, 0x3d, 0x00, 0x51, 0x00, 0x65, 0x00, 0x8c, 0x00,\n  0xb5, 0x00, 0xd6, 0x00, 0xf6, 0x00, 0x0d, 0x01, 0x22, 0x01, 0x15, 0x01,\n  0x08, 0x01, 0xd2, 0x00, 0xa4, 0x00, 0x77, 0x00, 0x4c, 0x00, 0x23, 0x00,\n  0xf6, 0xff, 0xc2, 0xff, 0xa1, 0xff, 0x7e, 0xff, 0x68, 0xff, 0x59, 0xff,\n  0x54, 0xff, 0x57, 0xff, 0x67, 0xff, 0x80, 0xff, 0x9d, 0xff, 0xc1, 0xff,\n  0xe2, 0xff, 0x06, 0x00, 0x25, 0x00, 0x33, 0x00, 0x44, 0x00, 0x57, 0x00,\n  0x67, 0x00, 0x69, 0x00, 0x6a, 0x00, 0x66, 0x00, 0x5c, 0x00, 0x44, 0x00,\n  0x1b, 0x00, 0xff, 0xff, 0xec, 0xff, 0xd7, 0xff, 0xc4, 0xff, 0xb8, 0xff,\n  0xbd, 0xff, 0xb1, 0xff, 0xb2, 0xff, 0xa4, 0xff, 0x9c, 0xff, 0x97, 0xff,\n  0x8b, 0xff, 0x7c, 0xff, 0x74, 0xff, 0x6e, 0xff, 0x76, 0xff, 0x89, 0xff,\n  0x96, 0xff, 0x92, 0xff, 0x94, 0xff, 0xa0, 0xff, 0xa4, 0xff, 0xba, 0xff,\n  0xc9, 0xff, 0xd7, 0xff, 0xe6, 0xff, 0xea, 0xff, 0xee, 0xff, 0xf1, 0xff,\n  0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x19, 0x00, 0x2b, 0x00,\n  0x3e, 0x00, 0x54, 0x00, 0x61, 0x00, 0x71, 0x00, 0x98, 0x00, 0xbd, 0x00,\n  0xd0, 0x00, 0xe5, 0x00, 0xea, 0x00, 0xe4, 0x00, 0xdb, 0x00, 0xc7, 0x00,\n  0xbe, 0x00, 0xaf, 0x00, 0xa6, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xaf, 0x00,\n  0x96, 0x00, 0x72, 0x00, 0x41, 0x00, 0x0c, 0x00, 0xcc, 0xff, 0x8c, 0xff,\n  0x58, 0xff, 0x32, 0xff, 0x09, 0xff, 0xf8, 0xfe, 0xe6, 0xfe, 0xdc, 0xfe,\n  0xcf, 0xfe, 0xd2, 0xfe, 0xd2, 0xfe, 0xea, 0xfe, 0xfd, 0xfe, 0x1c, 0xff,\n  0x35, 0xff, 0x5e, 0xff, 0x9a, 0xff, 0xd7, 0xff, 0x18, 0x00, 0x69, 0x00,\n  0xad, 0x00, 0xee, 0x00, 0x17, 0x01, 0x44, 0x01, 0x73, 0x01, 0x96, 0x01,\n  0xa8, 0x01, 0x8e, 0x01, 0x70, 0x01, 0x33, 0x01, 0x00, 0x01, 0xc6, 0x00,\n  0x89, 0x00, 0x4c, 0x00, 0x16, 0x00, 0xe4, 0xff, 0xcf, 0xff, 0xbf, 0xff,\n  0xb5, 0xff, 0xa5, 0xff, 0xa0, 0xff, 0x95, 0xff, 0x95, 0xff, 0x9c, 0xff,\n  0x8b, 0xff, 0x76, 0xff, 0x74, 0xff, 0x74, 0xff, 0x7d, 0xff, 0x7e, 0xff,\n  0x86, 0xff, 0x79, 0xff, 0x71, 0xff, 0x63, 0xff, 0x62, 0xff, 0x60, 0xff,\n  0x6e, 0xff, 0x83, 0xff, 0x83, 0xff, 0x8f, 0xff, 0x84, 0xff, 0x86, 0xff,\n  0x8c, 0xff, 0xa1, 0xff, 0xb3, 0xff, 0xcf, 0xff, 0xd8, 0xff, 0xd9, 0xff,\n  0xd7, 0xff, 0xe4, 0xff, 0xec, 0xff, 0x0d, 0x00, 0x0d, 0x00, 0x10, 0x00,\n  0x08, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x18, 0x00, 0x38, 0x00, 0x4b, 0x00,\n  0x63, 0x00, 0x63, 0x00, 0x5f, 0x00, 0x57, 0x00, 0x58, 0x00, 0x57, 0x00,\n  0x67, 0x00, 0x5f, 0x00, 0x5a, 0x00, 0x4a, 0x00, 0x54, 0x00, 0x54, 0x00,\n  0x59, 0x00, 0x5b, 0x00, 0x59, 0x00, 0x48, 0x00, 0x39, 0x00, 0x2f, 0x00,\n  0x22, 0x00, 0xff, 0xff, 0xed, 0xff, 0xdc, 0xff, 0xd9, 0xff, 0xda, 0xff,\n  0xd3, 0xff, 0xcf, 0xff, 0xc4, 0xff, 0xbc, 0xff, 0xb0, 0xff, 0xad, 0xff,\n  0xa7, 0xff, 0xa0, 0xff, 0x9f, 0xff, 0x9f, 0xff, 0x9c, 0xff, 0x92, 0xff,\n  0x95, 0xff, 0x83, 0xff, 0x7e, 0xff, 0x72, 0xff, 0x7a, 0xff, 0x81, 0xff,\n  0x98, 0xff, 0xb2, 0xff, 0xd7, 0xff, 0xec, 0xff, 0x0b, 0x00, 0x12, 0x00,\n  0x1d, 0x00, 0x1c, 0x00, 0x23, 0x00, 0x1f, 0x00, 0x31, 0x00, 0x47, 0x00,\n  0x5d, 0x00, 0x5c, 0x00, 0x5b, 0x00, 0x4d, 0x00, 0x44, 0x00, 0x2f, 0x00,\n  0x26, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x2f, 0x00, 0x49, 0x00, 0x53, 0x00,\n  0x6c, 0x00, 0x7d, 0x00, 0x8e, 0x00, 0x97, 0x00, 0x91, 0x00, 0x81, 0x00,\n  0x61, 0x00, 0x4b, 0x00, 0x2f, 0x00, 0x1e, 0x00, 0xff, 0xff, 0xe4, 0xff,\n  0xcd, 0xff, 0xae, 0xff, 0xa4, 0xff, 0x8d, 0xff, 0x89, 0xff, 0x82, 0xff,\n  0x87, 0xff, 0x8b, 0xff, 0x9e, 0xff, 0xab, 0xff, 0xc1, 0xff, 0xd2, 0xff,\n  0xdf, 0xff, 0xf1, 0xff, 0xf9, 0xff, 0xfd, 0xff, 0x01, 0x00, 0x04, 0x00,\n  0x03, 0x00, 0x04, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x12, 0x00,\n  0x07, 0x00, 0x13, 0x00, 0x1b, 0x00, 0x20, 0x00, 0x21, 0x00, 0x0f, 0x00,\n  0x12, 0x00, 0x0e, 0x00, 0x0b, 0x00, 0x13, 0x00, 0x2a, 0x00, 0x48, 0x00,\n  0x5d, 0x00, 0x67, 0x00, 0x6a, 0x00, 0x73, 0x00, 0x70, 0x00, 0x5e, 0x00,\n  0x49, 0x00, 0x22, 0x00, 0x03, 0x00, 0xe4, 0xff, 0xcf, 0xff, 0xb8, 0xff,\n  0xa2, 0xff, 0x89, 0xff, 0x7d, 0xff, 0x6d, 0xff, 0x68, 0xff, 0x56, 0xff,\n  0x53, 0xff, 0x44, 0xff, 0x3b, 0xff, 0x48, 0xff, 0x56, 0xff, 0x5f, 0xff,\n  0x70, 0xff, 0x7a, 0xff, 0x7f, 0xff, 0x9a, 0xff, 0xb6, 0xff, 0xcf, 0xff,\n  0xec, 0xff, 0x1b, 0x00, 0x50, 0x00, 0x90, 0x00, 0xbe, 0x00, 0xec, 0x00,\n  0x0a, 0x01, 0x1f, 0x01, 0x30, 0x01, 0x2f, 0x01, 0x29, 0x01, 0x13, 0x01,\n  0xfa, 0x00, 0xc4, 0x00, 0x8f, 0x00, 0x52, 0x00, 0x1f, 0x00, 0xf9, 0xff,\n  0xd9, 0xff, 0xb1, 0xff, 0x96, 0xff, 0x6b, 0xff, 0x5d, 0xff, 0x4f, 0xff,\n  0x45, 0xff, 0x3d, 0xff, 0x2d, 0xff, 0x27, 0xff, 0x2c, 0xff, 0x41, 0xff,\n  0x56, 0xff, 0x76, 0xff, 0x8d, 0xff, 0xad, 0xff, 0xc7, 0xff, 0xe1, 0xff,\n  0x07, 0x00, 0x1d, 0x00, 0x3e, 0x00, 0x59, 0x00, 0x80, 0x00, 0x9f, 0x00,\n  0xbd, 0x00, 0xc2, 0x00, 0xb6, 0x00, 0x93, 0x00, 0x74, 0x00, 0x58, 0x00,\n  0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x14, 0x00, 0x0f, 0x00,\n  0xec, 0xff, 0xea, 0xff, 0xe5, 0xff, 0xf2, 0xff, 0xf1, 0xff, 0xe9, 0xff,\n  0xed, 0xff, 0xf4, 0xff, 0x04, 0x00, 0xfa, 0xff, 0xf7, 0xff, 0xfd, 0xff,\n  0x06, 0x00, 0x05, 0x00, 0xf8, 0xff, 0xed, 0xff, 0xe1, 0xff, 0xe3, 0xff,\n  0xdd, 0xff, 0xe8, 0xff, 0xe4, 0xff, 0xf3, 0xff, 0xf0, 0xff, 0xfd, 0xff,\n  0x0f, 0x00, 0x1f, 0x00, 0x21, 0x00, 0x25, 0x00, 0x26, 0x00, 0x23, 0x00,\n  0x0f, 0x00, 0x10, 0x00, 0x01, 0x00, 0xf4, 0xff, 0xdb, 0xff, 0xd8, 0xff,\n  0xbb, 0xff, 0xa8, 0xff, 0x93, 0xff, 0x7f, 0xff, 0x82, 0xff, 0x89, 0xff,\n  0x92, 0xff, 0x82, 0xff, 0x7f, 0xff, 0x81, 0xff, 0x82, 0xff, 0x85, 0xff,\n  0x8d, 0xff, 0x9a, 0xff, 0xb2, 0xff, 0xce, 0xff, 0xe6, 0xff, 0x03, 0x00,\n  0x14, 0x00, 0x26, 0x00, 0x30, 0x00, 0x47, 0x00, 0x49, 0x00, 0x48, 0x00,\n  0x47, 0x00, 0x4d, 0x00, 0x56, 0x00, 0x5a, 0x00, 0x6a, 0x00, 0x69, 0x00,\n  0x70, 0x00, 0x73, 0x00, 0x77, 0x00, 0x76, 0x00, 0x79, 0x00, 0x75, 0x00,\n  0x6c, 0x00, 0x62, 0x00, 0x5b, 0x00, 0x42, 0x00, 0x2e, 0x00, 0x16, 0x00,\n  0x08, 0x00, 0xfe, 0xff, 0xf4, 0xff, 0xdd, 0xff, 0xcf, 0xff, 0xbf, 0xff,\n  0xbd, 0xff, 0xbc, 0xff, 0xb4, 0xff, 0xb2, 0xff, 0xb0, 0xff, 0xad, 0xff,\n  0xab, 0xff, 0xa8, 0xff, 0xb8, 0xff, 0xbc, 0xff, 0xb7, 0xff, 0xae, 0xff,\n  0x9d, 0xff, 0x98, 0xff, 0x89, 0xff, 0x8c, 0xff, 0x8b, 0xff, 0x97, 0xff,\n  0xac, 0xff, 0xbc, 0xff, 0xd0, 0xff, 0xe2, 0xff, 0xf6, 0xff, 0x10, 0x00,\n  0x27, 0x00, 0x44, 0x00, 0x5d, 0x00, 0x6d, 0x00, 0x87, 0x00, 0xaa, 0x00,\n  0xd1, 0x00, 0xe7, 0x00, 0xf1, 0x00, 0xe9, 0x00, 0xe1, 0x00, 0xce, 0x00,\n  0xac, 0x00, 0x92, 0x00, 0x5a, 0x00, 0x36, 0x00, 0x04, 0x00, 0xe2, 0xff,\n  0xb9, 0xff, 0x9a, 0xff, 0x87, 0xff, 0x8c, 0xff, 0x97, 0xff, 0x95, 0xff,\n  0xa8, 0xff, 0xab, 0xff, 0xaf, 0xff, 0xab, 0xff, 0xaa, 0xff, 0xab, 0xff,\n  0xa4, 0xff, 0xa9, 0xff, 0xa1, 0xff, 0xb4, 0xff, 0xb5, 0xff, 0xb7, 0xff,\n  0xb7, 0xff, 0xc3, 0xff, 0xd1, 0xff, 0xd5, 0xff, 0xe2, 0xff, 0xe5, 0xff,\n  0xf2, 0xff, 0xec, 0xff, 0x0b, 0x00, 0x1b, 0x00, 0x3c, 0x00, 0x4a, 0x00,\n  0x5f, 0x00, 0x57, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x5d, 0x00, 0x59, 0x00,\n  0x6e, 0x00, 0x78, 0x00, 0x88, 0x00, 0x93, 0x00, 0x8e, 0x00, 0x78, 0x00,\n  0x66, 0x00, 0x48, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xda, 0xff, 0xb6, 0xff,\n  0xa2, 0xff, 0x8e, 0xff, 0x7c, 0xff, 0x76, 0xff, 0x73, 0xff, 0x87, 0xff,\n  0x7d, 0xff, 0x92, 0xff, 0x9d, 0xff, 0xb6, 0xff, 0xae, 0xff, 0xb8, 0xff,\n  0xac, 0xff, 0xae, 0xff, 0x9e, 0xff, 0x92, 0xff, 0x93, 0xff, 0x95, 0xff,\n  0xa9, 0xff, 0xae, 0xff, 0xc2, 0xff, 0xc6, 0xff, 0xc4, 0xff, 0xd0, 0xff,\n  0xe7, 0xff, 0x1b, 0x00, 0x61, 0x00, 0xab, 0x00, 0xc9, 0x00, 0xe8, 0x00,\n  0xdc, 0x00, 0xce, 0x00, 0xb3, 0x00, 0x94, 0x00, 0x84, 0x00, 0x63, 0x00,\n  0x4c, 0x00, 0x39, 0x00, 0x35, 0x00, 0x21, 0x00, 0x1a, 0x00, 0x00, 0x00,\n  0x04, 0x00, 0x0b, 0x00, 0x2a, 0x00, 0x40, 0x00, 0x4a, 0x00, 0x4d, 0x00,\n  0x48, 0x00, 0x41, 0x00, 0x43, 0x00, 0x37, 0x00, 0x22, 0x00, 0x0d, 0x00,\n  0x03, 0x00, 0xec, 0xff, 0xe3, 0xff, 0xd1, 0xff, 0xc5, 0xff, 0xb7, 0xff,\n  0xa0, 0xff, 0x85, 0xff, 0x6d, 0xff, 0x51, 0xff, 0x4f, 0xff, 0x47, 0xff,\n  0x57, 0xff, 0x6e, 0xff, 0x7e, 0xff, 0x90, 0xff, 0x9e, 0xff, 0xb2, 0xff,\n  0xbf, 0xff, 0xc0, 0xff, 0xca, 0xff, 0xc4, 0xff, 0xce, 0xff, 0xdc, 0xff,\n  0xec, 0xff, 0xf8, 0xff, 0xef, 0xff, 0xee, 0xff, 0xec, 0xff, 0xee, 0xff,\n  0x07, 0x00, 0x0a, 0x00, 0x1c, 0x00, 0x21, 0x00, 0x1f, 0x00, 0x1f, 0x00,\n  0x23, 0x00, 0x21, 0x00, 0x30, 0x00, 0x37, 0x00, 0x3b, 0x00, 0x31, 0x00,\n  0x37, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x38, 0x00, 0x31, 0x00, 0x3d, 0x00,\n  0x45, 0x00, 0x50, 0x00, 0x65, 0x00, 0x77, 0x00, 0x8c, 0x00, 0x90, 0x00,\n  0x95, 0x00, 0x89, 0x00, 0x79, 0x00, 0x5e, 0x00, 0x3b, 0x00, 0x23, 0x00,\n  0x04, 0x00, 0xec, 0xff, 0xcf, 0xff, 0xbc, 0xff, 0xb1, 0xff, 0xb2, 0xff,\n  0xb0, 0xff, 0xb2, 0xff, 0xa2, 0xff, 0x9a, 0xff, 0x96, 0xff, 0x91, 0xff,\n  0x8d, 0xff, 0x8b, 0xff, 0x79, 0xff, 0x79, 0xff, 0x71, 0xff, 0x77, 0xff,\n  0x7b, 0xff, 0x84, 0xff, 0x88, 0xff, 0x83, 0xff, 0x8d, 0xff, 0x9e, 0xff,\n  0xb2, 0xff, 0xd8, 0xff, 0x0b, 0x00, 0x34, 0x00, 0x60, 0x00, 0x74, 0x00,\n  0x8d, 0x00, 0x9c, 0x00, 0xac, 0x00, 0xad, 0x00, 0xa7, 0x00, 0xa4, 0x00,\n  0x91, 0x00, 0x88, 0x00, 0x70, 0x00, 0x5f, 0x00, 0x43, 0x00, 0x2d, 0x00,\n  0x03, 0x00, 0xe5, 0xff, 0xbd, 0xff, 0xac, 0xff, 0x95, 0xff, 0x86, 0xff,\n  0x73, 0xff, 0x69, 0xff, 0x66, 0xff, 0x70, 0xff, 0x87, 0xff, 0x9b, 0xff,\n  0xbb, 0xff, 0xeb, 0xff, 0x15, 0x00, 0x45, 0x00, 0x7a, 0x00, 0xa5, 0x00,\n  0xc7, 0x00, 0xdb, 0x00, 0xdd, 0x00, 0xd3, 0x00, 0xc0, 0x00, 0xa3, 0x00,\n  0x92, 0x00, 0x78, 0x00, 0x63, 0x00, 0x4f, 0x00, 0x33, 0x00, 0x21, 0x00,\n  0x1a, 0x00, 0x19, 0x00, 0x0c, 0x00, 0xfc, 0xff, 0xf4, 0xff, 0xdf, 0xff,\n  0xd9, 0xff, 0xd2, 0xff, 0xc6, 0xff, 0xa8, 0xff, 0x96, 0xff, 0x80, 0xff,\n  0x6f, 0xff, 0x58, 0xff, 0x4a, 0xff, 0x3f, 0xff, 0x3e, 0xff, 0x3a, 0xff,\n  0x3b, 0xff, 0x4a, 0xff, 0x4e, 0xff, 0x59, 0xff, 0x62, 0xff, 0x6e, 0xff,\n  0x7d, 0xff, 0x9a, 0xff, 0xb7, 0xff, 0xd9, 0xff, 0xdd, 0xff, 0xf2, 0xff,\n  0xf1, 0xff, 0x04, 0x00, 0x19, 0x00, 0x32, 0x00, 0x50, 0x00, 0x67, 0x00,\n  0x7b, 0x00, 0x98, 0x00, 0xb7, 0x00, 0xdc, 0x00, 0xf1, 0x00, 0xfd, 0x00,\n  0x0b, 0x01, 0x0c, 0x01, 0xfe, 0x00, 0xd9, 0x00, 0xb2, 0x00, 0x87, 0x00,\n  0x64, 0x00, 0x4a, 0x00, 0x31, 0x00, 0x22, 0x00, 0x04, 0x00, 0xed, 0xff,\n  0xcd, 0xff, 0xaf, 0xff, 0xa0, 0xff, 0x9d, 0xff, 0x9a, 0xff, 0x99, 0xff,\n  0x8d, 0xff, 0x88, 0xff, 0x7e, 0xff, 0x85, 0xff, 0x83, 0xff, 0x93, 0xff,\n  0x92, 0xff, 0x95, 0xff, 0x9c, 0xff, 0xae, 0xff, 0xc9, 0xff, 0xd9, 0xff,\n  0xf9, 0xff, 0x0d, 0x00, 0x31, 0x00, 0x35, 0x00, 0x43, 0x00, 0x45, 0x00,\n  0x40, 0x00, 0x2d, 0x00, 0x15, 0x00, 0xf2, 0xff, 0xd5, 0xff, 0xba, 0xff,\n  0xa6, 0xff, 0x9a, 0xff, 0x96, 0xff, 0x94, 0xff, 0x90, 0xff, 0x92, 0xff,\n  0x99, 0xff, 0x94, 0xff, 0xa8, 0xff, 0xb3, 0xff, 0xc6, 0xff, 0xdd, 0xff,\n  0xfb, 0xff, 0x28, 0x00, 0x54, 0x00, 0x81, 0x00, 0x90, 0x00, 0x8d, 0x00,\n  0x93, 0x00, 0x8d, 0x00, 0x95, 0x00, 0x8f, 0x00, 0x80, 0x00, 0x7a, 0x00,\n  0x77, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x5b, 0x00, 0x4d, 0x00, 0x3e, 0x00,\n  0x30, 0x00, 0x18, 0x00, 0x09, 0x00, 0xf5, 0xff, 0xd5, 0xff, 0xc2, 0xff,\n  0xa7, 0xff, 0x9f, 0xff, 0x88, 0xff, 0x7d, 0xff, 0x68, 0xff, 0x5e, 0xff,\n  0x55, 0xff, 0x51, 0xff, 0x57, 0xff, 0x5c, 0xff, 0x5f, 0xff, 0x67, 0xff,\n  0x68, 0xff, 0x73, 0xff, 0x80, 0xff, 0x91, 0xff, 0xa4, 0xff, 0xc9, 0xff,\n  0xec, 0xff, 0x1f, 0x00, 0x52, 0x00, 0x6b, 0x00, 0x7e, 0x00, 0x91, 0x00,\n  0x9f, 0x00, 0xa3, 0x00, 0x97, 0x00, 0x84, 0x00, 0x76, 0x00, 0x66, 0x00,\n  0x5a, 0x00, 0x47, 0x00, 0x2f, 0x00, 0x12, 0x00, 0x01, 0x00, 0x03, 0x00,\n  0x04, 0x00, 0x04, 0x00, 0x03, 0x00, 0x02, 0x00, 0xfa, 0xff, 0xf2, 0xff,\n  0xe2, 0xff, 0xe2, 0xff, 0xd9, 0xff, 0xec, 0xff, 0xe1, 0xff, 0xf7, 0xff,\n  0x06, 0x00, 0x1c, 0x00, 0x22, 0x00, 0x1f, 0x00, 0x15, 0x00, 0x02, 0x00,\n  0xf1, 0xff, 0xd7, 0xff, 0xbf, 0xff, 0xba, 0xff, 0xb6, 0xff, 0xbb, 0xff,\n  0xc2, 0xff, 0xcb, 0xff, 0xdc, 0xff, 0xe3, 0xff, 0xee, 0xff, 0xe9, 0xff,\n  0xf1, 0xff, 0xf8, 0xff, 0xfb, 0xff, 0x07, 0x00, 0x12, 0x00, 0x2a, 0x00,\n  0x42, 0x00, 0x55, 0x00, 0x79, 0x00, 0x7c, 0x00, 0x8f, 0x00, 0x89, 0x00,\n  0x8e, 0x00, 0x81, 0x00, 0x76, 0x00, 0x75, 0x00, 0x61, 0x00, 0x5a, 0x00,\n  0x4c, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x1f, 0x00, 0x07, 0x00, 0xfd, 0xff,\n  0xf2, 0xff, 0xdb, 0xff, 0xcf, 0xff, 0xa7, 0xff, 0xa0, 0xff, 0x89, 0xff,\n  0x7b, 0xff, 0x6d, 0xff, 0x69, 0xff, 0x6b, 0xff, 0x65, 0xff, 0x70, 0xff,\n  0x78, 0xff, 0x96, 0xff, 0xa5, 0xff, 0xb5, 0xff, 0xbd, 0xff, 0xbc, 0xff,\n  0xbf, 0xff, 0xb5, 0xff, 0xc2, 0xff, 0xca, 0xff, 0xe3, 0xff, 0xfd, 0xff,\n  0x0c, 0x00, 0x22, 0x00, 0x29, 0x00, 0x38, 0x00, 0x32, 0x00, 0x28, 0x00,\n  0x26, 0x00, 0x1f, 0x00, 0x1b, 0x00, 0x04, 0x00, 0x01, 0x00, 0xfc, 0xff,\n  0xfa, 0xff, 0xf8, 0xff, 0x05, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x06, 0x00,\n  0xff, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0x09, 0x00, 0x0f, 0x00, 0x15, 0x00,\n  0x1b, 0x00, 0x16, 0x00, 0x1b, 0x00, 0x1a, 0x00, 0x17, 0x00, 0x13, 0x00,\n  0x11, 0x00, 0x15, 0x00, 0x25, 0x00, 0x23, 0x00, 0x1d, 0x00, 0x11, 0x00,\n  0x08, 0x00, 0x02, 0x00, 0xea, 0xff, 0xe1, 0xff, 0xc7, 0xff, 0xc3, 0xff,\n  0xb5, 0xff, 0xb8, 0xff, 0xba, 0xff, 0xc1, 0xff, 0xc6, 0xff, 0xd0, 0xff,\n  0xd5, 0xff, 0xe8, 0xff, 0xfa, 0xff, 0x10, 0x00, 0x0d, 0x00, 0x19, 0x00,\n  0x21, 0x00, 0x28, 0x00, 0x37, 0x00, 0x50, 0x00, 0x71, 0x00, 0x81, 0x00,\n  0x90, 0x00, 0x93, 0x00, 0x9b, 0x00, 0x96, 0x00, 0x8e, 0x00, 0x7b, 0x00,\n  0x6c, 0x00, 0x70, 0x00, 0x69, 0x00, 0x63, 0x00, 0x59, 0x00, 0x42, 0x00,\n  0x20, 0x00, 0x05, 0x00, 0xe3, 0xff, 0xd2, 0xff, 0xc2, 0xff, 0xbb, 0xff,\n  0xb0, 0xff, 0xa1, 0xff, 0x93, 0xff, 0x89, 0xff, 0x7e, 0xff, 0x76, 0xff,\n  0x72, 0xff, 0x75, 0xff, 0x71, 0xff, 0x6c, 0xff, 0x6d, 0xff, 0x70, 0xff,\n  0x82, 0xff, 0x95, 0xff, 0xa3, 0xff, 0xac, 0xff, 0xc2, 0xff, 0xd8, 0xff,\n  0xef, 0xff, 0x08, 0x00, 0x1a, 0x00, 0x2b, 0x00, 0x40, 0x00, 0x4c, 0x00,\n  0x5a, 0x00, 0x57, 0x00, 0x62, 0x00, 0x62, 0x00, 0x64, 0x00, 0x4c, 0x00,\n  0x35, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfb, 0xff, 0xe6, 0xff, 0xe4, 0xff,\n  0xd3, 0xff, 0xcc, 0xff, 0xcb, 0xff, 0xd7, 0xff, 0xda, 0xff, 0xe6, 0xff,\n  0xeb, 0xff, 0xf4, 0xff, 0xfa, 0xff, 0x11, 0x00, 0x19, 0x00, 0x1f, 0x00,\n  0x23, 0x00, 0x22, 0x00, 0x1f, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x15, 0x00,\n  0x12, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x03, 0x00, 0xf0, 0xff,\n  0xe8, 0xff, 0xea, 0xff, 0xec, 0xff, 0xe5, 0xff, 0xf1, 0xff, 0xe4, 0xff,\n  0xe2, 0xff, 0xd6, 0xff, 0xd4, 0xff, 0xca, 0xff, 0xcc, 0xff, 0xce, 0xff,\n  0xd7, 0xff, 0xd2, 0xff, 0xd0, 0xff, 0xba, 0xff, 0xb3, 0xff, 0xa6, 0xff,\n  0xa1, 0xff, 0x9e, 0xff, 0xa0, 0xff, 0xac, 0xff, 0xc2, 0xff, 0xd5, 0xff,\n  0xf5, 0xff, 0x15, 0x00, 0x3f, 0x00, 0x62, 0x00, 0x77, 0x00, 0x86, 0x00,\n  0x96, 0x00, 0xa5, 0x00, 0xab, 0x00, 0xb9, 0x00, 0xbc, 0x00, 0xc5, 0x00,\n  0xd0, 0x00, 0xd8, 0x00, 0xda, 0x00, 0xc0, 0x00, 0xa6, 0x00, 0x7f, 0x00,\n  0x5c, 0x00, 0x41, 0x00, 0x20, 0x00, 0x07, 0x00, 0xec, 0xff, 0xd0, 0xff,\n  0xbc, 0xff, 0xa4, 0xff, 0x98, 0xff, 0x8c, 0xff, 0x8e, 0xff, 0x8a, 0xff,\n  0x81, 0xff, 0x7c, 0xff, 0x7b, 0xff, 0x7a, 0xff, 0x7c, 0xff, 0x79, 0xff,\n  0x83, 0xff, 0x88, 0xff, 0x93, 0xff, 0xa1, 0xff, 0xab, 0xff, 0xb3, 0xff,\n  0xbe, 0xff, 0xcb, 0xff, 0xcf, 0xff, 0xca, 0xff, 0xc8, 0xff, 0xb4, 0xff,\n  0xb5, 0xff, 0xb4, 0xff, 0xc4, 0xff, 0xdf, 0xff, 0xef, 0xff, 0x12, 0x00,\n  0x2f, 0x00, 0x64, 0x00, 0x7f, 0x00, 0xab, 0x00, 0xc0, 0x00, 0xd9, 0x00,\n  0xe6, 0x00, 0xde, 0x00, 0xc8, 0x00, 0xa9, 0x00, 0x8a, 0x00, 0x73, 0x00,\n  0x4d, 0x00, 0x2b, 0x00, 0x11, 0x00, 0xf4, 0xff, 0xdd, 0xff, 0xb9, 0xff,\n  0xab, 0xff, 0x98, 0xff, 0x90, 0xff, 0x82, 0xff, 0x79, 0xff, 0x72, 0xff,\n  0x7f, 0xff, 0x90, 0xff, 0x99, 0xff, 0xa9, 0xff, 0xb3, 0xff, 0xb1, 0xff,\n  0xb4, 0xff, 0xa8, 0xff, 0xaa, 0xff, 0xa3, 0xff, 0xb5, 0xff, 0xd2, 0xff,\n  0xeb, 0xff, 0x05, 0x00, 0x22, 0x00, 0x30, 0x00, 0x43, 0x00, 0x5d, 0x00,\n  0x74, 0x00, 0x96, 0x00, 0xb5, 0x00, 0xd1, 0x00, 0xe1, 0x00, 0xea, 0x00,\n  0xdd, 0x00, 0xd5, 0x00, 0xc5, 0x00, 0xbc, 0x00, 0xac, 0x00, 0x82, 0x00,\n  0x5d, 0x00, 0x2e, 0x00, 0x03, 0x00, 0xdc, 0xff, 0xbb, 0xff, 0xa3, 0xff,\n  0x87, 0xff, 0x6e, 0xff, 0x53, 0xff, 0x40, 0xff, 0x33, 0xff, 0x2f, 0xff,\n  0x2e, 0xff, 0x35, 0xff, 0x33, 0xff, 0x2d, 0xff, 0x3c, 0xff, 0x45, 0xff,\n  0x68, 0xff, 0x87, 0xff, 0x99, 0xff, 0xb4, 0xff, 0xbc, 0xff, 0xda, 0xff,\n  0xea, 0xff, 0x11, 0x00, 0x3d, 0x00, 0x6e, 0x00, 0x8c, 0x00, 0x9c, 0x00,\n  0xa8, 0x00, 0xac, 0x00, 0xa8, 0x00, 0xa8, 0x00, 0xb6, 0x00, 0xc5, 0x00,\n  0xce, 0x00, 0xd1, 0x00, 0xc6, 0x00, 0xa0, 0x00, 0x71, 0x00, 0x39, 0x00,\n  0x0f, 0x00, 0xe2, 0xff, 0xbc, 0xff, 0x9c, 0xff, 0x7d, 0xff, 0x6c, 0xff,\n  0x5b, 0xff, 0x53, 0xff, 0x57, 0xff, 0x57, 0xff, 0x6a, 0xff, 0x7d, 0xff,\n  0x85, 0xff, 0xa0, 0xff, 0xae, 0xff, 0xcb, 0xff, 0xdb, 0xff, 0xf3, 0xff,\n  0x08, 0x00, 0x2b, 0x00, 0x51, 0x00, 0x61, 0x00, 0x6a, 0x00, 0x61, 0x00,\n  0x54, 0x00, 0x3b, 0x00, 0x25, 0x00, 0x15, 0x00, 0x07, 0x00, 0xea, 0xff,\n  0xd7, 0xff, 0xb4, 0xff, 0xa1, 0xff, 0x8a, 0xff, 0x7d, 0xff, 0x77, 0xff,\n  0x74, 0xff, 0x72, 0xff, 0x73, 0xff, 0x82, 0xff, 0x96, 0xff, 0xab, 0xff,\n  0xbc, 0xff, 0xdb, 0xff, 0xfe, 0xff, 0x36, 0x00, 0x60, 0x00, 0x8d, 0x00,\n  0x96, 0x00, 0x97, 0x00, 0x7f, 0x00, 0x6a, 0x00, 0x4e, 0x00, 0x2f, 0x00,\n  0x22, 0x00, 0x0a, 0x00, 0x05, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x25, 0x00,\n  0x39, 0x00, 0x54, 0x00, 0x51, 0x00, 0x52, 0x00, 0x52, 0x00, 0x4d, 0x00,\n  0x43, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x31, 0x00, 0x27, 0x00, 0x0b, 0x00,\n  0x00, 0x00, 0xe9, 0xff, 0xd5, 0xff, 0xd3, 0xff, 0xce, 0xff, 0xc1, 0xff,\n  0xc6, 0xff, 0xc0, 0xff, 0xc3, 0xff, 0xd0, 0xff, 0xdd, 0xff, 0xed, 0xff,\n  0xf0, 0xff, 0xf4, 0xff, 0xf9, 0xff, 0xf8, 0xff, 0x09, 0x00, 0x27, 0x00,\n  0x2e, 0x00, 0x3b, 0x00, 0x37, 0x00, 0x2e, 0x00, 0x21, 0x00, 0x0e, 0x00,\n  0x04, 0x00, 0xfe, 0xff, 0xf3, 0xff, 0xe1, 0xff, 0xd9, 0xff, 0xb9, 0xff,\n  0xb7, 0xff, 0x93, 0xff, 0x8e, 0xff, 0x85, 0xff, 0x7d, 0xff, 0x87, 0xff,\n  0x7f, 0xff, 0x84, 0xff, 0x88, 0xff, 0x8f, 0xff, 0x99, 0xff, 0x9c, 0xff,\n  0x98, 0xff, 0x91, 0xff, 0x8c, 0xff, 0x9d, 0xff, 0xa6, 0xff, 0xc8, 0xff,\n  0xe2, 0xff, 0x05, 0x00, 0x0b, 0x00, 0x18, 0x00, 0x23, 0x00, 0x3b, 0x00,\n  0x57, 0x00, 0x7d, 0x00, 0x9e, 0x00, 0xbc, 0x00, 0xc9, 0x00, 0xcb, 0x00,\n  0xc8, 0x00, 0xcb, 0x00, 0xc1, 0x00, 0xc4, 0x00, 0xc1, 0x00, 0xac, 0x00,\n  0x98, 0x00, 0x7d, 0x00, 0x5f, 0x00, 0x4b, 0x00, 0x4a, 0x00, 0x31, 0x00,\n  0x1d, 0x00, 0x16, 0x00, 0x06, 0x00, 0x00, 0x00, 0xe3, 0xff, 0xd7, 0xff,\n  0xc5, 0xff, 0xb6, 0xff, 0xa2, 0xff, 0x84, 0xff, 0x70, 0xff, 0x60, 0xff,\n  0x54, 0xff, 0x51, 0xff, 0x58, 0xff, 0x5d, 0xff, 0x6b, 0xff, 0x7d, 0xff,\n  0x8a, 0xff, 0x9d, 0xff, 0xa5, 0xff, 0xb6, 0xff, 0xcb, 0xff, 0xda, 0xff,\n  0xfa, 0xff, 0x18, 0x00, 0x32, 0x00, 0x45, 0x00, 0x50, 0x00, 0x5d, 0x00,\n  0x61, 0x00, 0x79, 0x00, 0x83, 0x00, 0x92, 0x00, 0x94, 0x00, 0x9a, 0x00,\n  0x88, 0x00, 0x80, 0x00, 0x74, 0x00, 0x75, 0x00, 0x73, 0x00, 0x5b, 0x00,\n  0x31, 0x00, 0x0b, 0x00, 0xeb, 0xff, 0xcc, 0xff, 0xbc, 0xff, 0xa9, 0xff,\n  0x9f, 0xff, 0x89, 0xff, 0x86, 0xff, 0x84, 0xff, 0x7f, 0xff, 0x7d, 0xff,\n  0x7f, 0xff, 0x7f, 0xff, 0x89, 0xff, 0x8b, 0xff, 0x99, 0xff, 0xa7, 0xff,\n  0xba, 0xff, 0xd8, 0xff, 0xea, 0xff, 0x02, 0x00, 0x0b, 0x00, 0x12, 0x00,\n  0x16, 0x00, 0x1c, 0x00, 0x22, 0x00, 0x14, 0x00, 0x0b, 0x00, 0xff, 0xff,\n  0xfc, 0xff, 0xf3, 0xff, 0xef, 0xff, 0xf0, 0xff, 0xfe, 0xff, 0x26, 0x00,\n  0x4b, 0x00, 0x6c, 0x00, 0x89, 0x00, 0x97, 0x00, 0x9c, 0x00, 0x96, 0x00,\n  0x85, 0x00, 0x6f, 0x00, 0x52, 0x00, 0x36, 0x00, 0x14, 0x00, 0xea, 0xff,\n  0xbe, 0xff, 0x9f, 0xff, 0x7b, 0xff, 0x6d, 0xff, 0x5c, 0xff, 0x62, 0xff,\n  0x71, 0xff, 0x86, 0xff, 0x9d, 0xff, 0xcc, 0xff, 0xe1, 0xff, 0xfa, 0xff,\n  0x15, 0x00, 0x1c, 0x00, 0x28, 0x00, 0x18, 0x00, 0x23, 0x00, 0x29, 0x00,\n  0x2e, 0x00, 0x46, 0x00, 0x53, 0x00, 0x55, 0x00, 0x49, 0x00, 0x43, 0x00,\n  0x3f, 0x00, 0x40, 0x00, 0x48, 0x00, 0x45, 0x00, 0x37, 0x00, 0x24, 0x00,\n  0x0e, 0x00, 0xf8, 0xff, 0xe2, 0xff, 0xc3, 0xff, 0xa8, 0xff, 0x91, 0xff,\n  0x84, 0xff, 0x75, 0xff, 0x67, 0xff, 0x62, 0xff, 0x54, 0xff, 0x4e, 0xff,\n  0x50, 0xff, 0x60, 0xff, 0x80, 0xff, 0x93, 0xff, 0xa6, 0xff, 0xb6, 0xff,\n  0xd0, 0xff, 0xf4, 0xff, 0x1b, 0x00, 0x2c, 0x00, 0x40, 0x00, 0x45, 0x00,\n  0x56, 0x00, 0x5c, 0x00, 0x70, 0x00, 0x75, 0x00, 0x7b, 0x00, 0x84, 0x00,\n  0x7d, 0x00, 0x6e, 0x00, 0x5a, 0x00, 0x41, 0x00, 0x2a, 0x00, 0x1c, 0x00,\n  0x1a, 0x00, 0x25, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17, 0x00, 0x16, 0x00,\n  0x1a, 0x00, 0x24, 0x00, 0x3b, 0x00, 0x4e, 0x00, 0x59, 0x00, 0x62, 0x00,\n  0x56, 0x00, 0x47, 0x00, 0x2d, 0x00, 0x1c, 0x00, 0xfe, 0xff, 0xec, 0xff,\n  0xe2, 0xff, 0xd6, 0xff, 0xc9, 0xff, 0xba, 0xff, 0xb5, 0xff, 0xa8, 0xff,\n  0xa1, 0xff, 0x9d, 0xff, 0xa3, 0xff, 0xa7, 0xff, 0xb6, 0xff, 0xc9, 0xff,\n  0xe2, 0xff, 0xed, 0xff, 0xf6, 0xff, 0xeb, 0xff, 0xeb, 0xff, 0xe1, 0xff,\n  0xed, 0xff, 0xf5, 0xff, 0x06, 0x00, 0x20, 0x00, 0x33, 0x00, 0x3c, 0x00,\n  0x47, 0x00, 0x4d, 0x00, 0x3d, 0x00, 0x31, 0x00, 0x1b, 0x00, 0x0a, 0x00,\n  0xfa, 0xff, 0xe0, 0xff, 0xcb, 0xff, 0xb1, 0xff, 0xa5, 0xff, 0x91, 0xff,\n  0x91, 0xff, 0x8f, 0xff, 0x94, 0xff, 0xa0, 0xff, 0xa4, 0xff, 0xb5, 0xff,\n  0xcd, 0xff, 0xe1, 0xff, 0x07, 0x00, 0x2f, 0x00, 0x5d, 0x00, 0x6f, 0x00,\n  0x7e, 0x00, 0x80, 0x00, 0x83, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x6f, 0x00,\n  0x5d, 0x00, 0x51, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x1c, 0x00, 0x07, 0x00,\n  0xec, 0xff, 0xe0, 0xff, 0xcf, 0xff, 0xc7, 0xff, 0xb5, 0xff, 0xad, 0xff,\n  0xa5, 0xff, 0xa1, 0xff, 0xa0, 0xff, 0x95, 0xff, 0x94, 0xff, 0x86, 0xff,\n  0x89, 0xff, 0x82, 0xff, 0x94, 0xff, 0xaf, 0xff, 0xd0, 0xff, 0xfb, 0xff,\n  0x19, 0x00, 0x33, 0x00, 0x3d, 0x00, 0x41, 0x00, 0x43, 0x00, 0x3e, 0x00,\n  0x3d, 0x00, 0x32, 0x00, 0x31, 0x00, 0x26, 0x00, 0x2b, 0x00, 0x26, 0x00,\n  0x2f, 0x00, 0x1b, 0x00, 0x0f, 0x00, 0x05, 0x00, 0x0f, 0x00, 0x23, 0x00,\n  0x37, 0x00, 0x41, 0x00, 0x40, 0x00, 0x41, 0x00, 0x35, 0x00, 0x24, 0x00,\n  0x0c, 0x00, 0xf6, 0xff, 0xe9, 0xff, 0xe9, 0xff, 0xe6, 0xff, 0xdc, 0xff,\n  0xde, 0xff, 0xde, 0xff, 0xe3, 0xff, 0xe4, 0xff, 0xd3, 0xff, 0xce, 0xff,\n  0xbd, 0xff, 0xbe, 0xff, 0xbc, 0xff, 0xc4, 0xff, 0xc3, 0xff, 0xc8, 0xff,\n  0xcc, 0xff, 0xd6, 0xff, 0xe4, 0xff, 0xea, 0xff, 0xf1, 0xff, 0xe3, 0xff,\n  0xf0, 0xff, 0xeb, 0xff, 0xf4, 0xff, 0xf2, 0xff, 0xef, 0xff, 0xeb, 0xff,\n  0xe4, 0xff, 0xd6, 0xff, 0xc6, 0xff, 0xba, 0xff, 0xa9, 0xff, 0xa1, 0xff,\n  0xa9, 0xff, 0xb3, 0xff, 0xba, 0xff, 0xd2, 0xff, 0xda, 0xff, 0xf7, 0xff,\n  0x0c, 0x00, 0x29, 0x00, 0x42, 0x00, 0x64, 0x00, 0x7d, 0x00, 0x9d, 0x00,\n  0xa8, 0x00, 0xa4, 0x00, 0x94, 0x00, 0x8d, 0x00, 0x89, 0x00, 0x7d, 0x00,\n  0x68, 0x00, 0x45, 0x00, 0x25, 0x00, 0x11, 0x00, 0x01, 0x00, 0xf3, 0xff,\n  0xe0, 0xff, 0xc9, 0xff, 0xb4, 0xff, 0xaf, 0xff, 0xb0, 0xff, 0xaa, 0xff,\n  0x9c, 0xff, 0xa5, 0xff, 0xa4, 0xff, 0xb6, 0xff, 0xc4, 0xff, 0xc7, 0xff,\n  0xd1, 0xff, 0xd2, 0xff, 0xd0, 0xff, 0xd4, 0xff, 0xd5, 0xff, 0xe4, 0xff,\n  0xdf, 0xff, 0xed, 0xff, 0xe6, 0xff, 0xec, 0xff, 0xe9, 0xff, 0xe8, 0xff,\n  0xf7, 0xff, 0x03, 0x00, 0x08, 0x00, 0x09, 0x00, 0x02, 0x00, 0xfa, 0xff,\n  0xf3, 0xff, 0xdf, 0xff, 0xe2, 0xff, 0xdf, 0xff, 0xea, 0xff, 0xef, 0xff,\n  0xf5, 0xff, 0xfb, 0xff, 0x06, 0x00, 0x13, 0x00, 0x2b, 0x00, 0x34, 0x00,\n  0x55, 0x00, 0x61, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x70, 0x00,\n  0x78, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x45, 0x00, 0x26, 0x00, 0x05, 0x00,\n  0xec, 0xff, 0xd4, 0xff, 0xd1, 0xff, 0xcf, 0xff, 0xd7, 0xff, 0xe1, 0xff,\n  0xfd, 0xff, 0x0b, 0x00, 0x32, 0x00, 0x3a, 0x00, 0x43, 0x00, 0x45, 0x00,\n  0x53, 0x00, 0x4a, 0x00, 0x45, 0x00, 0x31, 0x00, 0x1d, 0x00, 0x02, 0x00,\n  0xde, 0xff, 0xd0, 0xff, 0xb5, 0xff, 0xac, 0xff, 0xa1, 0xff, 0x97, 0xff,\n  0x9a, 0xff, 0x95, 0xff, 0x95, 0xff, 0x93, 0xff, 0x8d, 0xff, 0x8d, 0xff,\n  0x91, 0xff, 0x89, 0xff, 0x9a, 0xff, 0x99, 0xff, 0xa5, 0xff, 0xa8, 0xff,\n  0xbd, 0xff, 0xd1, 0xff, 0xe5, 0xff, 0x07, 0x00, 0x1a, 0x00, 0x36, 0x00,\n  0x41, 0x00, 0x56, 0x00, 0x71, 0x00, 0x8f, 0x00, 0xb0, 0x00, 0xb9, 0x00,\n  0xad, 0x00, 0x99, 0x00, 0x8a, 0x00, 0x7b, 0x00, 0x68, 0x00, 0x58, 0x00,\n  0x4f, 0x00, 0x43, 0x00, 0x39, 0x00, 0x25, 0x00, 0x1b, 0x00, 0x11, 0x00,\n  0x06, 0x00, 0xea, 0xff, 0xd3, 0xff, 0xc6, 0xff, 0xb5, 0xff, 0xa4, 0xff,\n  0x91, 0xff, 0x86, 0xff, 0x80, 0xff, 0x79, 0xff, 0x7e, 0xff, 0x83, 0xff,\n  0x9c, 0xff, 0xa2, 0xff, 0xad, 0xff, 0xab, 0xff, 0xaf, 0xff, 0xcb, 0xff,\n  0xda, 0xff, 0xf2, 0xff, 0x06, 0x00, 0x1f, 0x00, 0x39, 0x00, 0x4a, 0x00,\n  0x72, 0x00, 0x7d, 0x00, 0x99, 0x00, 0xa2, 0x00, 0x9c, 0x00, 0x97, 0x00,\n  0x7f, 0x00, 0x6a, 0x00, 0x45, 0x00, 0x25, 0x00, 0x06, 0x00, 0xed, 0xff,\n  0xd8, 0xff, 0xba, 0xff, 0xa9, 0xff, 0x8f, 0xff, 0x7c, 0xff, 0x6b, 0xff,\n  0x60, 0xff, 0x62, 0xff, 0x60, 0xff, 0x67, 0xff, 0x75, 0xff, 0x8b, 0xff,\n  0x9f, 0xff, 0xbc, 0xff, 0xcb, 0xff, 0xe5, 0xff, 0x00, 0x00, 0x0f, 0x00,\n  0x23, 0x00, 0x36, 0x00, 0x41, 0x00, 0x51, 0x00, 0x4c, 0x00, 0x49, 0x00,\n  0x42, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x46, 0x00,\n  0x4f, 0x00, 0x51, 0x00, 0x4a, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x11, 0x00,\n  0xf8, 0xff, 0xe1, 0xff, 0xd2, 0xff, 0xc4, 0xff, 0xb0, 0xff, 0xa2, 0xff,\n  0xa0, 0xff, 0xa1, 0xff, 0x9e, 0xff, 0x9d, 0xff, 0xa6, 0xff, 0xaf, 0xff\n};\n\nconstexpr unsigned int cp808_raw_len = 36312;\n"
  },
  {
    "path": "lib/claps/cp909.h",
    "content": "const uint8_t FLASHMEM cp909_raw[] = {\n  0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xa8, 0xff, 0x18, 0x00, 0x8f, 0xff,\n  0x37, 0x00, 0x7f, 0xff, 0x45, 0x00, 0x59, 0xff, 0x7e, 0x00, 0x1d, 0xff,\n  0xc4, 0x00, 0xbd, 0xfe, 0x5a, 0x01, 0xc1, 0xfd, 0x33, 0x03, 0xa3, 0xf9,\n  0xd1, 0x23, 0x11, 0x7b, 0x5b, 0x4f, 0x6a, 0x49, 0x6f, 0x33, 0x47, 0x3a,\n  0x3f, 0x31, 0xaa, 0x5d, 0x85, 0x70, 0x30, 0x6e, 0x90, 0x3b, 0x5e, 0xe5,\n  0x61, 0xf8, 0x49, 0xe8, 0x8d, 0xf8, 0xf2, 0xc5, 0x34, 0x8a, 0x46, 0x90,\n  0x69, 0x8e, 0xfb, 0x8d, 0xcc, 0x95, 0xe2, 0xc5, 0xbb, 0xaa, 0x82, 0xd9,\n  0xfb, 0xf7, 0xff, 0x06, 0x89, 0xfc, 0xb6, 0xe7, 0x33, 0x35, 0xe0, 0x0e,\n  0xd0, 0xe3, 0xeb, 0xb5, 0x27, 0xe4, 0x6a, 0x05, 0x4b, 0xfa, 0x82, 0x06,\n  0x19, 0xe7, 0xc1, 0xe7, 0x1b, 0xf0, 0xb6, 0x01, 0x3f, 0x20, 0x84, 0x15,\n  0x7e, 0x22, 0x19, 0x19, 0x93, 0x17, 0x44, 0x21, 0x5f, 0x2f, 0x45, 0x46,\n  0xb1, 0x29, 0x68, 0x11, 0xd7, 0x1f, 0x4c, 0x22, 0x04, 0x27, 0x32, 0x3f,\n  0xe8, 0x27, 0xfd, 0x2f, 0x33, 0x12, 0xd2, 0x19, 0xab, 0xf7, 0xb8, 0xd0,\n  0x7e, 0xd5, 0xe1, 0xbe, 0x05, 0xcb, 0x10, 0xc7, 0xa5, 0xd0, 0x00, 0xb8,\n  0x79, 0xd6, 0xc0, 0xea, 0xfa, 0x09, 0x04, 0x10, 0x20, 0xf1, 0x8e, 0xe7,\n  0xfb, 0x0b, 0x3f, 0x1a, 0x67, 0x12, 0x55, 0x32, 0x84, 0x09, 0xe0, 0xdf,\n  0xc6, 0xf4, 0x0a, 0xf0, 0x6f, 0xed, 0x2a, 0xf0, 0xd0, 0xef, 0xa5, 0xf1,\n  0x63, 0xe9, 0xd7, 0xef, 0x07, 0x07, 0x03, 0x1c, 0x17, 0x16, 0xb0, 0x11,\n  0x7e, 0x18, 0xa0, 0x07, 0xdc, 0x02, 0x7e, 0x04, 0x08, 0xec, 0xff, 0x01,\n  0x16, 0x0d, 0x9d, 0x12, 0x00, 0x09, 0x4f, 0x02, 0x61, 0xf3, 0x2a, 0xd7,\n  0x61, 0xd9, 0xaf, 0xd9, 0x35, 0xe3, 0x41, 0xf5, 0xb7, 0x1f, 0x87, 0x2f,\n  0x6d, 0x17, 0xdd, 0x22, 0x1b, 0x22, 0x81, 0x09, 0xce, 0x0e, 0x67, 0xeb,\n  0x55, 0xec, 0x56, 0xdf, 0xe6, 0xeb, 0x78, 0xf4, 0x0f, 0xfc, 0xc6, 0xeb,\n  0x56, 0xdc, 0xf9, 0xf9, 0x51, 0xfc, 0x66, 0xf9, 0xce, 0xf2, 0xe8, 0xe9,\n  0x8c, 0x09, 0x15, 0x01, 0x29, 0x02, 0x80, 0xf7, 0xf1, 0xeb, 0x41, 0xec,\n  0xd2, 0xe4, 0x31, 0xe8, 0x1d, 0xf4, 0xa2, 0x03, 0xbb, 0x09, 0x12, 0x1c,\n  0x96, 0x2b, 0x73, 0x2c, 0x9b, 0x2a, 0xbd, 0x35, 0x9b, 0x3a, 0x6e, 0x34,\n  0x24, 0x29, 0xb8, 0x1c, 0xbe, 0x0b, 0x5e, 0x0f, 0x42, 0x0c, 0x78, 0x11,\n  0x64, 0x06, 0xfd, 0xfc, 0x93, 0xfb, 0x6d, 0xee, 0x2b, 0xe6, 0x67, 0xf3,\n  0xf3, 0xed, 0x41, 0xf0, 0xfe, 0xf1, 0x8b, 0xdd, 0x1f, 0xe1, 0xec, 0xeb,\n  0xb6, 0xf2, 0xf4, 0xf4, 0xe7, 0xdf, 0xd2, 0xd9, 0xa8, 0xdd, 0x75, 0xe1,\n  0xe1, 0xe4, 0x37, 0xe6, 0x5f, 0xf5, 0x3d, 0xfa, 0x84, 0xf5, 0xeb, 0xef,\n  0x3c, 0xf2, 0x55, 0xf1, 0xb0, 0xf3, 0xd3, 0xf4, 0x45, 0xf9, 0x2d, 0x00,\n  0x32, 0x05, 0xcc, 0x0a, 0x63, 0x10, 0x06, 0x1c, 0xfb, 0x2a, 0xac, 0x33,\n  0x9c, 0x2c, 0xff, 0x2c, 0x54, 0x21, 0x40, 0x19, 0x95, 0x0d, 0xd5, 0x09,\n  0x94, 0x0d, 0x60, 0x10, 0x85, 0x11, 0x8b, 0x04, 0x38, 0xf4, 0x94, 0xfa,\n  0xab, 0xfd, 0x27, 0xfa, 0xaa, 0xf6, 0xda, 0xef, 0x70, 0xf2, 0x38, 0xf8,\n  0xe9, 0xf5, 0x42, 0xef, 0x07, 0xf3, 0xf0, 0xf3, 0x7a, 0xf1, 0xa0, 0xe8,\n  0xb4, 0xe7, 0x20, 0xf2, 0x7f, 0xed, 0x46, 0xed, 0xd1, 0xea, 0xea, 0xef,\n  0x09, 0xf7, 0x0d, 0xf8, 0xa6, 0x01, 0x11, 0x0a, 0x3a, 0x02, 0x0a, 0xff,\n  0xcd, 0x01, 0x61, 0x03, 0xa4, 0x03, 0x39, 0x09, 0x97, 0x0c, 0x0f, 0x11,\n  0x21, 0x10, 0x4b, 0x0d, 0x48, 0x09, 0x76, 0xfe, 0x3d, 0xf8, 0xc2, 0xfa,\n  0xf3, 0xfe, 0xb9, 0x00, 0x63, 0x02, 0x03, 0x04, 0x10, 0x05, 0x83, 0x00,\n  0x76, 0xfd, 0xaf, 0xfb, 0x90, 0xfd, 0x2c, 0x04, 0xca, 0x05, 0xcc, 0x06,\n  0xe2, 0x0b, 0xd9, 0x08, 0x88, 0x0b, 0x9e, 0x0d, 0xd3, 0x11, 0x55, 0x16,\n  0xe5, 0x11, 0xef, 0x08, 0x93, 0x09, 0xbb, 0x0a, 0x84, 0x07, 0xdf, 0x04,\n  0x5e, 0x04, 0xec, 0xfe, 0x02, 0xfa, 0x83, 0xfa, 0x0c, 0xf9, 0x61, 0xf3,\n  0xd6, 0xf4, 0x56, 0xf5, 0xc5, 0xf4, 0x9f, 0xf0, 0x02, 0xf1, 0x49, 0xec,\n  0x51, 0xe5, 0xee, 0xe8, 0xf2, 0xea, 0xba, 0xed, 0x2e, 0xed, 0x89, 0xef,\n  0x96, 0xf0, 0xb0, 0xf3, 0xc7, 0xf6, 0x7c, 0xfb, 0x4b, 0xff, 0x22, 0x04,\n  0x98, 0x06, 0xb5, 0x0a, 0xe9, 0x0e, 0x7e, 0x0d, 0x6d, 0x09, 0xdb, 0x0b,\n  0xea, 0x11, 0x79, 0x10, 0x53, 0x11, 0x49, 0x0d, 0x04, 0x06, 0xca, 0x04,\n  0xb3, 0x02, 0x59, 0x03, 0x4a, 0x06, 0x65, 0x04, 0x3b, 0x04, 0xd9, 0x02,\n  0xe6, 0x00, 0x84, 0x02, 0x6e, 0x04, 0xd6, 0xfe, 0xe4, 0xfb, 0x77, 0xfb,\n  0xa4, 0xf8, 0x78, 0xf4, 0xcf, 0xf7, 0x30, 0xfb, 0x26, 0x00, 0x1a, 0x03,\n  0x06, 0xff, 0xc1, 0xfa, 0x33, 0x02, 0x94, 0x03, 0x5c, 0x03, 0x73, 0x03,\n  0x8b, 0x00, 0xa7, 0xfd, 0x3a, 0xff, 0xf3, 0xfe, 0xc4, 0xff, 0x3a, 0xff,\n  0x23, 0xfd, 0xcd, 0xff, 0x64, 0xfb, 0x2a, 0xf7, 0x02, 0xf5, 0xb2, 0xf7,\n  0x4e, 0xf9, 0x87, 0xfa, 0x2b, 0xfd, 0x24, 0x00, 0x7b, 0xfd, 0x8c, 0xff,\n  0x25, 0x05, 0xcb, 0x03, 0x2d, 0x04, 0x3e, 0x04, 0x97, 0x03, 0x55, 0x05,\n  0x9a, 0x04, 0xfb, 0x01, 0x61, 0xfc, 0x8d, 0xfb, 0x22, 0xfe, 0x35, 0xfc,\n  0x96, 0xfb, 0xeb, 0xfd, 0x44, 0xfd, 0x2f, 0xfc, 0x91, 0xfe, 0x1b, 0x00,\n  0xef, 0xfe, 0x2f, 0xfe, 0x77, 0xfe, 0x11, 0x01, 0x01, 0xff, 0xc3, 0x00,\n  0x29, 0x03, 0x68, 0xff, 0xd1, 0xfd, 0x2f, 0xfe, 0xc1, 0x00, 0xde, 0x00,\n  0x38, 0x01, 0x2b, 0x01, 0x64, 0x04, 0x17, 0x05, 0x04, 0x04, 0xc4, 0x00,\n  0x5a, 0xff, 0xe4, 0xfd, 0x01, 0xfd, 0x98, 0xff, 0x60, 0xfe, 0x97, 0x01,\n  0xff, 0xfe, 0x9c, 0xfc, 0x7f, 0xfd, 0x21, 0xff, 0xf8, 0xfe, 0x72, 0x01,\n  0x71, 0x02, 0x47, 0x05, 0xaa, 0x06, 0x2e, 0x06, 0x99, 0x04, 0x0a, 0x05,\n  0x07, 0x07, 0x72, 0x05, 0x9e, 0x06, 0x61, 0x06, 0x86, 0x03, 0x89, 0x00,\n  0xfe, 0x00, 0x4f, 0x00, 0xd3, 0xfd, 0x0c, 0xfe, 0x3d, 0xfe, 0x7a, 0xfe,\n  0xce, 0xfe, 0x97, 0xff, 0xd6, 0xfc, 0xb4, 0xfa, 0x61, 0xfc, 0x10, 0xfc,\n  0xdc, 0xfb, 0x25, 0xfa, 0xf2, 0xf8, 0xf9, 0xf6, 0x22, 0xf8, 0x8f, 0xf8,\n  0x16, 0xfa, 0x21, 0xfc, 0x39, 0xfd, 0x72, 0xfe, 0xcd, 0xff, 0xab, 0x00,\n  0x84, 0x01, 0xcc, 0x02, 0xb1, 0x02, 0x94, 0x02, 0x5d, 0x02, 0xbc, 0x03,\n  0x54, 0x02, 0xbb, 0x02, 0x6f, 0x01, 0x19, 0x01, 0x5f, 0x01, 0xe2, 0xff,\n  0xad, 0x00, 0xd7, 0x00, 0xff, 0x01, 0xaf, 0x02, 0x62, 0x02, 0x93, 0x03,\n  0x12, 0x05, 0x78, 0x05, 0x6e, 0x06, 0x04, 0x08, 0x1c, 0x0a, 0xd1, 0x0a,\n  0x53, 0x0a, 0x04, 0x0b, 0x02, 0x0b, 0xbd, 0x08, 0x07, 0x07, 0xeb, 0x05,\n  0x86, 0x03, 0xb6, 0x01, 0x94, 0x00, 0x50, 0xfe, 0x85, 0xfc, 0xbb, 0xfa,\n  0x23, 0xf9, 0xc7, 0xf7, 0x5f, 0xf6, 0x14, 0xf5, 0x36, 0xf4, 0xd0, 0xf3,\n  0x31, 0xf4, 0x09, 0xf4, 0x5a, 0xf4, 0x5f, 0xf5, 0x42, 0xf5, 0x61, 0xf5,\n  0x11, 0xf7, 0x57, 0xf7, 0x29, 0xf7, 0xa3, 0xf7, 0xe6, 0xf7, 0x82, 0xf8,\n  0x77, 0xfa, 0x88, 0xfb, 0x23, 0xfd, 0xaf, 0xfd, 0x35, 0xff, 0x46, 0x01,\n  0x84, 0x03, 0x73, 0x05, 0x69, 0x07, 0x3a, 0x09, 0x9a, 0x0a, 0xc6, 0x0b,\n  0x74, 0x0c, 0x52, 0x0c, 0x0e, 0x0b, 0xd3, 0x0b, 0x61, 0x09, 0x88, 0x07,\n  0xcd, 0x05, 0x5e, 0x06, 0x1d, 0x05, 0xf4, 0x04, 0xf9, 0x01, 0x02, 0x00,\n  0xbe, 0xfd, 0xc6, 0xff, 0xaa, 0xfc, 0x1d, 0xfe, 0xf0, 0xf9, 0x36, 0xfc,\n  0x62, 0xf7, 0xe6, 0xfa, 0x58, 0xfe, 0x0a, 0x62, 0x37, 0x6b, 0x24, 0x63,\n  0x64, 0x1f, 0xa3, 0xcc, 0xc7, 0xaf, 0xea, 0xd4, 0xfc, 0xd0, 0x2e, 0x86,\n  0x48, 0x95, 0xd4, 0x89, 0x37, 0x97, 0x7b, 0x95, 0xa1, 0xb1, 0x19, 0xd4,\n  0x88, 0xb9, 0x29, 0xea, 0x39, 0xfd, 0x59, 0x15, 0xe3, 0x27, 0x75, 0xf5,\n  0xcc, 0x06, 0x12, 0x26, 0xc7, 0x2b, 0xb1, 0x3e, 0x4c, 0x6e, 0xe7, 0x74,\n  0x62, 0x75, 0x06, 0x74, 0x33, 0x75, 0x7c, 0x70, 0x1b, 0x5c, 0x02, 0x43,\n  0x5a, 0x61, 0x78, 0x48, 0x0a, 0x23, 0x40, 0x23, 0xfa, 0x10, 0x93, 0x05,\n  0x27, 0x07, 0x67, 0x1b, 0x36, 0x1f, 0x9d, 0x27, 0x28, 0x0a, 0x59, 0xed,\n  0xaf, 0xd3, 0xb0, 0xcd, 0x99, 0xe4, 0xe3, 0xe7, 0xb4, 0xdf, 0xb4, 0xbe,\n  0xa8, 0x95, 0x13, 0x8e, 0xaf, 0x8f, 0xaf, 0x96, 0x8a, 0xaf, 0x3b, 0xb5,\n  0x9e, 0xd8, 0xa4, 0xe9, 0xe6, 0xcd, 0x4a, 0xa8, 0x32, 0xa8, 0x70, 0xbc,\n  0x83, 0xc6, 0xd3, 0xd3, 0xcc, 0xf4, 0xf1, 0xf9, 0xf9, 0xee, 0xc4, 0x05,\n  0x6d, 0x25, 0xf2, 0x41, 0x46, 0x62, 0xd6, 0x32, 0x36, 0x1b, 0xdd, 0x43,\n  0xbb, 0x4e, 0xb4, 0x47, 0xf1, 0x4b, 0x37, 0x45, 0xd1, 0x20, 0xe3, 0x20,\n  0xbf, 0x12, 0xc5, 0x00, 0xb6, 0xe7, 0x78, 0x01, 0xae, 0x20, 0x35, 0x17,\n  0xf3, 0x0f, 0xe4, 0xf8, 0x3f, 0xec, 0xda, 0xe1, 0xd4, 0xdc, 0x33, 0xc3,\n  0x48, 0xcf, 0x55, 0xdb, 0x15, 0xf1, 0x08, 0x10, 0x9c, 0x19, 0x34, 0x21,\n  0xe5, 0x23, 0xa1, 0x1c, 0x84, 0x1f, 0xd4, 0x1e, 0x20, 0xff, 0x24, 0x0d,\n  0x28, 0xf6, 0x4b, 0x0c, 0xa5, 0xf3, 0x39, 0xe6, 0xd8, 0xd6, 0x1e, 0xb2,\n  0x8e, 0xb5, 0xb4, 0xc6, 0x94, 0xe4, 0xd5, 0xef, 0xcb, 0x0d, 0x2f, 0x0e,\n  0xbc, 0x1f, 0xb3, 0x17, 0x5c, 0x19, 0xaf, 0x11, 0x68, 0x1f, 0xfa, 0x30,\n  0xe4, 0x22, 0x51, 0x18, 0x96, 0x14, 0x28, 0xfe, 0x08, 0xf7, 0xc4, 0xe5,\n  0x2f, 0xfb, 0xb8, 0xfd, 0x55, 0xfe, 0xa8, 0xf3, 0xa5, 0xd4, 0x0c, 0xdf,\n  0xb1, 0xe4, 0xbc, 0xeb, 0x15, 0xde, 0x86, 0xdf, 0x41, 0xe5, 0x4a, 0xe5,\n  0xe0, 0xd9, 0x99, 0xe5, 0x37, 0xf9, 0xc7, 0xff, 0x5c, 0x06, 0x0d, 0x1a,\n  0x73, 0x2e, 0x70, 0x30, 0x42, 0x2a, 0x61, 0x4c, 0xa5, 0x4a, 0xec, 0x40,\n  0xe9, 0x3e, 0x7a, 0x43, 0x12, 0x2c, 0xd3, 0x20, 0xab, 0x23, 0x89, 0x0e,\n  0xe0, 0xf6, 0x6b, 0xec, 0xee, 0xf7, 0xde, 0xf6, 0xcf, 0xf2, 0x39, 0xde,\n  0x10, 0xd0, 0xc7, 0xdd, 0xf9, 0xd5, 0xd7, 0xca, 0xde, 0xc9, 0xf1, 0xd8,\n  0x6e, 0xe8, 0x3f, 0xd9, 0x8d, 0xcb, 0x8c, 0xd2, 0x45, 0xd8, 0x3f, 0xd9,\n  0x52, 0xd3, 0x39, 0xd8, 0x31, 0xdf, 0xca, 0xe8, 0xfa, 0xf3, 0x97, 0x03,\n  0x3c, 0x14, 0xdf, 0x1a, 0xd8, 0x14, 0x15, 0x30, 0x90, 0x3c, 0xc8, 0x32,\n  0x80, 0x33, 0x55, 0x2d, 0xb9, 0x26, 0xc7, 0x21, 0x99, 0x2c, 0x8b, 0x24,\n  0x13, 0x18, 0x98, 0x08, 0x96, 0x0a, 0xef, 0x16, 0x2e, 0x0f, 0x92, 0x07,\n  0x0b, 0xf4, 0xc0, 0xe9, 0xcb, 0xec, 0xc5, 0xe1, 0xf3, 0xdb, 0x3b, 0xd3,\n  0xfe, 0xc7, 0x7d, 0xcc, 0x39, 0xd6, 0xa5, 0xdf, 0xf3, 0xf0, 0xf3, 0xf9,\n  0xb1, 0xff, 0x39, 0x0c, 0x5d, 0x0d, 0x4e, 0x00, 0xb2, 0xf5, 0x47, 0xf6,\n  0x0d, 0xfc, 0x99, 0x05, 0x60, 0x05, 0xd3, 0xff, 0x7f, 0xf1, 0x9a, 0xfa,\n  0x43, 0xfd, 0x75, 0xf9, 0x72, 0x00, 0xd6, 0x08, 0xd3, 0x10, 0xef, 0x17,\n  0x82, 0x1b, 0x7f, 0x09, 0xcb, 0x09, 0x81, 0x12, 0x79, 0x0f, 0xf3, 0x08,\n  0xd3, 0x0f, 0x2a, 0x0a, 0x3f, 0xfb, 0x31, 0xfa, 0x1d, 0x0d, 0x07, 0x14,\n  0x39, 0x12, 0x81, 0x0a, 0x09, 0x04, 0xd2, 0x0f, 0x2f, 0x06, 0x88, 0x07,\n  0xfe, 0xf7, 0xaa, 0xe8, 0x84, 0xea, 0x2f, 0xea, 0x09, 0xee, 0xd3, 0xef,\n  0xb6, 0xfb, 0x49, 0xf7, 0x7f, 0xf9, 0xb2, 0xfa, 0x94, 0xf8, 0x49, 0x00,\n  0x47, 0x0d, 0x8f, 0x07, 0x74, 0x06, 0x2b, 0x0a, 0x8b, 0x01, 0xff, 0xf8,\n  0xe6, 0xf8, 0xe3, 0xf9, 0x8e, 0xfe, 0xbd, 0xf9, 0xe6, 0xf0, 0x35, 0xef,\n  0x93, 0xee, 0xdf, 0xf0, 0x93, 0xf3, 0xec, 0xfb, 0xb9, 0x06, 0x36, 0x0a,\n  0xed, 0x0d, 0x4c, 0x14, 0x2c, 0x10, 0xe5, 0x0d, 0xc5, 0x0b, 0x30, 0x00,\n  0xb0, 0xf8, 0x33, 0x01, 0x0a, 0x09, 0xbe, 0x0d, 0x1c, 0x07, 0xcc, 0x04,\n  0x36, 0xff, 0xfd, 0xfb, 0x60, 0xf7, 0x81, 0xed, 0x9c, 0xee, 0x9c, 0xef,\n  0xf7, 0xf6, 0xb3, 0xf9, 0xe0, 0x02, 0xa8, 0xfe, 0x15, 0xf9, 0x83, 0xff,\n  0x9f, 0x08, 0x28, 0x08, 0xa5, 0x08, 0x75, 0x03, 0x98, 0xff, 0xb5, 0xfd,\n  0x9b, 0x03, 0xb9, 0x06, 0x6f, 0x0d, 0x16, 0x0a, 0xeb, 0x03, 0xd3, 0x0b,\n  0xce, 0x0a, 0x2e, 0x07, 0xa3, 0x0a, 0xfd, 0x03, 0xf9, 0x04, 0x44, 0x04,\n  0x0e, 0x02, 0x3b, 0xff, 0x68, 0xfc, 0x06, 0xfd, 0x0e, 0xf7, 0xea, 0xf2,\n  0x67, 0xf4, 0x0b, 0xfa, 0x4c, 0xfd, 0xbc, 0xff, 0x83, 0xfd, 0xd4, 0xf6,\n  0xe5, 0xf9, 0xbe, 0xfc, 0x63, 0xf8, 0x83, 0xfb, 0x0b, 0xfe, 0xea, 0xff,\n  0x20, 0xfe, 0xb2, 0xfd, 0x4e, 0xfb, 0x53, 0xfb, 0x0f, 0xfa, 0xfd, 0xf5,\n  0xd0, 0xf8, 0xd7, 0xf8, 0xbf, 0xf7, 0x83, 0xfd, 0x86, 0xfe, 0x0f, 0xff,\n  0x1b, 0xff, 0x07, 0x01, 0x99, 0x04, 0xb4, 0x03, 0x43, 0x01, 0x57, 0x01,\n  0x49, 0x06, 0xe9, 0x0a, 0x24, 0x0d, 0x03, 0x10, 0x05, 0x11, 0x4f, 0x0e,\n  0x5a, 0x0e, 0x6d, 0x0c, 0x3d, 0x09, 0xa6, 0x0a, 0x9e, 0x0b, 0xd3, 0x0b,\n  0x36, 0x0a, 0xbb, 0x05, 0x06, 0xfe, 0x36, 0xfc, 0x60, 0xfc, 0xe8, 0xfb,\n  0xc1, 0xfa, 0x42, 0xf7, 0xaf, 0xf6, 0xf2, 0xf2, 0xdc, 0xef, 0xbe, 0xee,\n  0x3a, 0xf4, 0x8a, 0xf6, 0x28, 0xf6, 0x45, 0xf8, 0xa2, 0xf6, 0x2f, 0xf5,\n  0x0b, 0xf7, 0xf5, 0xf7, 0x7c, 0xf8, 0x8c, 0xf8, 0xc0, 0xf7, 0x96, 0xf8,\n  0x74, 0xf8, 0x19, 0xfa, 0x3d, 0xfd, 0xc5, 0x00, 0x5a, 0x05, 0x7b, 0x08,\n  0x45, 0x0c, 0x0f, 0x0c, 0xc8, 0x08, 0xfd, 0x07, 0x31, 0x07, 0x87, 0x03,\n  0xa5, 0x03, 0x49, 0x06, 0x3b, 0x09, 0x31, 0x0b, 0x53, 0x09, 0xda, 0x08,\n  0xdd, 0x04, 0x51, 0x02, 0xde, 0xfe, 0xfd, 0xfd, 0xca, 0xfd, 0xe8, 0xff,\n  0x6b, 0xff, 0xf5, 0xfd, 0xb7, 0xff, 0x1d, 0xfd, 0x07, 0xfc, 0xbb, 0xfa,\n  0x00, 0xfc, 0xe9, 0xfc, 0x04, 0xfa, 0xb9, 0xf9, 0x0b, 0xfc, 0x1a, 0xfd,\n  0xd7, 0xfe, 0xa3, 0x01, 0x61, 0x04, 0xcb, 0x06, 0xd0, 0x06, 0x2b, 0x05,\n  0x92, 0x05, 0x98, 0x05, 0x32, 0x05, 0x95, 0x05, 0xfe, 0x05, 0x18, 0x03,\n  0xbf, 0xff, 0xc0, 0xfe, 0x98, 0xfd, 0xb1, 0xfb, 0xb3, 0xfa, 0xf5, 0xf9,\n  0x0d, 0xfb, 0xff, 0xfb, 0xa5, 0xfa, 0xa8, 0xfb, 0xc9, 0xfb, 0xaa, 0xfc,\n  0x2a, 0xfd, 0x3e, 0xfc, 0x50, 0xfd, 0x87, 0xfc, 0x58, 0xfd, 0xc7, 0xfe,\n  0x81, 0x01, 0x61, 0x00, 0x98, 0x01, 0xf1, 0x01, 0x17, 0xfe, 0x86, 0xfd,\n  0x1a, 0xff, 0xf4, 0xff, 0x33, 0x00, 0x54, 0x00, 0xd1, 0xff, 0xf2, 0xfe,\n  0x36, 0x00, 0xeb, 0xff, 0xbc, 0x01, 0xb2, 0x01, 0x3f, 0xff, 0x9c, 0xfe,\n  0x22, 0xfe, 0xf1, 0xfd, 0x82, 0xfd, 0x0d, 0xfe, 0xbf, 0xfd, 0x0e, 0xfd,\n  0xa3, 0xfe, 0x71, 0xfd, 0x73, 0xfd, 0x4c, 0xfd, 0x08, 0xfe, 0xa6, 0xff,\n  0x47, 0xfe, 0xd9, 0xfd, 0x6e, 0xfe, 0xbf, 0x00, 0x6c, 0x01, 0x48, 0x03,\n  0xbe, 0x04, 0x69, 0x07, 0xe4, 0x08, 0x65, 0x0a, 0xde, 0x0a, 0x5f, 0x0c,\n  0x12, 0x0d, 0x9c, 0x0c, 0x75, 0x0c, 0x87, 0x0b, 0xca, 0x08, 0x05, 0x07,\n  0x59, 0x04, 0x7e, 0x02, 0xb3, 0x01, 0xe8, 0xff, 0xc1, 0xff, 0xc2, 0xfe,\n  0x7a, 0xfd, 0x3b, 0xfc, 0x4d, 0xfc, 0x1a, 0xfb, 0xfb, 0xfa, 0x19, 0xfa,\n  0xf8, 0xf8, 0x46, 0xf8, 0xce, 0xf6, 0xf1, 0xf5, 0x3c, 0xf6, 0xa6, 0xf6,\n  0x84, 0xf6, 0xdc, 0xf7, 0x4d, 0xf7, 0xf9, 0xf6, 0x64, 0xf8, 0x11, 0xf8,\n  0x40, 0xf8, 0x07, 0xfa, 0x4d, 0xf9, 0xd8, 0xf9, 0xf9, 0xfa, 0xa3, 0xfc,\n  0x0c, 0xfe, 0xde, 0xfe, 0x7d, 0x00, 0x39, 0x02, 0x2a, 0x03, 0xc4, 0x02,\n  0xc3, 0x03, 0xbf, 0x03, 0x64, 0x04, 0xb7, 0x03, 0xf1, 0x03, 0x11, 0x03,\n  0x78, 0x06, 0x36, 0xc8, 0x93, 0x9c, 0x2c, 0xb5, 0x5b, 0xe6, 0xa4, 0x0b,\n  0x0b, 0x43, 0x49, 0x4d, 0x6d, 0x30, 0x8d, 0x03, 0x3e, 0x0e, 0x8d, 0xec,\n  0xf5, 0xd4, 0x9b, 0xde, 0xfb, 0x3f, 0xbe, 0x4e, 0x43, 0x2e, 0xb9, 0x4b,\n  0x46, 0x61, 0x29, 0x24, 0xd8, 0x47, 0x85, 0x42, 0xea, 0xec, 0xd5, 0xd5,\n  0xcf, 0x05, 0x40, 0x07, 0xa0, 0xe2, 0x90, 0xd5, 0x9c, 0xf2, 0xcd, 0xde,\n  0x7a, 0xb6, 0x25, 0xa6, 0xfa, 0xce, 0xcb, 0xe7, 0x53, 0xe9, 0x3f, 0xec,\n  0x98, 0xfe, 0x14, 0x02, 0xb5, 0xf5, 0x40, 0xf3, 0xba, 0x17, 0x19, 0x1a,\n  0x49, 0x26, 0xb8, 0x05, 0x11, 0xd6, 0x61, 0xce, 0x8b, 0xe5, 0xad, 0xfc,\n  0xeb, 0x01, 0xc7, 0xed, 0xdd, 0x00, 0xdc, 0x1c, 0xc7, 0x0b, 0x71, 0x01,\n  0x62, 0x03, 0x16, 0x0b, 0x8e, 0xf3, 0x5f, 0xfc, 0xcc, 0xf4, 0x88, 0x23,\n  0xa5, 0x23, 0xaf, 0x24, 0x4b, 0x02, 0x63, 0xed, 0x7d, 0xd0, 0x44, 0xd9,\n  0xdf, 0xfc, 0xfe, 0x0a, 0x23, 0x07, 0xe5, 0x0f, 0x7e, 0x28, 0xbf, 0x4b,\n  0x33, 0x46, 0x21, 0x25, 0x54, 0x19, 0x47, 0x4b, 0xee, 0x29, 0x55, 0x14,\n  0x89, 0xf5, 0xe3, 0xe6, 0x05, 0xbd, 0xec, 0xa9, 0x2b, 0xbb, 0xbb, 0xed,\n  0xb5, 0x0e, 0xaa, 0x06, 0x47, 0x1e, 0x04, 0x3e, 0xc0, 0x24, 0x98, 0x2a,\n  0x29, 0x1c, 0xf3, 0xf0, 0x0b, 0xd2, 0x03, 0xba, 0x8b, 0xc6, 0xa5, 0xc8,\n  0x65, 0xdb, 0x8b, 0xfc, 0x8d, 0xf9, 0x40, 0xe7, 0xc2, 0xfe, 0xcf, 0xff,\n  0x3b, 0xd2, 0xb7, 0xda, 0xbb, 0xdf, 0x87, 0x04, 0xcd, 0x02, 0xf4, 0x14,\n  0x60, 0x0b, 0x9f, 0xe1, 0x06, 0xf3, 0xb9, 0xff, 0x44, 0xf4, 0x6c, 0xfb,\n  0x46, 0x03, 0x3d, 0x21, 0x0c, 0x18, 0x51, 0x1b, 0x3e, 0x24, 0xfe, 0xf3,\n  0xe3, 0x04, 0x00, 0xef, 0x48, 0xe4, 0xdc, 0xe4, 0x5c, 0xea, 0x66, 0xf7,\n  0xdc, 0xfd, 0x01, 0x09, 0x53, 0x06, 0x90, 0xec, 0x9f, 0xfd, 0xa2, 0x0f,\n  0xda, 0x28, 0x67, 0x2d, 0x40, 0x2d, 0xbe, 0x12, 0x6a, 0x18, 0x64, 0x0e,\n  0x08, 0x0d, 0xa6, 0xfd, 0x2e, 0xfa, 0x18, 0x12, 0x3a, 0x1f, 0x41, 0x13,\n  0xf6, 0xfc, 0x59, 0x11, 0x51, 0x06, 0x73, 0xf8, 0xd0, 0xfb, 0xa5, 0xf8,\n  0xe3, 0xed, 0xe3, 0xed, 0x68, 0xf7, 0xc5, 0x05, 0x5b, 0x02, 0xdc, 0x00,\n  0x37, 0xe1, 0x42, 0xd3, 0x82, 0xeb, 0x56, 0xf5, 0x24, 0x0b, 0xc6, 0xfd,\n  0x29, 0xed, 0x24, 0xf3, 0x9e, 0xf3, 0x6f, 0xe5, 0xaf, 0xdc, 0x4c, 0xf2,\n  0x06, 0x07, 0x3d, 0x14, 0x21, 0x0b, 0x0f, 0x1d, 0x2f, 0x1c, 0x81, 0xfd,\n  0xc7, 0xf9, 0x49, 0x08, 0xd5, 0xff, 0x92, 0x0c, 0x5c, 0x08, 0x0f, 0x12,\n  0x51, 0x0f, 0xd8, 0x03, 0x51, 0x0d, 0x4f, 0xfb, 0x78, 0xee, 0xa2, 0xfa,\n  0x09, 0x16, 0x1f, 0x1f, 0x61, 0x2a, 0x8b, 0x17, 0x2e, 0x15, 0x96, 0x0d,\n  0x9a, 0x0d, 0x9c, 0xf9, 0x7c, 0xe8, 0x81, 0xed, 0x19, 0xdf, 0xfa, 0xdb,\n  0x07, 0xcf, 0x56, 0xdc, 0x88, 0xdd, 0x76, 0xe0, 0x43, 0xe7, 0x7c, 0xfe,\n  0x56, 0x08, 0xfe, 0x10, 0xe7, 0x1b, 0x74, 0x1d, 0xe5, 0x1b, 0x04, 0x30,\n  0xe4, 0x23, 0xb3, 0x17, 0xa6, 0x13, 0x5b, 0x0b, 0xd4, 0x04, 0x54, 0xfb,\n  0x35, 0x03, 0x71, 0x02, 0xd5, 0xf3, 0x83, 0xf3, 0x1f, 0xef, 0xbb, 0xe8,\n  0xfd, 0xe7, 0x95, 0xee, 0x2c, 0x00, 0x4b, 0x03, 0xcb, 0xf7, 0x79, 0xf7,\n  0x3b, 0xf8, 0x17, 0xf6, 0xb6, 0xf8, 0x4d, 0xf6, 0x62, 0xef, 0x1e, 0xf4,\n  0x4d, 0xef, 0xd7, 0xf5, 0x6c, 0xee, 0xd9, 0xe8, 0xaf, 0xe7, 0xaf, 0xf1,\n  0x28, 0xf6, 0x1e, 0xf5, 0xbf, 0xfe, 0xac, 0x06, 0xaf, 0x07, 0x99, 0x0b,\n  0x79, 0x08, 0xbd, 0x0b, 0x21, 0x12, 0x0a, 0x0c, 0x7c, 0x08, 0x88, 0x06,\n  0x64, 0x0d, 0xe6, 0x0e, 0xcf, 0x0c, 0x61, 0x16, 0x22, 0x19, 0x3b, 0x0d,\n  0x2e, 0x0e, 0x00, 0x18, 0x1b, 0x1c, 0x5f, 0x17, 0x74, 0x1b, 0x6f, 0x14,\n  0x97, 0x07, 0xf5, 0x02, 0xfe, 0x03, 0x1d, 0x06, 0x70, 0x02, 0xa7, 0xf9,\n  0xef, 0xeb, 0x72, 0xeb, 0xe5, 0xee, 0x08, 0xeb, 0x07, 0xec, 0x0b, 0xe5,\n  0x4f, 0xe3, 0x23, 0xe9, 0x0c, 0xe3, 0x67, 0xe5, 0x2f, 0xe4, 0x57, 0xe6,\n  0x42, 0xea, 0xd2, 0xe9, 0xe0, 0xf0, 0xe9, 0xf8, 0xa8, 0xfc, 0x1e, 0xff,\n  0x0b, 0x06, 0x8d, 0x05, 0xa9, 0x05, 0x82, 0x0d, 0x48, 0x10, 0xa0, 0x16,\n  0x05, 0x19, 0xe8, 0x13, 0xf8, 0x0e, 0x84, 0x0d, 0xc9, 0x13, 0x8a, 0x16,\n  0x1a, 0x17, 0x3c, 0x15, 0xb5, 0x11, 0x90, 0x08, 0x3b, 0x01, 0x84, 0x03,\n  0xea, 0x04, 0x04, 0x04, 0xf2, 0xfe, 0x72, 0xf7, 0xf8, 0xf9, 0xef, 0xf6,\n  0xc3, 0xf0, 0xd7, 0xf5, 0x19, 0xf8, 0x97, 0xfa, 0x10, 0xfa, 0x88, 0xf6,\n  0x14, 0xf7, 0x22, 0xf5, 0x1f, 0xf2, 0xde, 0xf5, 0x98, 0xf2, 0x1d, 0xf4,\n  0x19, 0xf9, 0xea, 0xfb, 0xd8, 0xff, 0x0f, 0xfe, 0xe7, 0x01, 0x41, 0x02,\n  0x2e, 0x02, 0x76, 0x04, 0x42, 0x01, 0xda, 0x00, 0x2f, 0x00, 0xeb, 0xff,\n  0x2b, 0x01, 0xc9, 0x04, 0x19, 0x02, 0x07, 0x02, 0xfe, 0x02, 0x10, 0x04,\n  0x1e, 0x05, 0x1b, 0x03, 0x8c, 0x06, 0xf5, 0x07, 0xf0, 0x06, 0x44, 0x07,\n  0xbc, 0x0a, 0x65, 0x0a, 0x91, 0x08, 0xae, 0x04, 0xf4, 0x00, 0xc3, 0xf8,\n  0x52, 0xf7, 0x45, 0xf7, 0x72, 0xff, 0x1e, 0x00, 0x65, 0x05, 0x83, 0xfe,\n  0x14, 0x05, 0x69, 0xf9, 0x62, 0x03, 0x4f, 0xf2, 0xb7, 0x4e, 0x95, 0x09,\n  0xc4, 0xae, 0x51, 0xd9, 0xbb, 0xb7, 0x02, 0xdd, 0x0d, 0xb3, 0x06, 0xe2,\n  0xec, 0x15, 0x8e, 0xe4, 0x7b, 0xb3, 0xfa, 0xb8, 0xf9, 0xdf, 0xc3, 0xdf,\n  0xc2, 0xe3, 0x2c, 0xe6, 0x0a, 0x07, 0x28, 0x14, 0x10, 0x03, 0xbb, 0x13,\n  0xd0, 0x3d, 0x25, 0x4a, 0xfb, 0x54, 0x7d, 0x60, 0x2c, 0x6a, 0x2f, 0x52,\n  0x1e, 0x48, 0xb9, 0x44, 0x42, 0x56, 0x9c, 0x66, 0xad, 0x62, 0x6a, 0x51,\n  0x29, 0x22, 0x85, 0x18, 0x10, 0x08, 0xcd, 0xed, 0x71, 0xc7, 0x4d, 0xcf,\n  0x41, 0xda, 0x57, 0xe2, 0x69, 0xd5, 0xda, 0xc3, 0xf9, 0xc8, 0x12, 0xcf,\n  0x15, 0x9e, 0xad, 0xb2, 0x46, 0xd6, 0x93, 0xe1, 0xbd, 0x02, 0xc2, 0x0e,\n  0x08, 0xed, 0xa3, 0xd4, 0x49, 0xd7, 0xd4, 0xf5, 0xc1, 0x02, 0x3a, 0xea,\n  0x19, 0xf9, 0x25, 0xc7, 0x6d, 0xc6, 0xc6, 0xe0, 0xa0, 0x1b, 0xf3, 0x2d,\n  0x81, 0x29, 0x26, 0x38, 0xbe, 0x3e, 0x9e, 0x2b, 0xdd, 0x30, 0x36, 0x26,\n  0x52, 0x0b, 0xd8, 0xfa, 0x5b, 0xe5, 0xf6, 0xd2, 0x3e, 0xc2, 0x24, 0xd1,\n  0xfa, 0xe7, 0x45, 0x0b, 0xf6, 0x2a, 0xa3, 0x18, 0xf3, 0x06, 0x23, 0x0c,\n  0x42, 0xf5, 0x24, 0xdb, 0x2a, 0xd3, 0x7a, 0xed, 0x4c, 0x0c, 0xc0, 0x17,\n  0xc5, 0x13, 0x69, 0xfe, 0x1f, 0x0c, 0x93, 0x10, 0x52, 0x15, 0xb8, 0x14,\n  0x85, 0xde, 0x71, 0xf4, 0x1e, 0x00, 0xbd, 0x03, 0xa8, 0xf2, 0x3f, 0xea,\n  0x9f, 0xf6, 0x05, 0xfd, 0xb5, 0x0e, 0x75, 0x2d, 0x63, 0x14, 0x00, 0x00,\n  0xca, 0xe0, 0x4a, 0xe2, 0x27, 0x0c, 0x00, 0xfe, 0xc0, 0xff, 0x1b, 0xd9,\n  0xc5, 0xe4, 0xe0, 0xf8, 0x6a, 0xfa, 0x42, 0x15, 0x12, 0x18, 0xf1, 0x08,\n  0x44, 0x30, 0xf5, 0x3a, 0xb9, 0x2f, 0x12, 0x3a, 0x04, 0x3a, 0xf3, 0x23,\n  0x76, 0x0b, 0x93, 0x09, 0xb5, 0x1a, 0x36, 0x1d, 0x14, 0x1c, 0x6f, 0xfe,\n  0x5f, 0xc2, 0xb3, 0xe7, 0x52, 0xfc, 0xdd, 0xf0, 0xfe, 0xf5, 0x79, 0xb4,\n  0x22, 0xc8, 0x43, 0xd5, 0x58, 0xc8, 0xbc, 0xc5, 0x11, 0xb3, 0xc7, 0xba,\n  0x5d, 0xce, 0xb5, 0xd9, 0xbf, 0xed, 0x80, 0xfa, 0xd9, 0xe1, 0x2c, 0xe9,\n  0x6e, 0x08, 0xe9, 0x08, 0x78, 0x18, 0xf6, 0x1c, 0xcc, 0x17, 0x52, 0x28,\n  0x0c, 0x36, 0x2b, 0x16, 0xc5, 0x1b, 0xa3, 0x45, 0x7a, 0x57, 0x7b, 0x55,\n  0xc0, 0x3d, 0xc3, 0x4c, 0xe7, 0x20, 0xf9, 0x09, 0x95, 0xff, 0x0e, 0x05,\n  0x5e, 0x0a, 0x76, 0x02, 0xbb, 0xf6, 0x13, 0x03, 0xd1, 0x16, 0x1c, 0x02,\n  0x66, 0x1e, 0xc9, 0x19, 0x7e, 0xea, 0x6a, 0xfe, 0x00, 0xfd, 0xb9, 0xdd,\n  0x86, 0xf0, 0x88, 0xef, 0x5a, 0xeb, 0x04, 0xbe, 0xc7, 0xd6, 0x5e, 0xfd,\n  0xf8, 0xd8, 0x90, 0xc4, 0xec, 0xb7, 0x4b, 0xc9, 0xf9, 0xc2, 0x8f, 0xb6,\n  0xab, 0xc8, 0x33, 0xdb, 0xa7, 0xe4, 0x4b, 0xdb, 0x6b, 0xdc, 0xf8, 0xe0,\n  0x89, 0xea, 0xe0, 0xfc, 0xe9, 0x15, 0xcf, 0x36, 0xb6, 0x4d, 0x05, 0x4a,\n  0x15, 0x5a, 0x35, 0x54, 0x1e, 0x4b, 0xe9, 0x40, 0x8e, 0x20, 0x72, 0x12,\n  0x4c, 0xf2, 0xcb, 0xd9, 0x02, 0xf2, 0x40, 0xf5, 0xfe, 0x0e, 0x11, 0x1e,\n  0x7b, 0x18, 0xe6, 0xfb, 0x30, 0x0c, 0x08, 0x0a, 0x14, 0x04, 0x57, 0xf0,\n  0xec, 0xb9, 0x98, 0xba, 0x7b, 0xd4, 0x6d, 0xda, 0xe6, 0xf1, 0xe5, 0x04,\n  0x9e, 0x32, 0xdf, 0x29, 0xe1, 0x12, 0x77, 0x0e, 0xdc, 0x06, 0x88, 0x03,\n  0x2f, 0x08, 0x5e, 0xf6, 0xc6, 0xfc, 0x86, 0xfd, 0x9c, 0x06, 0x1c, 0xf3,\n  0x07, 0xd8, 0x1d, 0xfa, 0x4e, 0x04, 0x19, 0xef, 0x4b, 0xfd, 0x1e, 0x08,\n  0xa1, 0xda, 0x53, 0xce, 0x2c, 0xe3, 0x70, 0x19, 0xe8, 0x20, 0x61, 0x23,\n  0x55, 0xf7, 0x1f, 0xf5, 0x0b, 0x0b, 0x6e, 0x0a, 0x82, 0x20, 0xb5, 0x29,\n  0x62, 0x10, 0x1f, 0xf8, 0x2d, 0x19, 0x92, 0x1e, 0x91, 0xf8, 0xc7, 0xff,\n  0xdf, 0xfd, 0x8f, 0xf5, 0x3e, 0x02, 0x63, 0x00, 0x86, 0xf2, 0xe2, 0xbc,\n  0x11, 0xe1, 0x32, 0xdb, 0xaf, 0xd5, 0x7a, 0xbf, 0x90, 0xbf, 0x96, 0xde,\n  0x64, 0xf6, 0xb6, 0xef, 0xe9, 0x04, 0xec, 0x13, 0xd1, 0x06, 0x8b, 0x00,\n  0x23, 0x09, 0x75, 0xfb, 0x48, 0x15, 0xf3, 0x27, 0x42, 0x19, 0x59, 0x35,\n  0x25, 0x3f, 0xca, 0x4a, 0xdd, 0x20, 0x4a, 0x19, 0xd8, 0x10, 0x86, 0xf1,\n  0xd4, 0xcf, 0xbd, 0xda, 0x77, 0xef, 0x9f, 0xf9, 0x10, 0xfa, 0x84, 0xeb,\n  0x41, 0xf9, 0x15, 0x0f, 0x30, 0x0c, 0xe4, 0x01, 0x49, 0xf8, 0xdb, 0x2c,\n  0x78, 0x32, 0x7b, 0x31, 0x26, 0x21, 0xbe, 0x1d, 0x86, 0x1d, 0x60, 0x0d,\n  0x4c, 0x09, 0x66, 0xf7, 0xf5, 0xda, 0x40, 0xe2, 0xee, 0xed, 0xa2, 0xf6,\n  0x09, 0x0e, 0xaf, 0x16, 0x0f, 0x0e, 0x21, 0x1d, 0x4b, 0x09, 0x4d, 0xf3,\n  0xbc, 0xe4, 0xc8, 0xd7, 0xc0, 0xe7, 0x24, 0xd7, 0xab, 0xca, 0xfd, 0xbf,\n  0x27, 0xd2, 0x5c, 0xe1, 0x99, 0xe1, 0x5e, 0xd9, 0xd2, 0xfd, 0x7d, 0x06,\n  0x4d, 0xfc, 0xab, 0xe5, 0xbb, 0xff, 0x7a, 0x0f, 0x38, 0x13, 0xd9, 0x0b,\n  0xf0, 0xf7, 0x18, 0xe1, 0xf3, 0xd7, 0x30, 0xdf, 0x02, 0xec, 0x69, 0x06,\n  0x75, 0x22, 0x6a, 0x3a, 0x19, 0x55, 0x75, 0x43, 0x9c, 0x2c, 0x4d, 0x1c,\n  0x58, 0x19, 0xcf, 0x0b, 0x61, 0x12, 0xe6, 0x14, 0x5b, 0x0a, 0xc4, 0x10,\n  0x9d, 0x0b, 0x29, 0x17, 0x4a, 0x25, 0xf2, 0x11, 0x21, 0xf6, 0x39, 0xf5,\n  0x6e, 0xe0, 0x47, 0xca, 0x44, 0xce, 0x9f, 0xd7, 0x14, 0xe2, 0x9b, 0xf2,\n  0x5e, 0x17, 0x3e, 0x18, 0x45, 0xe1, 0x2e, 0xed, 0xcb, 0xf5, 0x9f, 0xda,\n  0xe8, 0xcd, 0x8d, 0xce, 0xe7, 0xdb, 0x81, 0xda, 0xcc, 0xec, 0x92, 0x01,\n  0xa0, 0x05, 0xb4, 0xfe, 0x49, 0xfc, 0x89, 0xf6, 0x37, 0x03, 0xdb, 0x08,\n  0xaf, 0x19, 0x43, 0x2e, 0x63, 0x14, 0x3c, 0xf8, 0x90, 0x0b, 0x53, 0x32,\n  0xba, 0x3d, 0x68, 0x3a, 0xa6, 0x17, 0x91, 0xf7, 0xb2, 0x02, 0xd6, 0xfe,\n  0xed, 0xed, 0x33, 0xf3, 0xc7, 0xd7, 0xbf, 0xee, 0xd1, 0xe6, 0xb9, 0xda,\n  0x9b, 0xe2, 0x61, 0xe9, 0x65, 0xfe, 0xe0, 0x19, 0xb0, 0x14, 0x23, 0x10,\n  0xd9, 0x25, 0xe7, 0x2e, 0x8e, 0x37, 0x4e, 0x14, 0xab, 0x10, 0xb3, 0xfa,\n  0x77, 0xec, 0x2f, 0xdd, 0x6d, 0xf1, 0x6f, 0x01, 0xa6, 0xff, 0xa8, 0x01,\n  0xbb, 0xfe, 0x75, 0xfe, 0x20, 0xed, 0xd7, 0xd7, 0x43, 0xe4, 0x91, 0xe9,\n  0x4b, 0xf6, 0x39, 0x06, 0xd5, 0x12, 0x72, 0x17, 0x40, 0x18, 0x8d, 0x0f,\n  0xa1, 0x1d, 0x6e, 0x1e, 0x53, 0x0f, 0xd4, 0x08, 0xcc, 0x0e, 0x4f, 0x1d,\n  0x4f, 0x20, 0xd3, 0x17, 0x75, 0x19, 0x3d, 0x1c, 0x6f, 0x22, 0x15, 0x16,\n  0x24, 0x02, 0x77, 0x02, 0x75, 0xfd, 0x94, 0xf1, 0x62, 0xe1, 0x02, 0xf7,\n  0xb4, 0xf1, 0xd6, 0xe3, 0xc5, 0xe0, 0xa3, 0xd5, 0x2f, 0xcc, 0xeb, 0xea,\n  0xce, 0xf9, 0xed, 0xf4, 0xe6, 0x04, 0xea, 0x00, 0x72, 0xf6, 0xc9, 0xf3,\n  0xad, 0xf8, 0xe0, 0xf2, 0x6f, 0xfd, 0xfc, 0x01, 0x5e, 0xeb, 0xd2, 0xd8,\n  0x8a, 0xd6, 0x45, 0xde, 0x18, 0xc9, 0xbc, 0xcb, 0xd4, 0xe3, 0x81, 0x0f,\n  0x6a, 0x14, 0xf3, 0x2f, 0xc4, 0x41, 0xce, 0x1c, 0xad, 0x20, 0x5c, 0x2f,\n  0x43, 0x15, 0xea, 0x16, 0xbf, 0x0f, 0x4b, 0x0b, 0x0c, 0xf4, 0xfd, 0xf1,\n  0x08, 0x0f, 0xd9, 0x00, 0xf6, 0xe7, 0xe4, 0xde, 0xc0, 0xe4, 0x48, 0xf0,\n  0x95, 0xeb, 0x56, 0x02, 0x38, 0x05, 0xda, 0xfa, 0x5f, 0xfb, 0x5f, 0xf7,\n  0x02, 0xda, 0xcc, 0xe4, 0xf5, 0xe8, 0x2f, 0x0a, 0x36, 0x09, 0x86, 0x06,\n  0xf2, 0x1b, 0x1d, 0x03, 0xe8, 0xfd, 0xa5, 0xfc, 0x76, 0xf9, 0x2e, 0x05,\n  0x65, 0x22, 0xca, 0x35, 0x10, 0x43, 0x4d, 0x36, 0xab, 0x19, 0xdb, 0x03,\n  0x00, 0x19, 0xdd, 0x09, 0x47, 0xf9, 0x45, 0xe7, 0x2c, 0xd5, 0x19, 0xcd,\n  0x62, 0xca, 0x68, 0xdc, 0xf8, 0xf9, 0xa7, 0xfe, 0xf1, 0xfc, 0x4d, 0x0b,\n  0x29, 0xfd, 0xf1, 0x04, 0xba, 0x14, 0x1b, 0x22, 0x5c, 0x16, 0x31, 0x03,\n  0x99, 0xfa, 0x3e, 0xec, 0x19, 0xf1, 0x28, 0xeb, 0xc3, 0xe2, 0x04, 0xde,\n  0xba, 0xe5, 0x2d, 0xe7, 0x49, 0xec, 0x1e, 0xdc, 0x20, 0xd8, 0x46, 0xe7,\n  0xd5, 0xf2, 0xa5, 0xfa, 0xde, 0x08, 0xd9, 0x11, 0x0f, 0x1d, 0x6d, 0x22,\n  0xdb, 0x23, 0x50, 0x26, 0x64, 0x37, 0x3b, 0x4f, 0x76, 0x52, 0xa0, 0x5d,\n  0x0a, 0x4e, 0xa5, 0x34, 0xb0, 0x2e, 0x78, 0x36, 0x81, 0x26, 0x3d, 0x17,\n  0x01, 0x15, 0x60, 0x10, 0x9f, 0x06, 0x33, 0xfa, 0x58, 0xf9, 0xde, 0xe2,\n  0xd8, 0xc6, 0xbb, 0xcc, 0x49, 0xdd, 0x60, 0xdc, 0xc2, 0xeb, 0x22, 0xdf,\n  0x2a, 0xd2, 0xea, 0xd8, 0xc5, 0xd7, 0x68, 0xc6, 0xb4, 0xba, 0xda, 0xc8,\n  0x7a, 0xed, 0xe8, 0xe2, 0x65, 0xe1, 0x39, 0xda, 0x28, 0xdd, 0xe8, 0xdd,\n  0x33, 0xcf, 0xc7, 0xdd, 0x42, 0xe4, 0x7f, 0xe9, 0xcd, 0xf3, 0xcd, 0x08,\n  0xda, 0x0f, 0xe1, 0x13, 0xac, 0x22, 0x60, 0x1d, 0x71, 0x1d, 0xbd, 0x17,\n  0x11, 0x01, 0x79, 0xf9, 0x7a, 0x00, 0x7a, 0x13, 0x1d, 0x23, 0xe8, 0x3c,\n  0xfb, 0x43, 0xfb, 0x27, 0xf7, 0x29, 0xa2, 0x38, 0xaa, 0x30, 0xd5, 0x26,\n  0x9f, 0x07, 0xfb, 0x0b, 0x8d, 0x1e, 0xac, 0x19, 0x3d, 0x10, 0x94, 0x16,\n  0x08, 0x15, 0x5e, 0x11, 0xef, 0x03, 0xdf, 0xf9, 0xed, 0xeb, 0x5e, 0xea,\n  0x72, 0xe3, 0x61, 0xce, 0x8f, 0xd2, 0x69, 0xd2, 0xa6, 0xd1, 0x84, 0xdb,\n  0xb3, 0xee, 0xb5, 0xdf, 0x9b, 0xda, 0x0d, 0xdc, 0x18, 0xc9, 0x72, 0xc5,\n  0x7a, 0xdb, 0x9b, 0xe8, 0xbc, 0xfa, 0xa1, 0x06, 0x8a, 0x0b, 0xd5, 0x03,\n  0x50, 0x0c, 0xa0, 0x23, 0xe7, 0x26, 0xf2, 0x1d, 0xfb, 0x12, 0x62, 0x07,\n  0xde, 0x09, 0xda, 0x0f, 0xe4, 0x19, 0x2c, 0x18, 0xb0, 0x05, 0xa9, 0x07,\n  0x4f, 0x1c, 0x93, 0x00, 0x1d, 0xf6, 0xf9, 0xfc, 0x9b, 0x02, 0x98, 0xf7,\n  0x33, 0xfa, 0x27, 0xf9, 0x31, 0xf5, 0x5e, 0xf0, 0x18, 0xe7, 0x50, 0xed,\n  0x20, 0xf3, 0xa7, 0xfe, 0x88, 0x07, 0x68, 0xfb, 0x1b, 0xf5, 0xaa, 0xfa,\n  0xda, 0x0b, 0xd3, 0x13, 0xb9, 0x27, 0x02, 0x29, 0xe5, 0x18, 0x85, 0x17,\n  0xb7, 0x0f, 0x39, 0x00, 0xe2, 0x07, 0x1f, 0xf8, 0x35, 0xee, 0x83, 0xf6,\n  0xd8, 0xf3, 0x94, 0xeb, 0xe3, 0xd2, 0xb5, 0xeb, 0xe1, 0xf0, 0xad, 0xe0,\n  0x9e, 0xe7, 0x87, 0xec, 0x59, 0xf8, 0x09, 0xfa, 0xa4, 0xfd, 0xf0, 0xfe,\n  0xc8, 0x07, 0xea, 0x13, 0xc6, 0x0d, 0x3f, 0x1b, 0x24, 0x17, 0x39, 0x07,\n  0x58, 0xfb, 0xb3, 0x05, 0x20, 0x10, 0x5f, 0x17, 0xc7, 0x25, 0xb6, 0x19,\n  0xd4, 0x2e, 0x14, 0x26, 0xd3, 0x0b, 0x44, 0x08, 0x10, 0xfc, 0x42, 0xfd,\n  0x24, 0xf5, 0xce, 0xe7, 0xfd, 0xf1, 0x81, 0xe1, 0x80, 0xda, 0x38, 0xe6,\n  0x48, 0xf9, 0x26, 0x0a, 0x78, 0x1f, 0xaf, 0x14, 0x88, 0x19, 0xe7, 0x2e,\n  0x99, 0x1a, 0x51, 0x0e, 0x5b, 0xfd, 0x9c, 0xf7, 0xc9, 0xec, 0x90, 0xf5,\n  0xaf, 0xf3, 0xb1, 0xec, 0x28, 0xf8, 0xbf, 0xeb, 0xb4, 0xf5, 0xcf, 0xf2,\n  0xca, 0xd5, 0xd9, 0xe5, 0xa8, 0xe4, 0x8b, 0xde, 0x9c, 0xea, 0x77, 0xf1,\n  0xa7, 0xe5, 0x46, 0xf1, 0x56, 0xfa, 0x10, 0x03, 0x35, 0x13, 0x30, 0x00,\n  0x6c, 0x01, 0x68, 0xf3, 0x61, 0xe5, 0xf2, 0xd7, 0x72, 0xe7, 0x82, 0xf6,\n  0xa6, 0x04, 0x36, 0x10, 0xa9, 0x1b, 0x21, 0x17, 0x93, 0x0a, 0x2a, 0x13,\n  0xca, 0x1a, 0xde, 0x0f, 0xf1, 0x0c, 0x8c, 0x01, 0x62, 0x17, 0x0d, 0x17,\n  0x44, 0x18, 0x45, 0x16, 0x08, 0x09, 0x13, 0x03, 0x4f, 0x07, 0x4d, 0x0b,\n  0x1c, 0x1b, 0x3a, 0x27, 0x38, 0x1b, 0x34, 0x1f, 0xc8, 0x1b, 0x0a, 0x0c,\n  0xad, 0xf0, 0x0b, 0xfd, 0x47, 0xf9, 0x05, 0xf5, 0x2d, 0xe1, 0x44, 0xdc,\n  0x7c, 0xe1, 0x31, 0xe1, 0x84, 0xda, 0x48, 0xd8, 0xe9, 0xef, 0x25, 0xfc,\n  0xb8, 0x02, 0x61, 0xff, 0x21, 0xff, 0x92, 0xf8, 0x51, 0xf8, 0xa5, 0xed,\n  0xbe, 0xec, 0x79, 0xe7, 0xd0, 0xec, 0xe1, 0xf4, 0xc4, 0xf2, 0x4b, 0x01,\n  0xda, 0x03, 0x2a, 0xfd, 0xb2, 0x0b, 0x30, 0x14, 0xba, 0x21, 0x9f, 0x33,\n  0x9d, 0x1d, 0x07, 0x21, 0xc4, 0x14, 0x01, 0x08, 0xb3, 0xf5, 0x66, 0x00,\n  0x03, 0x07, 0x77, 0x0f, 0x03, 0x15, 0xda, 0xfb, 0xf5, 0xee, 0xfb, 0xf9,\n  0x1c, 0xf7, 0xb0, 0xfa, 0xab, 0xec, 0xa6, 0xec, 0xd7, 0xf0, 0x0d, 0xf6,\n  0xe3, 0xf0, 0x8d, 0xf9, 0x89, 0xfb, 0xa6, 0xf9, 0x0c, 0x07, 0xd6, 0xf9,\n  0x30, 0xed, 0x1c, 0xe9, 0x57, 0xfc, 0xef, 0xfb, 0x67, 0xff, 0x32, 0x03,\n  0x48, 0xfc, 0x17, 0xfb, 0x1f, 0x05, 0x29, 0x10, 0x9e, 0x1f, 0xdc, 0x2c,\n  0x48, 0x26, 0x74, 0x1f, 0xb1, 0x2b, 0xa7, 0x20, 0x60, 0x0e, 0x1f, 0x04,\n  0x62, 0x00, 0x2b, 0xff, 0xe8, 0xfb, 0xb3, 0xf8, 0xe2, 0xf7, 0xd4, 0xfa,\n  0xb3, 0xfe, 0x24, 0xf8, 0xfe, 0xdc, 0x81, 0xd2, 0xbf, 0xdd, 0xe5, 0xe2,\n  0xe0, 0xe4, 0xf1, 0xe9, 0xb6, 0xeb, 0x75, 0xec, 0x08, 0xfb, 0xd8, 0xfa,\n  0x25, 0xf8, 0x72, 0xfa, 0xa4, 0xfa, 0x29, 0xfe, 0xb2, 0x05, 0x62, 0x05,\n  0x34, 0xff, 0x77, 0x02, 0xc6, 0x07, 0x7b, 0xfd, 0xcb, 0xf3, 0x3a, 0xfc,\n  0x03, 0x00, 0x2f, 0x06, 0x17, 0x09, 0xbe, 0x0d, 0xa9, 0x09, 0x23, 0x06,\n  0x0f, 0x0f, 0xe5, 0x1d, 0xf5, 0x21, 0x29, 0x24, 0xf2, 0x25, 0xa3, 0x13,\n  0xb0, 0x14, 0x1a, 0x17, 0x50, 0x12, 0x44, 0x18, 0x32, 0x14, 0x3f, 0x11,\n  0xa6, 0x01, 0xeb, 0xf9, 0x2b, 0xef, 0xbc, 0xf4, 0x5f, 0xfd, 0x81, 0xf3,\n  0x00, 0xe6, 0xac, 0xdf, 0x99, 0xe4, 0xb3, 0xe7, 0xa4, 0xdf, 0x3a, 0xd1,\n  0x33, 0xd5, 0xa7, 0xdc, 0xe1, 0xdf, 0x2c, 0xe7, 0xac, 0xef, 0x9e, 0xf1,\n  0x16, 0x02, 0xa4, 0xff, 0x29, 0xff, 0x67, 0x04, 0xbb, 0xf6, 0xdc, 0xf8,\n  0xea, 0x0a, 0x90, 0x0f, 0x12, 0x09, 0x26, 0x17, 0x66, 0x1b, 0x85, 0x18,\n  0xbb, 0x1d, 0x32, 0x10, 0x9b, 0xf9, 0xd1, 0xfe, 0xd2, 0xf9, 0xd5, 0xf9,\n  0x7a, 0x01, 0x00, 0x08, 0x99, 0x0b, 0xb6, 0xfd, 0x80, 0xff, 0x63, 0x03,\n  0x67, 0x0b, 0x09, 0x0b, 0x79, 0x08, 0x5f, 0x05, 0xbc, 0x0a, 0xea, 0x11,\n  0x18, 0x0f, 0xcf, 0x05, 0xc4, 0xf9, 0x42, 0xf1, 0x0c, 0xef, 0x00, 0xe9,\n  0x6b, 0xe1, 0x4a, 0xec, 0xdf, 0xf1, 0x8f, 0xfd, 0x42, 0xff, 0xf0, 0xf5,\n  0x8b, 0xe8, 0xb5, 0xee, 0x49, 0xf0, 0x64, 0xef, 0xdb, 0xfa, 0xed, 0xfa,\n  0xcb, 0x0b, 0x4c, 0x07, 0x93, 0x03, 0xf2, 0x01, 0x01, 0x06, 0xf8, 0x10,\n  0x3e, 0x1f, 0xb1, 0x1c, 0x3c, 0x1d, 0xf0, 0x1d, 0x9b, 0x20, 0x32, 0x20,\n  0x12, 0x19, 0x80, 0x14, 0x65, 0x0a, 0x1e, 0x02, 0xd3, 0xf6, 0x6d, 0xed,\n  0xd0, 0xf4, 0x59, 0xf9, 0x9d, 0x01, 0x24, 0x08, 0xf2, 0xfd, 0x06, 0xf6,\n  0xc4, 0xfa, 0x7a, 0xf8, 0x4a, 0xf2, 0xfb, 0xf0, 0xda, 0xec, 0x69, 0xf7,\n  0xa2, 0xf8, 0x94, 0x03, 0xa7, 0x0d, 0x60, 0x0a, 0xd9, 0x0a, 0x5b, 0x0c,\n  0xaf, 0x11, 0x60, 0x18, 0xaf, 0x14, 0x9e, 0x0c, 0xac, 0x0e, 0xa6, 0x08,\n  0xbc, 0x02, 0x03, 0xf9, 0x34, 0xff, 0x36, 0xf6, 0x87, 0xf8, 0xc0, 0xf5,\n  0x1b, 0xec, 0x92, 0xf0, 0x79, 0xe1, 0x5d, 0xdf, 0x91, 0xe3, 0x79, 0xda,\n  0x4a, 0xdf, 0xcd, 0xe8, 0xc4, 0xf6, 0x5a, 0x01, 0xf8, 0x01, 0xf6, 0xff,\n  0xcd, 0xfe, 0x23, 0x03, 0xb7, 0xf4, 0xdf, 0xfb, 0x76, 0x04, 0x56, 0x06,\n  0x4a, 0x09, 0xc1, 0xfe, 0xf0, 0x06, 0x14, 0xfe, 0xd4, 0xf6, 0x73, 0xfa,\n  0x47, 0x02, 0x34, 0x09, 0xae, 0x15, 0x36, 0x16, 0x33, 0x1f, 0xde, 0x1d,\n  0x8b, 0x24, 0x9b, 0x1d, 0x10, 0x14, 0x8d, 0x15, 0x8f, 0x0f, 0xa0, 0x0b,\n  0xc5, 0x0b, 0x2b, 0x02, 0x91, 0x03, 0x3e, 0x01, 0x90, 0xf6, 0x86, 0xf9,\n  0xcf, 0xfd, 0xdd, 0xf7, 0xd9, 0xee, 0xd6, 0xf0, 0xc5, 0xee, 0xc6, 0xe6,\n  0xf6, 0xf0, 0x8e, 0xf9, 0xc0, 0xf6, 0x02, 0xf3, 0xa9, 0xf1, 0xe5, 0xe8,\n  0x64, 0xe7, 0x28, 0xe9, 0x2c, 0xe2, 0xa0, 0xed, 0xcf, 0xed, 0x79, 0xe8,\n  0xef, 0xea, 0xae, 0xf4, 0x07, 0xf8, 0x63, 0xf9, 0xaa, 0xf3, 0xf9, 0xf7,\n  0x65, 0xfa, 0x70, 0xfc, 0xc5, 0x02, 0xd5, 0x09, 0xcb, 0x13, 0x05, 0x1a,\n  0xfc, 0x15, 0x30, 0x1f, 0x85, 0x2b, 0x1f, 0x25, 0xf5, 0x23, 0xee, 0x2d,\n  0x3d, 0x3d, 0x70, 0x35, 0x52, 0x31, 0xc9, 0x28, 0xe7, 0x18, 0x71, 0x0e,\n  0x95, 0x05, 0x16, 0x05, 0x72, 0xfb, 0x56, 0xf7, 0xda, 0xf6, 0xb9, 0xe9,\n  0x34, 0xe6, 0xe6, 0xed, 0x7f, 0xf4, 0x30, 0xf8, 0x50, 0xf4, 0xda, 0xeb,\n  0x73, 0xe7, 0xe9, 0xe0, 0x45, 0xe0, 0xba, 0xdf, 0xb2, 0xdf, 0x4d, 0xe7,\n  0x02, 0xec, 0x68, 0xe2, 0x98, 0xdc, 0x24, 0xe4, 0x8b, 0xe2, 0xb4, 0xe6,\n  0x2d, 0xed, 0x4c, 0xf6, 0x32, 0xfa, 0x3f, 0xfd, 0x3b, 0x02, 0x43, 0x12,\n  0xcd, 0x1b, 0xb1, 0x15, 0x9a, 0x13, 0x02, 0x0f, 0xb4, 0x11, 0x5b, 0x14,\n  0xb7, 0x17, 0xb8, 0x0f, 0x97, 0x07, 0xe5, 0x01, 0x1b, 0xff, 0x4a, 0x06,\n  0xfa, 0x03, 0x42, 0x01, 0x0e, 0xf8, 0x0f, 0xfd, 0x71, 0xff, 0x7b, 0xfc,\n  0x0f, 0x03, 0x8b, 0x03, 0xa8, 0xf8, 0xda, 0x05, 0xf8, 0x05, 0xe1, 0xfb,\n  0x80, 0xff, 0x1d, 0x08, 0x4b, 0x16, 0xc5, 0x12, 0xfa, 0x0f, 0x0d, 0xff,\n  0x80, 0xf1, 0x25, 0xf2, 0xad, 0xee, 0xe7, 0xf4, 0xe4, 0xf4, 0xa7, 0xfb,\n  0x4c, 0xf2, 0xf5, 0xf7, 0x9a, 0xfc, 0xff, 0x01, 0xa6, 0x03, 0x70, 0x0a,\n  0x40, 0x09, 0xec, 0x04, 0xa2, 0x03, 0x15, 0xf8, 0x9a, 0xfa, 0xa7, 0xfd,\n  0xb6, 0x07, 0x25, 0x0d, 0xc1, 0x05, 0x3e, 0xff, 0xb3, 0xfc, 0x48, 0xfa,\n  0x38, 0xf9, 0x17, 0xf8, 0xf7, 0xf2, 0x72, 0xf9, 0x93, 0x03, 0x5d, 0x08,\n  0x1c, 0x00, 0xe2, 0x06, 0xc5, 0x10, 0xf7, 0x0b, 0x6c, 0x07, 0x89, 0xfd,\n  0x44, 0xf4, 0x3a, 0xf6, 0x3b, 0xf9, 0x97, 0xf4, 0x70, 0xff, 0xa2, 0xf5,\n  0x36, 0xf3, 0xd1, 0xf9, 0xaa, 0xf6, 0x99, 0xf1, 0x21, 0xf8, 0xba, 0xfa,\n  0xdf, 0x09, 0xf6, 0x0c, 0x18, 0x0f, 0xef, 0x08, 0x93, 0x03, 0x23, 0x0b,\n  0x06, 0x09, 0x0a, 0x0c, 0x27, 0xfd, 0x6a, 0xf6, 0xbb, 0xf6, 0xc3, 0xf7,\n  0xc7, 0xf5, 0xdf, 0xfb, 0x2a, 0x08, 0x07, 0x11, 0x37, 0x11, 0x43, 0x1c,\n  0x6b, 0x1c, 0x4b, 0x15, 0xee, 0x13, 0x32, 0x10, 0x58, 0x14, 0xc2, 0x05,\n  0xea, 0x02, 0xf6, 0xf8, 0x99, 0xf3, 0xe7, 0xf6, 0x04, 0xf1, 0xb3, 0xf8,\n  0xa3, 0xf1, 0x22, 0xeb, 0x45, 0xf4, 0x04, 0xf7, 0x71, 0xf5, 0x60, 0xfd,\n  0xf7, 0x00, 0x86, 0x01, 0x71, 0x00, 0xa3, 0x05, 0x1d, 0x09, 0xa3, 0x01,\n  0x98, 0xf8, 0xcc, 0xfd, 0xe7, 0xfc, 0xf0, 0xf3, 0xdf, 0xf5, 0xa8, 0xfb,\n  0xdc, 0xf8, 0x4b, 0xf6, 0x42, 0xf6, 0x46, 0x02, 0xd4, 0x04, 0x21, 0x03,\n  0xdd, 0xfc, 0x65, 0xf4, 0x55, 0xec, 0x4a, 0xeb, 0xb3, 0xee, 0xb2, 0xf6,\n  0x3a, 0x02, 0xad, 0x01, 0x39, 0x02, 0xa1, 0x06, 0x26, 0x0b, 0xdb, 0x06,\n  0xef, 0x01, 0xec, 0xfa, 0x8e, 0xf7, 0xcf, 0xf6, 0xaa, 0xff, 0xf6, 0x03,\n  0x20, 0x10, 0x18, 0x0d, 0x03, 0x0b, 0x6a, 0x14, 0x0c, 0x10, 0x4f, 0x0d,\n  0x4a, 0x10, 0xbf, 0x09, 0xa3, 0x0f, 0xc1, 0x10, 0x4f, 0x10, 0x1f, 0x06,\n  0xb6, 0xfe, 0xcc, 0xff, 0x68, 0xec, 0x81, 0xe3, 0xa0, 0xe7, 0xed, 0xf4,\n  0xd6, 0xfa, 0xa8, 0xff, 0xa2, 0xf7, 0xf1, 0xf2, 0xb2, 0xfb, 0x1f, 0xf6,\n  0xbf, 0xec, 0xe9, 0xe8, 0x0b, 0xf2, 0x78, 0xf6, 0xd2, 0xf6, 0x8f, 0xf9,\n  0xe2, 0xf9, 0x4c, 0xfb, 0xaa, 0xff, 0x5c, 0x04, 0x4f, 0x0b, 0x0f, 0x13,\n  0x2b, 0x13, 0x7f, 0x17, 0x01, 0x23, 0x66, 0x1d, 0x03, 0x1c, 0x80, 0x22,\n  0x62, 0x1b, 0x3e, 0x16, 0xc0, 0x0e, 0xb0, 0x18, 0xab, 0x14, 0x00, 0x0e,\n  0x03, 0x05, 0xc5, 0x01, 0xfb, 0x02, 0x5f, 0xfc, 0x48, 0xfc, 0x5c, 0xf7,\n  0xeb, 0xfb, 0x04, 0xfb, 0xb9, 0xf6, 0x3c, 0xef, 0x3b, 0xec, 0x25, 0xed,\n  0xb1, 0xe2, 0x5d, 0xe3, 0x8f, 0xdc, 0x9d, 0xe3, 0x91, 0xe2, 0x72, 0xe3,\n  0x03, 0xe9, 0x1e, 0xf2, 0x76, 0xf7, 0xef, 0xfc, 0x50, 0x03, 0x24, 0x11,\n  0x7e, 0x14, 0x5e, 0x15, 0xb2, 0x1f, 0x31, 0x22, 0x89, 0x18, 0x95, 0x1e,\n  0xef, 0x1f, 0x75, 0x15, 0x41, 0x11, 0xa0, 0x09, 0x3b, 0x02, 0x12, 0xfa,\n  0x3c, 0xfa, 0x7f, 0xf3, 0x2c, 0xf2, 0xf4, 0xf1, 0xd7, 0xe8, 0x75, 0xe0,\n  0xff, 0xe0, 0x5e, 0xe6, 0x1e, 0xe5, 0xc6, 0xde, 0xe0, 0xe0, 0x6c, 0xe4,\n  0x81, 0xe7, 0xbf, 0xea, 0x92, 0xf5, 0x52, 0xf8, 0x47, 0xfc, 0x03, 0x00,\n  0x9a, 0xf7, 0x72, 0xf5, 0xae, 0xfe, 0xc1, 0x08, 0x29, 0x13, 0x77, 0x1b,\n  0x9d, 0x13, 0xc9, 0x06, 0x4f, 0x0d, 0x08, 0x11, 0x3d, 0x0d, 0x10, 0x0e,\n  0x5f, 0x00, 0xd4, 0xf7, 0x0c, 0xf8, 0xa5, 0xf9, 0x0f, 0xfa, 0xbd, 0xf6,\n  0xa3, 0xfa, 0x7d, 0x02, 0xd1, 0x01, 0xf5, 0xfa, 0x95, 0xf5, 0x0f, 0xff,\n  0x7f, 0x03, 0x41, 0x00, 0x35, 0xff, 0x43, 0xf8, 0x50, 0xf7, 0x6a, 0xf8,\n  0xa9, 0xfd, 0x93, 0x03, 0xef, 0x0e, 0xe8, 0x11, 0xea, 0x14, 0x68, 0x1d,\n  0x2c, 0x14, 0x25, 0x0d, 0x78, 0x0d, 0xc8, 0x0a, 0x33, 0x0e, 0x36, 0x0d,\n  0x73, 0x03, 0xb8, 0xfb, 0xb6, 0xfa, 0x1b, 0x01, 0x8a, 0x02, 0xd5, 0x01,\n  0xa5, 0xff, 0x69, 0xff, 0xf7, 0xf9, 0xbf, 0xf6, 0x49, 0xf6, 0x8c, 0xf6,\n  0x25, 0xfa, 0x43, 0xf6, 0x78, 0xef, 0x7d, 0xef, 0xbd, 0xf6, 0xc4, 0x00,\n  0x04, 0x03, 0xcc, 0xfd, 0xb3, 0xf3, 0x28, 0xec, 0x7a, 0xef, 0x48, 0xef,\n  0xaa, 0xee, 0xa8, 0xee, 0xe3, 0xef, 0xb8, 0xfa, 0x97, 0x00, 0x18, 0x05,\n  0x9d, 0x04, 0x53, 0xfb, 0x76, 0x00, 0x16, 0x02, 0x82, 0xff, 0x77, 0x03,\n  0xad, 0x07, 0xbe, 0x0f, 0x25, 0x12, 0x56, 0x12, 0xaa, 0x16, 0xc3, 0x15,\n  0x73, 0x12, 0xe0, 0x15, 0xd7, 0x1b, 0xe7, 0x1a, 0x8f, 0x15, 0x58, 0x16,\n  0x2d, 0x11, 0xeb, 0x0e, 0x0e, 0x0a, 0xdf, 0x06, 0xdb, 0x02, 0x65, 0xfc,\n  0x1f, 0xff, 0x4c, 0xfd, 0xfa, 0xf8, 0xc0, 0xf8, 0x80, 0xfc, 0x19, 0xf9,\n  0x58, 0xf2, 0x4b, 0xee, 0x73, 0xf5, 0x71, 0xf6, 0xe4, 0xf5, 0x9b, 0xf4,\n  0xbb, 0xe7, 0x7b, 0xe3, 0xad, 0xeb, 0x78, 0xf3, 0x8f, 0xf9, 0x5a, 0xfb,\n  0x05, 0xf0, 0xb8, 0xec, 0xd5, 0xf1, 0x41, 0xf6, 0xfa, 0xf7, 0x6c, 0xfb,\n  0x00, 0xfd, 0xb3, 0x04, 0x87, 0x04, 0xb4, 0xff, 0x68, 0xfe, 0x6d, 0x02,\n  0xf5, 0x01, 0xb5, 0x07, 0x77, 0x0a, 0x33, 0x0e, 0x57, 0x0c, 0x9e, 0x0b,\n  0x73, 0x13, 0xf8, 0x19, 0x05, 0x1a, 0xe9, 0x1a, 0xda, 0x1d, 0x3b, 0x1d,\n  0x65, 0x1c, 0x4a, 0x17, 0x99, 0x0e, 0x39, 0x06, 0x84, 0xfe, 0x08, 0xfa,\n  0x68, 0xfe, 0xd8, 0xfc, 0x02, 0xfc, 0x4e, 0xf5, 0x30, 0xed, 0x08, 0xed,\n  0xcf, 0xef, 0xf2, 0xed, 0x6b, 0xe9, 0xde, 0xe6, 0x4d, 0xeb, 0x7e, 0xe5,\n  0xb2, 0xe7, 0xa6, 0xe5, 0x6a, 0xec, 0xe8, 0xf3, 0xd3, 0xef, 0x43, 0xf2,\n  0x0a, 0xf6, 0x62, 0xfb, 0x2f, 0xfc, 0x78, 0xff, 0x39, 0x04, 0xd6, 0x05,\n  0xde, 0x08, 0x6b, 0x0e, 0x78, 0x11, 0xed, 0x14, 0x48, 0x15, 0xf2, 0x18,\n  0xc9, 0x21, 0x9c, 0x20, 0xf6, 0x1b, 0xcb, 0x18, 0xc3, 0x1e, 0x1f, 0x1f,\n  0xda, 0x19, 0x40, 0x15, 0x61, 0x0a, 0x4c, 0x08, 0xd1, 0x03, 0xa8, 0xfd,\n  0x1b, 0xf6, 0x68, 0xf2, 0x9d, 0xf6, 0xf3, 0xf5, 0x9e, 0xf4, 0x04, 0xf1,\n  0xde, 0xf4, 0xf1, 0xf3, 0x24, 0xf2, 0xed, 0xe9, 0x5f, 0xee, 0x46, 0xee,\n  0x9e, 0xea, 0xfb, 0xe9, 0xbe, 0xea, 0x12, 0xf2, 0x31, 0xf5, 0xca, 0xf8,\n  0x54, 0xfb, 0x67, 0xfd, 0x83, 0x01, 0xd4, 0x07, 0x65, 0x06, 0xa7, 0x09,\n  0xc0, 0x0d, 0x46, 0x0c, 0x13, 0x06, 0x0a, 0x08, 0x28, 0x06, 0x1a, 0x03,\n  0x9a, 0x07, 0x46, 0x00, 0x4c, 0xf7, 0x94, 0xf8, 0xdb, 0xf9, 0xd6, 0xfb,\n  0x30, 0xf9, 0xe1, 0xf1, 0x13, 0xf3, 0xaf, 0xf4, 0xdd, 0xf5, 0xcd, 0xf7,\n  0xbe, 0xfb, 0xb7, 0xfe, 0xc8, 0x07, 0x6f, 0x05, 0xdb, 0xff, 0xcc, 0xfa,\n  0x7a, 0xfd, 0x3c, 0xff, 0x45, 0xfd, 0x95, 0xfe, 0x98, 0xfb, 0x8c, 0xf9,\n  0xb2, 0xfd, 0xa9, 0x02, 0xa3, 0xfe, 0x99, 0xf9, 0x3b, 0xfd, 0x48, 0x08,\n  0x1e, 0x0b, 0xbb, 0x0a, 0x23, 0x06, 0xbb, 0xfe, 0x4f, 0xff, 0x5c, 0xfc,\n  0x23, 0x00, 0x4a, 0x01, 0xe3, 0x01, 0xb0, 0xfe, 0x10, 0xfc, 0x80, 0xf9,\n  0x3e, 0xf6, 0xcf, 0xfc, 0x0c, 0xfe, 0x41, 0x00, 0x61, 0x04, 0x36, 0x05,\n  0xcf, 0x09, 0x62, 0x08, 0xde, 0x08, 0x82, 0x06, 0x8c, 0x04, 0x91, 0x04,\n  0x60, 0x05, 0xb5, 0x07, 0x38, 0x07, 0x8d, 0x0a, 0x24, 0x07, 0xef, 0x07,\n  0x4c, 0x0d, 0xf6, 0x0b, 0x34, 0x0e, 0x52, 0x0c, 0x3d, 0x08, 0x48, 0x07,\n  0x54, 0x06, 0x0b, 0x07, 0x7d, 0x07, 0xf5, 0x08, 0x8f, 0x09, 0xb6, 0x0d,\n  0xc0, 0x08, 0xca, 0x07, 0xcc, 0x05, 0xe4, 0xff, 0x16, 0xfa, 0x75, 0xfe,\n  0x79, 0x02, 0x90, 0x03, 0x68, 0x00, 0x5b, 0xfc, 0x50, 0xf6, 0x30, 0xf5,\n  0x8f, 0xf2, 0x04, 0xf1, 0x13, 0xee, 0xc6, 0xe9, 0x1a, 0xe9, 0x3d, 0xe6,\n  0xe7, 0xe5, 0xf4, 0xe7, 0x51, 0xe9, 0x03, 0xf1, 0x7a, 0xf1, 0xad, 0xed,\n  0x88, 0xec, 0x7e, 0xee, 0xa9, 0xeb, 0x11, 0xed, 0xcc, 0xed, 0xd4, 0xee,\n  0x4a, 0xf4, 0x26, 0xf7, 0x78, 0xfc, 0xaa, 0x02, 0x1a, 0x09, 0x5e, 0x0d,\n  0x10, 0x0e, 0xbe, 0x0e, 0x97, 0x10, 0x77, 0x0e, 0x31, 0x0a, 0xc0, 0x0b,\n  0xa2, 0x10, 0x80, 0x12, 0xce, 0x10, 0xb5, 0x0f, 0x75, 0x09, 0x71, 0x04,\n  0x72, 0x07, 0x4b, 0x07, 0x5f, 0x09, 0x45, 0x0a, 0x17, 0x08, 0x06, 0x05,\n  0xf1, 0x03, 0x88, 0x05, 0xaf, 0x04, 0x0d, 0x02, 0x4c, 0x05, 0xa7, 0x00,\n  0x44, 0xfe, 0x33, 0xfd, 0xec, 0xfa, 0x41, 0xf7, 0x9d, 0xf8, 0xae, 0xf7,\n  0x05, 0xfd, 0x36, 0x00, 0x5b, 0x00, 0x09, 0x02, 0xe6, 0xf9, 0x84, 0xf6,\n  0x95, 0xf3, 0x6f, 0xf0, 0x1e, 0xf2, 0xd1, 0xf7, 0x39, 0xf9, 0x91, 0xfe,\n  0x2d, 0x04, 0xf6, 0xfe, 0x2a, 0xfe, 0x6e, 0xfd, 0x15, 0xf8, 0x7a, 0xf6,\n  0xa8, 0xf6, 0x29, 0xf6, 0xa8, 0xf8, 0xca, 0xf9, 0x41, 0x00, 0xb2, 0xfe,\n  0x63, 0xfd, 0xe9, 0xff, 0x32, 0x07, 0xac, 0x0b, 0xca, 0x0d, 0x10, 0x09,\n  0x3c, 0x0e, 0xfa, 0x13, 0xbb, 0x11, 0x74, 0x0f, 0x9d, 0x08, 0x65, 0x06,\n  0xfc, 0x00, 0x4c, 0x04, 0xfb, 0x05, 0x15, 0x08, 0x8f, 0x09, 0x34, 0xff,\n  0x00, 0xfe, 0xaa, 0x02, 0xe8, 0xff, 0x92, 0x00, 0x85, 0xff, 0xa4, 0x01,\n  0x27, 0x06, 0x7d, 0x03, 0xd8, 0x06, 0xd2, 0x0a, 0x2b, 0x09, 0xf0, 0x09,\n  0xb8, 0x0d, 0x3b, 0x0a, 0xfd, 0x09, 0xc6, 0x07, 0x1c, 0x02, 0x68, 0xfa,\n  0x9d, 0xf9, 0x25, 0xf8, 0xd1, 0xf6, 0x92, 0xf7, 0x94, 0xef, 0x51, 0xed,\n  0x77, 0xef, 0x24, 0xee, 0xc3, 0xf0, 0xfb, 0xed, 0x55, 0xf1, 0xd7, 0xf3,\n  0xec, 0xf1, 0x7f, 0xf1, 0x21, 0xf8, 0xe3, 0xfc, 0xd8, 0xfb, 0xc1, 0x00,\n  0x26, 0xfd, 0xec, 0xfa, 0x62, 0xf9, 0xdf, 0x00, 0x28, 0x02, 0x06, 0x06,\n  0xe0, 0x02, 0x21, 0xfc, 0xe0, 0xfe, 0x53, 0xfe, 0xea, 0xfd, 0xb0, 0x00,\n  0xac, 0x05, 0x06, 0x0c, 0xf1, 0x0a, 0xad, 0x0d, 0x3c, 0x11, 0x46, 0x07,\n  0xff, 0x05, 0xf5, 0x04, 0x96, 0x03, 0xc8, 0x02, 0x8e, 0xff, 0x43, 0x02,\n  0xa4, 0x00, 0x06, 0xfe, 0x04, 0xfd, 0xa6, 0xfd, 0x6c, 0xfc, 0xa9, 0xfd,\n  0x49, 0xfd, 0x36, 0x01, 0x24, 0x07, 0x43, 0x07, 0x65, 0x03, 0x14, 0x07,\n  0x2b, 0x05, 0xed, 0x01, 0x89, 0xff, 0xe9, 0xfa, 0xe9, 0xf6, 0xa3, 0xf8,\n  0x0d, 0xfc, 0x51, 0xf8, 0x19, 0xfc, 0x84, 0xf8, 0xb4, 0xf5, 0x61, 0xf7,\n  0x47, 0xf3, 0xbd, 0xf3, 0xc1, 0xf7, 0x0a, 0xf7, 0xc9, 0xfa, 0xee, 0xfb,\n  0x54, 0xfe, 0x27, 0x01, 0xd0, 0x00, 0x93, 0x02, 0xe7, 0x06, 0xdc, 0x08,\n  0xe8, 0x0c, 0x83, 0x0c, 0x0a, 0x0c, 0x9e, 0x0e, 0x94, 0x0b, 0x6f, 0x0a,\n  0x78, 0x01, 0x24, 0xfe, 0x73, 0x01, 0xb6, 0x01, 0xfb, 0x01, 0x4c, 0x01,\n  0x9c, 0x03, 0x1d, 0xfe, 0x40, 0xf9, 0xdd, 0xf9, 0x38, 0xf6, 0x6d, 0xf6,\n  0x70, 0xf7, 0x55, 0xf9, 0x9c, 0xf9, 0x70, 0xfe, 0x7f, 0x00, 0x6e, 0xfc,\n  0x04, 0xfb, 0x80, 0xfd, 0x9e, 0xfd, 0x4f, 0xfe, 0xee, 0xfd, 0x29, 0xfb,\n  0x42, 0xfc, 0x31, 0xfd, 0xa3, 0xfe, 0x2f, 0x00, 0x85, 0xfe, 0xd4, 0xfe,\n  0x4f, 0x03, 0x1a, 0x03, 0xd2, 0x04, 0x99, 0x07, 0x51, 0x0b, 0x69, 0x11,\n  0xb9, 0x0d, 0x9f, 0x0d, 0x9a, 0x0d, 0x0b, 0x0b, 0xe2, 0x06, 0xdc, 0x05,\n  0xc0, 0x05, 0x8b, 0x00, 0xa1, 0x01, 0x7e, 0xfe, 0xcb, 0xfc, 0x18, 0xfd,\n  0x7a, 0xfa, 0x42, 0xfc, 0xf9, 0xf9, 0xdb, 0xfa, 0xbc, 0xfa, 0xdc, 0xfa,\n  0x2a, 0xfa, 0xc0, 0xfa, 0x87, 0xfa, 0x2f, 0xff, 0x59, 0x00, 0x6a, 0x04,\n  0x73, 0x04, 0x3e, 0x03, 0x48, 0x06, 0x05, 0x0c, 0x1d, 0x0b, 0xd4, 0x0a,\n  0xd7, 0x0b, 0x4e, 0x0d, 0x6c, 0x09, 0x73, 0x04, 0x3b, 0x07, 0x07, 0x02,\n  0x1c, 0xfd, 0x6f, 0xfb, 0x8d, 0xfb, 0x85, 0xf7, 0xd1, 0xf5, 0x38, 0xf8,\n  0x0d, 0xfa, 0x20, 0xf9, 0xb4, 0xf8, 0x55, 0xf6, 0x01, 0xf3, 0x8f, 0xf0,\n  0x13, 0xed, 0xcf, 0xec, 0xdc, 0xeb, 0x43, 0xec, 0x63, 0xed, 0xd8, 0xf0,\n  0x45, 0xf6, 0xb3, 0xf6, 0x16, 0xf6, 0x6b, 0xf9, 0x0d, 0xfa, 0x23, 0xfb,\n  0x0d, 0xf8, 0xab, 0xfa, 0xfb, 0xfb, 0x8d, 0x00, 0x41, 0x02, 0xbf, 0x06,\n  0x11, 0x0a, 0x50, 0x07, 0xcb, 0x09, 0x84, 0x0c, 0x91, 0x0b, 0x62, 0x0e,\n  0x5a, 0x10, 0x62, 0x10, 0xb6, 0x12, 0xdc, 0x0f, 0x27, 0x0f, 0x6d, 0x0a,\n  0x04, 0x0a, 0xd9, 0x08, 0xe3, 0x07, 0x8a, 0x07, 0x48, 0x06, 0x20, 0x05,\n  0x2b, 0x07, 0x89, 0x02, 0x40, 0xfe, 0x3f, 0xfc, 0x1f, 0xf9, 0x31, 0xf7,\n  0x23, 0xf8, 0xe9, 0xfa, 0xca, 0xf9, 0x6f, 0xfc, 0x2a, 0xfb, 0x6d, 0xf8,\n  0x91, 0xf9, 0x21, 0xfa, 0x39, 0xfb, 0xc5, 0xfb, 0x32, 0xfd, 0xd8, 0x02,\n  0x96, 0x00, 0xce, 0x01, 0x18, 0x00, 0x34, 0xff, 0x92, 0x00, 0x8d, 0x01,\n  0xf2, 0x04, 0x5c, 0x07, 0x5d, 0x06, 0xdc, 0x07, 0x1a, 0x09, 0xc9, 0x09,\n  0x2b, 0x08, 0x6f, 0x08, 0x0a, 0x09, 0x01, 0x0a, 0xef, 0x08, 0x0b, 0x09,\n  0x74, 0x05, 0x67, 0x01, 0x35, 0x01, 0x1f, 0xfe, 0x3a, 0xfb, 0xdb, 0xf9,\n  0x74, 0xf8, 0xec, 0xf6, 0xa6, 0xf0, 0xc6, 0xf1, 0x9f, 0xf3, 0x2c, 0xf3,\n  0x3d, 0xf4, 0x64, 0xf7, 0xb6, 0xfa, 0x41, 0xfe, 0xdb, 0xfe, 0x10, 0xfc,\n  0x03, 0xfc, 0xef, 0xff, 0x3a, 0x00, 0x55, 0x02, 0x57, 0x00, 0x42, 0x02,\n  0x8d, 0xfe, 0xe2, 0xf8, 0x0c, 0xf8, 0x84, 0xfb, 0x1a, 0xfe, 0xbf, 0xfe,\n  0x08, 0xfb, 0x64, 0xfc, 0x1b, 0xfd, 0xde, 0xf9, 0xa6, 0xfb, 0x17, 0x00,\n  0x69, 0x03, 0x59, 0x05, 0xef, 0x02, 0xa2, 0xfe, 0x27, 0xff, 0xa1, 0xff,\n  0x84, 0xff, 0x9c, 0x00, 0xaf, 0xfe, 0xe0, 0xfc, 0x3e, 0xfd, 0x4c, 0xfe,\n  0xcb, 0xfc, 0x85, 0x00, 0x0e, 0x02, 0xb9, 0x00, 0xea, 0x00, 0x81, 0x03,\n  0x0b, 0x04, 0x4d, 0x03, 0x69, 0x04, 0xcf, 0x03, 0x2d, 0x02, 0xa6, 0xfe,\n  0xed, 0xfb, 0xe4, 0xfa, 0x4a, 0xfa, 0x1e, 0xfb, 0xd4, 0xfb, 0xc0, 0xfb,\n  0x1b, 0xfa, 0xba, 0xfa, 0x63, 0xfb, 0xfd, 0xfd, 0x70, 0x00, 0xde, 0x03,\n  0xb7, 0x00, 0x9b, 0xfd, 0xf3, 0xff, 0x4e, 0xfc, 0x2a, 0xfe, 0x77, 0xfa,\n  0x03, 0xfd, 0xe9, 0xfd, 0xd9, 0xf7, 0x7c, 0xf8, 0x41, 0xfa, 0x38, 0xfc,\n  0xe0, 0xfd, 0x24, 0x00, 0xde, 0x02, 0xd4, 0x07, 0x00, 0x08, 0xfc, 0x09,\n  0x8a, 0x0a, 0x97, 0x0b, 0xa0, 0x0a, 0x66, 0x08, 0xff, 0x06, 0x1d, 0x09,\n  0xce, 0x09, 0xed, 0x07, 0x78, 0x09, 0x09, 0x06, 0xa4, 0x00, 0xe2, 0xfd,\n  0x85, 0xfe, 0xec, 0x00, 0xea, 0xfe, 0x94, 0xfe, 0x9e, 0xfc, 0x2f, 0xfe,\n  0x6d, 0xfe, 0xc8, 0xff, 0x0e, 0x00, 0x93, 0xfd, 0x7c, 0xff, 0x59, 0xfd,\n  0x9f, 0xf8, 0xb1, 0xf9, 0x39, 0xfa, 0x19, 0xfd, 0xd5, 0xfd, 0xc0, 0xff,\n  0x01, 0xfe, 0xf6, 0xfe, 0x34, 0xff, 0x8e, 0xfd, 0x4f, 0xff, 0x49, 0xff,\n  0x94, 0xff, 0xd6, 0x00, 0x2d, 0x04, 0x28, 0x02, 0xa0, 0x01, 0x78, 0x02,\n  0xaa, 0x02, 0xc6, 0x04, 0x2e, 0x03, 0x7a, 0xff, 0x77, 0x00, 0x54, 0xfe,\n  0x4f, 0xfe, 0x6a, 0x00, 0xac, 0x01, 0xda, 0x03, 0x43, 0x00, 0x96, 0xfc,\n  0x1a, 0xfc, 0xb8, 0xfb, 0x41, 0xfb, 0x56, 0xfa, 0xba, 0xfb, 0x7c, 0xfb,\n  0xa8, 0xfb, 0x6a, 0xfa, 0xaa, 0xfb, 0xb7, 0xf7, 0xbb, 0xf6, 0xe2, 0xf8,\n  0x72, 0xfc, 0x60, 0xff, 0x2c, 0x04, 0x87, 0x07, 0x74, 0x04, 0x2d, 0x06,\n  0x4a, 0x07, 0x41, 0x04, 0x66, 0x02, 0x61, 0x01, 0xb9, 0x00, 0x31, 0xfe,\n  0x6c, 0xfc, 0xca, 0xfb, 0xb3, 0xff, 0x08, 0x02, 0xdc, 0x01, 0x69, 0x01,\n  0x40, 0x01, 0x15, 0x03, 0xd6, 0xff, 0x1e, 0xfe, 0x2d, 0xfd, 0x61, 0x00,\n  0x9f, 0x01, 0x06, 0x02, 0x0d, 0x01, 0xc9, 0xfc, 0x2d, 0xff, 0xc8, 0x01,\n  0x07, 0x03, 0xf2, 0x03, 0xde, 0x05, 0x6a, 0x02, 0x6c, 0x02, 0x5c, 0x03,\n  0x81, 0x03, 0x1c, 0x04, 0x8f, 0x04, 0xeb, 0x03, 0xac, 0x01, 0xc5, 0xff,\n  0x18, 0xfd, 0x80, 0xfc, 0xbe, 0xfc, 0x84, 0xfa, 0x5c, 0xf9, 0xb3, 0xfb,\n  0xc4, 0xfc, 0xa7, 0xfa, 0x13, 0xf9, 0x7d, 0xf7, 0xbd, 0xfa, 0x95, 0xfb,\n  0xf7, 0xf9, 0xc9, 0xf8, 0xaf, 0xf8, 0x2c, 0xfb, 0x6d, 0xfa, 0x4b, 0xfc,\n  0xe8, 0xfe, 0x23, 0x03, 0x0e, 0x05, 0xbd, 0x06, 0x68, 0x07, 0x07, 0x0a,\n  0x69, 0x0b, 0x02, 0x0c, 0x08, 0x0c, 0x00, 0x0a, 0x94, 0x08, 0x67, 0x0b,\n  0x39, 0x0a, 0x0f, 0x0a, 0x47, 0x09, 0xe1, 0x06, 0x19, 0x07, 0xb4, 0x04,\n  0x46, 0x01, 0xbc, 0xfd, 0x4e, 0xfd, 0x13, 0xfe, 0xfb, 0xfd, 0xa0, 0xfb,\n  0x2f, 0xfa, 0xd1, 0xfa, 0x04, 0xfc, 0x70, 0xfc, 0x07, 0xfc, 0xf9, 0xfc,\n  0x21, 0xff, 0x2a, 0x00, 0x0b, 0x00, 0x7c, 0x01, 0x17, 0x04, 0xfd, 0x04,\n  0x51, 0x05, 0x19, 0x07, 0xc2, 0x09, 0x57, 0x06, 0xa6, 0x03, 0xa1, 0x00,\n  0x25, 0xfb, 0xfe, 0xf9, 0xec, 0xf8, 0xa3, 0xf9, 0x28, 0xf9, 0x3f, 0xf6,\n  0x4b, 0xf4, 0x37, 0xf3, 0xb5, 0xf2, 0x25, 0xf6, 0x96, 0xf8, 0x3f, 0xf9,\n  0x3f, 0xf9, 0x32, 0xf6, 0x98, 0xf3, 0x71, 0xf4, 0xb4, 0xf8, 0x60, 0xf9,\n  0x03, 0xf9, 0xe6, 0xf8, 0x0b, 0xfb, 0x73, 0xfc, 0xe7, 0xfd, 0x0e, 0xff,\n  0xa1, 0xfc, 0x20, 0xfe, 0x3a, 0xff, 0x5b, 0x00, 0xd9, 0x02, 0x8f, 0x04,\n  0xe9, 0x05, 0x37, 0x07, 0xb6, 0x0a, 0x65, 0x0b, 0x03, 0x0b, 0x70, 0x0a,\n  0x91, 0x07, 0xd3, 0x08, 0xd6, 0x07, 0x91, 0x07, 0x28, 0x09, 0x30, 0x0a,\n  0x5b, 0x0c, 0x40, 0x0d, 0x86, 0x0d, 0x65, 0x0c, 0x9b, 0x0c, 0xb2, 0x0c,\n  0x12, 0x0b, 0x99, 0x0b, 0x3a, 0x0d, 0x47, 0x0a, 0x38, 0x09, 0x37, 0x08,\n  0x43, 0x05, 0x37, 0x01, 0x56, 0x00, 0x9d, 0xff, 0xba, 0xfd, 0xd1, 0xfa,\n  0x90, 0xf7, 0x40, 0xf5, 0x47, 0xf3, 0xd8, 0xf3, 0x5a, 0xf3, 0xf2, 0xf2,\n  0x73, 0xf1, 0xcc, 0xed, 0x63, 0xee, 0xba, 0xef, 0xb1, 0xf0, 0xee, 0xf2,\n  0x5f, 0xf3, 0xf7, 0xf5, 0x45, 0xf6, 0x91, 0xf6, 0x81, 0xfa, 0xa8, 0xfa,\n  0x0f, 0xfc, 0xad, 0xfd, 0xe2, 0xfb, 0x13, 0xfc, 0xff, 0xff, 0x42, 0x01,\n  0xcd, 0x01, 0x5c, 0x01, 0xde, 0x01, 0x1c, 0x04, 0x83, 0x03, 0x42, 0x01,\n  0x53, 0xfe, 0x29, 0x02, 0xf9, 0x03, 0x4e, 0x04, 0x1c, 0x04, 0x84, 0x01,\n  0xdf, 0xff, 0xd3, 0xff, 0x28, 0x01, 0xa4, 0x03, 0x67, 0x06, 0x32, 0x06,\n  0x20, 0x08, 0xf5, 0x08, 0x20, 0x09, 0x73, 0x08, 0x1f, 0x09, 0x7c, 0x09,\n  0x07, 0x08, 0x20, 0x07, 0xe6, 0x03, 0x41, 0x02, 0x8e, 0x01, 0xd3, 0xfe,\n  0x52, 0xfc, 0x25, 0xfc, 0x9a, 0xfd, 0xfa, 0xfd, 0xd8, 0xfc, 0xf4, 0xfb,\n  0x89, 0xfc, 0xdb, 0xfc, 0xd7, 0xfc, 0xe9, 0xfa, 0xaa, 0xfd, 0x22, 0xfd,\n  0xd1, 0xfc, 0xdb, 0xfb, 0x25, 0xf9, 0xaf, 0xf8, 0xb2, 0xfb, 0x64, 0xfb,\n  0x6c, 0xfc, 0x5c, 0xfd, 0x28, 0x00, 0x1d, 0x01, 0xf3, 0xff, 0x56, 0x01,\n  0xf0, 0x02, 0x56, 0x01, 0xd9, 0x00, 0x7d, 0x01, 0xe9, 0x02, 0x39, 0x03,\n  0x24, 0x03, 0xb8, 0x03, 0x42, 0x04, 0x8a, 0x05, 0xa8, 0x08, 0x4f, 0x0b,\n  0xd7, 0x0c, 0x15, 0x0c, 0x1e, 0x08, 0x05, 0x06, 0xd6, 0x05, 0xb2, 0x02,\n  0x15, 0x03, 0x5d, 0x01, 0x0f, 0x00, 0xd8, 0xff, 0xba, 0xfc, 0x36, 0xfa,\n  0xea, 0xf7, 0xd7, 0xf7, 0x77, 0xf8, 0x41, 0xf5, 0x36, 0xf6, 0x02, 0xf5,\n  0xe9, 0xf2, 0x21, 0xf3, 0x74, 0xf6, 0x85, 0xfa, 0x32, 0xfc, 0x8a, 0xfc,\n  0xab, 0xfd, 0xf1, 0x00, 0x50, 0x01, 0x3d, 0x01, 0x30, 0x03, 0xef, 0x03,\n  0x91, 0x04, 0x37, 0x04, 0x56, 0x06, 0x8b, 0x06, 0x5c, 0x04, 0x44, 0x06,\n  0x9b, 0x03, 0x53, 0x00, 0xfb, 0xfc, 0x62, 0x00, 0x10, 0x00, 0x27, 0xff,\n  0xb7, 0xfc, 0xda, 0xfb, 0xea, 0xfd, 0xba, 0xfe, 0x2d, 0xfd, 0xec, 0xfc,\n  0xd1, 0xfd, 0xad, 0xfd, 0x56, 0xfc, 0x6c, 0xfb, 0xad, 0xfb, 0xcd, 0xfc,\n  0xb3, 0xfe, 0x70, 0x00, 0x06, 0x02, 0x97, 0x01, 0xbd, 0x00, 0xe0, 0x02,\n  0xfb, 0x03, 0x33, 0x05, 0x1d, 0x05, 0x98, 0x05, 0x6f, 0x05, 0xc9, 0x05,\n  0xf3, 0x04, 0xc2, 0x03, 0xca, 0x02, 0x20, 0xff, 0xaa, 0xfd, 0x66, 0xff,\n  0x4a, 0x00, 0x44, 0x00, 0x2c, 0x00, 0x35, 0x00, 0xf2, 0xff, 0x8d, 0xfc,\n  0xca, 0xfb, 0x32, 0xfa, 0x1d, 0xf8, 0x12, 0xf7, 0xdf, 0xf8, 0x5a, 0xf9,\n  0x71, 0xfa, 0xfd, 0xfb, 0x1e, 0xfc, 0x42, 0xfc, 0x16, 0xfd, 0xd6, 0xfc,\n  0x22, 0xfb, 0x81, 0xfa, 0x34, 0xf8, 0x7c, 0xf7, 0x45, 0xf9, 0x55, 0xf8,\n  0xad, 0xfa, 0x1c, 0xfc, 0x35, 0xfe, 0xdc, 0x00, 0xf1, 0x00, 0x2e, 0x01,\n  0xb2, 0x04, 0x03, 0x06, 0xd2, 0x06, 0x15, 0x09, 0x48, 0x08, 0x20, 0x07,\n  0x5f, 0x06, 0x75, 0x06, 0x56, 0x06, 0x18, 0x05, 0x16, 0x03, 0x2b, 0xff,\n  0x54, 0xff, 0x7a, 0x01, 0x48, 0x00, 0x62, 0x00, 0xb9, 0xfe, 0xb4, 0xfc,\n  0x61, 0xfe, 0xef, 0xfd, 0x08, 0xfd, 0x92, 0xfb, 0x21, 0xfa, 0x86, 0xfb,\n  0x63, 0xfd, 0xec, 0xfe, 0xcb, 0xff, 0xb6, 0x02, 0xb9, 0x04, 0x61, 0x07,\n  0x44, 0x07, 0x71, 0x08, 0x4a, 0x09, 0x12, 0x09, 0xf7, 0x07, 0x78, 0x09,\n  0xd8, 0x09, 0xcb, 0x07, 0x35, 0x06, 0x39, 0x04, 0xad, 0x03, 0xc5, 0x02,\n  0xfd, 0x00, 0xd3, 0xfe, 0x0f, 0xfd, 0x5d, 0xfa, 0x25, 0xfc, 0x80, 0xfb,\n  0x3d, 0xfb, 0x12, 0xfa, 0x98, 0xf7, 0x7b, 0xf7, 0x49, 0xf9, 0xd9, 0xf8,\n  0xe9, 0xf8, 0x01, 0xfb, 0x4c, 0xfc, 0x35, 0xfd, 0x5d, 0xfb, 0xc1, 0xf9,\n  0xc8, 0xf8, 0xe0, 0xf9, 0x7f, 0xfa, 0xdb, 0xfb, 0x2c, 0xfe, 0x50, 0xff,\n  0x25, 0xff, 0xa6, 0xff, 0xa2, 0x01, 0x86, 0x02, 0x75, 0x02, 0x11, 0x03,\n  0xc3, 0x04, 0xcb, 0x05, 0x94, 0x07, 0xac, 0x09, 0xe5, 0x08, 0x14, 0x08,\n  0xb1, 0x05, 0x23, 0x05, 0x64, 0x04, 0xc7, 0x03, 0x1e, 0x03, 0xa8, 0xfe,\n  0x6d, 0xfd, 0xcd, 0xfc, 0xa6, 0xfc, 0x73, 0xfb, 0xea, 0xfa, 0x49, 0xfc,\n  0x91, 0xff, 0xe3, 0xff, 0xf6, 0x01, 0x11, 0x03, 0xab, 0x01, 0x32, 0x01,\n  0xf5, 0x01, 0x22, 0x03, 0x75, 0x04, 0xee, 0x03, 0x7d, 0x01, 0xf4, 0xfd,\n  0x4a, 0xfc, 0x0f, 0xfc, 0x61, 0xfc, 0xb4, 0xfb, 0x19, 0xfb, 0x2e, 0xfa,\n  0x0c, 0xfb, 0xe6, 0xf9, 0xff, 0xf7, 0xb3, 0xf9, 0x94, 0xfb, 0xaa, 0xfc,\n  0x49, 0xfe, 0xf0, 0xfd, 0x50, 0xfd, 0x4b, 0xfe, 0x25, 0x00, 0xb0, 0x01,\n  0xda, 0x02, 0x38, 0x05, 0x0f, 0x06, 0x10, 0x05, 0x0f, 0x05, 0x4c, 0x05,\n  0xfa, 0x04, 0x46, 0x04, 0x4d, 0x05, 0xee, 0x05, 0x97, 0x03, 0x9d, 0x02,\n  0xe6, 0x00, 0x37, 0xff, 0x7a, 0xfe, 0x55, 0xfd, 0xe7, 0xfc, 0xdc, 0xfc,\n  0x6b, 0xfb, 0x1a, 0xf9, 0x8d, 0xfa, 0x17, 0xfb, 0x80, 0xfc, 0xc3, 0xfd,\n  0x22, 0xfe, 0x5b, 0xfe, 0x3d, 0xfd, 0xfb, 0xfc, 0x13, 0xfd, 0xcd, 0xfd,\n  0x2e, 0xfe, 0xbf, 0xfd, 0x43, 0xfd, 0x67, 0xfc, 0xd6, 0xfb, 0x67, 0xfb,\n  0x1a, 0xfd, 0xdd, 0xfe, 0x0c, 0x01, 0x13, 0x02, 0x12, 0x03, 0xb5, 0x00,\n  0x10, 0x00, 0xaf, 0x00, 0x28, 0x00, 0xc6, 0xff, 0xdc, 0xfe, 0xb3, 0x01,\n  0x6b, 0x02, 0x60, 0x02, 0x29, 0x03, 0x8d, 0x05, 0x84, 0x05, 0x16, 0x05,\n  0x74, 0x04, 0x50, 0x04, 0xdb, 0x03, 0x2b, 0x04, 0xd3, 0x03, 0xbf, 0x02,\n  0xc5, 0x01, 0x0e, 0x01, 0x77, 0x01, 0x63, 0x00, 0xe0, 0xff, 0xe7, 0xfd,\n  0xb4, 0xfb, 0xcc, 0xfb, 0xdf, 0xfa, 0xe2, 0xfb, 0x33, 0xfc, 0xd9, 0xfb,\n  0x4e, 0xfc, 0x32, 0xfc, 0xd4, 0xfb, 0x3a, 0xfb, 0x52, 0xfc, 0xbf, 0xff,\n  0x89, 0xfe, 0x04, 0xfe, 0xfe, 0xfc, 0x38, 0xfb, 0x73, 0xfb, 0x34, 0xfb,\n  0x86, 0xfd, 0xce, 0xfe, 0xb1, 0xff, 0x6a, 0x00, 0x7a, 0x01, 0x59, 0x02,\n  0xf4, 0x01, 0x25, 0x03, 0x9f, 0x04, 0x52, 0x04, 0x37, 0x04, 0x22, 0x04,\n  0xbb, 0x03, 0x51, 0x04, 0xca, 0x04, 0x8a, 0x06, 0x8a, 0x07, 0x47, 0x06,\n  0xa4, 0x04, 0x8f, 0x02, 0x36, 0x00, 0xeb, 0xfe, 0x16, 0xff, 0x25, 0x00,\n  0x2a, 0x00, 0xc0, 0xff, 0x19, 0xfe, 0xba, 0xfc, 0xd7, 0xfa, 0x27, 0xfb,\n  0xff, 0xf9, 0x8c, 0xf9, 0x5d, 0xfa, 0x99, 0xfc, 0xf7, 0xfd, 0xc6, 0xfd,\n  0xeb, 0xfe, 0xf2, 0xff, 0xa3, 0x00, 0x85, 0x01, 0x9e, 0x02, 0x22, 0x05,\n  0xd8, 0x06, 0x5f, 0x07, 0xb2, 0x08, 0x66, 0x09, 0xba, 0x08, 0xfa, 0x07,\n  0x35, 0x09, 0xc7, 0x08, 0x49, 0x07, 0x2b, 0x06, 0x1f, 0x06, 0xba, 0x04,\n  0x73, 0x03, 0xd8, 0x01, 0xbe, 0x01, 0x68, 0x01, 0x0a, 0x00, 0x8e, 0xfd,\n  0xbb, 0xfa, 0x47, 0xf9, 0x3e, 0xf7, 0xba, 0xf5, 0x20, 0xf5, 0xba, 0xf5,\n  0xdc, 0xf5, 0x2d, 0xf6, 0x02, 0xf6, 0x5b, 0xf6, 0x13, 0xf7, 0xbd, 0xf7,\n  0x29, 0xf9, 0xa7, 0xf9, 0x8f, 0xf9, 0xc5, 0xfb, 0x95, 0xfb, 0xe9, 0xfb,\n  0xf9, 0xfc, 0x1f, 0xff, 0x75, 0x01, 0x2e, 0x01, 0x1c, 0x02, 0x9e, 0x01,\n  0xa1, 0x01, 0x7d, 0x02, 0x36, 0x02, 0xf8, 0x02, 0xac, 0x04, 0x20, 0x06,\n  0x9c, 0x07, 0x71, 0x07, 0xac, 0x06, 0x57, 0x06, 0xa6, 0x04, 0x49, 0x04,\n  0x69, 0x04, 0x55, 0x06, 0x9a, 0x05, 0x06, 0x05, 0x9c, 0x04, 0xc7, 0x00,\n  0x67, 0xff, 0x32, 0x00, 0xa4, 0xff, 0x0d, 0xff, 0x04, 0xfd, 0x92, 0xfc,\n  0x97, 0xfb, 0xdc, 0xf9, 0x33, 0xfa, 0x81, 0xfb, 0x85, 0xfc, 0x7d, 0xfc,\n  0x32, 0xfc, 0x1d, 0xfd, 0x46, 0xfe, 0x96, 0xfd, 0x72, 0xfe, 0xab, 0xff,\n  0x47, 0x01, 0x24, 0x02, 0x71, 0x02, 0x9a, 0x01, 0xb4, 0x00, 0x88, 0xff,\n  0x1d, 0xff, 0x56, 0xff, 0x0e, 0xfe, 0x49, 0xff, 0x64, 0x00, 0xdc, 0x01,\n  0x4a, 0x02, 0xfb, 0x02, 0x3f, 0x03, 0xa4, 0x03, 0xa4, 0x02, 0xd2, 0x01,\n  0x90, 0x02, 0x01, 0x01, 0x88, 0x00, 0x78, 0xfe, 0x43, 0xfe, 0x3d, 0xfe,\n  0xbb, 0xfd, 0x31, 0xfe, 0x09, 0xfe, 0x0a, 0xfe, 0xe6, 0xff, 0x48, 0x00,\n  0x0f, 0x00, 0x20, 0xff, 0xe3, 0xfc, 0xa5, 0xfb, 0xe8, 0xf9, 0x9b, 0xfa,\n  0x99, 0xfa, 0x9e, 0xfb, 0x6d, 0xfb, 0x67, 0xfb, 0xf4, 0xfa, 0xe7, 0xf9,\n  0xa3, 0xfa, 0x7e, 0xfb, 0x4c, 0xfd, 0x6f, 0xff, 0xe0, 0x00, 0x2e, 0x01,\n  0xca, 0x02, 0x98, 0x02, 0x8e, 0x02, 0xe3, 0x03, 0xe2, 0x03, 0xe1, 0x04,\n  0x21, 0x05, 0x56, 0x04, 0xce, 0x03, 0xdd, 0x04, 0x24, 0x06, 0x21, 0x06,\n  0xdf, 0x05, 0x36, 0x05, 0x28, 0x03, 0x8b, 0x01, 0xbb, 0xff, 0x3c, 0xfe,\n  0x85, 0xfc, 0x1a, 0xfd, 0xf9, 0xfc, 0x6d, 0xfc, 0x80, 0xfc, 0x17, 0xfc,\n  0xcd, 0xfb, 0xc5, 0xfc, 0x21, 0xfc, 0x7f, 0xfc, 0xe8, 0xfb, 0x92, 0xfc,\n  0xa7, 0xfb, 0xea, 0xfb, 0x9e, 0xfd, 0xfb, 0xff, 0x40, 0x01, 0x53, 0x02,\n  0x7f, 0x02, 0x79, 0x02, 0xc0, 0x03, 0xe6, 0x03, 0xb7, 0x04, 0xd8, 0x04,\n  0xf1, 0x04, 0x0d, 0x04, 0x95, 0x04, 0xe0, 0x04, 0x6b, 0x04, 0x56, 0x04,\n  0xf5, 0x03, 0x88, 0x03, 0x6f, 0x04, 0x09, 0x03, 0xdd, 0x02, 0x8d, 0x01,\n  0x24, 0x00, 0xd4, 0x00, 0x33, 0x00, 0x16, 0x00, 0xc4, 0xff, 0x99, 0x00,\n  0x36, 0x01, 0x57, 0x01, 0x61, 0xff, 0x04, 0xfe, 0x06, 0xfe, 0xf7, 0xfb,\n  0xec, 0xf9, 0x70, 0xfa, 0x43, 0xfb, 0x87, 0xfb, 0xf3, 0xfb, 0x3b, 0xfc,\n  0x03, 0xfb, 0x3c, 0xfa, 0x86, 0xfa, 0x7b, 0xfb, 0x56, 0xfb, 0xb4, 0xfa,\n  0xef, 0xf9, 0xf9, 0xf9, 0xe8, 0xfa, 0x21, 0xfb, 0x84, 0xfc, 0x89, 0xfb,\n  0xf2, 0xfb, 0xb6, 0xfb, 0xf6, 0xfa, 0xc5, 0xfb, 0x62, 0xfd, 0x54, 0xff,\n  0x27, 0x00, 0x41, 0x00, 0x06, 0xff, 0xb7, 0xfd, 0xff, 0xfe, 0x47, 0x00,\n  0x94, 0x00, 0x42, 0x01, 0x89, 0x00, 0xdb, 0xff, 0x85, 0xff, 0x0e, 0x01,\n  0xc7, 0x00, 0xb6, 0x00, 0x56, 0x01, 0x7e, 0x00, 0xf3, 0x01, 0x46, 0x02,\n  0x19, 0x02, 0x20, 0x03, 0xdd, 0x04, 0x6f, 0x06, 0x40, 0x07, 0x17, 0x07,\n  0xcc, 0x06, 0x0c, 0x07, 0x66, 0x06, 0x44, 0x05, 0xa7, 0x04, 0x6e, 0x04,\n  0x59, 0x03, 0x5f, 0x03, 0x0b, 0x04, 0x21, 0x03, 0x0f, 0x03, 0x3f, 0x02,\n  0x88, 0x01, 0xe4, 0xff, 0x32, 0xfe, 0x7b, 0xfc, 0x5e, 0xfb, 0x32, 0xfc,\n  0x49, 0xfd, 0xe6, 0xfd, 0xce, 0xfd, 0xf0, 0xfc, 0xd1, 0xfb, 0x11, 0xfb,\n  0x2d, 0xfa, 0xcb, 0xf9, 0xf8, 0xfa, 0x7d, 0xf9, 0x3d, 0xfa, 0xbb, 0xfa,\n  0x3a, 0xfc, 0xf2, 0xfc, 0x1a, 0xfe, 0xb9, 0xff, 0x55, 0x01, 0x79, 0x02,\n  0x2c, 0x04, 0xac, 0x05, 0xbf, 0x06, 0x14, 0x08, 0xee, 0x08, 0x0e, 0x09,\n  0x40, 0x0a, 0xab, 0x09, 0x44, 0x08, 0x85, 0x06, 0xcc, 0x05, 0x76, 0x04,\n  0x47, 0x02, 0xed, 0x00, 0x6d, 0x00, 0x5d, 0xff, 0x95, 0xfe, 0xfb, 0xfe,\n  0x3e, 0xff, 0xc7, 0xfe, 0x5c, 0xfd, 0x82, 0xfd, 0xd6, 0xfc, 0x9e, 0xfa,\n  0xa9, 0xf9, 0x58, 0xf8, 0xcb, 0xf8, 0x57, 0xf8, 0x08, 0xf8, 0x8b, 0xf7,\n  0x4e, 0xf6, 0x64, 0xf7, 0xa1, 0xf8, 0x2b, 0xfa, 0xe2, 0xfa, 0xe5, 0xfb,\n  0x28, 0xfc, 0x6f, 0xfe, 0x6b, 0xff, 0x16, 0x01, 0x91, 0x01, 0x9d, 0x02,\n  0x7a, 0x04, 0x1f, 0x06, 0x70, 0x06, 0x64, 0x06, 0x94, 0x06, 0xf2, 0x07,\n  0x87, 0x07, 0xeb, 0x06, 0x6c, 0x07, 0xf6, 0x05, 0x9d, 0x04, 0xad, 0x04,\n  0xab, 0x05, 0xc0, 0x04, 0x2c, 0x03, 0x0a, 0x01, 0x3d, 0xfe, 0x1c, 0xfe,\n  0x33, 0xfd, 0x68, 0xfb, 0xd3, 0xf9, 0xb3, 0xf8, 0xeb, 0xf8, 0x65, 0xf8,\n  0x42, 0xf8, 0x0f, 0xf9, 0x8a, 0xfb, 0x01, 0xfd, 0x0f, 0xfe, 0xf1, 0xfd,\n  0x6f, 0xfe, 0xda, 0xfe, 0x0c, 0xfe, 0x96, 0xfd, 0xf4, 0xfc, 0x5a, 0xfe,\n  0x0b, 0xff, 0x2f, 0x00, 0x09, 0x00, 0x43, 0xff, 0xad, 0xfe, 0x2a, 0xff,\n  0x4c, 0xff, 0x74, 0x00, 0x15, 0x01, 0xa8, 0x02, 0x4e, 0x04, 0xcf, 0x05,\n  0x1a, 0x07, 0x1d, 0x08, 0xe6, 0x08, 0x76, 0x09, 0xf2, 0x09, 0xab, 0x08,\n  0xdc, 0x07, 0xf8, 0x05, 0xe0, 0x03, 0x54, 0x02, 0x6b, 0x01, 0xd3, 0xff,\n  0xf7, 0xfe, 0x1c, 0xfe, 0xaa, 0xfc, 0xff, 0xfc, 0xb2, 0xfc, 0xd3, 0xfb,\n  0xcc, 0xfb, 0xf7, 0xfb, 0x9a, 0xfb, 0x1e, 0xfb, 0xa9, 0xfb, 0xb1, 0xfa,\n  0xc2, 0xfa, 0x61, 0xfb, 0x0e, 0xfd, 0x9f, 0xfe, 0xf0, 0xff, 0x80, 0x01,\n  0x93, 0x01, 0xf4, 0x01, 0x34, 0x03, 0x61, 0x03, 0xe1, 0x02, 0xe9, 0x03,\n  0x5a, 0x03, 0xa8, 0x02, 0x2c, 0x02, 0xc8, 0x01, 0x3f, 0x00, 0x6e, 0xfe,\n  0xc3, 0xfd, 0x7c, 0xfc, 0x35, 0xfb, 0x10, 0xfb, 0x66, 0xfb, 0x51, 0xfb,\n  0x28, 0xfa, 0x98, 0xf8, 0x84, 0xf7, 0x98, 0xf7, 0xba, 0xf7, 0xee, 0xf7,\n  0x3a, 0xf8, 0xa8, 0xf8, 0x47, 0xf9, 0x1a, 0xfa, 0x29, 0xfa, 0x13, 0xfc,\n  0xbf, 0xfd, 0x40, 0xfe, 0xd8, 0xff, 0x2f, 0x01, 0xd3, 0x02, 0x49, 0x04,\n  0x16, 0x06, 0x39, 0x07, 0x0a, 0x09, 0xc3, 0x09, 0x46, 0x09, 0xa0, 0x08,\n  0xde, 0x09, 0x79, 0x0a, 0xaf, 0x09, 0x5f, 0x08, 0x4d, 0x06, 0x84, 0x04,\n  0x30, 0x03, 0xcb, 0x02, 0x8e, 0x01, 0xea, 0x00, 0x24, 0x00, 0x5f, 0xff,\n  0xff, 0xfe, 0xdc, 0xfc, 0x1b, 0xfc, 0xb1, 0xfb, 0xef, 0xfa, 0x09, 0xfb,\n  0x78, 0xfb, 0xc8, 0xfc, 0x4a, 0xfe, 0xd8, 0xfe, 0x26, 0xff, 0xa0, 0x00,\n  0x76, 0x01, 0xbc, 0x00, 0xea, 0x00, 0x38, 0x00, 0xfc, 0xff, 0xe8, 0xff,\n  0x32, 0xff, 0x15, 0xfe, 0xc9, 0xfd, 0xac, 0xfd, 0x52, 0xfe, 0xa2, 0xfe,\n  0xb1, 0xff, 0x25, 0x01, 0x65, 0x02, 0x40, 0x02, 0x8e, 0x03, 0x79, 0x03,\n  0x65, 0x01, 0x6a, 0x00, 0xc4, 0x00, 0xee, 0xff, 0x15, 0xff, 0xa6, 0xfe,\n  0x9e, 0xfd, 0x7a, 0xfc, 0x57, 0xfc, 0x03, 0xfd, 0x3c, 0xfc, 0xdf, 0xfb,\n  0x35, 0xfc, 0x06, 0xfc, 0x36, 0xfc, 0xfc, 0xfb, 0xd1, 0xfb, 0x4c, 0xfb,\n  0x9f, 0xfa, 0xd8, 0xfa, 0xcf, 0xfb, 0x5f, 0xfc, 0xff, 0xfd, 0x13, 0xff,\n  0x37, 0x00, 0x21, 0x01, 0x44, 0x01, 0x80, 0x02, 0x18, 0x03, 0xc2, 0x02,\n  0xf5, 0x02, 0x88, 0x03, 0xe1, 0x03, 0x65, 0x03, 0x29, 0x04, 0xe8, 0x04,\n  0x24, 0x04, 0xde, 0x03, 0xbd, 0x03, 0x52, 0x03, 0x0f, 0x02, 0x94, 0x00,\n  0x16, 0x00, 0x42, 0xfe, 0x3f, 0xfe, 0x07, 0xfe, 0x76, 0xfe, 0x52, 0xfe,\n  0xd6, 0xfd, 0x94, 0xfe, 0x2c, 0xfe, 0x33, 0xfe, 0xd1, 0xfe, 0x50, 0xff,\n  0x84, 0x00, 0x7c, 0x00, 0x54, 0xff, 0x1f, 0xff, 0x8f, 0xfe, 0x0e, 0xfe,\n  0xaa, 0xfd, 0x94, 0xfe, 0x3d, 0xff, 0x4e, 0xff, 0x4d, 0xff, 0xeb, 0xff,\n  0xa3, 0xff, 0xb4, 0xff, 0x5c, 0x00, 0xb1, 0x00, 0x6a, 0x01, 0xbf, 0x01,\n  0x08, 0x02, 0x16, 0x02, 0x6e, 0x01, 0x26, 0x01, 0x4d, 0x01, 0xb1, 0x00,\n  0xe5, 0x00, 0xf5, 0xff, 0x1f, 0xff, 0xeb, 0xfe, 0xa0, 0xff, 0xfd, 0xff,\n  0x12, 0x00, 0xa0, 0xff, 0x76, 0xfe, 0xe5, 0xfe, 0x5d, 0xff, 0x90, 0xfe,\n  0xcf, 0xfe, 0xad, 0xfe, 0xb3, 0xfe, 0xc4, 0xfe, 0x7d, 0xfe, 0xa2, 0xfe,\n  0x0c, 0xff, 0x16, 0xff, 0xd7, 0xfe, 0x39, 0xff, 0x19, 0x00, 0x71, 0x00,\n  0xc0, 0x00, 0xaf, 0xff, 0x15, 0xff, 0xbf, 0xfe, 0x36, 0xfe, 0x46, 0xff,\n  0xad, 0xff, 0xfe, 0xff, 0x0e, 0x00, 0xe6, 0xff, 0x92, 0x00, 0xf1, 0x00,\n  0xdb, 0x01, 0x36, 0x02, 0x68, 0x01, 0xf8, 0x01, 0xbf, 0x02, 0x97, 0x02,\n  0x33, 0x02, 0x36, 0x02, 0xd7, 0x02, 0x97, 0x02, 0x05, 0x02, 0x91, 0x01,\n  0x3b, 0x02, 0xa8, 0x02, 0xb5, 0x02, 0x6f, 0x02, 0x42, 0x03, 0x06, 0x03,\n  0xd6, 0x01, 0xeb, 0x01, 0x1d, 0x02, 0xa4, 0x01, 0x21, 0x01, 0xa2, 0xff,\n  0x6c, 0xfe, 0xdf, 0xfd, 0x38, 0xfd, 0x90, 0xfc, 0x27, 0xfb, 0xd6, 0xfa,\n  0x71, 0xfb, 0x2b, 0xfb, 0x23, 0xfb, 0x27, 0xfc, 0x5f, 0xfc, 0x8f, 0xfc,\n  0x95, 0xfc, 0x97, 0xfc, 0x5e, 0xfd, 0x68, 0xfd, 0x8b, 0xfc, 0x7d, 0xfc,\n  0x87, 0xfc, 0x81, 0xfc, 0x9e, 0xfc, 0x13, 0xfe, 0x9b, 0xfe, 0xb7, 0xff,\n  0x4c, 0x00, 0x1d, 0x00, 0xa2, 0x00, 0x16, 0x01, 0x6e, 0x00, 0x75, 0x01,\n  0x3e, 0x01, 0x80, 0x01, 0x62, 0x02, 0x25, 0x03, 0x3d, 0x04, 0x0f, 0x04,\n  0x8c, 0x04, 0x37, 0x05, 0x6e, 0x04, 0x20, 0x04, 0x42, 0x05, 0x3b, 0x05,\n  0xfa, 0x04, 0xb8, 0x04, 0x5b, 0x04, 0xcc, 0x03, 0x03, 0x02, 0x82, 0x00,\n  0x44, 0xff, 0x8a, 0xfe, 0xb6, 0xfd, 0xda, 0xfd, 0x2d, 0xfd, 0x6d, 0xfc,\n  0x45, 0xfc, 0xe5, 0xfb, 0xef, 0xfb, 0xff, 0xfb, 0x2f, 0xfc, 0x19, 0xfc,\n  0x08, 0xfd, 0x9d, 0xfd, 0x9b, 0xfd, 0xa9, 0xfd, 0x9a, 0xfd, 0x1b, 0xfd,\n  0xca, 0xfd, 0x69, 0xfd, 0x1a, 0xfd, 0x78, 0xfd, 0x71, 0xfd, 0x0d, 0xfe,\n  0xac, 0xfe, 0x74, 0xff, 0x9b, 0xff, 0xf3, 0xfe, 0x75, 0xff, 0x84, 0x00,\n  0x2f, 0x01, 0x88, 0x01, 0x12, 0x02, 0xb9, 0x01, 0x88, 0x02, 0x63, 0x03,\n  0x39, 0x04, 0x91, 0x04, 0x87, 0x04, 0x65, 0x04, 0x97, 0x03, 0x18, 0x03,\n  0x12, 0x03, 0xcb, 0x03, 0xa4, 0x03, 0xea, 0x02, 0x58, 0x02, 0x9c, 0x01,\n  0x39, 0x00, 0xe3, 0xff, 0x2d, 0xff, 0xc5, 0xfe, 0xb6, 0xfe, 0x80, 0xfe,\n  0x50, 0xfe, 0x38, 0xfe, 0x50, 0xfd, 0x12, 0xfc, 0xde, 0xfc, 0xff, 0xfd,\n  0x3d, 0xfe, 0xc4, 0xfe, 0xb1, 0xfe, 0xd4, 0xfe, 0x86, 0xfe, 0xcf, 0xfe,\n  0x4f, 0xff, 0x0e, 0xff, 0x38, 0xff, 0xa1, 0xfe, 0xff, 0xfe, 0xa0, 0xfe,\n  0xd2, 0xfe, 0x0f, 0xff, 0x9d, 0xfe, 0x56, 0xfe, 0x3b, 0xfe, 0xab, 0xfe,\n  0xc6, 0xff, 0x87, 0xff, 0x5f, 0xff, 0x36, 0xff, 0x2f, 0x00, 0xe6, 0x00,\n  0x04, 0x01, 0xb9, 0x01, 0x86, 0x02, 0xde, 0x02, 0x34, 0x03, 0x00, 0x04,\n  0x74, 0x04, 0x86, 0x04, 0x53, 0x05, 0x38, 0x06, 0xc9, 0x06, 0x15, 0x07,\n  0x73, 0x07, 0x7b, 0x07, 0x21, 0x07, 0x1e, 0x06, 0x3e, 0x05, 0x7a, 0x04,\n  0xc4, 0x03, 0xf5, 0x02, 0x3f, 0x02, 0xdf, 0x00, 0xf9, 0xfe, 0x26, 0xfd,\n  0x95, 0xfb, 0x01, 0xfa, 0x0e, 0xf9, 0x4b, 0xf8, 0xa2, 0xf7, 0x13, 0xf7,\n  0x4f, 0xf6, 0xb3, 0xf6, 0x2a, 0xf7, 0x46, 0xf7, 0x18, 0xf8, 0xf7, 0xf8,\n  0xd8, 0xf9, 0xa6, 0xfa, 0x36, 0xfa, 0xfe, 0xf9, 0x2f, 0xfb, 0x7b, 0xfc,\n  0x05, 0xfd, 0x4f, 0xfd, 0xbc, 0xfd, 0x6d, 0xfe, 0xb4, 0xfe, 0x2e, 0xff,\n  0xcf, 0xff, 0x9b, 0x00, 0xab, 0x01, 0x62, 0x02, 0xd2, 0x02, 0x00, 0x03,\n  0x68, 0x02, 0x8b, 0x01, 0xad, 0x01, 0x66, 0x02, 0x9c, 0x02, 0xfd, 0x02,\n  0x18, 0x03, 0x42, 0x02, 0x44, 0x01, 0x08, 0x01, 0xee, 0x00, 0x08, 0x00,\n  0xdd, 0xff, 0xd4, 0xff, 0xfa, 0xff, 0xd3, 0xff, 0x2d, 0xff, 0x03, 0xff,\n  0x6a, 0xff, 0x52, 0xff, 0x8a, 0xff, 0x61, 0xff, 0xd2, 0xff, 0x05, 0x01,\n  0x45, 0x02, 0x13, 0x03, 0x8c, 0x03, 0x48, 0x04, 0x50, 0x04, 0x34, 0x04,\n  0xbe, 0x03, 0x23, 0x03, 0xe3, 0x02, 0xd1, 0x02, 0xda, 0x02, 0x73, 0x03,\n  0x88, 0x03, 0xd4, 0x03, 0x16, 0x04, 0x12, 0x04, 0x5f, 0x04, 0xb4, 0x04,\n  0xea, 0x04, 0x43, 0x05, 0xd8, 0x05, 0x08, 0x06, 0x2e, 0x06, 0x33, 0x06,\n  0x07, 0x05, 0x7f, 0x03, 0xde, 0x02, 0x52, 0x02, 0xd4, 0x00, 0xd2, 0xff,\n  0xda, 0xfe, 0x8a, 0xfe, 0xb6, 0xfd, 0xfc, 0xfc, 0x57, 0xfc, 0xb5, 0xfb,\n  0xc1, 0xfa, 0x47, 0xfa, 0xc2, 0xf9, 0x0b, 0xf9, 0x70, 0xf8, 0xbc, 0xf7,\n  0xda, 0xf6, 0x05, 0xf6, 0x0e, 0xf6, 0xec, 0xf5, 0xde, 0xf6, 0xc4, 0xf6,\n  0x39, 0xf7, 0x27, 0xf8, 0x71, 0xf8, 0x36, 0xf9, 0x3c, 0xfa, 0xc4, 0xfb,\n  0xd6, 0xfc, 0xc2, 0xfd, 0xa5, 0xfe, 0x6f, 0xff, 0x05, 0x00, 0xba, 0x00,\n  0x98, 0x01, 0xb8, 0x02, 0xbb, 0x03, 0x4a, 0x04, 0x22, 0x05, 0xfa, 0x04,\n  0xae, 0x04, 0x14, 0x05, 0xb3, 0x05, 0x03, 0x06, 0x6e, 0x06, 0x2c, 0x06,\n  0xc9, 0x04, 0xa2, 0x03, 0x70, 0x02, 0x03, 0x01, 0x81, 0xff, 0xc4, 0xfe,\n  0xf3, 0xfd, 0x6c, 0xfd, 0x33, 0xfd, 0x37, 0xfd, 0x6b, 0xfc, 0xda, 0xfb,\n  0x42, 0xfc, 0xeb, 0xfb, 0xb4, 0xfb, 0xa4, 0xfb, 0x72, 0xfb, 0xe9, 0xfa,\n  0x06, 0xfb, 0x2b, 0xfb, 0xa3, 0xfb, 0x77, 0xfc, 0x7b, 0xfd, 0xee, 0xfe,\n  0x7f, 0x00, 0xb2, 0x01, 0x2b, 0x02, 0x28, 0x02, 0x54, 0x03, 0xbd, 0x03,\n  0x59, 0x03, 0x94, 0x03, 0xcd, 0x03, 0xd3, 0x03, 0x7e, 0x03, 0x7e, 0x03,\n  0x27, 0x03, 0x34, 0x03, 0x44, 0x03, 0x2d, 0x03, 0x72, 0x03, 0xd7, 0x02,\n  0x88, 0x02, 0x1f, 0x03, 0x71, 0x03, 0x92, 0x03, 0x9e, 0x03, 0x37, 0x03,\n  0x34, 0x03, 0xf9, 0x02, 0xd0, 0x02, 0x4a, 0x02, 0x09, 0x01, 0x33, 0x00,\n  0x93, 0xff, 0xe4, 0xfe, 0x1a, 0xfe, 0xda, 0xfd, 0x54, 0xfd, 0x93, 0xfc,\n  0xe1, 0xfb, 0xbd, 0xfb, 0xc3, 0xfb, 0x45, 0xfb, 0x47, 0xfa, 0x23, 0xf9,\n  0x07, 0xf9, 0x33, 0xf9, 0x0c, 0xf9, 0x58, 0xf9, 0x1a, 0xfa, 0x9d, 0xfb,\n  0x1c, 0xfc, 0x81, 0xfc, 0xc3, 0xfc, 0x49, 0xfd, 0xff, 0xfd, 0xc8, 0xfe,\n  0x3a, 0xff, 0x41, 0x00, 0x63, 0x01, 0xef, 0x01, 0xbd, 0x02, 0x19, 0x04,\n  0xaf, 0x04, 0xae, 0x04, 0x3f, 0x04, 0xd0, 0x03, 0xee, 0x02, 0x51, 0x02,\n  0xf4, 0x01, 0xdf, 0x01, 0xfb, 0x01, 0x7c, 0x02, 0xe0, 0x02, 0xee, 0x02,\n  0x1f, 0x03, 0xec, 0x02, 0x7a, 0x02, 0xd8, 0x01, 0xe2, 0x00, 0x7e, 0xff,\n  0x2f, 0xfe, 0x7f, 0xfd, 0x60, 0xfd, 0xb3, 0xfd, 0x26, 0xfd, 0x66, 0xfc,\n  0xb4, 0xfb, 0xa1, 0xfb, 0xd9, 0xfb, 0xbc, 0xfb, 0xb8, 0xfb, 0x50, 0xfc,\n  0x6f, 0xfd, 0x83, 0xfe, 0xc6, 0xfe, 0xf8, 0xfe, 0x59, 0xfe, 0xfb, 0xfd,\n  0x79, 0xfe, 0x36, 0xfe, 0xdd, 0xfe, 0x75, 0xff, 0xea, 0xff, 0xba, 0x00,\n  0xc9, 0x00, 0x38, 0x01, 0x21, 0x02, 0xc0, 0x02, 0xb1, 0x03, 0x8a, 0x04,\n  0x88, 0x05, 0x54, 0x06, 0x71, 0x06, 0x5c, 0x06, 0x6d, 0x06, 0x80, 0x06,\n  0xf9, 0x05, 0x5d, 0x05, 0x31, 0x05, 0x6c, 0x05, 0xd6, 0x04, 0x3d, 0x04,\n  0x74, 0x03, 0x78, 0x02, 0x60, 0x01, 0xb6, 0x00, 0x4a, 0x00, 0x94, 0xff,\n  0x87, 0xfe, 0x4a, 0xfd, 0x03, 0xfc, 0x1f, 0xfb, 0xfd, 0xf9, 0x53, 0xf9,\n  0xdd, 0xf8, 0xc3, 0xf8, 0x73, 0xf9, 0x34, 0xfa, 0x44, 0xfb, 0xcb, 0xfb,\n  0x97, 0xfb, 0x8a, 0xfb, 0x2f, 0xfc, 0x74, 0xfc, 0xd4, 0xfc, 0x8b, 0xfd,\n  0xab, 0xfe, 0xc0, 0xff, 0x72, 0x00, 0x34, 0x01, 0x87, 0x01, 0x8e, 0x01,\n  0x3e, 0x02, 0xf0, 0x02, 0xc5, 0x02, 0x0c, 0x03, 0xed, 0x02, 0x5a, 0x02,\n  0x82, 0x02, 0xe3, 0x02, 0x8f, 0x03, 0x5a, 0x03, 0x24, 0x03, 0x33, 0x03,\n  0x6a, 0x03, 0xaa, 0x03, 0xec, 0x03, 0xf4, 0x03, 0xa8, 0x03, 0x8b, 0x02,\n  0x1d, 0x01, 0x90, 0xff, 0x54, 0xfe, 0x91, 0xfd, 0x2d, 0xfd, 0xf5, 0xfc,\n  0x8c, 0xfc, 0xc3, 0xfb, 0x6d, 0xfb, 0x49, 0xfc, 0x73, 0xfc, 0xc2, 0xfc,\n  0x55, 0xfd, 0x15, 0xfe, 0x03, 0xff, 0x18, 0xff, 0x78, 0xfe, 0xa5, 0xfd,\n  0xb2, 0xfd, 0xc2, 0xfd, 0x9b, 0xfd, 0xaa, 0xfd, 0xf1, 0xfd, 0xf3, 0xfe,\n  0x7f, 0xff, 0x29, 0x00, 0x6d, 0x01, 0xdf, 0x02, 0xf7, 0x03, 0xf8, 0x04,\n  0x01, 0x06, 0x19, 0x07, 0xcf, 0x07, 0x0f, 0x08, 0x89, 0x08, 0xec, 0x08,\n  0xfb, 0x08, 0x51, 0x09, 0x13, 0x09, 0x60, 0x08, 0xe2, 0x07, 0x32, 0x07,\n  0x78, 0x06, 0x95, 0x05, 0x20, 0x04, 0x14, 0x02, 0xc5, 0x00, 0x1d, 0xff,\n  0x47, 0xfd, 0x99, 0xfb, 0x48, 0xfa, 0x0d, 0xf9, 0xfe, 0xf7, 0x87, 0xf7,\n  0x6a, 0xf7, 0xea, 0xf7, 0xff, 0xf7, 0x60, 0xf8, 0xed, 0xf8, 0x69, 0xf9,\n  0xd3, 0xf9, 0x5b, 0xfa, 0xcf, 0xfa, 0x6a, 0xfb, 0x6e, 0xfb, 0x48, 0xfb,\n  0xb6, 0xfb, 0xa9, 0xfc, 0x5c, 0xfd, 0x69, 0xfe, 0xf4, 0xfe, 0x8d, 0xff,\n  0xe0, 0xff, 0x3e, 0x00, 0xd5, 0x00, 0x76, 0x01, 0x13, 0x02, 0x16, 0x03,\n  0xdb, 0x03, 0x34, 0x04, 0xcd, 0x03, 0xb0, 0x02, 0xaf, 0x01, 0xd6, 0x00,\n  0xb9, 0xff, 0xe3, 0xfe, 0xcf, 0xfd, 0xbc, 0xfc, 0xd3, 0xfb, 0x1e, 0xfb,\n  0xf5, 0xfa, 0xd8, 0xfa, 0x0d, 0xfb, 0xc0, 0xfb, 0x46, 0xfc, 0x97, 0xfc,\n  0x76, 0xfc, 0x15, 0xfc, 0x2c, 0xfc, 0x2c, 0xfc, 0x49, 0xfc, 0x47, 0xfc,\n  0x81, 0xfc, 0xed, 0xfc, 0x04, 0xfe, 0x12, 0xff, 0xf7, 0xff, 0x63, 0x00,\n  0xaa, 0x00, 0x63, 0x01, 0xf7, 0x01, 0xf2, 0x01, 0x07, 0x02, 0x97, 0x02,\n  0x93, 0x02, 0xbd, 0x02, 0x83, 0x02, 0x51, 0x01, 0xc1, 0x00, 0x64, 0x00,\n  0x11, 0x00, 0xd7, 0xff, 0x84, 0xff, 0x57, 0xff, 0x26, 0xff, 0x64, 0xff,\n  0x00, 0x00, 0x71, 0x00, 0x73, 0x00, 0x1a, 0x00, 0xbb, 0xff, 0xd7, 0xff,\n  0xc4, 0xff, 0x71, 0xff, 0x98, 0xff, 0x00, 0xff, 0x9d, 0xfe, 0x05, 0xff,\n  0xd7, 0xff, 0x39, 0x00, 0x0c, 0x00, 0xe5, 0xff, 0x23, 0xff, 0xc3, 0xfe,\n  0xba, 0xfe, 0x81, 0xfe, 0x8b, 0xfe, 0xa6, 0xfe, 0xfe, 0xfe, 0xdd, 0xff,\n  0xb8, 0x00, 0xa6, 0x01, 0x52, 0x02, 0x96, 0x02, 0x2d, 0x03, 0x83, 0x03,\n  0xbf, 0x03, 0x1c, 0x04, 0x9f, 0x04, 0x69, 0x05, 0xda, 0x05, 0xfb, 0x05,\n  0xfc, 0x05, 0x70, 0x06, 0xa6, 0x06, 0x7c, 0x06, 0x08, 0x06, 0x68, 0x05,\n  0xeb, 0x04, 0x09, 0x04, 0xfa, 0x02, 0xc1, 0x01, 0x74, 0x00, 0x7e, 0xff,\n  0xba, 0xfe, 0x21, 0xfe, 0x4a, 0xfd, 0xb4, 0xfc, 0xca, 0xfb, 0xd9, 0xfa,\n  0xa7, 0xfa, 0xb9, 0xfa, 0xb9, 0xfa, 0xe3, 0xfa, 0xe9, 0xfa, 0xf9, 0xfa,\n  0x45, 0xfb, 0xe5, 0xfa, 0xc8, 0xfa, 0x78, 0xfa, 0x79, 0xfa, 0xf6, 0xfa,\n  0xf6, 0xfb, 0x53, 0xfd, 0x8e, 0xfe, 0xc8, 0xff, 0xc9, 0x00, 0x07, 0x01,\n  0x91, 0x01, 0x7a, 0x02, 0xe5, 0x02, 0x5a, 0x03, 0xbf, 0x03, 0x1f, 0x04,\n  0x61, 0x04, 0xac, 0x04, 0xdd, 0x04, 0xaa, 0x04, 0x76, 0x04, 0xb2, 0x03,\n  0x54, 0x03, 0x8b, 0x03, 0xae, 0x03, 0xc1, 0x03, 0x2e, 0x03, 0xa4, 0x02,\n  0x36, 0x02, 0xac, 0x01, 0xe0, 0x00, 0x39, 0x00, 0x25, 0x00, 0xe8, 0xff,\n  0x66, 0xff, 0x92, 0xfe, 0x14, 0xfe, 0x4b, 0xfd, 0xa0, 0xfc, 0x6b, 0xfc,\n  0x10, 0xfc, 0xf2, 0xfb, 0x86, 0xfb, 0x56, 0xfb, 0x0b, 0xfb, 0x73, 0xfa,\n  0x7c, 0xfa, 0x2c, 0xfb, 0xff, 0xfb, 0x02, 0xfd, 0xdf, 0xfd, 0x8b, 0xfe,\n  0x78, 0xff, 0xeb, 0xff, 0xeb, 0xff, 0x35, 0x00, 0x97, 0x00, 0x01, 0x01,\n  0xef, 0x00, 0xea, 0x00, 0xc0, 0x00, 0x7d, 0x00, 0xa0, 0x00, 0x2f, 0x01,\n  0xcb, 0x01, 0x38, 0x02, 0xad, 0x02, 0x37, 0x03, 0xa4, 0x03, 0x04, 0x04,\n  0xd4, 0x03, 0x7c, 0x03, 0x68, 0x03, 0x7d, 0x02, 0x3c, 0x01, 0x2d, 0x00,\n  0xc2, 0xff, 0xf5, 0xfe, 0x6e, 0xfe, 0xf0, 0xfd, 0xa0, 0xfd, 0xab, 0xfd,\n  0xb8, 0xfd, 0xf1, 0xfd, 0xf6, 0xfe, 0xd2, 0xff, 0x66, 0x00, 0xa0, 0x00,\n  0xf6, 0x00, 0x1d, 0x01, 0x7a, 0x00, 0x25, 0x00, 0xcf, 0xff, 0x7a, 0xff,\n  0x25, 0xff, 0xf8, 0xfe, 0xbc, 0xfe, 0xa3, 0xfe, 0xa5, 0xfe, 0xac, 0xfe,\n  0xe7, 0xfe, 0x26, 0xff, 0xd4, 0xfe, 0xc7, 0xfe, 0xde, 0xfe, 0x62, 0xfe,\n  0x08, 0xfe, 0xb6, 0xfd, 0x84, 0xfd, 0x2c, 0xfd, 0x09, 0xfd, 0x3a, 0xfd,\n  0x98, 0xfd, 0xd2, 0xfd, 0x18, 0xfe, 0xc8, 0xfd, 0xa5, 0xfd, 0xab, 0xfd,\n  0x6a, 0xfd, 0x55, 0xfd, 0xd3, 0xfc, 0x02, 0xfd, 0xb5, 0xfd, 0x1d, 0xfe,\n  0xa7, 0xfe, 0x48, 0xff, 0x68, 0xff, 0x9c, 0xff, 0x2e, 0x00, 0x71, 0x00,\n  0x94, 0x00, 0xca, 0x00, 0xa7, 0x00, 0xa4, 0x00, 0x0d, 0x01, 0x0e, 0x01,\n  0x31, 0x01, 0xb0, 0x01, 0x20, 0x02, 0x82, 0x02, 0x7b, 0x02, 0xe0, 0x02,\n  0x22, 0x03, 0x5f, 0x03, 0x71, 0x03, 0xaf, 0x03, 0xb7, 0x03, 0xa0, 0x03,\n  0xdc, 0x03, 0x0a, 0x04, 0x24, 0x04, 0x73, 0x04, 0xaa, 0x04, 0x9d, 0x04,\n  0x89, 0x04, 0xd6, 0x03, 0xee, 0x02, 0x33, 0x02, 0xb1, 0x01, 0x00, 0x01,\n  0xc5, 0x00, 0x5b, 0x00, 0x24, 0x00, 0xcd, 0xff, 0x46, 0xff, 0xa1, 0xfe,\n  0x1d, 0xfe, 0x53, 0xfe, 0xac, 0xfe, 0xfb, 0xfe, 0x3f, 0xff, 0xc4, 0xff,\n  0x6a, 0x00, 0x0a, 0x01, 0xbd, 0x01, 0xc1, 0x02, 0x13, 0x04, 0x20, 0x05,\n  0xf4, 0x05, 0xac, 0x06, 0x56, 0x07, 0x8e, 0x07, 0x86, 0x07, 0xb8, 0x07,\n  0x9a, 0x07, 0xea, 0x06, 0x0b, 0x06, 0xd7, 0x04, 0x7e, 0x03, 0xcf, 0x01,\n  0x2e, 0x00, 0xb1, 0xfe, 0x16, 0xfd, 0x7c, 0xfb, 0xfe, 0xf9, 0x9d, 0xf8,\n  0x40, 0xf7, 0x4a, 0xf6, 0x98, 0xf5, 0x3e, 0xf5, 0xde, 0xf4, 0x9b, 0xf4,\n  0x84, 0xf4, 0x96, 0xf4, 0x9a, 0xf4, 0x04, 0xf5, 0x6d, 0xf5, 0xcd, 0xf5,\n  0x06, 0xf6, 0x81, 0xf6, 0xff, 0xf6, 0xf7, 0xf7, 0x04, 0xf9, 0xfa, 0xf9,\n  0x35, 0xfb, 0xa5, 0xfc, 0x2e, 0xfe, 0x80, 0xff, 0xce, 0x00, 0xb9, 0x01,\n  0x8b, 0x02, 0x6e, 0x03, 0x30, 0x04, 0x77, 0x04, 0x9f, 0x04, 0x58, 0x05,\n  0xf4, 0x05, 0x26, 0x06, 0x1c, 0x06, 0x3d, 0x06, 0x51, 0x06, 0xda, 0x05,\n  0x8e, 0x05, 0xba, 0x05, 0x6f, 0x05, 0xcf, 0x04, 0x1f, 0x04, 0x25, 0x03,\n  0x7c, 0x02, 0xdb, 0x01, 0x10, 0x01, 0x89, 0x00, 0x8d, 0xff, 0xbd, 0xfe,\n  0x65, 0xfe, 0xde, 0xfd, 0xb9, 0xfd, 0x9e, 0xfd, 0x79, 0xfd, 0x12, 0xfd,\n  0x31, 0xfc, 0x43, 0xfb, 0xb7, 0xfa, 0x8d, 0xfa, 0x63, 0xfa, 0x8a, 0xfa,\n  0xf2, 0xfa, 0xb5, 0xfb, 0x29, 0xfc, 0x61, 0xfc, 0xde, 0xfc, 0x45, 0xfd,\n  0x8d, 0xfd, 0x43, 0xfe, 0x7b, 0xfe, 0x6a, 0xfe, 0xb5, 0xfe, 0x52, 0xff,\n  0xca, 0xff, 0x4e, 0x00, 0x90, 0x00, 0x72, 0x00, 0x12, 0x00, 0xaf, 0xff,\n  0xab, 0xff, 0xd0, 0xff, 0xb3, 0xff, 0x90, 0xff, 0xb8, 0xff, 0x64, 0x00,\n  0xdc, 0x00, 0x61, 0x01, 0xee, 0x01, 0x7d, 0x02, 0x11, 0x03, 0x96, 0x03,\n  0x0a, 0x04, 0xa9, 0x04, 0x58, 0x05, 0xab, 0x05, 0x52, 0x06, 0xfc, 0x06,\n  0xb7, 0x07, 0x14, 0x08, 0x48, 0x08, 0x91, 0x08, 0xc7, 0x08, 0x22, 0x08,\n  0x45, 0x07, 0x80, 0x06, 0x4b, 0x05, 0x0b, 0x04, 0xe5, 0x02, 0x4f, 0x01,\n  0x74, 0xff, 0xb5, 0xfd, 0x25, 0xfc, 0xee, 0xfa, 0xec, 0xf9, 0x48, 0xf9,\n  0xc6, 0xf8, 0x67, 0xf8, 0xf5, 0xf7, 0xc8, 0xf7, 0x5f, 0xf7, 0x01, 0xf7,\n  0xad, 0xf6, 0xc8, 0xf6, 0x19, 0xf7, 0x92, 0xf7, 0x04, 0xf8, 0xad, 0xf8,\n  0xeb, 0xf9, 0x09, 0xfb, 0x4a, 0xfc, 0xb2, 0xfd, 0xe9, 0xfe, 0xd8, 0xff,\n  0xab, 0x00, 0x39, 0x01, 0xc8, 0x01, 0x8c, 0x02, 0x54, 0x03, 0xca, 0x03,\n  0x57, 0x04, 0xa2, 0x04, 0xdb, 0x04, 0x4a, 0x05, 0xa6, 0x05, 0x40, 0x06,\n  0xca, 0x06, 0x1e, 0x07, 0x35, 0x07, 0xd9, 0x06, 0x61, 0x06, 0x87, 0x05,\n  0xb0, 0x04, 0xad, 0x03, 0xeb, 0x02, 0x68, 0x02, 0xb9, 0x01, 0x0c, 0x01,\n  0x55, 0x00, 0x65, 0xff, 0x94, 0xfe, 0xfe, 0xfd, 0x85, 0xfd, 0xa3, 0xfc,\n  0xdb, 0xfb, 0x6b, 0xfb, 0x33, 0xfb, 0x23, 0xfb, 0x53, 0xfb, 0x85, 0xfb,\n  0x84, 0xfb, 0x70, 0xfb, 0x98, 0xfb, 0x14, 0xfc, 0x75, 0xfc, 0xde, 0xfc,\n  0x22, 0xfd, 0x81, 0xfd, 0xd4, 0xfd, 0x00, 0xfe, 0x4f, 0xfe, 0x4e, 0xfe,\n  0x71, 0xfe, 0x06, 0xff, 0x26, 0xff, 0x72, 0xff, 0xaf, 0xff, 0x03, 0x00,\n  0x5a, 0x00, 0xac, 0x00, 0x51, 0x01, 0x2e, 0x02, 0xec, 0x02, 0x7d, 0x03,\n  0x23, 0x04, 0x8e, 0x04, 0x86, 0x04, 0x62, 0x04, 0x06, 0x04, 0xd3, 0x03,\n  0xa1, 0x03, 0xc1, 0x02, 0x12, 0x02, 0x98, 0x01, 0x76, 0x01, 0x82, 0x01,\n  0x9b, 0x01, 0xb9, 0x01, 0xb4, 0x01, 0x27, 0x01, 0xd7, 0x00, 0xcb, 0x00,\n  0x8d, 0x00, 0xfe, 0xff, 0xad, 0xff, 0x58, 0xff, 0x2f, 0xff, 0xca, 0xfe,\n  0x53, 0xfe, 0x01, 0xfe, 0x09, 0xfe, 0x16, 0xfe, 0x18, 0xfe, 0x45, 0xfe,\n  0x91, 0xfe, 0x34, 0xff, 0xc6, 0xff, 0x42, 0x00, 0xd4, 0x00, 0x6c, 0x01,\n  0xd4, 0x01, 0x33, 0x02, 0x8c, 0x02, 0xd6, 0x02, 0xda, 0x02, 0x14, 0x03,\n  0xc1, 0x03, 0x39, 0x04, 0x4f, 0x04, 0x23, 0x04, 0xf0, 0x03, 0x54, 0x03,\n  0xb2, 0x02, 0x33, 0x02, 0x92, 0x01, 0xee, 0x00, 0x47, 0x00, 0xe6, 0xff,\n  0x82, 0xff, 0x0e, 0xff, 0x81, 0xfe, 0x27, 0xfe, 0xb9, 0xfd, 0xf6, 0xfc,\n  0xcd, 0xfb, 0xe1, 0xfa, 0xf4, 0xf9, 0x51, 0xf9, 0xdd, 0xf8, 0x90, 0xf8,\n  0xa8, 0xf8, 0xfe, 0xf8, 0x5e, 0xf9, 0xfc, 0xf9, 0xbd, 0xfa, 0x24, 0xfb,\n  0xb1, 0xfb, 0x66, 0xfc, 0xd8, 0xfc, 0x32, 0xfd, 0x8b, 0xfd, 0x86, 0xfd,\n  0xbc, 0xfd, 0xd4, 0xfd, 0x99, 0xfd, 0x80, 0xfd, 0x90, 0xfd, 0xbe, 0xfd,\n  0x12, 0xfe, 0x27, 0xfe, 0x6f, 0xfe, 0xbf, 0xfe, 0x29, 0xff, 0x98, 0xff,\n  0x26, 0x00, 0xb2, 0x00, 0x55, 0x01, 0x77, 0x02, 0x5b, 0x03, 0x07, 0x04,\n  0x9c, 0x04, 0x2a, 0x05, 0xb4, 0x05, 0x1a, 0x06, 0x55, 0x06, 0x54, 0x06,\n  0xee, 0x05, 0x6b, 0x05, 0x22, 0x05, 0xdc, 0x04, 0xed, 0x03, 0xe8, 0x02,\n  0x7d, 0x01, 0xff, 0xff, 0x02, 0xff, 0x49, 0xfe, 0xbd, 0xfd, 0x27, 0xfd,\n  0x81, 0xfc, 0x05, 0xfc, 0xd7, 0xfb, 0xe5, 0xfb, 0x22, 0xfc, 0x64, 0xfc,\n  0x73, 0xfc, 0x8f, 0xfc, 0x7b, 0xfc, 0x81, 0xfc, 0x78, 0xfc, 0x81, 0xfc,\n  0x61, 0xfc, 0x8c, 0xfc, 0x20, 0xfd, 0x82, 0xfd, 0xfa, 0xfd, 0xac, 0xfe,\n  0xbe, 0xff, 0x78, 0x00, 0x2f, 0x01, 0xec, 0x01, 0x8d, 0x02, 0x33, 0x03,\n  0xcf, 0x03, 0x38, 0x04, 0x93, 0x04, 0xa5, 0x04, 0x7a, 0x04, 0x2e, 0x04,\n  0x0c, 0x04, 0xa1, 0x03, 0xf3, 0x02, 0xc9, 0x01, 0x95, 0x00, 0xef, 0xff,\n  0xc7, 0xff, 0xa1, 0xff, 0x62, 0xff, 0x19, 0xff, 0x23, 0xff, 0xe7, 0xfe,\n  0xc6, 0xfe, 0xb3, 0xfe, 0xef, 0xfe, 0x25, 0xff, 0x1c, 0xff, 0x1d, 0xff,\n  0x84, 0xff, 0x00, 0x00, 0x6c, 0x00, 0x13, 0x01, 0xb7, 0x01, 0x63, 0x02,\n  0xd8, 0x02, 0x88, 0x03, 0x10, 0x04, 0x8e, 0x04, 0x0c, 0x05, 0xa0, 0x05,\n  0x28, 0x06, 0x3c, 0x06, 0xa0, 0x05, 0xc3, 0x04, 0x8c, 0x03, 0xa5, 0x02,\n  0xd5, 0x01, 0xde, 0x00, 0xc1, 0xff, 0xff, 0xfe, 0xf4, 0xfd, 0xee, 0xfc,\n  0x47, 0xfc, 0x71, 0xfb, 0x92, 0xfa, 0xd3, 0xf9, 0x36, 0xf9, 0xc0, 0xf8,\n  0x76, 0xf8, 0x1d, 0xf8, 0x92, 0xf7, 0x50, 0xf7, 0x32, 0xf7, 0xa2, 0xf7,\n  0x1f, 0xf8, 0xd5, 0xf8, 0xe0, 0xf9, 0xf2, 0xfa, 0xf2, 0xfb, 0xec, 0xfc,\n  0xe9, 0xfd, 0xe8, 0xfe, 0xcf, 0xff, 0x05, 0x01, 0x59, 0x02, 0xc1, 0x03,\n  0xaf, 0x04, 0x36, 0x05, 0x94, 0x05, 0xc7, 0x05, 0x1b, 0x06, 0x68, 0x06,\n  0x5f, 0x06, 0x53, 0x06, 0x43, 0x06, 0x56, 0x06, 0x58, 0x06, 0x10, 0x06,\n  0x96, 0x05, 0x45, 0x05, 0xde, 0x04, 0x12, 0x04, 0x76, 0x03, 0x03, 0x03,\n  0xe6, 0x02, 0x7d, 0x02, 0x23, 0x02, 0xcf, 0x01, 0xc7, 0x01, 0x89, 0x01,\n  0x6b, 0x01, 0x95, 0x01, 0xce, 0x01, 0xaf, 0x01, 0x5a, 0x01, 0x9d, 0x00,\n  0xee, 0xff, 0x34, 0xff, 0x4d, 0xfe, 0x7b, 0xfd, 0xbf, 0xfc, 0x07, 0xfc,\n  0x2b, 0xfb, 0x62, 0xfa, 0x7d, 0xf9, 0xe7, 0xf8, 0x3b, 0xf8, 0xc5, 0xf7,\n  0xa0, 0xf7, 0xa9, 0xf7, 0xd9, 0xf7, 0x11, 0xf8, 0x63, 0xf8, 0xb6, 0xf8,\n  0x35, 0xf9, 0xbf, 0xf9, 0x33, 0xfa, 0xb3, 0xfa, 0x44, 0xfb, 0xe4, 0xfb,\n  0x93, 0xfc, 0x3a, 0xfd, 0x36, 0xfe, 0x43, 0xff, 0x79, 0x00, 0x5e, 0x01,\n  0x36, 0x02, 0xb9, 0x02, 0x48, 0x03, 0xd8, 0x03, 0x78, 0x04, 0x6b, 0x05,\n  0x41, 0x06, 0xa6, 0x06, 0x8b, 0x06, 0x5f, 0x06, 0x80, 0x05, 0xb4, 0x04,\n  0x38, 0x04, 0x73, 0x03, 0x7a, 0x02, 0x79, 0x01, 0x6c, 0x00, 0xf7, 0xff,\n  0x94, 0xff, 0x06, 0xff, 0xa9, 0xfe, 0x5c, 0xfe, 0x19, 0xfe, 0x1b, 0xfe,\n  0x2e, 0xfe, 0x7c, 0xfe, 0xce, 0xfe, 0x3f, 0xff, 0x5a, 0xff, 0x4a, 0xff,\n  0x57, 0xff, 0x4f, 0xff, 0x22, 0xff, 0x2d, 0xff, 0x71, 0xff, 0xdb, 0xff,\n  0x0d, 0x00, 0x1b, 0x00, 0x5f, 0x00, 0x9b, 0x00, 0xfe, 0x00, 0x85, 0x01,\n  0xbc, 0x01, 0xf2, 0x01, 0x0e, 0x02, 0x3b, 0x02, 0x7e, 0x02, 0xa8, 0x02,\n  0x8f, 0x02, 0x68, 0x02, 0x35, 0x02, 0x95, 0x01, 0xe7, 0x00, 0x36, 0x00,\n  0x94, 0xff, 0x0f, 0xff, 0x8a, 0xfe, 0x68, 0xfe, 0x9d, 0xfe, 0xf1, 0xfe,\n  0x53, 0xff, 0xe9, 0xff, 0xa3, 0x00, 0x19, 0x01, 0x7a, 0x01, 0x77, 0x01,\n  0x79, 0x01, 0x14, 0x01, 0xa3, 0x00, 0xfb, 0xff, 0x93, 0xff, 0x0e, 0xff,\n  0x75, 0xfe, 0xe6, 0xfd, 0x41, 0xfd, 0xf0, 0xfc, 0xec, 0xfc, 0xed, 0xfc,\n  0x35, 0xfd, 0xb8, 0xfd, 0xf5, 0xfd, 0xec, 0xfd, 0xb3, 0xfd, 0x62, 0xfd,\n  0x02, 0xfd, 0xe2, 0xfc, 0xa1, 0xfc, 0xa2, 0xfc, 0xa8, 0xfc, 0xd2, 0xfc,\n  0xf2, 0xfc, 0xf4, 0xfc, 0x18, 0xfd, 0x56, 0xfd, 0x62, 0xfd, 0xa1, 0xfd,\n  0x22, 0xfe, 0xa7, 0xfe, 0x4d, 0xff, 0xf1, 0xff, 0x90, 0x00, 0x00, 0x01,\n  0xa3, 0x01, 0x77, 0x02, 0x65, 0x03, 0x55, 0x04, 0x04, 0x05, 0x6d, 0x05,\n  0xe4, 0x05, 0xf9, 0x05, 0xbd, 0x05, 0x3e, 0x05, 0xb2, 0x04, 0x33, 0x04,\n  0x49, 0x03, 0x21, 0x02, 0xe8, 0x00, 0xd4, 0xff, 0x09, 0xff, 0x6f, 0xfe,\n  0xf9, 0xfd, 0x7d, 0xfd, 0x1b, 0xfd, 0xcd, 0xfc, 0xf2, 0xfc, 0x68, 0xfd,\n  0xee, 0xfd, 0x60, 0xfe, 0x94, 0xfe, 0x70, 0xfe, 0x25, 0xfe, 0x0b, 0xfe,\n  0xe8, 0xfd, 0xa7, 0xfd, 0x56, 0xfd, 0xf3, 0xfc, 0xf3, 0xfc, 0x57, 0xfd,\n  0xb1, 0xfd, 0x0d, 0xfe, 0xa0, 0xfe, 0x24, 0xff, 0xaf, 0xff, 0x0b, 0x00,\n  0x58, 0x00, 0x97, 0x00, 0xd7, 0x00, 0x66, 0x01, 0xff, 0x01, 0x83, 0x02,\n  0xf4, 0x02, 0x43, 0x03, 0x53, 0x03, 0x6e, 0x03, 0x44, 0x03, 0x00, 0x03,\n  0xe3, 0x02, 0x96, 0x02, 0x16, 0x02, 0x8b, 0x01, 0xd1, 0x00, 0x31, 0x00,\n  0xd4, 0xff, 0x97, 0xff, 0x48, 0xff, 0xed, 0xfe, 0x64, 0xfe, 0xdf, 0xfd,\n  0xac, 0xfd, 0x95, 0xfd, 0x7a, 0xfd, 0xc9, 0xfd, 0x42, 0xfe, 0xd9, 0xfe,\n  0xf4, 0xfe, 0x92, 0xfe, 0x20, 0xfe, 0xad, 0xfd, 0x6a, 0xfd, 0x32, 0xfd,\n  0x19, 0xfd, 0xdd, 0xfc, 0xfb, 0xfc, 0x66, 0xfd, 0xd7, 0xfd, 0x6b, 0xfe,\n  0x03, 0xff, 0x79, 0xff, 0xce, 0xff, 0x1e, 0x00, 0x8f, 0x00, 0x0d, 0x01,\n  0x6e, 0x01, 0x41, 0x02, 0x46, 0x03, 0x0a, 0x04, 0x7e, 0x04, 0xa3, 0x04,\n  0x39, 0x04, 0xb5, 0x03, 0x44, 0x03, 0x8d, 0x02, 0xc4, 0x01, 0x58, 0x01,\n  0x11, 0x01, 0xc0, 0x00, 0x02, 0x00, 0x0a, 0xff, 0x14, 0xfe, 0x4f, 0xfd,\n  0xe0, 0xfc, 0x8c, 0xfc, 0x72, 0xfc, 0x86, 0xfc, 0xd1, 0xfc, 0x02, 0xfd,\n  0xff, 0xfc, 0x21, 0xfd, 0x71, 0xfd, 0xcf, 0xfd, 0x42, 0xfe, 0xf0, 0xfe,\n  0xd4, 0xff, 0xbe, 0x00, 0x7e, 0x01, 0xe4, 0x01, 0x51, 0x02, 0x89, 0x02,\n  0xc3, 0x02, 0xff, 0x02, 0x6b, 0x03, 0xb7, 0x03, 0xb5, 0x03, 0x60, 0x03,\n  0x03, 0x03, 0xaf, 0x02, 0x72, 0x02, 0x46, 0x02, 0x27, 0x02, 0x12, 0x02,\n  0xa6, 0x01, 0xcc, 0x00, 0xba, 0xff, 0xd8, 0xfe, 0xcd, 0xfd, 0xff, 0xfc,\n  0x60, 0xfc, 0x06, 0xfc, 0x15, 0xfc, 0x30, 0xfc, 0x7c, 0xfc, 0xad, 0xfc,\n  0xcd, 0xfc, 0xba, 0xfc, 0xcd, 0xfc, 0xad, 0xfc, 0x99, 0xfc, 0xa3, 0xfc,\n  0xe9, 0xfc, 0x0c, 0xfd, 0x48, 0xfd, 0xa5, 0xfd, 0x29, 0xfe, 0xdf, 0xfe,\n  0x83, 0xff, 0x19, 0x00, 0x99, 0x00, 0xc9, 0x00, 0xd9, 0x00, 0xa9, 0x00,\n  0x8c, 0x00, 0xdf, 0x00, 0x49, 0x01, 0x9b, 0x01, 0xe9, 0x01, 0x11, 0x02,\n  0x31, 0x02, 0x9d, 0x02, 0x36, 0x03, 0xa9, 0x03, 0x0e, 0x04, 0x63, 0x04,\n  0x8d, 0x04, 0x99, 0x04, 0x60, 0x04, 0x16, 0x04, 0x95, 0x03, 0xbb, 0x02,\n  0xfa, 0x01, 0x57, 0x01, 0xc4, 0x00, 0x4e, 0x00, 0xcc, 0xff, 0x1b, 0xff,\n  0x7a, 0xfe, 0xf4, 0xfd, 0x89, 0xfd, 0x6a, 0xfd, 0x72, 0xfd, 0x5c, 0xfd,\n  0x68, 0xfd, 0x64, 0xfd, 0x67, 0xfd, 0xab, 0xfd, 0xdd, 0xfd, 0x1e, 0xfe,\n  0x4e, 0xfe, 0xb9, 0xfe, 0x29, 0xff, 0xae, 0xff, 0x60, 0x00, 0x4d, 0x01,\n  0x71, 0x02, 0x58, 0x03, 0x2c, 0x04, 0xc9, 0x04, 0x12, 0x05, 0xf3, 0x04,\n  0xc6, 0x04, 0x2e, 0x04, 0x40, 0x03, 0x91, 0x02, 0x05, 0x02, 0x38, 0x01,\n  0x57, 0x00, 0x2d, 0xff, 0xc1, 0xfd, 0x8f, 0xfc, 0x9f, 0xfb, 0xbb, 0xfa,\n  0x0f, 0xfa, 0x7a, 0xf9, 0x1f, 0xf9, 0xfe, 0xf8, 0x13, 0xf9, 0x30, 0xf9,\n  0x78, 0xf9, 0xea, 0xf9, 0x97, 0xfa, 0x40, 0xfb, 0xbb, 0xfb, 0x5a, 0xfc,\n  0x0c, 0xfd, 0xa8, 0xfd, 0x39, 0xfe, 0xbe, 0xfe, 0x38, 0xff, 0xdd, 0xff,\n  0x8d, 0x00, 0x2d, 0x01, 0x01, 0x02, 0xf7, 0x02, 0xe3, 0x03, 0xaf, 0x04,\n  0x6e, 0x05, 0xfd, 0x05, 0x56, 0x06, 0x83, 0x06, 0x99, 0x06, 0xe4, 0x06,\n  0xf7, 0x06, 0xcd, 0x06, 0x65, 0x06, 0xc2, 0x05, 0xe8, 0x04, 0x1b, 0x04,\n  0x66, 0x03, 0x9b, 0x02, 0xc3, 0x01, 0xa5, 0x00, 0x8f, 0xff, 0x8b, 0xfe,\n  0x7f, 0xfd, 0xca, 0xfc, 0x78, 0xfc, 0x44, 0xfc, 0x54, 0xfc, 0x36, 0xfc,\n  0x00, 0xfc, 0xcb, 0xfb, 0x89, 0xfb, 0x9f, 0xfb, 0xe7, 0xfb, 0x0c, 0xfc,\n  0x2c, 0xfc, 0x5c, 0xfc, 0x9a, 0xfc, 0xe4, 0xfc, 0x39, 0xfd, 0x89, 0xfd,\n  0xb2, 0xfd, 0xfe, 0xfd, 0x3b, 0xfe, 0x77, 0xfe, 0x9c, 0xfe, 0x9e, 0xfe,\n  0x9e, 0xfe, 0xcb, 0xfe, 0xa6, 0xfe, 0x94, 0xfe, 0x84, 0xfe, 0x91, 0xfe,\n  0xaf, 0xfe, 0xb6, 0xfe, 0xe7, 0xfe, 0x12, 0xff, 0x55, 0xff, 0x9a, 0xff,\n  0xb2, 0xff, 0xec, 0xff, 0x5e, 0x00, 0xf4, 0x00, 0x99, 0x01, 0x43, 0x02,\n  0xe1, 0x02, 0x88, 0x03, 0xff, 0x03, 0x2e, 0x04, 0xea, 0x03, 0x5f, 0x03,\n  0xdd, 0x02, 0xa0, 0x02, 0x6e, 0x02, 0x30, 0x02, 0x01, 0x02, 0xa0, 0x01,\n  0x1b, 0x01, 0x83, 0x00, 0xe5, 0xff, 0x1a, 0xff, 0x85, 0xfe, 0x1d, 0xfe,\n  0xc9, 0xfd, 0x7e, 0xfd, 0x6a, 0xfd, 0xbf, 0xfd, 0x07, 0xfe, 0x67, 0xfe,\n  0xf4, 0xfe, 0x72, 0xff, 0xcf, 0xff, 0x1e, 0x00, 0x37, 0x00, 0x80, 0x00,\n  0xe0, 0x00, 0xeb, 0x00, 0xca, 0x00, 0x81, 0x00, 0x24, 0x00, 0x07, 0x00,\n  0x0d, 0x00, 0x11, 0x00, 0x0b, 0x00, 0xfd, 0xff, 0xbc, 0xff, 0x58, 0xff,\n  0x0c, 0xff, 0xa3, 0xfe, 0x53, 0xfe, 0x27, 0xfe, 0x20, 0xfe, 0x37, 0xfe,\n  0x44, 0xfe, 0x70, 0xfe, 0x71, 0xfe, 0x8f, 0xfe, 0xd9, 0xfe, 0x3c, 0xff,\n  0x84, 0xff, 0xe7, 0xff, 0x7b, 0x00, 0x13, 0x01, 0xdc, 0x01, 0xa9, 0x02,\n  0x60, 0x03, 0x1e, 0x04, 0x87, 0x04, 0x92, 0x04, 0xac, 0x04, 0xa2, 0x04,\n  0x72, 0x04, 0x5a, 0x04, 0x63, 0x04, 0x75, 0x04, 0x67, 0x04, 0xfe, 0x03,\n  0x79, 0x03, 0xbe, 0x02, 0xe7, 0x01, 0x5f, 0x01, 0xe1, 0x00, 0x3b, 0x00,\n  0x98, 0xff, 0xf4, 0xfe, 0x43, 0xfe, 0x92, 0xfd, 0xc9, 0xfc, 0x01, 0xfc,\n  0x4f, 0xfb, 0xc3, 0xfa, 0x6c, 0xfa, 0x68, 0xfa, 0xc8, 0xfa, 0x4d, 0xfb,\n  0xac, 0xfb, 0xe6, 0xfb, 0xe1, 0xfb, 0xbd, 0xfb, 0xa2, 0xfb, 0xa9, 0xfb,\n  0xcf, 0xfb, 0xd3, 0xfb, 0xef, 0xfb, 0x09, 0xfc, 0x2a, 0xfc, 0x8d, 0xfc,\n  0xe6, 0xfc, 0x05, 0xfd, 0x09, 0xfd, 0x1a, 0xfd, 0x4d, 0xfd, 0xae, 0xfd,\n  0x2a, 0xfe, 0xf6, 0xfe, 0xc2, 0xff, 0x9b, 0x00, 0x4a, 0x01, 0x26, 0x02,\n  0xc3, 0x02, 0x5c, 0x03, 0xfd, 0x03, 0xc0, 0x04, 0x07, 0x05, 0x31, 0x05,\n  0x49, 0x05, 0x3d, 0x05, 0x2e, 0x05, 0xca, 0x04, 0xac, 0x04, 0x62, 0x04,\n  0xe3, 0x03, 0x6f, 0x03, 0x54, 0x03, 0x0e, 0x03, 0xa1, 0x02, 0x3c, 0x02,\n  0xc3, 0x01, 0x4a, 0x01, 0xcb, 0x00, 0x10, 0x00, 0x3a, 0xff, 0x61, 0xfe,\n  0xb3, 0xfd, 0x50, 0xfd, 0xf7, 0xfc, 0x8f, 0xfc, 0x41, 0xfc, 0x03, 0xfc,\n  0xee, 0xfb, 0x31, 0xfc, 0x7e, 0xfc, 0xec, 0xfc, 0x67, 0xfd, 0xcf, 0xfd,\n  0x15, 0xfe, 0x89, 0xfe, 0x02, 0xff, 0x01, 0xff, 0xf5, 0xfe, 0xe1, 0xfe,\n  0xf2, 0xfe, 0xfc, 0xfe, 0xf1, 0xfe, 0xe4, 0xfe, 0xbb, 0xfe, 0xde, 0xfe,\n  0x2b, 0xff, 0x92, 0xff, 0x8e, 0xff, 0x5d, 0xff, 0x28, 0xff, 0x55, 0xff,\n  0xb4, 0xff, 0x2a, 0x00, 0x7b, 0x00, 0xdc, 0x00, 0x7e, 0x01, 0x55, 0x02,\n  0x26, 0x03, 0x08, 0x04, 0xc2, 0x04, 0x45, 0x05, 0x8e, 0x05, 0x97, 0x05,\n  0x5d, 0x05, 0xd5, 0x04, 0x30, 0x04, 0x64, 0x03, 0xb4, 0x02, 0xee, 0x01,\n  0x05, 0x01, 0x3f, 0x00, 0x9d, 0xff, 0x1e, 0xff, 0xe4, 0xfe, 0x94, 0xfe,\n  0xf6, 0xfd, 0x70, 0xfd, 0xdc, 0xfc, 0x6c, 0xfc, 0x52, 0xfc, 0x46, 0xfc,\n  0x5a, 0xfc, 0xae, 0xfc, 0x0a, 0xfd, 0x76, 0xfd, 0xe2, 0xfd, 0x69, 0xfe,\n  0xda, 0xfe, 0x34, 0xff, 0x88, 0xff, 0xe1, 0xff, 0x07, 0x00, 0xcf, 0xff,\n  0xc5, 0xff, 0xa3, 0xff, 0x92, 0xff, 0x78, 0xff, 0x2b, 0xff, 0xb7, 0xfe,\n  0x5a, 0xfe, 0x18, 0xfe, 0xed, 0xfd, 0xf0, 0xfd, 0xf3, 0xfd, 0xfc, 0xfd,\n  0x01, 0xfe, 0x0a, 0xfe, 0x38, 0xfe, 0xa7, 0xfe, 0x13, 0xff, 0x57, 0xff,\n  0x7a, 0xff, 0x6e, 0xff, 0x60, 0xff, 0x7a, 0xff, 0x9b, 0xff, 0xdc, 0xff,\n  0xe6, 0xff, 0xba, 0xff, 0x77, 0xff, 0x6b, 0xff, 0x75, 0xff, 0x81, 0xff,\n  0xb7, 0xff, 0xe8, 0xff, 0x59, 0x00, 0xff, 0x00, 0xa7, 0x01, 0x75, 0x02,\n  0x0b, 0x03, 0x86, 0x03, 0x08, 0x04, 0x55, 0x04, 0x19, 0x04, 0xb6, 0x03,\n  0x2d, 0x03, 0x82, 0x02, 0xee, 0x01, 0x72, 0x01, 0x0e, 0x01, 0xc4, 0x00,\n  0x82, 0x00, 0x4a, 0x00, 0xda, 0xff, 0x5b, 0xff, 0xf1, 0xfe, 0xc9, 0xfe,\n  0xa3, 0xfe, 0xb9, 0xfe, 0x18, 0xff, 0xa4, 0xff, 0xf6, 0xff, 0x26, 0x00,\n  0x33, 0x00, 0x4b, 0x00, 0x62, 0x00, 0x4b, 0x00, 0x4b, 0x00, 0x8e, 0x00,\n  0xe1, 0x00, 0x37, 0x01, 0x81, 0x01, 0x89, 0x01, 0x85, 0x01, 0x61, 0x01,\n  0x64, 0x01, 0xcd, 0x01, 0x03, 0x02, 0x15, 0x02, 0xf4, 0x01, 0xba, 0x01,\n  0x6f, 0x01, 0x39, 0x01, 0x12, 0x01, 0xb6, 0x00, 0x3a, 0x00, 0x5d, 0xff,\n  0x6b, 0xfe, 0x8f, 0xfd, 0xa5, 0xfc, 0x10, 0xfc, 0x94, 0xfb, 0x22, 0xfb,\n  0xb9, 0xfa, 0x7d, 0xfa, 0x3a, 0xfa, 0x37, 0xfa, 0x66, 0xfa, 0xae, 0xfa,\n  0xf3, 0xfa, 0x1b, 0xfb, 0x27, 0xfb, 0x55, 0xfb, 0xc6, 0xfb, 0x75, 0xfc,\n  0x4a, 0xfd, 0x26, 0xfe, 0xa9, 0xfe, 0x5a, 0xff, 0x2b, 0x00, 0xd4, 0x00,\n  0x6a, 0x01, 0xd7, 0x01, 0x72, 0x02, 0x10, 0x03, 0x92, 0x03, 0xe7, 0x03,\n  0x2f, 0x04, 0x70, 0x04, 0xaf, 0x04, 0x0b, 0x05, 0x40, 0x05, 0x4d, 0x05,\n  0x6d, 0x05, 0x65, 0x05, 0x7f, 0x05, 0x92, 0x05, 0x93, 0x05, 0xc3, 0x05,\n  0xfe, 0x05, 0xe1, 0x05, 0xbb, 0x05, 0x27, 0x05, 0x52, 0x04, 0x70, 0x03,\n  0x53, 0x02, 0x34, 0x01, 0xcc, 0xff, 0x66, 0xfe, 0xfb, 0xfc, 0xe0, 0xfb,\n  0x16, 0xfb, 0x84, 0xfa, 0x0f, 0xfa, 0x58, 0xf9, 0x92, 0xf8, 0xfa, 0xf7,\n  0xab, 0xf7, 0x95, 0xf7, 0x96, 0xf7, 0xa6, 0xf7, 0xce, 0xf7, 0x48, 0xf8,\n  0xfc, 0xf8, 0xd3, 0xf9, 0xda, 0xfa, 0xf0, 0xfb, 0xf6, 0xfc, 0xff, 0xfd,\n  0xbf, 0xfe, 0x38, 0xff, 0xdf, 0xff, 0x8e, 0x00, 0x2c, 0x01, 0xec, 0x01,\n  0xa9, 0x02, 0x6e, 0x03, 0x39, 0x04, 0xe7, 0x04, 0x87, 0x05, 0x59, 0x06,\n  0xfe, 0x06, 0x9e, 0x07, 0x00, 0x08, 0x1d, 0x08, 0xf0, 0x07, 0xb2, 0x07,\n  0x2b, 0x07, 0x95, 0x06, 0xc3, 0x05, 0x06, 0x05, 0x38, 0x04, 0x37, 0x03,\n  0x02, 0x02, 0xe0, 0x00, 0xd0, 0xff, 0xe6, 0xfe, 0x54, 0xfe, 0xc7, 0xfd,\n  0x78, 0xfd, 0x26, 0xfd, 0xd7, 0xfc, 0xbf, 0xfc, 0xf6, 0xfc, 0x1f, 0xfd,\n  0x4d, 0xfd, 0xa4, 0xfd, 0xe8, 0xfd, 0xfe, 0xfd, 0x03, 0xfe, 0xc2, 0xfd,\n  0x80, 0xfd, 0x7a, 0xfd, 0xa8, 0xfd, 0xf2, 0xfd, 0x22, 0xfe, 0x1b, 0xfe,\n  0x33, 0xfe, 0x5f, 0xfe, 0xe5, 0xfe, 0x94, 0xff, 0x1c, 0x00, 0x49, 0x00,\n  0x6b, 0x00, 0x60, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x78, 0x00, 0x6b, 0x00,\n  0x41, 0x00, 0xea, 0xff, 0x93, 0xff, 0x19, 0xff, 0xbd, 0xfe, 0x6e, 0xfe,\n  0x34, 0xfe, 0x11, 0xfe, 0x15, 0xfe, 0x50, 0xfe, 0x6e, 0xfe, 0xa1, 0xfe,\n  0xd7, 0xfe, 0x15, 0xff, 0x2f, 0xff, 0x26, 0xff, 0x1b, 0xff, 0x30, 0xff,\n  0x56, 0xff, 0x60, 0xff, 0x58, 0xff, 0x23, 0xff, 0x1b, 0xff, 0x38, 0xff,\n  0x65, 0xff, 0x6a, 0xff, 0x54, 0xff, 0x67, 0xff, 0xa1, 0xff, 0xe9, 0xff,\n  0x72, 0x00, 0xfa, 0x00, 0xb1, 0x01, 0x46, 0x02, 0xa5, 0x02, 0xc3, 0x02,\n  0xea, 0x02, 0xc0, 0x02, 0xb7, 0x02, 0x9e, 0x02, 0x5a, 0x02, 0x21, 0x02,\n  0x98, 0x01, 0x29, 0x01, 0xd7, 0x00, 0x7c, 0x00, 0x32, 0x00, 0x08, 0x00,\n  0xf6, 0xff, 0x9b, 0xff, 0x5e, 0xff, 0x16, 0xff, 0xbb, 0xfe, 0x4d, 0xfe,\n  0xd3, 0xfd, 0x90, 0xfd, 0x51, 0xfd, 0xf2, 0xfc, 0x98, 0xfc, 0x52, 0xfc,\n  0x19, 0xfc, 0x01, 0xfc, 0xeb, 0xfb, 0xcd, 0xfb, 0xc3, 0xfb, 0xf9, 0xfb,\n  0x52, 0xfc, 0xbf, 0xfc, 0x4a, 0xfd, 0xfa, 0xfd, 0xc2, 0xfe, 0x84, 0xff,\n  0x11, 0x00, 0x9b, 0x00, 0xeb, 0x00, 0xfe, 0x00, 0x16, 0x01, 0x3a, 0x01,\n  0x45, 0x01, 0x6a, 0x01, 0x69, 0x01, 0x5b, 0x01, 0x4a, 0x01, 0x1f, 0x01,\n  0xe4, 0x00, 0x97, 0x00, 0x66, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x59, 0x00,\n  0x77, 0x00, 0xa7, 0x00, 0xe3, 0x00, 0x51, 0x01, 0x00, 0x02, 0x93, 0x02,\n  0x30, 0x03, 0xb1, 0x03, 0x39, 0x04, 0xa0, 0x04, 0xa1, 0x04, 0x8c, 0x04,\n  0x4f, 0x04, 0xf9, 0x03, 0x82, 0x03, 0xfb, 0x02, 0x5c, 0x02, 0x65, 0x01,\n  0x22, 0x00, 0xdd, 0xfe, 0x96, 0xfd, 0xc8, 0xfc, 0x11, 0xfc, 0x86, 0xfb,\n  0x13, 0xfb, 0x9e, 0xfa, 0x79, 0xfa, 0x64, 0xfa, 0x78, 0xfa, 0xd6, 0xfa,\n  0x51, 0xfb, 0xc6, 0xfb, 0x2d, 0xfc, 0x68, 0xfc, 0x7d, 0xfc, 0xb6, 0xfc,\n  0x1a, 0xfd, 0x8d, 0xfd, 0x11, 0xfe, 0xaf, 0xfe, 0x5d, 0xff, 0xde, 0xff,\n  0x6b, 0x00, 0xed, 0x00, 0x58, 0x01, 0xa8, 0x01, 0x08, 0x02, 0x5f, 0x02,\n  0x9e, 0x02, 0x9f, 0x02, 0x93, 0x02, 0x5b, 0x02, 0x4f, 0x02, 0x46, 0x02,\n  0x2c, 0x02, 0x04, 0x02, 0xb0, 0x01, 0x3f, 0x01, 0xdf, 0x00, 0x7a, 0x00,\n  0x4a, 0x00, 0x2c, 0x00, 0x1e, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x3a, 0x00,\n  0x5a, 0x00, 0x7b, 0x00, 0xa3, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x9a, 0x00,\n  0x57, 0x00, 0x0c, 0x00, 0xdd, 0xff, 0xd1, 0xff, 0xa7, 0xff, 0x5d, 0xff,\n  0x17, 0xff, 0xf7, 0xfe, 0xf6, 0xfe, 0x04, 0xff, 0x27, 0xff, 0x44, 0xff,\n  0x62, 0xff, 0x5e, 0xff, 0x6c, 0xff, 0xa4, 0xff, 0xcc, 0xff, 0x04, 0x00,\n  0x1e, 0x00, 0x23, 0x00, 0x0a, 0x00, 0x17, 0x00, 0x2b, 0x00, 0x43, 0x00,\n  0x4d, 0x00, 0x4a, 0x00, 0x57, 0x00, 0x68, 0x00, 0x5d, 0x00, 0x55, 0x00,\n  0x3c, 0x00, 0x28, 0x00, 0x27, 0x00, 0x0d, 0x00, 0xf7, 0xff, 0xe3, 0xff,\n  0xbd, 0xff, 0x75, 0xff, 0x2e, 0xff, 0xfd, 0xfe, 0xe2, 0xfe, 0xcc, 0xfe,\n  0x8d, 0xfe, 0x49, 0xfe, 0x34, 0xfe, 0x4d, 0xfe, 0x6c, 0xfe, 0xa6, 0xfe,\n  0xb7, 0xfe, 0xed, 0xfe, 0x1d, 0xff, 0x2d, 0xff, 0x3a, 0xff, 0x32, 0xff,\n  0x25, 0xff, 0x2c, 0xff, 0x30, 0xff, 0x3e, 0xff, 0x71, 0xff, 0x8c, 0xff,\n  0xb5, 0xff, 0xe8, 0xff, 0x16, 0x00, 0x49, 0x00, 0xaf, 0x00, 0x12, 0x01,\n  0x8d, 0x01, 0xd6, 0x01, 0x1c, 0x02, 0x39, 0x02, 0x30, 0x02, 0x41, 0x02,\n  0x77, 0x02, 0x92, 0x02, 0x73, 0x02, 0x3b, 0x02, 0xbb, 0x01, 0x5e, 0x01,\n  0x46, 0x01, 0x39, 0x01, 0x22, 0x01, 0xf9, 0x00, 0xca, 0x00, 0x51, 0x00,\n  0x07, 0x00, 0xa8, 0xff, 0x4e, 0xff, 0xf0, 0xfe, 0xb8, 0xfe, 0x60, 0xfe,\n  0x34, 0xfe, 0xff, 0xfd, 0xc5, 0xfd, 0x9d, 0xfd, 0x6c, 0xfd, 0x5a, 0xfd,\n  0x58, 0xfd, 0x23, 0xfd, 0xe4, 0xfc, 0xb1, 0xfc, 0xa3, 0xfc, 0xae, 0xfc,\n  0xf4, 0xfc, 0x58, 0xfd, 0xd8, 0xfd, 0x59, 0xfe, 0xaa, 0xfe, 0xe8, 0xfe,\n  0x00, 0xff, 0x1e, 0xff, 0x41, 0xff, 0x37, 0xff, 0x74, 0xff, 0xec, 0xff,\n  0x86, 0x00, 0x00, 0x01, 0x5d, 0x01, 0x96, 0x01, 0xc2, 0x01, 0x20, 0x02,\n  0x6c, 0x02, 0xcc, 0x02, 0x3d, 0x03, 0xbe, 0x03, 0x27, 0x04, 0x3d, 0x04,\n  0xff, 0x03, 0x95, 0x03, 0x1c, 0x03, 0xb7, 0x02, 0x6e, 0x02, 0x09, 0x02,\n  0xa3, 0x01, 0x17, 0x01, 0xa5, 0x00, 0x80, 0x00, 0x7d, 0x00, 0x71, 0x00,\n  0x6b, 0x00, 0x62, 0x00, 0x4d, 0x00, 0x07, 0x00, 0x95, 0xff, 0x0b, 0xff,\n  0x84, 0xfe, 0xf1, 0xfd, 0x7d, 0xfd, 0x3b, 0xfd, 0x0e, 0xfd, 0x0b, 0xfd,\n  0x0c, 0xfd, 0xff, 0xfc, 0xeb, 0xfc, 0xc7, 0xfc, 0x97, 0xfc, 0x6d, 0xfc,\n  0x76, 0xfc, 0x84, 0xfc, 0xe7, 0xfc, 0x81, 0xfd, 0x29, 0xfe, 0xaf, 0xfe,\n  0xca, 0xfe, 0xc9, 0xfe, 0xbf, 0xfe, 0xd3, 0xfe, 0xcd, 0xfe, 0xe2, 0xfe,\n  0xf3, 0xfe, 0x2b, 0xff, 0xa3, 0xff, 0x49, 0x00, 0x15, 0x01, 0xf8, 0x01,\n  0xad, 0x02, 0x29, 0x03, 0x7d, 0x03, 0x8f, 0x03, 0x8d, 0x03, 0x7c, 0x03,\n  0x4b, 0x03, 0x43, 0x03, 0x86, 0x03, 0xd2, 0x03, 0x4d, 0x04, 0xa2, 0x04,\n  0xda, 0x04, 0xf7, 0x04, 0xbb, 0x04, 0x68, 0x04, 0x0b, 0x04, 0x78, 0x03,\n  0xcc, 0x02, 0x16, 0x02, 0x56, 0x01, 0x6a, 0x00, 0xa2, 0xff, 0xa3, 0xfe,\n  0xc5, 0xfd, 0x31, 0xfd, 0xbb, 0xfc, 0x7a, 0xfc, 0x2b, 0xfc, 0xd6, 0xfb,\n  0x60, 0xfb, 0x1d, 0xfb, 0x10, 0xfb, 0x13, 0xfb, 0x26, 0xfb, 0x2f, 0xfb,\n  0x4c, 0xfb, 0xac, 0xfb, 0x33, 0xfc, 0xc8, 0xfc, 0x59, 0xfd, 0xfb, 0xfd,\n  0x8e, 0xfe, 0xfa, 0xfe, 0x65, 0xff, 0xe7, 0xff, 0x56, 0x00, 0x9d, 0x00,\n  0xac, 0x00, 0xf4, 0x00, 0x25, 0x01, 0x49, 0x01, 0x41, 0x01, 0x0d, 0x01,\n  0xb4, 0x00, 0x63, 0x00, 0x0f, 0x00, 0xd5, 0xff, 0xc4, 0xff, 0xe0, 0xff,\n  0x06, 0x00, 0x40, 0x00, 0x69, 0x00, 0x3e, 0x00, 0x1b, 0x00, 0x08, 0x00,\n  0x24, 0x00, 0x23, 0x00, 0x0a, 0x00, 0xc7, 0xff, 0x97, 0xff, 0x76, 0xff,\n  0x65, 0xff, 0x6c, 0xff, 0x41, 0xff, 0x53, 0xff, 0x49, 0xff, 0x4b, 0xff,\n  0x25, 0xff, 0xf5, 0xfe, 0xdf, 0xfe, 0xdb, 0xfe, 0x11, 0xff, 0x73, 0xff,\n  0x05, 0x00, 0xa7, 0x00, 0xfb, 0x00, 0x30, 0x01, 0x44, 0x01, 0x25, 0x01,\n  0xef, 0x00, 0xa6, 0x00, 0x6c, 0x00, 0x38, 0x00, 0x09, 0x00, 0xe2, 0xff,\n  0xc4, 0xff, 0xd0, 0xff, 0xbe, 0xff, 0xcf, 0xff, 0xc7, 0xff, 0xc3, 0xff,\n  0xe9, 0xff, 0xff, 0xff, 0x27, 0x00, 0x57, 0x00, 0x89, 0x00, 0x92, 0x00,\n  0x6f, 0x00, 0x3c, 0x00, 0x03, 0x00, 0xd0, 0xff, 0x8e, 0xff, 0x65, 0xff,\n  0x1c, 0xff, 0xe8, 0xfe, 0xbf, 0xfe, 0xe2, 0xfe, 0xfd, 0xfe, 0x0b, 0xff,\n  0xe6, 0xfe, 0xcf, 0xfe, 0xac, 0xfe, 0xc6, 0xfe, 0xd2, 0xfe, 0xe2, 0xfe,\n  0xd2, 0xfe, 0xa8, 0xfe, 0xa7, 0xfe, 0xbd, 0xfe, 0xc8, 0xfe, 0xe4, 0xfe,\n  0xf6, 0xfe, 0x13, 0xff, 0x36, 0xff, 0x4b, 0xff, 0x91, 0xff, 0x37, 0x00,\n  0xc7, 0x00, 0x87, 0x01, 0x24, 0x02, 0xd0, 0x02, 0x50, 0x03, 0x90, 0x03,\n  0xe7, 0x03, 0x5c, 0x04, 0xad, 0x04, 0xf5, 0x04, 0x34, 0x05, 0x54, 0x05,\n  0x7f, 0x05, 0x80, 0x05, 0x7c, 0x05, 0x71, 0x05, 0x6a, 0x05, 0x04, 0x05,\n  0x9a, 0x04, 0xe1, 0x03, 0xfd, 0x02, 0xd2, 0x01, 0xcc, 0x00, 0xab, 0xff,\n  0x74, 0xfe, 0x6b, 0xfd, 0x8c, 0xfc, 0xdf, 0xfb, 0x42, 0xfb, 0xe8, 0xfa,\n  0xa4, 0xfa, 0x63, 0xfa, 0x2a, 0xfa, 0xff, 0xf9, 0xd8, 0xf9, 0xa1, 0xf9,\n  0x7d, 0xf9, 0x7d, 0xf9, 0x8e, 0xf9, 0xdb, 0xf9, 0x38, 0xfa, 0xcf, 0xfa,\n  0x92, 0xfb, 0x7b, 0xfc, 0x71, 0xfd, 0x81, 0xfe, 0x5e, 0xff, 0x58, 0x00,\n  0x48, 0x01, 0x19, 0x02, 0xde, 0x02, 0x90, 0x03, 0xf2, 0x03, 0x4c, 0x04,\n  0x8f, 0x04, 0xdd, 0x04, 0x0e, 0x05, 0x27, 0x05, 0xe0, 0x04, 0xa0, 0x04,\n  0x2e, 0x04, 0xa0, 0x03, 0xff, 0x02, 0x11, 0x02, 0x4f, 0x01, 0xd0, 0x00,\n  0x70, 0x00, 0x08, 0x00, 0xc2, 0xff, 0x48, 0xff, 0xbf, 0xfe, 0x35, 0xfe,\n  0xad, 0xfd, 0x03, 0xfd, 0x79, 0xfc, 0x0e, 0xfc, 0xcf, 0xfb, 0xbf, 0xfb,\n  0xd7, 0xfb, 0x33, 0xfc, 0xa4, 0xfc, 0x15, 0xfd, 0x63, 0xfd, 0x89, 0xfd,\n  0xb4, 0xfd, 0x17, 0xfe, 0x3f, 0xfe, 0x86, 0xfe, 0xa1, 0xfe, 0x17, 0xff,\n  0x71, 0xff, 0x12, 0x00, 0x98, 0x00, 0x34, 0x01, 0xef, 0x01, 0x9a, 0x02,\n  0x6d, 0x03, 0x2b, 0x04, 0xce, 0x04, 0x0f, 0x05, 0x8d, 0x05, 0xcb, 0x05,\n  0xc0, 0x05, 0x3d, 0x05, 0x8c, 0x04, 0xbb, 0x03, 0xec, 0x02, 0x25, 0x02,\n  0x78, 0x01, 0xcd, 0x00, 0xd4, 0xff, 0xf8, 0xfe, 0x01, 0xfe, 0x3d, 0xfd,\n  0x8e, 0xfc, 0x04, 0xfc, 0x9b, 0xfb, 0x76, 0xfb, 0x97, 0xfb, 0xe4, 0xfb,\n  0x87, 0xfc, 0x0e, 0xfd, 0xa3, 0xfd, 0x37, 0xfe, 0xc3, 0xfe, 0x46, 0xff,\n  0xd2, 0xff, 0x04, 0x00, 0x22, 0x00, 0xfa, 0xff, 0xb7, 0xff, 0x73, 0xff,\n  0x66, 0xff, 0x63, 0xff, 0x3b, 0xff, 0x23, 0xff, 0xc6, 0xfe, 0x9c, 0xfe,\n  0x71, 0xfe, 0x6e, 0xfe, 0x9a, 0xfe, 0xa6, 0xfe, 0xc7, 0xfe, 0x00, 0xff,\n  0x35, 0xff, 0x5e, 0xff, 0xa4, 0xff, 0xcb, 0xff, 0xbe, 0xff, 0xb2, 0xff,\n  0x6b, 0xff, 0x32, 0xff, 0x4a, 0xff, 0x68, 0xff, 0x6b, 0xff, 0x5c, 0xff,\n  0x13, 0xff, 0xea, 0xfe, 0xe8, 0xfe, 0xcf, 0xfe, 0xc2, 0xfe, 0xa3, 0xfe,\n  0x96, 0xfe, 0xe5, 0xfe, 0x23, 0xff, 0x74, 0xff, 0xdc, 0xff, 0x66, 0x00,\n  0xee, 0x00, 0x61, 0x01, 0xd1, 0x01, 0x52, 0x02, 0xd9, 0x02, 0x49, 0x03,\n  0x9f, 0x03, 0x1b, 0x04, 0x83, 0x04, 0xcf, 0x04, 0xc8, 0x04, 0x8a, 0x04,\n  0xf4, 0x03, 0x45, 0x03, 0xa2, 0x02, 0x13, 0x02, 0x6c, 0x01, 0xf2, 0x00,\n  0x87, 0x00, 0x3d, 0x00, 0xf0, 0xff, 0xb7, 0xff, 0x72, 0xff, 0x6e, 0xff,\n  0x74, 0xff, 0x81, 0xff, 0xa4, 0xff, 0xc8, 0xff, 0xb4, 0xff, 0xa6, 0xff,\n  0x73, 0xff, 0x52, 0xff, 0x21, 0xff, 0xd8, 0xfe, 0x8a, 0xfe, 0x7a, 0xfe,\n  0x92, 0xfe, 0xac, 0xfe, 0xe2, 0xfe, 0xef, 0xfe, 0x05, 0xff, 0xfb, 0xfe,\n  0x05, 0xff, 0x29, 0xff, 0x3f, 0xff, 0x28, 0xff, 0x09, 0xff, 0xd3, 0xfe,\n  0x8a, 0xfe, 0x78, 0xfe, 0x76, 0xfe, 0x3d, 0xfe, 0x2a, 0xfe, 0x29, 0xfe,\n  0x5e, 0xfe, 0x8f, 0xfe, 0xc8, 0xfe, 0x04, 0xff, 0x79, 0xff, 0xcb, 0xff,\n  0x24, 0x00, 0x6b, 0x00, 0xb8, 0x00, 0xea, 0x00, 0x04, 0x01, 0x22, 0x01,\n  0x33, 0x01, 0x4f, 0x01, 0x4a, 0x01, 0x55, 0x01, 0x41, 0x01, 0xfe, 0x00,\n  0xa0, 0x00, 0x3c, 0x00, 0xbe, 0xff, 0x63, 0xff, 0xfc, 0xfe, 0xaa, 0xfe,\n  0x90, 0xfe, 0x77, 0xfe, 0x91, 0xfe, 0xb0, 0xfe, 0xe0, 0xfe, 0xf4, 0xfe,\n  0xf2, 0xfe, 0xf6, 0xfe, 0xd1, 0xfe, 0x7b, 0xfe, 0x3a, 0xfe, 0xf7, 0xfd,\n  0xae, 0xfd, 0x8b, 0xfd, 0x75, 0xfd, 0x74, 0xfd, 0x5b, 0xfd, 0x68, 0xfd,\n  0x65, 0xfd, 0x58, 0xfd, 0x74, 0xfd, 0xc2, 0xfd, 0x14, 0xfe, 0x6d, 0xfe,\n  0x89, 0xfe, 0xa5, 0xfe, 0xdd, 0xfe, 0x2c, 0xff, 0x7e, 0xff, 0x14, 0x00,\n  0x79, 0x00, 0xe6, 0x00, 0x33, 0x01, 0x34, 0x01, 0x51, 0x01, 0x90, 0x01,\n  0x98, 0x01, 0x8f, 0x01, 0x6d, 0x01, 0x33, 0x01, 0x3c, 0x01, 0x6b, 0x01,\n  0x96, 0x01, 0xf1, 0x01, 0x3f, 0x02, 0x4e, 0x02, 0x67, 0x02, 0x65, 0x02,\n  0x1d, 0x02, 0xd3, 0x01, 0x8b, 0x01, 0x5a, 0x01, 0x2e, 0x01, 0x03, 0x01,\n  0x0e, 0x01, 0x46, 0x01, 0x88, 0x01, 0xeb, 0x01, 0x74, 0x02, 0xd5, 0x02,\n  0x28, 0x03, 0x78, 0x03, 0x83, 0x03, 0xb2, 0x03, 0xb8, 0x03, 0x8c, 0x03,\n  0x52, 0x03, 0xfc, 0x02, 0x97, 0x02, 0x01, 0x02, 0x4c, 0x01, 0x88, 0x00,\n  0xeb, 0xff, 0x36, 0xff, 0xba, 0xfe, 0x48, 0xfe, 0xe3, 0xfd, 0x68, 0xfd,\n  0x05, 0xfd, 0xae, 0xfc, 0x3d, 0xfc, 0x99, 0xfb, 0x0a, 0xfb, 0x75, 0xfa,\n  0x1d, 0xfa, 0xee, 0xf9, 0xdb, 0xf9, 0xe0, 0xf9, 0xfd, 0xf9, 0x12, 0xfa,\n  0x57, 0xfa, 0xb6, 0xfa, 0x34, 0xfb, 0xf3, 0xfb, 0xc8, 0xfc, 0xa7, 0xfd,\n  0x67, 0xfe, 0x0b, 0xff, 0xc3, 0xff, 0x68, 0x00, 0x02, 0x01, 0x9f, 0x01,\n  0x42, 0x02, 0xe7, 0x02, 0x82, 0x03, 0x39, 0x04, 0xcc, 0x04, 0x25, 0x05,\n  0x52, 0x05, 0x85, 0x05, 0xd6, 0x05, 0xdc, 0x05, 0xda, 0x05, 0x7e, 0x05,\n  0x40, 0x05, 0x02, 0x05, 0x6e, 0x04, 0xca, 0x03, 0x0e, 0x03, 0x39, 0x02,\n  0x82, 0x01, 0xdd, 0x00, 0x52, 0x00, 0xc7, 0xff, 0x39, 0xff, 0xca, 0xfe,\n  0x68, 0xfe, 0x01, 0xfe, 0xcb, 0xfd, 0xbe, 0xfd, 0xb7, 0xfd, 0x9d, 0xfd,\n  0x6b, 0xfd, 0x1f, 0xfd, 0xeb, 0xfc, 0xc6, 0xfc, 0xb2, 0xfc, 0xd8, 0xfc,\n  0xfa, 0xfc, 0x40, 0xfd, 0x9c, 0xfd, 0xf9, 0xfd, 0x4c, 0xfe, 0x90, 0xfe,\n  0xe7, 0xfe, 0x13, 0xff, 0x50, 0xff, 0xb1, 0xff, 0x1d, 0x00, 0x8c, 0x00,\n  0xcd, 0x00, 0x03, 0x01, 0x3a, 0x01, 0x6b, 0x01, 0xb2, 0x01, 0x15, 0x02,\n  0x6b, 0x02, 0xc4, 0x02, 0xfc, 0x02, 0xf6, 0x02, 0xeb, 0x02, 0xa8, 0x02,\n  0x35, 0x02, 0xb4, 0x01, 0x41, 0x01, 0x9e, 0x00, 0xfc, 0xff, 0x5a, 0xff,\n  0x94, 0xfe, 0x07, 0xfe, 0x99, 0xfd, 0x33, 0xfd, 0xb6, 0xfc, 0x4d, 0xfc,\n  0xe5, 0xfb, 0xab, 0xfb, 0x9f, 0xfb, 0xa7, 0xfb, 0xe4, 0xfb, 0x17, 0xfc,\n  0x54, 0xfc, 0x8e, 0xfc, 0xd2, 0xfc, 0x47, 0xfd, 0xec, 0xfd, 0x6b, 0xfe,\n  0x12, 0xff, 0x9c, 0xff, 0x08, 0x00, 0x56, 0x00, 0x7e, 0x00, 0x8a, 0x00,\n  0x54, 0x00, 0x19, 0x00, 0xca, 0xff, 0x73, 0xff, 0x46, 0xff, 0x3f, 0xff,\n  0x26, 0xff, 0xf3, 0xfe, 0x95, 0xfe, 0x3b, 0xfe, 0xf5, 0xfd, 0xd7, 0xfd,\n  0xc7, 0xfd, 0xc9, 0xfd, 0xba, 0xfd, 0xeb, 0xfd, 0x3a, 0xfe, 0xac, 0xfe,\n  0x19, 0xff, 0x93, 0xff, 0x03, 0x00, 0x72, 0x00, 0xe6, 0x00, 0x5c, 0x01,\n  0xd4, 0x01, 0x59, 0x02, 0xb8, 0x02, 0xe0, 0x02, 0xdd, 0x02, 0xa3, 0x02,\n  0x18, 0x02, 0xb6, 0x01, 0x61, 0x01, 0xfa, 0x00, 0x94, 0x00, 0x48, 0x00,\n  0x11, 0x00, 0xe7, 0xff, 0xcf, 0xff, 0xd2, 0xff, 0xd1, 0xff, 0xd8, 0xff,\n  0xea, 0xff, 0x02, 0x00, 0x07, 0x00, 0xec, 0xff, 0xc1, 0xff, 0x98, 0xff,\n  0x45, 0xff, 0x0a, 0xff, 0x06, 0xff, 0xdc, 0xfe, 0xd1, 0xfe, 0xf5, 0xfe,\n  0x2b, 0xff, 0x99, 0xff, 0xdc, 0xff, 0x0f, 0x00, 0x3a, 0x00, 0x5e, 0x00,\n  0xa6, 0x00, 0xfe, 0x00, 0x79, 0x01, 0xd2, 0x01, 0x46, 0x02, 0xa8, 0x02,\n  0xe9, 0x02, 0x2d, 0x03, 0x6c, 0x03, 0x9b, 0x03, 0xd2, 0x03, 0xff, 0x03,\n  0x2f, 0x04, 0x54, 0x04, 0x65, 0x04, 0x23, 0x04, 0xed, 0x03, 0x80, 0x03,\n  0xff, 0x02, 0x78, 0x02, 0xe7, 0x01, 0x4a, 0x01, 0x92, 0x00, 0xdc, 0xff,\n  0xec, 0xfe, 0x32, 0xfe, 0x6d, 0xfd, 0xee, 0xfc, 0x79, 0xfc, 0x30, 0xfc,\n  0x10, 0xfc, 0xee, 0xfb, 0xe5, 0xfb, 0x05, 0xfc, 0x14, 0xfc, 0x2b, 0xfc,\n  0x45, 0xfc, 0x88, 0xfc, 0xb0, 0xfc, 0xbb, 0xfc, 0xb1, 0xfc, 0x9f, 0xfc,\n  0x89, 0xfc, 0xaf, 0xfc, 0xf2, 0xfc, 0x54, 0xfd, 0xc7, 0xfd, 0x35, 0xfe,\n  0xa3, 0xfe, 0x13, 0xff, 0x6c, 0xff, 0xe6, 0xff, 0x1e, 0x00, 0x55, 0x00,\n  0x8d, 0x00, 0xdc, 0x00, 0x37, 0x01, 0x93, 0x01, 0x04, 0x02, 0x57, 0x02,\n  0x92, 0x02, 0xba, 0x02, 0xdd, 0x02, 0xd6, 0x02, 0xe2, 0x02, 0x1b, 0x03,\n  0x20, 0x03, 0xe8, 0x02, 0xaf, 0x02, 0x47, 0x02, 0x08, 0x02, 0xb3, 0x01,\n  0x65, 0x01, 0x44, 0x01, 0x1d, 0x01, 0x03, 0x01, 0x01, 0x01, 0xea, 0x00,\n  0xb5, 0x00, 0x66, 0x00, 0x06, 0x00, 0x90, 0xff, 0x44, 0xff, 0xcb, 0xfe,\n  0x58, 0xfe, 0xf6, 0xfd, 0xd0, 0xfd, 0xd9, 0xfd, 0xe3, 0xfd, 0xe9, 0xfd,\n  0xc2, 0xfd, 0xaf, 0xfd, 0xb4, 0xfd, 0xb1, 0xfd, 0xa9, 0xfd, 0x9d, 0xfd,\n  0x81, 0xfd, 0x64, 0xfd, 0x41, 0xfd, 0x40, 0xfd, 0x4b, 0xfd, 0x69, 0xfd,\n  0x73, 0xfd, 0x88, 0xfd, 0xb4, 0xfd, 0x14, 0xfe, 0x61, 0xfe, 0xc6, 0xfe,\n  0x26, 0xff, 0xd2, 0xff, 0x73, 0x00, 0x3c, 0x01, 0x0e, 0x02, 0xe7, 0x02,\n  0xaf, 0x03, 0x37, 0x04, 0x94, 0x04, 0xe1, 0x04, 0xfc, 0x04, 0xfb, 0x04,\n  0xfe, 0x04, 0x03, 0x05, 0xf2, 0x04, 0xb7, 0x04, 0x33, 0x04, 0xac, 0x03,\n  0x00, 0x03, 0x3a, 0x02, 0x8d, 0x01, 0xa1, 0x00, 0xe8, 0xff, 0x39, 0xff,\n  0x93, 0xfe, 0xe1, 0xfd, 0x64, 0xfd, 0xd6, 0xfc, 0x53, 0xfc, 0xec, 0xfb,\n  0x74, 0xfb, 0x1c, 0xfb, 0xea, 0xfa, 0xd9, 0xfa, 0xce, 0xfa, 0xd8, 0xfa,\n  0x05, 0xfb, 0x3e, 0xfb, 0x84, 0xfb, 0xd6, 0xfb, 0x2b, 0xfc, 0x65, 0xfc,\n  0xa0, 0xfc, 0x14, 0xfd, 0x6a, 0xfd, 0xd3, 0xfd, 0x63, 0xfe, 0x0e, 0xff,\n  0xb2, 0xff, 0x2c, 0x00, 0xa1, 0x00, 0xfa, 0x00, 0x67, 0x01, 0xbf, 0x01,\n  0x1e, 0x02, 0x9e, 0x02, 0xfa, 0x02, 0x61, 0x03, 0xc2, 0x03, 0x14, 0x04,\n  0x43, 0x04, 0x83, 0x04, 0x58, 0x04, 0x2d, 0x04, 0xd9, 0x03, 0x70, 0x03,\n  0xd5, 0x02, 0x53, 0x02, 0xac, 0x01, 0x0a, 0x01, 0xc7, 0x00, 0x93, 0x00,\n  0x85, 0x00, 0x42, 0x00, 0xeb, 0xff, 0x6e, 0xff, 0xf5, 0xfe, 0x9e, 0xfe,\n  0x54, 0xfe, 0x03, 0xfe, 0xb6, 0xfd, 0x62, 0xfd, 0x29, 0xfd, 0x19, 0xfd,\n  0x1b, 0xfd, 0x13, 0xfd, 0x19, 0xfd, 0x0e, 0xfd, 0x31, 0xfd, 0x6f, 0xfd,\n  0xc6, 0xfd, 0x3e, 0xfe, 0xe2, 0xfe, 0xa8, 0xff, 0x58, 0x00, 0xf9, 0x00,\n  0x7b, 0x01, 0xc3, 0x01, 0x17, 0x02, 0x57, 0x02, 0x70, 0x02, 0x68, 0x02,\n  0xa2, 0x02, 0x9d, 0x02, 0x97, 0x02, 0x6e, 0x02, 0x39, 0x02, 0xf4, 0x01,\n  0xa7, 0x01, 0x6e, 0x01, 0x1e, 0x01, 0xdc, 0x00, 0x5c, 0x00, 0x0b, 0x00,\n  0x82, 0xff, 0x18, 0xff, 0xb6, 0xfe, 0x97, 0xfe, 0x64, 0xfe, 0x24, 0xfe,\n  0xef, 0xfd, 0x94, 0xfd, 0x60, 0xfd, 0x57, 0xfd, 0x56, 0xfd, 0x40, 0xfd,\n  0x2e, 0xfd, 0xf9, 0xfc, 0xc8, 0xfc, 0xcd, 0xfc, 0xea, 0xfc, 0x3a, 0xfd,\n  0x9f, 0xfd, 0xe0, 0xfd, 0x21, 0xfe, 0x5e, 0xfe, 0xa2, 0xfe, 0xe8, 0xfe,\n  0x3e, 0xff, 0xaf, 0xff, 0x1b, 0x00, 0x87, 0x00, 0xbf, 0x00, 0x13, 0x01,\n  0x85, 0x01, 0x0a, 0x02, 0xa6, 0x02, 0x46, 0x03, 0xaf, 0x03, 0xf1, 0x03,\n  0xbb, 0x03, 0xa3, 0x03, 0x7a, 0x03, 0xfe, 0x02, 0xca, 0x02, 0x9e, 0x02,\n  0x80, 0x02, 0x4c, 0x02, 0x1a, 0x02, 0xab, 0x01, 0x04, 0x01, 0x97, 0x00,\n  0xf5, 0xff, 0x73, 0xff, 0x18, 0xff, 0x9d, 0xfe, 0x4a, 0xfe, 0xd8, 0xfd,\n  0x86, 0xfd, 0x61, 0xfd, 0x5c, 0xfd, 0x79, 0xfd, 0x86, 0xfd, 0x89, 0xfd,\n  0x5e, 0xfd, 0x58, 0xfd, 0x5e, 0xfd, 0x83, 0xfd, 0xcf, 0xfd, 0x47, 0xfe,\n  0x97, 0xfe, 0x08, 0xff, 0x58, 0xff, 0x86, 0xff, 0xaf, 0xff, 0xe7, 0xff,\n  0x0f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x86, 0x00,\n  0xdc, 0x00, 0x0e, 0x01, 0x36, 0x01, 0x1b, 0x01, 0xf0, 0x00, 0xda, 0x00,\n  0x75, 0x00, 0x41, 0x00, 0x20, 0x00, 0x02, 0x00, 0x1b, 0x00, 0x2d, 0x00,\n  0x47, 0x00, 0x4d, 0x00, 0x5b, 0x00, 0x60, 0x00, 0x68, 0x00, 0x50, 0x00,\n  0x10, 0x00, 0xd2, 0xff, 0x69, 0xff, 0x24, 0xff, 0x05, 0xff, 0xce, 0xfe,\n  0xb9, 0xfe, 0x8f, 0xfe, 0x71, 0xfe, 0x85, 0xfe, 0x99, 0xfe, 0xbb, 0xfe,\n  0xf8, 0xfe, 0x48, 0xff, 0x96, 0xff, 0x38, 0x00, 0x9d, 0x00, 0x10, 0x01,\n  0x5e, 0x01, 0x65, 0x01, 0x5f, 0x01, 0x5c, 0x01, 0x52, 0x01, 0x08, 0x01,\n  0x07, 0x01, 0xe5, 0x00, 0xc3, 0x00, 0xd4, 0x00, 0xba, 0x00, 0xc0, 0x00,\n  0xb8, 0x00, 0xe5, 0x00, 0x44, 0x01, 0xa4, 0x01, 0xe3, 0x01, 0x34, 0x02,\n  0x7b, 0x02, 0xae, 0x02, 0xd3, 0x02, 0xbf, 0x02, 0x8b, 0x02, 0x59, 0x02,\n  0xcd, 0x01, 0x5e, 0x01, 0xca, 0x00, 0x59, 0x00, 0xe0, 0xff, 0x87, 0xff,\n  0x46, 0xff, 0xf2, 0xfe, 0xcf, 0xfe, 0x76, 0xfe, 0x5e, 0xfe, 0x55, 0xfe,\n  0x71, 0xfe, 0xbe, 0xfe, 0x28, 0xff, 0x8c, 0xff, 0xdc, 0xff, 0x36, 0x00,\n  0x8c, 0x00, 0xb1, 0x00, 0xd0, 0x00, 0xf1, 0x00, 0x1a, 0x01, 0x0f, 0x01,\n  0xdf, 0x00, 0x77, 0x00, 0x08, 0x00, 0x82, 0xff, 0xf0, 0xfe, 0x75, 0xfe,\n  0xe4, 0xfd, 0x9e, 0xfd, 0x32, 0xfd, 0x15, 0xfd, 0xe0, 0xfc, 0xda, 0xfc,\n  0xf0, 0xfc, 0x14, 0xfd, 0x54, 0xfd, 0x9f, 0xfd, 0xf0, 0xfd, 0x56, 0xfe,\n  0xa3, 0xfe, 0xd0, 0xfe, 0xfc, 0xfe, 0x15, 0xff, 0x11, 0xff, 0x3c, 0xff,\n  0x4e, 0xff, 0x70, 0xff, 0x85, 0xff, 0xa4, 0xff, 0xd4, 0xff, 0x02, 0x00,\n  0x3b, 0x00, 0x79, 0x00, 0x81, 0x00, 0x83, 0x00, 0x95, 0x00, 0x8e, 0x00,\n  0x8f, 0x00, 0x97, 0x00, 0xae, 0x00, 0xdb, 0x00, 0xf4, 0x00, 0x06, 0x01,\n  0x09, 0x01, 0xce, 0x00, 0x9e, 0x00, 0x8c, 0x00, 0x29, 0x00, 0xeb, 0xff,\n  0x98, 0xff, 0x4d, 0xff, 0x06, 0xff, 0xa2, 0xfe, 0x2e, 0xfe, 0xaa, 0xfd,\n  0x75, 0xfd, 0x34, 0xfd, 0x1c, 0xfd, 0x24, 0xfd, 0x3d, 0xfd, 0x9c, 0xfd,\n  0xc3, 0xfd, 0x13, 0xfe, 0x78, 0xfe, 0xc2, 0xfe, 0xe4, 0xfe, 0x46, 0xff,\n  0x47, 0xff, 0x4e, 0xff, 0x6c, 0xff, 0x79, 0xff, 0x97, 0xff, 0xa0, 0xff,\n  0xa5, 0xff, 0xb2, 0xff, 0xfa, 0xff, 0x61, 0x00, 0xf7, 0x00, 0x5c, 0x01,\n  0x73, 0x01, 0x5c, 0x01, 0x0b, 0x01, 0xe2, 0x00, 0xce, 0x00, 0x98, 0x00,\n  0x62, 0x00, 0x2d, 0x00, 0xe8, 0xff, 0xcd, 0xff, 0xe6, 0xff, 0xec, 0xff,\n  0xe8, 0xff, 0xac, 0xff, 0x6d, 0xff, 0x32, 0xff, 0x1d, 0xff, 0xfb, 0xfe,\n  0x1d, 0xff, 0x57, 0xff, 0x5c, 0xff, 0x92, 0xff, 0x9c, 0xff, 0xa5, 0xff,\n  0xa6, 0xff, 0xcf, 0xff, 0x1d, 0x00, 0x7e, 0x00, 0xef, 0x00, 0x68, 0x01,\n  0x02, 0x02, 0x5f, 0x02, 0xa8, 0x02, 0xe8, 0x02, 0x0e, 0x03, 0x13, 0x03,\n  0xdf, 0x02, 0x94, 0x02, 0x34, 0x02, 0x0d, 0x02, 0xb7, 0x01, 0x6f, 0x01,\n  0xe8, 0x00, 0x64, 0x00, 0xf8, 0xff, 0xae, 0xff, 0x72, 0xff, 0x3f, 0xff,\n  0x45, 0xff, 0x46, 0xff, 0x4f, 0xff, 0x32, 0xff, 0xff, 0xfe, 0x82, 0xfe,\n  0x44, 0xfe, 0x13, 0xfe, 0xf0, 0xfd, 0xad, 0xfd, 0x78, 0xfd, 0x42, 0xfd,\n  0x30, 0xfd, 0x37, 0xfd, 0x61, 0xfd, 0xaa, 0xfd, 0xde, 0xfd, 0x08, 0xfe,\n  0x2e, 0xfe, 0x56, 0xfe, 0x7a, 0xfe, 0xb4, 0xfe, 0x16, 0xff, 0x60, 0xff,\n  0xc5, 0xff, 0xfc, 0xff, 0x49, 0x00, 0x8c, 0x00, 0xb7, 0x00, 0x28, 0x01,\n  0xab, 0x01, 0x5b, 0x02, 0x1a, 0x03, 0xb0, 0x03, 0x22, 0x04, 0x4f, 0x04,\n  0x34, 0x04, 0x24, 0x04, 0x08, 0x04, 0xc9, 0x03, 0x38, 0x03, 0xc4, 0x02,\n  0x2c, 0x02, 0xb8, 0x01, 0x0b, 0x01, 0x9c, 0x00, 0x04, 0x00, 0x7f, 0xff,\n  0x15, 0xff, 0xaa, 0xfe, 0x51, 0xfe, 0xdc, 0xfd, 0x95, 0xfd, 0x5f, 0xfd,\n  0x18, 0xfd, 0xe7, 0xfc, 0xc1, 0xfc, 0xb7, 0xfc, 0xe3, 0xfc, 0x0f, 0xfd,\n  0x68, 0xfd, 0xd2, 0xfd, 0x25, 0xfe, 0x88, 0xfe, 0xd9, 0xfe, 0x29, 0xff,\n  0x8b, 0xff, 0xec, 0xff, 0x74, 0x00, 0x00, 0x01, 0x81, 0x01, 0xda, 0x01,\n  0x11, 0x02, 0x65, 0x02, 0xa3, 0x02, 0xca, 0x02, 0xcf, 0x02, 0xc2, 0x02,\n  0x8e, 0x02, 0x66, 0x02, 0x18, 0x02, 0xbc, 0x01, 0x4e, 0x01, 0xbe, 0x00,\n  0x21, 0x00, 0xb1, 0xff, 0x33, 0xff, 0xb7, 0xfe, 0x43, 0xfe, 0x05, 0xfe,\n  0xaa, 0xfd, 0x74, 0xfd, 0x58, 0xfd, 0x62, 0xfd, 0x86, 0xfd, 0x94, 0xfd,\n  0xd8, 0xfd, 0x14, 0xfe, 0x34, 0xfe, 0x6b, 0xfe, 0xa7, 0xfe, 0xe3, 0xfe,\n  0x1b, 0xff, 0x55, 0xff, 0xc1, 0xff, 0x1e, 0x00, 0xa3, 0x00, 0xf6, 0x00,\n  0x70, 0x01, 0x89, 0x01, 0x9d, 0x01, 0x9d, 0x01, 0x8d, 0x01, 0x65, 0x01,\n  0x65, 0x01, 0x33, 0x01, 0xf2, 0x00, 0x99, 0x00, 0x44, 0x00, 0xf0, 0xff,\n  0xaa, 0xff, 0x67, 0xff, 0x2c, 0xff, 0x0a, 0xff, 0xcf, 0xfe, 0xb9, 0xfe,\n  0x88, 0xfe, 0x85, 0xfe, 0xa5, 0xfe, 0xa0, 0xfe, 0xcc, 0xfe, 0x0c, 0xff,\n  0x39, 0xff, 0x71, 0xff, 0xa3, 0xff, 0xaf, 0xff, 0xb1, 0xff, 0xcf, 0xff,\n  0xe0, 0xff, 0xf5, 0xff, 0x20, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x22, 0x00,\n  0x15, 0x00, 0xff, 0xff, 0xf7, 0xff, 0xf5, 0xff, 0xda, 0xff, 0xc8, 0xff,\n  0xdb, 0xff, 0xe6, 0xff, 0xf2, 0xff, 0x36, 0x00, 0x9a, 0x00, 0xdd, 0x00,\n  0x2b, 0x01, 0x6e, 0x01, 0xb8, 0x01, 0x0b, 0x02, 0x62, 0x02, 0xb9, 0x02,\n  0x34, 0x03, 0x6a, 0x03, 0xa8, 0x03, 0xa5, 0x03, 0xa3, 0x03, 0x6f, 0x03,\n  0x18, 0x03, 0xb9, 0x02, 0x69, 0x02, 0xfa, 0x01, 0x6d, 0x01, 0xc7, 0x00,\n  0x0a, 0x00, 0x26, 0xff, 0x56, 0xfe, 0xaa, 0xfd, 0xed, 0xfc, 0x5c, 0xfc,\n  0x8f, 0xfb, 0xfa, 0xfa, 0x8e, 0xfa, 0x67, 0xfa, 0x4b, 0xfa, 0x67, 0xfa,\n  0x9c, 0xfa, 0xcc, 0xfa, 0x34, 0xfb, 0x94, 0xfb, 0x02, 0xfc, 0x63, 0xfc,\n  0xcd, 0xfc, 0x41, 0xfd, 0x9c, 0xfd, 0xfe, 0xfd, 0x5d, 0xfe, 0xaa, 0xfe,\n  0x13, 0xff, 0xaa, 0xff, 0x2c, 0x00, 0xb9, 0x00, 0x02, 0x01, 0x43, 0x01,\n  0x66, 0x01, 0x7a, 0x01, 0x8c, 0x01, 0xb3, 0x01, 0xeb, 0x01, 0x2c, 0x02,\n  0x61, 0x02, 0x79, 0x02, 0x65, 0x02, 0x02, 0x02, 0x98, 0x01, 0x4f, 0x01,\n  0xe0, 0x00, 0x58, 0x00, 0xfa, 0xff, 0x7e, 0xff, 0x55, 0xff, 0x22, 0xff,\n  0x06, 0xff, 0x02, 0xff, 0x0c, 0xff, 0x04, 0xff, 0x23, 0xff, 0x56, 0xff,\n  0x9f, 0xff, 0xe9, 0xff, 0x1a, 0x00, 0x49, 0x00, 0x9e, 0x00, 0xde, 0x00,\n  0xe7, 0x00, 0x27, 0x01, 0x58, 0x01, 0x80, 0x01, 0xa1, 0x01, 0xcb, 0x01,\n  0x00, 0x02, 0x22, 0x02, 0x5b, 0x02, 0x95, 0x02, 0xe7, 0x02, 0xfb, 0x02,\n  0xf0, 0x02, 0xbb, 0x02, 0x82, 0x02, 0x0d, 0x02, 0x54, 0x01, 0x9d, 0x00,\n  0xed, 0xff, 0x31, 0xff, 0x99, 0xfe, 0x18, 0xfe, 0x9a, 0xfd, 0x32, 0xfd,\n  0xde, 0xfc, 0x9f, 0xfc, 0x55, 0xfc, 0x3f, 0xfc, 0x1a, 0xfc, 0xe5, 0xfb,\n  0xcf, 0xfb, 0xb7, 0xfb, 0xe5, 0xfb, 0x04, 0xfc, 0x3c, 0xfc, 0x77, 0xfc,\n  0xca, 0xfc, 0x1d, 0xfd, 0xa7, 0xfd, 0x27, 0xfe, 0xb1, 0xfe, 0x3f, 0xff,\n  0xa9, 0xff, 0x27, 0x00, 0xae, 0x00, 0x2f, 0x01, 0xa3, 0x01, 0x1b, 0x02,\n  0x6c, 0x02, 0xb4, 0x02, 0xcc, 0x02, 0xee, 0x02, 0xf8, 0x02, 0x04, 0x03,\n  0xbd, 0x02, 0x61, 0x02, 0xf4, 0x01, 0xa1, 0x01, 0x2a, 0x01, 0xc9, 0x00,\n  0x7c, 0x00, 0x39, 0x00, 0x45, 0x00, 0x40, 0x00, 0x3e, 0x00, 0x47, 0x00,\n  0x3c, 0x00, 0x20, 0x00, 0xec, 0xff, 0xc0, 0xff, 0x93, 0xff, 0xb0, 0xff,\n  0xd1, 0xff, 0x17, 0x00, 0x5b, 0x00, 0xc5, 0x00, 0xf4, 0x00, 0x4d, 0x01,\n  0x9e, 0x01, 0x07, 0x02, 0x4d, 0x02, 0x6d, 0x02, 0x8e, 0x02, 0x75, 0x02,\n  0x1a, 0x02, 0xa9, 0x01, 0x01, 0x01, 0x30, 0x00, 0x75, 0xff, 0xcd, 0xfe,\n  0x3c, 0xfe, 0xa9, 0xfd, 0x64, 0xfd, 0x18, 0xfd, 0xd9, 0xfc, 0xba, 0xfc,\n  0xc2, 0xfc, 0xd2, 0xfc, 0xc5, 0xfc, 0xc9, 0xfc, 0xbc, 0xfc, 0xcc, 0xfc,\n  0xe3, 0xfc, 0xea, 0xfc, 0xfd, 0xfc, 0x24, 0xfd, 0x6f, 0xfd, 0x9a, 0xfd,\n  0x0d, 0xfe, 0x87, 0xfe, 0x26, 0xff, 0x9f, 0xff, 0x11, 0x00, 0x7c, 0x00,\n  0xf9, 0x00, 0x6a, 0x01, 0xce, 0x01, 0x14, 0x02, 0x3d, 0x02, 0x50, 0x02,\n  0x41, 0x02, 0x50, 0x02, 0x35, 0x02, 0x2f, 0x02, 0x0a, 0x02, 0xc7, 0x01,\n  0x9c, 0x01, 0x4f, 0x01, 0x0c, 0x01, 0xc1, 0x00, 0x9c, 0x00, 0x9d, 0x00,\n  0xa1, 0x00, 0xb4, 0x00, 0xe0, 0x00, 0x06, 0x01, 0x3d, 0x01, 0x4f, 0x01,\n  0x6a, 0x01, 0x40, 0x01, 0xf9, 0x00, 0x97, 0x00, 0x3c, 0x00, 0x0c, 0x00,\n  0xba, 0xff, 0x99, 0xff, 0x74, 0xff, 0x45, 0xff, 0x0b, 0xff, 0xac, 0xfe,\n  0x6f, 0xfe, 0x3e, 0xfe, 0x43, 0xfe, 0x55, 0xfe, 0x6b, 0xfe, 0x7d, 0xfe,\n  0x79, 0xfe, 0x95, 0xfe, 0xdc, 0xfe, 0x10, 0xff, 0x4f, 0xff, 0x97, 0xff,\n  0xa9, 0xff, 0xc1, 0xff, 0xd2, 0xff, 0xd5, 0xff, 0xcc, 0xff, 0xc4, 0xff,\n  0xb5, 0xff, 0x6a, 0xff, 0x2d, 0xff, 0xf4, 0xfe, 0xdf, 0xfe, 0xe2, 0xfe,\n  0xcc, 0xfe, 0xc1, 0xfe, 0xde, 0xfe, 0xe7, 0xfe, 0x2f, 0xff, 0x9b, 0xff,\n  0x40, 0x00, 0xdf, 0x00, 0x7c, 0x01, 0xdc, 0x01, 0x3a, 0x02, 0x62, 0x02,\n  0x4c, 0x02, 0x57, 0x02, 0x23, 0x02, 0xd8, 0x01, 0x91, 0x01, 0xfc, 0x00,\n  0x9f, 0x00, 0x4c, 0x00, 0x1a, 0x00, 0xc5, 0xff, 0x67, 0xff, 0xf3, 0xfe,\n  0x79, 0xfe, 0x57, 0xfe, 0x03, 0xfe, 0xdf, 0xfd, 0xc0, 0xfd, 0xac, 0xfd,\n  0xa2, 0xfd, 0xb0, 0xfd, 0xc8, 0xfd, 0x08, 0xfe, 0x44, 0xfe, 0x65, 0xfe,\n  0x84, 0xfe, 0x5c, 0xfe, 0x5e, 0xfe, 0x6c, 0xfe, 0x5f, 0xfe, 0x54, 0xfe,\n  0x71, 0xfe, 0x74, 0xfe, 0xa4, 0xfe, 0xd8, 0xfe, 0x0f, 0xff, 0x40, 0xff,\n  0x61, 0xff, 0x9c, 0xff, 0xcc, 0xff, 0xdd, 0xff, 0xf0, 0xff, 0x0f, 0x00,\n  0x25, 0x00, 0x5b, 0x00, 0xa9, 0x00, 0xc9, 0x00, 0xe6, 0x00, 0xda, 0x00,\n  0xb8, 0x00, 0xa7, 0x00, 0xbf, 0x00, 0xdc, 0x00, 0xf8, 0x00, 0x02, 0x01,\n  0x07, 0x01, 0x1b, 0x01, 0x09, 0x01, 0xfd, 0x00, 0x14, 0x01, 0x24, 0x01,\n  0x41, 0x01, 0x67, 0x01, 0xa0, 0x01, 0xb3, 0x01, 0xad, 0x01, 0xae, 0x01,\n  0x9b, 0x01, 0x67, 0x01, 0x3d, 0x01, 0x08, 0x01, 0xd4, 0x00, 0x7b, 0x00,\n  0x19, 0x00, 0xb1, 0xff, 0x51, 0xff, 0x39, 0xff, 0x31, 0xff, 0x3c, 0xff,\n  0x47, 0xff, 0x34, 0xff, 0x12, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,\n  0x0f, 0xff, 0x25, 0xff, 0x50, 0xff, 0x77, 0xff, 0xaf, 0xff, 0xcf, 0xff,\n  0xf5, 0xff, 0xea, 0xff, 0x0d, 0x00, 0xff, 0xff, 0x1d, 0x00, 0x35, 0x00,\n  0x75, 0x00, 0xcf, 0x00, 0x1a, 0x01, 0x50, 0x01, 0x74, 0x01, 0x98, 0x01,\n  0x81, 0x01, 0x65, 0x01, 0x3c, 0x01, 0x15, 0x01, 0x05, 0x01, 0xd8, 0x00,\n  0x9d, 0x00, 0x52, 0x00, 0x1d, 0x00, 0xd6, 0xff, 0x83, 0xff, 0x4e, 0xff,\n  0x1a, 0xff, 0xee, 0xfe, 0xd2, 0xfe, 0xec, 0xfe, 0xf2, 0xfe, 0x32, 0xff,\n  0x6a, 0xff, 0xac, 0xff, 0xd4, 0xff, 0xd4, 0xff, 0xc7, 0xff, 0xb6, 0xff,\n  0xad, 0xff, 0x8c, 0xff, 0xac, 0xff, 0x8d, 0xff, 0x6a, 0xff, 0x52, 0xff,\n  0x25, 0xff, 0x11, 0xff, 0x20, 0xff, 0x21, 0xff, 0x2f, 0xff, 0x3d, 0xff,\n  0x41, 0xff, 0x6f, 0xff, 0x8b, 0xff, 0x9e, 0xff, 0xc1, 0xff, 0xf0, 0xff,\n  0xe9, 0xff, 0xb4, 0xff, 0x71, 0xff, 0x2c, 0xff, 0xd9, 0xfe, 0xa7, 0xfe,\n  0x6e, 0xfe, 0x6a, 0xfe, 0x6a, 0xfe, 0x6a, 0xfe, 0x7a, 0xfe, 0x5e, 0xfe,\n  0x49, 0xfe, 0x4c, 0xfe, 0x31, 0xfe, 0x7b, 0xfe, 0x96, 0xfe, 0xe2, 0xfe,\n  0x1d, 0xff, 0x5f, 0xff, 0xc7, 0xff, 0x44, 0x00, 0xd5, 0x00, 0x4d, 0x01,\n  0xc4, 0x01, 0x1e, 0x02, 0x4d, 0x02, 0x48, 0x02, 0x62, 0x02, 0x74, 0x02,\n  0x88, 0x02, 0x6c, 0x02, 0x4b, 0x02, 0x1a, 0x02, 0xbd, 0x01, 0x84, 0x01,\n  0x57, 0x01, 0x00, 0x01, 0x79, 0x00, 0x27, 0x00, 0xa7, 0xff, 0x3d, 0xff,\n  0x14, 0xff, 0xe5, 0xfe, 0xe0, 0xfe, 0x99, 0xfe, 0x79, 0xfe, 0x47, 0xfe,\n  0x49, 0xfe, 0x5b, 0xfe, 0x79, 0xfe, 0xce, 0xfe, 0xfa, 0xfe, 0x51, 0xff,\n  0x76, 0xff, 0x8d, 0xff, 0xbb, 0xff, 0xba, 0xff, 0xf5, 0xff, 0x3f, 0x00,\n  0x9d, 0x00, 0xe7, 0x00, 0x35, 0x01, 0x53, 0x01, 0x44, 0x01, 0x1e, 0x01,\n  0xf8, 0x00, 0xde, 0x00, 0xb4, 0x00, 0x42, 0x00, 0xdf, 0xff, 0x77, 0xff,\n  0x24, 0xff, 0xd0, 0xfe, 0x83, 0xfe, 0x53, 0xfe, 0x07, 0xfe, 0xf7, 0xfd,\n  0xfa, 0xfd, 0x3d, 0xfe, 0x89, 0xfe, 0xf2, 0xfe, 0x51, 0xff, 0xa4, 0xff,\n  0xe8, 0xff, 0x28, 0x00, 0x5a, 0x00, 0x83, 0x00, 0xbc, 0x00, 0xd0, 0x00,\n  0xfa, 0x00, 0x1f, 0x01, 0x4b, 0x01, 0x6f, 0x01, 0x90, 0x01, 0x9a, 0x01,\n  0x8e, 0x01, 0x79, 0x01, 0x37, 0x01, 0xe6, 0x00, 0xb7, 0x00, 0x55, 0x00,\n  0x2b, 0x00, 0x08, 0x00, 0xf2, 0xff, 0x03, 0x00, 0xe8, 0xff, 0xdf, 0xff,\n  0xd4, 0xff, 0xaa, 0xff, 0x65, 0xff, 0x1b, 0xff, 0xb0, 0xfe, 0x48, 0xfe,\n  0x24, 0xfe, 0x05, 0xfe, 0x0c, 0xfe, 0x17, 0xfe, 0x25, 0xfe, 0xf8, 0xfd,\n  0xf9, 0xfd, 0xf6, 0xfd, 0xf5, 0xfd, 0x01, 0xfe, 0xff, 0xfd, 0x29, 0xfe,\n  0x58, 0xfe, 0x86, 0xfe, 0xe2, 0xfe, 0x2b, 0xff, 0x7b, 0xff, 0xb6, 0xff,\n  0xf3, 0xff, 0x33, 0x00, 0x8f, 0x00, 0xce, 0x00, 0x19, 0x01, 0x56, 0x01,\n  0x72, 0x01, 0x9c, 0x01, 0x9a, 0x01, 0x8c, 0x01, 0x7d, 0x01, 0x78, 0x01,\n  0x30, 0x01, 0x2e, 0x01, 0x07, 0x01, 0xfc, 0x00, 0xd9, 0x00, 0xcb, 0x00,\n  0xa9, 0x00, 0x6b, 0x00, 0x3a, 0x00, 0x15, 0x00, 0xf1, 0xff, 0xd5, 0xff,\n  0xd8, 0xff, 0xb9, 0xff, 0x9c, 0xff, 0x66, 0xff, 0xf4, 0xfe, 0xa4, 0xfe,\n  0x44, 0xfe, 0x23, 0xfe, 0x05, 0xfe, 0xf0, 0xfd, 0xef, 0xfd, 0x16, 0xfe,\n  0x17, 0xfe, 0x3d, 0xfe, 0x86, 0xfe, 0xcd, 0xfe, 0xf5, 0xfe, 0x2e, 0xff,\n  0x51, 0xff, 0x86, 0xff, 0xc5, 0xff, 0xda, 0xff, 0x15, 0x00, 0x2e, 0x00,\n  0x66, 0x00, 0xa1, 0x00, 0xdd, 0x00, 0x03, 0x01, 0x5b, 0x01, 0x91, 0x01,\n  0xa4, 0x01, 0xd5, 0x01, 0xf0, 0x01, 0xe7, 0x01, 0x28, 0x02, 0x3f, 0x02,\n  0x68, 0x02, 0x85, 0x02, 0x6d, 0x02, 0x7c, 0x02, 0x93, 0x02, 0x75, 0x02,\n  0x68, 0x02, 0x26, 0x02, 0xaa, 0x01, 0x23, 0x01, 0x68, 0x00, 0xb2, 0xff,\n  0x12, 0xff, 0x99, 0xfe, 0x12, 0xfe, 0xcf, 0xfd, 0xb7, 0xfd, 0xa3, 0xfd,\n  0xa5, 0xfd, 0xb0, 0xfd, 0xb9, 0xfd, 0x9c, 0xfd, 0x8b, 0xfd, 0x92, 0xfd,\n  0x80, 0xfd, 0x73, 0xfd, 0x85, 0xfd, 0x9d, 0xfd, 0xc7, 0xfd, 0xc7, 0xfd,\n  0xef, 0xfd, 0xe8, 0xfd, 0x19, 0xfe, 0x5e, 0xfe, 0xbe, 0xfe, 0x29, 0xff,\n  0x8a, 0xff, 0xdf, 0xff, 0x31, 0x00, 0x8f, 0x00, 0xe1, 0x00, 0x40, 0x01,\n  0xb3, 0x01, 0x63, 0x02, 0x05, 0x03, 0x85, 0x03, 0xf3, 0x03, 0x21, 0x04,\n  0x10, 0x04, 0x0a, 0x04, 0xde, 0x03, 0xab, 0x03, 0x49, 0x03, 0xff, 0x02,\n  0x5f, 0x02, 0xd8, 0x01, 0x4e, 0x01, 0x9e, 0x00, 0x2c, 0x00, 0x9b, 0xff,\n  0x65, 0xff, 0x2c, 0xff, 0x3f, 0xff, 0x3a, 0xff, 0x68, 0xff, 0x6b, 0xff,\n  0x5d, 0xff, 0x44, 0xff, 0x21, 0xff, 0x05, 0xff, 0xdb, 0xfe, 0xac, 0xfe,\n  0x92, 0xfe, 0x4b, 0xfe, 0x35, 0xfe, 0x32, 0xfe, 0x5a, 0xfe, 0x78, 0xfe,\n  0x9d, 0xfe, 0xd9, 0xfe, 0x01, 0xff, 0x32, 0xff, 0x5c, 0xff, 0x67, 0xff,\n  0x64, 0xff, 0x40, 0xff, 0x01, 0xff, 0xec, 0xfe, 0xe5, 0xfe, 0x91, 0xfe,\n  0x5a, 0xfe, 0xf5, 0xfd, 0x93, 0xfd, 0x67, 0xfd, 0x77, 0xfd, 0x87, 0xfd,\n  0xa9, 0xfd, 0xa4, 0xfd, 0x86, 0xfd, 0x66, 0xfd, 0x41, 0xfd, 0x1f, 0xfd,\n  0x1e, 0xfd, 0x30, 0xfd, 0x34, 0xfd, 0x6e, 0xfd, 0xb5, 0xfd, 0x29, 0xfe,\n  0xb2, 0xfe, 0x40, 0xff, 0xbe, 0xff, 0x30, 0x00, 0x75, 0x00, 0x8c, 0x00,\n  0x91, 0x00, 0xa6, 0x00, 0xc1, 0x00, 0xd7, 0x00, 0x10, 0x01, 0x62, 0x01,\n  0xed, 0x01, 0x70, 0x02, 0xec, 0x02, 0x3f, 0x03, 0x6e, 0x03, 0x58, 0x03,\n  0x20, 0x03, 0xad, 0x02, 0x33, 0x02, 0xb2, 0x01, 0x4e, 0x01, 0x05, 0x01,\n  0xfb, 0x00, 0xf6, 0x00, 0xfd, 0x00, 0xdf, 0x00, 0x9c, 0x00, 0x6a, 0x00,\n  0xfb, 0xff, 0x9a, 0xff, 0x3c, 0xff, 0xd0, 0xfe, 0x83, 0xfe, 0x65, 0xfe,\n  0x40, 0xfe, 0x3b, 0xfe, 0x0b, 0xfe, 0xf0, 0xfd, 0xd8, 0xfd, 0xe4, 0xfd,\n  0x0d, 0xfe, 0x3e, 0xfe, 0x6d, 0xfe, 0xb2, 0xfe, 0x0e, 0xff, 0x68, 0xff,\n  0xe8, 0xff, 0x5e, 0x00, 0xfe, 0x00, 0xa9, 0x01, 0x57, 0x02, 0x0b, 0x03,\n  0x9e, 0x03, 0x13, 0x04, 0x84, 0x04, 0xe6, 0x04, 0x63, 0x05, 0x8e, 0x05,\n  0x97, 0x05, 0x5b, 0x05, 0xfa, 0x04, 0x4b, 0x04, 0xbc, 0x03, 0x3d, 0x03,\n  0x7c, 0x02, 0xc2, 0x01, 0xd4, 0x00, 0xf6, 0xff, 0x0b, 0xff, 0x2d, 0xfe,\n  0x87, 0xfd, 0xf2, 0xfc, 0x75, 0xfc, 0x04, 0xfc, 0x8e, 0xfb, 0x56, 0xfb,\n  0x34, 0xfb, 0x1b, 0xfb, 0x26, 0xfb, 0x2f, 0xfb, 0x3e, 0xfb, 0x40, 0xfb,\n  0x43, 0xfb, 0x3c, 0xfb, 0x60, 0xfb, 0xbd, 0xfb, 0x17, 0xfc, 0x92, 0xfc,\n  0x03, 0xfd, 0xa1, 0xfd, 0x31, 0xfe, 0xe1, 0xfe, 0xaa, 0xff, 0x77, 0x00,\n  0x52, 0x01, 0xec, 0x01, 0x6b, 0x02, 0x0a, 0x03, 0x5d, 0x03, 0xa0, 0x03,\n  0x06, 0x04, 0x59, 0x04, 0x7d, 0x04, 0x73, 0x04, 0x41, 0x04, 0xc7, 0x03,\n  0x4d, 0x03, 0xde, 0x02, 0x6e, 0x02, 0xf0, 0x01, 0x71, 0x01, 0xe3, 0x00,\n  0x82, 0x00, 0x18, 0x00, 0x9a, 0xff, 0x2a, 0xff, 0xba, 0xfe, 0x48, 0xfe,\n  0x09, 0xfe, 0xdb, 0xfd, 0xd8, 0xfd, 0xdb, 0xfd, 0xda, 0xfd, 0xd2, 0xfd,\n  0xa8, 0xfd, 0x8c, 0xfd, 0x79, 0xfd, 0x6c, 0xfd, 0x92, 0xfd, 0xae, 0xfd,\n  0xec, 0xfd, 0x14, 0xfe, 0x26, 0xfe, 0x44, 0xfe, 0x7f, 0xfe, 0xd6, 0xfe,\n  0x35, 0xff, 0xc5, 0xff, 0x33, 0x00, 0xb8, 0x00, 0x39, 0x01, 0x9c, 0x01,\n  0xec, 0x01, 0x19, 0x02, 0x23, 0x02, 0xff, 0x01, 0xc2, 0x01, 0x79, 0x01,\n  0x3f, 0x01, 0xd2, 0x00, 0x68, 0x00, 0x18, 0x00, 0xe0, 0xff, 0xd6, 0xff,\n  0xbc, 0xff, 0x8d, 0xff, 0x3f, 0xff, 0xf9, 0xfe, 0x97, 0xfe, 0x63, 0xfe,\n  0x38, 0xfe, 0x1e, 0xfe, 0x41, 0xfe, 0x42, 0xfe, 0x69, 0xfe, 0x90, 0xfe,\n  0xa7, 0xfe, 0xaf, 0xfe, 0xf0, 0xfe, 0x28, 0xff, 0x74, 0xff, 0x9f, 0xff,\n  0xdb, 0xff, 0x16, 0x00, 0x4a, 0x00, 0x84, 0x00, 0xd2, 0x00, 0xfc, 0x00,\n  0xe7, 0x00, 0xad, 0x00, 0x85, 0x00, 0x45, 0x00, 0xff, 0xff, 0xdd, 0xff,\n  0xc3, 0xff, 0xb7, 0xff, 0xba, 0xff, 0xb7, 0xff, 0xa8, 0xff, 0x8f, 0xff,\n  0xa5, 0xff, 0xb5, 0xff, 0xaf, 0xff, 0xc1, 0xff, 0xce, 0xff, 0xd3, 0xff,\n  0xed, 0xff, 0xf7, 0xff, 0x15, 0x00, 0x14, 0x00, 0x1a, 0x00, 0x29, 0x00,\n  0x17, 0x00, 0xfb, 0xff, 0x11, 0x00, 0x20, 0x00, 0x30, 0x00, 0x2b, 0x00,\n  0x19, 0x00, 0x48, 0x00, 0x61, 0x00, 0x87, 0x00, 0xb6, 0x00, 0xe8, 0x00,\n  0xed, 0x00, 0xd4, 0x00, 0x7c, 0x00, 0x1f, 0x00, 0xd9, 0xff, 0x9e, 0xff,\n  0x83, 0xff, 0x81, 0xff, 0x89, 0xff, 0x8b, 0xff, 0x8f, 0xff, 0x79, 0xff,\n  0x5a, 0xff, 0x33, 0xff, 0xfa, 0xfe, 0xbd, 0xfe, 0xc4, 0xfe, 0xcb, 0xfe,\n  0xf7, 0xfe, 0x41, 0xff, 0x81, 0xff, 0xca, 0xff, 0xeb, 0xff, 0xe3, 0xff,\n  0xf9, 0xff, 0xdb, 0xff, 0xe0, 0xff, 0xd5, 0xff, 0xbb, 0xff, 0xed, 0xff,\n  0x1f, 0x00, 0x51, 0x00, 0x5c, 0x00, 0x79, 0x00, 0x5f, 0x00, 0x59, 0x00,\n  0x4b, 0x00, 0x39, 0x00, 0x5f, 0x00, 0x8f, 0x00, 0xe2, 0x00, 0x16, 0x01,\n  0x59, 0x01, 0x47, 0x01, 0x5a, 0x01, 0x3f, 0x01, 0x23, 0x01, 0x09, 0x01,\n  0xf2, 0x00, 0xd6, 0x00, 0xdc, 0x00, 0xb4, 0x00, 0x8c, 0x00, 0x78, 0x00,\n  0x5e, 0x00, 0x44, 0x00, 0x47, 0x00, 0x33, 0x00, 0x4e, 0x00, 0x8a, 0x00,\n  0xb0, 0x00, 0xdf, 0x00, 0xf5, 0x00, 0xdf, 0x00, 0xa8, 0x00, 0x86, 0x00,\n  0x23, 0x00, 0xbe, 0xff, 0x53, 0xff, 0xfd, 0xfe, 0xaa, 0xfe, 0x62, 0xfe,\n  0x5a, 0xfe, 0x54, 0xfe, 0x67, 0xfe, 0x7d, 0xfe, 0xb7, 0xfe, 0xcd, 0xfe,\n  0xc8, 0xfe, 0xc5, 0xfe, 0x9f, 0xfe, 0xa2, 0xfe, 0xb6, 0xfe, 0xc6, 0xfe,\n  0x09, 0xff, 0x30, 0xff, 0x83, 0xff, 0xc2, 0xff, 0xfd, 0xff, 0x3f, 0x00,\n  0x6f, 0x00, 0x9c, 0x00, 0xc0, 0x00, 0x9c, 0x00, 0x76, 0x00, 0x31, 0x00,\n  0xe9, 0xff, 0xcc, 0xff, 0xab, 0xff, 0x84, 0xff, 0x8b, 0xff, 0x59, 0xff,\n  0x44, 0xff, 0x27, 0xff, 0xf1, 0xfe, 0xc0, 0xfe, 0x95, 0xfe, 0x74, 0xfe,\n  0x3f, 0xfe, 0x32, 0xfe, 0x1d, 0xfe, 0x23, 0xfe, 0x73, 0xfe, 0xa5, 0xfe,\n  0x0c, 0xff, 0x55, 0xff, 0xa9, 0xff, 0xe8, 0xff, 0x29, 0x00, 0x5e, 0x00,\n  0x84, 0x00, 0x9e, 0x00, 0xa0, 0x00, 0x99, 0x00, 0xa1, 0x00, 0x76, 0x00,\n  0x78, 0x00, 0x71, 0x00, 0x7d, 0x00, 0xa0, 0x00, 0xb0, 0x00, 0xb7, 0x00,\n  0xca, 0x00, 0xdb, 0x00, 0xb7, 0x00, 0xb5, 0x00, 0xa9, 0x00, 0xce, 0x00,\n  0xbd, 0x00, 0xce, 0x00, 0xd4, 0x00, 0xfe, 0x00, 0x08, 0x01, 0x13, 0x01,\n  0x21, 0x01, 0x00, 0x01, 0xef, 0x00, 0xcd, 0x00, 0x88, 0x00, 0x4d, 0x00,\n  0x02, 0x00, 0xbd, 0xff, 0x6d, 0xff, 0x30, 0xff, 0xed, 0xfe, 0xbb, 0xfe,\n  0x74, 0xfe, 0x57, 0xfe, 0x25, 0xfe, 0xeb, 0xfd, 0xde, 0xfd, 0xc0, 0xfd,\n  0xbb, 0xfd, 0xc7, 0xfd, 0xdd, 0xfd, 0x09, 0xfe, 0x29, 0xfe, 0x28, 0xfe,\n  0x43, 0xfe, 0x64, 0xfe, 0x95, 0xfe, 0xa9, 0xfe, 0xd6, 0xfe, 0xe8, 0xfe,\n  0x06, 0xff, 0x27, 0xff, 0x57, 0xff, 0xb6, 0xff, 0xee, 0xff, 0x3e, 0x00,\n  0x87, 0x00, 0xe5, 0x00, 0x3f, 0x01, 0x63, 0x01, 0x7d, 0x01, 0xa2, 0x01,\n  0xc9, 0x01, 0xde, 0x01, 0xdc, 0x01, 0xef, 0x01, 0xc4, 0x01, 0x9d, 0x01,\n  0x8f, 0x01, 0x78, 0x01, 0x4c, 0x01, 0xf0, 0x00, 0xa7, 0x00, 0x30, 0x00,\n  0xe4, 0xff, 0xb5, 0xff, 0x61, 0xff, 0x18, 0xff, 0xd7, 0xfe, 0x8a, 0xfe,\n  0x81, 0xfe, 0x7c, 0xfe, 0x82, 0xfe, 0xa2, 0xfe, 0xb8, 0xfe, 0xb1, 0xfe,\n  0xc7, 0xfe, 0xc1, 0xfe, 0xcb, 0xfe, 0xd6, 0xfe, 0xc8, 0xfe, 0xd9, 0xfe,\n  0xe8, 0xfe, 0x19, 0xff, 0x46, 0xff, 0xa4, 0xff, 0xdd, 0xff, 0x16, 0x00,\n  0x55, 0x00, 0x84, 0x00, 0xcb, 0x00, 0x29, 0x01, 0x9a, 0x01, 0xfd, 0x01,\n  0x3c, 0x02, 0x4d, 0x02, 0x47, 0x02, 0x41, 0x02, 0xfc, 0x01, 0x9e, 0x01,\n  0x34, 0x01, 0x92, 0x00, 0x49, 0x00, 0x18, 0x00, 0xf4, 0xff, 0xee, 0xff,\n  0xd6, 0xff, 0xb8, 0xff, 0x7f, 0xff, 0x65, 0xff, 0x3b, 0xff, 0x2f, 0xff,\n  0x30, 0xff, 0x2f, 0xff, 0x3b, 0xff, 0x7f, 0xff, 0xc5, 0xff, 0x20, 0x00,\n  0x65, 0x00, 0xce, 0x00, 0x27, 0x01, 0x84, 0x01, 0xd5, 0x01, 0x36, 0x02,\n  0x66, 0x02, 0x92, 0x02, 0xbb, 0x02, 0xb1, 0x02, 0xb7, 0x02, 0xb2, 0x02,\n  0x8f, 0x02, 0x26, 0x02, 0xd1, 0x01, 0x47, 0x01, 0xe1, 0x00, 0x5a, 0x00,\n  0x0d, 0x00, 0xc6, 0xff, 0x99, 0xff, 0x61, 0xff, 0x29, 0xff, 0xce, 0xfe,\n  0x56, 0xfe, 0xd1, 0xfd, 0x3e, 0xfd, 0xc7, 0xfc, 0x64, 0xfc, 0x0d, 0xfc,\n  0xf8, 0xfb, 0xf3, 0xfb, 0x24, 0xfc, 0x4c, 0xfc, 0x9e, 0xfc, 0xdc, 0xfc,\n  0x12, 0xfd, 0x4f, 0xfd, 0x8f, 0xfd, 0xbb, 0xfd, 0xf0, 0xfd, 0x13, 0xfe,\n  0x3d, 0xfe, 0x9f, 0xfe, 0x25, 0xff, 0x98, 0xff, 0x1c, 0x00, 0x51, 0x00,\n  0x77, 0x00, 0x80, 0x00, 0x86, 0x00, 0x96, 0x00, 0xa3, 0x00, 0xb1, 0x00,\n  0xe1, 0x00, 0xf2, 0x00, 0xee, 0x00, 0xe5, 0x00, 0xa2, 0x00, 0x66, 0x00,\n  0x47, 0x00, 0x30, 0x00, 0x32, 0x00, 0x39, 0x00, 0x5a, 0x00, 0x83, 0x00,\n  0x96, 0x00, 0xc4, 0x00, 0xe6, 0x00, 0x04, 0x01, 0x1b, 0x01, 0x1a, 0x01,\n  0xeb, 0x00, 0xc4, 0x00, 0x86, 0x00, 0x48, 0x00, 0x02, 0x00, 0xd7, 0xff,\n  0xa5, 0xff, 0xb0, 0xff, 0x91, 0xff, 0x7c, 0xff, 0x35, 0xff, 0xe3, 0xfe,\n  0x9f, 0xfe, 0x57, 0xfe, 0x30, 0xfe, 0x2c, 0xfe, 0x2d, 0xfe, 0x3f, 0xfe,\n  0x42, 0xfe, 0x3d, 0xfe, 0x4b, 0xfe, 0x51, 0xfe, 0x85, 0xfe, 0xa3, 0xfe,\n  0xc9, 0xfe, 0xd8, 0xfe, 0xdb, 0xfe, 0xca, 0xfe, 0xda, 0xfe, 0x0c, 0xff,\n  0x49, 0xff, 0xa2, 0xff, 0xc7, 0xff, 0xf7, 0xff, 0x27, 0x00, 0x54, 0x00,\n  0x65, 0x00, 0x6d, 0x00, 0x78, 0x00, 0x6e, 0x00, 0x7f, 0x00, 0xa9, 0x00,\n  0xd0, 0x00, 0xe5, 0x00, 0xca, 0x00, 0xe3, 0x00, 0xbd, 0x00, 0xbd, 0x00,\n  0xce, 0x00, 0xfa, 0x00, 0x1e, 0x01, 0x5d, 0x01, 0x8c, 0x01, 0xd2, 0x01,\n  0x09, 0x02, 0x20, 0x02, 0x62, 0x02, 0x8a, 0x02, 0x91, 0x02, 0x67, 0x02,\n  0x19, 0x02, 0xca, 0x01, 0x5e, 0x01, 0xdd, 0x00, 0x7b, 0x00, 0xed, 0xff,\n  0x87, 0xff, 0x18, 0xff, 0x00, 0xff, 0xce, 0xfe, 0xd0, 0xfe, 0xaf, 0xfe,\n  0x9b, 0xfe, 0x93, 0xfe, 0x92, 0xfe, 0x78, 0xfe, 0x9e, 0xfe, 0xa5, 0xfe,\n  0xca, 0xfe, 0xdb, 0xfe, 0x09, 0xff, 0x32, 0xff, 0x61, 0xff, 0xa3, 0xff,\n  0xd5, 0xff, 0x0d, 0x00, 0x46, 0x00, 0x58, 0x00, 0x47, 0x00, 0x35, 0x00,\n  0x01, 0x00, 0xe0, 0xff, 0xc2, 0xff, 0xb3, 0xff, 0xc2, 0xff, 0xe2, 0xff,\n  0xce, 0xff, 0xa2, 0xff, 0x62, 0xff, 0x1f, 0xff, 0xe8, 0xfe, 0xa9, 0xfe,\n  0x8b, 0xfe, 0x81, 0xfe, 0xa5, 0xfe, 0xbf, 0xfe, 0xe5, 0xfe, 0xfe, 0xfe,\n  0x1b, 0xff, 0x3a, 0xff, 0x2f, 0xff, 0x5a, 0xff, 0x69, 0xff, 0xa1, 0xff,\n  0xc9, 0xff, 0x10, 0x00, 0x4a, 0x00, 0x95, 0x00, 0xbf, 0x00, 0x0c, 0x01,\n  0x4a, 0x01, 0x96, 0x01, 0xdb, 0x01, 0x32, 0x02, 0x80, 0x02, 0xe2, 0x02,\n  0x40, 0x03, 0x81, 0x03, 0xb8, 0x03, 0xa1, 0x03, 0x4a, 0x03, 0x09, 0x03,\n  0xb5, 0x02, 0x40, 0x02, 0xe6, 0x01, 0x7b, 0x01, 0x2d, 0x01, 0xe2, 0x00,\n  0x74, 0x00, 0x27, 0x00, 0xbf, 0xff, 0x49, 0xff, 0xed, 0xfe, 0x87, 0xfe,\n  0x1a, 0xfe, 0xae, 0xfd, 0x2c, 0xfd, 0xa9, 0xfc, 0x3d, 0xfc, 0xff, 0xfb,\n  0xeb, 0xfb, 0xde, 0xfb, 0xd6, 0xfb, 0xcc, 0xfb, 0xc7, 0xfb, 0xcf, 0xfb,\n  0x01, 0xfc, 0x33, 0xfc, 0x9c, 0xfc, 0xf5, 0xfc, 0x61, 0xfd, 0xc4, 0xfd,\n  0x49, 0xfe, 0xb6, 0xfe, 0x3c, 0xff, 0xbb, 0xff, 0x1b, 0x00, 0xac, 0x00,\n  0x27, 0x01, 0xaf, 0x01, 0x23, 0x02, 0x86, 0x02, 0xc7, 0x02, 0xdc, 0x02,\n  0xbe, 0x02, 0xb8, 0x02, 0x63, 0x02, 0x21, 0x02, 0xd1, 0x01, 0x9c, 0x01,\n  0x6a, 0x01, 0x31, 0x01, 0xec, 0x00, 0x8d, 0x00, 0x2c, 0x00, 0xe2, 0xff,\n  0xc0, 0xff, 0xbc, 0xff, 0x86, 0xff, 0x84, 0xff, 0x63, 0xff, 0x77, 0xff,\n  0xa1, 0xff, 0xd2, 0xff, 0x09, 0x00, 0x3e, 0x00, 0x63, 0x00, 0x80, 0x00,\n  0x61, 0x00, 0x6c, 0x00, 0x3d, 0x00, 0x26, 0x00, 0x19, 0x00, 0xf9, 0xff,\n  0x0e, 0x00, 0xed, 0xff, 0xe4, 0xff, 0xc3, 0xff, 0xb7, 0xff, 0x7d, 0xff,\n  0x5a, 0xff, 0x47, 0xff, 0x33, 0xff, 0x2f, 0xff, 0x3e, 0xff, 0x36, 0xff,\n  0x42, 0xff, 0x49, 0xff, 0x31, 0xff, 0x3d, 0xff, 0x44, 0xff, 0x60, 0xff,\n  0x6c, 0xff, 0x84, 0xff, 0x92, 0xff, 0xd6, 0xff, 0x23, 0x00, 0x81, 0x00,\n  0xd5, 0x00, 0x23, 0x01, 0x5f, 0x01, 0x81, 0x01, 0x9d, 0x01, 0x8d, 0x01,\n  0x85, 0x01, 0x36, 0x01, 0xd7, 0x00, 0x7c, 0x00, 0x10, 0x00, 0xb7, 0xff,\n  0x7c, 0xff, 0x67, 0xff, 0x3b, 0xff, 0x19, 0xff, 0xf6, 0xfe, 0xbb, 0xfe,\n  0x80, 0xfe, 0x45, 0xfe, 0x25, 0xfe, 0x02, 0xfe, 0x1d, 0xfe, 0x64, 0xfe,\n  0xa5, 0xfe, 0xd5, 0xfe, 0xf4, 0xfe, 0xde, 0xfe, 0xba, 0xfe, 0xdc, 0xfe,\n  0xc8, 0xfe, 0xb8, 0xfe, 0xcc, 0xfe, 0xbc, 0xfe, 0xf8, 0xfe, 0xe7, 0xfe,\n  0x19, 0xff, 0x4f, 0xff, 0x84, 0xff, 0xcc, 0xff, 0x25, 0x00, 0x7d, 0x00,\n  0xcc, 0x00, 0xf1, 0x00, 0xd9, 0x00, 0xd1, 0x00, 0xaf, 0x00, 0x79, 0x00,\n  0x4b, 0x00, 0x34, 0x00, 0xff, 0xff, 0xf9, 0xff, 0xef, 0xff, 0xe1, 0xff,\n  0xf7, 0xff, 0xd2, 0xff, 0xd3, 0xff, 0xe0, 0xff, 0xe2, 0xff, 0xea, 0xff,\n  0x1a, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x1f, 0x00, 0x04, 0x00, 0xac, 0xff,\n  0x83, 0xff, 0x56, 0xff, 0x2e, 0xff, 0x0f, 0xff, 0xfa, 0xfe, 0xe8, 0xfe,\n  0x03, 0xff, 0x23, 0xff, 0x4e, 0xff, 0x80, 0xff, 0xc5, 0xff, 0xe2, 0xff,\n  0x12, 0x00, 0x42, 0x00, 0xae, 0x00, 0xda, 0x00, 0x3c, 0x01, 0x89, 0x01,\n  0xd7, 0x01, 0x30, 0x02, 0x60, 0x02, 0xc3, 0x02, 0x13, 0x03, 0x5b, 0x03,\n  0xa6, 0x03, 0xdf, 0x03, 0x04, 0x04, 0x3d, 0x04, 0x37, 0x04, 0x33, 0x04,\n  0x0e, 0x04, 0xa1, 0x03, 0x2b, 0x03, 0xbe, 0x02, 0x07, 0x02, 0x5b, 0x01,\n  0xb8, 0x00, 0x05, 0x00, 0x6b, 0xff, 0xed, 0xfe, 0x73, 0xfe, 0xfc, 0xfd,\n  0x9a, 0xfd, 0x19, 0xfd, 0xb2, 0xfc, 0x37, 0xfc, 0xe5, 0xfb, 0xad, 0xfb,\n  0x69, 0xfb, 0x4d, 0xfb, 0x49, 0xfb, 0x53, 0xfb, 0x65, 0xfb, 0xb0, 0xfb,\n  0xd9, 0xfb, 0x33, 0xfc, 0x66, 0xfc, 0x97, 0xfc, 0xee, 0xfc, 0x2c, 0xfd,\n  0x6c, 0xfd, 0xc6, 0xfd, 0x07, 0xfe, 0x39, 0xfe, 0x71, 0xfe, 0xad, 0xfe,\n  0xd0, 0xfe, 0x28, 0xff, 0x7e, 0xff, 0xb1, 0xff, 0x00, 0x00, 0x1e, 0x00,\n  0x53, 0x00, 0x9e, 0x00, 0xd2, 0x00, 0x31, 0x01, 0xa0, 0x01, 0xf2, 0x01,\n  0x32, 0x02, 0x43, 0x02, 0x1a, 0x02, 0xd0, 0x01, 0xa1, 0x01, 0x6e, 0x01,\n  0x3a, 0x01, 0x34, 0x01, 0x1a, 0x01, 0x0c, 0x01, 0x02, 0x01, 0xd3, 0x00,\n  0xa5, 0x00, 0x53, 0x00, 0x44, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x07, 0x00,\n  0x06, 0x00, 0x08, 0x00, 0xfd, 0xff, 0x1a, 0x00, 0x0d, 0x00, 0x14, 0x00,\n  0x01, 0x00, 0x0e, 0x00, 0x27, 0x00, 0x2b, 0x00, 0x27, 0x00, 0x11, 0x00,\n  0xfd, 0xff, 0xde, 0xff, 0xa6, 0xff, 0xa5, 0xff, 0x8a, 0xff, 0x99, 0xff,\n  0xb9, 0xff, 0xd4, 0xff, 0x13, 0x00, 0x4f, 0x00, 0x75, 0x00, 0x8e, 0x00,\n  0xad, 0x00, 0xc8, 0x00, 0xc4, 0x00, 0xc6, 0x00, 0xca, 0x00, 0xe3, 0x00,\n  0xee, 0x00, 0xf6, 0x00, 0xf0, 0x00, 0xd3, 0x00, 0x91, 0x00, 0x5d, 0x00,\n  0x38, 0x00, 0x24, 0x00, 0x17, 0x00, 0xf7, 0xff, 0xda, 0xff, 0xc6, 0xff,\n  0x91, 0xff, 0x8b, 0xff, 0xa9, 0xff, 0xa6, 0xff, 0xa8, 0xff, 0x7f, 0xff,\n  0x34, 0xff, 0xf5, 0xfe, 0xd1, 0xfe, 0x96, 0xfe, 0x53, 0xfe, 0x2e, 0xfe,\n  0x02, 0xfe, 0xfa, 0xfd, 0x0b, 0xfe, 0x34, 0xfe, 0x67, 0xfe, 0xaa, 0xfe,\n  0xd0, 0xfe, 0xf4, 0xfe, 0x27, 0xff, 0x4c, 0xff, 0x86, 0xff, 0xe6, 0xff,\n  0x3f, 0x00, 0xb8, 0x00, 0x2b, 0x01, 0x9a, 0x01, 0x2a, 0x02, 0x9f, 0x02,\n  0x26, 0x03, 0xab, 0x03, 0x25, 0x04, 0x6e, 0x04, 0xa3, 0x04, 0x65, 0x04,\n  0x42, 0x04, 0xb5, 0x03, 0x1d, 0x03, 0x6d, 0x02, 0xe5, 0x01, 0x4b, 0x01,\n  0x96, 0x00, 0xf7, 0xff, 0x3a, 0xff, 0x88, 0xfe, 0xf6, 0xfd, 0xa2, 0xfd,\n  0x54, 0xfd, 0x15, 0xfd, 0xf4, 0xfc, 0xcf, 0xfc, 0xaf, 0xfc, 0x96, 0xfc,\n  0x76, 0xfc, 0x65, 0xfc, 0x6b, 0xfc, 0x7d, 0xfc, 0x81, 0xfc, 0xb1, 0xfc,\n  0xc3, 0xfc, 0x0d, 0xfd, 0x42, 0xfd, 0x92, 0xfd, 0xe4, 0xfd, 0x2f, 0xfe,\n  0x96, 0xfe, 0xd6, 0xfe, 0x39, 0xff, 0x95, 0xff, 0xf4, 0xff, 0x2d, 0x00,\n  0x8a, 0x00, 0xca, 0x00, 0xf7, 0x00, 0x1a, 0x01, 0x44, 0x01, 0x80, 0x01,\n  0x7a, 0x01, 0x88, 0x01, 0x88, 0x01, 0x97, 0x01, 0xaa, 0x01, 0x89, 0x01,\n  0x88, 0x01, 0x64, 0x01, 0x31, 0x01, 0x2f, 0x01, 0x32, 0x01, 0x1a, 0x01,\n  0x03, 0x01, 0xdf, 0x00, 0xba, 0x00, 0xaf, 0x00, 0x91, 0x00, 0x6c, 0x00,\n  0x47, 0x00, 0x1c, 0x00, 0xfd, 0xff, 0xcd, 0xff, 0x96, 0xff, 0x54, 0xff,\n  0xfc, 0xfe, 0xa5, 0xfe, 0x6d, 0xfe, 0x41, 0xfe, 0x15, 0xfe, 0x0e, 0xfe,\n  0x0d, 0xfe, 0x26, 0xfe, 0x22, 0xfe, 0x41, 0xfe, 0x53, 0xfe, 0x45, 0xfe,\n  0x55, 0xfe, 0x88, 0xfe, 0xac, 0xfe, 0xf2, 0xfe, 0x29, 0xff, 0x55, 0xff,\n  0x7a, 0xff, 0x9d, 0xff, 0xc8, 0xff, 0xf7, 0xff, 0x16, 0x00, 0x3f, 0x00,\n  0x71, 0x00, 0x99, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xdd, 0x00, 0xdd, 0x00,\n  0xf2, 0x00, 0xf0, 0x00, 0x21, 0x01, 0x1a, 0x01, 0x00, 0x01, 0xd1, 0x00,\n  0x94, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xc6, 0xff, 0xaa, 0xff, 0x79, 0xff,\n  0x4e, 0xff, 0x3c, 0xff, 0x0c, 0xff, 0x01, 0xff, 0xfc, 0xfe, 0x25, 0xff,\n  0x53, 0xff, 0x8e, 0xff, 0xd6, 0xff, 0xfd, 0xff, 0x37, 0x00, 0x7e, 0x00,\n  0xa9, 0x00, 0xe4, 0x00, 0x05, 0x01, 0x00, 0x01, 0xe3, 0x00, 0xb2, 0x00,\n  0xb7, 0x00, 0x89, 0x00, 0x6e, 0x00, 0x44, 0x00, 0x16, 0x00, 0xfd, 0xff,\n  0xcf, 0xff, 0xc2, 0xff, 0x8d, 0xff, 0x69, 0xff, 0x36, 0xff, 0xfe, 0xfe,\n  0xd6, 0xfe, 0xc4, 0xfe, 0xba, 0xfe, 0xc3, 0xfe, 0xbe, 0xfe, 0xa3, 0xfe,\n  0x7e, 0xfe, 0x34, 0xfe, 0x13, 0xfe, 0xf1, 0xfd, 0x11, 0xfe, 0x22, 0xfe,\n  0x4c, 0xfe, 0x7a, 0xfe, 0xc2, 0xfe, 0x07, 0xff, 0x33, 0xff, 0x93, 0xff,\n  0x07, 0x00, 0x74, 0x00, 0xcc, 0x00, 0x33, 0x01, 0x86, 0x01, 0xff, 0x01,\n  0x35, 0x02, 0x53, 0x02, 0x77, 0x02, 0x67, 0x02, 0x36, 0x02, 0x01, 0x02,\n  0xd1, 0x01, 0x60, 0x01, 0x21, 0x01, 0xe6, 0x00, 0xa7, 0x00, 0x9d, 0x00,\n  0x51, 0x00, 0x3d, 0x00, 0x31, 0x00, 0x3f, 0x00, 0x47, 0x00, 0x57, 0x00,\n  0x70, 0x00, 0x86, 0x00, 0x80, 0x00, 0x72, 0x00, 0x6a, 0x00, 0x62, 0x00,\n  0x3a, 0x00, 0xfe, 0xff, 0xca, 0xff, 0x94, 0xff, 0x4f, 0xff, 0x45, 0xff,\n  0x26, 0xff, 0x2a, 0xff, 0x26, 0xff, 0x1a, 0xff, 0x1a, 0xff, 0x13, 0xff,\n  0x12, 0xff, 0x1d, 0xff, 0x4b, 0xff, 0x51, 0xff, 0x7d, 0xff, 0x60, 0xff,\n  0x5d, 0xff, 0x58, 0xff, 0x5c, 0xff, 0x57, 0xff, 0x60, 0xff, 0x8b, 0xff,\n  0x7c, 0xff, 0x6f, 0xff, 0x59, 0xff, 0x50, 0xff, 0x30, 0xff, 0x36, 0xff,\n  0x65, 0xff, 0x91, 0xff, 0xc4, 0xff, 0xca, 0xff, 0xd0, 0xff, 0xca, 0xff,\n  0xb7, 0xff, 0xaa, 0xff, 0xa8, 0xff, 0x9f, 0xff, 0x91, 0xff, 0x64, 0xff,\n  0x42, 0xff, 0x07, 0xff, 0xea, 0xfe, 0xca, 0xfe, 0xc2, 0xfe, 0xcc, 0xfe,\n  0xe2, 0xfe, 0x40, 0xff, 0x7d, 0xff, 0xef, 0xff, 0x44, 0x00, 0xa0, 0x00,\n  0xd1, 0x00, 0x0e, 0x01, 0x2e, 0x01, 0x45, 0x01, 0x31, 0x01, 0x22, 0x01,\n  0xe6, 0x00, 0x90, 0x00, 0x79, 0x00, 0x4c, 0x00, 0x2e, 0x00, 0xf6, 0xff,\n  0xd6, 0xff, 0x6e, 0xff, 0x1c, 0xff, 0xf4, 0xfe, 0xaf, 0xfe, 0x89, 0xfe,\n  0x84, 0xfe, 0x71, 0xfe, 0x7f, 0xfe, 0x95, 0xfe, 0xae, 0xfe, 0xd7, 0xfe,\n  0x0c, 0xff, 0x28, 0xff, 0x4b, 0xff, 0x48, 0xff, 0x30, 0xff, 0x3b, 0xff,\n  0x34, 0xff, 0x50, 0xff, 0x90, 0xff, 0xdf, 0xff, 0x34, 0x00, 0x82, 0x00,\n  0xb4, 0x00, 0xce, 0x00, 0xd6, 0x00, 0xf9, 0x00, 0x00, 0x01, 0xdd, 0x00,\n  0xbf, 0x00, 0x96, 0x00, 0x78, 0x00, 0x66, 0x00, 0x4c, 0x00, 0x64, 0x00,\n  0x33, 0x00, 0x18, 0x00, 0x10, 0x00, 0xf6, 0xff, 0xfa, 0xff, 0xfe, 0xff,\n  0xea, 0xff, 0xdf, 0xff, 0xc7, 0xff, 0xa4, 0xff, 0x92, 0xff, 0xbc, 0xff,\n  0xeb, 0xff, 0x13, 0x00, 0x4f, 0x00, 0x82, 0x00, 0xb6, 0x00, 0xde, 0x00,\n  0xf6, 0x00, 0x2e, 0x01, 0x44, 0x01, 0x64, 0x01, 0x84, 0x01, 0x99, 0x01,\n  0x9d, 0x01, 0x70, 0x01, 0x40, 0x01, 0x13, 0x01, 0x10, 0x01, 0xe1, 0x00,\n  0xa8, 0x00, 0x82, 0x00, 0x55, 0x00, 0x2b, 0x00, 0xef, 0xff, 0xd9, 0xff,\n  0xa7, 0xff, 0x89, 0xff, 0x67, 0xff, 0x32, 0xff, 0xff, 0xfe, 0xd1, 0xfe,\n  0x9c, 0xfe, 0x6b, 0xfe, 0x2e, 0xfe, 0x18, 0xfe, 0x2c, 0xfe, 0x1e, 0xfe,\n  0x4b, 0xfe, 0x8b, 0xfe, 0xb7, 0xfe, 0xee, 0xfe, 0x1d, 0xff, 0x4a, 0xff,\n  0x76, 0xff, 0xb2, 0xff, 0xaf, 0xff, 0xbc, 0xff, 0xa9, 0xff, 0x97, 0xff,\n  0x72, 0xff, 0x65, 0xff, 0x65, 0xff, 0x81, 0xff, 0xad, 0xff, 0xcc, 0xff,\n  0xfc, 0xff, 0x08, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x16, 0x00, 0x40, 0x00,\n  0x6a, 0x00, 0x8a, 0x00, 0xb0, 0x00, 0xa9, 0x00, 0xc0, 0x00, 0xdf, 0x00,\n  0x22, 0x01, 0x38, 0x01, 0x5d, 0x01, 0x5a, 0x01, 0x53, 0x01, 0x24, 0x01,\n  0xdf, 0x00, 0xc8, 0x00, 0x88, 0x00, 0x6c, 0x00, 0x30, 0x00, 0x1e, 0x00,\n  0xe6, 0xff, 0xb4, 0xff, 0x80, 0xff, 0x58, 0xff, 0x37, 0xff, 0x11, 0xff,\n  0xeb, 0xfe, 0xd2, 0xfe, 0xd8, 0xfe, 0xc8, 0xfe, 0xb0, 0xfe, 0xa5, 0xfe,\n  0x8b, 0xfe, 0x91, 0xfe, 0x69, 0xfe, 0x49, 0xfe, 0x3b, 0xfe, 0x41, 0xfe,\n  0x3f, 0xfe, 0x64, 0xfe, 0x7b, 0xfe, 0xa3, 0xfe, 0xda, 0xfe, 0xf8, 0xfe,\n  0x26, 0xff, 0x4d, 0xff, 0x81, 0xff, 0xb5, 0xff, 0xd8, 0xff, 0x1b, 0x00,\n  0x45, 0x00, 0x8f, 0x00, 0xcd, 0x00, 0x02, 0x01, 0x32, 0x01, 0x34, 0x01,\n  0x12, 0x01, 0xe9, 0x00, 0xca, 0x00, 0xdd, 0x00, 0xbc, 0x00, 0xbe, 0x00,\n  0xb2, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x7e, 0x00, 0x93, 0x00, 0x89, 0x00,\n  0xbf, 0x00, 0xcb, 0x00, 0xe9, 0x00, 0xe4, 0x00, 0x06, 0x01, 0xf3, 0x00,\n  0x05, 0x01, 0xe7, 0x00, 0xd5, 0x00, 0xc7, 0x00, 0x94, 0x00, 0x6b, 0x00,\n  0x1f, 0x00, 0x9c, 0xff, 0x58, 0xff, 0xef, 0xfe, 0xaf, 0xfe, 0x6c, 0xfe,\n  0x33, 0xfe, 0x13, 0xfe, 0xcf, 0xfd, 0xd6, 0xfd, 0x0a, 0xfe, 0x53, 0xfe,\n  0x81, 0xfe, 0xca, 0xfe, 0xe2, 0xfe, 0x00, 0xff, 0x01, 0xff, 0xe8, 0xfe,\n  0xe6, 0xfe, 0xca, 0xfe, 0xf6, 0xfe, 0x0e, 0xff, 0x5a, 0xff, 0x88, 0xff,\n  0xd9, 0xff, 0x12, 0x00, 0x48, 0x00, 0x90, 0x00, 0xcd, 0x00, 0x09, 0x01,\n  0x4e, 0x01, 0x7c, 0x01, 0x9f, 0x01, 0x9d, 0x01, 0x8e, 0x01, 0x7a, 0x01,\n  0x59, 0x01, 0x51, 0x01, 0x2e, 0x01, 0x39, 0x01, 0x15, 0x01, 0x20, 0x01,\n  0x13, 0x01, 0x16, 0x01, 0xfa, 0x00, 0xff, 0x00, 0xd4, 0x00, 0x95, 0x00,\n  0x4b, 0x00, 0xfa, 0xff, 0xae, 0xff, 0x43, 0xff, 0x0d, 0xff, 0xba, 0xfe,\n  0x86, 0xfe, 0x75, 0xfe, 0x6b, 0xfe, 0x7b, 0xfe, 0x64, 0xfe, 0x66, 0xfe,\n  0x48, 0xfe, 0x37, 0xfe, 0x4f, 0xfe, 0x44, 0xfe, 0x54, 0xfe, 0x83, 0xfe,\n  0xa4, 0xfe, 0xc5, 0xfe, 0x04, 0xff, 0x2c, 0xff, 0x53, 0xff, 0x68, 0xff,\n  0x92, 0xff, 0x99, 0xff, 0x93, 0xff, 0x8c, 0xff, 0x97, 0xff, 0x9a, 0xff,\n  0xb7, 0xff, 0xbb, 0xff, 0xdf, 0xff, 0xfe, 0xff, 0xee, 0xff, 0x01, 0x00,\n  0x03, 0x00, 0xe9, 0xff, 0xf3, 0xff, 0xb8, 0xff, 0xa1, 0xff, 0x89, 0xff,\n  0x8f, 0xff, 0xae, 0xff, 0xcf, 0xff, 0xff, 0xff, 0x2f, 0x00, 0x77, 0x00,\n  0xd9, 0x00, 0x21, 0x01, 0x60, 0x01, 0x8e, 0x01, 0x90, 0x01, 0x7f, 0x01,\n  0x55, 0x01, 0x28, 0x01, 0xf0, 0x00, 0xed, 0x00, 0xb6, 0x00, 0xa0, 0x00,\n  0x7b, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x55, 0x00, 0x6f, 0x00, 0x8c, 0x00,\n  0xc3, 0x00, 0xe5, 0x00, 0x0c, 0x01, 0x3c, 0x01, 0x36, 0x01, 0x27, 0x01,\n  0x25, 0x01, 0xf5, 0x00, 0xc2, 0x00, 0x8d, 0x00, 0x5c, 0x00, 0x35, 0x00,\n  0xea, 0xff, 0x97, 0xff, 0x6c, 0xff, 0x3d, 0xff, 0xf8, 0xfe, 0xdd, 0xfe,\n  0xdd, 0xfe, 0xa1, 0xfe, 0x7e, 0xfe, 0x60, 0xfe, 0x33, 0xfe, 0x15, 0xfe,\n  0xfb, 0xfd, 0xca, 0xfd, 0xc3, 0xfd, 0xbc, 0xfd, 0xd9, 0xfd, 0xeb, 0xfd,\n  0x0c, 0xfe, 0x2e, 0xfe, 0x57, 0xfe, 0x94, 0xfe, 0xcc, 0xfe, 0x2b, 0xff,\n  0x8f, 0xff, 0x2c, 0x00, 0xa5, 0x00, 0x2a, 0x01, 0x92, 0x01, 0xe1, 0x01,\n  0x10, 0x02, 0x3e, 0x02, 0x4c, 0x02, 0x78, 0x02, 0x53, 0x02, 0x35, 0x02,\n  0xdf, 0x01, 0x84, 0x01, 0x3f, 0x01, 0xe0, 0x00, 0xb2, 0x00, 0x4d, 0x00,\n  0x16, 0x00, 0xb5, 0xff, 0x78, 0xff, 0x3d, 0xff, 0x01, 0xff, 0xf0, 0xfe,\n  0xee, 0xfe, 0x0a, 0xff, 0x37, 0xff, 0x74, 0xff, 0xc1, 0xff, 0xea, 0xff,\n  0x12, 0x00, 0x38, 0x00, 0x47, 0x00, 0x39, 0x00, 0x15, 0x00, 0xdc, 0xff,\n  0x97, 0xff, 0x55, 0xff, 0x27, 0xff, 0xe1, 0xfe, 0xbf, 0xfe, 0xa0, 0xfe,\n  0x8e, 0xfe, 0x75, 0xfe, 0x69, 0xfe, 0x86, 0xfe, 0xa7, 0xfe, 0xbd, 0xfe,\n  0xe9, 0xfe, 0x11, 0xff, 0x25, 0xff, 0x33, 0xff, 0x4e, 0xff, 0x51, 0xff,\n  0x33, 0xff, 0x28, 0xff, 0x15, 0xff, 0xee, 0xfe, 0xed, 0xfe, 0x1e, 0xff,\n  0x56, 0xff, 0x83, 0xff, 0xae, 0xff, 0xcb, 0xff, 0xe4, 0xff, 0xfb, 0xff,\n  0x0a, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x41, 0x00, 0x6a, 0x00, 0x99, 0x00,\n  0x9c, 0x00, 0xbd, 0x00, 0xad, 0x00, 0xca, 0x00, 0xc6, 0x00, 0xcb, 0x00,\n  0xe6, 0x00, 0x05, 0x01, 0xdf, 0x00, 0xc2, 0x00, 0x6b, 0x00, 0xee, 0xff,\n  0x99, 0xff, 0x61, 0xff, 0x21, 0xff, 0xfc, 0xfe, 0xe1, 0xfe, 0xac, 0xfe,\n  0x8c, 0xfe, 0x77, 0xfe, 0x94, 0xfe, 0x8d, 0xfe, 0xa1, 0xfe, 0xaf, 0xfe,\n  0xba, 0xfe, 0xe0, 0xfe, 0xd8, 0xfe, 0xfa, 0xfe, 0x12, 0xff, 0x1c, 0xff,\n  0x55, 0xff, 0x7c, 0xff, 0xcf, 0xff, 0x32, 0x00, 0x9d, 0x00, 0x06, 0x01,\n  0x62, 0x01, 0xa6, 0x01, 0xbe, 0x01, 0xc1, 0x01, 0xc1, 0x01, 0x8c, 0x01,\n  0x4c, 0x01, 0x0e, 0x01, 0xd6, 0x00, 0xb3, 0x00, 0x83, 0x00, 0x50, 0x00,\n  0xfe, 0xff, 0xcb, 0xff, 0x9c, 0xff, 0x73, 0xff, 0x5d, 0xff, 0x69, 0xff,\n  0x68, 0xff, 0x7e, 0xff, 0x93, 0xff, 0xc0, 0xff, 0xf5, 0xff, 0x21, 0x00,\n  0x5a, 0x00, 0xa9, 0x00, 0xd9, 0x00, 0x1c, 0x01, 0x2d, 0x01, 0x47, 0x01,\n  0x53, 0x01, 0x6e, 0x01, 0x5f, 0x01, 0x4d, 0x01, 0x45, 0x01, 0x25, 0x01,\n  0xf2, 0x00, 0xc2, 0x00, 0x81, 0x00, 0x49, 0x00, 0x17, 0x00, 0xcf, 0xff,\n  0xa6, 0xff, 0x8f, 0xff, 0x68, 0xff, 0x2d, 0xff, 0xf9, 0xfe, 0x9e, 0xfe,\n  0x52, 0xfe, 0x36, 0xfe, 0x21, 0xfe, 0x0a, 0xfe, 0x10, 0xfe, 0xee, 0xfd,\n  0xdb, 0xfd, 0xc6, 0xfd, 0xe3, 0xfd, 0xdb, 0xfd, 0xfd, 0xfd, 0x0d, 0xfe,\n  0x38, 0xfe, 0x7c, 0xfe, 0xb9, 0xfe, 0x1f, 0xff, 0x92, 0xff, 0x0e, 0x00,\n  0x85, 0x00, 0xe1, 0x00, 0x34, 0x01, 0x5c, 0x01, 0x48, 0x01, 0x4f, 0x01,\n  0x2a, 0x01, 0x28, 0x01, 0x28, 0x01, 0x27, 0x01, 0x08, 0x01, 0xc2, 0x00,\n  0x60, 0x00, 0xf9, 0xff, 0xa5, 0xff, 0x62, 0xff, 0x1d, 0xff, 0x0e, 0xff,\n  0xf8, 0xfe, 0x02, 0xff, 0x17, 0xff, 0x12, 0xff, 0x2b, 0xff, 0x37, 0xff,\n  0x5f, 0xff, 0x66, 0xff, 0x96, 0xff, 0xb2, 0xff, 0xde, 0xff, 0xf9, 0xff,\n  0xf6, 0xff, 0x16, 0x00, 0x31, 0x00, 0x82, 0x00, 0xa1, 0x00, 0x07, 0x01,\n  0x36, 0x01, 0x95, 0x01, 0x9d, 0x01, 0xc7, 0x01, 0xd7, 0x01, 0xdf, 0x01,\n  0xd6, 0x01, 0xe0, 0x01, 0xcb, 0x01, 0x83, 0x01, 0x3b, 0x01, 0xc9, 0x00,\n  0x64, 0x00, 0xf9, 0xff, 0x8f, 0xff, 0x21, 0xff, 0xd9, 0xfe, 0xa5, 0xfe,\n  0x93, 0xfe, 0x65, 0xfe, 0x5b, 0xfe, 0x56, 0xfe, 0x40, 0xfe, 0x5e, 0xfe,\n  0x76, 0xfe, 0x8f, 0xfe, 0xbd, 0xfe, 0xf1, 0xfe, 0x37, 0xff, 0x74, 0xff,\n  0xd5, 0xff, 0x1c, 0x00, 0x71, 0x00, 0xb0, 0x00, 0xd1, 0x00, 0xe4, 0x00,\n  0xf6, 0x00, 0xd5, 0x00, 0x8e, 0x00, 0x5e, 0x00, 0x0e, 0x00, 0xd2, 0xff,\n  0x9d, 0xff, 0x94, 0xff, 0x64, 0xff, 0x63, 0xff, 0x44, 0xff, 0x40, 0xff,\n  0x30, 0xff, 0x64, 0xff, 0x99, 0xff, 0xdb, 0xff, 0x12, 0x00, 0x3a, 0x00,\n  0x3b, 0x00, 0x3b, 0x00, 0x45, 0x00, 0x49, 0x00, 0x2f, 0x00, 0x1d, 0x00,\n  0xf4, 0xff, 0xbf, 0xff, 0x93, 0xff, 0x68, 0xff, 0x58, 0xff, 0x37, 0xff,\n  0x29, 0xff, 0x03, 0xff, 0x0c, 0xff, 0x12, 0xff, 0x12, 0xff, 0x1b, 0xff,\n  0x35, 0xff, 0x5b, 0xff, 0x76, 0xff, 0x6f, 0xff, 0x71, 0xff, 0x73, 0xff,\n  0x96, 0xff, 0x89, 0xff, 0xac, 0xff, 0xcb, 0xff, 0xf0, 0xff, 0x1b, 0x00,\n  0x65, 0x00, 0xb0, 0x00, 0xfc, 0x00, 0x14, 0x01, 0x2c, 0x01, 0x2e, 0x01,\n  0x31, 0x01, 0x11, 0x01, 0xdf, 0x00, 0x94, 0x00, 0x1c, 0x00, 0xac, 0xff,\n  0x80, 0xff, 0x55, 0xff, 0x29, 0xff, 0xe7, 0xfe, 0x83, 0xfe, 0x1c, 0xfe,\n  0x00, 0xfe, 0xe1, 0xfd, 0xc3, 0xfd, 0xcb, 0xfd, 0xa3, 0xfd, 0xc2, 0xfd,\n  0xea, 0xfd, 0x1f, 0xfe, 0x8a, 0xfe, 0xfd, 0xfe, 0x69, 0xff, 0xc3, 0xff,\n  0x0d, 0x00, 0x54, 0x00, 0x9e, 0x00, 0xdd, 0x00, 0x2e, 0x01, 0x8a, 0x01,\n  0xf4, 0x01, 0x3d, 0x02, 0x8b, 0x02, 0xb8, 0x02, 0xcc, 0x02, 0xd3, 0x02,\n  0xcf, 0x02, 0xc5, 0x02, 0xa3, 0x02, 0x6b, 0x02, 0x26, 0x02, 0xd4, 0x01,\n  0x6d, 0x01, 0x01, 0x01, 0x6f, 0x00, 0xf7, 0xff, 0x70, 0xff, 0x26, 0xff,\n  0xc0, 0xfe, 0x73, 0xfe, 0x3f, 0xfe, 0x02, 0xfe, 0x05, 0xfe, 0xfa, 0xfd,\n  0x15, 0xfe, 0x46, 0xfe, 0x62, 0xfe, 0x9b, 0xfe, 0xd7, 0xfe, 0x0c, 0xff,\n  0x50, 0xff, 0x9e, 0xff, 0xbd, 0xff, 0xd2, 0xff, 0xe9, 0xff, 0xe2, 0xff,\n  0xe0, 0xff, 0xe0, 0xff, 0xd5, 0xff, 0xf6, 0xff, 0xec, 0xff, 0xf6, 0xff,\n  0xf9, 0xff, 0x36, 0x00, 0x2f, 0x00, 0x44, 0x00, 0x66, 0x00, 0x8e, 0x00,\n  0xa4, 0x00, 0x8c, 0x00, 0x6f, 0x00, 0x3f, 0x00, 0x2c, 0x00, 0x16, 0x00,\n  0xef, 0xff, 0xdd, 0xff, 0xa4, 0xff, 0xa6, 0xff, 0x94, 0xff, 0x98, 0xff,\n  0xa3, 0xff, 0xab, 0xff, 0x9b, 0xff, 0xa8, 0xff, 0x93, 0xff, 0x7b, 0xff,\n  0x7a, 0xff, 0x7c, 0xff, 0x80, 0xff, 0x76, 0xff, 0x72, 0xff, 0x52, 0xff,\n  0x3f, 0xff, 0x41, 0xff, 0x38, 0xff, 0x40, 0xff, 0x5a, 0xff, 0x54, 0xff,\n  0x50, 0xff, 0x54, 0xff, 0x42, 0xff, 0x4d, 0xff, 0x75, 0xff, 0xbd, 0xff,\n  0xff, 0xff, 0x27, 0x00, 0x3c, 0x00, 0x16, 0x00, 0x1a, 0x00, 0x1c, 0x00,\n  0xf9, 0xff, 0xec, 0xff, 0xbe, 0xff, 0x9d, 0xff, 0x99, 0xff, 0x9c, 0xff,\n  0xbf, 0xff, 0xd0, 0xff, 0xe7, 0xff, 0xca, 0xff, 0xc5, 0xff, 0x98, 0xff,\n  0x77, 0xff, 0x72, 0xff, 0x92, 0xff, 0xa3, 0xff, 0xd6, 0xff, 0xd5, 0xff,\n  0x01, 0x00, 0x22, 0x00, 0x31, 0x00, 0x5d, 0x00, 0x7e, 0x00, 0xb2, 0x00,\n  0xe1, 0x00, 0xf2, 0x00, 0x37, 0x01, 0x3c, 0x01, 0x54, 0x01, 0x56, 0x01,\n  0x6f, 0x01, 0x52, 0x01, 0x31, 0x01, 0x08, 0x01, 0xd5, 0x00, 0x7f, 0x00,\n  0x51, 0x00, 0x05, 0x00, 0xc6, 0xff, 0x85, 0xff, 0x65, 0xff, 0x5c, 0xff,\n  0x44, 0xff, 0x17, 0xff, 0xf3, 0xfe, 0xc4, 0xfe, 0x9f, 0xfe, 0x81, 0xfe,\n  0x6b, 0xfe, 0x5c, 0xfe, 0x4b, 0xfe, 0x43, 0xfe, 0x68, 0xfe, 0x84, 0xfe,\n  0xc9, 0xfe, 0xfb, 0xfe, 0x41, 0xff, 0x92, 0xff, 0xbf, 0xff, 0xfc, 0xff,\n  0x1e, 0x00, 0x1c, 0x00, 0x37, 0x00, 0x45, 0x00, 0x3b, 0x00, 0x31, 0x00,\n  0x2d, 0x00, 0x1e, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xe9, 0xff,\n  0xff, 0xff, 0x02, 0x00, 0x45, 0x00, 0x76, 0x00, 0xb7, 0x00, 0xde, 0x00,\n  0xed, 0x00, 0x10, 0x01, 0xfd, 0x00, 0xeb, 0x00, 0xee, 0x00, 0x08, 0x01,\n  0x2c, 0x01, 0x3b, 0x01, 0x4a, 0x01, 0x42, 0x01, 0x32, 0x01, 0x25, 0x01,\n  0x26, 0x01, 0x1e, 0x01, 0xff, 0x00, 0xd3, 0x00, 0xa3, 0x00, 0x7e, 0x00,\n  0x52, 0x00, 0xff, 0xff, 0xb1, 0xff, 0x3e, 0xff, 0xe0, 0xfe, 0x9f, 0xfe,\n  0x43, 0xfe, 0x14, 0xfe, 0xd6, 0xfd, 0xa0, 0xfd, 0x7d, 0xfd, 0x65, 0xfd,\n  0x55, 0xfd, 0x4d, 0xfd, 0x5e, 0xfd, 0x80, 0xfd, 0xaf, 0xfd, 0xda, 0xfd,\n  0x12, 0xfe, 0x4e, 0xfe, 0x82, 0xfe, 0xda, 0xfe, 0x17, 0xff, 0x6f, 0xff,\n  0xc7, 0xff, 0x48, 0x00, 0x8e, 0x00, 0xed, 0x00, 0x31, 0x01, 0x79, 0x01,\n  0x8c, 0x01, 0xe2, 0x01, 0xfc, 0x01, 0x35, 0x02, 0x58, 0x02, 0x69, 0x02,\n  0x87, 0x02, 0x9c, 0x02, 0x74, 0x02, 0x47, 0x02, 0xfd, 0x01, 0x9f, 0x01,\n  0x29, 0x01, 0xc2, 0x00, 0x85, 0x00, 0x3b, 0x00, 0xe1, 0xff, 0xb2, 0xff,\n  0x6c, 0xff, 0x40, 0xff, 0x0e, 0xff, 0xdf, 0xfe, 0xc4, 0xfe, 0x88, 0xfe,\n  0x6c, 0xfe, 0x46, 0xfe, 0x0e, 0xfe, 0xec, 0xfd, 0xda, 0xfd, 0xca, 0xfd,\n  0xc5, 0xfd, 0xcf, 0xfd, 0xe7, 0xfd, 0x08, 0xfe, 0x17, 0xfe, 0x62, 0xfe,\n  0xbc, 0xfe, 0x07, 0xff, 0x59, 0xff, 0x9b, 0xff, 0xc7, 0xff, 0xe8, 0xff,\n  0xea, 0xff, 0xeb, 0xff, 0xd0, 0xff, 0xd0, 0xff, 0xba, 0xff, 0xcb, 0xff,\n  0xfe, 0xff, 0x28, 0x00, 0x67, 0x00, 0x79, 0x00, 0xb1, 0x00, 0xb1, 0x00,\n  0x9e, 0x00, 0xa9, 0x00, 0xb2, 0x00, 0x93, 0x00, 0xbc, 0x00, 0xc8, 0x00,\n  0xeb, 0x00, 0xee, 0x00, 0xed, 0x00, 0xec, 0x00, 0xc8, 0x00, 0xa6, 0x00,\n  0x91, 0x00, 0x94, 0x00, 0x63, 0x00, 0x48, 0x00, 0x2b, 0x00, 0x08, 0x00,\n  0xeb, 0xff, 0xe7, 0xff, 0xbb, 0xff, 0xac, 0xff, 0x83, 0xff, 0x67, 0xff,\n  0x49, 0xff, 0x31, 0xff, 0x44, 0xff, 0x37, 0xff, 0x30, 0xff, 0x1f, 0xff,\n  0x13, 0xff, 0xfd, 0xfe, 0xe9, 0xfe, 0xfc, 0xfe, 0xf3, 0xfe, 0x15, 0xff,\n  0x1e, 0xff, 0x69, 0xff, 0xa5, 0xff, 0xe5, 0xff, 0x28, 0x00, 0x54, 0x00,\n  0x88, 0x00, 0xb3, 0x00, 0xa6, 0x00, 0xb2, 0x00, 0xbc, 0x00, 0x91, 0x00,\n  0x74, 0x00, 0x4a, 0x00, 0x1d, 0x00, 0x09, 0x00, 0xec, 0xff, 0xc6, 0xff,\n  0xa2, 0xff, 0x80, 0xff, 0x68, 0xff, 0x50, 0xff, 0x40, 0xff, 0x32, 0xff,\n  0x35, 0xff, 0x35, 0xff, 0x41, 0xff, 0x5c, 0xff, 0x5f, 0xff, 0x71, 0xff,\n  0x88, 0xff, 0xb6, 0xff, 0xda, 0xff, 0x12, 0x00, 0x3f, 0x00, 0x86, 0x00,\n  0xc1, 0x00, 0xd4, 0x00, 0xe5, 0x00, 0xf4, 0x00, 0xdd, 0x00, 0xb1, 0x00,\n  0x7d, 0x00, 0x50, 0x00, 0x1a, 0x00, 0x0e, 0x00, 0xed, 0xff, 0xe3, 0xff,\n  0xd0, 0xff, 0xb3, 0xff, 0xc5, 0xff, 0xc0, 0xff, 0xc5, 0xff, 0xe5, 0xff,\n  0x07, 0x00, 0x05, 0x00, 0x03, 0x00, 0xcc, 0xff, 0x97, 0xff, 0x5d, 0xff,\n  0x4d, 0xff, 0x2a, 0xff, 0x1d, 0xff, 0x16, 0xff, 0x04, 0xff, 0x09, 0xff,\n  0x2c, 0xff, 0x51, 0xff, 0x89, 0xff, 0xda, 0xff, 0x1e, 0x00, 0x55, 0x00,\n  0x52, 0x00, 0x56, 0x00, 0x30, 0x00, 0x09, 0x00, 0xec, 0xff, 0xd4, 0xff,\n  0xc6, 0xff, 0xb6, 0xff, 0xbf, 0xff, 0xb0, 0xff, 0xd1, 0xff, 0xf4, 0xff,\n  0x12, 0x00, 0x33, 0x00, 0x3f, 0x00, 0x55, 0x00, 0x5c, 0x00, 0x5b, 0x00,\n  0x73, 0x00, 0x8c, 0x00, 0xba, 0x00, 0xe1, 0x00, 0xfb, 0x00, 0x08, 0x01,\n  0x09, 0x01, 0xdf, 0x00, 0xb2, 0x00, 0x8e, 0x00, 0x5a, 0x00, 0x26, 0x00,\n  0x14, 0x00, 0xd4, 0xff, 0xb1, 0xff, 0x60, 0xff, 0x36, 0xff, 0x08, 0xff,\n  0xe0, 0xfe, 0xe9, 0xfe, 0xf3, 0xfe, 0xf2, 0xfe, 0xf2, 0xfe, 0xcc, 0xfe,\n  0x9b, 0xfe, 0x86, 0xfe, 0x80, 0xfe, 0x70, 0xfe, 0x78, 0xfe, 0x81, 0xfe,\n  0x86, 0xfe, 0x8b, 0xfe, 0x9d, 0xfe, 0xaf, 0xfe, 0xd1, 0xfe, 0xe6, 0xfe,\n  0xf3, 0xfe, 0x10, 0xff, 0x49, 0xff, 0x72, 0xff, 0xad, 0xff, 0xe6, 0xff,\n  0x10, 0x00, 0x46, 0x00, 0x76, 0x00, 0xa0, 0x00, 0xb6, 0x00, 0xc4, 0x00,\n  0xda, 0x00, 0xcf, 0x00, 0xcd, 0x00, 0xdc, 0x00, 0xf6, 0x00, 0x08, 0x01,\n  0x20, 0x01, 0x2b, 0x01, 0x37, 0x01, 0x1f, 0x01, 0xff, 0x00, 0xba, 0x00,\n  0x85, 0x00, 0x64, 0x00, 0x35, 0x00, 0x22, 0x00, 0x02, 0x00, 0x11, 0x00,\n  0xdf, 0xff, 0xc6, 0xff, 0xaf, 0xff, 0x7d, 0xff, 0x62, 0xff, 0x62, 0xff,\n  0x69, 0xff, 0x75, 0xff, 0x87, 0xff, 0x86, 0xff, 0xa3, 0xff, 0xbe, 0xff,\n  0xe5, 0xff, 0xf4, 0xff, 0x03, 0x00, 0xf3, 0xff, 0x03, 0x00, 0xe2, 0xff,\n  0xdd, 0xff, 0xdc, 0xff, 0x06, 0x00, 0xfb, 0xff, 0xf4, 0xff, 0xcc, 0xff,\n  0x8d, 0xff, 0x69, 0xff, 0x63, 0xff, 0x60, 0xff, 0x80, 0xff, 0x9a, 0xff,\n  0xb9, 0xff, 0xb5, 0xff, 0xca, 0xff, 0xcc, 0xff, 0xb2, 0xff, 0xbe, 0xff,\n  0xc1, 0xff, 0xc4, 0xff, 0xec, 0xff, 0x00, 0x00, 0x38, 0x00, 0x44, 0x00,\n  0x5f, 0x00, 0x86, 0x00, 0xad, 0x00, 0xd0, 0x00, 0xf3, 0x00, 0x1f, 0x01,\n  0x47, 0x01, 0x60, 0x01, 0x66, 0x01, 0x64, 0x01, 0x68, 0x01, 0x4b, 0x01,\n  0x1f, 0x01, 0xfc, 0x00, 0xbc, 0x00, 0x9e, 0x00, 0x8f, 0x00, 0x8e, 0x00,\n  0x81, 0x00, 0x7a, 0x00, 0x4f, 0x00, 0x1c, 0x00, 0xfb, 0xff, 0xc2, 0xff,\n  0x8b, 0xff, 0x65, 0xff, 0x1d, 0xff, 0xf0, 0xfe, 0xbb, 0xfe, 0xa1, 0xfe,\n  0x83, 0xfe, 0x7b, 0xfe, 0x66, 0xfe, 0x56, 0xfe, 0x46, 0xfe, 0x60, 0xfe,\n  0x55, 0xfe, 0x66, 0xfe, 0x8d, 0xfe, 0xaa, 0xfe, 0xc1, 0xfe, 0xfc, 0xfe,\n  0x21, 0xff, 0x5c, 0xff, 0x7c, 0xff, 0xb3, 0xff, 0xf1, 0xff, 0xfe, 0xff,\n  0x2b, 0x00, 0x59, 0x00, 0x58, 0x00, 0x66, 0x00, 0x59, 0x00, 0x55, 0x00,\n  0x3d, 0x00, 0x0f, 0x00, 0xf3, 0xff, 0xcc, 0xff, 0x9f, 0xff, 0x94, 0xff,\n  0x91, 0xff, 0x5f, 0xff, 0x45, 0xff, 0x11, 0xff, 0xe0, 0xfe, 0xbf, 0xfe,\n  0x95, 0xfe, 0x75, 0xfe, 0x63, 0xfe, 0x69, 0xfe, 0x73, 0xfe, 0x96, 0xfe,\n  0xb7, 0xfe, 0xe9, 0xfe, 0x17, 0xff, 0x3f, 0xff, 0x76, 0xff, 0x9c, 0xff,\n  0xd8, 0xff, 0x21, 0x00, 0x70, 0x00, 0xae, 0x00, 0xf6, 0x00, 0x13, 0x01,\n  0x5b, 0x01, 0x6f, 0x01, 0x84, 0x01, 0x85, 0x01, 0x77, 0x01, 0x57, 0x01,\n  0x42, 0x01, 0x21, 0x01, 0x1d, 0x01, 0x1f, 0x01, 0x1b, 0x01, 0x0e, 0x01,\n  0xe2, 0x00, 0xb5, 0x00, 0xa1, 0x00, 0x6d, 0x00, 0x48, 0x00, 0x27, 0x00,\n  0xf2, 0xff, 0xc7, 0xff, 0x6f, 0xff, 0x46, 0xff, 0x20, 0xff, 0x0d, 0xff,\n  0xfc, 0xfe, 0x0d, 0xff, 0x0c, 0xff, 0x0b, 0xff, 0x04, 0xff, 0xe3, 0xfe,\n  0xe0, 0xfe, 0xf2, 0xfe, 0x03, 0xff, 0x1a, 0xff, 0x30, 0xff, 0x31, 0xff,\n  0x33, 0xff, 0x4c, 0xff, 0x65, 0xff, 0x73, 0xff, 0x7e, 0xff, 0x7c, 0xff,\n  0x73, 0xff, 0x80, 0xff, 0x71, 0xff, 0x6e, 0xff, 0x65, 0xff, 0x6f, 0xff,\n  0x70, 0xff, 0x86, 0xff, 0x91, 0xff, 0x9e, 0xff, 0x9e, 0xff, 0xba, 0xff,\n  0xc3, 0xff, 0xe6, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xe9, 0xff, 0xcb, 0xff,\n  0xd2, 0xff, 0xc6, 0xff, 0xcd, 0xff, 0xcf, 0xff, 0xcb, 0xff, 0xd4, 0xff,\n  0xb1, 0xff, 0xd4, 0xff, 0xe1, 0xff, 0xfb, 0xff, 0x33, 0x00, 0x67, 0x00,\n  0xa0, 0x00, 0xc5, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0xc2, 0x00, 0xc5, 0x00,\n  0x8b, 0x00, 0x81, 0x00, 0x47, 0x00, 0x07, 0x00, 0xef, 0xff, 0xe3, 0xff,\n  0xe7, 0xff, 0xfa, 0xff, 0xfb, 0xff, 0xf5, 0xff, 0xfc, 0xff, 0xe7, 0xff,\n  0xd3, 0xff, 0xf5, 0xff, 0xe1, 0xff, 0xdb, 0xff, 0xde, 0xff, 0xc3, 0xff,\n  0xba, 0xff, 0xbc, 0xff, 0xbf, 0xff, 0xc8, 0xff, 0xb9, 0xff, 0xad, 0xff,\n  0xa7, 0xff, 0xab, 0xff, 0xaf, 0xff, 0xbd, 0xff, 0xeb, 0xff, 0xf7, 0xff,\n  0x13, 0x00, 0x12, 0x00, 0xf8, 0xff, 0xed, 0xff, 0xdb, 0xff, 0xf0, 0xff,\n  0x01, 0x00, 0x12, 0x00, 0x37, 0x00, 0x3b, 0x00, 0x6d, 0x00, 0x8f, 0x00,\n  0x9f, 0x00, 0xc2, 0x00, 0xf0, 0x00, 0x06, 0x01, 0x1b, 0x01, 0x0b, 0x01,\n  0x0a, 0x01, 0xf0, 0x00, 0xee, 0x00, 0xc3, 0x00, 0xa9, 0x00, 0x7d, 0x00,\n  0x54, 0x00, 0x35, 0x00, 0xf5, 0xff, 0xc7, 0xff, 0x8a, 0xff, 0x74, 0xff,\n  0x60, 0xff, 0x64, 0xff, 0x53, 0xff, 0x57, 0xff, 0x41, 0xff, 0x32, 0xff,\n  0x1c, 0xff, 0xff, 0xfe, 0xc9, 0xfe, 0x99, 0xfe, 0x72, 0xfe, 0x46, 0xfe,\n  0x5b, 0xfe, 0x62, 0xfe, 0x77, 0xfe, 0x77, 0xfe, 0x61, 0xfe, 0x5a, 0xfe,\n  0x55, 0xfe, 0x5c, 0xfe, 0x87, 0xfe, 0x9a, 0xfe, 0xd4, 0xfe, 0xf2, 0xfe,\n  0x2a, 0xff, 0x59, 0xff, 0xa1, 0xff, 0xba, 0xff, 0xe3, 0xff, 0x14, 0x00,\n  0x3b, 0x00, 0x79, 0x00, 0xc0, 0x00, 0x01, 0x01, 0x58, 0x01, 0xa5, 0x01,\n  0x0d, 0x02, 0x41, 0x02, 0x7d, 0x02, 0xa5, 0x02, 0xa7, 0x02, 0xc8, 0x02,\n  0xd4, 0x02, 0xcc, 0x02, 0xdd, 0x02, 0xc0, 0x02, 0xb0, 0x02, 0x84, 0x02,\n  0x35, 0x02, 0xe8, 0x01, 0x9c, 0x01, 0x41, 0x01, 0x04, 0x01, 0xc0, 0x00,\n  0x8a, 0x00, 0x4a, 0x00, 0xeb, 0xff, 0x95, 0xff, 0x34, 0xff, 0xdd, 0xfe,\n  0x88, 0xfe, 0x51, 0xfe, 0x13, 0xfe, 0xf8, 0xfd, 0xde, 0xfd, 0xa6, 0xfd,\n  0x97, 0xfd, 0x7d, 0xfd, 0x6c, 0xfd, 0x71, 0xfd, 0xb2, 0xfd, 0xee, 0xfd,\n  0x2b, 0xfe, 0x61, 0xfe, 0x80, 0xfe, 0x8a, 0xfe, 0xb1, 0xfe, 0xc6, 0xfe,\n  0xdf, 0xfe, 0xff, 0xfe, 0x01, 0xff, 0x18, 0xff, 0x18, 0xff, 0x3c, 0xff,\n  0x50, 0xff, 0x73, 0xff, 0x8e, 0xff, 0x97, 0xff, 0xc9, 0xff, 0x00, 0x00,\n  0x2a, 0x00, 0x60, 0x00, 0xac, 0x00, 0xc8, 0x00, 0xdf, 0x00, 0xe5, 0x00,\n  0xc8, 0x00, 0xa7, 0x00, 0x99, 0x00, 0x61, 0x00, 0x2e, 0x00, 0x05, 0x00,\n  0xfe, 0xff, 0xee, 0xff, 0xef, 0xff, 0xf8, 0xff, 0xfc, 0xff, 0x0b, 0x00,\n  0x05, 0x00, 0x02, 0x00, 0xf8, 0xff, 0xe0, 0xff, 0xd5, 0xff, 0xce, 0xff,\n  0xa6, 0xff, 0xc0, 0xff, 0xaf, 0xff, 0x9b, 0xff, 0x8c, 0xff, 0x82, 0xff,\n  0x82, 0xff, 0x78, 0xff, 0xaa, 0xff, 0xb8, 0xff, 0xdc, 0xff, 0xfe, 0xff,\n  0x20, 0x00, 0x3e, 0x00, 0x6b, 0x00, 0x6a, 0x00, 0x5e, 0x00, 0x4a, 0x00,\n  0x44, 0x00, 0x1f, 0x00, 0x0c, 0x00, 0xdd, 0xff, 0xc6, 0xff, 0xc7, 0xff,\n  0xc4, 0xff, 0xcc, 0xff, 0xd7, 0xff, 0xd0, 0xff, 0xbc, 0xff, 0xae, 0xff,\n  0xaa, 0xff, 0xa2, 0xff, 0xb1, 0xff, 0x9e, 0xff, 0x99, 0xff, 0x90, 0xff,\n  0x88, 0xff, 0x8c, 0xff, 0x96, 0xff, 0xb2, 0xff, 0xc4, 0xff, 0xd4, 0xff,\n  0xa1, 0xff, 0x99, 0xff, 0x5e, 0xff, 0x24, 0xff, 0x11, 0xff, 0x14, 0xff,\n  0x18, 0xff, 0x2f, 0xff, 0x21, 0xff, 0x20, 0xff, 0x14, 0xff, 0x1f, 0xff,\n  0x28, 0xff, 0x2b, 0xff, 0x25, 0xff, 0x25, 0xff, 0x32, 0xff, 0x3b, 0xff,\n  0x59, 0xff, 0xb2, 0xff, 0xee, 0xff, 0x37, 0x00, 0x55, 0x00, 0x68, 0x00,\n  0x7a, 0x00, 0x87, 0x00, 0x8f, 0x00, 0xbe, 0x00, 0xc6, 0x00, 0xe8, 0x00,\n  0xe8, 0x00, 0x03, 0x01, 0x00, 0x01, 0xe0, 0x00, 0xd2, 0x00, 0xc0, 0x00,\n  0xa4, 0x00, 0x9e, 0x00, 0x72, 0x00, 0x63, 0x00, 0x2a, 0x00, 0x18, 0x00,\n  0x20, 0x00, 0x24, 0x00, 0x38, 0x00, 0x46, 0x00, 0x5e, 0x00, 0x75, 0x00,\n  0x75, 0x00, 0x73, 0x00, 0x7e, 0x00, 0x52, 0x00, 0x3a, 0x00, 0x38, 0x00,\n  0x31, 0x00, 0x07, 0x00, 0xe9, 0xff, 0xa2, 0xff, 0x52, 0xff, 0x41, 0xff,\n  0xfb, 0xfe, 0xf2, 0xfe, 0xd2, 0xfe, 0xd1, 0xfe, 0xe7, 0xfe, 0x02, 0xff,\n  0x47, 0xff, 0xae, 0xff, 0x0e, 0x00, 0x6e, 0x00, 0xb5, 0x00, 0xf6, 0x00,\n  0x0d, 0x01, 0xf3, 0x00, 0xc7, 0x00, 0x88, 0x00, 0x3a, 0x00, 0xe8, 0xff,\n  0xe2, 0xff, 0xda, 0xff, 0xc3, 0xff, 0xb0, 0xff, 0x79, 0xff, 0x43, 0xff,\n  0xfa, 0xfe, 0xd6, 0xfe, 0xb4, 0xfe, 0xac, 0xfe, 0x9f, 0xfe, 0xc7, 0xfe,\n  0xce, 0xfe, 0xfb, 0xfe, 0x27, 0xff, 0x42, 0xff, 0x7b, 0xff, 0x9e, 0xff,\n  0xc9, 0xff, 0xe5, 0xff, 0x03, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x2e, 0x00,\n  0x1c, 0x00, 0x13, 0x00, 0x09, 0x00, 0xd1, 0xff, 0xdd, 0xff, 0xba, 0xff,\n  0xbb, 0xff, 0xc8, 0xff, 0xc1, 0xff, 0xe0, 0xff, 0xf6, 0xff, 0xfe, 0xff,\n  0x1e, 0x00, 0x30, 0x00, 0x4a, 0x00, 0x5d, 0x00, 0x66, 0x00, 0x80, 0x00,\n  0x89, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x6e, 0x00, 0x38, 0x00, 0xfc, 0xff,\n  0xb6, 0xff, 0x82, 0xff, 0x64, 0xff, 0x53, 0xff, 0x54, 0xff, 0x5f, 0xff,\n  0x4a, 0xff, 0x36, 0xff, 0x23, 0xff, 0x01, 0xff, 0xe7, 0xfe, 0xf4, 0xfe,\n  0xe4, 0xfe, 0xf9, 0xfe, 0x03, 0xff, 0x11, 0xff, 0x21, 0xff, 0x3d, 0xff,\n  0x42, 0xff, 0x57, 0xff, 0x7d, 0xff, 0x81, 0xff, 0xac, 0xff, 0xb6, 0xff,\n  0xdd, 0xff, 0xec, 0xff, 0x0c, 0x00, 0x17, 0x00, 0x4b, 0x00, 0x84, 0x00,\n  0xbd, 0x00, 0xed, 0x00, 0x0c, 0x01, 0x24, 0x01, 0x21, 0x01, 0x2c, 0x01,\n  0x32, 0x01, 0x44, 0x01, 0x5d, 0x01, 0x70, 0x01, 0x7c, 0x01, 0x79, 0x01,\n  0x6a, 0x01, 0x5d, 0x01, 0x43, 0x01, 0x1b, 0x01, 0xde, 0x00, 0xbd, 0x00,\n  0x97, 0x00, 0x7e, 0x00, 0x2c, 0x00, 0x0a, 0x00, 0xc5, 0xff, 0x8d, 0xff,\n  0x60, 0xff, 0x56, 0xff, 0x4d, 0xff, 0x4f, 0xff, 0x28, 0xff, 0x09, 0xff,\n  0xe7, 0xfe, 0xca, 0xfe, 0xad, 0xfe, 0x98, 0xfe, 0xa9, 0xfe, 0xa2, 0xfe,\n  0xb2, 0xfe, 0xd7, 0xfe, 0xee, 0xfe, 0x0f, 0xff, 0x32, 0xff, 0x55, 0xff,\n  0x62, 0xff, 0x8e, 0xff, 0xb5, 0xff, 0xd8, 0xff, 0x08, 0x00, 0x28, 0x00,\n  0x45, 0x00, 0x62, 0x00, 0x95, 0x00, 0xc6, 0x00, 0xdf, 0x00, 0x11, 0x01,\n  0x22, 0x01, 0x31, 0x01, 0x2a, 0x01, 0x27, 0x01, 0xf7, 0x00, 0xe7, 0x00,\n  0xb3, 0x00, 0xa2, 0x00, 0x6e, 0x00, 0x49, 0x00, 0x08, 0x00, 0xa5, 0xff,\n  0x5d, 0xff, 0x18, 0xff, 0xdf, 0xfe, 0xad, 0xfe, 0x8d, 0xfe, 0x89, 0xfe,\n  0x80, 0xfe, 0x80, 0xfe, 0x9f, 0xfe, 0x9a, 0xfe, 0x9b, 0xfe, 0xab, 0xfe,\n  0xb2, 0xfe, 0xc5, 0xfe, 0xcc, 0xfe, 0xcc, 0xfe, 0xe6, 0xfe, 0xe0, 0xfe,\n  0xfa, 0xfe, 0x10, 0xff, 0x3a, 0xff, 0x4c, 0xff, 0x92, 0xff, 0xae, 0xff,\n  0xe2, 0xff, 0x00, 0x00, 0x2e, 0x00, 0x47, 0x00, 0x42, 0x00, 0x4d, 0x00,\n  0x4e, 0x00, 0x5a, 0x00, 0x5f, 0x00, 0x53, 0x00, 0x31, 0x00, 0x1a, 0x00,\n  0xfd, 0xff, 0xed, 0xff, 0xdd, 0xff, 0xf1, 0xff, 0x08, 0x00, 0x2e, 0x00,\n  0x47, 0x00, 0x74, 0x00, 0x87, 0x00, 0xa3, 0x00, 0xbd, 0x00, 0xcc, 0x00,\n  0xe8, 0x00, 0xfd, 0x00, 0x00, 0x01, 0xf8, 0x00, 0xcd, 0x00, 0x90, 0x00,\n  0x4c, 0x00, 0x08, 0x00, 0xb6, 0xff, 0x7c, 0xff, 0x68, 0xff, 0x4e, 0xff,\n  0x47, 0xff, 0x40, 0xff, 0x51, 0xff, 0x5a, 0xff, 0x5b, 0xff, 0x75, 0xff,\n  0x9e, 0xff, 0xa0, 0xff, 0xab, 0xff, 0xbe, 0xff, 0xb2, 0xff, 0xb8, 0xff,\n  0xcc, 0xff, 0xdd, 0xff, 0xfb, 0xff, 0xf0, 0xff, 0xf8, 0xff, 0xf8, 0xff,\n  0x04, 0x00, 0x06, 0x00, 0x0f, 0x00, 0x04, 0x00, 0xe6, 0xff, 0xbf, 0xff,\n  0x9b, 0xff, 0x7f, 0xff, 0x47, 0xff, 0x1a, 0xff, 0xeb, 0xfe, 0xb3, 0xfe,\n  0xa0, 0xfe, 0x9a, 0xfe, 0x9b, 0xfe, 0x90, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe,\n  0x69, 0xfe, 0x87, 0xfe, 0xaa, 0xfe, 0xd1, 0xfe, 0x08, 0xff, 0x25, 0xff,\n  0x56, 0xff, 0x9e, 0xff, 0xf3, 0xff, 0x4a, 0x00, 0xb1, 0x00, 0x07, 0x01,\n  0x39, 0x01, 0x4b, 0x01, 0x69, 0x01, 0x49, 0x01, 0x46, 0x01, 0x11, 0x01,\n  0x04, 0x01, 0x05, 0x01, 0xed, 0x00, 0xf8, 0x00, 0xe7, 0x00, 0xdc, 0x00,\n  0xc2, 0x00, 0xab, 0x00, 0x95, 0x00, 0x87, 0x00, 0x6c, 0x00, 0x72, 0x00,\n  0x51, 0x00, 0x4a, 0x00, 0x2f, 0x00, 0x17, 0x00, 0x25, 0x00, 0x21, 0x00,\n  0x14, 0x00, 0x00, 0x00, 0xe3, 0xff, 0xc8, 0xff, 0xab, 0xff, 0x8c, 0xff,\n  0x79, 0xff, 0x55, 0xff, 0x28, 0xff, 0x1b, 0xff, 0x1c, 0xff, 0x1d, 0xff,\n  0x20, 0xff, 0x2e, 0xff, 0x25, 0xff, 0x1c, 0xff, 0x13, 0xff, 0x22, 0xff,\n  0x27, 0xff, 0x2b, 0xff, 0x4d, 0xff, 0x52, 0xff, 0x70, 0xff, 0x90, 0xff,\n  0xbe, 0xff, 0xd1, 0xff, 0xfd, 0xff, 0x07, 0x00, 0x18, 0x00, 0x35, 0x00,\n  0x67, 0x00, 0x96, 0x00, 0xb5, 0x00, 0xdb, 0x00, 0xe1, 0x00, 0xf0, 0x00,\n  0xf8, 0x00, 0xf4, 0x00, 0xf5, 0x00, 0xf3, 0x00, 0xdf, 0x00, 0xbe, 0x00,\n  0xc3, 0x00, 0xca, 0x00, 0xb3, 0x00, 0xbd, 0x00, 0xb3, 0x00, 0xa9, 0x00,\n  0x79, 0x00, 0x59, 0x00, 0x29, 0x00, 0xfa, 0xff, 0xe6, 0xff, 0xcf, 0xff,\n  0xca, 0xff, 0xa9, 0xff, 0x94, 0xff, 0x51, 0xff, 0x31, 0xff, 0x14, 0xff,\n  0xf8, 0xfe, 0xe6, 0xfe, 0xda, 0xfe, 0xcf, 0xfe, 0xc9, 0xfe, 0xd7, 0xfe,\n  0xf6, 0xfe, 0x02, 0xff, 0x17, 0xff, 0x1d, 0xff, 0x25, 0xff, 0x10, 0xff,\n  0x13, 0xff, 0xfd, 0xfe, 0xeb, 0xfe, 0xfa, 0xfe, 0xe6, 0xfe, 0xed, 0xfe,\n  0x02, 0xff, 0x20, 0xff, 0x2a, 0xff, 0x59, 0xff, 0x8e, 0xff, 0xd2, 0xff,\n  0x01, 0x00, 0x21, 0x00, 0x49, 0x00, 0x6f, 0x00, 0x8d, 0x00, 0x9c, 0x00,\n  0xbd, 0x00, 0xcf, 0x00, 0xef, 0x00, 0xe6, 0x00, 0xf3, 0x00, 0xd7, 0x00,\n  0xc8, 0x00, 0xa9, 0x00, 0x98, 0x00, 0x91, 0x00, 0x85, 0x00, 0x78, 0x00,\n  0x90, 0x00, 0x72, 0x00, 0x61, 0x00, 0x39, 0x00, 0xf4, 0xff, 0xb6, 0xff,\n  0x76, 0xff, 0x46, 0xff, 0x29, 0xff, 0x20, 0xff, 0x27, 0xff, 0x20, 0xff,\n  0x27, 0xff, 0x25, 0xff, 0x15, 0xff, 0x2a, 0xff, 0x3b, 0xff, 0x57, 0xff,\n  0x61, 0xff, 0x7a, 0xff, 0x96, 0xff, 0xa7, 0xff, 0xd1, 0xff, 0xee, 0xff,\n  0x11, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x24, 0x00, 0x19, 0x00, 0x09, 0x00,\n  0xfa, 0xff, 0xec, 0xff, 0xee, 0xff, 0xf9, 0xff, 0x03, 0x00, 0x19, 0x00,\n  0x1c, 0x00, 0x16, 0x00, 0xe6, 0xff, 0xc9, 0xff, 0xa9, 0xff, 0x95, 0xff,\n  0x7c, 0xff, 0x81, 0xff, 0x6e, 0xff, 0x65, 0xff, 0x49, 0xff, 0x23, 0xff,\n  0x15, 0xff, 0xfb, 0xfe, 0xf5, 0xfe, 0x20, 0xff, 0x3a, 0xff, 0x6d, 0xff,\n  0x9e, 0xff, 0xaa, 0xff, 0xbf, 0xff, 0xc7, 0xff, 0xcb, 0xff, 0xd2, 0xff,\n  0xef, 0xff, 0x1f, 0x00, 0x4e, 0x00, 0x87, 0x00, 0xb1, 0x00, 0xd4, 0x00,\n  0x08, 0x01, 0x11, 0x01, 0x34, 0x01, 0x4c, 0x01, 0x75, 0x01, 0x8e, 0x01,\n  0x93, 0x01, 0x7c, 0x01, 0x59, 0x01, 0x18, 0x01, 0xce, 0x00, 0xa6, 0x00,\n  0x77, 0x00, 0x24, 0x00, 0xf5, 0xff, 0xc0, 0xff, 0x87, 0xff, 0x5c, 0xff,\n  0x3f, 0xff, 0x19, 0xff, 0x09, 0xff, 0xfa, 0xfe, 0xed, 0xfe, 0xe7, 0xfe,\n  0xc2, 0xfe, 0xa7, 0xfe, 0x87, 0xfe, 0x67, 0xfe, 0x69, 0xfe, 0x8b, 0xfe,\n  0x96, 0xfe, 0xc2, 0xfe, 0xd8, 0xfe, 0x06, 0xff, 0x38, 0xff, 0x6a, 0xff,\n  0xbc, 0xff, 0x0f, 0x00, 0x4a, 0x00, 0x8c, 0x00, 0xbc, 0x00, 0xd9, 0x00,\n  0x01, 0x01, 0xee, 0x00, 0xd4, 0x00, 0xbe, 0x00, 0xac, 0x00, 0x9c, 0x00,\n  0x6f, 0x00, 0x64, 0x00, 0x24, 0x00, 0x12, 0x00, 0xf0, 0xff, 0xdc, 0xff,\n  0xea, 0xff, 0xe8, 0xff, 0xfa, 0xff, 0x14, 0x00, 0x0b, 0x00, 0x11, 0x00,\n  0x07, 0x00, 0xf7, 0xff, 0xd6, 0xff, 0xdb, 0xff, 0xb3, 0xff, 0x99, 0xff,\n  0x89, 0xff, 0x89, 0xff, 0x91, 0xff, 0x96, 0xff, 0xa8, 0xff, 0xba, 0xff,\n  0xc1, 0xff, 0xb3, 0xff, 0xb1, 0xff, 0x98, 0xff, 0x83, 0xff, 0x95, 0xff,\n  0x8e, 0xff, 0x8a, 0xff, 0x79, 0xff, 0x5b, 0xff, 0x31, 0xff, 0x38, 0xff,\n  0x32, 0xff, 0x41, 0xff, 0x56, 0xff, 0x5a, 0xff, 0x63, 0xff, 0x63, 0xff,\n  0x64, 0xff, 0x7c, 0xff, 0x89, 0xff, 0x9e, 0xff, 0xd6, 0xff, 0xf6, 0xff,\n  0x12, 0x00, 0x2d, 0x00, 0x27, 0x00, 0x24, 0x00, 0x1b, 0x00, 0x0f, 0x00,\n  0x0b, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x2d, 0x00, 0x47, 0x00,\n  0x65, 0x00, 0x7e, 0x00, 0x95, 0x00, 0x98, 0x00, 0x9c, 0x00, 0x92, 0x00,\n  0x8e, 0x00, 0x91, 0x00, 0x97, 0x00, 0x95, 0x00, 0xaf, 0x00, 0xa2, 0x00,\n  0xaa, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x6c, 0x00, 0x37, 0x00, 0x14, 0x00,\n  0xdf, 0xff, 0xd5, 0xff, 0xb7, 0xff, 0x93, 0xff, 0x7e, 0xff, 0x5d, 0xff,\n  0x53, 0xff, 0x1d, 0xff, 0x07, 0xff, 0xed, 0xfe, 0xd0, 0xfe, 0xc9, 0xfe,\n  0xca, 0xfe, 0xec, 0xfe, 0x15, 0xff, 0x4f, 0xff, 0x8b, 0xff, 0xcd, 0xff,\n  0xf5, 0xff, 0x0b, 0x00, 0x15, 0x00, 0x13, 0x00, 0xf3, 0xff, 0xe9, 0xff,\n  0xda, 0xff, 0xd4, 0xff, 0xeb, 0xff, 0xf3, 0xff, 0x08, 0x00, 0xfb, 0xff,\n  0xf3, 0xff, 0xc4, 0xff, 0xc5, 0xff, 0xb4, 0xff, 0xbe, 0xff, 0xdd, 0xff,\n  0x01, 0x00, 0x2b, 0x00, 0x3c, 0x00, 0x49, 0x00, 0x31, 0x00, 0x08, 0x00,\n  0xf7, 0xff, 0xcb, 0xff, 0xaa, 0xff, 0xc1, 0xff, 0xb9, 0xff, 0xcf, 0xff,\n  0xe1, 0xff, 0xed, 0xff, 0x00, 0x00, 0x06, 0x00, 0x2c, 0x00, 0x48, 0x00,\n  0x61, 0x00, 0x96, 0x00, 0xce, 0x00, 0xe7, 0x00, 0x06, 0x01, 0x09, 0x01,\n  0xf8, 0x00, 0xd9, 0x00, 0xb3, 0x00, 0x7a, 0x00, 0x57, 0x00, 0x0f, 0x00,\n  0xbd, 0xff, 0x94, 0xff, 0x59, 0xff, 0x48, 0xff, 0x30, 0xff, 0x42, 0xff,\n  0x2b, 0xff, 0x28, 0xff, 0xfb, 0xfe, 0xd6, 0xfe, 0xd4, 0xfe, 0xdb, 0xfe,\n  0xc9, 0xfe, 0xf8, 0xfe, 0x01, 0xff, 0x34, 0xff, 0x65, 0xff, 0x97, 0xff,\n  0xde, 0xff, 0x17, 0x00, 0x50, 0x00, 0x68, 0x00, 0x61, 0x00, 0x5d, 0x00,\n  0x42, 0x00, 0x26, 0x00, 0x15, 0x00, 0xf2, 0xff, 0xeb, 0xff, 0xc5, 0xff,\n  0xbe, 0xff, 0xc9, 0xff, 0xbb, 0xff, 0xb1, 0xff, 0xa0, 0xff, 0x84, 0xff,\n  0x6e, 0xff, 0x5b, 0xff, 0x40, 0xff, 0x4e, 0xff, 0x4c, 0xff, 0x61, 0xff,\n  0x7f, 0xff, 0x88, 0xff, 0xa6, 0xff, 0xbc, 0xff, 0xc6, 0xff, 0xc9, 0xff,\n  0xbd, 0xff, 0xb6, 0xff, 0xc4, 0xff, 0xcc, 0xff, 0xd0, 0xff, 0xda, 0xff,\n  0xd2, 0xff, 0xb4, 0xff, 0x9c, 0xff, 0x7f, 0xff, 0x5c, 0xff, 0x56, 0xff,\n  0x5a, 0xff, 0x58, 0xff, 0x72, 0xff, 0x83, 0xff, 0xa5, 0xff, 0xbd, 0xff,\n  0xd5, 0xff, 0xf7, 0xff, 0x22, 0x00, 0x43, 0x00, 0x62, 0x00, 0x9a, 0x00,\n  0xa8, 0x00, 0xcb, 0x00, 0xca, 0x00, 0xbb, 0x00, 0x9e, 0x00, 0x7a, 0x00,\n  0x73, 0x00, 0x59, 0x00, 0x50, 0x00, 0x48, 0x00, 0x3f, 0x00, 0x2e, 0x00,\n  0x27, 0x00, 0x06, 0x00, 0xf2, 0xff, 0xcb, 0xff, 0xb9, 0xff, 0xa0, 0xff,\n  0x8a, 0xff, 0x9d, 0xff, 0xb7, 0xff, 0xc8, 0xff, 0xe6, 0xff, 0x04, 0x00,\n  0x20, 0x00, 0x50, 0x00, 0x5f, 0x00, 0x73, 0x00, 0x93, 0x00, 0x95, 0x00,\n  0x81, 0x00, 0x81, 0x00, 0x42, 0x00, 0x11, 0x00, 0xe0, 0xff, 0xca, 0xff,\n  0xa3, 0xff, 0x87, 0xff, 0x6d, 0xff, 0x37, 0xff, 0x3b, 0xff, 0x2d, 0xff,\n  0x3d, 0xff, 0x5f, 0xff, 0x8a, 0xff, 0xb3, 0xff, 0xed, 0xff, 0x06, 0x00,\n  0x3a, 0x00, 0x34, 0x00, 0x52, 0x00, 0x56, 0x00, 0x5b, 0x00, 0x64, 0x00,\n  0x60, 0x00, 0x54, 0x00, 0x23, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xf6, 0xff,\n  0xfc, 0xff, 0x11, 0x00, 0x1b, 0x00, 0x23, 0x00, 0x05, 0x00, 0xe7, 0xff,\n  0xde, 0xff, 0xb3, 0xff, 0x8d, 0xff, 0x83, 0xff, 0x7b, 0xff, 0x7b, 0xff,\n  0x60, 0xff, 0x8d, 0xff, 0x98, 0xff, 0xc1, 0xff, 0xd2, 0xff, 0xf0, 0xff,\n  0xeb, 0xff, 0xe5, 0xff, 0xb2, 0xff, 0x7e, 0xff, 0x4f, 0xff, 0x16, 0xff,\n  0xf2, 0xfe, 0xf9, 0xfe, 0xf1, 0xfe, 0xff, 0xfe, 0x0e, 0xff, 0x04, 0xff,\n  0x0b, 0xff, 0x1d, 0xff, 0x18, 0xff, 0x24, 0xff, 0x1c, 0xff, 0x33, 0xff,\n  0x5c, 0xff, 0x66, 0xff, 0xae, 0xff, 0xf8, 0xff, 0x42, 0x00, 0x84, 0x00,\n  0xb2, 0x00, 0xe8, 0x00, 0xf0, 0x00, 0xcc, 0x00, 0xd4, 0x00, 0xb5, 0x00,\n  0x82, 0x00, 0x79, 0x00, 0x76, 0x00, 0x6b, 0x00, 0x49, 0x00, 0x19, 0x00,\n  0xd9, 0xff, 0x81, 0xff, 0x6c, 0xff, 0x31, 0xff, 0x25, 0xff, 0x1d, 0xff,\n  0x0e, 0xff, 0x21, 0xff, 0x1a, 0xff, 0x2f, 0xff, 0x3d, 0xff, 0x5d, 0xff,\n  0x8b, 0xff, 0xa2, 0xff, 0xb9, 0xff, 0xcb, 0xff, 0xcd, 0xff, 0xaf, 0xff,\n  0xd7, 0xff, 0xdb, 0xff, 0x00, 0x00, 0x11, 0x00, 0x17, 0x00, 0x25, 0x00,\n  0x35, 0x00, 0x4e, 0x00, 0x64, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8f, 0x00,\n  0x89, 0x00, 0x8a, 0x00, 0x62, 0x00, 0x63, 0x00, 0x48, 0x00, 0x30, 0x00,\n  0x33, 0x00, 0x21, 0x00, 0x2c, 0x00, 0x1b, 0x00, 0x1f, 0x00, 0x1e, 0x00,\n  0xf7, 0xff, 0x0e, 0x00, 0x18, 0x00, 0x24, 0x00, 0x49, 0x00, 0x5d, 0x00,\n  0x85, 0x00, 0x86, 0x00, 0x9d, 0x00, 0xa4, 0x00, 0xc5, 0x00, 0xd4, 0x00,\n  0xe9, 0x00, 0xe7, 0x00, 0xec, 0x00, 0xe4, 0x00, 0xa9, 0x00, 0x91, 0x00,\n  0x62, 0x00, 0x4b, 0x00, 0xfb, 0xff, 0xc6, 0xff, 0x6d, 0xff, 0x18, 0xff,\n  0xda, 0xfe, 0xa7, 0xfe, 0x80, 0xfe, 0x5a, 0xfe, 0x2c, 0xfe, 0xf9, 0xfd,\n  0xf0, 0xfd, 0xe0, 0xfd, 0xe7, 0xfd, 0xf9, 0xfd, 0xff, 0xfd, 0x0b, 0xfe,\n  0x17, 0xfe, 0x28, 0xfe, 0x3d, 0xfe, 0x76, 0xfe, 0xa0, 0xfe, 0xdc, 0xfe,\n  0x06, 0xff, 0x41, 0xff, 0x6e, 0xff, 0xa0, 0xff, 0xea, 0xff, 0x13, 0x00,\n  0x55, 0x00, 0x95, 0x00, 0xaa, 0x00, 0xd9, 0x00, 0x00, 0x01, 0x1a, 0x01,\n  0x42, 0x01, 0x78, 0x01, 0xa3, 0x01, 0xc0, 0x01, 0xc4, 0x01, 0xbb, 0x01,\n  0x94, 0x01, 0x90, 0x01, 0x88, 0x01, 0x5c, 0x01, 0x53, 0x01, 0x1b, 0x01,\n  0xfb, 0x00, 0xe7, 0x00, 0xb7, 0x00, 0xaa, 0x00, 0x91, 0x00, 0x60, 0x00,\n  0x43, 0x00, 0x20, 0x00, 0xef, 0xff, 0xc5, 0xff, 0x93, 0xff, 0x50, 0xff,\n  0x07, 0xff, 0xd4, 0xfe, 0xa0, 0xfe, 0x7c, 0xfe, 0x65, 0xfe, 0x43, 0xfe,\n  0x42, 0xfe, 0x37, 0xfe, 0x38, 0xfe, 0x57, 0xfe, 0x6d, 0xfe, 0xb4, 0xfe,\n  0xee, 0xfe, 0x41, 0xff, 0x8b, 0xff, 0xcf, 0xff, 0xfb, 0xff, 0x37, 0x00,\n  0x65, 0x00, 0x68, 0x00, 0x70, 0x00, 0x5a, 0x00, 0x38, 0x00, 0x20, 0x00,\n  0x31, 0x00, 0x2a, 0x00, 0x46, 0x00, 0x3f, 0x00, 0x3a, 0x00, 0x45, 0x00,\n  0x5e, 0x00, 0x67, 0x00, 0x83, 0x00, 0x98, 0x00, 0x96, 0x00, 0x90, 0x00,\n  0x7f, 0x00, 0x50, 0x00, 0x13, 0x00, 0xe8, 0xff, 0xba, 0xff, 0x85, 0xff,\n  0x78, 0xff, 0x7f, 0xff, 0x8b, 0xff, 0x7d, 0xff, 0x8b, 0xff, 0x8a, 0xff,\n  0x82, 0xff, 0x91, 0xff, 0x96, 0xff, 0xb0, 0xff, 0xde, 0xff, 0xdf, 0xff,\n  0x16, 0x00, 0x0d, 0x00, 0x1f, 0x00, 0x39, 0x00, 0x64, 0x00, 0x89, 0x00,\n  0xb8, 0x00, 0xe1, 0x00, 0xfd, 0x00, 0x24, 0x01, 0x47, 0x01, 0x5b, 0x01,\n  0x76, 0x01, 0x74, 0x01, 0x5e, 0x01, 0x39, 0x01, 0xff, 0x00, 0xaa, 0x00,\n  0x6d, 0x00, 0x32, 0x00, 0xf6, 0xff, 0xc3, 0xff, 0xa0, 0xff, 0x6e, 0xff,\n  0x2d, 0xff, 0x09, 0xff, 0xcf, 0xfe, 0x97, 0xfe, 0x66, 0xfe, 0x37, 0xfe,\n  0x02, 0xfe, 0xc5, 0xfd, 0xb4, 0xfd, 0xaf, 0xfd, 0x9d, 0xfd, 0xaf, 0xfd,\n  0xbf, 0xfd, 0xdc, 0xfd, 0xef, 0xfd, 0x1c, 0xfe, 0x40, 0xfe, 0x81, 0xfe,\n  0xb3, 0xfe, 0xe0, 0xfe, 0x14, 0xff, 0x35, 0xff, 0x57, 0xff, 0x7b, 0xff,\n  0x9b, 0xff, 0xbe, 0xff, 0x01, 0x00, 0x2e, 0x00, 0x7c, 0x00, 0xa9, 0x00,\n  0xd2, 0x00, 0xeb, 0x00, 0x28, 0x01, 0x27, 0x01, 0x54, 0x01, 0x7c, 0x01,\n  0xaf, 0x01, 0xb3, 0x01, 0xaa, 0x01, 0x99, 0x01, 0x67, 0x01, 0x55, 0x01,\n  0x2a, 0x01, 0x13, 0x01, 0xf7, 0x00, 0xe6, 0x00, 0xbb, 0x00, 0xa7, 0x00,\n  0x80, 0x00, 0x64, 0x00, 0x3b, 0x00, 0x0c, 0x00, 0xf5, 0xff, 0xe9, 0xff,\n  0xbb, 0xff, 0x98, 0xff, 0x71, 0xff, 0x32, 0xff, 0xee, 0xfe, 0xc6, 0xfe,\n  0x84, 0xfe, 0x49, 0xfe, 0x37, 0xfe, 0x20, 0xfe, 0x28, 0xfe, 0x1f, 0xfe,\n  0x2d, 0xfe, 0x3d, 0xfe, 0x2f, 0xfe, 0x59, 0xfe, 0x80, 0xfe, 0xba, 0xfe,\n  0xed, 0xfe, 0x3e, 0xff, 0x73, 0xff, 0xc0, 0xff, 0xe7, 0xff, 0x12, 0x00,\n  0x29, 0x00, 0x30, 0x00, 0x4e, 0x00, 0x7c, 0x00, 0x97, 0x00, 0xa6, 0x00,\n  0xb7, 0x00, 0xa9, 0x00, 0xae, 0x00, 0xa2, 0x00, 0xa8, 0x00, 0x8b, 0x00,\n  0x92, 0x00, 0x78, 0x00, 0x6d, 0x00, 0x5f, 0x00, 0x49, 0x00, 0x45, 0x00,\n  0x2f, 0x00, 0x3c, 0x00, 0x51, 0x00, 0x73, 0x00, 0x97, 0x00, 0xb3, 0x00,\n  0xb8, 0x00, 0xc5, 0x00, 0xc3, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xa6, 0x00,\n  0x7c, 0x00, 0x6c, 0x00, 0x2d, 0x00, 0xe9, 0xff, 0xaf, 0xff, 0x7f, 0xff,\n  0x43, 0xff, 0x1c, 0xff, 0x04, 0xff, 0xe1, 0xfe, 0xed, 0xfe, 0xe2, 0xfe,\n  0xff, 0xfe, 0x0a, 0xff, 0x20, 0xff, 0x23, 0xff, 0x30, 0xff, 0x2a, 0xff,\n  0x39, 0xff, 0x33, 0xff, 0x3b, 0xff, 0x52, 0xff, 0x68, 0xff, 0x93, 0xff,\n  0xb9, 0xff, 0xdc, 0xff, 0xf1, 0xff, 0xf1, 0xff, 0x0c, 0x00, 0x2a, 0x00,\n  0x3c, 0x00, 0x58, 0x00, 0x54, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x38, 0x00,\n  0x25, 0x00, 0x2d, 0x00, 0x2a, 0x00, 0x13, 0x00, 0x19, 0x00, 0x13, 0x00,\n  0x33, 0x00, 0x2f, 0x00, 0x46, 0x00, 0x5a, 0x00, 0x56, 0x00, 0x52, 0x00,\n  0x1d, 0x00, 0xfa, 0xff, 0xb4, 0xff, 0xa5, 0xff, 0x8e, 0xff, 0x8a, 0xff,\n  0x7c, 0xff, 0x7a, 0xff, 0x6b, 0xff, 0x48, 0xff, 0x5a, 0xff, 0x65, 0xff,\n  0x6e, 0xff, 0x88, 0xff, 0x84, 0xff, 0xa7, 0xff, 0xc6, 0xff, 0xdd, 0xff,\n  0xff, 0xff, 0x29, 0x00, 0x2f, 0x00, 0x43, 0x00, 0x53, 0x00, 0x3c, 0x00,\n  0x35, 0x00, 0x2c, 0x00, 0x05, 0x00, 0xfb, 0xff, 0xdf, 0xff, 0xb1, 0xff,\n  0xaa, 0xff, 0x9b, 0xff, 0xa1, 0xff, 0x8f, 0xff, 0x8e, 0xff, 0x82, 0xff,\n  0x6a, 0xff, 0x6c, 0xff, 0x63, 0xff, 0x71, 0xff, 0x83, 0xff, 0xa9, 0xff,\n  0xbb, 0xff, 0xcc, 0xff, 0xde, 0xff, 0xf3, 0xff, 0xfd, 0xff, 0x1d, 0x00,\n  0x40, 0x00, 0x78, 0x00, 0xb1, 0x00, 0xda, 0x00, 0x0d, 0x01, 0x35, 0x01,\n  0x4f, 0x01, 0x40, 0x01, 0x49, 0x01, 0x42, 0x01, 0x18, 0x01, 0xf8, 0x00,\n  0xe5, 0x00, 0xba, 0x00, 0x96, 0x00, 0x7f, 0x00, 0x64, 0x00, 0x3a, 0x00,\n  0x17, 0x00, 0xdd, 0xff, 0xa7, 0xff, 0x79, 0xff, 0x57, 0xff, 0x2d, 0xff,\n  0x0f, 0xff, 0xde, 0xfe, 0xc8, 0xfe, 0xaa, 0xfe, 0x9d, 0xfe, 0x90, 0xfe,\n  0x9a, 0xfe, 0x8b, 0xfe, 0x87, 0xfe, 0x9b, 0xfe, 0xad, 0xfe, 0xd9, 0xfe,\n  0x02, 0xff, 0x40, 0xff, 0x76, 0xff, 0x91, 0xff, 0xbe, 0xff, 0xea, 0xff,\n  0x12, 0x00, 0x19, 0x00, 0x36, 0x00, 0x36, 0x00, 0x4f, 0x00, 0x5f, 0x00,\n  0x70, 0x00, 0x70, 0x00, 0x73, 0x00, 0x65, 0x00, 0x3b, 0x00, 0x26, 0x00,\n  0x0e, 0x00, 0xd3, 0xff, 0xbc, 0xff, 0xa1, 0xff, 0x7a, 0xff, 0x5e, 0xff,\n  0x4c, 0xff, 0x40, 0xff, 0x31, 0xff, 0x35, 0xff, 0x4c, 0xff, 0x65, 0xff,\n  0x6c, 0xff, 0x8d, 0xff, 0x95, 0xff, 0x85, 0xff, 0x7b, 0xff, 0x70, 0xff,\n  0x5e, 0xff, 0x4a, 0xff, 0x4a, 0xff, 0x57, 0xff, 0x6e, 0xff, 0x85, 0xff,\n  0xbf, 0xff, 0xeb, 0xff, 0x02, 0x00, 0x0e, 0x00, 0x24, 0x00, 0x17, 0x00,\n  0x25, 0x00, 0x36, 0x00, 0x2d, 0x00, 0x46, 0x00, 0x3a, 0x00, 0x5b, 0x00,\n  0x53, 0x00, 0x5b, 0x00, 0x7c, 0x00, 0x9d, 0x00, 0xbb, 0x00, 0xd5, 0x00,\n  0xf1, 0x00, 0xf0, 0x00, 0xe2, 0x00, 0xdd, 0x00, 0xc4, 0x00, 0xad, 0x00,\n  0x95, 0x00, 0x70, 0x00, 0x59, 0x00, 0x41, 0x00, 0x13, 0x00, 0x03, 0x00,\n  0x01, 0x00, 0xf4, 0xff, 0xd7, 0xff, 0xb8, 0xff, 0x9b, 0xff, 0x5c, 0xff,\n  0x20, 0xff, 0x1e, 0xff, 0xfc, 0xfe, 0x03, 0xff, 0xf9, 0xfe, 0xe8, 0xfe,\n  0xd7, 0xfe, 0xca, 0xfe, 0xc2, 0xfe, 0xc5, 0xfe, 0xd0, 0xfe, 0xe3, 0xfe,\n  0xee, 0xfe, 0xff, 0xfe, 0x0d, 0xff, 0x24, 0xff, 0x3b, 0xff, 0x5b, 0xff,\n  0x87, 0xff, 0xc8, 0xff, 0xf1, 0xff, 0x22, 0x00, 0x42, 0x00, 0x53, 0x00,\n  0x79, 0x00, 0xa1, 0x00, 0xbf, 0x00, 0xdd, 0x00, 0x01, 0x01, 0x15, 0x01,\n  0x25, 0x01, 0x17, 0x01, 0x31, 0x01, 0x26, 0x01, 0x0b, 0x01, 0xf4, 0x00,\n  0xe0, 0x00, 0xb6, 0x00, 0x77, 0x00, 0x47, 0x00, 0xfe, 0xff, 0xb8, 0xff,\n  0x97, 0xff, 0x63, 0xff, 0x4f, 0xff, 0x1f, 0xff, 0x17, 0xff, 0xfe, 0xfe,\n  0xf0, 0xfe, 0xf5, 0xfe, 0x00, 0xff, 0xec, 0xfe, 0xe3, 0xfe, 0xd7, 0xfe,\n  0xde, 0xfe, 0xcd, 0xfe, 0xdd, 0xfe, 0xe4, 0xfe, 0xde, 0xfe, 0xfd, 0xfe,\n  0x04, 0xff, 0x30, 0xff, 0x5d, 0xff, 0x99, 0xff, 0xe1, 0xff, 0x0c, 0x00,\n  0x34, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x50, 0x00, 0x6f, 0x00, 0x62, 0x00,\n  0x78, 0x00, 0x68, 0x00, 0x70, 0x00, 0x57, 0x00, 0x5d, 0x00, 0x5d, 0x00,\n  0x4c, 0x00, 0x4b, 0x00, 0x40, 0x00, 0x2c, 0x00, 0x1b, 0x00, 0xf7, 0xff,\n  0xe1, 0xff, 0xf1, 0xff, 0xec, 0xff, 0xf9, 0xff, 0x1f, 0x00, 0x36, 0x00,\n  0x5b, 0x00, 0x64, 0x00, 0x70, 0x00, 0x90, 0x00, 0x99, 0x00, 0x93, 0x00,\n  0x9d, 0x00, 0xa0, 0x00, 0x94, 0x00, 0x83, 0x00, 0x6f, 0x00, 0x46, 0x00,\n  0x1b, 0x00, 0xe2, 0xff, 0xb4, 0xff, 0xa3, 0xff, 0x82, 0xff, 0x64, 0xff,\n  0x4d, 0xff, 0x3b, 0xff, 0x2c, 0xff, 0x20, 0xff, 0x1e, 0xff, 0x17, 0xff,\n  0x28, 0xff, 0x2b, 0xff, 0x4c, 0xff, 0x5e, 0xff, 0x90, 0xff, 0xae, 0xff,\n  0xd9, 0xff, 0xea, 0xff, 0x05, 0x00, 0x0f, 0x00, 0x38, 0x00, 0x59, 0x00,\n  0x6c, 0x00, 0x84, 0x00, 0x82, 0x00, 0x66, 0x00, 0x53, 0x00, 0x50, 0x00,\n  0x35, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc2, 0xff, 0xaa, 0xff, 0x7c, 0xff,\n  0x62, 0xff, 0x5f, 0xff, 0x57, 0xff, 0x50, 0xff, 0x40, 0xff, 0x4a, 0xff,\n  0x2f, 0xff, 0x3d, 0xff, 0x30, 0xff, 0x29, 0xff, 0x25, 0xff, 0x23, 0xff,\n  0x10, 0xff, 0x28, 0xff, 0x26, 0xff, 0x59, 0xff, 0x5b, 0xff, 0x7b, 0xff,\n  0x92, 0xff, 0xa2, 0xff, 0xbd, 0xff, 0xfd, 0xff, 0x2a, 0x00, 0x5c, 0x00,\n  0x6a, 0x00, 0x62, 0x00, 0x6a, 0x00, 0x61, 0x00, 0x60, 0x00, 0x5d, 0x00,\n  0x70, 0x00, 0x66, 0x00, 0x6e, 0x00, 0x69, 0x00, 0x59, 0x00, 0x5f, 0x00,\n  0x55, 0x00, 0x48, 0x00, 0x5e, 0x00, 0x58, 0x00, 0x59, 0x00, 0x62, 0x00,\n  0x5e, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x41, 0x00,\n  0x1a, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xae, 0xff, 0xae, 0xff, 0x8e, 0xff,\n  0x64, 0xff, 0x6c, 0xff, 0x55, 0xff, 0x5e, 0xff, 0x57, 0xff, 0x53, 0xff,\n  0x61, 0xff, 0x87, 0xff, 0x8c, 0xff, 0xb7, 0xff, 0xd8, 0xff, 0xf8, 0xff,\n  0x0a, 0x00, 0x19, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x03, 0x00, 0xed, 0xff,\n  0xea, 0xff, 0xcc, 0xff, 0xc8, 0xff, 0xa1, 0xff, 0x9f, 0xff, 0x84, 0xff,\n  0x78, 0xff, 0x7f, 0xff, 0x73, 0xff, 0x77, 0xff, 0x7e, 0xff, 0x8d, 0xff,\n  0xbc, 0xff, 0xd3, 0xff, 0xf5, 0xff, 0x09, 0x00, 0x22, 0x00, 0x28, 0x00,\n  0x41, 0x00, 0x54, 0x00, 0x57, 0x00, 0x5a, 0x00, 0x60, 0x00, 0x56, 0x00,\n  0x3f, 0x00, 0x30, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x0f, 0x00,\n  0x20, 0x00, 0x29, 0x00, 0x2a, 0x00, 0x3f, 0x00, 0x37, 0x00, 0x2c, 0x00,\n  0x15, 0x00, 0x10, 0x00, 0x09, 0x00, 0xf2, 0xff, 0xe0, 0xff, 0xed, 0xff,\n  0xc3, 0xff, 0xc7, 0xff, 0xbd, 0xff, 0xd6, 0xff, 0xd1, 0xff, 0xf1, 0xff,\n  0xf6, 0xff, 0x1a, 0x00, 0x22, 0x00, 0x29, 0x00, 0x29, 0x00, 0x13, 0x00,\n  0x13, 0x00, 0x08, 0x00, 0xe8, 0xff, 0xd6, 0xff, 0xb4, 0xff, 0x96, 0xff,\n  0x81, 0xff, 0x68, 0xff, 0x85, 0xff, 0x82, 0xff, 0x9c, 0xff, 0xa1, 0xff,\n  0xa2, 0xff, 0xa1, 0xff, 0x86, 0xff, 0x78, 0xff, 0x51, 0xff, 0x50, 0xff,\n  0x36, 0xff, 0x2f, 0xff, 0x36, 0xff, 0x30, 0xff, 0x48, 0xff, 0x57, 0xff,\n  0x78, 0xff, 0x8f, 0xff, 0xb6, 0xff, 0xd6, 0xff, 0xf2, 0xff, 0xde, 0xff,\n  0xed, 0xff, 0xbe, 0xff, 0x88, 0xff, 0x7a, 0xff, 0x6b, 0xff, 0x54, 0xff,\n  0x4d, 0xff, 0x4a, 0xff, 0x24, 0xff, 0x13, 0xff, 0x0c, 0xff, 0x14, 0xff,\n  0x05, 0xff, 0x27, 0xff, 0x28, 0xff, 0x49, 0xff, 0x52, 0xff, 0x6a, 0xff,\n  0x8c, 0xff, 0x8c, 0xff, 0xac, 0xff, 0xc6, 0xff, 0xd1, 0xff, 0xf5, 0xff,\n  0x0c, 0x00, 0x0d, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x01, 0x00,\n  0x0c, 0x00, 0x24, 0x00, 0x34, 0x00, 0x53, 0x00, 0x61, 0x00, 0x7f, 0x00,\n  0x62, 0x00, 0x4d, 0x00, 0x54, 0x00, 0x3d, 0x00, 0x35, 0x00, 0x48, 0x00,\n  0x29, 0x00, 0x33, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x0f, 0x00, 0xf6, 0xff,\n  0x07, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x09, 0x00, 0xf4, 0xff, 0xed, 0xff,\n  0xcf, 0xff, 0xd0, 0xff, 0xc0, 0xff, 0xd7, 0xff, 0xea, 0xff, 0x0e, 0x00,\n  0x29, 0x00, 0x44, 0x00, 0x5a, 0x00, 0x75, 0x00, 0x9b, 0x00, 0xa6, 0x00,\n  0xbd, 0x00, 0xda, 0x00, 0xe6, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xcb, 0x00,\n  0xc6, 0x00, 0xaa, 0x00, 0x95, 0x00, 0x6d, 0x00, 0x51, 0x00, 0x36, 0x00,\n  0x11, 0x00, 0xfb, 0xff, 0xd2, 0xff, 0xac, 0xff, 0x76, 0xff, 0x5d, 0xff,\n  0x35, 0xff, 0x1c, 0xff, 0x13, 0xff, 0xf9, 0xfe, 0xf0, 0xfe, 0xe0, 0xfe,\n  0xdc, 0xfe, 0xcc, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xb2, 0xfe, 0xc1, 0xfe,\n  0xc6, 0xfe, 0xf9, 0xfe, 0x14, 0xff, 0x5f, 0xff, 0x9a, 0xff, 0xe8, 0xff,\n  0x1b, 0x00, 0x51, 0x00, 0x68, 0x00, 0x89, 0x00, 0x9a, 0x00, 0x9e, 0x00,\n  0xa1, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0xc4, 0x00, 0xb4, 0x00, 0xab, 0x00,\n  0x94, 0x00, 0x74, 0x00, 0x5c, 0x00, 0x4e, 0x00, 0x48, 0x00, 0x35, 0x00,\n  0x27, 0x00, 0xf3, 0xff, 0xe9, 0xff, 0xc9, 0xff, 0xa2, 0xff, 0x9c, 0xff,\n  0x80, 0xff, 0x74, 0xff, 0x68, 0xff, 0x73, 0xff, 0x64, 0xff, 0x55, 0xff,\n  0x4a, 0xff, 0x23, 0xff, 0x1a, 0xff, 0x13, 0xff, 0x0f, 0xff, 0x1a, 0xff,\n  0x2c, 0xff, 0x3b, 0xff, 0x4b, 0xff, 0x78, 0xff, 0xa7, 0xff, 0xda, 0xff,\n  0x12, 0x00, 0x49, 0x00, 0x79, 0x00, 0x92, 0x00, 0xb0, 0x00, 0xc1, 0x00,\n  0xdb, 0x00, 0xdd, 0x00, 0xf3, 0x00, 0xf0, 0x00, 0xe2, 0x00, 0xc8, 0x00,\n  0x95, 0x00, 0x67, 0x00, 0x47, 0x00, 0x2f, 0x00, 0x06, 0x00, 0xff, 0xff,\n  0xdf, 0xff, 0xc7, 0xff, 0x9d, 0xff, 0x84, 0xff, 0x72, 0xff, 0x6f, 0xff,\n  0x59, 0xff, 0x50, 0xff, 0x50, 0xff, 0x3e, 0xff, 0x3e, 0xff, 0x53, 0xff,\n  0x61, 0xff, 0x6a, 0xff, 0x4c, 0xff, 0x31, 0xff, 0x08, 0xff, 0xe6, 0xfe,\n  0xcd, 0xfe, 0xd9, 0xfe, 0xe3, 0xfe, 0xef, 0xfe, 0x05, 0xff, 0x09, 0xff,\n  0xfe, 0xfe, 0x02, 0xff, 0xfb, 0xfe, 0x00, 0xff, 0x0c, 0xff, 0x1f, 0xff,\n  0x54, 0xff, 0x97, 0xff, 0xcf, 0xff, 0x1f, 0x00, 0x61, 0x00, 0x9e, 0x00,\n  0xb9, 0x00, 0xc9, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xbd, 0x00, 0xbd, 0x00,\n  0xb5, 0x00, 0xba, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe9, 0x00, 0xf7, 0x00,\n  0xfe, 0x00, 0xed, 0x00, 0xc5, 0x00, 0x9b, 0x00, 0x6c, 0x00, 0x39, 0x00,\n  0x06, 0x00, 0x0c, 0x00, 0xf1, 0xff, 0xe2, 0xff, 0xcf, 0xff, 0xac, 0xff,\n  0x77, 0xff, 0x52, 0xff, 0x29, 0xff, 0x18, 0xff, 0xf1, 0xfe, 0xeb, 0xfe,\n  0xf7, 0xfe, 0xf4, 0xfe, 0x02, 0xff, 0x16, 0xff, 0x3a, 0xff, 0x36, 0xff,\n  0x56, 0xff, 0x6e, 0xff, 0x8e, 0xff, 0xa8, 0xff, 0xcd, 0xff, 0xd1, 0xff,\n  0xed, 0xff, 0xf9, 0xff, 0x09, 0x00, 0x1f, 0x00, 0x2e, 0x00, 0x55, 0x00,\n  0x57, 0x00, 0x69, 0x00, 0x99, 0x00, 0xca, 0x00, 0xe5, 0x00, 0x15, 0x01,\n  0x30, 0x01, 0x50, 0x01, 0x44, 0x01, 0x39, 0x01, 0x2f, 0x01, 0x0d, 0x01,\n  0xdb, 0x00, 0xbb, 0x00, 0x70, 0x00, 0x43, 0x00, 0x02, 0x00, 0xc6, 0xff,\n  0x98, 0xff, 0x71, 0xff, 0x57, 0xff, 0x45, 0xff, 0x2d, 0xff, 0x23, 0xff,\n  0x0d, 0xff, 0x0d, 0xff, 0x27, 0xff, 0x1f, 0xff, 0x44, 0xff, 0x4d, 0xff,\n  0x55, 0xff, 0x66, 0xff, 0x72, 0xff, 0x68, 0xff, 0x75, 0xff, 0x6f, 0xff,\n  0x6a, 0xff, 0x80, 0xff, 0x91, 0xff, 0xc5, 0xff, 0xe1, 0xff, 0x11, 0x00,\n  0x25, 0x00, 0x3d, 0x00, 0x46, 0x00, 0x3d, 0x00, 0x49, 0x00, 0x4d, 0x00,\n  0x3d, 0x00, 0x4c, 0x00, 0x3e, 0x00, 0x34, 0x00, 0x28, 0x00, 0x0b, 0x00,\n  0x1f, 0x00, 0xf8, 0xff, 0x0a, 0x00, 0x06, 0x00, 0x16, 0x00, 0x05, 0x00,\n  0x03, 0x00, 0xf0, 0xff, 0xee, 0xff, 0xdd, 0xff, 0xd9, 0xff, 0xdb, 0xff,\n  0xe9, 0xff, 0xff, 0xff, 0xfa, 0xff, 0x10, 0x00, 0x1b, 0x00, 0x0f, 0x00,\n  0x07, 0x00, 0x18, 0x00, 0x09, 0x00, 0x08, 0x00, 0xf3, 0xff, 0xef, 0xff,\n  0xcc, 0xff, 0xac, 0xff, 0x8c, 0xff, 0x73, 0xff, 0x58, 0xff, 0x3e, 0xff,\n  0x22, 0xff, 0x11, 0xff, 0x13, 0xff, 0x0d, 0xff, 0x0c, 0xff, 0x19, 0xff,\n  0x29, 0xff, 0x29, 0xff, 0x26, 0xff, 0x24, 0xff, 0x21, 0xff, 0xfc, 0xfe,\n  0x17, 0xff, 0x02, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x14, 0xff, 0x1c, 0xff,\n  0x2e, 0xff, 0x32, 0xff, 0x45, 0xff, 0x55, 0xff, 0x6c, 0xff, 0x80, 0xff,\n  0x9f, 0xff, 0xc5, 0xff, 0xdf, 0xff, 0x0f, 0x00, 0x33, 0x00, 0x4a, 0x00,\n  0x68, 0x00, 0x81, 0x00, 0x76, 0x00, 0x7c, 0x00, 0x6f, 0x00, 0x70, 0x00,\n  0x7b, 0x00, 0x72, 0x00, 0x77, 0x00, 0x65, 0x00, 0x60, 0x00, 0x47, 0x00,\n  0x45, 0x00, 0x40, 0x00, 0x46, 0x00, 0x48, 0x00, 0x52, 0x00, 0x5c, 0x00,\n  0x60, 0x00, 0x65, 0x00, 0x5c, 0x00, 0x37, 0x00, 0x17, 0x00, 0xfb, 0xff,\n  0xd7, 0xff, 0xde, 0xff, 0xcc, 0xff, 0xca, 0xff, 0xba, 0xff, 0xa8, 0xff,\n  0xac, 0xff, 0x70, 0xff, 0x72, 0xff, 0x5d, 0xff, 0x54, 0xff, 0x59, 0xff,\n  0x58, 0xff, 0x65, 0xff, 0x86, 0xff, 0x89, 0xff, 0xbe, 0xff, 0xd4, 0xff,\n  0xfe, 0xff, 0x19, 0x00, 0x33, 0x00, 0x3b, 0x00, 0x6a, 0x00, 0x71, 0x00,\n  0x8a, 0x00, 0xb7, 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xab, 0x00, 0xa8, 0x00,\n  0x7d, 0x00, 0x56, 0x00, 0x44, 0x00, 0x2a, 0x00, 0x28, 0x00, 0xf2, 0xff,\n  0xf4, 0xff, 0xda, 0xff, 0xd0, 0xff, 0xb9, 0xff, 0xc6, 0xff, 0xb4, 0xff,\n  0xab, 0xff, 0x85, 0xff, 0x5e, 0xff, 0x46, 0xff, 0x20, 0xff, 0x0e, 0xff,\n  0x01, 0xff, 0xf8, 0xfe, 0xe6, 0xfe, 0xe2, 0xfe, 0xd9, 0xfe, 0xd8, 0xfe,\n  0xee, 0xfe, 0x09, 0xff, 0x23, 0xff, 0x3e, 0xff, 0x49, 0xff, 0x4e, 0xff,\n  0x50, 0xff, 0x4b, 0xff, 0x63, 0xff, 0x78, 0xff, 0xa4, 0xff, 0xcf, 0xff,\n  0x09, 0x00, 0x44, 0x00, 0x65, 0x00, 0x8b, 0x00, 0xa6, 0x00, 0xc5, 0x00,\n  0xca, 0x00, 0xd1, 0x00, 0xde, 0x00, 0xdd, 0x00, 0xd3, 0x00, 0xbf, 0x00,\n  0xbe, 0x00, 0xa5, 0x00, 0xa9, 0x00, 0x9d, 0x00, 0xa2, 0x00, 0x8a, 0x00,\n  0x66, 0x00, 0x45, 0x00, 0xfa, 0xff, 0xd1, 0xff, 0xb2, 0xff, 0xaa, 0xff,\n  0xac, 0xff, 0xa9, 0xff, 0x9a, 0xff, 0x8c, 0xff, 0x75, 0xff, 0x64, 0xff,\n  0x54, 0xff, 0x49, 0xff, 0x30, 0xff, 0x28, 0xff, 0x21, 0xff, 0x1e, 0xff,\n  0x2b, 0xff, 0x3b, 0xff, 0x38, 0xff, 0x5d, 0xff, 0x60, 0xff, 0x72, 0xff,\n  0x93, 0xff, 0xb7, 0xff, 0xee, 0xff, 0x11, 0x00, 0x2a, 0x00, 0x3c, 0x00,\n  0x3c, 0x00, 0x35, 0x00, 0x22, 0x00, 0x31, 0x00, 0x31, 0x00, 0x3a, 0x00,\n  0x46, 0x00, 0x41, 0x00, 0x49, 0x00, 0x44, 0x00, 0x3e, 0x00, 0x3b, 0x00,\n  0x23, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf5, 0xff, 0xf9, 0xff, 0xe8, 0xff,\n  0xfe, 0xff, 0xf2, 0xff, 0xe8, 0xff, 0xec, 0xff, 0xd7, 0xff, 0xc5, 0xff,\n  0xc6, 0xff, 0xb1, 0xff, 0xa5, 0xff, 0xb0, 0xff, 0xb3, 0xff, 0xcb, 0xff,\n  0xe0, 0xff, 0xf9, 0xff, 0xfd, 0xff, 0x06, 0x00, 0x17, 0x00, 0x04, 0x00,\n  0x05, 0x00, 0x15, 0x00, 0xee, 0xff, 0x00, 0x00, 0xf1, 0xff, 0x09, 0x00,\n  0xff, 0xff, 0xfd, 0xff, 0x08, 0x00, 0xf1, 0xff, 0xf7, 0xff, 0x07, 0x00,\n  0x08, 0x00, 0x20, 0x00, 0x27, 0x00, 0x2e, 0x00, 0x34, 0x00, 0x2f, 0x00,\n  0x11, 0x00, 0xfc, 0xff, 0xd8, 0xff, 0xbd, 0xff, 0x9e, 0xff, 0x8f, 0xff,\n  0x93, 0xff, 0xa4, 0xff, 0xad, 0xff, 0xbd, 0xff, 0xd5, 0xff, 0xe5, 0xff,\n  0xfa, 0xff, 0x0f, 0x00, 0x45, 0x00, 0x5c, 0x00, 0x74, 0x00, 0x8f, 0x00,\n  0x87, 0x00, 0x87, 0x00, 0x6f, 0x00, 0x54, 0x00, 0x42, 0x00, 0x14, 0x00,\n  0xee, 0xff, 0xbc, 0xff, 0xa4, 0xff, 0x7d, 0xff, 0x6b, 0xff, 0x55, 0xff,\n  0x4d, 0xff, 0x4b, 0xff, 0x2d, 0xff, 0x29, 0xff, 0x23, 0xff, 0x0b, 0xff,\n  0x07, 0xff, 0xf2, 0xfe, 0xf1, 0xfe, 0xdc, 0xfe, 0xe6, 0xfe, 0xf0, 0xfe,\n  0xf1, 0xfe, 0x16, 0xff, 0x2c, 0xff, 0x56, 0xff, 0x79, 0xff, 0xa0, 0xff,\n  0xce, 0xff, 0xee, 0xff, 0x0b, 0x00, 0x15, 0x00, 0x1f, 0x00, 0x20, 0x00,\n  0x2b, 0x00, 0x2b, 0x00, 0x42, 0x00, 0x46, 0x00, 0x6c, 0x00, 0x76, 0x00,\n  0x86, 0x00, 0x91, 0x00, 0x95, 0x00, 0xaf, 0x00, 0xaf, 0x00, 0xc4, 0x00,\n  0xc6, 0x00, 0xe5, 0x00, 0xdc, 0x00, 0xd5, 0x00, 0xb6, 0x00, 0xae, 0x00,\n  0x81, 0x00, 0x5a, 0x00, 0x32, 0x00, 0x03, 0x00, 0xd6, 0xff, 0xc1, 0xff,\n  0xa0, 0xff, 0x87, 0xff, 0x63, 0xff, 0x3a, 0xff, 0xff, 0xfe, 0xe7, 0xfe,\n  0xca, 0xfe, 0xbc, 0xfe, 0xb7, 0xfe, 0xb5, 0xfe, 0xb4, 0xfe, 0xae, 0xfe,\n  0xbb, 0xfe, 0xd8, 0xfe, 0xdc, 0xfe, 0xfa, 0xfe, 0x0e, 0xff, 0x06, 0xff,\n  0x11, 0xff, 0x34, 0xff, 0x35, 0xff, 0x56, 0xff, 0x72, 0xff, 0x6f, 0xff,\n  0xa1, 0xff, 0xb3, 0xff, 0xdb, 0xff, 0x03, 0x00, 0x27, 0x00, 0x53, 0x00,\n  0x78, 0x00, 0x8e, 0x00, 0xa9, 0x00, 0xce, 0x00, 0xe5, 0x00, 0x07, 0x01,\n  0x17, 0x01, 0x41, 0x01, 0x6d, 0x01, 0x99, 0x01, 0x9e, 0x01, 0xbf, 0x01,\n  0xb0, 0x01, 0x89, 0x01, 0x4d, 0x01, 0x1f, 0x01, 0xdc, 0x00, 0x9a, 0x00,\n  0x4f, 0x00, 0x27, 0x00, 0xe1, 0xff, 0xc0, 0xff, 0xa3, 0xff, 0x85, 0xff,\n  0x5b, 0xff, 0x4a, 0xff, 0x30, 0xff, 0x0e, 0xff, 0xe8, 0xfe, 0xcd, 0xfe,\n  0xb8, 0xfe, 0xb7, 0xfe, 0x9c, 0xfe, 0xa8, 0xfe, 0xad, 0xfe, 0xba, 0xfe,\n  0xc4, 0xfe, 0xee, 0xfe, 0x04, 0xff, 0x32, 0xff, 0x55, 0xff, 0x59, 0xff,\n  0x8e, 0xff, 0x96, 0xff, 0xa4, 0xff, 0xd1, 0xff, 0x03, 0x00, 0x29, 0x00,\n  0x42, 0x00, 0x5c, 0x00, 0x54, 0x00, 0x64, 0x00, 0x60, 0x00, 0x5e, 0x00,\n  0x6c, 0x00, 0x7d, 0x00, 0x70, 0x00, 0x70, 0x00, 0x64, 0x00, 0x4e, 0x00,\n  0x2f, 0x00, 0x0e, 0x00, 0x02, 0x00, 0xda, 0xff, 0xe5, 0xff, 0xce, 0xff,\n  0xdb, 0xff, 0xb7, 0xff, 0xb5, 0xff, 0x9e, 0xff, 0x9d, 0xff, 0x9a, 0xff,\n  0xa2, 0xff, 0xc3, 0xff, 0xc3, 0xff, 0xd7, 0xff, 0xcd, 0xff, 0xe5, 0xff,\n  0xd7, 0xff, 0xd1, 0xff, 0xe5, 0xff, 0x0d, 0x00, 0x10, 0x00, 0x24, 0x00,\n  0x31, 0x00, 0x20, 0x00, 0x1c, 0x00, 0x01, 0x00, 0xfd, 0xff, 0xf4, 0xff,\n  0xd0, 0xff, 0xc0, 0xff, 0xa6, 0xff, 0x72, 0xff, 0x56, 0xff, 0x53, 0xff,\n  0x42, 0xff, 0x25, 0xff, 0x2d, 0xff, 0x21, 0xff, 0x23, 0xff, 0x25, 0xff,\n  0x31, 0xff, 0x46, 0xff, 0x68, 0xff, 0x78, 0xff, 0x89, 0xff, 0xad, 0xff,\n  0xb5, 0xff, 0xbd, 0xff, 0xc6, 0xff, 0xdf, 0xff, 0xcb, 0xff, 0xe5, 0xff,\n  0xdf, 0xff, 0xd1, 0xff, 0xd0, 0xff, 0xb3, 0xff, 0xd1, 0xff, 0xb6, 0xff,\n  0xc6, 0xff, 0xe6, 0xff, 0xf3, 0xff, 0x0f, 0x00, 0x27, 0x00, 0x44, 0x00,\n  0x5c, 0x00, 0x68, 0x00, 0x66, 0x00, 0x7f, 0x00, 0x57, 0x00, 0x50, 0x00,\n  0x49, 0x00, 0x24, 0x00, 0x20, 0x00, 0x10, 0x00, 0xfb, 0xff, 0xdc, 0xff,\n  0xcf, 0xff, 0xd4, 0xff, 0xb4, 0xff, 0xb5, 0xff, 0x9d, 0xff, 0x8d, 0xff,\n  0x77, 0xff, 0x75, 0xff, 0x7d, 0xff, 0x92, 0xff, 0xa5, 0xff, 0xc2, 0xff,\n  0xb3, 0xff, 0x9d, 0xff, 0x90, 0xff, 0x71, 0xff, 0x5f, 0xff, 0x66, 0xff,\n  0x6b, 0xff, 0x8c, 0xff, 0xa6, 0xff, 0xbe, 0xff, 0xd9, 0xff, 0xd3, 0xff,\n  0xe7, 0xff, 0xed, 0xff, 0xf1, 0xff, 0x05, 0x00, 0x1b, 0x00, 0x3f, 0x00,\n  0x66, 0x00, 0x89, 0x00, 0xb6, 0x00, 0xca, 0x00, 0xea, 0x00, 0xfd, 0x00,\n  0x0b, 0x01, 0x31, 0x01, 0x41, 0x01, 0x59, 0x01, 0x5e, 0x01, 0x51, 0x01,\n  0x2f, 0x01, 0x00, 0x01, 0xc9, 0x00, 0x90, 0x00, 0x51, 0x00, 0x10, 0x00,\n  0xce, 0xff, 0xb3, 0xff, 0x79, 0xff, 0x60, 0xff, 0x40, 0xff, 0x1b, 0xff,\n  0xf5, 0xfe, 0xe5, 0xfe, 0xde, 0xfe, 0xc1, 0xfe, 0xcc, 0xfe, 0xc1, 0xfe,\n  0xbf, 0xfe, 0xc5, 0xfe, 0xd1, 0xfe, 0xcc, 0xfe, 0x08, 0xff, 0x03, 0xff,\n  0x1a, 0xff, 0x2d, 0xff, 0x36, 0xff, 0x43, 0xff, 0x57, 0xff, 0x6b, 0xff,\n  0x88, 0xff, 0x9d, 0xff, 0xae, 0xff, 0xb6, 0xff, 0xbd, 0xff, 0xb6, 0xff,\n  0xd5, 0xff, 0xf7, 0xff, 0x21, 0x00, 0x57, 0x00, 0x71, 0x00, 0xaf, 0x00,\n  0xa5, 0x00, 0xb0, 0x00, 0xc4, 0x00, 0xd7, 0x00, 0xb8, 0x00, 0xcf, 0x00,\n  0xbc, 0x00, 0xa5, 0x00, 0x91, 0x00, 0x61, 0x00, 0x5b, 0x00, 0x24, 0x00,\n  0x0d, 0x00, 0x01, 0x00, 0x13, 0x00, 0x02, 0x00, 0x15, 0x00, 0x06, 0x00,\n  0xfd, 0xff, 0xe8, 0xff, 0xa4, 0xff, 0x92, 0xff, 0x62, 0xff, 0x5c, 0xff,\n  0x36, 0xff, 0x40, 0xff, 0x40, 0xff, 0x55, 0xff, 0x65, 0xff, 0x80, 0xff,\n  0xa9, 0xff, 0xd9, 0xff, 0x05, 0x00, 0x36, 0x00, 0x50, 0x00, 0x85, 0x00,\n  0x97, 0x00, 0x8e, 0x00, 0xa8, 0x00, 0xb5, 0x00, 0xad, 0x00, 0xaa, 0x00,\n  0xac, 0x00, 0x80, 0x00, 0x70, 0x00, 0x51, 0x00, 0x26, 0x00, 0x18, 0x00,\n  0xe6, 0xff, 0xbe, 0xff, 0x97, 0xff, 0x87, 0xff, 0x5c, 0xff, 0x48, 0xff,\n  0x2c, 0xff, 0x1b, 0xff, 0x00, 0xff, 0xf0, 0xfe, 0xe5, 0xfe, 0x08, 0xff,\n  0x0a, 0xff, 0x27, 0xff, 0x35, 0xff, 0x4a, 0xff, 0x48, 0xff, 0x4a, 0xff,\n  0x5b, 0xff, 0x68, 0xff, 0x67, 0xff, 0x6a, 0xff, 0x58, 0xff, 0x4f, 0xff,\n  0x34, 0xff, 0x3e, 0xff, 0x3c, 0xff, 0x47, 0xff, 0x50, 0xff, 0x5f, 0xff,\n  0x87, 0xff, 0x9f, 0xff, 0xb7, 0xff, 0xde, 0xff, 0xf7, 0xff, 0xf7, 0xff,\n  0xf4, 0xff, 0xf1, 0xff, 0xee, 0xff, 0xe2, 0xff, 0xe8, 0xff, 0xdf, 0xff,\n  0xe9, 0xff, 0x09, 0x00, 0x26, 0x00, 0x4d, 0x00, 0x62, 0x00, 0x76, 0x00,\n  0x67, 0x00, 0x5e, 0x00, 0x69, 0x00, 0x52, 0x00, 0x6d, 0x00, 0x6f, 0x00,\n  0x78, 0x00, 0x8c, 0x00, 0x98, 0x00, 0xa6, 0x00, 0xba, 0x00, 0xbd, 0x00,\n  0xd7, 0x00, 0xe4, 0x00, 0xe4, 0x00, 0xe6, 0x00, 0xdd, 0x00, 0xc6, 0x00,\n  0xaf, 0x00, 0x92, 0x00, 0x6e, 0x00, 0x40, 0x00, 0xef, 0xff, 0xd8, 0xff,\n  0x96, 0xff, 0x66, 0xff, 0x3f, 0xff, 0x2a, 0xff, 0xed, 0xfe, 0xd3, 0xfe,\n  0xa8, 0xfe, 0x87, 0xfe, 0x69, 0xfe, 0x57, 0xfe, 0x46, 0xfe, 0x55, 0xfe,\n  0x6a, 0xfe, 0x8f, 0xfe, 0xb5, 0xfe, 0xcd, 0xfe, 0xf2, 0xfe, 0xf5, 0xfe,\n  0xff, 0xfe, 0x30, 0xff, 0x3c, 0xff, 0x65, 0xff, 0x8d, 0xff, 0xa2, 0xff,\n  0xc4, 0xff, 0xdf, 0xff, 0x13, 0x00, 0x22, 0x00, 0x4a, 0x00, 0x81, 0x00,\n  0xa9, 0x00, 0xd9, 0x00, 0x0a, 0x01, 0x2e, 0x01, 0x5b, 0x01, 0x62, 0x01,\n  0x6c, 0x01, 0x7c, 0x01, 0x78, 0x01, 0x6a, 0x01, 0x5f, 0x01, 0x39, 0x01,\n  0x12, 0x01, 0xe6, 0x00, 0xb8, 0x00, 0x8e, 0x00, 0x6d, 0x00, 0x35, 0x00,\n  0x07, 0x00, 0xed, 0xff, 0xac, 0xff, 0x8a, 0xff, 0x66, 0xff, 0x40, 0xff,\n  0x37, 0xff, 0x24, 0xff, 0x1a, 0xff, 0x22, 0xff, 0x37, 0xff, 0x42, 0xff,\n  0x5e, 0xff, 0x70, 0xff, 0x94, 0xff, 0x99, 0xff, 0xab, 0xff, 0xbc, 0xff,\n  0xbc, 0xff, 0xb8, 0xff, 0xbc, 0xff, 0xae, 0xff, 0x97, 0xff, 0xa3, 0xff,\n  0x97, 0xff, 0x8c, 0xff, 0x84, 0xff, 0x7f, 0xff, 0x71, 0xff, 0x60, 0xff,\n  0x83, 0xff, 0x8e, 0xff, 0xa3, 0xff, 0xa6, 0xff, 0xa5, 0xff, 0x9e, 0xff,\n  0xb1, 0xff, 0x8f, 0xff, 0xa6, 0xff, 0x98, 0xff, 0x90, 0xff, 0xa7, 0xff,\n  0x94, 0xff, 0xb9, 0xff, 0xc5, 0xff, 0xf1, 0xff, 0xea, 0xff, 0x00, 0x00,\n  0x1d, 0x00, 0x2c, 0x00, 0x35, 0x00, 0x50, 0x00, 0x4c, 0x00, 0x5c, 0x00,\n  0x5d, 0x00, 0x57, 0x00, 0x42, 0x00, 0x47, 0x00, 0x34, 0x00, 0x1a, 0x00,\n  0x07, 0x00, 0xe9, 0xff, 0xd2, 0xff, 0xb7, 0xff, 0xc3, 0xff, 0xce, 0xff,\n  0xe2, 0xff, 0xe9, 0xff, 0xfa, 0xff, 0xe8, 0xff, 0xf0, 0xff, 0xe0, 0xff,\n  0xce, 0xff, 0xc4, 0xff, 0xba, 0xff, 0xae, 0xff, 0xaa, 0xff, 0xad, 0xff,\n  0xc9, 0xff, 0xd2, 0xff, 0xee, 0xff, 0xff, 0xff, 0x16, 0x00, 0x25, 0x00,\n  0x32, 0x00, 0x3a, 0x00, 0x47, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x39, 0x00,\n  0x24, 0x00, 0x0f, 0x00, 0x04, 0x00, 0xe2, 0xff, 0xaf, 0xff, 0x99, 0xff,\n  0x89, 0xff, 0x74, 0xff, 0x6c, 0xff, 0x6f, 0xff, 0x4f, 0xff, 0x4d, 0xff,\n  0x3a, 0xff, 0x29, 0xff, 0x1f, 0xff, 0x22, 0xff, 0x19, 0xff, 0x2a, 0xff,\n  0x3a, 0xff, 0x56, 0xff, 0x68, 0xff, 0x84, 0xff, 0x9f, 0xff, 0x93, 0xff,\n  0xb3, 0xff, 0xb8, 0xff, 0xc9, 0xff, 0xd0, 0xff, 0xd0, 0xff, 0xe4, 0xff,\n  0xff, 0xff, 0x08, 0x00, 0x26, 0x00, 0x52, 0x00, 0x5b, 0x00, 0x7b, 0x00,\n  0x7b, 0x00, 0x81, 0x00, 0x8d, 0x00, 0x9f, 0x00, 0x93, 0x00, 0x91, 0x00,\n  0x6a, 0x00, 0x31, 0x00, 0x00, 0x00, 0xe5, 0xff, 0xa4, 0xff, 0x90, 0xff,\n  0x87, 0xff, 0x6b, 0xff, 0x5e, 0xff, 0x56, 0xff, 0x45, 0xff, 0x48, 0xff,\n  0x33, 0xff, 0x49, 0xff, 0x40, 0xff, 0x5e, 0xff, 0x83, 0xff, 0xaf, 0xff,\n  0xea, 0xff, 0x0e, 0x00, 0x4c, 0x00, 0x6a, 0x00, 0x98, 0x00, 0xb4, 0x00,\n  0xc8, 0x00, 0xd7, 0x00, 0xe2, 0x00, 0xde, 0x00, 0xd1, 0x00, 0xc4, 0x00,\n  0xa1, 0x00, 0x62, 0x00, 0x4c, 0x00, 0x04, 0x00, 0xd2, 0xff, 0xb8, 0xff,\n  0xb0, 0xff, 0x94, 0xff, 0x83, 0xff, 0x74, 0xff, 0x5a, 0xff, 0x4f, 0xff,\n  0x39, 0xff, 0x37, 0xff, 0x47, 0xff, 0x4f, 0xff, 0x52, 0xff, 0x61, 0xff,\n  0x62, 0xff, 0x82, 0xff, 0x88, 0xff, 0xc4, 0xff, 0xe0, 0xff, 0x17, 0x00,\n  0x37, 0x00, 0x47, 0x00, 0x6d, 0x00, 0x64, 0x00, 0x6e, 0x00, 0x7b, 0x00,\n  0x79, 0x00, 0x73, 0x00, 0x68, 0x00, 0x52, 0x00, 0x3c, 0x00, 0x29, 0x00,\n  0x14, 0x00, 0x08, 0x00, 0xe8, 0xff, 0xc9, 0xff, 0x9f, 0xff, 0x82, 0xff,\n  0x67, 0xff, 0x40, 0xff, 0x34, 0xff, 0x14, 0xff, 0x06, 0xff, 0xf0, 0xfe,\n  0xf3, 0xfe, 0xf8, 0xfe, 0x0e, 0xff, 0x26, 0xff, 0x2e, 0xff, 0x3e, 0xff,\n  0x37, 0xff, 0x3f, 0xff, 0x35, 0xff, 0x51, 0xff, 0x57, 0xff, 0x74, 0xff,\n  0x83, 0xff, 0x94, 0xff, 0xa7, 0xff, 0xa7, 0xff, 0xd0, 0xff, 0xe9, 0xff,\n  0x14, 0x00, 0x1a, 0x00, 0x21, 0x00, 0x2d, 0x00, 0x2c, 0x00, 0x1a, 0x00,\n  0x39, 0x00, 0x25, 0x00, 0x22, 0x00, 0x22, 0x00, 0x1e, 0x00, 0x25, 0x00,\n  0x1d, 0x00, 0x1a, 0x00, 0xfe, 0xff, 0xe6, 0xff, 0xea, 0xff, 0xc0, 0xff,\n  0xce, 0xff, 0xd8, 0xff, 0xd1, 0xff, 0xee, 0xff, 0xe4, 0xff, 0x06, 0x00,\n  0x20, 0x00, 0x48, 0x00, 0x5e, 0x00, 0x89, 0x00, 0x98, 0x00, 0xbe, 0x00,\n  0xc7, 0x00, 0xca, 0x00, 0xdd, 0x00, 0xd7, 0x00, 0xcc, 0x00, 0xae, 0x00,\n  0x8f, 0x00, 0x7d, 0x00, 0x48, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x03, 0x00,\n  0xe8, 0xff, 0xd8, 0xff, 0xbb, 0xff, 0xab, 0xff, 0x96, 0xff, 0x86, 0xff,\n  0x77, 0xff, 0x63, 0xff, 0x63, 0xff, 0x5a, 0xff, 0x53, 0xff, 0x4a, 0xff,\n  0x3f, 0xff, 0x4e, 0xff, 0x48, 0xff, 0x42, 0xff, 0x56, 0xff, 0x3c, 0xff,\n  0x3b, 0xff, 0x47, 0xff, 0x5e, 0xff, 0x56, 0xff, 0x69, 0xff, 0x65, 0xff,\n  0x5b, 0xff, 0x66, 0xff, 0x5a, 0xff, 0x65, 0xff, 0x86, 0xff, 0xa3, 0xff,\n  0xb4, 0xff, 0xd1, 0xff, 0xed, 0xff, 0x11, 0x00, 0x29, 0x00, 0x36, 0x00,\n  0x54, 0x00, 0x4d, 0x00, 0x63, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x67, 0x00,\n  0x79, 0x00, 0x5b, 0x00, 0x58, 0x00, 0x5a, 0x00, 0x63, 0x00, 0x5e, 0x00,\n  0x5b, 0x00, 0x56, 0x00, 0x4a, 0x00, 0x46, 0x00, 0x48, 0x00, 0x4a, 0x00,\n  0x4a, 0x00, 0x4b, 0x00, 0x1d, 0x00, 0x10, 0x00, 0xf0, 0xff, 0xbe, 0xff,\n  0xa9, 0xff, 0xa1, 0xff, 0x78, 0xff, 0x79, 0xff, 0x56, 0xff, 0x53, 0xff,\n  0x5b, 0xff, 0x51, 0xff, 0x69, 0xff, 0x85, 0xff, 0x96, 0xff, 0xa4, 0xff,\n  0xa0, 0xff, 0xa4, 0xff, 0x92, 0xff, 0x7e, 0xff, 0x94, 0xff, 0x95, 0xff,\n  0x97, 0xff, 0xc0, 0xff, 0xc5, 0xff, 0xe3, 0xff, 0xe9, 0xff, 0xfc, 0xff,\n  0x14, 0x00, 0x1f, 0x00, 0x4a, 0x00, 0x66, 0x00, 0x8a, 0x00, 0xb0, 0x00,\n  0xc1, 0x00, 0xdd, 0x00, 0xe8, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0x09, 0x01,\n  0x09, 0x01, 0x14, 0x01, 0xef, 0x00, 0xf0, 0x00, 0xd4, 0x00, 0xa6, 0x00,\n  0x8e, 0x00, 0x7c, 0x00, 0x4e, 0x00, 0x2a, 0x00, 0xf0, 0xff, 0xaf, 0xff,\n  0x66, 0xff, 0x3a, 0xff, 0xfa, 0xfe, 0xcc, 0xfe, 0xa5, 0xfe, 0x79, 0xfe,\n  0x70, 0xfe, 0x3c, 0xfe, 0x4a, 0xfe, 0x50, 0xfe, 0x49, 0xfe, 0x58, 0xfe,\n  0x68, 0xfe, 0x75, 0xfe, 0x86, 0xfe, 0x97, 0xfe, 0xae, 0xfe, 0xbf, 0xfe,\n  0xf3, 0xfe, 0x0e, 0xff, 0x3b, 0xff, 0x51, 0xff, 0x77, 0xff, 0x91, 0xff,\n  0xad, 0xff, 0xce, 0xff, 0xf5, 0xff, 0x25, 0x00, 0x49, 0x00, 0x6b, 0x00,\n  0x81, 0x00, 0xaa, 0x00, 0xa8, 0x00, 0xce, 0x00, 0xd7, 0x00, 0xed, 0x00,\n  0x0b, 0x01, 0x21, 0x01, 0x42, 0x01, 0x49, 0x01, 0x4e, 0x01, 0x4c, 0x01,\n  0x37, 0x01, 0x16, 0x01, 0xf4, 0x00, 0xd1, 0x00, 0xae, 0x00, 0x70, 0x00,\n  0x49, 0x00, 0x0d, 0x00, 0xdc, 0xff, 0xa6, 0xff, 0x8c, 0xff, 0x7a, 0xff,\n  0x5e, 0xff, 0x5b, 0xff, 0x50, 0xff, 0x52, 0xff, 0x4a, 0xff, 0x4d, 0xff,\n  0x4f, 0xff, 0x60, 0xff, 0x67, 0xff, 0x65, 0xff, 0x7b, 0xff, 0x83, 0xff,\n  0x97, 0xff, 0x88, 0xff, 0xac, 0xff, 0xae, 0xff, 0xc4, 0xff, 0xcc, 0xff,\n  0xe0, 0xff, 0xe3, 0xff, 0xea, 0xff, 0xe4, 0xff, 0xd6, 0xff, 0xc8, 0xff,\n  0xbd, 0xff, 0xb3, 0xff, 0xa0, 0xff, 0x9b, 0xff, 0x95, 0xff, 0x86, 0xff,\n  0x7d, 0xff, 0x77, 0xff, 0x81, 0xff, 0x71, 0xff, 0x7f, 0xff, 0x8c, 0xff,\n  0x80, 0xff, 0x96, 0xff, 0x97, 0xff, 0xa8, 0xff, 0xb1, 0xff, 0xbf, 0xff,\n  0xcb, 0xff, 0xc7, 0xff, 0xd3, 0xff, 0xb9, 0xff, 0x9f, 0xff, 0x98, 0xff,\n  0xaa, 0xff, 0x8b, 0xff, 0x9c, 0xff, 0xa5, 0xff, 0x95, 0xff, 0xa5, 0xff,\n  0x97, 0xff, 0xaf, 0xff, 0xc8, 0xff, 0xc7, 0xff, 0xf7, 0xff, 0x00, 0x00,\n  0x25, 0x00, 0x41, 0x00, 0x4f, 0x00, 0x58, 0x00, 0x64, 0x00, 0x62, 0x00,\n  0x5f, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x40, 0x00, 0x2a, 0x00, 0x2d, 0x00,\n  0x0b, 0x00, 0xf6, 0xff, 0xf0, 0xff, 0xe0, 0xff, 0xbf, 0xff, 0xab, 0xff,\n  0x97, 0xff, 0x7b, 0xff, 0x70, 0xff, 0x56, 0xff, 0x52, 0xff, 0x49, 0xff,\n  0x43, 0xff, 0x43, 0xff, 0x53, 0xff, 0x64, 0xff, 0x6f, 0xff, 0x8f, 0xff,\n  0x7b, 0xff, 0x98, 0xff, 0x81, 0xff, 0x93, 0xff, 0x92, 0xff, 0xaf, 0xff,\n  0xb7, 0xff, 0xc3, 0xff, 0xc9, 0xff, 0xe0, 0xff, 0xd8, 0xff, 0xf3, 0xff,\n  0x06, 0x00, 0x12, 0x00, 0x37, 0x00, 0x47, 0x00, 0x61, 0x00, 0x80, 0x00,\n  0x9b, 0x00, 0xa6, 0x00, 0xca, 0x00, 0xd7, 0x00, 0xf6, 0x00, 0xfd, 0x00,\n  0xf9, 0x00, 0xf7, 0x00, 0xf2, 0x00, 0xe7, 0x00, 0xb3, 0x00, 0xb8, 0x00,\n  0x8f, 0x00, 0x58, 0x00, 0x35, 0x00, 0x11, 0x00, 0xe9, 0xff, 0xc8, 0xff,\n  0xbb, 0xff, 0x91, 0xff, 0x76, 0xff, 0x6a, 0xff, 0x47, 0xff, 0x2c, 0xff,\n  0x2c, 0xff, 0x1f, 0xff, 0x0e, 0xff, 0x17, 0xff, 0x0f, 0xff, 0x06, 0xff,\n  0x09, 0xff, 0x13, 0xff, 0x21, 0xff, 0x2d, 0xff, 0x38, 0xff, 0x42, 0xff,\n  0x35, 0xff, 0x49, 0xff, 0x3b, 0xff, 0x4f, 0xff, 0x60, 0xff, 0x60, 0xff,\n  0x9a, 0xff, 0xbb, 0xff, 0xee, 0xff, 0x28, 0x00, 0x5b, 0x00, 0x79, 0x00,\n  0x89, 0x00, 0x8e, 0x00, 0x9c, 0x00, 0x72, 0x00, 0x7b, 0x00, 0x78, 0x00,\n  0x64, 0x00, 0x5c, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x21, 0x00, 0x14, 0x00,\n  0xed, 0xff, 0xcf, 0xff, 0xbd, 0xff, 0xb1, 0xff, 0x9e, 0xff, 0xb8, 0xff,\n  0xaf, 0xff, 0xc8, 0xff, 0xcc, 0xff, 0xe2, 0xff, 0xe8, 0xff, 0xe6, 0xff,\n  0xfe, 0xff, 0x0d, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x13, 0x00, 0x11, 0x00,\n  0x14, 0x00, 0x14, 0x00, 0x1c, 0x00, 0x23, 0x00, 0x1f, 0x00, 0x0f, 0x00,\n  0x05, 0x00, 0x01, 0x00, 0xf4, 0xff, 0xe6, 0xff, 0xd9, 0xff, 0xbb, 0xff,\n  0xac, 0xff, 0x97, 0xff, 0x7a, 0xff, 0x65, 0xff, 0x5f, 0xff, 0x48, 0xff,\n  0x49, 0xff, 0x48, 0xff, 0x46, 0xff, 0x50, 0xff, 0x56, 0xff, 0x62, 0xff,\n  0x5d, 0xff, 0x7e, 0xff, 0x8d, 0xff, 0xa2, 0xff, 0xab, 0xff, 0xcd, 0xff,\n  0xbd, 0xff, 0xe3, 0xff, 0xeb, 0xff, 0xee, 0xff, 0x09, 0x00, 0x02, 0x00,\n  0x26, 0x00, 0x2e, 0x00, 0x43, 0x00, 0x6e, 0x00, 0x98, 0x00, 0xc5, 0x00,\n  0xd9, 0x00, 0xef, 0x00, 0x07, 0x01, 0x1d, 0x01, 0x1d, 0x01, 0x20, 0x01,\n  0x27, 0x01, 0x1c, 0x01, 0x10, 0x01, 0xf1, 0x00, 0xd7, 0x00, 0xb6, 0x00,\n  0x85, 0x00, 0x69, 0x00, 0x60, 0x00, 0x4a, 0x00, 0x41, 0x00, 0x2c, 0x00,\n  0x16, 0x00, 0xfb, 0xff, 0xd3, 0xff, 0xaa, 0xff, 0x81, 0xff, 0x65, 0xff,\n  0x3e, 0xff, 0x0f, 0xff, 0x0c, 0xff, 0xfa, 0xfe, 0xe7, 0xfe, 0xd7, 0xfe,\n  0xda, 0xfe, 0xc9, 0xfe, 0xb6, 0xfe, 0xbd, 0xfe, 0xa2, 0xfe, 0x9d, 0xfe,\n  0x91, 0xfe, 0x8b, 0xfe, 0x86, 0xfe, 0x84, 0xfe, 0x96, 0xfe, 0x9b, 0xfe,\n  0xcb, 0xfe, 0xcb, 0xfe, 0xfb, 0xfe, 0x15, 0xff, 0x2c, 0xff, 0x4b, 0xff,\n  0x65, 0xff, 0x84, 0xff, 0xac, 0xff, 0xd8, 0xff, 0x08, 0x00, 0x39, 0x00,\n  0x66, 0x00, 0x8f, 0x00, 0xba, 0x00, 0xcb, 0x00, 0xd7, 0x00, 0xe0, 0x00,\n  0xd8, 0x00, 0xbe, 0x00, 0xb6, 0x00, 0x97, 0x00, 0x78, 0x00, 0x7a, 0x00,\n  0x74, 0x00, 0x60, 0x00, 0x46, 0x00, 0x2e, 0x00, 0xe5, 0xff, 0xbe, 0xff,\n  0xa8, 0xff, 0x6d, 0xff, 0x6b, 0xff, 0x56, 0xff, 0x54, 0xff, 0x51, 0xff,\n  0x48, 0xff, 0x5e, 0xff, 0x80, 0xff, 0x93, 0xff, 0xad, 0xff, 0xc9, 0xff,\n  0xe0, 0xff, 0xf7, 0xff, 0xf4, 0xff, 0x11, 0x00, 0x19, 0x00, 0x0f, 0x00,\n  0x1b, 0x00, 0x19, 0x00, 0x1b, 0x00, 0x0e, 0x00, 0x02, 0x00, 0xf3, 0xff,\n  0xe0, 0xff, 0xdb, 0xff, 0xd6, 0xff, 0xc1, 0xff, 0xd5, 0xff, 0xbf, 0xff,\n  0xcf, 0xff, 0xcd, 0xff, 0xde, 0xff, 0x02, 0x00, 0x06, 0x00, 0x23, 0x00,\n  0x2f, 0x00, 0x2b, 0x00, 0x32, 0x00, 0x2b, 0x00, 0x17, 0x00, 0x04, 0x00,\n  0xed, 0xff, 0xf4, 0xff, 0xdb, 0xff, 0xdf, 0xff, 0xe9, 0xff, 0xe7, 0xff,\n  0xe6, 0xff, 0xe4, 0xff, 0xe5, 0xff, 0xed, 0xff, 0xd1, 0xff, 0xca, 0xff,\n  0xc0, 0xff, 0xb4, 0xff, 0x9b, 0xff, 0xb7, 0xff, 0xa5, 0xff, 0xb4, 0xff,\n  0x9a, 0xff, 0xa4, 0xff, 0x9e, 0xff, 0xa2, 0xff, 0xb8, 0xff, 0xb9, 0xff,\n  0xc0, 0xff, 0xca, 0xff, 0xb3, 0xff, 0xc2, 0xff, 0xcb, 0xff, 0xc4, 0xff,\n  0xc6, 0xff, 0xdc, 0xff, 0xdc, 0xff, 0xed, 0xff, 0xe2, 0xff, 0xe2, 0xff,\n  0xd3, 0xff, 0xc8, 0xff, 0xc7, 0xff, 0xb4, 0xff, 0xd1, 0xff, 0xca, 0xff,\n  0xe1, 0xff, 0xe7, 0xff, 0x02, 0x00, 0x15, 0x00, 0x38, 0x00, 0x4c, 0x00,\n  0x5e, 0x00, 0x6a, 0x00, 0x64, 0x00, 0x6b, 0x00, 0x75, 0x00, 0x76, 0x00,\n  0x71, 0x00, 0x75, 0x00, 0x66, 0x00, 0x3e, 0x00, 0x26, 0x00, 0x19, 0x00,\n  0xee, 0xff, 0xdf, 0xff, 0xc3, 0xff, 0xb9, 0xff, 0xb1, 0xff, 0x98, 0xff,\n  0x91, 0xff, 0x8b, 0xff, 0x6f, 0xff, 0x5b, 0xff, 0x57, 0xff, 0x43, 0xff,\n  0x5c, 0xff, 0x69, 0xff, 0x74, 0xff, 0x96, 0xff, 0x9e, 0xff, 0xbd, 0xff,\n  0xaf, 0xff, 0xbd, 0xff, 0xbf, 0xff, 0xb6, 0xff, 0xc5, 0xff, 0xeb, 0xff,\n  0xfa, 0xff, 0x03, 0x00, 0x1f, 0x00, 0x05, 0x00, 0x06, 0x00, 0x09, 0x00,\n  0x10, 0x00, 0x0e, 0x00, 0x26, 0x00, 0x15, 0x00, 0x0d, 0x00, 0xf8, 0xff,\n  0xfa, 0xff, 0xd4, 0xff, 0xe9, 0xff, 0xd8, 0xff, 0xc8, 0xff, 0xdf, 0xff,\n  0xda, 0xff, 0xea, 0xff, 0xf2, 0xff, 0x01, 0x00, 0x0c, 0x00, 0xfb, 0xff,\n  0x17, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x32, 0x00, 0x46, 0x00, 0x66, 0x00,\n  0x8c, 0x00, 0xa5, 0x00, 0xd4, 0x00, 0xf5, 0x00, 0x1a, 0x01, 0x16, 0x01,\n  0x10, 0x01, 0x02, 0x01, 0xee, 0x00, 0xb9, 0x00, 0x81, 0x00, 0x60, 0x00,\n  0x0c, 0x00, 0xe1, 0xff, 0xbb, 0xff, 0x90, 0xff, 0x64, 0xff, 0x3f, 0xff,\n  0x11, 0xff, 0xd7, 0xfe, 0xb5, 0xfe, 0x85, 0xfe, 0x6a, 0xfe, 0x61, 0xfe,\n  0x5a, 0xfe, 0x6b, 0xfe, 0x7e, 0xfe, 0x88, 0xfe, 0xa5, 0xfe, 0xad, 0xfe,\n  0xba, 0xfe, 0xc5, 0xfe, 0xc8, 0xfe, 0xdd, 0xfe, 0xf7, 0xfe, 0x08, 0xff,\n  0x1e, 0xff, 0x4a, 0xff, 0x5c, 0xff, 0x7c, 0xff, 0x93, 0xff, 0xb6, 0xff,\n  0xd9, 0xff, 0xf3, 0xff, 0x11, 0x00, 0x34, 0x00, 0x52, 0x00, 0x7d, 0x00,\n  0x89, 0x00, 0xb8, 0x00, 0xc5, 0x00, 0xc5, 0x00, 0xea, 0x00, 0x01, 0x01,\n  0x1f, 0x01, 0x27, 0x01, 0x41, 0x01, 0x2e, 0x01, 0x44, 0x01, 0x29, 0x01,\n  0x2e, 0x01, 0x32, 0x01, 0x41, 0x01, 0x36, 0x01, 0x28, 0x01, 0x13, 0x01,\n  0xff, 0x00, 0xd3, 0x00, 0xb0, 0x00, 0x95, 0x00, 0x87, 0x00, 0x63, 0x00,\n  0x42, 0x00, 0x17, 0x00, 0xd9, 0xff, 0x9e, 0xff, 0x5d, 0xff, 0x33, 0xff,\n  0xfe, 0xfe, 0xe3, 0xfe, 0xd3, 0xfe, 0xad, 0xfe, 0xab, 0xfe, 0x85, 0xfe,\n  0x86, 0xfe, 0x70, 0xfe, 0x6b, 0xfe, 0x6c, 0xfe, 0x74, 0xfe, 0x84, 0xfe,\n  0xa6, 0xfe, 0xc0, 0xfe, 0xde, 0xfe, 0x1d, 0xff, 0x3b, 0xff, 0x5d, 0xff,\n  0x88, 0xff, 0xa1, 0xff, 0xc8, 0xff, 0xe3, 0xff, 0xf6, 0xff, 0x03, 0x00,\n  0x16, 0x00, 0x30, 0x00, 0x32, 0x00, 0x3a, 0x00, 0x42, 0x00, 0x3c, 0x00,\n  0x36, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x38, 0x00, 0x33, 0x00, 0x18, 0x00,\n  0x17, 0x00, 0xd9, 0xff, 0xd6, 0xff, 0xba, 0xff, 0xab, 0xff, 0xa1, 0xff,\n  0x91, 0xff, 0x88, 0xff, 0x6e, 0xff, 0x5e, 0xff, 0x6d, 0xff, 0x62, 0xff,\n  0x72, 0xff, 0x72, 0xff, 0x5d, 0xff, 0x50, 0xff, 0x4a, 0xff, 0x39, 0xff,\n  0x39, 0xff, 0x4f, 0xff, 0x61, 0xff, 0x72, 0xff, 0x7e, 0xff, 0x7b, 0xff,\n  0x87, 0xff, 0x7e, 0xff, 0x7e, 0xff, 0x8d, 0xff, 0x96, 0xff, 0xb8, 0xff,\n  0xd8, 0xff, 0xfa, 0xff, 0x1c, 0x00, 0x41, 0x00, 0x53, 0x00, 0x58, 0x00,\n  0x5f, 0x00, 0x68, 0x00, 0x67, 0x00, 0x81, 0x00, 0x7c, 0x00, 0x6d, 0x00,\n  0x77, 0x00, 0x64, 0x00, 0x4b, 0x00, 0x63, 0x00, 0x67, 0x00, 0x6a, 0x00,\n  0x63, 0x00, 0x49, 0x00, 0x32, 0x00, 0x0b, 0x00, 0xfb, 0xff, 0xe6, 0xff,\n  0xe5, 0xff, 0xe5, 0xff, 0xd3, 0xff, 0xdd, 0xff, 0xd4, 0xff, 0xc9, 0xff,\n  0xd6, 0xff, 0xd1, 0xff, 0xcd, 0xff, 0xc7, 0xff, 0xb6, 0xff, 0x9b, 0xff,\n  0xa0, 0xff, 0x91, 0xff, 0x78, 0xff, 0x73, 0xff, 0x79, 0xff, 0x6a, 0xff,\n  0x67, 0xff, 0x7e, 0xff, 0x85, 0xff, 0x9a, 0xff, 0xb5, 0xff, 0xb9, 0xff,\n  0xd1, 0xff, 0xd5, 0xff, 0xd2, 0xff, 0xe6, 0xff, 0xf6, 0xff, 0x0d, 0x00,\n  0x25, 0x00, 0x40, 0x00, 0x50, 0x00, 0x51, 0x00, 0x5e, 0x00, 0x70, 0x00,\n  0x72, 0x00, 0x76, 0x00, 0x74, 0x00, 0x6a, 0x00, 0x5f, 0x00, 0x4a, 0x00,\n  0x3d, 0x00, 0x30, 0x00, 0x29, 0x00, 0x1f, 0x00, 0x15, 0x00, 0x16, 0x00,\n  0x1f, 0x00, 0x1e, 0x00, 0x20, 0x00, 0x1d, 0x00, 0x2a, 0x00, 0x16, 0x00,\n  0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0xdb, 0xff, 0xd2, 0xff, 0xd5, 0xff,\n  0xbe, 0xff, 0xb5, 0xff, 0xb7, 0xff, 0xa2, 0xff, 0x87, 0xff, 0x72, 0xff,\n  0x5e, 0xff, 0x3d, 0xff, 0x35, 0xff, 0x36, 0xff, 0x31, 0xff, 0x3a, 0xff,\n  0x36, 0xff, 0x4c, 0xff, 0x57, 0xff, 0x66, 0xff, 0x81, 0xff, 0xa3, 0xff,\n  0xb9, 0xff, 0xd5, 0xff, 0xde, 0xff, 0xcc, 0xff, 0xdc, 0xff, 0xd2, 0xff,\n  0xe0, 0xff, 0xcf, 0xff, 0xf4, 0xff, 0x02, 0x00, 0x21, 0x00, 0x2e, 0x00,\n  0x4b, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x72, 0x00, 0x85, 0x00, 0x7f, 0x00,\n  0x82, 0x00, 0x7c, 0x00, 0x55, 0x00, 0x42, 0x00, 0x21, 0x00, 0x16, 0x00,\n  0xfa, 0xff, 0xf3, 0xff, 0xe7, 0xff, 0xdf, 0xff, 0xc3, 0xff, 0xbb, 0xff,\n  0xb4, 0xff, 0xa7, 0xff, 0x98, 0xff, 0x8b, 0xff, 0x9a, 0xff, 0x81, 0xff,\n  0x8e, 0xff, 0x87, 0xff, 0x97, 0xff, 0x96, 0xff, 0x9b, 0xff, 0x9e, 0xff,\n  0xb2, 0xff, 0xa7, 0xff, 0xb1, 0xff, 0xb9, 0xff, 0xaa, 0xff, 0xad, 0xff,\n  0xba, 0xff, 0xc2, 0xff, 0xc0, 0xff, 0xce, 0xff, 0xb6, 0xff, 0xae, 0xff,\n  0xac, 0xff, 0x87, 0xff, 0x9b, 0xff, 0x9c, 0xff, 0xa0, 0xff, 0xbd, 0xff,\n  0xc9, 0xff, 0xed, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x1a, 0x00, 0x37, 0x00,\n  0x3d, 0x00, 0x44, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x42, 0x00,\n  0x49, 0x00, 0x45, 0x00, 0x35, 0x00, 0x54, 0x00, 0x51, 0x00, 0x6a, 0x00,\n  0x55, 0x00, 0x5e, 0x00, 0x3e, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0xeb, 0xff,\n  0xdb, 0xff, 0xcc, 0xff, 0xb3, 0xff, 0x98, 0xff, 0x85, 0xff, 0x72, 0xff,\n  0x5e, 0xff, 0x4f, 0xff, 0x35, 0xff, 0x22, 0xff, 0x14, 0xff, 0x14, 0xff,\n  0x1f, 0xff, 0x40, 0xff, 0x4f, 0xff, 0x72, 0xff, 0x81, 0xff, 0x85, 0xff,\n  0x89, 0xff, 0x85, 0xff, 0x8e, 0xff, 0x86, 0xff, 0x92, 0xff, 0xb4, 0xff,\n  0xd7, 0xff, 0xf7, 0xff, 0x23, 0x00, 0x49, 0x00, 0x69, 0x00, 0x71, 0x00,\n  0x8b, 0x00, 0x81, 0x00, 0x81, 0x00, 0x96, 0x00, 0x7b, 0x00, 0x82, 0x00,\n  0x6a, 0x00, 0x69, 0x00, 0x3d, 0x00, 0x2d, 0x00, 0x13, 0x00, 0xf7, 0xff,\n  0xe7, 0xff, 0xdb, 0xff, 0xe2, 0xff, 0xd4, 0xff, 0xe0, 0xff, 0xe1, 0xff,\n  0xee, 0xff, 0xeb, 0xff, 0xfb, 0xff, 0xfb, 0xff, 0x05, 0x00, 0xf6, 0xff,\n  0xf6, 0xff, 0xd7, 0xff, 0xc4, 0xff, 0xbe, 0xff, 0xb7, 0xff, 0xb5, 0xff,\n  0xac, 0xff, 0xa7, 0xff, 0x95, 0xff, 0x87, 0xff, 0x75, 0xff, 0x6e, 0xff,\n  0x6e, 0xff, 0x6c, 0xff, 0x6c, 0xff, 0x76, 0xff, 0x86, 0xff, 0x90, 0xff,\n  0x9f, 0xff, 0xc2, 0xff, 0xd8, 0xff, 0xec, 0xff, 0xfe, 0xff, 0x1b, 0x00,\n  0x2f, 0x00, 0x29, 0x00, 0x30, 0x00, 0x25, 0x00, 0x35, 0x00, 0x37, 0x00,\n  0x30, 0x00, 0x37, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x07, 0x00, 0x0f, 0x00,\n  0xfb, 0xff, 0xe2, 0xff, 0xda, 0xff, 0xd0, 0xff, 0xdd, 0xff, 0xd1, 0xff,\n  0xca, 0xff, 0xca, 0xff, 0xb2, 0xff, 0xa5, 0xff, 0x7f, 0xff, 0x7a, 0xff,\n  0x73, 0xff, 0x78, 0xff, 0x5d, 0xff, 0x6d, 0xff, 0x6e, 0xff, 0x70, 0xff,\n  0x66, 0xff, 0x87, 0xff, 0x86, 0xff, 0xa0, 0xff, 0x9a, 0xff, 0xbc, 0xff,\n  0xbc, 0xff, 0xcf, 0xff, 0xcc, 0xff, 0xd3, 0xff, 0xe1, 0xff, 0xe7, 0xff,\n  0xe7, 0xff, 0xf1, 0xff, 0xea, 0xff, 0xe5, 0xff, 0xd4, 0xff, 0xcc, 0xff,\n  0xb7, 0xff, 0xad, 0xff, 0xbb, 0xff, 0xb7, 0xff, 0xb3, 0xff, 0xd0, 0xff,\n  0xcd, 0xff, 0xde, 0xff, 0xc6, 0xff, 0xe5, 0xff, 0xea, 0xff, 0xf9, 0xff,\n  0x00, 0x00, 0x2c, 0x00, 0x25, 0x00, 0x53, 0x00, 0x5b, 0x00, 0x81, 0x00,\n  0x8a, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0x92, 0x00, 0x77, 0x00, 0x69, 0x00,\n  0x4e, 0x00, 0x3c, 0x00, 0x19, 0x00, 0x08, 0x00, 0xe0, 0xff, 0xc0, 0xff,\n  0x9c, 0xff, 0x8d, 0xff, 0x6b, 0xff, 0x62, 0xff, 0x52, 0xff, 0x57, 0xff,\n  0x4d, 0xff, 0x3e, 0xff, 0x4a, 0xff, 0x47, 0xff, 0x66, 0xff, 0x50, 0xff,\n  0x7a, 0xff, 0x76, 0xff, 0x94, 0xff, 0x96, 0xff, 0x9a, 0xff, 0xba, 0xff,\n  0xc3, 0xff, 0xd4, 0xff, 0xe5, 0xff, 0xf7, 0xff, 0xfe, 0xff, 0x10, 0x00,\n  0x10, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x1a, 0x00, 0x29, 0x00, 0x1b, 0x00,\n  0x11, 0x00, 0x09, 0x00, 0xf0, 0xff, 0xdc, 0xff, 0xd6, 0xff, 0xc3, 0xff,\n  0xad, 0xff, 0xbf, 0xff, 0xbb, 0xff, 0xd2, 0xff, 0xc7, 0xff, 0xd0, 0xff,\n  0xd0, 0xff, 0xcc, 0xff, 0xd3, 0xff, 0xe6, 0xff, 0xdd, 0xff, 0xf1, 0xff,\n  0xed, 0xff, 0xe0, 0xff, 0xe6, 0xff, 0xde, 0xff, 0xdc, 0xff, 0xcc, 0xff,\n  0xc5, 0xff, 0xad, 0xff, 0x9e, 0xff, 0xa7, 0xff, 0x94, 0xff, 0xac, 0xff,\n  0xac, 0xff, 0xc0, 0xff, 0xd8, 0xff, 0xdf, 0xff, 0xec, 0xff, 0xfe, 0xff,\n  0x0f, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x1a, 0x00, 0x0d, 0x00,\n  0x07, 0x00, 0x1a, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x0a, 0x00, 0x08, 0x00,\n  0xf1, 0xff, 0xd5, 0xff, 0xcc, 0xff, 0xc7, 0xff, 0xbc, 0xff, 0xc8, 0xff,\n  0xd4, 0xff, 0xe9, 0xff, 0xf3, 0xff, 0xf6, 0xff, 0x02, 0x00, 0x0c, 0x00,\n  0xfe, 0xff, 0x0e, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x22, 0x00, 0x1d, 0x00,\n  0x2c, 0x00, 0x21, 0x00, 0x27, 0x00, 0x16, 0x00, 0x18, 0x00, 0x18, 0x00,\n  0x17, 0x00, 0x13, 0x00, 0x0b, 0x00, 0xf8, 0xff, 0xed, 0xff, 0xd9, 0xff,\n  0xc6, 0xff, 0xca, 0xff, 0xac, 0xff, 0xb5, 0xff, 0x97, 0xff, 0x85, 0xff,\n  0x81, 0xff, 0x69, 0xff, 0x52, 0xff, 0x46, 0xff, 0x35, 0xff, 0x3c, 0xff,\n  0x3e, 0xff, 0x4e, 0xff, 0x53, 0xff, 0x4d, 0xff, 0x5c, 0xff, 0x5a, 0xff,\n  0x66, 0xff, 0x6c, 0xff, 0x7b, 0xff, 0x89, 0xff, 0x9e, 0xff, 0xaa, 0xff,\n  0xbf, 0xff, 0xea, 0xff, 0xfe, 0xff, 0x2a, 0x00, 0x46, 0x00, 0x6f, 0x00,\n  0xa2, 0x00, 0xc8, 0x00, 0xfb, 0x00, 0x25, 0x01, 0x49, 0x01, 0x68, 0x01,\n  0x6b, 0x01, 0x63, 0x01, 0x52, 0x01, 0x2a, 0x01, 0xfc, 0x00, 0xd1, 0x00,\n  0x97, 0x00, 0x66, 0x00, 0x29, 0x00, 0xf0, 0xff, 0xbd, 0xff, 0x87, 0xff,\n  0x58, 0xff, 0x39, 0xff, 0x17, 0xff, 0x08, 0xff, 0xf4, 0xfe, 0xe4, 0xfe,\n  0xd7, 0xfe, 0xd2, 0xfe, 0xcf, 0xfe, 0xe1, 0xfe, 0xe0, 0xfe, 0xf2, 0xfe,\n  0xf7, 0xfe, 0x03, 0xff, 0x12, 0xff, 0x1c, 0xff, 0x41, 0xff, 0x5c, 0xff,\n  0x77, 0xff, 0x93, 0xff, 0xa5, 0xff, 0xb4, 0xff, 0xc9, 0xff, 0xd4, 0xff,\n  0xdc, 0xff, 0xde, 0xff, 0xfe, 0xff, 0x02, 0x00, 0x23, 0x00, 0x2b, 0x00,\n  0x30, 0x00, 0x39, 0x00, 0x3e, 0x00, 0x37, 0x00, 0x35, 0x00, 0x43, 0x00,\n  0x36, 0x00, 0x4c, 0x00, 0x44, 0x00, 0x57, 0x00, 0x61, 0x00, 0x6a, 0x00,\n  0x7c, 0x00, 0x87, 0x00, 0x89, 0x00, 0x8e, 0x00, 0x80, 0x00, 0x68, 0x00,\n  0x5d, 0x00, 0x37, 0x00, 0x10, 0x00, 0xea, 0xff, 0xc5, 0xff, 0xa5, 0xff,\n  0x83, 0xff, 0x6c, 0xff, 0x70, 0xff, 0x5c, 0xff, 0x5e, 0xff, 0x53, 0xff,\n  0x58, 0xff, 0x4a, 0xff, 0x4a, 0xff, 0x4e, 0xff, 0x3a, 0xff, 0x3a, 0xff,\n  0x34, 0xff, 0x29, 0xff, 0x3b, 0xff, 0x3e, 0xff, 0x5c, 0xff, 0x79, 0xff,\n  0x86, 0xff, 0xa9, 0xff, 0xc9, 0xff, 0xcf, 0xff, 0xe6, 0xff, 0xff, 0xff,\n  0xfe, 0xff, 0x10, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x28, 0x00, 0x36, 0x00,\n  0x4a, 0x00, 0x40, 0x00, 0x58, 0x00, 0x53, 0x00, 0x72, 0x00, 0x62, 0x00,\n  0x6e, 0x00, 0x7b, 0x00, 0x86, 0x00, 0x7d, 0x00, 0x7c, 0x00, 0x71, 0x00,\n  0x5b, 0x00, 0x58, 0x00, 0x1b, 0x00, 0x22, 0x00, 0xfe, 0xff, 0x0a, 0x00,\n  0xed, 0xff, 0x0a, 0x00, 0xe5, 0xff, 0xea, 0xff, 0xd8, 0xff, 0xcd, 0xff,\n  0xb7, 0xff, 0xa9, 0xff, 0xa8, 0xff, 0x90, 0xff, 0x8b, 0xff, 0x67, 0xff,\n  0x67, 0xff, 0x4d, 0xff, 0x34, 0xff, 0x38, 0xff, 0x49, 0xff, 0x4a, 0xff,\n  0x63, 0xff, 0x7b, 0xff, 0x8a, 0xff, 0xa1, 0xff, 0x90, 0xff, 0xa6, 0xff,\n  0xb0, 0xff, 0xab, 0xff, 0xb8, 0xff, 0xb4, 0xff, 0xb0, 0xff, 0xb9, 0xff,\n  0xd3, 0xff, 0xb9, 0xff, 0xce, 0xff, 0xc7, 0xff, 0xd1, 0xff, 0xd0, 0xff,\n  0xca, 0xff, 0xea, 0xff, 0x13, 0x00, 0x32, 0x00, 0x49, 0x00, 0x62, 0x00,\n  0x63, 0x00, 0x6d, 0x00, 0x52, 0x00, 0x3b, 0x00, 0x3f, 0x00, 0x17, 0x00,\n  0x21, 0x00, 0x04, 0x00, 0xf2, 0xff, 0xe1, 0xff, 0xc9, 0xff, 0xcc, 0xff,\n  0xb1, 0xff, 0xb5, 0xff, 0xd1, 0xff, 0xc8, 0xff, 0xda, 0xff, 0xea, 0xff,\n  0xf6, 0xff, 0xf6, 0xff, 0xfa, 0xff, 0xf5, 0xff, 0x10, 0x00, 0xff, 0xff,\n  0x19, 0x00, 0x2c, 0x00, 0x30, 0x00, 0x4b, 0x00, 0x54, 0x00, 0x62, 0x00,\n  0x53, 0x00, 0x5c, 0x00, 0x4c, 0x00, 0x39, 0x00, 0x30, 0x00, 0x20, 0x00,\n  0xff, 0xff, 0xf5, 0xff, 0xe3, 0xff, 0xbf, 0xff, 0x9c, 0xff, 0x85, 0xff,\n  0x66, 0xff, 0x31, 0xff, 0x23, 0xff, 0x0b, 0xff, 0xf8, 0xfe, 0xf4, 0xfe,\n  0xdd, 0xfe, 0xe8, 0xfe, 0xd9, 0xfe, 0xdb, 0xfe, 0xe6, 0xfe, 0xf5, 0xfe,\n  0x05, 0xff, 0x2f, 0xff, 0x47, 0xff, 0x59, 0xff, 0x7f, 0xff, 0x7e, 0xff,\n  0x8e, 0xff, 0xa0, 0xff, 0xbe, 0xff, 0xc2, 0xff, 0xdc, 0xff, 0xfa, 0xff,\n  0x1f, 0x00, 0x3f, 0x00, 0x59, 0x00, 0x8c, 0x00, 0xbe, 0x00, 0xdd, 0x00,\n  0xed, 0x00, 0x13, 0x01, 0x10, 0x01, 0x04, 0x01, 0xf3, 0x00, 0xd8, 0x00,\n  0xa2, 0x00, 0x8d, 0x00, 0x60, 0x00, 0x3e, 0x00, 0x0b, 0x00, 0xf9, 0xff,\n  0xd3, 0xff, 0xb7, 0xff, 0x9a, 0xff, 0x96, 0xff, 0x84, 0xff, 0x7d, 0xff,\n  0x80, 0xff, 0x8b, 0xff, 0xa4, 0xff, 0xb3, 0xff, 0xcd, 0xff, 0xd7, 0xff,\n  0xe6, 0xff, 0xe5, 0xff, 0xee, 0xff, 0xef, 0xff, 0xee, 0xff, 0xec, 0xff,\n  0xe2, 0xff, 0xd3, 0xff, 0xd1, 0xff, 0xb7, 0xff, 0xc1, 0xff, 0xb1, 0xff,\n  0xb6, 0xff, 0xad, 0xff, 0xa4, 0xff, 0xa8, 0xff, 0x9c, 0xff, 0x98, 0xff,\n  0xa5, 0xff, 0x8e, 0xff, 0x93, 0xff, 0xa1, 0xff, 0x9c, 0xff, 0xa1, 0xff,\n  0xae, 0xff, 0xac, 0xff, 0xa4, 0xff, 0xa9, 0xff, 0xbb, 0xff, 0xbc, 0xff,\n  0xd0, 0xff, 0xea, 0xff, 0xdc, 0xff, 0xef, 0xff, 0xf0, 0xff, 0xf2, 0xff,\n  0x0d, 0x00, 0x0f, 0x00, 0x14, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x0e, 0x00,\n  0xde, 0xff, 0xf2, 0xff, 0xec, 0xff, 0xe0, 0xff, 0xec, 0xff, 0xed, 0xff,\n  0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0xfe, 0xff, 0xe9, 0xff,\n  0xe7, 0xff, 0xdd, 0xff, 0xd5, 0xff, 0xd0, 0xff, 0xd0, 0xff, 0xb6, 0xff,\n  0xae, 0xff, 0xa7, 0xff, 0x92, 0xff, 0x98, 0xff, 0x99, 0xff, 0x93, 0xff,\n  0x9a, 0xff, 0xa1, 0xff, 0x92, 0xff, 0xa1, 0xff, 0xae, 0xff, 0xb6, 0xff,\n  0xd0, 0xff, 0xe9, 0xff, 0x03, 0x00, 0x21, 0x00, 0x28, 0x00, 0x40, 0x00,\n  0x53, 0x00, 0x59, 0x00, 0x4a, 0x00, 0x49, 0x00, 0x47, 0x00, 0x20, 0x00,\n  0x22, 0x00, 0x07, 0x00, 0xfa, 0xff, 0xe1, 0xff, 0xe2, 0xff, 0xcc, 0xff,\n  0xc4, 0xff, 0xc2, 0xff, 0xc3, 0xff, 0xbf, 0xff, 0xc7, 0xff, 0xd3, 0xff,\n  0xd0, 0xff, 0xcf, 0xff, 0xdb, 0xff, 0xcb, 0xff, 0xbb, 0xff, 0xbc, 0xff,\n  0xac, 0xff, 0xb1, 0xff, 0x9a, 0xff, 0x91, 0xff, 0x92, 0xff, 0x96, 0xff,\n  0x91, 0xff, 0x99, 0xff, 0xbe, 0xff, 0xbb, 0xff, 0xc6, 0xff, 0xd4, 0xff,\n  0xe3, 0xff, 0xed, 0xff, 0xfe, 0xff, 0x00, 0x00, 0x09, 0x00, 0x08, 0x00,\n  0x16, 0x00, 0x1e, 0x00, 0x08, 0x00, 0x17, 0x00, 0x15, 0x00, 0x0c, 0x00,\n  0x0f, 0x00, 0x05, 0x00, 0x11, 0x00, 0x01, 0x00, 0x08, 0x00, 0x1b, 0x00,\n  0x29, 0x00, 0x49, 0x00, 0x60, 0x00, 0x68, 0x00, 0x68, 0x00, 0x6c, 0x00,\n  0x4c, 0x00, 0x43, 0x00, 0x39, 0x00, 0x28, 0x00, 0x14, 0x00, 0x0d, 0x00,\n  0xee, 0xff, 0xf4, 0xff, 0xde, 0xff, 0xdb, 0xff, 0xd3, 0xff, 0xd2, 0xff,\n  0xbf, 0xff, 0x95, 0xff, 0x73, 0xff, 0x5a, 0xff, 0x32, 0xff, 0x16, 0xff,\n  0x0f, 0xff, 0x07, 0xff, 0x0b, 0xff, 0x06, 0xff, 0x0b, 0xff, 0x16, 0xff,\n  0x25, 0xff, 0x30, 0xff, 0x3b, 0xff, 0x47, 0xff, 0x5c, 0xff, 0x5f, 0xff,\n  0x6a, 0xff, 0x8d, 0xff, 0x97, 0xff, 0xaf, 0xff, 0xc1, 0xff, 0xde, 0xff,\n  0xee, 0xff, 0xfe, 0xff, 0x0f, 0x00, 0x13, 0x00, 0x16, 0x00, 0x25, 0x00,\n  0x2a, 0x00, 0x36, 0x00, 0x44, 0x00, 0x49, 0x00, 0x52, 0x00, 0x4f, 0x00,\n  0x5c, 0x00, 0x63, 0x00, 0x71, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00,\n  0x56, 0x00, 0x53, 0x00, 0x4d, 0x00, 0x25, 0x00, 0x28, 0x00, 0x08, 0x00,\n  0xe9, 0xff, 0xd1, 0xff, 0xd4, 0xff, 0xc1, 0xff, 0xb2, 0xff, 0xa5, 0xff,\n  0x93, 0xff, 0x70, 0xff, 0x75, 0xff, 0x54, 0xff, 0x61, 0xff, 0x6d, 0xff,\n  0x6a, 0xff, 0x7a, 0xff, 0x69, 0xff, 0x7a, 0xff, 0x83, 0xff, 0x90, 0xff,\n  0xa0, 0xff, 0xa3, 0xff, 0xbe, 0xff, 0xc5, 0xff, 0xda, 0xff, 0xe6, 0xff,\n  0xff, 0xff, 0x07, 0x00, 0x29, 0x00, 0x19, 0x00, 0x1f, 0x00, 0x2d, 0x00,\n  0x0d, 0x00, 0x1f, 0x00, 0x28, 0x00, 0x24, 0x00, 0x36, 0x00, 0x2c, 0x00,\n  0x33, 0x00, 0x31, 0x00, 0x27, 0x00, 0x2a, 0x00, 0x06, 0x00, 0x01, 0x00,\n  0xe3, 0xff, 0xbf, 0xff, 0xa5, 0xff, 0xac, 0xff, 0xa5, 0xff, 0xa3, 0xff,\n  0x93, 0xff, 0x7f, 0xff, 0x64, 0xff, 0x4f, 0xff, 0x39, 0xff, 0x2e, 0xff,\n  0x41, 0xff, 0x45, 0xff, 0x58, 0xff, 0x63, 0xff, 0x84, 0xff, 0x94, 0xff,\n  0xbf, 0xff, 0xc2, 0xff, 0xe7, 0xff, 0xfc, 0xff, 0x11, 0x00, 0x2d, 0x00,\n  0x4d, 0x00, 0x4f, 0x00, 0x58, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x56, 0x00,\n  0x64, 0x00, 0x72, 0x00, 0x71, 0x00, 0x78, 0x00, 0x78, 0x00, 0x87, 0x00,\n  0x7a, 0x00, 0x75, 0x00, 0x7f, 0x00, 0x83, 0x00, 0x82, 0x00, 0x6c, 0x00,\n  0x68, 0x00, 0x3f, 0x00, 0x20, 0x00, 0x03, 0x00, 0xdc, 0xff, 0xc3, 0xff,\n  0xb3, 0xff, 0x8c, 0xff, 0x92, 0xff, 0x81, 0xff, 0x82, 0xff, 0x85, 0xff,\n  0x82, 0xff, 0x8c, 0xff, 0x90, 0xff, 0x87, 0xff, 0xa0, 0xff, 0x8f, 0xff,\n  0xa0, 0xff, 0xad, 0xff, 0xa0, 0xff, 0xa3, 0xff, 0xb4, 0xff, 0xa5, 0xff,\n  0x9d, 0xff, 0x99, 0xff, 0x84, 0xff, 0x6e, 0xff, 0x6a, 0xff, 0x63, 0xff,\n  0x69, 0xff, 0x72, 0xff, 0x6b, 0xff, 0x74, 0xff, 0x73, 0xff, 0x78, 0xff,\n  0x84, 0xff, 0x9b, 0xff, 0x99, 0xff, 0xb2, 0xff, 0xa6, 0xff, 0xa7, 0xff,\n  0xae, 0xff, 0xa4, 0xff, 0xbf, 0xff, 0xae, 0xff, 0xca, 0xff, 0xdb, 0xff,\n  0xfe, 0xff, 0x0e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x42, 0x00,\n  0x32, 0x00, 0x30, 0x00, 0x31, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x59, 0x00,\n  0x4f, 0x00, 0x6a, 0x00, 0x68, 0x00, 0x6d, 0x00, 0x7d, 0x00, 0x76, 0x00,\n  0x7c, 0x00, 0x92, 0x00, 0x77, 0x00, 0x81, 0x00, 0x77, 0x00, 0x5e, 0x00,\n  0x46, 0x00, 0x23, 0x00, 0x12, 0x00, 0xf0, 0xff, 0xde, 0xff, 0xc8, 0xff,\n  0xa7, 0xff, 0x8a, 0xff, 0x7b, 0xff, 0x65, 0xff, 0x5f, 0xff, 0x5a, 0xff,\n  0x52, 0xff, 0x4d, 0xff, 0x4f, 0xff, 0x46, 0xff, 0x4c, 0xff, 0x5b, 0xff,\n  0x56, 0xff, 0x55, 0xff, 0x60, 0xff, 0x5c, 0xff, 0x6e, 0xff, 0x85, 0xff,\n  0x96, 0xff, 0xb2, 0xff, 0xcc, 0xff, 0xd8, 0xff, 0xeb, 0xff, 0xdb, 0xff,\n  0xf9, 0xff, 0xed, 0xff, 0xef, 0xff, 0x00, 0x00, 0x14, 0x00, 0x1c, 0x00,\n  0x1f, 0x00, 0x25, 0x00, 0x1c, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x09, 0x00,\n  0x0c, 0x00, 0x20, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x33, 0x00, 0x43, 0x00,\n  0x4a, 0x00, 0x52, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x3d, 0x00, 0x10, 0x00,\n  0xfd, 0xff, 0xd1, 0xff, 0xb0, 0xff, 0x96, 0xff, 0x9b, 0xff, 0x8e, 0xff,\n  0x96, 0xff, 0x83, 0xff, 0x60, 0xff, 0x5e, 0xff, 0x58, 0xff, 0x46, 0xff,\n  0x4c, 0xff, 0x4d, 0xff, 0x4d, 0xff, 0x5e, 0xff, 0x55, 0xff, 0x69, 0xff,\n  0x86, 0xff, 0x9c, 0xff, 0xa4, 0xff, 0xb4, 0xff, 0xc5, 0xff, 0xd4, 0xff,\n  0xea, 0xff, 0xdd, 0xff, 0x02, 0x00, 0x02, 0x00, 0x22, 0x00, 0x24, 0x00,\n  0x53, 0x00, 0x5e, 0x00, 0x75, 0x00, 0x88, 0x00, 0x91, 0x00, 0x90, 0x00,\n  0xa2, 0x00, 0x94, 0x00, 0x7f, 0x00, 0x8c, 0x00, 0x62, 0x00, 0x51, 0x00,\n  0x37, 0x00, 0x27, 0x00, 0xfe, 0xff, 0xee, 0xff, 0xd8, 0xff, 0xbe, 0xff,\n  0xaf, 0xff, 0xa2, 0xff, 0x88, 0xff, 0x87, 0xff, 0x71, 0xff, 0x75, 0xff,\n  0x76, 0xff, 0x81, 0xff, 0x83, 0xff, 0x96, 0xff, 0xab, 0xff, 0xae, 0xff,\n  0xab, 0xff, 0xbf, 0xff, 0xcc, 0xff, 0xbe, 0xff, 0xc2, 0xff, 0xca, 0xff,\n  0xc1, 0xff, 0xb8, 0xff, 0xbd, 0xff, 0xb9, 0xff, 0xb7, 0xff, 0x9f, 0xff,\n  0xa5, 0xff, 0x7f, 0xff, 0x79, 0xff, 0x74, 0xff, 0x64, 0xff, 0x6c, 0xff,\n  0x6a, 0xff, 0x67, 0xff, 0x7e, 0xff, 0x7c, 0xff, 0x83, 0xff, 0x95, 0xff,\n  0xa9, 0xff, 0xb1, 0xff, 0xbb, 0xff, 0xc7, 0xff, 0xd6, 0xff, 0xe3, 0xff,\n  0xf2, 0xff, 0xfe, 0xff, 0x26, 0x00, 0x40, 0x00, 0x6b, 0x00, 0x96, 0x00,\n  0xb5, 0x00, 0xd6, 0x00, 0xd8, 0x00, 0xe3, 0x00, 0xd2, 0x00, 0xc1, 0x00,\n  0xb1, 0x00, 0x8f, 0x00, 0x8a, 0x00, 0x67, 0x00, 0x59, 0x00, 0x3c, 0x00,\n  0x31, 0x00, 0x21, 0x00, 0xf2, 0xff, 0xe4, 0xff, 0xbd, 0xff, 0xa8, 0xff,\n  0x93, 0xff, 0x84, 0xff, 0x85, 0xff, 0x8a, 0xff, 0x81, 0xff, 0x8a, 0xff,\n  0x8d, 0xff, 0x8c, 0xff, 0x90, 0xff, 0x9e, 0xff, 0x96, 0xff, 0xab, 0xff,\n  0x96, 0xff, 0xa2, 0xff, 0xa0, 0xff, 0x8e, 0xff, 0x8c, 0xff, 0x85, 0xff,\n  0x7d, 0xff, 0x67, 0xff, 0x82, 0xff, 0x53, 0xff, 0x61, 0xff, 0x55, 0xff,\n  0x5a, 0xff, 0x58, 0xff, 0x66, 0xff, 0x7a, 0xff, 0x84, 0xff, 0x9e, 0xff,\n  0xa0, 0xff, 0xbb, 0xff, 0xa8, 0xff, 0xb0, 0xff, 0xbd, 0xff, 0xad, 0xff,\n  0xba, 0xff, 0xc2, 0xff, 0xbc, 0xff, 0xb6, 0xff, 0xc1, 0xff, 0xd1, 0xff,\n  0xcb, 0xff, 0xd9, 0xff, 0xdf, 0xff, 0xe1, 0xff, 0xdb, 0xff, 0xdb, 0xff,\n  0xe6, 0xff, 0xf3, 0xff, 0xf9, 0xff, 0x1b, 0x00, 0x2a, 0x00, 0x48, 0x00,\n  0x4f, 0x00, 0x62, 0x00, 0x58, 0x00, 0x53, 0x00, 0x4c, 0x00, 0x43, 0x00,\n  0x2d, 0x00, 0x1b, 0x00, 0xf7, 0xff, 0xee, 0xff, 0xe2, 0xff, 0xc8, 0xff,\n  0xc5, 0xff, 0xab, 0xff, 0xa9, 0xff, 0x98, 0xff, 0x8e, 0xff, 0x95, 0xff,\n  0xac, 0xff, 0x9d, 0xff, 0xbe, 0xff, 0xc3, 0xff, 0xda, 0xff, 0xf2, 0xff,\n  0x09, 0x00, 0x0d, 0x00, 0x13, 0x00, 0x05, 0x00, 0x08, 0x00, 0xfc, 0xff,\n  0x04, 0x00, 0xe2, 0xff, 0xf9, 0xff, 0xfa, 0xff, 0xfb, 0xff, 0x17, 0x00,\n  0x18, 0x00, 0x39, 0x00, 0x33, 0x00, 0x47, 0x00, 0x4c, 0x00, 0x5a, 0x00,\n  0x4a, 0x00, 0x4a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x15, 0x00, 0x0b, 0x00,\n  0x03, 0x00, 0xdf, 0xff, 0xe8, 0xff, 0xbd, 0xff, 0xbe, 0xff, 0xc0, 0xff,\n  0xc3, 0xff, 0xbb, 0xff, 0xb9, 0xff, 0xae, 0xff, 0xa7, 0xff, 0x91, 0xff,\n  0x94, 0xff, 0x90, 0xff, 0x95, 0xff, 0x98, 0xff, 0x89, 0xff, 0x8a, 0xff,\n  0x72, 0xff, 0x74, 0xff, 0x68, 0xff, 0x5b, 0xff, 0x79, 0xff, 0x7b, 0xff,\n  0x9b, 0xff, 0xae, 0xff, 0xc5, 0xff, 0xd7, 0xff, 0xf9, 0xff, 0x0a, 0x00,\n  0x0e, 0x00, 0x37, 0x00, 0x4d, 0x00, 0x5b, 0x00, 0x71, 0x00, 0x7b, 0x00,\n  0x77, 0x00, 0x77, 0x00, 0x83, 0x00, 0x81, 0x00, 0x84, 0x00, 0x96, 0x00,\n  0x8f, 0x00, 0x91, 0x00, 0x92, 0x00, 0x90, 0x00, 0x96, 0x00, 0x99, 0x00,\n  0xa0, 0x00, 0xa5, 0x00, 0xb2, 0x00, 0xa9, 0x00, 0xb8, 0x00, 0x9f, 0x00,\n  0x9d, 0x00, 0x83, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x45, 0x00, 0x0f, 0x00,\n  0xf0, 0xff, 0xbe, 0xff, 0x86, 0xff, 0x56, 0xff, 0x47, 0xff, 0x19, 0xff,\n  0xfe, 0xfe, 0xe4, 0xfe, 0xc9, 0xfe, 0x9f, 0xfe, 0x8a, 0xfe, 0x7b, 0xfe,\n  0x7a, 0xfe, 0x6e, 0xfe, 0x6c, 0xfe, 0x6c, 0xfe, 0x59, 0xfe, 0x5e, 0xfe,\n  0x70, 0xfe, 0x81, 0xfe, 0x95, 0xfe, 0xa9, 0xfe, 0xb6, 0xfe, 0xc6, 0xfe,\n  0xdd, 0xfe, 0x01, 0xff, 0x17, 0xff, 0x40, 0xff, 0x5b, 0xff, 0x7b, 0xff,\n  0x97, 0xff, 0xaf, 0xff, 0xdf, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x44, 0x00,\n  0x5e, 0x00, 0x92, 0x00, 0xa7, 0x00, 0xc6, 0x00, 0xe6, 0x00, 0xf9, 0x00,\n  0x1f, 0x01, 0x2f, 0x01, 0x46, 0x01, 0x45, 0x01, 0x4a, 0x01, 0x2e, 0x01,\n  0x0f, 0x01, 0xff, 0x00, 0xd9, 0x00, 0xab, 0x00, 0x98, 0x00, 0x61, 0x00,\n  0x37, 0x00, 0x19, 0x00, 0x04, 0x00, 0xd5, 0xff, 0xc8, 0xff, 0xaf, 0xff,\n  0xa0, 0xff, 0x97, 0xff, 0x88, 0xff, 0x98, 0xff, 0xa1, 0xff, 0xa8, 0xff,\n  0xc4, 0xff, 0xc5, 0xff, 0xd9, 0xff, 0xf1, 0xff, 0xf1, 0xff, 0x07, 0x00,\n  0x23, 0x00, 0x31, 0x00, 0x45, 0x00, 0x3d, 0x00, 0x44, 0x00, 0x33, 0x00,\n  0x30, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0e, 0x00, 0xee, 0xff, 0xe1, 0xff,\n  0xc9, 0xff, 0xd2, 0xff, 0xb8, 0xff, 0xb3, 0xff, 0xa8, 0xff, 0x8e, 0xff,\n  0x7e, 0xff, 0x4e, 0xff, 0x50, 0xff, 0x2a, 0xff, 0x2b, 0xff, 0x1f, 0xff,\n  0x17, 0xff, 0x30, 0xff, 0x2d, 0xff, 0x53, 0xff, 0x5e, 0xff, 0x80, 0xff,\n  0x9d, 0xff, 0xc8, 0xff, 0xd3, 0xff, 0xed, 0xff, 0x03, 0x00, 0x08, 0x00,\n  0xfe, 0xff, 0x19, 0x00, 0x07, 0x00, 0x19, 0x00, 0xf5, 0xff, 0x05, 0x00,\n  0xe2, 0xff, 0xda, 0xff, 0xde, 0xff, 0xcf, 0xff, 0xe4, 0xff, 0xe7, 0xff,\n  0xf8, 0xff, 0xf5, 0xff, 0xed, 0xff, 0xfa, 0xff, 0xe7, 0xff, 0xf8, 0xff,\n  0xfb, 0xff, 0xf7, 0xff, 0xfd, 0xff, 0x10, 0x00, 0x14, 0x00, 0x17, 0x00,\n  0x26, 0x00, 0x23, 0x00, 0x2a, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x14, 0x00,\n  0x16, 0x00, 0xf7, 0xff, 0x01, 0x00, 0xec, 0xff, 0xd9, 0xff, 0xd1, 0xff,\n  0xbf, 0xff, 0xba, 0xff, 0xa7, 0xff, 0x95, 0xff, 0x91, 0xff, 0x80, 0xff,\n  0x7f, 0xff, 0x6c, 0xff, 0x68, 0xff, 0x63, 0xff, 0x68, 0xff, 0x4e, 0xff,\n  0x46, 0xff, 0x48, 0xff, 0x46, 0xff, 0x39, 0xff, 0x53, 0xff, 0x57, 0xff,\n  0x6d, 0xff, 0x7b, 0xff, 0x80, 0xff, 0x90, 0xff, 0x8d, 0xff, 0x98, 0xff,\n  0xa1, 0xff, 0xa8, 0xff, 0xc3, 0xff, 0xe0, 0xff, 0x00, 0x00, 0x16, 0x00,\n  0x28, 0x00, 0x40, 0x00, 0x40, 0x00, 0x3d, 0x00, 0x32, 0x00, 0x24, 0x00,\n  0x11, 0x00, 0x09, 0x00, 0x0e, 0x00, 0xf5, 0xff, 0x0c, 0x00, 0xfb, 0xff,\n  0xec, 0xff, 0xec, 0xff, 0xde, 0xff, 0xcb, 0xff, 0xdd, 0xff, 0xdc, 0xff,\n  0xe4, 0xff, 0xcf, 0xff, 0xd2, 0xff, 0xd6, 0xff, 0xcb, 0xff, 0xc7, 0xff,\n  0xc9, 0xff, 0xd2, 0xff, 0xe2, 0xff, 0xf7, 0xff, 0xf8, 0xff, 0x08, 0x00,\n  0x17, 0x00, 0x01, 0x00, 0x06, 0x00, 0xf6, 0xff, 0xef, 0xff, 0xdf, 0xff,\n  0xf0, 0xff, 0xe7, 0xff, 0x03, 0x00, 0xff, 0xff, 0x23, 0x00, 0x22, 0x00,\n  0x3b, 0x00, 0x3b, 0x00, 0x48, 0x00, 0x4f, 0x00, 0x5c, 0x00, 0x53, 0x00,\n  0x61, 0x00, 0x58, 0x00, 0x51, 0x00, 0x4c, 0x00, 0x22, 0x00, 0x1e, 0x00,\n  0xf2, 0xff, 0xec, 0xff, 0xc5, 0xff, 0xc1, 0xff, 0x9b, 0xff, 0x9a, 0xff,\n  0x7e, 0xff, 0x82, 0xff, 0x7c, 0xff, 0x8a, 0xff, 0x96, 0xff, 0x98, 0xff,\n  0x96, 0xff, 0x92, 0xff, 0x82, 0xff, 0x79, 0xff, 0x6a, 0xff, 0x55, 0xff,\n  0x5f, 0xff, 0x58, 0xff, 0x60, 0xff, 0x6f, 0xff, 0x77, 0xff, 0x91, 0xff,\n  0x92, 0xff, 0xb4, 0xff, 0xc6, 0xff, 0xd3, 0xff, 0xf4, 0xff, 0x1f, 0x00,\n  0x37, 0x00, 0x4b, 0x00, 0x61, 0x00, 0x6a, 0x00, 0x74, 0x00, 0x68, 0x00,\n  0x6a, 0x00, 0x73, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x60, 0x00, 0x40, 0x00,\n  0x55, 0x00, 0x3a, 0x00, 0x50, 0x00, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00,\n  0x46, 0x00, 0x31, 0x00, 0x1e, 0x00, 0x08, 0x00, 0xe0, 0xff, 0xcc, 0xff,\n  0xb8, 0xff, 0x9f, 0xff, 0x93, 0xff, 0x97, 0xff, 0x95, 0xff, 0x95, 0xff,\n  0x96, 0xff, 0xa3, 0xff, 0x9d, 0xff, 0x92, 0xff, 0xa0, 0xff, 0x88, 0xff,\n  0x89, 0xff, 0x6f, 0xff, 0x75, 0xff, 0x55, 0xff, 0x64, 0xff, 0x53, 0xff,\n  0x5e, 0xff, 0x56, 0xff, 0x5a, 0xff, 0x62, 0xff, 0x46, 0xff, 0x52, 0xff,\n  0x69, 0xff, 0x5c, 0xff, 0x79, 0xff, 0x8b, 0xff, 0x90, 0xff, 0x9f, 0xff,\n  0xa8, 0xff, 0xb1, 0xff, 0xca, 0xff, 0xdb, 0xff, 0xe7, 0xff, 0xf9, 0xff,\n  0xe4, 0xff, 0xfe, 0xff, 0xeb, 0xff, 0xf0, 0xff, 0xf0, 0xff, 0xf3, 0xff,\n  0x09, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x1c, 0x00, 0x2d, 0x00, 0x22, 0x00,\n  0x32, 0x00, 0x2f, 0x00, 0x35, 0x00, 0x46, 0x00, 0x47, 0x00, 0x53, 0x00,\n  0x48, 0x00, 0x57, 0x00, 0x41, 0x00, 0x4e, 0x00, 0x3f, 0x00, 0x45, 0x00,\n  0x4d, 0x00, 0x59, 0x00, 0x5c, 0x00, 0x60, 0x00, 0x6d, 0x00, 0x69, 0x00,\n  0x63, 0x00, 0x55, 0x00, 0x44, 0x00, 0x3b, 0x00, 0x0b, 0x00, 0xf4, 0xff,\n  0xc7, 0xff, 0x9b, 0xff, 0x7c, 0xff, 0x5d, 0xff, 0x45, 0xff, 0x2e, 0xff,\n  0x20, 0xff, 0x06, 0xff, 0xfb, 0xfe, 0xf3, 0xfe, 0xd9, 0xfe, 0xdf, 0xfe,\n  0xde, 0xfe, 0xe3, 0xfe, 0xdf, 0xfe, 0xe2, 0xfe, 0xfe, 0xfe, 0x18, 0xff,\n  0x2e, 0xff, 0x47, 0xff, 0x5f, 0xff, 0x76, 0xff, 0x96, 0xff, 0x9e, 0xff,\n  0xbb, 0xff, 0xe4, 0xff, 0x02, 0x00, 0x18, 0x00, 0x26, 0x00, 0x47, 0x00,\n  0x52, 0x00, 0x64, 0x00, 0x73, 0x00, 0x94, 0x00, 0x96, 0x00, 0xa1, 0x00,\n  0x96, 0x00, 0x96, 0x00, 0x8b, 0x00, 0x8a, 0x00, 0x6c, 0x00, 0x77, 0x00,\n  0x5b, 0x00, 0x54, 0x00, 0x3a, 0x00, 0x19, 0x00, 0x18, 0x00, 0xff, 0xff,\n  0x01, 0x00, 0xf8, 0xff, 0xf6, 0xff, 0xf8, 0xff, 0xeb, 0xff, 0xe6, 0xff,\n  0xe5, 0xff, 0xd7, 0xff, 0xe9, 0xff, 0xf6, 0xff, 0xf4, 0xff, 0xec, 0xff,\n  0xf3, 0xff, 0xd0, 0xff, 0xc0, 0xff, 0xb0, 0xff, 0x95, 0xff, 0x89, 0xff,\n  0x88, 0xff, 0x6c, 0xff, 0x70, 0xff, 0x68, 0xff, 0x6b, 0xff, 0x75, 0xff,\n  0x91, 0xff, 0x9d, 0xff, 0xb1, 0xff, 0xad, 0xff, 0xaf, 0xff, 0xb9, 0xff,\n  0x9d, 0xff, 0x9f, 0xff, 0xa0, 0xff, 0x9e, 0xff, 0xa2, 0xff, 0xa4, 0xff,\n  0xad, 0xff, 0x9c, 0xff, 0xa3, 0xff, 0xaa, 0xff, 0xb5, 0xff, 0xa4, 0xff,\n  0xc6, 0xff, 0xbd, 0xff, 0xd8, 0xff, 0xd3, 0xff, 0xda, 0xff, 0xeb, 0xff,\n  0xdd, 0xff, 0xf6, 0xff, 0xec, 0xff, 0xfc, 0xff, 0x0a, 0x00, 0x2f, 0x00,\n  0x29, 0x00, 0x4a, 0x00, 0x4f, 0x00, 0x6f, 0x00, 0x78, 0x00, 0x6a, 0x00,\n  0x8a, 0x00, 0x7b, 0x00, 0x76, 0x00, 0x70, 0x00, 0x64, 0x00, 0x38, 0x00,\n  0x2b, 0x00, 0xfd, 0xff, 0xdc, 0xff, 0xc8, 0xff, 0xc1, 0xff, 0xac, 0xff,\n  0x9e, 0xff, 0x96, 0xff, 0x8d, 0xff, 0x87, 0xff, 0x75, 0xff, 0x85, 0xff,\n  0xa1, 0xff, 0xaf, 0xff, 0xbc, 0xff, 0xcd, 0xff, 0xe4, 0xff, 0xe5, 0xff,\n  0xea, 0xff, 0xed, 0xff, 0xe2, 0xff, 0xf6, 0xff, 0xfa, 0xff, 0xe7, 0xff,\n  0xfd, 0xff, 0xdf, 0xff, 0xf3, 0xff, 0xda, 0xff, 0xdf, 0xff, 0xdd, 0xff,\n  0xf0, 0xff, 0xf1, 0xff, 0xf6, 0xff, 0xfa, 0xff, 0x07, 0x00, 0x11, 0x00,\n  0xff, 0xff, 0x13, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x0c, 0x00, 0x09, 0x00,\n  0x02, 0x00, 0xe4, 0xff, 0xcf, 0xff, 0xb2, 0xff, 0xa3, 0xff, 0x8d, 0xff,\n  0x8d, 0xff, 0x7e, 0xff, 0x6e, 0xff, 0x7c, 0xff, 0x79, 0xff, 0x84, 0xff,\n  0x81, 0xff, 0x9f, 0xff, 0x9b, 0xff, 0xad, 0xff, 0xac, 0xff, 0xb7, 0xff,\n  0xc1, 0xff, 0xba, 0xff, 0xbc, 0xff, 0xe0, 0xff, 0xd6, 0xff, 0xe6, 0xff,\n  0xed, 0xff, 0xfe, 0xff, 0xed, 0xff, 0xef, 0xff, 0xe8, 0xff, 0xd4, 0xff,\n  0xc9, 0xff, 0xbc, 0xff, 0xaf, 0xff, 0xb9, 0xff, 0xb3, 0xff, 0xae, 0xff,\n  0xd0, 0xff, 0xcb, 0xff, 0xe2, 0xff, 0xdd, 0xff, 0xea, 0xff, 0xdf, 0xff,\n  0xe7, 0xff, 0xe3, 0xff, 0xd9, 0xff, 0xda, 0xff, 0xdf, 0xff, 0xdc, 0xff,\n  0xdc, 0xff, 0xd8, 0xff, 0xe2, 0xff, 0xe3, 0xff, 0xf5, 0xff, 0xe0, 0xff,\n  0xf3, 0xff, 0xfa, 0xff, 0xf7, 0xff, 0x02, 0x00, 0x10, 0x00, 0x25, 0x00,\n  0x35, 0x00, 0x35, 0x00, 0x5b, 0x00, 0x5e, 0x00, 0x6a, 0x00, 0x7e, 0x00,\n  0x8c, 0x00, 0x92, 0x00, 0x92, 0x00, 0x94, 0x00, 0x78, 0x00, 0x6c, 0x00,\n  0x3c, 0x00, 0x38, 0x00, 0xfe, 0xff, 0xeb, 0xff, 0xc4, 0xff, 0xb5, 0xff,\n  0x95, 0xff, 0x8d, 0xff, 0x8e, 0xff, 0x73, 0xff, 0x6a, 0xff, 0x70, 0xff,\n  0x58, 0xff, 0x53, 0xff, 0x57, 0xff, 0x49, 0xff, 0x57, 0xff, 0x65, 0xff,\n  0x71, 0xff, 0x7f, 0xff, 0x7d, 0xff, 0x97, 0xff, 0x9a, 0xff, 0x95, 0xff,\n  0xb3, 0xff, 0xbe, 0xff, 0xc8, 0xff, 0xdd, 0xff, 0xe0, 0xff, 0xd6, 0xff,\n  0xda, 0xff, 0xdc, 0xff, 0xbc, 0xff, 0xd0, 0xff, 0xbf, 0xff, 0xb1, 0xff,\n  0xa9, 0xff, 0xaa, 0xff, 0xb0, 0xff, 0xb9, 0xff, 0xb9, 0xff, 0xbd, 0xff,\n  0xb1, 0xff, 0xaf, 0xff, 0xad, 0xff, 0xad, 0xff, 0xc2, 0xff, 0xb9, 0xff,\n  0xd4, 0xff, 0xd3, 0xff, 0xd9, 0xff, 0xf4, 0xff, 0x17, 0x00, 0x22, 0x00,\n  0x3b, 0x00, 0x44, 0x00, 0x3c, 0x00, 0x4d, 0x00, 0x3a, 0x00, 0x2f, 0x00,\n  0x39, 0x00, 0x32, 0x00, 0x28, 0x00, 0x19, 0x00, 0x16, 0x00, 0x05, 0x00,\n  0xf6, 0xff, 0xf8, 0xff, 0xe4, 0xff, 0xd5, 0xff, 0xd9, 0xff, 0xe6, 0xff,\n  0xe3, 0xff, 0xed, 0xff, 0xfd, 0xff, 0x08, 0x00, 0x1c, 0x00, 0x28, 0x00,\n  0x42, 0x00, 0x65, 0x00, 0x82, 0x00, 0x92, 0x00, 0xa6, 0x00, 0xb1, 0x00,\n  0xc6, 0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb0, 0x00, 0x99, 0x00, 0x81, 0x00,\n  0x77, 0x00, 0x5c, 0x00, 0x45, 0x00, 0x1d, 0x00, 0x04, 0x00, 0xe2, 0xff,\n  0xb2, 0xff, 0x93, 0xff, 0x6e, 0xff, 0x56, 0xff, 0x29, 0xff, 0x26, 0xff,\n  0x09, 0xff, 0xfe, 0xfe, 0xed, 0xfe, 0xe2, 0xfe, 0xd2, 0xfe, 0xc4, 0xfe,\n  0xca, 0xfe, 0xc0, 0xfe, 0xcc, 0xfe, 0xdd, 0xfe, 0xec, 0xfe, 0x0c, 0xff,\n  0x24, 0xff, 0x30, 0xff, 0x4c, 0xff, 0x63, 0xff, 0x6f, 0xff, 0x6e, 0xff,\n  0x83, 0xff, 0x8b, 0xff, 0x8b, 0xff, 0xa2, 0xff, 0xb1, 0xff, 0xc2, 0xff,\n  0xda, 0xff, 0xf8, 0xff, 0x0e, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x25, 0x00,\n  0x25, 0x00, 0x26, 0x00, 0x39, 0x00, 0x43, 0x00, 0x5e, 0x00, 0x59, 0x00,\n  0x71, 0x00, 0x70, 0x00, 0x77, 0x00, 0x7f, 0x00, 0x78, 0x00, 0x7c, 0x00,\n  0x7a, 0x00, 0x67, 0x00, 0x5a, 0x00, 0x40, 0x00, 0x37, 0x00, 0x07, 0x00,\n  0xf4, 0xff, 0xdd, 0xff, 0xb7, 0xff, 0xac, 0xff, 0x9b, 0xff, 0x9d, 0xff,\n  0x77, 0xff, 0x7e, 0xff, 0x80, 0xff, 0x92, 0xff, 0x91, 0xff, 0xa9, 0xff,\n  0xb6, 0xff, 0xbc, 0xff, 0xb5, 0xff, 0xbd, 0xff, 0xae, 0xff, 0xaa, 0xff,\n  0x9e, 0xff, 0x8d, 0xff, 0xa0, 0xff, 0x91, 0xff, 0xa0, 0xff, 0xa1, 0xff,\n  0xa3, 0xff, 0xa5, 0xff, 0x99, 0xff, 0xa3, 0xff, 0x9f, 0xff, 0xa8, 0xff,\n  0xb5, 0xff, 0xbd, 0xff, 0xb2, 0xff, 0xcf, 0xff, 0xdb, 0xff, 0xe3, 0xff,\n  0xeb, 0xff, 0xeb, 0xff, 0xf1, 0xff, 0xf5, 0xff, 0xe8, 0xff, 0xfd, 0xff,\n  0xfa, 0xff, 0x03, 0x00, 0x16, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x11, 0x00,\n  0x18, 0x00, 0x04, 0x00, 0x06, 0x00, 0xf1, 0xff, 0xfc, 0xff, 0x01, 0x00,\n  0xfa, 0xff, 0x0b, 0x00, 0x16, 0x00, 0x13, 0x00, 0x0f, 0x00, 0x14, 0x00,\n  0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1a, 0x00, 0x2c, 0x00,\n  0x3d, 0x00, 0x52, 0x00, 0x61, 0x00, 0x5d, 0x00, 0x49, 0x00, 0x3e, 0x00,\n  0x30, 0x00, 0x09, 0x00, 0xff, 0xff, 0xef, 0xff, 0xe1, 0xff, 0xdf, 0xff,\n  0xc6, 0xff, 0xc2, 0xff, 0xb0, 0xff, 0x9d, 0xff, 0x86, 0xff, 0x73, 0xff,\n  0x6d, 0xff, 0x6e, 0xff, 0x73, 0xff, 0x7a, 0xff, 0x8d, 0xff, 0x9c, 0xff,\n  0xb3, 0xff, 0xad, 0xff, 0xc4, 0xff, 0xde, 0xff, 0xdd, 0xff, 0xe9, 0xff,\n  0xf5, 0xff, 0x03, 0x00, 0x02, 0x00, 0xf2, 0xff, 0x03, 0x00, 0x0b, 0x00,\n  0x00, 0x00, 0xf9, 0xff, 0xfb, 0xff, 0xe6, 0xff, 0xd7, 0xff, 0xca, 0xff,\n  0xc5, 0xff, 0xa4, 0xff, 0xaa, 0xff, 0x98, 0xff, 0x85, 0xff, 0x7d, 0xff,\n  0x80, 0xff, 0x78, 0xff, 0x7c, 0xff, 0x7d, 0xff, 0x88, 0xff, 0x96, 0xff,\n  0xb2, 0xff, 0xb3, 0xff, 0xce, 0xff, 0xdd, 0xff, 0xde, 0xff, 0xed, 0xff,\n  0xf7, 0xff, 0xf9, 0xff, 0x08, 0x00, 0x09, 0x00, 0x16, 0x00, 0x06, 0x00,\n  0x08, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x09, 0x00, 0x23, 0x00, 0x1c, 0x00,\n  0x2a, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x24, 0x00, 0x09, 0x00, 0x15, 0x00,\n  0x0d, 0x00, 0x21, 0x00, 0x0c, 0x00, 0x1e, 0x00, 0x09, 0x00, 0x05, 0x00,\n  0xf3, 0xff, 0xdf, 0xff, 0xca, 0xff, 0xdf, 0xff, 0xd4, 0xff, 0xcc, 0xff,\n  0xd0, 0xff, 0xd8, 0xff, 0xdc, 0xff, 0xcb, 0xff, 0xdd, 0xff, 0xdc, 0xff,\n  0xe0, 0xff, 0xd4, 0xff, 0xd5, 0xff, 0xc1, 0xff, 0xb5, 0xff, 0xae, 0xff,\n  0x8b, 0xff, 0x98, 0xff, 0x79, 0xff, 0x74, 0xff, 0x64, 0xff, 0x63, 0xff,\n  0x63, 0xff, 0x6f, 0xff, 0x72, 0xff, 0x68, 0xff, 0x6d, 0xff, 0x66, 0xff,\n  0x68, 0xff, 0x73, 0xff, 0x79, 0xff, 0x94, 0xff, 0x9e, 0xff, 0xb2, 0xff,\n  0xcd, 0xff, 0xd3, 0xff, 0xea, 0xff, 0xe9, 0xff, 0xfb, 0xff, 0xeb, 0xff,\n  0xfc, 0xff, 0x10, 0x00, 0x0f, 0x00, 0x20, 0x00, 0x39, 0x00, 0x39, 0x00,\n  0x4f, 0x00, 0x44, 0x00, 0x51, 0x00, 0x45, 0x00, 0x3f, 0x00, 0x39, 0x00,\n  0x37, 0x00, 0x38, 0x00, 0x40, 0x00, 0x35, 0x00, 0x28, 0x00, 0x29, 0x00,\n  0x09, 0x00, 0xf6, 0xff, 0xe8, 0xff, 0xcf, 0xff, 0xcd, 0xff, 0xc2, 0xff,\n  0xcf, 0xff, 0xc3, 0xff, 0xcd, 0xff, 0xd0, 0xff, 0xcc, 0xff, 0xc9, 0xff,\n  0xbe, 0xff, 0xb3, 0xff, 0xbb, 0xff, 0xb7, 0xff, 0xa6, 0xff, 0xb7, 0xff,\n  0xaf, 0xff, 0xc2, 0xff, 0xb7, 0xff, 0xc3, 0xff, 0xd6, 0xff, 0xc8, 0xff,\n  0xdf, 0xff, 0xf9, 0xff, 0xfe, 0xff, 0x1a, 0x00, 0x2d, 0x00, 0x3b, 0x00,\n  0x50, 0x00, 0x56, 0x00, 0x54, 0x00, 0x60, 0x00, 0x56, 0x00, 0x58, 0x00,\n  0x34, 0x00, 0x22, 0x00, 0x11, 0x00, 0xfe, 0xff, 0xe8, 0xff, 0xd5, 0xff,\n  0xd1, 0xff, 0xcc, 0xff, 0xb6, 0xff, 0xb0, 0xff, 0xb7, 0xff, 0xb4, 0xff,\n  0xb6, 0xff, 0xad, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0x86, 0xff, 0x70, 0xff,\n  0x74, 0xff, 0x6f, 0xff, 0x6b, 0xff, 0x62, 0xff, 0x6a, 0xff, 0x85, 0xff,\n  0x86, 0xff, 0xae, 0xff, 0xb2, 0xff, 0xd3, 0xff, 0xd8, 0xff, 0xdf, 0xff,\n  0xe0, 0xff, 0xe9, 0xff, 0xfc, 0xff, 0xf5, 0xff, 0x18, 0x00, 0x22, 0x00,\n  0x2e, 0x00, 0x3c, 0x00, 0x30, 0x00, 0x46, 0x00, 0x48, 0x00, 0x50, 0x00,\n  0x4b, 0x00, 0x5c, 0x00, 0x63, 0x00, 0x4f, 0x00, 0x4f, 0x00, 0x51, 0x00,\n  0x36, 0x00, 0x21, 0x00, 0x20, 0x00, 0xe7, 0xff, 0xd5, 0xff, 0xc5, 0xff,\n  0xa9, 0xff, 0x9c, 0xff, 0x91, 0xff, 0x84, 0xff, 0x60, 0xff, 0x5a, 0xff,\n  0x47, 0xff, 0x4d, 0xff, 0x5b, 0xff, 0x5a, 0xff, 0x73, 0xff, 0x7e, 0xff,\n  0xa1, 0xff, 0x9f, 0xff, 0xbe, 0xff, 0xd4, 0xff, 0xed, 0xff, 0x07, 0x00,\n  0x16, 0x00, 0x37, 0x00, 0x4e, 0x00, 0x5a, 0x00, 0x6a, 0x00, 0x81, 0x00,\n  0x8a, 0x00, 0x9c, 0x00, 0xa0, 0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb2, 0x00,\n  0x94, 0x00, 0x87, 0x00, 0x6b, 0x00, 0x38, 0x00, 0x12, 0x00, 0xf1, 0xff,\n  0xd3, 0xff, 0x93, 0xff, 0x80, 0xff, 0x50, 0xff, 0x30, 0xff, 0x0b, 0xff,\n  0xfd, 0xfe, 0xeb, 0xfe, 0xeb, 0xfe, 0xee, 0xfe, 0xe2, 0xfe, 0xea, 0xfe,\n  0xf5, 0xfe, 0xfc, 0xfe, 0x08, 0xff, 0x2a, 0xff, 0x36, 0xff, 0x3b, 0xff,\n  0x5d, 0xff, 0x5f, 0xff, 0x70, 0xff, 0x7e, 0xff, 0x8a, 0xff, 0x9a, 0xff,\n  0x96, 0xff, 0xae, 0xff, 0xb6, 0xff, 0xb9, 0xff, 0xd0, 0xff, 0xdc, 0xff,\n  0xec, 0xff, 0xee, 0xff, 0x05, 0x00, 0x18, 0x00, 0x2c, 0x00, 0x2b, 0x00,\n  0x55, 0x00, 0x3f, 0x00, 0x54, 0x00, 0x45, 0x00, 0x3e, 0x00, 0x41, 0x00,\n  0x30, 0x00, 0x3d, 0x00, 0x28, 0x00, 0x37, 0x00, 0x22, 0x00, 0x27, 0x00,\n  0x2b, 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x13, 0x00, 0x19, 0x00, 0x07, 0x00,\n  0xfb, 0xff, 0xee, 0xff, 0xda, 0xff, 0xc1, 0xff, 0xb3, 0xff, 0xa9, 0xff,\n  0xaf, 0xff, 0x9e, 0xff, 0xa3, 0xff, 0xa7, 0xff, 0x9b, 0xff, 0x91, 0xff,\n  0x8b, 0xff, 0x94, 0xff, 0x8b, 0xff, 0x89, 0xff, 0x9a, 0xff, 0x7c, 0xff,\n  0x83, 0xff, 0x88, 0xff, 0x86, 0xff, 0x8f, 0xff, 0x8c, 0xff, 0xa5, 0xff,\n  0x9d, 0xff, 0xa7, 0xff, 0xbb, 0xff, 0xcd, 0xff, 0xe2, 0xff, 0xfb, 0xff,\n  0x11, 0x00, 0x2a, 0x00, 0x28, 0x00, 0x3f, 0x00, 0x4f, 0x00, 0x57, 0x00,\n  0x68, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x7e, 0x00, 0x77, 0x00, 0x66, 0x00,\n  0x63, 0x00, 0x49, 0x00, 0x29, 0x00, 0x26, 0x00, 0x09, 0x00, 0xe3, 0xff,\n  0xe8, 0xff, 0xc8, 0xff, 0xc0, 0xff, 0xb2, 0xff, 0xad, 0xff, 0xa2, 0xff,\n  0x90, 0xff, 0x91, 0xff, 0x90, 0xff, 0x96, 0xff, 0x95, 0xff, 0xa1, 0xff,\n  0xa7, 0xff, 0x93, 0xff, 0xa9, 0xff, 0xa8, 0xff, 0x94, 0xff, 0xb3, 0xff,\n  0x9a, 0xff, 0xa8, 0xff, 0xac, 0xff, 0xbd, 0xff, 0xc8, 0xff, 0xda, 0xff,\n  0xe5, 0xff, 0xeb, 0xff, 0xf2, 0xff, 0xe8, 0xff, 0xea, 0xff, 0x02, 0x00,\n  0x01, 0x00, 0x11, 0x00, 0x2b, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x3c, 0x00,\n  0x40, 0x00, 0x3c, 0x00, 0x2e, 0x00, 0x39, 0x00, 0x1e, 0x00, 0x20, 0x00,\n  0x02, 0x00, 0xe7, 0xff, 0xdf, 0xff, 0xcb, 0xff, 0xb2, 0xff, 0xaf, 0xff,\n  0xa1, 0xff, 0x9a, 0xff, 0xa0, 0xff, 0x9d, 0xff, 0x90, 0xff, 0x9c, 0xff,\n  0x83, 0xff, 0x8f, 0xff, 0x7f, 0xff, 0x74, 0xff, 0x8b, 0xff, 0xa9, 0xff,\n  0xaa, 0xff, 0xc3, 0xff, 0xc3, 0xff, 0xd6, 0xff, 0xc7, 0xff, 0xd1, 0xff,\n  0xd2, 0xff, 0xe2, 0xff, 0xfc, 0xff, 0x0d, 0x00, 0x17, 0x00, 0x38, 0x00,\n  0x41, 0x00, 0x45, 0x00, 0x5b, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x6a, 0x00,\n  0x62, 0x00, 0x56, 0x00, 0x38, 0x00, 0x2d, 0x00, 0x0b, 0x00, 0xfe, 0xff,\n  0xeb, 0xff, 0xd7, 0xff, 0xcb, 0xff, 0xab, 0xff, 0xac, 0xff, 0xa7, 0xff,\n  0xa4, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x87, 0xff, 0x80, 0xff, 0x77, 0xff,\n  0x82, 0xff, 0x88, 0xff, 0x89, 0xff, 0x89, 0xff, 0x94, 0xff, 0x9a, 0xff,\n  0x95, 0xff, 0xb0, 0xff, 0x9f, 0xff, 0xaf, 0xff, 0xc1, 0xff, 0xc1, 0xff,\n  0xca, 0xff, 0xe4, 0xff, 0xf7, 0xff, 0xf4, 0xff, 0xff, 0xff, 0x05, 0x00,\n  0x0b, 0x00, 0x17, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x2b, 0x00, 0x2e, 0x00,\n  0x24, 0x00, 0x28, 0x00, 0x28, 0x00, 0x17, 0x00, 0x17, 0x00, 0x0a, 0x00,\n  0x0c, 0x00, 0xf3, 0xff, 0xf7, 0xff, 0xe9, 0xff, 0xf1, 0xff, 0xe1, 0xff,\n  0xee, 0xff, 0xe6, 0xff, 0xf8, 0xff, 0xf2, 0xff, 0xe9, 0xff, 0x00, 0x00,\n  0x01, 0x00, 0xf3, 0xff, 0x03, 0x00, 0xff, 0xff, 0x0a, 0x00, 0xf3, 0xff,\n  0x04, 0x00, 0xfb, 0xff, 0x00, 0x00, 0xe9, 0xff, 0xec, 0xff, 0xd9, 0xff,\n  0xd9, 0xff, 0xce, 0xff, 0xc6, 0xff, 0xca, 0xff, 0xbf, 0xff, 0xb6, 0xff,\n  0xaf, 0xff, 0xaf, 0xff, 0x95, 0xff, 0x96, 0xff, 0x9a, 0xff, 0x91, 0xff,\n  0x94, 0xff, 0x90, 0xff, 0x93, 0xff, 0xa3, 0xff, 0x83, 0xff, 0x94, 0xff,\n  0x8a, 0xff, 0x75, 0xff, 0x7a, 0xff, 0x85, 0xff, 0x75, 0xff, 0x79, 0xff,\n  0x7c, 0xff, 0x7d, 0xff, 0x69, 0xff, 0x84, 0xff, 0x67, 0xff, 0x6b, 0xff,\n  0x82, 0xff, 0x88, 0xff, 0x94, 0xff, 0xa2, 0xff, 0xb8, 0xff, 0xd6, 0xff,\n  0xf7, 0xff, 0xfe, 0xff, 0x27, 0x00, 0x42, 0x00, 0x67, 0x00, 0x71, 0x00,\n  0x7b, 0x00, 0x87, 0x00, 0x95, 0x00, 0x84, 0x00, 0x84, 0x00, 0x73, 0x00,\n  0x6b, 0x00, 0x54, 0x00, 0x3c, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00,\n  0xf1, 0xff, 0xda, 0xff, 0xcd, 0xff, 0xc1, 0xff, 0xb7, 0xff, 0xa3, 0xff,\n  0x9b, 0xff, 0x96, 0xff, 0x7c, 0xff, 0x98, 0xff, 0x70, 0xff, 0x6c, 0xff,\n  0x7f, 0xff, 0x6c, 0xff, 0x6f, 0xff, 0x8b, 0xff, 0x94, 0xff, 0x9f, 0xff,\n  0x9f, 0xff, 0xa4, 0xff, 0xb9, 0xff, 0xae, 0xff, 0xc7, 0xff, 0xd3, 0xff,\n  0xf1, 0xff, 0xfc, 0xff, 0x16, 0x00, 0x20, 0x00, 0x1d, 0x00, 0x28, 0x00,\n  0x2d, 0x00, 0x37, 0x00, 0x47, 0x00, 0x41, 0x00, 0x4c, 0x00, 0x46, 0x00,\n  0x3f, 0x00, 0x32, 0x00, 0x29, 0x00, 0x16, 0x00, 0x12, 0x00, 0x03, 0x00,\n  0xf0, 0xff, 0xdc, 0xff, 0xdf, 0xff, 0xd1, 0xff, 0xc0, 0xff, 0xc8, 0xff,\n  0x9f, 0xff, 0xa6, 0xff, 0x8b, 0xff, 0x8d, 0xff, 0x84, 0xff, 0x8d, 0xff,\n  0x96, 0xff, 0xaa, 0xff, 0xab, 0xff, 0xc6, 0xff, 0xca, 0xff, 0xd6, 0xff,\n  0xe9, 0xff, 0xe7, 0xff, 0xe6, 0xff, 0xf4, 0xff, 0xf7, 0xff, 0xf9, 0xff,\n  0xf6, 0xff, 0x03, 0x00, 0xfc, 0xff, 0x1a, 0x00, 0x0c, 0x00, 0x2c, 0x00,\n  0x2e, 0x00, 0x53, 0x00, 0x66, 0x00, 0x87, 0x00, 0x99, 0x00, 0xaf, 0x00,\n  0xaa, 0x00, 0xa7, 0x00, 0x95, 0x00, 0x7c, 0x00, 0x4e, 0x00, 0x36, 0x00,\n  0x03, 0x00, 0xe6, 0xff, 0xc4, 0xff, 0xa9, 0xff, 0x99, 0xff, 0x76, 0xff,\n  0x69, 0xff, 0x45, 0xff, 0x3a, 0xff, 0x1f, 0xff, 0x0f, 0xff, 0x1b, 0xff,\n  0x1f, 0xff, 0x1c, 0xff, 0x1c, 0xff, 0x29, 0xff, 0x32, 0xff, 0x34, 0xff,\n  0x43, 0xff, 0x36, 0xff, 0x4b, 0xff, 0x64, 0xff, 0x73, 0xff, 0x85, 0xff,\n  0x9e, 0xff, 0xbc, 0xff, 0xd8, 0xff, 0xd8, 0xff, 0xf7, 0xff, 0xef, 0xff,\n  0xff, 0xff, 0x01, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x25, 0x00,\n  0x31, 0x00, 0x39, 0x00, 0x40, 0x00, 0x3e, 0x00, 0x4a, 0x00, 0x30, 0x00,\n  0x29, 0x00, 0x27, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x04, 0x00,\n  0x10, 0x00, 0x08, 0x00, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0xfc, 0xff,\n  0xef, 0xff, 0xe5, 0xff, 0xd5, 0xff, 0xce, 0xff, 0xb1, 0xff, 0xb7, 0xff,\n  0xa1, 0xff, 0x9a, 0xff, 0xa2, 0xff, 0x8b, 0xff, 0x93, 0xff, 0x9d, 0xff,\n  0xa0, 0xff, 0xad, 0xff, 0xaf, 0xff, 0xc0, 0xff, 0xc4, 0xff, 0xbd, 0xff,\n  0xbb, 0xff, 0xd3, 0xff, 0xdb, 0xff, 0xeb, 0xff, 0xf3, 0xff, 0x02, 0x00,\n  0x20, 0x00, 0x29, 0x00, 0x25, 0x00, 0x41, 0x00, 0x44, 0x00, 0x50, 0x00,\n  0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x22, 0x00, 0x18, 0x00, 0x13, 0x00,\n  0x01, 0x00, 0xf9, 0xff, 0xe9, 0xff, 0xdc, 0xff, 0xc5, 0xff, 0xc3, 0xff,\n  0xb3, 0xff, 0xaa, 0xff, 0xa2, 0xff, 0x9e, 0xff, 0x91, 0xff, 0x97, 0xff,\n  0x8f, 0xff, 0x87, 0xff, 0x9b, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x9a, 0xff,\n  0x83, 0xff, 0x93, 0xff, 0xa3, 0xff, 0xa8, 0xff, 0xaa, 0xff, 0xb5, 0xff,\n  0xb8, 0xff, 0xbd, 0xff, 0xc1, 0xff, 0xcd, 0xff, 0xd0, 0xff, 0xef, 0xff,\n  0x03, 0x00, 0x20, 0x00, 0x30, 0x00, 0x4d, 0x00, 0x43, 0x00, 0x42, 0x00,\n  0x50, 0x00, 0x2a, 0x00, 0x2c, 0x00, 0x2b, 0x00, 0x18, 0x00, 0x13, 0x00,\n  0xf7, 0xff, 0x02, 0x00, 0xf0, 0xff, 0xea, 0xff, 0xef, 0xff, 0xe2, 0xff,\n  0xe7, 0xff, 0xef, 0xff, 0xf3, 0xff, 0xfa, 0xff, 0xfb, 0xff, 0x01, 0x00,\n  0xf4, 0xff, 0xee, 0xff, 0xdb, 0xff, 0xde, 0xff, 0xcd, 0xff, 0xc7, 0xff,\n  0xcc, 0xff, 0xc3, 0xff, 0xcd, 0xff, 0xd2, 0xff, 0xca, 0xff, 0xdb, 0xff,\n  0xd0, 0xff, 0xe7, 0xff, 0xe0, 0xff, 0xec, 0xff, 0xf1, 0xff, 0xff, 0xff,\n  0xf1, 0xff, 0xf7, 0xff, 0xf6, 0xff, 0xe3, 0xff, 0xe1, 0xff, 0xdb, 0xff,\n  0xca, 0xff, 0xca, 0xff, 0xad, 0xff, 0xad, 0xff, 0x8f, 0xff, 0x86, 0xff,\n  0x73, 0xff, 0x7a, 0xff, 0x62, 0xff, 0x5c, 0xff, 0x61, 0xff, 0x5e, 0xff,\n  0x60, 0xff, 0x54, 0xff, 0x70, 0xff, 0x72, 0xff, 0x8f, 0xff, 0x9a, 0xff,\n  0xa6, 0xff, 0xc7, 0xff, 0xd8, 0xff, 0xf0, 0xff, 0xfc, 0xff, 0x11, 0x00,\n  0x31, 0x00, 0x3a, 0x00, 0x45, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x58, 0x00,\n  0x50, 0x00, 0x55, 0x00, 0x4f, 0x00, 0x47, 0x00, 0x32, 0x00, 0x29, 0x00,\n  0x16, 0x00, 0xf8, 0xff, 0xed, 0xff, 0xc4, 0xff, 0xca, 0xff, 0xa4, 0xff,\n  0xa7, 0xff, 0x9f, 0xff, 0x9b, 0xff, 0x99, 0xff, 0xa7, 0xff, 0xac, 0xff,\n  0xb0, 0xff, 0xbf, 0xff, 0xbd, 0xff, 0xd2, 0xff, 0xe3, 0xff, 0xe8, 0xff,\n  0x06, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x19, 0x00,\n  0x06, 0x00, 0x03, 0x00, 0xf8, 0xff, 0xf2, 0xff, 0xe0, 0xff, 0xd7, 0xff,\n  0xd3, 0xff, 0xb3, 0xff, 0xc4, 0xff, 0xb7, 0xff, 0xa2, 0xff, 0xac, 0xff,\n  0xa6, 0xff, 0x9a, 0xff, 0xa4, 0xff, 0x9e, 0xff, 0xb2, 0xff, 0xa7, 0xff,\n  0xa0, 0xff, 0xbb, 0xff, 0xc9, 0xff, 0xca, 0xff, 0xd8, 0xff, 0xd5, 0xff,\n  0xdb, 0xff, 0xde, 0xff, 0xce, 0xff, 0xd3, 0xff, 0xd0, 0xff, 0xda, 0xff,\n  0xcd, 0xff, 0xd0, 0xff, 0xc2, 0xff, 0xd5, 0xff, 0xc7, 0xff, 0xd0, 0xff,\n  0xc4, 0xff, 0xdb, 0xff, 0xd6, 0xff, 0xcf, 0xff, 0xdb, 0xff, 0xd9, 0xff,\n  0xd4, 0xff, 0xd4, 0xff, 0xcf, 0xff, 0xcf, 0xff, 0xc5, 0xff, 0xbc, 0xff,\n  0xc6, 0xff, 0xb7, 0xff, 0xc3, 0xff, 0xc6, 0xff, 0xb9, 0xff, 0xb9, 0xff,\n  0xba, 0xff, 0xb4, 0xff, 0xa3, 0xff, 0x9a, 0xff, 0xa7, 0xff, 0xa8, 0xff,\n  0xbb, 0xff, 0xbe, 0xff, 0xc3, 0xff, 0xbd, 0xff, 0xc8, 0xff, 0xcf, 0xff,\n  0xc8, 0xff, 0xc4, 0xff, 0xd9, 0xff, 0xe4, 0xff, 0xe7, 0xff, 0xf5, 0xff,\n  0x0a, 0x00, 0x14, 0x00, 0x15, 0x00, 0x19, 0x00, 0x0f, 0x00, 0x04, 0x00,\n  0xf3, 0xff, 0xea, 0xff, 0xf7, 0xff, 0xed, 0xff, 0xee, 0xff, 0xf9, 0xff,\n  0xfc, 0xff, 0xf9, 0xff, 0x00, 0x00, 0xfe, 0xff, 0xf7, 0xff, 0xef, 0xff,\n  0xef, 0xff, 0xf0, 0xff, 0xee, 0xff, 0xf2, 0xff, 0xef, 0xff, 0xe6, 0xff,\n  0xec, 0xff, 0xf1, 0xff, 0xfe, 0xff, 0xed, 0xff, 0xf3, 0xff, 0xf1, 0xff,\n  0xf3, 0xff, 0xd6, 0xff, 0xe3, 0xff, 0xd1, 0xff, 0xd0, 0xff, 0xc7, 0xff,\n  0xc3, 0xff, 0xcf, 0xff, 0xca, 0xff, 0xcf, 0xff, 0xe2, 0xff, 0xd2, 0xff,\n  0xe1, 0xff, 0xdf, 0xff, 0xdd, 0xff, 0xf3, 0xff, 0xfb, 0xff, 0x05, 0x00,\n  0x0b, 0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x0a, 0x00, 0xf7, 0xff,\n  0xfa, 0xff, 0x06, 0x00, 0x07, 0x00, 0xfc, 0xff, 0xf9, 0xff, 0xf6, 0xff,\n  0xe0, 0xff, 0xe9, 0xff, 0xc4, 0xff, 0xca, 0xff, 0xbd, 0xff, 0xb2, 0xff,\n  0xb2, 0xff, 0xad, 0xff, 0xb7, 0xff, 0xb5, 0xff, 0xb8, 0xff, 0xd3, 0xff,\n  0xde, 0xff, 0xf4, 0xff, 0x10, 0x00, 0x1e, 0x00, 0x2f, 0x00, 0x33, 0x00,\n  0x38, 0x00, 0x2c, 0x00, 0x1e, 0x00, 0x18, 0x00, 0xff, 0xff, 0xfb, 0xff,\n  0xf2, 0xff, 0xea, 0xff, 0xe0, 0xff, 0xd9, 0xff, 0xe3, 0xff, 0xc9, 0xff,\n  0xc6, 0xff, 0xd5, 0xff, 0xd6, 0xff, 0xd9, 0xff, 0xea, 0xff, 0xf2, 0xff,\n  0xf2, 0xff, 0xeb, 0xff, 0xdf, 0xff, 0xe1, 0xff, 0xbe, 0xff, 0xb8, 0xff,\n  0xaf, 0xff, 0x98, 0xff, 0x96, 0xff, 0x9a, 0xff, 0x9d, 0xff, 0x89, 0xff,\n  0x95, 0xff, 0x89, 0xff, 0x74, 0xff, 0x77, 0xff, 0x71, 0xff, 0x6a, 0xff,\n  0x73, 0xff, 0x7d, 0xff, 0x83, 0xff, 0x9f, 0xff, 0xa7, 0xff, 0xc1, 0xff,\n  0xc8, 0xff, 0xde, 0xff, 0xe6, 0xff, 0xe0, 0xff, 0xe8, 0xff, 0xec, 0xff,\n  0xe3, 0xff, 0xef, 0xff, 0xde, 0xff, 0xf9, 0xff, 0xf3, 0xff, 0x12, 0x00,\n  0x04, 0x00, 0x28, 0x00, 0x23, 0x00, 0x39, 0x00, 0x41, 0x00, 0x47, 0x00,\n  0x4d, 0x00, 0x4e, 0x00, 0x43, 0x00, 0x5c, 0x00, 0x36, 0x00, 0x43, 0x00,\n  0x32, 0x00, 0x1a, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0xff, 0xdc, 0xff,\n  0xe6, 0xff, 0xdd, 0xff, 0xdb, 0xff, 0xc9, 0xff, 0xc6, 0xff, 0xb5, 0xff,\n  0xb6, 0xff, 0xab, 0xff, 0x9d, 0xff, 0x9f, 0xff, 0xb5, 0xff, 0xb6, 0xff,\n  0xb4, 0xff, 0xbd, 0xff, 0xdd, 0xff, 0xd2, 0xff, 0xe3, 0xff, 0xe2, 0xff,\n  0xf1, 0xff, 0xe6, 0xff, 0xf1, 0xff, 0xe7, 0xff, 0xf3, 0xff, 0xdf, 0xff,\n  0xe1, 0xff, 0xc5, 0xff, 0xd4, 0xff, 0xb0, 0xff, 0xb3, 0xff, 0xa7, 0xff,\n  0xa8, 0xff, 0xa7, 0xff, 0xa7, 0xff, 0xad, 0xff, 0x9b, 0xff, 0x98, 0xff,\n  0x8f, 0xff, 0x83, 0xff, 0x83, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x9b, 0xff,\n  0xa2, 0xff, 0xab, 0xff, 0xca, 0xff, 0xd3, 0xff, 0xda, 0xff, 0xf8, 0xff,\n  0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x18, 0x00, 0x2e, 0x00, 0x27, 0x00,\n  0x31, 0x00, 0x43, 0x00, 0x4c, 0x00, 0x3e, 0x00, 0x43, 0x00, 0x41, 0x00,\n  0x2c, 0x00, 0x0d, 0x00, 0x05, 0x00, 0xe8, 0xff, 0xda, 0xff, 0xd2, 0xff,\n  0xc3, 0xff, 0xc0, 0xff, 0xbe, 0xff, 0xc2, 0xff, 0xc6, 0xff, 0xb6, 0xff,\n  0xcd, 0xff, 0xc3, 0xff, 0xcb, 0xff, 0xd2, 0xff, 0xdc, 0xff, 0xcf, 0xff,\n  0xd0, 0xff, 0xd3, 0xff, 0xc8, 0xff, 0xc0, 0xff, 0xb8, 0xff, 0xc9, 0xff,\n  0xae, 0xff, 0xb9, 0xff, 0xbb, 0xff, 0xcf, 0xff, 0xcd, 0xff, 0xe3, 0xff,\n  0xea, 0xff, 0xf1, 0xff, 0xe6, 0xff, 0xe9, 0xff, 0xd8, 0xff, 0xc7, 0xff,\n  0xc6, 0xff, 0xb4, 0xff, 0xbb, 0xff, 0xb4, 0xff, 0xc0, 0xff, 0xbd, 0xff,\n  0xcd, 0xff, 0xd2, 0xff, 0xe2, 0xff, 0xf4, 0xff, 0xff, 0xff, 0x0a, 0x00,\n  0x08, 0x00, 0x07, 0x00, 0xf8, 0xff, 0x03, 0x00, 0xfe, 0xff, 0xef, 0xff,\n  0xf9, 0xff, 0xf1, 0xff, 0xf9, 0xff, 0xe7, 0xff, 0xed, 0xff, 0xec, 0xff,\n  0xec, 0xff, 0xf3, 0xff, 0xfb, 0xff, 0xf4, 0xff, 0x02, 0x00, 0xf3, 0xff,\n  0xfb, 0xff, 0xfc, 0xff, 0xef, 0xff, 0xef, 0xff, 0xf2, 0xff, 0xe8, 0xff,\n  0xe9, 0xff, 0xe1, 0xff, 0xe2, 0xff, 0xd7, 0xff, 0xe4, 0xff, 0xc3, 0xff,\n  0xd1, 0xff, 0xbb, 0xff, 0xcf, 0xff, 0xaf, 0xff, 0xc7, 0xff, 0xd2, 0xff,\n  0xe6, 0xff, 0xdc, 0xff, 0xed, 0xff, 0xf2, 0xff, 0xe1, 0xff, 0xdf, 0xff,\n  0xc4, 0xff, 0xbd, 0xff, 0xab, 0xff, 0xa6, 0xff, 0xaa, 0xff, 0x96, 0xff,\n  0xa8, 0xff, 0xa8, 0xff, 0xbb, 0xff, 0xa9, 0xff, 0xad, 0xff, 0xbd, 0xff,\n  0xb4, 0xff, 0xc1, 0xff, 0xcd, 0xff, 0xd2, 0xff, 0xe5, 0xff, 0xef, 0xff,\n  0xf1, 0xff, 0x11, 0x00, 0x0f, 0x00, 0x15, 0x00, 0x21, 0x00, 0x1c, 0x00,\n  0x2b, 0x00, 0x28, 0x00, 0x22, 0x00, 0x25, 0x00, 0x1a, 0x00, 0x03, 0x00,\n  0xf9, 0xff, 0xed, 0xff, 0xc3, 0xff, 0xba, 0xff, 0xb4, 0xff, 0x98, 0xff,\n  0x8e, 0xff, 0x89, 0xff, 0x78, 0xff, 0x85, 0xff, 0x74, 0xff, 0x7b, 0xff,\n  0x80, 0xff, 0x7f, 0xff, 0x98, 0xff, 0xa7, 0xff, 0xae, 0xff, 0xca, 0xff,\n  0xc8, 0xff, 0xd5, 0xff, 0xcf, 0xff, 0xcc, 0xff, 0xc9, 0xff, 0xc9, 0xff,\n  0xc6, 0xff, 0xc9, 0xff, 0xd4, 0xff, 0xdf, 0xff, 0xe0, 0xff, 0xee, 0xff,\n  0xf1, 0xff, 0x06, 0x00, 0x12, 0x00, 0x16, 0x00, 0x37, 0x00, 0x47, 0x00,\n  0x51, 0x00, 0x54, 0x00, 0x69, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x44, 0x00,\n  0x37, 0x00, 0x2b, 0x00, 0x13, 0x00, 0x0f, 0x00, 0xf4, 0xff, 0xfe, 0xff,\n  0xe5, 0xff, 0xe7, 0xff, 0xe0, 0xff, 0xe4, 0xff, 0xd0, 0xff, 0xcc, 0xff,\n  0xc6, 0xff, 0xb0, 0xff, 0xac, 0xff, 0xa8, 0xff, 0x9f, 0xff, 0x94, 0xff,\n  0x9e, 0xff, 0x99, 0xff, 0x9e, 0xff, 0x92, 0xff, 0xa3, 0xff, 0x8d, 0xff,\n  0x90, 0xff, 0x92, 0xff, 0xa4, 0xff, 0xa5, 0xff, 0xa6, 0xff, 0xad, 0xff,\n  0xb5, 0xff, 0xb6, 0xff, 0xbe, 0xff, 0xc0, 0xff, 0xd4, 0xff, 0xe1, 0xff,\n  0xed, 0xff, 0xee, 0xff, 0xe5, 0xff, 0xf3, 0xff, 0xe9, 0xff, 0xdb, 0xff,\n  0xf3, 0xff, 0xf1, 0xff, 0x00, 0x00, 0x0b, 0x00, 0x09, 0x00, 0x1a, 0x00,\n  0x19, 0x00, 0x27, 0x00, 0x1d, 0x00, 0x2d, 0x00, 0x24, 0x00, 0x2a, 0x00,\n  0x20, 0x00, 0x16, 0x00, 0x13, 0x00, 0xf7, 0xff, 0xf7, 0xff, 0xdf, 0xff,\n  0xdf, 0xff, 0xd6, 0xff, 0xd5, 0xff, 0xcb, 0xff, 0xc9, 0xff, 0xd1, 0xff,\n  0xc2, 0xff, 0xc5, 0xff, 0xc2, 0xff, 0xbe, 0xff, 0xc6, 0xff, 0xc7, 0xff,\n  0xd7, 0xff, 0xe4, 0xff, 0xdd, 0xff, 0xfe, 0xff, 0x04, 0x00, 0x0c, 0x00,\n  0x06, 0x00, 0x14, 0x00, 0x04, 0x00, 0xfe, 0xff, 0xf7, 0xff, 0xf6, 0xff,\n  0xd6, 0xff, 0xd5, 0xff, 0xc8, 0xff, 0xa6, 0xff, 0xaa, 0xff, 0x91, 0xff,\n  0x91, 0xff, 0x8e, 0xff, 0x84, 0xff, 0x90, 0xff, 0x85, 0xff, 0x84, 0xff,\n  0x8c, 0xff, 0x8c, 0xff, 0x8a, 0xff, 0x92, 0xff, 0x83, 0xff, 0x82, 0xff,\n  0x94, 0xff, 0x84, 0xff, 0x92, 0xff, 0x8b, 0xff, 0x93, 0xff, 0x98, 0xff,\n  0x9e, 0xff, 0xb8, 0xff, 0xa3, 0xff, 0xbe, 0xff, 0xd1, 0xff, 0xef, 0xff,\n  0xec, 0xff, 0x03, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x33, 0x00, 0x37, 0x00,\n  0x42, 0x00, 0x5e, 0x00, 0x6a, 0x00, 0x71, 0x00, 0x87, 0x00, 0x97, 0x00,\n  0xa9, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0x92, 0x00, 0x69, 0x00,\n  0x68, 0x00, 0x42, 0x00, 0x23, 0x00, 0xf5, 0xff, 0xee, 0xff, 0xc8, 0xff,\n  0x9c, 0xff, 0x92, 0xff, 0x7e, 0xff, 0x5e, 0xff, 0x53, 0xff, 0x41, 0xff,\n  0x49, 0xff, 0x33, 0xff, 0x3a, 0xff, 0x31, 0xff, 0x37, 0xff, 0x2d, 0xff,\n  0x48, 0xff, 0x3e, 0xff, 0x39, 0xff, 0x57, 0xff, 0x61, 0xff, 0x72, 0xff,\n  0x7b, 0xff, 0x8f, 0xff, 0x97, 0xff, 0xa3, 0xff, 0xad, 0xff, 0xb2, 0xff,\n  0xd1, 0xff, 0xcd, 0xff, 0xd5, 0xff, 0xfa, 0xff, 0xf9, 0xff, 0x03, 0x00\n};\nconstexpr unsigned int cp909_raw_len = 39348;\n"
  },
  {
    "path": "lib/clouds/dsp/fx/diffuser.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// AP diffusion network.\n\n#ifndef CLOUDS_DSP_FX_DIFFUSER_H_\n#define CLOUDS_DSP_FX_DIFFUSER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"clouds/dsp/fx/fx_engine.h\"\n\nnamespace clouds {\n\nclass Diffuser {\n public:\n  Diffuser() { }\n  ~Diffuser() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n  }\n  \n  void Process(float* in_out_l, float* in_out_r, size_t size) {\n    typedef E::Reserve<126,\n      E::Reserve<180,\n      E::Reserve<269,\n      E::Reserve<444,\n      E::Reserve<151,\n      E::Reserve<205,\n      E::Reserve<245,\n      E::Reserve<405> > > > > > > > Memory;\n    E::DelayLine<Memory, 0> apl1;\n    E::DelayLine<Memory, 1> apl2;\n    E::DelayLine<Memory, 2> apl3;\n    E::DelayLine<Memory, 3> apl4;\n    E::DelayLine<Memory, 4> apr1;\n    E::DelayLine<Memory, 5> apr2;\n    E::DelayLine<Memory, 6> apr3;\n    E::DelayLine<Memory, 7> apr4;\n    E::Context c;\n    const float kap = 0.625f;\n    while (size--) {\n      engine_.Start(&c);\n      \n      float wet = 0.0f;\n      c.Read(*in_out_l);\n      c.Read(apl1 TAIL, kap);\n      c.WriteAllPass(apl1, -kap);\n      c.Read(apl2 TAIL, kap);\n      c.WriteAllPass(apl2, -kap);\n      c.Read(apl3 TAIL, kap);\n      c.WriteAllPass(apl3, -kap);\n      c.Read(apl4 TAIL, kap);\n      c.WriteAllPass(apl4, -kap);\n      c.Write(wet, 0.0f);\n      *in_out_l += amount_ * (wet - *in_out_l);\n      \n      c.Read(*in_out_r);\n      c.Read(apr1 TAIL, kap);\n      c.WriteAllPass(apr1, -kap);\n      c.Read(apr2 TAIL, kap);\n      c.WriteAllPass(apr2, -kap);\n      c.Read(apr3 TAIL, kap);\n      c.WriteAllPass(apr3, -kap);\n      c.Read(apr4 TAIL, kap);\n      c.WriteAllPass(apr4, -kap);\n      c.Write(wet, 0.0f);\n      *in_out_r += amount_ * (wet - *in_out_r);\n\n      ++in_out_l;\n      ++in_out_r;\n    }\n  }\n  \n  void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n private:\n  typedef FxEngine<2048, FORMAT_16_BIT> E;\n  E engine_;\n  \n  float amount_;\n  DISALLOW_COPY_AND_ASSIGN(Diffuser);\n};\n\n}  // namespace clouds\n\n#endif  // CLOUDS_DSP_FX_DIFFUSER_H_\n"
  },
  {
    "path": "lib/clouds/dsp/fx/fx_engine.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Base class for building reverbs.\n\n#ifndef CLOUDS_DSP_FX_FX_ENGINE_H_\n#define CLOUDS_DSP_FX_FX_ENGINE_H_\n\n#include <algorithm>\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/cosine_oscillator.h\"\n\nnamespace clouds {\n\n#define TAIL , -1\n\nenum Format {\n  FORMAT_12_BIT,\n  FORMAT_16_BIT,\n  FORMAT_32_BIT\n};\n\nenum LFOIndex {\n  LFO_1,\n  LFO_2\n};\n\ntemplate<Format format>\nstruct DataType { };\n\ntemplate<>\nstruct DataType<FORMAT_12_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 4096.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 4096.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_16_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 32768.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 32768.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_32_BIT> {\n  typedef float T;\n  \n  static inline float Decompress(T value) {\n    return value;;\n  }\n  \n  static inline T Compress(float value) {\n    return value;\n  }\n};\n\ntemplate<\n    size_t size,\n    Format format = FORMAT_12_BIT>\nclass FxEngine {\n public:\n  typedef typename DataType<format>::T T;\n  FxEngine() { }\n  ~FxEngine() { }\n\n  void Init(T* buffer) {\n    buffer_ = buffer;\n    Clear();\n  }\n  \n  void Clear() {\n    std::fill(&buffer_[0], &buffer_[size], 0);\n    write_ptr_ = 0;\n  }\n\n  struct Empty { };\n  \n  template<int32_t l, typename T = Empty>\n  struct Reserve {\n    typedef T Tail;\n    enum {\n      length = l\n    };\n  };\n  \n  template<typename Memory, int32_t index>\n  struct DelayLine {\n    enum {\n      length = DelayLine<typename Memory::Tail, index - 1>::length,\n      base = DelayLine<Memory, index - 1>::base + DelayLine<Memory, index - 1>::length + 1\n    };\n  };\n\n  template<typename Memory>\n  struct DelayLine<Memory, 0> {\n    enum {\n      length = Memory::length,\n      base = 0\n    };\n  };\n\n  class Context {\n   friend class FxEngine;\n   public:\n    Context() { }\n    ~Context() { }\n    \n    inline void Load(float value) {\n      accumulator_ = value;\n    }\n\n    inline void Read(float value, float scale) {\n      accumulator_ += value * scale;\n    }\n\n    inline void Read(float value) {\n      accumulator_ += value;\n    }\n\n    inline void Write(float& value) {\n      value = accumulator_;\n    }\n\n    inline void Write(float& value, float scale) {\n      value = accumulator_;\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T w = DataType<format>::Compress(accumulator_);\n      if (offset == -1) {\n        buffer_[(write_ptr_ + D::base + D::length - 1) & MASK] = w;\n      } else {\n        buffer_[(write_ptr_ + D::base + offset) & MASK] = w;\n      }\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, float scale) {\n      Write(d, 0, scale);\n    }\n\n    template<typename D>\n    inline void WriteAllPass(D& d, int32_t offset, float scale) {\n      Write(d, offset, scale);\n      accumulator_ += previous_read_;\n    }\n    \n    template<typename D>\n    inline void WriteAllPass(D& d, float scale) {\n      WriteAllPass(d, 0, scale);\n    }\n    \n    template<typename D>\n    inline void Read(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T r;\n      if (offset == -1) {\n        r = buffer_[(write_ptr_ + D::base + D::length - 1) & MASK];\n      } else {\n        r = buffer_[(write_ptr_ + D::base + offset) & MASK];\n      }\n      float r_f = DataType<format>::Decompress(r);\n      previous_read_ = r_f;\n      accumulator_ += r_f * scale;\n    }\n    \n    template<typename D>\n    inline void Read(D& d, float scale) {\n      Read(d, 0, scale);\n    }\n    \n    inline void Lp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ = state;\n    }\n\n    inline void Hp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ -= state;\n    }\n    \n    template<typename D>\n    inline void Interpolate(D& d, float offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n    template<typename D>\n    inline void Interpolate(\n        D& d, float offset, LFOIndex index, float amplitude, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      offset += amplitude * lfo_value_[index];\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n   private:\n    float accumulator_;\n    float previous_read_;\n    float lfo_value_[2];\n    T* buffer_;\n    int32_t write_ptr_;\n\n    DISALLOW_COPY_AND_ASSIGN(Context);\n  };\n  \n  inline void SetLFOFrequency(LFOIndex index, float frequency) {\n    lfo_[index].template Init<stmlib::COSINE_OSCILLATOR_APPROXIMATE>(\n        frequency * 32.0f);\n  }\n  \n  inline void Start(Context* c) {\n    --write_ptr_;\n    if (write_ptr_ < 0) {\n      write_ptr_ += size;\n    }\n    c->accumulator_ = 0.0f;\n    c->previous_read_ = 0.0f;\n    c->buffer_ = buffer_;\n    c->write_ptr_ = write_ptr_;\n    if ((write_ptr_ & 31) == 0) {\n      c->lfo_value_[0] = lfo_[0].Next();\n      c->lfo_value_[1] = lfo_[1].Next();\n    } else {\n      c->lfo_value_[0] = lfo_[0].value();\n      c->lfo_value_[1] = lfo_[1].value();\n    }\n  }\n  \n private:\n  enum {\n    MASK = size - 1\n  };\n  \n  int32_t write_ptr_;\n  T* buffer_;\n  stmlib::CosineOscillator lfo_[2];\n  \n  DISALLOW_COPY_AND_ASSIGN(FxEngine);\n};\n\n}  // namespace clouds\n\n#endif  // CLOUDS_DSP_FX_FX_ENGINE_H_\n"
  },
  {
    "path": "lib/clouds/dsp/fx/pitch_shifter.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Pitch shifter.\n\n#ifndef CLOUDS_DSP_FX_PITCH_SHIFTER_H_\n#define CLOUDS_DSP_FX_PITCH_SHIFTER_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"clouds/dsp/fx/fx_engine.h\"\n\nnamespace clouds {\n\nclass PitchShifter {\n public:\n  PitchShifter() { }\n  ~PitchShifter() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    phase_ = 0;\n    size_ = 2047.0f;\n  }\n  \n  void Clear() {\n    engine_.Clear();\n  }\n\n  inline void Process(float *in_out_l, float *in_out_r, size_t size) {\n    while (size--) {\n      Process(*in_out_l, *in_out_r);\n      ++in_out_l;\n      ++in_out_r;\n    }\n  }\n  \n  void Process(float& in_out_l, float& in_out_r) {\n    typedef E::Reserve<2047, E::Reserve<2047> > Memory;\n    E::DelayLine<Memory, 0> left;\n    E::DelayLine<Memory, 1> right;\n    E::Context c;\n    engine_.Start(&c);\n    \n    phase_ += (1.0f - ratio_) / size_;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n    }\n    if (phase_ <= 0.0f) {\n      phase_ += 1.0f;\n    }\n    float tri = 2.0f * (phase_ >= 0.5f ? 1.0f - phase_ : phase_);\n    float phase = phase_ * size_;\n    float half = phase + size_ * 0.5f;\n    if (half >= size_) {\n      half -= size_;\n    }\n    \n    c.Read(in_out_l, 1.0f);\n    c.Write(left, 0.0f);\n    c.Interpolate(left, phase, tri);\n    c.Interpolate(left, half, 1.0f - tri);\n    c.Write(in_out_l, 0.0f);\n\n    c.Read(in_out_r, 1.0f);\n    c.Write(right, 0.0f);\n    c.Interpolate(right, phase, tri);\n    c.Interpolate(right, half, 1.0f - tri);\n    c.Write(in_out_r, 0.0f);\n  }\n  \n  inline void set_ratio(float ratio) {\n    ratio_ = ratio;\n  }\n  \n  inline void set_size(float size) {\n    float target_size = 128.0f + (2047.0f - 128.0f) * size * size * size;\n    ONE_POLE(size_, target_size, 0.05f)\n  }\n  \n private:\n  typedef FxEngine<4096, FORMAT_16_BIT> E;\n  E engine_;\n  float phase_;\n  float ratio_;\n  float size_;\n  \n  DISALLOW_COPY_AND_ASSIGN(PitchShifter);\n};\n\n}  // namespace clouds\n\n#endif  // CLOUDS_DSP_FX_MINI_CHORUS_H_"
  },
  {
    "path": "lib/clouds/dsp/fx/reverb.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Reverb.\n\n#ifndef CLOUDS_DSP_FX_REVERB_H_\n#define CLOUDS_DSP_FX_REVERB_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"clouds/dsp/fx/fx_engine.h\"\n\nnamespace clouds {\n\nclass Reverb {\n public:\n  Reverb() { }\n  ~Reverb() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    engine_.SetLFOFrequency(LFO_1, 0.5f / 32000.0f);\n    engine_.SetLFOFrequency(LFO_2, 0.3f / 32000.0f);\n    lp_ = 0.7f;\n    diffusion_ = 0.625f;\n  }\n  \n  void Process(float* in_out_l, float* in_out_r, size_t size) {\n    // This is the Griesinger topology described in the Dattorro paper\n    // (4 AP diffusers on the input, then a loop of 2x 2AP+1Delay).\n    // Modulation is applied in the loop of the first diffuser AP for additional\n    // smearing; and to the two long delays for a slow shimmer/chorus effect.\n    typedef E::Reserve<113,\n      E::Reserve<162,\n      E::Reserve<241,\n      E::Reserve<399,\n      E::Reserve<1653,\n      E::Reserve<2038,\n      E::Reserve<3411,\n      E::Reserve<1913,\n      E::Reserve<1663,\n      E::Reserve<4782> > > > > > > > > > Memory;\n    E::DelayLine<Memory, 0> ap1;\n    E::DelayLine<Memory, 1> ap2;\n    E::DelayLine<Memory, 2> ap3;\n    E::DelayLine<Memory, 3> ap4;\n    E::DelayLine<Memory, 4> dap1a;\n    E::DelayLine<Memory, 5> dap1b;\n    E::DelayLine<Memory, 6> del1;\n    E::DelayLine<Memory, 7> dap2a;\n    E::DelayLine<Memory, 8> dap2b;\n    E::DelayLine<Memory, 9> del2;\n    E::Context c;\n\n    const float kap = diffusion_;\n    const float klp = lp_;\n    const float krt = reverb_time_;\n    const float amount = amount_;\n    const float gain = input_gain_;\n\n    float lp_1 = lp_decay_1_;\n    float lp_2 = lp_decay_2_;\n\n    while (size--) {\n      float wet;\n      float apout = 0.0f;\n      engine_.Start(&c);\n      \n      // Smear AP1 inside the loop.\n      c.Interpolate(ap1, 10.0f, LFO_1, 60.0f, 1.0f);\n      c.Write(ap1, 100, 0.0f);\n      \n      c.Read(*in_out_l + *in_out_r, gain);\n\n      // Diffuse through 4 allpasses.\n      c.Read(ap1 TAIL, kap);\n      c.WriteAllPass(ap1, -kap);\n      c.Read(ap2 TAIL, kap);\n      c.WriteAllPass(ap2, -kap);\n      c.Read(ap3 TAIL, kap);\n      c.WriteAllPass(ap3, -kap);\n      c.Read(ap4 TAIL, kap);\n      c.WriteAllPass(ap4, -kap);\n      c.Write(apout);\n      \n      // Main reverb loop.\n      c.Load(apout);\n      c.Interpolate(del2, 4680.0f, LFO_2, 100.0f, krt);\n      c.Lp(lp_1, klp);\n      c.Read(dap1a TAIL, -kap);\n      c.WriteAllPass(dap1a, kap);\n      c.Read(dap1b TAIL, kap);\n      c.WriteAllPass(dap1b, -kap);\n      c.Write(del1, 2.0f);\n      c.Write(wet, 0.0f);\n\n      *in_out_l += (wet - *in_out_l) * amount;\n\n      c.Load(apout);\n      // c.Interpolate(del1, 4450.0f, LFO_1, 50.0f, krt);\n      c.Read(del1 TAIL, krt);\n      c.Lp(lp_2, klp);\n      c.Read(dap2a TAIL, kap);\n      c.WriteAllPass(dap2a, -kap);\n      c.Read(dap2b TAIL, -kap);\n      c.WriteAllPass(dap2b, kap);\n      c.Write(del2, 2.0f);\n      c.Write(wet, 0.0f);\n\n      *in_out_r += (wet - *in_out_r) * amount;\n      \n      ++in_out_r;\n      ++in_out_l;\n    }\n    \n    lp_decay_1_ = lp_1;\n    lp_decay_2_ = lp_2;\n  }\n  \n  inline void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n  inline void set_input_gain(float input_gain) {\n    input_gain_ = input_gain;\n  }\n\n  inline void set_time(float reverb_time) {\n    reverb_time_ = reverb_time;\n  }\n  \n  inline void set_diffusion(float diffusion) {\n    diffusion_ = diffusion;\n  }\n  \n  inline void set_lp(float lp) {\n    lp_ = lp;\n  }\n  \n private:\n  typedef FxEngine<16384, FORMAT_16_BIT> E;\n  E engine_;\n  \n  float amount_;\n  float input_gain_;\n  float reverb_time_;\n  float diffusion_;\n  float lp_;\n  \n  float lp_decay_1_;\n  float lp_decay_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Reverb);\n};\n\n}  // namespace clouds\n\n#endif  // CLOUDS_DSP_FX_REVERB_H_\n"
  },
  {
    "path": "lib/drumsynth/drumsynth.cpp",
    "content": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#define private public\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/resources.h\"\n#include \"misc/noise.hxx\"\n#include \"misc/Biquad.h\"\n#include \"drumsynth.h\"\n#include \"string.h\"\n#include \"misc/cubic_spline.hxx\"\n\n#ifndef CONSTRAIN\n#define CONSTRAIN(x, min, max) ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))\n#endif\n\n#ifndef __SAMPLE_RATE\nconstexpr float __SAMPLE_RATE = 48000.f;\n#endif\n\ninline float dB2amp(float dB)\n{\n    return expf(dB * 0.11512925464970228420089957273422f); // return pow(10.0, (0.05*dB)); // naive, inefficient version\n}\n\nclass Envelope\n{\n    const EnvArgs *args_;\n\npublic:\n    void init(const EnvArgs *args)\n    {\n        args_ = args;\n        value_ = 0.f;\n        e_ = 0.0001f;\n        c_ = 1.0f;\n        segment_ = 0;\n\n        if (args_->n == 0)\n        {\n            value_ = 1.f;\n            pos_ = 0;\n            len_ = 0;\n        }\n        else if (args_->n == 1)\n        {\n            value_ = args_->xy[0].v;\n            pos_ = 0;\n            len_ = 0;\n        }\n        else\n        {\n            if (args_->xy[0].t == 0)\n                value_ = args_->xy[0].v;\n        }\n    }\n\n    // e = s * c ^ l\n    inline float calc_c(float start, float end, int len)\n    {\n        if (fabsf(start - end) < __FLT_EPSILON__)\n            return 1.f;\n        else\n        {\n            return powf(e_ + (end / start), 1.0f / len);\n        }\n    }\n\n    inline void process(uint32_t t, float stretch)\n    {\n        if (t == 0) // restart\n        {\n            pos_ = 0;\n            len_ = 0;\n            segment_ = 0;\n        }\n\n        if (pos_ < len_)\n        {\n            value_ *= c_;\n            ++pos_;\n        }\n        else if (segment_ < (args_->n - 1))\n        {\n            int32_t i = segment_;\n            while (i++ < (args_->n - 2))\n                if (args_->xy[i - 1].v < args_->xy[i].v)\n                {\n                    stretch = 1;\n                    break;\n                }\n\n            pos_ = 0;\n            len_ = (args_->xy[segment_ + 1].t - args_->xy[segment_].t) * stretch;\n            value_ = args_->xy[segment_].v;\n            c_ = calc_c(value_, args_->xy[segment_ + 1].v, len_);\n            segment_++;\n        }\n    }\n\n    inline bool finished()\n    {\n        return pos_ != 0 && pos_ == len_;\n    }\n\n    inline float value()\n    {\n        return value_;\n    }\n\nprivate:\n    int32_t segment_;\n    uint32_t len_;\n    uint32_t pos_;\n\n    float value_;\n    float c_;\n    float e_;\n};\n\nclass Oscillator\n{\npublic:\n    void Init(float freq)\n    {\n        pw_ = 0.5f;\n        phase_inc_ = freq / __SAMPLE_RATE;\n        f_ = freq;\n        osc.Init();\n    }\n\n    inline void reset()\n    {\n        osc.Init();\n    }\n\n    inline void pitch(float pitch)\n    {\n        phase_inc_ = f_ * pitch / __SAMPLE_RATE;\n    }\n\n    inline void duty(float duty)\n    {\n        pw_ = duty;\n    }\n\n    inline void Square(float &out)\n    {\n        this->osc.Render<plaits::OSCILLATOR_SHAPE_SQUARE>(phase_inc_, pw_, &out, 1);\n    }\n\n    inline void Saw(float &out)\n    {\n        this->osc.Render<plaits::OSCILLATOR_SHAPE_SAW>(phase_inc_, pw_, &out, 1);\n    }\n\n    inline void Tri(float &out)\n    {\n        this->osc.Render<plaits::OSCILLATOR_SHAPE_TRIANGLE>(phase_inc_, pw_, &out, 1);\n    }\n\n    // float fm = 2.f;\n    // float fm_amp = 0.05f;\n    // float fm_phase = 0.5f;\n    inline void Metallic(float &out2)\n    {\n        float out = osc.phase_ < pw_ ? 1.f : -1.f;\n\n        // float fm_ = stmlib::Interpolate(plaits::lut_sine, fm_phase, 1024.0f) * fm_amp;\n        // fm_phase += phase_inc_ / fm;\n        // if (fm_phase > 1.0f)\n        //     fm_phase -= 1.00f;\n\n        osc.phase_ += phase_inc_; // * (1.f + fm_);\n        if (osc.phase_ > 1.0f)\n            osc.phase_ -= 1.00f;\n\n        out2 += out;\n    }\n\n    inline void Sine(float &out)\n    {\n        // #define PI_F 3.1415927410125732421875f\n        // out = sinf((0.25f + osc.phase_) * PI_F * 2.f);\n\n        out = -stmlib::Interpolate(plaits::lut_sine + 128, osc.phase_, 512.0f);\n\n        osc.phase_ += phase_inc_;\n        if (osc.phase_ > 1.0f)\n            osc.phase_ -= 1.0f;\n    }\n\nprivate:\n    float phase_inc_, pw_, f_, amp2_;\n    plaits::Oscillator osc;\n};\n\nstruct drum_synth_Part\n{\n    Oscillator *_osc = nullptr;\n    stmlib::DCBlocker _dc_blocker;\n\n    WhiteNoise noise = {};\n    Envelope _amp = {};\n    Envelope _pitch = {};\n    Envelope _vca = {};\n    Biquad biquad1 = {};\n    Biquad biquad2 = {};\n\n    std::pair<float, float> biquadA[2] = {};\n    std::pair<float, float> biquadB[2] = {};\n\n    const PartArgs *part;\n\n    float amp = 1.f;\n    cspline waveshaper = {};\n\n    void init(const PartArgs *part)\n    {\n        this->part = part;\n\n        _amp.init(&part->osc_amp);\n        _pitch.init(&part->osc_pitch);\n        _vca.init(&part->vca);\n\n        _dc_blocker.Init(0.99f);\n\n        const auto &a = part->bq1;\n        if (a.mode)\n            biquad1.setBiquad(a.mode - 1, a.f / __SAMPLE_RATE, a.q, a.g);\n        const auto &b = part->bq2;\n        if (b.mode)\n            biquad2.setBiquad(b.mode - 1, b.f / __SAMPLE_RATE, b.q, b.g);\n\n        if (part->osc.type == OSC_METALLIC)\n        {\n            amp = dB2amp(-26.f);\n\n            float r = (logf(part->osc.fb) - logf(part->osc.fa)) / (part->osc.n - 1);\n\n            for (size_t i = 0; i < part->osc.n; i++)\n            {\n                float f = i == 0 ? 1 : expf(r * i);\n\n                _osc[i].Init(part->osc.fa * f);\n                _osc[i].duty(part->osc.duty);\n            }\n        }\n        else\n        {\n            amp = 1.f - __FLT_EPSILON__; // 0.4380016479995117f;\n            _osc[0].Init(part->osc.fa);\n        }\n\n        if (part->ws.n)\n        {\n            cspline_init(&this->waveshaper, &part->ws.xy[0].x, &part->ws.xy[0].y, part->ws.n, 2);\n        }\n    }\n\n    void free()\n    {\n        if (part->ws.n)\n            cspline_free(&this->waveshaper);\n    }\n\n    float waveshaper_transform(float a)\n    {\n        CONSTRAIN(a, -1.f + __FLT_EPSILON__, 1.f - __FLT_EPSILON__);\n        a = cspline_eval(&this->waveshaper, a);\n        CONSTRAIN(a, -1.f + __FLT_EPSILON__, 1.f - __FLT_EPSILON__);\n        return a;\n    }\n\n    inline void reset()\n    {\n        for (size_t j = 0; j < this->part->osc.n; j++)\n            this->_osc[j].reset();\n\n        memset(&this->biquadA, 0, sizeof(this->biquadA));\n        memset(&this->biquadB, 0, sizeof(this->biquadB));\n    }\n\n    uint32_t last_f = 0;\n\n    inline void process_frame(float f, const DrumParams *params, float *outL, float *outR, size_t size)\n    {\n        uint32_t t = params->t;\n        float osc = 0;\n        float osc2 = 0;\n        uint32_t ff = f * __SAMPLE_RATE;\n\n        // if (t > 0 && this->_amp.finished() && this->_vca.finished())\n        // {\n        //     return;\n        // }\n\n        while (size--)\n        {\n            this->_amp.process(t, params->decay);\n            this->_vca.process(t, params->decay);\n            this->_pitch.process(t, params->decay);\n\n            ++t;\n\n            float vca = this->_vca.value();\n\n            if( vca < (1.f / INT16_MAX))\n            {\n                *outL++ = 0.f;\n                *outR++ = 0.f;\n                continue;\n            }\n\n            // if (this->_amp.value() < (1.f / INT16_MAX) || this->_vca.value() < (1.f / INT16_MAX))\n            // {\n            //     out++;\n            //     continue;\n            // }\n\n            switch (part->osc.type)\n            {\n            case OSC_NOISE1:\n            case OSC_NOISE2:\n            {\n                float a = this->noise.nextf(-1, 1);\n                float b = this->noise.nextf(-1, 1);\n                float st = 0.5f - (params->stereo / 2);\n                osc = (a * (1 - st) + b * st);\n                osc2 = (b * (1 - st) + a * st);\n            }\n            break;\n            case OSC_METALLIC:\n\n                osc = 0;\n                for (size_t j = 0; j < part->osc.n; j++)\n                {\n                    // this->_osc[j].pitch(this->_pitch.value() * f);\n                    this->_osc[j].pitch(f);\n                    this->_osc[j].Metallic(osc);\n                }\n\n                _dc_blocker.Process(&osc, 1);\n                break;\n\n            case OSC_SINE:\n\n                this->_osc[0].pitch(this->_pitch.value() * f);\n                this->_osc[0].Sine(osc);\n                break;\n            case OSC_SQUARE:\n\n                this->_osc[0].pitch(this->_pitch.value() * f);\n                this->_osc[0].Square(osc);\n                break;\n            case OSC_SAW:\n\n                this->_osc[0].pitch(this->_pitch.value() * f);\n                this->_osc[0].Saw(osc);\n                break;\n            case OSC_TRI:\n\n                this->_osc[0].pitch(this->_pitch.value() * f);\n                this->_osc[0].Tri(osc);\n                break;\n            default:\n                return;\n            }\n\n            if (part->flags & BIQUAD_SERIAL)\n            {\n                osc *= amp;\n                osc *= this->_amp.value();\n\n                if (part->bq1.mode)\n                {\n                    if (last_f != ff)\n                    {\n                        this->biquad1.setFc(part->bq1.f / __SAMPLE_RATE * f);\n                    }\n\n                    osc = this->biquad1.process(osc, this->biquadA[0].first, this->biquadA[0].second);\n                    if (part->bq1.mode < BIQUAD_NOTCH)\n                        osc *= part->bq1.g;\n                }\n\n                if (part->ws.n)\n                    osc = waveshaper_transform(osc);\n\n                if (part->bq2.mode)\n                {\n                    if (last_f != ff)\n                    {\n                        this->biquad2.setFc(part->bq2.f / __SAMPLE_RATE * f);\n                    }\n\n                    osc = this->biquad2.process(osc, this->biquadA[1].first, this->biquadA[1].second);\n                    if (part->bq2.mode < BIQUAD_NOTCH)\n                        osc *= part->bq2.g;\n                }\n\n                if (params->stereo > 0 && (part->osc.type == OSC_NOISE1 || part->osc.type == OSC_NOISE2))\n                {\n                    osc2 *= amp;\n                    osc2 *= this->_amp.value();\n\n                    if (part->bq1.mode)\n                    {\n                        osc2 = this->biquad1.process(osc2, this->biquadB[0].first, this->biquadB[0].second);\n                        if (part->bq1.mode < BIQUAD_NOTCH)\n                            osc2 *= part->bq1.g;\n                    }\n\n                    if (part->ws.n)\n                        osc2 = waveshaper_transform(osc2);\n\n                    if (part->bq2.mode)\n                    {\n                        osc2 = this->biquad2.process(osc2, this->biquadB[1].first, this->biquadB[1].second);\n                        if (part->bq2.mode < BIQUAD_NOTCH)\n                            osc2 *= part->bq2.g;\n                    }\n                }\n                else\n                {\n                    osc2 = osc;\n                }\n            }\n            else if (part->flags & BIQUAD_PARALLEL)\n            {\n                if (part->bq1.mode)\n                    osc = this->biquad1.process(osc) * part->bq1.g;\n                if (part->bq2.mode)\n                    osc = this->biquad2.process(osc) * part->bq2.g;\n\n                if (part->ws.n)\n                    osc = waveshaper_transform(osc);\n\n                osc2 = osc;\n            }\n\n            *outL++ = osc * vca * part->level * params->levelL * 0.8f;\n            *outR++ = osc2 * vca * part->level * params->levelR * 0.8f;\n            CONSTRAIN(*(outL - 1), -1.f, 1.f);\n            CONSTRAIN(*(outR - 1), -1.f, 1.f);\n        }\n\n        last_f = ff;\n    }\n};\n\nextern \"C\" DrumSynth drum_synth_init(const DrumModel *inst, void *(*malloc)(size_t size))\n{\n    if (malloc == nullptr)\n        malloc = ::malloc;\n\n    const size_t malloc_size = (sizeof(inst->n) + (sizeof(drum_synth_Part) * inst->n));\n\n    if (auto p = (DrumSynth)malloc(malloc_size))\n    {\n        p[0] = inst->n;\n        auto _part = (drum_synth_Part *)&p[1];\n\n        for (size_t i = 0; i < inst->n; i++)\n        {\n            new (&_part[i]) drum_synth_Part();\n            auto osc_n = std::max<uint32_t>(1, inst->part[i].osc.n);\n            _part[i]._osc = new (malloc(sizeof(Oscillator) * osc_n)) Oscillator[osc_n]{};\n            _part[i].init(&inst->part[i]);\n        }\n        return p;\n    }\n\n    return nullptr;\n}\n\nextern \"C\" void drum_synth_deinit(DrumSynth p, void (*free)(void* ptr))\n{\n    if (free == nullptr)\n        free = ::free;\n\n    if (p)\n    {\n        size_t n = p[0];\n        auto _part = (drum_synth_Part *)&p[1];\n        for (size_t i = 0; i < n; i++)\n        {\n            free(_part[i]._osc);\n        }\n        free(p);\n    }\n}\n\nextern \"C\" void drum_synth_reset(DrumSynth inst)\n{\n    if (inst)\n    {\n        auto _part = (drum_synth_Part *)&inst[1];\n        for (size_t e = 0; e < inst[0]; e++)\n        {\n            _part[e].reset();\n        }\n    }\n}\nextern \"C\" void drum_synth_process_frame(DrumSynth inst, int part, float freq, const DrumParams *params, float *outL, float *outR, size_t size)\n{\n    if (inst)\n    {\n        auto _part = (drum_synth_Part *)&inst[1];\n        if (part >= 0)\n        {\n            _part[part].process_frame(freq, params, outL, outR, size);\n        }\n        else\n        {\n            float tmpL[size];\n            float tmpR[size];\n            size_t skip = -1;\n\n            for (size_t part = 0; part < inst[0]; part++)\n            {\n                if (skip == part)\n                    continue;\n\n                _part[part].process_frame(freq, params, tmpL, tmpR, size);\n\n                if (part == 0 && _part[part].part->amp_mod.dest != 0)\n                {\n                    skip = _part[part].part->amp_mod.dest;\n                    float modL[size];\n                    float modR[size];\n                    _part[_part[part].part->amp_mod.dest].process_frame(freq, params, modL, modR, size);\n\n                    for (size_t j = 0; j < size; j++)\n                    {\n                        outL[j] += tmpL[j] * modL[j];\n                        outR[j] += tmpR[j] * modR[j];\n                    }\n                }\n                else\n                {\n                    for (size_t j = 0; j < size; j++)\n                    {\n                        outL[j] += tmpL[j];\n                        outR[j] += tmpR[j];\n                    }\n                }\n            }\n        }\n    }\n}\n\nextern \"C\" int drum_synth_load_models(const uint8_t *drumkit, DrumModel _instModel[16], void *(*malloc)(size_t size))\n{\n    if (drumkit == nullptr)\n        return 0;\n\n    if (drumkit[0] == '!' && drumkit[1] == 'R' && drumkit[2] == 'C' && drumkit[3] == '8')\n        drumkit += 4;\n    else\n        return 0;\n\n    int inst_count = 0;\n    const uint8_t *p = drumkit;\n    p += 4;\n    for (size_t i = 0; i < drumkit[0]; i++)\n    {\n        _instModel[i].name = reinterpret_cast<const char *>(p);\n        p += 11;\n\n        _instModel[i].midi_note = *reinterpret_cast<const uint8_t *>(p);\n        p += sizeof(uint8_t);\n\n        _instModel[i].n = *reinterpret_cast<const size_t *>(p);\n        p += sizeof(_instModel[i].n);\n\n        PartArgs *part = new (malloc(sizeof(PartArgs) * _instModel[i].n)) PartArgs[_instModel[i].n]{};\n        _instModel[i].part = part;\n\n        for (size_t j = 0; j < _instModel[i].n; j++)\n        {\n            part->flags = *reinterpret_cast<const PartFlags *>(p);\n            p += sizeof(part->flags);\n\n            part->osc = *reinterpret_cast<const OscArgs *>(p);\n            p += sizeof(part->osc);\n\n            part->osc_pitch.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->osc_pitch.n);\n            part->osc_pitch.xy = reinterpret_cast<const EnvXY *>(p);\n            if (part->osc_pitch.xy[part->osc_pitch.n - 1].t > 0)\n            {\n                // OK\n            }\n            int k = part->osc_pitch.n;\n            p += sizeof(EnvXY) * k;\n\n            part->osc_amp.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->osc_amp.n);\n            part->osc_amp.xy = reinterpret_cast<const EnvXY *>(p);\n            if (part->osc_amp.xy[part->osc_amp.n - 1].t > 0)\n            {\n                // OK\n            }\n            k = part->osc_amp.n;\n            p += sizeof(EnvXY) * k;\n\n            part->vca.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->vca.n);\n            part->vca.xy = reinterpret_cast<const EnvXY *>(p);\n            if (part->vca.xy[part->vca.n - 1].t > 0)\n            {\n                // OK\n            }\n            k = part->vca.n;\n            p += sizeof(EnvXY) * k;\n\n            part->bq1 = *reinterpret_cast<const BiquadArgs *>(p);\n            p += sizeof(BiquadArgs);\n\n            part->bq2 = *reinterpret_cast<const BiquadArgs *>(p);\n            p += sizeof(BiquadArgs);\n\n            part->ws.n = *reinterpret_cast<const uint32_t *>(p);\n            p += sizeof(part->ws.n);\n            part->ws.xy = reinterpret_cast<const WS_XY *>(p);\n            if (part->ws.xy[part->ws.n - 1].x > 0)\n            {\n                // OK\n            }\n            k = part->ws.n;\n            p += sizeof(WS_XY) * k;\n\n            if (part->flags & VCF)\n            {\n                part->vcf = reinterpret_cast<const VCFArgs *>(p);\n                p += sizeof(*part->vcf);\n\n                part->vcf_env.n = *reinterpret_cast<const uint32_t *>(p);\n                p += sizeof(part->vcf_env.n);\n                part->vcf_env.xy = reinterpret_cast<const EnvXY *>(p);\n                if (part->vcf_env.xy[part->vcf_env.n - 1].t > 0)\n                {\n                    // OK\n                }\n                k = part->vcf_env.n;\n                p += sizeof(EnvXY) * k;\n            }\n\n            part->amp_mod.dest = *reinterpret_cast<const uint32_t *>(p);\n            p += sizeof(part->amp_mod.dest);\n            part->amp_mod.offset = *reinterpret_cast<const float *>(p);\n            p += sizeof(part->amp_mod.offset);\n\n            part->level = *reinterpret_cast<const float *>(p);\n            p += sizeof(part->level);\n            part++;\n        }\n        inst_count++;\n    }\n\n    return inst_count;\n}\n\nfloat drum_synth_process_ws(DrumSynth inst, int part, float x)\n{\n    auto _part = (drum_synth_Part *)&inst[1];\n    if (part >= 0 && _part[part].part->ws.n)\n    {\n        return _part[part].waveshaper_transform(x);\n    }\n\n    return x;\n}\n"
  },
  {
    "path": "lib/drumsynth/drumsynth.h",
    "content": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#pragma once\n\n#include <inttypes.h>\n#include <stddef.h>\n#include <array>\n\nstruct EnvXY\n{\n    uint32_t t;\n    float v;\n};\n\nstruct EnvArgs\n{\n    int32_t n;\n    const EnvXY *xy; //[16];\n};\n\nstruct WS_XY\n{\n    float x;\n    float y;\n};\n\nstruct WSArgs\n{\n    uint32_t n;\n    const WS_XY *xy; //[8];\n};\n\nenum BiquadMode : uint32_t\n{\n    BIQUAD_THRU = 0,\n    BIQUAD_LP,\n    BIQUAD_HP,\n    BIQUAD_BP,\n    BIQUAD_NOTCH,\n    BIQUAD_PKG,\n    BIQUAD_LSV,\n    BIQUAD_HSV,\n};\n\nstruct BiquadArgs\n{\n    BiquadMode mode;\n    float f;\n    float q;\n    float g;\n};\n\nenum OscType : uint32_t\n{\n    OSC_NONE = 0,\n    OSC_SINE = 1,\n    OSC_SAW,\n    OSC_TRI,\n    OSC_SQUARE,\n    OSC_METALLIC,\n    OSC_NOISE1,\n    OSC_NOISE2,\n    OSC_NOISE3,\n    OSC_NOISE_NES,\n    OSC_NOISE_SID,\n};\n\nstruct OscArgs\n{\n    OscType type;\n    float fa;\n    float fb;\n    float duty;\n    uint32_t n;\n};\n\nstruct AmpMod\n{\n    uint32_t dest;\n    float offset;\n};\n\nstruct VCFArgs\n{\n    float cutoff;\n    float res;\n    float envDepth;\n    float velDepth;\n};\n\nenum PartFlags : uint32_t\n{\n    BIQUAD_SERIAL = 1 << 1,\n    BIQUAD_PARALLEL = 1 << 2,\n    VCF = 1 << 3,\n};\n\nstruct PartArgs\n{\n    PartFlags flags;\n    OscArgs osc;\n    EnvArgs osc_pitch;\n    EnvArgs osc_amp;\n    EnvArgs vca;\n    BiquadArgs bq1;\n    BiquadArgs bq2;\n    WSArgs ws;\n    const VCFArgs *vcf;\n    EnvArgs vcf_env;\n    AmpMod amp_mod;\n    float level;\n};\n\nstruct DrumModel\n{\n    const char *name;\n    uint8_t midi_note;\n    size_t n;\n    const PartArgs *part;\n};\n\nstruct DrumParams\n{\n    uint32_t t;\n    float attack;\n    float decay;\n    float stereo;\n    float levelL;\n    float levelR;\n};\n\nstruct DrumKit\n{\n    int n;\n    const DrumModel *inst;\n};\n\ntypedef uint32_t *DrumSynth;\n\nextern \"C\"\n{\n    DrumSynth drum_synth_init(const DrumModel *inst, void *(*malloc)(size_t size));\n    void drum_synth_deinit(DrumSynth inst, void (*free)(void* ptr));\n    void drum_synth_process_frame(DrumSynth inst, int part, float freq, const DrumParams *params, float *outL, float *outR, size_t size);\n    void drum_synth_reset(DrumSynth inst);\n    int drum_synth_load_models(const uint8_t *drumkit, DrumModel _instModel[16], void *(*malloc)(size_t size));\n}"
  },
  {
    "path": "lib/drumsynth/drumsynth_claps.h",
    "content": "#include <inttypes.h>\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\nconst uint8_t drum_synth_claps[] FLASHMEM = {\n\t0xa, 0x0, 0x0, 0x0, 0x43, 0x6c, 0x61, 0x70, 0x39, 0x30, \n\t0x39, 0x0, 0x43, 0x6c, 0x61, 0x70, 0x3, 0x0, 0x0, 0x0, \n\t0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0xdf, 0x1, 0x0, 0x0, 0x56, 0x38, 0x81, 0x3d, 0xe0, 0x1, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xbf, 0x3, 0x0, 0x0, \n\t0x56, 0x38, 0x81, 0x3d, 0xc0, 0x3, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0x2f, 0x6, 0x0, 0x0, 0x56, 0x38, 0x81, 0x3d, \n\t0x30, 0x6, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xbf, 0x2d, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x2, 0x0, 0x0, 0x0, 0x0, 0x80, 0x9, 0x44, 0x2f, 0xdd, \n\t0xe4, 0x3e, 0x7, 0xb7, 0x5, 0x40, 0x3, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x63, 0x44, 0xba, 0x49, 0x8c, 0x3f, 0xbf, 0xc2, \n\t0x20, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x20, 0x40, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0xdf, 0x1, 0x0, 0x0, 0x56, 0x38, \n\t0x81, 0x3d, 0xe0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0xbf, 0x3, 0x0, 0x0, 0x56, 0x38, 0x81, 0x3d, 0xc0, 0x3, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x2f, 0x6, 0x0, 0x0, \n\t0x56, 0x38, 0x81, 0x3d, 0x30, 0x6, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0xbf, 0x2d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x40, \n\t0xfa, 0x45, 0xaa, 0xf1, 0x82, 0x3f, 0x4f, 0x8, 0x86, 0x3f, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x63, 0x60, 0x34, 0x3f, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xff, 0xe0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, \n\t0x0, 0x0, 0x0, 0x80, 0x5b, 0x44, 0x8, 0xac, 0xac, 0x3f, \n\t0x0, 0x0, 0x80, 0x3f, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x54, 0x44, 0x8, 0xac, 0xac, 0x3f, 0x7, 0xb7, 0x5, 0x40, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x43, \n\t0x7, 0x3f, 0x43, 0x6c, 0x61, 0x70, 0x38, 0x30, 0x38, 0x0, \n\t0x43, 0x50, 0x38, 0x30, 0x2, 0x0, 0x0, 0x0, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x40, 0x2, 0x0, 0x0, \n\t0x6c, 0xc0, 0x7d, 0x3d, 0x70, 0x2, 0x0, 0x0, 0x36, 0x7, \n\t0x5f, 0x3f, 0xb0, 0x4, 0x0, 0x0, 0xdf, 0xca, 0x54, 0x3d, \n\t0xe0, 0x4, 0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0x20, 0x7, \n\t0x0, 0x0, 0x6c, 0xc0, 0x7d, 0x3d, 0x50, 0x7, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0x20, 0x40, 0x0, 0x0, 0xac, 0xc5, \n\t0x27, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xd0, 0xe, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x10, 0x86, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x1e, 0x44, 0x7d, 0x3f, 0xf5, 0x3e, \n\t0x49, 0x4, 0xc, 0x40, 0x3, 0x0, 0x0, 0x0, 0x0, 0x40, \n\t0x73, 0x44, 0x31, 0x8, 0xc, 0x40, 0x7b, 0x86, 0x19, 0x40, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x20, 0x40, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xac, 0xc5, \n\t0x27, 0x37, 0xe0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x50, 0xa5, 0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x80, 0x77, 0x44, \n\t0x66, 0x66, 0x96, 0x3f, 0x65, 0x7a, 0x74, 0x3f, 0x3, 0x0, \n\t0x0, 0x0, 0x0, 0x40, 0x73, 0x44, 0xaa, 0xf1, 0x82, 0x3f, \n\t0x4f, 0x8, 0x86, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0xa6, 0x84, 0xbf, 0x3e, 0x43, 0x50, 0x38, 0x30, \n\t0x38, 0x5f, 0x34, 0x5f, 0x31, 0x34, 0x0, 0x43, 0x2, 0x0, \n\t0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0x32, 0x3, 0x0, 0x0, 0xa5, 0x30, 0x1f, 0x3e, \n\t0x43, 0x3, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x53, 0x6, \n\t0x0, 0x0, 0xa5, 0x30, 0x1f, 0x3e, 0x65, 0x6, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0xcb, 0x9, 0x0, 0x0, 0x63, 0x80, \n\t0xc4, 0x3d, 0xee, 0x9, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0xcb, 0x4f, 0x0, 0x0, 0x8b, 0xe1, 0x6a, 0x38, 0x7d, 0x76, \n\t0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x15, 0x26, 0x1a, 0x44, \n\t0x44, 0xfb, 0x82, 0x3f, 0x6b, 0x9e, 0xeb, 0x3f, 0x3, 0x0, \n\t0x0, 0x0, 0x88, 0xfc, 0x30, 0x44, 0x7b, 0xbe, 0x16, 0x3f, \n\t0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x20, 0x40, 0x2, 0x0, 0x0, 0x0, \n\t0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x23, 0x69, 0xb7, 0x3d, 0x32, 0xd, 0x0, 0x0, \n\t0x3a, 0x7, 0x5f, 0x3f, 0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, \n\t0x27, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, \n\t0xab, 0xbd, 0x59, 0x44, 0xf, 0x63, 0x96, 0x3f, 0x0, 0x0, \n\t0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, 0xcc, 0x8c, 0x3f, \n\t0x43, 0x50, 0x38, 0x30, 0x38, 0x31, 0x30, 0x5f, 0x33, 0x30, \n\t0x0, 0x43, 0x3, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, \n\t0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0x14, 0x4, 0x0, 0x0, 0xed, 0xf3, \n\t0xd0, 0x3e, 0x24, 0x7, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x55, 0xd, 0x0, 0x0, 0xdc, 0xd5, 0x2b, 0x3d, 0x37, 0xe, \n\t0x0, 0x0, 0x90, 0x4d, 0x42, 0x3f, 0xae, 0x14, 0x0, 0x0, \n\t0x75, 0x75, 0xc7, 0x3b, 0xd6, 0x15, 0x0, 0x0, 0x2a, 0x0, \n\t0x1e, 0x3f, 0x7b, 0x25, 0x0, 0x0, 0xa4, 0x8c, 0x38, 0x37, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, \n\t0x81, 0x21, 0x16, 0x44, 0x2e, 0x4, 0xb9, 0x3f, 0x60, 0xaf, \n\t0x8b, 0x40, 0x2, 0x0, 0x0, 0x0, 0x3e, 0xde, 0x20, 0x44, \n\t0x25, 0xe6, 0xf3, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, 0xcc, 0x4, 0x40, \n\t0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x65, 0x36, 0x48, 0x3b, 0x55, 0x3, \n\t0x0, 0x0, 0x0, 0x38, 0x76, 0x3b, 0xcf, 0x3, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0xa8, 0x9, 0x0, 0x0, 0x1a, 0x19, \n\t0x64, 0x3c, 0x11, 0xa, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x6, 0x12, 0x0, 0x0, 0x12, 0x30, 0xba, 0x3b, 0x29, 0x12, \n\t0x0, 0x0, 0xd1, 0xe9, 0xa9, 0x3e, 0x65, 0x56, 0x0, 0x0, \n\t0xa4, 0x8c, 0x38, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x2, 0x0, 0x0, 0x0, 0x80, 0x57, 0x5f, 0x44, 0xd6, 0xab, \n\t0x2, 0x40, 0xb7, 0x5e, 0x68, 0x40, 0x3, 0x0, 0x0, 0x0, \n\t0xd8, 0x7b, 0x73, 0x44, 0xd2, 0xaa, 0xac, 0x3f, 0x0, 0x0, \n\t0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x54, 0xe3, 0xc1, 0x3f, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x23, 0x69, 0xb7, 0x3d, 0x92, 0x12, 0x0, 0x0, 0x30, 0xf2, \n\t0x6e, 0x3f, 0x65, 0x56, 0x0, 0x0, 0xb6, 0x86, 0xd2, 0x3d, \n\t0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x5b, 0x48, \n\t0xa3, 0x44, 0xf, 0x63, 0x96, 0x3f, 0xb6, 0xf6, 0x92, 0x3f, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0xdd, 0x24, 0x2, 0x40, 0x43, 0x50, \n\t0x38, 0x30, 0x38, 0x5f, 0x32, 0x5f, 0x31, 0x38, 0x0, 0x43, \n\t0x2, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0xb8, 0x2, 0x0, 0x0, 0x57, 0x41, \n\t0x8c, 0x3c, 0xfe, 0x2, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0xa5, 0x5, 0x0, 0x0, 0x96, 0xea, 0x82, 0x3c, 0xd, 0x6, \n\t0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0x63, 0x9, 0x0, 0x0, \n\t0xa7, 0xc9, 0xc, 0x3c, 0xee, 0x9, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0xcb, 0x4f, 0x0, 0x0, 0x8b, 0xe1, 0x6a, 0x38, \n\t0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x9e, 0xf0, \n\t0x85, 0x44, 0xc7, 0x13, 0x2d, 0x3f, 0x69, 0x1b, 0xf1, 0x3f, \n\t0x2, 0x0, 0x0, 0x0, 0x9, 0x42, 0x6, 0x44, 0x20, 0xb8, \n\t0x46, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x40, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x23, 0x69, 0xb7, 0x3d, 0x51, 0x9, \n\t0x0, 0x0, 0x24, 0x7b, 0x0, 0x3f, 0xc3, 0x8, 0x1, 0x0, \n\t0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, \n\t0x0, 0x0, 0x9e, 0xf0, 0x85, 0x44, 0xf, 0x63, 0x96, 0x3f, \n\t0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x33, \n\t0x53, 0x3f, 0x43, 0x50, 0x38, 0x30, 0x38, 0x5f, 0x38, 0x5f, \n\t0x33, 0x33, 0x0, 0x43, 0x2, 0x0, 0x0, 0x0, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xf, 0x3, 0x0, 0x0, \n\t0xa5, 0x30, 0x1f, 0x3e, 0x55, 0x3, 0x0, 0x0, 0x3a, 0x7, \n\t0x5f, 0x3f, 0x1f, 0x6, 0x0, 0x0, 0x2a, 0xc4, 0x43, 0x3e, \n\t0x76, 0x6, 0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0x1d, 0x9, \n\t0x0, 0x0, 0xe1, 0x95, 0x14, 0x3e, 0x51, 0x9, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0xd6, 0xb, 0x0, 0x0, 0xed, 0xf3, \n\t0xd0, 0x3e, 0xe7, 0xb, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x55, 0xd, 0x0, 0x0, 0xca, 0xdd, 0xdf, 0x3e, 0xf7, 0xe, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xfe, 0x38, 0x1, 0x0, \n\t0xa4, 0x8c, 0x38, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, \n\t0x0, 0x0, 0x88, 0xfc, 0x30, 0x44, 0x6c, 0x7a, 0x74, 0x3f, \n\t0xa9, 0x84, 0xbf, 0x3f, 0x3, 0x0, 0x0, 0x0, 0x48, 0x6f, \n\t0x50, 0x44, 0x6c, 0x7a, 0x74, 0x3f, 0xf6, 0xeb, 0xe8, 0x3f, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x33, \n\t0x3, 0x40, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x23, 0x69, \n\t0xb7, 0x3d, 0x14, 0x4, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0xe2, 0x96, 0x0, 0x0, 0xff, 0x3e, 0xe3, 0x3c, 0x7d, 0x76, \n\t0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xb0, 0x7c, 0xa0, 0x44, \n\t0xf, 0x63, 0x96, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x79, 0xe9, 0x66, 0x3f, 0x43, 0x50, 0x38, 0x30, \n\t0x38, 0x5f, 0x35, 0x5f, 0x34, 0x32, 0x0, 0x43, 0x3, 0x0, \n\t0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x42, 0x6, 0x0, 0x0, 0xfb, 0xe8, 0x54, 0x3c, 0x53, 0x6, \n\t0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0xa1, 0xb, 0x0, 0x0, \n\t0x93, 0x8e, 0x72, 0x3d, 0x7b, 0x25, 0x0, 0x0, 0xa4, 0x8c, \n\t0x38, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xab, 0xbd, 0x59, 0x44, \n\t0x2e, 0x4, 0xb9, 0x3f, 0x50, 0x56, 0x28, 0x40, 0x2, 0x0, \n\t0x0, 0x0, 0xf7, 0xa4, 0x3d, 0x44, 0x25, 0xe6, 0xf3, 0x3f, \n\t0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0xe0, 0x3f, 0x2, 0x0, 0x0, 0x0, \n\t0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x65, 0x36, 0x48, 0x3b, 0x43, 0x3, 0x0, 0x0, 0xb2, 0xd5, \n\t0x65, 0x3b, 0x55, 0x3, 0x0, 0x0, 0x3a, 0x7, 0x5f, 0x3f, \n\t0x40, 0x9, 0x0, 0x0, 0xc3, 0xd4, 0x16, 0x3c, 0x51, 0x9, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x65, 0x56, 0x0, 0x0, \n\t0xa4, 0x8c, 0x38, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, \n\t0x9e, 0xf0, 0x85, 0x44, 0x64, 0x59, 0x8c, 0x3f, 0x60, 0xe5, \n\t0xa4, 0x3f, 0x3, 0x0, 0x0, 0x0, 0x9e, 0xf0, 0x85, 0x44, \n\t0xd2, 0xaa, 0xac, 0x3f, 0x95, 0x9d, 0x12, 0x40, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe0, 0x3f, \n\t0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x23, 0x69, 0xb7, 0x3d, \n\t0x92, 0x12, 0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0x3b, 0x4e, \n\t0x0, 0x0, 0x3d, 0x62, 0x74, 0x3c, 0x7d, 0x76, 0x1, 0x0, \n\t0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x3, 0x0, 0x0, 0x0, 0xf6, 0x31, 0xbd, 0x44, 0xf, 0x63, \n\t0x96, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x85, 0xeb, 0x81, 0x3f, 0x43, 0x50, 0x38, 0x56, 0x4f, 0x70, \n\t0x6e, 0x5f, 0x31, 0x35, 0x0, 0x43, 0x2, 0x0, 0x0, 0x0, \n\t0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xf, 0x3, \n\t0x0, 0x0, 0xa5, 0x30, 0x1f, 0x3e, 0x55, 0x3, 0x0, 0x0, \n\t0x3a, 0x7, 0x5f, 0x3f, 0x1f, 0x6, 0x0, 0x0, 0x2a, 0xc4, \n\t0x43, 0x3e, 0x76, 0x6, 0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, \n\t0x1d, 0x9, 0x0, 0x0, 0xe1, 0x95, 0x14, 0x3e, 0x51, 0x9, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xd6, 0xb, 0x0, 0x0, \n\t0xed, 0xf3, 0xd0, 0x3e, 0xe7, 0xb, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0x55, 0xd, 0x0, 0x0, 0xca, 0xdd, 0xdf, 0x3e, \n\t0xf7, 0xe, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xfe, 0x38, \n\t0x1, 0x0, 0xa4, 0x8c, 0x38, 0x37, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x2, 0x0, 0x0, 0x0, 0x88, 0xfc, 0x30, 0x44, 0x6c, 0x7a, \n\t0x74, 0x3f, 0xa9, 0x84, 0xbf, 0x3f, 0x3, 0x0, 0x0, 0x0, \n\t0xea, 0x84, 0x8f, 0x44, 0x6c, 0x7a, 0x74, 0x3f, 0x0, 0x0, \n\t0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x20, 0x40, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x23, 0x69, 0xb7, 0x3d, 0x14, 0x4, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0xe2, 0x96, 0x0, 0x0, 0xff, 0x3e, 0xe3, 0x3c, \n\t0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xf6, 0x31, \n\t0xbd, 0x44, 0xf, 0x63, 0x96, 0x3f, 0x0, 0x0, 0x80, 0x3f, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0xcd, 0xcc, 0x8c, 0x3f, 0x43, 0x50, \n\t0x38, 0x30, 0x38, 0x5f, 0x36, 0x5f, 0x34, 0x32, 0x0, 0x43, \n\t0x2, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x80, 0x3f, 0x32, 0x3, 0x0, 0x0, 0x1f, 0xbb, \n\t0xb, 0x3d, 0x43, 0x3, 0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, \n\t0x53, 0x6, 0x0, 0x0, 0x4c, 0x19, 0x38, 0x3d, 0x65, 0x6, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0xe9, 0x8, 0x0, 0x0, \n\t0x0, 0xca, 0x9f, 0x3d, 0xfa, 0x8, 0x0, 0x0, 0x0, 0x0, \n\t0x80, 0x3f, 0xcb, 0x4f, 0x0, 0x0, 0x8b, 0xe1, 0x6a, 0x38, \n\t0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x5b, 0x48, \n\t0xa3, 0x44, 0xd2, 0xaa, 0xac, 0x3f, 0x50, 0x56, 0x28, 0x40, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x89, 0x41, 0xe0, 0x3f, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x23, 0x69, 0xb7, 0x3d, 0x92, 0x12, \n\t0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, 0x3b, 0x4e, 0x0, 0x0, \n\t0x3d, 0x62, 0x74, 0x3c, 0x7d, 0x76, 0x1, 0x0, 0xac, 0xc5, \n\t0x27, 0x37, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, \n\t0x0, 0x0, 0xf6, 0x31, 0xbd, 0x44, 0xf, 0x63, 0x96, 0x3f, \n\t0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x2d, \n\t0x9a, 0x3f, 0x43, 0x50, 0x52, 0x4e, 0x44, 0x30, 0x0, 0x23, \n\t0x69, 0x6e, 0x63, 0x6c, 0x2, 0x0, 0x0, 0x0, 0x2, 0x0, \n\t0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x80, 0x3f, 0x42, 0x6, 0x0, 0x0, \n\t0xfb, 0xe8, 0x54, 0x3c, 0x53, 0x6, 0x0, 0x0, 0x30, 0xf2, \n\t0x6e, 0x3f, 0xa1, 0xb, 0x0, 0x0, 0x93, 0x8e, 0x72, 0x3d, \n\t0x7b, 0x25, 0x0, 0x0, 0xa4, 0x8c, 0x38, 0x37, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, \n\t0x0, 0x0, 0xab, 0xbd, 0x59, 0x44, 0x2e, 0x4, 0xb9, 0x3f, \n\t0x69, 0x53, 0xbd, 0x3f, 0x2, 0x0, 0x0, 0x0, 0xf7, 0xa4, \n\t0x3d, 0x44, 0x25, 0xe6, 0xf3, 0x3f, 0x0, 0x0, 0x80, 0x3f, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x33, \n\t0x3, 0x40, 0x2, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x23, 0x69, \n\t0xb7, 0x3d, 0x92, 0x12, 0x0, 0x0, 0x30, 0xf2, 0x6e, 0x3f, \n\t0x3b, 0x4e, 0x0, 0x0, 0x3d, 0x62, 0x74, 0x3c, 0x7d, 0x76, \n\t0x1, 0x0, 0xac, 0xc5, 0x27, 0x37, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0xf6, 0x31, 0xbd, 0x44, \n\t0xf, 0x63, 0x96, 0x3f, 0x0, 0x0, 0x80, 0x3f, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, \n\t0x0, 0x0, 0xcd, 0xcc, 0x8c, 0x3f, 0x0, 0x0, 0x0, 0x0, \n};"
  },
  {
    "path": "lib/faust/build.sh",
    "content": "\n\nfor f in *.dsp; do\nfaust ./$f -lang c > ./$f.h\ndone"
  },
  {
    "path": "lib/faust/djembe.dsp",
    "content": "//faust ./djembe.dsp -cn djembe > ./djembe.hxx\n\nimport(\"stdfaust.lib\");\n\nfreq = hslider(\"Freq\",0.5,0,1000,0.01):si.smoo;\nstrikePosition = hslider(\"Pos\",0.5,0,1,0.00001):si.smoo;\nstrikeSharpness = hslider(\"Sharpness\",0.5,0,5,0.00001):si.smoo;\ngain = 3;\ntrigger = button(\"trigger\");\n\nprocess = pm.djembe(freq,strikePosition,strikeSharpness,gain,trigger);\n"
  },
  {
    "path": "lib/faust/djembe.dsp.h",
    "content": "/* ------------------------------------------------------------\nname: \"djembe\"\nCode generated with Faust 2.37.3 (https://faust.grame.fr)\nCompilation options: -lang c -es 1 -single -ftz 0\n------------------------------------------------------------ */\n\n#ifndef  __mydsp_H__\n#define  __mydsp_H__\n\n#ifndef FAUSTFLOAT\n#define FAUSTFLOAT float\n#endif \n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <math.h>\n#include <stdint.h>\n#include <stdlib.h>\n\nstatic float mydsp_faustpower2_f(float value) {\n\treturn (value * value);\n}\n\n#ifndef FAUSTCLASS \n#define FAUSTCLASS mydsp\n#endif\n#ifdef __APPLE__ \n#define exp10f __exp10f\n#define exp10 __exp10\n#endif\n\ntypedef struct {\n\tint iRec3[2];\n\tint fSampleRate;\n\tfloat fConst1;\n\tfloat fConst2;\n\tFAUSTFLOAT fHslider0;\n\tfloat fConst3;\n\tfloat fRec4[2];\n\tfloat fRec2[3];\n\tfloat fRec1[3];\n\tFAUSTFLOAT fButton0;\n\tfloat fVec0[2];\n\tint iRec5[2];\n\tfloat fConst4;\n\tFAUSTFLOAT fHslider1;\n\tfloat fRec6[2];\n\tfloat fConst6;\n\tfloat fConst7;\n\tFAUSTFLOAT fHslider2;\n\tfloat fRec7[2];\n\tfloat fConst8;\n\tfloat fRec0[3];\n\tfloat fConst10;\n\tfloat fConst11;\n\tfloat fRec8[3];\n\tfloat fConst13;\n\tfloat fConst14;\n\tfloat fRec9[3];\n\tfloat fConst16;\n\tfloat fConst17;\n\tfloat fRec10[3];\n\tfloat fConst19;\n\tfloat fConst20;\n\tfloat fRec11[3];\n\tfloat fConst22;\n\tfloat fConst23;\n\tfloat fRec12[3];\n\tfloat fConst25;\n\tfloat fConst26;\n\tfloat fRec13[3];\n\tfloat fConst28;\n\tfloat fConst29;\n\tfloat fRec14[3];\n\tfloat fConst31;\n\tfloat fConst32;\n\tfloat fRec15[3];\n\tfloat fConst34;\n\tfloat fConst35;\n\tfloat fRec16[3];\n\tfloat fConst37;\n\tfloat fConst38;\n\tfloat fRec17[3];\n\tfloat fConst40;\n\tfloat fConst41;\n\tfloat fRec18[3];\n\tfloat fConst43;\n\tfloat fConst44;\n\tfloat fRec19[3];\n\tfloat fConst46;\n\tfloat fConst47;\n\tfloat fRec20[3];\n\tfloat fConst49;\n\tfloat fConst50;\n\tfloat fRec21[3];\n\tfloat fConst52;\n\tfloat fConst53;\n\tfloat fRec22[3];\n\tfloat fConst55;\n\tfloat fConst56;\n\tfloat fRec23[3];\n\tfloat fConst58;\n\tfloat fConst59;\n\tfloat fRec24[3];\n\tfloat fConst61;\n\tfloat fConst62;\n\tfloat fRec25[3];\n\tfloat fConst64;\n\tfloat fConst65;\n\tfloat fRec26[3];\n} mydsp;\n\nmydsp* newmydsp() { \n\tmydsp* dsp = (mydsp*)calloc(1, sizeof(mydsp));\n\treturn dsp;\n}\n\nvoid deletemydsp(mydsp* dsp) { \n\tfree(dsp);\n}\n\nvoid metadatamydsp(MetaGlue* m) { \n\tm->declare(m->metaInterface, \"compile_options\", \"-lang c -es 1 -single -ftz 0\");\n\tm->declare(m->metaInterface, \"envelopes.lib/ar:author\", \"Yann Orlarey, Stéphane Letz\");\n\tm->declare(m->metaInterface, \"envelopes.lib/author\", \"GRAME\");\n\tm->declare(m->metaInterface, \"envelopes.lib/copyright\", \"GRAME\");\n\tm->declare(m->metaInterface, \"envelopes.lib/license\", \"LGPL with exception\");\n\tm->declare(m->metaInterface, \"envelopes.lib/name\", \"Faust Envelope Library\");\n\tm->declare(m->metaInterface, \"envelopes.lib/version\", \"0.1\");\n\tm->declare(m->metaInterface, \"filename\", \"djembe.dsp\");\n\tm->declare(m->metaInterface, \"filters.lib/fir:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/fir:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/fir:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"filters.lib/highpass:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/highpass:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/iir:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/iir:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/iir:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"filters.lib/lowpass0_highpass1\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/lowpass0_highpass1:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/lowpass:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/lowpass:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/lowpass:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"filters.lib/name\", \"Faust Filters Library\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2s:author\", \"Julius O. Smith III\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2s:copyright\", \"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>\");\n\tm->declare(m->metaInterface, \"filters.lib/tf2s:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"filters.lib/version\", \"0.3\");\n\tm->declare(m->metaInterface, \"maths.lib/author\", \"GRAME\");\n\tm->declare(m->metaInterface, \"maths.lib/copyright\", \"GRAME\");\n\tm->declare(m->metaInterface, \"maths.lib/license\", \"LGPL with exception\");\n\tm->declare(m->metaInterface, \"maths.lib/name\", \"Faust Math Library\");\n\tm->declare(m->metaInterface, \"maths.lib/version\", \"2.5\");\n\tm->declare(m->metaInterface, \"name\", \"djembe\");\n\tm->declare(m->metaInterface, \"noises.lib/name\", \"Faust Noise Generator Library\");\n\tm->declare(m->metaInterface, \"noises.lib/version\", \"0.1\");\n\tm->declare(m->metaInterface, \"physmodels.lib/name\", \"Faust Physical Models Library\");\n\tm->declare(m->metaInterface, \"physmodels.lib/version\", \"0.1\");\n\tm->declare(m->metaInterface, \"platform.lib/name\", \"Generic Platform Library\");\n\tm->declare(m->metaInterface, \"platform.lib/version\", \"0.2\");\n\tm->declare(m->metaInterface, \"signals.lib/name\", \"Faust Signal Routing Library\");\n\tm->declare(m->metaInterface, \"signals.lib/version\", \"0.1\");\n}\n\nint getSampleRatemydsp(mydsp* dsp) {\n\treturn dsp->fSampleRate;\n}\n\nint getNumInputsmydsp(mydsp* dsp) {\n\treturn 0;\n}\nint getNumOutputsmydsp(mydsp* dsp) {\n\treturn 1;\n}\n\nvoid classInitmydsp(int sample_rate) {\n}\n\nvoid instanceResetUserInterfacemydsp(mydsp* dsp) {\n\tdsp->fHslider0 = (FAUSTFLOAT)0.5f;\n\tdsp->fButton0 = (FAUSTFLOAT)0.0f;\n\tdsp->fHslider1 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider2 = (FAUSTFLOAT)0.5f;\n}\n\nvoid instanceClearmydsp(mydsp* dsp) {\n\t/* C99 loop */\n\t{\n\t\tint l0;\n\t\tfor (l0 = 0; (l0 < 2); l0 = (l0 + 1)) {\n\t\t\tdsp->iRec3[l0] = 0;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l1;\n\t\tfor (l1 = 0; (l1 < 2); l1 = (l1 + 1)) {\n\t\t\tdsp->fRec4[l1] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l2;\n\t\tfor (l2 = 0; (l2 < 3); l2 = (l2 + 1)) {\n\t\t\tdsp->fRec2[l2] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l3;\n\t\tfor (l3 = 0; (l3 < 3); l3 = (l3 + 1)) {\n\t\t\tdsp->fRec1[l3] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l4;\n\t\tfor (l4 = 0; (l4 < 2); l4 = (l4 + 1)) {\n\t\t\tdsp->fVec0[l4] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l5;\n\t\tfor (l5 = 0; (l5 < 2); l5 = (l5 + 1)) {\n\t\t\tdsp->iRec5[l5] = 0;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l6;\n\t\tfor (l6 = 0; (l6 < 2); l6 = (l6 + 1)) {\n\t\t\tdsp->fRec6[l6] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l7;\n\t\tfor (l7 = 0; (l7 < 2); l7 = (l7 + 1)) {\n\t\t\tdsp->fRec7[l7] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l8;\n\t\tfor (l8 = 0; (l8 < 3); l8 = (l8 + 1)) {\n\t\t\tdsp->fRec0[l8] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l9;\n\t\tfor (l9 = 0; (l9 < 3); l9 = (l9 + 1)) {\n\t\t\tdsp->fRec8[l9] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l10;\n\t\tfor (l10 = 0; (l10 < 3); l10 = (l10 + 1)) {\n\t\t\tdsp->fRec9[l10] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l11;\n\t\tfor (l11 = 0; (l11 < 3); l11 = (l11 + 1)) {\n\t\t\tdsp->fRec10[l11] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l12;\n\t\tfor (l12 = 0; (l12 < 3); l12 = (l12 + 1)) {\n\t\t\tdsp->fRec11[l12] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l13;\n\t\tfor (l13 = 0; (l13 < 3); l13 = (l13 + 1)) {\n\t\t\tdsp->fRec12[l13] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l14;\n\t\tfor (l14 = 0; (l14 < 3); l14 = (l14 + 1)) {\n\t\t\tdsp->fRec13[l14] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l15;\n\t\tfor (l15 = 0; (l15 < 3); l15 = (l15 + 1)) {\n\t\t\tdsp->fRec14[l15] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l16;\n\t\tfor (l16 = 0; (l16 < 3); l16 = (l16 + 1)) {\n\t\t\tdsp->fRec15[l16] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l17;\n\t\tfor (l17 = 0; (l17 < 3); l17 = (l17 + 1)) {\n\t\t\tdsp->fRec16[l17] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l18;\n\t\tfor (l18 = 0; (l18 < 3); l18 = (l18 + 1)) {\n\t\t\tdsp->fRec17[l18] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l19;\n\t\tfor (l19 = 0; (l19 < 3); l19 = (l19 + 1)) {\n\t\t\tdsp->fRec18[l19] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l20;\n\t\tfor (l20 = 0; (l20 < 3); l20 = (l20 + 1)) {\n\t\t\tdsp->fRec19[l20] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l21;\n\t\tfor (l21 = 0; (l21 < 3); l21 = (l21 + 1)) {\n\t\t\tdsp->fRec20[l21] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l22;\n\t\tfor (l22 = 0; (l22 < 3); l22 = (l22 + 1)) {\n\t\t\tdsp->fRec21[l22] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l23;\n\t\tfor (l23 = 0; (l23 < 3); l23 = (l23 + 1)) {\n\t\t\tdsp->fRec22[l23] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l24;\n\t\tfor (l24 = 0; (l24 < 3); l24 = (l24 + 1)) {\n\t\t\tdsp->fRec23[l24] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l25;\n\t\tfor (l25 = 0; (l25 < 3); l25 = (l25 + 1)) {\n\t\t\tdsp->fRec24[l25] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l26;\n\t\tfor (l26 = 0; (l26 < 3); l26 = (l26 + 1)) {\n\t\t\tdsp->fRec25[l26] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l27;\n\t\tfor (l27 = 0; (l27 < 3); l27 = (l27 + 1)) {\n\t\t\tdsp->fRec26[l27] = 0.0f;\n\t\t}\n\t}\n}\n\nvoid instanceConstantsmydsp(mydsp* dsp, int sample_rate) {\n\tdsp->fSampleRate = sample_rate;\n\tfloat fConst0 = fminf(192000.0f, fmaxf(1.0f, (float)dsp->fSampleRate));\n\tdsp->fConst1 = (3.14159274f / fConst0);\n\tdsp->fConst2 = (44.0999985f / fConst0);\n\tdsp->fConst3 = (1.0f - dsp->fConst2);\n\tdsp->fConst4 = (0.00200000009f * fConst0);\n\tfloat fConst5 = powf(0.00100000005f, (1.66666663f / fConst0));\n\tdsp->fConst6 = (0.0f - (2.0f * fConst5));\n\tdsp->fConst7 = (6.28318548f / fConst0);\n\tdsp->fConst8 = mydsp_faustpower2_f(fConst5);\n\tfloat fConst9 = powf(0.00100000005f, (1.75438595f / fConst0));\n\tdsp->fConst10 = (0.0f - (2.0f * fConst9));\n\tdsp->fConst11 = mydsp_faustpower2_f(fConst9);\n\tfloat fConst12 = powf(0.00100000005f, (1.85185182f / fConst0));\n\tdsp->fConst13 = (0.0f - (2.0f * fConst12));\n\tdsp->fConst14 = mydsp_faustpower2_f(fConst12);\n\tfloat fConst15 = powf(0.00100000005f, (1.96078432f / fConst0));\n\tdsp->fConst16 = (0.0f - (2.0f * fConst15));\n\tdsp->fConst17 = mydsp_faustpower2_f(fConst15);\n\tfloat fConst18 = powf(0.00100000005f, (2.08333325f / fConst0));\n\tdsp->fConst19 = (0.0f - (2.0f * fConst18));\n\tdsp->fConst20 = mydsp_faustpower2_f(fConst18);\n\tfloat fConst21 = powf(0.00100000005f, (2.22222233f / fConst0));\n\tdsp->fConst22 = (0.0f - (2.0f * fConst21));\n\tdsp->fConst23 = mydsp_faustpower2_f(fConst21);\n\tfloat fConst24 = powf(0.00100000005f, (2.38095236f / fConst0));\n\tdsp->fConst25 = (0.0f - (2.0f * fConst24));\n\tdsp->fConst26 = mydsp_faustpower2_f(fConst24);\n\tfloat fConst27 = powf(0.00100000005f, (2.56410265f / fConst0));\n\tdsp->fConst28 = (0.0f - (2.0f * fConst27));\n\tdsp->fConst29 = mydsp_faustpower2_f(fConst27);\n\tfloat fConst30 = powf(0.00100000005f, (2.77777767f / fConst0));\n\tdsp->fConst31 = (0.0f - (2.0f * fConst30));\n\tdsp->fConst32 = mydsp_faustpower2_f(fConst30);\n\tfloat fConst33 = powf(0.00100000005f, (3.030303f / fConst0));\n\tdsp->fConst34 = (0.0f - (2.0f * fConst33));\n\tdsp->fConst35 = mydsp_faustpower2_f(fConst33);\n\tfloat fConst36 = powf(0.00100000005f, (3.33333325f / fConst0));\n\tdsp->fConst37 = (0.0f - (2.0f * fConst36));\n\tdsp->fConst38 = mydsp_faustpower2_f(fConst36);\n\tfloat fConst39 = powf(0.00100000005f, (3.70370364f / fConst0));\n\tdsp->fConst40 = (0.0f - (2.0f * fConst39));\n\tdsp->fConst41 = mydsp_faustpower2_f(fConst39);\n\tfloat fConst42 = powf(0.00100000005f, (4.16666651f / fConst0));\n\tdsp->fConst43 = (0.0f - (2.0f * fConst42));\n\tdsp->fConst44 = mydsp_faustpower2_f(fConst42);\n\tfloat fConst45 = powf(0.00100000005f, (4.76190472f / fConst0));\n\tdsp->fConst46 = (0.0f - (2.0f * fConst45));\n\tdsp->fConst47 = mydsp_faustpower2_f(fConst45);\n\tfloat fConst48 = powf(0.00100000005f, (5.55555534f / fConst0));\n\tdsp->fConst49 = (0.0f - (2.0f * fConst48));\n\tdsp->fConst50 = mydsp_faustpower2_f(fConst48);\n\tfloat fConst51 = powf(0.00100000005f, (6.66666651f / fConst0));\n\tdsp->fConst52 = (0.0f - (2.0f * fConst51));\n\tdsp->fConst53 = mydsp_faustpower2_f(fConst51);\n\tfloat fConst54 = powf(0.00100000005f, (8.33333302f / fConst0));\n\tdsp->fConst55 = (0.0f - (2.0f * fConst54));\n\tdsp->fConst56 = mydsp_faustpower2_f(fConst54);\n\tfloat fConst57 = powf(0.00100000005f, (11.1111107f / fConst0));\n\tdsp->fConst58 = (0.0f - (2.0f * fConst57));\n\tdsp->fConst59 = mydsp_faustpower2_f(fConst57);\n\tfloat fConst60 = powf(0.00100000005f, (16.666666f / fConst0));\n\tdsp->fConst61 = (0.0f - (2.0f * fConst60));\n\tdsp->fConst62 = mydsp_faustpower2_f(fConst60);\n\tfloat fConst63 = powf(0.00100000005f, (33.3333321f / fConst0));\n\tdsp->fConst64 = (0.0f - (2.0f * fConst63));\n\tdsp->fConst65 = mydsp_faustpower2_f(fConst63);\n}\n\nvoid instanceInitmydsp(mydsp* dsp, int sample_rate) {\n\tinstanceConstantsmydsp(dsp, sample_rate);\n\tinstanceResetUserInterfacemydsp(dsp);\n\tinstanceClearmydsp(dsp);\n}\n\nvoid initmydsp(mydsp* dsp, int sample_rate) {\n\tclassInitmydsp(sample_rate);\n\tinstanceInitmydsp(dsp, sample_rate);\n}\n\nvoid buildUserInterfacemydsp(mydsp* dsp, UIGlue* ui_interface) {\n\tui_interface->openVerticalBox(ui_interface->uiInterface, \"djembe\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"Freq\", &dsp->fHslider2, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1000.0f, (FAUSTFLOAT)0.00999999978f);\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"Pos\", &dsp->fHslider0, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1.0f, (FAUSTFLOAT)9.99999975e-06f);\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"Sharpness\", &dsp->fHslider1, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)5.0f, (FAUSTFLOAT)9.99999975e-06f);\n\tui_interface->addButton(ui_interface->uiInterface, \"trigger\", &dsp->fButton0);\n\tui_interface->closeBox(ui_interface->uiInterface);\n}\n\nvoid computemydsp(mydsp* dsp, int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) {\n\tFAUSTFLOAT* output0 = outputs[0];\n\tfloat fSlow0 = (dsp->fConst2 * (float)dsp->fHslider0);\n\tfloat fSlow1 = (float)dsp->fButton0;\n\tfloat fSlow2 = (dsp->fConst2 * (float)dsp->fHslider1);\n\tfloat fSlow3 = (dsp->fConst2 * (float)dsp->fHslider2);\n\t/* C99 loop */\n\t{\n\t\tint i0;\n\t\tfor (i0 = 0; (i0 < count); i0 = (i0 + 1)) {\n\t\t\tdsp->iRec3[0] = ((1103515245 * dsp->iRec3[1]) + 12345);\n\t\t\tdsp->fRec4[0] = (fSlow0 + (dsp->fConst3 * dsp->fRec4[1]));\n\t\t\tfloat fTemp0 = tanf((dsp->fConst1 * ((500.0f * dsp->fRec4[0]) + 40.0f)));\n\t\t\tfloat fTemp1 = (1.0f / fTemp0);\n\t\t\tfloat fTemp2 = mydsp_faustpower2_f(fTemp0);\n\t\t\tfloat fTemp3 = (((fTemp1 + 1.41421354f) / fTemp0) + 1.0f);\n\t\t\tdsp->fRec2[0] = ((4.65661287e-10f * (float)dsp->iRec3[0]) - (((dsp->fRec2[2] * (((fTemp1 + -1.41421354f) / fTemp0) + 1.0f)) + (2.0f * (dsp->fRec2[1] * (1.0f - (1.0f / fTemp2))))) / fTemp3));\n\t\t\tfloat fTemp4 = tanf((dsp->fConst1 * ((15000.0f * dsp->fRec4[0]) + 500.0f)));\n\t\t\tfloat fTemp5 = (1.0f / fTemp4);\n\t\t\tfloat fTemp6 = (((fTemp5 + 1.41421354f) / fTemp4) + 1.0f);\n\t\t\tdsp->fRec1[0] = (((((dsp->fRec2[1] * (0.0f - (2.0f / fTemp2))) + (dsp->fRec2[0] / fTemp2)) + (dsp->fRec2[2] / fTemp2)) / fTemp3) - (((dsp->fRec1[2] * (((fTemp5 + -1.41421354f) / fTemp4) + 1.0f)) + (2.0f * (dsp->fRec1[1] * (1.0f - (1.0f / mydsp_faustpower2_f(fTemp4)))))) / fTemp6));\n\t\t\tdsp->fVec0[0] = fSlow1;\n\t\t\tdsp->iRec5[0] = (((dsp->iRec5[1] + (dsp->iRec5[1] > 0)) * (fSlow1 <= dsp->fVec0[1])) + (fSlow1 > dsp->fVec0[1]));\n\t\t\tdsp->fRec6[0] = (fSlow2 + (dsp->fConst3 * dsp->fRec6[1]));\n\t\t\tfloat fTemp7 = ((float)dsp->iRec5[0] / fmaxf(1.0f, (dsp->fConst4 * dsp->fRec6[0])));\n\t\t\tfloat fTemp8 = (3.0f * (((dsp->fRec1[2] + (dsp->fRec1[0] + (2.0f * dsp->fRec1[1]))) * fmaxf(0.0f, fminf(fTemp7, (2.0f - fTemp7)))) / fTemp6));\n\t\t\tdsp->fRec7[0] = (fSlow3 + (dsp->fConst3 * dsp->fRec7[1]));\n\t\t\tdsp->fRec0[0] = (fTemp8 - ((dsp->fConst6 * (dsp->fRec0[1] * cosf((dsp->fConst7 * dsp->fRec7[0])))) + (dsp->fConst8 * dsp->fRec0[2])));\n\t\t\tdsp->fRec8[0] = (fTemp8 - ((dsp->fConst10 * (dsp->fRec8[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 200.0f))))) + (dsp->fConst11 * dsp->fRec8[2])));\n\t\t\tdsp->fRec9[0] = (fTemp8 - ((dsp->fConst13 * (dsp->fRec9[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 400.0f))))) + (dsp->fConst14 * dsp->fRec9[2])));\n\t\t\tdsp->fRec10[0] = (fTemp8 - ((dsp->fConst16 * (dsp->fRec10[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 600.0f))))) + (dsp->fConst17 * dsp->fRec10[2])));\n\t\t\tdsp->fRec11[0] = (fTemp8 - ((dsp->fConst19 * (dsp->fRec11[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 800.0f))))) + (dsp->fConst20 * dsp->fRec11[2])));\n\t\t\tdsp->fRec12[0] = (fTemp8 - ((dsp->fConst22 * (dsp->fRec12[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 1000.0f))))) + (dsp->fConst23 * dsp->fRec12[2])));\n\t\t\tdsp->fRec13[0] = (fTemp8 - ((dsp->fConst25 * (dsp->fRec13[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 1200.0f))))) + (dsp->fConst26 * dsp->fRec13[2])));\n\t\t\tdsp->fRec14[0] = (fTemp8 - ((dsp->fConst28 * (dsp->fRec14[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 1400.0f))))) + (dsp->fConst29 * dsp->fRec14[2])));\n\t\t\tdsp->fRec15[0] = (fTemp8 - ((dsp->fConst31 * (dsp->fRec15[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 1600.0f))))) + (dsp->fConst32 * dsp->fRec15[2])));\n\t\t\tdsp->fRec16[0] = (fTemp8 - ((dsp->fConst34 * (dsp->fRec16[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 1800.0f))))) + (dsp->fConst35 * dsp->fRec16[2])));\n\t\t\tdsp->fRec17[0] = (fTemp8 - ((dsp->fConst37 * (dsp->fRec17[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 2000.0f))))) + (dsp->fConst38 * dsp->fRec17[2])));\n\t\t\tdsp->fRec18[0] = (fTemp8 - ((dsp->fConst40 * (dsp->fRec18[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 2200.0f))))) + (dsp->fConst41 * dsp->fRec18[2])));\n\t\t\tdsp->fRec19[0] = (fTemp8 - ((dsp->fConst43 * (dsp->fRec19[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 2400.0f))))) + (dsp->fConst44 * dsp->fRec19[2])));\n\t\t\tdsp->fRec20[0] = (fTemp8 - ((dsp->fConst46 * (dsp->fRec20[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 2600.0f))))) + (dsp->fConst47 * dsp->fRec20[2])));\n\t\t\tdsp->fRec21[0] = (fTemp8 - ((dsp->fConst49 * (dsp->fRec21[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 2800.0f))))) + (dsp->fConst50 * dsp->fRec21[2])));\n\t\t\tdsp->fRec22[0] = (fTemp8 - ((dsp->fConst52 * (dsp->fRec22[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 3000.0f))))) + (dsp->fConst53 * dsp->fRec22[2])));\n\t\t\tdsp->fRec23[0] = (fTemp8 - ((dsp->fConst55 * (dsp->fRec23[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 3200.0f))))) + (dsp->fConst56 * dsp->fRec23[2])));\n\t\t\tdsp->fRec24[0] = (fTemp8 - ((dsp->fConst58 * (dsp->fRec24[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 3400.0f))))) + (dsp->fConst59 * dsp->fRec24[2])));\n\t\t\tdsp->fRec25[0] = (fTemp8 - ((dsp->fConst61 * (dsp->fRec25[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 3600.0f))))) + (dsp->fConst62 * dsp->fRec25[2])));\n\t\t\tdsp->fRec26[0] = (fTemp8 - ((dsp->fConst64 * (dsp->fRec26[1] * cosf((dsp->fConst7 * (dsp->fRec7[0] + 3800.0f))))) + (dsp->fConst65 * dsp->fRec26[2])));\n\t\t\toutput0[i0] = (FAUSTFLOAT)(0.0500000007f * ((((((((((((((((((((dsp->fRec0[0] + (0.25f * (dsp->fRec8[0] - dsp->fRec8[2]))) + (0.111111112f * (dsp->fRec9[0] - dsp->fRec9[2]))) + (0.0625f * (dsp->fRec10[0] - dsp->fRec10[2]))) + (0.0399999991f * (dsp->fRec11[0] - dsp->fRec11[2]))) + (0.027777778f * (dsp->fRec12[0] - dsp->fRec12[2]))) + (0.0204081628f * (dsp->fRec13[0] - dsp->fRec13[2]))) + (0.015625f * (dsp->fRec14[0] - dsp->fRec14[2]))) + (0.0123456791f * (dsp->fRec15[0] - dsp->fRec15[2]))) + (0.00999999978f * (dsp->fRec16[0] - dsp->fRec16[2]))) + (0.00826446246f * (dsp->fRec17[0] - dsp->fRec17[2]))) + (0.0069444445f * (dsp->fRec18[0] - dsp->fRec18[2]))) + (0.00591715984f * (dsp->fRec19[0] - dsp->fRec19[2]))) + (0.00510204071f * (dsp->fRec20[0] - dsp->fRec20[2]))) + (0.00444444455f * (dsp->fRec21[0] - dsp->fRec21[2]))) + (0.00390625f * (dsp->fRec22[0] - dsp->fRec22[2]))) + (0.00346020772f * (dsp->fRec23[0] - dsp->fRec23[2]))) + (0.00308641978f * (dsp->fRec24[0] - dsp->fRec24[2]))) + (0.00277008303f * (dsp->fRec25[0] - dsp->fRec25[2]))) + (0.00249999994f * (dsp->fRec26[0] - dsp->fRec26[2]))) - dsp->fRec0[2]));\n\t\t\tdsp->iRec3[1] = dsp->iRec3[0];\n\t\t\tdsp->fRec4[1] = dsp->fRec4[0];\n\t\t\tdsp->fRec2[2] = dsp->fRec2[1];\n\t\t\tdsp->fRec2[1] = dsp->fRec2[0];\n\t\t\tdsp->fRec1[2] = dsp->fRec1[1];\n\t\t\tdsp->fRec1[1] = dsp->fRec1[0];\n\t\t\tdsp->fVec0[1] = dsp->fVec0[0];\n\t\t\tdsp->iRec5[1] = dsp->iRec5[0];\n\t\t\tdsp->fRec6[1] = dsp->fRec6[0];\n\t\t\tdsp->fRec7[1] = dsp->fRec7[0];\n\t\t\tdsp->fRec0[2] = dsp->fRec0[1];\n\t\t\tdsp->fRec0[1] = dsp->fRec0[0];\n\t\t\tdsp->fRec8[2] = dsp->fRec8[1];\n\t\t\tdsp->fRec8[1] = dsp->fRec8[0];\n\t\t\tdsp->fRec9[2] = dsp->fRec9[1];\n\t\t\tdsp->fRec9[1] = dsp->fRec9[0];\n\t\t\tdsp->fRec10[2] = dsp->fRec10[1];\n\t\t\tdsp->fRec10[1] = dsp->fRec10[0];\n\t\t\tdsp->fRec11[2] = dsp->fRec11[1];\n\t\t\tdsp->fRec11[1] = dsp->fRec11[0];\n\t\t\tdsp->fRec12[2] = dsp->fRec12[1];\n\t\t\tdsp->fRec12[1] = dsp->fRec12[0];\n\t\t\tdsp->fRec13[2] = dsp->fRec13[1];\n\t\t\tdsp->fRec13[1] = dsp->fRec13[0];\n\t\t\tdsp->fRec14[2] = dsp->fRec14[1];\n\t\t\tdsp->fRec14[1] = dsp->fRec14[0];\n\t\t\tdsp->fRec15[2] = dsp->fRec15[1];\n\t\t\tdsp->fRec15[1] = dsp->fRec15[0];\n\t\t\tdsp->fRec16[2] = dsp->fRec16[1];\n\t\t\tdsp->fRec16[1] = dsp->fRec16[0];\n\t\t\tdsp->fRec17[2] = dsp->fRec17[1];\n\t\t\tdsp->fRec17[1] = dsp->fRec17[0];\n\t\t\tdsp->fRec18[2] = dsp->fRec18[1];\n\t\t\tdsp->fRec18[1] = dsp->fRec18[0];\n\t\t\tdsp->fRec19[2] = dsp->fRec19[1];\n\t\t\tdsp->fRec19[1] = dsp->fRec19[0];\n\t\t\tdsp->fRec20[2] = dsp->fRec20[1];\n\t\t\tdsp->fRec20[1] = dsp->fRec20[0];\n\t\t\tdsp->fRec21[2] = dsp->fRec21[1];\n\t\t\tdsp->fRec21[1] = dsp->fRec21[0];\n\t\t\tdsp->fRec22[2] = dsp->fRec22[1];\n\t\t\tdsp->fRec22[1] = dsp->fRec22[0];\n\t\t\tdsp->fRec23[2] = dsp->fRec23[1];\n\t\t\tdsp->fRec23[1] = dsp->fRec23[0];\n\t\t\tdsp->fRec24[2] = dsp->fRec24[1];\n\t\t\tdsp->fRec24[1] = dsp->fRec24[0];\n\t\t\tdsp->fRec25[2] = dsp->fRec25[1];\n\t\t\tdsp->fRec25[1] = dsp->fRec25[0];\n\t\t\tdsp->fRec26[2] = dsp->fRec26[1];\n\t\t\tdsp->fRec26[1] = dsp->fRec26[0];\n\t\t}\n\t}\n}\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "lib/faust/rev_dattorro.dsp",
    "content": "//faust ./rev_dattorro.dsp -cn rev_dattorro > ./rev_dattorro.hxx\n\nimport(\"stdfaust.lib\");\n\ndw = hslider(\"[0]D/W\",0.5,0,1,0.0001):si.smoo;\ndecay = hslider(\"[1]Decay\",0.5,0,1,0.0001):si.smoo;\ndamping = hslider(\"[2]Damp\",0.5,0,1,0.0001):si.smoo;\nbw = hslider(\"[3]BW\",0.5,0,1,0.0001):si.smoo;\ndiffd= hslider(\"[4]DDiff\",0.5,0.01,0.99,0.0001):si.smoo;\ndiffi = hslider(\"[5]IDiff\",0.5,0.01,0.99,0.0001):si.smoo;\npre_delay = 24;\n\nprocess = _,_ <: (_,_ <:re.dattorro_rev(pre_delay, bw, diffi, diffi, decay, diffd, diffd, damping) : (*(dw),*(dw))), *(1-dw), *(1-dw) :> _,_;\n"
  },
  {
    "path": "lib/faust/rev_dattorro.dsp.h",
    "content": "/* ------------------------------------------------------------\nname: \"rev_dattorro\"\nCode generated with Faust 2.37.3 (https://faust.grame.fr)\nCompilation options: -lang c -es 1 -single -ftz 0\n------------------------------------------------------------ */\n\n#ifndef  __mydsp_H__\n#define  __mydsp_H__\n\n#ifndef FAUSTFLOAT\n#define FAUSTFLOAT float\n#endif \n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <math.h>\n#include <stdint.h>\n#include <stdlib.h>\n\n\n#ifndef FAUSTCLASS \n#define FAUSTCLASS mydsp\n#endif\n#ifdef __APPLE__ \n#define exp10f __exp10f\n#define exp10 __exp10\n#endif\n\ntypedef struct {\n\tint fSampleRate;\n\tfloat fConst0;\n\tFAUSTFLOAT fHslider0;\n\tfloat fConst1;\n\tfloat fRec11[2];\n\tint IOTA;\n\tfloat fVec0[32];\n\tfloat fRec10[3];\n\tFAUSTFLOAT fHslider1;\n\tfloat fRec12[2];\n\tfloat fVec1[256];\n\tfloat fRec8[2];\n\tfloat fVec2[128];\n\tfloat fRec6[2];\n\tfloat fVec3[512];\n\tfloat fRec4[2];\n\tfloat fVec4[512];\n\tfloat fRec2[2];\n\tFAUSTFLOAT fHslider2;\n\tfloat fRec13[2];\n\tFAUSTFLOAT fHslider3;\n\tfloat fRec17[2];\n\tFAUSTFLOAT fHslider4;\n\tfloat fRec20[2];\n\tfloat fVec5[1024];\n\tfloat fRec18[2];\n\tfloat fVec6[8192];\n\tfloat fRec16[2];\n\tfloat fVec7[4096];\n\tfloat fRec14[2];\n\tfloat fVec8[4096];\n\tfloat fRec0[2];\n\tfloat fVec9[1024];\n\tfloat fRec24[2];\n\tfloat fVec10[8192];\n\tfloat fRec23[2];\n\tfloat fVec11[2048];\n\tfloat fRec21[2];\n\tfloat fVec12[2048];\n\tfloat fRec1[2];\n\tFAUSTFLOAT fHslider5;\n\tfloat fRec26[2];\n} mydsp;\n\nmydsp* newmydsp() { \n\tmydsp* dsp = (mydsp*)calloc(1, sizeof(mydsp));\n\treturn dsp;\n}\n\nvoid deletemydsp(mydsp* dsp) { \n\tfree(dsp);\n}\n\nvoid metadatamydsp(MetaGlue* m) { \n\tm->declare(m->metaInterface, \"basics.lib/name\", \"Faust Basic Element Library\");\n\tm->declare(m->metaInterface, \"basics.lib/version\", \"0.2\");\n\tm->declare(m->metaInterface, \"compile_options\", \"-lang c -es 1 -single -ftz 0\");\n\tm->declare(m->metaInterface, \"filename\", \"rev_dattorro.dsp\");\n\tm->declare(m->metaInterface, \"maths.lib/author\", \"GRAME\");\n\tm->declare(m->metaInterface, \"maths.lib/copyright\", \"GRAME\");\n\tm->declare(m->metaInterface, \"maths.lib/license\", \"LGPL with exception\");\n\tm->declare(m->metaInterface, \"maths.lib/name\", \"Faust Math Library\");\n\tm->declare(m->metaInterface, \"maths.lib/version\", \"2.5\");\n\tm->declare(m->metaInterface, \"name\", \"rev_dattorro\");\n\tm->declare(m->metaInterface, \"platform.lib/name\", \"Generic Platform Library\");\n\tm->declare(m->metaInterface, \"platform.lib/version\", \"0.2\");\n\tm->declare(m->metaInterface, \"reverbs.lib/dattorro_rev:author\", \"Jakob Zerbian\");\n\tm->declare(m->metaInterface, \"reverbs.lib/dattorro_rev:license\", \"MIT-style STK-4.3 license\");\n\tm->declare(m->metaInterface, \"reverbs.lib/name\", \"Faust Reverb Library\");\n\tm->declare(m->metaInterface, \"reverbs.lib/version\", \"0.2\");\n\tm->declare(m->metaInterface, \"routes.lib/name\", \"Faust Signal Routing Library\");\n\tm->declare(m->metaInterface, \"routes.lib/version\", \"0.2\");\n\tm->declare(m->metaInterface, \"signals.lib/name\", \"Faust Signal Routing Library\");\n\tm->declare(m->metaInterface, \"signals.lib/version\", \"0.1\");\n}\n\nint getSampleRatemydsp(mydsp* dsp) {\n\treturn dsp->fSampleRate;\n}\n\nint getNumInputsmydsp(mydsp* dsp) {\n\treturn 2;\n}\nint getNumOutputsmydsp(mydsp* dsp) {\n\treturn 2;\n}\n\nvoid classInitmydsp(int sample_rate) {\n}\n\nvoid instanceResetUserInterfacemydsp(mydsp* dsp) {\n\tdsp->fHslider0 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider1 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider2 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider3 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider4 = (FAUSTFLOAT)0.5f;\n\tdsp->fHslider5 = (FAUSTFLOAT)0.5f;\n}\n\nvoid instanceClearmydsp(mydsp* dsp) {\n\t/* C99 loop */\n\t{\n\t\tint l0;\n\t\tfor (l0 = 0; (l0 < 2); l0 = (l0 + 1)) {\n\t\t\tdsp->fRec11[l0] = 0.0f;\n\t\t}\n\t}\n\tdsp->IOTA = 0;\n\t/* C99 loop */\n\t{\n\t\tint l1;\n\t\tfor (l1 = 0; (l1 < 32); l1 = (l1 + 1)) {\n\t\t\tdsp->fVec0[l1] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l2;\n\t\tfor (l2 = 0; (l2 < 3); l2 = (l2 + 1)) {\n\t\t\tdsp->fRec10[l2] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l3;\n\t\tfor (l3 = 0; (l3 < 2); l3 = (l3 + 1)) {\n\t\t\tdsp->fRec12[l3] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l4;\n\t\tfor (l4 = 0; (l4 < 256); l4 = (l4 + 1)) {\n\t\t\tdsp->fVec1[l4] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l5;\n\t\tfor (l5 = 0; (l5 < 2); l5 = (l5 + 1)) {\n\t\t\tdsp->fRec8[l5] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l6;\n\t\tfor (l6 = 0; (l6 < 128); l6 = (l6 + 1)) {\n\t\t\tdsp->fVec2[l6] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l7;\n\t\tfor (l7 = 0; (l7 < 2); l7 = (l7 + 1)) {\n\t\t\tdsp->fRec6[l7] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l8;\n\t\tfor (l8 = 0; (l8 < 512); l8 = (l8 + 1)) {\n\t\t\tdsp->fVec3[l8] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l9;\n\t\tfor (l9 = 0; (l9 < 2); l9 = (l9 + 1)) {\n\t\t\tdsp->fRec4[l9] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l10;\n\t\tfor (l10 = 0; (l10 < 512); l10 = (l10 + 1)) {\n\t\t\tdsp->fVec4[l10] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l11;\n\t\tfor (l11 = 0; (l11 < 2); l11 = (l11 + 1)) {\n\t\t\tdsp->fRec2[l11] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l12;\n\t\tfor (l12 = 0; (l12 < 2); l12 = (l12 + 1)) {\n\t\t\tdsp->fRec13[l12] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l13;\n\t\tfor (l13 = 0; (l13 < 2); l13 = (l13 + 1)) {\n\t\t\tdsp->fRec17[l13] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l14;\n\t\tfor (l14 = 0; (l14 < 2); l14 = (l14 + 1)) {\n\t\t\tdsp->fRec20[l14] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l15;\n\t\tfor (l15 = 0; (l15 < 1024); l15 = (l15 + 1)) {\n\t\t\tdsp->fVec5[l15] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l16;\n\t\tfor (l16 = 0; (l16 < 2); l16 = (l16 + 1)) {\n\t\t\tdsp->fRec18[l16] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l17;\n\t\tfor (l17 = 0; (l17 < 8192); l17 = (l17 + 1)) {\n\t\t\tdsp->fVec6[l17] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l18;\n\t\tfor (l18 = 0; (l18 < 2); l18 = (l18 + 1)) {\n\t\t\tdsp->fRec16[l18] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l19;\n\t\tfor (l19 = 0; (l19 < 4096); l19 = (l19 + 1)) {\n\t\t\tdsp->fVec7[l19] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l20;\n\t\tfor (l20 = 0; (l20 < 2); l20 = (l20 + 1)) {\n\t\t\tdsp->fRec14[l20] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l21;\n\t\tfor (l21 = 0; (l21 < 4096); l21 = (l21 + 1)) {\n\t\t\tdsp->fVec8[l21] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l22;\n\t\tfor (l22 = 0; (l22 < 2); l22 = (l22 + 1)) {\n\t\t\tdsp->fRec0[l22] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l23;\n\t\tfor (l23 = 0; (l23 < 1024); l23 = (l23 + 1)) {\n\t\t\tdsp->fVec9[l23] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l24;\n\t\tfor (l24 = 0; (l24 < 2); l24 = (l24 + 1)) {\n\t\t\tdsp->fRec24[l24] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l25;\n\t\tfor (l25 = 0; (l25 < 8192); l25 = (l25 + 1)) {\n\t\t\tdsp->fVec10[l25] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l26;\n\t\tfor (l26 = 0; (l26 < 2); l26 = (l26 + 1)) {\n\t\t\tdsp->fRec23[l26] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l27;\n\t\tfor (l27 = 0; (l27 < 2048); l27 = (l27 + 1)) {\n\t\t\tdsp->fVec11[l27] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l28;\n\t\tfor (l28 = 0; (l28 < 2); l28 = (l28 + 1)) {\n\t\t\tdsp->fRec21[l28] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l29;\n\t\tfor (l29 = 0; (l29 < 2048); l29 = (l29 + 1)) {\n\t\t\tdsp->fVec12[l29] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l30;\n\t\tfor (l30 = 0; (l30 < 2); l30 = (l30 + 1)) {\n\t\t\tdsp->fRec1[l30] = 0.0f;\n\t\t}\n\t}\n\t/* C99 loop */\n\t{\n\t\tint l31;\n\t\tfor (l31 = 0; (l31 < 2); l31 = (l31 + 1)) {\n\t\t\tdsp->fRec26[l31] = 0.0f;\n\t\t}\n\t}\n}\n\nvoid instanceConstantsmydsp(mydsp* dsp, int sample_rate) {\n\tdsp->fSampleRate = sample_rate;\n\tdsp->fConst0 = (44.0999985f / fminf(192000.0f, fmaxf(1.0f, (float)dsp->fSampleRate)));\n\tdsp->fConst1 = (1.0f - dsp->fConst0);\n}\n\nvoid instanceInitmydsp(mydsp* dsp, int sample_rate) {\n\tinstanceConstantsmydsp(dsp, sample_rate);\n\tinstanceResetUserInterfacemydsp(dsp);\n\tinstanceClearmydsp(dsp);\n}\n\nvoid initmydsp(mydsp* dsp, int sample_rate) {\n\tclassInitmydsp(sample_rate);\n\tinstanceInitmydsp(dsp, sample_rate);\n}\n\nvoid buildUserInterfacemydsp(mydsp* dsp, UIGlue* ui_interface) {\n\tui_interface->openVerticalBox(ui_interface->uiInterface, \"rev_dattorro\");\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider5, \"0\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"D/W\", &dsp->fHslider5, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1.0f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider2, \"1\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"Decay\", &dsp->fHslider2, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1.0f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider3, \"2\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"Damp\", &dsp->fHslider3, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1.0f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider0, \"3\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"BW\", &dsp->fHslider0, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.0f, (FAUSTFLOAT)1.0f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider4, \"4\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"DDiff\", &dsp->fHslider4, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.00999999978f, (FAUSTFLOAT)0.99000001f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->declare(ui_interface->uiInterface, &dsp->fHslider1, \"5\", \"\");\n\tui_interface->addHorizontalSlider(ui_interface->uiInterface, \"IDiff\", &dsp->fHslider1, (FAUSTFLOAT)0.5f, (FAUSTFLOAT)0.00999999978f, (FAUSTFLOAT)0.99000001f, (FAUSTFLOAT)9.99999975e-05f);\n\tui_interface->closeBox(ui_interface->uiInterface);\n}\n\nvoid computemydsp(mydsp* dsp, int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) {\n\tFAUSTFLOAT* input0 = inputs[0];\n\tFAUSTFLOAT* input1 = inputs[1];\n\tFAUSTFLOAT* output0 = outputs[0];\n\tFAUSTFLOAT* output1 = outputs[1];\n\tfloat fSlow0 = (dsp->fConst0 * (float)dsp->fHslider0);\n\tfloat fSlow1 = (dsp->fConst0 * (float)dsp->fHslider1);\n\tfloat fSlow2 = (dsp->fConst0 * (float)dsp->fHslider2);\n\tfloat fSlow3 = (dsp->fConst0 * (float)dsp->fHslider3);\n\tfloat fSlow4 = (dsp->fConst0 * (float)dsp->fHslider4);\n\tfloat fSlow5 = (dsp->fConst0 * (float)dsp->fHslider5);\n\t/* C99 loop */\n\t{\n\t\tint i0;\n\t\tfor (i0 = 0; (i0 < count); i0 = (i0 + 1)) {\n\t\t\tdsp->fRec11[0] = (fSlow0 + (dsp->fConst1 * dsp->fRec11[1]));\n\t\t\tfloat fTemp0 = (float)input0[i0];\n\t\t\tfloat fTemp1 = (float)input1[i0];\n\t\t\tdsp->fVec0[(dsp->IOTA & 31)] = (fTemp0 + fTemp1);\n\t\t\tdsp->fRec10[0] = (((1.0f - dsp->fRec11[0]) * dsp->fRec10[2]) + (0.5f * (dsp->fRec11[0] * dsp->fVec0[((dsp->IOTA - 24) & 31)])));\n\t\t\tdsp->fRec12[0] = (fSlow1 + (dsp->fConst1 * dsp->fRec12[1]));\n\t\t\tfloat fTemp2 = (dsp->fRec10[0] - (dsp->fRec12[0] * dsp->fRec8[1]));\n\t\t\tdsp->fVec1[(dsp->IOTA & 255)] = fTemp2;\n\t\t\tdsp->fRec8[0] = dsp->fVec1[((dsp->IOTA - 142) & 255)];\n\t\t\tfloat fRec9 = (dsp->fRec12[0] * fTemp2);\n\t\t\tfloat fTemp3 = ((fRec9 + dsp->fRec8[1]) - (dsp->fRec12[0] * dsp->fRec6[1]));\n\t\t\tdsp->fVec2[(dsp->IOTA & 127)] = fTemp3;\n\t\t\tdsp->fRec6[0] = dsp->fVec2[((dsp->IOTA - 107) & 127)];\n\t\t\tfloat fRec7 = (dsp->fRec12[0] * fTemp3);\n\t\t\tfloat fTemp4 = ((fRec7 + dsp->fRec6[1]) - (dsp->fRec12[0] * dsp->fRec4[1]));\n\t\t\tdsp->fVec3[(dsp->IOTA & 511)] = fTemp4;\n\t\t\tdsp->fRec4[0] = dsp->fVec3[((dsp->IOTA - 379) & 511)];\n\t\t\tfloat fRec5 = (dsp->fRec12[0] * fTemp4);\n\t\t\tfloat fTemp5 = ((fRec5 + dsp->fRec4[1]) - (dsp->fRec12[0] * dsp->fRec2[1]));\n\t\t\tdsp->fVec4[(dsp->IOTA & 511)] = fTemp5;\n\t\t\tdsp->fRec2[0] = dsp->fVec4[((dsp->IOTA - 277) & 511)];\n\t\t\tfloat fRec3 = (dsp->fRec12[0] * fTemp5);\n\t\t\tdsp->fRec13[0] = (fSlow2 + (dsp->fConst1 * dsp->fRec13[1]));\n\t\t\tdsp->fRec17[0] = (fSlow3 + (dsp->fConst1 * dsp->fRec17[1]));\n\t\t\tfloat fTemp6 = (1.0f - dsp->fRec17[0]);\n\t\t\tdsp->fRec20[0] = (fSlow4 + (dsp->fConst1 * dsp->fRec20[1]));\n\t\t\tfloat fTemp7 = ((dsp->fRec20[0] * dsp->fRec18[1]) + dsp->fRec1[1]);\n\t\t\tdsp->fVec5[(dsp->IOTA & 1023)] = fTemp7;\n\t\t\tdsp->fRec18[0] = dsp->fVec5[((dsp->IOTA - 908) & 1023)];\n\t\t\tfloat fRec19 = (0.0f - (dsp->fRec20[0] * fTemp7));\n\t\t\tdsp->fVec6[(dsp->IOTA & 8191)] = (fRec19 + dsp->fRec18[1]);\n\t\t\tdsp->fRec16[0] = ((dsp->fRec17[0] * dsp->fRec16[1]) + (fTemp6 * dsp->fVec6[((dsp->IOTA - 4217) & 8191)]));\n\t\t\tfloat fTemp8 = ((dsp->fRec16[0] * dsp->fRec13[0]) - (dsp->fRec20[0] * dsp->fRec14[1]));\n\t\t\tdsp->fVec7[(dsp->IOTA & 4095)] = fTemp8;\n\t\t\tdsp->fRec14[0] = dsp->fVec7[((dsp->IOTA - 2656) & 4095)];\n\t\t\tfloat fRec15 = (dsp->fRec20[0] * fTemp8);\n\t\t\tdsp->fVec8[(dsp->IOTA & 4095)] = (fRec15 + dsp->fRec14[1]);\n\t\t\tdsp->fRec0[0] = (dsp->fRec2[1] + (fRec3 + (dsp->fRec13[0] * dsp->fVec8[((dsp->IOTA - 2656) & 4095)])));\n\t\t\tfloat fTemp9 = ((dsp->fRec20[0] * dsp->fRec24[1]) + dsp->fRec0[1]);\n\t\t\tdsp->fVec9[(dsp->IOTA & 1023)] = fTemp9;\n\t\t\tdsp->fRec24[0] = dsp->fVec9[((dsp->IOTA - 672) & 1023)];\n\t\t\tfloat fRec25 = (0.0f - (dsp->fRec20[0] * fTemp9));\n\t\t\tdsp->fVec10[(dsp->IOTA & 8191)] = (fRec25 + dsp->fRec24[1]);\n\t\t\tdsp->fRec23[0] = ((dsp->fRec17[0] * dsp->fRec23[1]) + (fTemp6 * dsp->fVec10[((dsp->IOTA - 4453) & 8191)]));\n\t\t\tfloat fTemp10 = ((dsp->fRec13[0] * dsp->fRec23[0]) - (dsp->fRec20[0] * dsp->fRec21[1]));\n\t\t\tdsp->fVec11[(dsp->IOTA & 2047)] = fTemp10;\n\t\t\tdsp->fRec21[0] = dsp->fVec11[((dsp->IOTA - 1800) & 2047)];\n\t\t\tfloat fRec22 = (dsp->fRec20[0] * fTemp10);\n\t\t\tdsp->fVec12[(dsp->IOTA & 2047)] = (fRec22 + dsp->fRec21[1]);\n\t\t\tdsp->fRec1[0] = ((fRec3 + dsp->fRec2[1]) + (dsp->fRec13[0] * dsp->fVec12[((dsp->IOTA - 1800) & 2047)]));\n\t\t\tdsp->fRec26[0] = (fSlow5 + (dsp->fConst1 * dsp->fRec26[1]));\n\t\t\tfloat fTemp11 = (1.0f - dsp->fRec26[0]);\n\t\t\toutput0[i0] = (FAUSTFLOAT)((dsp->fRec0[0] * dsp->fRec26[0]) + (fTemp0 * fTemp11));\n\t\t\toutput1[i0] = (FAUSTFLOAT)((fTemp1 * fTemp11) + (dsp->fRec26[0] * dsp->fRec1[0]));\n\t\t\tdsp->fRec11[1] = dsp->fRec11[0];\n\t\t\tdsp->IOTA = (dsp->IOTA + 1);\n\t\t\tdsp->fRec10[2] = dsp->fRec10[1];\n\t\t\tdsp->fRec10[1] = dsp->fRec10[0];\n\t\t\tdsp->fRec12[1] = dsp->fRec12[0];\n\t\t\tdsp->fRec8[1] = dsp->fRec8[0];\n\t\t\tdsp->fRec6[1] = dsp->fRec6[0];\n\t\t\tdsp->fRec4[1] = dsp->fRec4[0];\n\t\t\tdsp->fRec2[1] = dsp->fRec2[0];\n\t\t\tdsp->fRec13[1] = dsp->fRec13[0];\n\t\t\tdsp->fRec17[1] = dsp->fRec17[0];\n\t\t\tdsp->fRec20[1] = dsp->fRec20[0];\n\t\t\tdsp->fRec18[1] = dsp->fRec18[0];\n\t\t\tdsp->fRec16[1] = dsp->fRec16[0];\n\t\t\tdsp->fRec14[1] = dsp->fRec14[0];\n\t\t\tdsp->fRec0[1] = dsp->fRec0[0];\n\t\t\tdsp->fRec24[1] = dsp->fRec24[0];\n\t\t\tdsp->fRec23[1] = dsp->fRec23[0];\n\t\t\tdsp->fRec21[1] = dsp->fRec21[0];\n\t\t\tdsp->fRec1[1] = dsp->fRec1[0];\n\t\t\tdsp->fRec26[1] = dsp->fRec26[0];\n\t\t}\n\t}\n}\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "lib/faust/ui.hxx",
    "content": "#include <math.h>\n\nstruct MetaGlue\n{\n    const char *metaInterface;\n    void declare(const char *ui, const char *key, const char *value)\n    {\n    }\n};\n\nstruct UIGlue\n{\n    const char *uiInterface;\n    void openTabBox(const char *ui, const char *label){};\n    void openVerticalBox(const char *ui, const char *title){};\n    void openHorizontalBox(const char *ui, const char *title){};\n    void closeBox(const char *ui){};\n\n    void declare(const char *ui, float *zone, const char *key, const char *val) {}\n    void addNumEntry(const char *ui, const char *label, float *zone, float init, float min, float max, float step);\n    void addHorizontalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step);\n    void addVerticalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step);\n    void addButton(const char *ui, const char *label, float *zone);\n    void addCheckButton(const char *ui, const char *label, float *zone);\n\n    // -- passive widgets\n\n    void addHorizontalBargraph(const char *ui, const char *label, float *zone, float min, float max){};\n    void addVerticalBargraph(const char *ui, const char *label, float *zone, float min, float max){};\n\n    // -- soundfiles\n\n    //void addSoundfile(const char *label, const char *filename, Soundfile **sf_zone){};\n};\n\nconstexpr float base_frequency = 440.f;\nconstexpr float base_pitch = 69.f;\n\nfloat note_to_frequency(float note)\n{\n    return base_frequency * powf(2.f, (note - base_pitch) / 12.f);\n}"
  },
  {
    "path": "lib/fft/fft4g.c",
    "content": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modify and distribute this code for any purpose (include\n * commercial use) and without fee. Please refer to this package when you modify\n * this code.\n *\n * Changes:\n * replaced \"double to float\" by eh2k.\n */\n\n/*\nFast Fourier/Cosine/Sine Transform\n    dimension   :one\n    data length :power of 2\n    decimation  :frequency\n    radix       :4, 2\n    data        :inplace\n    table       :use\nfunctions\n    cdft: Complex Discrete Fourier Transform\n    rdft: Real Discrete Fourier Transform\n    ddct: Discrete Cosine Transform\n    ddst: Discrete Sine Transform\n    dfct: Cosine Transform of RDFT (Real Symmetric DFT)\n    dfst: Sine Transform of RDFT (Real Anti-symmetric DFT)\nfunction prototypes\n    void cdft(int, int, double *, int *, double *);\n    void rdft(int, int, double *, int *, double *);\n    void ddct(int, int, double *, int *, double *);\n    void ddst(int, int, double *, int *, double *);\n    void dfct(int, double *, double *, int *, double *);\n    void dfst(int, double *, double *, int *, double *);\n\n\n-------- Complex DFT (Discrete Fourier Transform) --------\n    [definition]\n        <case1>\n            X[k] = sum_j=0^n-1 x[j]*exp(2*pi*i*j*k/n), 0<=k<n\n        <case2>\n            X[k] = sum_j=0^n-1 x[j]*exp(-2*pi*i*j*k/n), 0<=k<n\n        (notes: sum_j=0^n-1 is a summation from j=0 to n-1)\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            cdft(2*n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            cdft(2*n, -1, a, ip, w);\n    [parameters]\n        2*n            :data length (int)\n                        n >= 1, n = power of 2\n        a[0...2*n-1]   :input/output data (double *)\n                        input data\n                            a[2*j] = Re(x[j]), \n                            a[2*j+1] = Im(x[j]), 0<=j<n\n                        output data\n                            a[2*k] = Re(X[k]), \n                            a[2*k+1] = Im(X[k]), 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            cdft(2*n, -1, a, ip, w);\n        is \n            cdft(2*n, 1, a, ip, w);\n            for (j = 0; j <= 2 * n - 1; j++) {\n                a[j] *= 1.0 / n;\n            }\n        .\n\n\n-------- Real DFT / Inverse of Real DFT --------\n    [definition]\n        <case1> RDFT\n            R[k] = sum_j=0^n-1 a[j]*cos(2*pi*j*k/n), 0<=k<=n/2\n            I[k] = sum_j=0^n-1 a[j]*sin(2*pi*j*k/n), 0<k<n/2\n        <case2> IRDFT (excluding scale)\n            a[k] = (R[0] + R[n/2]*cos(pi*k))/2 + \n                   sum_j=1^n/2-1 R[j]*cos(2*pi*j*k/n) + \n                   sum_j=1^n/2-1 I[j]*sin(2*pi*j*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            rdft(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            rdft(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        <case1>\n                            output data\n                                a[2*k] = R[k], 0<=k<n/2\n                                a[2*k+1] = I[k], 0<k<n/2\n                                a[1] = R[n/2]\n                        <case2>\n                            input data\n                                a[2*j] = R[j], 0<=j<n/2\n                                a[2*j+1] = I[j], 0<j<n/2\n                                a[1] = R[n/2]\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            rdft(n, 1, a, ip, w);\n        is \n            rdft(n, -1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DCT (Discrete Cosine Transform) / Inverse of DCT --------\n    [definition]\n        <case1> IDCT (excluding scale)\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DCT\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*(j+1/2)*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddct(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddct(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        output data\n                            a[k] = C[k], 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            ddct(n, -1, a, ip, w);\n        is \n            a[0] *= 0.5;\n            ddct(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DST (Discrete Sine Transform) / Inverse of DST --------\n    [definition]\n        <case1> IDST (excluding scale)\n            S[k] = sum_j=1^n A[j]*sin(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DST\n            S[k] = sum_j=0^n-1 a[j]*sin(pi*(j+1/2)*k/n), 0<k<=n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddst(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddst(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        <case1>\n                            input data\n                                a[j] = A[j], 0<j<n\n                                a[0] = A[n]\n                            output data\n                                a[k] = S[k], 0<=k<n\n                        <case2>\n                            output data\n                                a[k] = S[k], 0<k<n\n                                a[0] = S[n]\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            ddst(n, -1, a, ip, w);\n        is \n            a[0] *= 0.5;\n            ddst(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Cosine Transform of RDFT (Real Symmetric DFT) --------\n    [definition]\n        C[k] = sum_j=0^n a[j]*cos(pi*j*k/n), 0<=k<=n\n    [usage]\n        ip[0] = 0; // first time only\n        dfct(n, a, t, ip, w);\n    [parameters]\n        n              :data length - 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n]       :input/output data (double *)\n                        output data\n                            a[k] = C[k], 0<=k<=n\n        t[0...n/2]     :work area (double *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n        is \n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n            for (j = 0; j <= n; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Sine Transform of RDFT (Real Anti-symmetric DFT) --------\n    [definition]\n        S[k] = sum_j=1^n-1 a[j]*sin(pi*j*k/n), 0<k<n\n    [usage]\n        ip[0] = 0; // first time only\n        dfst(n, a, t, ip, w);\n    [parameters]\n        n              :data length + 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        output data\n                            a[k] = S[k], 0<k<n\n                        (a[0] is used for work area)\n        t[0...n/2-1]   :work area (double *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            dfst(n, a, t, ip, w);\n        is \n            dfst(n, a, t, ip, w);\n            for (j = 1; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\nAppendix :\n    The cos/sin table is recalculated when the larger table required.\n    w[] and ip[] are compatible with all routines.\n*/\n\n\nvoid cdft(int n, int isgn, float *a, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void bitrv2(int n, int *ip, float *a);\n    void bitrv2conj(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void cftbsub(int n, float *a, float *w);\n    \n    if (n > (ip[0] << 2)) {\n        makewt(n >> 2, ip, w);\n    }\n    if (n > 4) {\n        if (isgn >= 0) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n        } else {\n            bitrv2conj(n, ip + 2, a);\n            cftbsub(n, a, w);\n        }\n    } else if (n == 4) {\n        cftfsub(n, a, w);\n    }\n}\n\n\nvoid rdft(int n, int isgn, float *a, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void makect(int nc, int *ip, float *c);\n    void bitrv2(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void cftbsub(int n, float *a, float *w);\n    void rftfsub(int n, float *a, int nc, float *c);\n    void rftbsub(int n, float *a, int nc, float *c);\n    int nw, nc;\n    float xi;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 2)) {\n        nc = n >> 2;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xi = a[0] - a[1];\n        a[0] += a[1];\n        a[1] = xi;\n    } else {\n        a[1] = 0.5 * (a[0] - a[1]);\n        a[0] -= a[1];\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n}\n\n\nvoid ddct(int n, int isgn, float *a, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void makect(int nc, int *ip, float *c);\n    void bitrv2(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void cftbsub(int n, float *a, float *w);\n    void rftfsub(int n, float *a, int nc, float *c);\n    void rftbsub(int n, float *a, int nc, float *c);\n    void dctsub(int n, float *a, int nc, float *c);\n    int j, nw, nc;\n    float xr;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = a[j] - a[j - 1];\n            a[j] += a[j - 1];\n        }\n        a[1] = a[0] - xr;\n        a[0] += xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dctsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = a[j] - a[j + 1];\n            a[j] += a[j + 1];\n        }\n        a[n - 1] = xr;\n    }\n}\n\n\nvoid ddst(int n, int isgn, float *a, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void makect(int nc, int *ip, float *c);\n    void bitrv2(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void cftbsub(int n, float *a, float *w);\n    void rftfsub(int n, float *a, int nc, float *c);\n    void rftbsub(int n, float *a, int nc, float *c);\n    void dstsub(int n, float *a, int nc, float *c);\n    int j, nw, nc;\n    float xr;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = -a[j] - a[j - 1];\n            a[j] -= a[j - 1];\n        }\n        a[1] = a[0] + xr;\n        a[0] -= xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dstsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = -a[j] - a[j + 1];\n            a[j] -= a[j + 1];\n        }\n        a[n - 1] = -xr;\n    }\n}\n\n\nvoid dfct(int n, float *a, float *t, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void makect(int nc, int *ip, float *c);\n    void bitrv2(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void rftfsub(int n, float *a, int nc, float *c);\n    void dctsub(int n, float *a, int nc, float *c);\n    int j, k, l, m, mh, nw, nc;\n    float xr, xi, yr, yi;\n    \n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    m = n >> 1;\n    yi = a[m];\n    xi = a[0] + a[n];\n    a[0] -= a[n];\n    t[0] = xi - yi;\n    t[m] = xi + yi;\n    if (n > 2) {\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] - a[n - j];\n            xi = a[j] + a[n - j];\n            yr = a[k] - a[n - k];\n            yi = a[k] + a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi - yi;\n            t[k] = xi + yi;\n        }\n        t[mh] = a[mh] + a[n - mh];\n        a[mh] -= a[n - mh];\n        dctsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[0] - a[1];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] + a[j + 1];\n            a[2 * j - 1] = a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dctsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[0] - t[1];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = t[j] - t[j + 1];\n                a[k + l] = t[j] + t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 0; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] - t[m + j];\n                t[k] = t[m + k] + t[m + j];\n            }\n            t[mh] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n        a[n] = t[2] - t[1];\n        a[0] = t[2] + t[1];\n    } else {\n        a[1] = a[0];\n        a[2] = t[0];\n        a[0] = t[1];\n    }\n}\n\n\nvoid dfst(int n, float *a, float *t, int *ip, float *w)\n{\n    void makewt(int nw, int *ip, float *w);\n    void makect(int nc, int *ip, float *c);\n    void bitrv2(int n, int *ip, float *a);\n    void cftfsub(int n, float *a, float *w);\n    void rftfsub(int n, float *a, int nc, float *c);\n    void dstsub(int n, float *a, int nc, float *c);\n    int j, k, l, m, mh, nw, nc;\n    float xr, xi, yr, yi;\n    \n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    if (n > 2) {\n        m = n >> 1;\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] + a[n - j];\n            xi = a[j] - a[n - j];\n            yr = a[k] + a[n - k];\n            yi = a[k] - a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi + yi;\n            t[k] = xi - yi;\n        }\n        t[0] = a[mh] - a[n - mh];\n        a[mh] += a[n - mh];\n        a[0] = a[m];\n        dstsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[1] - a[0];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] - a[j + 1];\n            a[2 * j - 1] = -a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dstsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[1] - t[0];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = -t[j] - t[j + 1];\n                a[k + l] = t[j] - t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 1; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] + t[m + j];\n                t[k] = t[m + k] - t[m + j];\n            }\n            t[0] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n    }\n    a[0] = 0;\n}\n\n\n/* -------- initializing routines -------- */\n\n\n#include <math.h>\n\nvoid makewt(int nw, int *ip, float *w)\n{\n    void bitrv2(int n, int *ip, float *a);\n    int j, nwh;\n    float delta, x, y;\n    \n    ip[0] = nw;\n    ip[1] = 1;\n    if (nw > 2) {\n        nwh = nw >> 1;\n        delta = atan(1.0) / nwh;\n        w[0] = 1;\n        w[1] = 0;\n        w[nwh] = cos(delta * nwh);\n        w[nwh + 1] = w[nwh];\n        if (nwh > 2) {\n            for (j = 2; j < nwh; j += 2) {\n                x = cos(delta * j);\n                y = sin(delta * j);\n                w[j] = x;\n                w[j + 1] = y;\n                w[nw - j] = y;\n                w[nw - j + 1] = x;\n            }\n            bitrv2(nw, ip + 2, w);\n        }\n    }\n}\n\n\nvoid makect(int nc, int *ip, float *c)\n{\n    int j, nch;\n    float delta;\n    \n    ip[1] = nc;\n    if (nc > 1) {\n        nch = nc >> 1;\n        delta = atanf(1.0) / nch;\n        c[0] = cosf(delta * nch);\n        c[nch] = 0.5 * c[0];\n        for (j = 1; j < nch; j++) {\n            c[j] = 0.5 * cosf(delta * j);\n            c[nc - j] = 0.5 * sinf(delta * j);\n        }\n    }\n}\n\n\n/* -------- child routines -------- */\n\n\nvoid bitrv2(int n, int *ip, float *a)\n{\n    int j, j1, k, k1, l, m, m2;\n    float xr, xi, yr, yi;\n    \n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            j1 = 2 * k + m2 + ip[k];\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = a[j1 + 1];\n            yr = a[k1];\n            yi = a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n        }\n    } else {\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n        }\n    }\n}\n\n\nvoid bitrv2conj(int n, int *ip, float *a)\n{\n    int j, j1, k, k1, l, m, m2;\n    float xr, xi, yr, yi;\n    \n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            j1 = k1 + m2;\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = -a[j1 + 1];\n            yr = a[k1];\n            yi = -a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n            k1 += m2;\n            a[k1 + 1] = -a[k1 + 1];\n        }\n    } else {\n        a[1] = -a[1];\n        a[m2 + 1] = -a[m2 + 1];\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            a[k1 + m2 + 1] = -a[k1 + m2 + 1];\n        }\n    }\n}\n\n\nvoid cftfsub(int n, float *a, float *w)\n{\n    void cft1st(int n, float *a, float *w);\n    void cftmdl(int n, int l, float *a, float *w);\n    int j, j1, j2, j3, l;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i - x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i + x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i - x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = a[j + 1] - a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] += a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nvoid cftbsub(int n, float *a, float *w)\n{\n    void cft1st(int n, float *a, float *w);\n    void cftmdl(int n, int l, float *a, float *w);\n    int j, j1, j2, j3, l;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = -a[j + 1] - a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = -a[j + 1] + a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i - x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i + x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i - x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i + x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = -a[j + 1] + a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] = -a[j + 1] - a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nvoid cft1st(int n, float *a, float *w)\n{\n    int j, k1, k2;\n    float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    x0r = a[0] + a[2];\n    x0i = a[1] + a[3];\n    x1r = a[0] - a[2];\n    x1i = a[1] - a[3];\n    x2r = a[4] + a[6];\n    x2i = a[5] + a[7];\n    x3r = a[4] - a[6];\n    x3i = a[5] - a[7];\n    a[0] = x0r + x2r;\n    a[1] = x0i + x2i;\n    a[4] = x0r - x2r;\n    a[5] = x0i - x2i;\n    a[2] = x1r - x3i;\n    a[3] = x1i + x3r;\n    a[6] = x1r + x3i;\n    a[7] = x1i - x3r;\n    wk1r = w[2];\n    x0r = a[8] + a[10];\n    x0i = a[9] + a[11];\n    x1r = a[8] - a[10];\n    x1i = a[9] - a[11];\n    x2r = a[12] + a[14];\n    x2i = a[13] + a[15];\n    x3r = a[12] - a[14];\n    x3i = a[13] - a[15];\n    a[8] = x0r + x2r;\n    a[9] = x0i + x2i;\n    a[12] = x2i - x0i;\n    a[13] = x0r - x2r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[10] = wk1r * (x0r - x0i);\n    a[11] = wk1r * (x0r + x0i);\n    x0r = x3i + x1r;\n    x0i = x3r - x1i;\n    a[14] = wk1r * (x0i - x0r);\n    a[15] = wk1r * (x0i + x0r);\n    k1 = 0;\n    for (j = 16; j < n; j += 16) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        x0r = a[j] + a[j + 2];\n        x0i = a[j + 1] + a[j + 3];\n        x1r = a[j] - a[j + 2];\n        x1i = a[j + 1] - a[j + 3];\n        x2r = a[j + 4] + a[j + 6];\n        x2i = a[j + 5] + a[j + 7];\n        x3r = a[j + 4] - a[j + 6];\n        x3i = a[j + 5] - a[j + 7];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 4] = wk2r * x0r - wk2i * x0i;\n        a[j + 5] = wk2r * x0i + wk2i * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 2] = wk1r * x0r - wk1i * x0i;\n        a[j + 3] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 6] = wk3r * x0r - wk3i * x0i;\n        a[j + 7] = wk3r * x0i + wk3i * x0r;\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        x0r = a[j + 8] + a[j + 10];\n        x0i = a[j + 9] + a[j + 11];\n        x1r = a[j + 8] - a[j + 10];\n        x1i = a[j + 9] - a[j + 11];\n        x2r = a[j + 12] + a[j + 14];\n        x2i = a[j + 13] + a[j + 15];\n        x3r = a[j + 12] - a[j + 14];\n        x3i = a[j + 13] - a[j + 15];\n        a[j + 8] = x0r + x2r;\n        a[j + 9] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 12] = -wk2i * x0r - wk2r * x0i;\n        a[j + 13] = -wk2i * x0i + wk2r * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 10] = wk1r * x0r - wk1i * x0i;\n        a[j + 11] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 14] = wk3r * x0r - wk3i * x0i;\n        a[j + 15] = wk3r * x0i + wk3i * x0r;\n    }\n}\n\n\nvoid cftmdl(int n, int l, float *a, float *w)\n{\n    int j, j1, j2, j3, k, k1, k2, m, m2;\n    float wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    float x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    m = l << 2;\n    for (j = 0; j < l; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x0r - x2r;\n        a[j2 + 1] = x0i - x2i;\n        a[j1] = x1r - x3i;\n        a[j1 + 1] = x1i + x3r;\n        a[j3] = x1r + x3i;\n        a[j3 + 1] = x1i - x3r;\n    }\n    wk1r = w[2];\n    for (j = m; j < l + m; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x2i - x0i;\n        a[j2 + 1] = x0r - x2r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j1] = wk1r * (x0r - x0i);\n        a[j1 + 1] = wk1r * (x0r + x0i);\n        x0r = x3i + x1r;\n        x0i = x3r - x1i;\n        a[j3] = wk1r * (x0i - x0r);\n        a[j3 + 1] = wk1r * (x0i + x0r);\n    }\n    k1 = 0;\n    m2 = 2 * m;\n    for (k = m2; k < n; k += m2) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        for (j = k; j < l + k; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = wk2r * x0r - wk2i * x0i;\n            a[j2 + 1] = wk2r * x0i + wk2i * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        for (j = k + m; j < l + (k + m); j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = -wk2i * x0r - wk2r * x0i;\n            a[j2 + 1] = -wk2i * x0i + wk2r * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n    }\n}\n\n\nvoid rftfsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr, xi, yr, yi;\n    \n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5 - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr - wki * xi;\n        yi = wkr * xi + wki * xr;\n        a[j] -= yr;\n        a[j + 1] -= yi;\n        a[k] += yr;\n        a[k + 1] -= yi;\n    }\n}\n\n\nvoid rftbsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr, xi, yr, yi;\n    \n    a[1] = -a[1];\n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5 - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr + wki * xi;\n        yi = wkr * xi - wki * xr;\n        a[j] -= yr;\n        a[j + 1] = yi - a[j + 1];\n        a[k] += yr;\n        a[k + 1] = yi - a[k + 1];\n    }\n    a[m + 1] = -a[m + 1];\n}\n\n\nvoid dctsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr;\n    \n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[j] - wkr * a[k];\n        a[j] = wkr * a[j] + wki * a[k];\n        a[k] = xr;\n    }\n    a[m] *= c[0];\n}\n\n\nvoid dstsub(int n, float *a, int nc, float *c)\n{\n    int j, k, kk, ks, m;\n    float wkr, wki, xr;\n    \n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[k] - wkr * a[j];\n        a[k] = wkr * a[k] + wki * a[j];\n        a[j] = xr;\n    }\n    a[m] *= c[0];\n}\n\n"
  },
  {
    "path": "lib/fft/fft4g.h",
    "content": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modify and distribute this code for any purpose (include\n * commercial use) and without fee. Please refer to this package when you modify\n * this code.\n *\n * Changes:\n * replaced \"double to float\" by eh2k.\n */\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\nvoid rdft(int n, int isgn, float *a, int *ip, float *w);\nvoid cdft(int n, int isgn, float *a, int *ip, float *w);\n\n__END_DECLS"
  },
  {
    "path": "lib/fv1/README.md",
    "content": "# FV-1.emu\nThe [Spin Semi FV-1 DSP chip](http://www.spinsemi.com/products.html) emulator.\n\n#### HowTo | Knowledge\n\n* [DSP Basics](http://www.spinsemi.com/knowledge_base/dsp_basics.html)\n* [Audio Effects](http://www.spinsemi.com/knowledge_base/effects.html)\n* [Programming the FV-1](http://www.spinsemi.com/knowledge_base/pgm_quick.html)\n* [The FV-1 Architecture overview](http://www.spinsemi.com/knowledge_base/arch.html)\n* [FV-1 Instructions and Syntax](http://www.spinsemi.com/knowledge_base/inst_syntax.html)\n* [Coding Examples](http://www.spinsemi.com/knowledge_base/coding_examples.html)\n* [Algorithm development Support Forum](http://www.spinsemi.com/forum/viewforum.php?f=4)\n#### PDF | Datasheets\n* [CheatSheet](http://www.spinsemi.com/knowledge_base/cheat.html)\n* [SPINAsmUserManual.pdf](http://www.spinsemi.com/Products/datasheets/spn1001-dev/SPINAsmUserManual.pdf)\n* [AN-0001.pdf](http://www.spinsemi.com/Products/appnotes/spn1001/AN-0001.pdf)\n\n#### Effects | DSP Programs\n* [OEM Programs by Keith Barr](http://www.spinsemi.com/get_spn.php?spn=oem1.zip&prodnum=SPN1001)\n* [Free DSP Programs](http://www.spinsemi.com/programs.php)\n* https://mstratman.github.io/fv1-programs/\n* https://github.com/HolyCityAudio/SpinCAD-Designer"
  },
  {
    "path": "lib/fv1/factory.json",
    "content": "[\n    {\n        \"name\": \"FV1/Gated-Reverb\",\n        \"pot0\": \"PreD\",\n        \"pot1\": \"G-Time\",\n        \"pot2\": \"Damp\",\n        \"url\": \"https://raw.githubusercontent.com/eh2k/squares-and-circles/main/lib/fv1/spn/OEM1_4.spn\"\n    },\n    {\n        \"name\": \"FV1/Reverb-HP-LP\",\n        \"pot0\": \"Reverb\",\n        \"pot1\": \"HP\",\n        \"pot2\": \"LP\",\n        \"url\": \"https://raw.githubusercontent.com/eh2k/squares-and-circles/main/lib/fv1/spn/dance_ir_h_l.spn\"\n    }\n]"
  },
  {
    "path": "lib/fv1/spn/OEM1_4.spn",
    "content": ";OEM1_4 Gated Reverb\r\n\r\n;pot0 = gate time\r\n;pot1 = predelay\r\n;pot2 = damping\r\n\r\n;gated reverb by FIR technique. Good for percussion, but signal levels may \r\n;accumulate with continuous program. \r\n\r\n;Input is mono, for use with portable mixer sends. Output is spread into stereo space.\r\n\r\n;Gate time is variable from 115mS to 307mS (Fs=46608KHz) or 162mS to 436mS (Fs=32768KHz)\r\n\r\n;Predelay is variable from 0 to 87mS (Fs=46608KHz), or 0 to 125mS (Fs=32768KHz)\r\n\r\n;Damping filter within FIR delay increases with clockwise rotation of pot2\r\n\r\n;memory declarations:\r\n\r\nmem\tpdel\t4100\r\nmem\tgdel\t15000\r\nmem\tlap1\t234\r\nmem\tlap2\t446\r\nmem\tlap3\t552\r\nmem\trap1\t201\r\nmem\trap2\t389\r\nmem\trap3\t627\r\n\r\n;register declarations:\r\n\r\nequ\ttemp\treg0\r\nequ\tgout\treg1\r\nequ\tfil1\treg2\r\nequ\tfil2\treg3\r\nequ\tfil3\treg4\r\nequ\tfil4\treg5\r\n\r\nconstants:\r\n\r\nequ\tkap\t0.6\r\n\r\n;do variable predelay:\r\n\r\nskp\trun,1\r\nwldr\trmp0,0,4096\t\t;initialize predelay\r\n\r\nrdax\tadcl,0.25\t\t;put inputs into predelay\r\nrdax\tadcr,0.25\t\t;headroom space\r\nwra\tpdel,0\r\n\r\ncho\trda,rmp0,reg|compc,pdel\t;get outputs from predelay, interpolated\r\ncho\trda,rmp0,0,pdel+1\r\nwra\tgdel,0\t\t\t;write predelay output to gate delay memory\r\n\r\ncho\trdal,rmp0\t\t;read current predelay pointer\r\nrdax\tpot1,-0.5\t\t;subtract pot for servo control of pointer\r\nwrax\trmp0_rate,0\t\t;maintain predelay pointer\r\n\r\n;prepare for decay time setting;\r\n;analyze pot value and jump to proper location:\r\n;jump only when ACC is zero, as this is carried into audio calculations\r\n\r\nrdax\tpot0,1\r\nand\t%01111000_000000000_00000000\t;mask upper 4 bits\r\nsof\t1,-15/16\r\nskp\tgez,p1\r\nsof\t1,1/16\r\nskp\tgez,p2\r\nsof\t1,1/16\r\nskp\tgez,p3\r\nsof\t1,1/16\r\nskp\tgez,p4\r\nsof\t1,1/16\r\nskp\tgez,p5\r\nsof\t1,1/16\r\nskp\tgez,p6\r\nsof\t1,1/16\r\nskp\tgez,p7\r\nsof\t1,1/16\r\nskp\tgez,p8\r\nsof\t1,1/16\r\nskp\tgez,p9\r\nsof\t1,1/16\r\nskp\tgez,p10\r\nsof\t1,1/16\r\nskp\tgez,p11\r\nsof\t1,1/16\r\nskp\tgez,p12\r\nsof\t1,1/16\r\nskp\tgez,p13\r\nsof\t1,1/16\r\nskp\tgez,p14\r\nsof\t1,1/16\r\nskp\tgez,p15\r\nsof\t1,1/16\r\nskp\tgez,p16\r\nsof\t1,1/16\r\nskp\tgez,p17\r\nsof\t1,1/16\r\nskp\tgez,p18\r\nsof\t1,1/16\r\nskp\tgez,p19\r\nsof\t1,1/16\r\nskp\tgez,p20\r\np1:\r\nrda\tgdel+14334,0.4\r\np2:\r\nrda\tgdel+14023,0.5\r\np3:\r\nrda\tgdel+13508,0.4\r\np4:\r\nrda\tgdel+13101,0.5\r\np5:\r\nrda\tgdel+12760,0.5\r\np6:\r\nrda\tgdel+12120,0.4\r\np7:\r\nrda\tgdel+11765,0.5\r\np8:\r\nrda\tgdel+11312,0.5\r\np9:\r\nrda\tgdel+10750,0.5\r\np10:\r\nrda\tgdel+10212,0.5\r\np11:\r\nrda\tgdel+9705,0.5\r\np12:\r\nrda\tgdel+9367,0.5\r\np13:\r\nrda\tgdel+8905,0.4\r\np14:\r\nrda\tgdel+8575,0.5\r\np15:\r\nrda\tgdel+8215,0.5\r\np16:\r\nrda\tgdel+7412,0.4\r\np17:\r\nrda\tgdel+7144,0.5\r\np18:\r\nrda\tgdel+6513,0.5\r\np19:\r\nrda\tgdel+5822,0.5\r\np20:\r\nrda\tgdel+5320,0.5\r\nrda\tgdel+5138,0.5\r\nrda\tgdel+4576,0.5\r\nrda\tgdel+3907,0.4\r\nrda\tgdel+3420,0.5\r\nrda\tgdel+2974,0.5\r\nrda\tgdel+2530,0.5\r\nrda\tgdel+2110,0.5\r\nrda\tgdel+1340,0.5\r\nrda\tgdel+923,0.5\r\nrda\tgdel+500,0.5\r\nrda\tgdel,0.6\r\n\r\nwrax\tgout,1\t\t\r\nrda\tlap1#,kap\t\t;spread outputs and smear with allpasses\r\nwrap\tlap1,-kap\r\nrda\tlap2#,kap\r\nwrap\tlap2,-kap\r\nrda\tlap3#,kap\r\nwrap\tlap3,-kap\t\t\r\nwrax\tdacl,0\r\n\r\nrdax\tgout,1\r\nrda\trap1#,kap\r\nwrap\trap1,-kap\r\nrda\trap2#,kap\r\nwrap\trap2,-kap\r\nrda\trap3#,kap\r\nwrap\trap3,-kap\r\nwrax\tdacr,0\r\n\r\n;now insert lp filters into gate delay, adjustable by pot2:\r\n\r\nrda\tgdel+2500,-1\r\nrdfx\tfil1,0.5\r\nwrhx\tfil1,-1\r\nmulx\tpot2\r\nrda\tgdel+2500,1\r\nwra\tgdel+2500,0\r\n\r\nrda\tgdel+4500,-1\r\nrdfx\tfil2,0.4\r\nwrhx\tfil2,-1\r\nmulx\tpot2\r\nrda\tgdel+4500,1\r\nwra\tgdel+4500,0\r\n\r\nrda\tgdel+7000,-1\r\nrdfx\tfil1,0.3\r\nwrhx\tfil1,-1\r\nmulx\tpot2\r\nrda\tgdel+7000,1\r\nwra\tgdel+7000,0\r\n\r\nrda\tgdel+10000,-1\r\nrdfx\tfil1,0.2\r\nwrhx\tfil1,-1\r\nmulx\tpot2\r\nrda\tgdel+10000,1\r\nwra\tgdel+10000,0\r\n"
  },
  {
    "path": "lib/fv1/spn/dance_ir_h_l.spn",
    "content": ";dance patchfor disco mixers: \r\n;pot1 = Reverb to infinite RT, scales in and out levels\r\n;pot2 = High pass filter (2 pole peaking, 8 ocatves)\r\n;pot3 = Low pass filter (2 pole peaking, 8 ocatves)\r\n\r\n;filters are great for actively modifying program material;\r\n;reveb can capture tonality for filter manipulation.\r\n;beware, infinite reverb turns off input!\r\n\r\nequ\tkrt\treg0\r\nequ\tkin\treg1\r\nequ\tkmix\treg2\r\nequ\thpal\treg3\r\nequ\thpbl\treg4\r\nequ\tlpal\treg5\r\nequ\tlpbl\treg6\r\nequ\thpar\treg7\r\nequ\thpbr\treg8\r\nequ\tlpar\treg9\r\nequ\tlpbr\treg10\r\nequ\tkfh\treg11\r\nequ\tkfl\treg12\r\nequ\ttemp\treg13\r\nequ\trmixl\treg14\r\nequ\trmixr\treg15\r\nequ\thpoutl\treg16\r\nequ\thpoutr\treg17\r\nequ\thbyp\treg18\r\nequ\tlbyp\treg19\r\n\r\nmem\tap1\t202\r\nmem\tap2\t541\r\nmem\tap3\t1157\r\nmem\tap4\t1903\r\n\r\nmem\tdap1a\t2204\r\nmem\tdap1b\t3301\r\nmem\tdel1\t4456\r\nmem\tdap2a\t3532\r\nmem\tdap2b\t3201\r\nmem\tdel2\t6325\r\n\r\nequ\tkap\t0.6\r\nequ\tkql\t-0.2\r\nequ\tkqh\t-0.2\r\n\r\n;prepare pots to affect control variables:\r\n;pot0 controls reverb time, but also affects input drive level;\r\n;reveb time is moderate up to about mid position, then increases\r\n;to infinity (or nearly) at full position.\r\n;input drive is constant, but decreases at the full pot0 position.\r\n;output mix is varied over the first half of pot0, then remains\r\n;high to the end of pot0's range.\r\n\r\nrdax\tpot0,1.999\t;get pot0, clip the upper half of pot0's range.\r\nwrax\tkmix,0\t\t;write the output mix value\r\n\r\nrdax\tpot0,-1\t\t;get pot0 again, 0 to -1\r\nsof\t1,0.999\t\t;now +1 to 0\r\nsof\t1.999,0\t\t;now +1 until midpint, then decreases to 0\r\nwrax\tkin,0\t\t;write the input attenuator value\r\n\r\nrdax\tpot0,1\t\t;get pot0 again\r\nwrax\tkrt,1\t\t;save in krt, keep in ACC\r\nsof\t1,-0.5\t\t;subtract 1/2\r\nskp\tgez,2\t\t;skp if pot is in upper half of range\r\nsof\t0,0.5\t\t;load accumulator with +0.5\r\nwrax\tkrt,0\t\t;overwrite if pot is in lower half of range\r\n\r\n;now prepare pot1 for HP sweeping.\r\n;both frequency controls are exponential, and frequency increases\r\n;with clockwise pot rotation. Target Kf ranges are from .001 to 1.0\r\n\r\nclr\r\nrdax\tpot1,1\t\t;get pot1\r\nsof\t0.5,-0.5\t;ranges -0.5 to 0\r\nexp\t1,0\r\nwrax\tkfh,0\t\t;write to HP filter control\r\n\r\nrdax\tpot2,1\t\t;get pot2\r\nsof\t0.5,-0.5\t;ranges -0.5 to 0\r\nexp\t1,0\r\nwrax\tkfl,0\t\t;write to LP filter control\r\n\r\n;now derive filter bypass functions (at open conditions)\r\n\r\nrdax\tpot1,-1\r\nsof\t1,0.999\t\t;ranges +1 to 0\r\nwrax\ttemp,1\r\nmulx\ttemp\r\nmulx\ttemp\r\nwrax\thbyp,0\r\n\r\n\r\nrdax\tpot2,1\t\t;read pot2 (LP) again\r\nmulx \tpot2\r\nmulx\tpot2\r\nmulx\tpot2\r\nwrax\tlbyp,0\r\n\r\n;now do reverb, simple, twin loop, mono drive:\r\n\r\nrdax\tadcl,0.25\r\nrdax\tadcr,0.25\t;get inputs, leave headroom\r\nmulx\tkin\t\t;scale by input attenuator\r\nrda\tap1#,kap\t;4 all passes:\r\nwrap\tap1,-kap\r\nrda\tap2#,kap\r\nwrap\tap2,-kap\r\nrda\tap3#,kap\r\nwrap\tap3,-kap\r\nrda\tap4#,kap\r\nwrap\tap4,-kap\r\nwrax\ttemp,0\t\t;write ap output to temp reg\r\n\r\nrda\tdel2#,1\r\nmulx\tkrt\r\nrdax\ttemp,1\r\nrda\tdap1a#,kap\r\nwrap\tdap1a,-kap\r\nrda\tdap1b#,kap\r\nwrap\tdap1b,-kap\r\nwra\tdel1,0\r\nrda\tdel1#,1\r\nmulx\tkrt\r\nrdax\ttemp,1\r\nrda\tdap2a#,kap\r\nwrap\tdap2a,-kap\r\nrda\tdap2b#,kap\r\nwrap\tdap2b,-kap\r\nwra\tdel2,0\r\n\r\n;now mix the inputs with the reverb:\r\n\r\nrdax\tadcl,-1\r\nrda\tdel1,1.5\r\nmulx\tpot0\r\nrdax\tadcl,1\r\nwrax\trmixl,0\r\n\r\nrdax\tadcr,-1\r\nrda\tdel2,1.5\r\nmulx\tpot0\r\nrdax\tadcr,1\r\nwrax\trmixr,0\r\n\r\n;Reverb outputs are at rmixl and rmixr.\r\n\r\n;now do two filters, start with the high pass, stereo.\r\n;use the reveb mix for inputs, cascade the filter banks.\r\n\r\nrdax\thpal,1\r\nmulx\tkfh\r\nrdax\thpbl,1\r\nwrax\thpbl,-1\r\nrdax\thpal,kqh\r\nrdax\trmixl,1\r\nwrax\thpoutl,1\t;HP output\r\nmulx\tkfh\r\nrdax\thpal,1\r\nwrax\thpal,0\r\n\r\nrdax\thpar,1\r\nmulx\tkfh\r\nrdax\thpbr,1\r\nwrax\thpbr,-1\r\nrdax\thpar,kqh\r\nrdax\trmixr,1\r\nwrax\thpoutr,1\t;HP output\r\nmulx\tkfh\r\nrdax\thpar,1\r\nwrax\thpar,0\r\n\r\n;bypass if pot1 is fully counterclockwise:\r\n\r\nrdax\thpoutl,-1\r\nrdax\trmixl,1\r\nmulx\thbyp\r\nrdax\thpoutl,1\r\nwrax\thpoutl,0\r\n\r\nrdax\thpoutr,-1\r\nrdax\trmixr,1\r\nmulx\thbyp\r\nrdax\thpoutr,1\r\nwrax\thpoutr,0\r\n\r\n;now do cascaded low pass:\r\n\r\nrdax\tlpal,1\r\nmulx\tkfl\r\nrdax\tlpbl,1\r\nwrax\tlpbl,-1\r\nrdax\tlpal,kql\r\nrdax\thpoutl,1\r\nmulx\tkfl\r\nrdax\tlpal,1\r\nwrax\tlpal,0\r\n\r\nrdax\tlpar,1\r\nmulx\tkfl\r\nrdax\tlpbr,1\r\nwrax\tlpbr,-1\r\nrdax\tlpar,kql\r\nrdax\thpoutr,1\r\nmulx\tkfl\r\nrdax\tlpar,1\r\nwrax\tlpar,0\r\n\r\nrdax\tlpbl,-1\r\nrdax\thpoutl,1\r\nmulx\tlbyp\r\nrdax\tlpbl,1\r\nwrax\tdacl,0\r\n\t\r\nrdax\tlpbr,-1\r\nrdax\thpoutr,1\r\nmulx\tlbyp\r\nrdax\tlpbr,1\r\nwrax\tdacr,0\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "lib/marbles/note_filter.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Low pass filter for getting stable pitch data.\n\n#ifndef MARBLES_NOTE_FILTER_H_\n#define MARBLES_NOTE_FILTER_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/delay_line.h\"\n\nnamespace marbles {\n\n// Note: this is a \"slow\" filter, since it takes about 10 samples to catch\n// up with an edge in the input signal.\nclass NoteFilter {\n public:\n  enum {\n    N = 7  // Median filter order\n  };\n  NoteFilter() { }\n  ~NoteFilter() { }\n\n  void Init() {\n    lp_1_ = 0.0f;\n    lp_2_ = 0.0f;\n    std::fill(&previous_values_[0], &previous_values_[N], 0.0f);\n  }\n\n  inline float Process(float value) {\n    float sorted_values[N];\n\n    std::rotate(\n        &previous_values_[0],\n        &previous_values_[1],\n        &previous_values_[N]);\n    previous_values_[N - 1] = value;\n    \n    std::copy(&previous_values_[0], &previous_values_[N], &sorted_values[0]);\n    std::sort(&sorted_values[0], &sorted_values[N]);\n    value = sorted_values[(N - 1) / 2];\n    \n    const float kLPCoefficient = 0.65f;\n    ONE_POLE(lp_1_, value, kLPCoefficient);\n    ONE_POLE(lp_2_, lp_1_, kLPCoefficient);\n    return lp_2_;\n  }\n\n private:\n  float previous_values_[N];\n  float lp_1_;\n  float lp_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(NoteFilter);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_NOTE_FILTER_H_\n"
  },
  {
    "path": "lib/marbles/ramp/ramp.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Timing information is represented as a ramp from 0.0 to kMaxRampValue\n\n#ifndef MARBLES_RAMP_RAMP_H_\n#define MARBLES_RAMP_RAMP_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace marbles {\n\nconst float kMaxRampValue = 0.9999f;\n\n}  // namespace marbles\n\n#endif  // MARBLES_RAMP_RAMP_H_\n"
  },
  {
    "path": "lib/marbles/ramp/ramp_divider.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generates a ramp whose frequency is p/q times the frequency of the input.\n// Phase is synchronized.\n\n#ifndef MARBLES_RAMP_RAMP_DIVIDER_H_\n#define MARBLES_RAMP_RAMP_DIVIDER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"marbles/ramp/ramp.h\"\n\nnamespace marbles {\n\nstruct Ratio {\n  float to_float() { return static_cast<float>(p) / static_cast<float>(q); }\n  int p;\n  int q;\n  template<int n> void Simplify() {\n    while ((p % n) == 0 && (q % n) == 0) {\n      p /= n;\n      q /= n;\n    }\n  }\n};\n\nclass RampDivider {\n public:\n  RampDivider() { }\n  ~RampDivider() { }\n  \n  void Init() {\n    phase_ = 0.0f;\n    train_phase_ = 0.0f;\n    max_train_phase_ = 1.0f;\n    f_ratio_ = 0.99999f;\n    reset_counter_ = 1;\n  }\n\n  void Process(Ratio ratio, const float* in, float* out, size_t size) {\n    while (size--) {\n      float new_phase = *in++;\n      float frequency = new_phase - phase_;\n      if (frequency < 0.0f) {\n        frequency += 1.0f;\n        --reset_counter_;\n        if (!reset_counter_) {\n          train_phase_ = new_phase;\n          reset_counter_ = ratio.q;\n          f_ratio_ = ratio.to_float() * kMaxRampValue;\n          frequency = 0.0f;\n          max_train_phase_ = static_cast<float>(ratio.q);\n        }\n      }\n      \n      train_phase_ += frequency;\n      if (train_phase_ >= max_train_phase_) {\n        train_phase_ = max_train_phase_;\n      }\n      \n      float output_phase = train_phase_ * f_ratio_;\n      output_phase -= static_cast<float>(static_cast<int>(output_phase));\n      *out++ = output_phase;\n      phase_ = new_phase;\n    }\n  }\n\n  \n private:\n  float phase_;\n  float train_phase_;\n  float max_train_phase_;\n  float f_ratio_;\n  int reset_counter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(RampDivider);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RAMP_RAMP_DIVIDER_H_\n"
  },
  {
    "path": "lib/marbles/ramp/ramp_extractor.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Recovers a ramp from a clock input by guessing at what time the next edge\n// will occur. Prediction strategies:\n// - Moving average of previous intervals.\n// - Trigram model on quantized intervals.\n// - Periodic rhythmic pattern.\n// - Assume that the pulse width is constant, deduct the period from the on time\n//   and the pulse width.\n\n#include \"marbles/ramp/ramp_extractor.h\"\n\n#include <algorithm>\n\n#include \"marbles/ramp/ramp.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\nnamespace marbles {\n\nusing namespace std;\nusing namespace stmlib;\n\nconst float kLogOneFourth = 1.189207115f;\nconst float kPulseWidthTolerance = 0.05f;\n\ninline bool IsWithinTolerance(float x, float y, float error) {\n  return x >= y * (1.0f - error) && x <= y * (1.0f + error);\n}\n\nvoid RampExtractor::Init(float max_frequency) {\n  max_frequency_ = max_frequency;\n  audio_rate_period_ = 1.0f / (100.0f / 32000.0f);\n  audio_rate_period_hysteresis_ = audio_rate_period_;\n  Reset();\n}\n\nvoid RampExtractor::Reset() {\n  audio_rate_ = false;\n  train_phase_ = 0.0f;\n  target_frequency_ = frequency_ = 0.0001f;\n  lp_coefficient_ = 0.5f;\n  next_max_train_phase_ = max_train_phase_ = 0.999f;\n  next_f_ratio_ = f_ratio_ = 1.0f;\n  reset_counter_ = 1;\n  reset_frequency_ = 0.0f;\n  reset_interval_ = 32000 * 3;\n  \n  Pulse p;\n  p.bucket = 1;\n  p.on_duration = 2000;\n  p.total_duration = 4000;\n  p.pulse_width = 0.5f;\n  fill(&history_[0], &history_[kHistorySize], p);\n\n  current_pulse_ = 0;\n  next_bucket_ = 48.0f;\n  \n  average_pulse_width_ = 0.0f;\n  fill(&predicted_period_[0], &predicted_period_[PREDICTOR_LAST], 4000.0f);\n  fill(&prediction_accuracy_[0], &prediction_accuracy_[PREDICTOR_LAST], 0.0f);\n  fill(\n      &prediction_hash_table_[0],\n      &prediction_hash_table_[kHashTableSize],\n      0.0f);\n}\n\nfloat RampExtractor::ComputeAveragePulseWidth(float tolerance) const {\n  float sum = 0.0f;\n  for (size_t i = 0; i < kHistorySize; ++i) {\n    if (!IsWithinTolerance(history_[i].pulse_width,\n                           history_[current_pulse_].pulse_width,\n                           tolerance)) {\n      return 0.0f;\n    }\n    sum += history_[i].pulse_width;\n  }\n  return sum / static_cast<float>(kHistorySize);\n}\n\nRampExtractor::Prediction RampExtractor::PredictNextPeriod() {\n  float last_period = static_cast<float>(history_[current_pulse_].total_duration);\n  \n  Predictor best_predictor = PREDICTOR_FAST_MOVING_AVERAGE;\n\n  for (int i = PREDICTOR_FAST_MOVING_AVERAGE; i < PREDICTOR_LAST; ++i) {\n    float error = (predicted_period_[i] - last_period) / (last_period + 0.01f);\n    // Scoring function: 10% error is half as good as 0% error.\n    float accuracy = 1.0f / (1.0f + 100.0f * error * error);\n    // Slowly trust good predictors, quickly demote predictors who make errors.\n    SLOPE(prediction_accuracy_[i], accuracy, 0.1f, 0.5f);\n\n    // (Ugly code but I don't want virtuals for these.)\n    switch (i) {\n      case PREDICTOR_SLOW_MOVING_AVERAGE:\n        ONE_POLE(predicted_period_[i], last_period, 0.1f);\n        break;\n\n      case PREDICTOR_FAST_MOVING_AVERAGE:\n        ONE_POLE(predicted_period_[i], last_period, 0.5f);\n        break;\n\n      case PREDICTOR_HASH:\n        {\n          size_t t_2 = (current_pulse_ - 2 + kHistorySize) % kHistorySize;\n          size_t t_1 = (current_pulse_ - 1 + kHistorySize) % kHistorySize;\n          size_t t_0 = current_pulse_;\n          \n          size_t hash = history_[t_1].bucket + 17 * history_[t_2].bucket;\n          ONE_POLE(\n              prediction_hash_table_[hash % kHashTableSize],\n              last_period,\n              0.5f);\n              \n          hash = history_[t_0].bucket + 17 * history_[t_1].bucket;\n          predicted_period_[i] = prediction_hash_table_[hash % kHashTableSize];\n          if (predicted_period_[i] == 0.0f) {\n            predicted_period_[i] = last_period;\n          }\n        }\n        break;\n        \n      default:\n        {\n          // Periodicity detector.\n          size_t candidate_period = i - PREDICTOR_PERIOD_1 + 1;\n          size_t t = current_pulse_ + 1 + kHistorySize - candidate_period;\n          predicted_period_[i] = history_[t % kHistorySize].total_duration;\n        }\n        break;\n    }\n    \n    if (prediction_accuracy_[i] >= prediction_accuracy_[best_predictor]) {\n      best_predictor = Predictor(i);\n    }\n  }\n  \n  Prediction p;\n  p.period = predicted_period_[best_predictor];\n  p.accuracy = prediction_accuracy_[best_predictor];\n  \n  return p;\n}\n\nbool RampExtractor::Process(\n    Ratio ratio,\n    bool always_ramp_to_maximum,\n    const GateFlags* gate_flags,\n    float* ramp, \n    size_t size) {\n  bool reset_observed = false;\n  while (size--) {\n    GateFlags flags = *gate_flags++;\n    // We are done with the previous pulse.\n    if (flags & GATE_FLAG_RISING) {\n      Pulse& p = history_[current_pulse_];\n      const bool record_pulse = p.total_duration < reset_interval_;\n      \n      if (!record_pulse) {\n        // Quite a long pause - the clock has probably been stopped\n        // and restarted.\n        reset_frequency_ = 0.0f;\n        train_phase_ = 0.0f;\n        reset_counter_ = ratio.q;\n        reset_interval_ = 4 * p.total_duration;\n        reset_observed = true;\n      } else {\n        float period = float(p.total_duration);\n        if (period <= audio_rate_period_hysteresis_) {\n          audio_rate_ = true;\n          audio_rate_period_hysteresis_ = audio_rate_period_ * 1.1f;\n\n          average_pulse_width_ = 0.0f;\n          \n          bool no_glide = f_ratio_ != ratio.to_float();\n          f_ratio_ = ratio.to_float();\n        \n          float frequency = 1.0f / period;\n          target_frequency_ = std::min(f_ratio_ * frequency, max_frequency_);\n          float up_tolerance = (1.02f + 2.0f * frequency) * frequency_;\n          float down_tolerance = (0.98f - 2.0f * frequency) * frequency_;\n          no_glide |= target_frequency_ > up_tolerance ||\n              target_frequency_ < down_tolerance;\n          lp_coefficient_ = no_glide ? 1.0f : period * 0.00001f;\n        } else {\n          audio_rate_ = false;\n          audio_rate_period_hysteresis_ = audio_rate_period_;\n\n          // Compute the pulse width of the previous pulse, and check if the\n          // PW has been consistent over the past pulses.\n          p.pulse_width = static_cast<float>(p.on_duration) / period;\n          average_pulse_width_ = ComputeAveragePulseWidth(kPulseWidthTolerance);\n        \n          if (p.on_duration < 32) {\n            average_pulse_width_ = 0.0f;\n          }\n\n          // Try to predict the next interval between pulses. If the prediction\n          // has been reliable over the past pulses, or if the PW is steady,\n          // we'll be able to make reliable prediction about the time at which\n          // the next pulse will occur\n          Prediction prediction = PredictNextPeriod();\n          frequency_ = 1.0f / prediction.period;\n        \n          --reset_counter_;\n          if (!reset_counter_) {\n            next_f_ratio_ = ratio.to_float() * kMaxRampValue;\n            next_max_train_phase_ = static_cast<float>(ratio.q);\n            if (always_ramp_to_maximum && train_phase_ < max_train_phase_) {\n              reset_frequency_ = \\\n                  (0.01f + max_train_phase_ - train_phase_) * 0.0625f;\n            } else {\n              reset_frequency_ = 0.0f;\n              train_phase_ = 0.0f;\n              f_ratio_ = next_f_ratio_;\n              max_train_phase_ = next_max_train_phase_;\n            }\n            reset_counter_ = ratio.q;\n          } else {\n            float expected = max_train_phase_ - static_cast<float>(reset_counter_);\n            float warp =  expected - train_phase_ + 1.0f;\n            frequency_ *= max(warp, 0.01f);\n          }\n        }\n        reset_interval_ = static_cast<uint32_t>(\n            std::max(4.0f / target_frequency_, 32000 * 3.0f));\n        current_pulse_ = (current_pulse_ + 1) % kHistorySize;\n      }\n      history_[current_pulse_].on_duration = 0;\n      history_[current_pulse_].total_duration = 0;\n      history_[current_pulse_].bucket = 0;\n      next_bucket_ = 48.0f;\n    }\n    \n    // Update history buffer with total duration and on duration.\n    ++history_[current_pulse_].total_duration;\n    if (flags & GATE_FLAG_HIGH) {\n      ++history_[current_pulse_].on_duration;\n    }\n    if (float(history_[current_pulse_].total_duration) >= next_bucket_) {\n      ++history_[current_pulse_].bucket;\n      next_bucket_ *= kLogOneFourth;\n    }\n    \n    // If the pulse width is constant, and if a clock falling edge is\n    // detected, estimate the period using the on time and the pulse width,\n    // and correct the phase increment accordingly.\n    if ((flags & GATE_FLAG_FALLING) &&\n        average_pulse_width_ > 0.0f) {\n      float t_on = static_cast<float>(history_[current_pulse_].on_duration);\n      float next = max_train_phase_ - static_cast<float>(reset_counter_) + 1.0f;\n      float pw = average_pulse_width_;\n      frequency_ = max((next - train_phase_), 0.0f) * pw / ((1.0f - pw) * t_on);\n    }\n    \n    if (audio_rate_) {\n      ONE_POLE(frequency_, target_frequency_, lp_coefficient_);\n      train_phase_ += frequency_;\n      if (train_phase_ >= 1.0f) {\n        train_phase_ -= 1.0f;\n      }\n      *ramp++ = train_phase_;\n    } else {\n      if (reset_frequency_) {\n        train_phase_ += reset_frequency_;\n        if (train_phase_ >= max_train_phase_) {\n          train_phase_ = 0.0f;\n          reset_frequency_ = 0.0f;\n          f_ratio_ = next_f_ratio_;\n          max_train_phase_ = next_max_train_phase_;\n        }\n      } else {\n        train_phase_ += frequency_;\n        if (train_phase_ >= max_train_phase_) {\n          if (frequency_ == max_frequency_) {\n            train_phase_ -= max_train_phase_;\n          } else {\n            train_phase_ = max_train_phase_;\n          }\n        }\n      }\n    \n      float output_phase = train_phase_ * f_ratio_;\n      output_phase -= static_cast<float>(static_cast<int>(output_phase));\n      *ramp++ = output_phase;\n    }\n  }\n  return reset_observed;\n}\n\n}  // namespace marbles"
  },
  {
    "path": "lib/marbles/ramp/ramp_extractor.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Recovers a ramp from a clock input by guessing at what time the next edge\n// will occur. Prediction strategies:\n// - Moving average of previous intervals.\n// - Trigram model on quantized intervals.\n// - Periodic rhythmic pattern.\n// - Assume that the pulse width is constant, deduct the period from the on time\n//   and the pulse width.\n// \n// All prediction strategies are concurrently tested, and the output from the\n// best performing one is selected (à la early Scheirer/Goto beat trackers).\n\n#ifndef MARBLES_RAMP_RAMP_EXTRACTOR_H_\n#define MARBLES_RAMP_RAMP_EXTRACTOR_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/gate_flags.h\"\n\n#include \"marbles/ramp/ramp_divider.h\"\n\nnamespace marbles {\n\nclass RampExtractor {\n public:\n  RampExtractor() { }\n  ~RampExtractor() { }\n  \n  void Init(float max_frequency);\n  bool Process(\n      Ratio r,\n      bool always_ramp_to_maximum,\n      const stmlib::GateFlags* gate_flags,\n      float* ramp,\n      size_t size);\n  void Reset();\n  \n private:\n  struct Pulse {\n    uint32_t on_duration;\n    uint32_t total_duration;\n    uint32_t bucket;  // 4xlog2(total_duration).\n    float pulse_width;\n  };\n  \n  struct Prediction {\n    float period;\n    float accuracy;\n  };\n  \n  enum Predictor {\n    PREDICTOR_SLOW_MOVING_AVERAGE,\n    PREDICTOR_FAST_MOVING_AVERAGE,\n    PREDICTOR_HASH,\n    PREDICTOR_PERIOD_1,\n    PREDICTOR_PERIOD_2,\n    PREDICTOR_PERIOD_3,\n    PREDICTOR_PERIOD_4,\n    PREDICTOR_PERIOD_5,\n    PREDICTOR_PERIOD_6,\n    PREDICTOR_PERIOD_7,\n    PREDICTOR_PERIOD_8,\n    PREDICTOR_PERIOD_9,\n    PREDICTOR_PERIOD_10,\n    PREDICTOR_LAST\n  };\n  \n  static const size_t kHistorySize = 16;\n  static const size_t kHashTableSize = 256;\n  \n  float ComputeAveragePulseWidth(float tolerance) const;\n  \n  Prediction PredictNextPeriod();\n\n  size_t current_pulse_;\n  Pulse history_[kHistorySize];\n  float next_bucket_;\n  \n  float prediction_hash_table_[kHashTableSize];\n  float predicted_period_[PREDICTOR_LAST];\n  float prediction_accuracy_[PREDICTOR_LAST];\n  float average_pulse_width_;\n  \n  float train_phase_;\n  float frequency_;\n  float max_output_phase_;\n  float max_train_phase_;\n  float reset_frequency_;\n  float target_frequency_;\n  float lp_coefficient_;\n  \n  float f_ratio_;\n  float next_f_ratio_;\n  float next_max_train_phase_;\n  int reset_counter_;\n  uint32_t reset_interval_;\n  bool audio_rate_;\n  \n  float max_frequency_;\n  float audio_rate_period_;\n  float audio_rate_period_hysteresis_;\n  \n  DISALLOW_COPY_AND_ASSIGN(RampExtractor);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RAMP_RAMP_EXTRACTOR_H_\n"
  },
  {
    "path": "lib/marbles/ramp/ramp_generator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple ramp generator.\n\n#ifndef MARBLES_RAMP_RAMP_GENERATOR_H_\n#define MARBLES_RAMP_RAMP_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace marbles {\n\nclass RampGenerator {\n public:\n  RampGenerator() { }\n  ~RampGenerator() { }\n  \n  void Init() {\n    phase_ = 0.0f;\n  }\n\n  void Render(float frequency, float* out, size_t size) {\n    while (size--) {\n      phase_ += frequency;\n      if (phase_ >= 1.0f) {\n        phase_ -= 1.0f;\n      }\n      *out++ = phase_;\n    }\n  }\n  \n private:\n  float phase_;\n\n  DISALLOW_COPY_AND_ASSIGN(RampGenerator);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RAMP_RAMP_GENERATOR_H_\n"
  },
  {
    "path": "lib/marbles/ramp/slave_ramp.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A ramp that follows a mater ramp through division/multiplication.\n\n#ifndef MARBLES_RAMP_SLAVE_RAMP_H_\n#define MARBLES_RAMP_SLAVE_RAMP_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/ramp/ramp.h\"\n\nnamespace marbles {\n\nclass SlaveRamp {\n public:\n  SlaveRamp() { }\n  ~SlaveRamp() { }\n\n  inline void Init() {\n    phase_ = 0.0f;\n    max_phase_ = kMaxRampValue;\n    ratio_ = 1.0f;\n    pulse_width_ = 0.0f;\n    target_ = 1.0f;\n    pulse_length_ = 0;\n    bernoulli_ = false;\n    must_complete_ = false;\n  }\n\n  // Initialize with a multiplied/divided rate compared to the master.\n  inline void Init(int pattern_length, Ratio ratio, float pulse_width) {\n    bernoulli_ = false;\n\n    phase_ = 0.0f;\n    max_phase_ = static_cast<float>(pattern_length) * kMaxRampValue;\n    ratio_ = ratio.to_float();\n    pulse_width_ = pulse_width;\n    target_ = 1.0f;\n    pulse_length_ = 0;\n  }\n\n  // Initialize with an adaptive slope: divide the frequency by 2 every time\n  // we know we won't have to reach 1.0 at the next tick.\n  inline void Init(\n      bool must_complete,\n      float pulse_width,\n      float expected_value) {\n    bernoulli_ = true;\n\n    if (must_complete_) {\n      phase_ = 0.0f;\n      pulse_width_ = pulse_width;\n      ratio_ = 1.0f;\n      pulse_length_ = 0;\n    }\n\n    if (!must_complete) {\n      ratio_ = (1.0f - phase_) * expected_value;\n    } else {\n      ratio_ = 1.0f - phase_;\n    }\n    must_complete_ = must_complete;\n  }\n\n  inline void Process(float frequency, float* phase, bool* gate) {\n    float output_phase;\n    if (bernoulli_) {\n      phase_ += frequency * ratio_;\n      output_phase = phase_;\n      if (output_phase >= 1.0f) {\n        output_phase = 1.0f;\n      }\n    } else {\n      phase_ += frequency;\n      if (phase_ >= max_phase_) {\n        phase_ = max_phase_;\n      }\n      output_phase = phase_ * ratio_;\n      if (output_phase > target_) {\n        pulse_length_ = 0;\n        target_ += 1.0f;\n      }\n      output_phase -= static_cast<float>(static_cast<int>(output_phase));\n    }\n    *phase = output_phase;\n    *gate = pulse_width_ == 0.0f\n        ? pulse_length_ < 32 && output_phase <= 0.5f\n        : output_phase < pulse_width_;\n    ++pulse_length_;\n  }\n\n private:\n  float phase_;\n  float max_phase_;\n  float ratio_;\n  float pulse_width_;\n  float target_;\n  int pulse_length_;\n\n  bool bernoulli_;\n  bool must_complete_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SlaveRamp);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RAMP_SLAVE_RAMP_H_\n"
  },
  {
    "path": "lib/marbles/random/discrete_distribution_quantizer.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Quantize voltages by sampling from a discrete distribution.\n\n#include \"marbles/random/discrete_distribution_quantizer.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include <cmath>\n#include <algorithm>\n\nnamespace marbles {\n\nusing namespace stmlib;\nusing namespace std;\n\nvoid DiscreteDistributionQuantizer::Init(const Scale& scale) {\n  int n = scale.num_degrees;\n\n  // We don't want garbage scale data here...\n  if (!n || n > kMaxDegrees || scale.base_interval == 0.0f) {\n    return;\n  }\n\n  base_interval_ = scale.base_interval;\n  base_interval_reciprocal_ = 1.0f / scale.base_interval;\n  num_cells_ = n + 1;\n  for (int i = 0; i <= n; ++i) {\n    float previous_voltage = scale.cell_voltage(i == 0 ? 0 : i - 1);\n    float next_voltage = scale.cell_voltage(i == n ? n : i + 1);\n    cells_[i].center = scale.cell_voltage(i);\n    cells_[i].width = 0.5f * (next_voltage - previous_voltage);\n    cells_[i].weight = static_cast<float>(scale.degree[i % n].weight) / 256.0f;\n  }\n}\n\nfloat DiscreteDistributionQuantizer::Process(float value, float amount) {\n  if (amount < 0.0f) {\n    return value;\n  }\n  \n  float raw_value = value;\n\n  // Assuming 1V/Octave and a scale repeating every octave, note_integral\n  // will store the octave number, and note_fractional the fractional\n  // pitch class.\n  const float note = value * base_interval_reciprocal_;\n  MAKE_INTEGRAL_FRACTIONAL(note);\n  if (value < 0.0f) {\n    note_integral -= 1;\n    note_fractional += 1.0f;\n  }\n\n  // For amount ranging between 0 and 0.25, do not remove notes from the scale\n  // just crossfade from the unquantized output to the quantized output.\n  const float scaled_amount = amount < 0.25f ? 0.0f : (amount - 0.25f) * 1.333f;\n  \n  distribution_.Init();\n  for (int i = 0; i < num_cells_ - 1; ++i) {\n    distribution_.AddToken(i, cells_[i].scaled_width(scaled_amount));\n  }\n  distribution_.NoMoreTokens();\n  Distribution::Result r = distribution_.Sample(note_fractional);\n  \n  float quantized_value = cells_[r.token_id].center;\n  float offset = static_cast<float>(note_integral) * base_interval_;\n  quantized_value += offset;\n  \n  r.start *= base_interval_;\n  r.start += offset;\n  \n  if (amount < 0.25f) {\n    amount *= 4.0f;\n    \n    float x;\n    if (r.token_id == 0) {\n      x = r.fraction - 1.0f;\n    } else if (r.token_id == num_cells_ - 1) {\n      x = -r.fraction;\n    } else {\n      x = 2.0f * (fabs(r.fraction - 0.5f) - 0.5f);\n    }\n    const float slope = amount / (1.01f - amount);\n    const float y = max(x * slope + 1.0f, 0.0f);\n    quantized_value -= y * (quantized_value - raw_value);\n  }\n  \n  return quantized_value;\n}\n\n}  // namespace marbles"
  },
  {
    "path": "lib/marbles/random/discrete_distribution_quantizer.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Quantize voltages by sampling from a discrete distribution.\n\n#ifndef MARBLES_RANDOM_DISCRETE_DISTRIBUTION_QUANTIZER_H_\n#define MARBLES_RANDOM_DISCRETE_DISTRIBUTION_QUANTIZER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/random/distributions.h\"\n#include \"marbles/random/quantizer.h\"\n\nnamespace marbles {\n\nclass DiscreteDistributionQuantizer {\n public:\n  typedef DiscreteDistribution<kMaxDegrees> Distribution;\n  \n  struct Cell {\n    float center;\n    float width;\n    float weight;\n  \n    inline float scaled_width(float amount) {\n      float w = 8.0f * (weight - amount) + 0.5f;\n      CONSTRAIN(w, 0.0f, 1.0f);\n      return w * width;\n    }\n  };\n  \n  DiscreteDistributionQuantizer() { }\n  ~DiscreteDistributionQuantizer() { }\n\n  void Init(const Scale& scale);\n  \n  float Process(float value, float amount);\n\n private:\n  float base_interval_;\n  float base_interval_reciprocal_;\n  \n  int num_cells_;\n  Cell cells_[kMaxDegrees + 1];\n  Distribution distribution_;\n  \n  DISALLOW_COPY_AND_ASSIGN(DiscreteDistributionQuantizer);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_DISCRETE_DISTRIBUTION_QUANTIZER_H_\n"
  },
  {
    "path": "lib/marbles/random/distributions.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generates samples from various kinds of random distributions.\n\n#ifndef MARBLES_RANDOM_DISTRIBUTIONS_H_\n#define MARBLES_RANDOM_DISTRIBUTIONS_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"marbles/resources.h\"\n\nnamespace marbles {\n  \nconst size_t kNumBiasValues = 5;\nconst size_t kNumRangeValues = 9;\nconst float kIcdfTableSize = 128.0f;\n\n// Generates samples from beta distribution, from uniformly distributed samples.\n// For higher throughput, uses pre-computed tables of inverse cdfs.\ninline float BetaDistributionSample(float uniform, float spread, float bias) {\n  // Tables are pre-computed only for bias <= 0.5. For values above 0.5,\n  // symmetry is used.\n  bool flip_result = bias > 0.5f;\n  if (flip_result) {\n    uniform = 1.0f - uniform;\n    bias = 1.0f - bias;\n  }\n  \n  bias *= (static_cast<float>(kNumBiasValues) - 1.0f) * 2.0f;\n  spread *= (static_cast<float>(kNumRangeValues) - 1.0f);\n  \n  MAKE_INTEGRAL_FRACTIONAL(bias);\n  MAKE_INTEGRAL_FRACTIONAL(spread);\n  \n  size_t cell = bias_integral * (kNumRangeValues + 1) + spread_integral;\n  \n  // Lower 5% and 95% percentiles use a different table with higher resolution.\n  size_t offset = 0;\n  if (uniform <= 0.05f) {\n    offset = kIcdfTableSize + 1;\n    uniform *= 20.0f;\n  } else if (uniform >= 0.95f) {\n    offset = 2 * (kIcdfTableSize + 1);\n    uniform = (uniform - 0.95f) * 20.0f;\n  }\n  \n  float x1y1 = stmlib::Interpolate(\n      distributions_table[cell] + offset,\n      uniform,\n      kIcdfTableSize);\n  float x2y1 = stmlib::Interpolate(\n      distributions_table[cell + 1] + offset,\n      uniform,\n      kIcdfTableSize);\n  float x1y2 = stmlib::Interpolate(\n      distributions_table[cell + kNumRangeValues + 1] + offset,\n      uniform,\n      kIcdfTableSize);\n  float x2y2 = stmlib::Interpolate(\n      distributions_table[cell + kNumRangeValues + 2] + offset,\n      uniform,\n      kIcdfTableSize);\n      \n  float y1 = x1y1 + (x2y1 - x1y1) * spread_fractional;\n  float y2 = x1y2 + (x2y2 - x1y2) * spread_fractional;\n  float y = y1 + (y2 - y1) * bias_fractional;\n  \n  if (flip_result) {\n    y = 1.0f - y;\n  }\n  return y;\n}\n\n// Pre-computed beta(3, 3) with a fatter tail.\ninline float FastBetaDistributionSample(float uniform) {\n  return stmlib::Interpolate(dist_icdf_4_3, uniform, kIcdfTableSize);\n}\n\n// Draws samples from a discrete distribution. Used for the quantizer.\n// Example:\n// * 1 with probability 0.2\n// * 20 with probability 0.7\n// * 666 with probability 0.1\n//\n// DiscreteDistribution d;\n// d.Init();\n// d.AddToken(1, 0.2);\n// d.AddToken(20, 0.7);\n// d.AddToken(666, 0.1);\n// d.NoMoreTokens();\n// Result r = d.Sample(u);\n// cout << r.token_id;\n//\n// Weights do not have to add to 1.0f - the class handles normalization.\n//\ntemplate<size_t size>\nclass DiscreteDistribution {\n public:\n  DiscreteDistribution() { }\n  ~DiscreteDistribution() { }\n  \n  void Init() {\n    sum_ = 0.0f;\n    num_tokens_ = 1;\n    \n    cdf_[0] = 0.0f;\n    token_ids_[0] = 0;\n  }\n  \n  void AddToken(int token_id, float weight) {\n    if (weight <= 0.0f) {\n      return;\n    }\n    sum_ += weight;\n    token_ids_[num_tokens_] = token_id;\n    cdf_[num_tokens_] = sum_;\n    ++num_tokens_;\n  }\n  \n  void NoMoreTokens() {\n    token_ids_[num_tokens_] = token_ids_[num_tokens_ - 1];\n    cdf_[num_tokens_] = sum_ + 1.0f;\n  }\n  \n  struct Result {\n    int token_id;\n    float fraction;\n    float start;\n    float width;\n  };\n  \n  inline Result Sample(float u) const {\n    Result r;\n    u *= sum_;\n    int n = std::upper_bound(&cdf_[1], &cdf_[num_tokens_ + 1], u) - &cdf_[0];\n    float norm = 1.0f / sum_;\n    r.token_id = token_ids_[n];\n    r.width = (cdf_[n] - cdf_[n - 1]) * norm;\n    r.start = (cdf_[n - 1]) * norm;\n    r.fraction = (u - cdf_[n - 1]) / (cdf_[n] - cdf_[n - 1]);\n    return r;\n  }\n  \n  float sum_;\n  float cdf_[size + 2];\n  int token_ids_[size + 2];\n  int num_tokens_;\n  \n  DISALLOW_COPY_AND_ASSIGN(DiscreteDistribution);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_DISTRIBUTIONS_H_\n"
  },
  {
    "path": "lib/marbles/random/lag_processor.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Lag processor for the STEPS control.\n\n#include \"marbles/random/lag_processor.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include \"marbles/resources.h\"\n\nnamespace marbles {\n\nusing namespace stmlib;\n\nvoid LagProcessor::Init() {\n ramp_start_ = 0.0f;\n ramp_value_ = 0.0f;\n lp_state_ = 0.0f;\n previous_phase_ = 0.0f;\n}\n\nfloat LagProcessor::Process(float value, float smoothness, float phase) {\n  float frequency = phase - previous_phase_;\n  if (frequency < 0.0f) {\n    frequency += 1.0f;\n  }\n  previous_phase_ = phase;\n  \n  // The frequency of the portamento/glide LP filter follows an exponential\n  // scale, with a minimum frequency corresponding to half the clock pulse\n  // frequency (giving a roughly linear glide), and a maximum value 7 octaves\n  // above.\n  //\n  // When smoothness approaches 0, the response curve is tweaked to give\n  // immediate voltage changes, without any lag.\n  frequency *= 0.25f;\n  frequency *= SemitonesToRatio(84.0f * (1.0f - smoothness));\n  if (frequency >= 1.0f) {\n    frequency = 1.0f;\n  }\n  if (smoothness <= 0.05f) {\n    frequency += 20.f * (0.05f - smoothness) * (1.0f - frequency);\n  }\n\n  ONE_POLE(lp_state_, value, frequency);\n  \n  // The final output is a crossfade between a variable shape interpolation and\n  // the low-pass glide/lag.\n  float interp_amount = (smoothness - 0.6f) * 5.0f;\n  CONSTRAIN(interp_amount, 0.0f, 1.0f);\n  \n  float interp_linearity = (1.0f - smoothness) * 5.0f;\n  CONSTRAIN(interp_linearity, 0.0f, 1.0f);\n  float warped_phase = Interpolate(lut_raised_cosine, phase, 256.0f);\n  \n  float interp_phase = Crossfade(warped_phase, phase, interp_linearity);\n  float interp = Crossfade(ramp_start_, value, interp_phase);\n  ramp_value_ = interp;\n  \n  return Crossfade(lp_state_, interp, interp_amount);\n}\n\n}  // namespace marbles"
  },
  {
    "path": "lib/marbles/random/lag_processor.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Lag processor for the STEPS control.\n\n#ifndef MARBLES_RANDOM_LAG_PROCESSOR_H_\n#define MARBLES_RANDOM_LAG_PROCESSOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstdio>\n\nnamespace marbles {\n\nclass LagProcessor {\n public:\n  LagProcessor() { }\n  ~LagProcessor() { }\n  \n  void Init();\n  inline void ResetRamp() {\n    ramp_start_ = ramp_value_;\n  }\n  \n  float Process(float value, float smoothness, float phase);\n\n private:\n  float ramp_start_;\n  float ramp_value_;\n  float lp_state_;\n  float previous_phase_;\n  \n  DISALLOW_COPY_AND_ASSIGN(LagProcessor);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_LAG_PROCESSOR_H_\n"
  },
  {
    "path": "lib/marbles/random/output_channel.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Random generation channel.\n\n#include \"marbles/random/output_channel.h\"\n\n#include \"marbles/random/distributions.h\"\n#include \"marbles/random/random_sequence.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace marbles {\n\nusing namespace stmlib;\n\nconst size_t kNumReacquisitions = 20; // 6.4 samples per millisecond\n\nvoid OutputChannel::Init() {\n  spread_ = 0.5f;\n  bias_ = 0.5f;\n  steps_ = 0.5f;\n  scale_index_ = 0;\n\n  register_mode_ = false;\n  register_value_ = 0.0f;\n  register_transposition_ = 0.0f;\n\n  previous_steps_ = 0.0f;\n  previous_phase_ = 0.0f;\n  reacquisition_counter_ = 0;\n  \n  previous_voltage_ = 0.0f;\n  voltage_ = 0.0f;\n  quantized_voltage_ = 0.0f;\n  \n  scale_offset_ = ScaleOffset(10.0f, -5.0f);\n  \n  lag_processor_.Init();\n  \n  Scale scale;\n  scale.Init();\n  for (int i = 0; i < 6; ++i) {\n    quantizer_[i].Init(scale);\n  }\n}\n\nfloat OutputChannel::GenerateNewVoltage(RandomSequence* random_sequence) {\n  float u = random_sequence->NextValue(register_mode_, register_value_);\n  \n  if (register_mode_) {\n    return 10.0f * (u - 0.5f) + register_transposition_;\n  } else {\n    float degenerate_amount = 1.25f - spread_ * 25.0f;\n    float bernoulli_amount = spread_ * 25.0f - 23.75f;\n  \n    CONSTRAIN(degenerate_amount, 0.0f, 1.0f);\n    CONSTRAIN(bernoulli_amount, 0.0f, 1.0f);\n\n    float value = BetaDistributionSample(u, spread_, bias_);\n    float bernoulli_value = u >= (1.0f - bias_) ? 0.999999f : 0.0f;\n    \n    value += degenerate_amount * (bias_ - value);\n    value += bernoulli_amount * (bernoulli_value - value);\n    return scale_offset_(value);\n  }\n}\n\nvoid OutputChannel::Process(\n    RandomSequence* random_sequence,\n    const float* phase,\n    float* output,\n    size_t size,\n    size_t stride) {\n  \n  ParameterInterpolator steps_modulation(\n      &previous_steps_, steps_, size);\n  \n  // This is a horrible hack that wouldn't be here if all the sequencers\n  // and MIDI/CV interfaces in this world didn't have *horrible* slew on\n  // their CV output (I'm looking at you KORG).\n  // Without this hack, the shift register gets its value as soon as the\n  // rising edge is observed on the GATE input. Problem: the CV input is\n  // probably still slewing up, so we acquire the wrong value in the shift\n  // register. What to do then? Over the next 2ms, we'll just track the CV\n  // input until it reaches its final value - which means that Marbles\n  // output will be slewed too. Another option would have been to wait 2ms\n  // between the rising edge and the actual acquisition, but we don't want\n  // to penalize people who use tighter sequencers.\n  if (reacquisition_counter_) {\n    --reacquisition_counter_;\n    float u = random_sequence->RewriteValue(register_value_);\n    voltage_ = 10.0f * (u - 0.5f) + register_transposition_;\n    quantized_voltage_ = Quantize(voltage_, 2.0f * steps_ - 1.0f);\n  }\n  \n  while (size--) {\n    const float steps = steps_modulation.Next();\n    if (*phase < previous_phase_) {\n      previous_voltage_ = voltage_;\n      voltage_ = GenerateNewVoltage(random_sequence);\n      lag_processor_.ResetRamp();\n      quantized_voltage_ = Quantize(voltage_, 2.0f * steps - 1.0f);\n      if (register_mode_) {\n        reacquisition_counter_ = kNumReacquisitions;\n      }\n    }\n    \n    if (steps >= 0.5f) {\n      *output = quantized_voltage_;\n    } else {\n      const float smoothness = 1.0f - 2.0f * steps;\n      *output = lag_processor_.Process(voltage_, smoothness, *phase);\n    }\n    output += stride;\n    previous_phase_ = *phase++;\n  }\n}\n\n}  // namespace marbles"
  },
  {
    "path": "lib/marbles/random/output_channel.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Random generation channel.\n\n#ifndef MARBLES_RANDOM_OUTPUT_CHANNEL_H_\n#define MARBLES_RANDOM_OUTPUT_CHANNEL_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/random/lag_processor.h\"\n#include \"marbles/random/quantizer.h\"\n\nnamespace marbles {\n\nclass RandomSequence;\n\nstruct ScaleOffset {\n  ScaleOffset(float s, float o) {\n    scale = s;\n    offset = o;\n  }\n  \n  ScaleOffset() { scale = 1.0f; offset = 0.0f; }\n  \n  float scale;\n  float offset;\n  inline float operator()(float x) { return x * scale + offset; }\n};\n\nclass OutputChannel {\n public:\n  OutputChannel() { }\n  ~OutputChannel() { }\n  \n  void Init();\n  \n  void LoadScale(int i, const Scale& scale) {\n    quantizer_[i].Init(scale);\n  }\n  \n  void Process(\n      RandomSequence* random_sequence,\n      const float* phase,\n      float* output,\n      size_t size,\n      size_t stride);\n\n  inline void set_spread(float spread) {\n    spread_ = spread;\n  }\n  \n  inline void set_bias(float bias) {\n    bias_ = bias;\n  }\n  \n  inline void set_scale_index(int i) {\n    scale_index_ = i;\n  }\n  \n  inline void set_steps(float steps) {\n    steps_ = steps;\n  }\n  \n  inline void set_register_mode(bool register_mode) {\n    register_mode_ = register_mode;\n  }\n\n  inline void set_register_value(float register_value) {\n    register_value_ = register_value;\n  }\n  \n  inline void set_register_transposition(float register_transposition) {\n    register_transposition_ = register_transposition;\n  }\n  \n  inline void set_scale_offset(const ScaleOffset& scale_offset) {\n    scale_offset_ = scale_offset;\n  }\n  \n  inline float Quantize(float voltage, float amount) {\n    return quantizer_[scale_index_].Process(voltage, amount, false);\n  }\n  \n private:\n  float GenerateNewVoltage(RandomSequence* random_sequence);\n  \n  float spread_;\n  float bias_;\n  float steps_;\n  int scale_index_;\n  \n  bool register_mode_;\n  float register_value_;\n  float register_transposition_;\n  \n  float previous_steps_;\n  float previous_phase_;\n  uint32_t reacquisition_counter_;\n  \n  float previous_voltage_;\n  float voltage_;\n  float quantized_voltage_;\n  \n  ScaleOffset scale_offset_;\n  \n  LagProcessor lag_processor_;\n  \n  Quantizer quantizer_[6];\n  \n  DISALLOW_COPY_AND_ASSIGN(OutputChannel);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_OUTPUT_CHANNEL_H_\n"
  },
  {
    "path": "lib/marbles/random/quantizer.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Variable resolution quantizer.\n\n#include \"marbles/random/quantizer.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include <cmath>\n#include <algorithm>\n\nnamespace marbles {\n\nusing namespace std;\n\nvoid Quantizer::Init(const Scale& scale) {\n  int n = scale.num_degrees;\n\n  // We don't want garbage scale data here...\n  if (!n || n > kMaxDegrees || scale.base_interval == 0.0f) {\n    return;\n  }\n\n  num_degrees_ = n;\n  base_interval_ = scale.base_interval;\n  base_interval_reciprocal_ = 1.0f / scale.base_interval;\n  \n  uint8_t second_largest_threshold = 0;\n  for (int i = 0; i < n; ++i) {\n    voltage_[i] = scale.degree[i].voltage;\n    if (scale.degree[i].weight != 255 && \\\n        scale.degree[i].weight >= second_largest_threshold) {\n      second_largest_threshold = scale.degree[i].weight;\n    }\n  }\n  \n  uint8_t thresholds_[kNumThresholds] = {\n    0, 16, 32, 64, 128, 192, 255\n  };\n  \n  if (second_largest_threshold > 192) {\n    // Be more selective to only include the notes at rank 1 and 2 at\n    // the last but one position.\n    thresholds_[kNumThresholds - 2] = second_largest_threshold;\n  }\n  \n  for (int t = 0; t < kNumThresholds; ++t) {\n    uint16_t bitmask = 0;\n    uint8_t first = 0xff;\n    uint8_t last = 0;\n    for (int i = 0; i < n; ++i) {\n      if (scale.degree[i].weight >= thresholds_[t]) {\n        bitmask |= 1 << i;\n        if (first == 0xff) first = i;\n        last = i;\n      }\n    }\n    level_[t].bitmask = bitmask;\n    level_[t].first = first;\n    level_[t].last = last;\n  }\n  \n  level_quantizer_.Init();\n  fill(&feedback_[0], &feedback_[kNumThresholds], 0.0f);\n}\n\nfloat Quantizer::Process(float value, float amount, bool hysteresis) {\n  int level = level_quantizer_.Process(amount, kNumThresholds + 1);\n  float quantized_voltage = value;\n\n  if (level > 0) {\n    level -= 1;\n    float raw_value = value;\n    if (hysteresis) {\n      value += feedback_[level];\n    }\n\n    const float note = value * base_interval_reciprocal_;\n    MAKE_INTEGRAL_FRACTIONAL(note);\n    if (value < 0.0f) {\n      note_integral -= 1;\n      note_fractional += 1.0f;\n    }\n    note_fractional *= base_interval_;\n    \n    // Search for the tightest upper/lower bound in the set of available\n    // voltages. stl::upper_bound / stl::lower_bound wouldn't work here\n    // because some entries are masked.\n    Level l = level_[level];\n    float a = voltage_[l.last] - base_interval_;\n    float b = voltage_[l.first] + base_interval_;\n\n    uint16_t bitmask = l.bitmask;\n    for (int i = 0; i < num_degrees_; ++i) {\n      if (bitmask & 1) {\n        float v = voltage_[i];\n        if (note_fractional > v) {\n          a = v;\n        } else {\n          b = v;\n          break;\n        }\n      }\n      bitmask >>= 1;\n    }\n    \n    quantized_voltage = note_fractional < (a + b) * 0.5f ? a : b;\n    quantized_voltage += static_cast<float>(note_integral) * base_interval_;\n    feedback_[level] = (quantized_voltage - raw_value) * 0.25f;\n  }\n  return quantized_voltage;\n}\n\n}  // namespace marbles\n"
  },
  {
    "path": "lib/marbles/random/quantizer.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Variable resolution quantizer.\n\n#ifndef MARBLES_RANDOM_QUANTIZER_H_\n#define MARBLES_RANDOM_QUANTIZER_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/dsp/hysteresis_quantizer.h\"\n\n#include \"marbles/random/distributions.h\"\n#include \"marbles/random/quantizer.h\"\n\nnamespace marbles {\n\nconst int kMaxDegrees = 16;\nconst int kNumThresholds = 7;\n\nstruct Degree {\n  float voltage;\n  uint8_t weight;\n};\n\nstruct Scale {\n  float base_interval;\n  int num_degrees;\n  Degree degree[kMaxDegrees];\n\n  inline float cell_voltage(int i) const {\n    float transposition = static_cast<float>(i / num_degrees) * base_interval;\n    return degree[i % num_degrees].voltage + transposition;\n  }\n  \n  void Init() {\n    base_interval = 1.0f;\n    num_degrees = 1;\n    degree[0].voltage = 0.0f;\n    degree[0].weight = 0.0f;\n  }\n  \n  void InitMajor() {\n    const uint8_t major_scale_weights[] = {\n      255, 16, 128, 16, 192, 64, 8, 224, 16, 96, 32, 160,\n    };\n\n    base_interval = 1.0f;\n    num_degrees = 12;\n    for (size_t i = 0; i < 12; ++i) {\n      degree[i].voltage = static_cast<float>(i) * 0.0833333333f;\n      degree[i].weight = major_scale_weights[i];\n    }\n  }\n  \n  void InitTenth() {\n    const uint8_t major_scale_weights[] = {\n      255, 255, 255, 255, 255, 255, 255, 255, 255, 25\n    };\n\n    base_interval = 1.0f;\n    num_degrees = 10;\n    for (size_t i = 0; i < 10; ++i) {\n      degree[i].voltage = static_cast<float>(i) * 0.1f;\n      degree[i].weight = major_scale_weights[i];\n    }\n  }\n};\n\nclass Quantizer {\n public:\n  Quantizer() { }\n  ~Quantizer() { }\n\n  void Init(const Scale& scale);\n\n  float Process(float value, float amount, bool hysteresis);\n  \n private:\n  struct Level {\n    uint16_t bitmask;  // bitmask of active degrees.\n    uint8_t first;  // index of the first active degree.\n    uint8_t last;   // index of the last active degree.\n  };\n  float voltage_[kMaxDegrees];\n\n  Level level_[kNumThresholds];\n  float feedback_[kNumThresholds];\n  \n  float base_interval_;\n  float base_interval_reciprocal_;\n  int num_degrees_;\n  stmlib::HysteresisQuantizer level_quantizer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Quantizer);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_QUANTIZER_H_\n"
  },
  {
    "path": "lib/marbles/random/random_generator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Pseudo-random generator used as a fallback when we need more random values\n// than available in the hardware RNG buffer.\n\n#ifndef MARBLES_RANDOM_RANDOM_GENERATOR_H_\n#define MARBLES_RANDOM_RANDOM_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/utils/ring_buffer.h\"\n\nnamespace marbles {\n\nclass RandomGenerator {\n public:\n  RandomGenerator() { }\n  ~RandomGenerator() { }\n  \n  inline void Init(uint32_t seed) {\n    state_ = seed;\n  }\n  \n  inline void Mix(uint32_t word) {\n    // state_ ^= word;\n  }\n  \n  inline uint32_t GetWord() {\n    state_ = state_ * 1664525L + 1013904223L;\n    return state_;\n  }\n \n private:\n  uint32_t state_;\n  \n  DISALLOW_COPY_AND_ASSIGN(RandomGenerator);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_RANDOM_GENERATOR_H_\n"
  },
  {
    "path": "lib/marbles/random/random_sequence.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sequence of random values.\n\n#ifndef MARBLES_RANDOM_RANDOM_SEQUENCE_H_\n#define MARBLES_RANDOM_RANDOM_SEQUENCE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/random/random_stream.h\"\n\n#include <algorithm>\n\nnamespace marbles {\n\nconst int kDejaVuBufferSize = 16;\nconst int kHistoryBufferSize = 16;\n\nconst float kMaxUint32 = 4294967296.0f;\n\nclass RandomSequence {\n public:\n  RandomSequence() { }\n  ~RandomSequence() { }\n  \n  inline void Init(RandomStream* random_stream) {\n    random_stream_ = random_stream;\n    for (int i = 0; i < kDejaVuBufferSize; ++i) {\n      loop_[i] = random_stream_->GetFloat();\n    }\n    std::fill(&history_[0], &history_[kHistoryBufferSize], 0.0f);\n\n    loop_write_head_ = 0;\n    length_ = 8;\n    step_ = 0;\n\n    record_head_ = 0;\n    replay_head_ = -1;\n    replay_start_ = 0;\n    deja_vu_ = 0.0f;\n    replay_hash_ = replay_shift_ = 0;\n\n    redo_read_ptr_ = &loop_[0];\n    redo_write_ptr_ = NULL;\n    redo_write_history_ptr_ = NULL;\n  }\n  \n  inline void Clone(const RandomSequence& source) {\n    random_stream_ = source.random_stream_;\n    \n    std::copy(\n        &source.loop_[0],\n        &source.loop_[kDejaVuBufferSize],\n        &loop_[0]);\n    std::copy(\n        &source.history_[0],\n        &source.history_[kHistoryBufferSize],\n        &history_[0]);\n    \n    loop_write_head_ = source.loop_write_head_;\n    length_ = source.length_;\n    step_ = source.step_;\n    \n    record_head_ = source.record_head_;\n    replay_head_ = source.replay_head_;\n    replay_start_ = source.replay_start_;\n    replay_hash_ = source.replay_hash_;\n    replay_shift_ = source.replay_shift_;\n    \n    deja_vu_ = source.deja_vu_;\n    \n    redo_read_ptr_ = source.redo_read_ptr_\n        ? &loop_[source.redo_read_ptr_ - &source.loop_[0]]\n        : NULL;\n    redo_write_ptr_ = source.redo_write_ptr_\n        ? &loop_[source.redo_write_ptr_ - &source.loop_[0]]\n        : NULL;\n    redo_write_history_ptr_ = source.redo_write_history_ptr_\n        ? &history_[source.redo_write_history_ptr_ - &source.history_[0]]\n        : NULL;\n  }\n  \n  inline void Record() {\n    replay_start_ = record_head_;\n    replay_head_ = -1;\n  }\n  \n  inline void ReplayPseudoRandom(uint32_t hash) {\n    replay_head_ = replay_start_;\n    replay_hash_ = hash;\n    replay_shift_ = 0;\n  }\n\n  inline void ReplayShifted(uint32_t shift) {\n    replay_head_ = replay_start_;\n    replay_hash_ = 0;\n    replay_shift_ = shift;\n  }\n  \n  inline float GetReplayValue() const {\n    uint32_t h = (replay_head_ - 1 - replay_shift_ + \\\n        2 * kHistoryBufferSize) % kHistoryBufferSize;\n    if (!replay_hash_) {\n      return history_[h];\n    } else {\n      uint32_t word = static_cast<float>(history_[h] * kMaxUint32);\n      word = (word ^ replay_hash_) * 1664525L + 1013904223L;\n      return static_cast<float>(word) / kMaxUint32;\n    }\n  }\n  \n  inline float RewriteValue(float value) {\n    // RewriteValue(x) returns what the most recent call to NextValue would have\n    // returned if its second argument were x instead. This is used to \"rewrite\n    // history\" when the module acquires data from an external source (ASR,\n    // randomizer or quantizer mode).\n    if (replay_head_ >= 0) {\n      return GetReplayValue();\n    }\n    \n    if (redo_write_ptr_) {\n      *redo_write_ptr_ = 1.0f + value;\n    }\n    float result = *redo_read_ptr_;\n    if (result >= 1.0f) {\n      result -= 1.0f;\n    } else {\n      result = 0.5f;\n    }\n    if (redo_write_history_ptr_) {\n      *redo_write_history_ptr_ = result;\n    }\n    return result;\n  }\n  \n  inline float NextValue(bool deterministic, float value) {\n    if (replay_head_ >= 0) {\n      replay_head_ = (replay_head_ + 1) % kHistoryBufferSize;\n      return GetReplayValue();\n    }\n    \n    const float p_sqrt = 2.0f * deja_vu_ - 1.0f;\n    const float p = p_sqrt * p_sqrt;\n    float rho = random_stream_->GetFloat();\n\n    if (rho < p && deja_vu_ <= 0.5f) {\n      // Generate a new value and put it at the end of the loop.\n      redo_write_ptr_ = &loop_[loop_write_head_];\n      *redo_write_ptr_ = deterministic\n          ? 1.0f + value\n          : random_stream_->GetFloat();\n      loop_write_head_ = (loop_write_head_ + 1) % kDejaVuBufferSize;\n      step_ = length_ - 1;\n    } else {\n      // Do not generate a new value, just replay the loop or jump randomly.\n      // through it.\n      redo_write_ptr_ = NULL;\n      if (rho < p) {\n        step_ = static_cast<int>(\n            random_stream_->GetFloat() * static_cast<float>(length_));\n      } else {\n        step_ = step_ + 1;\n        if (step_ >= length_) {\n          step_ = 0;\n        }\n      }\n    }\n    uint32_t i = loop_write_head_ + kDejaVuBufferSize - length_ + step_;\n    redo_read_ptr_ = &loop_[i % kDejaVuBufferSize];\n    float result = *redo_read_ptr_;\n    if (result >= 1.0f) {\n      result -= 1.0f;\n    } else if (deterministic) {\n      // We ask for a deterministic value (shift register), but the loop\n      // contain random values. return 0.5f in this case!\n      result = 0.5f;\n    }\n    redo_write_history_ptr_ = &history_[record_head_];\n    *redo_write_history_ptr_ = result;\n    record_head_ = (record_head_ + 1) % kHistoryBufferSize;\n    return result;\n  }\n  \n  inline void NextVector(float* destination, size_t size) {\n    float seed = NextValue(false, 0.0f);\n    uint32_t word = static_cast<float>(seed * kMaxUint32);\n    while (size--) {\n      *destination++ = static_cast<float>(word) / kMaxUint32;\n      word = word * 1664525L + 1013904223L;\n    }\n  }\n  \n  inline void set_deja_vu(float deja_vu) {\n    deja_vu_ = deja_vu;\n  }\n  \n  inline void set_length(int length) {\n    if (length < 1 || length > kDejaVuBufferSize) {\n      return;\n    }\n    length_ = length;\n    step_ = step_ % length;\n  }\n  \n  inline float deja_vu() const {\n    return deja_vu_;\n  }\n  \n  inline int length() const {\n    return length_;\n  }\n\n private:\n  RandomStream* random_stream_;\n  float loop_[kDejaVuBufferSize];\n  float history_[kHistoryBufferSize];\n  int loop_write_head_;\n  int length_;\n  int step_;\n  \n  // Allows to go back in the past and get the same results again from NextValue\n  // calls. Allows the 3 X channels to be locked to the same random loop.\n  int record_head_;\n  int replay_head_;\n  int replay_start_;\n  uint32_t replay_hash_;\n  uint32_t replay_shift_;\n  \n  float deja_vu_;\n  \n  float* redo_read_ptr_;\n  float* redo_write_ptr_;\n  float* redo_write_history_ptr_;\n  \n  DISALLOW_COPY_AND_ASSIGN(RandomSequence);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_RANDOM_SEQUENCE_H_\n"
  },
  {
    "path": "lib/marbles/random/random_stream.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Stream of random values, filled from a hardware RNG, with a fallback\n// mechanism.\n\n#ifndef MARBLES_RANDOM_RANDOM_STREAM_H_\n#define MARBLES_RANDOM_RANDOM_STREAM_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/utils/ring_buffer.h\"\n\n#include \"marbles/random/random_generator.h\"\n\nnamespace marbles {\n\nclass RandomStream {\n public:\n  RandomStream() { }\n  ~RandomStream() { }\n  \n  inline void Init(RandomGenerator* fallback_generator) {\n    fallback_generator_ = fallback_generator;\n    buffer_.Init();\n  }\n\n  inline void Write(uint32_t value) {\n    // buffer_.Swallow(1);\n    // buffer_.Overwrite(value);\n    if (buffer_.writable()) {\n      buffer_.Overwrite(value);\n    }\n    fallback_generator_->Mix(value);\n  }\n  \n  inline uint32_t GetWord() {\n    if (buffer_.readable()) {\n      return buffer_.ImmediateRead();\n    } else {\n      return fallback_generator_->GetWord();\n    }\n  }\n  \n  inline float GetFloat() {\n    uint32_t word = GetWord();\n    return static_cast<float>(word) / 4294967296.0f;\n  }\n  \n private:\n  stmlib::RingBuffer<uint32_t, 128> buffer_;\n  RandomGenerator* fallback_generator_;\n  \n  DISALLOW_COPY_AND_ASSIGN(RandomStream);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_RANDOM_STREAM_H_\n"
  },
  {
    "path": "lib/marbles/random/t_generator.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generator for the T outputs.\n\n#include \"marbles/random/t_generator.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/units.h\"\n\n#include \"marbles/resources.h\"\n\nnamespace marbles {\n\nusing namespace std;\nusing namespace stmlib;\n\n/* static */\nDividerPattern TGenerator::divider_patterns[kNumDividerPatterns] = {\n  { { { 1, 1 }, { 1, 1 } }, 1 },\n  { { { 1, 1 }, { 2, 1 } }, 1 },\n  { { { 1, 2 }, { 1, 1 } }, 2 },\n  { { { 1, 1 }, { 4, 1 } }, 1 },\n  { { { 1, 2 }, { 2, 1 } }, 2 },\n  { { { 1, 1 }, { 3, 2 } }, 2 },\n  { { { 1, 4 }, { 4, 1 } }, 4 },\n  { { { 1, 4 }, { 2, 1 } }, 4 },\n  { { { 1, 2 }, { 3, 2 } }, 2 },\n  { { { 1, 1 }, { 8, 1 } }, 1 },\n  { { { 1, 1 }, { 3, 1 } }, 1 },\n  { { { 1, 3 }, { 1, 1 } }, 3 },\n  { { { 1, 1 }, { 5, 4 } }, 4 },\n  { { { 1, 2 }, { 5, 4 } }, 4 },\n  { { { 1, 1 }, { 6, 1 } }, 1 },\n  { { { 1, 3 }, { 2, 1 } }, 3 },\n  { { { 1, 1 }, { 16, 1 } }, 1 },\n};\n\n/* static */\nDividerPattern TGenerator::fixed_divider_patterns[kNumDividerPatterns] = {\n  { { { 8, 1 }, { 1, 8 } }, 8 },\n  { { { 6, 1 }, { 1, 6 } }, 6 },\n  { { { 4, 1 }, { 1, 4 } }, 4 },\n  { { { 3, 1 }, { 1, 3 } }, 3 },\n  { { { 2, 1 }, { 1, 2 } }, 2 },\n  { { { 3, 2 }, { 2, 3 } }, 6 },\n  { { { 4, 3 }, { 3, 4 } }, 12 },\n  { { { 5, 4 }, { 4, 5 } }, 20 },\n\n  { { { 1, 1 }, { 1, 1 } }, 1 },\n\n  { { { 4, 5 }, { 5, 4 } }, 20 },\n  { { { 3, 4 }, { 4, 3 } }, 12 },\n  { { { 2, 2 }, { 3, 2 } }, 6 },\n  { { { 1, 2 }, { 2, 1 } }, 2 },\n  { { { 1, 3 }, { 3, 1 } }, 3 },\n  { { { 1, 4 }, { 4, 1 } }, 4 },\n  { { { 1, 6 }, { 6, 1 } }, 6 },\n  { { { 1, 8 }, { 8, 1 } }, 8 },\n};\n\n/* static */\nRatio TGenerator::input_divider_ratios[kNumInputDividerRatios] = {\n  { 1, 4 },\n  { 1, 3 },\n  { 1, 2 },\n  { 2, 3 },\n  { 1, 1 },\n  { 3, 2 },\n  { 2, 1 },\n  { 3, 1 },\n  { 4, 1 },\n};\n\n/* static */\nuint8_t TGenerator::drum_patterns[kNumDrumPatterns][kDrumPatternSize] = {\n  { 1, 0, 0, 0, 2, 0, 0, 0 },\n  { 0, 0, 1, 0, 2, 0, 0, 0 },\n\n  { 1, 0, 1, 0, 2, 0, 0, 0 },\n  { 0, 0, 1, 0, 2, 0, 0, 2 },\n\n  { 1, 0, 1, 0, 2, 0, 1, 0 },\n  { 0, 2, 1, 0, 2, 0, 0, 2 },\n\n  { 1, 0, 0, 0, 2, 0, 1, 0 },\n  { 0, 2, 1, 0, 2, 0, 1, 2 },\n\n  { 1, 0, 0, 1, 2, 0, 0, 0 },\n  { 0, 2, 1, 1, 2, 0, 1, 2 },\n\n  { 1, 0, 0, 1, 2, 0, 1, 0 },\n  { 0, 2, 1, 1, 2, 2, 1, 2 },\n\n  { 1, 0, 0, 1, 2, 0, 1, 2 },\n  { 0, 2, 0, 1, 2, 0, 1, 2 },\n\n  { 1, 0, 1, 1, 2, 0, 1, 2 },\n  { 2, 0, 1, 2, 0, 1, 2, 0 },\n\n  { 1, 2, 1, 1, 2, 0, 1, 2 },\n  { 2, 0, 1, 2, 0, 1, 2, 2 }\n};\n\nvoid TGenerator::Init(RandomStream* random_stream, float sr) {\n  one_hertz_ = 1.0f / static_cast<float>(sr);\n  model_ = T_GENERATOR_MODEL_COMPLEMENTARY_BERNOULLI;\n  range_ = T_GENERATOR_RANGE_1X;\n\n  rate_ = 0.0f;\n  bias_ = 0.5f;\n  jitter_ = 0.0f;\n  pulse_width_mean_ = 0.0f;\n  pulse_width_std_ = 0.0f;\n\n  master_phase_ = 0.0f;\n  jitter_multiplier_ = 1.0f;\n  phase_difference_ = 0.0f;\n  previous_external_ramp_value_ = 0.0f;\n\n  divider_pattern_length_ = 0;\n  fill(&streak_counter_[0], &streak_counter_[kMarkovHistorySize], 0);\n  fill(&markov_history_[0], &markov_history_[kMarkovHistorySize], 0);\n  markov_history_ptr_ = 0;\n  drum_pattern_step_ = 0;\n  drum_pattern_index_ = 0;\n\n  sequence_.Init(random_stream);\n  ramp_divider_.Init();\n  ramp_extractor_.Init(1000.0f / sr);\n  ramp_generator_.Init();\n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    slave_ramp_[i].Init();\n  }\n  bias_quantizer_.Init();\n  rate_quantizer_.Init();\n  \n  use_external_clock_ = false;\n}\n\nint TGenerator::GenerateComplementaryBernoulli(const RandomVector& x) {\n  int bitmask = 0;\n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    if ((x.variables.u[i >> 1] > bias_) ^ (i & 1)) {\n      bitmask |= 1 << i;\n    }\n  }\n  return bitmask;\n}\n\nint TGenerator::GenerateIndependentBernoulli(const RandomVector& x) {\n  int bitmask = 0;\n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    if ((x.variables.u[i] > bias_) ^ (i & 1)) {\n      bitmask |= 1 << i;\n    }\n  }\n  return bitmask;\n}\n\nint TGenerator::GenerateThreeStates(const RandomVector& x) {\n  int bitmask = 0;\n  float p_none = 0.75f - fabs(bias_ - 0.5f);\n  float threshold = p_none + (1.0f - p_none) * (0.25f + (bias_ * 0.5f));\n  \n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    float u = x.variables.u[i >> 1];\n    if (u > p_none && ((u > threshold) ^ (i & 1))) {\n      bitmask |= 1 << i;\n    }\n  }\n  return bitmask;\n}\n\nint TGenerator::GenerateDrums(const RandomVector& x) {\n  ++drum_pattern_step_;\n  if (drum_pattern_step_ >= kDrumPatternSize) {\n    drum_pattern_step_ = 0;\n    float u = x.variables.u[0] * 2.0f * fabs(bias_ - 0.5f);\n    drum_pattern_index_ = static_cast<int32_t>(kNumDrumPatterns * u);\n    if (bias_ <= 0.5f) {\n      drum_pattern_index_ -= drum_pattern_index_ % 2;\n    }\n  }\n  return drum_patterns[drum_pattern_index_][drum_pattern_step_];\n}\n\nint TGenerator::GenerateMarkov(const RandomVector& x) {\n  int bitmask = 0;\n  float b = 1.5f * bias_ - 0.5f;\n  markov_history_[markov_history_ptr_] = 0;\n  const int32_t p = markov_history_ptr_;\n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    int32_t mask = 1 << i;\n    // 4 rules:\n    // * We favor repeating what we played 8 ticks ago.\n    // * We do not favor pulses appearing on both channels.\n    // * We favor sparse patterns (no consecutive hits).\n    // * We favor patterns in which one channel \"echoes\" what the other\n    //   channel played 4 ticks before.\n    bool periodic = markov_history_[(p + 8) % kMarkovHistorySize] & mask;\n    bool simultaneous = markov_history_[(p + 8) % kMarkovHistorySize] & ~mask;\n    bool dense = markov_history_[(p + 1) % kMarkovHistorySize] & mask;\n    bool alternate = markov_history_[(p + 4) % kMarkovHistorySize] & ~mask;\n\n    float logit = -1.5f;\n    logit += streak_counter_[i] > 24 ? 10.0f : 0.0f;\n    logit += 8.0f * fabs(b) * (periodic ? b : -b);\n    logit -= 2.0f * (simultaneous ? b : -b);\n    logit -= 1.0f * (dense ? b : 0.0f);\n    logit += 1.0f * (alternate ? b : 0.0f);\n    CONSTRAIN(logit, -10.0f, 10.0f);\n    float probability = lut_logit[static_cast<int>(logit * 12.8f + 128.0f)];\n    bool state = x.variables.u[i] < probability;\n    \n    if (sequence_.deja_vu() >= x.variables.p) {\n      state = markov_history_[(p + sequence_.length()) % kMarkovHistorySize] & mask;\n    }\n    if (state) {\n      bitmask |= mask;\n      streak_counter_[i] = 0;\n    } else {\n      ++streak_counter_[i];\n    }\n  }\n  markov_history_[p] |= bitmask;\n  markov_history_ptr_ = (p + kMarkovHistorySize - 1) % kMarkovHistorySize;\n  return bitmask;\n}\n\nvoid TGenerator::ScheduleOutputPulses(const RandomVector& x, int bitmask) {\n  for (size_t i = 0; i < kNumTChannels; ++i) {\n    slave_ramp_[i].Init(\n        bitmask & 1,\n        RandomPulseWidth(i, x.variables.pulse_width[i]),\n        0.5f);\n    bitmask >>= 1;\n  }\n}\n\nvoid TGenerator::ConfigureSlaveRamps(const RandomVector& x) {\n  switch (model_) {\n    // Generate a bitmask that will describe which outputs are active\n    // at this clock tick. Use this bitmask to actually schedule pulses on the\n    // outputs.\n    case T_GENERATOR_MODEL_COMPLEMENTARY_BERNOULLI:\n      ScheduleOutputPulses(x, GenerateComplementaryBernoulli(x));\n      break;\n    \n    case T_GENERATOR_MODEL_INDEPENDENT_BERNOULLI:\n      ScheduleOutputPulses(x, GenerateIndependentBernoulli(x));\n      break;\n\n    case T_GENERATOR_MODEL_THREE_STATES:\n      ScheduleOutputPulses(x, GenerateThreeStates(x));\n      break;\n    \n    case T_GENERATOR_MODEL_DRUMS:\n      ScheduleOutputPulses(x, GenerateDrums(x));\n      break;\n    \n    case T_GENERATOR_MODEL_MARKOV:\n      ScheduleOutputPulses(x, GenerateMarkov(x));\n      break;\n    \n    case T_GENERATOR_MODEL_CLUSTERS:\n    case T_GENERATOR_MODEL_DIVIDER:\n      --divider_pattern_length_;\n      if (divider_pattern_length_ <= 0) {\n        DividerPattern pattern;\n        if (model_ == T_GENERATOR_MODEL_DIVIDER) {\n          pattern = bias_quantizer_.Lookup(\n              fixed_divider_patterns,\n              bias_,\n              kNumDividerPatterns);\n        } else {\n          float strength = fabs(bias_ - 0.5f) * 2.0f;\n          float u = x.variables.u[0];\n          u *= (u + strength * strength * (1.0f - u));\n          u *= strength;\n          pattern = divider_patterns[static_cast<size_t>(\n              u * kNumDividerPatterns)];\n          if (bias_ < 0.5f) {\n            for (size_t i = 0; i < kNumTChannels / 2; ++i) {\n              swap(pattern.ratios[i], pattern.ratios[kNumTChannels - 1 - i]);\n            }\n          }\n        }\n        for (size_t i = 0; i < kNumTChannels; ++i) {\n          slave_ramp_[i].Init(\n              pattern.length,\n              pattern.ratios[i],\n              RandomPulseWidth(i, x.variables.pulse_width[i]));\n        }\n        divider_pattern_length_ = pattern.length;\n      }\n      break;\n  }\n}\n\nvoid TGenerator::Process(\n    bool use_external_clock,\n    const GateFlags* external_clock,\n    Ramps ramps,\n    bool* gate,\n    size_t size) {\n  float internal_frequency;\n  if (use_external_clock) {\n    if (!use_external_clock_) {\n      ramp_extractor_.Reset();\n    }\n    \n    Ratio ratio = rate_quantizer_.Lookup(\n        input_divider_ratios, \n        1.05f * rate_ / 96.0f + 0.5f,\n        kNumInputDividerRatios);\n    if (range_ == T_GENERATOR_RANGE_0_25X) {\n      ratio.q *= 4;\n    } else if (range_ == T_GENERATOR_RANGE_4X) {\n      ratio.p *= 4;\n    }\n    ratio.Simplify<2>();\n    bool reset_observed = ramp_extractor_.Process(\n        ratio, true, external_clock, ramps.external, size);\n    if (reset_observed) {\n      if (model_ == T_GENERATOR_MODEL_DRUMS) {\n        drum_pattern_step_ = kDrumPatternSize;\n        RandomVector random_vector;\n        sequence_.NextVector(\n            random_vector.x,\n            sizeof(random_vector.x) / sizeof(float));\n        ConfigureSlaveRamps(random_vector);\n      } else if (model_ == T_GENERATOR_MODEL_CLUSTERS ||\n                model_ == T_GENERATOR_MODEL_DIVIDER) {\n        divider_pattern_length_ = 0;\n      }\n    }\n    internal_frequency = 0.0f;\n  } else {\n    float rate = 2.0f;\n    if (range_ == T_GENERATOR_RANGE_4X) {\n      rate = 8.0f;\n    } else if (range_ == T_GENERATOR_RANGE_0_25X) {\n      rate = 0.5f;\n    }\n    internal_frequency = rate * one_hertz_ * SemitonesToRatio(rate_);\n  }\n  \n  use_external_clock_ = use_external_clock;\n  \n  while (size--) {\n    float frequency = use_external_clock\n        ? *ramps.external - previous_external_ramp_value_\n        : internal_frequency;\n    frequency += frequency < 0.0f ? 1.0f : 0.0f;\n\n    float jittery_frequency = frequency * jitter_multiplier_;\n    master_phase_ += jittery_frequency;\n    phase_difference_ += frequency - jittery_frequency;\n    \n    if (master_phase_ > 1.0f) {\n      master_phase_ -= 1.0f;\n      \n      RandomVector random_vector;\n      sequence_.NextVector(\n          random_vector.x,\n          sizeof(random_vector.x) / sizeof(float));\n      \n      float jitter_amount = jitter_ * jitter_ * jitter_ * jitter_ * 36.0f;\n      float x = FastBetaDistributionSample(random_vector.variables.jitter);\n      float multiplier = SemitonesToRatio((x * 2.0f - 1.0f) * jitter_amount);\n      \n      // This step is crucial in making sure that the jittered clock does not\n      // deviate too much from the master clock. The larger the phase difference\n      // difference between the two, the more likely the jittery clock will\n      // speed up or down to catch up with the straight clock.\n      multiplier *= phase_difference_ > 0.0f\n            ? 1.0f + phase_difference_\n            : 1.0f / (1.0f - phase_difference_);\n      \n      jitter_multiplier_ = multiplier;\n      ConfigureSlaveRamps(random_vector);\n    }\n    \n    if (internal_frequency) {\n      *ramps.external = master_phase_;\n    }\n    \n    previous_external_ramp_value_ = *ramps.external;\n    ramps.external++;\n    *ramps.master++ = master_phase_;\n    for (size_t j = 0; j < kNumTChannels; ++j) {\n      slave_ramp_[j].Process(\n          frequency * jitter_multiplier_,\n          ramps.slave[j],\n          gate);\n      ramps.slave[j]++;\n      gate++;\n    }\n  }\n}\n\n}  // namespace marbles\n"
  },
  {
    "path": "lib/marbles/random/t_generator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generator for the T outputs.\n\n#ifndef MARBLES_RANDOM_T_GENERATOR_H_\n#define MARBLES_RANDOM_T_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/ramp/ramp_divider.h\"\n#include \"marbles/ramp/ramp_extractor.h\"\n#include \"marbles/ramp/ramp_generator.h\"\n#include \"marbles/ramp/slave_ramp.h\"\n#include \"marbles/random/distributions.h\"\n#include \"marbles/random/random_sequence.h\"\n#include \"stmlib/dsp/hysteresis_quantizer.h\"\n\nnamespace marbles {\n\nenum TGeneratorModel {\n  T_GENERATOR_MODEL_COMPLEMENTARY_BERNOULLI,\n  T_GENERATOR_MODEL_CLUSTERS,\n  T_GENERATOR_MODEL_DRUMS,\n\n  T_GENERATOR_MODEL_INDEPENDENT_BERNOULLI,\n  T_GENERATOR_MODEL_DIVIDER,\n  T_GENERATOR_MODEL_THREE_STATES,\n  \n  T_GENERATOR_MODEL_MARKOV,\n};\n\nenum TGeneratorRange {\n  T_GENERATOR_RANGE_0_25X,\n  T_GENERATOR_RANGE_1X,\n  T_GENERATOR_RANGE_4X,\n};\n\nconst size_t kNumTChannels = 2;\nconst size_t kMarkovHistorySize = 16;\nconst size_t kNumDrumPatterns = 18;\nconst size_t kDrumPatternSize = 8;\n\nstruct DividerPattern {\n  Ratio ratios[kNumTChannels];\n  int32_t length;\n};\n\nstruct Ramps {\n  float* external;\n  float* master;\n  float* slave[kNumTChannels];\n};\n\nconst size_t kNumDividerPatterns = 17;\nconst size_t kNumInputDividerRatios = 9;\n\nclass TGenerator {\n public:\n  TGenerator() { }\n  ~TGenerator() { }\n  \n  void Init(RandomStream* random_stream, float sr);\n  void Process(\n      bool use_external_clock,\n      const stmlib::GateFlags* external_clock,\n      Ramps ramps,\n      bool* gate,\n      size_t size);\n  \n  inline void set_model(TGeneratorModel model) {\n    model_ = model;\n  }\n  \n  inline void set_range(TGeneratorRange range) {\n    range_ = range;\n  }\n  \n  inline void set_rate(float rate) {\n    rate_ = rate;\n  }\n  \n  inline void set_bias(float bias) {\n    bias_ = bias;\n  }\n  \n  inline void set_jitter(float jitter) {\n    jitter_ = jitter;\n  }\n  \n  inline void set_deja_vu(float deja_vu) {\n    sequence_.set_deja_vu(deja_vu);\n  }\n\n  inline void set_length(int length) {\n    sequence_.set_length(length);\n  }\n\n  inline void set_pulse_width_mean(float pulse_width_mean) {\n    pulse_width_mean_ = pulse_width_mean;\n  }\n  \n  inline void set_pulse_width_std(float pulse_width_std) {\n    pulse_width_std_ = pulse_width_std;\n  }\n  \n private:\n  union RandomVector {\n    struct {\n      float pulse_width[kNumTChannels];\n      float u[kNumTChannels];\n      float p;\n      float jitter;\n    } variables;\n    float x[2 * kNumTChannels + 2];\n  };\n  \n  void ConfigureSlaveRamps(const RandomVector& v);\n  int GenerateComplementaryBernoulli(const RandomVector& v);\n  int GenerateIndependentBernoulli(const RandomVector& v);\n  int GenerateThreeStates(const RandomVector& v);\n  int GenerateDrums(const RandomVector& v);\n  int GenerateMarkov(const RandomVector& v);\n  void ScheduleOutputPulses(const RandomVector& v, int bitmask);\n\n  float RandomPulseWidth(int i, float u) {\n    if (pulse_width_std_ == 0.0f) {\n      return 0.05f + 0.9f * pulse_width_mean_;\n    } else {\n      return 0.05f + 0.9f * BetaDistributionSample(\n          u,\n          pulse_width_std_,\n          pulse_width_mean_);  // Jon Brooks\n          // i & 1 ? 1.0f - pulse_width_mean_);\n    }\n  }\n  \n  float one_hertz_;\n  \n  TGeneratorModel model_;\n  TGeneratorRange range_;\n  \n  float rate_;\n  float bias_;\n  float jitter_;\n  float pulse_width_mean_;\n  float pulse_width_std_;\n  \n  float master_phase_;\n  float jitter_multiplier_;\n  float phase_difference_;\n  float previous_external_ramp_value_;\n  \n  bool use_external_clock_;\n\n  int32_t divider_pattern_length_;\n  int32_t streak_counter_[kMarkovHistorySize];\n  int32_t markov_history_[kMarkovHistorySize];\n  int32_t markov_history_ptr_;\n  size_t drum_pattern_step_;\n  size_t drum_pattern_index_;\n\n  RandomSequence sequence_;\n  RampDivider ramp_divider_;\n  RampExtractor ramp_extractor_;\n  RampGenerator ramp_generator_;\n\n  SlaveRamp slave_ramp_[kNumTChannels];\n  \n  stmlib::HysteresisQuantizer bias_quantizer_;\n  stmlib::HysteresisQuantizer rate_quantizer_;\n  \n  static DividerPattern divider_patterns[kNumDividerPatterns];\n  static DividerPattern fixed_divider_patterns[kNumDividerPatterns];\n  static Ratio input_divider_ratios[kNumInputDividerRatios];\n  static uint8_t drum_patterns[kNumDrumPatterns][kDrumPatternSize];\n  \n  DISALLOW_COPY_AND_ASSIGN(TGenerator);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_T_GENERATOR_H_\n"
  },
  {
    "path": "lib/marbles/random/x_y_generator.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generator for the X/Y outputs.\n\n#include \"marbles/random/x_y_generator.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n\nnamespace marbles {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid XYGenerator::Init(RandomStream* random_stream, float sr) {\n  for (size_t i = 0; i < kNumChannels; ++i) {\n    random_sequence_[i].Init(random_stream);\n    output_channel_[i].Init();\n  }\n  ramp_extractor_.Init(8000.0f / sr);\n  ramp_divider_.Init();\n  external_clock_stabilization_counter_ = 16;\n  \n  fill(\n      &use_shifted_sequences_[0],\n      &use_shifted_sequences_[kNumChannels],\n      false);\n}\n\nconst uint32_t hashes[kNumXChannels] = {\n  0, 0xbeca55e5, 0xf0cacc1a\n};\n\nvoid XYGenerator::Process(\n    ClockSource clock_source,\n    const GroupSettings& x_settings,\n    const GroupSettings& y_settings,\n    const GateFlags* external_clock,\n    const Ramps& ramps,\n    float* output,\n    size_t size) {\n  float* channel_ramp[kNumChannels];\n  \n  if (clock_source != CLOCK_SOURCE_EXTERNAL) {\n    // For a couple of upcoming blocks, we'll still be receiving garbage from\n    // the normalization pin that we need to ignore.\n    external_clock_stabilization_counter_ = 16;\n  } else {\n    if (external_clock_stabilization_counter_) {\n      --external_clock_stabilization_counter_;\n      if (external_clock_stabilization_counter_ == 0) {\n        ramp_extractor_.Reset();\n      }\n    }\n  }\n  \n  switch (clock_source) {\n    case CLOCK_SOURCE_EXTERNAL:\n      {\n        Ratio r = { 1, 1 };\n        ramp_extractor_.Process(r, false, external_clock, ramps.slave[0], size);\n        if (external_clock_stabilization_counter_) {\n          fill(&ramps.slave[0][0], &ramps.slave[0][size], 0.0f);\n        }\n      }\n      channel_ramp[0] = ramps.slave[0];\n      channel_ramp[1] = ramps.slave[0];\n      channel_ramp[2] = ramps.slave[0];\n      break;\n      \n    case CLOCK_SOURCE_INTERNAL_T1:\n      channel_ramp[0] = ramps.slave[0];\n      channel_ramp[1] = ramps.slave[0];\n      channel_ramp[2] = ramps.slave[0];\n      break;\n\n    case CLOCK_SOURCE_INTERNAL_T2:\n      channel_ramp[0] = ramps.master;\n      channel_ramp[1] = ramps.master;\n      channel_ramp[2] = ramps.master;\n      break;\n      \n    case CLOCK_SOURCE_INTERNAL_T3:\n      channel_ramp[0] = ramps.slave[1];\n      channel_ramp[1] = ramps.slave[1];\n      channel_ramp[2] = ramps.slave[1];\n      break;\n      \n    default:\n      channel_ramp[0] = ramps.slave[0];\n      channel_ramp[1] = ramps.master;\n      channel_ramp[2] = ramps.slave[1];\n      break;\n  }\n  \n  ramp_divider_.Process(y_settings.ratio, channel_ramp[1], ramps.external, size);\n  channel_ramp[kNumChannels - 1] = ramps.external;\n  \n  for (size_t i = 0; i < kNumChannels; ++i) {\n    OutputChannel& channel = output_channel_[i];\n    const GroupSettings& settings = i < kNumXChannels ? x_settings : y_settings;\n    \n    switch (settings.voltage_range) {\n      case VOLTAGE_RANGE_NARROW:\n        channel.set_scale_offset(ScaleOffset(2.0f, 0.0f));\n        break;\n      \n      case VOLTAGE_RANGE_POSITIVE:\n        channel.set_scale_offset(ScaleOffset(5.0f, 0.0f));\n        break;\n      \n      case VOLTAGE_RANGE_FULL:\n        channel.set_scale_offset(ScaleOffset(10.0f, -5.0f));\n        break;\n      \n      default:\n        break;\n    }\n    \n    float amount = 1.0f;\n    if (settings.control_mode == CONTROL_MODE_BUMP) {\n      amount = i == kNumXChannels / 2 ? 1.0f : -1.0f;\n    } else if (settings.control_mode == CONTROL_MODE_TILT) {\n      amount = 2.0f * static_cast<float>(i) / float(kNumXChannels - 1) - 1.0f;\n    }\n    \n    channel.set_spread(0.5f + (settings.spread - 0.5f) * amount);\n    channel.set_bias(0.5f + (settings.bias - 0.5f) * amount);\n    channel.set_steps(0.5f + (settings.steps - 0.5f) * \\\n        (settings.register_mode ? 1.0f : amount));\n    channel.set_scale_index(settings.scale_index);\n    channel.set_register_mode(settings.register_mode);\n    channel.set_register_value(settings.register_value);\n    channel.set_register_transposition(\n        4.0f * settings.spread * (settings.bias - 0.5f) * amount);\n    \n    RandomSequence* sequence = &random_sequence_[i];\n    sequence->Record();\n    sequence->set_length(settings.length);\n    sequence->set_deja_vu(settings.deja_vu);\n    \n    bool use_shifted_sequences = false;\n    \n    // When all channels follow the same clock, the deja-vu random looping will\n    // follow the same pattern and the constant-mode input will be shifted!\n    if (clock_source != CLOCK_SOURCE_INTERNAL_T1_T2_T3\n        && i > 0 && i < kNumXChannels) {\n      sequence = &random_sequence_[0];\n      if (settings.register_mode) {\n        use_shifted_sequences = true;\n\n        if (settings.control_mode == CONTROL_MODE_IDENTICAL) {\n          sequence->ReplayShifted(i);\n        } else if (settings.control_mode == CONTROL_MODE_BUMP) {\n          sequence->ReplayShifted(i == 2 ? 1 : 0);\n        } else {\n          sequence->ReplayShifted(0);\n        }\n      } else {\n        sequence->ReplayPseudoRandom(hashes[i]);\n      }\n    }\n    \n    if (!use_shifted_sequences && use_shifted_sequences_[i]) {\n      sequence->Clone(random_sequence_[0]);\n    }\n    use_shifted_sequences_[i] = use_shifted_sequences;\n    \n    channel.Process(sequence, channel_ramp[i], &output[i], size, kNumChannels);\n  }\n}\n\n}  // namespace marbles"
  },
  {
    "path": "lib/marbles/random/x_y_generator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Generator for the X/Y outputs.\n\n#ifndef MARBLES_RANDOM_X_Y_GENERATOR_H_\n#define MARBLES_RANDOM_X_Y_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"marbles/ramp/ramp_divider.h\"\n#include \"marbles/ramp/ramp_extractor.h\"\n#include \"marbles/random/output_channel.h\"\n#include \"marbles/random/random_sequence.h\"\n#include \"marbles/random/t_generator.h\"\n\nnamespace marbles {\n\nenum VoltageRange {\n  VOLTAGE_RANGE_NARROW,  // +2V\n  VOLTAGE_RANGE_POSITIVE,  // +5V\n  VOLTAGE_RANGE_FULL  // +/- 5V\n};\n\nenum ClockSource {\n  CLOCK_SOURCE_INTERNAL_T1_T2_T3,\n  CLOCK_SOURCE_INTERNAL_T1,\n  CLOCK_SOURCE_INTERNAL_T2,\n  CLOCK_SOURCE_INTERNAL_T3,\n  CLOCK_SOURCE_EXTERNAL\n};\n\nenum ControlMode {\n  CONTROL_MODE_IDENTICAL,\n  CONTROL_MODE_BUMP,\n  CONTROL_MODE_TILT\n};\n\nenum OutputGroup {\n  OUTPUT_GROUP_X,\n  OUTPUT_GROUP_Y,\n  OUTPUT_GROUP_LAST\n};\n\nconst size_t kNumXChannels = 3;\nconst size_t kNumYChannels = 1;\nconst size_t kNumChannels = kNumXChannels + kNumYChannels;\n\nstruct GroupSettings {\n  ControlMode control_mode;\n  VoltageRange voltage_range;\n  bool register_mode;\n  float register_value;\n  float spread;\n  float bias;\n  float steps;\n  float deja_vu;\n  int scale_index;\n  int length;\n  Ratio ratio;\n};\n\nclass XYGenerator {\n public:\n  XYGenerator() { }\n  ~XYGenerator() { }\n  \n  void Init(RandomStream* random_stream, float sr);\n  void Process(\n      ClockSource clock_source,\n      const GroupSettings& x_settings,\n      const GroupSettings& y_settings,\n      const stmlib::GateFlags* external_clock,\n      const Ramps& ramps,\n      float* output,\n      size_t size);\n  \n  void LoadScale(int channel, int scale_index, const Scale& scale) {\n    output_channel_[channel].LoadScale(scale_index, scale);\n  }\n  void LoadScale(int scale_index, const Scale& scale) {\n    for (size_t i = 0; i < kNumXChannels; ++i) {\n      output_channel_[i].LoadScale(scale_index, scale);\n    }\n  }\n  \n private:\n  RandomSequence random_sequence_[kNumChannels];\n  OutputChannel output_channel_[kNumChannels];\n  RampExtractor ramp_extractor_;\n  RampDivider ramp_divider_;\n  \n  int external_clock_stabilization_counter_;\n  \n  bool use_shifted_sequences_[kNumChannels];\n  \n  DISALLOW_COPY_AND_ASSIGN(XYGenerator);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_RANDOM_X_Y_GENERATOR_H_\n"
  },
  {
    "path": "lib/marbles/resources.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"marbles/resources.h\"\n\nnamespace marbles {\n\nconst float lut_raised_cosine[] = {\n   0.000000000e+00,  3.764908043e-05,  1.505906519e-04,  3.388077058e-04,\n   6.022718974e-04,  9.409435499e-04,  1.354771661e-03,  1.843693909e-03,\n   2.407636664e-03,  3.046514999e-03,  3.760232701e-03,  4.548682286e-03,\n   5.411745018e-03,  6.349290921e-03,  7.361178806e-03,  8.447256284e-03,\n   9.607359798e-03,  1.084131464e-02,  1.214893498e-02,  1.353002390e-02,\n   1.498437340e-02,  1.651176448e-02,  1.811196710e-02,  1.978474029e-02,\n   2.152983213e-02,  2.334697982e-02,  2.523590970e-02,  2.719633731e-02,\n   2.922796741e-02,  3.133049404e-02,  3.350360058e-02,  3.574695976e-02,\n   3.806023374e-02,  4.044307415e-02,  4.289512215e-02,  4.541600845e-02,\n   4.800535344e-02,  5.066276715e-02,  5.338784940e-02,  5.618018980e-02,\n   5.903936783e-02,  6.196495290e-02,  6.495650445e-02,  6.801357194e-02,\n   7.113569500e-02,  7.432240345e-02,  7.757321738e-02,  8.088764722e-02,\n   8.426519385e-02,  8.770534861e-02,  9.120759342e-02,  9.477140087e-02,\n   9.839623426e-02,  1.020815477e-01,  1.058267862e-01,  1.096313857e-01,\n   1.134947733e-01,  1.174163672e-01,  1.213955767e-01,  1.254318027e-01,\n   1.295244373e-01,  1.336728642e-01,  1.378764585e-01,  1.421345874e-01,\n   1.464466094e-01,  1.508118753e-01,  1.552297276e-01,  1.596995011e-01,\n   1.642205226e-01,  1.687921112e-01,  1.734135785e-01,  1.780842286e-01,\n   1.828033579e-01,  1.875702559e-01,  1.923842047e-01,  1.972444793e-01,\n   2.021503478e-01,  2.071010713e-01,  2.120959043e-01,  2.171340946e-01,\n   2.222148835e-01,  2.273375058e-01,  2.325011901e-01,  2.377051587e-01,\n   2.429486279e-01,  2.482308081e-01,  2.535509039e-01,  2.589081140e-01,\n   2.643016316e-01,  2.697306445e-01,  2.751943352e-01,  2.806918807e-01,\n   2.862224533e-01,  2.917852200e-01,  2.973793430e-01,  3.030039800e-01,\n   3.086582838e-01,  3.143414030e-01,  3.200524817e-01,  3.257906599e-01,\n   3.315550733e-01,  3.373448539e-01,  3.431591298e-01,  3.489970253e-01,\n   3.548576614e-01,  3.607401553e-01,  3.666436213e-01,  3.725671702e-01,\n   3.785099100e-01,  3.844709459e-01,  3.904493799e-01,  3.964443119e-01,\n   4.024548390e-01,  4.084800560e-01,  4.145190556e-01,  4.205709283e-01,\n   4.266347628e-01,  4.327096457e-01,  4.387946624e-01,  4.448888964e-01,\n   4.509914298e-01,  4.571013438e-01,  4.632177182e-01,  4.693396318e-01,\n   4.754661628e-01,  4.815963885e-01,  4.877293857e-01,  4.938642309e-01,\n   5.000000000e-01,  5.061357691e-01,  5.122706143e-01,  5.184036115e-01,\n   5.245338372e-01,  5.306603682e-01,  5.367822818e-01,  5.428986562e-01,\n   5.490085702e-01,  5.551111036e-01,  5.612053376e-01,  5.672903543e-01,\n   5.733652372e-01,  5.794290717e-01,  5.854809444e-01,  5.915199440e-01,\n   5.975451610e-01,  6.035556881e-01,  6.095506201e-01,  6.155290541e-01,\n   6.214900900e-01,  6.274328298e-01,  6.333563787e-01,  6.392598447e-01,\n   6.451423386e-01,  6.510029747e-01,  6.568408702e-01,  6.626551461e-01,\n   6.684449267e-01,  6.742093401e-01,  6.799475183e-01,  6.856585970e-01,\n   6.913417162e-01,  6.969960200e-01,  7.026206570e-01,  7.082147800e-01,\n   7.137775467e-01,  7.193081193e-01,  7.248056648e-01,  7.302693555e-01,\n   7.356983684e-01,  7.410918860e-01,  7.464490961e-01,  7.517691919e-01,\n   7.570513721e-01,  7.622948413e-01,  7.674988099e-01,  7.726624942e-01,\n   7.777851165e-01,  7.828659054e-01,  7.879040957e-01,  7.928989287e-01,\n   7.978496522e-01,  8.027555207e-01,  8.076157953e-01,  8.124297441e-01,\n   8.171966421e-01,  8.219157714e-01,  8.265864215e-01,  8.312078888e-01,\n   8.357794774e-01,  8.403004989e-01,  8.447702724e-01,  8.491881247e-01,\n   8.535533906e-01,  8.578654126e-01,  8.621235415e-01,  8.663271358e-01,\n   8.704755627e-01,  8.745681973e-01,  8.786044233e-01,  8.825836328e-01,\n   8.865052267e-01,  8.903686143e-01,  8.941732138e-01,  8.979184523e-01,\n   9.016037657e-01,  9.052285991e-01,  9.087924066e-01,  9.122946514e-01,\n   9.157348062e-01,  9.191123528e-01,  9.224267826e-01,  9.256775966e-01,\n   9.288643050e-01,  9.319864281e-01,  9.350434956e-01,  9.380350471e-01,\n   9.409606322e-01,  9.438198102e-01,  9.466121506e-01,  9.493372328e-01,\n   9.519946466e-01,  9.545839915e-01,  9.571048779e-01,  9.595569258e-01,\n   9.619397663e-01,  9.642530402e-01,  9.664963994e-01,  9.686695060e-01,\n   9.707720326e-01,  9.728036627e-01,  9.747640903e-01,  9.766530202e-01,\n   9.784701679e-01,  9.802152597e-01,  9.818880329e-01,  9.834882355e-01,\n   9.850156266e-01,  9.864699761e-01,  9.878510650e-01,  9.891586854e-01,\n   9.903926402e-01,  9.915527437e-01,  9.926388212e-01,  9.936507091e-01,\n   9.945882550e-01,  9.954513177e-01,  9.962397673e-01,  9.969534850e-01,\n   9.975923633e-01,  9.981563061e-01,  9.986452283e-01,  9.990590565e-01,\n   9.993977281e-01,  9.996611923e-01,  9.998494093e-01,  9.999623509e-01,\n   1.000000000e+00,\n};\nconst float lut_sine[] = {\n   0.000000000e+00,  2.454122852e-02,  4.906767433e-02,  7.356456360e-02,\n   9.801714033e-02,  1.224106752e-01,  1.467304745e-01,  1.709618888e-01,\n   1.950903220e-01,  2.191012402e-01,  2.429801799e-01,  2.667127575e-01,\n   2.902846773e-01,  3.136817404e-01,  3.368898534e-01,  3.598950365e-01,\n   3.826834324e-01,  4.052413140e-01,  4.275550934e-01,  4.496113297e-01,\n   4.713967368e-01,  4.928981922e-01,  5.141027442e-01,  5.349976199e-01,\n   5.555702330e-01,  5.758081914e-01,  5.956993045e-01,  6.152315906e-01,\n   6.343932842e-01,  6.531728430e-01,  6.715589548e-01,  6.895405447e-01,\n   7.071067812e-01,  7.242470830e-01,  7.409511254e-01,  7.572088465e-01,\n   7.730104534e-01,  7.883464276e-01,  8.032075315e-01,  8.175848132e-01,\n   8.314696123e-01,  8.448535652e-01,  8.577286100e-01,  8.700869911e-01,\n   8.819212643e-01,  8.932243012e-01,  9.039892931e-01,  9.142097557e-01,\n   9.238795325e-01,  9.329927988e-01,  9.415440652e-01,  9.495281806e-01,\n   9.569403357e-01,  9.637760658e-01,  9.700312532e-01,  9.757021300e-01,\n   9.807852804e-01,  9.852776424e-01,  9.891765100e-01,  9.924795346e-01,\n   9.951847267e-01,  9.972904567e-01,  9.987954562e-01,  9.996988187e-01,\n   1.000000000e+00,  9.996988187e-01,  9.987954562e-01,  9.972904567e-01,\n   9.951847267e-01,  9.924795346e-01,  9.891765100e-01,  9.852776424e-01,\n   9.807852804e-01,  9.757021300e-01,  9.700312532e-01,  9.637760658e-01,\n   9.569403357e-01,  9.495281806e-01,  9.415440652e-01,  9.329927988e-01,\n   9.238795325e-01,  9.142097557e-01,  9.039892931e-01,  8.932243012e-01,\n   8.819212643e-01,  8.700869911e-01,  8.577286100e-01,  8.448535652e-01,\n   8.314696123e-01,  8.175848132e-01,  8.032075315e-01,  7.883464276e-01,\n   7.730104534e-01,  7.572088465e-01,  7.409511254e-01,  7.242470830e-01,\n   7.071067812e-01,  6.895405447e-01,  6.715589548e-01,  6.531728430e-01,\n   6.343932842e-01,  6.152315906e-01,  5.956993045e-01,  5.758081914e-01,\n   5.555702330e-01,  5.349976199e-01,  5.141027442e-01,  4.928981922e-01,\n   4.713967368e-01,  4.496113297e-01,  4.275550934e-01,  4.052413140e-01,\n   3.826834324e-01,  3.598950365e-01,  3.368898534e-01,  3.136817404e-01,\n   2.902846773e-01,  2.667127575e-01,  2.429801799e-01,  2.191012402e-01,\n   1.950903220e-01,  1.709618888e-01,  1.467304745e-01,  1.224106752e-01,\n   9.801714033e-02,  7.356456360e-02,  4.906767433e-02,  2.454122852e-02,\n   1.224646799e-16, -2.454122852e-02, -4.906767433e-02, -7.356456360e-02,\n  -9.801714033e-02, -1.224106752e-01, -1.467304745e-01, -1.709618888e-01,\n  -1.950903220e-01, -2.191012402e-01, -2.429801799e-01, -2.667127575e-01,\n  -2.902846773e-01, -3.136817404e-01, -3.368898534e-01, -3.598950365e-01,\n  -3.826834324e-01, -4.052413140e-01, -4.275550934e-01, -4.496113297e-01,\n  -4.713967368e-01, -4.928981922e-01, -5.141027442e-01, -5.349976199e-01,\n  -5.555702330e-01, -5.758081914e-01, -5.956993045e-01, -6.152315906e-01,\n  -6.343932842e-01, -6.531728430e-01, -6.715589548e-01, -6.895405447e-01,\n  -7.071067812e-01, -7.242470830e-01, -7.409511254e-01, -7.572088465e-01,\n  -7.730104534e-01, -7.883464276e-01, -8.032075315e-01, -8.175848132e-01,\n  -8.314696123e-01, -8.448535652e-01, -8.577286100e-01, -8.700869911e-01,\n  -8.819212643e-01, -8.932243012e-01, -9.039892931e-01, -9.142097557e-01,\n  -9.238795325e-01, -9.329927988e-01, -9.415440652e-01, -9.495281806e-01,\n  -9.569403357e-01, -9.637760658e-01, -9.700312532e-01, -9.757021300e-01,\n  -9.807852804e-01, -9.852776424e-01, -9.891765100e-01, -9.924795346e-01,\n  -9.951847267e-01, -9.972904567e-01, -9.987954562e-01, -9.996988187e-01,\n  -1.000000000e+00, -9.996988187e-01, -9.987954562e-01, -9.972904567e-01,\n  -9.951847267e-01, -9.924795346e-01, -9.891765100e-01, -9.852776424e-01,\n  -9.807852804e-01, -9.757021300e-01, -9.700312532e-01, -9.637760658e-01,\n  -9.569403357e-01, -9.495281806e-01, -9.415440652e-01, -9.329927988e-01,\n  -9.238795325e-01, -9.142097557e-01, -9.039892931e-01, -8.932243012e-01,\n  -8.819212643e-01, -8.700869911e-01, -8.577286100e-01, -8.448535652e-01,\n  -8.314696123e-01, -8.175848132e-01, -8.032075315e-01, -7.883464276e-01,\n  -7.730104534e-01, -7.572088465e-01, -7.409511254e-01, -7.242470830e-01,\n  -7.071067812e-01, -6.895405447e-01, -6.715589548e-01, -6.531728430e-01,\n  -6.343932842e-01, -6.152315906e-01, -5.956993045e-01, -5.758081914e-01,\n  -5.555702330e-01, -5.349976199e-01, -5.141027442e-01, -4.928981922e-01,\n  -4.713967368e-01, -4.496113297e-01, -4.275550934e-01, -4.052413140e-01,\n  -3.826834324e-01, -3.598950365e-01, -3.368898534e-01, -3.136817404e-01,\n  -2.902846773e-01, -2.667127575e-01, -2.429801799e-01, -2.191012402e-01,\n  -1.950903220e-01, -1.709618888e-01, -1.467304745e-01, -1.224106752e-01,\n  -9.801714033e-02, -7.356456360e-02, -4.906767433e-02, -2.454122852e-02,\n  -2.449293598e-16,\n};\nconst float lut_logit[] = {\n   9.756097561e-04,  1.029841827e-03,  1.087085263e-03,  1.147506902e-03,\n   1.211282784e-03,  1.278598651e-03,  1.349650476e-03,  1.424645024e-03,\n   1.503800438e-03,  1.587346853e-03,  1.675527056e-03,  1.768597162e-03,\n   1.866827345e-03,  1.970502590e-03,  2.079923497e-03,  2.195407119e-03,\n   2.317287851e-03,  2.445918356e-03,  2.581670544e-03,  2.724936605e-03,\n   2.876130082e-03,  3.035687013e-03,  3.204067123e-03,  3.381755074e-03,\n   3.569261780e-03,  3.767125791e-03,  3.975914737e-03,  4.196226847e-03,\n   4.428692539e-03,  4.673976092e-03,  4.932777388e-03,  5.205833741e-03,\n   5.493921811e-03,  5.797859605e-03,  6.118508566e-03,  6.456775757e-03,\n   6.813616142e-03,  7.190034962e-03,  7.587090215e-03,  8.005895235e-03,\n   8.447621377e-03,  8.913500811e-03,  9.404829421e-03,  9.922969810e-03,\n   1.046935442e-02,  1.104548875e-02,  1.165295471e-02,  1.229341403e-02,\n   1.296861181e-02,  1.368038021e-02,  1.443064212e-02,  1.522141505e-02,\n   1.605481500e-02,  1.693306051e-02,  1.785847665e-02,  1.883349920e-02,\n   1.986067876e-02,  2.094268495e-02,  2.208231056e-02,  2.328247576e-02,\n   2.454623222e-02,  2.587676715e-02,  2.727740726e-02,  2.875162262e-02,\n   3.030303030e-02,  3.193539780e-02,  3.365264624e-02,  3.545885323e-02,\n   3.735825534e-02,  3.935525016e-02,  4.145439785e-02,  4.366042208e-02,\n   4.597821036e-02,  4.841281356e-02,  5.096944459e-02,  5.365347623e-02,\n   5.647043776e-02,  5.942601054e-02,  6.252602226e-02,  6.577643982e-02,\n   6.918336064e-02,  7.275300236e-02,  7.649169073e-02,  8.040584556e-02,\n   8.450196469e-02,  8.878660570e-02,  9.326636540e-02,  9.794785684e-02,\n   1.028376839e-01,  1.079424132e-01,  1.132685434e-01,  1.188224717e-01,\n   1.246104577e-01,  1.306385847e-01,  1.369127177e-01,  1.434384597e-01,\n   1.502211048e-01,  1.572655893e-01,  1.645764408e-01,  1.721577255e-01,\n   1.800129939e-01,  1.881452256e-01,  1.965567737e-01,  2.052493091e-01,\n   2.142237651e-01,  2.234802836e-01,  2.330181631e-01,  2.428358094e-01,\n   2.529306894e-01,  2.632992903e-01,  2.739370820e-01,  2.848384876e-01,\n   2.959968589e-01,  3.074044601e-01,  3.190524600e-01,  3.309309323e-01,\n   3.430288657e-01,  3.553341839e-01,  3.678337753e-01,  3.805135333e-01,\n   3.933584068e-01,  4.063524602e-01,  4.194789441e-01,  4.327203741e-01,\n   4.460586192e-01,  4.594749964e-01,  4.729503737e-01,  4.864652765e-01,\n   5.000000000e-01,  5.135347235e-01,  5.270496263e-01,  5.405250036e-01,\n   5.539413808e-01,  5.672796259e-01,  5.805210559e-01,  5.936475398e-01,\n   6.066415932e-01,  6.194864667e-01,  6.321662247e-01,  6.446658161e-01,\n   6.569711343e-01,  6.690690677e-01,  6.809475400e-01,  6.925955399e-01,\n   7.040031411e-01,  7.151615124e-01,  7.260629180e-01,  7.367007097e-01,\n   7.470693106e-01,  7.571641906e-01,  7.669818369e-01,  7.765197164e-01,\n   7.857762349e-01,  7.947506909e-01,  8.034432263e-01,  8.118547744e-01,\n   8.199870061e-01,  8.278422745e-01,  8.354235592e-01,  8.427344107e-01,\n   8.497788952e-01,  8.565615403e-01,  8.630872823e-01,  8.693614153e-01,\n   8.753895423e-01,  8.811775283e-01,  8.867314566e-01,  8.920575868e-01,\n   8.971623161e-01,  9.020521432e-01,  9.067336346e-01,  9.112133943e-01,\n   9.154980353e-01,  9.195941544e-01,  9.235083093e-01,  9.272469976e-01,\n   9.308166394e-01,  9.342235602e-01,  9.374739777e-01,  9.405739895e-01,\n   9.435295622e-01,  9.463465238e-01,  9.490305554e-01,  9.515871864e-01,\n   9.540217896e-01,  9.563395779e-01,  9.585456022e-01,  9.606447498e-01,\n   9.626417447e-01,  9.645411468e-01,  9.663473538e-01,  9.680646022e-01,\n   9.696969697e-01,  9.712483774e-01,  9.727225927e-01,  9.741232329e-01,\n   9.754537678e-01,  9.767175242e-01,  9.779176894e-01,  9.790573151e-01,\n   9.801393212e-01,  9.811665008e-01,  9.821415234e-01,  9.830669395e-01,\n   9.839451850e-01,  9.847785850e-01,  9.855693579e-01,  9.863196198e-01,\n   9.870313882e-01,  9.877065860e-01,  9.883470453e-01,  9.889545112e-01,\n   9.895306456e-01,  9.900770302e-01,  9.905951706e-01,  9.910864992e-01,\n   9.915523786e-01,  9.919941048e-01,  9.924129098e-01,  9.928099650e-01,\n   9.931863839e-01,  9.935432242e-01,  9.938814914e-01,  9.942021404e-01,\n   9.945060782e-01,  9.947941663e-01,  9.950672226e-01,  9.953260239e-01,\n   9.955713075e-01,  9.958037732e-01,  9.960240853e-01,  9.962328742e-01,\n   9.964307382e-01,  9.966182449e-01,  9.967959329e-01,  9.969643130e-01,\n   9.971238699e-01,  9.972750634e-01,  9.974183295e-01,  9.975540816e-01,\n   9.976827121e-01,  9.978045929e-01,  9.979200765e-01,  9.980294974e-01,\n   9.981331727e-01,  9.982314028e-01,  9.983244729e-01,  9.984126531e-01,\n   9.984961996e-01,  9.985753550e-01,  9.986503495e-01,  9.987214013e-01,\n   9.987887172e-01,  9.988524931e-01,  9.989129147e-01,  9.989701582e-01,\n   9.990243902e-01,\n};\n\n\nconst float* lookup_table_table[] = {\n  lut_raised_cosine,\n  lut_sine,\n  lut_logit,\n};\n\nconst float dist_icdf_0_0[] = {\n   0.000000000e+00,  4.087982131e-02,  4.305530135e-02,  4.446717099e-02,\n   4.554461095e-02,  4.643028146e-02,  4.719036259e-02,  4.786130177e-02,\n   4.846544150e-02,  4.901752808e-02,  4.952783693e-02,  5.000383245e-02,\n   5.045111894e-02,  5.087401856e-02,  5.127593970e-02,  5.165962113e-02,\n   5.202729920e-02,  5.238082566e-02,  5.272175258e-02,  5.305139493e-02,\n   5.337087757e-02,  5.368117102e-02,  5.398311923e-02,  5.427746127e-02,\n   5.456484856e-02,  5.484585871e-02,  5.512100673e-02,  5.539075414e-02,\n   5.565551651e-02,  5.591566975e-02,  5.617155528e-02,  5.642348449e-02,\n   5.667174243e-02,  5.691659100e-02,  5.715827167e-02,  5.739700778e-02,\n   5.763300665e-02,  5.786646125e-02,  5.809755178e-02,  5.832644702e-02,\n   5.855330550e-02,  5.877827655e-02,  5.900150124e-02,  5.922311321e-02,\n   5.944323939e-02,  5.966200071e-02,  5.987951263e-02,  6.009588577e-02,\n   6.031122633e-02,  6.052563658e-02,  6.073921527e-02,  6.095205800e-02,\n   6.116425758e-02,  6.137590434e-02,  6.158708647e-02,  6.179789027e-02,\n   6.200840044e-02,  6.221870034e-02,  6.242887223e-02,  6.263899748e-02,\n   6.284915686e-02,  6.305943072e-02,  6.326989919e-02,  6.348064244e-02,\n   6.369174088e-02,  6.390327537e-02,  6.411532743e-02,  6.432797947e-02,\n   6.454131500e-02,  6.475541891e-02,  6.497037764e-02,  6.518627947e-02,\n   6.540321479e-02,  6.562127634e-02,  6.584055954e-02,  6.606116275e-02,\n   6.628318767e-02,  6.650673963e-02,  6.673192802e-02,  6.695886667e-02,\n   6.718767432e-02,  6.741847510e-02,  6.765139910e-02,  6.788658290e-02,\n   6.812417027e-02,  6.836431288e-02,  6.860717107e-02,  6.885291476e-02,\n   6.910172445e-02,  6.935379229e-02,  6.960932336e-02,  6.986853705e-02,\n   7.013166868e-02,  7.039897125e-02,  7.067071756e-02,  7.094720251e-02,\n   7.122874586e-02,  7.151569529e-02,  7.180843008e-02,  7.210736531e-02,\n   7.241295677e-02,  7.272570685e-02,  7.304617137e-02,  7.337496784e-02,\n   7.371278529e-02,  7.406039621e-02,  7.441867100e-02,  7.478859585e-02,\n   7.517129474e-02,  7.556805707e-02,  7.598037259e-02,  7.640997608e-02,\n   7.685890539e-02,  7.732957775e-02,  7.782489202e-02,  7.834836803e-02,\n   7.890434069e-02,  7.949823715e-02,  8.013698356e-02,  8.082962263e-02,\n   8.158828889e-02,  8.242982515e-02,  8.337862717e-02,  8.447204952e-02,\n   8.577178628e-02,  8.739155340e-02,  8.958128632e-02,  9.311481710e-02,\n   1.000000000e+00,  0.000000000e+00,  3.371122655e-02,  3.513071484e-02,\n   3.601706803e-02,  3.667393961e-02,  3.720074235e-02,  3.764309658e-02,\n   3.802590894e-02,  3.836433481e-02,  3.866831217e-02,  3.894472555e-02,\n   3.919854936e-02,  3.943349984e-02,  3.965242956e-02,  3.985757791e-02,\n   4.005073651e-02,  4.023336216e-02,  4.040665606e-02,  4.057162083e-02,\n   4.072910239e-02,  4.087982131e-02,  4.102439664e-02,  4.116336428e-02,\n   4.129719142e-02,  4.142628787e-02,  4.155101522e-02,  4.167169419e-02,\n   4.178861061e-02,  4.190202037e-02,  4.201215349e-02,  4.211921756e-02,\n   4.222340057e-02,  4.232487333e-02,  4.242379152e-02,  4.252029748e-02,\n   4.261452166e-02,  4.270658395e-02,  4.279659481e-02,  4.288465623e-02,\n   4.297086257e-02,  4.305530135e-02,  4.313805388e-02,  4.321919583e-02,\n   4.329879776e-02,  4.337692558e-02,  4.345364096e-02,  4.352900166e-02,\n   4.360306187e-02,  4.367587254e-02,  4.374748157e-02,  4.381793411e-02,\n   4.388727274e-02,  4.395553766e-02,  4.402276687e-02,  4.408899637e-02,\n   4.415426022e-02,  4.421859075e-02,  4.428201864e-02,  4.434457305e-02,\n   4.440628170e-02,  4.446717099e-02,  4.452726605e-02,  4.458659086e-02,\n   4.464516829e-02,  4.470302019e-02,  4.476016742e-02,  4.481662995e-02,\n   4.487242688e-02,  4.492757649e-02,  4.498209632e-02,  4.503600317e-02,\n   4.508931316e-02,  4.514204178e-02,  4.519420388e-02,  4.524581377e-02,\n   4.529688518e-02,  4.534743133e-02,  4.539746494e-02,  4.544699828e-02,\n   4.549604316e-02,  4.554461095e-02,  4.559271264e-02,  4.564035883e-02,\n   4.568755975e-02,  4.573432527e-02,  4.578066494e-02,  4.582658798e-02,\n   4.587210333e-02,  4.591721960e-02,  4.596194515e-02,  4.600628806e-02,\n   4.605025617e-02,  4.609385706e-02,  4.613709808e-02,  4.617998636e-02,\n   4.622252880e-02,  4.626473212e-02,  4.630660282e-02,  4.634814722e-02,\n   4.638937145e-02,  4.643028146e-02,  4.647088305e-02,  4.651118184e-02,\n   4.655118330e-02,  4.659089274e-02,  4.663031535e-02,  4.666945615e-02,\n   4.670832004e-02,  4.674691178e-02,  4.678523603e-02,  4.682329730e-02,\n   4.686110000e-02,  4.689864843e-02,  4.693594675e-02,  4.697299906e-02,\n   4.700980933e-02,  4.704638144e-02,  4.708271917e-02,  4.711882622e-02,\n   4.715470619e-02,  4.719036259e-02,  4.722579886e-02,  4.726101836e-02,\n   4.729602435e-02,  4.733082005e-02,  4.736540857e-02,  4.739979298e-02,\n   4.743397625e-02,  4.746796131e-02,  8.298422555e-02,  8.303237008e-02,\n   8.308083474e-02,  8.312962441e-02,  8.317874409e-02,  8.322819891e-02,\n   8.327799409e-02,  8.332813502e-02,  8.337862717e-02,  8.342947618e-02,\n   8.348068782e-02,  8.353226799e-02,  8.358422277e-02,  8.363655835e-02,\n   8.368928111e-02,  8.374239758e-02,  8.379591448e-02,  8.384983866e-02,\n   8.390417721e-02,  8.395893736e-02,  8.401412656e-02,  8.406975246e-02,\n   8.412582290e-02,  8.418234597e-02,  8.423932997e-02,  8.429678342e-02,\n   8.435471510e-02,  8.441313404e-02,  8.447204952e-02,  8.453147112e-02,\n   8.459140868e-02,  8.465187234e-02,  8.471287254e-02,  8.477442006e-02,\n   8.483652600e-02,  8.489920180e-02,  8.496245927e-02,  8.502631059e-02,\n   8.509076836e-02,  8.515584555e-02,  8.522155558e-02,  8.528791233e-02,\n   8.535493012e-02,  8.542262378e-02,  8.549100865e-02,  8.556010060e-02,\n   8.562991607e-02,  8.570047208e-02,  8.577178628e-02,  8.584387696e-02,\n   8.591676309e-02,  8.599046436e-02,  8.606500122e-02,  8.614039490e-02,\n   8.621666745e-02,  8.629384184e-02,  8.637194193e-02,  8.645099256e-02,\n   8.653101960e-02,  8.661205004e-02,  8.669411197e-02,  8.677723474e-02,\n   8.686144897e-02,  8.694678665e-02,  8.703328123e-02,  8.712096769e-02,\n   8.720988265e-02,  8.730006448e-02,  8.739155340e-02,  8.748439160e-02,\n   8.757862339e-02,  8.767429534e-02,  8.777145642e-02,  8.787015820e-02,\n   8.797045499e-02,  8.807240410e-02,  8.817606603e-02,  8.828150472e-02,\n   8.838878779e-02,  8.849798691e-02,  8.860917803e-02,  8.872244181e-02,\n   8.883786399e-02,  8.895553582e-02,  8.907555456e-02,  8.919802402e-02,\n   8.932305516e-02,  8.945076680e-02,  8.958128632e-02,  8.971475057e-02,\n   8.985130683e-02,  8.999111388e-02,  9.013434323e-02,  9.028118059e-02,\n   9.043182743e-02,  9.058650287e-02,  9.074544579e-02,  9.090891730e-02,\n   9.107720365e-02,  9.125061953e-02,  9.142951204e-02,  9.161426530e-02,\n   9.180530596e-02,  9.200310981e-02,  9.220820960e-02,  9.242120466e-02,\n   9.264277250e-02,  9.287368319e-02,  9.311481710e-02,  9.336718725e-02,\n   9.363196749e-02,  9.391052881e-02,  9.420448640e-02,  9.451576181e-02,\n   9.484666624e-02,  9.520001450e-02,  9.557928395e-02,  9.598884202e-02,\n   9.643428110e-02,  9.692292814e-02,  9.746465204e-02,  9.807320583e-02,\n   9.876859706e-02,  9.958160960e-02,  1.005633646e-01,  1.018086946e-01,\n   1.035276807e-01,  1.063778878e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_1[] = {\n   0.000000000e+00,  5.775967733e-02,  6.707029213e-02,  7.344987461e-02,\n   7.848926629e-02,  8.273886990e-02,  8.646080382e-02,  8.980231529e-02,\n   9.285512486e-02,  9.568058999e-02,  9.832196591e-02,  1.008109989e-01,\n   1.031717446e-01,  1.054229108e-01,  1.075793640e-01,  1.096531351e-01,\n   1.116541136e-01,  1.135905398e-01,  1.154693614e-01,  1.172964987e-01,\n   1.190770435e-01,  1.208154125e-01,  1.225154661e-01,  1.241806021e-01,\n   1.258138303e-01,  1.274178326e-01,  1.289950118e-01,  1.305475317e-01,\n   1.320773503e-01,  1.335862472e-01,  1.350758471e-01,  1.365476389e-01,\n   1.380029929e-01,  1.394431744e-01,  1.408693562e-01,  1.422826293e-01,\n   1.436840117e-01,  1.450744567e-01,  1.464548594e-01,  1.478260638e-01,\n   1.491888670e-01,  1.505440251e-01,  1.518922568e-01,  1.532342479e-01,\n   1.545706540e-01,  1.559021043e-01,  1.572292039e-01,  1.585525369e-01,\n   1.598726685e-01,  1.611901471e-01,  1.625055063e-01,  1.638192671e-01,\n   1.651319394e-01,  1.664440234e-01,  1.677560117e-01,  1.690683903e-01,\n   1.703816403e-01,  1.716962389e-01,  1.730126612e-01,  1.743313810e-01,\n   1.756528725e-01,  1.769776111e-01,  1.783060750e-01,  1.796387462e-01,\n   1.809761119e-01,  1.823186655e-01,  1.836669085e-01,  1.850213512e-01,\n   1.863825142e-01,  1.877509303e-01,  1.891271455e-01,  1.905117208e-01,\n   1.919052339e-01,  1.933082808e-01,  1.947214781e-01,  1.961454644e-01,\n   1.975809033e-01,  1.990284850e-01,  2.004889293e-01,  2.019629884e-01,\n   2.034514498e-01,  2.049551394e-01,  2.064749256e-01,  2.080117230e-01,\n   2.095664970e-01,  2.111402686e-01,  2.127341198e-01,  2.143491997e-01,\n   2.159867314e-01,  2.176480193e-01,  2.193344581e-01,  2.210475417e-01,\n   2.227888751e-01,  2.245601857e-01,  2.263633384e-01,  2.282003509e-01,\n   2.300734130e-01,  2.319849075e-01,  2.339374356e-01,  2.359338454e-01,\n   2.379772658e-01,  2.400711471e-01,  2.422193075e-01,  2.444259898e-01,\n   2.466959290e-01,  2.490344340e-01,  2.514474865e-01,  2.539418634e-01,\n   2.565252874e-01,  2.592066160e-01,  2.619960800e-01,  2.649055891e-01,\n   2.679491277e-01,  2.711432755e-01,  2.745079047e-01,  2.780671283e-01,\n   2.818506217e-01,  2.858955058e-01,  2.902491089e-01,  2.949731546e-01,\n   3.001503663e-01,  3.058953959e-01,  3.123740231e-01,  3.198395630e-01,\n   3.287093170e-01,  3.397499388e-01,  3.546388029e-01,  3.785312373e-01,\n   1.000000000e+00,  0.000000000e+00,  3.192269535e-02,  3.641890780e-02,\n   3.938557046e-02,  4.166204844e-02,  4.353517362e-02,  4.514034051e-02,\n   4.655306902e-02,  4.782011687e-02,  4.897259663e-02,  5.003233599e-02,\n   5.101528342e-02,  5.193347290e-02,  5.279622538e-02,  5.361091873e-02,\n   5.438350047e-02,  5.511884060e-02,  5.582098098e-02,  5.649331595e-02,\n   5.713872582e-02,  5.775967733e-02,  5.835830054e-02,  5.893644842e-02,\n   5.949574372e-02,  6.003761626e-02,  6.056333286e-02,  6.107402166e-02,\n   6.157069199e-02,  6.205425076e-02,  6.252551616e-02,  6.298522905e-02,\n   6.343406259e-02,  6.387263038e-02,  6.430149343e-02,  6.472116613e-02,\n   6.513212133e-02,  6.553479482e-02,  6.592958916e-02,  6.631687705e-02,\n   6.669700423e-02,  6.707029213e-02,  6.743704010e-02,  6.779752742e-02,\n   6.815201513e-02,  6.850074756e-02,  6.884395383e-02,  6.918184901e-02,\n   6.951463538e-02,  6.984250336e-02,  7.016563246e-02,  7.048419215e-02,\n   7.079834256e-02,  7.110823521e-02,  7.141401358e-02,  7.171581373e-02,\n   7.201376479e-02,  7.230798943e-02,  7.259860431e-02,  7.288572045e-02,\n   7.316944361e-02,  7.344987461e-02,  7.372710968e-02,  7.400124068e-02,\n   7.427235541e-02,  7.454053784e-02,  7.480586833e-02,  7.506842384e-02,\n   7.532827811e-02,  7.558550188e-02,  7.584016300e-02,  7.609232665e-02,\n   7.634205541e-02,  7.658940947e-02,  7.683444670e-02,  7.707722280e-02,\n   7.731779138e-02,  7.755620413e-02,  7.779251082e-02,  7.802675946e-02,\n   7.825899638e-02,  7.848926629e-02,  7.871761235e-02,  7.894407627e-02,\n   7.916869835e-02,  7.939151757e-02,  7.961257162e-02,  7.983189698e-02,\n   8.004952894e-02,  8.026550172e-02,  8.047984843e-02,  8.069260117e-02,\n   8.090379106e-02,  8.111344828e-02,  8.132160211e-02,  8.152828097e-02,\n   8.173351242e-02,  8.193732327e-02,  8.213973951e-02,  8.234078643e-02,\n   8.254048860e-02,  8.273886990e-02,  8.293595357e-02,  8.313176219e-02,\n   8.332631777e-02,  8.351964170e-02,  8.371175482e-02,  8.390267741e-02,\n   8.409242924e-02,  8.428102958e-02,  8.446849717e-02,  8.465485032e-02,\n   8.484010687e-02,  8.502428420e-02,  8.520739928e-02,  8.538946867e-02,\n   8.557050852e-02,  8.575053461e-02,  8.592956232e-02,  8.610760670e-02,\n   8.628468242e-02,  8.646080382e-02,  8.663598494e-02,  8.681023946e-02,\n   8.698358077e-02,  8.715602196e-02,  8.732757584e-02,  8.749825492e-02,\n   8.766807144e-02,  8.783703740e-02,  3.096809047e-01,  3.100096523e-01,\n   3.103405866e-01,  3.106737407e-01,  3.110091485e-01,  3.113468447e-01,\n   3.116868649e-01,  3.120292452e-01,  3.123740231e-01,  3.127212367e-01,\n   3.130709250e-01,  3.134231281e-01,  3.137778869e-01,  3.141352437e-01,\n   3.144952415e-01,  3.148579246e-01,  3.152233383e-01,  3.155915293e-01,\n   3.159625452e-01,  3.163364353e-01,  3.167132498e-01,  3.170930404e-01,\n   3.174758604e-01,  3.178617642e-01,  3.182508082e-01,  3.186430498e-01,\n   3.190385485e-01,  3.194373653e-01,  3.198395630e-01,  3.202452062e-01,\n   3.206543615e-01,  3.210670973e-01,  3.214834842e-01,  3.219035950e-01,\n   3.223275046e-01,  3.227552903e-01,  3.231870319e-01,  3.236228115e-01,\n   3.240627140e-01,  3.245068272e-01,  3.249552415e-01,  3.254080504e-01,\n   3.258653506e-01,  3.263272421e-01,  3.267938283e-01,  3.272652161e-01,\n   3.277415163e-01,  3.282228437e-01,  3.287093170e-01,  3.292010595e-01,\n   3.296981990e-01,  3.302008679e-01,  3.307092039e-01,  3.312233499e-01,\n   3.317434543e-01,  3.322696715e-01,  3.328021619e-01,  3.333410928e-01,\n   3.338866379e-01,  3.344389785e-01,  3.349983036e-01,  3.355648102e-01,\n   3.361387039e-01,  3.367201996e-01,  3.373095218e-01,  3.379069052e-01,\n   3.385125955e-01,  3.391268502e-01,  3.397499388e-01,  3.403821443e-01,\n   3.410237635e-01,  3.416751086e-01,  3.423365075e-01,  3.430083056e-01,\n   3.436908663e-01,  3.443845734e-01,  3.450898313e-01,  3.458070679e-01,\n   3.465367352e-01,  3.472793121e-01,  3.480353061e-01,  3.488052560e-01,\n   3.495897342e-01,  3.503893496e-01,  3.512047511e-01,  3.520366310e-01,\n   3.528857290e-01,  3.537528368e-01,  3.546388029e-01,  3.555445384e-01,\n   3.564710233e-01,  3.574193139e-01,  3.583905504e-01,  3.593859671e-01,\n   3.604069020e-01,  3.614548098e-01,  3.625312755e-01,  3.636380306e-01,\n   3.647769723e-01,  3.659501849e-01,  3.671599661e-01,  3.684088570e-01,\n   3.696996782e-01,  3.710355728e-01,  3.724200577e-01,  3.738570865e-01,\n   3.753511249e-01,  3.769072442e-01,  3.785312373e-01,  3.802297637e-01,\n   3.820105327e-01,  3.838825389e-01,  3.858563674e-01,  3.879445963e-01,\n   3.901623353e-01,  3.925279618e-01,  3.950641455e-01,  3.977993140e-01,\n   4.007698049e-01,  4.040231355e-01,  4.076231722e-01,  4.116587047e-01,\n   4.162585474e-01,  4.216202624e-01,  4.280706728e-01,  4.362131524e-01,\n   4.473757968e-01,  4.656744235e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_2[] = {\n   0.000000000e+00,  2.174355841e-02,  3.092888348e-02,  3.812320475e-02,\n   4.429997329e-02,  4.983386356e-02,  5.491617951e-02,  5.966017291e-02,\n   6.413942945e-02,  6.840494830e-02,  7.249379666e-02,  7.643392067e-02,\n   8.024701264e-02,  8.395031560e-02,  8.755781005e-02,  9.108102307e-02,\n   9.452959714e-02,  9.791170021e-02,  1.012343283e-01,  1.045035331e-01,\n   1.077245956e-01,  1.109021616e-01,  1.140403481e-01,  1.171428276e-01,\n   1.202128970e-01,  1.232535328e-01,  1.262674371e-01,  1.292570750e-01,\n   1.322247065e-01,  1.351724129e-01,  1.381021195e-01,  1.410156146e-01,\n   1.439145658e-01,  1.468005346e-01,  1.496749883e-01,  1.525393111e-01,\n   1.553948128e-01,  1.582427381e-01,  1.610842730e-01,  1.639205517e-01,\n   1.667526626e-01,  1.695816530e-01,  1.724085344e-01,  1.752342864e-01,\n   1.780598607e-01,  1.808861847e-01,  1.837141649e-01,  1.865446897e-01,\n   1.893786323e-01,  1.922168535e-01,  1.950602044e-01,  1.979095281e-01,\n   2.007656627e-01,  2.036294431e-01,  2.065017033e-01,  2.093832783e-01,\n   2.122750063e-01,  2.151777305e-01,  2.180923013e-01,  2.210195783e-01,\n   2.239604320e-01,  2.269157461e-01,  2.298864198e-01,  2.328733692e-01,\n   2.358775304e-01,  2.388998611e-01,  2.419413432e-01,  2.450029856e-01,\n   2.480858261e-01,  2.511909351e-01,  2.543194176e-01,  2.574724169e-01,\n   2.606511180e-01,  2.638567508e-01,  2.670905940e-01,  2.703539795e-01,\n   2.736482967e-01,  2.769749974e-01,  2.803356010e-01,  2.837317004e-01,\n   2.871649681e-01,  2.906371632e-01,  2.941501391e-01,  2.977058516e-01,\n   3.013063682e-01,  3.049538782e-01,  3.086507044e-01,  3.123993150e-01,\n   3.162023386e-01,  3.200625789e-01,  3.239830333e-01,  3.279669124e-01,\n   3.320176622e-01,  3.361389905e-01,  3.403348952e-01,  3.446096976e-01,\n   3.489680809e-01,  3.534151336e-01,  3.579564004e-01,  3.625979410e-01,\n   3.673463990e-01,  3.722090826e-01,  3.771940600e-01,  3.823102724e-01,\n   3.875676695e-01,  3.929773722e-01,  3.985518702e-01,  4.043052633e-01,\n   4.102535592e-01,  4.164150442e-01,  4.228107498e-01,  4.294650475e-01,\n   4.364064145e-01,  4.436684375e-01,  4.512911461e-01,  4.593228202e-01,\n   4.678224871e-01,  4.768634586e-01,  4.865384784e-01,  4.969674609e-01,\n   5.083095845e-01,  5.207830984e-01,  5.346997151e-01,  5.505289609e-01,\n   5.690311803e-01,  5.915738191e-01,  6.210652108e-01,  6.660635133e-01,\n   1.000000000e+00,  0.000000000e+00,  4.922842828e-03,  6.920535491e-03,\n   8.451337086e-03,  9.741940876e-03,  1.087967776e-02,  1.190917253e-02,\n   1.285685991e-02,  1.373992404e-02,  1.457027778e-02,  1.535658012e-02,\n   1.610535802e-02,  1.682167545e-02,  1.750955456e-02,  1.817225278e-02,\n   1.881245191e-02,  1.943239104e-02,  2.003396240e-02,  2.061878220e-02,\n   2.118824379e-02,  2.174355841e-02,  2.228578684e-02,  2.281586425e-02,\n   2.333462012e-02,  2.384279417e-02,  2.434104942e-02,  2.482998282e-02,\n   2.531013415e-02,  2.578199335e-02,  2.624600676e-02,  2.670258234e-02,\n   2.715209412e-02,  2.759488605e-02,  2.803127525e-02,  2.846155484e-02,\n   2.888599644e-02,  2.930485227e-02,  2.971835708e-02,  3.012672973e-02,\n   3.053017474e-02,  3.092888348e-02,  3.132303539e-02,  3.171279895e-02,\n   3.209833264e-02,  3.247978569e-02,  3.285729888e-02,  3.323100513e-02,\n   3.360103017e-02,  3.396749301e-02,  3.433050647e-02,  3.469017759e-02,\n   3.504660808e-02,  3.539989464e-02,  3.575012931e-02,  3.609739981e-02,\n   3.644178975e-02,  3.678337898e-02,  3.712224374e-02,  3.745845695e-02,\n   3.779208835e-02,  3.812320475e-02,  3.845187016e-02,  3.877814595e-02,\n   3.910209103e-02,  3.942376194e-02,  3.974321304e-02,  4.006049656e-02,\n   4.037566277e-02,  4.068876005e-02,  4.099983500e-02,  4.130893253e-02,\n   4.161609594e-02,  4.192136699e-02,  4.222478600e-02,  4.252639189e-02,\n   4.282622229e-02,  4.312431354e-02,  4.342070080e-02,  4.371541807e-02,\n   4.400849828e-02,  4.429997329e-02,  4.458987398e-02,  4.487823025e-02,\n   4.516507111e-02,  4.545042469e-02,  4.573431827e-02,  4.601677832e-02,\n   4.629783056e-02,  4.657749995e-02,  4.685581073e-02,  4.713278649e-02,\n   4.740845013e-02,  4.768282394e-02,  4.795592959e-02,  4.822778816e-02,\n   4.849842018e-02,  4.876784563e-02,  4.903608398e-02,  4.930315419e-02,\n   4.956907471e-02,  4.983386356e-02,  5.009753829e-02,  5.036011602e-02,\n   5.062161343e-02,  5.088204682e-02,  5.114143208e-02,  5.139978472e-02,\n   5.165711990e-02,  5.191345239e-02,  5.216879666e-02,  5.242316682e-02,\n   5.267657665e-02,  5.292903964e-02,  5.318056897e-02,  5.343117753e-02,\n   5.368087791e-02,  5.392968245e-02,  5.417760320e-02,  5.442465197e-02,\n   5.467084031e-02,  5.491617951e-02,  5.516068067e-02,  5.540435461e-02,\n   5.564721195e-02,  5.588926309e-02,  5.613051823e-02,  5.637098734e-02,\n   5.661068023e-02,  5.684960647e-02,  5.289344619e-01,  5.296397483e-01,\n   5.303493000e-01,  5.310631783e-01,  5.317814459e-01,  5.325041669e-01,\n   5.332314071e-01,  5.339632336e-01,  5.346997151e-01,  5.354409218e-01,\n   5.361869258e-01,  5.369378008e-01,  5.376936222e-01,  5.384544674e-01,\n   5.392204156e-01,  5.399915479e-01,  5.407679475e-01,  5.415496997e-01,\n   5.423368920e-01,  5.431296139e-01,  5.439279575e-01,  5.447320172e-01,\n   5.455418899e-01,  5.463576751e-01,  5.471794748e-01,  5.480073939e-01,\n   5.488415403e-01,  5.496820247e-01,  5.505289609e-01,  5.513824659e-01,\n   5.522426601e-01,  5.531096675e-01,  5.539836153e-01,  5.548646348e-01,\n   5.557528611e-01,  5.566484333e-01,  5.575514947e-01,  5.584621931e-01,\n   5.593806809e-01,  5.603071150e-01,  5.612416577e-01,  5.621844761e-01,\n   5.631357429e-01,  5.640956366e-01,  5.650643414e-01,  5.660420478e-01,\n   5.670289528e-01,  5.680252600e-01,  5.690311803e-01,  5.700469320e-01,\n   5.710727412e-01,  5.721088422e-01,  5.731554777e-01,  5.742128997e-01,\n   5.752813695e-01,  5.763611585e-01,  5.774525485e-01,  5.785558324e-01,\n   5.796713147e-01,  5.807993124e-01,  5.819401553e-01,  5.830941868e-01,\n   5.842617651e-01,  5.854432635e-01,  5.866390716e-01,  5.878495963e-01,\n   5.890752627e-01,  5.903165153e-01,  5.915738191e-01,  5.928476613e-01,\n   5.941385522e-01,  5.954470271e-01,  5.967736481e-01,  5.981190053e-01,\n   5.994837195e-01,  6.008684439e-01,  6.022738668e-01,  6.037007139e-01,\n   6.051497510e-01,  6.066217877e-01,  6.081176803e-01,  6.096383355e-01,\n   6.111847150e-01,  6.127578396e-01,  6.143587946e-01,  6.159887352e-01,\n   6.176488931e-01,  6.193405830e-01,  6.210652108e-01,  6.228242823e-01,\n   6.246194131e-01,  6.264523396e-01,  6.283249317e-01,  6.302392072e-01,\n   6.321973478e-01,  6.342017182e-01,  6.362548870e-01,  6.383596517e-01,\n   6.405190673e-01,  6.427364790e-01,  6.450155616e-01,  6.473603646e-01,\n   6.497753664e-01,  6.522655378e-01,  6.548364188e-01,  6.574942108e-01,\n   6.602458881e-01,  6.630993347e-01,  6.660635133e-01,  6.691486755e-01,\n   6.723666263e-01,  6.757310625e-01,  6.792580075e-01,  6.829663828e-01,\n   6.868787669e-01,  6.910224254e-01,  6.954307351e-01,  7.001452035e-01,\n   7.052184107e-01,  7.107184362e-01,  7.167357856e-01,  7.233947496e-01,\n   7.308731533e-01,  7.394393664e-01,  7.495289276e-01,  7.619271224e-01,\n   7.783093378e-01,  8.036267830e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_3[] = {\n   0.000000000e+00,  1.136630499e-02,  1.812428419e-02,  2.386615269e-02,\n   2.905355219e-02,  3.387634622e-02,  3.843584130e-02,  4.279405263e-02,\n   4.699238532e-02,  5.106020347e-02,  5.501928171e-02,  5.888633262e-02,\n   6.267454085e-02,  6.639454450e-02,  7.005508997e-02,  7.366348437e-02,\n   7.722591737e-02,  8.074769597e-02,  8.423341938e-02,  8.768711188e-02,\n   9.111232529e-02,  9.451221931e-02,  9.788962525e-02,  1.012470972e-01,\n   1.045869537e-01,  1.079113115e-01,  1.112221142e-01,  1.145211554e-01,\n   1.178100986e-01,  1.210904941e-01,  1.243637928e-01,  1.276313590e-01,\n   1.308944806e-01,  1.341543787e-01,  1.374122149e-01,  1.406690993e-01,\n   1.439260960e-01,  1.471842290e-01,  1.504444869e-01,  1.537078276e-01,\n   1.569751824e-01,  1.602474592e-01,  1.635255461e-01,  1.668103148e-01,\n   1.701026226e-01,  1.734033160e-01,  1.767132325e-01,  1.800332031e-01,\n   1.833640546e-01,  1.867066116e-01,  1.900616986e-01,  1.934301421e-01,\n   1.968127721e-01,  2.002104243e-01,  2.036239420e-01,  2.070541778e-01,\n   2.105019953e-01,  2.139682714e-01,  2.174538979e-01,  2.209597834e-01,\n   2.244868553e-01,  2.280360619e-01,  2.316083747e-01,  2.352047901e-01,\n   2.388263321e-01,  2.424740547e-01,  2.461490442e-01,  2.498524219e-01,\n   2.535853474e-01,  2.573490208e-01,  2.611446868e-01,  2.649736376e-01,\n   2.688372166e-01,  2.727368228e-01,  2.766739147e-01,  2.806500151e-01,\n   2.846667162e-01,  2.887256850e-01,  2.928286693e-01,  2.969775040e-01,\n   3.011741187e-01,  3.054205449e-01,  3.097189252e-01,  3.140715222e-01,\n   3.184807293e-01,  3.229490820e-01,  3.274792709e-01,  3.320741560e-01,\n   3.367367823e-01,  3.414703980e-01,  3.462784741e-01,  3.511647272e-01,\n   3.561331444e-01,  3.611880128e-01,  3.663339513e-01,  3.715759482e-01,\n   3.769194042e-01,  3.823701809e-01,  3.879346574e-01,  3.936197967e-01,\n   3.994332214e-01,  4.053833037e-01,  4.114792714e-01,  4.177313327e-01,\n   4.241508257e-01,  4.307503978e-01,  4.375442228e-01,  4.445482653e-01,\n   4.517806065e-01,  4.592618485e-01,  4.670156219e-01,  4.750692297e-01,\n   4.834544764e-01,  4.922087481e-01,  5.013764448e-01,  5.110109121e-01,\n   5.211771014e-01,  5.319553204e-01,  5.434466648e-01,  5.557811429e-01,\n   5.691302991e-01,  5.837277572e-01,  5.999046350e-01,  6.181552614e-01,\n   6.392716828e-01,  6.646597189e-01,  6.972576369e-01,  7.454848184e-01,\n   1.000000000e+00,  0.000000000e+00,  1.550327841e-03,  2.453948846e-03,\n   3.211115815e-03,  3.886829909e-03,  4.507973099e-03,  5.088952189e-03,\n   5.638618270e-03,  6.162898283e-03,  6.666005288e-03,  7.151068748e-03,\n   7.620493191e-03,  8.076176397e-03,  8.519649257e-03,  8.952169276e-03,\n   9.374785302e-03,  9.788383651e-03,  1.019372180e-02,  1.059145355e-02,\n   1.098214814e-02,  1.136630499e-02,  1.174436539e-02,  1.211672159e-02,\n   1.248372429e-02,  1.284568861e-02,  1.320289901e-02,  1.355561341e-02,\n   1.390406656e-02,  1.424847289e-02,  1.458902894e-02,  1.492591540e-02,\n   1.525929890e-02,  1.558933348e-02,  1.591616194e-02,  1.623991693e-02,\n   1.656072200e-02,  1.687869240e-02,  1.719393593e-02,  1.750655353e-02,\n   1.781663993e-02,  1.812428419e-02,  1.842957012e-02,  1.873257677e-02,\n   1.903337876e-02,  1.933204664e-02,  1.962864722e-02,  1.992324381e-02,\n   2.021589651e-02,  2.050666239e-02,  2.079559577e-02,  2.108274834e-02,\n   2.136816938e-02,  2.165190589e-02,  2.193400276e-02,  2.221450288e-02,\n   2.249344728e-02,  2.277087525e-02,  2.304682442e-02,  2.332133086e-02,\n   2.359442921e-02,  2.386615269e-02,  2.413653326e-02,  2.440560163e-02,\n   2.467338733e-02,  2.493991881e-02,  2.520522348e-02,  2.546932774e-02,\n   2.573225705e-02,  2.599403601e-02,  2.625468832e-02,  2.651423690e-02,\n   2.677270391e-02,  2.703011075e-02,  2.728647814e-02,  2.754182612e-02,\n   2.779617410e-02,  2.804954088e-02,  2.830194469e-02,  2.855340317e-02,\n   2.880393347e-02,  2.905355219e-02,  2.930227547e-02,  2.955011897e-02,\n   2.979709789e-02,  3.004322703e-02,  3.028852074e-02,  3.053299299e-02,\n   3.077665736e-02,  3.101952709e-02,  3.126161502e-02,  3.150293368e-02,\n   3.174349528e-02,  3.198331168e-02,  3.222239447e-02,  3.246075493e-02,\n   3.269840406e-02,  3.293535259e-02,  3.317161098e-02,  3.340718945e-02,\n   3.364209795e-02,  3.387634622e-02,  3.410994375e-02,  3.434289983e-02,\n   3.457522351e-02,  3.480692365e-02,  3.503800891e-02,  3.526848775e-02,\n   3.549836843e-02,  3.572765906e-02,  3.595636754e-02,  3.618450162e-02,\n   3.641206888e-02,  3.663907672e-02,  3.686553242e-02,  3.709144308e-02,\n   3.731681566e-02,  3.754165698e-02,  3.776597372e-02,  3.798977244e-02,\n   3.821305953e-02,  3.843584130e-02,  3.865812391e-02,  3.887991340e-02,\n   3.910121570e-02,  3.932203663e-02,  3.954238188e-02,  3.976225706e-02,\n   3.998166765e-02,  4.020061906e-02,  5.932174711e-01,  5.940366506e-01,\n   5.948604733e-01,  5.956890038e-01,  5.965223081e-01,  5.973604536e-01,\n   5.982035093e-01,  5.990515458e-01,  5.999046350e-01,  6.007628509e-01,\n   6.016262690e-01,  6.024949664e-01,  6.033690223e-01,  6.042485176e-01,\n   6.051335352e-01,  6.060241600e-01,  6.069204789e-01,  6.078225812e-01,\n   6.087305580e-01,  6.096445030e-01,  6.105645121e-01,  6.114906839e-01,\n   6.124231191e-01,  6.133619215e-01,  6.143071973e-01,  6.152590556e-01,\n   6.162176085e-01,  6.171829710e-01,  6.181552614e-01,  6.191346010e-01,\n   6.201211148e-01,  6.211149311e-01,  6.221161819e-01,  6.231250030e-01,\n   6.241415342e-01,  6.251659192e-01,  6.261983063e-01,  6.272388479e-01,\n   6.282877012e-01,  6.293450282e-01,  6.304109959e-01,  6.314857766e-01,\n   6.325695479e-01,  6.336624933e-01,  6.347648022e-01,  6.358766700e-01,\n   6.369982990e-01,  6.381298979e-01,  6.392716828e-01,  6.404238772e-01,\n   6.415867123e-01,  6.427604276e-01,  6.439452710e-01,  6.451414997e-01,\n   6.463493802e-01,  6.475691889e-01,  6.488012127e-01,  6.500457496e-01,\n   6.513031090e-01,  6.525736128e-01,  6.538575955e-01,  6.551554053e-01,\n   6.564674048e-01,  6.577939717e-01,  6.591354999e-01,  6.604924002e-01,\n   6.618651014e-01,  6.632540516e-01,  6.646597189e-01,  6.660825933e-01,\n   6.675231876e-01,  6.689820392e-01,  6.704597112e-01,  6.719567951e-01,\n   6.734739116e-01,  6.750117137e-01,  6.765708882e-01,  6.781521585e-01,\n   6.797562873e-01,  6.813840798e-01,  6.830363863e-01,  6.847141064e-01,\n   6.864181928e-01,  6.881496555e-01,  6.899095667e-01,  6.916990663e-01,\n   6.935193676e-01,  6.953717641e-01,  6.972576369e-01,  6.991784628e-01,\n   7.011358238e-01,  7.031314177e-01,  7.051670694e-01,  7.072447450e-01,\n   7.093665667e-01,  7.115348302e-01,  7.137520248e-01,  7.160208562e-01,\n   7.183442733e-01,  7.207254987e-01,  7.231680647e-01,  7.256758556e-01,\n   7.282531568e-01,  7.309047141e-01,  7.336358034e-01,  7.364523154e-01,\n   7.393608574e-01,  7.423688776e-01,  7.454848184e-01,  7.487183066e-01,\n   7.520803922e-01,  7.555838521e-01,  7.592435801e-01,  7.630770961e-01,\n   7.671052216e-01,  7.713529908e-01,  7.758509060e-01,  7.806367088e-01,\n   7.857579461e-01,  7.912758108e-01,  7.972711136e-01,  8.038540068e-01,\n   8.111807607e-01,  8.194849205e-01,  8.291411365e-01,  8.408153119e-01,\n   8.559016189e-01,  8.784043144e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_4[] = {\n   0.000000000e+00,  4.318552295e-03,  8.136040937e-03,  1.180014022e-02,\n   1.537593950e-02,  1.889308061e-02,  2.236853835e-02,  2.581330409e-02,\n   2.923507613e-02,  3.263955250e-02,  3.603112869e-02,  3.941330696e-02,\n   4.278895200e-02,  4.616045870e-02,  4.952986670e-02,  5.289894125e-02,\n   5.626923179e-02,  5.964211556e-02,  6.301883064e-02,  6.640050140e-02,\n   6.978815852e-02,  7.318275496e-02,  7.658517870e-02,  7.999626330e-02,\n   8.341679646e-02,  8.684752728e-02,  9.028917230e-02,  9.374242061e-02,\n   9.720793831e-02,  1.006863723e-01,  1.041783536e-01,  1.076845002e-01,\n   1.112054199e-01,  1.147417123e-01,  1.182939709e-01,  1.218627855e-01,\n   1.254487433e-01,  1.290524307e-01,  1.326744350e-01,  1.363153456e-01,\n   1.399757555e-01,  1.436562621e-01,  1.473574693e-01,  1.510799879e-01,\n   1.548244369e-01,  1.585914450e-01,  1.623816515e-01,  1.661957074e-01,\n   1.700342766e-01,  1.738980372e-01,  1.777876823e-01,  1.817039217e-01,\n   1.856474827e-01,  1.896191116e-01,  1.936195750e-01,  1.976496612e-01,\n   2.017101816e-01,  2.058019722e-01,  2.099258949e-01,  2.140828399e-01,\n   2.182737267e-01,  2.224995062e-01,  2.267611629e-01,  2.310597166e-01,\n   2.353962250e-01,  2.397717858e-01,  2.441875393e-01,  2.486446712e-01,\n   2.531444154e-01,  2.576880572e-01,  2.622769366e-01,  2.669124519e-01,\n   2.715960638e-01,  2.763292995e-01,  2.811137571e-01,  2.859511110e-01,\n   2.908431167e-01,  2.957916174e-01,  3.007985499e-01,  3.058659516e-01,\n   3.109959686e-01,  3.161908637e-01,  3.214530258e-01,  3.267849801e-01,\n   3.321893994e-01,  3.376691163e-01,  3.432271373e-01,  3.488666579e-01,\n   3.545910799e-01,  3.604040301e-01,  3.663093820e-01,  3.723112797e-01,\n   3.784141650e-01,  3.846228077e-01,  3.909423406e-01,  3.973782989e-01,\n   4.039366650e-01,  4.106239205e-01,  4.174471056e-01,  4.244138880e-01,\n   4.315326429e-01,  4.388125467e-01,  4.462636868e-01,  4.538971911e-01,\n   4.617253825e-01,  4.697619638e-01,  4.780222397e-01,  4.865233873e-01,\n   4.952847879e-01,  5.043284360e-01,  5.136794521e-01,  5.233667293e-01,\n   5.334237613e-01,  5.438897175e-01,  5.548108582e-01,  5.662424343e-01,\n   5.782512864e-01,  5.909194836e-01,  6.043495569e-01,  6.186722632e-01,\n   6.340585441e-01,  6.507387983e-01,  6.690357417e-01,  6.894246183e-01,\n   7.126546234e-01,  7.400290923e-01,  7.742009798e-01,  8.224738122e-01,\n   1.000000000e+00,  0.000000000e+00,  2.827441263e-04,  5.309614341e-04,\n   7.676889192e-04,  9.972822069e-04,  1.221734232e-03,  1.442189052e-03,\n   1.659387712e-03,  1.873848346e-03,  2.085952989e-03,  2.295994583e-03,\n   2.504204628e-03,  2.710770500e-03,  2.915846842e-03,  3.119563366e-03,\n   3.322030365e-03,  3.523342719e-03,  3.723582879e-03,  3.922823127e-03,\n   4.121127328e-03,  4.318552295e-03,  4.515148887e-03,  4.710962881e-03,\n   4.906035691e-03,  5.100404952e-03,  5.294105008e-03,  5.487167322e-03,\n   5.679620815e-03,  5.871492159e-03,  6.062806029e-03,  6.253585311e-03,\n   6.443851288e-03,  6.633623805e-03,  6.822921401e-03,  7.011761435e-03,\n   7.200160194e-03,  7.388132989e-03,  7.575694233e-03,  7.762857525e-03,\n   7.949635709e-03,  8.136040937e-03,  8.322084723e-03,  8.507777990e-03,\n   8.693131115e-03,  8.878153968e-03,  9.062855945e-03,  9.247246005e-03,\n   9.431332697e-03,  9.615124187e-03,  9.798628284e-03,  9.981852461e-03,\n   1.016480388e-02,  1.034748939e-02,  1.052991560e-02,  1.071208882e-02,\n   1.089401513e-02,  1.107570038e-02,  1.125715019e-02,  1.143836999e-02,\n   1.161936499e-02,  1.180014022e-02,  1.198070056e-02,  1.216105069e-02,\n   1.234119514e-02,  1.252113830e-02,  1.270088440e-02,  1.288043754e-02,\n   1.305980169e-02,  1.323898070e-02,  1.341797829e-02,  1.359679808e-02,\n   1.377544357e-02,  1.395391815e-02,  1.413222514e-02,  1.431036773e-02,\n   1.448834904e-02,  1.466617210e-02,  1.484383985e-02,  1.502135515e-02,\n   1.519872080e-02,  1.537593950e-02,  1.555301389e-02,  1.572994655e-02,\n   1.590673998e-02,  1.608339663e-02,  1.625991888e-02,  1.643630905e-02,\n   1.661256940e-02,  1.678870216e-02,  1.696470947e-02,  1.714059345e-02,\n   1.731635616e-02,  1.749199960e-02,  1.766752575e-02,  1.784293652e-02,\n   1.801823379e-02,  1.819341940e-02,  1.836849515e-02,  1.854346279e-02,\n   1.871832405e-02,  1.889308061e-02,  1.906773411e-02,  1.924228618e-02,\n   1.941673839e-02,  1.959109229e-02,  1.976534941e-02,  1.993951122e-02,\n   2.011357919e-02,  2.028755475e-02,  2.046143931e-02,  2.063523422e-02,\n   2.080894086e-02,  2.098256053e-02,  2.115609454e-02,  2.132954416e-02,\n   2.150291065e-02,  2.167619524e-02,  2.184939913e-02,  2.202252350e-02,\n   2.219556953e-02,  2.236853835e-02,  2.254143110e-02,  2.271424887e-02,\n   2.288699276e-02,  2.305966382e-02,  2.323226311e-02,  2.340479167e-02,\n   2.357725051e-02,  2.374964062e-02,  6.614969627e-01,  6.624223679e-01,\n   6.633524863e-01,  6.642873798e-01,  6.652271120e-01,  6.661717474e-01,\n   6.671213522e-01,  6.680759940e-01,  6.690357417e-01,  6.700006659e-01,\n   6.709708389e-01,  6.719463343e-01,  6.729272276e-01,  6.739135960e-01,\n   6.749055184e-01,  6.759030757e-01,  6.769063506e-01,  6.779154277e-01,\n   6.789303938e-01,  6.799513376e-01,  6.809783501e-01,  6.820115246e-01,\n   6.830509566e-01,  6.840967440e-01,  6.851489872e-01,  6.862077892e-01,\n   6.872732556e-01,  6.883454949e-01,  6.894246183e-01,  6.905107401e-01,\n   6.916039775e-01,  6.927044510e-01,  6.938122844e-01,  6.949276049e-01,\n   6.960505433e-01,  6.971812341e-01,  6.983198156e-01,  6.994664302e-01,\n   7.006212244e-01,  7.017843491e-01,  7.029559595e-01,  7.041362158e-01,\n   7.053252829e-01,  7.065233309e-01,  7.077305352e-01,  7.089470768e-01,\n   7.101731424e-01,  7.114089249e-01,  7.126546234e-01,  7.139104438e-01,\n   7.151765989e-01,  7.164533086e-01,  7.177408006e-01,  7.190393106e-01,\n   7.203490826e-01,  7.216703692e-01,  7.230034327e-01,  7.243485446e-01,\n   7.257059869e-01,  7.270760523e-01,  7.284590447e-01,  7.298552800e-01,\n   7.312650868e-01,  7.326888066e-01,  7.341267954e-01,  7.355794237e-01,\n   7.370470777e-01,  7.385301604e-01,  7.400290923e-01,  7.415443126e-01,\n   7.430762805e-01,  7.446254761e-01,  7.461924021e-01,  7.477775853e-01,\n   7.493815778e-01,  7.510049592e-01,  7.526483383e-01,  7.543123551e-01,\n   7.559976831e-01,  7.577050318e-01,  7.594351494e-01,  7.611888259e-01,\n   7.629668959e-01,  7.647702428e-01,  7.665998025e-01,  7.684565674e-01,\n   7.703415920e-01,  7.722559979e-01,  7.742009798e-01,  7.761778124e-01,\n   7.781878579e-01,  7.802325744e-01,  7.823135256e-01,  7.844323916e-01,\n   7.865909811e-01,  7.887912453e-01,  7.910352942e-01,  7.933254144e-01,\n   7.956640905e-01,  7.980540294e-01,  8.004981888e-01,  8.029998100e-01,\n   8.055624571e-01,  8.081900628e-01,  8.108869830e-01,  8.136580625e-01,\n   8.165087134e-01,  8.194450113e-01,  8.224738122e-01,  8.256028983e-01,\n   8.288411587e-01,  8.321988194e-01,  8.356877362e-01,  8.393217759e-01,\n   8.431173179e-01,  8.470939272e-01,  8.512752763e-01,  8.556904349e-01,\n   8.603757250e-01,  8.653774745e-01,  8.707562571e-01,  8.765937281e-01,\n   8.830042789e-01,  8.901563967e-01,  8.983157447e-01,  9.079445898e-01,\n   9.199841476e-01,  9.370265573e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_5[] = {\n   0.000000000e+00,  1.018114730e-03,  2.447577757e-03,  4.090490249e-03,\n   5.890934762e-03,  7.819702758e-03,  9.858497479e-03,  1.199468311e-02,\n   1.421897836e-02,  1.652426967e-02,  1.890493304e-02,  2.135641640e-02,\n   2.387496739e-02,  2.645744780e-02,  2.910120255e-02,  3.180396430e-02,\n   3.456378239e-02,  3.737896864e-02,  4.024805539e-02,  4.316976240e-02,\n   4.614297046e-02,  4.916670001e-02,  5.224009373e-02,  5.536240216e-02,\n   5.853297174e-02,  6.175123485e-02,  6.501670131e-02,  6.832895130e-02,\n   7.168762928e-02,  7.509243873e-02,  7.854313775e-02,  8.203953521e-02,\n   8.558148741e-02,  8.916889531e-02,  9.280170199e-02,  9.647989060e-02,\n   1.002034825e-01,  1.039725357e-01,  1.077871436e-01,  1.116474338e-01,\n   1.155535673e-01,  1.195057376e-01,  1.235041700e-01,  1.275491216e-01,\n   1.316408803e-01,  1.357797652e-01,  1.399661263e-01,  1.442003443e-01,\n   1.484828310e-01,  1.528140295e-01,  1.571944143e-01,  1.616244922e-01,\n   1.661048023e-01,  1.706359169e-01,  1.752184425e-01,  1.798530199e-01,\n   1.845403259e-01,  1.892810740e-01,  1.940760156e-01,  1.989259413e-01,\n   2.038316821e-01,  2.087941115e-01,  2.138141466e-01,  2.188927501e-01,\n   2.240309325e-01,  2.292297540e-01,  2.344903268e-01,  2.398138180e-01,\n   2.452014519e-01,  2.506545133e-01,  2.561743506e-01,  2.617623790e-01,\n   2.674200851e-01,  2.731490300e-01,  2.789508547e-01,  2.848272843e-01,\n   2.907801337e-01,  2.968113131e-01,  3.029228345e-01,  3.091168186e-01,\n   3.153955022e-01,  3.217612466e-01,  3.282165467e-01,  3.347640407e-01,\n   3.414065214e-01,  3.481469485e-01,  3.549884613e-01,  3.619343947e-01,\n   3.689882947e-01,  3.761539374e-01,  3.834353497e-01,  3.908368320e-01,\n   3.983629845e-01,  4.060187359e-01,  4.138093769e-01,  4.217405974e-01,\n   4.298185290e-01,  4.380497936e-01,  4.464415593e-01,  4.550016046e-01,\n   4.637383928e-01,  4.726611579e-01,  4.817800062e-01,  4.911060348e-01,\n   5.006514717e-01,  5.104298430e-01,  5.204561730e-01,  5.307472260e-01,\n   5.413218004e-01,  5.522010904e-01,  5.634091346e-01,  5.749733794e-01,\n   5.869253929e-01,  5.993017859e-01,  6.121454129e-01,  6.255069703e-01,\n   6.394471608e-01,  6.540396919e-01,  6.693755400e-01,  6.855691975e-01,\n   7.027681651e-01,  7.211680193e-01,  7.410376703e-01,  7.627647521e-01,\n   7.869450991e-01,  8.145835948e-01,  8.476444412e-01,  8.912175164e-01,\n   1.000000000e+00,  0.000000000e+00,  2.305193561e-05,  5.537266463e-05,\n   9.245485435e-05,  1.330132332e-04,  1.763701639e-04,  2.220967632e-04,\n   2.698934464e-04,  3.195373823e-04,  3.708554146e-04,  4.237085659e-04,\n   4.779824786e-04,  5.335811724e-04,  5.904227827e-04,  6.484365446e-04,\n   7.075605930e-04,  7.677403191e-04,  8.289271148e-04,  8.910773963e-04,\n   9.541518332e-04,  1.018114730e-03,  1.082933522e-03,  1.148578370e-03,\n   1.215021812e-03,  1.282238481e-03,  1.350204864e-03,  1.418899101e-03,\n   1.488300802e-03,  1.558390906e-03,  1.629151545e-03,  1.700565930e-03,\n   1.772618256e-03,  1.845293613e-03,  1.918577907e-03,  1.992457794e-03,\n   2.066920620e-03,  2.141954364e-03,  2.217547593e-03,  2.293689415e-03,\n   2.370369443e-03,  2.447577757e-03,  2.525304872e-03,  2.603541711e-03,\n   2.682279576e-03,  2.761510126e-03,  2.841225351e-03,  2.921417557e-03,\n   3.002079341e-03,  3.083203580e-03,  3.164783411e-03,  3.246812217e-03,\n   3.329283615e-03,  3.412191444e-03,  3.495529747e-03,  3.579292771e-03,\n   3.663474947e-03,  3.748070885e-03,  3.833075366e-03,  3.918483332e-03,\n   4.004289878e-03,  4.090490249e-03,  4.177079825e-03,  4.264054125e-03,\n   4.351408791e-03,  4.439139591e-03,  4.527242409e-03,  4.615713239e-03,\n   4.704548185e-03,  4.793743453e-03,  4.883295347e-03,  4.973200267e-03,\n   5.063454704e-03,  5.154055237e-03,  5.244998528e-03,  5.336281320e-03,\n   5.427900437e-03,  5.519852774e-03,  5.612135302e-03,  5.704745061e-03,\n   5.797679157e-03,  5.890934762e-03,  5.984509112e-03,  6.078399503e-03,\n   6.172603289e-03,  6.267117881e-03,  6.361940745e-03,  6.457069402e-03,\n   6.552501422e-03,  6.648234424e-03,  6.744266079e-03,  6.840594102e-03,\n   6.937216254e-03,  7.034130340e-03,  7.131334207e-03,  7.228825745e-03,\n   7.326602883e-03,  7.424663588e-03,  7.523005868e-03,  7.621627764e-03,\n   7.720527356e-03,  7.819702758e-03,  7.919152117e-03,  8.018873612e-03,\n   8.118865458e-03,  8.219125896e-03,  8.319653201e-03,  8.420445677e-03,\n   8.521501656e-03,  8.622819498e-03,  8.724397591e-03,  8.826234350e-03,\n   8.928328214e-03,  9.030677649e-03,  9.133281146e-03,  9.236137220e-03,\n   9.339244408e-03,  9.442601272e-03,  9.546206395e-03,  9.650058383e-03,\n   9.754155861e-03,  9.858497479e-03,  9.963081904e-03,  1.006790782e-02,\n   1.017297395e-02,  1.027827900e-02,  1.038382173e-02,  1.048960090e-02,\n   1.059561528e-02,  1.070186369e-02,  7.328920314e-01,  7.338950798e-01,\n   7.349023549e-01,  7.359139073e-01,  7.369297885e-01,  7.379500512e-01,\n   7.389747491e-01,  7.400039368e-01,  7.410376703e-01,  7.420760067e-01,\n   7.431190043e-01,  7.441667225e-01,  7.452192224e-01,  7.462765658e-01,\n   7.473388164e-01,  7.484060390e-01,  7.494782999e-01,  7.505556671e-01,\n   7.516382097e-01,  7.527259988e-01,  7.538191070e-01,  7.549176085e-01,\n   7.560215793e-01,  7.571310973e-01,  7.582462421e-01,  7.593670954e-01,\n   7.604937406e-01,  7.616262636e-01,  7.627647521e-01,  7.639092961e-01,\n   7.650599878e-01,  7.662169221e-01,  7.673801958e-01,  7.685499089e-01,\n   7.697261634e-01,  7.709090645e-01,  7.720987200e-01,  7.732952407e-01,\n   7.744987406e-01,  7.757093368e-01,  7.769271495e-01,  7.781523027e-01,\n   7.793849237e-01,  7.806251437e-01,  7.818730977e-01,  7.831289247e-01,\n   7.843927681e-01,  7.856647754e-01,  7.869450991e-01,  7.882338960e-01,\n   7.895313284e-01,  7.908375635e-01,  7.921527739e-01,  7.934771383e-01,\n   7.948108411e-01,  7.961540731e-01,  7.975070315e-01,  7.988699205e-01,\n   8.002429518e-01,  8.016263443e-01,  8.030203251e-01,  8.044251298e-01,\n   8.058410026e-01,  8.072681971e-01,  8.087069770e-01,  8.101576160e-01,\n   8.116203991e-01,  8.130956224e-01,  8.145835948e-01,  8.160846378e-01,\n   8.175990867e-01,  8.191272914e-01,  8.206696173e-01,  8.222264463e-01,\n   8.237981776e-01,  8.253852292e-01,  8.269880389e-01,  8.286070659e-01,\n   8.302427919e-01,  8.318957231e-01,  8.335663915e-01,  8.352553572e-01,\n   8.369632105e-01,  8.386905739e-01,  8.404381048e-01,  8.422064985e-01,\n   8.439964910e-01,  8.458088625e-01,  8.476444412e-01,  8.495041079e-01,\n   8.513888001e-01,  8.532995179e-01,  8.552373296e-01,  8.572033784e-01,\n   8.591988902e-01,  8.612251822e-01,  8.632836724e-01,  8.653758910e-01,\n   8.675034929e-01,  8.696682731e-01,  8.718721829e-01,  8.741173506e-01,\n   8.764061039e-01,  8.787409977e-01,  8.811248460e-01,  8.835607606e-01,\n   8.860521966e-01,  8.886030082e-01,  8.912175164e-01,  8.939005915e-01,\n   8.966577567e-01,  8.994953173e-01,  9.024205244e-01,  9.054417870e-01,\n   9.085689472e-01,  9.118136479e-01,  9.151898297e-01,  9.187144200e-01,\n   9.224083122e-01,  9.262978018e-01,  9.304167668e-01,  9.348101309e-01,\n   9.395396669e-01,  9.446944290e-01,  9.504113165e-01,  9.569212379e-01,\n   9.646755908e-01,  9.748442279e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_6[] = {\n   0.000000000e+00,  1.172340652e-04,  4.021646897e-04,  8.271706545e-04,\n   1.379870657e-03,  2.052359069e-03,  2.838935565e-03,  3.735208528e-03,\n   4.737649774e-03,  5.843341990e-03,  7.049822176e-03,  8.354978198e-03,\n   9.756977052e-03,  1.125421317e-02,  1.284527004e-02,  1.452889094e-02,\n   1.630395620e-02,  1.816946515e-02,  2.012452166e-02,  2.216832231e-02,\n   2.430014665e-02,  2.651934910e-02,  2.882535217e-02,  3.121764067e-02,\n   3.369575685e-02,  3.625929617e-02,  3.890790372e-02,  4.164127112e-02,\n   4.445913378e-02,  4.736126860e-02,  5.034749195e-02,  5.341765787e-02,\n   5.657165654e-02,  5.980941299e-02,  6.313088592e-02,  6.653606673e-02,\n   7.002497867e-02,  7.359767614e-02,  7.725424408e-02,  8.099479753e-02,\n   8.481948121e-02,  8.872846927e-02,  9.272196506e-02,  9.680020106e-02,\n   1.009634388e-01,  1.052119690e-01,  1.095461116e-01,  1.139662159e-01,\n   1.184726610e-01,  1.230658561e-01,  1.277462407e-01,  1.325142854e-01,\n   1.373704923e-01,  1.423153954e-01,  1.473495619e-01,  1.524735922e-01,\n   1.576881214e-01,  1.629938202e-01,  1.683913954e-01,  1.738815916e-01,\n   1.794651922e-01,  1.851430207e-01,  1.909159423e-01,  1.967848651e-01,\n   2.027507423e-01,  2.088145736e-01,  2.149774072e-01,  2.212403422e-01,\n   2.276045306e-01,  2.340711797e-01,  2.406415551e-01,  2.473169831e-01,\n   2.540988542e-01,  2.609886263e-01,  2.679878281e-01,  2.750980633e-01,\n   2.823210147e-01,  2.896584487e-01,  2.971122208e-01,  3.046842801e-01,\n   3.123766762e-01,  3.201915649e-01,  3.281312158e-01,  3.361980196e-01,\n   3.443944968e-01,  3.527233069e-01,  3.611872585e-01,  3.697893208e-01,\n   3.785326358e-01,  3.874205322e-01,  3.964565406e-01,  4.056444108e-01,\n   4.149881302e-01,  4.244919458e-01,  4.341603875e-01,  4.439982951e-01,\n   4.540108486e-01,  4.642036030e-01,  4.745825269e-01,  4.851540477e-01,\n   4.959251028e-01,  5.069031989e-01,  5.180964806e-01,  5.295138106e-01,\n   5.411648636e-01,  5.530602362e-01,  5.652115788e-01,  5.776317520e-01,\n   5.903350160e-01,  6.033372597e-01,  6.166562829e-01,  6.303121455e-01,\n   6.443276052e-01,  6.587286739e-01,  6.735453343e-01,  6.888124785e-01,\n   7.045711594e-01,  7.208702962e-01,  7.377690553e-01,  7.553402709e-01,\n   7.736755330e-01,  7.928930756e-01,  8.131506561e-01,  8.346680215e-01,\n   8.577696864e-01,  8.829770436e-01,  9.112476744e-01,  9.448477179e-01,\n   1.000000000e+00,  0.000000000e+00,  5.694358136e-07,  1.953261497e-06,\n   4.016983988e-06,  6.700024794e-06,  9.963453256e-06,  1.377896926e-05,\n   1.812455522e-05,  2.298231823e-05,  2.833726704e-05,  3.417655444e-05,\n   4.048897702e-05,  4.726462846e-05,  5.449464977e-05,  6.217104388e-05,\n   7.028653437e-05,  7.883445544e-05,  8.780866481e-05,  9.720347348e-05,\n   1.070135884e-04,  1.172340652e-04,  1.278602684e-04,  1.388878385e-04,\n   1.503126630e-04,  1.621308526e-04,  1.743387201e-04,  1.869327617e-04,\n   1.999096416e-04,  2.132661780e-04,  2.269993301e-04,  2.411061878e-04,\n   2.555839617e-04,  2.704299740e-04,  2.856416513e-04,  3.012165168e-04,\n   3.171521844e-04,  3.334463528e-04,  3.500968001e-04,  3.671013791e-04,\n   3.844580125e-04,  4.021646897e-04,  4.202194622e-04,  4.386204407e-04,\n   4.573657920e-04,  4.764537355e-04,  4.958825413e-04,  5.156505272e-04,\n   5.357560563e-04,  5.561975354e-04,  5.769734122e-04,  5.980821741e-04,\n   6.195223462e-04,  6.412924893e-04,  6.633911989e-04,  6.858171036e-04,\n   7.085688635e-04,  7.316451690e-04,  7.550447398e-04,  7.787663236e-04,\n   8.028086949e-04,  8.271706545e-04,  8.518510276e-04,  8.768486639e-04,\n   9.021624361e-04,  9.277912394e-04,  9.537339902e-04,  9.799896263e-04,\n   1.006557105e-03,  1.033435404e-03,  1.060623519e-03,  1.088120464e-03,\n   1.115925272e-03,  1.144036990e-03,  1.172454685e-03,  1.201177438e-03,\n   1.230204347e-03,  1.259534523e-03,  1.289167094e-03,  1.319101201e-03,\n   1.349335999e-03,  1.379870657e-03,  1.410704356e-03,  1.441836291e-03,\n   1.473265668e-03,  1.504991707e-03,  1.537013637e-03,  1.569330702e-03,\n   1.601942153e-03,  1.634847256e-03,  1.668045285e-03,  1.701535524e-03,\n   1.735317268e-03,  1.769389823e-03,  1.803752503e-03,  1.838404631e-03,\n   1.873345540e-03,  1.908574572e-03,  1.944091078e-03,  1.979894417e-03,\n   2.015983955e-03,  2.052359069e-03,  2.089019141e-03,  2.125963564e-03,\n   2.163191736e-03,  2.200703063e-03,  2.238496959e-03,  2.276572844e-03,\n   2.314930147e-03,  2.353568301e-03,  2.392486749e-03,  2.431684938e-03,\n   2.471162322e-03,  2.510918362e-03,  2.550952525e-03,  2.591264284e-03,\n   2.631853117e-03,  2.672718510e-03,  2.713859952e-03,  2.755276940e-03,\n   2.796968976e-03,  2.838935565e-03,  2.881176221e-03,  2.923690462e-03,\n   2.966477808e-03,  3.009537789e-03,  3.052869937e-03,  3.096473790e-03,\n   3.140348888e-03,  3.184494781e-03,  8.049105078e-01,  8.059301109e-01,\n   8.069526314e-01,  8.079780978e-01,  8.090065392e-01,  8.100379853e-01,\n   8.110724662e-01,  8.121100127e-01,  8.131506561e-01,  8.141944284e-01,\n   8.152413620e-01,  8.162914902e-01,  8.173448468e-01,  8.184014662e-01,\n   8.194613836e-01,  8.205246349e-01,  8.215912567e-01,  8.226612862e-01,\n   8.237347617e-01,  8.248117219e-01,  8.258922067e-01,  8.269762565e-01,\n   8.280639127e-01,  8.291552178e-01,  8.302502149e-01,  8.313489481e-01,\n   8.324514627e-01,  8.335578047e-01,  8.346680215e-01,  8.357821612e-01,\n   8.369002734e-01,  8.380224085e-01,  8.391486183e-01,  8.402789558e-01,\n   8.414134752e-01,  8.425522321e-01,  8.436952834e-01,  8.448426874e-01,\n   8.459945041e-01,  8.471507947e-01,  8.483116222e-01,  8.494770510e-01,\n   8.506471474e-01,  8.518219795e-01,  8.530016170e-01,  8.541861317e-01,\n   8.553755973e-01,  8.565700896e-01,  8.577696864e-01,  8.589744680e-01,\n   8.601845168e-01,  8.613999175e-01,  8.626207578e-01,  8.638471275e-01,\n   8.650791195e-01,  8.663168294e-01,  8.675603558e-01,  8.688098006e-01,\n   8.700652688e-01,  8.713268689e-01,  8.725947131e-01,  8.738689172e-01,\n   8.751496011e-01,  8.764368888e-01,  8.777309086e-01,  8.790317936e-01,\n   8.803396816e-01,  8.816547155e-01,  8.829770436e-01,  8.843068198e-01,\n   8.856442042e-01,  8.869893628e-01,  8.883424688e-01,  8.897037022e-01,\n   8.910732504e-01,  8.924513091e-01,  8.938380822e-01,  8.952337828e-01,\n   8.966386333e-01,  8.980528667e-01,  8.994767266e-01,  9.009104685e-01,\n   9.023543601e-01,  9.038086828e-01,  9.052737321e-01,  9.067498191e-01,\n   9.082372715e-01,  9.097364349e-01,  9.112476744e-01,  9.127713758e-01,\n   9.143079480e-01,  9.158578245e-01,  9.174214658e-01,  9.189993618e-01,\n   9.205920347e-01,  9.222000421e-01,  9.238239805e-01,  9.254644892e-01,\n   9.271222552e-01,  9.287980184e-01,  9.304925774e-01,  9.322067966e-01,\n   9.339416143e-01,  9.356980523e-01,  9.374772266e-01,  9.392803607e-01,\n   9.411088012e-01,  9.429640363e-01,  9.448477179e-01,  9.467616896e-01,\n   9.487080196e-01,  9.506890424e-01,  9.527074116e-01,  9.547661657e-01,\n   9.568688141e-01,  9.590194500e-01,  9.612229003e-01,  9.634849308e-01,\n   9.658125334e-01,  9.682143389e-01,  9.707012325e-01,  9.732873098e-01,\n   9.759914408e-01,  9.788400043e-01,  9.818721051e-01,  9.851508371e-01,\n   9.887926216e-01,  9.930744994e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_7[] = {\n   0.000000000e+00,  4.586558125e-06,  2.646347167e-05,  7.377292896e-05,\n   1.526888560e-04,  2.684396949e-04,  4.256561038e-04,  6.285447692e-04,\n   8.809908037e-04,  1.186624293e-03,  1.548866513e-03,  1.970963608e-03,\n   2.456012062e-03,  3.006978519e-03,  3.626715580e-03,  4.317974644e-03,\n   5.083416509e-03,  5.925620257e-03,  6.847090789e-03,  7.850265279e-03,\n   8.937518763e-03,  1.011116901e-02,  1.137348080e-02,  1.272666973e-02,\n   1.417290556e-02,  1.571431527e-02,  1.735298574e-02,  1.909096624e-02,\n   2.093027063e-02,  2.287287942e-02,  2.492074165e-02,  2.707577653e-02,\n   2.933987510e-02,  3.171490163e-02,  3.420269500e-02,  3.680506996e-02,\n   3.952381827e-02,  4.236070985e-02,  4.531749375e-02,  4.839589916e-02,\n   5.159763631e-02,  5.492439731e-02,  5.837785700e-02,  6.195967369e-02,\n   6.567148991e-02,  6.951493309e-02,  7.349161627e-02,  7.760313868e-02,\n   8.185108643e-02,  8.623703301e-02,  9.076253994e-02,  9.542915726e-02,\n   1.002384241e-01,  1.051918691e-01,  1.102910112e-01,  1.155373597e-01,\n   1.209324150e-01,  1.264776690e-01,  1.321746058e-01,  1.380247017e-01,\n   1.440294259e-01,  1.501902410e-01,  1.565086032e-01,  1.629859632e-01,\n   1.696237661e-01,  1.764234520e-01,  1.833864566e-01,  1.905142116e-01,\n   1.978081451e-01,  2.052696818e-01,  2.129002440e-01,  2.207012515e-01,\n   2.286741225e-01,  2.368202738e-01,  2.451411216e-01,  2.536380817e-01,\n   2.623125702e-01,  2.711660042e-01,  2.801998019e-01,  2.894153839e-01,\n   2.988141733e-01,  3.083975965e-01,  3.181670841e-01,  3.281240715e-01,\n   3.382699996e-01,  3.486063158e-01,  3.591344750e-01,  3.698559403e-01,\n   3.807721844e-01,  3.918846903e-01,  4.031949531e-01,  4.147044806e-01,\n   4.264147957e-01,  4.383274371e-01,  4.504439617e-01,  4.627659460e-01,\n   4.752949890e-01,  4.880327136e-01,  5.009807703e-01,  5.141408395e-01,\n   5.275146350e-01,  5.411039080e-01,  5.549104513e-01,  5.689361044e-01,\n   5.831827591e-01,  5.976523660e-01,  6.123469423e-01,  6.272685811e-01,\n   6.424194615e-01,  6.578018618e-01,  6.734181744e-01,  6.892709246e-01,\n   7.053627930e-01,  7.216966442e-01,  7.382755619e-01,  7.551028944e-01,\n   7.721823141e-01,  7.895178952e-01,  8.071142202e-01,  8.249765284e-01,\n   8.431109289e-01,  8.615247198e-01,  8.802268893e-01,  8.992289526e-01,\n   9.185464667e-01,  9.382021046e-01,  9.582330668e-01,  9.787153834e-01,\n   1.000000000e+00,  0.000000000e+00,  2.354013782e-09,  1.358215835e-08,\n   3.786332271e-08,  7.836616211e-08,  1.377740100e-07,  2.184633114e-07,\n   3.225928083e-07,  4.521560734e-07,  6.090156427e-07,  7.949267127e-07,\n   1.011554405e-06,  1.260486813e-06,  1.543245157e-06,  1.861291862e-06,\n   2.216037130e-06,  2.608844355e-06,  3.041034659e-06,  3.513890735e-06,\n   4.028660139e-06,  4.586558125e-06,  5.188770128e-06,  5.836453932e-06,\n   6.530741593e-06,  7.272741140e-06,  8.063538102e-06,  8.904196874e-06,\n   9.795761953e-06,  1.073925905e-05,  1.173569612e-05,  1.278606426e-05,\n   1.389133859e-05,  1.505247901e-05,  1.627043094e-05,  1.754612596e-05,\n   1.888048240e-05,  2.027440599e-05,  2.172879030e-05,  2.324451729e-05,\n   2.482245773e-05,  2.646347167e-05,  2.816840880e-05,  2.993810888e-05,\n   3.177340205e-05,  3.367510918e-05,  3.564404219e-05,  3.768100434e-05,\n   3.978679053e-05,  4.196218754e-05,  4.420797430e-05,  4.652492213e-05,\n   4.891379495e-05,  5.137534953e-05,  5.391033566e-05,  5.651949637e-05,\n   5.920356811e-05,  6.196328091e-05,  6.479935860e-05,  6.771251891e-05,\n   7.070347367e-05,  7.377292896e-05,  7.692158522e-05,  8.015013742e-05,\n   8.345927518e-05,  8.684968289e-05,  9.032203983e-05,  9.387702031e-05,\n   9.751529377e-05,  1.012375249e-04,  1.050443736e-04,  1.089364954e-04,\n   1.129145413e-04,  1.169791579e-04,  1.211309875e-04,  1.253706683e-04,\n   1.296988343e-04,  1.341161155e-04,  1.386231380e-04,  1.432205239e-04,\n   1.479088917e-04,  1.526888560e-04,  1.575610279e-04,  1.625260147e-04,\n   1.675844204e-04,  1.727368454e-04,  1.779838867e-04,  1.833261381e-04,\n   1.887641899e-04,  1.942986293e-04,  1.999300404e-04,  2.056590040e-04,\n   2.114860979e-04,  2.174118971e-04,  2.234369732e-04,  2.295618953e-04,\n   2.357872294e-04,  2.421135386e-04,  2.485413834e-04,  2.550713215e-04,\n   2.617039079e-04,  2.684396949e-04,  2.752792321e-04,  2.822230667e-04,\n   2.892717432e-04,  2.964258037e-04,  3.036857878e-04,  3.110522326e-04,\n   3.185256728e-04,  3.261066408e-04,  3.337956666e-04,  3.415932780e-04,\n   3.495000003e-04,  3.575163568e-04,  3.656428685e-04,  3.738800540e-04,\n   3.822284302e-04,  3.906885114e-04,  3.992608101e-04,  4.079458365e-04,\n   4.167440990e-04,  4.256561038e-04,  4.346823552e-04,  4.438233554e-04,\n   4.530796047e-04,  4.624516015e-04,  4.719398424e-04,  4.815448219e-04,\n   4.912670327e-04,  5.011069658e-04,  8.727107489e-01,  8.736476726e-01,\n   8.745853344e-01,  8.755237357e-01,  8.764628781e-01,  8.774027631e-01,\n   8.783433923e-01,  8.792847671e-01,  8.802268893e-01,  8.811697604e-01,\n   8.821133821e-01,  8.830577560e-01,  8.840028839e-01,  8.849487674e-01,\n   8.858954083e-01,  8.868428083e-01,  8.877909694e-01,  8.887398932e-01,\n   8.896895816e-01,  8.906400366e-01,  8.915912600e-01,  8.925432539e-01,\n   8.934960201e-01,  8.944495607e-01,  8.954038777e-01,  8.963589733e-01,\n   8.973148495e-01,  8.982715086e-01,  8.992289526e-01,  9.001871839e-01,\n   9.011462047e-01,  9.021060174e-01,  9.030666242e-01,  9.040280277e-01,\n   9.049902302e-01,  9.059532343e-01,  9.069170426e-01,  9.078816575e-01,\n   9.088470819e-01,  9.098133183e-01,  9.107803696e-01,  9.117482386e-01,\n   9.127169282e-01,  9.136864412e-01,  9.146567808e-01,  9.156279499e-01,\n   9.165999518e-01,  9.175727896e-01,  9.185464667e-01,  9.195209864e-01,\n   9.204963521e-01,  9.214725674e-01,  9.224496359e-01,  9.234275613e-01,\n   9.244063473e-01,  9.253859980e-01,  9.263665172e-01,  9.273479090e-01,\n   9.283301777e-01,  9.293133276e-01,  9.302973631e-01,  9.312822888e-01,\n   9.322681093e-01,  9.332548295e-01,  9.342424543e-01,  9.352309889e-01,\n   9.362204385e-01,  9.372108085e-01,  9.382021046e-01,  9.391943325e-01,\n   9.401874981e-01,  9.411816076e-01,  9.421766675e-01,  9.431726841e-01,\n   9.441696645e-01,  9.451676156e-01,  9.461665447e-01,  9.471664595e-01,\n   9.481673677e-01,  9.491692776e-01,  9.501721977e-01,  9.511761367e-01,\n   9.521811039e-01,  9.531871089e-01,  9.541941617e-01,  9.552022727e-01,\n   9.562114528e-01,  9.572217135e-01,  9.582330668e-01,  9.592455251e-01,\n   9.602591016e-01,  9.612738103e-01,  9.622896657e-01,  9.633066832e-01,\n   9.643248790e-01,  9.653442703e-01,  9.663648754e-01,  9.673867136e-01,\n   9.684098054e-01,  9.694341727e-01,  9.704598389e-01,  9.714868291e-01,\n   9.725151702e-01,  9.735448912e-01,  9.745760231e-01,  9.756085999e-01,\n   9.766426582e-01,  9.776782381e-01,  9.787153834e-01,  9.797541424e-01,\n   9.807945682e-01,  9.818367200e-01,  9.828806638e-01,  9.839264741e-01,\n   9.849742351e-01,  9.860240431e-01,  9.870760092e-01,  9.881302632e-01,\n   9.891869585e-01,  9.902462796e-01,  9.913084522e-01,  9.923737588e-01,\n   9.934425643e-01,  9.945153569e-01,  9.955928249e-01,  9.966760129e-01,\n   9.977667007e-01,  9.988686588e-01,  1.000000000e+00,\n};\nconst float dist_icdf_0_8[] = {\n   0.000000000e+00,  2.499558898e-16,  5.522325275e-14,  1.298450393e-12,\n   1.220058326e-11,  6.935268843e-11,  2.868692324e-10,  9.528604901e-10,\n   2.695499165e-09,  6.745083776e-09,  1.532222751e-08,  3.218590475e-08,\n   6.337858886e-08,  1.182091278e-07,  2.105173420e-07,  3.602675959e-07,\n   5.955218045e-07,  9.548454854e-07,  1.490203567e-06,  2.270405709e-06,\n   3.385163899e-06,  4.949828024e-06,  7.110868034e-06,  1.005217413e-05,\n   1.400224922e-05,  1.924237054e-05,  2.611580003e-05,  3.503812543e-05,\n   4.650881662e-05,  6.112408374e-05,  7.959112573e-05,  1.027438597e-04,\n   1.315602227e-04,  1.671811392e-04,  2.109312467e-04,  2.643414733e-04,\n   3.291735600e-04,  4.074466168e-04,  5.014658015e-04,  6.138532050e-04,\n   7.475810194e-04,  9.060070596e-04,  1.092912699e-03,  1.312543263e-03,\n   1.569650919e-03,  1.869540068e-03,  2.218115222e-03,  2.621931346e-03,\n   3.088246559e-03,  3.625077110e-03,  4.241254441e-03,  4.946484128e-03,\n   5.751406407e-03,  6.667657933e-03,  7.707934304e-03,  8.886052824e-03,\n   1.021701481e-02,  1.171706669e-02,  1.340375891e-02,  1.529600160e-02,\n   1.741411574e-02,  1.977987824e-02,  2.241655952e-02,  2.534895137e-02,\n   2.860338336e-02,  3.220772502e-02,  3.619137160e-02,  4.058521024e-02,\n   4.542156369e-02,  5.073410821e-02,  5.655776215e-02,  6.292854176e-02,\n   6.988338039e-02,  7.745990758e-02,  8.569618437e-02,  9.463039168e-02,\n   1.043004687e-01,  1.147436990e-01,  1.259962430e-01,  1.380926158e-01,\n   1.510651111e-01,  1.649431741e-01,  1.797527258e-01,  1.955154463e-01,\n   2.122480231e-01,  2.299613772e-01,  2.486598786e-01,  2.683405666e-01,\n   2.889923945e-01,  3.105955182e-01,  3.331206517e-01,  3.565285139e-01,\n   3.807693922e-01,  4.057828473e-01,  4.314975858e-01,  4.578315218e-01,\n   4.846920480e-01,  5.119765315e-01,  5.395730457e-01,  5.673613399e-01,\n   5.952140449e-01,  6.229981014e-01,  6.505763917e-01,  6.778095468e-01,\n   7.045578915e-01,  7.306834868e-01,  7.560522194e-01,  7.805358885e-01,\n   8.040142364e-01,  8.263768698e-01,  8.475250246e-01,  8.673731289e-01,\n   8.858501289e-01,  9.029005494e-01,  9.184852738e-01,  9.325820367e-01,\n   9.451856350e-01,  9.563078781e-01,  9.659773035e-01,  9.742387033e-01,\n   9.811525136e-01,  9.867941361e-01,  9.912532814e-01,  9.946334519e-01,\n   9.970517424e-01,  9.986392589e-01,  9.995427675e-01,  9.999291847e-01,\n   1.000000000e+00,  0.000000000e+00,  1.845636753e-26,  4.077602051e-24,\n   9.587562705e-23,  9.008727455e-22,  5.120898362e-21,  2.118199331e-20,\n   7.035778765e-20,  1.990316106e-19,  4.980468584e-19,  1.131370278e-18,\n   2.376558914e-18,  4.679779986e-18,  8.728385052e-18,  1.554428621e-17,\n   2.660162358e-17,  4.397245029e-17,  7.050439418e-17,  1.100344848e-16,\n   1.676435599e-16,  2.499558898e-16,  3.654888753e-16,  5.250578960e-16,\n   7.422415969e-16,  1.033913117e-15,  1.420842969e-15,  1.928379500e-15,\n   2.587213046e-15,  3.434230123e-15,  4.513464189e-15,  5.877149700e-15,\n   7.586886413e-15,  9.714921055e-15,  1.234555368e-14,  1.557667628e-14,\n   1.952145128e-14,  2.431013795e-14,  3.009207471e-14,  3.703782571e-14,\n   4.534150010e-14,  5.522325275e-14,  6.693197511e-14,  8.074818544e-14,\n   9.698712749e-14,  1.160020871e-13,  1.381879364e-13,  1.639849149e-13,\n   1.938826584e-13,  2.284244849e-13,  2.682119478e-13,  3.139096681e-13,\n   3.662504549e-13,  4.260407252e-13,  4.941662353e-13,  5.715981332e-13,\n   6.593993446e-13,  7.587313037e-13,  8.708610405e-13,  9.971686360e-13,\n   1.139155059e-12,  1.298450393e-12,  1.476822473e-12,  1.676185932e-12,\n   1.898611688e-12,  2.146336865e-12,  2.421775176e-12,  2.727527773e-12,\n   3.066394581e-12,  3.441386127e-12,  3.855735883e-12,  4.312913128e-12,\n   4.816636353e-12,  5.370887215e-12,  5.979925059e-12,  6.648302023e-12,\n   7.380878736e-12,  8.182840630e-12,  9.059714874e-12,  1.001738796e-11,\n   1.106212392e-11,  1.220058326e-11,  1.343984253e-11,  1.478741462e-11,\n   1.625126981e-11,  1.783985749e-11,  1.956212869e-11,  2.142755932e-11,\n   2.344617426e-11,  2.562857223e-11,  2.798595144e-11,  3.053013611e-11,\n   3.327360388e-11,  3.622951398e-11,  3.941173642e-11,  4.283488203e-11,\n   4.651433334e-11,  5.046627656e-11,  5.470773443e-11,  5.925660002e-11,\n   6.413167158e-11,  6.935268843e-11,  7.494036778e-11,  8.091644273e-11,\n   8.730370125e-11,  9.412602628e-11,  1.014084370e-10,  1.091771310e-10,\n   1.174595280e-10,  1.262843144e-10,  1.356814893e-10,  1.456824110e-10,\n   1.563198462e-10,  1.676280186e-10,  1.796426607e-10,  1.924010648e-10,\n   2.059421374e-10,  2.203064535e-10,  2.355363127e-10,  2.516757968e-10,\n   2.687708286e-10,  2.868692324e-10,  3.060207954e-10,  3.262773313e-10,\n   3.476927447e-10,  3.703230975e-10,  3.942266766e-10,  4.194640630e-10,\n   4.460982029e-10,  4.741944800e-10,  9.896052010e-01,  9.898208991e-01,\n   9.900338024e-01,  9.902439243e-01,  9.904512781e-01,  9.906558772e-01,\n   9.908577350e-01,  9.910568652e-01,  9.912532814e-01,  9.914469974e-01,\n   9.916380269e-01,  9.918263840e-01,  9.920120825e-01,  9.921951366e-01,\n   9.923755605e-01,  9.925533683e-01,  9.927285745e-01,  9.929011934e-01,\n   9.930712396e-01,  9.932387276e-01,  9.934036721e-01,  9.935660879e-01,\n   9.937259899e-01,  9.938833928e-01,  9.940383119e-01,  9.941907621e-01,\n   9.943407586e-01,  9.944883168e-01,  9.946334519e-01,  9.947761795e-01,\n   9.949165150e-01,  9.950544741e-01,  9.951900724e-01,  9.953233258e-01,\n   9.954542502e-01,  9.955828614e-01,  9.957091756e-01,  9.958332089e-01,\n   9.959549775e-01,  9.960744978e-01,  9.961917862e-01,  9.963068591e-01,\n   9.964197331e-01,  9.965304250e-01,  9.966389515e-01,  9.967453295e-01,\n   9.968495760e-01,  9.969517079e-01,  9.970517424e-01,  9.971496968e-01,\n   9.972455885e-01,  9.973394348e-01,  9.974312532e-01,  9.975210615e-01,\n   9.976088773e-01,  9.976947184e-01,  9.977786029e-01,  9.978605486e-01,\n   9.979405738e-01,  9.980186967e-01,  9.980949355e-01,  9.981693088e-01,\n   9.982418352e-01,  9.983125332e-01,  9.983814216e-01,  9.984485193e-01,\n   9.985138454e-01,  9.985774188e-01,  9.986392589e-01,  9.986993850e-01,\n   9.987578165e-01,  9.988145730e-01,  9.988696742e-01,  9.989231400e-01,\n   9.989749903e-01,  9.990252451e-01,  9.990739248e-01,  9.991210496e-01,\n   9.991666401e-01,  9.992107169e-01,  9.992533007e-01,  9.992944124e-01,\n   9.993340733e-01,  9.993723043e-01,  9.994091270e-01,  9.994445629e-01,\n   9.994786337e-01,  9.995113612e-01,  9.995427675e-01,  9.995728748e-01,\n   9.996017055e-01,  9.996292823e-01,  9.996556279e-01,  9.996807652e-01,\n   9.997047176e-01,  9.997275084e-01,  9.997491612e-01,  9.997696999e-01,\n   9.997891487e-01,  9.998075318e-01,  9.998248740e-01,  9.998412000e-01,\n   9.998565351e-01,  9.998709047e-01,  9.998843347e-01,  9.998968510e-01,\n   9.999084802e-01,  9.999192490e-01,  9.999291847e-01,  9.999383149e-01,\n   9.999466675e-01,  9.999542712e-01,  9.999611549e-01,  9.999673481e-01,\n   9.999728809e-01,  9.999777842e-01,  9.999820893e-01,  9.999858284e-01,\n   9.999890345e-01,  9.999917418e-01,  9.999939851e-01,  9.999958008e-01,\n   9.999972267e-01,  9.999983021e-01,  9.999990686e-01,  9.999995706e-01,\n   9.999998558e-01,  9.999999777e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_0[] = {\n   0.000000000e+00,  1.100527359e-01,  1.135849643e-01,  1.158490613e-01,\n   1.175626723e-01,  1.189624288e-01,  1.201575147e-01,  1.212078128e-01,\n   1.221499076e-01,  1.230078763e-01,  1.237984539e-01,  1.245337702e-01,\n   1.252229140e-01,  1.258728819e-01,  1.264891816e-01,  1.270762321e-01,\n   1.276376359e-01,  1.281763718e-01,  1.286949333e-01,  1.291954299e-01,\n   1.296796639e-01,  1.301491883e-01,  1.306053521e-01,  1.310493348e-01,\n   1.314821751e-01,  1.319047927e-01,  1.323180067e-01,  1.327225501e-01,\n   1.331190822e-01,  1.335081984e-01,  1.338904389e-01,  1.342662957e-01,\n   1.346362186e-01,  1.350006200e-01,  1.353598799e-01,  1.357143489e-01,\n   1.360643520e-01,  1.364101914e-01,  1.367521485e-01,  1.370904864e-01,\n   1.374254520e-01,  1.377572771e-01,  1.380861802e-01,  1.384123682e-01,\n   1.387360366e-01,  1.390573717e-01,  1.393765506e-01,  1.396937426e-01,\n   1.400091099e-01,  1.403228081e-01,  1.406349872e-01,  1.409457916e-01,\n   1.412553615e-01,  1.415638327e-01,  1.418713372e-01,  1.421780039e-01,\n   1.424839590e-01,  1.427893260e-01,  1.430942265e-01,  1.433987802e-01,\n   1.437031058e-01,  1.440073206e-01,  1.443115413e-01,  1.446158843e-01,\n   1.449204659e-01,  1.452254024e-01,  1.455308111e-01,  1.458368096e-01,\n   1.461435172e-01,  1.464510544e-01,  1.467595435e-01,  1.470691093e-01,\n   1.473798788e-01,  1.476919822e-01,  1.480055529e-01,  1.483207281e-01,\n   1.486376491e-01,  1.489564623e-01,  1.492773187e-01,  1.496003756e-01,\n   1.499257965e-01,  1.502537519e-01,  1.505844201e-01,  1.509179880e-01,\n   1.512546519e-01,  1.515946186e-01,  1.519381062e-01,  1.522853455e-01,\n   1.526365815e-01,  1.529920742e-01,  1.533521010e-01,  1.537169582e-01,\n   1.540869633e-01,  1.544624570e-01,  1.548438064e-01,  1.552314079e-01,\n   1.556256908e-01,  1.560271215e-01,  1.564362082e-01,  1.568535065e-01,\n   1.572796262e-01,  1.577152386e-01,  1.581610858e-01,  1.586179916e-01,\n   1.590868744e-01,  1.595687633e-01,  1.600648166e-01,  1.605763456e-01,\n   1.611048438e-01,  1.616520232e-01,  1.622198601e-01,  1.628106539e-01,\n   1.634271036e-01,  1.640724077e-01,  1.647503988e-01,  1.654657259e-01,\n   1.662241093e-01,  1.670327028e-01,  1.679006264e-01,  1.688397728e-01,\n   1.698660805e-01,  1.710016410e-01,  1.722784021e-01,  1.737451946e-01,\n   1.754824989e-01,  1.776382869e-01,  1.805367416e-01,  1.851768742e-01,\n   1.000000000e+00,  0.000000000e+00,  9.798423805e-02,  1.004320032e-01,\n   1.019449101e-01,  1.030587399e-01,  1.039476089e-01,  1.046910248e-01,\n   1.053322308e-01,  1.058974588e-01,  1.064038644e-01,  1.068633053e-01,\n   1.072843317e-01,  1.076733195e-01,  1.080351549e-01,  1.083736678e-01,\n   1.086919180e-01,  1.089923902e-01,  1.092771307e-01,  1.095478457e-01,\n   1.098059729e-01,  1.100527359e-01,  1.102891848e-01,  1.105162280e-01,\n   1.107346564e-01,  1.109451635e-01,  1.111483606e-01,  1.113447894e-01,\n   1.115349324e-01,  1.117192212e-01,  1.118980437e-01,  1.120717494e-01,\n   1.122406548e-01,  1.124050474e-01,  1.125651888e-01,  1.127213183e-01,\n   1.128736549e-01,  1.130224000e-01,  1.131677387e-01,  1.133098421e-01,\n   1.134488685e-01,  1.135849643e-01,  1.137182656e-01,  1.138488993e-01,\n   1.139769832e-01,  1.141026276e-01,  1.142259355e-01,  1.143470034e-01,\n   1.144659219e-01,  1.145827759e-01,  1.146976455e-01,  1.148106058e-01,\n   1.149217279e-01,  1.150310788e-01,  1.151387218e-01,  1.152447168e-01,\n   1.153491206e-01,  1.154519870e-01,  1.155533669e-01,  1.156533089e-01,\n   1.157518591e-01,  1.158490613e-01,  1.159449574e-01,  1.160395870e-01,\n   1.161329883e-01,  1.162251974e-01,  1.163162491e-01,  1.164061763e-01,\n   1.164950108e-01,  1.165827830e-01,  1.166695218e-01,  1.167552551e-01,\n   1.168400096e-01,  1.169238110e-01,  1.170066838e-01,  1.170886518e-01,\n   1.171697376e-01,  1.172499632e-01,  1.173293496e-01,  1.174079170e-01,\n   1.174856849e-01,  1.175626723e-01,  1.176388971e-01,  1.177143771e-01,\n   1.177891289e-01,  1.178631690e-01,  1.179365131e-01,  1.180091764e-01,\n   1.180811737e-01,  1.181525191e-01,  1.182232265e-01,  1.182933092e-01,\n   1.183627801e-01,  1.184316517e-01,  1.184999361e-01,  1.185676451e-01,\n   1.186347900e-01,  1.187013818e-01,  1.187674314e-01,  1.188329491e-01,\n   1.188979450e-01,  1.189624288e-01,  1.190264102e-01,  1.190898983e-01,\n   1.191529022e-01,  1.192154306e-01,  1.192774921e-01,  1.193390948e-01,\n   1.194002468e-01,  1.194609560e-01,  1.195212300e-01,  1.195810762e-01,\n   1.196405019e-01,  1.196995141e-01,  1.197581196e-01,  1.198163252e-01,\n   1.198741374e-01,  1.199315626e-01,  1.199886069e-01,  1.200452765e-01,\n   1.201015771e-01,  1.201575147e-01,  1.202130948e-01,  1.202683230e-01,\n   1.203232045e-01,  1.203777446e-01,  1.204319486e-01,  1.204858213e-01,\n   1.205393676e-01,  1.205925924e-01,  1.717481254e-01,  1.718128906e-01,\n   1.718780767e-01,  1.719436901e-01,  1.720097375e-01,  1.720762254e-01,\n   1.721431608e-01,  1.722105506e-01,  1.722784021e-01,  1.723467225e-01,\n   1.724155194e-01,  1.724848006e-01,  1.725545739e-01,  1.726248475e-01,\n   1.726956296e-01,  1.727669288e-01,  1.728387539e-01,  1.729111139e-01,\n   1.729840178e-01,  1.730574753e-01,  1.731314960e-01,  1.732060899e-01,\n   1.732812673e-01,  1.733570386e-01,  1.734334147e-01,  1.735104068e-01,\n   1.735880262e-01,  1.736662848e-01,  1.737451946e-01,  1.738247681e-01,\n   1.739050182e-01,  1.739859581e-01,  1.740676014e-01,  1.741499620e-01,\n   1.742330546e-01,  1.743168940e-01,  1.744014955e-01,  1.744868750e-01,\n   1.745730490e-01,  1.746600343e-01,  1.747478484e-01,  1.748365094e-01,\n   1.749260359e-01,  1.750164471e-01,  1.751077631e-01,  1.752000046e-01,\n   1.752931928e-01,  1.753873499e-01,  1.754824989e-01,  1.755786636e-01,\n   1.756758686e-01,  1.757741395e-01,  1.758735029e-01,  1.759739863e-01,\n   1.760756185e-01,  1.761784293e-01,  1.762824496e-01,  1.763877118e-01,\n   1.764942494e-01,  1.766020974e-01,  1.767112923e-01,  1.768218722e-01,\n   1.769338769e-01,  1.770473478e-01,  1.771623284e-01,  1.772788639e-01,\n   1.773970020e-01,  1.775167923e-01,  1.776382869e-01,  1.777615407e-01,\n   1.778866109e-01,  1.780135579e-01,  1.781424451e-01,  1.782733394e-01,\n   1.784063110e-01,  1.785414342e-01,  1.786787872e-01,  1.788184528e-01,\n   1.789605185e-01,  1.791050769e-01,  1.792522264e-01,  1.794020711e-01,\n   1.795547219e-01,  1.797102967e-01,  1.798689213e-01,  1.800307296e-01,\n   1.801958650e-01,  1.803644808e-01,  1.805367416e-01,  1.807128238e-01,\n   1.808929175e-01,  1.810772274e-01,  1.812659748e-01,  1.814593989e-01,\n   1.816577594e-01,  1.818613385e-01,  1.820704438e-01,  1.822854116e-01,\n   1.825066102e-01,  1.827344445e-01,  1.829693608e-01,  1.832118530e-01,\n   1.834624695e-01,  1.837218213e-01,  1.839905927e-01,  1.842695530e-01,\n   1.845595714e-01,  1.848616356e-01,  1.851768742e-01,  1.855065851e-01,\n   1.858522715e-01,  1.862156885e-01,  1.865989021e-01,  1.870043692e-01,\n   1.874350429e-01,  1.878945173e-01,  1.883872296e-01,  1.889187485e-01,\n   1.894961988e-01,  1.901289070e-01,  1.908294234e-01,  1.916152190e-01,\n   1.925116803e-01,  1.935578145e-01,  1.948182966e-01,  1.964128743e-01,\n   1.986061731e-01,  2.022235068e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_1[] = {\n   0.000000000e+00,  1.149786663e-01,  1.284674249e-01,  1.374687029e-01,\n   1.444580818e-01,  1.502765114e-01,  1.553196690e-01,  1.598078010e-01,\n   1.638770833e-01,  1.676180425e-01,  1.710941509e-01,  1.743517684e-01,\n   1.774258719e-01,  1.803435550e-01,  1.831262690e-01,  1.857913146e-01,\n   1.883528673e-01,  1.908227023e-01,  1.932107187e-01,  1.955253276e-01,\n   1.977737430e-01,  1.999622058e-01,  2.020961558e-01,  2.041803684e-01,\n   2.062190622e-01,  2.082159865e-01,  2.101744909e-01,  2.120975841e-01,\n   2.139879804e-01,  2.158481403e-01,  2.176803032e-01,  2.194865152e-01,\n   2.212686533e-01,  2.230284454e-01,  2.247674877e-01,  2.264872595e-01,\n   2.281891366e-01,  2.298744020e-01,  2.315442563e-01,  2.331998261e-01,\n   2.348421719e-01,  2.364722943e-01,  2.380911407e-01,  2.396996104e-01,\n   2.412985591e-01,  2.428888038e-01,  2.444711263e-01,  2.460462770e-01,\n   2.476149778e-01,  2.491779255e-01,  2.507357941e-01,  2.522892374e-01,\n   2.538388918e-01,  2.553853777e-01,  2.569293019e-01,  2.584712598e-01,\n   2.600118365e-01,  2.615516094e-01,  2.630911489e-01,  2.646310207e-01,\n   2.661717873e-01,  2.677140089e-01,  2.692582456e-01,  2.708050586e-01,\n   2.723550116e-01,  2.739086721e-01,  2.754666135e-01,  2.770294160e-01,\n   2.785976685e-01,  2.801719700e-01,  2.817529315e-01,  2.833411775e-01,\n   2.849373479e-01,  2.865421003e-01,  2.881561111e-01,  2.897800789e-01,\n   2.914147257e-01,  2.930608002e-01,  2.947190800e-01,  2.963903747e-01,\n   2.980755292e-01,  2.997754269e-01,  3.014909935e-01,  3.032232014e-01,\n   3.049730740e-01,  3.067416910e-01,  3.085301934e-01,  3.103397908e-01,\n   3.121717672e-01,  3.140274895e-01,  3.159084159e-01,  3.178161059e-01,\n   3.197522315e-01,  3.217185894e-01,  3.237171159e-01,  3.257499030e-01,\n   3.278192175e-01,  3.299275228e-01,  3.320775038e-01,  3.342720969e-01,\n   3.365145237e-01,  3.388083322e-01,  3.411574440e-01,  3.435662117e-01,\n   3.460394873e-01,  3.485827043e-01,  3.512019780e-01,  3.539042288e-01,\n   3.566973339e-01,  3.595903177e-01,  3.625935917e-01,  3.657192617e-01,\n   3.689815250e-01,  3.723971930e-01,  3.759863895e-01,  3.797735003e-01,\n   3.837884939e-01,  3.880688020e-01,  3.926620738e-01,  3.976303452e-01,\n   4.030566040e-01,  4.090556351e-01,  4.157930345e-01,  4.235211869e-01,\n   4.326546209e-01,  4.439521594e-01,  4.590664150e-01,  4.830426172e-01,\n   1.000000000e+00,  0.000000000e+00,  7.443910396e-02,  8.193164811e-02,\n   8.675320917e-02,  9.039464369e-02,  9.335579335e-02,  9.586964562e-02,\n   9.806491533e-02,  1.000206775e-01,  1.017892043e-01,  1.034069600e-01,\n   1.049004544e-01,  1.062896004e-01,  1.075897593e-01,  1.088130449e-01,\n   1.099691892e-01,  1.110661357e-01,  1.121104578e-01,  1.131076605e-01,\n   1.140624032e-01,  1.149786663e-01,  1.158598791e-01,  1.167090181e-01,\n   1.175286848e-01,  1.183211666e-01,  1.190884864e-01,  1.198324423e-01,\n   1.205546403e-01,  1.212565209e-01,  1.219393818e-01,  1.226043958e-01,\n   1.232526274e-01,  1.238850452e-01,  1.245025336e-01,  1.251059026e-01,\n   1.256958955e-01,  1.262731966e-01,  1.268384373e-01,  1.273922014e-01,\n   1.279350298e-01,  1.284674249e-01,  1.289898540e-01,  1.295027526e-01,\n   1.300065272e-01,  1.305015583e-01,  1.309882017e-01,  1.314667917e-01,\n   1.319376421e-01,  1.324010480e-01,  1.328572874e-01,  1.333066225e-01,\n   1.337493009e-01,  1.341855566e-01,  1.346156111e-01,  1.350396741e-01,\n   1.354579446e-01,  1.358706114e-01,  1.362778541e-01,  1.366798432e-01,\n   1.370767412e-01,  1.374687029e-01,  1.378558758e-01,  1.382384007e-01,\n   1.386164121e-01,  1.389900384e-01,  1.393594027e-01,  1.397246225e-01,\n   1.400858104e-01,  1.404430745e-01,  1.407965182e-01,  1.411462409e-01,\n   1.414923379e-01,  1.418349009e-01,  1.421740179e-01,  1.425097737e-01,\n   1.428422497e-01,  1.431715244e-01,  1.434976734e-01,  1.438207695e-01,\n   1.441408831e-01,  1.444580818e-01,  1.447724310e-01,  1.450839939e-01,\n   1.453928315e-01,  1.456990026e-01,  1.460025644e-01,  1.463035718e-01,\n   1.466020783e-01,  1.468981354e-01,  1.471917930e-01,  1.474830997e-01,\n   1.477721022e-01,  1.480588462e-01,  1.483433755e-01,  1.486257331e-01,\n   1.489059603e-01,  1.491840975e-01,  1.494601838e-01,  1.497342571e-01,\n   1.500063544e-01,  1.502765114e-01,  1.505447631e-01,  1.508111434e-01,\n   1.510756851e-01,  1.513384203e-01,  1.515993804e-01,  1.518585956e-01,\n   1.521160955e-01,  1.523719090e-01,  1.526260641e-01,  1.528785881e-01,\n   1.531295077e-01,  1.533788489e-01,  1.536266370e-01,  1.538728967e-01,\n   1.541176522e-01,  1.543609268e-01,  1.546027437e-01,  1.548431252e-01,\n   1.550820932e-01,  1.553196690e-01,  1.555558735e-01,  1.557907271e-01,\n   1.560242498e-01,  1.562564608e-01,  1.564873795e-01,  1.567170242e-01,\n   1.569454132e-01,  1.571725643e-01,  4.129958695e-01,  4.133375854e-01,\n   4.136814990e-01,  4.140276433e-01,  4.143760520e-01,  4.147267596e-01,\n   4.150798017e-01,  4.154352142e-01,  4.157930345e-01,  4.161533003e-01,\n   4.165160505e-01,  4.168813252e-01,  4.172491650e-01,  4.176196118e-01,\n   4.179927085e-01,  4.183684992e-01,  4.187470289e-01,  4.191283440e-01,\n   4.195124919e-01,  4.198995215e-01,  4.202894827e-01,  4.206824270e-01,\n   4.210784072e-01,  4.214774775e-01,  4.218796936e-01,  4.222851128e-01,\n   4.226937941e-01,  4.231057981e-01,  4.235211869e-01,  4.239400248e-01,\n   4.243623778e-01,  4.247883139e-01,  4.252179030e-01,  4.256512172e-01,\n   4.260883310e-01,  4.265293208e-01,  4.269742657e-01,  4.274232473e-01,\n   4.278763495e-01,  4.283336593e-01,  4.287952663e-01,  4.292612630e-01,\n   4.297317453e-01,  4.302068120e-01,  4.306865654e-01,  4.311711115e-01,\n   4.316605598e-01,  4.321550238e-01,  4.326546209e-01,  4.331594731e-01,\n   4.336697065e-01,  4.341854523e-01,  4.347068462e-01,  4.352340296e-01,\n   4.357671489e-01,  4.363063567e-01,  4.368518113e-01,  4.374036777e-01,\n   4.379621276e-01,  4.385273396e-01,  4.390995002e-01,  4.396788036e-01,\n   4.402654526e-01,  4.408596590e-01,  4.414616439e-01,  4.420716386e-01,\n   4.426898852e-01,  4.433166369e-01,  4.439521594e-01,  4.445967309e-01,\n   4.452506436e-01,  4.459142045e-01,  4.465877360e-01,  4.472715776e-01,\n   4.479660868e-01,  4.486716402e-01,  4.493886353e-01,  4.501174922e-01,\n   4.508586545e-01,  4.516125923e-01,  4.523798035e-01,  4.531608164e-01,\n   4.539561920e-01,  4.547665273e-01,  4.555924581e-01,  4.564346622e-01,\n   4.572938640e-01,  4.581708382e-01,  4.590664150e-01,  4.599814854e-01,\n   4.609170075e-01,  4.618740134e-01,  4.628536171e-01,  4.638570235e-01,\n   4.648855387e-01,  4.659405818e-01,  4.670236985e-01,  4.681365765e-01,\n   4.692810640e-01,  4.704591909e-01,  4.716731934e-01,  4.729255435e-01,\n   4.742189836e-01,  4.755565681e-01,  4.769417126e-01,  4.783782545e-01,\n   4.798705257e-01,  4.814234426e-01,  4.830426172e-01,  4.847344967e-01,\n   4.865065392e-01,  4.883674397e-01,  4.903274228e-01,  4.923986277e-01,\n   4.945956242e-01,  4.969361164e-01,  4.994419216e-01,  5.021403692e-01,\n   5.050663525e-01,  5.082654433e-01,  5.117988091e-01,  5.157513583e-01,\n   5.202460657e-01,  5.254711723e-01,  5.317373780e-01,  5.396167222e-01,\n   5.503639038e-01,  5.678471904e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_2[] = {\n   0.000000000e+00,  4.772006582e-02,  6.296615905e-02,  7.427407753e-02,\n   8.365153308e-02,  9.184022598e-02,  9.920878639e-02,  1.059710445e-01,\n   1.122636706e-01,  1.181800824e-01,  1.237873671e-01,  1.291355676e-01,\n   1.342631566e-01,  1.392004468e-01,  1.439718144e-01,  1.485972037e-01,\n   1.530931756e-01,  1.574736603e-01,  1.617505076e-01,  1.659338993e-01,\n   1.700326625e-01,  1.740545113e-01,  1.780062374e-01,  1.818938596e-01,\n   1.857227450e-01,  1.894977068e-01,  1.932230840e-01,  1.969028077e-01,\n   2.005404557e-01,  2.041392989e-01,  2.077023394e-01,  2.112323442e-01,\n   2.147318727e-01,  2.182033009e-01,  2.216488427e-01,  2.250705673e-01,\n   2.284704155e-01,  2.318502134e-01,  2.352116842e-01,  2.385564595e-01,\n   2.418860883e-01,  2.452020459e-01,  2.485057413e-01,  2.517985242e-01,\n   2.550816910e-01,  2.583564905e-01,  2.616241292e-01,  2.648857755e-01,\n   2.681425644e-01,  2.713956014e-01,  2.746459660e-01,  2.778947155e-01,\n   2.811428878e-01,  2.843915047e-01,  2.876415747e-01,  2.908940958e-01,\n   2.941500581e-01,  2.974104465e-01,  3.006762431e-01,  3.039484293e-01,\n   3.072279889e-01,  3.105159099e-01,  3.138131873e-01,  3.171208251e-01,\n   3.204398389e-01,  3.237712585e-01,  3.271161303e-01,  3.304755200e-01,\n   3.338505150e-01,  3.372422278e-01,  3.406517982e-01,  3.440803970e-01,\n   3.475292292e-01,  3.509995371e-01,  3.544926045e-01,  3.580097602e-01,\n   3.615523827e-01,  3.651219045e-01,  3.687198171e-01,  3.723476766e-01,\n   3.760071092e-01,  3.796998181e-01,  3.834275898e-01,  3.871923026e-01,\n   3.909959344e-01,  3.948405726e-01,  3.987284239e-01,  4.026618262e-01,\n   4.066432616e-01,  4.106753701e-01,  4.147609664e-01,  4.189030573e-01,\n   4.231048628e-01,  4.273698387e-01,  4.317017032e-01,  4.361044665e-01,\n   4.405824657e-01,  4.451404038e-01,  4.497833955e-01,  4.545170203e-01,\n   4.593473841e-01,  4.642811920e-01,  4.693258332e-01,  4.744894827e-01,\n   4.797812222e-01,  4.852111858e-01,  4.907907357e-01,  4.965326778e-01,\n   5.024515263e-01,  5.085638336e-01,  5.148886044e-01,  5.214478227e-01,\n   5.282671298e-01,  5.353767113e-01,  5.428124739e-01,  5.506176367e-01,\n   5.588449272e-01,  5.675596847e-01,  5.768443667e-01,  5.868053100e-01,\n   5.975832673e-01,  6.093706188e-01,  6.224411640e-01,  6.372056689e-01,\n   6.543262046e-01,  6.749867043e-01,  7.016867178e-01,  7.417019543e-01,\n   1.000000000e+00,  0.000000000e+00,  1.499541236e-02,  1.952937653e-02,\n   2.281015992e-02,  2.547740008e-02,  2.776662006e-02,  2.979460053e-02,\n   3.162895214e-02,  3.331281609e-02,  3.487563487e-02,  3.633852094e-02,\n   3.771719963e-02,  3.902374190e-02,  4.026764332e-02,  4.145652677e-02,\n   4.259661749e-02,  4.369307429e-02,  4.475022666e-02,  4.577174851e-02,\n   4.676078792e-02,  4.772006582e-02,  4.865195222e-02,  4.955852581e-02,\n   5.044162130e-02,  5.130286730e-02,  5.214371703e-02,  5.296547339e-02,\n   5.376930967e-02,  5.455628670e-02,  5.532736725e-02,  5.608342813e-02,\n   5.682527046e-02,  5.755362840e-02,  5.826917666e-02,  5.897253699e-02,\n   5.966428369e-02,  6.034494854e-02,  6.101502500e-02,  6.167497195e-02,\n   6.232521694e-02,  6.296615905e-02,  6.359817150e-02,  6.422160388e-02,\n   6.483678414e-02,  6.544402048e-02,  6.604360288e-02,  6.663580458e-02,\n   6.722088343e-02,  6.779908299e-02,  6.837063367e-02,  6.893575365e-02,\n   6.949464977e-02,  7.004751833e-02,  7.059454584e-02,  7.113590964e-02,\n   7.167177856e-02,  7.220231343e-02,  7.272766762e-02,  7.324798752e-02,\n   7.376341294e-02,  7.427407753e-02,  7.478010916e-02,  7.528163025e-02,\n   7.577875806e-02,  7.627160506e-02,  7.676027909e-02,  7.724488373e-02,\n   7.772551843e-02,  7.820227881e-02,  7.867525684e-02,  7.914454098e-02,\n   7.961021646e-02,  8.007236533e-02,  8.053106672e-02,  8.098639692e-02,\n   8.143842953e-02,  8.188723562e-02,  8.233288381e-02,  8.277544041e-02,\n   8.321496951e-02,  8.365153308e-02,  8.408519111e-02,  8.451600162e-02,\n   8.494402082e-02,  8.536930314e-02,  8.579190134e-02,  8.621186654e-02,\n   8.662924833e-02,  8.704409482e-02,  8.745645268e-02,  8.786636724e-02,\n   8.827388250e-02,  8.867904120e-02,  8.908188489e-02,  8.948245393e-02,\n   8.988078759e-02,  9.027692404e-02,  9.067090043e-02,  9.106275291e-02,\n   9.145251667e-02,  9.184022598e-02,  9.222591419e-02,  9.260961384e-02,\n   9.299135659e-02,  9.337117332e-02,  9.374909416e-02,  9.412514845e-02,\n   9.449936484e-02,  9.487177128e-02,  9.524239502e-02,  9.561126270e-02,\n   9.597840030e-02,  9.634383320e-02,  9.670758619e-02,  9.706968348e-02,\n   9.743014875e-02,  9.778900512e-02,  9.814627521e-02,  9.850198111e-02,\n   9.885614446e-02,  9.920878639e-02,  9.955992759e-02,  9.990958831e-02,\n   1.002577884e-01,  1.006045471e-01,  1.009498836e-01,  1.012938164e-01,\n   1.016363636e-01,  1.019775432e-01,  6.170366727e-01,  6.176986034e-01,\n   6.183643182e-01,  6.190338707e-01,  6.197073159e-01,  6.203847098e-01,\n   6.210661097e-01,  6.217515745e-01,  6.224411640e-01,  6.231349398e-01,\n   6.238329646e-01,  6.245353029e-01,  6.252420205e-01,  6.259531849e-01,\n   6.266688652e-01,  6.273891322e-01,  6.281140585e-01,  6.288437184e-01,\n   6.295781881e-01,  6.303175458e-01,  6.310618716e-01,  6.318112478e-01,\n   6.325657587e-01,  6.333254909e-01,  6.340905334e-01,  6.348609774e-01,\n   6.356369166e-01,  6.364184475e-01,  6.372056689e-01,  6.379986826e-01,\n   6.387975932e-01,  6.396025084e-01,  6.404135388e-01,  6.412307983e-01,\n   6.420544043e-01,  6.428844774e-01,  6.437211420e-01,  6.445645263e-01,\n   6.454147624e-01,  6.462719864e-01,  6.471363389e-01,  6.480079647e-01,\n   6.488870134e-01,  6.497736395e-01,  6.506680025e-01,  6.515702672e-01,\n   6.524806039e-01,  6.533991890e-01,  6.543262046e-01,  6.552618393e-01,\n   6.562062886e-01,  6.571597547e-01,  6.581224473e-01,  6.590945838e-01,\n   6.600763897e-01,  6.610680990e-01,  6.620699547e-01,  6.630822093e-01,\n   6.641051252e-01,  6.651389751e-01,  6.661840432e-01,  6.672406251e-01,\n   6.683090287e-01,  6.693895751e-01,  6.704825993e-01,  6.715884509e-01,\n   6.727074949e-01,  6.738401130e-01,  6.749867043e-01,  6.761476867e-01,\n   6.773234978e-01,  6.785145965e-01,  6.797214640e-01,  6.809446060e-01,\n   6.821845537e-01,  6.834418659e-01,  6.847171313e-01,  6.860109699e-01,\n   6.873240363e-01,  6.886570216e-01,  6.900106564e-01,  6.913857144e-01,\n   6.927830153e-01,  6.942034290e-01,  6.956478797e-01,  6.971173506e-01,\n   6.986128893e-01,  7.001356135e-01,  7.016867178e-01,  7.032674807e-01,\n   7.048792730e-01,  7.065235673e-01,  7.082019481e-01,  7.099161243e-01,\n   7.116679421e-01,  7.134594013e-01,  7.152926725e-01,  7.171701179e-01,\n   7.190943149e-01,  7.210680840e-01,  7.230945206e-01,  7.251770328e-01,\n   7.273193864e-01,  7.295257577e-01,  7.318007963e-01,  7.341497020e-01,\n   7.365783167e-01,  7.390932372e-01,  7.417019543e-01,  7.444130262e-01,\n   7.472362960e-01,  7.501831692e-01,  7.532669707e-01,  7.565034130e-01,\n   7.599112167e-01,  7.635129523e-01,  7.673362015e-01,  7.714152009e-01,\n   7.757932332e-01,  7.805262173e-01,  7.856883133e-01,  7.913810931e-01,\n   7.977494403e-01,  8.050112561e-01,  8.135187408e-01,  8.239037798e-01,\n   8.375058344e-01,  8.582456226e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_3[] = {\n   0.000000000e+00,  2.816362283e-02,  4.073114933e-02,  5.066862151e-02,\n   5.924514514e-02,  6.695453594e-02,  7.405075716e-02,  8.068497887e-02,\n   8.695585717e-02,  9.293201726e-02,  9.866349293e-02,  1.041881077e-01,\n   1.095352894e-01,  1.147284777e-01,  1.197867108e-01,  1.247257102e-01,\n   1.295586440e-01,  1.342966793e-01,  1.389493894e-01,  1.435250613e-01,\n   1.480309305e-01,  1.524733645e-01,  1.568580063e-01,  1.611898902e-01,\n   1.654735339e-01,  1.697130145e-01,  1.739120306e-01,  1.780739538e-01,\n   1.822018718e-01,  1.862986244e-01,  1.903668348e-01,  1.944089349e-01,\n   1.984271885e-01,  2.024237105e-01,  2.064004834e-01,  2.103593722e-01,\n   2.143021371e-01,  2.182304449e-01,  2.221458788e-01,  2.260499475e-01,\n   2.299440928e-01,  2.338296971e-01,  2.377080891e-01,  2.415805505e-01,\n   2.454483204e-01,  2.493126005e-01,  2.531745593e-01,  2.570353363e-01,\n   2.608960459e-01,  2.647577802e-01,  2.686216132e-01,  2.724886030e-01,\n   2.763597954e-01,  2.802362262e-01,  2.841189242e-01,  2.880089133e-01,\n   2.919072155e-01,  2.958148532e-01,  2.997328513e-01,  3.036622398e-01,\n   3.076040561e-01,  3.115593475e-01,  3.155291733e-01,  3.195146076e-01,\n   3.235167413e-01,  3.275366851e-01,  3.315755718e-01,  3.356345592e-01,\n   3.397148327e-01,  3.438176086e-01,  3.479441371e-01,  3.520957054e-01,\n   3.562736416e-01,  3.604793180e-01,  3.647141556e-01,  3.689796277e-01,\n   3.732772653e-01,  3.776086615e-01,  3.819754772e-01,  3.863794467e-01,\n   3.908223843e-01,  3.953061912e-01,  3.998328630e-01,  4.044044982e-01,\n   4.090233075e-01,  4.136916236e-01,  4.184119129e-01,  4.231867877e-01,\n   4.280190203e-01,  4.329115582e-01,  4.378675421e-01,  4.428903247e-01,\n   4.479834934e-01,  4.531508949e-01,  4.583966634e-01,  4.637252530e-01,\n   4.691414745e-01,  4.746505375e-01,  4.802580996e-01,  4.859703224e-01,\n   4.917939378e-01,  4.977363245e-01,  5.038055991e-01,  5.100107227e-01,\n   5.163616292e-01,  5.228693780e-01,  5.295463393e-01,  5.364064191e-01,\n   5.434653363e-01,  5.507409658e-01,  5.582537683e-01,  5.660273358e-01,\n   5.740890907e-01,  5.824711971e-01,  5.912117649e-01,  6.003564717e-01,\n   6.099607911e-01,  6.200931256e-01,  6.308393340e-01,  6.423094832e-01,\n   6.546483062e-01,  6.680521651e-01,  6.827981811e-01,  6.992980564e-01,\n   7.182076801e-01,  7.406831072e-01,  7.691188047e-01,  8.102844589e-01,\n   1.000000000e+00,  0.000000000e+00,  5.892691047e-03,  8.442042046e-03,\n   1.042264322e-02,  1.210689516e-02,  1.360095758e-02,  1.495949798e-02,\n   1.621509210e-02,  1.738901806e-02,  1.849608684e-02,  1.954710177e-02,\n   2.055023152e-02,  2.151183130e-02,  2.243696153e-02,  2.332972995e-02,\n   2.419352551e-02,  2.503118323e-02,  2.584510333e-02,  2.663733938e-02,\n   2.740966461e-02,  2.816362283e-02,  2.890056795e-02,  2.962169525e-02,\n   3.032806620e-02,  3.102062864e-02,  3.170023306e-02,  3.236764610e-02,\n   3.302356168e-02,  3.366861035e-02,  3.430336707e-02,  3.492835788e-02,\n   3.554406552e-02,  3.615093428e-02,  3.674937415e-02,  3.733976444e-02,\n   3.792245688e-02,  3.849777836e-02,  3.906603332e-02,  3.962750587e-02,\n   4.018246162e-02,  4.073114933e-02,  4.127380238e-02,  4.181064007e-02,\n   4.234186876e-02,  4.286768296e-02,  4.338826621e-02,  4.390379197e-02,\n   4.441442436e-02,  4.492031886e-02,  4.542162290e-02,  4.591847648e-02,\n   4.641101266e-02,  4.689935805e-02,  4.738363319e-02,  4.786395302e-02,\n   4.834042719e-02,  4.881316040e-02,  4.928225274e-02,  4.974779992e-02,\n   5.020989359e-02,  5.066862151e-02,  5.112406783e-02,  5.157631331e-02,\n   5.202543542e-02,  5.247150863e-02,  5.291460450e-02,  5.335479187e-02,\n   5.379213698e-02,  5.422670362e-02,  5.465855327e-02,  5.508774518e-02,\n   5.551433650e-02,  5.593838240e-02,  5.635993612e-02,  5.677904912e-02,\n   5.719577111e-02,  5.761015018e-02,  5.802223282e-02,  5.843206404e-02,\n   5.883968741e-02,  5.924514514e-02,  5.964847812e-02,  6.004972599e-02,\n   6.044892719e-02,  6.084611901e-02,  6.124133764e-02,  6.163461821e-02,\n   6.202599483e-02,  6.241550065e-02,  6.280316787e-02,  6.318902780e-02,\n   6.357311088e-02,  6.395544673e-02,  6.433606416e-02,  6.471499121e-02,\n   6.509225518e-02,  6.546788267e-02,  6.584189957e-02,  6.621433112e-02,\n   6.658520192e-02,  6.695453594e-02,  6.732235658e-02,  6.768868663e-02,\n   6.805354835e-02,  6.841696347e-02,  6.877895316e-02,  6.913953814e-02,\n   6.949873861e-02,  6.985657430e-02,  7.021306452e-02,  7.056822810e-02,\n   7.092208347e-02,  7.127464863e-02,  7.162594120e-02,  7.197597839e-02,\n   7.232477705e-02,  7.267235366e-02,  7.301872436e-02,  7.336390493e-02,\n   7.370791082e-02,  7.405075716e-02,  7.439245877e-02,  7.473303017e-02,\n   7.507248556e-02,  7.541083889e-02,  7.574810380e-02,  7.608429367e-02,\n   7.641942162e-02,  7.675350051e-02,  6.767162794e-01,  6.774623576e-01,\n   6.782123708e-01,  6.789663729e-01,  6.797244187e-01,  6.804865644e-01,\n   6.812528674e-01,  6.820233863e-01,  6.827981811e-01,  6.835773132e-01,\n   6.843608452e-01,  6.851488414e-01,  6.859413675e-01,  6.867384906e-01,\n   6.875402796e-01,  6.883468050e-01,  6.891581389e-01,  6.899743551e-01,\n   6.907955295e-01,  6.916217396e-01,  6.924530650e-01,  6.932895872e-01,\n   6.941313897e-01,  6.949785585e-01,  6.958311813e-01,  6.966893486e-01,\n   6.975531530e-01,  6.984226897e-01,  6.992980564e-01,  7.001793534e-01,\n   7.010666838e-01,  7.019601538e-01,  7.028598723e-01,  7.037659513e-01,\n   7.046785062e-01,  7.055976556e-01,  7.065235216e-01,  7.074562299e-01,\n   7.083959099e-01,  7.093426953e-01,  7.102967233e-01,  7.112581358e-01,\n   7.122270790e-01,  7.132037037e-01,  7.141881656e-01,  7.151806254e-01,\n   7.161812491e-01,  7.171902082e-01,  7.182076801e-01,  7.192338481e-01,\n   7.202689018e-01,  7.213130375e-01,  7.223664586e-01,  7.234293756e-01,\n   7.245020067e-01,  7.255845781e-01,  7.266773246e-01,  7.277804898e-01,\n   7.288943267e-01,  7.300190982e-01,  7.311550775e-01,  7.323025487e-01,\n   7.334618078e-01,  7.346331628e-01,  7.358169346e-01,  7.370134580e-01,\n   7.382230821e-01,  7.394461715e-01,  7.406831072e-01,  7.419342874e-01,\n   7.432001288e-01,  7.444810678e-01,  7.457775616e-01,  7.470900899e-01,\n   7.484191561e-01,  7.497652892e-01,  7.511290454e-01,  7.525110102e-01,\n   7.539118007e-01,  7.553320674e-01,  7.567724975e-01,  7.582338171e-01,\n   7.597167949e-01,  7.612222451e-01,  7.627510317e-01,  7.643040723e-01,\n   7.658823432e-01,  7.674868841e-01,  7.691188047e-01,  7.707792903e-01,\n   7.724696099e-01,  7.741911241e-01,  7.759452944e-01,  7.777336939e-01,\n   7.795580188e-01,  7.814201029e-01,  7.833219325e-01,  7.852656646e-01,\n   7.872536476e-01,  7.892884457e-01,  7.913728661e-01,  7.935099927e-01,\n   7.957032240e-01,  7.979563194e-01,  8.002734531e-01,  8.026592799e-01,\n   8.051190140e-01,  8.076585257e-01,  8.102844589e-01,  8.130043790e-01,\n   8.158269562e-01,  8.187621991e-01,  8.218217550e-01,  8.250192998e-01,\n   8.283710555e-01,  8.318964859e-01,  8.356192544e-01,  8.395685713e-01,\n   8.437811417e-01,  8.483040732e-01,  8.531993845e-01,  8.585513239e-01,\n   8.644789519e-01,  8.711594158e-01,  8.788754109e-01,  8.881261959e-01,\n   8.999483706e-01,  9.172824028e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_4[] = {\n   0.000000000e+00,  1.304208331e-02,  2.155380799e-02,  2.896488608e-02,\n   3.575988175e-02,  4.214276896e-02,  4.822411052e-02,  5.407241163e-02,\n   5.973386382e-02,  6.524149950e-02,  7.061999023e-02,  7.588839187e-02,\n   8.106182201e-02,  8.615253946e-02,  9.117066841e-02,  9.612470122e-02,\n   1.010218577e-01,  1.058683484e-01,  1.106695710e-01,  1.154302611e-01,\n   1.201546074e-01,  1.248463440e-01,  1.295088222e-01,  1.341450696e-01,\n   1.387578376e-01,  1.433496404e-01,  1.479227875e-01,  1.524794111e-01,\n   1.570214887e-01,  1.615508624e-01,  1.660692558e-01,  1.705782880e-01,\n   1.750794860e-01,  1.795742953e-01,  1.840640892e-01,  1.885501775e-01,\n   1.930338132e-01,  1.975161990e-01,  2.019984935e-01,  2.064818161e-01,\n   2.109672515e-01,  2.154558543e-01,  2.199486526e-01,  2.244466514e-01,\n   2.289508364e-01,  2.334621764e-01,  2.379816266e-01,  2.425101306e-01,\n   2.470486238e-01,  2.515980349e-01,  2.561592886e-01,  2.607333076e-01,\n   2.653210148e-01,  2.699233352e-01,  2.745411980e-01,  2.791755386e-01,\n   2.838273004e-01,  2.884974366e-01,  2.931869128e-01,  2.978967082e-01,\n   3.026278181e-01,  3.073812557e-01,  3.121580544e-01,  3.169592699e-01,\n   3.217859822e-01,  3.266392985e-01,  3.315203551e-01,  3.364303204e-01,\n   3.413703972e-01,  3.463418260e-01,  3.513458877e-01,  3.563839073e-01,\n   3.614572568e-01,  3.665673593e-01,  3.717156929e-01,  3.769037950e-01,\n   3.821332669e-01,  3.874057788e-01,  3.927230754e-01,  3.980869817e-01,\n   4.034994092e-01,  4.089623637e-01,  4.144779520e-01,  4.200483913e-01,\n   4.256760179e-01,  4.313632977e-01,  4.371128377e-01,  4.429273984e-01,\n   4.488099080e-01,  4.547634777e-01,  4.607914199e-01,  4.668972667e-01,\n   4.730847930e-01,  4.793580409e-01,  4.857213476e-01,  4.921793781e-01,\n   4.987371609e-01,  5.054001306e-01,  5.121741754e-01,  5.190656928e-01,\n   5.260816543e-01,  5.332296801e-01,  5.405181277e-01,  5.479561958e-01,\n   5.555540473e-01,  5.633229575e-01,  5.712754907e-01,  5.794257161e-01,\n   5.877894704e-01,  5.963846830e-01,  6.052317810e-01,  6.143542001e-01,\n   6.237790370e-01,  6.335378936e-01,  6.436679874e-01,  6.542136360e-01,\n   6.652282839e-01,  6.767773310e-01,  6.889421867e-01,  7.018262641e-01,\n   7.155641757e-01,  7.303364892e-01,  7.463947649e-01,  7.641071782e-01,\n   7.840499281e-01,  8.072165153e-01,  8.356059142e-01,  8.746271312e-01,\n   1.000000000e+00,  0.000000000e+00,  1.512966588e-03,  2.487670283e-03,\n   3.328144398e-03,  4.092040395e-03,  4.803753636e-03,  5.476563085e-03,\n   6.118725039e-03,  6.735822405e-03,  7.331856681e-03,  7.909821634e-03,\n   8.472032216e-03,  9.020325964e-03,  9.556192872e-03,  1.008086266e-02,\n   1.059536550e-02,  1.110057546e-02,  1.159724237e-02,  1.208601572e-02,\n   1.256746291e-02,  1.304208331e-02,  1.351031945e-02,  1.397256584e-02,\n   1.442917612e-02,  1.488046889e-02,  1.532673246e-02,  1.576822884e-02,\n   1.620519705e-02,  1.663785591e-02,  1.706640639e-02,  1.749103364e-02,\n   1.791190872e-02,  1.832919008e-02,  1.874302485e-02,  1.915354999e-02,\n   1.956089323e-02,  1.996517397e-02,  2.036650401e-02,  2.076498827e-02,\n   2.116072533e-02,  2.155380799e-02,  2.194432375e-02,  2.233235522e-02,\n   2.271798050e-02,  2.310127354e-02,  2.348230445e-02,  2.386113977e-02,\n   2.423784271e-02,  2.461247341e-02,  2.498508915e-02,  2.535574452e-02,\n   2.572449160e-02,  2.609138016e-02,  2.645645775e-02,  2.681976986e-02,\n   2.718136007e-02,  2.754127013e-02,  2.789954008e-02,  2.825620835e-02,\n   2.861131186e-02,  2.896488608e-02,  2.931696514e-02,  2.966758188e-02,\n   3.001676790e-02,  3.036455369e-02,  3.071096863e-02,  3.105604105e-02,\n   3.139979831e-02,  3.174226682e-02,  3.208347212e-02,  3.242343888e-02,\n   3.276219097e-02,  3.309975148e-02,  3.343614278e-02,  3.377138652e-02,\n   3.410550367e-02,  3.443851459e-02,  3.477043900e-02,  3.510129604e-02,\n   3.543110428e-02,  3.575988175e-02,  3.608764598e-02,  3.641441397e-02,\n   3.674020228e-02,  3.706502699e-02,  3.738890373e-02,  3.771184774e-02,\n   3.803387383e-02,  3.835499641e-02,  3.867522955e-02,  3.899458691e-02,\n   3.931308183e-02,  3.963072732e-02,  3.994753604e-02,  4.026352035e-02,\n   4.057869231e-02,  4.089306369e-02,  4.120664596e-02,  4.151945034e-02,\n   4.183148778e-02,  4.214276896e-02,  4.245330435e-02,  4.276310414e-02,\n   4.307217832e-02,  4.338053664e-02,  4.368818865e-02,  4.399514368e-02,\n   4.430141085e-02,  4.460699910e-02,  4.491191717e-02,  4.521617363e-02,\n   4.551977684e-02,  4.582273502e-02,  4.612505621e-02,  4.642674827e-02,\n   4.672781892e-02,  4.702827573e-02,  4.732812609e-02,  4.762737729e-02,\n   4.792603644e-02,  4.822411052e-02,  4.852160639e-02,  4.881853077e-02,\n   4.911489026e-02,  4.941069131e-02,  4.970594030e-02,  5.000064344e-02,\n   5.029480687e-02,  5.058843658e-02,  7.397969437e-01,  7.406082489e-01,\n   7.414232903e-01,  7.422421162e-01,  7.430647755e-01,  7.438913184e-01,\n   7.447217958e-01,  7.455562602e-01,  7.463947649e-01,  7.472373644e-01,\n   7.480841145e-01,  7.489350721e-01,  7.497902955e-01,  7.506498443e-01,\n   7.515137793e-01,  7.523821629e-01,  7.532550589e-01,  7.541325325e-01,\n   7.550146505e-01,  7.559014813e-01,  7.567930950e-01,  7.576895632e-01,\n   7.585909595e-01,  7.594973591e-01,  7.604088392e-01,  7.613254790e-01,\n   7.622473596e-01,  7.631745642e-01,  7.641071782e-01,  7.650452892e-01,\n   7.659889871e-01,  7.669383643e-01,  7.678935156e-01,  7.688545384e-01,\n   7.698215329e-01,  7.707946019e-01,  7.717738512e-01,  7.727593897e-01,\n   7.737513293e-01,  7.747497851e-01,  7.757548759e-01,  7.767667237e-01,\n   7.777854544e-01,  7.788111975e-01,  7.798440868e-01,  7.808842600e-01,\n   7.819318594e-01,  7.829870316e-01,  7.840499281e-01,  7.851207054e-01,\n   7.861995250e-01,  7.872865540e-01,  7.883819652e-01,  7.894859373e-01,\n   7.905986553e-01,  7.917203106e-01,  7.928511016e-01,  7.939912341e-01,\n   7.951409211e-01,  7.963003840e-01,  7.974698524e-01,  7.986495647e-01,\n   7.998397689e-01,  8.010407225e-01,  8.022526938e-01,  8.034759617e-01,\n   8.047108171e-01,  8.059575629e-01,  8.072165153e-01,  8.084880042e-01,\n   8.097723742e-01,  8.110699854e-01,  8.123812148e-01,  8.137064568e-01,\n   8.150461247e-01,  8.164006519e-01,  8.177704936e-01,  8.191561274e-01,\n   8.205580562e-01,  8.219768087e-01,  8.234129425e-01,  8.248670454e-01,\n   8.263397384e-01,  8.278316776e-01,  8.293435579e-01,  8.308761154e-01,\n   8.324301316e-01,  8.340064367e-01,  8.356059142e-01,  8.372295061e-01,\n   8.388782178e-01,  8.405531242e-01,  8.422553773e-01,  8.439862129e-01,\n   8.457469602e-01,  8.475390516e-01,  8.493640337e-01,  8.512235810e-01,\n   8.531195104e-01,  8.550537988e-01,  8.570286033e-01,  8.590462846e-01,\n   8.611094345e-01,  8.632209089e-01,  8.653838656e-01,  8.676018115e-01,\n   8.698786572e-01,  8.722187850e-01,  8.746271312e-01,  8.771092876e-01,\n   8.796716289e-01,  8.823214723e-01,  8.850672824e-01,  8.879189356e-01,\n   8.908880683e-01,  8.939885425e-01,  8.972370812e-01,  9.006541560e-01,\n   9.042652589e-01,  9.081027837e-01,  9.122089120e-01,  9.166402468e-01,\n   9.214756757e-01,  9.268307039e-01,  9.328861828e-01,  9.399541098e-01,\n   9.486626553e-01,  9.607131225e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_5[] = {\n   0.000000000e+00,  4.203160627e-03,  8.440297374e-03,  1.269985348e-02,\n   1.697952692e-02,  2.127832878e-02,  2.559575951e-02,  2.993155884e-02,\n   3.428560274e-02,  3.865785302e-02,  4.304832972e-02,  4.745709482e-02,\n   5.188424191e-02,  5.632988943e-02,  6.079417606e-02,  6.527725748e-02,\n   6.977930401e-02,  7.430049894e-02,  7.884103729e-02,  8.340112485e-02,\n   8.798097750e-02,  9.258082071e-02,  9.720088917e-02,  1.018414265e-01,\n   1.065026852e-01,  1.111849263e-01,  1.158884195e-01,  1.206134434e-01,\n   1.253602849e-01,  1.301292401e-01,  1.349206137e-01,  1.397347197e-01,\n   1.445718811e-01,  1.494324308e-01,  1.543167110e-01,  1.592250739e-01,\n   1.641578823e-01,  1.691155091e-01,  1.740983383e-01,  1.791067652e-01,\n   1.841411966e-01,  1.892020513e-01,  1.942897607e-01,  1.994047690e-01,\n   2.045475337e-01,  2.097185264e-01,  2.149182330e-01,  2.201471546e-01,\n   2.254058076e-01,  2.306947252e-01,  2.360144571e-01,  2.413655711e-01,\n   2.467486532e-01,  2.521643088e-01,  2.576131637e-01,  2.630958644e-01,\n   2.686130798e-01,  2.741655019e-01,  2.797538469e-01,  2.853788565e-01,\n   2.910412990e-01,  2.967419710e-01,  3.024816982e-01,  3.082613378e-01,\n   3.140817794e-01,  3.199439470e-01,  3.258488011e-01,  3.317973404e-01,\n   3.377906043e-01,  3.438296749e-01,  3.499156797e-01,  3.560497942e-01,\n   3.622332451e-01,  3.684673131e-01,  3.747533362e-01,  3.810927142e-01,\n   3.874869115e-01,  3.939374626e-01,  4.004459760e-01,  4.070141398e-01,\n   4.136437271e-01,  4.203366023e-01,  4.270947278e-01,  4.339201712e-01,\n   4.408151137e-01,  4.477818590e-01,  4.548228429e-01,  4.619406446e-01,\n   4.691379987e-01,  4.764178087e-01,  4.837831619e-01,  4.912373465e-01,\n   4.987838702e-01,  5.064264815e-01,  5.141691939e-01,  5.220163124e-01,\n   5.299724647e-01,  5.380426363e-01,  5.462322105e-01,  5.545470145e-01,\n   5.629933729e-01,  5.715781698e-01,  5.803089204e-01,  5.891938562e-01,\n   5.982420248e-01,  6.074634084e-01,  6.168690662e-01,  6.264713045e-01,\n   6.362838856e-01,  6.463222811e-01,  6.566039879e-01,  6.671489221e-01,\n   6.779799179e-01,  6.891233682e-01,  7.006100586e-01,  7.124762717e-01,\n   7.247652786e-01,  7.375293966e-01,  7.508329017e-01,  7.647562778e-01,\n   7.794026379e-01,  7.949078601e-01,  8.114574692e-01,  8.293167523e-01,\n   8.488896155e-01,  8.708493268e-01,  8.964919166e-01,  9.291001401e-01,\n   1.000000000e+00,  0.000000000e+00,  2.077662927e-04,  4.165101518e-04,\n   6.256472745e-04,  8.350530399e-04,  1.044668217e-03,  1.254457910e-03,\n   1.464399060e-03,  1.674475281e-03,  1.884674324e-03,  2.094986687e-03,\n   2.305404783e-03,  2.515922413e-03,  2.726534422e-03,  2.937236452e-03,\n   3.148024773e-03,  3.358896158e-03,  3.569847785e-03,  3.780877171e-03,\n   3.991982108e-03,  4.203160627e-03,  4.414410956e-03,  4.625731497e-03,\n   4.837120796e-03,  5.048577531e-03,  5.260100492e-03,  5.471688565e-03,\n   5.683340728e-03,  5.895056032e-03,  6.106833602e-03,  6.318672621e-03,\n   6.530572332e-03,  6.742532026e-03,  6.954551041e-03,  7.166628755e-03,\n   7.378764586e-03,  7.590957986e-03,  7.803208438e-03,  8.015515456e-03,\n   8.227878580e-03,  8.440297374e-03,  8.652771426e-03,  8.865300345e-03,\n   9.077883761e-03,  9.290521320e-03,  9.503212687e-03,  9.715957543e-03,\n   9.928755583e-03,  1.014160652e-02,  1.035451007e-02,  1.056746597e-02,\n   1.078047397e-02,  1.099353382e-02,  1.120664530e-02,  1.141980818e-02,\n   1.163302224e-02,  1.184628729e-02,  1.205960312e-02,  1.227296955e-02,\n   1.248638640e-02,  1.269985348e-02,  1.291337064e-02,  1.312693772e-02,\n   1.334055455e-02,  1.355422098e-02,  1.376793688e-02,  1.398170210e-02,\n   1.419551651e-02,  1.440937999e-02,  1.462329239e-02,  1.483725362e-02,\n   1.505126354e-02,  1.526532204e-02,  1.547942903e-02,  1.569358439e-02,\n   1.590778801e-02,  1.612203982e-02,  1.633633970e-02,  1.655068757e-02,\n   1.676508334e-02,  1.697952692e-02,  1.719401823e-02,  1.740855719e-02,\n   1.762314372e-02,  1.783777775e-02,  1.805245920e-02,  1.826718801e-02,\n   1.848196410e-02,  1.869678741e-02,  1.891165788e-02,  1.912657543e-02,\n   1.934154003e-02,  1.955655159e-02,  1.977161007e-02,  1.998671542e-02,\n   2.020186758e-02,  2.041706649e-02,  2.063231212e-02,  2.084760440e-02,\n   2.106294330e-02,  2.127832878e-02,  2.149376077e-02,  2.170923925e-02,\n   2.192476417e-02,  2.214033550e-02,  2.235595319e-02,  2.257161720e-02,\n   2.278732751e-02,  2.300308407e-02,  2.321888685e-02,  2.343473582e-02,\n   2.365063096e-02,  2.386657221e-02,  2.408255957e-02,  2.429859299e-02,\n   2.451467246e-02,  2.473079794e-02,  2.494696941e-02,  2.516318684e-02,\n   2.537945022e-02,  2.559575951e-02,  2.581211469e-02,  2.602851575e-02,\n   2.624496266e-02,  2.646145540e-02,  2.667799395e-02,  2.689457830e-02,\n   2.711120843e-02,  2.732788431e-02,  8.046976007e-01,  8.055318708e-01,\n   8.063691310e-01,  8.072094159e-01,  8.080527607e-01,  8.088992014e-01,\n   8.097487747e-01,  8.106015179e-01,  8.114574692e-01,  8.123166675e-01,\n   8.131791527e-01,  8.140449652e-01,  8.149141465e-01,  8.157867389e-01,\n   8.166627856e-01,  8.175423308e-01,  8.184254196e-01,  8.193120980e-01,\n   8.202024132e-01,  8.210964134e-01,  8.219941477e-01,  8.228956667e-01,\n   8.238010217e-01,  8.247102656e-01,  8.256234523e-01,  8.265406371e-01,\n   8.274618765e-01,  8.283872284e-01,  8.293167523e-01,  8.302505088e-01,\n   8.311885602e-01,  8.321309706e-01,  8.330778053e-01,  8.340291315e-01,\n   8.349850181e-01,  8.359455358e-01,  8.369107573e-01,  8.378807570e-01,\n   8.388556115e-01,  8.398353994e-01,  8.408202015e-01,  8.418101008e-01,\n   8.428051829e-01,  8.438055355e-01,  8.448112490e-01,  8.458224165e-01,\n   8.468391338e-01,  8.478614995e-01,  8.488896155e-01,  8.499235864e-01,\n   8.509635203e-01,  8.520095287e-01,  8.530617267e-01,  8.541202330e-01,\n   8.551851704e-01,  8.562566655e-01,  8.573348494e-01,  8.584198576e-01,\n   8.595118304e-01,  8.606109127e-01,  8.617172551e-01,  8.628310132e-01,\n   8.639523485e-01,  8.650814285e-01,  8.662184271e-01,  8.673635248e-01,\n   8.685169093e-01,  8.696787757e-01,  8.708493268e-01,  8.720287739e-01,\n   8.732173371e-01,  8.744152460e-01,  8.756227397e-01,  8.768400684e-01,\n   8.780674929e-01,  8.793052865e-01,  8.805537347e-01,  8.818131369e-01,\n   8.830838067e-01,  8.843660734e-01,  8.856602827e-01,  8.869667982e-01,\n   8.882860024e-01,  8.896182985e-01,  8.909641117e-01,  8.923238911e-01,\n   8.936981115e-01,  8.950872757e-01,  8.964919166e-01,  8.979126001e-01,\n   8.993499281e-01,  9.008045413e-01,  9.022771233e-01,  9.037684047e-01,\n   9.052791675e-01,  9.068102508e-01,  9.083625562e-01,  9.099370554e-01,\n   9.115347972e-01,  9.131569172e-01,  9.148046478e-01,  9.164793302e-01,\n   9.181824289e-01,  9.199155477e-01,  9.216804495e-01,  9.234790793e-01,\n   9.253135919e-01,  9.271863850e-01,  9.291001401e-01,  9.310578717e-01,\n   9.330629889e-01,  9.351193720e-01,  9.372314700e-01,  9.394044253e-01,\n   9.416442360e-01,  9.439579713e-01,  9.463540622e-01,  9.488427019e-01,\n   9.514364139e-01,  9.541508797e-01,  9.570061896e-01,  9.600288182e-01,\n   9.632549133e-01,  9.667361640e-01,  9.705512686e-01,  9.748314094e-01,\n   9.798291121e-01,  9.861840124e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_6[] = {\n   0.000000000e+00,  7.877882007e-04,  2.100042262e-03,  3.727177925e-03,\n   5.600284917e-03,  7.680990070e-03,  9.944108992e-03,  1.237157422e-02,\n   1.494966865e-02,  1.766755982e-02,  2.051644175e-02,  2.348899513e-02,\n   2.657902868e-02,  2.978123067e-02,  3.309099055e-02,  3.650426737e-02,\n   4.001749025e-02,  4.362748166e-02,  4.733139714e-02,  5.112667734e-02,\n   5.501100918e-02,  5.898229420e-02,  6.303862234e-02,  6.717825014e-02,\n   7.139958240e-02,  7.570115664e-02,  8.008162979e-02,  8.453976693e-02,\n   8.907443134e-02,  9.368457610e-02,  9.836923661e-02,  1.031275241e-01,\n   1.079586200e-01,  1.128617708e-01,  1.178362838e-01,  1.228815229e-01,\n   1.279969054e-01,  1.331818987e-01,  1.384360177e-01,  1.437588223e-01,\n   1.491499151e-01,  1.546089394e-01,  1.601355779e-01,  1.657295507e-01,\n   1.713906139e-01,  1.771185589e-01,  1.829132107e-01,  1.887744275e-01,\n   1.947020997e-01,  2.006961490e-01,  2.067565281e-01,  2.128832202e-01,\n   2.190762386e-01,  2.253356261e-01,  2.316614555e-01,  2.380538287e-01,\n   2.445128772e-01,  2.510387619e-01,  2.576316735e-01,  2.642918324e-01,\n   2.710194891e-01,  2.778149248e-01,  2.846784516e-01,  2.916104133e-01,\n   2.986111857e-01,  3.056811775e-01,  3.128208316e-01,  3.200306251e-01,\n   3.273110712e-01,  3.346627198e-01,  3.420861591e-01,  3.495820169e-01,\n   3.571509622e-01,  3.647937065e-01,  3.725110065e-01,  3.803036651e-01,\n   3.881725346e-01,  3.961185181e-01,  4.041425733e-01,  4.122457143e-01,\n   4.204290155e-01,  4.286936148e-01,  4.370407174e-01,  4.454716000e-01,\n   4.539876153e-01,  4.625901972e-01,  4.712808662e-01,  4.800612357e-01,\n   4.889330184e-01,  4.978980342e-01,  5.069582184e-01,  5.161156307e-01,\n   5.253724659e-01,  5.347310652e-01,  5.441939291e-01,  5.537637322e-01,\n   5.634433396e-01,  5.732358252e-01,  5.831444931e-01,  5.931729017e-01,\n   6.033248915e-01,  6.136046164e-01,  6.240165812e-01,  6.345656840e-01,\n   6.452572659e-01,  6.560971707e-01,  6.670918135e-01,  6.782482646e-01,\n   6.895743487e-01,  7.010787659e-01,  7.127712393e-01,  7.246626979e-01,\n   7.367655043e-01,  7.490937432e-01,  7.616635920e-01,  7.744938030e-01,\n   7.876063442e-01,  8.010272681e-01,  8.147879167e-01,  8.289266439e-01,\n   8.434913592e-01,  8.585434418e-01,  8.741640790e-01,  8.904652148e-01,\n   9.076101613e-01,  9.258573700e-01,  9.456721333e-01,  9.681232008e-01,\n   1.000000000e+00,  0.000000000e+00,  1.138721031e-05,  3.034865559e-05,\n   5.384828237e-05,  8.088424301e-05,  1.108964430e-04,  1.435156424e-04,\n   1.784756212e-04,  2.155731485e-04,  2.546467676e-04,  2.955643711e-04,\n   3.382153826e-04,  3.825055600e-04,  4.283533932e-04,  4.756875174e-04,\n   5.244448030e-04,  5.745689109e-04,  6.260091769e-04,  6.787197355e-04,\n   7.326588207e-04,  7.877882007e-04,  8.440727150e-04,  9.014798922e-04,\n   9.599796298e-04,  1.019543926e-03,  1.080146649e-03,  1.141763344e-03,\n   1.204371066e-03,  1.267948227e-03,  1.332474479e-03,  1.397930596e-03,\n   1.464298380e-03,  1.531560570e-03,  1.599700772e-03,  1.668703387e-03,\n   1.738553548e-03,  1.809237072e-03,  1.880740404e-03,  1.953050575e-03,\n   2.026155165e-03,  2.100042262e-03,  2.174700430e-03,  2.250118681e-03,\n   2.326286445e-03,  2.403193546e-03,  2.480830178e-03,  2.559186884e-03,\n   2.638254535e-03,  2.718024315e-03,  2.798487700e-03,  2.879636446e-03,\n   2.961462573e-03,  3.043958350e-03,  3.127116286e-03,  3.210929116e-03,\n   3.295389790e-03,  3.380491462e-03,  3.466227486e-03,  3.552591397e-03,\n   3.639576915e-03,  3.727177925e-03,  3.815388478e-03,  3.904202783e-03,\n   3.993615194e-03,  4.083620214e-03,  4.174212479e-03,  4.265386762e-03,\n   4.357137959e-03,  4.449461090e-03,  4.542351292e-03,  4.635803816e-03,\n   4.729814022e-03,  4.824377373e-03,  4.919489435e-03,  5.015145870e-03,\n   5.111342437e-03,  5.208074982e-03,  5.305339441e-03,  5.403131835e-03,\n   5.501448266e-03,  5.600284917e-03,  5.699638044e-03,  5.799503982e-03,\n   5.899879135e-03,  6.000759976e-03,  6.102143049e-03,  6.204024959e-03,\n   6.306402379e-03,  6.409272040e-03,  6.512630735e-03,  6.616475313e-03,\n   6.720802682e-03,  6.825609802e-03,  6.930893687e-03,  7.036651406e-03,\n   7.142880073e-03,  7.249576854e-03,  7.356738962e-03,  7.464363658e-03,\n   7.572448244e-03,  7.680990070e-03,  7.789986527e-03,  7.899435048e-03,\n   8.009333107e-03,  8.119678216e-03,  8.230467927e-03,  8.341699830e-03,\n   8.453371551e-03,  8.565480752e-03,  8.678025130e-03,  8.791002417e-03,\n   8.904410376e-03,  9.018246805e-03,  9.132509533e-03,  9.247196421e-03,\n   9.362305357e-03,  9.477834264e-03,  9.593781089e-03,  9.710143811e-03,\n   9.826920434e-03,  9.944108992e-03,  1.006170754e-02,  1.017971417e-02,\n   1.029812699e-02,  1.041694414e-02,  1.053616376e-02,  1.065578406e-02,\n   1.077580323e-02,  1.089621951e-02,  8.678412984e-01,  8.686259991e-01,\n   8.694122835e-01,  8.702001660e-01,  8.709896616e-01,  8.717807851e-01,\n   8.725735521e-01,  8.733679781e-01,  8.741640790e-01,  8.749618711e-01,\n   8.757613707e-01,  8.765625948e-01,  8.773655604e-01,  8.781702850e-01,\n   8.789767864e-01,  8.797850827e-01,  8.805951924e-01,  8.814071343e-01,\n   8.822209278e-01,  8.830365923e-01,  8.838541479e-01,  8.846736150e-01,\n   8.854950145e-01,  8.863183677e-01,  8.871436962e-01,  8.879710222e-01,\n   8.888003685e-01,  8.896317581e-01,  8.904652148e-01,  8.913007627e-01,\n   8.921384266e-01,  8.929782317e-01,  8.938202039e-01,  8.946643696e-01,\n   8.955107560e-01,  8.963593907e-01,  8.972103022e-01,  8.980635194e-01,\n   8.989190721e-01,  8.997769909e-01,  9.006373070e-01,  9.015000523e-01,\n   9.023652599e-01,  9.032329633e-01,  9.041031972e-01,  9.049759970e-01,\n   9.058513992e-01,  9.067294411e-01,  9.076101613e-01,  9.084935993e-01,\n   9.093797956e-01,  9.102687921e-01,  9.111606316e-01,  9.120553585e-01,\n   9.129530182e-01,  9.138536578e-01,  9.147573253e-01,  9.156640708e-01,\n   9.165739455e-01,  9.174870024e-01,  9.184032963e-01,  9.193228835e-01,\n   9.202458225e-01,  9.211721736e-01,  9.221019990e-01,  9.230353633e-01,\n   9.239723334e-01,  9.249129784e-01,  9.258573700e-01,  9.268055825e-01,\n   9.277576931e-01,  9.287137820e-01,  9.296739322e-01,  9.306382304e-01,\n   9.316067665e-01,  9.325796343e-01,  9.335569314e-01,  9.345387596e-01,\n   9.355252251e-01,  9.365164389e-01,  9.375125170e-01,  9.385135807e-01,\n   9.395197571e-01,  9.405311796e-01,  9.415479877e-01,  9.425703286e-01,\n   9.435983566e-01,  9.446322343e-01,  9.456721333e-01,  9.467182345e-01,\n   9.477707294e-01,  9.488298203e-01,  9.498957220e-01,  9.509686626e-01,\n   9.520488844e-01,  9.531366459e-01,  9.542322228e-01,  9.553359102e-01,\n   9.564480242e-01,  9.575689045e-01,  9.586989169e-01,  9.598384564e-01,\n   9.609879504e-01,  9.621478632e-01,  9.633187003e-01,  9.645010146e-01,\n   9.656954124e-01,  9.669025614e-01,  9.681232008e-01,  9.693581520e-01,\n   9.706083335e-01,  9.718747777e-01,  9.731586532e-01,  9.744612921e-01,\n   9.757842260e-01,  9.771292318e-01,  9.784983938e-01,  9.798941871e-01,\n   9.813195940e-01,  9.827782702e-01,  9.842747909e-01,  9.858150298e-01,\n   9.874067737e-01,  9.890607861e-01,  9.907928124e-01,  9.926278457e-01,\n   9.946110324e-01,  9.968464800e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_7[] = {\n   0.000000000e+00,  6.592502467e-05,  2.648932647e-04,  5.975786147e-04,\n   1.064331402e-03,  1.665386233e-03,  2.400913347e-03,  3.271040413e-03,\n   4.275863916e-03,  5.415455870e-03,  6.689868120e-03,  8.099135249e-03,\n   9.643276637e-03,  1.132229797e-02,  1.313619238e-02,  1.508494129e-02,\n   1.716851510e-02,  1.938687374e-02,  2.173996707e-02,  2.422773521e-02,\n   2.685010885e-02,  2.960700941e-02,  3.249834927e-02,  3.552403188e-02,\n   3.868395185e-02,  4.197799505e-02,  4.540603865e-02,  4.896795119e-02,\n   5.266359254e-02,  5.649281393e-02,  6.045545794e-02,  6.455135847e-02,\n   6.878034070e-02,  7.314222102e-02,  7.763680698e-02,  8.226389721e-02,\n   8.702328137e-02,  9.191473998e-02,  9.693804439e-02,  1.020929566e-01,\n   1.073792292e-01,  1.127966052e-01,  1.183448178e-01,  1.240235905e-01,\n   1.298326365e-01,  1.357716589e-01,  1.418403505e-01,  1.480383932e-01,\n   1.543654584e-01,  1.608212061e-01,  1.674052852e-01,  1.741173331e-01,\n   1.809569751e-01,  1.879238246e-01,  1.950174827e-01,  2.022375375e-01,\n   2.095835643e-01,  2.170551248e-01,  2.246517670e-01,  2.323730249e-01,\n   2.402184175e-01,  2.481874492e-01,  2.562796087e-01,  2.644943688e-01,\n   2.728311856e-01,  2.812894984e-01,  2.898687288e-01,  2.985682800e-01,\n   3.073875364e-01,  3.163258628e-01,  3.253826036e-01,  3.345570820e-01,\n   3.438485993e-01,  3.532564337e-01,  3.627798397e-01,  3.724180470e-01,\n   3.821702590e-01,  3.920356523e-01,  4.020133747e-01,  4.121025445e-01,\n   4.223022486e-01,  4.326115411e-01,  4.430294416e-01,  4.535549333e-01,\n   4.641869611e-01,  4.749244295e-01,  4.857661999e-01,  4.967110886e-01,\n   5.077578638e-01,  5.189052422e-01,  5.301518864e-01,  5.414964006e-01,\n   5.529373271e-01,  5.644731413e-01,  5.761022476e-01,  5.878229732e-01,\n   5.996335626e-01,  6.115321704e-01,  6.235168542e-01,  6.355855659e-01,\n   6.477361418e-01,  6.599662925e-01,  6.722735894e-01,  6.846554517e-01,\n   6.971091290e-01,  7.096316833e-01,  7.222199662e-01,  7.348705940e-01,\n   7.475799165e-01,  7.603439812e-01,  7.731584903e-01,  7.860187472e-01,\n   7.989195932e-01,  8.118553275e-01,  8.248196073e-01,  8.378053207e-01,\n   8.508044226e-01,  8.638077174e-01,  8.768045663e-01,  8.897824816e-01,\n   9.027265479e-01,  9.156185622e-01,  9.284356976e-01,  9.411482986e-01,\n   9.537159421e-01,  9.660795857e-01,  9.781430613e-01,  9.897144251e-01,\n   1.000000000e+00,  0.000000000e+00,  1.616208035e-07,  6.494156025e-07,\n   1.465058436e-06,  2.609444952e-06,  4.083202062e-06,  5.886813922e-06,\n   8.020675440e-06,  1.048512026e-05,  1.328043733e-05,  1.640688145e-05,\n   1.986468059e-05,  2.365404091e-05,  2.777515067e-05,  3.222818300e-05,\n   3.701329820e-05,  4.213064548e-05,  4.758036439e-05,  5.336258599e-05,\n   5.947743382e-05,  6.592502467e-05,  7.270546935e-05,  7.981887318e-05,\n   8.726533655e-05,  9.504495534e-05,  1.031578213e-04,  1.116040223e-04,\n   1.203836430e-04,  1.294967643e-04,  1.389434647e-04,  1.487238193e-04,\n   1.588379011e-04,  1.692857804e-04,  1.800675251e-04,  1.911832013e-04,\n   2.026328726e-04,  2.144166012e-04,  2.265344470e-04,  2.389864686e-04,\n   2.517727228e-04,  2.648932647e-04,  2.783481482e-04,  2.921374257e-04,\n   3.062611482e-04,  3.207193656e-04,  3.355121265e-04,  3.506394782e-04,\n   3.661014671e-04,  3.818981385e-04,  3.980295365e-04,  4.144957045e-04,\n   4.312966847e-04,  4.484325186e-04,  4.659032466e-04,  4.837089085e-04,\n   5.018495432e-04,  5.203251887e-04,  5.391358823e-04,  5.582816607e-04,\n   5.777625597e-04,  5.975786147e-04,  6.177298600e-04,  6.382163296e-04,\n   6.590380569e-04,  6.801950744e-04,  7.016874143e-04,  7.235151081e-04,\n   7.456781867e-04,  7.681766807e-04,  7.910106198e-04,  8.141800335e-04,\n   8.376849507e-04,  8.615253998e-04,  8.857014088e-04,  9.102130052e-04,\n   9.350602159e-04,  9.602430676e-04,  9.857615865e-04,  1.011615798e-03,\n   1.037805729e-03,  1.064331402e-03,  1.091192843e-03,  1.118390077e-03,\n   1.145923126e-03,  1.173792014e-03,  1.201996765e-03,  1.230537402e-03,\n   1.259413946e-03,  1.288626419e-03,  1.318174844e-03,  1.348059242e-03,\n   1.378279634e-03,  1.408836041e-03,  1.439728483e-03,  1.470956981e-03,\n   1.502521555e-03,  1.534422223e-03,  1.566659006e-03,  1.599231923e-03,\n   1.632140992e-03,  1.665386233e-03,  1.698967662e-03,  1.732885299e-03,\n   1.767139161e-03,  1.801729266e-03,  1.836655631e-03,  1.871918272e-03,\n   1.907517208e-03,  1.943452454e-03,  1.979724026e-03,  2.016331942e-03,\n   2.053276216e-03,  2.090556865e-03,  2.128173903e-03,  2.166127347e-03,\n   2.204417211e-03,  2.243043510e-03,  2.282006259e-03,  2.321305472e-03,\n   2.360941163e-03,  2.400913347e-03,  2.441222037e-03,  2.481867246e-03,\n   2.522848990e-03,  2.564167279e-03,  2.605822129e-03,  2.647813551e-03,\n   2.690141559e-03,  2.732806164e-03,  9.233195393e-01,  9.239598954e-01,\n   9.246000204e-01,  9.252399104e-01,  9.258795615e-01,  9.265189699e-01,\n   9.271581314e-01,  9.277970420e-01,  9.284356976e-01,  9.290740941e-01,\n   9.297122271e-01,  9.303500923e-01,  9.309876854e-01,  9.316250019e-01,\n   9.322620373e-01,  9.328987870e-01,  9.335352462e-01,  9.341714104e-01,\n   9.348072746e-01,  9.354428339e-01,  9.360780834e-01,  9.367130181e-01,\n   9.373476326e-01,  9.379819219e-01,  9.386158805e-01,  9.392495030e-01,\n   9.398827840e-01,  9.405157178e-01,  9.411482986e-01,  9.417805206e-01,\n   9.424123780e-01,  9.430438646e-01,  9.436749744e-01,  9.443057009e-01,\n   9.449360378e-01,  9.455659787e-01,  9.461955168e-01,  9.468246453e-01,\n   9.474533574e-01,  9.480816459e-01,  9.487095037e-01,  9.493369234e-01,\n   9.499638974e-01,  9.505904182e-01,  9.512164778e-01,  9.518420683e-01,\n   9.524671815e-01,  9.530918089e-01,  9.537159421e-01,  9.543395722e-01,\n   9.549626903e-01,  9.555852873e-01,  9.562073536e-01,  9.568288798e-01,\n   9.574498558e-01,  9.580702717e-01,  9.586901170e-01,  9.593093812e-01,\n   9.599280532e-01,  9.605461220e-01,  9.611635759e-01,  9.617804033e-01,\n   9.623965920e-01,  9.630121294e-01,  9.636270027e-01,  9.642411989e-01,\n   9.648547041e-01,  9.654675045e-01,  9.660795857e-01,  9.666909326e-01,\n   9.673015301e-01,  9.679113623e-01,  9.685204127e-01,  9.691286646e-01,\n   9.697361004e-01,  9.703427021e-01,  9.709484509e-01,  9.715533276e-01,\n   9.721573120e-01,  9.727603832e-01,  9.733625197e-01,  9.739636989e-01,\n   9.745638976e-01,  9.751630914e-01,  9.757612549e-01,  9.763583619e-01,\n   9.769543846e-01,  9.775492945e-01,  9.781430613e-01,  9.787356535e-01,\n   9.793270382e-01,  9.799171807e-01,  9.805060447e-01,  9.810935917e-01,\n   9.816797815e-01,  9.822645715e-01,  9.828479167e-01,  9.834297694e-01,\n   9.840100790e-01,  9.845887920e-01,  9.851658510e-01,  9.857411951e-01,\n   9.863147588e-01,  9.868864723e-01,  9.874562602e-01,  9.880240412e-01,\n   9.885897274e-01,  9.891532234e-01,  9.897144251e-01,  9.902732188e-01,\n   9.908294791e-01,  9.913830678e-01,  9.919338312e-01,  9.924815972e-01,\n   9.930261723e-01,  9.935673366e-01,  9.941048383e-01,  9.946383856e-01,\n   9.951676364e-01,  9.956921838e-01,  9.962115347e-01,  9.967250788e-01,\n   9.972320395e-01,  9.977313927e-01,  9.982217215e-01,  9.987009239e-01,\n   9.991655225e-01,  9.996084633e-01,  1.000000000e+00,\n};\nconst float dist_icdf_1_8[] = {\n   0.000000000e+00,  1.968089292e-12,  1.236989249e-10,  1.394171973e-09,\n   7.774761039e-09,  2.948608673e-08,  8.762690108e-08,  2.200748477e-07,\n   4.886614248e-07,  9.876149446e-07,  1.853266231e-06,  3.275012418e-06,\n   5.507534599e-06,  8.884265230e-06,  1.383210117e-05,  2.088735797e-05,\n   3.071296036e-05,  4.411686327e-05,  6.207169617e-05,  8.573562193e-05,\n   1.164743992e-04,  1.558846343e-04,  2.058182045e-04,  2.684078312e-04,\n   3.460937739e-04,  4.416516108e-04,  5.582210628e-04,  6.993358069e-04,\n   8.689542163e-04,  1.071490946e-03,  1.311849274e-03,  1.595454079e-03,\n   1.928285331e-03,  2.316911929e-03,  2.768525705e-03,  3.290975380e-03,\n   3.892800228e-03,  4.583263149e-03,  5.372382848e-03,  6.270964713e-03,\n   7.290630009e-03,  8.443842882e-03,  9.743934655e-03,  1.120512483e-02,\n   1.284253811e-02,  1.467221678e-02,  1.671112759e-02,  1.897716234e-02,\n   2.148913118e-02,  2.426674779e-02,  2.733060511e-02,  3.070214091e-02,\n   3.440359170e-02,  3.845793405e-02,  4.288881201e-02,  4.772044954e-02,\n   5.297754673e-02,  5.868515878e-02,  6.486855676e-02,  7.155306916e-02,\n   7.876390376e-02,  8.652594909e-02,  9.486355550e-02,  1.038002958e-01,\n   1.133587062e-01,  1.235600078e-01,  1.344238113e-01,  1.459678056e-01,\n   1.582074332e-01,  1.711555565e-01,  1.848221170e-01,  1.992137934e-01,\n   2.143336633e-01,  2.301808735e-01,  2.467503259e-01,  2.640323862e-01,\n   2.820126204e-01,  3.006715698e-01,  3.199845684e-01,  3.399216129e-01,\n   3.604472903e-01,  3.815207706e-01,  4.030958703e-01,  4.251211902e-01,\n   4.475403321e-01,  4.702921954e-01,  4.933113546e-01,  5.165285144e-01,\n   5.398710412e-01,  5.632635634e-01,  5.866286341e-01,  6.098874469e-01,\n   6.329605937e-01,  6.557688520e-01,  6.782339897e-01,  7.002795709e-01,\n   7.218317505e-01,  7.428200421e-01,  7.631780456e-01,  7.828441210e-01,\n   8.017619977e-01,  8.198813079e-01,  8.371580374e-01,  8.535548853e-01,\n   8.690415322e-01,  8.835948111e-01,  8.971987850e-01,  9.098447323e-01,\n   9.215310444e-01,  9.322630430e-01,  9.420527240e-01,  9.509184378e-01,\n   9.588845144e-01,  9.659808462e-01,  9.722424361e-01,  9.777089240e-01,\n   9.824240998e-01,  9.864354148e-01,  9.897934981e-01,  9.925516881e-01,\n   9.947655846e-01,  9.964926289e-01,  9.977917162e-01,  9.987228439e-01,\n   9.993467991e-01,  9.997248862e-01,  9.999186918e-01,  9.999898822e-01,\n   1.000000000e+00,  0.000000000e+00,  3.325295141e-20,  2.090024246e-18,\n   2.355601095e-17,  1.313628163e-16,  4.981986486e-16,  1.480549303e-15,\n   3.718397924e-15,  8.256454226e-15,  1.668680910e-14,  3.131292745e-14,\n   5.533490434e-14,  9.305591864e-14,  1.501098257e-13,  2.337098359e-13,\n   3.529182322e-13,  5.189370804e-13,  7.454198943e-13,  1.048804215e-12,\n   1.448665073e-12,  1.968089292e-12,  2.634070617e-12,  3.477925623e-12,\n   4.535730381e-12,  5.848777867e-12,  7.464056061e-12,  9.434746749e-12,\n   1.182074497e-11,  1.468919909e-11,  1.811507156e-11,  2.218172014e-11,\n   2.698149987e-11,  3.261638544e-11,  3.919861419e-11,  4.685134962e-11,\n   5.570936541e-11,  6.591974986e-11,  7.764263094e-11,  9.105192165e-11,\n   1.063360859e-10,  1.236989249e-10,  1.433603836e-10,  1.655573783e-10,\n   1.905446435e-10,  2.185956003e-10,  2.500032445e-10,  2.850810550e-10,\n   3.241639228e-10,  3.676091003e-10,  4.157971709e-10,  4.691330386e-10,\n   5.280469386e-10,  5.929954671e-10,  6.644626325e-10,  7.429609261e-10,\n   8.290324133e-10,  9.232498452e-10,  1.026217790e-09,  1.138573785e-09,\n   1.260989509e-09,  1.394171973e-09,  1.538864737e-09,  1.695849135e-09,\n   1.865945536e-09,  2.050014613e-09,  2.248958635e-09,  2.463722782e-09,\n   2.695296480e-09,  2.944714751e-09,  3.213059588e-09,  3.501461352e-09,\n   3.811100181e-09,  4.143207425e-09,  4.499067104e-09,  4.880017378e-09,\n   5.287452042e-09,  5.722822042e-09,  6.187637007e-09,  6.683466806e-09,\n   7.211943120e-09,  7.774761039e-09,  8.373680675e-09,  9.010528794e-09,\n   9.687200478e-09,  1.040566079e-08,  1.116794648e-08,  1.197616769e-08,\n   1.283250968e-08,  1.373923462e-08,  1.469868332e-08,  1.571327705e-08,\n   1.678551933e-08,  1.791799783e-08,  1.911338611e-08,  2.037444563e-08,\n   2.170402752e-08,  2.310507459e-08,  2.458062320e-08,  2.613380524e-08,\n   2.776785012e-08,  2.948608673e-08,  3.129194547e-08,  3.318896030e-08,\n   3.518077077e-08,  3.727112408e-08,  3.946387724e-08,  4.176299911e-08,\n   4.417257255e-08,  4.669679661e-08,  4.933998867e-08,  5.210658665e-08,\n   5.500115118e-08,  5.802836792e-08,  6.119304970e-08,  6.450013891e-08,\n   6.795470968e-08,  7.156197029e-08,  7.532726543e-08,  7.925607858e-08,\n   8.335403440e-08,  8.762690108e-08,  9.208059279e-08,  9.672117209e-08,\n   1.015548524e-07,  1.065880004e-07,  1.118271386e-07,  1.172789479e-07,\n   1.229502699e-07,  1.288481098e-07,  9.973196172e-01,  9.973819818e-01,\n   9.974433736e-01,  9.975038000e-01,  9.975632687e-01,  9.976217871e-01,\n   9.976793628e-01,  9.977360033e-01,  9.977917162e-01,  9.978465090e-01,\n   9.979003894e-01,  9.979533648e-01,  9.980054428e-01,  9.980566311e-01,\n   9.981069371e-01,  9.981563685e-01,  9.982049329e-01,  9.982526378e-01,\n   9.982994909e-01,  9.983454997e-01,  9.983906719e-01,  9.984350150e-01,\n   9.984785367e-01,  9.985212447e-01,  9.985631464e-01,  9.986042495e-01,\n   9.986445617e-01,  9.986840906e-01,  9.987228439e-01,  9.987608291e-01,\n   9.987980539e-01,  9.988345259e-01,  9.988702528e-01,  9.989052423e-01,\n   9.989395020e-01,  9.989730395e-01,  9.990058625e-01,  9.990379787e-01,\n   9.990693957e-01,  9.991001212e-01,  9.991301629e-01,  9.991595284e-01,\n   9.991882255e-01,  9.992162617e-01,  9.992436447e-01,  9.992703823e-01,\n   9.992964821e-01,  9.993219518e-01,  9.993467991e-01,  9.993710317e-01,\n   9.993946572e-01,  9.994176834e-01,  9.994401179e-01,  9.994619685e-01,\n   9.994832428e-01,  9.995039485e-01,  9.995240933e-01,  9.995436850e-01,\n   9.995627311e-01,  9.995812395e-01,  9.995992179e-01,  9.996166738e-01,\n   9.996336151e-01,  9.996500494e-01,  9.996659844e-01,  9.996814279e-01,\n   9.996963876e-01,  9.997108711e-01,  9.997248862e-01,  9.997384406e-01,\n   9.997515419e-01,  9.997641980e-01,  9.997764164e-01,  9.997882050e-01,\n   9.997995715e-01,  9.998105234e-01,  9.998210686e-01,  9.998312148e-01,\n   9.998409697e-01,  9.998503409e-01,  9.998593363e-01,  9.998679634e-01,\n   9.998762301e-01,  9.998841440e-01,  9.998917128e-01,  9.998989443e-01,\n   9.999058462e-01,  9.999124261e-01,  9.999186918e-01,  9.999246510e-01,\n   9.999303114e-01,  9.999356806e-01,  9.999407665e-01,  9.999455767e-01,\n   9.999501189e-01,  9.999544008e-01,  9.999584301e-01,  9.999622146e-01,\n   9.999657619e-01,  9.999690796e-01,  9.999721756e-01,  9.999750575e-01,\n   9.999777330e-01,  9.999802098e-01,  9.999824956e-01,  9.999845980e-01,\n   9.999865248e-01,  9.999882836e-01,  9.999898822e-01,  9.999913282e-01,\n   9.999926292e-01,  9.999937930e-01,  9.999948273e-01,  9.999957396e-01,\n   9.999965377e-01,  9.999972292e-01,  9.999978219e-01,  9.999983232e-01,\n   9.999987410e-01,  9.999990828e-01,  9.999993563e-01,  9.999995692e-01,\n   9.999997290e-01,  9.999998433e-01,  9.999999199e-01,  9.999999663e-01,\n   9.999999900e-01,  9.999999988e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_0[] = {\n   0.000000000e+00,  2.237672937e-01,  2.285440040e-01,  2.315843188e-01,\n   2.338746000e-01,  2.357386352e-01,  2.373253744e-01,  2.387163221e-01,\n   2.399611778e-01,  2.410925969e-01,  2.421332450e-01,  2.430995295e-01,\n   2.440037306e-01,  2.448552915e-01,  2.456616389e-01,  2.464287258e-01,\n   2.471614013e-01,  2.478636718e-01,  2.485388879e-01,  2.491898826e-01,\n   2.498190743e-01,  2.504285456e-01,  2.510201037e-01,  2.515953283e-01,\n   2.521556093e-01,  2.527021764e-01,  2.532361239e-01,  2.537584308e-01,\n   2.542699767e-01,  2.547715555e-01,  2.552638870e-01,  2.557476261e-01,\n   2.562233710e-01,  2.566916700e-01,  2.571530275e-01,  2.576079089e-01,\n   2.580567449e-01,  2.584999356e-01,  2.589378533e-01,  2.593708457e-01,\n   2.597992386e-01,  2.602233376e-01,  2.606434306e-01,  2.610597894e-01,\n   2.614726711e-01,  2.618823197e-01,  2.622889672e-01,  2.626928352e-01,\n   2.630941351e-01,  2.634930699e-01,  2.638898346e-01,  2.642846170e-01,\n   2.646775986e-01,  2.650689550e-01,  2.654588569e-01,  2.658474705e-01,\n   2.662349577e-01,  2.666214772e-01,  2.670071847e-01,  2.673922333e-01,\n   2.677767740e-01,  2.681609563e-01,  2.685449282e-01,  2.689288371e-01,\n   2.693128298e-01,  2.696970532e-01,  2.700816545e-01,  2.704667816e-01,\n   2.708525836e-01,  2.712392111e-01,  2.716268168e-01,  2.720155558e-01,\n   2.724055857e-01,  2.727970680e-01,  2.731901676e-01,  2.735850538e-01,\n   2.739819008e-01,  2.743808884e-01,  2.747822024e-01,  2.751860354e-01,\n   2.755925874e-01,  2.760020669e-01,  2.764146914e-01,  2.768306888e-01,\n   2.772502979e-01,  2.776737700e-01,  2.781013700e-01,  2.785333778e-01,\n   2.789700899e-01,  2.794118213e-01,  2.798589071e-01,  2.803117054e-01,\n   2.807705990e-01,  2.812359989e-01,  2.817083474e-01,  2.821881216e-01,\n   2.826758380e-01,  2.831720572e-01,  2.836773897e-01,  2.841925025e-01,\n   2.847181272e-01,  2.852550686e-01,  2.858042160e-01,  2.863665561e-01,\n   2.869431883e-01,  2.875353432e-01,  2.881444058e-01,  2.887719433e-01,\n   2.894197393e-01,  2.900898371e-01,  2.907845943e-01,  2.915067526e-01,\n   2.922595280e-01,  2.930467297e-01,  2.938729188e-01,  2.947436250e-01,\n   2.956656471e-01,  2.966474820e-01,  2.976999534e-01,  2.988371642e-01,\n   3.000779982e-01,  3.014486035e-01,  3.029867529e-01,  3.047501085e-01,\n   3.068335679e-01,  3.094113041e-01,  3.128640397e-01,  3.183611310e-01,\n   1.000000000e+00,  0.000000000e+00,  2.071142520e-01,  2.105359226e-01,\n   2.126391547e-01,  2.141820491e-01,  2.154100048e-01,  2.164347847e-01,\n   2.173170522e-01,  2.180935449e-01,  2.187882558e-01,  2.194177473e-01,\n   2.199939495e-01,  2.205257498e-01,  2.210199526e-01,  2.214818874e-01,\n   2.219158087e-01,  2.223251688e-01,  2.227128090e-01,  2.230810969e-01,\n   2.234320265e-01,  2.237672937e-01,  2.240883533e-01,  2.243964629e-01,\n   2.246927174e-01,  2.249780760e-01,  2.252533839e-01,  2.255193899e-01,\n   2.257767607e-01,  2.260260924e-01,  2.262679202e-01,  2.265027267e-01,\n   2.267309484e-01,  2.269529818e-01,  2.271691877e-01,  2.273798958e-01,\n   2.275854078e-01,  2.277860010e-01,  2.279819305e-01,  2.281734317e-01,\n   2.283607223e-01,  2.285440040e-01,  2.287234639e-01,  2.288992763e-01,\n   2.290716035e-01,  2.292405968e-01,  2.294063978e-01,  2.295691392e-01,\n   2.297289453e-01,  2.298859327e-01,  2.300402112e-01,  2.301918842e-01,\n   2.303410491e-01,  2.304877977e-01,  2.306322171e-01,  2.307743892e-01,\n   2.309143920e-01,  2.310522991e-01,  2.311881805e-01,  2.313221026e-01,\n   2.314541287e-01,  2.315843188e-01,  2.317127300e-01,  2.318394170e-01,\n   2.319644317e-01,  2.320878237e-01,  2.322096405e-01,  2.323299273e-01,\n   2.324487276e-01,  2.325660827e-01,  2.326820325e-01,  2.327966149e-01,\n   2.329098666e-01,  2.330218225e-01,  2.331325163e-01,  2.332419804e-01,\n   2.333502458e-01,  2.334573424e-01,  2.335632989e-01,  2.336681431e-01,\n   2.337719016e-01,  2.338746000e-01,  2.339762633e-01,  2.340769152e-01,\n   2.341765788e-01,  2.342752764e-01,  2.343730295e-01,  2.344698589e-01,\n   2.345657846e-01,  2.346608261e-01,  2.347550022e-01,  2.348483310e-01,\n   2.349408301e-01,  2.350325167e-01,  2.351234072e-01,  2.352135175e-01,\n   2.353028633e-01,  2.353914596e-01,  2.354793210e-01,  2.355664616e-01,\n   2.356528952e-01,  2.357386352e-01,  2.358236945e-01,  2.359080858e-01,\n   2.359918212e-01,  2.360749127e-01,  2.361573718e-01,  2.362392099e-01,\n   2.363204379e-01,  2.364010664e-01,  2.364811059e-01,  2.365605663e-01,\n   2.366394577e-01,  2.367177895e-01,  2.367955712e-01,  2.368728117e-01,\n   2.369495201e-01,  2.370257049e-01,  2.371013746e-01,  2.371765374e-01,\n   2.372512014e-01,  2.373253744e-01,  2.373990641e-01,  2.374722779e-01,\n   2.375450231e-01,  2.376173069e-01,  2.376891362e-01,  2.377605178e-01,\n   2.378314584e-01,  2.379019644e-01,  3.023482827e-01,  3.024262900e-01,\n   3.025047965e-01,  3.025838097e-01,  3.026633373e-01,  3.027433873e-01,\n   3.028239676e-01,  3.029050867e-01,  3.029867529e-01,  3.030689749e-01,\n   3.031517616e-01,  3.032351222e-01,  3.033190660e-01,  3.034036025e-01,\n   3.034887416e-01,  3.035744933e-01,  3.036608679e-01,  3.037478761e-01,\n   3.038355287e-01,  3.039238368e-01,  3.040128120e-01,  3.041024660e-01,\n   3.041928108e-01,  3.042838590e-01,  3.043756232e-01,  3.044681165e-01,\n   3.045613525e-01,  3.046553451e-01,  3.047501085e-01,  3.048456573e-01,\n   3.049420068e-01,  3.050391725e-01,  3.051371705e-01,  3.052360172e-01,\n   3.053357297e-01,  3.054363256e-01,  3.055378230e-01,  3.056402406e-01,\n   3.057435976e-01,  3.058479140e-01,  3.059532104e-01,  3.060595080e-01,\n   3.061668287e-01,  3.062751953e-01,  3.063846313e-01,  3.064951609e-01,\n   3.066068094e-01,  3.067196027e-01,  3.068335679e-01,  3.069487330e-01,\n   3.070651270e-01,  3.071827799e-01,  3.073017230e-01,  3.074219888e-01,\n   3.075436110e-01,  3.076666246e-01,  3.077910660e-01,  3.079169733e-01,\n   3.080443858e-01,  3.081733448e-01,  3.083038931e-01,  3.084360754e-01,\n   3.085699385e-01,  3.087055310e-01,  3.088429040e-01,  3.089821107e-01,\n   3.091232069e-01,  3.092662509e-01,  3.094113041e-01,  3.095584305e-01,\n   3.097076976e-01,  3.098591762e-01,  3.100129406e-01,  3.101690693e-01,\n   3.103276447e-01,  3.104887538e-01,  3.106524885e-01,  3.108189457e-01,\n   3.109882280e-01,  3.111604442e-01,  3.113357092e-01,  3.115141453e-01,\n   3.116958823e-01,  3.118810583e-01,  3.120698206e-01,  3.122623261e-01,\n   3.124587426e-01,  3.126592496e-01,  3.128640397e-01,  3.130733194e-01,\n   3.132873109e-01,  3.135062539e-01,  3.137304068e-01,  3.139600497e-01,\n   3.141954860e-01,  3.144370455e-01,  3.146850877e-01,  3.149400053e-01,\n   3.152022285e-01,  3.154722301e-01,  3.157505311e-01,  3.160377080e-01,\n   3.163344003e-01,  3.166413211e-01,  3.169592681e-01,  3.172891382e-01,\n   3.176319443e-01,  3.179888371e-01,  3.183611310e-01,  3.187503370e-01,\n   3.191582048e-01,  3.195867759e-01,  3.200384532e-01,  3.205160924e-01,\n   3.210231247e-01,  3.215637244e-01,  3.221430419e-01,  3.227675378e-01,\n   3.234454730e-01,  3.241876547e-01,  3.250086151e-01,  3.259285692e-01,\n   3.269768652e-01,  3.281985533e-01,  3.296682426e-01,  3.315238816e-01,\n   3.340697709e-01,  3.382524533e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_1[] = {\n   0.000000000e+00,  1.859542478e-01,  2.030266017e-01,  2.142287108e-01,\n   2.228310438e-01,  2.299321245e-01,  2.360449678e-01,  2.414535080e-01,\n   2.463324831e-01,  2.507975981e-01,  2.549297009e-01,  2.587876628e-01,\n   2.624157784e-01,  2.658482727e-01,  2.691121802e-01,  2.722292574e-01,\n   2.752172943e-01,  2.780910396e-01,  2.808628693e-01,  2.835432798e-01,\n   2.861412585e-01,  2.886645665e-01,  2.911199576e-01,  2.935133508e-01,\n   2.958499662e-01,  2.981344353e-01,  3.003708891e-01,  3.025630316e-01,\n   3.047141989e-01,  3.068274093e-01,  3.089054052e-01,  3.109506877e-01,\n   3.129655464e-01,  3.149520851e-01,  3.169122428e-01,  3.188478132e-01,\n   3.207604601e-01,  3.226517321e-01,  3.245230743e-01,  3.263758395e-01,\n   3.282112975e-01,  3.300306436e-01,  3.318350056e-01,  3.336254511e-01,\n   3.354029929e-01,  3.371685947e-01,  3.389231755e-01,  3.406676141e-01,\n   3.424027533e-01,  3.441294032e-01,  3.458483443e-01,  3.475603310e-01,\n   3.492660941e-01,  3.509663435e-01,  3.526617703e-01,  3.543530494e-01,\n   3.560408418e-01,  3.577257958e-01,  3.594085497e-01,  3.610897335e-01,\n   3.627699702e-01,  3.644498781e-01,  3.661300719e-01,  3.678111648e-01,\n   3.694937701e-01,  3.711785023e-01,  3.728659792e-01,  3.745568236e-01,\n   3.762516646e-01,  3.779511393e-01,  3.796558950e-01,  3.813665906e-01,\n   3.830838985e-01,  3.848085068e-01,  3.865411212e-01,  3.882824675e-01,\n   3.900332933e-01,  3.917943714e-01,  3.935665017e-01,  3.953505146e-01,\n   3.971472742e-01,  3.989576812e-01,  4.007826772e-01,  4.026232487e-01,\n   4.044804314e-01,  4.063553153e-01,  4.082490504e-01,  4.101628522e-01,\n   4.120980096e-01,  4.140558913e-01,  4.160379553e-01,  4.180457579e-01,\n   4.200809652e-01,  4.221453648e-01,  4.242408801e-01,  4.263695867e-01,\n   4.285337302e-01,  4.307357480e-01,  4.329782934e-01,  4.352642647e-01,\n   4.375968381e-01,  4.399795076e-01,  4.424161310e-01,  4.449109856e-01,\n   4.474688341e-01,  4.500950050e-01,  4.527954890e-01,  4.555770586e-01,\n   4.584474150e-01,  4.614153718e-01,  4.644910869e-01,  4.676863584e-01,\n   4.710150084e-01,  4.744933855e-01,  4.781410371e-01,  4.819816218e-01,\n   4.860441784e-01,  4.903649284e-01,  4.949899151e-01,  4.999789916e-01,\n   5.054120924e-01,  5.113995761e-01,  5.181003269e-01,  5.257559352e-01,\n   5.347621208e-01,  5.458408909e-01,  5.605580193e-01,  5.836638935e-01,\n   1.000000000e+00,  0.000000000e+00,  1.320233851e-01,  1.423504406e-01,\n   1.488981756e-01,  1.537964510e-01,  1.577515107e-01,  1.610901466e-01,\n   1.639918877e-01,  1.665665248e-01,  1.688863544e-01,  1.710016416e-01,\n   1.729488204e-01,  1.747551863e-01,  1.764417447e-01,  1.780250238e-01,\n   1.795182751e-01,  1.809322945e-01,  1.822759999e-01,  1.835568476e-01,\n   1.847811385e-01,  1.859542478e-01,  1.870807998e-01,  1.881648030e-01,\n   1.892097564e-01,  1.902187329e-01,  1.911944471e-01,  1.921393091e-01,\n   1.930554691e-01,  1.939448542e-01,  1.948091983e-01,  1.956500674e-01,\n   1.964688812e-01,  1.972669306e-01,  1.980453932e-01,  1.988053464e-01,\n   1.995477787e-01,  2.002735989e-01,  2.009836451e-01,  2.016786915e-01,\n   2.023594553e-01,  2.030266017e-01,  2.036807492e-01,  2.043224739e-01,\n   2.049523133e-01,  2.055707697e-01,  2.061783132e-01,  2.067753847e-01,\n   2.073623979e-01,  2.079397419e-01,  2.085077828e-01,  2.090668659e-01,\n   2.096173167e-01,  2.101594431e-01,  2.106935361e-01,  2.112198714e-01,\n   2.117387101e-01,  2.122503001e-01,  2.127548768e-01,  2.132526639e-01,\n   2.137438743e-01,  2.142287108e-01,  2.147073665e-01,  2.151800258e-01,\n   2.156468644e-01,  2.161080506e-01,  2.165637448e-01,  2.170141009e-01,\n   2.174592658e-01,  2.178993806e-01,  2.183345803e-01,  2.187649946e-01,\n   2.191907477e-01,  2.196119591e-01,  2.200287436e-01,  2.204412114e-01,\n   2.208494687e-01,  2.212536177e-01,  2.216537566e-01,  2.220499803e-01,\n   2.224423800e-01,  2.228310438e-01,  2.232160568e-01,  2.235975008e-01,\n   2.239754551e-01,  2.243499962e-01,  2.247211981e-01,  2.250891322e-01,\n   2.254538676e-01,  2.258154713e-01,  2.261740081e-01,  2.265295406e-01,\n   2.268821296e-01,  2.272318340e-01,  2.275787108e-01,  2.279228154e-01,\n   2.282642015e-01,  2.286029211e-01,  2.289390248e-01,  2.292725617e-01,\n   2.296035795e-01,  2.299321245e-01,  2.302582416e-01,  2.305819748e-01,\n   2.309033664e-01,  2.312224580e-01,  2.315392898e-01,  2.318539009e-01,\n   2.321663295e-01,  2.324766128e-01,  2.327847869e-01,  2.330908871e-01,\n   2.333949477e-01,  2.336970022e-01,  2.339970831e-01,  2.342952224e-01,\n   2.345914510e-01,  2.348857992e-01,  2.351782964e-01,  2.354689717e-01,\n   2.357578530e-01,  2.360449678e-01,  2.363303430e-01,  2.366140048e-01,\n   2.368959787e-01,  2.371762897e-01,  2.374549623e-01,  2.377320204e-01,\n   2.380074874e-01,  2.382813860e-01,  5.153214020e-01,  5.156611194e-01,\n   5.160029569e-01,  5.163469462e-01,  5.166931196e-01,  5.170415101e-01,\n   5.173921516e-01,  5.177450787e-01,  5.181003269e-01,  5.184579325e-01,\n   5.188179326e-01,  5.191803655e-01,  5.195452700e-01,  5.199126863e-01,\n   5.202826553e-01,  5.206552191e-01,  5.210304208e-01,  5.214083046e-01,\n   5.217889160e-01,  5.221723014e-01,  5.225585087e-01,  5.229475870e-01,\n   5.233395866e-01,  5.237345594e-01,  5.241325585e-01,  5.245336387e-01,\n   5.249378560e-01,  5.253452684e-01,  5.257559352e-01,  5.261699176e-01,\n   5.265872786e-01,  5.270080830e-01,  5.274323975e-01,  5.278602907e-01,\n   5.282918337e-01,  5.287270992e-01,  5.291661627e-01,  5.296091018e-01,\n   5.300559965e-01,  5.305069295e-01,  5.309619862e-01,  5.314212547e-01,\n   5.318848262e-01,  5.323527947e-01,  5.328252576e-01,  5.333023156e-01,\n   5.337840729e-01,  5.342706374e-01,  5.347621208e-01,  5.352586390e-01,\n   5.357603118e-01,  5.362672639e-01,  5.367796243e-01,  5.372975271e-01,\n   5.378211115e-01,  5.383505222e-01,  5.388859097e-01,  5.394274304e-01,\n   5.399752472e-01,  5.405295297e-01,  5.410904546e-01,  5.416582061e-01,\n   5.422329765e-01,  5.428149665e-01,  5.434043856e-01,  5.440014529e-01,\n   5.446063978e-01,  5.452194600e-01,  5.458408909e-01,  5.464709541e-01,\n   5.471099260e-01,  5.477580968e-01,  5.484157717e-01,  5.490832715e-01,\n   5.497609341e-01,  5.504491156e-01,  5.511481915e-01,  5.518585583e-01,\n   5.525806353e-01,  5.533148659e-01,  5.540617201e-01,  5.548216962e-01,\n   5.555953236e-01,  5.563831648e-01,  5.571858192e-01,  5.580039255e-01,\n   5.588381660e-01,  5.596892701e-01,  5.605580193e-01,  5.614452520e-01,\n   5.623518694e-01,  5.632788419e-01,  5.642272167e-01,  5.651981257e-01,\n   5.661927957e-01,  5.672125589e-01,  5.682588658e-01,  5.693332996e-01,\n   5.704375930e-01,  5.715736485e-01,  5.727435607e-01,  5.739496441e-01,\n   5.751944653e-01,  5.764808808e-01,  5.778120840e-01,  5.791916600e-01,\n   5.806236539e-01,  5.821126537e-01,  5.836638935e-01,  5.852833820e-01,\n   5.869780657e-01,  5.887560374e-01,  5.906268058e-01,  5.926016517e-01,\n   5.946941033e-01,  5.969205837e-01,  5.993013129e-01,  6.018615930e-01,\n   6.046336933e-01,  6.076597081e-01,  6.109960624e-01,  6.147209672e-01,\n   6.189475113e-01,  6.238484787e-01,  6.297084304e-01,  6.370498843e-01,\n   6.470149727e-01,  6.631069916e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_2[] = {\n   0.000000000e+00,  8.118337049e-02,  1.023138483e-01,  1.174621933e-01,\n   1.297526043e-01,  1.403112116e-01,  1.496887316e-01,  1.582007333e-01,\n   1.660469292e-01,  1.733626958e-01,  1.802445542e-01,  1.867640456e-01,\n   1.929758544e-01,  1.989228414e-01,  2.046393065e-01,  2.101531860e-01,\n   2.154875781e-01,  2.206618321e-01,  2.256923431e-01,  2.305931449e-01,\n   2.353763584e-01,  2.400525381e-01,  2.446309418e-01,  2.491197450e-01,\n   2.535262109e-01,  2.578568297e-01,  2.621174303e-01,  2.663132738e-01,\n   2.704491303e-01,  2.745293430e-01,  2.785578826e-01,  2.825383932e-01,\n   2.864742311e-01,  2.903684984e-01,  2.942240718e-01,  2.980436275e-01,\n   3.018296630e-01,  3.055845160e-01,  3.093103809e-01,  3.130093237e-01,\n   3.166832948e-01,  3.203341406e-01,  3.239636136e-01,  3.275733819e-01,\n   3.311650372e-01,  3.347401025e-01,  3.383000385e-01,  3.418462503e-01,\n   3.453800924e-01,  3.489028742e-01,  3.524158648e-01,  3.559202971e-01,\n   3.594173722e-01,  3.629082628e-01,  3.663941172e-01,  3.698760623e-01,\n   3.733552070e-01,  3.768326452e-01,  3.803094588e-01,  3.837867203e-01,\n   3.872654956e-01,  3.907468468e-01,  3.942318348e-01,  3.977215218e-01,\n   4.012169739e-01,  4.047192640e-01,  4.082294738e-01,  4.117486971e-01,\n   4.152780423e-01,  4.188186351e-01,  4.223716215e-01,  4.259381708e-01,\n   4.295194789e-01,  4.331167715e-01,  4.367313075e-01,  4.403643831e-01,\n   4.440173352e-01,  4.476915465e-01,  4.513884492e-01,  4.551095305e-01,\n   4.588563379e-01,  4.626304849e-01,  4.664336572e-01,  4.702676202e-01,\n   4.741342259e-01,  4.780354221e-01,  4.819732610e-01,  4.859499100e-01,\n   4.899676628e-01,  4.940289525e-01,  4.981363656e-01,  5.022926583e-01,\n   5.065007745e-01,  5.107638665e-01,  5.150853179e-01,  5.194687702e-01,\n   5.239181535e-01,  5.284377209e-01,  5.330320886e-01,  5.377062831e-01,\n   5.424657950e-01,  5.473166429e-01,  5.522654479e-01,  5.573195231e-01,\n   5.624869788e-01,  5.677768502e-01,  5.731992509e-01,  5.787655604e-01,\n   5.844886555e-01,  5.903831966e-01,  5.964659877e-01,  6.027564333e-01,\n   6.092771266e-01,  6.160546161e-01,  6.231204220e-01,  6.305124087e-01,\n   6.382766741e-01,  6.464702150e-01,  6.551647906e-01,  6.644527026e-01,\n   6.744557835e-01,  6.853400369e-01,  6.973408986e-01,  7.108101706e-01,\n   7.263122279e-01,  7.448505278e-01,  7.685278469e-01,  8.033973195e-01,\n   1.000000000e+00,  0.000000000e+00,  3.106621173e-02,  3.865437620e-02,\n   4.396047104e-02,  4.818156417e-02,  5.174682664e-02,  5.486532158e-02,\n   5.765646720e-02,  6.019563397e-02,  6.253378827e-02,  6.470718680e-02,\n   6.674264590e-02,  6.866062137e-02,  7.047711355e-02,  7.220490096e-02,\n   7.385436959e-02,  7.543408836e-02,  7.695121930e-02,  7.841181665e-02,\n   7.982104951e-02,  8.118337049e-02,  8.250264551e-02,  8.378225504e-02,\n   8.502517414e-02,  8.623403642e-02,  8.741118568e-02,  8.855871805e-02,\n   8.967851653e-02,  9.077227977e-02,  9.184154592e-02,  9.288771284e-02,\n   9.391205503e-02,  9.491573821e-02,  9.589983160e-02,  9.686531862e-02,\n   9.781310607e-02,  9.874403212e-02,  9.965887320e-02,  1.005583502e-01,\n   1.014431335e-01,  1.023138483e-01,  1.031710779e-01,  1.040153682e-01,\n   1.048472305e-01,  1.056671445e-01,  1.064755612e-01,  1.072729046e-01,\n   1.080595746e-01,  1.088359484e-01,  1.096023824e-01,  1.103592135e-01,\n   1.111067610e-01,  1.118453273e-01,  1.125751995e-01,  1.132966503e-01,\n   1.140099390e-01,  1.147153123e-01,  1.154130054e-01,  1.161032423e-01,\n   1.167862369e-01,  1.174621933e-01,  1.181313069e-01,  1.187937641e-01,\n   1.194497437e-01,  1.200994169e-01,  1.207429477e-01,  1.213804934e-01,\n   1.220122049e-01,  1.226382274e-01,  1.232587001e-01,  1.238737570e-01,\n   1.244835270e-01,  1.250881342e-01,  1.256876979e-01,  1.262823335e-01,\n   1.268721518e-01,  1.274572599e-01,  1.280377611e-01,  1.286137553e-01,\n   1.291853386e-01,  1.297526043e-01,  1.303156423e-01,  1.308745398e-01,\n   1.314293809e-01,  1.319802472e-01,  1.325272176e-01,  1.330703687e-01,\n   1.336097745e-01,  1.341455069e-01,  1.346776357e-01,  1.352062283e-01,\n   1.357313505e-01,  1.362530658e-01,  1.367714363e-01,  1.372865218e-01,\n   1.377983809e-01,  1.383070703e-01,  1.388126451e-01,  1.393151590e-01,\n   1.398146642e-01,  1.403112116e-01,  1.408048505e-01,  1.412956292e-01,\n   1.417835945e-01,  1.422687921e-01,  1.427512666e-01,  1.432310613e-01,\n   1.437082185e-01,  1.441827795e-01,  1.446547846e-01,  1.451242729e-01,\n   1.455912828e-01,  1.460558516e-01,  1.465180159e-01,  1.469778114e-01,\n   1.474352727e-01,  1.478904340e-01,  1.483433284e-01,  1.487939885e-01,\n   1.492424459e-01,  1.496887316e-01,  1.501328762e-01,  1.505749091e-01,\n   1.510148594e-01,  1.514527556e-01,  1.518886254e-01,  1.523224961e-01,\n   1.527543942e-01,  1.531843458e-01,  6.923874374e-01,  6.929947893e-01,\n   6.936054269e-01,  6.942193962e-01,  6.948367441e-01,  6.954575186e-01,\n   6.960817689e-01,  6.967095451e-01,  6.973408986e-01,  6.979758819e-01,\n   6.986145488e-01,  6.992569543e-01,  6.999031546e-01,  7.005532074e-01,\n   7.012071718e-01,  7.018651083e-01,  7.025270786e-01,  7.031931464e-01,\n   7.038633767e-01,  7.045378361e-01,  7.052165930e-01,  7.058997175e-01,\n   7.065872817e-01,  7.072793592e-01,  7.079760258e-01,  7.086773593e-01,\n   7.093834396e-01,  7.100943486e-01,  7.108101706e-01,  7.115309922e-01,\n   7.122569024e-01,  7.129879928e-01,  7.137243574e-01,  7.144660931e-01,\n   7.152132995e-01,  7.159660793e-01,  7.167245381e-01,  7.174887847e-01,\n   7.182589312e-01,  7.190350932e-01,  7.198173899e-01,  7.206059441e-01,\n   7.214008828e-01,  7.222023368e-01,  7.230104413e-01,  7.238253359e-01,\n   7.246471650e-01,  7.254760775e-01,  7.263122279e-01,  7.271557756e-01,\n   7.280068860e-01,  7.288657300e-01,  7.297324848e-01,  7.306073341e-01,\n   7.314904684e-01,  7.323820852e-01,  7.332823897e-01,  7.341915948e-01,\n   7.351099217e-01,  7.360376006e-01,  7.369748708e-01,  7.379219813e-01,\n   7.388791914e-01,  7.398467716e-01,  7.408250034e-01,  7.418141811e-01,\n   7.428146114e-01,  7.438266152e-01,  7.448505278e-01,  7.458866999e-01,\n   7.469354989e-01,  7.479973096e-01,  7.490725358e-01,  7.501616011e-01,\n   7.512649506e-01,  7.523830523e-01,  7.535163988e-01,  7.546655088e-01,\n   7.558309295e-01,  7.570132385e-01,  7.582130461e-01,  7.594309982e-01,\n   7.606677786e-01,  7.619241127e-01,  7.632007707e-01,  7.644985716e-01,\n   7.658183875e-01,  7.671611482e-01,  7.685278469e-01,  7.699195457e-01,\n   7.713373831e-01,  7.727825808e-01,  7.742564529e-01,  7.757604152e-01,\n   7.772959967e-01,  7.788648518e-01,  7.804687753e-01,  7.821097187e-01,\n   7.837898095e-01,  7.855113740e-01,  7.872769630e-01,  7.890893826e-01,\n   7.909517305e-01,  7.928674385e-01,  7.948403240e-01,  7.968746515e-01,\n   7.989752069e-01,  8.011473886e-01,  8.033973195e-01,  8.057319861e-01,\n   8.081594140e-01,  8.106888897e-01,  8.133312474e-01,  8.160992432e-01,\n   8.190080511e-01,  8.220759342e-01,  8.253251700e-01,  8.287833569e-01,\n   8.324853107e-01,  8.364759073e-01,  8.408145094e-01,  8.455821903e-01,\n   8.508942228e-01,  8.569233339e-01,  8.639474923e-01,  8.724627474e-01,\n   8.835133158e-01,  9.001240145e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_3[] = {\n   0.000000000e+00,  5.156460241e-02,  7.025365981e-02,  8.438877451e-02,\n   9.624538510e-02,  1.066801039e-01,  1.161239739e-01,  1.248293697e-01,\n   1.329588097e-01,  1.406240760e-01,  1.479058747e-01,  1.548646901e-01,\n   1.615472133e-01,  1.679903684e-01,  1.742239464e-01,  1.802723945e-01,\n   1.861560676e-01,  1.918921289e-01,  1.974952111e-01,  2.029779120e-01,\n   2.083511730e-01,  2.136245718e-01,  2.188065524e-01,  2.239046078e-01,\n   2.289254267e-01,  2.338750129e-01,  2.387587830e-01,  2.435816472e-01,\n   2.483480763e-01,  2.530621582e-01,  2.577276455e-01,  2.623479963e-01,\n   2.669264082e-01,  2.714658487e-01,  2.759690802e-01,  2.804386829e-01,\n   2.848770741e-01,  2.892865251e-01,  2.936691765e-01,  2.980270511e-01,\n   3.023620661e-01,  3.066760434e-01,  3.109707190e-01,  3.152477514e-01,\n   3.195087295e-01,  3.237551791e-01,  3.279885693e-01,  3.322103186e-01,\n   3.364217994e-01,  3.406243437e-01,  3.448192468e-01,  3.490077719e-01,\n   3.531911539e-01,  3.573706028e-01,  3.615473075e-01,  3.657224388e-01,\n   3.698971524e-01,  3.740725922e-01,  3.782498930e-01,  3.824301830e-01,\n   3.866145869e-01,  3.908042285e-01,  3.950002331e-01,  3.992037304e-01,\n   4.034158570e-01,  4.076377588e-01,  4.118705944e-01,  4.161155369e-01,\n   4.203737774e-01,  4.246465277e-01,  4.289350232e-01,  4.332405262e-01,\n   4.375643291e-01,  4.419077580e-01,  4.462721760e-01,  4.506589878e-01,\n   4.550696432e-01,  4.595056417e-01,  4.639685378e-01,  4.684599455e-01,\n   4.729815444e-01,  4.775350856e-01,  4.821223984e-01,  4.867453976e-01,\n   4.914060916e-01,  4.961065907e-01,  5.008491176e-01,  5.056360175e-01,\n   5.104697703e-01,  5.153530039e-01,  5.202885089e-01,  5.252792555e-01,\n   5.303284123e-01,  5.354393669e-01,  5.406157509e-01,  5.458614661e-01,\n   5.511807167e-01,  5.565780441e-01,  5.620583690e-01,  5.676270382e-01,\n   5.732898805e-01,  5.790532715e-01,  5.849242090e-01,  5.909104038e-01,\n   5.970203857e-01,  6.032636325e-01,  6.096507236e-01,  6.161935286e-01,\n   6.229054372e-01,  6.298016449e-01,  6.368995094e-01,  6.442190028e-01,\n   6.517832895e-01,  6.596194785e-01,  6.677596156e-01,  6.762420160e-01,\n   6.851130922e-01,  6.944299174e-01,  7.042639193e-01,  7.147063735e-01,\n   7.258768861e-01,  7.379371035e-01,  7.511141635e-01,  7.657438307e-01,\n   7.823578790e-01,  8.018868686e-01,  8.262401558e-01,  8.607404527e-01,\n   1.000000000e+00,  0.000000000e+00,  1.398057981e-02,  1.885775773e-02,\n   2.247762213e-02,  2.546760705e-02,  2.806364241e-02,  3.038435232e-02,\n   3.249914629e-02,  3.445269526e-02,  3.627570700e-02,  3.799033927e-02,\n   3.961318702e-02,  4.115705152e-02,  4.263204764e-02,  4.404632838e-02,\n   4.540657670e-02,  4.671834982e-02,  4.798632654e-02,  4.921448906e-02,\n   5.040625923e-02,  5.156460241e-02,  5.269210797e-02,  5.379105240e-02,\n   5.486344947e-02,  5.591109060e-02,  5.693557753e-02,  5.793834915e-02,\n   5.892070362e-02,  5.988381679e-02,  6.082875765e-02,  6.175650138e-02,\n   6.266794040e-02,  6.356389381e-02,  6.444511551e-02,  6.531230118e-02,\n   6.616609438e-02,  6.700709179e-02,  6.783584783e-02,  6.865287871e-02,\n   6.945866602e-02,  7.025365981e-02,  7.103828147e-02,  7.181292613e-02,\n   7.257796493e-02,  7.333374698e-02,  7.408060113e-02,  7.481883757e-02,\n   7.554874930e-02,  7.627061336e-02,  7.698469208e-02,  7.769123412e-02,\n   7.839047540e-02,  7.908264007e-02,  7.976794123e-02,  8.044658173e-02,\n   8.111875481e-02,  8.178464473e-02,  8.244442735e-02,  8.309827063e-02,\n   8.374633515e-02,  8.438877451e-02,  8.502573577e-02,  8.565735985e-02,\n   8.628378182e-02,  8.690513130e-02,  8.752153271e-02,  8.813310559e-02,\n   8.873996484e-02,  8.934222097e-02,  8.993998036e-02,  9.053334540e-02,\n   9.112241477e-02,  9.170728360e-02,  9.228804363e-02,  9.286478336e-02,\n   9.343758828e-02,  9.400654092e-02,  9.457172106e-02,  9.513320582e-02,\n   9.569106977e-02,  9.624538510e-02,  9.679622166e-02,  9.734364711e-02,\n   9.788772701e-02,  9.842852486e-02,  9.896610226e-02,  9.950051894e-02,\n   1.000318329e-01,  1.005601003e-01,  1.010853758e-01,  1.016077124e-01,\n   1.021271618e-01,  1.026437739e-01,  1.031575974e-01,  1.036686798e-01,\n   1.041770670e-01,  1.046828039e-01,  1.051859341e-01,  1.056865001e-01,\n   1.061845433e-01,  1.066801039e-01,  1.071732212e-01,  1.076639335e-01,\n   1.081522780e-01,  1.086382913e-01,  1.091220086e-01,  1.096034647e-01,\n   1.100826934e-01,  1.105597275e-01,  1.110345994e-01,  1.115073404e-01,\n   1.119779812e-01,  1.124465519e-01,  1.129130817e-01,  1.133775993e-01,\n   1.138401327e-01,  1.143007093e-01,  1.147593557e-01,  1.152160984e-01,\n   1.156709627e-01,  1.161239739e-01,  1.165751564e-01,  1.170245343e-01,\n   1.174721310e-01,  1.179179696e-01,  1.183620727e-01,  1.188044622e-01,\n   1.192451599e-01,  1.196841870e-01,  7.456909806e-01,  7.463571329e-01,\n   7.470265510e-01,  7.476992788e-01,  7.483753609e-01,  7.490548432e-01,\n   7.497377723e-01,  7.504241961e-01,  7.511141635e-01,  7.518077242e-01,\n   7.525049294e-01,  7.532058313e-01,  7.539104833e-01,  7.546189402e-01,\n   7.553312577e-01,  7.560474932e-01,  7.567677052e-01,  7.574919539e-01,\n   7.582203006e-01,  7.589528084e-01,  7.596895418e-01,  7.604305669e-01,\n   7.611759515e-01,  7.619257652e-01,  7.626800792e-01,  7.634389667e-01,\n   7.642025028e-01,  7.649707644e-01,  7.657438307e-01,  7.665217828e-01,\n   7.673047042e-01,  7.680926807e-01,  7.688858002e-01,  7.696841533e-01,\n   7.704878332e-01,  7.712969356e-01,  7.721115591e-01,  7.729318051e-01,\n   7.737577780e-01,  7.745895855e-01,  7.754273384e-01,  7.762711507e-01,\n   7.771211403e-01,  7.779774286e-01,  7.788401409e-01,  7.797094063e-01,\n   7.805853585e-01,  7.814681353e-01,  7.823578790e-01,  7.832547370e-01,\n   7.841588615e-01,  7.850704101e-01,  7.859895456e-01,  7.869164370e-01,\n   7.878512591e-01,  7.887941932e-01,  7.897454271e-01,  7.907051558e-01,\n   7.916735817e-01,  7.926509150e-01,  7.936373739e-01,  7.946331856e-01,\n   7.956385861e-01,  7.966538213e-01,  7.976791471e-01,  7.987148305e-01,\n   7.997611495e-01,  8.008183944e-01,  8.018868686e-01,  8.029668886e-01,\n   8.040587859e-01,  8.051629071e-01,  8.062796153e-01,  8.074092912e-01,\n   8.085523340e-01,  8.097091631e-01,  8.108802190e-01,  8.120659654e-01,\n   8.132668904e-01,  8.144835083e-01,  8.157163620e-01,  8.169660251e-01,\n   8.182331038e-01,  8.195182403e-01,  8.208221152e-01,  8.221454510e-01,\n   8.234890157e-01,  8.248536268e-01,  8.262401558e-01,  8.276495330e-01,\n   8.290827536e-01,  8.305408836e-01,  8.320250672e-01,  8.335365346e-01,\n   8.350766114e-01,  8.366467291e-01,  8.382484368e-01,  8.398834151e-01,\n   8.415534919e-01,  8.432606605e-01,  8.450071012e-01,  8.467952062e-01,\n   8.486276087e-01,  8.505072177e-01,  8.524372594e-01,  8.544213264e-01,\n   8.564634377e-01,  8.585681112e-01,  8.607404527e-01,  8.629862668e-01,\n   8.653121948e-01,  8.677258898e-01,  8.702362415e-01,  8.728536674e-01,\n   8.755904988e-01,  8.784614987e-01,  8.814845727e-01,  8.846817666e-01,\n   8.880807064e-01,  8.917167395e-01,  8.956362464e-01,  8.999019968e-01,\n   9.046023235e-01,  9.098680170e-01,  9.159065992e-01,  9.230819916e-01,\n   9.321428628e-01,  9.451837998e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_4[] = {\n   0.000000000e+00,  2.695397666e-02,  4.110739181e-02,  5.271023992e-02,\n   6.294554102e-02,  7.228895093e-02,  8.099050278e-02,  8.920152585e-02,\n   9.702212136e-02,  1.045227143e-01,  1.117551555e-01,  1.187589803e-01,\n   1.255651847e-01,  1.321986273e-01,  1.386796250e-01,  1.450250504e-01,\n   1.512491094e-01,  1.573639064e-01,  1.633798640e-01,  1.693060405e-01,\n   1.751503742e-01,  1.809198748e-01,  1.866207738e-01,  1.922586462e-01,\n   1.978385079e-01,  2.033648961e-01,  2.088419351e-01,  2.142733916e-01,\n   2.196627203e-01,  2.250131029e-01,  2.303274813e-01,  2.356085856e-01,\n   2.408589583e-01,  2.460809752e-01,  2.512768640e-01,  2.564487197e-01,\n   2.615985188e-01,  2.667281314e-01,  2.718393326e-01,  2.769338112e-01,\n   2.820131792e-01,  2.870789793e-01,  2.921326916e-01,  2.971757400e-01,\n   3.022094980e-01,  3.072352941e-01,  3.122544161e-01,  3.172681156e-01,\n   3.222776124e-01,  3.272840979e-01,  3.322887385e-01,  3.372926793e-01,\n   3.422970469e-01,  3.473029522e-01,  3.523114934e-01,  3.573237587e-01,\n   3.623408286e-01,  3.673637785e-01,  3.723936814e-01,  3.774316097e-01,\n   3.824786379e-01,  3.875358450e-01,  3.926043164e-01,  3.976851468e-01,\n   4.027794421e-01,  4.078883217e-01,  4.130129215e-01,  4.181543958e-01,\n   4.233139204e-01,  4.284926949e-01,  4.336919457e-01,  4.389129288e-01,\n   4.441569331e-01,  4.494252836e-01,  4.547193448e-01,  4.600405246e-01,\n   4.653902779e-01,  4.707701111e-01,  4.761815870e-01,  4.816263290e-01,\n   4.871060271e-01,  4.926224433e-01,  4.981774184e-01,  5.037728783e-01,\n   5.094108423e-01,  5.150934308e-01,  5.208228750e-01,  5.266015268e-01,\n   5.324318701e-01,  5.383165335e-01,  5.442583041e-01,  5.502601433e-01,\n   5.563252043e-01,  5.624568518e-01,  5.686586846e-01,  5.749345607e-01,\n   5.812886264e-01,  5.877253491e-01,  5.942495554e-01,  6.008664749e-01,\n   6.075817905e-01,  6.144016976e-01,  6.213329733e-01,  6.283830574e-01,\n   6.355601490e-01,  6.428733212e-01,  6.503326593e-01,  6.579494274e-01,\n   6.657362730e-01,  6.737074776e-01,  6.818792696e-01,  6.902702175e-01,\n   6.989017310e-01,  7.077987082e-01,  7.169903835e-01,  7.265114597e-01,\n   7.364036473e-01,  7.467178077e-01,  7.575170125e-01,  7.688810512e-01,\n   7.809133174e-01,  7.937518080e-01,  8.075876893e-01,  8.226989287e-01,\n   8.395172100e-01,  8.587798418e-01,  8.819520410e-01,  9.129255057e-01,\n   1.000000000e+00,  0.000000000e+00,  4.436153319e-03,  6.724776836e-03,\n   8.579782530e-03,  1.020018075e-02,  1.166622129e-02,  1.302018774e-02,\n   1.428772259e-02,  1.548581635e-02,  1.662643929e-02,  1.771841462e-02,\n   1.876847575e-02,  1.978190484e-02,  2.076293954e-02,  2.171504335e-02,\n   2.264109181e-02,  2.354350451e-02,  2.442434118e-02,  2.528537304e-02,\n   2.612813687e-02,  2.695397666e-02,  2.776407614e-02,  2.855948457e-02,\n   2.934113737e-02,  3.010987288e-02,  3.086644598e-02,  3.161153943e-02,\n   3.234577324e-02,  3.306971250e-02,  3.378387404e-02,  3.448873210e-02,\n   3.518472306e-02,  3.587224962e-02,  3.655168439e-02,  3.722337291e-02,\n   3.788763640e-02,  3.854477410e-02,  3.919506535e-02,  3.983877138e-02,\n   4.047613696e-02,  4.110739181e-02,  4.173275189e-02,  4.235242053e-02,\n   4.296658945e-02,  4.357543968e-02,  4.417914239e-02,  4.477785961e-02,\n   4.537174492e-02,  4.596094408e-02,  4.654559553e-02,  4.712583097e-02,\n   4.770177574e-02,  4.827354931e-02,  4.884126561e-02,  4.940503342e-02,\n   4.996495668e-02,  5.052113480e-02,  5.107366292e-02,  5.162263217e-02,\n   5.216812991e-02,  5.271023992e-02,  5.324904267e-02,  5.378461543e-02,\n   5.431703246e-02,  5.484636523e-02,  5.537268250e-02,  5.589605048e-02,\n   5.641653298e-02,  5.693419153e-02,  5.744908547e-02,  5.796127208e-02,\n   5.847080666e-02,  5.897774265e-02,  5.948213171e-02,  5.998402377e-02,\n   6.048346718e-02,  6.098050871e-02,  6.147519364e-02,  6.196756587e-02,\n   6.245766792e-02,  6.294554102e-02,  6.343122517e-02,  6.391475917e-02,\n   6.439618068e-02,  6.487552629e-02,  6.535283151e-02,  6.582813087e-02,\n   6.630145792e-02,  6.677284528e-02,  6.724232470e-02,  6.770992704e-02,\n   6.817568236e-02,  6.863961991e-02,  6.910176818e-02,  6.956215492e-02,\n   7.002080718e-02,  7.047775130e-02,  7.093301298e-02,  7.138661729e-02,\n   7.183858866e-02,  7.228895093e-02,  7.273772739e-02,  7.318494074e-02,\n   7.363061317e-02,  7.407476635e-02,  7.451742143e-02,  7.495859908e-02,\n   7.539831952e-02,  7.583660250e-02,  7.627346732e-02,  7.670893287e-02,\n   7.714301762e-02,  7.757573964e-02,  7.800711661e-02,  7.843716584e-02,\n   7.886590425e-02,  7.929334845e-02,  7.971951465e-02,  8.014441878e-02,\n   8.056807640e-02,  8.099050278e-02,  8.141171289e-02,  8.183172137e-02,\n   8.225054261e-02,  8.266819069e-02,  8.308467942e-02,  8.350002236e-02,\n   8.391423279e-02,  8.432732375e-02,  8.019183596e-01,  8.026166567e-01,\n   8.033178420e-01,  8.040219518e-01,  8.047290229e-01,  8.054390933e-01,\n   8.061522014e-01,  8.068683867e-01,  8.075876893e-01,  8.083101502e-01,\n   8.090358116e-01,  8.097647162e-01,  8.104969079e-01,  8.112324314e-01,\n   8.119713326e-01,  8.127136583e-01,  8.134594563e-01,  8.142087757e-01,\n   8.149616666e-01,  8.157181803e-01,  8.164783694e-01,  8.172422875e-01,\n   8.180099898e-01,  8.187815326e-01,  8.195569738e-01,  8.203363725e-01,\n   8.211197895e-01,  8.219072870e-01,  8.226989287e-01,  8.234947802e-01,\n   8.242949085e-01,  8.250993827e-01,  8.259082735e-01,  8.267216535e-01,\n   8.275395973e-01,  8.283621817e-01,  8.291894854e-01,  8.300215893e-01,\n   8.308585769e-01,  8.317005337e-01,  8.325475479e-01,  8.333997102e-01,\n   8.342571142e-01,  8.351198559e-01,  8.359880345e-01,  8.368617522e-01,\n   8.377411143e-01,  8.386262295e-01,  8.395172100e-01,  8.404141714e-01,\n   8.413172332e-01,  8.422265189e-01,  8.431421561e-01,  8.440642767e-01,\n   8.449930171e-01,  8.459285186e-01,  8.468709272e-01,  8.478203945e-01,\n   8.487770774e-01,  8.497411386e-01,  8.507127467e-01,  8.516920771e-01,\n   8.526793117e-01,  8.536746395e-01,  8.546782569e-01,  8.556903686e-01,\n   8.567111873e-01,  8.577409347e-01,  8.587798418e-01,  8.598281498e-01,\n   8.608861101e-01,  8.619539854e-01,  8.630320505e-01,  8.641205926e-01,\n   8.652199125e-01,  8.663303254e-01,  8.674521617e-01,  8.685857685e-01,\n   8.697315103e-01,  8.708897703e-01,  8.720609522e-01,  8.732454813e-01,\n   8.744438061e-01,  8.756564006e-01,  8.768837659e-01,  8.781264326e-01,\n   8.793849630e-01,  8.806599542e-01,  8.819520410e-01,  8.832618993e-01,\n   8.845902496e-01,  8.859378618e-01,  8.873055594e-01,  8.886942252e-01,\n   8.901048075e-01,  8.915383267e-01,  8.929958833e-01,  8.944786672e-01,\n   8.959879676e-01,  8.975251852e-01,  8.990918462e-01,  9.006896182e-01,\n   9.023203291e-01,  9.039859898e-01,  9.056888200e-01,  9.074312801e-01,\n   9.092161090e-01,  9.110463698e-01,  9.129255057e-01,  9.148574089e-01,\n   9.168465065e-01,  9.188978685e-01,  9.210173448e-01,  9.232117431e-01,\n   9.254890618e-01,  9.278588003e-01,  9.303323819e-01,  9.329237415e-01,\n   9.356501662e-01,  9.385335328e-01,  9.416021983e-01,  9.448940215e-01,\n   9.484614628e-01,  9.523808247e-01,  9.567706423e-01,  9.618334432e-01,\n   9.679718812e-01,  9.762561128e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_5[] = {\n   0.000000000e+00,  1.053468150e-02,  1.893424839e-02,  2.670341150e-02,\n   3.410025603e-02,  4.123932205e-02,  4.818498632e-02,  5.497827400e-02,\n   6.164749562e-02,  6.821330149e-02,  7.469138542e-02,  8.109405867e-02,\n   8.743122657e-02,  9.371102570e-02,  9.994025655e-02,  1.061246874e-01,\n   1.122692738e-01,  1.183783207e-01,  1.244556048e-01,  1.305044690e-01,\n   1.365278954e-01,  1.425285640e-01,  1.485088988e-01,  1.544711060e-01,\n   1.604172048e-01,  1.663490530e-01,  1.722683685e-01,  1.781767471e-01,\n   1.840756778e-01,  1.899665557e-01,  1.958506934e-01,  2.017293303e-01,\n   2.076036411e-01,  2.134747431e-01,  2.193437025e-01,  2.252115402e-01,\n   2.310792371e-01,  2.369477377e-01,  2.428179552e-01,  2.486907742e-01,\n   2.545670547e-01,  2.604476345e-01,  2.663333323e-01,  2.722249500e-01,\n   2.781232753e-01,  2.840290833e-01,  2.899431390e-01,  2.958661990e-01,\n   3.017990133e-01,  3.077423268e-01,  3.136968814e-01,  3.196634169e-01,\n   3.256426728e-01,  3.316353900e-01,  3.376423118e-01,  3.436641855e-01,\n   3.497017638e-01,  3.557558059e-01,  3.618270793e-01,  3.679163611e-01,\n   3.740244391e-01,  3.801521133e-01,  3.863001978e-01,  3.924695218e-01,\n   3.986609314e-01,  4.048752910e-01,  4.111134853e-01,  4.173764208e-01,\n   4.236650276e-01,  4.299802616e-01,  4.363231062e-01,  4.426945749e-01,\n   4.490957131e-01,  4.555276009e-01,  4.619913555e-01,  4.684881343e-01,\n   4.750191374e-01,  4.815856116e-01,  4.881888530e-01,  4.948302116e-01,\n   5.015110950e-01,  5.082329728e-01,  5.149973816e-01,  5.218059306e-01,\n   5.286603068e-01,  5.355622819e-01,  5.425137191e-01,  5.495165810e-01,\n   5.565729380e-01,  5.636849781e-01,  5.708550169e-01,  5.780855103e-01,\n   5.853790668e-01,  5.927384627e-01,  6.001666588e-01,  6.076668193e-01,\n   6.152423327e-01,  6.228968364e-01,  6.306342446e-01,  6.384587797e-01,\n   6.463750090e-01,  6.543878876e-01,  6.625028072e-01,  6.707256544e-01,\n   6.790628786e-01,  6.875215726e-01,  6.961095689e-01,  7.048355554e-01,\n   7.137092154e-01,  7.227413990e-01,  7.319443343e-01,  7.413318912e-01,\n   7.509199142e-01,  7.607266476e-01,  7.707732885e-01,  7.810847149e-01,\n   7.916904656e-01,  8.026260868e-01,  8.139350287e-01,  8.256713978e-01,\n   8.379040937e-01,  8.507232981e-01,  8.642512048e-01,  8.786610083e-01,\n   8.942136605e-01,  9.113385802e-01,  9.308485605e-01,  9.547510451e-01,\n   1.000000000e+00,  0.000000000e+00,  8.424954622e-04,  1.510777833e-03,\n   2.126155588e-03,  2.709575813e-03,  3.270370962e-03,  3.813802212e-03,\n   4.343230316e-03,  4.860978581e-03,  5.368743714e-03,  5.867815971e-03,\n   6.359207543e-03,  6.843732341e-03,  7.322058131e-03,  7.794741990e-03,\n   8.262255245e-03,  8.725001497e-03,  9.183329973e-03,  9.637545607e-03,\n   1.008791680e-02,  1.053468150e-02,  1.097805198e-02,  1.141821870e-02,\n   1.185535346e-02,  1.228961191e-02,  1.272113573e-02,  1.315005435e-02,\n   1.357648646e-02,  1.400054125e-02,  1.442231949e-02,  1.484191445e-02,\n   1.525941267e-02,  1.567489467e-02,  1.608843554e-02,  1.650010543e-02,\n   1.690997004e-02,  1.731809103e-02,  1.772452633e-02,  1.812933049e-02,\n   1.853255498e-02,  1.893424839e-02,  1.933445669e-02,  1.973322342e-02,\n   2.013058989e-02,  2.052659533e-02,  2.092127702e-02,  2.131467048e-02,\n   2.170680952e-02,  2.209772644e-02,  2.248745204e-02,  2.287601578e-02,\n   2.326344584e-02,  2.364976921e-02,  2.403501176e-02,  2.441919828e-02,\n   2.480235258e-02,  2.518449755e-02,  2.556565516e-02,  2.594584657e-02,\n   2.632509215e-02,  2.670341150e-02,  2.708082354e-02,  2.745734650e-02,\n   2.783299797e-02,  2.820779496e-02,  2.858175387e-02,  2.895489058e-02,\n   2.932722044e-02,  2.969875830e-02,  3.006951854e-02,  3.043951509e-02,\n   3.080876143e-02,  3.117727067e-02,  3.154505548e-02,  3.191212818e-02,\n   3.227850073e-02,  3.264418472e-02,  3.300919144e-02,  3.337353184e-02,\n   3.373721659e-02,  3.410025603e-02,  3.446266025e-02,  3.482443907e-02,\n   3.518560202e-02,  3.554615842e-02,  3.590611733e-02,  3.626548757e-02,\n   3.662427775e-02,  3.698249628e-02,  3.734015132e-02,  3.769725088e-02,\n   3.805380273e-02,  3.840981451e-02,  3.876529362e-02,  3.912024733e-02,\n   3.947468272e-02,  3.982860673e-02,  4.018202612e-02,  4.053494752e-02,\n   4.088737738e-02,  4.123932205e-02,  4.159078772e-02,  4.194178045e-02,\n   4.229230616e-02,  4.264237067e-02,  4.299197965e-02,  4.334113869e-02,\n   4.368985322e-02,  4.403812861e-02,  4.438597007e-02,  4.473338274e-02,\n   4.508037166e-02,  4.542694175e-02,  4.577309785e-02,  4.611884471e-02,\n   4.646418698e-02,  4.680912922e-02,  4.715367592e-02,  4.749783147e-02,\n   4.784160019e-02,  4.818498632e-02,  4.852799402e-02,  4.887062737e-02,\n   4.921289040e-02,  4.955478703e-02,  4.989632116e-02,  5.023749658e-02,\n   5.057831703e-02,  5.091878620e-02,  8.587453655e-01,  8.594263632e-01,\n   8.601093810e-01,  8.607944415e-01,  8.614815677e-01,  8.621707830e-01,\n   8.628621113e-01,  8.635555770e-01,  8.642512048e-01,  8.649490202e-01,\n   8.656490489e-01,  8.663513174e-01,  8.670558526e-01,  8.677626819e-01,\n   8.684718333e-01,  8.691833356e-01,  8.698972179e-01,  8.706135101e-01,\n   8.713322427e-01,  8.720534469e-01,  8.727771546e-01,  8.735033983e-01,\n   8.742322113e-01,  8.749636277e-01,  8.756976824e-01,  8.764344108e-01,\n   8.771738496e-01,  8.779160360e-01,  8.786610083e-01,  8.794088055e-01,\n   8.801594677e-01,  8.809130361e-01,  8.816695526e-01,  8.824290603e-01,\n   8.831916036e-01,  8.839572277e-01,  8.847259792e-01,  8.854979056e-01,\n   8.862730562e-01,  8.870514810e-01,  8.878332318e-01,  8.886183616e-01,\n   8.894069249e-01,  8.901989777e-01,  8.909945777e-01,  8.917937841e-01,\n   8.925966579e-01,  8.934032618e-01,  8.942136605e-01,  8.950279204e-01,\n   8.958461103e-01,  8.966683007e-01,  8.974945645e-01,  8.983249770e-01,\n   8.991596157e-01,  8.999985607e-01,  9.008418949e-01,  9.016897036e-01,\n   9.025420753e-01,  9.033991014e-01,  9.042608765e-01,  9.051274985e-01,\n   9.059990690e-01,  9.068756930e-01,  9.077574796e-01,  9.086445418e-01,\n   9.095369973e-01,  9.104349678e-01,  9.113385802e-01,  9.122479663e-01,\n   9.131632634e-01,  9.140846143e-01,  9.150121680e-01,  9.159460798e-01,\n   9.168865118e-01,  9.178336333e-01,  9.187876212e-01,  9.197486607e-01,\n   9.207169457e-01,  9.216926794e-01,  9.226760749e-01,  9.236673561e-01,\n   9.246667582e-01,  9.256745288e-01,  9.266909287e-01,  9.277162330e-01,\n   9.287507320e-01,  9.297947328e-01,  9.308485605e-01,  9.319125596e-01,\n   9.329870961e-01,  9.340725589e-01,  9.351693623e-01,  9.362779484e-01,\n   9.373987896e-01,  9.385323917e-01,  9.396792975e-01,  9.408400906e-01,\n   9.420154000e-01,  9.432059051e-01,  9.444123418e-01,  9.456355094e-01,\n   9.468762787e-01,  9.481356010e-01,  9.494145196e-01,  9.507141826e-01,\n   9.520358589e-01,  9.533809563e-01,  9.547510451e-01,  9.561478852e-01,\n   9.575734606e-01,  9.590300224e-01,  9.605201424e-01,  9.620467824e-01,\n   9.636133836e-01,  9.652239848e-01,  9.668833810e-01,  9.685973419e-01,\n   9.703729186e-01,  9.722188896e-01,  9.741464305e-01,  9.761701640e-01,\n   9.783098958e-01,  9.805936863e-01,  9.830637927e-01,  9.857897143e-01,\n   9.889029123e-01,  9.927278148e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_6[] = {\n   0.000000000e+00,  2.669205160e-03,  6.088322551e-03,  9.863908821e-03,\n   1.389246828e-02,  1.812115190e-02,  2.251727391e-02,  2.705842519e-02,\n   3.172820346e-02,  3.651404450e-02,  4.140599601e-02,  4.639596910e-02,\n   5.147725407e-02,  5.664419245e-02,  6.189194680e-02,  6.721633389e-02,\n   7.261370088e-02,  7.808083136e-02,  8.361487268e-02,  8.921327881e-02,\n   9.487376485e-02,  1.005942703e-01,  1.063729289e-01,  1.122080441e-01,\n   1.180980684e-01,  1.240415859e-01,  1.300372978e-01,  1.360840101e-01,\n   1.421806228e-01,  1.483261204e-01,  1.545195648e-01,  1.607600875e-01,\n   1.670468840e-01,  1.733792086e-01,  1.797563692e-01,  1.861777239e-01,\n   1.926426767e-01,  1.991506748e-01,  2.057012051e-01,  2.122937922e-01,\n   2.189279958e-01,  2.256034087e-01,  2.323196548e-01,  2.390763876e-01,\n   2.458732888e-01,  2.527100668e-01,  2.595864553e-01,  2.665022128e-01,\n   2.734571211e-01,  2.804509845e-01,  2.874836295e-01,  2.945549035e-01,\n   3.016646747e-01,  3.088128311e-01,  3.159992806e-01,  3.232239502e-01,\n   3.304867859e-01,  3.377877523e-01,  3.451268323e-01,  3.525040275e-01,\n   3.599193573e-01,  3.673728596e-01,  3.748645903e-01,  3.823946237e-01,\n   3.899630524e-01,  3.975699876e-01,  4.052155592e-01,  4.128999164e-01,\n   4.206232276e-01,  4.283856810e-01,  4.361874853e-01,  4.440288697e-01,\n   4.519100851e-01,  4.598314042e-01,  4.677931227e-01,  4.757955598e-01,\n   4.838390594e-01,  4.919239909e-01,  5.000507504e-01,  5.082197619e-01,\n   5.164314786e-01,  5.246863847e-01,  5.329849966e-01,  5.413278651e-01,\n   5.497155771e-01,  5.581487580e-01,  5.666280741e-01,  5.751542350e-01,\n   5.837279971e-01,  5.923501663e-01,  6.010216021e-01,  6.097432215e-01,\n   6.185160033e-01,  6.273409935e-01,  6.362193109e-01,  6.451521531e-01,\n   6.541408043e-01,  6.631866428e-01,  6.722911505e-01,  6.814559234e-01,\n   6.906826835e-01,  6.999732925e-01,  7.093297678e-01,  7.187543009e-01,\n   7.282492787e-01,  7.378173088e-01,  7.474612494e-01,  7.571842443e-01,\n   7.669897653e-01,  7.768816635e-01,  7.868642309e-01,  7.969422779e-01,\n   8.071212275e-01,  8.174072362e-01,  8.278073465e-01,  8.383296863e-01,\n   8.489837309e-01,  8.597806565e-01,  8.707338286e-01,  8.818594933e-01,\n   8.931777918e-01,  9.047143078e-01,  9.165025492e-01,  9.285881864e-01,\n   9.410369298e-01,  9.539509923e-01,  9.675102450e-01,  9.821140101e-01,\n   1.000000000e+00,  0.000000000e+00,  7.569904464e-05,  1.726160003e-04,\n   2.795722377e-04,  3.936192764e-04,  5.132475999e-04,  6.375209993e-04,\n   7.657956763e-04,  8.975988670e-04,  1.032567160e-03,  1.170411605e-03,\n   1.310896404e-03,  1.453825114e-03,  1.599031306e-03,  1.746371990e-03,\n   1.895722862e-03,  2.046974768e-03,  2.200031014e-03,  2.354805292e-03,\n   2.511220044e-03,  2.669205160e-03,  2.828696920e-03,  2.989637138e-03,\n   3.151972448e-03,  3.315653711e-03,  3.480635518e-03,  3.646875770e-03,\n   3.814335317e-03,  3.982977649e-03,  4.152768628e-03,  4.323676264e-03,\n   4.495670505e-03,  4.668723064e-03,  4.842807265e-03,  5.017897900e-03,\n   5.193971114e-03,  5.371004290e-03,  5.548975956e-03,  5.727865696e-03,\n   5.907654072e-03,  6.088322551e-03,  6.269853446e-03,  6.452229854e-03,\n   6.635435603e-03,  6.819455209e-03,  7.004273826e-03,  7.189877208e-03,\n   7.376251674e-03,  7.563384072e-03,  7.751261751e-03,  7.939872526e-03,\n   8.129204659e-03,  8.319246830e-03,  8.509988114e-03,  8.701417963e-03,\n   8.893526185e-03,  9.086302923e-03,  9.279738642e-03,  9.473824113e-03,\n   9.668550394e-03,  9.863908821e-03,  1.005989099e-02,  1.025648876e-02,\n   1.045369420e-02,  1.065149965e-02,  1.084989763e-02,  1.104888089e-02,\n   1.124844238e-02,  1.144857524e-02,  1.164927278e-02,  1.185052850e-02,\n   1.205233607e-02,  1.225468932e-02,  1.245758224e-02,  1.266100896e-02,\n   1.286496376e-02,  1.306944107e-02,  1.327443543e-02,  1.347994152e-02,\n   1.368595417e-02,  1.389246828e-02,  1.409947890e-02,  1.430698120e-02,\n   1.451497042e-02,  1.472344193e-02,  1.493239121e-02,  1.514181381e-02,\n   1.535170540e-02,  1.556206172e-02,  1.577287861e-02,  1.598415199e-02,\n   1.619587787e-02,  1.640805233e-02,  1.662067154e-02,  1.683373174e-02,\n   1.704722923e-02,  1.726116040e-02,  1.747552170e-02,  1.769030966e-02,\n   1.790552084e-02,  1.812115190e-02,  1.833719955e-02,  1.855366056e-02,\n   1.877053174e-02,  1.898780998e-02,  1.920549222e-02,  1.942357544e-02,\n   1.964205669e-02,  1.986093306e-02,  2.008020169e-02,  2.029985976e-02,\n   2.051990453e-02,  2.074033326e-02,  2.096114329e-02,  2.118233198e-02,\n   2.140389674e-02,  2.162583503e-02,  2.184814434e-02,  2.207082221e-02,\n   2.229386620e-02,  2.251727391e-02,  2.274104301e-02,  2.296517116e-02,\n   2.318965608e-02,  2.341449552e-02,  2.363968726e-02,  2.386522912e-02,\n   2.409111894e-02,  2.431735460e-02,  9.117544630e-01,  9.123454960e-01,\n   9.129372249e-01,  9.135296555e-01,  9.141227938e-01,  9.147166461e-01,\n   9.153112185e-01,  9.159065173e-01,  9.165025492e-01,  9.170993205e-01,\n   9.176968381e-01,  9.182951087e-01,  9.188941393e-01,  9.194939369e-01,\n   9.200945088e-01,  9.206958623e-01,  9.212980048e-01,  9.219009439e-01,\n   9.225046875e-01,  9.231092434e-01,  9.237146197e-01,  9.243208246e-01,\n   9.249278665e-01,  9.255357539e-01,  9.261444957e-01,  9.267541006e-01,\n   9.273645778e-01,  9.279759366e-01,  9.285881864e-01,  9.292013369e-01,\n   9.298153980e-01,  9.304303798e-01,  9.310462927e-01,  9.316631472e-01,\n   9.322809540e-01,  9.328997242e-01,  9.335194692e-01,  9.341402003e-01,\n   9.347619296e-01,  9.353846690e-01,  9.360084310e-01,  9.366332282e-01,\n   9.372590737e-01,  9.378859807e-01,  9.385139630e-01,  9.391430345e-01,\n   9.397732096e-01,  9.404045030e-01,  9.410369298e-01,  9.416705057e-01,\n   9.423052464e-01,  9.429411685e-01,  9.435782887e-01,  9.442166244e-01,\n   9.448561933e-01,  9.454970138e-01,  9.461391047e-01,  9.467824854e-01,\n   9.474271759e-01,  9.480731968e-01,  9.487205694e-01,  9.493693155e-01,\n   9.500194578e-01,  9.506710195e-01,  9.513240247e-01,  9.519784985e-01,\n   9.526344664e-01,  9.532919551e-01,  9.539509923e-01,  9.546116063e-01,\n   9.552738268e-01,  9.559376845e-01,  9.566032111e-01,  9.572704397e-01,\n   9.579394046e-01,  9.586101414e-01,  9.592826872e-01,  9.599570806e-01,\n   9.606333619e-01,  9.613115729e-01,  9.619917576e-01,  9.626739615e-01,\n   9.633582326e-01,  9.640446207e-01,  9.647331784e-01,  9.654239605e-01,\n   9.661170247e-01,  9.668124316e-01,  9.675102450e-01,  9.682105320e-01,\n   9.689133635e-01,  9.696188143e-01,  9.703269635e-01,  9.710378950e-01,\n   9.717516978e-01,  9.724684664e-01,  9.731883015e-01,  9.739113106e-01,\n   9.746376085e-01,  9.753673182e-01,  9.761005718e-01,  9.768375115e-01,\n   9.775782907e-01,  9.783230757e-01,  9.790720467e-01,  9.798254001e-01,\n   9.805833507e-01,  9.813461342e-01,  9.821140101e-01,  9.828872661e-01,\n   9.836662221e-01,  9.844512362e-01,  9.852427119e-01,  9.860411067e-01,\n   9.868469435e-01,  9.876608258e-01,  9.884834569e-01,  9.893156663e-01,\n   9.901584463e-01,  9.910130034e-01,  9.918808341e-01,  9.927638409e-01,\n   9.936645176e-01,  9.945862671e-01,  9.955339916e-01,  9.965153278e-01,\n   9.975437379e-01,  9.986491696e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_7[] = {\n   0.000000000e+00,  3.568661949e-04,  1.146997717e-03,  2.270594482e-03,\n   3.685819090e-03,  5.366609188e-03,  7.294389619e-03,  9.454901165e-03,\n   1.183666135e-02,  1.443010733e-02,  1.722707285e-02,  2.022044723e-02,\n   2.340394177e-02,  2.677192315e-02,  3.031929086e-02,  3.404138463e-02,\n   3.793391292e-02,  4.199289664e-02,  4.621462413e-02,  5.059561463e-02,\n   5.513258823e-02,  5.982244100e-02,  6.466222396e-02,  6.964912543e-02,\n   7.478045583e-02,  8.005363467e-02,  8.546617930e-02,  9.101569501e-02,\n   9.669986644e-02,  1.025164499e-01,  1.084632668e-01,  1.145381973e-01,\n   1.207391754e-01,  1.270641836e-01,  1.335112489e-01,  1.400784385e-01,\n   1.467638567e-01,  1.535656411e-01,  1.604819596e-01,  1.675110082e-01,\n   1.746510076e-01,  1.819002013e-01,  1.892568535e-01,  1.967192466e-01,\n   2.042856794e-01,  2.119544654e-01,  2.197239312e-01,  2.275924142e-01,\n   2.355582618e-01,  2.436198295e-01,  2.517754795e-01,  2.600235794e-01,\n   2.683625008e-01,  2.767906180e-01,  2.853063069e-01,  2.939079434e-01,\n   3.025939027e-01,  3.113625577e-01,  3.202122779e-01,  3.291414284e-01,\n   3.381483684e-01,  3.472314504e-01,  3.563890189e-01,  3.656194090e-01,\n   3.749209454e-01,  3.842919413e-01,  3.937306967e-01,  4.032354976e-01,\n   4.128046145e-01,  4.224363011e-01,  4.321287927e-01,  4.418803050e-01,\n   4.516890324e-01,  4.615531468e-01,  4.714707955e-01,  4.814400996e-01,\n   4.914591526e-01,  5.015260178e-01,  5.116387268e-01,  5.217952774e-01,\n   5.319936310e-01,  5.422317102e-01,  5.525073967e-01,  5.628185280e-01,\n   5.731628947e-01,  5.835382374e-01,  5.939422431e-01,  6.043725415e-01,\n   6.148267010e-01,  6.253022247e-01,  6.357965450e-01,  6.463070191e-01,\n   6.568309227e-01,  6.673654444e-01,  6.779076781e-01,  6.884546163e-01,\n   6.990031408e-01,  7.095500141e-01,  7.200918685e-01,  7.306251946e-01,\n   7.411463279e-01,  7.516514342e-01,  7.621364928e-01,  7.725972768e-01,\n   7.830293314e-01,  7.934279484e-01,  8.037881364e-01,  8.141045870e-01,\n   8.243716335e-01,  8.345832036e-01,  8.447327618e-01,  8.548132406e-01,\n   8.648169561e-01,  8.747355048e-01,  8.845596343e-01,  8.942790802e-01,\n   9.038823556e-01,  9.133564761e-01,  9.226865916e-01,  9.318554804e-01,\n   9.408428333e-01,  9.496242042e-01,  9.581693968e-01,  9.664398430e-01,\n   9.743839996e-01,  9.819283633e-01,  9.889568756e-01,  9.952482425e-01,\n   1.000000000e+00,  0.000000000e+00,  2.295573376e-06,  7.378816787e-06,\n   1.460892969e-05,  2.371819989e-05,  3.454057630e-05,  4.695832678e-05,\n   6.088161928e-05,  7.623860715e-05,  9.296990542e-05,  1.110252184e-04,\n   1.303611399e-04,  1.509396455e-04,  1.727270166e-04,  1.956930488e-04,\n   2.198104531e-04,  2.450543943e-04,  2.714021260e-04,  2.988326999e-04,\n   3.273267294e-04,  3.568661949e-04,  3.874342829e-04,  4.190152502e-04,\n   4.515943093e-04,  4.851575309e-04,  5.196917591e-04,  5.551845393e-04,\n   5.916240546e-04,  6.289990700e-04,  6.672988843e-04,  7.065132861e-04,\n   7.466325163e-04,  7.876472332e-04,  8.295484826e-04,  8.723276696e-04,\n   9.159765344e-04,  9.604871296e-04,  1.005851800e-03,  1.052063165e-03,\n   1.099114098e-03,  1.146997717e-03,  1.195707367e-03,  1.245236605e-03,\n   1.295579192e-03,  1.346729082e-03,  1.398680407e-03,  1.451427472e-03,\n   1.504964748e-03,  1.559286856e-03,  1.614388569e-03,  1.670264798e-03,\n   1.726910588e-03,  1.784321113e-03,  1.842491668e-03,  1.901417664e-03,\n   1.961094627e-03,  2.021518184e-03,  2.082684071e-03,  2.144588117e-03,\n   2.207226249e-03,  2.270594482e-03,  2.334688918e-03,  2.399505746e-03,\n   2.465041231e-03,  2.531291720e-03,  2.598253630e-03,  2.665923455e-03,\n   2.734297755e-03,  2.803373158e-03,  2.873146357e-03,  2.943614108e-03,\n   3.014773228e-03,  3.086620590e-03,  3.159153127e-03,  3.232367824e-03,\n   3.306261721e-03,  3.380831908e-03,  3.456075527e-03,  3.531989765e-03,\n   3.608571859e-03,  3.685819090e-03,  3.763728785e-03,  3.842298310e-03,\n   3.921525078e-03,  4.001406538e-03,  4.081940181e-03,  4.163123535e-03,\n   4.244954166e-03,  4.327429677e-03,  4.410547704e-03,  4.494305920e-03,\n   4.578702031e-03,  4.663733773e-03,  4.749398918e-03,  4.835695265e-03,\n   4.922620647e-03,  5.010172924e-03,  5.098349985e-03,  5.187149748e-03,\n   5.276570159e-03,  5.366609188e-03,  5.457264834e-03,  5.548535121e-03,\n   5.640418097e-03,  5.732911836e-03,  5.826014433e-03,  5.919724009e-03,\n   6.014038708e-03,  6.108956694e-03,  6.204476155e-03,  6.300595299e-03,\n   6.397312356e-03,  6.494625576e-03,  6.592533228e-03,  6.691033603e-03,\n   6.790125009e-03,  6.889805774e-03,  6.990074245e-03,  7.090928785e-03,\n   7.192367776e-03,  7.294389619e-03,  7.396992729e-03,  7.500175541e-03,\n   7.603936502e-03,  7.708274080e-03,  7.813186756e-03,  7.918673027e-03,\n   8.024731404e-03,  8.131360416e-03,  9.547819011e-01,  9.552076413e-01,\n   9.556327336e-01,  9.560571730e-01,  9.564809544e-01,  9.569040727e-01,\n   9.573265227e-01,  9.577482992e-01,  9.581693968e-01,  9.585898102e-01,\n   9.590095337e-01,  9.594285620e-01,  9.598468893e-01,  9.602645099e-01,\n   9.606814180e-01,  9.610976076e-01,  9.615130729e-01,  9.619278078e-01,\n   9.623418059e-01,  9.627550612e-01,  9.631675672e-01,  9.635793175e-01,\n   9.639903054e-01,  9.644005244e-01,  9.648099676e-01,  9.652186281e-01,\n   9.656264990e-01,  9.660335730e-01,  9.664398430e-01,  9.668453016e-01,\n   9.672499413e-01,  9.676537544e-01,  9.680567332e-01,  9.684588698e-01,\n   9.688601560e-01,  9.692605839e-01,  9.696601449e-01,  9.700588306e-01,\n   9.704566323e-01,  9.708535412e-01,  9.712495483e-01,  9.716446445e-01,\n   9.720388203e-01,  9.724320662e-01,  9.728243725e-01,  9.732157292e-01,\n   9.736061262e-01,  9.739955532e-01,  9.743839996e-01,  9.747714544e-01,\n   9.751579068e-01,  9.755433455e-01,  9.759277588e-01,  9.763111350e-01,\n   9.766934619e-01,  9.770747273e-01,  9.774549185e-01,  9.778340226e-01,\n   9.782120261e-01,  9.785889157e-01,  9.789646772e-01,  9.793392964e-01,\n   9.797127587e-01,  9.800850489e-01,  9.804561516e-01,  9.808260510e-01,\n   9.811947306e-01,  9.815621738e-01,  9.819283633e-01,  9.822932813e-01,\n   9.826569095e-01,  9.830192291e-01,  9.833802207e-01,  9.837398643e-01,\n   9.840981392e-01,  9.844550242e-01,  9.848104971e-01,  9.851645353e-01,\n   9.855171152e-01,  9.858682125e-01,  9.862178019e-01,  9.865658573e-01,\n   9.869123515e-01,  9.872572564e-01,  9.876005428e-01,  9.879421802e-01,\n   9.882821371e-01,  9.886203803e-01,  9.889568756e-01,  9.892915870e-01,\n   9.896244771e-01,  9.899555065e-01,  9.902846343e-01,  9.906118173e-01,\n   9.909370102e-01,  9.912601654e-01,  9.915812327e-01,  9.919001594e-01,\n   9.922168894e-01,  9.925313636e-01,  9.928435193e-01,  9.931532896e-01,\n   9.934606036e-01,  9.937653853e-01,  9.940675535e-01,  9.943670211e-01,\n   9.946636941e-01,  9.949574712e-01,  9.952482425e-01,  9.955358883e-01,\n   9.958202779e-01,  9.961012679e-01,  9.963786999e-01,  9.966523979e-01,\n   9.969221654e-01,  9.971877811e-01,  9.974489936e-01,  9.977055145e-01,\n   9.979570091e-01,  9.982030838e-01,  9.984432676e-01,  9.986769856e-01,\n   9.989035176e-01,  9.991219315e-01,  9.993309647e-01,  9.995287935e-01,\n   9.997125019e-01,  9.998764622e-01,  1.000000000e+00,\n};\nconst float dist_icdf_2_8[] = {\n   0.000000000e+00,  4.578949286e-10,  1.356106336e-08,  9.841977600e-08,\n   4.016257606e-07,  1.195494376e-06,  2.914805441e-06,  6.192491155e-06,\n   1.189451001e-05,  2.115405295e-05,  3.540517636e-05,  5.641592304e-05,\n   8.632096728e-05,  1.276537998e-04,  1.833784496e-04,  2.569207220e-04,\n   3.521989139e-04,  4.736539483e-04,  6.262788489e-04,  8.156474560e-04,\n   1.047942259e-03,  1.329981196e-03,  1.669243245e-03,  2.073892598e-03,\n   2.552801189e-03,  3.115569287e-03,  3.772543877e-03,  4.534834454e-03,\n   5.414325880e-03,  6.423687867e-03,  7.576380639e-03,  8.886656276e-03,\n   1.036955520e-02,  1.204089727e-02,  1.391726682e-02,  1.601599106e-02,\n   1.835511126e-02,  2.095334583e-02,  2.383004492e-02,  2.700513559e-02,\n   3.049905709e-02,  3.433268555e-02,  3.852724747e-02,  4.310422155e-02,\n   4.808522839e-02,  5.349190772e-02,  5.934578297e-02,  6.566811315e-02,\n   7.247973212e-02,  7.980087556e-02,  8.765099631e-02,  9.604856875e-02,\n   1.050108833e-01,  1.145538328e-01,  1.246916913e-01,  1.354368894e-01,\n   1.467997859e-01,  1.587884401e-01,  1.714083878e-01,  1.846624227e-01,\n   1.985503884e-01,  2.130689837e-01,  2.282115851e-01,  2.439680909e-01,\n   2.603247906e-01,  2.772642626e-01,  2.947653056e-01,  3.128029055e-01,\n   3.313482420e-01,  3.503687358e-01,  3.698281405e-01,  3.896866792e-01,\n   4.099012258e-01,  4.304255324e-01,  4.512104996e-01,  4.722044903e-01,\n   4.933536807e-01,  5.146024474e-01,  5.358937858e-01,  5.571697520e-01,\n   5.783719256e-01,  5.994418841e-01,  6.203216841e-01,  6.409543406e-01,\n   6.612842984e-01,  6.812578880e-01,  7.008237600e-01,  7.199332902e-01,\n   7.385409519e-01,  7.566046490e-01,  7.740860056e-01,  7.909506098e-01,\n   8.071682092e-01,  8.227128563e-01,  8.375630034e-01,  8.517015483e-01,\n   8.651158320e-01,  8.777975896e-01,  8.897428590e-01,  9.009518493e-01,\n   9.114287744e-01,  9.211816541e-01,  9.302220900e-01,  9.385650177e-01,\n   9.462284425e-01,  9.532331621e-01,  9.596024801e-01,  9.653619153e-01,\n   9.705389107e-01,  9.751625441e-01,  9.792632446e-01,  9.828725175e-01,\n   9.860226782e-01,  9.887465981e-01,  9.910774629e-01,  9.930485441e-01,\n   9.946929823e-01,  9.960435848e-01,  9.971326329e-01,  9.979916998e-01,\n   9.986514750e-01,  9.991415929e-01,  9.994904595e-01,  9.997250706e-01,\n   9.998708097e-01,  9.999512082e-01,  9.999876318e-01,  9.999988160e-01,\n   1.000000000e+00,  0.000000000e+00,  1.999530332e-16,  5.921829667e-15,\n   4.297783758e-14,  1.753815185e-13,  5.220474806e-13,  1.272836073e-12,\n   2.704139742e-12,  5.194117152e-12,  9.237641924e-12,  1.546101206e-11,\n   2.463645365e-11,  3.769644449e-11,  5.574787770e-11,  8.008608167e-11,\n   1.122087095e-10,  1.538295096e-10,  2.068919857e-10,  2.735829565e-10,\n   3.563460198e-10,  4.578949286e-10,  5.812268847e-10,  7.296357535e-10,\n   9.067252057e-10,  1.116421789e-09,  1.362987935e-09,  1.651034897e-09,\n   1.985535640e-09,  2.371837656e-09,  2.815675743e-09,  3.323184715e-09,\n   3.900912073e-09,  4.555830619e-09,  5.295351029e-09,  6.127334378e-09,\n   7.060104621e-09,  8.102461035e-09,  9.263690615e-09,  1.055358043e-08,\n   1.198242996e-08,  1.356106336e-08,  1.530084170e-08,  1.721367523e-08,\n   1.931203549e-08,  2.160896751e-08,  2.411810187e-08,  2.685366686e-08,\n   2.983050043e-08,  3.306406231e-08,  3.657044593e-08,  4.036639041e-08,\n   4.446929253e-08,  4.889721855e-08,  5.366891620e-08,  5.880382645e-08,\n   6.432209539e-08,  7.024458600e-08,  7.659288998e-08,  8.338933945e-08,\n   9.065701872e-08,  9.841977600e-08,  1.067022351e-07,  1.155298070e-07,\n   1.249287016e-07,  1.349259395e-07,  1.455493630e-07,  1.568276486e-07,\n   1.687903177e-07,  1.814677486e-07,  1.948911880e-07,  2.090927623e-07,\n   2.241054894e-07,  2.399632896e-07,  2.567009979e-07,  2.743543747e-07,\n   2.929601174e-07,  3.125558720e-07,  3.331802442e-07,  3.548728111e-07,\n   3.776741321e-07,  4.016257606e-07,  4.267702552e-07,  4.531511908e-07,\n   4.808131702e-07,  5.098018352e-07,  5.401638777e-07,  5.719470512e-07,\n   6.052001820e-07,  6.399731802e-07,  6.763170509e-07,  7.142839057e-07,\n   7.539269734e-07,  7.953006114e-07,  8.384603170e-07,  8.834627381e-07,\n   9.303656846e-07,  9.792281395e-07,  1.030110270e-06,  1.083073438e-06,\n   1.138180211e-06,  1.195494376e-06,  1.255080947e-06,  1.317006176e-06,\n   1.381337568e-06,  1.448143886e-06,  1.517495167e-06,  1.589462733e-06,\n   1.664119197e-06,  1.741538479e-06,  1.821795813e-06,  1.904967764e-06,\n   1.991132231e-06,  2.080368462e-06,  2.172757067e-06,  2.268380026e-06,\n   2.367320697e-06,  2.469663836e-06,  2.575495596e-06,  2.684903548e-06,\n   2.797976686e-06,  2.914805441e-06,  3.035481688e-06,  3.160098761e-06,\n   3.288751462e-06,  3.421536069e-06,  3.558550353e-06,  3.699893583e-06,\n   3.845666539e-06,  3.995971523e-06,  9.993661015e-01,  9.993827027e-01,\n   9.993989954e-01,  9.994149830e-01,  9.994306687e-01,  9.994460559e-01,\n   9.994611479e-01,  9.994759480e-01,  9.994904595e-01,  9.995046858e-01,\n   9.995186300e-01,  9.995322954e-01,  9.995456853e-01,  9.995588030e-01,\n   9.995716516e-01,  9.995842345e-01,  9.995965547e-01,  9.996086155e-01,\n   9.996204202e-01,  9.996319718e-01,  9.996432736e-01,  9.996543287e-01,\n   9.996651403e-01,  9.996757115e-01,  9.996860454e-01,  9.996961452e-01,\n   9.997060139e-01,  9.997156547e-01,  9.997250706e-01,  9.997342647e-01,\n   9.997432401e-01,  9.997519997e-01,  9.997605468e-01,  9.997688842e-01,\n   9.997770150e-01,  9.997849421e-01,  9.997926687e-01,  9.998001976e-01,\n   9.998075318e-01,  9.998146743e-01,  9.998216280e-01,  9.998283958e-01,\n   9.998349807e-01,  9.998413855e-01,  9.998476132e-01,  9.998536666e-01,\n   9.998595486e-01,  9.998652620e-01,  9.998708097e-01,  9.998761944e-01,\n   9.998814191e-01,  9.998864865e-01,  9.998913994e-01,  9.998961605e-01,\n   9.999007726e-01,  9.999052385e-01,  9.999095609e-01,  9.999137425e-01,\n   9.999177859e-01,  9.999216940e-01,  9.999254693e-01,  9.999291145e-01,\n   9.999326322e-01,  9.999360252e-01,  9.999392959e-01,  9.999424469e-01,\n   9.999454810e-01,  9.999484005e-01,  9.999512082e-01,  9.999539064e-01,\n   9.999564977e-01,  9.999589847e-01,  9.999613697e-01,  9.999636554e-01,\n   9.999658440e-01,  9.999679381e-01,  9.999699401e-01,  9.999718523e-01,\n   9.999736771e-01,  9.999754170e-01,  9.999770742e-01,  9.999786511e-01,\n   9.999801500e-01,  9.999815731e-01,  9.999829228e-01,  9.999842013e-01,\n   9.999854109e-01,  9.999865536e-01,  9.999876318e-01,  9.999886476e-01,\n   9.999896031e-01,  9.999905005e-01,  9.999913419e-01,  9.999921293e-01,\n   9.999928649e-01,  9.999935507e-01,  9.999941886e-01,  9.999947808e-01,\n   9.999953291e-01,  9.999958354e-01,  9.999963019e-01,  9.999967302e-01,\n   9.999971223e-01,  9.999974801e-01,  9.999978053e-01,  9.999980997e-01,\n   9.999983652e-01,  9.999986034e-01,  9.999988160e-01,  9.999990047e-01,\n   9.999991712e-01,  9.999993170e-01,  9.999994437e-01,  9.999995529e-01,\n   9.999996460e-01,  9.999997245e-01,  9.999997899e-01,  9.999998435e-01,\n   9.999998867e-01,  9.999999207e-01,  9.999999467e-01,  9.999999661e-01,\n   9.999999799e-01,  9.999999891e-01,  9.999999949e-01,  9.999999981e-01,\n   9.999999995e-01,  1.000000000e+00,  1.000000000e+00,\n};\nconst float dist_icdf_3_0[] = {\n   0.000000000e+00,  3.357396159e-01,  3.411985141e-01,  3.446595422e-01,\n   3.472599302e-01,  3.493720818e-01,  3.511670309e-01,  3.527382471e-01,\n   3.541426668e-01,  3.554176670e-01,  3.565891702e-01,  3.576759287e-01,\n   3.586919685e-01,  3.596480692e-01,  3.605527042e-01,  3.614126617e-01,\n   3.622334688e-01,  3.630196899e-01,  3.637751406e-01,  3.645030456e-01,\n   3.652061569e-01,  3.658868431e-01,  3.665471590e-01,  3.671888999e-01,\n   3.678136448e-01,  3.684227901e-01,  3.690175783e-01,  3.695991201e-01,\n   3.701684133e-01,  3.707263581e-01,  3.712737701e-01,  3.718113914e-01,\n   3.723398993e-01,  3.728599145e-01,  3.733720075e-01,  3.738767047e-01,\n   3.743744927e-01,  3.748658234e-01,  3.753511172e-01,  3.758307664e-01,\n   3.763051383e-01,  3.767745773e-01,  3.772394076e-01,  3.776999349e-01,\n   3.781564483e-01,  3.786092221e-01,  3.790585167e-01,  3.795045804e-01,\n   3.799476504e-01,  3.803879539e-01,  3.808257090e-01,  3.812611254e-01,\n   3.816944058e-01,  3.821257461e-01,  3.825553362e-01,  3.829833611e-01,\n   3.834100007e-01,  3.838354312e-01,  3.842598250e-01,  3.846833517e-01,\n   3.851061783e-01,  3.855284696e-01,  3.859503892e-01,  3.863720991e-01,\n   3.867937610e-01,  3.872155360e-01,  3.876375858e-01,  3.880600722e-01,\n   3.884831585e-01,  3.889070092e-01,  3.893317908e-01,  3.897576723e-01,\n   3.901848256e-01,  3.906134258e-01,  3.910436522e-01,  3.914756884e-01,\n   3.919097233e-01,  3.923459512e-01,  3.927845730e-01,  3.932257969e-01,\n   3.936698386e-01,  3.941169228e-01,  3.945672839e-01,  3.950211670e-01,\n   3.954788290e-01,  3.959405398e-01,  3.964065838e-01,  3.968772614e-01,\n   3.973528904e-01,  3.978338083e-01,  3.983203740e-01,  3.988129706e-01,\n   3.993120078e-01,  3.998179247e-01,  4.003311941e-01,  4.008523254e-01,\n   4.013818699e-01,  4.019204259e-01,  4.024686445e-01,  4.030272369e-01,\n   4.035969825e-01,  4.041787390e-01,  4.047734533e-01,  4.053821758e-01,\n   4.060060761e-01,  4.066464638e-01,  4.073048115e-01,  4.079827851e-01,\n   4.086822801e-01,  4.094054671e-01,  4.101548498e-01,  4.109333388e-01,\n   4.117443466e-01,  4.125919142e-01,  4.134808781e-01,  4.144170995e-01,\n   4.154077817e-01,  4.164619233e-01,  4.175909817e-01,  4.188098774e-01,\n   4.201385782e-01,  4.216047161e-01,  4.232481798e-01,  4.251298141e-01,\n   4.273496630e-01,  4.300911410e-01,  4.337546001e-01,  4.395670998e-01,\n   1.000000000e+00,  0.000000000e+00,  3.164971837e-01,  3.204785114e-01,\n   3.229185249e-01,  3.247050209e-01,  3.261247817e-01,  3.273082344e-01,\n   3.283260963e-01,  3.292211558e-01,  3.300213362e-01,  3.307459004e-01,\n   3.314087154e-01,  3.320201061e-01,  3.325879739e-01,  3.331185042e-01,\n   3.336166333e-01,  3.340863650e-01,  3.345309933e-01,  3.349532621e-01,\n   3.353554815e-01,  3.357396159e-01,  3.361073497e-01,  3.364601388e-01,\n   3.367992502e-01,  3.371257938e-01,  3.374407472e-01,  3.377449764e-01,\n   3.380392521e-01,  3.383242635e-01,  3.386006291e-01,  3.388689066e-01,\n   3.391296004e-01,  3.393831682e-01,  3.396300267e-01,  3.398705567e-01,\n   3.401051066e-01,  3.403339963e-01,  3.405575204e-01,  3.407759503e-01,\n   3.409895374e-01,  3.411985141e-01,  3.414030965e-01,  3.416034854e-01,\n   3.417998679e-01,  3.419924187e-01,  3.421813009e-01,  3.423666674e-01,\n   3.425486614e-01,  3.427274174e-01,  3.429030620e-01,  3.430757141e-01,\n   3.432454859e-01,  3.434124834e-01,  3.435768065e-01,  3.437385499e-01,\n   3.438978032e-01,  3.440546512e-01,  3.442091745e-01,  3.443614496e-01,\n   3.445115491e-01,  3.446595422e-01,  3.448054948e-01,  3.449494695e-01,\n   3.450915262e-01,  3.452317219e-01,  3.453701113e-01,  3.455067464e-01,\n   3.456416771e-01,  3.457749510e-01,  3.459066139e-01,  3.460367096e-01,\n   3.461652799e-01,  3.462923653e-01,  3.464180045e-01,  3.465422344e-01,\n   3.466650910e-01,  3.467866085e-01,  3.469068199e-01,  3.470257571e-01,\n   3.471434507e-01,  3.472599302e-01,  3.473752241e-01,  3.474893598e-01,\n   3.476023639e-01,  3.477142618e-01,  3.478250784e-01,  3.479348374e-01,\n   3.480435619e-01,  3.481512743e-01,  3.482579960e-01,  3.483637480e-01,\n   3.484685504e-01,  3.485724229e-01,  3.486753844e-01,  3.487774532e-01,\n   3.488786473e-01,  3.489789837e-01,  3.490784794e-01,  3.491771505e-01,\n   3.492750129e-01,  3.493720818e-01,  3.494683722e-01,  3.495638985e-01,\n   3.496586747e-01,  3.497527145e-01,  3.498460312e-01,  3.499386378e-01,\n   3.500305467e-01,  3.501217702e-01,  3.502123202e-01,  3.503022083e-01,\n   3.503914458e-01,  3.504800436e-01,  3.505680126e-01,  3.506553631e-01,\n   3.507421053e-01,  3.508282492e-01,  3.509138043e-01,  3.509987802e-01,\n   3.510831861e-01,  3.511670309e-01,  3.512503234e-01,  3.513330722e-01,\n   3.514152857e-01,  3.514969719e-01,  3.515781390e-01,  3.516587946e-01,\n   3.517389464e-01,  3.518186019e-01,  4.225662375e-01,  4.226495746e-01,\n   4.227334399e-01,  4.228178411e-01,  4.229027866e-01,  4.229882845e-01,\n   4.230743435e-01,  4.231609723e-01,  4.232481798e-01,  4.233359751e-01,\n   4.234243677e-01,  4.235133671e-01,  4.236029832e-01,  4.236932262e-01,\n   4.237841063e-01,  4.238756341e-01,  4.239678206e-01,  4.240606769e-01,\n   4.241542145e-01,  4.242484452e-01,  4.243433810e-01,  4.244390343e-01,\n   4.245354178e-01,  4.246325448e-01,  4.247304285e-01,  4.248290829e-01,\n   4.249285221e-01,  4.250287609e-01,  4.251298141e-01,  4.252316974e-01,\n   4.253344266e-01,  4.254380182e-01,  4.255424890e-01,  4.256478566e-01,\n   4.257541387e-01,  4.258613541e-01,  4.259695216e-01,  4.260786610e-01,\n   4.261887927e-01,  4.262999376e-01,  4.264121174e-01,  4.265253544e-01,\n   4.266396718e-01,  4.267550935e-01,  4.268716442e-01,  4.269893496e-01,\n   4.271082360e-01,  4.272283310e-01,  4.273496630e-01,  4.274722614e-01,\n   4.275961567e-01,  4.277213807e-01,  4.278479663e-01,  4.279759475e-01,\n   4.281053598e-01,  4.282362402e-01,  4.283686270e-01,  4.285025601e-01,\n   4.286380809e-01,  4.287752330e-01,  4.289140612e-01,  4.290546127e-01,\n   4.291969366e-01,  4.293410841e-01,  4.294871089e-01,  4.296350669e-01,\n   4.297850169e-01,  4.299370201e-01,  4.300911410e-01,  4.302474470e-01,\n   4.304060090e-01,  4.305669012e-01,  4.307302021e-01,  4.308959938e-01,\n   4.310643632e-01,  4.312354015e-01,  4.314092052e-01,  4.315858763e-01,\n   4.317655225e-01,  4.319482579e-01,  4.321342034e-01,  4.323234872e-01,\n   4.325162458e-01,  4.327126240e-01,  4.329127765e-01,  4.331168680e-01,\n   4.333250746e-01,  4.335375846e-01,  4.337546001e-01,  4.339763377e-01,\n   4.342030308e-01,  4.344349303e-01,  4.346723077e-01,  4.349154564e-01,\n   4.351646945e-01,  4.354203679e-01,  4.356828533e-01,  4.359525622e-01,\n   4.362299456e-01,  4.365154987e-01,  4.368097674e-01,  4.371133552e-01,\n   4.374269322e-01,  4.377512446e-01,  4.380871278e-01,  4.384355202e-01,\n   4.387974820e-01,  4.391742169e-01,  4.395670998e-01,  4.399777109e-01,\n   4.404078795e-01,  4.408597393e-01,  4.413358016e-01,  4.418390496e-01,\n   4.423730671e-01,  4.429422123e-01,  4.435518612e-01,  4.442087546e-01,\n   4.449215089e-01,  4.457013915e-01,  4.465635468e-01,  4.475290311e-01,\n   4.486283968e-01,  4.499085132e-01,  4.514469445e-01,  4.533869740e-01,\n   4.560443034e-01,  4.603992527e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_1[] = {\n   0.000000000e+00,  2.436959399e-01,  2.629281909e-01,  2.754296495e-01,\n   2.849701321e-01,  2.928081818e-01,  2.995291515e-01,  3.054559995e-01,\n   3.107869728e-01,  3.156530579e-01,  3.201456074e-01,  3.243310302e-01,\n   3.282592153e-01,  3.319686571e-01,  3.354897234e-01,  3.388468234e-01,\n   3.420598935e-01,  3.451454443e-01,  3.481173156e-01,  3.509872337e-01,\n   3.537652294e-01,  3.564599563e-01,  3.590789383e-01,  3.616287626e-01,\n   3.641152340e-01,  3.665434972e-01,  3.689181374e-01,  3.712432613e-01,\n   3.735225647e-01,  3.757593880e-01,  3.779567630e-01,  3.801174518e-01,\n   3.822439806e-01,  3.843386678e-01,  3.864036479e-01,  3.884408929e-01,\n   3.904522300e-01,  3.924393573e-01,  3.944038578e-01,  3.963472108e-01,\n   3.982708031e-01,  4.001759380e-01,  4.020638433e-01,  4.039356792e-01,\n   4.057925445e-01,  4.076354828e-01,  4.094654873e-01,  4.112835061e-01,\n   4.130904463e-01,  4.148871779e-01,  4.166745375e-01,  4.184533317e-01,\n   4.202243400e-01,  4.219883177e-01,  4.237459984e-01,  4.254980964e-01,\n   4.272453095e-01,  4.289883205e-01,  4.307277995e-01,  4.324644059e-01,\n   4.341987904e-01,  4.359315964e-01,  4.376634623e-01,  4.393950226e-01,\n   4.411269101e-01,  4.428597572e-01,  4.445941980e-01,  4.463308695e-01,\n   4.480704135e-01,  4.498134783e-01,  4.515607205e-01,  4.533128070e-01,\n   4.550704162e-01,  4.568342410e-01,  4.586049900e-01,  4.603833899e-01,\n   4.621701882e-01,  4.639661552e-01,  4.657720869e-01,  4.675888078e-01,\n   4.694171738e-01,  4.712580759e-01,  4.731124434e-01,  4.749812484e-01,\n   4.768655096e-01,  4.787662976e-01,  4.806847399e-01,  4.826220268e-01,\n   4.845794185e-01,  4.865582514e-01,  4.885599476e-01,  4.905860229e-01,\n   4.926380983e-01,  4.947179111e-01,  4.968273289e-01,  4.989683645e-01,\n   5.011431940e-01,  5.033541769e-01,  5.056038796e-01,  5.078951029e-01,\n   5.102309139e-01,  5.126146835e-01,  5.150501312e-01,  5.175413774e-01,\n   5.200930071e-01,  5.227101455e-01,  5.253985515e-01,  5.281647303e-01,\n   5.310160738e-01,  5.339610356e-01,  5.370093515e-01,  5.401723212e-01,\n   5.434631723e-01,  5.468975383e-01,  5.504940960e-01,  5.542754316e-01,\n   5.582692423e-01,  5.625100439e-01,  5.670416667e-01,  5.719210254e-01,\n   5.772240396e-01,  5.830553878e-01,  5.895655558e-01,  5.969829811e-01,\n   6.056811079e-01,  6.163396823e-01,  6.304283052e-01,  6.523853680e-01,\n   1.000000000e+00,  0.000000000e+00,  1.812651769e-01,  1.934447114e-01,\n   2.011068322e-01,  2.068099038e-01,  2.113974269e-01,  2.152582198e-01,\n   2.186052647e-01,  2.215684999e-01,  2.242333166e-01,  2.266589793e-01,\n   2.288883783e-01,  2.309536014e-01,  2.328793101e-01,  2.346848870e-01,\n   2.363858554e-01,  2.379948494e-01,  2.395222956e-01,  2.409769041e-01,\n   2.423660292e-01,  2.436959399e-01,  2.449720253e-01,  2.461989539e-01,\n   2.473807978e-01,  2.485211311e-01,  2.496231090e-01,  2.506895313e-01,\n   2.517228947e-01,  2.527254350e-01,  2.536991634e-01,  2.546458952e-01,\n   2.555672751e-01,  2.564647984e-01,  2.573398280e-01,  2.581936107e-01,\n   2.590272896e-01,  2.598419154e-01,  2.606384566e-01,  2.614178077e-01,\n   2.621807965e-01,  2.629281909e-01,  2.636607048e-01,  2.643790025e-01,\n   2.650837038e-01,  2.657753876e-01,  2.664545958e-01,  2.671218360e-01,\n   2.677775848e-01,  2.684222899e-01,  2.690563729e-01,  2.696802307e-01,\n   2.702942380e-01,  2.708987487e-01,  2.714940974e-01,  2.720806006e-01,\n   2.726585586e-01,  2.732282561e-01,  2.737899632e-01,  2.743439369e-01,\n   2.748904215e-01,  2.754296495e-01,  2.759618427e-01,  2.764872123e-01,\n   2.770059601e-01,  2.775182786e-01,  2.780243520e-01,  2.785243564e-01,\n   2.790184602e-01,  2.795068249e-01,  2.799896051e-01,  2.804669493e-01,\n   2.809389997e-01,  2.814058930e-01,  2.818677605e-01,  2.823247284e-01,\n   2.827769181e-01,  2.832244463e-01,  2.836674254e-01,  2.841059638e-01,\n   2.845401658e-01,  2.849701321e-01,  2.853959596e-01,  2.858177422e-01,\n   2.862355701e-01,  2.866495308e-01,  2.870597086e-01,  2.874661852e-01,\n   2.878690394e-01,  2.882683477e-01,  2.886641837e-01,  2.890566192e-01,\n   2.894457234e-01,  2.898315633e-01,  2.902142041e-01,  2.905937088e-01,\n   2.909701387e-01,  2.913435530e-01,  2.917140093e-01,  2.920815636e-01,\n   2.924462702e-01,  2.928081818e-01,  2.931673498e-01,  2.935238238e-01,\n   2.938776524e-01,  2.942288826e-01,  2.945775603e-01,  2.949237301e-01,\n   2.952674354e-01,  2.956087183e-01,  2.959476202e-01,  2.962841809e-01,\n   2.966184396e-01,  2.969504344e-01,  2.972802022e-01,  2.976077793e-01,\n   2.979332009e-01,  2.982565014e-01,  2.985777144e-01,  2.988968726e-01,\n   2.992140079e-01,  2.995291515e-01,  2.998423340e-01,  3.001535850e-01,\n   3.004629336e-01,  3.007704082e-01,  3.010760365e-01,  3.013798456e-01,\n   3.016818621e-01,  3.019821118e-01,  5.868676982e-01,  5.871976595e-01,\n   5.875296367e-01,  5.878636596e-01,  5.881997589e-01,  5.885379658e-01,\n   5.888783123e-01,  5.892208311e-01,  5.895655558e-01,  5.899125205e-01,\n   5.902617606e-01,  5.906133119e-01,  5.909672113e-01,  5.913234967e-01,\n   5.916822068e-01,  5.920433813e-01,  5.924070609e-01,  5.927732874e-01,\n   5.931421036e-01,  5.935135535e-01,  5.938876822e-01,  5.942645360e-01,\n   5.946441626e-01,  5.950266107e-01,  5.954119305e-01,  5.958001737e-01,\n   5.961913933e-01,  5.965856437e-01,  5.969829811e-01,  5.973834631e-01,\n   5.977871491e-01,  5.981941001e-01,  5.986043791e-01,  5.990180509e-01,\n   5.994351823e-01,  5.998558419e-01,  6.002801008e-01,  6.007080321e-01,\n   6.011397113e-01,  6.015752162e-01,  6.020146272e-01,  6.024580274e-01,\n   6.029055024e-01,  6.033571410e-01,  6.038130348e-01,  6.042732786e-01,\n   6.047379704e-01,  6.052072118e-01,  6.056811079e-01,  6.061597676e-01,\n   6.066433038e-01,  6.071318336e-01,  6.076254784e-01,  6.081243642e-01,\n   6.086286220e-01,  6.091383878e-01,  6.096538030e-01,  6.101750145e-01,\n   6.107021754e-01,  6.112354451e-01,  6.117749894e-01,  6.123209815e-01,\n   6.128736019e-01,  6.134330388e-01,  6.139994892e-01,  6.145731585e-01,\n   6.151542620e-01,  6.157430247e-01,  6.163396823e-01,  6.169444819e-01,\n   6.175576829e-01,  6.181795573e-01,  6.188103912e-01,  6.194504852e-01,\n   6.201001560e-01,  6.207597370e-01,  6.214295801e-01,  6.221100566e-01,\n   6.228015589e-01,  6.235045023e-01,  6.242193264e-01,  6.249464977e-01,\n   6.256865111e-01,  6.264398929e-01,  6.272072035e-01,  6.279890400e-01,\n   6.287860400e-01,  6.295988851e-01,  6.304283052e-01,  6.312750833e-01,\n   6.321400609e-01,  6.330241436e-01,  6.339283086e-01,  6.348536119e-01,\n   6.358011976e-01,  6.367723076e-01,  6.377682939e-01,  6.387906316e-01,\n   6.398409347e-01,  6.409209745e-01,  6.420327009e-01,  6.431782673e-01,\n   6.443600609e-01,  6.455807378e-01,  6.468432659e-01,  6.481509758e-01,\n   6.495076241e-01,  6.509174695e-01,  6.523853680e-01,  6.539168919e-01,\n   6.555184798e-01,  6.571976285e-01,  6.589631422e-01,  6.608254592e-01,\n   6.627970895e-01,  6.648932102e-01,  6.671324940e-01,  6.695382887e-01,\n   6.721403469e-01,  6.749774446e-01,  6.781015080e-01,  6.815844332e-01,\n   6.855300505e-01,  6.900967739e-01,  6.955450675e-01,  7.023522382e-01,\n   7.115588721e-01,  7.263444178e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_2[] = {\n   0.000000000e+00,  1.087346134e-01,  1.338426443e-01,  1.515211964e-01,\n   1.656975989e-01,  1.777697307e-01,  1.884155353e-01,  1.980210383e-01,\n   2.068292947e-01,  2.150043515e-01,  2.226627340e-01,  2.298905245e-01,\n   2.367533265e-01,  2.433024186e-01,  2.495787345e-01,  2.556155350e-01,\n   2.614402598e-01,  2.670758467e-01,  2.725416926e-01,  2.778543677e-01,\n   2.830281571e-01,  2.880754762e-01,  2.930071956e-01,  2.978328970e-01,\n   3.025610779e-01,  3.071993172e-01,  3.117544093e-01,  3.162324754e-01,\n   3.206390544e-01,  3.249791803e-01,  3.292574459e-01,  3.334780575e-01,\n   3.376448810e-01,  3.417614820e-01,  3.458311592e-01,  3.498569744e-01,\n   3.538417778e-01,  3.577882306e-01,  3.616988241e-01,  3.655758975e-01,\n   3.694216527e-01,  3.732381680e-01,  3.770274100e-01,  3.807912442e-01,\n   3.845314451e-01,  3.882497043e-01,  3.919476388e-01,  3.956267976e-01,\n   3.992886687e-01,  4.029346846e-01,  4.065662280e-01,  4.101846364e-01,\n   4.137912073e-01,  4.173872018e-01,  4.209738491e-01,  4.245523501e-01,\n   4.281238808e-01,  4.316895959e-01,  4.352506316e-01,  4.388081090e-01,\n   4.423631370e-01,  4.459168148e-01,  4.494702351e-01,  4.530244866e-01,\n   4.565806566e-01,  4.601398339e-01,  4.637031112e-01,  4.672715881e-01,\n   4.708463735e-01,  4.744285886e-01,  4.780193698e-01,  4.816198711e-01,\n   4.852312681e-01,  4.888547603e-01,  4.924915751e-01,  4.961429708e-01,\n   4.998102407e-01,  5.034947172e-01,  5.071977757e-01,  5.109208396e-01,\n   5.146653847e-01,  5.184329454e-01,  5.222251199e-01,  5.260435768e-01,\n   5.298900621e-01,  5.337664069e-01,  5.376745361e-01,  5.416164772e-01,\n   5.455943712e-01,  5.496104844e-01,  5.536672207e-01,  5.577671369e-01,\n   5.619129583e-01,  5.661075982e-01,  5.703541780e-01,  5.746560516e-01,\n   5.790168327e-01,  5.834404261e-01,  5.879310636e-01,  5.924933467e-01,\n   5.971322945e-01,  6.018534015e-01,  6.066627045e-01,  6.115668621e-01,\n   6.165732500e-01,  6.216900743e-01,  6.269265092e-01,  6.322928651e-01,\n   6.378007938e-01,  6.434635448e-01,  6.492962858e-01,  6.553165095e-01,\n   6.615445560e-01,  6.680042937e-01,  6.747240214e-01,  6.817376828e-01,\n   6.890865389e-01,  6.968215216e-01,  7.050066409e-01,  7.137240734e-01,\n   7.230820601e-01,  7.332277433e-01,  7.443692640e-01,  7.568167068e-01,\n   7.710657654e-01,  7.879939684e-01,  8.094298131e-01,  8.405923610e-01,\n   1.000000000e+00,  0.000000000e+00,  4.596737520e-02,  5.589988829e-02,\n   6.272599951e-02,  6.809671822e-02,  7.259612350e-02,  7.650623337e-02,\n   7.998705699e-02,  8.313903298e-02,  8.602976648e-02,  8.870715908e-02,\n   9.120651541e-02,  9.355468145e-02,  9.577259612e-02,  9.787693857e-02,\n   9.988123266e-02,  1.017966115e-01,  1.036323610e-01,  1.053963157e-01,\n   1.070951527e-01,  1.087346134e-01,  1.103196750e-01,  1.118546828e-01,\n   1.133434555e-01,  1.147893687e-01,  1.161954228e-01,  1.175642974e-01,\n   1.188983970e-01,  1.201998880e-01,  1.214707298e-01,  1.227127014e-01,\n   1.239274230e-01,  1.251163749e-01,  1.262809136e-01,  1.274222857e-01,\n   1.285416394e-01,  1.296400353e-01,  1.307184547e-01,  1.317778082e-01,\n   1.328189421e-01,  1.338426443e-01,  1.348496502e-01,  1.358406469e-01,\n   1.368162778e-01,  1.377771461e-01,  1.387238181e-01,  1.396568266e-01,\n   1.405766731e-01,  1.414838306e-01,  1.423787456e-01,  1.432618402e-01,\n   1.441335138e-01,  1.449941447e-01,  1.458440920e-01,  1.466836962e-01,\n   1.475132810e-01,  1.483331545e-01,  1.491436098e-01,  1.499449263e-01,\n   1.507373704e-01,  1.515211964e-01,  1.522966473e-01,  1.530639553e-01,\n   1.538233425e-01,  1.545750217e-01,  1.553191966e-01,  1.560560626e-01,\n   1.567858071e-01,  1.575086100e-01,  1.582246439e-01,  1.589340751e-01,\n   1.596370632e-01,  1.603337617e-01,  1.610243187e-01,  1.617088766e-01,\n   1.623875726e-01,  1.630605392e-01,  1.637279040e-01,  1.643897902e-01,\n   1.650463169e-01,  1.656975989e-01,  1.663437474e-01,  1.669848698e-01,\n   1.676210698e-01,  1.682524481e-01,  1.688791020e-01,  1.695011256e-01,\n   1.701186101e-01,  1.707316442e-01,  1.713403135e-01,  1.719447012e-01,\n   1.725448880e-01,  1.731409521e-01,  1.737329696e-01,  1.743210142e-01,\n   1.749051578e-01,  1.754854699e-01,  1.760620183e-01,  1.766348689e-01,\n   1.772040856e-01,  1.777697307e-01,  1.783318650e-01,  1.788905474e-01,\n   1.794458353e-01,  1.799977848e-01,  1.805464503e-01,  1.810918849e-01,\n   1.816341405e-01,  1.821732675e-01,  1.827093151e-01,  1.832423313e-01,\n   1.837723629e-01,  1.842994557e-01,  1.848236541e-01,  1.853450018e-01,\n   1.858635413e-01,  1.863793141e-01,  1.868923607e-01,  1.874027208e-01,\n   1.879104330e-01,  1.884155353e-01,  1.889180645e-01,  1.894180570e-01,\n   1.899155480e-01,  1.904105723e-01,  1.909031635e-01,  1.913933549e-01,\n   1.918811789e-01,  1.923666671e-01,  7.397762774e-01,  7.403398693e-01,\n   7.409063870e-01,  7.414758708e-01,  7.420483622e-01,  7.426239035e-01,\n   7.432025379e-01,  7.437843097e-01,  7.443692640e-01,  7.449574471e-01,\n   7.455489063e-01,  7.461436900e-01,  7.467418479e-01,  7.473434305e-01,\n   7.479484898e-01,  7.485570790e-01,  7.491692525e-01,  7.497850662e-01,\n   7.504045773e-01,  7.510278443e-01,  7.516549273e-01,  7.522858879e-01,\n   7.529207894e-01,  7.535596964e-01,  7.542026756e-01,  7.548497952e-01,\n   7.555011253e-01,  7.561567379e-01,  7.568167068e-01,  7.574811081e-01,\n   7.581500198e-01,  7.588235222e-01,  7.595016977e-01,  7.601846312e-01,\n   7.608724102e-01,  7.615651244e-01,  7.622628664e-01,  7.629657314e-01,\n   7.636738178e-01,  7.643872265e-01,  7.651060620e-01,  7.658304318e-01,\n   7.665604467e-01,  7.672962213e-01,  7.680378739e-01,  7.687855263e-01,\n   7.695393048e-01,  7.702993396e-01,  7.710657654e-01,  7.718387217e-01,\n   7.726183527e-01,  7.734048077e-01,  7.741982412e-01,  7.749988136e-01,\n   7.758066909e-01,  7.766220455e-01,  7.774450560e-01,  7.782759081e-01,\n   7.791147945e-01,  7.799619158e-01,  7.808174801e-01,  7.816817043e-01,\n   7.825548141e-01,  7.834370446e-01,  7.843286410e-01,  7.852298587e-01,\n   7.861409647e-01,  7.870622375e-01,  7.879939684e-01,  7.889364620e-01,\n   7.898900371e-01,  7.908550277e-01,  7.918317840e-01,  7.928206733e-01,\n   7.938220814e-01,  7.948364138e-01,  7.958640971e-01,  7.969055805e-01,\n   7.979613377e-01,  7.990318682e-01,  8.001176999e-01,  8.012193911e-01,\n   8.023375326e-01,  8.034727511e-01,  8.046257114e-01,  8.057971204e-01,\n   8.069877302e-01,  8.081983425e-01,  8.094298131e-01,  8.106830570e-01,\n   8.119590541e-01,  8.132588559e-01,  8.145835922e-01,  8.159344802e-01,\n   8.173128333e-01,  8.187200719e-01,  8.201577360e-01,  8.216274992e-01,\n   8.231311847e-01,  8.246707849e-01,  8.262484829e-01,  8.278666789e-01,\n   8.295280203e-01,  8.312354380e-01,  8.329921899e-01,  8.348019122e-01,\n   8.366686825e-01,  8.385970963e-01,  8.405923610e-01,  8.426604130e-01,\n   8.448080645e-01,  8.470431898e-01,  8.493749656e-01,  8.518141833e-01,\n   8.543736642e-01,  8.570688191e-01,  8.599184190e-01,  8.629456828e-01,\n   8.661798526e-01,  8.696585511e-01,  8.734314464e-01,  8.775662193e-01,\n   8.821588566e-01,  8.873527672e-01,  8.933779421e-01,  9.006430751e-01,\n   9.100037354e-01,  9.239177305e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_3[] = {\n   0.000000000e+00,  7.167186913e-02,  9.471219680e-02,  1.117382035e-01,\n   1.258070441e-01,  1.380505261e-01,  1.490319159e-01,  1.590782570e-01,\n   1.683987305e-01,  1.771363949e-01,  1.853940284e-01,  1.932483201e-01,\n   2.007582379e-01,  2.079702462e-01,  2.149217091e-01,  2.216431924e-01,\n   2.281600709e-01,  2.344936805e-01,  2.406621621e-01,  2.466810932e-01,\n   2.525639687e-01,  2.583225716e-01,  2.639672645e-01,  2.695072200e-01,\n   2.749506061e-01,  2.803047359e-01,  2.855761907e-01,  2.907709211e-01,\n   2.958943309e-01,  3.009513482e-01,  3.059464842e-01,  3.108838841e-01,\n   3.157673700e-01,  3.206004778e-01,  3.253864892e-01,  3.301284590e-01,\n   3.348292396e-01,  3.394915020e-01,  3.441177538e-01,  3.487103562e-01,\n   3.532715380e-01,  3.578034086e-01,  3.623079694e-01,  3.667871243e-01,\n   3.712426887e-01,  3.756763979e-01,  3.800899146e-01,  3.844848360e-01,\n   3.888626998e-01,  3.932249899e-01,  3.975731421e-01,  4.019085486e-01,\n   4.062325624e-01,  4.105465021e-01,  4.148516550e-01,  4.191492817e-01,\n   4.234406189e-01,  4.277268830e-01,  4.320092734e-01,  4.362889752e-01,\n   4.405671624e-01,  4.448450008e-01,  4.491236505e-01,  4.534042690e-01,\n   4.576880137e-01,  4.619760446e-01,  4.662695270e-01,  4.705696344e-01,\n   4.748775513e-01,  4.791944758e-01,  4.835216226e-01,  4.878602261e-01,\n   4.922115434e-01,  4.965768580e-01,  5.009574825e-01,  5.053547628e-01,\n   5.097700819e-01,  5.142048637e-01,  5.186605777e-01,  5.231387435e-01,\n   5.276409361e-01,  5.321687910e-01,  5.367240108e-01,  5.413083712e-01,\n   5.459237281e-01,  5.505720260e-01,  5.552553059e-01,  5.599757153e-01,\n   5.647355186e-01,  5.695371087e-01,  5.743830203e-01,  5.792759446e-01,\n   5.842187455e-01,  5.892144785e-01,  5.942664115e-01,  5.993780487e-01,\n   6.045531580e-01,  6.097958022e-01,  6.151103747e-01,  6.205016414e-01,\n   6.259747884e-01,  6.315354788e-01,  6.371899183e-01,  6.429449337e-01,\n   6.488080653e-01,  6.547876776e-01,  6.608930937e-01,  6.671347567e-01,\n   6.735244293e-01,  6.800754397e-01,  6.868029884e-01,  6.937245372e-01,\n   7.008603055e-01,  7.082339156e-01,  7.158732418e-01,  7.238115502e-01,\n   7.320890585e-01,  7.407551189e-01,  7.498713590e-01,  7.595163410e-01,\n   7.697927392e-01,  7.808389100e-01,  7.928486219e-01,  8.061072219e-01,\n   8.210646014e-01,  8.385036818e-01,  8.600192556e-01,  8.900087909e-01,\n   1.000000000e+00,  0.000000000e+00,  2.215358026e-02,  2.898882354e-02,\n   3.394614311e-02,  3.798105938e-02,  4.144648181e-02,  4.451774243e-02,\n   4.729650110e-02,  4.984770216e-02,  5.221571184e-02,  5.443237088e-02,\n   5.652141289e-02,  5.850106799e-02,  6.038568517e-02,  6.218678969e-02,\n   6.391379820e-02,  6.557451766e-02,  6.717550272e-02,  6.872231759e-02,\n   7.021973180e-02,  7.167186913e-02,  7.308232258e-02,  7.445424449e-02,\n   7.579041793e-02,  7.709331403e-02,  7.836513831e-02,  7.960786867e-02,\n   8.082328661e-02,  8.201300327e-02,  8.317848116e-02,  8.432105244e-02,\n   8.544193455e-02,  8.654224335e-02,  8.762300457e-02,  8.868516351e-02,\n   8.972959354e-02,  9.075710348e-02,  9.176844399e-02,  9.276431319e-02,\n   9.374536167e-02,  9.471219680e-02,  9.566538662e-02,  9.660546329e-02,\n   9.753292615e-02,  9.844824443e-02,  9.935185975e-02,  1.002441883e-01,\n   1.011256227e-01,  1.019965342e-01,  1.028572736e-01,  1.037081735e-01,\n   1.045495491e-01,  1.053816995e-01,  1.062049090e-01,  1.070194479e-01,\n   1.078255736e-01,  1.086235313e-01,  1.094135549e-01,  1.101958675e-01,\n   1.109706825e-01,  1.117382035e-01,  1.124986257e-01,  1.132521359e-01,\n   1.139989128e-01,  1.147391281e-01,  1.154729463e-01,  1.162005255e-01,\n   1.169220174e-01,  1.176375680e-01,  1.183473176e-01,  1.190514013e-01,\n   1.197499491e-01,  1.204430863e-01,  1.211309337e-01,  1.218136078e-01,\n   1.224912210e-01,  1.231638817e-01,  1.238316948e-01,  1.244947615e-01,\n   1.251531797e-01,  1.258070441e-01,  1.264564462e-01,  1.271014748e-01,\n   1.277422156e-01,  1.283787519e-01,  1.290111642e-01,  1.296395307e-01,\n   1.302639270e-01,  1.308844268e-01,  1.315011013e-01,  1.321140199e-01,\n   1.327232497e-01,  1.333288560e-01,  1.339309025e-01,  1.345294507e-01,\n   1.351245607e-01,  1.357162908e-01,  1.363046979e-01,  1.368898372e-01,\n   1.374717625e-01,  1.380505261e-01,  1.386261792e-01,  1.391987714e-01,\n   1.397683512e-01,  1.403349657e-01,  1.408986611e-01,  1.414594822e-01,\n   1.420174728e-01,  1.425726757e-01,  1.431251326e-01,  1.436748842e-01,\n   1.442219703e-01,  1.447664296e-01,  1.453083001e-01,  1.458476188e-01,\n   1.463844220e-01,  1.469187450e-01,  1.474506225e-01,  1.479800882e-01,\n   1.485071752e-01,  1.490319159e-01,  1.495543420e-01,  1.500744844e-01,\n   1.505923734e-01,  1.511080387e-01,  1.516215093e-01,  1.521328138e-01,\n   1.526419800e-01,  1.531490351e-01,  7.879135022e-01,  7.885202823e-01,\n   7.891298744e-01,  7.897423158e-01,  7.903576445e-01,  7.909758993e-01,\n   7.915971200e-01,  7.922213470e-01,  7.928486219e-01,  7.934789870e-01,\n   7.941124856e-01,  7.947491621e-01,  7.953890617e-01,  7.960322308e-01,\n   7.966787167e-01,  7.973285680e-01,  7.979818345e-01,  7.986385668e-01,\n   7.992988171e-01,  7.999626387e-01,  8.006300863e-01,  8.013012157e-01,\n   8.019760844e-01,  8.026547512e-01,  8.033372764e-01,  8.040237217e-01,\n   8.047141508e-01,  8.054086286e-01,  8.061072219e-01,  8.068099995e-01,\n   8.075170316e-01,  8.082283907e-01,  8.089441511e-01,  8.096643892e-01,\n   8.103891836e-01,  8.111186149e-01,  8.118527664e-01,  8.125917235e-01,\n   8.133355743e-01,  8.140844092e-01,  8.148383217e-01,  8.155974078e-01,\n   8.163617667e-01,  8.171315005e-01,  8.179067146e-01,  8.186875177e-01,\n   8.194740220e-01,  8.202663434e-01,  8.210646014e-01,  8.218689198e-01,\n   8.226794264e-01,  8.234962534e-01,  8.243195376e-01,  8.251494205e-01,\n   8.259860487e-01,  8.268295742e-01,  8.276801544e-01,  8.285379526e-01,\n   8.294031383e-01,  8.302758872e-01,  8.311563821e-01,  8.320448128e-01,\n   8.329413769e-01,  8.338462796e-01,  8.347597348e-01,  8.356819654e-01,\n   8.366132035e-01,  8.375536914e-01,  8.385036818e-01,  8.394634389e-01,\n   8.404332387e-01,  8.414133700e-01,  8.424041351e-01,  8.434058508e-01,\n   8.444188491e-01,  8.454434786e-01,  8.464801056e-01,  8.475291150e-01,\n   8.485909120e-01,  8.496659235e-01,  8.507545996e-01,  8.518574158e-01,\n   8.529748743e-01,  8.541075067e-01,  8.552558764e-01,  8.564205807e-01,\n   8.576022545e-01,  8.588015730e-01,  8.600192556e-01,  8.612560700e-01,\n   8.625128365e-01,  8.637904334e-01,  8.650898027e-01,  8.664119567e-01,\n   8.677579852e-01,  8.691290643e-01,  8.705264656e-01,  8.719515676e-01,\n   8.734058685e-01,  8.748910006e-01,  8.764087479e-01,  8.779610659e-01,\n   8.795501050e-01,  8.811782388e-01,  8.828480968e-01,  8.845626044e-01,\n   8.863250302e-01,  8.881390446e-01,  8.900087909e-01,  8.919389732e-01,\n   8.939349667e-01,  8.960029571e-01,  8.981501188e-01,  9.003848467e-01,\n   9.027170611e-01,  9.051586178e-01,  9.077238691e-01,  9.104304504e-01,\n   9.133004115e-01,  9.163618972e-01,  9.196517386e-01,  9.232196333e-01,\n   9.271352827e-01,  9.315014891e-01,  9.364806173e-01,  9.423557908e-01,\n   9.497051553e-01,  9.601283182e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_4[] = {\n   0.000000000e+00,  3.984384380e-02,  5.832579568e-02,  7.301236815e-02,\n   8.571044308e-02,  9.712997207e-02,  1.076384798e-01,  1.174558331e-01,\n   1.267261030e-01,  1.355498433e-01,  1.440005755e-01,  1.521340131e-01,\n   1.599935925e-01,  1.676139708e-01,  1.750233381e-01,  1.822449999e-01,\n   1.892984943e-01,  1.962004002e-01,  2.029649361e-01,  2.096044107e-01,\n   2.161295693e-01,  2.225498639e-01,  2.288736650e-01,  2.351084323e-01,\n   2.412608514e-01,  2.473369461e-01,  2.533421701e-01,  2.592814835e-01,\n   2.651594167e-01,  2.709801239e-01,  2.767474293e-01,  2.824648650e-01,\n   2.881357051e-01,  2.937629942e-01,  2.993495720e-01,  3.048980954e-01,\n   3.104110571e-01,  3.158908025e-01,  3.213395444e-01,  3.267593757e-01,\n   3.321522814e-01,  3.375201487e-01,  3.428647762e-01,  3.481878827e-01,\n   3.534911140e-01,  3.587760502e-01,  3.640442118e-01,  3.692970656e-01,\n   3.745360293e-01,  3.797624769e-01,  3.849777427e-01,  3.901831256e-01,\n   3.953798928e-01,  4.005692836e-01,  4.057525123e-01,  4.109307719e-01,\n   4.161052368e-01,  4.212770656e-01,  4.264474043e-01,  4.316173882e-01,\n   4.367881454e-01,  4.419607986e-01,  4.471364678e-01,  4.523162730e-01,\n   4.575013361e-01,  4.626927840e-01,  4.678917504e-01,  4.730993786e-01,\n   4.783168242e-01,  4.835452571e-01,  4.887858648e-01,  4.940398548e-01,\n   4.993084575e-01,  5.045929293e-01,  5.098945556e-01,  5.152146543e-01,\n   5.205545791e-01,  5.259157235e-01,  5.312995247e-01,  5.367074679e-01,\n   5.421410908e-01,  5.476019890e-01,  5.530918211e-01,  5.586123146e-01,\n   5.641652727e-01,  5.697525810e-01,  5.753762156e-01,  5.810382514e-01,\n   5.867408718e-01,  5.924863793e-01,  5.982772066e-01,  6.041159307e-01,\n   6.100052865e-01,  6.159481842e-01,  6.219477273e-01,  6.280072336e-01,\n   6.341302598e-01,  6.403206282e-01,  6.465824581e-01,  6.529202023e-01,\n   6.593386884e-01,  6.658431677e-01,  6.724393716e-01,  6.791335790e-01,\n   6.859326945e-01,  6.928443429e-01,  6.998769823e-01,  7.070400399e-01,\n   7.143440786e-01,  7.218010013e-01,  7.294243053e-01,  7.372294009e-01,\n   7.452340172e-01,  7.534587255e-01,  7.619276229e-01,  7.706692436e-01,\n   7.797177951e-01,  7.891148743e-01,  7.989119121e-01,  8.091737631e-01,\n   8.199841727e-01,  8.314544783e-01,  8.437382354e-01,  8.570575909e-01,\n   8.717554671e-01,  8.884132391e-01,  9.081750309e-01,  9.340354421e-01,\n   1.000000000e+00,  0.000000000e+00,  7.830181122e-03,  1.139137543e-02,\n   1.418850226e-02,  1.658320402e-02,  1.871779135e-02,  2.066602660e-02,\n   2.247208377e-02,  2.416493445e-02,  2.576481427e-02,  2.728652759e-02,\n   2.874129788e-02,  3.013787773e-02,  3.148325148e-02,  3.278309970e-02,\n   3.404211745e-02,  3.526423897e-02,  3.645280035e-02,  3.761066002e-02,\n   3.874028962e-02,  3.984384380e-02,  4.092321454e-02,  4.198007405e-02,\n   4.301590906e-02,  4.403204848e-02,  4.502968601e-02,  4.600989869e-02,\n   4.697366232e-02,  4.792186435e-02,  4.885531475e-02,  4.977475515e-02,\n   5.068086670e-02,  5.157427679e-02,  5.245556482e-02,  5.332526719e-02,\n   5.418388168e-02,  5.503187125e-02,  5.586966732e-02,  5.669767277e-02,\n   5.751626449e-02,  5.832579568e-02,  5.912659791e-02,  5.991898291e-02,\n   6.070324421e-02,  6.147965861e-02,  6.224848746e-02,  6.300997789e-02,\n   6.376436383e-02,  6.451186700e-02,  6.525269779e-02,  6.598705605e-02,\n   6.671513183e-02,  6.743710601e-02,  6.815315095e-02,  6.886343102e-02,\n   6.956810312e-02,  7.026731712e-02,  7.096121636e-02,  7.164993796e-02,\n   7.233361327e-02,  7.301236815e-02,  7.368632331e-02,  7.435559460e-02,\n   7.502029328e-02,  7.568052626e-02,  7.633639637e-02,  7.698800253e-02,\n   7.763543997e-02,  7.827880045e-02,  7.891817241e-02,  7.955364111e-02,\n   8.018528885e-02,  8.081319507e-02,  8.143743649e-02,  8.205808724e-02,\n   8.267521901e-02,  8.328890113e-02,  8.389920066e-02,  8.450618257e-02,\n   8.510990973e-02,  8.571044308e-02,  8.630784169e-02,  8.690216281e-02,\n   8.749346201e-02,  8.808179319e-02,  8.866720866e-02,  8.924975924e-02,\n   8.982949428e-02,  9.040646175e-02,  9.098070826e-02,  9.155227915e-02,\n   9.212121850e-02,  9.268756922e-02,  9.325137305e-02,  9.381267065e-02,\n   9.437150159e-02,  9.492790443e-02,  9.548191674e-02,  9.603357514e-02,\n   9.658291531e-02,  9.712997207e-02,  9.767477937e-02,  9.821737033e-02,\n   9.875777727e-02,  9.929603175e-02,  9.983216458e-02,  1.003662058e-01,\n   1.008981849e-01,  1.014281304e-01,  1.019560706e-01,  1.024820327e-01,\n   1.030060436e-01,  1.035281295e-01,  1.040483160e-01,  1.045666283e-01,\n   1.050830908e-01,  1.055977276e-01,  1.061105621e-01,  1.066216173e-01,\n   1.071309159e-01,  1.076384798e-01,  1.081443306e-01,  1.086484896e-01,\n   1.091509774e-01,  1.096518144e-01,  1.101510205e-01,  1.106486152e-01,\n   1.111446177e-01,  1.116390467e-01,  8.387148718e-01,  8.393343603e-01,\n   8.399561985e-01,  8.405804153e-01,  8.412070404e-01,  8.418361039e-01,\n   8.424676364e-01,  8.431016696e-01,  8.437382354e-01,  8.443773666e-01,\n   8.450190967e-01,  8.456634598e-01,  8.463104909e-01,  8.469602257e-01,\n   8.476127005e-01,  8.482679528e-01,  8.489260206e-01,  8.495869429e-01,\n   8.502507597e-01,  8.509175116e-01,  8.515872404e-01,  8.522599890e-01,\n   8.529358009e-01,  8.536147211e-01,  8.542967954e-01,  8.549820707e-01,\n   8.556705953e-01,  8.563624185e-01,  8.570575909e-01,  8.577561644e-01,\n   8.584581922e-01,  8.591637288e-01,  8.598728304e-01,  8.605855544e-01,\n   8.613019598e-01,  8.620221073e-01,  8.627460592e-01,  8.634738795e-01,\n   8.642056341e-01,  8.649413904e-01,  8.656812183e-01,  8.664251891e-01,\n   8.671733768e-01,  8.679258570e-01,  8.686827080e-01,  8.694440102e-01,\n   8.702098467e-01,  8.709803029e-01,  8.717554671e-01,  8.725354303e-01,\n   8.733202865e-01,  8.741101326e-01,  8.749050690e-01,  8.757051991e-01,\n   8.765106300e-01,  8.773214726e-01,  8.781378413e-01,  8.789598550e-01,\n   8.797876365e-01,  8.806213131e-01,  8.814610171e-01,  8.823068853e-01,\n   8.831590600e-01,  8.840176889e-01,  8.848829255e-01,  8.857549293e-01,\n   8.866338664e-01,  8.875199097e-01,  8.884132391e-01,  8.893140423e-01,\n   8.902225152e-01,  8.911388620e-01,  8.920632964e-01,  8.929960414e-01,\n   8.939373306e-01,  8.948874086e-01,  8.958465316e-01,  8.968149685e-01,\n   8.977930015e-01,  8.987809273e-01,  8.997790579e-01,  9.007877219e-01,\n   9.018072659e-01,  9.028380553e-01,  9.038804767e-01,  9.049349386e-01,\n   9.060018740e-01,  9.070817422e-01,  9.081750309e-01,  9.092822590e-01,\n   9.104039795e-01,  9.115407821e-01,  9.126932977e-01,  9.138622016e-01,\n   9.150482183e-01,  9.162521270e-01,  9.174747671e-01,  9.187170449e-01,\n   9.199799415e-01,  9.212645218e-01,  9.225719443e-01,  9.239034737e-01,\n   9.252604942e-01,  9.266445266e-01,  9.280572475e-01,  9.295005126e-01,\n   9.309763844e-01,  9.324871660e-01,  9.340354421e-01,  9.356241297e-01,\n   9.372565403e-01,  9.389364592e-01,  9.406682455e-01,  9.424569611e-01,\n   9.443085398e-01,  9.462300117e-01,  9.482298093e-01,  9.503181901e-01,\n   9.525078404e-01,  9.548147615e-01,  9.572596184e-01,  9.598698874e-01,\n   9.626834653e-01,  9.657551776e-01,  9.691696553e-01,  9.730703746e-01,\n   9.777396883e-01,  9.839166584e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_5[] = {\n   0.000000000e+00,  1.718397325e-02,  2.918666384e-02,  3.982191900e-02,\n   4.967010892e-02,  5.898056554e-02,  6.789035732e-02,  7.648534670e-02,\n   8.482394771e-02,  9.294824662e-02,  1.008898774e-01,  1.086734061e-01,\n   1.163184120e-01,  1.238408338e-01,  1.312538777e-01,  1.385686505e-01,\n   1.457946137e-01,  1.529399183e-01,  1.600116548e-01,  1.670160458e-01,\n   1.739585944e-01,  1.808442020e-01,  1.876772621e-01,  1.944617356e-01,\n   2.012012129e-01,  2.078989648e-01,  2.145579844e-01,  2.211810228e-01,\n   2.277706187e-01,  2.343291240e-01,  2.408587250e-01,  2.473614616e-01,\n   2.538392428e-01,  2.602938611e-01,  2.667270044e-01,  2.731402670e-01,\n   2.795351586e-01,  2.859131132e-01,  2.922754961e-01,  2.986236106e-01,\n   3.049587043e-01,  3.112819738e-01,  3.175945700e-01,  3.238976024e-01,\n   3.301921429e-01,  3.364792297e-01,  3.427598703e-01,  3.490350451e-01,\n   3.553057095e-01,  3.615727972e-01,  3.678372223e-01,  3.740998819e-01,\n   3.803616579e-01,  3.866234193e-01,  3.928860241e-01,  3.991503211e-01,\n   4.054171519e-01,  4.116873524e-01,  4.179617545e-01,  4.242411878e-01,\n   4.305264813e-01,  4.368184648e-01,  4.431179707e-01,  4.494258351e-01,\n   4.557429002e-01,  4.620700150e-01,  4.684080375e-01,  4.747578362e-01,\n   4.811202917e-01,  4.874962986e-01,  4.938867672e-01,  5.002926253e-01,\n   5.067148205e-01,  5.131543219e-01,  5.196121225e-01,  5.260892413e-01,\n   5.325867260e-01,  5.391056555e-01,  5.456471426e-01,  5.522123371e-01,\n   5.588024289e-01,  5.654186518e-01,  5.720622868e-01,  5.787346666e-01,\n   5.854371797e-01,  5.921712756e-01,  5.989384699e-01,  6.057403503e-01,\n   6.125785830e-01,  6.194549198e-01,  6.263712062e-01,  6.333293900e-01,\n   6.403315311e-01,  6.473798127e-01,  6.544765537e-01,  6.616242222e-01,\n   6.688254515e-01,  6.760830583e-01,  6.834000624e-01,  6.907797107e-01,\n   6.982255036e-01,  7.057412263e-01,  7.133309847e-01,  7.209992476e-01,\n   7.287508963e-01,  7.365912828e-01,  7.445263000e-01,  7.525624649e-01,\n   7.607070196e-01,  7.689680550e-01,  7.773546621e-01,  7.858771210e-01,\n   7.945471389e-01,  8.033781531e-01,  8.123857236e-01,  8.215880493e-01,\n   8.310066601e-01,  8.406673643e-01,  8.506015785e-01,  8.608482497e-01,\n   8.714567304e-01,  8.824912671e-01,  8.940383792e-01,  9.062198336e-01,\n   9.192175665e-01,  9.333279002e-01,  9.491041716e-01,  9.678856524e-01,\n   1.000000000e+00,  0.000000000e+00,  1.755461680e-03,  2.974383579e-03,\n   4.049409107e-03,  5.040626314e-03,  5.973930679e-03,  6.863594613e-03,\n   7.718578005e-03,  8.544987597e-03,  9.347229852e-03,  1.012862089e-02,\n   1.089173827e-02,  1.163863759e-02,  1.237099276e-02,  1.309019070e-02,\n   1.379739745e-02,  1.449360569e-02,  1.517966971e-02,  1.585633163e-02,\n   1.652424157e-02,  1.718397325e-02,  1.783603632e-02,  1.848088621e-02,\n   1.911893212e-02,  1.975054348e-02,  2.037605530e-02,  2.099577264e-02,\n   2.160997434e-02,  2.221891612e-02,  2.282283327e-02,  2.342194294e-02,\n   2.401644609e-02,  2.460652914e-02,  2.519236551e-02,  2.577411682e-02,\n   2.635193407e-02,  2.692595859e-02,  2.749632292e-02,  2.806315158e-02,\n   2.862656174e-02,  2.918666384e-02,  2.974356214e-02,  3.029735520e-02,\n   3.084813633e-02,  3.139599395e-02,  3.194101199e-02,  3.248327021e-02,\n   3.302284447e-02,  3.355980701e-02,  3.409422669e-02,  3.462616924e-02,\n   3.515569742e-02,  3.568287124e-02,  3.620774811e-02,  3.673038302e-02,\n   3.725082869e-02,  3.776913565e-02,  3.828535244e-02,  3.879952567e-02,\n   3.931170015e-02,  3.982191900e-02,  4.033022371e-02,  4.083665424e-02,\n   4.134124911e-02,  4.184404549e-02,  4.234507920e-02,  4.284438486e-02,\n   4.334199589e-02,  4.383794460e-02,  4.433226224e-02,  4.482497903e-02,\n   4.531612422e-02,  4.580572615e-02,  4.629381225e-02,  4.678040914e-02,\n   4.726554259e-02,  4.774923764e-02,  4.823151856e-02,  4.871240893e-02,\n   4.919193163e-02,  4.967010892e-02,  5.014696240e-02,  5.062251311e-02,\n   5.109678146e-02,  5.156978737e-02,  5.204155017e-02,  5.251208872e-02,\n   5.298142136e-02,  5.344956598e-02,  5.391653999e-02,  5.438236037e-02,\n   5.484704369e-02,  5.531060608e-02,  5.577306330e-02,  5.623443073e-02,\n   5.669472336e-02,  5.715395584e-02,  5.761214249e-02,  5.806929727e-02,\n   5.852543383e-02,  5.898056554e-02,  5.943470541e-02,  5.988786621e-02,\n   6.034006042e-02,  6.079130022e-02,  6.124159756e-02,  6.169096411e-02,\n   6.213941131e-02,  6.258695034e-02,  6.303359217e-02,  6.347934753e-02,\n   6.392422694e-02,  6.436824068e-02,  6.481139886e-02,  6.525371137e-02,\n   6.569518790e-02,  6.613583796e-02,  6.657567088e-02,  6.701469579e-02,\n   6.745292167e-02,  6.789035732e-02,  6.832701137e-02,  6.876289229e-02,\n   6.919800841e-02,  6.963236788e-02,  7.006597873e-02,  7.049884884e-02,\n   7.093098592e-02,  7.136239758e-02,  8.893512326e-01,  8.899319144e-01,\n   8.905140528e-01,  8.910976636e-01,  8.916827628e-01,  8.922693671e-01,\n   8.928574932e-01,  8.934471581e-01,  8.940383792e-01,  8.946311744e-01,\n   8.952255618e-01,  8.958215598e-01,  8.964191872e-01,  8.970184634e-01,\n   8.976194078e-01,  8.982220406e-01,  8.988263822e-01,  8.994324535e-01,\n   9.000402756e-01,  9.006498706e-01,  9.012612605e-01,  9.018744680e-01,\n   9.024895165e-01,  9.031064296e-01,  9.037252316e-01,  9.043459474e-01,\n   9.049686022e-01,  9.055932221e-01,  9.062198336e-01,  9.068484639e-01,\n   9.074791408e-01,  9.081118930e-01,  9.087467494e-01,  9.093837402e-01,\n   9.100228958e-01,  9.106642478e-01,  9.113078283e-01,  9.119536703e-01,\n   9.126018079e-01,  9.132522756e-01,  9.139051093e-01,  9.145603455e-01,\n   9.152180219e-01,  9.158781772e-01,  9.165408510e-01,  9.172060843e-01,\n   9.178739189e-01,  9.185443982e-01,  9.192175665e-01,  9.198934697e-01,\n   9.205721548e-01,  9.212536704e-01,  9.219380665e-01,  9.226253947e-01,\n   9.233157082e-01,  9.240090618e-01,  9.247055121e-01,  9.254051178e-01,\n   9.261079392e-01,  9.268140387e-01,  9.275234810e-01,  9.282363328e-01,\n   9.289526634e-01,  9.296725443e-01,  9.303960498e-01,  9.311232568e-01,\n   9.318542451e-01,  9.325890976e-01,  9.333279002e-01,  9.340707425e-01,\n   9.348177174e-01,  9.355689216e-01,  9.363244558e-01,  9.370844250e-01,\n   9.378489387e-01,  9.386181110e-01,  9.393920613e-01,  9.401709141e-01,\n   9.409548000e-01,  9.417438555e-01,  9.425382238e-01,  9.433380549e-01,\n   9.441435064e-01,  9.449547442e-01,  9.457719426e-01,  9.465952853e-01,\n   9.474249659e-01,  9.482611893e-01,  9.491041716e-01,  9.499541421e-01,\n   9.508113436e-01,  9.516760340e-01,  9.525484879e-01,  9.534289974e-01,\n   9.543178747e-01,  9.552154532e-01,  9.561220906e-01,  9.570381705e-01,\n   9.579641060e-01,  9.589003422e-01,  9.598473609e-01,  9.608056843e-01,\n   9.617758799e-01,  9.627585673e-01,  9.637544240e-01,  9.647641946e-01,\n   9.657886998e-01,  9.668288486e-01,  9.678856524e-01,  9.689602419e-01,\n   9.700538890e-01,  9.711680324e-01,  9.723043116e-01,  9.734646090e-01,\n   9.746511046e-01,  9.758663486e-01,  9.771133575e-01,  9.783957466e-01,\n   9.797179158e-01,  9.810853170e-01,  9.825048554e-01,  9.839855139e-01,\n   9.855393811e-01,  9.871834551e-01,  9.889431082e-01,  9.908596171e-01,\n   9.930099575e-01,  9.955801360e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_6[] = {\n   0.000000000e+00,  5.080117766e-03,  1.070137945e-02,  1.654833190e-02,\n   2.254781636e-02,  2.866409040e-02,  3.487570194e-02,  4.116827592e-02,\n   4.753148246e-02,  5.395752931e-02,  6.044032428e-02,  6.697497165e-02,\n   7.355745056e-02,  8.018439980e-02,  8.685296820e-02,  9.356070740e-02,\n   1.003054928e-01,  1.070854641e-01,  1.138989798e-01,  1.207445815e-01,\n   1.276209654e-01,  1.345269603e-01,  1.414615086e-01,  1.484236516e-01,\n   1.554125169e-01,  1.624273078e-01,  1.694672950e-01,  1.765318086e-01,\n   1.836202320e-01,  1.907319966e-01,  1.978665768e-01,  2.050234861e-01,\n   2.122022736e-01,  2.194025207e-01,  2.266238386e-01,  2.338658655e-01,\n   2.411282650e-01,  2.484107238e-01,  2.557129503e-01,  2.630346728e-01,\n   2.703756383e-01,  2.777356114e-01,  2.851143732e-01,  2.925117201e-01,\n   2.999274633e-01,  3.073614276e-01,  3.148134509e-01,  3.222833839e-01,\n   3.297710888e-01,  3.372764393e-01,  3.447993202e-01,  3.523396266e-01,\n   3.598972638e-01,  3.674721468e-01,  3.750642003e-01,  3.826733580e-01,\n   3.902995629e-01,  3.979427666e-01,  4.056029293e-01,  4.132800201e-01,\n   4.209740161e-01,  4.286849029e-01,  4.364126744e-01,  4.441573325e-01,\n   4.519188877e-01,  4.596973583e-01,  4.674927712e-01,  4.753051614e-01,\n   4.831345724e-01,  4.909810563e-01,  4.988446736e-01,  5.067254939e-01,\n   5.146235957e-01,  5.225390666e-01,  5.304720038e-01,  5.384225144e-01,\n   5.463907153e-01,  5.543767340e-01,  5.623807089e-01,  5.704027895e-01,\n   5.784431372e-01,  5.865019256e-01,  5.945793415e-01,  6.026755849e-01,\n   6.107908703e-01,  6.189254274e-01,  6.270795016e-01,  6.352533555e-01,\n   6.434472698e-01,  6.516615445e-01,  6.598965001e-01,  6.681524792e-01,\n   6.764298485e-01,  6.847290001e-01,  6.930503539e-01,  7.013943600e-01,\n   7.097615009e-01,  7.181522952e-01,  7.265673005e-01,  7.350071169e-01,\n   7.434723924e-01,  7.519638269e-01,  7.604821785e-01,  7.690282700e-01,\n   7.776029971e-01,  7.862073367e-01,  7.948423585e-01,  8.035092373e-01,\n   8.122092680e-01,  8.209438843e-01,  8.297146809e-01,  8.385234402e-01,\n   8.473721669e-01,  8.562631298e-01,  8.651989160e-01,  8.741825006e-01,\n   8.832173385e-01,  8.923074868e-01,  9.014577740e-01,  9.106740372e-01,\n   9.199634692e-01,  9.293351428e-01,  9.388008459e-01,  9.483764947e-01,\n   9.580847322e-01,  9.679602881e-01,  9.780631552e-01,  9.885228861e-01,\n   1.000000000e+00,  0.000000000e+00,  2.031186508e-04,  4.277904577e-04,\n   6.613892216e-04,  9.009823117e-04,  1.145134937e-03,  1.392984626e-03,\n   1.643952451e-03,  1.897621617e-03,  2.153677069e-03,  2.411871935e-03,\n   2.672007338e-03,  2.933919501e-03,  3.197471119e-03,  3.462545351e-03,\n   3.729041521e-03,  3.996871944e-03,  4.265959538e-03,  4.536235989e-03,\n   4.807640322e-03,  5.080117766e-03,  5.353618842e-03,  5.628098622e-03,\n   5.903516126e-03,  6.179833813e-03,  6.457017165e-03,  6.735034331e-03,\n   7.013855822e-03,  7.293454263e-03,  7.573804162e-03,  7.854881727e-03,\n   8.136664696e-03,  8.419132193e-03,  8.702264603e-03,  8.986043456e-03,\n   9.270451332e-03,  9.555471773e-03,  9.841089200e-03,  1.012728885e-02,\n   1.041405671e-02,  1.070137945e-02,  1.098924441e-02,  1.127763949e-02,\n   1.156655318e-02,  1.185597446e-02,  1.214589281e-02,  1.243629815e-02,\n   1.272718084e-02,  1.301853161e-02,  1.331034159e-02,  1.360260224e-02,\n   1.389530535e-02,  1.418844305e-02,  1.448200772e-02,  1.477599204e-02,\n   1.507038896e-02,  1.536519165e-02,  1.566039354e-02,  1.595598827e-02,\n   1.625196971e-02,  1.654833190e-02,  1.684506910e-02,  1.714217573e-02,\n   1.743964640e-02,  1.773747588e-02,  1.803565910e-02,  1.833419113e-02,\n   1.863306719e-02,  1.893228265e-02,  1.923183299e-02,  1.953171384e-02,\n   1.983192093e-02,  2.013245012e-02,  2.043329736e-02,  2.073445875e-02,\n   2.103593044e-02,  2.133770871e-02,  2.163978994e-02,  2.194217058e-02,\n   2.224484717e-02,  2.254781636e-02,  2.285107484e-02,  2.315461942e-02,\n   2.345844697e-02,  2.376255441e-02,  2.406693876e-02,  2.437159710e-02,\n   2.467652658e-02,  2.498172439e-02,  2.528718782e-02,  2.559291418e-02,\n   2.589890087e-02,  2.620514532e-02,  2.651164504e-02,  2.681839755e-02,\n   2.712540048e-02,  2.743265145e-02,  2.774014817e-02,  2.804788837e-02,\n   2.835586984e-02,  2.866409040e-02,  2.897254793e-02,  2.928124034e-02,\n   2.959016557e-02,  2.989932162e-02,  3.020870651e-02,  3.051831831e-02,\n   3.082815510e-02,  3.113821503e-02,  3.144849626e-02,  3.175899699e-02,\n   3.206971545e-02,  3.238064989e-02,  3.269179862e-02,  3.300315994e-02,\n   3.331473222e-02,  3.362651382e-02,  3.393850315e-02,  3.425069864e-02,\n   3.456309874e-02,  3.487570194e-02,  3.518850674e-02,  3.550151168e-02,\n   3.581471530e-02,  3.612811617e-02,  3.644171291e-02,  3.675550412e-02,\n   3.706948845e-02,  3.738366457e-02,  9.350023775e-01,  9.354762671e-01,\n   9.359504151e-01,  9.364248235e-01,  9.368994943e-01,  9.373744298e-01,\n   9.378496321e-01,  9.383251034e-01,  9.388008459e-01,  9.392768620e-01,\n   9.397531539e-01,  9.402297240e-01,  9.407065748e-01,  9.411837086e-01,\n   9.416611280e-01,  9.421388355e-01,  9.426168337e-01,  9.430951252e-01,\n   9.435737127e-01,  9.440525989e-01,  9.445317866e-01,  9.450112787e-01,\n   9.454910780e-01,  9.459711874e-01,  9.464516101e-01,  9.469323490e-01,\n   9.474134072e-01,  9.478947881e-01,  9.483764947e-01,  9.488585305e-01,\n   9.493408988e-01,  9.498236030e-01,  9.503066468e-01,  9.507900337e-01,\n   9.512737675e-01,  9.517578518e-01,  9.522422905e-01,  9.527270877e-01,\n   9.532122472e-01,  9.536977733e-01,  9.541836701e-01,  9.546699420e-01,\n   9.551565934e-01,  9.556436288e-01,  9.561310529e-01,  9.566188703e-01,\n   9.571070860e-01,  9.575957049e-01,  9.580847322e-01,  9.585741732e-01,\n   9.590640331e-01,  9.595543176e-01,  9.600450322e-01,  9.605361829e-01,\n   9.610277757e-01,  9.615198166e-01,  9.620123120e-01,  9.625052685e-01,\n   9.629986927e-01,  9.634925915e-01,  9.639869721e-01,  9.644818417e-01,\n   9.649772079e-01,  9.654730786e-01,  9.659694616e-01,  9.664663654e-01,\n   9.669637985e-01,  9.674617697e-01,  9.679602881e-01,  9.684593633e-01,\n   9.689590051e-01,  9.694592235e-01,  9.699600290e-01,  9.704614327e-01,\n   9.709634457e-01,  9.714660798e-01,  9.719693473e-01,  9.724732607e-01,\n   9.729778333e-01,  9.734830789e-01,  9.739890116e-01,  9.744956465e-01,\n   9.750029992e-01,  9.755110859e-01,  9.760199236e-01,  9.765295303e-01,\n   9.770399245e-01,  9.775511260e-01,  9.780631552e-01,  9.785760339e-01,\n   9.790897849e-01,  9.796044321e-01,  9.801200011e-01,  9.806365186e-01,\n   9.811540131e-01,  9.816725147e-01,  9.821920555e-01,  9.827126696e-01,\n   9.832343935e-01,  9.837572658e-01,  9.842813285e-01,  9.848066262e-01,\n   9.853332070e-01,  9.858611231e-01,  9.863904306e-01,  9.869211908e-01,\n   9.874534703e-01,  9.879873420e-01,  9.885228861e-01,  9.890601910e-01,\n   9.895993546e-01,  9.901404864e-01,  9.906837088e-01,  9.912291606e-01,\n   9.917769992e-01,  9.923274056e-01,  9.928805899e-01,  9.934367981e-01,\n   9.939963231e-01,  9.945595183e-01,  9.951268194e-01,  9.956987754e-01,\n   9.962760994e-01,  9.968597547e-01,  9.974511113e-01,  9.980522715e-01,\n   9.986668684e-01,  9.993027529e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_7[] = {\n   0.000000000e+00,  8.628158357e-04,  2.475092108e-03,  4.583935209e-03,\n   7.096952025e-03,  9.959998080e-03,  1.313608688e-02,  1.659774071e-02,\n   2.032341622e-02,  2.429557249e-02,  2.849952084e-02,  3.292269077e-02,\n   3.755413613e-02,  4.238418878e-02,  4.740420751e-02,  5.260639094e-02,\n   5.798363470e-02,  6.352942037e-02,  6.923772750e-02,  7.510296296e-02,\n   8.111990344e-02,  8.728364802e-02,  9.358957879e-02,  1.000333276e-01,\n   1.066107481e-01,  1.133178917e-01,  1.201509869e-01,  1.271064215e-01,\n   1.341807267e-01,  1.413705643e-01,  1.486727135e-01,  1.560840614e-01,\n   1.636015928e-01,  1.712223819e-01,  1.789435850e-01,  1.867624336e-01,\n   1.946762277e-01,  2.026823310e-01,  2.107781652e-01,  2.189612058e-01,\n   2.272289774e-01,  2.355790499e-01,  2.440090350e-01,  2.525165830e-01,\n   2.610993790e-01,  2.697551408e-01,  2.784816155e-01,  2.872765776e-01,\n   2.961378259e-01,  3.050631818e-01,  3.140504868e-01,  3.230976006e-01,\n   3.322023993e-01,  3.413627730e-01,  3.505766247e-01,  3.598418680e-01,\n   3.691564257e-01,  3.785182283e-01,  3.879252121e-01,  3.973753177e-01,\n   4.068664887e-01,  4.163966700e-01,  4.259638064e-01,  4.355658411e-01,\n   4.452007141e-01,  4.548663610e-01,  4.645607113e-01,  4.742816867e-01,\n   4.840272003e-01,  4.937951541e-01,  5.035834381e-01,  5.133899286e-01,\n   5.232124861e-01,  5.330489543e-01,  5.428971575e-01,  5.527548995e-01,\n   5.626199611e-01,  5.724900987e-01,  5.823630414e-01,  5.922364896e-01,\n   6.021081121e-01,  6.119755439e-01,  6.218363833e-01,  6.316881896e-01,\n   6.415284797e-01,  6.513547250e-01,  6.611643481e-01,  6.709547190e-01,\n   6.807231513e-01,  6.904668978e-01,  7.001831457e-01,  7.098690119e-01,\n   7.195215370e-01,  7.291376798e-01,  7.387143103e-01,  7.482482022e-01,\n   7.577360255e-01,  7.671743367e-01,  7.765595695e-01,  7.858880232e-01,\n   7.951558504e-01,  8.043590428e-01,  8.134934152e-01,  8.225545877e-01,\n   8.315379644e-01,  8.404387099e-01,  8.492517217e-01,  8.579715981e-01,\n   8.665926009e-01,  8.751086105e-01,  8.835130738e-01,  8.917989407e-01,\n   8.999585873e-01,  9.079837220e-01,  9.158652685e-01,  9.235932192e-01,\n   9.311564473e-01,  9.385424622e-01,  9.457370844e-01,  9.527240029e-01,\n   9.594841532e-01,  9.659948145e-01,  9.722282370e-01,  9.781494374e-01,\n   9.837123866e-01,  9.888526987e-01,  9.934712572e-01,  9.973860259e-01,\n   1.000000000e+00,  0.000000000e+00,  9.067693191e-06,  2.601788078e-05,\n   4.820059569e-05,  7.465261083e-05,  1.048127443e-04,  1.383002110e-04,\n   1.748342306e-04,  2.141964580e-04,  2.562106769e-04,  3.007307106e-04,\n   3.476327046e-04,  3.968099364e-04,  4.481691751e-04,  5.016280422e-04,\n   5.571130453e-04,  6.145580775e-04,  6.739032502e-04,  7.350939699e-04,\n   7.980801956e-04,  8.628158357e-04,  9.292582508e-04,  9.973678400e-04,\n   1.067107694e-03,  1.138443301e-03,  1.211342297e-03,  1.285774248e-03,\n   1.361710467e-03,  1.439123847e-03,  1.517988727e-03,  1.598280759e-03,\n   1.679976805e-03,  1.763054835e-03,  1.847493842e-03,  1.933273767e-03,\n   2.020375422e-03,  2.108780437e-03,  2.198471197e-03,  2.289430792e-03,\n   2.381642973e-03,  2.475092108e-03,  2.569763141e-03,  2.665641563e-03,\n   2.762713374e-03,  2.860965056e-03,  2.960383545e-03,  3.060956206e-03,\n   3.162670810e-03,  3.265515512e-03,  3.369478830e-03,  3.474549630e-03,\n   3.580717104e-03,  3.687970758e-03,  3.796300395e-03,  3.905696102e-03,\n   4.016148234e-03,  4.127647407e-03,  4.240184482e-03,  4.353750556e-03,\n   4.468336952e-03,  4.583935209e-03,  4.700537073e-03,  4.818134488e-03,\n   4.936719592e-03,  5.056284701e-03,  5.176822311e-03,  5.298325087e-03,\n   5.420785855e-03,  5.544197599e-03,  5.668553455e-03,  5.793846703e-03,\n   5.920070764e-03,  6.047219196e-03,  6.175285686e-03,  6.304264048e-03,\n   6.434148218e-03,  6.564932251e-03,  6.696610316e-03,  6.829176692e-03,\n   6.962625765e-03,  7.096952025e-03,  7.232150062e-03,  7.368214563e-03,\n   7.505140312e-03,  7.642922182e-03,  7.781555134e-03,  7.921034218e-03,\n   8.061354566e-03,  8.202511392e-03,  8.344499989e-03,  8.487315727e-03,\n   8.630954049e-03,  8.775410473e-03,  8.920680587e-03,  9.066760048e-03,\n   9.213644578e-03,  9.361329967e-03,  9.509812068e-03,  9.659086794e-03,\n   9.809150120e-03,  9.959998080e-03,  1.011162676e-02,  1.026403232e-02,\n   1.041721095e-02,  1.057115891e-02,  1.072587250e-02,  1.088134808e-02,\n   1.103758206e-02,  1.119457090e-02,  1.135231109e-02,  1.151079919e-02,\n   1.167003180e-02,  1.183000553e-02,  1.199071709e-02,  1.215216320e-02,\n   1.231434061e-02,  1.247724614e-02,  1.264087663e-02,  1.280522896e-02,\n   1.297030006e-02,  1.313608688e-02,  1.330258642e-02,  1.346979572e-02,\n   1.363771182e-02,  1.380633185e-02,  1.397565292e-02,  1.414567221e-02,\n   1.431638691e-02,  1.448779426e-02,  9.697701794e-01,  9.700800780e-01,\n   9.703892311e-01,  9.706976341e-01,  9.710052825e-01,  9.713121718e-01,\n   9.716182971e-01,  9.719236538e-01,  9.722282370e-01,  9.725320418e-01,\n   9.728350634e-01,  9.731372967e-01,  9.734387366e-01,  9.737393780e-01,\n   9.740392156e-01,  9.743382442e-01,  9.746364583e-01,  9.749338526e-01,\n   9.752304215e-01,  9.755261595e-01,  9.758210607e-01,  9.761151194e-01,\n   9.764083299e-01,  9.767006860e-01,  9.769921818e-01,  9.772828111e-01,\n   9.775725678e-01,  9.778614453e-01,  9.781494374e-01,  9.784365375e-01,\n   9.787227390e-01,  9.790080350e-01,  9.792924187e-01,  9.795758831e-01,\n   9.798584211e-01,  9.801400255e-01,  9.804206889e-01,  9.807004039e-01,\n   9.809791628e-01,  9.812569578e-01,  9.815337811e-01,  9.818096247e-01,\n   9.820844802e-01,  9.823583394e-01,  9.826311938e-01,  9.829030346e-01,\n   9.831738531e-01,  9.834436402e-01,  9.837123866e-01,  9.839800831e-01,\n   9.842467200e-01,  9.845122875e-01,  9.847767757e-01,  9.850401742e-01,\n   9.853024728e-01,  9.855636606e-01,  9.858237269e-01,  9.860826604e-01,\n   9.863404498e-01,  9.865970833e-01,  9.868525491e-01,  9.871068348e-01,\n   9.873599279e-01,  9.876118155e-01,  9.878624846e-01,  9.881119215e-01,\n   9.883601123e-01,  9.886070430e-01,  9.888526987e-01,  9.890970645e-01,\n   9.893401250e-01,  9.895818642e-01,  9.898222658e-01,  9.900613130e-01,\n   9.902989885e-01,  9.905352744e-01,  9.907701522e-01,  9.910036031e-01,\n   9.912356073e-01,  9.914661446e-01,  9.916951942e-01,  9.919227342e-01,\n   9.921487423e-01,  9.923731953e-01,  9.925960690e-01,  9.928173386e-01,\n   9.930369779e-01,  9.932549602e-01,  9.934712572e-01,  9.936858398e-01,\n   9.938986775e-01,  9.941097386e-01,  9.943189898e-01,  9.945263963e-01,\n   9.947319219e-01,  9.949355283e-01,  9.951371754e-01,  9.953368212e-01,\n   9.955344211e-01,  9.957299284e-01,  9.959232935e-01,  9.961144639e-01,\n   9.963033839e-01,  9.964899943e-01,  9.966742319e-01,  9.968560291e-01,\n   9.970353134e-01,  9.972120071e-01,  9.973860259e-01,  9.975572790e-01,\n   9.977256672e-01,  9.978910825e-01,  9.980534063e-01,  9.982125075e-01,\n   9.983682408e-01,  9.985204433e-01,  9.986689317e-01,  9.988134972e-01,\n   9.989538995e-01,  9.990898586e-01,  9.992210430e-01,  9.993470525e-01,\n   9.994673926e-01,  9.995814322e-01,  9.996883319e-01,  9.997869049e-01,\n   9.998753055e-01,  9.999501124e-01,  1.000000000e+00,\n};\nconst float dist_icdf_3_8[] = {\n   0.000000000e+00,  7.260746841e-09,  1.477806909e-07,  8.612331732e-07,\n   3.007830713e-06,  7.934854247e-06,  1.752882833e-05,  3.425937221e-05,\n   6.121739140e-05,  1.021490463e-04,  1.614863454e-04,  2.443748784e-04,\n   3.566989945e-04,  5.051045878e-04,  6.970195392e-04,  9.406717821e-04,\n   1.245104881e-03,  1.620190949e-03,  2.076640683e-03,  2.626010211e-03,\n   3.280704445e-03,  4.053976533e-03,  4.959923000e-03,  6.013474119e-03,\n   7.230378990e-03,  8.627184825e-03,  1.022120986e-02,  1.203050935e-02,\n   1.407383400e-02,  1.637058038e-02,  1.894073253e-02,  2.180479447e-02,\n   2.498371287e-02,  2.849878957e-02,  3.237158339e-02,  3.662380112e-02,\n   4.127717736e-02,  4.635334302e-02,  5.187368287e-02,  5.785918196e-02,\n   6.433026168e-02,  7.130660582e-02,  7.880697769e-02,  8.684902918e-02,\n   9.544910331e-02,  1.046220316e-01,  1.143809287e-01,  1.247369851e-01,\n   1.356992623e-01,  1.472744914e-01,  1.594668782e-01,  1.722779184e-01,\n   1.857062260e-01,  1.997473774e-01,  2.143937750e-01,  2.296345338e-01,\n   2.454553931e-01,  2.618386574e-01,  2.787631687e-01,  2.962043118e-01,\n   3.141340558e-01,  3.325210327e-01,  3.513306529e-01,  3.705252597e-01,\n   3.900643214e-01,  4.099046591e-01,  4.300007103e-01,  4.503048243e-01,\n   4.707675863e-01,  4.913381680e-01,  5.119646978e-01,  5.325946486e-01,\n   5.531752357e-01,  5.736538210e-01,  5.939783167e-01,  6.140975840e-01,\n   6.339618206e-01,  6.535229314e-01,  6.727348788e-01,  6.915540062e-01,\n   7.099393325e-01,  7.278528130e-01,  7.452595647e-01,  7.621280532e-01,\n   7.784302410e-01,  7.941416955e-01,  8.092416579e-01,  8.237130726e-01,\n   8.375425797e-01,  8.507204712e-01,  8.632406150e-01,  8.751003476e-01,\n   8.863003401e-01,  8.968444397e-01,  9.067394917e-01,  9.159951428e-01,\n   9.246236328e-01,  9.326395744e-01,  9.400597275e-01,  9.469027689e-01,\n   9.531890613e-01,  9.589404239e-01,  9.641799069e-01,  9.689315719e-01,\n   9.732202796e-01,  9.770714872e-01,  9.805110549e-01,  9.835650640e-01,\n   9.862596462e-01,  9.886208241e-01,  9.906743645e-01,  9.924456421e-01,\n   9.939595152e-01,  9.952402119e-01,  9.963112263e-01,  9.971952242e-01,\n   9.979139565e-01,  9.984881808e-01,  9.989375875e-01,  9.992807325e-01,\n   9.995349708e-01,  9.997163933e-01,  9.998397613e-01,  9.999184380e-01,\n   9.999643114e-01,  9.999877046e-01,  9.999972617e-01,  9.999997899e-01,\n   1.000000000e+00,  0.000000000e+00,  1.603794521e-14,  3.264263130e-13,\n   1.902341143e-12,  6.643877156e-12,  1.752703395e-11,  3.871906265e-11,\n   7.567556292e-11,  1.352253232e-10,  2.256462269e-10,  3.567342945e-10,\n   5.398672505e-10,  7.880636012e-10,  1.116037950e-09,  1.540253109e-09,\n   2.078969427e-09,  2.752291707e-09,  3.582213960e-09,  4.592662261e-09,\n   5.809535875e-09,  7.260746841e-09,  8.976258132e-09,  1.098812053e-08,\n   1.333050831e-08,  1.603975385e-08,  1.915438117e-08,  2.271513862e-08,\n   2.676503061e-08,  3.134934855e-08,  3.651570105e-08,  4.231404335e-08,\n   4.879670608e-08,  5.601842344e-08,  6.403636067e-08,  7.291014104e-08,\n   8.270187225e-08,  9.347617228e-08,  1.053001949e-07,  1.182436543e-07,\n   1.323788501e-07,  1.477806909e-07,  1.645267180e-07,  1.826971290e-07,\n   2.023748002e-07,  2.236453094e-07,  2.465969581e-07,  2.713207930e-07,\n   2.979106280e-07,  3.264630648e-07,  3.570775143e-07,  3.898562170e-07,\n   4.249042634e-07,  4.623296138e-07,  5.022431186e-07,  5.447585373e-07,\n   5.899925582e-07,  6.380648172e-07,  6.890979169e-07,  7.432174450e-07,\n   8.005519927e-07,  8.612331732e-07,  9.253956390e-07,  9.931771007e-07,\n   1.064718343e-06,  1.140163245e-06,  1.219658794e-06,  1.303355103e-06,\n   1.391405432e-06,  1.483966199e-06,  1.581196998e-06,  1.683260620e-06,\n   1.790323061e-06,  1.902553545e-06,  2.020124537e-06,  2.143211761e-06,\n   2.271994210e-06,  2.406654168e-06,  2.547377223e-06,  2.694352281e-06,\n   2.847771581e-06,  3.007830713e-06,  3.174728628e-06,  3.348667660e-06,\n   3.529853531e-06,  3.718495373e-06,  3.914805740e-06,  4.119000622e-06,\n   4.331299459e-06,  4.551925155e-06,  4.781104092e-06,  5.019066144e-06,\n   5.266044692e-06,  5.522276635e-06,  5.788002404e-06,  6.063465978e-06,\n   6.348914894e-06,  6.644600263e-06,  6.950776781e-06,  7.267702742e-06,\n   7.595640054e-06,  7.934854247e-06,  8.285614490e-06,  8.648193601e-06,\n   9.022868063e-06,  9.409918030e-06,  9.809627348e-06,  1.022228356e-05,\n   1.064817792e-05,  1.108760541e-05,  1.154086475e-05,  1.200825840e-05,\n   1.249009259e-05,  1.298667732e-05,  1.349832636e-05,  1.402535730e-05,\n   1.456809152e-05,  1.512685422e-05,  1.570197445e-05,  1.629378508e-05,\n   1.690262284e-05,  1.752882833e-05,  1.817274601e-05,  1.883472426e-05,\n   1.951511532e-05,  2.021427536e-05,  2.093256448e-05,  2.167034668e-05,\n   2.242798994e-05,  2.320586617e-05,  9.997964932e-01,  9.998023198e-01,\n   9.998080237e-01,  9.998136065e-01,  9.998190699e-01,  9.998244155e-01,\n   9.998296448e-01,  9.998347596e-01,  9.998397613e-01,  9.998446516e-01,\n   9.998494321e-01,  9.998541043e-01,  9.998586698e-01,  9.998631301e-01,\n   9.998674868e-01,  9.998717413e-01,  9.998758953e-01,  9.998799502e-01,\n   9.998839075e-01,  9.998877688e-01,  9.998915354e-01,  9.998952090e-01,\n   9.998987908e-01,  9.999022825e-01,  9.999056854e-01,  9.999090010e-01,\n   9.999122307e-01,  9.999153759e-01,  9.999184380e-01,  9.999214184e-01,\n   9.999243185e-01,  9.999271398e-01,  9.999298834e-01,  9.999325509e-01,\n   9.999351435e-01,  9.999376626e-01,  9.999401095e-01,  9.999424855e-01,\n   9.999447920e-01,  9.999470302e-01,  9.999492015e-01,  9.999513070e-01,\n   9.999533481e-01,  9.999553261e-01,  9.999572421e-01,  9.999590974e-01,\n   9.999608932e-01,  9.999626308e-01,  9.999643114e-01,  9.999659361e-01,\n   9.999675061e-01,  9.999690226e-01,  9.999704868e-01,  9.999718998e-01,\n   9.999732628e-01,  9.999745769e-01,  9.999758432e-01,  9.999770628e-01,\n   9.999782368e-01,  9.999793664e-01,  9.999804525e-01,  9.999814963e-01,\n   9.999824989e-01,  9.999834611e-01,  9.999843842e-01,  9.999852691e-01,\n   9.999861167e-01,  9.999869283e-01,  9.999877046e-01,  9.999884467e-01,\n   9.999891556e-01,  9.999898322e-01,  9.999904774e-01,  9.999910922e-01,\n   9.999916776e-01,  9.999922343e-01,  9.999927633e-01,  9.999932656e-01,\n   9.999937419e-01,  9.999941931e-01,  9.999946201e-01,  9.999950237e-01,\n   9.999954048e-01,  9.999957640e-01,  9.999961024e-01,  9.999964205e-01,\n   9.999967193e-01,  9.999969995e-01,  9.999972617e-01,  9.999975069e-01,\n   9.999977356e-01,  9.999979486e-01,  9.999981465e-01,  9.999983302e-01,\n   9.999985002e-01,  9.999986572e-01,  9.999988019e-01,  9.999989348e-01,\n   9.999990566e-01,  9.999991680e-01,  9.999992694e-01,  9.999993615e-01,\n   9.999994448e-01,  9.999995198e-01,  9.999995872e-01,  9.999996474e-01,\n   9.999997010e-01,  9.999997483e-01,  9.999997899e-01,  9.999998263e-01,\n   9.999998578e-01,  9.999998849e-01,  9.999999081e-01,  9.999999276e-01,\n   9.999999439e-01,  9.999999574e-01,  9.999999683e-01,  9.999999771e-01,\n   9.999999839e-01,  9.999999891e-01,  9.999999929e-01,  9.999999957e-01,\n   9.999999976e-01,  9.999999988e-01,  9.999999995e-01,  9.999999998e-01,\n   1.000000000e+00,  1.000000000e+00,  1.000000000e+00,\n};\nconst float dist_icdf_4_0[] = {\n   0.000000000e+00,  4.467052359e-01,  4.524901822e-01,  4.561468853e-01,\n   4.588886998e-01,  4.611122150e-01,  4.629993420e-01,  4.646493976e-01,\n   4.661228313e-01,  4.674592991e-01,  4.686862873e-01,  4.698236689e-01,\n   4.708863008e-01,  4.718855962e-01,  4.728305226e-01,  4.737282613e-01,\n   4.745846574e-01,  4.754045361e-01,  4.761919299e-01,  4.769502454e-01,\n   4.776823891e-01,  4.783908617e-01,  4.790778320e-01,  4.797451944e-01,\n   4.803946144e-01,  4.810275646e-01,  4.816453550e-01,  4.822491559e-01,\n   4.828400186e-01,  4.834188913e-01,  4.839866328e-01,  4.845440240e-01,\n   4.850917777e-01,  4.856305466e-01,  4.861609307e-01,  4.866834830e-01,\n   4.871987150e-01,  4.877071012e-01,  4.882090827e-01,  4.887050713e-01,\n   4.891954520e-01,  4.896805860e-01,  4.901608127e-01,  4.906364524e-01,\n   4.911078075e-01,  4.915751648e-01,  4.920387966e-01,  4.924989622e-01,\n   4.929559091e-01,  4.934098742e-01,  4.938610847e-01,  4.943097593e-01,\n   4.947561087e-01,  4.952003364e-01,  4.956426400e-01,  4.960832111e-01,\n   4.965222365e-01,  4.969598984e-01,  4.973963755e-01,  4.978318429e-01,\n   4.982664731e-01,  4.987004361e-01,  4.991339005e-01,  4.995670331e-01,\n   5.000000000e-01,  5.004329669e-01,  5.008660995e-01,  5.012995639e-01,\n   5.017335269e-01,  5.021681571e-01,  5.026036245e-01,  5.030401016e-01,\n   5.034777635e-01,  5.039167889e-01,  5.043573600e-01,  5.047996636e-01,\n   5.052438913e-01,  5.056902407e-01,  5.061389153e-01,  5.065901258e-01,\n   5.070440909e-01,  5.075010378e-01,  5.079612034e-01,  5.084248352e-01,\n   5.088921925e-01,  5.093635476e-01,  5.098391873e-01,  5.103194140e-01,\n   5.108045480e-01,  5.112949287e-01,  5.117909173e-01,  5.122928988e-01,\n   5.128012850e-01,  5.133165170e-01,  5.138390693e-01,  5.143694534e-01,\n   5.149082223e-01,  5.154559760e-01,  5.160133672e-01,  5.165811087e-01,\n   5.171599814e-01,  5.177508441e-01,  5.183546450e-01,  5.189724354e-01,\n   5.196053856e-01,  5.202548056e-01,  5.209221680e-01,  5.216091383e-01,\n   5.223176109e-01,  5.230497546e-01,  5.238080701e-01,  5.245954639e-01,\n   5.254153426e-01,  5.262717387e-01,  5.271694774e-01,  5.281144038e-01,\n   5.291136992e-01,  5.301763311e-01,  5.313137127e-01,  5.325407009e-01,\n   5.338771687e-01,  5.353506024e-01,  5.370006580e-01,  5.388877850e-01,\n   5.411113002e-01,  5.438531147e-01,  5.475098178e-01,  5.532947641e-01,\n   1.000000000e+00,  0.000000000e+00,  4.261396487e-01,  4.304173410e-01,\n   4.330330957e-01,  4.349454447e-01,  4.364635318e-01,  4.377278046e-01,\n   4.388143512e-01,  4.397691782e-01,  4.406222922e-01,  4.413943829e-01,\n   4.421003374e-01,  4.427512360e-01,  4.433555549e-01,  4.439199273e-01,\n   4.444496452e-01,  4.449489995e-01,  4.454215198e-01,  4.458701450e-01,\n   4.462973494e-01,  4.467052359e-01,  4.470956078e-01,  4.474700231e-01,\n   4.478298376e-01,  4.481762385e-01,  4.485102716e-01,  4.488328629e-01,\n   4.491448366e-01,  4.494469294e-01,  4.497398025e-01,  4.500240518e-01,\n   4.503002164e-01,  4.505687854e-01,  4.508302039e-01,  4.510848785e-01,\n   4.513331814e-01,  4.515754543e-01,  4.518120116e-01,  4.520431432e-01,\n   4.522691173e-01,  4.524901822e-01,  4.527065683e-01,  4.529184900e-01,\n   4.531261470e-01,  4.533297255e-01,  4.535293996e-01,  4.537253324e-01,\n   4.539176767e-01,  4.541065759e-01,  4.542921649e-01,  4.544745706e-01,\n   4.546539126e-01,  4.548303040e-01,  4.550038511e-01,  4.551746551e-01,\n   4.553428112e-01,  4.555084100e-01,  4.556715373e-01,  4.558322746e-01,\n   4.559906994e-01,  4.561468853e-01,  4.563009024e-01,  4.564528177e-01,\n   4.566026947e-01,  4.567505944e-01,  4.568965748e-01,  4.570406913e-01,\n   4.571829971e-01,  4.573235430e-01,  4.574623777e-01,  4.575995476e-01,\n   4.577350976e-01,  4.578690706e-01,  4.580015076e-01,  4.581324484e-01,\n   4.582619307e-01,  4.583899913e-01,  4.585166653e-01,  4.586419865e-01,\n   4.587659875e-01,  4.588886998e-01,  4.590101536e-01,  4.591303782e-01,\n   4.592494016e-01,  4.593672512e-01,  4.594839531e-01,  4.595995329e-01,\n   4.597140149e-01,  4.598274229e-01,  4.599397799e-01,  4.600511080e-01,\n   4.601614287e-01,  4.602707630e-01,  4.603791308e-01,  4.604865518e-01,\n   4.605930448e-01,  4.606986283e-01,  4.608033200e-01,  4.609071373e-01,\n   4.610100969e-01,  4.611122150e-01,  4.612135076e-01,  4.613139900e-01,\n   4.614136770e-01,  4.615125833e-01,  4.616107230e-01,  4.617081097e-01,\n   4.618047568e-01,  4.619006773e-01,  4.619958839e-01,  4.620903889e-01,\n   4.621842043e-01,  4.622773417e-01,  4.623698125e-01,  4.624616279e-01,\n   4.625527986e-01,  4.626433351e-01,  4.627332479e-01,  4.628225468e-01,\n   4.629112416e-01,  4.629993420e-01,  4.630868572e-01,  4.631737963e-01,\n   4.632601682e-01,  4.633459815e-01,  4.634312448e-01,  4.635159663e-01,\n   4.636001541e-01,  4.636838162e-01,  5.363161838e-01,  5.363998459e-01,\n   5.364840337e-01,  5.365687552e-01,  5.366540185e-01,  5.367398318e-01,\n   5.368262037e-01,  5.369131428e-01,  5.370006580e-01,  5.370887584e-01,\n   5.371774532e-01,  5.372667521e-01,  5.373566649e-01,  5.374472014e-01,\n   5.375383721e-01,  5.376301875e-01,  5.377226583e-01,  5.378157957e-01,\n   5.379096111e-01,  5.380041161e-01,  5.380993227e-01,  5.381952432e-01,\n   5.382918903e-01,  5.383892770e-01,  5.384874167e-01,  5.385863230e-01,\n   5.386860100e-01,  5.387864924e-01,  5.388877850e-01,  5.389899031e-01,\n   5.390928627e-01,  5.391966800e-01,  5.393013717e-01,  5.394069552e-01,\n   5.395134482e-01,  5.396208692e-01,  5.397292370e-01,  5.398385713e-01,\n   5.399488920e-01,  5.400602201e-01,  5.401725771e-01,  5.402859851e-01,\n   5.404004671e-01,  5.405160469e-01,  5.406327488e-01,  5.407505984e-01,\n   5.408696218e-01,  5.409898464e-01,  5.411113002e-01,  5.412340125e-01,\n   5.413580135e-01,  5.414833347e-01,  5.416100087e-01,  5.417380693e-01,\n   5.418675516e-01,  5.419984924e-01,  5.421309294e-01,  5.422649024e-01,\n   5.424004524e-01,  5.425376223e-01,  5.426764570e-01,  5.428170029e-01,\n   5.429593087e-01,  5.431034252e-01,  5.432494056e-01,  5.433973053e-01,\n   5.435471823e-01,  5.436990976e-01,  5.438531147e-01,  5.440093006e-01,\n   5.441677254e-01,  5.443284627e-01,  5.444915900e-01,  5.446571888e-01,\n   5.448253449e-01,  5.449961489e-01,  5.451696960e-01,  5.453460874e-01,\n   5.455254294e-01,  5.457078351e-01,  5.458934241e-01,  5.460823233e-01,\n   5.462746676e-01,  5.464706004e-01,  5.466702745e-01,  5.468738530e-01,\n   5.470815100e-01,  5.472934317e-01,  5.475098178e-01,  5.477308827e-01,\n   5.479568568e-01,  5.481879884e-01,  5.484245457e-01,  5.486668186e-01,\n   5.489151215e-01,  5.491697961e-01,  5.494312146e-01,  5.496997836e-01,\n   5.499759482e-01,  5.502601975e-01,  5.505530706e-01,  5.508551634e-01,\n   5.511671371e-01,  5.514897284e-01,  5.518237615e-01,  5.521701624e-01,\n   5.525299769e-01,  5.529043922e-01,  5.532947641e-01,  5.537026506e-01,\n   5.541298550e-01,  5.545784802e-01,  5.550510005e-01,  5.555503548e-01,\n   5.560800727e-01,  5.566444451e-01,  5.572487640e-01,  5.578996626e-01,\n   5.586056171e-01,  5.593777078e-01,  5.602308218e-01,  5.611856488e-01,\n   5.622721954e-01,  5.635364682e-01,  5.650545553e-01,  5.669669043e-01,\n   5.695826590e-01,  5.738603513e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_1[] = {\n   0.000000000e+00,  2.942760427e-01,  3.149979404e-01,  3.283773557e-01,\n   3.385420074e-01,  3.468640109e-01,  3.539797032e-01,  3.602393943e-01,\n   3.658577298e-01,  3.709763124e-01,  3.756937647e-01,  3.800816940e-01,\n   3.841938366e-01,  3.880716133e-01,  3.917476707e-01,  3.952482270e-01,\n   3.985946785e-01,  4.018047309e-01,  4.048932152e-01,  4.078726882e-01,\n   4.107538836e-01,  4.135460553e-01,  4.162572435e-01,  4.188944830e-01,\n   4.214639687e-01,  4.239711877e-01,  4.264210268e-01,  4.288178601e-01,\n   4.311656214e-01,  4.334678633e-01,  4.357278084e-01,  4.379483903e-01,\n   4.401322901e-01,  4.422819660e-01,  4.443996800e-01,  4.464875197e-01,\n   4.485474179e-01,  4.505811690e-01,  4.525904443e-01,  4.545768041e-01,\n   4.565417095e-01,  4.584865320e-01,  4.604125624e-01,  4.623210188e-01,\n   4.642130535e-01,  4.660897592e-01,  4.679521747e-01,  4.698012900e-01,\n   4.716380508e-01,  4.734633630e-01,  4.752780960e-01,  4.770830868e-01,\n   4.788791426e-01,  4.806670443e-01,  4.824475489e-01,  4.842213922e-01,\n   4.859892913e-01,  4.877519464e-01,  4.895100437e-01,  4.912642567e-01,\n   4.930152485e-01,  4.947636734e-01,  4.965101792e-01,  4.982554083e-01,\n   5.000000000e-01,  5.017445917e-01,  5.034898208e-01,  5.052363266e-01,\n   5.069847515e-01,  5.087357433e-01,  5.104899563e-01,  5.122480536e-01,\n   5.140107087e-01,  5.157786078e-01,  5.175524511e-01,  5.193329557e-01,\n   5.211208574e-01,  5.229169132e-01,  5.247219040e-01,  5.265366370e-01,\n   5.283619492e-01,  5.301987100e-01,  5.320478253e-01,  5.339102408e-01,\n   5.357869465e-01,  5.376789812e-01,  5.395874376e-01,  5.415134680e-01,\n   5.434582905e-01,  5.454231959e-01,  5.474095557e-01,  5.494188310e-01,\n   5.514525821e-01,  5.535124803e-01,  5.556003200e-01,  5.577180340e-01,\n   5.598677099e-01,  5.620516097e-01,  5.642721916e-01,  5.665321367e-01,\n   5.688343786e-01,  5.711821399e-01,  5.735789732e-01,  5.760288123e-01,\n   5.785360313e-01,  5.811055170e-01,  5.837427565e-01,  5.864539447e-01,\n   5.892461164e-01,  5.921273118e-01,  5.951067848e-01,  5.981952691e-01,\n   6.014053215e-01,  6.047517730e-01,  6.082523293e-01,  6.119283867e-01,\n   6.158061634e-01,  6.199183060e-01,  6.243062353e-01,  6.290236876e-01,\n   6.341422702e-01,  6.397606057e-01,  6.460202968e-01,  6.531359891e-01,\n   6.614579926e-01,  6.716226443e-01,  6.850020596e-01,  7.057239573e-01,\n   1.000000000e+00,  0.000000000e+00,  2.257007217e-01,  2.392522814e-01,\n   2.477316055e-01,  2.540208669e-01,  2.590666306e-01,  2.633040873e-01,\n   2.669711435e-01,  2.702127061e-01,  2.731238704e-01,  2.757705562e-01,\n   2.782004191e-01,  2.804490771e-01,  2.825438811e-01,  2.845063102e-01,\n   2.863535537e-01,  2.880995920e-01,  2.897559554e-01,  2.913322699e-01,\n   2.928366589e-01,  2.942760427e-01,  2.956563678e-01,  2.969827826e-01,\n   2.982597759e-01,  2.994912858e-01,  3.006807873e-01,  3.018313627e-01,\n   3.029457594e-01,  3.040264374e-01,  3.050756078e-01,  3.060952664e-01,\n   3.070872205e-01,  3.080531126e-01,  3.089944396e-01,  3.099125703e-01,\n   3.108087590e-01,  3.116841588e-01,  3.125398319e-01,  3.133767591e-01,\n   3.141958480e-01,  3.149979404e-01,  3.157838182e-01,  3.165542093e-01,\n   3.173097924e-01,  3.180512014e-01,  3.187790295e-01,  3.194938321e-01,\n   3.201961308e-01,  3.208864154e-01,  3.215651468e-01,  3.222327592e-01,\n   3.228896622e-01,  3.235362425e-01,  3.241728657e-01,  3.247998779e-01,\n   3.254176069e-01,  3.260263636e-01,  3.266264432e-01,  3.272181261e-01,\n   3.278016789e-01,  3.283773557e-01,  3.289453981e-01,  3.295060368e-01,\n   3.300594917e-01,  3.306059731e-01,  3.311456815e-01,  3.316788091e-01,\n   3.322055395e-01,  3.327260487e-01,  3.332405052e-01,  3.337490707e-01,\n   3.342519003e-01,  3.347491428e-01,  3.352409412e-01,  3.357274329e-01,\n   3.362087502e-01,  3.366850201e-01,  3.371563650e-01,  3.376229028e-01,\n   3.380847471e-01,  3.385420074e-01,  3.389947892e-01,  3.394431945e-01,\n   3.398873216e-01,  3.403272656e-01,  3.407631181e-01,  3.411949680e-01,\n   3.416229011e-01,  3.420470002e-01,  3.424673457e-01,  3.428840153e-01,\n   3.432970844e-01,  3.437066258e-01,  3.441127102e-01,  3.445154062e-01,\n   3.449147802e-01,  3.453108966e-01,  3.457038180e-01,  3.460936052e-01,\n   3.464803171e-01,  3.468640109e-01,  3.472447423e-01,  3.476225654e-01,\n   3.479975327e-01,  3.483696954e-01,  3.487391032e-01,  3.491058044e-01,\n   3.494698462e-01,  3.498312743e-01,  3.501901334e-01,  3.505464670e-01,\n   3.509003174e-01,  3.512517258e-01,  3.516007324e-01,  3.519473765e-01,\n   3.522916962e-01,  3.526337289e-01,  3.529735109e-01,  3.533110777e-01,\n   3.536464638e-01,  3.539797032e-01,  3.543108288e-01,  3.546398728e-01,\n   3.549668668e-01,  3.552918414e-01,  3.556148266e-01,  3.559358520e-01,\n   3.562549461e-01,  3.565721370e-01,  6.434278630e-01,  6.437450539e-01,\n   6.440641480e-01,  6.443851734e-01,  6.447081586e-01,  6.450331332e-01,\n   6.453601272e-01,  6.456891712e-01,  6.460202968e-01,  6.463535362e-01,\n   6.466889223e-01,  6.470264891e-01,  6.473662711e-01,  6.477083038e-01,\n   6.480526235e-01,  6.483992676e-01,  6.487482742e-01,  6.490996826e-01,\n   6.494535330e-01,  6.498098666e-01,  6.501687257e-01,  6.505301538e-01,\n   6.508941956e-01,  6.512608968e-01,  6.516303046e-01,  6.520024673e-01,\n   6.523774346e-01,  6.527552577e-01,  6.531359891e-01,  6.535196829e-01,\n   6.539063948e-01,  6.542961820e-01,  6.546891034e-01,  6.550852198e-01,\n   6.554845938e-01,  6.558872898e-01,  6.562933742e-01,  6.567029156e-01,\n   6.571159847e-01,  6.575326543e-01,  6.579529998e-01,  6.583770989e-01,\n   6.588050320e-01,  6.592368819e-01,  6.596727344e-01,  6.601126784e-01,\n   6.605568055e-01,  6.610052108e-01,  6.614579926e-01,  6.619152529e-01,\n   6.623770972e-01,  6.628436350e-01,  6.633149799e-01,  6.637912498e-01,\n   6.642725671e-01,  6.647590588e-01,  6.652508572e-01,  6.657480997e-01,\n   6.662509293e-01,  6.667594948e-01,  6.672739513e-01,  6.677944605e-01,\n   6.683211909e-01,  6.688543185e-01,  6.693940269e-01,  6.699405083e-01,\n   6.704939632e-01,  6.710546019e-01,  6.716226443e-01,  6.721983211e-01,\n   6.727818739e-01,  6.733735568e-01,  6.739736364e-01,  6.745823931e-01,\n   6.752001221e-01,  6.758271343e-01,  6.764637575e-01,  6.771103378e-01,\n   6.777672408e-01,  6.784348532e-01,  6.791135846e-01,  6.798038692e-01,\n   6.805061679e-01,  6.812209705e-01,  6.819487986e-01,  6.826902076e-01,\n   6.834457907e-01,  6.842161818e-01,  6.850020596e-01,  6.858041520e-01,\n   6.866232409e-01,  6.874601681e-01,  6.883158412e-01,  6.891912410e-01,\n   6.900874297e-01,  6.910055604e-01,  6.919468874e-01,  6.929127795e-01,\n   6.939047336e-01,  6.949243922e-01,  6.959735626e-01,  6.970542406e-01,\n   6.981686373e-01,  6.993192127e-01,  7.005087142e-01,  7.017402241e-01,\n   7.030172174e-01,  7.043436322e-01,  7.057239573e-01,  7.071633411e-01,\n   7.086677301e-01,  7.102440446e-01,  7.119004080e-01,  7.136464463e-01,\n   7.154936898e-01,  7.174561189e-01,  7.195509229e-01,  7.217995809e-01,\n   7.242294438e-01,  7.268761296e-01,  7.297872939e-01,  7.330288565e-01,\n   7.366959127e-01,  7.409333694e-01,  7.459791331e-01,  7.522683945e-01,\n   7.607477186e-01,  7.742992783e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_2[] = {\n   0.000000000e+00,  1.329253218e-01,  1.610934102e-01,  1.806852421e-01,\n   1.962705253e-01,  2.094622071e-01,  2.210382042e-01,  2.314396010e-01,\n   2.409431685e-01,  2.497351692e-01,  2.579475763e-01,  2.656776665e-01,\n   2.729994260e-01,  2.799705799e-01,  2.866371296e-01,  2.930363944e-01,\n   2.991991170e-01,  3.051509596e-01,  3.109135934e-01,  3.165055077e-01,\n   3.219426216e-01,  3.272387534e-01,  3.324059874e-01,  3.374549622e-01,\n   3.423951013e-01,  3.472347992e-01,  3.519815725e-01,  3.566421845e-01,\n   3.612227478e-01,  3.657288105e-01,  3.701654277e-01,  3.745372232e-01,\n   3.788484406e-01,  3.831029882e-01,  3.873044766e-01,  3.914562515e-01,\n   3.955614230e-01,  3.996228896e-01,  4.036433604e-01,  4.076253744e-01,\n   4.115713170e-01,  4.154834352e-01,  4.193638510e-01,  4.232145731e-01,\n   4.270375076e-01,  4.308344677e-01,  4.346071819e-01,  4.383573026e-01,\n   4.420864122e-01,  4.457960304e-01,  4.494876198e-01,  4.531625910e-01,\n   4.568223083e-01,  4.604680938e-01,  4.641012319e-01,  4.677229732e-01,\n   4.713345385e-01,  4.749371221e-01,  4.785318955e-01,  4.821200102e-01,\n   4.857026010e-01,  4.892807890e-01,  4.928556844e-01,  4.964283892e-01,\n   5.000000000e-01,  5.035716108e-01,  5.071443156e-01,  5.107192110e-01,\n   5.142973990e-01,  5.178799898e-01,  5.214681045e-01,  5.250628779e-01,\n   5.286654615e-01,  5.322770268e-01,  5.358987681e-01,  5.395319062e-01,\n   5.431776917e-01,  5.468374090e-01,  5.505123802e-01,  5.542039696e-01,\n   5.579135878e-01,  5.616426974e-01,  5.653928181e-01,  5.691655323e-01,\n   5.729624924e-01,  5.767854269e-01,  5.806361490e-01,  5.845165648e-01,\n   5.884286830e-01,  5.923746256e-01,  5.963566396e-01,  6.003771104e-01,\n   6.044385770e-01,  6.085437485e-01,  6.126955234e-01,  6.168970118e-01,\n   6.211515594e-01,  6.254627768e-01,  6.298345723e-01,  6.342711895e-01,\n   6.387772522e-01,  6.433578155e-01,  6.480184275e-01,  6.527652008e-01,\n   6.576048987e-01,  6.625450378e-01,  6.675940126e-01,  6.727612466e-01,\n   6.780573784e-01,  6.834944923e-01,  6.890864066e-01,  6.948490404e-01,\n   7.008008830e-01,  7.069636056e-01,  7.133628704e-01,  7.200294201e-01,\n   7.270005740e-01,  7.343223335e-01,  7.420524237e-01,  7.502648308e-01,\n   7.590568315e-01,  7.685603990e-01,  7.789617958e-01,  7.905377929e-01,\n   8.037294747e-01,  8.193147579e-01,  8.389065898e-01,  8.670746782e-01,\n   1.000000000e+00,  0.000000000e+00,  5.996547206e-02,  7.184741903e-02,\n   7.992098351e-02,  8.622724115e-02,  9.148204456e-02,  9.602905702e-02,\n   1.000624113e-01,  1.037035326e-01,  1.070339066e-01,  1.101111201e-01,\n   1.129775181e-01,  1.156652343e-01,  1.181992850e-01,  1.205995631e-01,\n   1.228821734e-01,  1.250603540e-01,  1.271451321e-01,  1.291457991e-01,\n   1.310702644e-01,  1.329253218e-01,  1.347168539e-01,  1.364499918e-01,\n   1.381292403e-01,  1.397585777e-01,  1.413415371e-01,  1.428812713e-01,\n   1.443806070e-01,  1.458420891e-01,  1.472680177e-01,  1.486604794e-01,\n   1.500213735e-01,  1.513524339e-01,  1.526552488e-01,  1.539312764e-01,\n   1.551818593e-01,  1.564082367e-01,  1.576115548e-01,  1.587928764e-01,\n   1.599531886e-01,  1.610934102e-01,  1.622143982e-01,  1.633169530e-01,\n   1.644018236e-01,  1.654697118e-01,  1.665212764e-01,  1.675571368e-01,\n   1.685778759e-01,  1.695840429e-01,  1.705761565e-01,  1.715547064e-01,\n   1.725201560e-01,  1.734729441e-01,  1.744134868e-01,  1.753421787e-01,\n   1.762593951e-01,  1.771654923e-01,  1.780608098e-01,  1.789456708e-01,\n   1.798203835e-01,  1.806852421e-01,  1.815405272e-01,  1.823865072e-01,\n   1.832234388e-01,  1.840515676e-01,  1.848711289e-01,  1.856823480e-01,\n   1.864854413e-01,  1.872806161e-01,  1.880680717e-01,  1.888479995e-01,\n   1.896205835e-01,  1.903860008e-01,  1.911444216e-01,  1.918960100e-01,\n   1.926409240e-01,  1.933793159e-01,  1.941113327e-01,  1.948371161e-01,\n   1.955568029e-01,  1.962705253e-01,  1.969784108e-01,  1.976805830e-01,\n   1.983771611e-01,  1.990682606e-01,  1.997539932e-01,  2.004344670e-01,\n   2.011097868e-01,  2.017800541e-01,  2.024453673e-01,  2.031058217e-01,\n   2.037615099e-01,  2.044125216e-01,  2.050589439e-01,  2.057008614e-01,\n   2.063383562e-01,  2.069715083e-01,  2.076003950e-01,  2.082250919e-01,\n   2.088456721e-01,  2.094622071e-01,  2.100747662e-01,  2.106834169e-01,\n   2.112882249e-01,  2.118892542e-01,  2.124865671e-01,  2.130802245e-01,\n   2.136702853e-01,  2.142568074e-01,  2.148398469e-01,  2.154194587e-01,\n   2.159956962e-01,  2.165686117e-01,  2.171382560e-01,  2.177046789e-01,\n   2.182679288e-01,  2.188280531e-01,  2.193850981e-01,  2.199391090e-01,\n   2.204901300e-01,  2.210382042e-01,  2.215833738e-01,  2.221256800e-01,\n   2.226651632e-01,  2.232018627e-01,  2.237358173e-01,  2.242670645e-01,\n   2.247956414e-01,  2.253215840e-01,  7.746784160e-01,  7.752043586e-01,\n   7.757329355e-01,  7.762641827e-01,  7.767981373e-01,  7.773348368e-01,\n   7.778743200e-01,  7.784166262e-01,  7.789617958e-01,  7.795098700e-01,\n   7.800608910e-01,  7.806149019e-01,  7.811719469e-01,  7.817320712e-01,\n   7.822953211e-01,  7.828617440e-01,  7.834313883e-01,  7.840043038e-01,\n   7.845805413e-01,  7.851601531e-01,  7.857431926e-01,  7.863297147e-01,\n   7.869197755e-01,  7.875134329e-01,  7.881107458e-01,  7.887117751e-01,\n   7.893165831e-01,  7.899252338e-01,  7.905377929e-01,  7.911543279e-01,\n   7.917749081e-01,  7.923996050e-01,  7.930284917e-01,  7.936616438e-01,\n   7.942991386e-01,  7.949410561e-01,  7.955874784e-01,  7.962384901e-01,\n   7.968941783e-01,  7.975546327e-01,  7.982199459e-01,  7.988902132e-01,\n   7.995655330e-01,  8.002460068e-01,  8.009317394e-01,  8.016228389e-01,\n   8.023194170e-01,  8.030215892e-01,  8.037294747e-01,  8.044431971e-01,\n   8.051628839e-01,  8.058886673e-01,  8.066206841e-01,  8.073590760e-01,\n   8.081039900e-01,  8.088555784e-01,  8.096139992e-01,  8.103794165e-01,\n   8.111520005e-01,  8.119319283e-01,  8.127193839e-01,  8.135145587e-01,\n   8.143176520e-01,  8.151288711e-01,  8.159484324e-01,  8.167765612e-01,\n   8.176134928e-01,  8.184594728e-01,  8.193147579e-01,  8.201796165e-01,\n   8.210543292e-01,  8.219391902e-01,  8.228345077e-01,  8.237406049e-01,\n   8.246578213e-01,  8.255865132e-01,  8.265270559e-01,  8.274798440e-01,\n   8.284452936e-01,  8.294238435e-01,  8.304159571e-01,  8.314221241e-01,\n   8.324428632e-01,  8.334787236e-01,  8.345302882e-01,  8.355981764e-01,\n   8.366830470e-01,  8.377856018e-01,  8.389065898e-01,  8.400468114e-01,\n   8.412071236e-01,  8.423884452e-01,  8.435917633e-01,  8.448181407e-01,\n   8.460687236e-01,  8.473447512e-01,  8.486475661e-01,  8.499786265e-01,\n   8.513395206e-01,  8.527319823e-01,  8.541579109e-01,  8.556193930e-01,\n   8.571187287e-01,  8.586584629e-01,  8.602414223e-01,  8.618707597e-01,\n   8.635500082e-01,  8.652831461e-01,  8.670746782e-01,  8.689297356e-01,\n   8.708542009e-01,  8.728548679e-01,  8.749396460e-01,  8.771178266e-01,\n   8.794004369e-01,  8.818007150e-01,  8.843347657e-01,  8.870224819e-01,\n   8.898888799e-01,  8.929660934e-01,  8.962964674e-01,  8.999375887e-01,\n   9.039709430e-01,  9.085179554e-01,  9.137727588e-01,  9.200790165e-01,\n   9.281525810e-01,  9.400345279e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_3[] = {\n   0.000000000e+00,  8.975041338e-02,  1.162473991e-01,  1.355249614e-01,\n   1.512936819e-01,  1.649122887e-01,  1.770520914e-01,  1.881007254e-01,\n   1.983050234e-01,  2.078331596e-01,  2.168055629e-01,  2.253118330e-01,\n   2.334206861e-01,  2.411861398e-01,  2.486515363e-01,  2.558522597e-01,\n   2.628176282e-01,  2.695722476e-01,  2.761370029e-01,  2.825297973e-01,\n   2.887661144e-01,  2.948594524e-01,  3.008216629e-01,  3.066632201e-01,\n   3.123934360e-01,  3.180206352e-01,  3.235522970e-01,  3.289951728e-01,\n   3.343553839e-01,  3.396385031e-01,  3.448496230e-01,  3.499934147e-01,\n   3.550741774e-01,  3.600958806e-01,  3.650622015e-01,  3.699765560e-01,\n   3.748421269e-01,  3.796618880e-01,  3.844386250e-01,  3.891749545e-01,\n   3.938733402e-01,  3.985361082e-01,  4.031654591e-01,  4.077634807e-01,\n   4.123321577e-01,  4.168733819e-01,  4.213889598e-01,  4.258806213e-01,\n   4.303500262e-01,  4.347987708e-01,  4.392283936e-01,  4.436403810e-01,\n   4.480361724e-01,  4.524171643e-01,  4.567847154e-01,  4.611401499e-01,\n   4.654847619e-01,  4.698198185e-01,  4.741465637e-01,  4.784662212e-01,\n   4.827799977e-01,  4.870890860e-01,  4.913946678e-01,  4.956979165e-01,\n   5.000000000e-01,  5.043020835e-01,  5.086053322e-01,  5.129109140e-01,\n   5.172200023e-01,  5.215337788e-01,  5.258534363e-01,  5.301801815e-01,\n   5.345152381e-01,  5.388598501e-01,  5.432152846e-01,  5.475828357e-01,\n   5.519638276e-01,  5.563596190e-01,  5.607716064e-01,  5.652012292e-01,\n   5.696499738e-01,  5.741193787e-01,  5.786110402e-01,  5.831266181e-01,\n   5.876678423e-01,  5.922365193e-01,  5.968345409e-01,  6.014638918e-01,\n   6.061266598e-01,  6.108250455e-01,  6.155613750e-01,  6.203381120e-01,\n   6.251578731e-01,  6.300234440e-01,  6.349377985e-01,  6.399041194e-01,\n   6.449258226e-01,  6.500065853e-01,  6.551503770e-01,  6.603614969e-01,\n   6.656446161e-01,  6.710048272e-01,  6.764477030e-01,  6.819793648e-01,\n   6.876065640e-01,  6.933367799e-01,  6.991783371e-01,  7.051405476e-01,\n   7.112338856e-01,  7.174702027e-01,  7.238629971e-01,  7.304277524e-01,\n   7.371823718e-01,  7.441477403e-01,  7.513484637e-01,  7.588138602e-01,\n   7.665793139e-01,  7.746881670e-01,  7.831944371e-01,  7.921668404e-01,\n   8.016949766e-01,  8.118992746e-01,  8.229479086e-01,  8.350877113e-01,\n   8.487063181e-01,  8.644750386e-01,  8.837526009e-01,  9.102495866e-01,\n   1.000000000e+00,  0.000000000e+00,  3.021113725e-02,  3.876273424e-02,\n   4.487216763e-02,  4.979729147e-02,  5.399731859e-02,  5.769863847e-02,\n   6.103174370e-02,  6.407960009e-02,  6.689865660e-02,  6.952928409e-02,\n   7.200148168e-02,  7.433822858e-02,  7.655756669e-02,  7.867395440e-02,\n   8.069918013e-02,  8.264299815e-02,  8.451358326e-02,  8.631786327e-02,\n   8.806176714e-02,  8.975041338e-02,  9.138825542e-02,  9.297919519e-02,\n   9.452667321e-02,  9.603374058e-02,  9.750311731e-02,  9.893723998e-02,\n   1.003383009e-01,  1.017082806e-01,  1.030489753e-01,  1.043620194e-01,\n   1.056489052e-01,  1.069109995e-01,  1.081495573e-01,  1.093657344e-01,\n   1.105605979e-01,  1.117351350e-01,  1.128902615e-01,  1.140268282e-01,\n   1.151456277e-01,  1.162473991e-01,  1.173328335e-01,  1.184025778e-01,\n   1.194572384e-01,  1.204973852e-01,  1.215235538e-01,  1.225362490e-01,\n   1.235359466e-01,  1.245230960e-01,  1.254981222e-01,  1.264614274e-01,\n   1.274133926e-01,  1.283543795e-01,  1.292847315e-01,  1.302047748e-01,\n   1.311148201e-01,  1.320151631e-01,  1.329060858e-01,  1.337878571e-01,\n   1.346607338e-01,  1.355249614e-01,  1.363807745e-01,  1.372283978e-01,\n   1.380680464e-01,  1.388999264e-01,  1.397242356e-01,  1.405411637e-01,\n   1.413508929e-01,  1.421535983e-01,  1.429494483e-01,  1.437386048e-01,\n   1.445212236e-01,  1.452974549e-01,  1.460674433e-01,  1.468313283e-01,\n   1.475892444e-01,  1.483413214e-01,  1.490876846e-01,  1.498284550e-01,\n   1.505637498e-01,  1.512936819e-01,  1.520183608e-01,  1.527378923e-01,\n   1.534523790e-01,  1.541619199e-01,  1.548666114e-01,  1.555665464e-01,\n   1.562618154e-01,  1.569525060e-01,  1.576387030e-01,  1.583204891e-01,\n   1.589979443e-01,  1.596711464e-01,  1.603401709e-01,  1.610050912e-01,\n   1.616659788e-01,  1.623229029e-01,  1.629759312e-01,  1.636251293e-01,\n   1.642705610e-01,  1.649122887e-01,  1.655503730e-01,  1.661848727e-01,\n   1.668158456e-01,  1.674433475e-01,  1.680674331e-01,  1.686881556e-01,\n   1.693055671e-01,  1.699197181e-01,  1.705306581e-01,  1.711384353e-01,\n   1.717430969e-01,  1.723446887e-01,  1.729432558e-01,  1.735388419e-01,\n   1.741314899e-01,  1.747212417e-01,  1.753081381e-01,  1.758922193e-01,\n   1.764735243e-01,  1.770520914e-01,  1.776279580e-01,  1.782011606e-01,\n   1.787717352e-01,  1.793397167e-01,  1.799051395e-01,  1.804680372e-01,\n   1.810284426e-01,  1.815863879e-01,  8.184136121e-01,  8.189715574e-01,\n   8.195319628e-01,  8.200948605e-01,  8.206602833e-01,  8.212282648e-01,\n   8.217988394e-01,  8.223720420e-01,  8.229479086e-01,  8.235264757e-01,\n   8.241077807e-01,  8.246918619e-01,  8.252787583e-01,  8.258685101e-01,\n   8.264611581e-01,  8.270567442e-01,  8.276553113e-01,  8.282569031e-01,\n   8.288615647e-01,  8.294693419e-01,  8.300802819e-01,  8.306944329e-01,\n   8.313118444e-01,  8.319325669e-01,  8.325566525e-01,  8.331841544e-01,\n   8.338151273e-01,  8.344496270e-01,  8.350877113e-01,  8.357294390e-01,\n   8.363748707e-01,  8.370240688e-01,  8.376770971e-01,  8.383340212e-01,\n   8.389949088e-01,  8.396598291e-01,  8.403288536e-01,  8.410020557e-01,\n   8.416795109e-01,  8.423612970e-01,  8.430474940e-01,  8.437381846e-01,\n   8.444334536e-01,  8.451333886e-01,  8.458380801e-01,  8.465476210e-01,\n   8.472621077e-01,  8.479816392e-01,  8.487063181e-01,  8.494362502e-01,\n   8.501715450e-01,  8.509123154e-01,  8.516586786e-01,  8.524107556e-01,\n   8.531686717e-01,  8.539325567e-01,  8.547025451e-01,  8.554787764e-01,\n   8.562613952e-01,  8.570505517e-01,  8.578464017e-01,  8.586491071e-01,\n   8.594588363e-01,  8.602757644e-01,  8.611000736e-01,  8.619319536e-01,\n   8.627716022e-01,  8.636192255e-01,  8.644750386e-01,  8.653392662e-01,\n   8.662121429e-01,  8.670939142e-01,  8.679848369e-01,  8.688851799e-01,\n   8.697952252e-01,  8.707152685e-01,  8.716456205e-01,  8.725866074e-01,\n   8.735385726e-01,  8.745018778e-01,  8.754769040e-01,  8.764640534e-01,\n   8.774637510e-01,  8.784764462e-01,  8.795026148e-01,  8.805427616e-01,\n   8.815974222e-01,  8.826671665e-01,  8.837526009e-01,  8.848543723e-01,\n   8.859731718e-01,  8.871097385e-01,  8.882648650e-01,  8.894394021e-01,\n   8.906342656e-01,  8.918504427e-01,  8.930890005e-01,  8.943510948e-01,\n   8.956379806e-01,  8.969510247e-01,  8.982917194e-01,  8.996616991e-01,\n   9.010627600e-01,  9.024968827e-01,  9.039662594e-01,  9.054733268e-01,\n   9.070208048e-01,  9.086117446e-01,  9.102495866e-01,  9.119382329e-01,\n   9.136821367e-01,  9.154864167e-01,  9.173570019e-01,  9.193008199e-01,\n   9.213260456e-01,  9.234424333e-01,  9.256617714e-01,  9.279985183e-01,\n   9.304707159e-01,  9.331013434e-01,  9.359203999e-01,  9.389682563e-01,\n   9.423013615e-01,  9.460026814e-01,  9.502027085e-01,  9.551278324e-01,\n   9.612372658e-01,  9.697888628e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_4[] = {\n   0.000000000e+00,  5.193814818e-02,  7.401811327e-02,  9.120458682e-02,\n   1.058663166e-01,  1.189202006e-01,  1.308362052e-01,  1.418933697e-01,\n   1.522734245e-01,  1.621025549e-01,  1.714726111e-01,  1.804529204e-01,\n   1.890973392e-01,  1.974486983e-01,  2.055417302e-01,  2.134050679e-01,\n   2.210626508e-01,  2.285347408e-01,  2.358386713e-01,  2.429894119e-01,\n   2.500000000e-01,  2.568818769e-01,  2.636451519e-01,  2.702988135e-01,\n   2.768508989e-01,  2.833086329e-01,  2.896785411e-01,  2.959665446e-01,\n   3.021780381e-01,  3.083179563e-01,  3.143908297e-01,  3.204008323e-01,\n   3.263518223e-01,  3.322473775e-01,  3.380908251e-01,  3.438852687e-01,\n   3.496336111e-01,  3.553385743e-01,  3.610027181e-01,  3.666284548e-01,\n   3.722180640e-01,  3.777737050e-01,  3.832974272e-01,  3.887911812e-01,\n   3.942568269e-01,  3.996961420e-01,  4.051108296e-01,  4.105025244e-01,\n   4.158727991e-01,  4.212231702e-01,  4.265551027e-01,  4.318700152e-01,\n   4.371692843e-01,  4.424542486e-01,  4.477262124e-01,  4.529864496e-01,\n   4.582362067e-01,  4.634767063e-01,  4.687091501e-01,  4.739347217e-01,\n   4.791545894e-01,  4.843699088e-01,  4.895818256e-01,  4.947914783e-01,\n   5.000000000e-01,  5.052085217e-01,  5.104181744e-01,  5.156300912e-01,\n   5.208454106e-01,  5.260652783e-01,  5.312908499e-01,  5.365232937e-01,\n   5.417637933e-01,  5.470135504e-01,  5.522737876e-01,  5.575457514e-01,\n   5.628307157e-01,  5.681299848e-01,  5.734448973e-01,  5.787768298e-01,\n   5.841272009e-01,  5.894974756e-01,  5.948891704e-01,  6.003038580e-01,\n   6.057431731e-01,  6.112088188e-01,  6.167025728e-01,  6.222262950e-01,\n   6.277819360e-01,  6.333715452e-01,  6.389972819e-01,  6.446614257e-01,\n   6.503663889e-01,  6.561147313e-01,  6.619091749e-01,  6.677526225e-01,\n   6.736481777e-01,  6.795991677e-01,  6.856091703e-01,  6.916820437e-01,\n   6.978219619e-01,  7.040334554e-01,  7.103214589e-01,  7.166913671e-01,\n   7.231491011e-01,  7.297011865e-01,  7.363548481e-01,  7.431181231e-01,\n   7.500000000e-01,  7.570105881e-01,  7.641613287e-01,  7.714652592e-01,\n   7.789373492e-01,  7.865949321e-01,  7.944582698e-01,  8.025513017e-01,\n   8.109026608e-01,  8.195470796e-01,  8.285273889e-01,  8.378974451e-01,\n   8.477265755e-01,  8.581066303e-01,  8.691637948e-01,  8.810797994e-01,\n   8.941336834e-01,  9.087954132e-01,  9.259818867e-01,  9.480618518e-01,\n   1.000000000e+00,  0.000000000e+00,  1.145470721e-02,  1.622542401e-02,\n   1.989663458e-02,  2.299876875e-02,  2.573727597e-02,  2.821751926e-02,\n   3.050208680e-02,  3.263175676e-02,  3.463485273e-02,  3.653199618e-02,\n   3.833875414e-02,  4.006722018e-02,  4.172701134e-02,  4.332592482e-02,\n   4.487038640e-02,  4.636576607e-02,  4.781660603e-02,  4.922678900e-02,\n   5.059966497e-02,  5.193814818e-02,  5.324479261e-02,  5.452185137e-02,\n   5.577132412e-02,  5.699499524e-02,  5.819446496e-02,  5.937117492e-02,\n   6.052642930e-02,  6.166141254e-02,  6.277720414e-02,  6.387479129e-02,\n   6.495507948e-02,  6.601890173e-02,  6.706702641e-02,  6.810016409e-02,\n   6.911897342e-02,  7.012406629e-02,  7.111601237e-02,  7.209534308e-02,\n   7.306255505e-02,  7.401811327e-02,  7.496245383e-02,  7.589598635e-02,\n   7.681909623e-02,  7.773214654e-02,  7.863547983e-02,  7.952941972e-02,\n   8.041427232e-02,  8.129032752e-02,  8.215786021e-02,  8.301713126e-02,\n   8.386838861e-02,  8.471186806e-02,  8.554779414e-02,  8.637638080e-02,\n   8.719783215e-02,  8.801234305e-02,  8.882009969e-02,  8.962128013e-02,\n   9.041605477e-02,  9.120458682e-02,  9.198703271e-02,  9.276354249e-02,\n   9.353426017e-02,  9.429932405e-02,  9.505886707e-02,  9.581301706e-02,\n   9.656189703e-02,  9.730562539e-02,  9.804431623e-02,  9.877807951e-02,\n   9.950702128e-02,  1.002312439e-01,  1.009508460e-01,  1.016659232e-01,\n   1.023765675e-01,  1.030828682e-01,  1.037849113e-01,  1.044827804e-01,\n   1.051765561e-01,  1.058663166e-01,  1.065521377e-01,  1.072340928e-01,\n   1.079122531e-01,  1.085866876e-01,  1.092574634e-01,  1.099246454e-01,\n   1.105882968e-01,  1.112484789e-01,  1.119052514e-01,  1.125586721e-01,\n   1.132087973e-01,  1.138556819e-01,  1.144993790e-01,  1.151399407e-01,\n   1.157774172e-01,  1.164118579e-01,  1.170433105e-01,  1.176718217e-01,\n   1.182974369e-01,  1.189202006e-01,  1.195401558e-01,  1.201573446e-01,\n   1.207718083e-01,  1.213835869e-01,  1.219927195e-01,  1.225992444e-01,\n   1.232031989e-01,  1.238046194e-01,  1.244035415e-01,  1.250000000e-01,\n   1.255940289e-01,  1.261856614e-01,  1.267749300e-01,  1.273618665e-01,\n   1.279465020e-01,  1.285288668e-01,  1.291089908e-01,  1.296869029e-01,\n   1.302626318e-01,  1.308362052e-01,  1.314076506e-01,  1.319769946e-01,\n   1.325442636e-01,  1.331094831e-01,  1.336726783e-01,  1.342338738e-01,\n   1.347930939e-01,  1.353503622e-01,  8.646496378e-01,  8.652069061e-01,\n   8.657661262e-01,  8.663273217e-01,  8.668905169e-01,  8.674557364e-01,\n   8.680230054e-01,  8.685923494e-01,  8.691637948e-01,  8.697373682e-01,\n   8.703130971e-01,  8.708910092e-01,  8.714711332e-01,  8.720534980e-01,\n   8.726381335e-01,  8.732250700e-01,  8.738143386e-01,  8.744059711e-01,\n   8.750000000e-01,  8.755964585e-01,  8.761953806e-01,  8.767968011e-01,\n   8.774007556e-01,  8.780072805e-01,  8.786164131e-01,  8.792281917e-01,\n   8.798426554e-01,  8.804598442e-01,  8.810797994e-01,  8.817025631e-01,\n   8.823281783e-01,  8.829566895e-01,  8.835881421e-01,  8.842225828e-01,\n   8.848600593e-01,  8.855006210e-01,  8.861443181e-01,  8.867912027e-01,\n   8.874413279e-01,  8.880947486e-01,  8.887515211e-01,  8.894117032e-01,\n   8.900753546e-01,  8.907425366e-01,  8.914133124e-01,  8.920877469e-01,\n   8.927659072e-01,  8.934478623e-01,  8.941336834e-01,  8.948234439e-01,\n   8.955172196e-01,  8.962150887e-01,  8.969171318e-01,  8.976234325e-01,\n   8.983340768e-01,  8.990491540e-01,  8.997687561e-01,  9.004929787e-01,\n   9.012219205e-01,  9.019556838e-01,  9.026943746e-01,  9.034381030e-01,\n   9.041869829e-01,  9.049411329e-01,  9.057006759e-01,  9.064657398e-01,\n   9.072364575e-01,  9.080129673e-01,  9.087954132e-01,  9.095839452e-01,\n   9.103787199e-01,  9.111799003e-01,  9.119876569e-01,  9.128021679e-01,\n   9.136236192e-01,  9.144522059e-01,  9.152881319e-01,  9.161316114e-01,\n   9.169828687e-01,  9.178421398e-01,  9.187096725e-01,  9.195857277e-01,\n   9.204705803e-01,  9.213645202e-01,  9.222678535e-01,  9.231809038e-01,\n   9.241040136e-01,  9.250375462e-01,  9.259818867e-01,  9.269374450e-01,\n   9.279046569e-01,  9.288839876e-01,  9.298759337e-01,  9.308810266e-01,\n   9.318998359e-01,  9.329329736e-01,  9.339810983e-01,  9.350449205e-01,\n   9.361252087e-01,  9.372227959e-01,  9.383385875e-01,  9.394735707e-01,\n   9.406288251e-01,  9.418055350e-01,  9.430050048e-01,  9.442286759e-01,\n   9.454781486e-01,  9.467552074e-01,  9.480618518e-01,  9.494003350e-01,\n   9.507732110e-01,  9.521833940e-01,  9.536342339e-01,  9.551296136e-01,\n   9.566740752e-01,  9.582729887e-01,  9.599327798e-01,  9.616612459e-01,\n   9.634680038e-01,  9.653651473e-01,  9.673682432e-01,  9.694979132e-01,\n   9.717824807e-01,  9.742627240e-01,  9.770012312e-01,  9.801033654e-01,\n   9.837745760e-01,  9.885452928e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_5[] = {\n   0.000000000e+00,  2.388903283e-02,  3.910358742e-02,  5.220819259e-02,\n   6.412196115e-02,  7.523158189e-02,  8.574666414e-02,  9.579710309e-02,\n   1.054704935e-01,  1.148294737e-01,  1.239208162e-01,  1.327806295e-01,\n   1.414375369e-01,  1.499147229e-01,  1.582313066e-01,  1.664032957e-01,\n   1.744442676e-01,  1.823658695e-01,  1.901781920e-01,  1.978900537e-01,\n   2.055092223e-01,  2.130425879e-01,  2.204963009e-01,  2.278758833e-01,\n   2.351863194e-01,  2.424321300e-01,  2.496174337e-01,  2.567459991e-01,\n   2.638212872e-01,  2.708464889e-01,  2.778245559e-01,  2.847582274e-01,\n   2.916500534e-01,  2.985024150e-01,  3.053175414e-01,  3.120975253e-01,\n   3.188443366e-01,  3.255598340e-01,  3.322457755e-01,  3.389038278e-01,\n   3.455355747e-01,  3.521425244e-01,  3.587261163e-01,  3.652877272e-01,\n   3.718286764e-01,  3.783502312e-01,  3.848536108e-01,  3.913399911e-01,\n   3.978105080e-01,  4.042662613e-01,  4.107083175e-01,  4.171377132e-01,\n   4.235554577e-01,  4.299625354e-01,  4.363599089e-01,  4.427485204e-01,\n   4.491292946e-01,  4.555031406e-01,  4.618709535e-01,  4.682336166e-01,\n   4.745920034e-01,  4.809469789e-01,  4.872994016e-01,  4.936501252e-01,\n   5.000000000e-01,  5.063498748e-01,  5.127005984e-01,  5.190530211e-01,\n   5.254079966e-01,  5.317663834e-01,  5.381290465e-01,  5.444968594e-01,\n   5.508707054e-01,  5.572514796e-01,  5.636400911e-01,  5.700374646e-01,\n   5.764445423e-01,  5.828622868e-01,  5.892916825e-01,  5.957337387e-01,\n   6.021894920e-01,  6.086600089e-01,  6.151463892e-01,  6.216497688e-01,\n   6.281713236e-01,  6.347122728e-01,  6.412738837e-01,  6.478574756e-01,\n   6.544644253e-01,  6.610961722e-01,  6.677542245e-01,  6.744401660e-01,\n   6.811556634e-01,  6.879024747e-01,  6.946824586e-01,  7.014975850e-01,\n   7.083499466e-01,  7.152417726e-01,  7.221754441e-01,  7.291535111e-01,\n   7.361787128e-01,  7.432540009e-01,  7.503825663e-01,  7.575678700e-01,\n   7.648136806e-01,  7.721241167e-01,  7.795036991e-01,  7.869574121e-01,\n   7.944907777e-01,  8.021099463e-01,  8.098218080e-01,  8.176341305e-01,\n   8.255557324e-01,  8.335967043e-01,  8.417686934e-01,  8.500852771e-01,\n   8.585624631e-01,  8.672193705e-01,  8.760791838e-01,  8.851705263e-01,\n   8.945295065e-01,  9.042028969e-01,  9.142533359e-01,  9.247684181e-01,\n   9.358780389e-01,  9.477918074e-01,  9.608964126e-01,  9.761109672e-01,\n   1.000000000e+00,  0.000000000e+00,  2.861875328e-03,  4.673544585e-03,\n   6.226985886e-03,  7.633578893e-03,  8.940294528e-03,  1.017264359e-02,\n   1.134646155e-02,  1.247244240e-02,  1.355824280e-02,  1.460958601e-02,\n   1.563089418e-02,  1.662567510e-02,  1.759677143e-02,  1.854652807e-02,\n   1.947690844e-02,  2.038957776e-02,  2.128596402e-02,  2.216730370e-02,\n   2.303467659e-02,  2.388903283e-02,  2.473121412e-02,  2.556197066e-02,\n   2.638197480e-02,  2.719183210e-02,  2.799209048e-02,  2.878324779e-02,\n   2.956575808e-02,  3.034003700e-02,  3.110646622e-02,  3.186539734e-02,\n   3.261715512e-02,  3.336204038e-02,  3.410033242e-02,  3.483229117e-02,\n   3.555815906e-02,  3.627816268e-02,  3.699251418e-02,  3.770141261e-02,\n   3.840504500e-02,  3.910358742e-02,  3.979720584e-02,  4.048605697e-02,\n   4.117028896e-02,  4.185004206e-02,  4.252544923e-02,  4.319663666e-02,\n   4.386372424e-02,  4.452682601e-02,  4.518605059e-02,  4.584150148e-02,\n   4.649327746e-02,  4.714147286e-02,  4.778617786e-02,  4.842747872e-02,\n   4.906545804e-02,  4.970019499e-02,  5.033176548e-02,  5.096024238e-02,\n   5.158569566e-02,  5.220819259e-02,  5.282779784e-02,  5.344457367e-02,\n   5.405858002e-02,  5.466987467e-02,  5.527851330e-02,  5.588454965e-02,\n   5.648803555e-02,  5.708902111e-02,  5.768755469e-02,  5.828368310e-02,\n   5.887745156e-02,  5.946890387e-02,  6.005808240e-02,  6.064502822e-02,\n   6.122978109e-02,  6.181237958e-02,  6.239286108e-02,  6.297126187e-02,\n   6.354761716e-02,  6.412196115e-02,  6.469432703e-02,  6.526474707e-02,\n   6.583325262e-02,  6.639987419e-02,  6.696464143e-02,  6.752758319e-02,\n   6.808872756e-02,  6.864810188e-02,  6.920573278e-02,  6.976164621e-02,\n   7.031586744e-02,  7.086842111e-02,  7.141933126e-02,  7.196862130e-02,\n   7.251631410e-02,  7.306243197e-02,  7.360699668e-02,  7.415002947e-02,\n   7.469155112e-02,  7.523158189e-02,  7.577014159e-02,  7.630724959e-02,\n   7.684292480e-02,  7.737718572e-02,  7.791005044e-02,  7.844153667e-02,\n   7.897166170e-02,  7.950044247e-02,  8.002789557e-02,  8.055403723e-02,\n   8.107888332e-02,  8.160244942e-02,  8.212475076e-02,  8.264580227e-02,\n   8.316561858e-02,  8.368421403e-02,  8.420160267e-02,  8.471779827e-02,\n   8.523281435e-02,  8.574666414e-02,  8.625936065e-02,  8.677091662e-02,\n   8.728134455e-02,  8.779065671e-02,  8.829886515e-02,  8.880598170e-02,\n   8.931201794e-02,  8.981698530e-02,  9.101830147e-01,  9.106879821e-01,\n   9.111940183e-01,  9.117011348e-01,  9.122093433e-01,  9.127186555e-01,\n   9.132290834e-01,  9.137406393e-01,  9.142533359e-01,  9.147671857e-01,\n   9.152822017e-01,  9.157983973e-01,  9.163157860e-01,  9.168343814e-01,\n   9.173541977e-01,  9.178752492e-01,  9.183975506e-01,  9.189211167e-01,\n   9.194459628e-01,  9.199721044e-01,  9.204995575e-01,  9.210283383e-01,\n   9.215584633e-01,  9.220899496e-01,  9.226228143e-01,  9.231570752e-01,\n   9.236927504e-01,  9.242298584e-01,  9.247684181e-01,  9.253084489e-01,\n   9.258499705e-01,  9.263930033e-01,  9.269375680e-01,  9.274836859e-01,\n   9.280313787e-01,  9.285806687e-01,  9.291315789e-01,  9.296841326e-01,\n   9.302383538e-01,  9.307942672e-01,  9.313518981e-01,  9.319112724e-01,\n   9.324724168e-01,  9.330353586e-01,  9.336001258e-01,  9.341667474e-01,\n   9.347352529e-01,  9.353056730e-01,  9.358780389e-01,  9.364523828e-01,\n   9.370287381e-01,  9.376071389e-01,  9.381876204e-01,  9.387702189e-01,\n   9.393549718e-01,  9.399419176e-01,  9.405310961e-01,  9.411225484e-01,\n   9.417163169e-01,  9.423124453e-01,  9.429109789e-01,  9.435119644e-01,\n   9.441154504e-01,  9.447214867e-01,  9.453301253e-01,  9.459414200e-01,\n   9.465554263e-01,  9.471722022e-01,  9.477918074e-01,  9.484143043e-01,\n   9.490397576e-01,  9.496682345e-01,  9.502998050e-01,  9.509345420e-01,\n   9.515725213e-01,  9.522138221e-01,  9.528585271e-01,  9.535067225e-01,\n   9.541584985e-01,  9.548139494e-01,  9.554731740e-01,  9.561362758e-01,\n   9.568033633e-01,  9.574745508e-01,  9.581499579e-01,  9.588297110e-01,\n   9.595139430e-01,  9.602027942e-01,  9.608964126e-01,  9.615949550e-01,\n   9.622985874e-01,  9.630074858e-01,  9.637218373e-01,  9.644418409e-01,\n   9.651677088e-01,  9.658996676e-01,  9.666379596e-01,  9.673828449e-01,\n   9.681346027e-01,  9.688935338e-01,  9.696599630e-01,  9.704342419e-01,\n   9.712167522e-01,  9.720079095e-01,  9.728081679e-01,  9.736180252e-01,\n   9.744380293e-01,  9.752687859e-01,  9.761109672e-01,  9.769653234e-01,\n   9.778326963e-01,  9.787140360e-01,  9.796104222e-01,  9.805230916e-01,\n   9.814534719e-01,  9.824032286e-01,  9.833743249e-01,  9.843691058e-01,\n   9.853904140e-01,  9.864417572e-01,  9.875275576e-01,  9.886535385e-01,\n   9.898273564e-01,  9.910597055e-01,  9.923664211e-01,  9.937730141e-01,\n   9.953264554e-01,  9.971381247e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_6[] = {\n   0.000000000e+00,  7.812500000e-03,  1.562500000e-02,  2.343750000e-02,\n   3.125000000e-02,  3.906250000e-02,  4.687500000e-02,  5.468750000e-02,\n   6.250000000e-02,  7.031250000e-02,  7.812500000e-02,  8.593750000e-02,\n   9.375000000e-02,  1.015625000e-01,  1.093750000e-01,  1.171875000e-01,\n   1.250000000e-01,  1.328125000e-01,  1.406250000e-01,  1.484375000e-01,\n   1.562500000e-01,  1.640625000e-01,  1.718750000e-01,  1.796875000e-01,\n   1.875000000e-01,  1.953125000e-01,  2.031250000e-01,  2.109375000e-01,\n   2.187500000e-01,  2.265625000e-01,  2.343750000e-01,  2.421875000e-01,\n   2.500000000e-01,  2.578125000e-01,  2.656250000e-01,  2.734375000e-01,\n   2.812500000e-01,  2.890625000e-01,  2.968750000e-01,  3.046875000e-01,\n   3.125000000e-01,  3.203125000e-01,  3.281250000e-01,  3.359375000e-01,\n   3.437500000e-01,  3.515625000e-01,  3.593750000e-01,  3.671875000e-01,\n   3.750000000e-01,  3.828125000e-01,  3.906250000e-01,  3.984375000e-01,\n   4.062500000e-01,  4.140625000e-01,  4.218750000e-01,  4.296875000e-01,\n   4.375000000e-01,  4.453125000e-01,  4.531250000e-01,  4.609375000e-01,\n   4.687500000e-01,  4.765625000e-01,  4.843750000e-01,  4.921875000e-01,\n   5.000000000e-01,  5.078125000e-01,  5.156250000e-01,  5.234375000e-01,\n   5.312500000e-01,  5.390625000e-01,  5.468750000e-01,  5.546875000e-01,\n   5.625000000e-01,  5.703125000e-01,  5.781250000e-01,  5.859375000e-01,\n   5.937500000e-01,  6.015625000e-01,  6.093750000e-01,  6.171875000e-01,\n   6.250000000e-01,  6.328125000e-01,  6.406250000e-01,  6.484375000e-01,\n   6.562500000e-01,  6.640625000e-01,  6.718750000e-01,  6.796875000e-01,\n   6.875000000e-01,  6.953125000e-01,  7.031250000e-01,  7.109375000e-01,\n   7.187500000e-01,  7.265625000e-01,  7.343750000e-01,  7.421875000e-01,\n   7.500000000e-01,  7.578125000e-01,  7.656250000e-01,  7.734375000e-01,\n   7.812500000e-01,  7.890625000e-01,  7.968750000e-01,  8.046875000e-01,\n   8.125000000e-01,  8.203125000e-01,  8.281250000e-01,  8.359375000e-01,\n   8.437500000e-01,  8.515625000e-01,  8.593750000e-01,  8.671875000e-01,\n   8.750000000e-01,  8.828125000e-01,  8.906250000e-01,  8.984375000e-01,\n   9.062500000e-01,  9.140625000e-01,  9.218750000e-01,  9.296875000e-01,\n   9.375000000e-01,  9.453125000e-01,  9.531250000e-01,  9.609375000e-01,\n   9.687500000e-01,  9.765625000e-01,  9.843750000e-01,  9.921875000e-01,\n   1.000000000e+00,  0.000000000e+00,  3.906250000e-04,  7.812500000e-04,\n   1.171875000e-03,  1.562500000e-03,  1.953125000e-03,  2.343750000e-03,\n   2.734375000e-03,  3.125000000e-03,  3.515625000e-03,  3.906250000e-03,\n   4.296875000e-03,  4.687500000e-03,  5.078125000e-03,  5.468750000e-03,\n   5.859375000e-03,  6.250000000e-03,  6.640625000e-03,  7.031250000e-03,\n   7.421875000e-03,  7.812500000e-03,  8.203125000e-03,  8.593750000e-03,\n   8.984375000e-03,  9.375000000e-03,  9.765625000e-03,  1.015625000e-02,\n   1.054687500e-02,  1.093750000e-02,  1.132812500e-02,  1.171875000e-02,\n   1.210937500e-02,  1.250000000e-02,  1.289062500e-02,  1.328125000e-02,\n   1.367187500e-02,  1.406250000e-02,  1.445312500e-02,  1.484375000e-02,\n   1.523437500e-02,  1.562500000e-02,  1.601562500e-02,  1.640625000e-02,\n   1.679687500e-02,  1.718750000e-02,  1.757812500e-02,  1.796875000e-02,\n   1.835937500e-02,  1.875000000e-02,  1.914062500e-02,  1.953125000e-02,\n   1.992187500e-02,  2.031250000e-02,  2.070312500e-02,  2.109375000e-02,\n   2.148437500e-02,  2.187500000e-02,  2.226562500e-02,  2.265625000e-02,\n   2.304687500e-02,  2.343750000e-02,  2.382812500e-02,  2.421875000e-02,\n   2.460937500e-02,  2.500000000e-02,  2.539062500e-02,  2.578125000e-02,\n   2.617187500e-02,  2.656250000e-02,  2.695312500e-02,  2.734375000e-02,\n   2.773437500e-02,  2.812500000e-02,  2.851562500e-02,  2.890625000e-02,\n   2.929687500e-02,  2.968750000e-02,  3.007812500e-02,  3.046875000e-02,\n   3.085937500e-02,  3.125000000e-02,  3.164062500e-02,  3.203125000e-02,\n   3.242187500e-02,  3.281250000e-02,  3.320312500e-02,  3.359375000e-02,\n   3.398437500e-02,  3.437500000e-02,  3.476562500e-02,  3.515625000e-02,\n   3.554687500e-02,  3.593750000e-02,  3.632812500e-02,  3.671875000e-02,\n   3.710937500e-02,  3.750000000e-02,  3.789062500e-02,  3.828125000e-02,\n   3.867187500e-02,  3.906250000e-02,  3.945312500e-02,  3.984375000e-02,\n   4.023437500e-02,  4.062500000e-02,  4.101562500e-02,  4.140625000e-02,\n   4.179687500e-02,  4.218750000e-02,  4.257812500e-02,  4.296875000e-02,\n   4.335937500e-02,  4.375000000e-02,  4.414062500e-02,  4.453125000e-02,\n   4.492187500e-02,  4.531250000e-02,  4.570312500e-02,  4.609375000e-02,\n   4.648437500e-02,  4.687500000e-02,  4.726562500e-02,  4.765625000e-02,\n   4.804687500e-02,  4.843750000e-02,  4.882812500e-02,  4.921875000e-02,\n   4.960937500e-02,  5.000000000e-02,  9.500000000e-01,  9.503906250e-01,\n   9.507812500e-01,  9.511718750e-01,  9.515625000e-01,  9.519531250e-01,\n   9.523437500e-01,  9.527343750e-01,  9.531250000e-01,  9.535156250e-01,\n   9.539062500e-01,  9.542968750e-01,  9.546875000e-01,  9.550781250e-01,\n   9.554687500e-01,  9.558593750e-01,  9.562500000e-01,  9.566406250e-01,\n   9.570312500e-01,  9.574218750e-01,  9.578125000e-01,  9.582031250e-01,\n   9.585937500e-01,  9.589843750e-01,  9.593750000e-01,  9.597656250e-01,\n   9.601562500e-01,  9.605468750e-01,  9.609375000e-01,  9.613281250e-01,\n   9.617187500e-01,  9.621093750e-01,  9.625000000e-01,  9.628906250e-01,\n   9.632812500e-01,  9.636718750e-01,  9.640625000e-01,  9.644531250e-01,\n   9.648437500e-01,  9.652343750e-01,  9.656250000e-01,  9.660156250e-01,\n   9.664062500e-01,  9.667968750e-01,  9.671875000e-01,  9.675781250e-01,\n   9.679687500e-01,  9.683593750e-01,  9.687500000e-01,  9.691406250e-01,\n   9.695312500e-01,  9.699218750e-01,  9.703125000e-01,  9.707031250e-01,\n   9.710937500e-01,  9.714843750e-01,  9.718750000e-01,  9.722656250e-01,\n   9.726562500e-01,  9.730468750e-01,  9.734375000e-01,  9.738281250e-01,\n   9.742187500e-01,  9.746093750e-01,  9.750000000e-01,  9.753906250e-01,\n   9.757812500e-01,  9.761718750e-01,  9.765625000e-01,  9.769531250e-01,\n   9.773437500e-01,  9.777343750e-01,  9.781250000e-01,  9.785156250e-01,\n   9.789062500e-01,  9.792968750e-01,  9.796875000e-01,  9.800781250e-01,\n   9.804687500e-01,  9.808593750e-01,  9.812500000e-01,  9.816406250e-01,\n   9.820312500e-01,  9.824218750e-01,  9.828125000e-01,  9.832031250e-01,\n   9.835937500e-01,  9.839843750e-01,  9.843750000e-01,  9.847656250e-01,\n   9.851562500e-01,  9.855468750e-01,  9.859375000e-01,  9.863281250e-01,\n   9.867187500e-01,  9.871093750e-01,  9.875000000e-01,  9.878906250e-01,\n   9.882812500e-01,  9.886718750e-01,  9.890625000e-01,  9.894531250e-01,\n   9.898437500e-01,  9.902343750e-01,  9.906250000e-01,  9.910156250e-01,\n   9.914062500e-01,  9.917968750e-01,  9.921875000e-01,  9.925781250e-01,\n   9.929687500e-01,  9.933593750e-01,  9.937500000e-01,  9.941406250e-01,\n   9.945312500e-01,  9.949218750e-01,  9.953125000e-01,  9.957031250e-01,\n   9.960937500e-01,  9.964843750e-01,  9.968750000e-01,  9.972656250e-01,\n   9.976562500e-01,  9.980468750e-01,  9.984375000e-01,  9.988281250e-01,\n   9.992187500e-01,  9.996093750e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_7[] = {\n   0.000000000e+00,  1.551652911e-03,  4.133543553e-03,  7.330169583e-03,\n   1.100344347e-02,  1.507557444e-02,  1.949484392e-02,  2.422361887e-02,\n   2.923288598e-02,  3.449935369e-02,  4.000375384e-02,  4.572977235e-02,\n   5.166333810e-02,  5.779212953e-02,  6.410522016e-02,  7.059281662e-02,\n   7.724606031e-02,  8.405687412e-02,  9.101784194e-02,  9.812211241e-02,\n   1.053633210e-01,  1.127355261e-01,  1.202331562e-01,  1.278509658e-01,\n   1.355839980e-01,  1.434275526e-01,  1.513771591e-01,  1.594285534e-01,\n   1.675776573e-01,  1.758205607e-01,  1.841535061e-01,  1.925728748e-01,\n   2.010751748e-01,  2.096570300e-01,  2.183151703e-01,  2.270464233e-01,\n   2.358477060e-01,  2.447160180e-01,  2.536484352e-01,  2.626421034e-01,\n   2.716942336e-01,  2.808020968e-01,  2.899630196e-01,  2.991743797e-01,\n   3.084336028e-01,  3.177381580e-01,  3.270855557e-01,  3.364733433e-01,\n   3.458991033e-01,  3.553604500e-01,  3.648550271e-01,  3.743805052e-01,\n   3.839345799e-01,  3.935149689e-01,  4.031194106e-01,  4.127456619e-01,\n   4.223914959e-01,  4.320547009e-01,  4.417330776e-01,  4.514244383e-01,\n   4.611266045e-01,  4.708374058e-01,  4.805546780e-01,  4.902762616e-01,\n   5.000000000e-01,  5.097237384e-01,  5.194453220e-01,  5.291625942e-01,\n   5.388733955e-01,  5.485755617e-01,  5.582669224e-01,  5.679452991e-01,\n   5.776085041e-01,  5.872543381e-01,  5.968805894e-01,  6.064850311e-01,\n   6.160654201e-01,  6.256194948e-01,  6.351449729e-01,  6.446395500e-01,\n   6.541008967e-01,  6.635266567e-01,  6.729144443e-01,  6.822618420e-01,\n   6.915663972e-01,  7.008256203e-01,  7.100369804e-01,  7.191979032e-01,\n   7.283057664e-01,  7.373578966e-01,  7.463515648e-01,  7.552839820e-01,\n   7.641522940e-01,  7.729535767e-01,  7.816848297e-01,  7.903429700e-01,\n   7.989248252e-01,  8.074271252e-01,  8.158464939e-01,  8.241794393e-01,\n   8.324223427e-01,  8.405714466e-01,  8.486228409e-01,  8.565724474e-01,\n   8.644160020e-01,  8.721490342e-01,  8.797668438e-01,  8.872644739e-01,\n   8.946366790e-01,  9.018778876e-01,  9.089821581e-01,  9.159431259e-01,\n   9.227539397e-01,  9.294071834e-01,  9.358947798e-01,  9.422078705e-01,\n   9.483366619e-01,  9.542702276e-01,  9.599962462e-01,  9.655006463e-01,\n   9.707671140e-01,  9.757763811e-01,  9.805051561e-01,  9.849244256e-01,\n   9.889965565e-01,  9.926698304e-01,  9.958664564e-01,  9.984483471e-01,\n   1.000000000e+00,  0.000000000e+00,  2.243749270e-05,  5.979876892e-05,\n   1.061009908e-04,  1.593696159e-04,  2.185005699e-04,  2.827658621e-04,\n   3.516405100e-04,  4.247236573e-04,  5.016967708e-04,  5.822991568e-04,\n   6.663125529e-04,  7.535508895e-04,  8.438531901e-04,  9.370784736e-04,\n   1.033101991e-03,  1.131812377e-03,  1.233109452e-03,  1.336902498e-03,\n   1.443108875e-03,  1.551652911e-03,  1.662464991e-03,  1.775480799e-03,\n   1.890640690e-03,  2.007889160e-03,  2.127174395e-03,  2.248447885e-03,\n   2.371664095e-03,  2.496780174e-03,  2.623755707e-03,  2.752552498e-03,\n   2.883134372e-03,  3.015467012e-03,  3.149517803e-03,  3.285255698e-03,\n   3.422651101e-03,  3.561675755e-03,  3.702302650e-03,  3.844505932e-03,\n   3.988260823e-03,  4.133543553e-03,  4.280331292e-03,  4.428602091e-03,\n   4.578334827e-03,  4.729509154e-03,  4.882105455e-03,  5.036104805e-03,\n   5.191488925e-03,  5.348240153e-03,  5.506341403e-03,  5.665776144e-03,\n   5.826528362e-03,  5.988582541e-03,  6.151923633e-03,  6.316537037e-03,\n   6.482408578e-03,  6.649524487e-03,  6.817871381e-03,  6.987436246e-03,\n   7.158206422e-03,  7.330169583e-03,  7.503313729e-03,  7.677627166e-03,\n   7.853098498e-03,  8.029716611e-03,  8.207470665e-03,  8.386350080e-03,\n   8.566344527e-03,  8.747443920e-03,  8.929638403e-03,  9.112918345e-03,\n   9.297274329e-03,  9.482697147e-03,  9.669177790e-03,  9.856707441e-03,\n   1.004527747e-02,  1.023487943e-02,  1.042550503e-02,  1.061714618e-02,\n   1.080979492e-02,  1.100344347e-02,  1.119808418e-02,  1.139370956e-02,\n   1.159031226e-02,  1.178788507e-02,  1.198642092e-02,  1.218591284e-02,\n   1.238635403e-02,  1.258773777e-02,  1.279005749e-02,  1.299330671e-02,\n   1.319747908e-02,  1.340256834e-02,  1.360856837e-02,  1.381547311e-02,\n   1.402327662e-02,  1.423197305e-02,  1.444155667e-02,  1.465202180e-02,\n   1.486336289e-02,  1.507557444e-02,  1.528865105e-02,  1.550258742e-02,\n   1.571737831e-02,  1.593301856e-02,  1.614950309e-02,  1.636682689e-02,\n   1.658498504e-02,  1.680397266e-02,  1.702378498e-02,  1.724441726e-02,\n   1.746586484e-02,  1.768812314e-02,  1.791118761e-02,  1.813505380e-02,\n   1.835971728e-02,  1.858517371e-02,  1.881141880e-02,  1.903844831e-02,\n   1.926625806e-02,  1.949484392e-02,  1.972420181e-02,  1.995432772e-02,\n   2.018521766e-02,  2.041686772e-02,  2.064927401e-02,  2.088243272e-02,\n   2.111634006e-02,  2.135099228e-02,  9.786490077e-01,  9.788836599e-01,\n   9.791175673e-01,  9.793507260e-01,  9.795831323e-01,  9.798147823e-01,\n   9.800456723e-01,  9.802757982e-01,  9.805051561e-01,  9.807337419e-01,\n   9.809615517e-01,  9.811885812e-01,  9.814148263e-01,  9.816402827e-01,\n   9.818649462e-01,  9.820888124e-01,  9.823118769e-01,  9.825341352e-01,\n   9.827555827e-01,  9.829762150e-01,  9.831960273e-01,  9.834150150e-01,\n   9.836331731e-01,  9.838504969e-01,  9.840669814e-01,  9.842826217e-01,\n   9.844974126e-01,  9.847113489e-01,  9.849244256e-01,  9.851366371e-01,\n   9.853479782e-01,  9.855584433e-01,  9.857680269e-01,  9.859767234e-01,\n   9.861845269e-01,  9.863914316e-01,  9.865974317e-01,  9.868025209e-01,\n   9.870066933e-01,  9.872099425e-01,  9.874122622e-01,  9.876136460e-01,\n   9.878140872e-01,  9.880135791e-01,  9.882121149e-01,  9.884096877e-01,\n   9.886062904e-01,  9.888019158e-01,  9.889965565e-01,  9.891902051e-01,\n   9.893828538e-01,  9.895744950e-01,  9.897651206e-01,  9.899547225e-01,\n   9.901432926e-01,  9.903308222e-01,  9.905173029e-01,  9.907027257e-01,\n   9.908870817e-01,  9.910703616e-01,  9.912525561e-01,  9.914336555e-01,\n   9.916136499e-01,  9.917925293e-01,  9.919702834e-01,  9.921469015e-01,\n   9.923223728e-01,  9.924966863e-01,  9.926698304e-01,  9.928417936e-01,\n   9.930125638e-01,  9.931821286e-01,  9.933504755e-01,  9.935175914e-01,\n   9.936834630e-01,  9.938480764e-01,  9.940114175e-01,  9.941734716e-01,\n   9.943342239e-01,  9.944936586e-01,  9.946517598e-01,  9.948085111e-01,\n   9.949638952e-01,  9.951178945e-01,  9.952704908e-01,  9.954216652e-01,\n   9.955713979e-01,  9.957196687e-01,  9.958664564e-01,  9.960117392e-01,\n   9.961554941e-01,  9.962976973e-01,  9.964383242e-01,  9.965773489e-01,\n   9.967147443e-01,  9.968504822e-01,  9.969845330e-01,  9.971168656e-01,\n   9.972474475e-01,  9.973762443e-01,  9.975032198e-01,  9.976283359e-01,\n   9.977515521e-01,  9.978728256e-01,  9.979921108e-01,  9.981093593e-01,\n   9.982245192e-01,  9.983375350e-01,  9.984483471e-01,  9.985568911e-01,\n   9.986630975e-01,  9.987668905e-01,  9.988681876e-01,  9.989668980e-01,\n   9.990629215e-01,  9.991561468e-01,  9.992464491e-01,  9.993336874e-01,\n   9.994177008e-01,  9.994983032e-01,  9.995752763e-01,  9.996483595e-01,\n   9.997172341e-01,  9.997814994e-01,  9.998406304e-01,  9.998938990e-01,\n   9.999402012e-01,  9.999775625e-01,  1.000000000e+00,\n};\nconst float dist_icdf_4_8[] = {\n   0.000000000e+00,  4.402192196e-08,  7.043504723e-07,  3.565768144e-06,\n   1.126953612e-05,  2.751324776e-05,  5.705045944e-05,  1.056899347e-04,\n   1.802942910e-04,  2.887777918e-04,  4.401029805e-04,  6.442758075e-04,\n   9.123388564e-04,  1.256362232e-03,  1.689431631e-03,  2.225633081e-03,\n   2.880033782e-03,  3.668658481e-03,  4.608460747e-03,  5.717288520e-03,\n   7.013843282e-03,  8.517632188e-03,  1.024891250e-02,  1.222862771e-02,\n   1.447833467e-02,  1.702012127e-02,  1.987651403e-02,  2.307037524e-02,\n   2.662478931e-02,  3.056293801e-02,  3.490796463e-02,  3.968282695e-02,\n   4.491013944e-02,  5.061200492e-02,  5.680983645e-02,  6.352417025e-02,\n   7.077447076e-02,  7.857892924e-02,  8.695425754e-02,  9.591547885e-02,\n   1.054757176e-01,  1.156459913e-01,  1.264350057e-01,  1.378489582e-01,\n   1.498913503e-01,  1.625628136e-01,  1.758609520e-01,  1.897802035e-01,\n   2.043117246e-01,  2.194433002e-01,  2.351592823e-01,  2.514405596e-01,\n   2.682645600e-01,  2.856052885e-01,  3.034334010e-01,  3.217163154e-01,\n   3.404183594e-01,  3.595009551e-01,  3.789228389e-01,  3.986403148e-01,\n   4.186075388e-01,  4.387768317e-01,  4.590990150e-01,  4.795237681e-01,\n   5.000000000e-01,  5.204762319e-01,  5.409009850e-01,  5.612231683e-01,\n   5.813924612e-01,  6.013596852e-01,  6.210771611e-01,  6.404990449e-01,\n   6.595816406e-01,  6.782836846e-01,  6.965665990e-01,  7.143947115e-01,\n   7.317354400e-01,  7.485594404e-01,  7.648407177e-01,  7.805566998e-01,\n   7.956882754e-01,  8.102197965e-01,  8.241390480e-01,  8.374371864e-01,\n   8.501086497e-01,  8.621510418e-01,  8.735649943e-01,  8.843540087e-01,\n   8.945242824e-01,  9.040845212e-01,  9.130457425e-01,  9.214210708e-01,\n   9.292255292e-01,  9.364758298e-01,  9.431901635e-01,  9.493879951e-01,\n   9.550898606e-01,  9.603171731e-01,  9.650920354e-01,  9.694370620e-01,\n   9.733752107e-01,  9.769296248e-01,  9.801234860e-01,  9.829798787e-01,\n   9.855216653e-01,  9.877713723e-01,  9.897510875e-01,  9.914823678e-01,\n   9.929861567e-01,  9.942827115e-01,  9.953915393e-01,  9.963313415e-01,\n   9.971199662e-01,  9.977743669e-01,  9.983105684e-01,  9.987436378e-01,\n   9.990876611e-01,  9.993557242e-01,  9.995598970e-01,  9.997112222e-01,\n   9.998197057e-01,  9.998943101e-01,  9.999429495e-01,  9.999724868e-01,\n   9.999887305e-01,  9.999964342e-01,  9.999992956e-01,  9.999999560e-01,\n   1.000000000e+00,  0.000000000e+00,  2.751370195e-13,  4.402192312e-12,\n   2.228609858e-11,  7.043507700e-11,  1.719606372e-10,  3.565775772e-10,\n   6.606039836e-10,  1.126961231e-09,  1.805173983e-09,  2.751370191e-09,\n   4.028281093e-09,  5.705241217e-09,  7.858188378e-09,  1.056966368e-08,\n   1.392881150e-08,  1.803137952e-08,  2.297971869e-08,  2.888278326e-08,\n   3.585613075e-08,  4.402192196e-08,  5.350892098e-08,  6.445249515e-08,\n   7.699461513e-08,  9.128385479e-08,  1.074753913e-07,  1.257310052e-07,\n   1.462190800e-07,  1.691146027e-07,  1.945991636e-07,  2.228609560e-07,\n   2.540947767e-07,  2.885020255e-07,  3.262907055e-07,  3.676754230e-07,\n   4.128773877e-07,  4.621244121e-07,  5.156509121e-07,  5.736979069e-07,\n   6.365130185e-07,  7.043504723e-07,  7.774710968e-07,  8.561423233e-07,\n   9.406381866e-07,  1.031239324e-06,  1.128232977e-06,  1.231912988e-06,\n   1.342579805e-06,  1.460540477e-06,  1.586108656e-06,  1.719604598e-06,\n   1.861355161e-06,  2.011693806e-06,  2.170960597e-06,  2.339502201e-06,\n   2.517671886e-06,  2.705829525e-06,  2.904341592e-06,  3.113581164e-06,\n   3.333927921e-06,  3.565768144e-06,  3.809494718e-06,  4.065507130e-06,\n   4.334211467e-06,  4.616020422e-06,  4.911353286e-06,  5.220635956e-06,\n   5.544300929e-06,  5.882787302e-06,  6.236540777e-06,  6.606013655e-06,\n   6.991664841e-06,  7.393959841e-06,  7.813370759e-06,  8.250376305e-06,\n   8.705461787e-06,  9.179119116e-06,  9.671846801e-06,  1.018414996e-05,\n   1.071654029e-05,  1.126953612e-05,  1.184366235e-05,  1.243945051e-05,\n   1.305743869e-05,  1.369817163e-05,  1.436220062e-05,  1.505008358e-05,\n   1.576238502e-05,  1.649967605e-05,  1.726253439e-05,  1.805154433e-05,\n   1.886729680e-05,  1.971038928e-05,  2.058142589e-05,  2.148101732e-05,\n   2.240978088e-05,  2.336834045e-05,  2.435732654e-05,  2.537737623e-05,\n   2.642913321e-05,  2.751324776e-05,  2.863037675e-05,  2.978118367e-05,\n   3.096633858e-05,  3.218651815e-05,  3.344240563e-05,  3.473469088e-05,\n   3.606407035e-05,  3.743124707e-05,  3.883693069e-05,  4.028183743e-05,\n   4.176669010e-05,  4.329221812e-05,  4.485915750e-05,  4.646825083e-05,\n   4.812024729e-05,  4.981590267e-05,  5.155597932e-05,  5.334124620e-05,\n   5.517247887e-05,  5.705045944e-05,  5.897597664e-05,  6.094982579e-05,\n   6.297280876e-05,  6.504573406e-05,  6.716941674e-05,  6.934467846e-05,\n   7.157234745e-05,  7.385325855e-05,  9.999261467e-01,  9.999284277e-01,\n   9.999306553e-01,  9.999328306e-01,  9.999349543e-01,  9.999370272e-01,\n   9.999390502e-01,  9.999410240e-01,  9.999429495e-01,  9.999448275e-01,\n   9.999466588e-01,  9.999484440e-01,  9.999501841e-01,  9.999518798e-01,\n   9.999535317e-01,  9.999551408e-01,  9.999567078e-01,  9.999582333e-01,\n   9.999597182e-01,  9.999611631e-01,  9.999625688e-01,  9.999639359e-01,\n   9.999652653e-01,  9.999665576e-01,  9.999678135e-01,  9.999690337e-01,\n   9.999702188e-01,  9.999713696e-01,  9.999724868e-01,  9.999735709e-01,\n   9.999746226e-01,  9.999756427e-01,  9.999766317e-01,  9.999775902e-01,\n   9.999785190e-01,  9.999794186e-01,  9.999802896e-01,  9.999811327e-01,\n   9.999819485e-01,  9.999827375e-01,  9.999835003e-01,  9.999842376e-01,\n   9.999849499e-01,  9.999856378e-01,  9.999863018e-01,  9.999869426e-01,\n   9.999875605e-01,  9.999881563e-01,  9.999887305e-01,  9.999892835e-01,\n   9.999898159e-01,  9.999903282e-01,  9.999908209e-01,  9.999912945e-01,\n   9.999917496e-01,  9.999921866e-01,  9.999926060e-01,  9.999930083e-01,\n   9.999933940e-01,  9.999937635e-01,  9.999941172e-01,  9.999944557e-01,\n   9.999947794e-01,  9.999950886e-01,  9.999953840e-01,  9.999956658e-01,\n   9.999959345e-01,  9.999961905e-01,  9.999964342e-01,  9.999966661e-01,\n   9.999968864e-01,  9.999970957e-01,  9.999972942e-01,  9.999974823e-01,\n   9.999976605e-01,  9.999978290e-01,  9.999979883e-01,  9.999981386e-01,\n   9.999982804e-01,  9.999984139e-01,  9.999985395e-01,  9.999986574e-01,\n   9.999987681e-01,  9.999988718e-01,  9.999989688e-01,  9.999990594e-01,\n   9.999991439e-01,  9.999992225e-01,  9.999992956e-01,  9.999993635e-01,\n   9.999994263e-01,  9.999994843e-01,  9.999995379e-01,  9.999995871e-01,\n   9.999996323e-01,  9.999996737e-01,  9.999997115e-01,  9.999997459e-01,\n   9.999997771e-01,  9.999998054e-01,  9.999998309e-01,  9.999998538e-01,\n   9.999998743e-01,  9.999998925e-01,  9.999999087e-01,  9.999999230e-01,\n   9.999999355e-01,  9.999999465e-01,  9.999999560e-01,  9.999999641e-01,\n   9.999999711e-01,  9.999999770e-01,  9.999999820e-01,  9.999999861e-01,\n   9.999999894e-01,  9.999999921e-01,  9.999999943e-01,  9.999999960e-01,\n   9.999999972e-01,  9.999999982e-01,  9.999999989e-01,  9.999999993e-01,\n   9.999999996e-01,  9.999999998e-01,  9.999999999e-01,  1.000000000e+00,\n   1.000000000e+00,  1.000000000e+00,  1.000000000e+00,\n};\n\n\nconst float* distributions_table[] = {\n  dist_icdf_0_0,\n  dist_icdf_0_1,\n  dist_icdf_0_2,\n  dist_icdf_0_3,\n  dist_icdf_0_4,\n  dist_icdf_0_5,\n  dist_icdf_0_6,\n  dist_icdf_0_7,\n  dist_icdf_0_8,\n  dist_icdf_0_8,\n  dist_icdf_1_0,\n  dist_icdf_1_1,\n  dist_icdf_1_2,\n  dist_icdf_1_3,\n  dist_icdf_1_4,\n  dist_icdf_1_5,\n  dist_icdf_1_6,\n  dist_icdf_1_7,\n  dist_icdf_1_8,\n  dist_icdf_1_8,\n  dist_icdf_2_0,\n  dist_icdf_2_1,\n  dist_icdf_2_2,\n  dist_icdf_2_3,\n  dist_icdf_2_4,\n  dist_icdf_2_5,\n  dist_icdf_2_6,\n  dist_icdf_2_7,\n  dist_icdf_2_8,\n  dist_icdf_2_8,\n  dist_icdf_3_0,\n  dist_icdf_3_1,\n  dist_icdf_3_2,\n  dist_icdf_3_3,\n  dist_icdf_3_4,\n  dist_icdf_3_5,\n  dist_icdf_3_6,\n  dist_icdf_3_7,\n  dist_icdf_3_8,\n  dist_icdf_3_8,\n  dist_icdf_4_0,\n  dist_icdf_4_1,\n  dist_icdf_4_2,\n  dist_icdf_4_3,\n  dist_icdf_4_4,\n  dist_icdf_4_5,\n  dist_icdf_4_6,\n  dist_icdf_4_7,\n  dist_icdf_4_8,\n  dist_icdf_4_8,\n  dist_icdf_4_0,\n  dist_icdf_4_1,\n  dist_icdf_4_2,\n  dist_icdf_4_3,\n  dist_icdf_4_4,\n  dist_icdf_4_5,\n  dist_icdf_4_6,\n  dist_icdf_4_7,\n  dist_icdf_4_8,\n  dist_icdf_4_8,\n};\n\n\n}  // namespace marbles\n"
  },
  {
    "path": "lib/marbles/resources.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef MARBLES_RESOURCES_H_\n#define MARBLES_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace marbles {\n\ntypedef uint8_t ResourceId;\n\nextern const float* lookup_table_table[];\n\nextern const float* distributions_table[];\n\nextern const float lut_raised_cosine[];\nextern const float lut_sine[];\nextern const float lut_logit[];\nextern const float dist_icdf_0_0[];\nextern const float dist_icdf_0_1[];\nextern const float dist_icdf_0_2[];\nextern const float dist_icdf_0_3[];\nextern const float dist_icdf_0_4[];\nextern const float dist_icdf_0_5[];\nextern const float dist_icdf_0_6[];\nextern const float dist_icdf_0_7[];\nextern const float dist_icdf_0_8[];\nextern const float dist_icdf_1_0[];\nextern const float dist_icdf_1_1[];\nextern const float dist_icdf_1_2[];\nextern const float dist_icdf_1_3[];\nextern const float dist_icdf_1_4[];\nextern const float dist_icdf_1_5[];\nextern const float dist_icdf_1_6[];\nextern const float dist_icdf_1_7[];\nextern const float dist_icdf_1_8[];\nextern const float dist_icdf_2_0[];\nextern const float dist_icdf_2_1[];\nextern const float dist_icdf_2_2[];\nextern const float dist_icdf_2_3[];\nextern const float dist_icdf_2_4[];\nextern const float dist_icdf_2_5[];\nextern const float dist_icdf_2_6[];\nextern const float dist_icdf_2_7[];\nextern const float dist_icdf_2_8[];\nextern const float dist_icdf_3_0[];\nextern const float dist_icdf_3_1[];\nextern const float dist_icdf_3_2[];\nextern const float dist_icdf_3_3[];\nextern const float dist_icdf_3_4[];\nextern const float dist_icdf_3_5[];\nextern const float dist_icdf_3_6[];\nextern const float dist_icdf_3_7[];\nextern const float dist_icdf_3_8[];\nextern const float dist_icdf_4_0[];\nextern const float dist_icdf_4_1[];\nextern const float dist_icdf_4_2[];\nextern const float dist_icdf_4_3[];\nextern const float dist_icdf_4_4[];\nextern const float dist_icdf_4_5[];\nextern const float dist_icdf_4_6[];\nextern const float dist_icdf_4_7[];\nextern const float dist_icdf_4_8[];\n#define LUT_RAISED_COSINE 0\n#define LUT_RAISED_COSINE_SIZE 257\n#define LUT_SINE 1\n#define LUT_SINE_SIZE 257\n#define LUT_LOGIT 2\n#define LUT_LOGIT_SIZE 257\n#define DIST_ICDF_0_0 0\n#define DIST_ICDF_0_0_SIZE 387\n#define DIST_ICDF_0_1 1\n#define DIST_ICDF_0_1_SIZE 387\n#define DIST_ICDF_0_2 2\n#define DIST_ICDF_0_2_SIZE 387\n#define DIST_ICDF_0_3 3\n#define DIST_ICDF_0_3_SIZE 387\n#define DIST_ICDF_0_4 4\n#define DIST_ICDF_0_4_SIZE 387\n#define DIST_ICDF_0_5 5\n#define DIST_ICDF_0_5_SIZE 387\n#define DIST_ICDF_0_6 6\n#define DIST_ICDF_0_6_SIZE 387\n#define DIST_ICDF_0_7 7\n#define DIST_ICDF_0_7_SIZE 387\n#define DIST_ICDF_0_8 8\n#define DIST_ICDF_0_8_SIZE 387\n#define DIST_ICDF_0_8_GUARD 9\n#define DIST_ICDF_0_8_GUARD_SIZE 387\n#define DIST_ICDF_1_0 10\n#define DIST_ICDF_1_0_SIZE 387\n#define DIST_ICDF_1_1 11\n#define DIST_ICDF_1_1_SIZE 387\n#define DIST_ICDF_1_2 12\n#define DIST_ICDF_1_2_SIZE 387\n#define DIST_ICDF_1_3 13\n#define DIST_ICDF_1_3_SIZE 387\n#define DIST_ICDF_1_4 14\n#define DIST_ICDF_1_4_SIZE 387\n#define DIST_ICDF_1_5 15\n#define DIST_ICDF_1_5_SIZE 387\n#define DIST_ICDF_1_6 16\n#define DIST_ICDF_1_6_SIZE 387\n#define DIST_ICDF_1_7 17\n#define DIST_ICDF_1_7_SIZE 387\n#define DIST_ICDF_1_8 18\n#define DIST_ICDF_1_8_SIZE 387\n#define DIST_ICDF_1_8_GUARD 19\n#define DIST_ICDF_1_8_GUARD_SIZE 387\n#define DIST_ICDF_2_0 20\n#define DIST_ICDF_2_0_SIZE 387\n#define DIST_ICDF_2_1 21\n#define DIST_ICDF_2_1_SIZE 387\n#define DIST_ICDF_2_2 22\n#define DIST_ICDF_2_2_SIZE 387\n#define DIST_ICDF_2_3 23\n#define DIST_ICDF_2_3_SIZE 387\n#define DIST_ICDF_2_4 24\n#define DIST_ICDF_2_4_SIZE 387\n#define DIST_ICDF_2_5 25\n#define DIST_ICDF_2_5_SIZE 387\n#define DIST_ICDF_2_6 26\n#define DIST_ICDF_2_6_SIZE 387\n#define DIST_ICDF_2_7 27\n#define DIST_ICDF_2_7_SIZE 387\n#define DIST_ICDF_2_8 28\n#define DIST_ICDF_2_8_SIZE 387\n#define DIST_ICDF_2_8_GUARD 29\n#define DIST_ICDF_2_8_GUARD_SIZE 387\n#define DIST_ICDF_3_0 30\n#define DIST_ICDF_3_0_SIZE 387\n#define DIST_ICDF_3_1 31\n#define DIST_ICDF_3_1_SIZE 387\n#define DIST_ICDF_3_2 32\n#define DIST_ICDF_3_2_SIZE 387\n#define DIST_ICDF_3_3 33\n#define DIST_ICDF_3_3_SIZE 387\n#define DIST_ICDF_3_4 34\n#define DIST_ICDF_3_4_SIZE 387\n#define DIST_ICDF_3_5 35\n#define DIST_ICDF_3_5_SIZE 387\n#define DIST_ICDF_3_6 36\n#define DIST_ICDF_3_6_SIZE 387\n#define DIST_ICDF_3_7 37\n#define DIST_ICDF_3_7_SIZE 387\n#define DIST_ICDF_3_8 38\n#define DIST_ICDF_3_8_SIZE 387\n#define DIST_ICDF_3_8_GUARD 39\n#define DIST_ICDF_3_8_GUARD_SIZE 387\n#define DIST_ICDF_4_0 40\n#define DIST_ICDF_4_0_SIZE 387\n#define DIST_ICDF_4_1 41\n#define DIST_ICDF_4_1_SIZE 387\n#define DIST_ICDF_4_2 42\n#define DIST_ICDF_4_2_SIZE 387\n#define DIST_ICDF_4_3 43\n#define DIST_ICDF_4_3_SIZE 387\n#define DIST_ICDF_4_4 44\n#define DIST_ICDF_4_4_SIZE 387\n#define DIST_ICDF_4_5 45\n#define DIST_ICDF_4_5_SIZE 387\n#define DIST_ICDF_4_6 46\n#define DIST_ICDF_4_6_SIZE 387\n#define DIST_ICDF_4_7 47\n#define DIST_ICDF_4_7_SIZE 387\n#define DIST_ICDF_4_8 48\n#define DIST_ICDF_4_8_SIZE 387\n#define DIST_ICDF_4_8_GUARD 49\n#define DIST_ICDF_4_8_GUARD_SIZE 387\n#define DIST_ICDF_4_0_GUARD 50\n#define DIST_ICDF_4_0_GUARD_SIZE 387\n#define DIST_ICDF_4_1_GUARD 51\n#define DIST_ICDF_4_1_GUARD_SIZE 387\n#define DIST_ICDF_4_2_GUARD 52\n#define DIST_ICDF_4_2_GUARD_SIZE 387\n#define DIST_ICDF_4_3_GUARD 53\n#define DIST_ICDF_4_3_GUARD_SIZE 387\n#define DIST_ICDF_4_4_GUARD 54\n#define DIST_ICDF_4_4_GUARD_SIZE 387\n#define DIST_ICDF_4_5_GUARD 55\n#define DIST_ICDF_4_5_GUARD_SIZE 387\n#define DIST_ICDF_4_6_GUARD 56\n#define DIST_ICDF_4_6_GUARD_SIZE 387\n#define DIST_ICDF_4_7_GUARD 57\n#define DIST_ICDF_4_7_GUARD_SIZE 387\n#define DIST__ICDF_4_8_GUARD 58\n#define DIST__ICDF_4_8_GUARD_SIZE 387\n#define DIST_ICDF_4_8_GUARD_GUARD 59\n#define DIST_ICDF_4_8_GUARD_GUARD_SIZE 387\n\n}  // namespace marbles\n\n#endif  // MARBLES_RESOURCES_H_\n"
  },
  {
    "path": "lib/marbles/scale_recorder.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Record a note CV distribution - to be used for the quantizer.\n\n#ifndef MARBLES_SCALE_RECORDER_H_\n#define MARBLES_SCALE_RECORDER_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"marbles/random/quantizer.h\"\n\nnamespace marbles {\n\nclass ScaleRecorder {\n public:\n  ScaleRecorder() { }\n  ~ScaleRecorder() { }\n\n  struct Degree {\n    float average_voltage;\n    float total_voltage;\n    float count;\n    \n    bool operator< (const Degree& rhs) const {\n      return average_voltage < rhs.average_voltage;\n    }\n  };\n  \n  void Init() {\n    Clear();\n  }\n  \n  void Clear() {\n    num_degrees_ = 0;\n    current_voltage_ = 0.0f;\n    total_count_ = 0.0f;\n  }\n  \n  void NewNote(float v) {\n    current_voltage_ = v;\n  }\n  \n  void UpdateVoltage(float v) {\n    ONE_POLE(current_voltage_, v, 0.01f);\n  }\n  \n  void AcceptNote() {\n    const float base_interval = 1.0f;\n    float v = current_voltage_;\n    while (v < 0.0f) {\n      v += base_interval;\n    }\n    float octave = static_cast<float>(\n        static_cast<int>(v / base_interval)) * base_interval;\n    v -= octave;\n    \n    int nearest_degree = -1;\n    for (int i = 0; i < num_degrees_; ++i) {\n      float av = degrees_[i].average_voltage;\n      const float tolerance = 1.0f / 36.0f;\n      if (fabsf(v - av) < tolerance) {\n        nearest_degree = i;\n        break;\n      }\n      if (fabsf((v - base_interval) - av) < tolerance) {\n        v -= base_interval;\n        nearest_degree = i;\n        break;\n      }\n    }\n    if (nearest_degree == -1 && num_degrees_ != kMaxDegrees) {\n      nearest_degree = num_degrees_;\n      Degree* d = &degrees_[nearest_degree];\n      d->total_voltage = 0.0f;\n      d->average_voltage = 0.0f;\n      d->count = 0.0f;\n      ++num_degrees_;\n    }\n    \n    if (nearest_degree != -1) {\n      Degree* d = &degrees_[nearest_degree];\n      d->total_voltage += v;\n      d->count += 1.0f;\n      d->average_voltage = d->total_voltage / d->count;\n      total_count_ += 1.0f;\n    }\n  }\n  \n  bool ExtractScale(Scale* scale) {\n    if (num_degrees_ < 2) {\n      return false;\n    }\n    std::sort(&degrees_[0], &degrees_[num_degrees_]);\n\n    float max_count = 0.0f;\n    for (int i = 0; i < num_degrees_; ++i) {\n      max_count = std::max(degrees_[i].count, max_count);\n    }\n    \n    scale->base_interval = 1.0f;\n    scale->num_degrees = num_degrees_;\n    for (int i = 0; i < num_degrees_; ++i) {\n      Degree* d = &degrees_[i];\n      scale->degree[i].voltage = d->average_voltage;\n      scale->degree[i].weight = static_cast<uint8_t>(\n          255.0f * d->count / max_count);\n      if (scale->degree[i].weight == 0) {\n        ++scale->degree[i].weight;\n      }\n    }\n    \n    return true;\n  }\n  \n private:\n  int num_degrees_;\n  float current_voltage_;\n  float total_count_;\n  Degree degrees_[kMaxDegrees];\n  \n  DISALLOW_COPY_AND_ASSIGN(ScaleRecorder);\n};\n\n}  // namespace marbles\n\n#endif  // MARBLES_SCALE_RECORDER_H_\n"
  },
  {
    "path": "lib/misc/Biquad.cpp",
    "content": "//\n//  Biquad.cpp\n//\n//  Created by Nigel Redmon on 11/24/12\n//  EarLevel Engineering: earlevel.com\n//  Copyright 2012 Nigel Redmon\n//\n//  For a complete explanation of the Biquad code:\n//  http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/\n//\n//  License:\n//\n//  This source code is provided as is, without warranty.\n//  You may copy and distribute verbatim copies of this document.\n//  You may modify and use this source code to create binary code\n//  for your own purposes, free or commercial.\n//\n//  [eh2k] perforcance optimizations..\n\n#include <math.h>\n#include \"Biquad.h\"\n\n#ifndef M_PI\n#define M_PI 3.14159265358979323846 /* pi */\n#endif\n\n#define M_PI_F float(M_PI)\n#define M_PI_POW_2 M_PI * M_PI\n#define M_PI_POW_3 M_PI_POW_2 * M_PI\n#define M_PI_POW_5 M_PI_POW_3 * M_PI_POW_2\n\ninline float tan_pi_f(float f) // stmlib::OnePole::tan<FREQUENCY_FAST>(Fc)\n{\n    // The usual tangent approximation uses 3.1755e-01 and 2.033e-01, but\n    // the coefficients used here are optimized to minimize error for the\n    // 16Hz to 16kHz range, with a sample rate of 48kHz.\n    const float a = 3.260e-01f * M_PI_POW_3;\n    const float b = 1.823e-01f * M_PI_POW_5;\n    float f2 = f * f;\n    return f * (M_PI_F + f2 * (a + b * f2));\n}\n\nBiquad::Biquad()\n{\n    type = bq_type_lowpass;\n    a0 = 1.0;\n    a1 = a2 = b1 = b2 = 0.0;\n    Fc = 0.50;\n    Q = 0.707;\n    peakGain = 1.0f;\n    // z1 = z2 = 0.0;\n}\n\nBiquad::Biquad(int type, float Fc, float Q, float peakGainDB)\n{\n    setBiquad(type, Fc, Q, peakGainDB);\n    // z1 = z2 = 0.0;\n}\n\nBiquad::~Biquad()\n{\n}\n\nvoid Biquad::setType(int type)\n{\n    this->type = type;\n    calcBiquad();\n}\n\nvoid Biquad::setQ(float Q)\n{\n    this->Q = Q;\n    calcBiquad();\n}\n\nvoid Biquad::setFc(float Fc)\n{\n    this->Fc = Fc;\n    calcBiquad();\n}\n\nvoid Biquad::setPeakGain(float peakGainDB)\n{\n    this->peakGain = expf(peakGainDB * 0.11512925464970228420089957273422f); // dB2amp(peakGainDB);\n    calcBiquad();\n}\n\nvoid Biquad::setBiquad(int type, float Fc, float Q, float peakGainDB)\n{\n    this->type = type;\n    this->Q = Q;\n    this->Fc = Fc;\n    setPeakGain(peakGainDB);\n}\n\nvoid Biquad::calcBiquad(void)\n{\n    float norm;\n    float V = peakGain;     // powf(10, fabsf(peakGain) / 20.0f);\n    float K = tan_pi_f(Fc); // tanf(M_PI * Fc)\n    switch (this->type)\n    {\n    case bq_type_lowpass:\n        norm = 1 / (1 + K / Q + K * K);\n        a0 = K * K * norm;\n        a1 = 2 * a0;\n        a2 = a0;\n        b1 = 2 * (K * K - 1) * norm;\n        b2 = (1 - K / Q + K * K) * norm;\n        break;\n\n    case bq_type_highpass:\n        norm = 1 / (1 + K / Q + K * K);\n        a0 = 1 * norm;\n        a1 = -2 * a0;\n        a2 = a0;\n        b1 = 2 * (K * K - 1) * norm;\n        b2 = (1 - K / Q + K * K) * norm;\n        break;\n\n    case bq_type_bandpass:\n        norm = 1 / (1 + K / Q + K * K);\n        a0 = K / Q * norm;\n        a1 = 0;\n        a2 = -a0;\n        b1 = 2 * (K * K - 1) * norm;\n        b2 = (1 - K / Q + K * K) * norm;\n        break;\n\n    case bq_type_notch:\n        norm = 1 / (1 + K / Q + K * K);\n        a0 = (1 + K * K) * norm;\n        a1 = 2 * (K * K - 1) * norm;\n        a2 = a0;\n        b1 = a1;\n        b2 = (1 - K / Q + K * K) * norm;\n        break;\n\n    case bq_type_peak:\n        if (peakGain >= 1)\n        { // boost\n            norm = 1 / (1 + 1 / Q * K + K * K);\n            a0 = (1 + V / Q * K + K * K) * norm;\n            a1 = 2 * (K * K - 1) * norm;\n            a2 = (1 - V / Q * K + K * K) * norm;\n            b1 = a1;\n            b2 = (1 - 1 / Q * K + K * K) * norm;\n        }\n        else\n        { // cut\n            norm = 1 / (1 + V / Q * K + K * K);\n            a0 = (1 + 1 / Q * K + K * K) * norm;\n            a1 = 2 * (K * K - 1) * norm;\n            a2 = (1 - 1 / Q * K + K * K) * norm;\n            b1 = a1;\n            b2 = (1 - V / Q * K + K * K) * norm;\n        }\n        break;\n    case bq_type_lowshelf:\n        if (peakGain >= 1)\n        { // boost\n            norm = 1 / (1 + sqrtf(2) * K + K * K);\n            a0 = (1 + sqrtf(2 * V) * K + V * K * K) * norm;\n            a1 = 2 * (V * K * K - 1) * norm;\n            a2 = (1 - sqrtf(2 * V) * K + V * K * K) * norm;\n            b1 = 2 * (K * K - 1) * norm;\n            b2 = (1 - sqrtf(2) * K + K * K) * norm;\n        }\n        else\n        { // cut\n            norm = 1 / (1 + sqrtf(2 * V) * K + V * K * K);\n            a0 = (1 + sqrtf(2) * K + K * K) * norm;\n            a1 = 2 * (K * K - 1) * norm;\n            a2 = (1 - sqrtf(2) * K + K * K) * norm;\n            b1 = 2 * (V * K * K - 1) * norm;\n            b2 = (1 - sqrtf(2 * V) * K + V * K * K) * norm;\n        }\n        break;\n    case bq_type_highshelf:\n        if (peakGain >= 1)\n        { // boost\n            norm = 1 / (1 + sqrtf(2) * K + K * K);\n            a0 = (V + sqrtf(2 * V) * K + K * K) * norm;\n            a1 = 2 * (K * K - V) * norm;\n            a2 = (V - sqrtf(2 * V) * K + K * K) * norm;\n            b1 = 2 * (K * K - 1) * norm;\n            b2 = (1 - sqrtf(2) * K + K * K) * norm;\n        }\n        else\n        { // cut\n            norm = 1 / (V + sqrtf(2 * V) * K + K * K);\n            a0 = (1 + sqrtf(2) * K + K * K) * norm;\n            a1 = 2 * (K * K - 1) * norm;\n            a2 = (1 - sqrtf(2) * K + K * K) * norm;\n            b1 = 2 * (K * K - V) * norm;\n            b2 = (V - sqrtf(2 * V) * K + K * K) * norm;\n        }\n        break;\n    }\n\n    return;\n}\n"
  },
  {
    "path": "lib/misc/Biquad.h",
    "content": "//\n//  Biquad.h\n//\n//  Created by Nigel Redmon on 11/24/12\n//  EarLevel Engineering: earlevel.com\n//  Copyright 2012 Nigel Redmon\n//\n//  For a complete explanation of the Biquad code:\n//  http://www.earlevel.com/main/2012/11/25/biquad-c-source-code/\n//\n//  License:\n//\n//  This source code is provided as is, without warranty.\n//  You may copy and distribute verbatim copies of this document.\n//  You may modify and use this source code to create binary code\n//  for your own purposes, free or commercial.\n//\n\n#ifndef Biquad_h\n#define Biquad_h\n\nenum\n{\n    bq_type_lowpass = 0,\n    bq_type_highpass,\n    bq_type_bandpass,\n    bq_type_notch,\n    bq_type_peak,\n    bq_type_lowshelf,\n    bq_type_highshelf\n};\n\nclass Biquad\n{\npublic:\n    Biquad();\n    Biquad(int type, float Fc, float Q, float peakGainDB);\n    ~Biquad();\n    void setType(int type);\n    void setQ(float Q);\n    void setFc(float Fc);\n    void setPeakGain(float peakGainDB);\n    void setBiquad(int type, float Fc, float Q, float peakGainDB);\n    float process(float in);\n    float process(float in, float& z1, float& z2);\nprotected:\n    void calcBiquad(void);\n\n    int type;\n    float a0, a1, a2, b0, b1, b2;\n    float Fc, Q, peakGain;\n    float z1, z2;\n    // float x1; // input delayed by 1 sample\n    // float x2; // input delayed by 2 samples\n    // float y1; // output delayed by 1 sample\n    // float y2; // output delayed by 2 samples\n};\n\ninline float Biquad::process(float in)\n{\n    float out = in * a0 + z1;\n    z1 = in * a1 + z2 - b1 * out;\n    z2 = in * a2 - b2 * out;\n    return out;\n\n    // float x = in;\n    // float y = a0 * x + a1 * x1 + a2 * x2 - b1 * y1 - b2 * y2;\n\n    // x2 = x1;\n    // x1 = x;\n    // y2 = y1;\n    // y1 = y;\n\n    // return y;\n}\n\ninline float Biquad::process(float in, float& _z1, float& _z2)\n{\n    float out = in * a0 + _z1;\n    _z1 = in * a1 + _z2 - b1 * out;\n    _z2 = in * a2 - b2 * out;\n    return out;\n\n    // float x = in;\n    // float y = a0 * x + a1 * x1 + a2 * x2 - b1 * y1 - b2 * y2;\n\n    // x2 = x1;\n    // x1 = x;\n    // y2 = y1;\n    // y1 = y;\n\n    // return y;\n}\n\n#endif // Biquad_h\n"
  },
  {
    "path": "lib/misc/analyze_fft.hxx",
    "content": "\n// code based on Teensy Audio analyse_fft1024.cpp\n\n#pragma once\n\n#include <arm_math.h>\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\n\nconst int16_t AudioWindowHanning1024[] __attribute__ ((aligned (4))) FLASHMEM = {\n     0,     0,     1,     3,     5,     8,    11,    15,    20,    25,\n    31,    37,    44,    52,    61,    69,    79,    89,   100,   111,\n   123,   136,   149,   163,   178,   193,   208,   225,   242,   259,\n   277,   296,   315,   335,   356,   377,   399,   421,   444,   468,\n   492,   517,   542,   568,   595,   622,   650,   678,   707,   736,\n   767,   797,   829,   860,   893,   926,   960,   994,  1029,  1064,\n  1100,  1137,  1174,  1211,  1250,  1288,  1328,  1368,  1408,  1449,\n  1491,  1533,  1576,  1619,  1663,  1708,  1753,  1798,  1844,  1891,\n  1938,  1986,  2034,  2083,  2133,  2182,  2233,  2284,  2335,  2387,\n  2440,  2493,  2547,  2601,  2656,  2711,  2766,  2823,  2879,  2937,\n  2994,  3053,  3111,  3171,  3230,  3291,  3351,  3413,  3474,  3536,\n  3599,  3662,  3726,  3790,  3855,  3920,  3985,  4051,  4118,  4185,\n  4252,  4320,  4388,  4457,  4526,  4596,  4666,  4737,  4808,  4879,\n  4951,  5023,  5096,  5169,  5243,  5317,  5391,  5466,  5541,  5617,\n  5693,  5769,  5846,  5923,  6001,  6079,  6158,  6236,  6316,  6395,\n  6475,  6555,  6636,  6717,  6799,  6880,  6962,  7045,  7128,  7211,\n  7295,  7379,  7463,  7547,  7632,  7717,  7803,  7889,  7975,  8062,\n  8148,  8236,  8323,  8411,  8499,  8587,  8676,  8765,  8854,  8944,\n  9033,  9123,  9214,  9304,  9395,  9486,  9578,  9670,  9761,  9854,\n  9946, 10039, 10132, 10225, 10318, 10412, 10505, 10599, 10694, 10788,\n 10883, 10978, 11073, 11168, 11264, 11359, 11455, 11551, 11648, 11744,\n 11841, 11937, 12034, 12131, 12229, 12326, 12424, 12521, 12619, 12717,\n 12815, 12914, 13012, 13111, 13209, 13308, 13407, 13506, 13605, 13704,\n 13804, 13903, 14003, 14102, 14202, 14302, 14401, 14501, 14601, 14701,\n 14802, 14902, 15002, 15102, 15203, 15303, 15403, 15504, 15604, 15705,\n 15806, 15906, 16007, 16107, 16208, 16309, 16409, 16510, 16610, 16711,\n 16812, 16912, 17013, 17113, 17214, 17314, 17415, 17515, 17616, 17716,\n 17816, 17916, 18017, 18117, 18217, 18317, 18416, 18516, 18616, 18716,\n 18815, 18915, 19014, 19113, 19213, 19312, 19411, 19509, 19608, 19707,\n 19805, 19904, 20002, 20100, 20198, 20296, 20393, 20491, 20588, 20685,\n 20782, 20879, 20976, 21072, 21169, 21265, 21361, 21457, 21552, 21647,\n 21743, 21838, 21932, 22027, 22121, 22216, 22309, 22403, 22497, 22590,\n 22683, 22776, 22868, 22961, 23053, 23144, 23236, 23327, 23418, 23509,\n 23599, 23690, 23780, 23869, 23959, 24048, 24136, 24225, 24313, 24401,\n 24489, 24576, 24663, 24750, 24836, 24922, 25008, 25093, 25178, 25263,\n 25347, 25431, 25515, 25599, 25682, 25764, 25847, 25929, 26010, 26091,\n 26172, 26253, 26333, 26413, 26492, 26571, 26650, 26728, 26806, 26883,\n 26960, 27037, 27113, 27189, 27265, 27340, 27414, 27488, 27562, 27636,\n 27708, 27781, 27853, 27925, 27996, 28067, 28137, 28207, 28276, 28345,\n 28414, 28482, 28550, 28617, 28683, 28750, 28815, 28881, 28946, 29010,\n 29074, 29137, 29200, 29263, 29325, 29386, 29447, 29508, 29568, 29627,\n 29686, 29745, 29803, 29860, 29917, 29974, 30029, 30085, 30140, 30194,\n 30248, 30301, 30354, 30407, 30458, 30510, 30560, 30611, 30660, 30709,\n 30758, 30806, 30853, 30900, 30947, 30993, 31038, 31083, 31127, 31170,\n 31213, 31256, 31298, 31339, 31380, 31420, 31460, 31499, 31538, 31576,\n 31613, 31650, 31686, 31722, 31757, 31791, 31825, 31859, 31891, 31924,\n 31955, 31986, 32017, 32046, 32076, 32104, 32132, 32160, 32187, 32213,\n 32239, 32264, 32288, 32312, 32335, 32358, 32380, 32402, 32422, 32443,\n 32462, 32481, 32500, 32518, 32535, 32551, 32567, 32583, 32598, 32612,\n 32625, 32638, 32651, 32662, 32673, 32684, 32694, 32703, 32712, 32720,\n 32727, 32734, 32740, 32746, 32751, 32755, 32759, 32762, 32764, 32766,\n 32767, 32767, 32767, 32767, 32766, 32764, 32762, 32759, 32755, 32751,\n 32746, 32740, 32734, 32727, 32720, 32712, 32703, 32694, 32684, 32673,\n 32662, 32651, 32638, 32625, 32612, 32598, 32583, 32567, 32551, 32535,\n 32518, 32500, 32481, 32462, 32443, 32422, 32402, 32380, 32358, 32335,\n 32312, 32288, 32264, 32239, 32213, 32187, 32160, 32132, 32104, 32076,\n 32046, 32017, 31986, 31955, 31924, 31891, 31859, 31825, 31791, 31757,\n 31722, 31686, 31650, 31613, 31576, 31538, 31499, 31460, 31420, 31380,\n 31339, 31298, 31256, 31213, 31170, 31127, 31083, 31038, 30993, 30947,\n 30900, 30853, 30806, 30758, 30709, 30660, 30611, 30560, 30510, 30458,\n 30407, 30354, 30301, 30248, 30194, 30140, 30085, 30029, 29974, 29917,\n 29860, 29803, 29745, 29686, 29627, 29568, 29508, 29447, 29386, 29325,\n 29263, 29200, 29137, 29074, 29010, 28946, 28881, 28815, 28750, 28683,\n 28617, 28550, 28482, 28414, 28345, 28276, 28207, 28137, 28067, 27996,\n 27925, 27853, 27781, 27708, 27636, 27562, 27488, 27414, 27340, 27265,\n 27189, 27113, 27037, 26960, 26883, 26806, 26728, 26650, 26571, 26492,\n 26413, 26333, 26253, 26172, 26091, 26010, 25929, 25847, 25764, 25682,\n 25599, 25515, 25431, 25347, 25263, 25178, 25093, 25008, 24922, 24836,\n 24750, 24663, 24576, 24489, 24401, 24313, 24225, 24136, 24048, 23959,\n 23869, 23780, 23690, 23599, 23509, 23418, 23327, 23236, 23144, 23053,\n 22961, 22868, 22776, 22683, 22590, 22497, 22403, 22309, 22216, 22121,\n 22027, 21932, 21838, 21743, 21647, 21552, 21457, 21361, 21265, 21169,\n 21072, 20976, 20879, 20782, 20685, 20588, 20491, 20393, 20296, 20198,\n 20100, 20002, 19904, 19805, 19707, 19608, 19509, 19411, 19312, 19213,\n 19113, 19014, 18915, 18815, 18716, 18616, 18516, 18416, 18317, 18217,\n 18117, 18017, 17916, 17816, 17716, 17616, 17515, 17415, 17314, 17214,\n 17113, 17013, 16912, 16812, 16711, 16610, 16510, 16409, 16309, 16208,\n 16107, 16007, 15906, 15806, 15705, 15604, 15504, 15403, 15303, 15203,\n 15102, 15002, 14902, 14802, 14701, 14601, 14501, 14401, 14302, 14202,\n 14102, 14003, 13903, 13804, 13704, 13605, 13506, 13407, 13308, 13209,\n 13111, 13012, 12914, 12815, 12717, 12619, 12521, 12424, 12326, 12229,\n 12131, 12034, 11937, 11841, 11744, 11648, 11551, 11455, 11359, 11264,\n 11168, 11073, 10978, 10883, 10788, 10694, 10599, 10505, 10412, 10318,\n 10225, 10132, 10039,  9946,  9854,  9761,  9670,  9578,  9486,  9395,\n  9304,  9214,  9123,  9033,  8944,  8854,  8765,  8676,  8587,  8499,\n  8411,  8323,  8236,  8148,  8062,  7975,  7889,  7803,  7717,  7632,\n  7547,  7463,  7379,  7295,  7211,  7128,  7045,  6962,  6880,  6799,\n  6717,  6636,  6555,  6475,  6395,  6316,  6236,  6158,  6079,  6001,\n  5923,  5846,  5769,  5693,  5617,  5541,  5466,  5391,  5317,  5243,\n  5169,  5096,  5023,  4951,  4879,  4808,  4737,  4666,  4596,  4526,\n  4457,  4388,  4320,  4252,  4185,  4118,  4051,  3985,  3920,  3855,\n  3790,  3726,  3662,  3599,  3536,  3474,  3413,  3351,  3291,  3230,\n  3171,  3111,  3053,  2994,  2937,  2879,  2823,  2766,  2711,  2656,\n  2601,  2547,  2493,  2440,  2387,  2335,  2284,  2233,  2182,  2133,\n  2083,  2034,  1986,  1938,  1891,  1844,  1798,  1753,  1708,  1663,\n  1619,  1576,  1533,  1491,  1449,  1408,  1368,  1328,  1288,  1250,\n  1211,  1174,  1137,  1100,  1064,  1029,   994,   960,   926,   893,\n   860,   829,   797,   767,   736,   707,   678,   650,   622,   595,\n   568,   542,   517,   492,   468,   444,   421,   399,   377,   356,\n   335,   315,   296,   277,   259,   242,   225,   208,   193,   178,\n   163,   149,   136,   123,   111,   100,    89,    79,    69,    61,\n    52,    44,    37,    31,    25,    20,    15,    11,     8,     5,\n     3,     1,     0,     0,\n};\n\n\ntemplate <int BITS = 1024>\nclass AnalyzeFFT\n{\n    uint16_t output[BITS / 2];\n    int16_t buffer[BITS * 2] __attribute__((aligned(4)));\n\n    arm_cfft_radix4_instance_q15 fft_inst;\n\n    uint32_t *p = (uint32_t *)buffer;\n\n    // computes ((a[15:0] * b[15:0]) + (a[31:16] * b[31:16]))\n    inline int32_t multiply_16tx16t_add_16bx16b(uint32_t a, uint32_t b)\n    {\n        int32_t out;\n        asm volatile(\"smuad %0, %1, %2\"\n                     : \"=r\"(out)\n                     : \"r\"(a), \"r\"(b));\n        return out;\n    }\n\n    // https://www.esp8266.com/viewtopic.php?p=55534\n    const uint16_t sqrt_integer_guess_table[33] = {55109, 38968, 27555, 19484, 13778, 9742, 6889, 4871, 3445, 2436, 1723,\n                                                   1218, 862, 609, 431, 305, 216, 153, 108, 77, 54, 39, 27, 20, 14, 10,\n                                                   7, 5, 4, 3, 2, 1, 0};\n\n    inline uint32_t sqrt_uint32(uint32_t in)\n    {\n        uint32_t n = sqrt_integer_guess_table[__builtin_clz(in)];\n        n = ((in / n) + n) / 2;\n        n = ((in / n) + n) / 2;\n        n = ((in / n) + n) / 2;\n        return n;\n    }\n\n    inline uint32_t sqrt_uint32_approx(uint32_t in)\n    {\n        uint32_t n = sqrt_integer_guess_table[__builtin_clz(in)];\n        n = ((in / n) + n) / 2;\n        n = ((in / n) + n) / 2;\n        return n;\n    }\n\nstatic void apply_window_to_fft_buffer(void *buffer, const void *window)\n{\n\tint16_t *buf = (int16_t *)buffer;\n        const int16_t *win = (int16_t *)window;\n        ;\n\n        for (int i = 0; i < 1024; i++)\n        {\n\t\tint32_t val = *buf * *win++;\n\t\t//*buf = signed_saturate_rshift(val, 16, 15);\n\t\t*buf = val >> 15;\n\t\tbuf += 2;\n\t}\n}\n\npublic:\n    AnalyzeFFT()\n    {\n        arm_cfft_radix4_init_q15(&fft_inst, BITS, 0, 1);\n        p = (uint32_t *)buffer;\n        memset(output, 0, sizeof(output));\n    }\n\n    bool process(const int16_t *in, size_t len, int16_t gain = 1)\n    {\n        for (size_t i = 0; i < len; i++)\n        {\n            *p++ = __SSAT(in[i] * gain, 16);\n\n            if (p >= (uint32_t *)(&buffer[BITS * 2]))\n            {\n                int16_t bak[LEN_OF(buffer)/2];\n                memcpy(bak, &buffer[LEN_OF(buffer)/2], sizeof(bak));\n\n                apply_window_to_fft_buffer(buffer, AudioWindowHanning1024);\n                arm_cfft_radix4_q15(&fft_inst, buffer);\n\n                for (size_t i = 0; i < LEN_OF(output); i++)\n                {\n                    uint32_t tmp = *((uint32_t *)buffer + i); // real & imag\n                    uint32_t magsq = multiply_16tx16t_add_16bx16b(tmp, tmp);\n                    output[i] = (output[i] >> 1) + sqrt_uint32_approx(magsq);\n                };\n\n                memcpy(buffer, bak, sizeof(bak));\n                p = (uint32_t *)&buffer[LEN_OF(buffer)/2];\n\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    void display(uint8_t *display, int offset = 7)\n    {\n        uint32_t ylim = 64 - offset;\n        constexpr uint32_t dx = 128;\n        constexpr uint32_t bpp = LEN_OF(output) / dx;\n        int x = 0;\n        for (uint32_t i = 0; i < LEN_OF(output); i++)\n        {\n            if (BITS == 1024)\n            {\n                uint32_t sum = 0;\n                int n = std::min<int>(i + bpp, LEN_OF(output));\n                for (int j = i; j < n; j++)\n                    sum += output[j];\n\n                float f = (1.0f / 16384.0f) * sum;\n\n                // f = 20.f * log10f(1+f*10);\n\n                gfx::drawLine(x, ylim, x, ylim - (f*ylim));\n                x++;\n                i = (n - 1);\n            }\n            else if (BITS == 256)\n            {\n                auto f = output[i];\n                gfx::drawLine(i, ylim, i, ylim - f);\n            }\n            else\n            {\n                gfx::drawString(0, 32, \"not implemented\");\n            }\n        };\n    }\n};\n"
  },
  {
    "path": "lib/misc/cubic_spline.hxx",
    "content": "\n/*\n * Based on: https://medium.com/@martinmikkelsen/cubic-splines-in-the-c-language-4463fe9a3a83\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n\ntypedef struct\n{\n    int N;    // number of intervals (points - 1)\n    float *x; // x points\n    float *y; // y points (a[i])\n    float *b; // .\n    float *c; // .\n    float *d; // .\n} cspline;\n\n// Initialize spline with given (x, y) points\nvoid cspline_init(cspline *s, const float *x, const float *y, int N, int stride)\n{\n    s->N = N;\n    s->x = (float *)malloc((N * 5) * sizeof(float));\n    s->y = s->x + N;\n    s->b = s->y + N;\n    s->c = s->b + N;\n    s->d = s->c + N;\n\n    for (int i = 0; i < N; ++i)\n    {\n        s->x[i] = x[i * stride];\n        s->y[i] = y[i * stride];\n    }\n    int i;\n    float dx[N - 1];\n    float p[N - 1];\n    for (i = 0; i < N - 1; ++i)\n    {\n        dx[i] = x[(i + 1) * stride] - x[i * stride];\n\n        if (dx[i] < 0.1f)\n            dx[i] = 0.1f;\n\n        p[i] = (y[(i + 1) * stride] - y[i * stride]) / dx[i];\n    }\n    float D[N];\n    float B[N];\n    float Q[N - 1];\n    D[0] = 2;\n    D[N - 1] = 2;\n    B[0] = 3 * p[0];\n    B[N - 1] = 3 * p[N - 2];\n    Q[0] = 1;\n\n    for (i = 0; i < N - 2; ++i)\n    {\n        D[i + 1] = 2 * dx[i] / dx[i + 1] + 2;\n        B[i + 1] = 3 * (p[i] + p[i + 1] * dx[i] / dx[i + 1]);\n        Q[i + 1] = dx[i] / dx[i + 1];\n    }\n    for (i = 1; i < N; ++i)\n    {\n        D[i] -= Q[i - 1] / D[i - 1];\n        B[i] -= B[i - 1] / D[i - 1];\n    }\n    s->b[N - 1] = B[N - 1] / D[N - 1];\n\n    for (i = N - 2; i >= 0; --i)\n    {\n        s->b[i] = (B[i] - Q[i] * s->b[i + 1]) / D[i];\n    }\n\n    for (i = 0; i < N - 1; ++i)\n    {\n        s->c[i] = (-2 * s->b[i] - s->b[i + 1] + 3 * p[i]) / dx[i];\n        s->d[i] = (s->b[i] + s->b[i + 1] - 2 * p[i]) / dx[i] / dx[i];\n    }\n}\n\nfloat cspline_eval(const cspline *s, float x)\n{\n    int i;\n\n    if (x <= s->x[0])\n    {\n        i = 0;\n    }\n    else if (x >= s->x[s->N - 1])\n    {\n        i = s->N - 1;\n    }\n    else\n    {\n        int low = 0, high = s->N - 1;\n        while (low < high - 1)\n        {\n            int mid = (low + high) / 2;\n            if (x < s->x[mid])\n            {\n                high = mid;\n            }\n            else\n            {\n                low = mid;\n            }\n        }\n        i = low;\n    }\n\n    auto dx = x - s->x[i];\n    auto y_new = s->y[i] + s->b[i] * dx + s->c[i] * powf(dx, 2) + s->d[i] * powf(dx, 3);\n    return y_new;\n}\n\nvoid cspline_free(cspline *spline)\n{\n    free(spline->x);\n}\n"
  },
  {
    "path": "lib/misc/dspinst.h",
    "content": "/* Audio Library for Teensy 3.X\n * Copyright (c) 2014, Paul Stoffregen, paul@pjrc.com\n *\n * Development of this audio library was funded by PJRC.COM, LLC by sales of\n * Teensy and Audio Adaptor boards.  Please support PJRC's efforts to develop\n * open source software by purchasing Teensy or other PJRC products.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice, development funding notice, and this permission\n * notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef dspinst_h_\n#define dspinst_h_\n\n#include <stdint.h>\n\n// computes limit((val >> rshift), 2**bits)\nstatic inline int32_t signed_saturate_rshift(int32_t val, int bits, int rshift) __attribute__((always_inline, unused));\nstatic inline int32_t signed_saturate_rshift(int32_t val, int bits, int rshift)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"ssat %0, %1, %2, asr %3\" : \"=r\" (out) : \"I\" (bits), \"r\" (val), \"I\" (rshift));\n\treturn out;\n#else\n\tint32_t out, max;\n\tout = val >> rshift;\n\tmax = 1 << (bits - 1);\n\tif (out >= 0) {\n\t\tif (out > max - 1) out = max - 1;\n\t} else {\n\t\tif (out < -max) out = -max;\n\t}\n\treturn out;\n#endif\n}\n\n// computes limit(val, 2**bits)\nstatic inline int16_t saturate16(int32_t val) __attribute__((always_inline, unused));\nstatic inline int16_t saturate16(int32_t val)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint16_t out;\n\tint32_t tmp;\n\tasm volatile(\"ssat %0, %1, %2\" : \"=r\" (tmp) : \"I\" (16), \"r\" (val) );\n\tout = (int16_t) (tmp);\n\treturn out;\n#else\n    if (val > 32767) val = 32767;\n    else if (val < -32768) val = -32768;\n    return val;\n#endif\n}\n\n// computes ((a[31:0] * b[15:0]) >> 16)\nstatic inline int32_t signed_multiply_32x16b(int32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_multiply_32x16b(int32_t a, uint32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smulwb %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn ((int64_t)a * (int16_t)(b & 0xFFFF)) >> 16;\n#endif\n}\n\n// computes ((a[31:0] * b[31:16]) >> 16)\nstatic inline int32_t signed_multiply_32x16t(int32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_multiply_32x16t(int32_t a, uint32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smulwt %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn ((int64_t)a * (int16_t)(b >> 16)) >> 16;\n#endif\n}\n\n// computes (((int64_t)a[31:0] * (int64_t)b[31:0]) >> 32)\nstatic inline int32_t multiply_32x32_rshift32(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_32x32_rshift32(int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smmul %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn ((int64_t)a * (int64_t)b) >> 32;\n#endif\n}\n\n// computes (((int64_t)a[31:0] * (int64_t)b[31:0] + 0x8000000) >> 32)\nstatic inline int32_t multiply_32x32_rshift32_rounded(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_32x32_rshift32_rounded(int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smmulr %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn (((int64_t)a * (int64_t)b) + 0x8000000) >> 32;\n#endif\n}\n\n// computes sum + (((int64_t)a[31:0] * (int64_t)b[31:0] + 0x8000000) >> 32)\nstatic inline int32_t multiply_accumulate_32x32_rshift32_rounded(int32_t sum, int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_accumulate_32x32_rshift32_rounded(int32_t sum, int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smmlar %0, %2, %3, %1\" : \"=r\" (out) : \"r\" (sum), \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn sum + ((((int64_t)a * (int64_t)b) + 0x8000000) >> 32);\n#endif\n}\n\n// computes sum - (((int64_t)a[31:0] * (int64_t)b[31:0] + 0x8000000) >> 32)\nstatic inline int32_t multiply_subtract_32x32_rshift32_rounded(int32_t sum, int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_subtract_32x32_rshift32_rounded(int32_t sum, int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"smmlsr %0, %2, %3, %1\" : \"=r\" (out) : \"r\" (sum), \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn sum - ((((int64_t)a * (int64_t)b) + 0x8000000) >> 32);\n#endif\n}\n\n\n// computes (a[31:16] | (b[31:16] >> 16))\nstatic inline uint32_t pack_16t_16t(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t pack_16t_16t(int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"pkhtb %0, %1, %2, asr #16\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn (a & 0xFFFF0000) | ((uint32_t)b >> 16);\n#endif\n}\n\n// computes (a[31:16] | b[15:0])\nstatic inline uint32_t pack_16t_16b(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t pack_16t_16b(int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"pkhtb %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n#elif defined(KINETISL)\n\treturn (a & 0xFFFF0000) | (b & 0x0000FFFF);\n#endif\n}\n\n// computes ((a[15:0] << 16) | b[15:0])\nstatic inline uint32_t pack_16b_16b(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t pack_16b_16b(int32_t a, int32_t b)\n{\n#if defined (__ARM_ARCH_7EM__)\n\tint32_t out;\n\tasm volatile(\"pkhbt %0, %1, %2, lsl #16\" : \"=r\" (out) : \"r\" (b), \"r\" (a));\n\treturn out;\n#elif defined(KINETISL)\n\treturn (a << 16) | (b & 0x0000FFFF);\n#endif\n}\n\n// computes ((a[15:0] << 16) | b[15:0])\n/*\nstatic inline uint32_t pack_16x16(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t pack_16x16(int32_t a, int32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"pkhbt %0, %1, %2, lsl #16\" : \"=r\" (out) : \"r\" (b), \"r\" (a));\n\treturn out;\n}\n*/\n#if defined (__ARM_ARCH_7EM__)\n// computes (((a[31:16] + b[31:16]) << 16) | (a[15:0 + b[15:0]))  (saturates)\nstatic inline uint32_t signed_add_16_and_16(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t signed_add_16_and_16(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"qadd16 %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes (((a[31:16] - b[31:16]) << 16) | (a[15:0 - b[15:0]))  (saturates)\nstatic inline int32_t signed_subtract_16_and_16(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_subtract_16_and_16(int32_t a, int32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"qsub16 %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes out = (((a[31:16]+b[31:16])/2) <<16) | ((a[15:0]+b[15:0])/2)\nstatic inline int32_t signed_halving_add_16_and_16(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_halving_add_16_and_16(int32_t a, int32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"shadd16 %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes out = (((a[31:16]-b[31:16])/2) <<16) | ((a[15:0]-b[15:0])/2)\nstatic inline int32_t signed_halving_subtract_16_and_16(int32_t a, int32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_halving_subtract_16_and_16(int32_t a, int32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"shsub16 %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes (sum + ((a[31:0] * b[15:0]) >> 16))\nstatic inline int32_t signed_multiply_accumulate_32x16b(int32_t sum, int32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_multiply_accumulate_32x16b(int32_t sum, int32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smlawb %0, %2, %3, %1\" : \"=r\" (out) : \"r\" (sum), \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes (sum + ((a[31:0] * b[31:16]) >> 16))\nstatic inline int32_t signed_multiply_accumulate_32x16t(int32_t sum, int32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t signed_multiply_accumulate_32x16t(int32_t sum, int32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smlawt %0, %2, %3, %1\" : \"=r\" (out) : \"r\" (sum), \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes logical and, forces compiler to allocate register and use single cycle instruction\nstatic inline uint32_t logical_and(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline uint32_t logical_and(uint32_t a, uint32_t b)\n{\n\tasm volatile(\"and %0, %1\" : \"+r\" (a) : \"r\" (b));\n\treturn a;\n}\n\n// computes ((a[15:0] * b[15:0]) + (a[31:16] * b[31:16]))\nstatic inline int32_t multiply_16tx16t_add_16bx16b(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16tx16t_add_16bx16b(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smuad %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes ((a[15:0] * b[31:16]) + (a[31:16] * b[15:0]))\nstatic inline int32_t multiply_16tx16b_add_16bx16t(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16tx16b_add_16bx16t(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smuadx %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// // computes sum += ((a[15:0] * b[15:0]) + (a[31:16] * b[31:16]))\nstatic inline int64_t multiply_accumulate_16tx16t_add_16bx16b(int64_t sum, uint32_t a, uint32_t b)\n{\n\tasm volatile(\"smlald %Q0, %R0, %1, %2\" : \"+r\" (sum) : \"r\" (a), \"r\" (b));\n\treturn sum;\n}\n\n// // computes sum += ((a[15:0] * b[31:16]) + (a[31:16] * b[15:0]))\nstatic inline int64_t multiply_accumulate_16tx16b_add_16bx16t(int64_t sum, uint32_t a, uint32_t b)\n{\n\tasm volatile(\"smlaldx %Q0, %R0, %1, %2\" : \"+r\" (sum) : \"r\" (a), \"r\" (b));\n\treturn sum;\n}\n\n// computes ((a[15:0] * b[15:0])\nstatic inline int32_t multiply_16bx16b(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16bx16b(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smulbb %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes ((a[15:0] * b[31:16])\nstatic inline int32_t multiply_16bx16t(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16bx16t(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smulbt %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes ((a[31:16] * b[15:0])\nstatic inline int32_t multiply_16tx16b(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16tx16b(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smultb %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes ((a[31:16] * b[31:16])\nstatic inline int32_t multiply_16tx16t(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t multiply_16tx16t(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"smultt %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// computes (a - b), result saturated to 32 bit integer range\nstatic inline int32_t substract_32_saturate(uint32_t a, uint32_t b) __attribute__((always_inline, unused));\nstatic inline int32_t substract_32_saturate(uint32_t a, uint32_t b)\n{\n\tint32_t out;\n\tasm volatile(\"qsub %0, %1, %2\" : \"=r\" (out) : \"r\" (a), \"r\" (b));\n\treturn out;\n}\n\n// Multiply two S.31 fractional integers, and return the 32 most significant\n// bits after a shift left by the constant z.\n// This comes from rockbox.org\n\nstatic inline int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)\n{\n    int32_t t, t2;\n    asm (\"smull    %[t], %[t2], %[a], %[b]\\n\\t\"\n         \"mov      %[t2], %[t2], asl %[c]\\n\\t\"\n         \"orr      %[t], %[t2], %[t], lsr %[d]\\n\\t\"\n         : [t] \"=&r\" (t), [t2] \"=&r\" (t2)\n         : [a] \"r\" (x), [b] \"r\" (y),\n           [c] \"Mr\" ((z) + 1), [d] \"Mr\" (31 - (z)));\n    return t;\n}\n\n#endif\n\n//get Q from PSR\nstatic inline uint32_t get_q_psr(void) __attribute__((always_inline, unused));\nstatic inline uint32_t get_q_psr(void)\n{\n  uint32_t out;\n  asm (\"mrs %0, APSR\" : \"=r\" (out));\n  return (out & 0x8000000)>>27;\n}\n\n//clear Q BIT in PSR\nstatic inline void clr_q_psr(void) __attribute__((always_inline, unused));\nstatic inline void clr_q_psr(void)\n{\n  uint32_t t;\n  asm (\"mov %[t],#0\\n\"\n       \"msr APSR_nzcvq,%0\\n\" : [t] \"=&r\" (t)::\"cc\");\n}\n\n\n#endif\n"
  },
  {
    "path": "lib/misc/euclidean.h",
    "content": "\n// Copyright (C)2023 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include <inttypes.h>\n#include <algorithm>\n\n// found here:\n// https://louridas.github.io/rwa/assignments/musical-rhythms/#toussaint:2005\n// https://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf\n\n// https://github.com/grindcode/rhythms/blob/main/src/lib.rs#L129\n// https://github.com/computermusicdesign/euclidean-rhythm/blob/master/max-example/euclidSimple.js\n\nvoid simple_pattern(uint8_t *pattern, int len, int pulses, int rotate)\n{\n    pulses = std::min(pulses, len);\n    uint8_t bucket = 0;\n    uint8_t offset = 2 + rotate;\n\n    if (len > 0 && pulses > 0)\n        offset += len / pulses - 1;\n\n    for (uint8_t i = 0; i < len; i++)\n    {\n        uint8_t pos = (offset + i) % len;\n        bucket += pulses;\n        if (bucket >= len)\n        {\n            bucket -= len;\n            pattern[pos] = 1;\n        }\n        else\n        {\n            pattern[pos] = 0;\n        }\n    }\n}\n\n// based on https://bitbucket.org/sjcastroe/bjorklunds-algorithm/src/master/Bjorklund's%20Algorithm/bjorklund.cpp\n\nvoid bjorklund_pattern(uint8_t *pattern, int len, int pulses, int rotate)\n{\n    struct Pattern\n    {\n        uint32_t hits;\n        size_t len;\n        void append(const Pattern &second)\n        {\n            hits |= (second.hits << len);\n            len += second.len;\n        }\n    };\n\n    if (pulses > len)\n        pulses = len;\n\n    Pattern x = {0x1, 1};\n    int x_amount = pulses;\n    Pattern y = {0x0, 1};\n    int y_amount = len - pulses;\n\n    do\n    {\n        int x_temp = x_amount;\n        int y_temp = y_amount;\n        Pattern y_copy = y;\n\n        if (x_temp >= y_temp)\n        {\n            x_amount = y_temp;\n            y_amount = x_temp - y_temp;\n\n            y = x;\n        }\n        else\n        {\n            x_amount = x_temp;\n            y_amount = y_temp - x_temp;\n        }\n\n        x.append(y_copy);\n    } while (x_amount > 1 && y_amount > 1);\n\n    int k = 0;\n    for (int i = 1; i <= x_amount; i++)\n        for (auto j = 0; j < x.len; j++)\n            pattern[(k++ + rotate) % len] = (x.hits & (0x1 << j));\n    for (int i = 1; i <= y_amount; i++)\n        for (auto j = 0; j < y.len; j++)\n            pattern[(k++ + rotate) % len] = (y.hits & (0x1 << j));\n}\n\n#ifndef make_pattern\n#define make_pattern bjorklund_pattern\n#endif"
  },
  {
    "path": "lib/misc/nes_noise.hxx",
    "content": "\n// Copyright (C)2023 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// For details see:\n// https://www.nesdev.org/wiki/APU_Noise\n\n#include <math.h>\n\nconstexpr float clock_NTSC = 1789773.f;\nconstexpr float clock_PAL = 1662607.f;\n\nclass NESNoise\n{\npublic:\n    NESNoise()\n    {\n        mode_bit = 1;\n        period_index = 8;\n        shift_reg = 1 | (uint32_t)this;\n    }\n\n    void init(uint16_t shift_reg = 1, uint8_t mode_bit = 1, uint8_t period_index = 8)\n    {\n        this->mode_bit = mode_bit;\n        this->period_index = period_index;\n        this->shift_reg = shift_reg;\n    }\n\n    template <typename T, uint32_t samplerate = 48000, bool ntsc = true>\n    T generateSample(T level)\n    {\n        while (true)\n        {\n            tick++;\n            sampling -= 1.f;\n\n            if (sampling < 0)\n            {\n                if (ntsc)\n                    sampling += (clock_NTSC / samplerate);\n                else\n                    sampling += (clock_PAL / samplerate);\n\n                return (shift_reg & 0x1) ? 0 : level;\n            }\n\n            if ((tick % 2) == 0)\n            {\n                if (timer_counter > 0)\n                {\n                    timer_counter--;\n                }\n                else\n                {\n                    if (ntsc)\n                        timer_counter = periodLookup_NTSC[period_index % 16];\n                    else\n                        timer_counter = periodLookup_PAL[period_index % 16];\n\n                    uint32_t feedback = 1 & ((shift_reg & 0x0001) ^ ((mode_bit == 0) ? ((shift_reg >> 6) & 0x0001) : ((shift_reg >> 1) & 0x0001)));\n                    shift_reg >>= 1;\n                    shift_reg |= (feedback << 14);\n                }\n            }\n        }\n        return 0;\n    }\n\n    uint8_t mode_bit;\n    uint8_t period_index;\n    uint16_t shift_reg;\n\nprivate:\n    uint16_t timer_counter = 0;\n    float sampling = 0;\n    uint32_t tick = 0;\n    const uint16_t periodLookup_NTSC[16] = {4, 8, 16, 32, 64, 96, 128, 160, 202, 254, 380, 508, 762, 1016, 2034, 4068};\n    const uint16_t periodLookup_PAL[16] = {4, 8, 14, 30, 60, 88, 118, 148, 188, 236, 354, 472, 708, 944, 1890, 3778};\n};"
  },
  {
    "path": "lib/misc/noise.hxx",
    "content": "\n// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#pragma once\n#include <inttypes.h>\n\n// 31-bit Park-Miller-Carta Pseudo-Random Number Generator\n// http://www.firstpr.com.au/dsp/rand31/\n\nstruct WhiteNoise\n{\n    uint32_t seed;\n\n    WhiteNoise()\n    {\n        seed = (uint32_t)(void *)this;\n    }\n\n    int32_t next() // 0 to INT32_MAX\n    {\n        uint32_t lo, hi;\n        lo = seed;\n\n        hi = 16807 * (lo >> 16);\n        lo = 16807 * (lo & 0xFFFF);\n        lo += (hi & 0x7FFF) << 16;\n        lo += hi >> 15;\n        lo = (lo & 0x7FFFFFFF) + (lo >> 31);\n\n        seed = lo;\n        return (int32_t)lo;\n    }\n\n    float nextf(float min, float max)\n    {\n        return ((float)next() / INT32_MAX) * (max - min) + min;\n    }\n};\n\nstruct BrownNoise\n{\n    WhiteNoise _white;\n    float out = 0;\n\n    void init()\n    {\n        out = 0;\n    }\n\n    float nextf(float min, float max)\n    {\n        float white = _white.nextf(-1, +1);\n        // MoogLadders -> BrowningFilter\n        this->out = (this->out + 0.02f * white) / 1.02f;\n        return this->out * (max - min) + min;\n    }\n};\n\n/** Based on \"The Voss algorithm\"\nhttp://www.firstpr.com.au/dsp/pink-noise/\n*/\n\ntemplate <int N = 8> struct PinkNoise\n{\n    WhiteNoise white;\n\n    int key = 0;\n    float values[N] = {};\n\n    float nextf(float min, float max)\n    {\n        int last_key = key;\n        key++;\n        if (key > (0x1 << N))\n            key = 0;\n\n        // Exclusive-Or previous value with current value. This gives\n        // a list of bits that have changed.\n        int diff = last_key ^ key;\n\n        float sum = 0.f;\n        for (int i = 0; i < N; i++)\n        {\n            if (diff & (1 << i))\n            {\n                values[i] = white.nextf(min, max) / N;\n            }\n            sum += values[i];\n        }\n        return sum;\n    }\n};"
  },
  {
    "path": "lib/misc/patterns_303.h",
    "content": "#include <inttypes.h>\n\nconstexpr uint8_t REST = 0x0;\n\n/* between 0x0 and 0xA, the VCO voltage pins, so these notes arent really\n * 'effective' in that they all sound the same.\n */\n\n// lowest octave\nconstexpr uint8_t C1 = 0x0B;\nconstexpr uint8_t C1_SHARP = 0x0C;\nconstexpr uint8_t D1 = 0x0D;\nconstexpr uint8_t D1_SHARP = 0x0E;\nconstexpr uint8_t E1 = 0x0F;\nconstexpr uint8_t F1 = 0x10;\nconstexpr uint8_t F1_SHARP = 0x11;\nconstexpr uint8_t G1 = 0x12;\nconstexpr uint8_t G1_SHARP = 0x13;\n\n// middle octave\nconstexpr uint8_t A1 = 0x14;\nconstexpr uint8_t A1_SHARP = 0x15;\nconstexpr uint8_t B1 = 0x16;\nconstexpr uint8_t C2 = 0x17;\nconstexpr uint8_t C2_SHARP = 0x18;\nconstexpr uint8_t D2 = 0x19;\nconstexpr uint8_t D2_SHARP = 0x1A;\nconstexpr uint8_t E2 = 0x1B;\nconstexpr uint8_t F2 = 0x1C;\nconstexpr uint8_t F2_SHARP = 0x1D;\nconstexpr uint8_t G2 = 0x1E;\nconstexpr uint8_t G2_SHARP = 0x1F;\n\n// high octave\nconstexpr uint8_t A2 = 0x20;\nconstexpr uint8_t A2_SHARP = 0x21;\nconstexpr uint8_t B2 = 0x22;\nconstexpr uint8_t C3 = 0x23;\nconstexpr uint8_t C3_SHARP = 0x24;\nconstexpr uint8_t D3 = 0x25;\nconstexpr uint8_t D3_SHARP = 0x26;\nconstexpr uint8_t E3 = 0x27;\nconstexpr uint8_t F3 = 0x28;\nconstexpr uint8_t F3_SHARP = 0x29;\nconstexpr uint8_t G3 = 0x2A;\nconstexpr uint8_t G3_SHARP = 0x2B;\n\nconstexpr uint8_t A3 = 0x2C;\nconstexpr uint8_t A3_SHARP = 0x2D;\nconstexpr uint8_t B3 = 0x2E;\nconstexpr uint8_t C4 = 0x2F;\nconstexpr uint8_t C4_SHARP = 0x30;\nconstexpr uint8_t D4 = 0x31;\nconstexpr uint8_t D4_SHARP = 0x32;\nconstexpr uint8_t E4 = 0x33;\nconstexpr uint8_t F4 = 0x34;\nconstexpr uint8_t F4_SHARP = 0x35;\nconstexpr uint8_t G4 = 0x36;\nconstexpr uint8_t G4_SHARP = 0x37;\n\nconstexpr uint8_t A4 = 0x38;\nconstexpr uint8_t A4_SHARP = 0x39;\nconstexpr uint8_t B4 = 0x3A;\nconstexpr uint8_t C5 = 0x3B;\nconstexpr uint8_t C5_SHARP = 0x3C;\nconstexpr uint8_t D5 = 0x3D;\nconstexpr uint8_t D5_SHARP = 0x3E;\n// no more notes!\n\nconstexpr uint8_t NOTE_MASK = 0x3F;\nconstexpr uint8_t SLIDE = 0x80;\nconstexpr uint8_t ACCENT = 0x40;\n\n//\"C\", \"C#\", \"D\", \"D#\", \"E\", \"F\", \"F#\", \"G\", \"G#\", \"A\", \"A#\", \"B\"\n\n// Daft Punk - Da Funk\nconst uint8_t da_funk[16] = {A2_SHARP, F4, D3 | SLIDE, C5, A3_SHARP | SLIDE | ACCENT, G3, F2_SHARP | SLIDE | ACCENT, G3_SHARP,\n                             A4_SHARP | SLIDE, A2, C4 | SLIDE, D4 | SLIDE | ACCENT, F3, D3 | SLIDE, F2 | SLIDE, D3_SHARP | SLIDE};\n\n\n//Copyright, see: https://modwiggler.com/forum/viewtopic.php?t=156515\n\nconst uint8_t x0xb0x_patterns[][16] = {\n    {0xD5,0x15,0xD5,0x15,0x15,0x21,0x95,0x15,0x52,0x55,0x15,0x15,0xE1,0x21,0x95,0x15},      //PAT 00 0 = GGGG GGGG GGGG GGGG  a#_DAS a#_D__ a#_DAS a#_D__ a#_D__ a#____ a#_D_S a#_D__ g _DA_ a#_DA_ a#_D__ a#_D__ a#__AS a#____ a#_D_S a#_D__ \n    {0x97,0x17,0x97,0x17,0x95,0x95,0x95,0x15,0x97,0x97,0x17,0x55,0x15,0xD7,0x17,0x55},      //PAT 00 1 = GGGG GGGG GGGG GGGG  c ___S c ____ c ___S c ____ a#_D_S a#_D_S a#_D_S a#_D__ c ___S c ___S c ____ a#_DA_ a#_D__ c __AS c ____ a#_DA_ \n    {0x1E,0x2D,0xAA,0x28,0xE6,0x58,0xD7,0x64,0xA6,0x1A,0xA8,0xEA,0x21,0x9E,0x97,0xAF},      //PAT 00 2 = GGGG GGGG GGGG GGGG  g ____ a#U___ g U__S f U___ d#U_AS c#__A_ c __AS c#U_A_ d#U__S d#____ f U__S g U_AS a#____ g ___S c ___S C'U__S \n    {0xD7,0x23,0x17,0x17,0x17,0x5A,0x17,0x17,0xA3,0x2F,0x17,0x18,0x17,0x66,0x1A,0x58},      //PAT 00 3 = GGGG GGGG GGGG GGGG  c __AS C'____ c ____ c ____ c ____ d#__A_ c ____ c ____ C'___S C'U___ c ____ c#____ c ____ d#U_A_ d#____ c#__A_ \n    {0xE0,0x00,0x20,0x14,0x00,0x58,0x20,0x14,0x20,0x00,0x20,0xAA,0x00,0x20,0xD8,0x00},      //PAT 00 4 = G-GG -GGG G-GG -GG-  a __AS a ____ a _D__ c#__A_ a ____ a _D__ a ____ a ____ g U__S a ____ c#__AS c#____ c ____ d#U_A_ d#____ c#__A_ \n    {0xDA,0x5A,0x58,0x5A,0x5F,0x5A,0x66,0x5A,0x64,0x5A,0x69,0x5A,0x61,0x64,0x66,0x6A},      //PAT 00 5 = GGGG GGGG GGGG GGGG  d#__AS d#__A_ c#__A_ d#__A_ g#__A_ d#__A_ d#U_A_ d#__A_ c#U_A_ d#__A_ f#U_A_ d#__A_ a#__A_ c#U_A_ d#U_A_ g U_A_ \n    {0x57,0x00,0x17,0x58,0x00,0x17,0x17,0x00,0x57,0x17,0x18,0x17,0x00,0x17,0x17,0x00},      //PAT 00 6 = G-GG -GG- GGGG -GG-  c __A_ c ____ c#__A_ c ____ c ____ c __A_ c ____ c#____ c ____ c ____ c ____ d#__A_ a#__A_ c#U_A_ d#U_A_ g U_A_ \n    {0x0C,0x24,0x0C,0x21,0xAC,0x20,0x4C,0x61,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 00 7 = GGGG GGGG  c#_D__ c#U___ c#_D__ a#____ a U__S a ____ c#_DA_ a#__A_ \n    {0x9E,0x9E,0x1E,0x1E,0x00,0x12,0x1E,0x00,0x21,0x00,0x95,0x15,0x15,0x21,0x00,0x15},      //PAT 01 0 = GGGG -GG- G-GG GG-G  g ___S g ___S g ____ g ____ g _D__ g ____ a#____ a#_D_S a#_D__ a#_D__ a#____ a#_D__ a#__A_ c#U_A_ d#U_A_ g U_A_ \n    {0xE0,0x56,0x16,0xE2,0x60,0x5F,0x11,0x16,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 01 1 = GGGG GGGG  a __AS b _DA_ b _D__ b __AS a __A_ g#__A_ f#_D__ b _D__ \n    {0x16,0x93,0x13,0x16,0x96,0x16,0x13,0x96,0x96,0x16,0x16,0x16,0x13,0xAE,0xAE,0x2E},      //PAT 01 2 = GGGG GGGG GGGG GGGG  b _D__ g#_D_S g#_D__ b _D__ b _D_S b _D__ g#_D__ b _D_S b _D_S b _D__ b _D__ b _D__ g#_D__ b U__S b U__S b U___ \n    {0x9D,0x9D,0x9D,0x5D,0x5D,0x00,0x5D,0xDD,0x1D,0x1D,0x5D,0x11,0xE9,0x29,0x1D,0x11},      //PAT 01 3 = GGGG G-GG GGGG GGGG  f#___S f#___S f#___S f#__A_ f#__A_ f#__A_ f#__AS f#____ f#____ f#__A_ f#_D__ f#U_AS f#U___ f#____ f#_D__ b U___ \n    {0xD1,0xD1,0x00,0x91,0x00,0x00,0xD1,0x5D,0x5D,0x5D,0x00,0x9D,0x00,0x5D,0xDD,0x1D},      //PAT 01 4 = GG-G --GG GG-G -GGG  f#_DAS f#_DAS f#_D_S f#_DAS f#__A_ f#__A_ f#__A_ f#___S f#__A_ f#__AS f#____ f#U_AS f#U___ f#____ f#_D__ b U___ \n    {0xDE,0x5E,0xDE,0xDE,0x5E,0x5E,0x62,0x5E,0x62,0xDE,0x5E,0x22,0xDE,0xDE,0x5E,0x62},      //PAT 01 5 = GGGG GGGG GGGG GGGG  g __AS g __A_ g __AS g __AS g __A_ g __A_ b __A_ g __A_ b __A_ g __AS g __A_ b ____ g __AS g __AS g __A_ b __A_ \n    {0xD4,0x94,0x14,0x94,0xA5,0x25,0xA7,0x27,0x27,0xEA,0x2A,0x25,0xFF,0xFF,0xFF,0xFF},      //PAT 01 6 = GGGG GGGG GGGG  a _DAS a _D_S a _D__ a _D_S d U__S d U___ e U__S e U___ e U___ g U_AS g U___ d U___ \n    {0x91,0x91,0x5D,0xD1,0x11,0x25,0xA6,0x26,0x27,0xEA,0x2A,0x20,0xFF,0xFF,0xFF,0xFF},      //PAT 01 7 = GGGG GGGG GGGG  f#_D_S f#_D_S f#__A_ f#_DAS f#_D__ d U___ d#U__S d#U___ e U___ g U_AS g U___ a ____ \n    {0x23,0x22,0xD7,0x17,0x97,0x17,0xD9,0x19,0x9B,0x1B,0xDC,0x1C,0x9C,0x1C,0xDC,0x1C},      //PAT 02 0 = GGGG GGGG GGGG GGGG  C'____ b ____ c __AS c ____ c ___S c ____ d __AS d ____ e ___S e ____ f __AS f ____ f ___S f ____ f __AS f ____ \n    {0x97,0x17,0xE3,0x23,0xA3,0xA3,0x23,0x2D,0x97,0x17,0x17,0x9E,0xAA,0x17,0x2D,0x2A},      //PAT 02 1 = GGGG GGGG GGGG GGGG  c ___S c ____ C'__AS C'____ C'___S C'___S C'____ a#U___ c ___S c ____ c ____ g ___S g U__S c ____ a#U___ g U___ \n    {0x63,0x63,0x57,0x57,0x23,0xCB,0x4B,0x63,0x23,0xD7,0x0B,0xE3,0x63,0x23,0xAD,0xA3},      //PAT 02 2 = GGGG GGGG GGGG GGGG  C'__A_ C'__A_ c __A_ c __A_ C'____ c _DAS c _DA_ C'__A_ C'____ c __AS c _D__ C'__AS C'__A_ C'____ a#U__S C'___S \n    {0x19,0x19,0xDC,0x1C,0xDC,0x1C,0x1B,0x9C,0x1B,0x1B,0xDC,0x1C,0xDC,0x1C,0x1B,0x9C},      //PAT 02 3 = GGGG GGGG GGGG GGGG  d ____ d ____ f __AS f ____ f __AS f ____ e ____ f ___S e ____ e ____ f __AS f ____ f __AS f ____ e ____ f ___S \n    {0x54,0x20,0x20,0x20,0x14,0x20,0x54,0x20,0x14,0x20,0x12,0x5E,0x2A,0x1E,0x52,0x5E},      //PAT 02 4 = GGGG GGGG GGGG GGGG  a _DA_ a ____ a ____ a ____ a _D__ a ____ a _DA_ a ____ a _D__ a ____ g _D__ g __A_ g U___ g ____ g _DA_ g __A_ \n    {0x96,0x16,0x96,0x16,0x16,0x18,0x1A,0x16,0x96,0x16,0x94,0x94,0xAC,0xAC,0xAC,0x2C},      //PAT 02 5 = GGGG GGGG GGGG GGGG  b _D_S b _D__ b _D_S b _D__ b _D__ c#____ d#____ b _D__ b _D_S b _D__ a _D_S a _D_S a U__S a U__S a U__S a U___ \n    {0x53,0x53,0x53,0x9F,0x93,0x9F,0x93,0x9F,0x8B,0x6C,0xEC,0x6C,0x14,0x6C,0x6C,0x6C},      //PAT 02 6 = GGGG GGGG GGGG GGGG  g#_DA_ g#_DA_ g#_DA_ g#___S g#_D_S g#___S g#_D_S g#___S c _D_S a U_A_ a U_AS a U_A_ a _D__ a U_A_ a U_A_ a U_A_ \n    {0x66,0x29,0x24,0x1C,0x17,0x28,0x19,0x18,0x96,0x9F,0x95,0xA2,0x93,0x15,0x9F,0x9F},      //PAT 02 7 = GGGG GGGG GGGG GGGG  d#U_A_ f#U___ c#U___ f ____ c ____ f U___ d ____ c#____ b _D_S g#___S a#_D_S b ___S g#_D_S a#_D__ g#___S g#___S \n    {0xDA,0x9A,0x1A,0xDA,0x9A,0x1A,0xD8,0x98,0x18,0xDF,0x9F,0x1F,0xDD,0x9D,0x1D,0x00},      //PAT 03 0 = GGGG GGGG GGGG GGG-  d#__AS d#___S d#____ d#__AS d#___S d#____ c#__AS c#___S c#____ g#__AS g#___S g#____ f#__AS f#___S f#____ g#___S \n    {0x55,0x92,0x12,0x12,0x55,0x12,0xD5,0x15,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 03 1 = GGGG GGGG  a#_DA_ g _D_S g _D__ g _D__ a#_DA_ g _D__ a#_DAS a#_D__ \n    {0x14,0x99,0x19,0x17,0x97,0x97,0x17,0x9F,0x9F,0x1F,0x1D,0xA1,0x21,0xE2,0xA2,0x22},      //PAT 03 2 = GGGG GGGG GGGG GGGG  a _D__ d ___S d ____ c ____ c ___S c ___S c ____ g#___S g#___S g#____ f#____ a#___S a#____ b __AS b ___S b ____ \n    {0x97,0x17,0x8B,0xD7,0x23,0x63,0x23,0x23,0xD7,0x23,0x17,0x5C,0x9C,0x25,0x5C,0x5C},      //PAT 03 3 = GGGG GGGG GGGG GGGG  c ___S c ____ c _D_S c __AS C'____ C'__A_ C'____ C'____ c __AS C'____ c ____ f __A_ f ___S d U___ f __A_ f __A_ \n    {0x9C,0x9C,0x1C,0x1C,0x00,0x90,0x10,0x5C,0x5C,0x9A,0x8E,0x1A,0xA6,0x28,0x6B,0x68},      //PAT 03 4 = GGGG -GGG GGGG GGGG  f ___S f ___S f ____ f ____ f _D_S f _D__ f __A_ f __A_ d#___S d#_D_S d#____ d#U__S f U___ g#U_A_ f U_A_ f __A_ \n    {0x63,0xAF,0x2F,0x17,0xEF,0x97,0x0B,0x23,0x1A,0x25,0x6D,0xA6,0x17,0x6D,0x9A,0x26},      //PAT 03 5 = GGGG GGGG GGGG GGGG  C'__A_ C'U__S C'U___ c ____ C'U_AS c ___S c _D__ C'____ d#____ d U___ a#U_A_ d#U__S c ____ a#U_A_ d#___S d#U___ \n    {0x57,0x17,0x0B,0x57,0x2F,0x23,0x57,0x0B,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 03 6 = GGGG GGGG  c __A_ c ____ c _D__ c __A_ C'U___ C'____ c __A_ c _D__ \n    {0x8F,0x5B,0x1B,0x67,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 03 7 = GGGG  e _D_S e __A_ e ____ e U_A_ \n    {0x19,0x00,0x1B,0x1B,0x1B,0x99,0x19,0x94,0x14,0x14,0x14,0x00,0x94,0x14,0x12,0x14},      //PAT 04 0 = G-GG GGGG GGG- GGGG  d ____ e ____ e ____ e ____ d ___S d ____ a _D_S a _D__ a _D__ a _D__ a _D_S a _D__ g _D__ a _D__ d#___S d#U___ \n    {0x9B,0x1B,0x9E,0x1E,0x9E,0x1E,0x1B,0x1E,0x1B,0x1B,0x9B,0x1B,0x1E,0x52,0x1B,0x1E},      //PAT 04 1 = GGGG GGGG GGGG GGGG  e ___S e ____ g ___S g ____ g ___S g ____ e ____ g ____ e ____ e ____ e ___S e ____ g ____ g _DA_ e ____ g ____ \n    {0x1A,0x1A,0x1A,0x1A,0x21,0x24,0x9A,0x1A,0x9A,0x1A,0x26,0x9A,0x1A,0x13,0x98,0x1F},      //PAT 04 2 = GGGG GGGG GGGG GGGG  d#____ d#____ d#____ d#____ a#____ c#U___ d#___S d#____ d#___S d#____ d#U___ d#___S d#____ g#_D__ c#___S g#____ \n    {0x1B,0x20,0x9B,0x1B,0xA7,0xA7,0x27,0xA0,0x20,0x94,0x14,0x1B,0xA0,0xA0,0xA0,0x20},      //PAT 04 3 = GGGG GGGG GGGG GGGG  e ____ a ____ e ___S e ____ e U__S e U__S e U___ a ___S a ____ a _D_S a _D__ e ____ a ___S a ___S a ___S a ____ \n    {0xD4,0x14,0xE0,0x20,0xD9,0x99,0x99,0x19,0xD9,0x99,0x19,0xD4,0x14,0xE5,0x25,0x14},      //PAT 04 4 = GGGG GGGG GGGG GGGG  a _DAS a _D__ a __AS a ____ d __AS d ___S d ___S d ____ d __AS d ___S d ____ a _DAS a _D__ d U_AS d U___ a _D__ \n    {0x57,0x17,0x9C,0x1C,0x97,0x17,0xD7,0x17,0x1C,0x1C,0x97,0x17,0xE3,0x23,0xDC,0x1C},      //PAT 04 5 = GGGG GGGG GGGG GGGG  c __A_ c ____ f ___S f ____ c ___S c ____ c __AS c ____ f ____ f ____ c ___S c ____ C'__AS C'____ f __AS f ____ \n    {0xD7,0x17,0x17,0xE3,0xA3,0xA3,0x23,0xD7,0x97,0x97,0x97,0x17,0xA3,0x23,0xA3,0x23},      //PAT 04 6 = GGGG GGGG GGGG GGGG  c __AS c ____ c ____ C'__AS C'___S C'___S C'____ c __AS c ___S c ___S c ___S c ____ C'___S C'____ C'___S C'____ \n    {0xEE,0x2E,0x28,0x6E,0xAF,0xAE,0xAF,0x1C,0x16,0x60,0xE0,0x20,0x22,0x22,0x96,0x16},      //PAT 04 7 = GGGG GGGG GGGG GGGG  b U_AS b U___ f U___ b U_A_ C'U__S b U__S C'U__S f ____ b _D__ a __A_ a __AS a ____ b ____ b ____ b _D_S b _D__ \n    {0x1E,0x20,0x20,0x1E,0x1E,0x20,0x2C,0x24,0x1E,0x9E,0xA0,0x14,0x97,0x17,0x9E,0x1E},      //PAT 05 0 = GGGG GGGG GGGG GGGG  g ____ a ____ a ____ g ____ g ____ a ____ a U___ c#U___ g ____ g ___S a ___S a _D__ c ___S c ____ g ___S g ____ \n    {0x12,0x52,0xD7,0x97,0x97,0x17,0xD7,0x97,0x97,0x17,0xD7,0x17,0xD9,0x19,0x00,0x00},      //PAT 05 1 = GGGG GGGG GGGG GG--  g _D__ g _DA_ c __AS c ___S c ___S c ____ c __AS c ___S c ___S c ____ c __AS c ____ d __AS d ____ g ___S g ____ \n    {0x14,0x14,0x20,0x20,0x10,0x10,0xA0,0x20,0x20,0x00,0x14,0xD4,0x14,0x14,0xD4,0x14},      //PAT 05 2 = GGGG GGGG G-GG GGGG  a _D__ a _D__ a ____ a ____ f _D__ f _D__ a ___S a ____ a ____ a _D__ a _DAS a _D__ a _D__ a _DAS a _D__ g ____ \n    {0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x9A,0x1A,0xE1,0x21,0xDF,0x1F,0x1A,0x1A,0x5A,0x1A},      //PAT 05 3 = GGGG GGGG GGGG GGGG  d#____ d#____ d#____ d#____ d#____ d#____ d#___S d#____ a#__AS a#____ g#__AS g#____ d#____ d#____ d#__A_ d#____ \n    {0x57,0x16,0xA2,0x22,0x16,0x94,0x16,0x14,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 05 4 = GGGG GGGG  c __A_ b _D__ b ___S b ____ b _D__ a _D_S b _D__ a _D__ \n    {0xE8,0x28,0x68,0xE8,0xA8,0xA8,0x8C,0x8C,0x8C,0x8C,0x8F,0x8F,0x0F,0x1B,0x9D,0x1D},      //PAT 05 5 = GGGG GGGG GGGG GGGG  f U_AS f U___ f U_A_ f U_AS f U__S f U__S c#_D_S c#_D_S c#_D_S c#_D_S e _D_S e _D_S e _D__ e ____ f#___S f#____ \n    {0xD1,0x91,0x91,0x8F,0x8D,0x0B,0x9B,0x9B,0x9B,0x1B,0xDD,0x1D,0xDD,0x9D,0x9D,0x1D},      //PAT 05 6 = GGGG GGGG GGGG GGGG  f#_DAS f#_D_S f#_D_S e _D_S d _D_S c _D__ e ___S e ___S e ___S e ____ f#__AS f#____ f#__AS f#___S f#___S f#____ \n    {0x98,0x18,0x98,0x18,0x9C,0x1C,0x18,0x1C,0x98,0x18,0x98,0x18,0x9C,0x1C,0x18,0x5C},      //PAT 05 7 = GGGG GGGG GGGG GGGG  c#___S c#____ c#___S c#____ f ___S f ____ c#____ f ____ c#___S c#____ c#___S c#____ f ___S f ____ c#____ f __A_ \n    {0x99,0x19,0x19,0x19,0xEF,0x2F,0x19,0x0D,0xAF,0x2F,0x19,0x0D,0x57,0x59,0x59,0x59},      //PAT 06 0 = GGGG GGGG GGGG GGGG  d ___S d ____ d ____ d ____ C'U_AS C'U___ d ____ d _D__ C'U__S C'U___ d ____ d _D__ c __A_ d __A_ d __A_ d __A_ \n    {0xD2,0x12,0x1E,0xDE,0x1E,0xDE,0x1E,0x1E,0x92,0x9E,0x9E,0x9E,0x12,0x9E,0x1E,0x12},      //PAT 06 1 = GGGG GGGG GGGG GGGG  g _DAS g _D__ g ____ g __AS g ____ g __AS g ____ g ____ g _D_S g ___S g ___S g ___S g _D__ g ___S g ____ g _D__ \n    {0x99,0x19,0x99,0x19,0xD7,0x17,0x57,0x17,0xE3,0x23,0xA3,0x17,0x63,0x23,0x65,0x25},      //PAT 06 2 = GGGG GGGG GGGG GGGG  d ___S d ____ d ___S d ____ c __AS c ____ c __A_ c ____ C'__AS C'____ C'___S c ____ C'__A_ C'____ d U_A_ d U___ \n    {0x1E,0x1E,0x1E,0x1E,0xDE,0x9E,0x99,0x99,0x92,0x92,0x92,0x92,0x92,0x8F,0x8F,0x5E},      //PAT 06 3 = GGGG GGGG GGGG GGGG  g ____ g ____ g ____ g ____ g __AS g ___S d ___S d ___S g _D_S g _D_S g _D_S g _D_S g _D_S e _D_S e _D_S g __A_ \n    {0x92,0x12,0x9E,0x1E,0x1E,0x92,0x12,0x1E,0x9E,0x1E,0x9E,0x1E,0x92,0x92,0x9E,0x1E},      //PAT 06 4 = GGGG GGGG GGGG GGGG  g _D_S g _D__ g ___S g ____ g ____ g _D_S g _D__ g ____ g ___S g ____ g ___S g ____ g _D_S g _D_S g ___S g ____ \n    {0x1E,0x1C,0x9E,0x1E,0x9E,0x1E,0x1C,0x9E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 06 5 = GGGG GGGG  g ____ f ____ g ___S g ____ g ___S g ____ f ____ g ___S \n    {0xA4,0x24,0x2F,0xAA,0x1E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 06 6 = GGGG G c#U__S c#U___ C'U___ g U__S g ____ \n    {0x20,0x22,0x8F,0x8F,0xA3,0x23,0xDF,0x9F,0x8F,0x8F,0x29,0xAB,0x2B,0x29,0xA8,0x0F},      //PAT 06 7 = GGGG GGGG GGGG GGGG  a ____ b ____ e _D_S e _D_S C'___S C'____ g#__AS g#___S e _D_S e _D_S f#U___ g#U__S g#U___ f#U___ f U__S e _D__ \n    {0x24,0x96,0x16,0x97,0x97,0x17,0x00,0x1B,0x1B,0x1C,0x2B,0x29,0x28,0xA9,0xA9,0x29},      //PAT 07 0 = GGGG GG-G GGGG GGGG  c#U___ b _D_S b _D__ c ___S c ___S c ____ e ____ e ____ f ____ g#U___ f#U___ f U___ f#U__S f#U__S f#U___ e _D__ \n    {0x9F,0x9F,0x9F,0x1F,0x97,0x17,0x97,0x17,0x99,0x19,0x99,0x19,0x2B,0xAB,0xAB,0xAB},      //PAT 07 1 = GGGG GGGG GGGG GGGG  g#___S g#___S g#___S g#____ c ___S c ____ c ___S c ____ d ___S d ____ d ___S d ____ g#U___ g#U__S g#U__S g#U__S \n    {0x94,0x94,0x97,0x17,0xDC,0x1C,0xDA,0x1A,0x9C,0x9C,0x9C,0x1C,0x1A,0x9E,0xDE,0x1C},      //PAT 07 2 = GGGG GGGG GGGG GGGG  a _D_S a _D_S c ___S c ____ f __AS f ____ d#__AS d#____ f ___S f ___S f ___S f ____ d#____ g ___S g __AS f ____ \n    {0xA6,0xA6,0x16,0x1A,0x26,0xA7,0x18,0xA0,0x90,0x10,0x17,0x14,0x91,0x91,0x94,0x94},      //PAT 07 3 = GGGG GGGG GGGG GGGG  d#U__S d#U__S b _D__ d#____ d#U___ e U__S c#____ a ___S f _D_S f _D__ c ____ a _D__ f#_D_S f#_D_S a _D_S a _D_S \n    {0x8E,0x0E,0x18,0x9A,0x1A,0x98,0x18,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 07 4 = GGGG GGGG  d#_D_S d#_D__ c#____ d#___S d#____ c#___S c#____ g#____ \n    {0x1B,0x99,0x19,0x1B,0x99,0x19,0x1B,0x99,0x19,0x1B,0x99,0x19,0xFF,0xFF,0xFF,0xFF},      //PAT 07 5 = GGGG GGGG GGGG  e ____ d ___S d ____ e ____ d ___S d ____ e ____ d ___S d ____ e ____ d ___S d ____ \n    {0x67,0x67,0xA7,0x27,0xE7,0x27,0x67,0x27,0x9B,0x9B,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F},      //PAT 07 6 = GGGG GGGG GGGG GGGG  e U_A_ e U_A_ e U__S e U___ e U_AS e U___ e U_A_ e U___ e ___S e ___S e _D_S e _D_S e _D_S e _D_S e _D_S e _D_S \n    {0x00,0xA0,0xA0,0x20,0x00,0x00,0x57,0x00,0x20,0x00,0x20,0x00,0x20,0x25,0x67,0x2A},      //PAT 14 0 = -GGG --G- G-G- GGGG  a ___S a ___S a ____ c __A_ a ____ a ____ a ____ d U___ e U_A_ g U___ e _D_S e _D_S e _D_S e _D_S e _D_S e _D_S \n    {0x00,0x5E,0x00,0x21,0x00,0x00,0x00,0x21,0x00,0xAD,0x2D,0x2D,0x1F,0x00,0x2D,0x00},      //PAT 14 1 = -G-G ---G -GGG G-G-  g __A_ a#____ a#____ a#U__S a#U___ a#U___ g#____ a#U___ e U_A_ g U___ e _D_S e _D_S e _D_S e _D_S e _D_S e _D_S \n    {0xD9,0x19,0x58,0x59,0x5E,0x59,0x65,0x59,0x64,0x59,0x68,0x59,0x60,0x64,0x65,0x64},      //PAT 15 0 = GGGG GGGG GGGG GGGG  d __AS d ____ c#__A_ d __A_ g __A_ d __A_ d U_A_ d __A_ c#U_A_ d __A_ f U_A_ d __A_ a __A_ c#U_A_ d U_A_ c#U_A_ \n    {0x9E,0x12,0x9E,0x9E,0x1E,0x1E,0x22,0x1E,0x22,0x9E,0x1E,0x22,0x9E,0x9E,0x1E,0x22},      //PAT 15 1 = GGGG GGGG GGGG GGGG  g ___S g _D__ g ___S g ___S g ____ g ____ b ____ g ____ b ____ g ___S g ____ b ____ g ___S g ___S g ____ b ____ \n    {0x17,0xA4,0x97,0x17,0xA7,0x9B,0x1B,0x1A,0xA6,0xA4,0x1A,0x1A,0x1A,0x1A,0x1B,0x17},      //PAT 15 2 = GGGG GGGG GGGG GGGG  c ____ c#U__S c ___S c ____ e U__S e ___S e ____ d#____ d#U__S c#U__S d#____ d#____ d#____ d#____ e ____ c ____ \n    {0x18,0x18,0x17,0x0B,0x24,0x17,0x29,0x0B,0x1D,0x17,0x18,0x18,0x17,0x17,0x18,0x18},      //PAT 15 3 = GGGG GGGG GGGG GGGG  c#____ c#____ c ____ c _D__ c#U___ c ____ f#U___ c _D__ f#____ c ____ c#____ c#____ c ____ c ____ c#____ c#____ \n    {0x1C,0x9D,0x1D,0x1D,0xA9,0x18,0xA9,0xA8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 15 4 = GGGG GGGG  f ____ f#___S f#____ f#____ f#U__S c#____ f#U__S f U__S \n    {0x26,0x25,0x24,0x25,0xA7,0x9B,0x1B,0xA6,0x98,0x26,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},      //PAT 15 5 = GGGG GGGG GG d#U___ d U___ c#U___ d U___ e U__S e ___S e ____ d#U__S c#___S d#U___ \n    {0x95,0x15,0xA1,0x21,0x90,0x10,0x9C,0x1C,0x9F,0x1F,0x1C,0x9F,0x1F,0x1C,0xA1,0x21},      //PAT 15 6 = GGGG GGGG GGGG GGGG  a#_D_S a#_D__ a#___S a#____ f _D_S f _D__ f ___S f ____ g#___S g#____ f ____ g#___S g#____ f ____ a#___S a#____ \n    {0xA1,0x21,0xA1,0x21,0xA1,0x21,0x99,0x19,0x9A,0x1A,0x9B,0x1B,0x9C,0x1C,0x9C,0x9C},      //PAT 15 7 = GGGG GGGG GGGG GGGG  a#___S a#____ a#___S a#____ a#___S a#____ d ___S d ____ d#___S d#____ e ___S e ____ f ___S f ____ f ___S f ___S \n\n    // --- GENERATED BY CHATGPT - ADDITIONAL ACID PATTERNS ---\n\n    {0xD5,0x95,0x15,0xA5,0x15,0xD7,0x97,0x17,0xD5,0x95,0x15,0xA5,0x17,0x97,0xD5,0x15}, // PAT 16 0 – Acid Tracks style rolling A#\n    {0x9E,0x1E,0x9E,0xDE,0x1E,0x9E,0x92,0x12,0x9E,0x1E,0x9E,0xDE,0x92,0x12,0x9E,0x1E}, // PAT 16 1 – Wink style G minor pulse\n    {0xA3,0x23,0xE3,0x63,0x23,0xA3,0x2F,0xAF,0xA3,0x23,0xE3,0x63,0xAF,0x2F,0x23,0xA3}, // PAT 16 2 – Hardfloor octave bounce\n    {0x1A,0x9A,0xDA,0x5A,0x1A,0x9A,0xD8,0x98,0x1A,0x9A,0xDA,0x5A,0x98,0x18,0x1A,0x9A}, // PAT 16 3 – Armando style D# riff\n    {0x97,0x17,0x57,0x17,0x97,0xD7,0x17,0x97,0x17,0x57,0x17,0x97,0xD7,0x17,0x97,0x17}, // PAT 17 0 – Pierre style C loop\n    {0xE8,0xA8,0x68,0xE8,0x8C,0x8C,0x8F,0x0F,0xE8,0xA8,0x68,0xE8,0x8F,0x0F,0x8C,0x8C}, // PAT 17 1 – Plastikman low F grind\n    {0x12,0x92,0x12,0xDE,0x1E,0x92,0x12,0x1E,0x12,0x92,0x12,0xDE,0x92,0x12,0x1E,0x12}, // PAT 17 2 – Minimal G modulation\n    {0x63,0x23,0xD7,0x97,0x23,0x63,0xA3,0x23,0x63,0x23,0xD7,0x97,0xA3,0x23,0x63,0x23}, // PAT 17 3 – C/C' octave stab\n    {0x95,0x15,0xA1,0x21,0x90,0x10,0x9C,0x1C,0x9F,0x1F,0x1C,0x9F,0x1F,0x1C,0xA1,0x21}, // PAT 18 0 – Descending acid phrase\n    {0x1E,0x1C,0x9E,0x1E,0x9E,0x1E,0x1C,0x9E,0x1E,0x1C,0x9E,0x1E,0x9E,0x1E,0x1C,0x9E}, // PAT 18 1 – G / F toggle\n    {0xA6,0x26,0xA7,0x27,0xA6,0x26,0xA8,0x28,0xA6,0x26,0xA7,0x27,0x28,0xA8,0x26,0xA6}, // PAT 18 2 – D# rising octave drive\n    {0x99,0x19,0xEF,0x2F,0x19,0x0D,0xAF,0x2F,0x19,0x0D,0xEF,0x2F,0x19,0x0D,0xAF,0x2F}, // PAT 18 3 – Acid Tracks breakdown echo\n    {0xD4,0x14,0xE0,0x20,0xD9,0x99,0x19,0xD9,0xD4,0x14,0xE5,0x25,0x14,0x99,0x19,0xD9}, // PAT 19 0 – Classic A/D interplay\n    {0x8F,0x8F,0xA3,0x23,0xDF,0x9F,0x8F,0x8F,0x29,0xAB,0x2B,0x29,0xA8,0x0F,0x8F,0x8F}, // PAT 19 1 – Dark late-night acid\n    {0x24,0x96,0x16,0x97,0x17,0x00,0x1B,0x1C,0x2B,0x29,0x28,0xA9,0x29,0x17,0x96,0x24}, // PAT 19 2 – Mixed register phrase\n    {0x9F,0x97,0x99,0x2B,0xAB,0x9F,0x97,0x99,0x2B,0xAB,0x9F,0x97,0x99,0x2B,0xAB,0x9F}, // PAT 19 3 – Peak-time loop\n    {0x97,0x17,0xD7,0x17,0x57,0x17,0x97,0x17,0xD7,0x17,0x57,0x17,0x97,0x17,0xD7,0x17}, // PAT 19 4 – rolling C acid loop\n    {0x1E,0x9E,0xDE,0x9E,0x1E,0x92,0x12,0x1E,0x9E,0xDE,0x9E,0x1E,0x92,0x12,0x1E,0x9E}, // PAT 19 5 – G minor tension phrase\n    {0xA3,0x23,0x63,0x23,0xE3,0x23,0xA3,0x2F,0xAF,0x23,0x63,0x23,0xE3,0x2F,0x23,0xA3}, // PAT 19 6 – octave stab drive\n    {0xDA,0x9A,0x1A,0xD8,0x98,0x18,0xDF,0x9F,0x1F,0xDD,0x9D,0x1D,0xDA,0x9A,0x1A,0x00}, // PAT 19 7 – descending D# acid\n    {0xE8,0x68,0xA8,0x8C,0x8F,0x0F,0xE8,0x68,0xA8,0x8F,0x0F,0x8C,0xE8,0x68,0xA8,0x8F}, // PAT 20 0 – low F grind\n    {0x12,0x92,0x1E,0xDE,0x92,0x12,0x1E,0x12,0x92,0x1E,0xDE,0x92,0x12,0x1E,0x12,0x92}, // PAT 20 1 – minimal G modulation\n    {0x63,0x23,0x57,0x17,0xD7,0x97,0x23,0x63,0xA3,0x23,0x57,0x17,0xD7,0x97,0x23,0x63}, // PAT 20 2 – C / C' bounce\n    {0x95,0x15,0xA1,0x21,0x90,0x10,0x9C,0x1C,0x9F,0x1F,0x1C,0x9F,0x1F,0x1C,0xA1,0x21}, // PAT 20 3 – descending acid sweep\n    {0x1A,0x1A,0x9A,0xDA,0x5A,0x1A,0xD8,0x98,0x1A,0x9A,0xDA,0x5A,0x98,0x18,0x1A,0x9A}, // PAT 20 4 – D# driving riff\n    {0x9F,0x97,0x17,0x99,0x19,0x2B,0xAB,0x9F,0x97,0x17,0x99,0x19,0x2B,0xAB,0x9F,0x97}, // PAT 20 5 – peak-time loop\n    {0x24,0x96,0x16,0x97,0x17,0x1B,0x1C,0x2B,0x29,0x28,0xA9,0x29,0x17,0x96,0x24,0x00}, // PAT 20 6 – mixed register closer\n};"
  },
  {
    "path": "lib/msfa/aligned_buf.h",
    "content": "/*\r\n * Copyright 2013 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n// A convenient wrapper for buffers with alignment constraints\r\n\r\n// Note that if we were on C++11, we'd use aligned_storage or somesuch.\r\n\r\n#ifndef __ALIGNED_BUF_H\r\n#define __ALIGNED_BUF_H\r\n\r\n#include<stddef.h>\r\n\r\ntemplate<typename T, size_t size, size_t alignment = 16>\r\nclass AlignedBuf {\r\n public:\r\n  T *get() {\r\n    return (T *)((((intptr_t)storage_) + alignment - 1) & -alignment);\r\n  }\r\n private:\r\n  unsigned char storage_[size * sizeof(T) + alignment];\r\n};\r\n\r\n#endif  // __ALIGNED_BUF_H\r\n"
  },
  {
    "path": "lib/msfa/controllers.h",
    "content": "/*\n   Copyright 2013 Google Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n#ifndef __CONTROLLERS_H\n#define __CONTROLLERS_H\n\n#include \"synth.h\"\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#define MIDI_CONTROLLER_MODE_MAX 2\n\n// State of MIDI controllers\nconst int kControllerPitch = 0;\nconst int kControllerPitchRange = 1;\nconst int kControllerPitchStep = 2;\n\nclass FmCore;\n\nclass FmMod {\n  public:\n    uint8_t range;\n    bool pitch;\n    bool amp;\n    bool eg;\n    uint8_t ctrl_mode;\n    uint8_t _dummy_;\n\n    FmMod()\n    {\n      range = 0;\n      ctrl_mode = 0;\n      pitch = false;\n      amp = false;\n      eg = false;\n    }\n\n    void setRange(uint8_t r)\n    {\n      range = r < 0 && r > 99 ? 0 : r;\n    }\n\n    void setTarget(uint8_t assign)\n    {\n      assign = assign < 0 && assign > 7 ? 0 : assign;\n      pitch = assign & 1; // PITCH\n      amp = assign & 2; // AMP\n      eg = assign & 4; // EG\n    }\n\n    void setMode(uint8_t m)\n    {\n      ctrl_mode = m > MIDI_CONTROLLER_MODE_MAX ? 0 : m;\n    }\n};\n\nclass Controllers {\n    void applyMod(int cc, FmMod &mod)\n    {\n      uint8_t total = 0;\n      float range = mod.range / 100.f;\n\n      switch (mod.ctrl_mode)\n      {\n        case 0:\n          total = uint8_t(float(cc) * range); // LINEAR mode\n          break;\n        case 1:\n          total = uint8_t(127.f * range - (float(cc) * range)); // REVERSE mode\n          break;\n        case 2:\n          total = uint8_t(range * float(cc) + (1.f - range) * 127.f); // DIRECT BC mode by Thierry (opus.quatre)\n          break;\n      }\n\n      if (mod.amp)\n        amp_mod = max(amp_mod, total);\n\n      if (mod.pitch)\n        pitch_mod = max(pitch_mod, total);\n\n      if (mod.eg)\n        eg_mod = max(eg_mod, total);\n    }\n\n  public:\n    int32_t values_[3];\n\n    uint8_t amp_mod;\n    uint8_t pitch_mod;\n    uint8_t eg_mod;\n\n    uint8_t aftertouch_cc;\n    uint8_t breath_cc;\n    uint8_t foot_cc;\n    uint8_t modwheel_cc;\n    int masterTune;\n\n    uint8_t opSwitch;\n\n    FmMod wheel;\n    FmMod foot;\n    FmMod breath;\n    FmMod at;\n\n    Controllers() {\n      amp_mod = 0;\n      pitch_mod = 0;\n      eg_mod = 0;\n    }\n\n    void refresh() {\n      amp_mod = pitch_mod = eg_mod = 0;\n\n      applyMod(modwheel_cc, wheel);\n      applyMod(breath_cc, breath);\n      applyMod(foot_cc, foot);\n      applyMod(aftertouch_cc, at);\n\n      if ( ! ((wheel.eg || foot.eg) || (breath.eg || at.eg)) )\n        eg_mod = 127;\n    }\n};\n\n#endif  // __CONTROLLERS_H\n"
  },
  {
    "path": "lib/msfa/doc/origin.url",
    "content": "https://github.com/google/music-synthesizer-for-android/tree/master/app/src/main/jni\nhttps://github.com/asb2m10/dexed/tree/master/Source/msfa\nhttps://codeberg.org/dcoredump/MicroDexed\nhttps://github.com/mmontag/dx7-synth-js/blob/master/src/sysex-dx7.js\nhttps://github.com/pichenettes/plaits-editor/blob/main/six_op_processor.js"
  },
  {
    "path": "lib/msfa/dx7note.cc",
    "content": "/*\n   Copyright 2016-2017 Pascal Gauthier.\n   Copyright 2012 Google Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n#include <math.h>\n#include <stdlib.h>\n#include \"synth.h\"\n#include \"freqlut.h\"\n#include \"porta.h\"\n#include \"exp2.h\"\n#include \"controllers.h\"\n#include \"dx7note.h\"\n\nconst int FEEDBACK_BITDEPTH = 8;\n\nint32_t midinote_to_logfreq(int midinote) {\n  //const int32_t base = 50857777;  // (1 << 24) * (log(440) / log(2) - 69/12)\n  const int32_t base = 50857777;  // (1 << 24) * (LOG_FUNC(440) / LOG_FUNC(2) - 69/12)\n  const int32_t step = (1 << 24) / 12;\n  return base + step * midinote;\n}\n\nint32_t logfreq_round2semi(int freq) {\n  const int base = 50857777;  // (1 << 24) * (log(440) / log(2) - 69/12)\n  const int step = (1 << 24) / 12;\n  const int rem = (freq - base) % step;\n  return freq - rem;\n}\n\nconst int32_t coarsemul[] = {\n  -16777216, 0, 16777216, 26591258, 33554432, 38955489, 43368474, 47099600,\n  50331648, 53182516, 55732705, 58039632, 60145690, 62083076, 63876816,\n  65546747, 67108864, 68576247, 69959732, 71268397, 72509921, 73690858,\n  74816848, 75892776, 76922906, 77910978, 78860292, 79773775, 80654032,\n  81503396, 82323963, 83117622\n};\n\nint32_t osc_freq(int midinote, int mode, int coarse, int fine, int detune) {\n  // TODO: pitch randomization\n  int32_t logfreq;\n  if (mode == 0) {\n    logfreq = midinote_to_logfreq(midinote);\n    // could use more precision, closer enough for now. those numbers comes from my DX7\n    //FRAC_NUM detuneRatio = 0.0209 * exp(-0.396 * (((float)logfreq) / (1 << 24))) / 7;\n    float detuneRatio = 0.0209f * expf(-0.396f * (((float)logfreq) / (1 << 24))) / 7;\n    logfreq += detuneRatio * logfreq * (detune - 7);\n\n    logfreq += coarsemul[coarse & 31];\n    if (fine) {\n      // (1 << 24) / log(2)\n      //logfreq += (int32_t)floor(24204406.323123 * log(1 + 0.01 * fine) + 0.5);\n      logfreq += (int32_t)floor(24204406.323123 * log(1 + 0.01 * fine) + 0.5);\n    }\n\n    // // This was measured at 7.213Hz per count at 9600Hz, but the exact\n    // // value is somewhat dependent on midinote. Close enough for now.\n    // //logfreq += 12606 * (detune -7);\n  } else {\n    // ((1 << 24) * log(10) / log(2) * .01) << 3\n    logfreq = (4458616 * ((coarse & 3) * 100 + fine)) >> 3;\n    logfreq += detune > 7 ? 13457 * (detune - 7) : 0;\n  }\n  return logfreq;\n}\n\nconst uint8_t velocity_data[64] = {\n  0, 70, 86, 97, 106, 114, 121, 126, 132, 138, 142, 148, 152, 156, 160, 163,\n  166, 170, 173, 174, 178, 181, 184, 186, 189, 190, 194, 196, 198, 200, 202,\n  205, 206, 209, 211, 214, 216, 218, 220, 222, 224, 225, 227, 229, 230, 232,\n  233, 235, 237, 238, 240, 241, 242, 243, 244, 246, 246, 248, 249, 250, 251,\n  252, 253, 254\n};\n\n// See \"velocity\" section of notes. Returns velocity delta in microsteps.\nint ScaleVelocity(int velocity, int sensitivity) {\n  int clamped_vel = max(0, min(127, velocity));\n  int vel_value = velocity_data[clamped_vel >> 1] - 239;\n  int scaled_vel = ((sensitivity * vel_value + 7) >> 3) << 4;\n  return scaled_vel;\n}\n\nint ScaleRate(int midinote, int sensitivity) {\n  int x = min(31, max(0, midinote / 3 - 7));\n  int qratedelta = (sensitivity * x) >> 3;\n#ifdef SUPER_PRECISE\n  int rem = x & 7;\n  if (sensitivity == 3 && rem == 3) {\n    qratedelta -= 1;\n  } else if (sensitivity == 7 && rem > 0 && rem < 4) {\n    qratedelta += 1;\n  }\n#endif\n  return qratedelta;\n}\n\nconst uint8_t exp_scale_data[] = {\n  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 16, 19, 23, 27, 33, 39, 47, 56, 66,\n  80, 94, 110, 126, 142, 158, 174, 190, 206, 222, 238, 250\n};\n\nint ScaleCurve(int group, int depth, int curve) {\n  int scale;\n  if (curve == 0 || curve == 3) {\n    // linear\n    scale = (group * depth * 329) >> 12;\n  } else {\n    // exponential\n    int n_scale_data = sizeof(exp_scale_data);\n    int raw_exp = exp_scale_data[min(group, n_scale_data - 1)];\n    scale = (raw_exp * depth * 329) >> 15;\n  }\n  if (curve < 2) {\n    scale = -scale;\n  }\n  return scale;\n}\n\nint ScaleLevel(int midinote, int break_pt, int left_depth, int right_depth,\n               int left_curve, int right_curve) {\n  int offset = midinote - break_pt - 17;\n  if (offset >= 0) {\n    return ScaleCurve((offset + 1) / 3, right_depth, right_curve);\n  } else {\n    return ScaleCurve(-(offset - 1) / 3, left_depth, left_curve);\n  }\n}\n\nstatic const uint8_t pitchmodsenstab[] = {\n  0, 10, 20, 33, 55, 92, 153, 255\n};\n\n// 0, 66, 109, 255\nstatic const uint32_t ampmodsenstab[] = {\n  0, 4342338, 7171437, 16777216\n};\n\nDx7Note::Dx7Note() {\n  for (int op = 0; op < 6; op++) {\n    params_[op].phase = 0;\n    params_[op].gain_out = 0;\n  }\n}\n\n//void Dx7Note::init(const uint8_t patch[156], int midinote, int velocity) {\nvoid Dx7Note::init(const uint8_t patch[156], int midinote, int velocity) {\n  int rates[4];\n  int levels[4];\n  for (int op = 0; op < 6; op++) {\n    int off = op * 21;\n    for (int i = 0; i < 4; i++) {\n      rates[i] = patch[off + i];\n      levels[i] = patch[off + 4 + i];\n    }\n    int outlevel = patch[off + 16];\n    outlevel = Env::scaleoutlevel(outlevel);\n    int level_scaling = ScaleLevel(midinote, patch[off + 8], patch[off + 9],\n                                   patch[off + 10], patch[off + 11], patch[off + 12]);\n    outlevel += level_scaling;\n    outlevel = min(127, outlevel);\n    outlevel = outlevel << 5;\n    outlevel += ScaleVelocity(velocity, patch[off + 15]);\n    outlevel = max(0, outlevel);\n    int rate_scaling = ScaleRate(midinote, patch[off + 13]);\n    env_[op].init(rates, levels, outlevel, rate_scaling);\n\n    int mode = patch[off + 17];\n    int coarse = patch[off + 18];\n    int fine = patch[off + 19];\n    int detune = patch[off + 20];\n    int32_t freq = osc_freq(midinote, mode, coarse, fine, detune);\n    opMode[op] = mode;\n    basepitch_[op] = freq;\n    ampmodsens_[op] = ampmodsenstab[patch[off + 14] & 3];\n  }\n  for (int i = 0; i < 4; i++) {\n    rates[i] = patch[126 + i];\n    levels[i] = patch[130 + i];\n  }\n  pitchenv_.set(rates, levels);\n  algorithm_ = patch[134];\n  int feedback = patch[135];\n  fb_shift_ = feedback != 0 ? FEEDBACK_BITDEPTH - feedback : 16;\n  pitchmoddepth_ = (patch[139] * 165) >> 6;\n  pitchmodsens_ = pitchmodsenstab[patch[143] & 7];\n  ampmoddepth_ = (patch[140] * 165) >> 6;\n}\n\nvoid Dx7Note::compute(int32_t *buf, FmCore *core, int32_t lfo_val, int32_t lfo_delay, const Controllers *ctrls) {\n  // ==== PITCH ====\n  uint32_t pmd = pitchmoddepth_ * lfo_delay;  // Q32\n  int32_t senslfo = pitchmodsens_ * (lfo_val - (1 << 23));\n  int32_t pmod_1 = (((int64_t) pmd) * (int64_t) senslfo) >> 39;\n  pmod_1 = abs(pmod_1);\n  int32_t pmod_2 = (int32_t)(((int64_t)ctrls->pitch_mod * (int64_t)senslfo) >> 14);\n  pmod_2 = abs(pmod_2);\n  int32_t pitch_mod = max(pmod_1, pmod_2);\n  pitch_mod = pitchenv_.getsample() + (pitch_mod * (senslfo < 0 ? -1 : 1));\n\n  // ---- PITCH BEND ----\n  int pitchbend = ctrls->values_[kControllerPitch];\n  int32_t pb = (pitchbend - 0x2000);\n  if (pb != 0) {\n    if (ctrls->values_[kControllerPitchStep] == 0) {\n      pb = ((float) (pb << 11)) * ((float) ctrls->values_[kControllerPitchRange]) / 12.0f;\n    } else {\n      int stp = 12 / ctrls->values_[kControllerPitchStep];\n      pb = pb * stp / 8191;\n      pb = (pb * (8191 / stp)) << 11;\n    }\n  }\n  int32_t pitch_base = pb + ctrls->masterTune;\n  pitch_mod += pitch_base;\n\n  // ==== AMP MOD ====\n  lfo_val = (1 << 24) - lfo_val;\n  uint32_t amod_1 = (uint32_t)(((int64_t) ampmoddepth_ * (int64_t) lfo_delay) >> 8); // Q24 :D\n  amod_1 = (uint32_t)(((int64_t) amod_1 * (int64_t) lfo_val) >> 24);\n  uint32_t amod_2 = (uint32_t)(((int64_t) ctrls->amp_mod * (int64_t) lfo_val) >> 7); // Q?? :|\n  uint32_t amd_mod = max(amod_1, amod_2);\n\n  // ==== EG AMP MOD ====\n  uint32_t amod_3 = (ctrls->eg_mod + 1) << 17;\n  amd_mod = max((1 << 24) - amod_3, amd_mod);\n\n  // ==== OP RENDER ====\n  for (int op = 0; op < 6; op++) {\n    // if ( ctrls->opSwitch[op] == '0' )  {\n    if (!(ctrls->opSwitch & (1 << op)))  {\n      env_[op].getsample(); // advance the envelop even if it is not playing\n      params_[op].level_in = 0;\n    } else {\n      //int32_t gain = pow(2, 10 + level * (1.0 / (1 << 24)));\n\n      int32_t basepitch = basepitch_[op];\n\n      if ( opMode[op] )\n        params_[op].freq = Freqlut::lookup(basepitch + pitch_base);\n      else {\n        params_[op].freq = Freqlut::lookup(basepitch + pitch_mod);\n      }\n\n      int32_t level = env_[op].getsample();\n      if (ampmodsens_[op] != 0) {\n        uint32_t sensamp = (uint32_t)(((uint64_t) amd_mod) * ((uint64_t) ampmodsens_[op]) >> 24);\n\n        // TODO: mehhh.. this needs some real tuning.\n        //uint32_t pt = exp(((float)sensamp) / 262144 * 0.07 + 12.2);\n        uint32_t pt = expf(((float)sensamp) / 262144 * 0.07f + 12.2f);\n        uint32_t ldiff = (uint32_t)(((uint64_t)level) * (((uint64_t)pt << 4)) >> 28);\n        level -= ldiff;\n      }\n      params_[op].level_in = level;\n    }\n  }\n\n  core->render(buf, params_, algorithm_, fb_buf_, fb_shift_);\n}\n\nvoid Dx7Note::keyup() {\n  for (int op = 0; op < 6; op++) {\n    env_[op].keydown(false);\n  }\n  pitchenv_.keydown(false);\n}\n\nvoid Dx7Note::update(const uint8_t patch[156], int midinote, int velocity) {\n  int rates[4];\n  int levels[4];\n  for (int op = 0; op < 6; op++) {\n    int off = op * 21;\n    int mode = patch[off + 17];\n    int coarse = patch[off + 18];\n    int fine = patch[off + 19];\n    int detune = patch[off + 20];\n    int32_t freq = osc_freq(midinote, mode, coarse, fine, detune);\n    basepitch_[op] = freq;\n    ampmodsens_[op] = ampmodsenstab[patch[off + 14] & 3];\n    opMode[op] = mode;\n\n    for (int i = 0; i < 4; i++) {\n      rates[i] = patch[off + i];\n      levels[i] = patch[off + 4 + i];\n    }\n    int outlevel = patch[off + 16];\n    outlevel = Env::scaleoutlevel(outlevel);\n    int level_scaling = ScaleLevel(midinote, patch[off + 8], patch[off + 9],\n                                   patch[off + 10], patch[off + 11], patch[off + 12]);\n    outlevel += level_scaling;\n    outlevel = min(127, outlevel);\n    outlevel = outlevel << 5;\n    outlevel += ScaleVelocity(velocity, patch[off + 15]);\n    outlevel = max(0, outlevel);\n    int rate_scaling = ScaleRate(midinote, patch[off + 13]);\n    env_[op].update(rates, levels, outlevel, rate_scaling);\n  }\n  algorithm_ = patch[134];\n  int feedback = patch[135];\n  fb_shift_ = feedback != 0 ? FEEDBACK_BITDEPTH - feedback : 16;\n  pitchmoddepth_ = (patch[139] * 165) >> 6;\n  pitchmodsens_ = pitchmodsenstab[patch[143] & 7];\n  ampmoddepth_ = (patch[140] * 165) >> 6;\n}\n\nvoid Dx7Note::peekVoiceStatus(VoiceStatus &status) {\n  for (int i = 0; i < 6; i++) {\n    status.amp[i] = Exp2::lookup(params_[i].level_in - (14 * (1 << 24)));\n    env_[i].getPosition(&status.ampStep[i]);\n  }\n  pitchenv_.getPosition(&status.pitchStep);\n}\n\n/**\n   Used in monophonic mode to transfer voice state from different notes\n*/\nvoid Dx7Note::transferState(Dx7Note &src) {\n  for (int i = 0; i < 6; i++) {\n    env_[i].transfer(src.env_[i]);\n    params_[i].gain_out = src.params_[i].gain_out;\n    params_[i].phase = src.params_[i].phase;\n  }\n}\n\nvoid Dx7Note::transferSignal(Dx7Note &src) {\n  for (int i = 0; i < 6; i++) {\n    params_[i].gain_out = src.params_[i].gain_out;\n    params_[i].phase = src.params_[i].phase;\n  }\n}\n\nvoid Dx7Note::oscSync() {\n  for (int i = 0; i < 6; i++) {\n    params_[i].gain_out = 0;\n    params_[i].phase = 0;\n  }\n}\n"
  },
  {
    "path": "lib/msfa/dx7note.h",
    "content": "/*\n   Copyright 2016-2017 Pascal Gauthier.\n   Copyright 2012 Google Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n#ifndef SYNTH_DX7NOTE_H_\n#define SYNTH_DX7NOTE_H_\n\n// This is the logic to put together a note from the MIDI description\n// and run the low-level modules.\n\n// It will continue to evolve a bit, as note-stealing logic, scaling,\n// and real-time control of parameters live here.\n\n#include \"env.h\"\n#include \"pitchenv.h\"\n#include \"fm_core.h\"\n\nstruct VoiceStatus {\n  uint32_t amp[6];\n  char ampStep[6];\n  char pitchStep;\n};\n\nclass Dx7Note {\n  public:\n    Dx7Note();\n    void init(const uint8_t patch[156], int midinote, int velocity);\n\n    // Note: this _adds_ to the buffer. Interesting question whether it's\n    // worth it...\n    void compute(int32_t *buf, FmCore *core, int32_t lfo_val, int32_t lfo_delay, const Controllers *ctrls);\n\n    void keyup();\n\n    // TODO: some way of indicating end-of-note. Maybe should be a return\n    // value from the compute method? (Having a count return from keyup\n    // is also tempting, but if there's a dynamic parameter change after\n    // keyup, that won't work.\n\n    // PG:add the update\n    void update(const uint8_t patch[156], int midinote, int velocity);\n    void peekVoiceStatus(VoiceStatus &status);\n    void transferState(Dx7Note& src);\n    void transferSignal(Dx7Note &src);\n    void oscSync();\n\n  private:\n    Env env_[6];\n    FmOpParams params_[6];\n    PitchEnv pitchenv_;\n    int32_t basepitch_[6];\n    int32_t fb_buf_[2];\n    int32_t fb_shift_;\n    int32_t ampmodsens_[6];\n    int32_t opMode[6];\n\n    int ampmoddepth_;\n    int algorithm_;\n    int pitchmoddepth_;\n    int pitchmodsens_;\n};\n\n#endif  // SYNTH_DX7NOTE_H_\n"
  },
  {
    "path": "lib/msfa/env.cc",
    "content": "/*\r\n * Copyright 2017 Pascal Gauthier.\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#include <math.h>\r\n\r\n#include \"synth.h\"\r\n#include \"env.h\"\r\n\r\n//using namespace std;\r\n\r\nuint32_t Env::sr_multiplier = (1<<24);\r\n\r\nconst int levellut[] = {\r\n    0, 5, 9, 13, 17, 20, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 42, 43, 45, 46\r\n};\r\n\r\n#ifdef ACCURATE_ENVELOPE\r\nconst int statics[] = {\r\n    1764000, 1764000, 1411200, 1411200, 1190700, 1014300, 992250,\r\n    882000, 705600, 705600, 584325, 507150, 502740, 441000, 418950,\r\n    352800, 308700, 286650, 253575, 220500, 220500, 176400, 145530,\r\n    145530, 125685, 110250, 110250, 88200, 88200, 74970, 61740,\r\n    61740, 55125, 48510, 44100, 37485, 31311, 30870, 27562, 27562,\r\n    22050, 18522, 17640, 15435, 14112, 13230, 11025, 9261, 9261, 7717,\r\n    6615, 6615, 5512, 5512, 4410, 3969, 3969, 3439, 2866, 2690, 2249,\r\n    1984, 1896, 1808, 1411, 1367, 1234, 1146, 926, 837, 837, 705,\r\n    573, 573, 529, 441, 441\r\n    // and so on, I stopped measuring after R=76 (needs to be double-checked anyway)\r\n};\r\n#endif\r\n\r\nvoid Env::init_sr(double sampleRate) {\r\n    sr_multiplier = (44100.0 / sampleRate) * (1<<24);\r\n}\r\n\r\nvoid Env::init(const int r[4], const int l[4], int ol, int rate_scaling) {\r\n    for (int i = 0; i < 4; i++) {\r\n        rates_[i] = r[i];\r\n        levels_[i] = l[i];\r\n    }\r\n    outlevel_ = ol;\r\n    rate_scaling_ = rate_scaling;\r\n    level_ = 0;\r\n    down_ = true;\r\n    advance(0);\r\n}\r\n\r\nint32_t Env::getsample() {\r\n#ifdef ACCURATE_ENVELOPE\r\n    if (staticcount_) {\r\n        staticcount_ -= N;\r\n        if (staticcount_ <= 0) {\r\n            staticcount_ = 0;\r\n            advance(ix_ + 1);\r\n        }\r\n    }\r\n#endif\r\n\r\n    if (ix_ < 3 || ((ix_ < 4) && !down_)) {\r\n        if (staticcount_) {\r\n            ;\r\n        }\r\n        else if (rising_) {\r\n            const int jumptarget = 1716;\r\n            if (level_ < (jumptarget << 16)) {\r\n                level_ = jumptarget << 16;\r\n            }\r\n            level_ += (((17 << 24) - level_) >> 24) * inc_;\r\n            // TODO: should probably be more accurate when inc is large\r\n            if (level_ >= targetlevel_) {\r\n                level_ = targetlevel_;\r\n                advance(ix_ + 1);\r\n            }\r\n        }\r\n        else {  // !rising\r\n            level_ -= inc_;\r\n            if (level_ <= targetlevel_) {\r\n                level_ = targetlevel_;\r\n                advance(ix_ + 1);\r\n            }\r\n        }\r\n    }\r\n    // TODO: this would be a good place to set level to 0 when under threshold\r\n    return level_;\r\n}\r\n\r\nvoid Env::keydown(bool d) {\r\n    if (down_ != d) {\r\n        down_ = d;\r\n        advance(d ? 0 : 3);\r\n    }\r\n}\r\n\r\nint Env::scaleoutlevel(int outlevel) {\r\n    return outlevel >= 20 ? 28 + outlevel : levellut[outlevel];\r\n}\r\n\r\nvoid Env::advance(int newix) {\r\n    ix_ = newix;\r\n    if (ix_ < 4) {\r\n        int newlevel = levels_[ix_];\r\n        int actuallevel = scaleoutlevel(newlevel) >> 1;\r\n        actuallevel = (actuallevel << 6) + outlevel_ - 4256;\r\n        actuallevel = actuallevel < 16 ? 16 : actuallevel;\r\n        // level here is same as Java impl\r\n        targetlevel_ = actuallevel << 16;\r\n        rising_ = (targetlevel_ > level_);\r\n\r\n        // rate\r\n        int qrate = (rates_[ix_] * 41) >> 6;\r\n        qrate += rate_scaling_;\r\n        qrate = min(qrate, 63);\r\n\r\n#ifdef ACCURATE_ENVELOPE\r\n        if (targetlevel_ == level_ || (ix_ == 0 && newlevel == 0)) {\r\n            // approximate number of samples at 44.100 kHz to achieve the time\r\n            // empirically gathered using 2 TF1s, could probably use some double-checking\r\n            // and cleanup, but it's pretty close for now.\r\n            int staticrate = rates_[ix_];\r\n            staticrate += rate_scaling_; // needs to be checked, as well, but seems correct\r\n            staticrate = min(staticrate, 99);\r\n            staticcount_ = staticrate < 77 ? statics[staticrate] : 20 * (99 - staticrate);\r\n            if (staticrate < 77 && (ix_ == 0 && newlevel == 0)) {\r\n                staticcount_ /= 20; // attack is scaled faster\r\n            }\r\n            staticcount_ = (int)(((int64_t)staticcount_ * (int64_t)sr_multiplier) >> 24);\r\n        }\r\n        else {\r\n            staticcount_ = 0;\r\n        }\r\n#endif\r\n        inc_ = (4 + (qrate & 3)) << (2 + LG_N + (qrate >> 2));\r\n        // meh, this should be fixed elsewhere\r\n        inc_ = (int)(((int64_t)inc_ * (int64_t)sr_multiplier) >> 24);\r\n    }\r\n}\r\n\r\nvoid Env::update(const int r[4], const int l[4], int ol, int rate_scaling) {\r\n    for (int i = 0; i < 4; i++) {\r\n        rates_[i] = r[i];\r\n        levels_[i] = l[i];\r\n    }\r\n    outlevel_ = ol;\r\n    rate_scaling_ = rate_scaling;\r\n    if ( down_ ) {\r\n        // for now we simply reset ourselves at level 3\r\n        int newlevel = levels_[2];\r\n        int actuallevel = scaleoutlevel(newlevel) >> 1;\r\n        actuallevel = (actuallevel << 6) - 4256;\r\n        actuallevel = actuallevel < 16 ? 16 : actuallevel;\r\n        targetlevel_ = actuallevel << 16;\r\n        advance(2);\r\n    }\r\n}\r\n\r\nvoid Env::getPosition(char *step) {\r\n    *step = ix_;\r\n}\r\n\r\nvoid Env::transfer(Env &src) {\r\n    for(int i=0;i<4;i++) {\r\n        rates_[i] = src.rates_[i];\r\n        levels_[i] = src.levels_[i];\r\n    }\r\n    outlevel_ = src.outlevel_;\r\n    rate_scaling_ = src.rate_scaling_;\r\n    level_ = src.level_;\r\n    targetlevel_ = src.targetlevel_;\r\n    rising_= src.rising_;\r\n    ix_ = src.ix_;\r\n    down_ = src.down_;\r\n#ifdef ACCURATE_ENVELOPE\r\n    staticcount_ = src.staticcount_;\r\n#endif\r\n    inc_ = src.inc_;\r\n}\r\n\r\n"
  },
  {
    "path": "lib/msfa/env.h",
    "content": "/*\n * Copyright 2017 Pascal Gauthier. \n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef __ENV_H\n#define __ENV_H\n\n#include \"synth.h\"\n\n// DX7 envelope generation\n\n#define ACCURATE_ENVELOPE\n\nclass Env {\n public:\n\n  // The rates and levels arrays are calibrated to match the Dx7 parameters\n  // (ie, value 0..99). The outlevel parameter is calibrated in microsteps\n  // (ie units of approx .023 dB), with 99 * 32 = nominal full scale. The\n  // rate_scaling parameter is in qRate units (ie 0..63).\n  void init(const int rates[4], const int levels[4], int outlevel,\n      int rate_scaling);\n\n  void update(const int rates[4], const int levels[4], int outlevel,\n      int rate_scaling);\n  // Result is in Q24/doubling log format. Also, result is subsampled\n  // for every N samples.\n  // A couple more things need to happen for this to be used as a gain\n  // value. First, the # of outputs scaling needs to be applied. Also,\n  // modulation.\n  // Then, of course, log to linear.\n  int32_t getsample();\n\n  void keydown(bool down);\n  static int scaleoutlevel(int outlevel);\n  void getPosition(char *step);\n    \n  static void init_sr(double sample_rate);\n  void transfer(Env &src);\n    \n private:\n\n  // PG: This code is normalized to 44100, need to put a multiplier\n  // if we are not using 44100.\n  static uint32_t sr_multiplier;\n\n  int rates_[4];\n  int levels_[4];\n  int outlevel_;\n  int rate_scaling_;\n  // Level is stored so that 2^24 is one doubling, ie 16 more bits than\n  // the DX7 itself (fraction is stored in level rather than separate\n  // counter)\n  int32_t level_;\n  int targetlevel_;\n  bool rising_;\n  int ix_;\n  int inc_;\n#ifdef ACCURATE_ENVELOPE\n  int staticcount_;\n#endif\n\n  bool down_;\n\n  void advance(int newix);\n};\n\n#endif  // __ENV_H\n\n"
  },
  {
    "path": "lib/msfa/exp2.cc",
    "content": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <math.h>\n\n#include \"synth.h\"\n#include \"exp2.h\"\n\n#if 1 //eh2k\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nconst int32_t exp2tab[2048] FLASHMEM = {\n  727064,1073741824,727555,1074468888,728049,1075196443,728541,1075924492,729035,1076653033,729529,1077382068,730022,1078111597,730517,1078841619,731011,1079572136,731507,1080303147,732002,1081034654,\n  732497,1081766656,732993,1082499153,733490,1083232146,733986,1083965636,734484,1084699622,734981,1085434106,735478,1086169087,735976,1086904565,736475,1087640541,736974,1088377016,737472,1089113990,\n  737972,1089851462,738472,1090589434,738971,1091327906,739472,1092066877,739973,1092806349,740474,1093546322,740975,1094286796,741477,1095027771,741979,1095769248,742481,1096511227,742985,1097253708,\n  743487,1097996693,743990,1098740180,744495,1099484170,744999,1100228665,745503,1100973664,746007,1101719167,746513,1102465174,747019,1103211687,747524,1103958706,748031,1104706230,748537,1105454261,\n  749044,1106202798,749551,1106951842,750058,1107701393,750567,1108451451,751075,1109202018,751583,1109953093,752092,1110704676,752602,1111456768,753111,1112209370,753621,1112962481,754131,1113716102,\n  754642,1114470233,755153,1115224875,755664,1115980028,756176,1116735692,756688,1117491868,757201,1118248556,757713,1119005757,758226,1119763470,758740,1120521696,759253,1121280436,759768,1122039689,\n  760282,1122799457,760797,1123559739,761312,1124320536,761827,1125081848,762343,1125843675,762860,1126606018,763376,1127368878,763893,1128132254,764410,1128896147,764928,1129660557,765446,1130425485,\n  765964,1131190931,766483,1131956895,767001,1132723378,767521,1133490379,768041,1134257900,768561,1135025941,769081,1135794502,769603,1136563583,770123,1137333186,770644,1138103309,771167,1138873953,\n  771689,1139645120,772211,1140416809,772734,1141189020,773257,1141961754,773781,1142735011,774305,1143508792,774829,1144283097,775354,1145057926,775879,1145833280,776404,1146609159,776930,1147385563,\n  777456,1148162493,777983,1148939949,778509,1149717932,779037,1150496441,779564,1151275478,780092,1152055042,780620,1152835134,781148,1153615754,781678,1154396902,782207,1155178580,782736,1155960787,\n  783267,1156743523,783797,1157526790,784327,1158310587,784859,1159094914,785390,1159879773,785922,1160665163,786454,1161451085,786987,1162237539,787520,1163024526,788053,1163812046,788586,1164600099,\n  789121,1165388685,789654,1166177806,790190,1166967460,790724,1167757650,791260,1168548374,791796,1169339634,792332,1170131430,792868,1170923762,793406,1171716630,793942,1172510036,794480,1173303978,\n  795018,1174098458,795557,1174893476,796095,1175689033,796634,1176485128,797174,1177281762,797713,1178078936,798254,1178876649,798794,1179674903,799335,1180473697,799876,1181273032,800418,1182072908,\n  800960,1182873326,801502,1183674286,802045,1184475788,802588,1185277833,803131,1186080421,803676,1186883552,804219,1187687228,804764,1188491447,805309,1189296211,805854,1190101520,806400,1190907374,\n  806946,1191713774,807493,1192520720,808039,1193328213,808586,1194136252,809134,1194944838,809682,1195753972,810230,1196563654,810778,1197373884,811328,1198184662,811877,1198995990,812427,1199807867,\n  812976,1200620294,813528,1201433270,814078,1202246798,814629,1203060876,815181,1203875505,815733,1204690686,816286,1205506419,816838,1206322705,817391,1207139543,817945,1207956934,818499,1208774879,\n  819052,1209593378,819608,1210412430,820162,1211232038,820718,1212052200,821273,1212872918,821830,1213694191,822386,1214516021,822943,1215338407,823500,1216161350,824058,1216984850,824616,1217808908,\n  825174,1218633524,825733,1219458698,826292,1220284431,826851,1221110723,827412,1221937574,827972,1222764986,828532,1223592958,829093,1224421490,829655,1225250583,830217,1226080238,830778,1226910455,\n  831342,1227741233,831904,1228572575,832467,1229404479,833031,1230236946,833596,1231069977,834159,1231903573,834725,1232737732,835290,1233572457,835855,1234407747,836422,1235243602,836987,1236080024,\n  837555,1236917011,838121,1237754566,838689,1238592687,839257,1239431376,839826,1240270633,840394,1241110459,840963,1241950853,841532,1242791816,842103,1243633348,842672,1244475451,843243,1245318123,\n  843814,1246161366,844386,1247005180,844957,1247849566,845529,1248694523,846102,1249540052,846675,1250386154,847248,1251232829,847822,1252080077,848396,1252927899,848971,1253776295,849545,1254625266,\n  850120,1255474811,850697,1256324931,851272,1257175628,851848,1258026900,852426,1258878748,853003,1259731174,853580,1260584177,854158,1261437757,854737,1262291915,855315,1263146652,855894,1264001967,\n  856475,1264857861,857054,1265714336,857634,1266571390,858215,1267429024,858796,1268287239,859378,1269146035,859960,1270005413,860542,1270865373,861124,1271725915,861708,1272587039,862291,1273448747,\n  862875,1274311038,863460,1275173913,864044,1276037373,864629,1276901417,865215,1277766046,865800,1278631261,866387,1279497061,866973,1280363448,867561,1281230421,868147,1282097982,868736,1282966129,\n  869324,1283834865,869913,1284704189,870502,1285574102,871091,1286444604,871681,1287315695,872271,1288187376,872862,1289059647,873453,1289932509,874044,1290805962,874636,1291680006,875228,1292554642,\n  875822,1293429870,876414,1294305692,877007,1295182106,877602,1296059113,878195,1296936715,878791,1297814910,879385,1298693701,879981,1299573086,880576,1300453067,881173,1301333643,881770,1302214816,\n  882367,1303096586,882964,1303978953,883562,1304861917,884160,1305745479,884759,1306629639,885358,1307514398,885958,1308399756,886558,1309285714,887158,1310172272,887758,1311059430,888360,1311947188,\n  888961,1312835548,889563,1313724509,890166,1314614072,890768,1315504238,891372,1316395006,891975,1317286378,892579,1318178353,893183,1319070932,893788,1319964115,894394,1320857903,894999,1321752297,\n  895605,1322647296,896211,1323542901,896819,1324439112,897425,1325335931,898034,1326233356,898641,1327131390,899250,1328030031,899859,1328929281,900468,1329829140,901078,1330729608,901688,1331630686,\n  902298,1332532374,902910,1333434672,903521,1334337582,904132,1335241103,904745,1336145235,905358,1337049980,905971,1337955338,906584,1338861309,907198,1339767893,907812,1340675091,908427,1341582903,\n  909042,1342491330,909658,1343400372,910273,1344310030,910890,1345220303,911507,1346131193,912124,1347042700,912741,1347954824,913360,1348867565,913978,1349780925,914597,1350694903,915216,1351609500,\n  915836,1352524716,916457,1353440552,917076,1354357009,917698,1355274085,918319,1356191783,918941,1357110102,919563,1358029043,920186,1358948606,920809,1359868792,921432,1360789601,922057,1361711033,\n  922680,1362633090,923306,1363555770,923930,1364479076,924557,1365403006,925182,1366327563,925809,1367252745,926435,1368178554,927063,1369104989,927691,1370032052,928319,1370959743,928948,1371888062,\n  929576,1372817010,930206,1373746586,930836,1374676792,931466,1375607628,932097,1376539094,932728,1377471191,933360,1378403919,933991,1379337279,934624,1380271270,935257,1381205894,935890,1382141151,\n  936524,1383077041,937158,1384013565,937793,1384950723,938428,1385888516,939063,1386826944,939699,1387766007,940335,1388705706,940972,1389646041,941609,1390587013,942247,1391528622,942885,1392470869,\n  943523,1393413754,944162,1394357277,944801,1395301439,945442,1396246240,946081,1397191682,946722,1398137763,947363,1399084485,948005,1400031848,948646,1400979853,949289,1401928499,949931,1402877788,\n  950575,1403827719,951219,1404778294,951862,1405729513,952507,1406681375,953153,1407633882,953797,1408587035,954443,1409540832,955090,1410495275,955736,1411450365,956384,1412406101,957031,1413362485,\n  957679,1414319516,958328,1415277195,958976,1416235523,959626,1417194499,960276,1418154125,960926,1419114401,961576,1420075327,962228,1421036903,962879,1421999131,963532,1422962010,964183,1423925542,\n  964837,1424889725,965490,1425854562,966144,1426820052,966797,1427786196,967453,1428752993,968107,1429720446,968764,1430688553,969419,1431657317,970075,1432626736,970733,1433596811,971389,1434567544,\n  972048,1435538933,972706,1436510981,973364,1437483687,974023,1438457051,974683,1439431074,975343,1440405757,976004,1441381100,976664,1442357104,977325,1443333768,977988,1444311093,978649,1445289081,\n  979313,1446267730,979975,1447247043,980639,1448227018,981303,1449207657,981967,1450188960,982633,1451170927,983298,1452153560,983963,1453136858,984630,1454120821,985297,1455105451,985963,1456090748,\n  986632,1457076711,987299,1458063343,987968,1459050642,988637,1460038610,989306,1461027247,989977,1462016553,990646,1463006530,991318,1463997176,991988,1464988494,992661,1465980482,993332,1466973143,\n  994005,1467966475,994679,1468960480,995351,1469955159,996026,1470950510,996700,1471946536,997375,1472943236,998051,1473940611,998726,1474938662,999403,1475937388,1000079,1476936791,1000756,1477936870,\n  1001434,1478937626,1002112,1479939060,1002791,1480941172,1003470,1481943963,1004149,1482947433,1004829,1483951582,1005510,1484956411,1006190,1485961921,1006872,1486968111,1007554,1487974983,1008235,1488982537,\n  1008919,1489990772,1009602,1490999691,1010285,1492009293,1010969,1493019578,1011654,1494030547,1012339,1495042201,1013025,1496054540,1013710,1497067565,1014397,1498081275,1015083,1499095672,1015771,1500110755,\n  1016459,1501126526,1017147,1502142985,1017836,1503160132,1018525,1504177968,1019215,1505196493,1019905,1506215708,1020596,1507235613,1021286,1508256209,1021978,1509277495,1022670,1510299473,1023363,1511322143,\n  1024055,1512345506,1024749,1513369561,1025443,1514394310,1026138,1515419753,1026832,1516445891,1027527,1517472723,1028223,1518500250,1028919,1519528473,1029617,1520557392,1030313,1521587009,1031011,1522617322,\n  1031709,1523648333,1032407,1524680042,1033107,1525712449,1033806,1526745556,1034507,1527779362,1035207,1528813869,1035907,1529849076,1036610,1530884983,1037311,1531921593,1038013,1532958904,1038717,1533996917,\n  1039419,1535035634,1040124,1536075053,1040828,1537115177,1041532,1538156005,1042238,1539197537,1042944,1540239775,1043650,1541282719,1044356,1542326369,1045064,1543370725,1045771,1544415789,1046480,1545461560,\n  1047188,1546508040,1047897,1547555228,1048607,1548603125,1049316,1549651732,1050028,1550701048,1050738,1551751076,1051450,1552801814,1052161,1553853264,1052875,1554905425,1053587,1555958300,1054300,1557011887,\n  1055015,1558066187,1055729,1559121202,1056443,1560176931,1057159,1561233374,1057875,1562290533,1058591,1563348408,1059308,1564406999,1060026,1565466307,1060743,1566526333,1061461,1567587076,1062180,1568648537,\n  1062899,1569710717,1063619,1570773616,1064340,1571837235,1065060,1572901575,1065781,1573966635,1066503,1575032416,1067224,1576098919,1067948,1577166143,1068671,1578234091,1069394,1579302762,1070119,1580372156,\n  1070843,1581442275,1071568,1582513118,1072294,1583584686,1073020,1584656980,1073746,1585730000,1074474,1586803746,1075201,1587878220,1075929,1588953421,1076658,1590029350,1077386,1591106008,1078116,1592183394,\n  1078847,1593261510,1079577,1594340357,1080307,1595419934,1081040,1596500241,1081771,1597581281,1082504,1598663052,1083237,1599745556,1083970,1600828793,1084704,1601912763,1085439,1602997467,1086174,1604082906,\n  1086909,1605169080,1087645,1606255989,1088382,1607343634,1089119,1608432016,1089856,1609521135,1090594,1610610991,1091333,1611701585,1092071,1612792918,1092811,1613884989,1093551,1614977800,1094292,1616071351,\n  1095032,1617165643,1095774,1618260675,1096516,1619356449,1097259,1620452965,1098001,1621550224,1098745,1622648225,1099489,1623746970,1100233,1624846459,1100979,1625946692,1101724,1627047671,1102470,1628149395,\n  1103216,1629251865,1103963,1630355081,1104711,1631459044,1105459,1632563755,1106208,1633669214,1106957,1634775422,1107706,1635882379,1108456,1636990085,1109207,1638098541,1109958,1639207748,1110709,1640317706,\n  1111462,1641428415,1112214,1642539877,1112967,1643652091,1113721,1644765058,1114475,1645878779,1115230,1646993254,1115985,1648108484,1116740,1649224469,1117497,1650341209,1118253,1651458706,1119011,1652576959,\n  1119768,1653695970,1120527,1654815738,1121285,1655936265,1122044,1657057550,1122805,1658179594,1123564,1659302399,1124326,1660425963,1125086,1661550289,1125849,1662675375,1126611,1663801224,1127374,1664927835,\n  1128137,1666055209,1128901,1667183346,1129665,1668312247,1130430,1669441912,1131196,1670572342,1131962,1671703538,1132728,1672835500,1133496,1673968228,1134262,1675101724,1135031,1676235986,1135800,1677371017,\n  1136568,1678506817,1137338,1679643385,1138108,1680780723,1138879,1681918831,1139650,1683057710,1140422,1684197360,1141194,1685337782,1141967,1686478976,1142740,1687620943,1143513,1688763683,1144288,1689907196,\n  1145063,1691051484,1145838,1692196547,1146615,1693342385,1147390,1694489000,1148167,1695636390,1148945,1696784557,1149723,1697933502,1150502,1699083225,1151280,1700233727,1152060,1701385007,1152840,1702537067,\n  1153621,1703689907,1154402,1704843528,1155183,1705997930,1155966,1707153113,1156749,1708309079,1157531,1709465828,1158316,1710623359,1159100,1711781675,1159885,1712940775,1160670,1714100660,1161456,1715261330,\n  1162243,1716422786,1163029,1717585029,1163817,1718748058,1164605,1719911875,1165394,1721076480,1166183,1722241874,1166972,1723408057,1167763,1724575029,1168553,1725742792,1169345,1726911345,1170137,1728080690,\n  1170928,1729250827,1171722,1730421755,1172515,1731593477,1173309,1732765992,1174104,1733939301,1174898,1735113405,1175694,1736288303,1176491,1737463997,1177286,1738640488,1178084,1739817774,1178882,1740995858,\n  1179680,1742174740,1180479,1743354420,1181278,1744534899,1182078,1745716177,1182878,1746898255,1183680,1748081133,1184481,1749264813,1185283,1750449294,1186085,1751634577,1186889,1752820662,1187692,1754007551,\n  1188497,1755195243,1189301,1756383740,1190107,1757573041,1190912,1758763148,1191719,1759954060,1192526,1761145779,1193333,1762338305,1194142,1763531638,1194950,1764725780,1195759,1765920730,1196569,1767116489,\n  1197379,1768313058,1198190,1769510437,1199001,1770708627,1199813,1771907628,1200625,1773107441,1201439,1774308066,1202252,1775509505,1203066,1776711757,1203881,1777914823,1204695,1779118704,1205512,1780323399,\n  1206328,1781528911,1207145,1782735239,1207962,1783942384,1208780,1785150346,1209598,1786359126,1210418,1787568724,1211237,1788779142,1212058,1789990379,1212878,1791202437,1213699,1792415315,1214522,1793629014,\n  1215343,1794843536,1216167,1796058879,1216990,1797275046,1217814,1798492036,1218639,1799709850,1219464,1800928489,1220290,1802147953,1221116,1803368243,1221942,1804589359,1222771,1805811301,1223598,1807034072,\n  1224427,1808257670,1225256,1809482097,1226085,1810707353,1226916,1811933438,1227746,1813160354,1228578,1814388100,1229410,1815616678,1230242,1816846088,1231076,1818076330,1231908,1819307406,1232743,1820539314,\n  1233578,1821772057,1234413,1823005635,1235249,1824240048,1236086,1825475297,1236922,1826711383,1237760,1827948305,1238598,1829186065,1239437,1830424663,1240276,1831664100,1241115,1832904376,1241957,1834145491,\n  1242797,1835387448,1243638,1836630245,1244481,1837873883,1245324,1839118364,1246167,1840363688,1247010,1841609855,1247855,1842856865,1248700,1844104720,1249545,1845353420,1250392,1846602965,1251238,1847853357,\n  1252086,1849104595,1252933,1850356681,1253782,1851609614,1254630,1852863396,1255481,1854118026,1256330,1855373507,1257181,1856629837,1258032,1857887018,1258884,1859145050,1259737,1860403934,1260590,1861663671,\n  1261443,1862924261,1262297,1864185704,1263152,1865448001,1264008,1866711153,1264863,1867975161,1265720,1869240024,1266577,1870505744,1267434,1871772321,1268293,1873039755,1269151,1874308048,1270011,1875577199,\n  1270871,1876847210,1271732,1878118081,1272592,1879389813,1273454,1880662405,1274317,1881935859,1275179,1883210176,1276043,1884485355,1276907,1885761398,1277772,1887038305,1278636,1888316077,1279503,1889594713,\n  1280369,1890874216,1281236,1892154585,1282103,1893435821,1282972,1894717924,1283840,1896000896,1284710,1897284736,1285580,1898569446,1286450,1899855026,1287321,1901141476,1288193,1902428797,1289065,1903716990,\n  1289938,1905006055,1290812,1906295993,1291685,1907586805,1292561,1908878490,1293435,1910171051,1294311,1911464486,1295188,1912758797,1296065,1914053985,1296942,1915350050,1297821,1916646992,1298699,1917944813,\n  1299579,1919243512,1300458,1920543091,1301340,1921843549,1302220,1923144889,1303102,1924447109,1303985,1925750211,1304867,1927054196,1305751,1928359063,1306636,1929664814,1307520,1930971450,1308405,1932278970,\n  1309291,1933587375,1310178,1934896666,1311065,1936206844,1311953,1937517909,1312842,1938829862,1313730,1940142704,1314619,1941456434,1315510,1942771053,1316401,1944086563,1317292,1945402964,1318184,1946720256,\n  1319077,1948038440,1319970,1949357517,1320863,1950677487,1321758,1951998350,1322653,1953320108,1323549,1954642761,1324445,1955966310,1325341,1957290755,1326239,1958616096,1327137,1959942335,1328036,1961269472,\n  1328935,1962597508,1329835,1963926443,1330735,1965256278,1331637,1966587013,1332538,1967918650,1333440,1969251188,1334344,1970584628,1335247,1971918972,1336151,1973254219,1337055,1974590370,1337961,1975927425,\n  1338867,1977265386,1339774,1978604253,1340681,1979944027,1341589,1981284708,1342497,1982626297,1343406,1983968794,1344316,1985312200,1345226,1986656516,1346137,1988001742,1347048,1989347879,1347961,1990694927,\n  1348873,1992042888,1349787,1993391761,1350701,1994741548,1351615,1996092249,1352531,1997443864,1353446,1998796395,1354363,2000149841,1355280,2001504204,1356198,2002859484,1357116,2004215682,1358034,2005572798,\n  1358955,2006930832,1359875,2008289787,1360795,2009649662,1361717,2011010457,1362639,2012372174,1363562,2013734813,1364485,2015098375,1365408,2016462860,1366334,2017828268,1367258,2019194602,1368185,2020561860,\n  1369111,2021930045,1370038,2023299156,1370965,2024669194,1371894,2026040159,1372823,2027412053,1373753,2028784876,1374683,2030158629,1375613,2031533312,1376545,2032908925,1377477,2034285470,1378410,2035662947,\n  1379343,2037041357,1380278,2038420700,1381211,2039800978,1382148,2041182189,1383083,2042564337,1384019,2043947420,1384957,2045331439,1385894,2046716396,1386833,2048102290,1387772,2049489123,1388712,2050876895,\n  1389652,2052265607,1390593,2053655259,1391535,2055045852,1392476,2056437387,1393420,2057829863,1394363,2059223283,1395308,2060617646,1396252,2062012954,1397198,2063409206,1398144,2064806404,1399090,2066204548,\n  1400038,2067603638,1400986,2069003676,1401935,2070404662,1402883,2071806597,1403834,2073209480,1404785,2074613314,1405735,2076018099,1406688,2077423834,1407639,2078830522,1408594,2080238161,1409546,2081646755,\n  1410502,2083056301,1411456,2084466803,1412412,2085878259,1413369,2087290671,1414326,2088704040,1415283,2090118366,1416242,2091533649,1417200,2092949891,1418160,2094367091,1419121,2095785251,1420081,2097204372,\n  1421043,2098624453,1422006,2100045496,1422968,2101467502,1423932,2102890470,1424895,2104314402,1425861,2105739297,1426826,2107165158,1427793,2108591984,1428759,2110019777,1429726,2111448536,1430695,2112878262,\n  1431664,2114308957,1432633,2115740621,1433603,2117173254,1434573,2118606857,1435545,2120041430,1436518,2121476975,1437489,2122913493,1438464,2124350982,1439437,2125789446,1440412,2127228883,1441387,2128669295,\n  1442364,2130110682,1443340,2131553046,1444317,2132996386,1445295,2134440703,1446274,2135885998,1447253,2137332272,1448234,2138779525,1449214,2140227759,1450195,2141676973,1451177,2143127168,1452160,2144578345,\n  1453143,2146030505,\n  };\n\nvoid Exp2::init() {}\n  \nconst int32_t tanhtab[2048] FLASHMEM = {\n  727064,1073741824,727555,1074468888,728049,1075196443,728541,1075924492,729035,1076653033,729529,1077382068,730022,1078111597,730517,1078841619,731011,1079572136,731507,1080303147,732002,1081034654,\n  732497,1081766656,732993,1082499153,733490,1083232146,733986,1083965636,734484,1084699622,734981,1085434106,735478,1086169087,735976,1086904565,736475,1087640541,736974,1088377016,737472,1089113990,\n  737972,1089851462,738472,1090589434,738971,1091327906,739472,1092066877,739973,1092806349,740474,1093546322,740975,1094286796,741477,1095027771,741979,1095769248,742481,1096511227,742985,1097253708,\n  743487,1097996693,743990,1098740180,744495,1099484170,744999,1100228665,745503,1100973664,746007,1101719167,746513,1102465174,747019,1103211687,747524,1103958706,748031,1104706230,748537,1105454261,\n  749044,1106202798,749551,1106951842,750058,1107701393,750567,1108451451,751075,1109202018,751583,1109953093,752092,1110704676,752602,1111456768,753111,1112209370,753621,1112962481,754131,1113716102,\n  754642,1114470233,755153,1115224875,755664,1115980028,756176,1116735692,756688,1117491868,757201,1118248556,757713,1119005757,758226,1119763470,758740,1120521696,759253,1121280436,759768,1122039689,\n  760282,1122799457,760797,1123559739,761312,1124320536,761827,1125081848,762343,1125843675,762860,1126606018,763376,1127368878,763893,1128132254,764410,1128896147,764928,1129660557,765446,1130425485,\n  765964,1131190931,766483,1131956895,767001,1132723378,767521,1133490379,768041,1134257900,768561,1135025941,769081,1135794502,769603,1136563583,770123,1137333186,770644,1138103309,771167,1138873953,\n  771689,1139645120,772211,1140416809,772734,1141189020,773257,1141961754,773781,1142735011,774305,1143508792,774829,1144283097,775354,1145057926,775879,1145833280,776404,1146609159,776930,1147385563,\n  777456,1148162493,777983,1148939949,778509,1149717932,779037,1150496441,779564,1151275478,780092,1152055042,780620,1152835134,781148,1153615754,781678,1154396902,782207,1155178580,782736,1155960787,\n  783267,1156743523,783797,1157526790,784327,1158310587,784859,1159094914,785390,1159879773,785922,1160665163,786454,1161451085,786987,1162237539,787520,1163024526,788053,1163812046,788586,1164600099,\n  789121,1165388685,789654,1166177806,790190,1166967460,790724,1167757650,791260,1168548374,791796,1169339634,792332,1170131430,792868,1170923762,793406,1171716630,793942,1172510036,794480,1173303978,\n  795018,1174098458,795557,1174893476,796095,1175689033,796634,1176485128,797174,1177281762,797713,1178078936,798254,1178876649,798794,1179674903,799335,1180473697,799876,1181273032,800418,1182072908,\n  800960,1182873326,801502,1183674286,802045,1184475788,802588,1185277833,803131,1186080421,803676,1186883552,804219,1187687228,804764,1188491447,805309,1189296211,805854,1190101520,806400,1190907374,\n  806946,1191713774,807493,1192520720,808039,1193328213,808586,1194136252,809134,1194944838,809682,1195753972,810230,1196563654,810778,1197373884,811328,1198184662,811877,1198995990,812427,1199807867,\n  812976,1200620294,813528,1201433270,814078,1202246798,814629,1203060876,815181,1203875505,815733,1204690686,816286,1205506419,816838,1206322705,817391,1207139543,817945,1207956934,818499,1208774879,\n  819052,1209593378,819608,1210412430,820162,1211232038,820718,1212052200,821273,1212872918,821830,1213694191,822386,1214516021,822943,1215338407,823500,1216161350,824058,1216984850,824616,1217808908,\n  825174,1218633524,825733,1219458698,826292,1220284431,826851,1221110723,827412,1221937574,827972,1222764986,828532,1223592958,829093,1224421490,829655,1225250583,830217,1226080238,830778,1226910455,\n  831342,1227741233,831904,1228572575,832467,1229404479,833031,1230236946,833596,1231069977,834159,1231903573,834725,1232737732,835290,1233572457,835855,1234407747,836422,1235243602,836987,1236080024,\n  837555,1236917011,838121,1237754566,838689,1238592687,839257,1239431376,839826,1240270633,840394,1241110459,840963,1241950853,841532,1242791816,842103,1243633348,842672,1244475451,843243,1245318123,\n  843814,1246161366,844386,1247005180,844957,1247849566,845529,1248694523,846102,1249540052,846675,1250386154,847248,1251232829,847822,1252080077,848396,1252927899,848971,1253776295,849545,1254625266,\n  850120,1255474811,850697,1256324931,851272,1257175628,851848,1258026900,852426,1258878748,853003,1259731174,853580,1260584177,854158,1261437757,854737,1262291915,855315,1263146652,855894,1264001967,\n  856475,1264857861,857054,1265714336,857634,1266571390,858215,1267429024,858796,1268287239,859378,1269146035,859960,1270005413,860542,1270865373,861124,1271725915,861708,1272587039,862291,1273448747,\n  862875,1274311038,863460,1275173913,864044,1276037373,864629,1276901417,865215,1277766046,865800,1278631261,866387,1279497061,866973,1280363448,867561,1281230421,868147,1282097982,868736,1282966129,\n  869324,1283834865,869913,1284704189,870502,1285574102,871091,1286444604,871681,1287315695,872271,1288187376,872862,1289059647,873453,1289932509,874044,1290805962,874636,1291680006,875228,1292554642,\n  875822,1293429870,876414,1294305692,877007,1295182106,877602,1296059113,878195,1296936715,878791,1297814910,879385,1298693701,879981,1299573086,880576,1300453067,881173,1301333643,881770,1302214816,\n  882367,1303096586,882964,1303978953,883562,1304861917,884160,1305745479,884759,1306629639,885358,1307514398,885958,1308399756,886558,1309285714,887158,1310172272,887758,1311059430,888360,1311947188,\n  888961,1312835548,889563,1313724509,890166,1314614072,890768,1315504238,891372,1316395006,891975,1317286378,892579,1318178353,893183,1319070932,893788,1319964115,894394,1320857903,894999,1321752297,\n  895605,1322647296,896211,1323542901,896819,1324439112,897425,1325335931,898034,1326233356,898641,1327131390,899250,1328030031,899859,1328929281,900468,1329829140,901078,1330729608,901688,1331630686,\n  902298,1332532374,902910,1333434672,903521,1334337582,904132,1335241103,904745,1336145235,905358,1337049980,905971,1337955338,906584,1338861309,907198,1339767893,907812,1340675091,908427,1341582903,\n  909042,1342491330,909658,1343400372,910273,1344310030,910890,1345220303,911507,1346131193,912124,1347042700,912741,1347954824,913360,1348867565,913978,1349780925,914597,1350694903,915216,1351609500,\n  915836,1352524716,916457,1353440552,917076,1354357009,917698,1355274085,918319,1356191783,918941,1357110102,919563,1358029043,920186,1358948606,920809,1359868792,921432,1360789601,922057,1361711033,\n  922680,1362633090,923306,1363555770,923930,1364479076,924557,1365403006,925182,1366327563,925809,1367252745,926435,1368178554,927063,1369104989,927691,1370032052,928319,1370959743,928948,1371888062,\n  929576,1372817010,930206,1373746586,930836,1374676792,931466,1375607628,932097,1376539094,932728,1377471191,933360,1378403919,933991,1379337279,934624,1380271270,935257,1381205894,935890,1382141151,\n  936524,1383077041,937158,1384013565,937793,1384950723,938428,1385888516,939063,1386826944,939699,1387766007,940335,1388705706,940972,1389646041,941609,1390587013,942247,1391528622,942885,1392470869,\n  943523,1393413754,944162,1394357277,944801,1395301439,945442,1396246240,946081,1397191682,946722,1398137763,947363,1399084485,948005,1400031848,948646,1400979853,949289,1401928499,949931,1402877788,\n  950575,1403827719,951219,1404778294,951862,1405729513,952507,1406681375,953153,1407633882,953797,1408587035,954443,1409540832,955090,1410495275,955736,1411450365,956384,1412406101,957031,1413362485,\n  957679,1414319516,958328,1415277195,958976,1416235523,959626,1417194499,960276,1418154125,960926,1419114401,961576,1420075327,962228,1421036903,962879,1421999131,963532,1422962010,964183,1423925542,\n  964837,1424889725,965490,1425854562,966144,1426820052,966797,1427786196,967453,1428752993,968107,1429720446,968764,1430688553,969419,1431657317,970075,1432626736,970733,1433596811,971389,1434567544,\n  972048,1435538933,972706,1436510981,973364,1437483687,974023,1438457051,974683,1439431074,975343,1440405757,976004,1441381100,976664,1442357104,977325,1443333768,977988,1444311093,978649,1445289081,\n  979313,1446267730,979975,1447247043,980639,1448227018,981303,1449207657,981967,1450188960,982633,1451170927,983298,1452153560,983963,1453136858,984630,1454120821,985297,1455105451,985963,1456090748,\n  986632,1457076711,987299,1458063343,987968,1459050642,988637,1460038610,989306,1461027247,989977,1462016553,990646,1463006530,991318,1463997176,991988,1464988494,992661,1465980482,993332,1466973143,\n  994005,1467966475,994679,1468960480,995351,1469955159,996026,1470950510,996700,1471946536,997375,1472943236,998051,1473940611,998726,1474938662,999403,1475937388,1000079,1476936791,1000756,1477936870,\n  1001434,1478937626,1002112,1479939060,1002791,1480941172,1003470,1481943963,1004149,1482947433,1004829,1483951582,1005510,1484956411,1006190,1485961921,1006872,1486968111,1007554,1487974983,1008235,1488982537,\n  1008919,1489990772,1009602,1490999691,1010285,1492009293,1010969,1493019578,1011654,1494030547,1012339,1495042201,1013025,1496054540,1013710,1497067565,1014397,1498081275,1015083,1499095672,1015771,1500110755,\n  1016459,1501126526,1017147,1502142985,1017836,1503160132,1018525,1504177968,1019215,1505196493,1019905,1506215708,1020596,1507235613,1021286,1508256209,1021978,1509277495,1022670,1510299473,1023363,1511322143,\n  1024055,1512345506,1024749,1513369561,1025443,1514394310,1026138,1515419753,1026832,1516445891,1027527,1517472723,1028223,1518500250,1028919,1519528473,1029617,1520557392,1030313,1521587009,1031011,1522617322,\n  1031709,1523648333,1032407,1524680042,1033107,1525712449,1033806,1526745556,1034507,1527779362,1035207,1528813869,1035907,1529849076,1036610,1530884983,1037311,1531921593,1038013,1532958904,1038717,1533996917,\n  1039419,1535035634,1040124,1536075053,1040828,1537115177,1041532,1538156005,1042238,1539197537,1042944,1540239775,1043650,1541282719,1044356,1542326369,1045064,1543370725,1045771,1544415789,1046480,1545461560,\n  1047188,1546508040,1047897,1547555228,1048607,1548603125,1049316,1549651732,1050028,1550701048,1050738,1551751076,1051450,1552801814,1052161,1553853264,1052875,1554905425,1053587,1555958300,1054300,1557011887,\n  1055015,1558066187,1055729,1559121202,1056443,1560176931,1057159,1561233374,1057875,1562290533,1058591,1563348408,1059308,1564406999,1060026,1565466307,1060743,1566526333,1061461,1567587076,1062180,1568648537,\n  1062899,1569710717,1063619,1570773616,1064340,1571837235,1065060,1572901575,1065781,1573966635,1066503,1575032416,1067224,1576098919,1067948,1577166143,1068671,1578234091,1069394,1579302762,1070119,1580372156,\n  1070843,1581442275,1071568,1582513118,1072294,1583584686,1073020,1584656980,1073746,1585730000,1074474,1586803746,1075201,1587878220,1075929,1588953421,1076658,1590029350,1077386,1591106008,1078116,1592183394,\n  1078847,1593261510,1079577,1594340357,1080307,1595419934,1081040,1596500241,1081771,1597581281,1082504,1598663052,1083237,1599745556,1083970,1600828793,1084704,1601912763,1085439,1602997467,1086174,1604082906,\n  1086909,1605169080,1087645,1606255989,1088382,1607343634,1089119,1608432016,1089856,1609521135,1090594,1610610991,1091333,1611701585,1092071,1612792918,1092811,1613884989,1093551,1614977800,1094292,1616071351,\n  1095032,1617165643,1095774,1618260675,1096516,1619356449,1097259,1620452965,1098001,1621550224,1098745,1622648225,1099489,1623746970,1100233,1624846459,1100979,1625946692,1101724,1627047671,1102470,1628149395,\n  1103216,1629251865,1103963,1630355081,1104711,1631459044,1105459,1632563755,1106208,1633669214,1106957,1634775422,1107706,1635882379,1108456,1636990085,1109207,1638098541,1109958,1639207748,1110709,1640317706,\n  1111462,1641428415,1112214,1642539877,1112967,1643652091,1113721,1644765058,1114475,1645878779,1115230,1646993254,1115985,1648108484,1116740,1649224469,1117497,1650341209,1118253,1651458706,1119011,1652576959,\n  1119768,1653695970,1120527,1654815738,1121285,1655936265,1122044,1657057550,1122805,1658179594,1123564,1659302399,1124326,1660425963,1125086,1661550289,1125849,1662675375,1126611,1663801224,1127374,1664927835,\n  1128137,1666055209,1128901,1667183346,1129665,1668312247,1130430,1669441912,1131196,1670572342,1131962,1671703538,1132728,1672835500,1133496,1673968228,1134262,1675101724,1135031,1676235986,1135800,1677371017,\n  1136568,1678506817,1137338,1679643385,1138108,1680780723,1138879,1681918831,1139650,1683057710,1140422,1684197360,1141194,1685337782,1141967,1686478976,1142740,1687620943,1143513,1688763683,1144288,1689907196,\n  1145063,1691051484,1145838,1692196547,1146615,1693342385,1147390,1694489000,1148167,1695636390,1148945,1696784557,1149723,1697933502,1150502,1699083225,1151280,1700233727,1152060,1701385007,1152840,1702537067,\n  1153621,1703689907,1154402,1704843528,1155183,1705997930,1155966,1707153113,1156749,1708309079,1157531,1709465828,1158316,1710623359,1159100,1711781675,1159885,1712940775,1160670,1714100660,1161456,1715261330,\n  1162243,1716422786,1163029,1717585029,1163817,1718748058,1164605,1719911875,1165394,1721076480,1166183,1722241874,1166972,1723408057,1167763,1724575029,1168553,1725742792,1169345,1726911345,1170137,1728080690,\n  1170928,1729250827,1171722,1730421755,1172515,1731593477,1173309,1732765992,1174104,1733939301,1174898,1735113405,1175694,1736288303,1176491,1737463997,1177286,1738640488,1178084,1739817774,1178882,1740995858,\n  1179680,1742174740,1180479,1743354420,1181278,1744534899,1182078,1745716177,1182878,1746898255,1183680,1748081133,1184481,1749264813,1185283,1750449294,1186085,1751634577,1186889,1752820662,1187692,1754007551,\n  1188497,1755195243,1189301,1756383740,1190107,1757573041,1190912,1758763148,1191719,1759954060,1192526,1761145779,1193333,1762338305,1194142,1763531638,1194950,1764725780,1195759,1765920730,1196569,1767116489,\n  1197379,1768313058,1198190,1769510437,1199001,1770708627,1199813,1771907628,1200625,1773107441,1201439,1774308066,1202252,1775509505,1203066,1776711757,1203881,1777914823,1204695,1779118704,1205512,1780323399,\n  1206328,1781528911,1207145,1782735239,1207962,1783942384,1208780,1785150346,1209598,1786359126,1210418,1787568724,1211237,1788779142,1212058,1789990379,1212878,1791202437,1213699,1792415315,1214522,1793629014,\n  1215343,1794843536,1216167,1796058879,1216990,1797275046,1217814,1798492036,1218639,1799709850,1219464,1800928489,1220290,1802147953,1221116,1803368243,1221942,1804589359,1222771,1805811301,1223598,1807034072,\n  1224427,1808257670,1225256,1809482097,1226085,1810707353,1226916,1811933438,1227746,1813160354,1228578,1814388100,1229410,1815616678,1230242,1816846088,1231076,1818076330,1231908,1819307406,1232743,1820539314,\n  1233578,1821772057,1234413,1823005635,1235249,1824240048,1236086,1825475297,1236922,1826711383,1237760,1827948305,1238598,1829186065,1239437,1830424663,1240276,1831664100,1241115,1832904376,1241957,1834145491,\n  1242797,1835387448,1243638,1836630245,1244481,1837873883,1245324,1839118364,1246167,1840363688,1247010,1841609855,1247855,1842856865,1248700,1844104720,1249545,1845353420,1250392,1846602965,1251238,1847853357,\n  1252086,1849104595,1252933,1850356681,1253782,1851609614,1254630,1852863396,1255481,1854118026,1256330,1855373507,1257181,1856629837,1258032,1857887018,1258884,1859145050,1259737,1860403934,1260590,1861663671,\n  1261443,1862924261,1262297,1864185704,1263152,1865448001,1264008,1866711153,1264863,1867975161,1265720,1869240024,1266577,1870505744,1267434,1871772321,1268293,1873039755,1269151,1874308048,1270011,1875577199,\n  1270871,1876847210,1271732,1878118081,1272592,1879389813,1273454,1880662405,1274317,1881935859,1275179,1883210176,1276043,1884485355,1276907,1885761398,1277772,1887038305,1278636,1888316077,1279503,1889594713,\n  1280369,1890874216,1281236,1892154585,1282103,1893435821,1282972,1894717924,1283840,1896000896,1284710,1897284736,1285580,1898569446,1286450,1899855026,1287321,1901141476,1288193,1902428797,1289065,1903716990,\n  1289938,1905006055,1290812,1906295993,1291685,1907586805,1292561,1908878490,1293435,1910171051,1294311,1911464486,1295188,1912758797,1296065,1914053985,1296942,1915350050,1297821,1916646992,1298699,1917944813,\n  1299579,1919243512,1300458,1920543091,1301340,1921843549,1302220,1923144889,1303102,1924447109,1303985,1925750211,1304867,1927054196,1305751,1928359063,1306636,1929664814,1307520,1930971450,1308405,1932278970,\n  1309291,1933587375,1310178,1934896666,1311065,1936206844,1311953,1937517909,1312842,1938829862,1313730,1940142704,1314619,1941456434,1315510,1942771053,1316401,1944086563,1317292,1945402964,1318184,1946720256,\n  1319077,1948038440,1319970,1949357517,1320863,1950677487,1321758,1951998350,1322653,1953320108,1323549,1954642761,1324445,1955966310,1325341,1957290755,1326239,1958616096,1327137,1959942335,1328036,1961269472,\n  1328935,1962597508,1329835,1963926443,1330735,1965256278,1331637,1966587013,1332538,1967918650,1333440,1969251188,1334344,1970584628,1335247,1971918972,1336151,1973254219,1337055,1974590370,1337961,1975927425,\n  1338867,1977265386,1339774,1978604253,1340681,1979944027,1341589,1981284708,1342497,1982626297,1343406,1983968794,1344316,1985312200,1345226,1986656516,1346137,1988001742,1347048,1989347879,1347961,1990694927,\n  1348873,1992042888,1349787,1993391761,1350701,1994741548,1351615,1996092249,1352531,1997443864,1353446,1998796395,1354363,2000149841,1355280,2001504204,1356198,2002859484,1357116,2004215682,1358034,2005572798,\n  1358955,2006930832,1359875,2008289787,1360795,2009649662,1361717,2011010457,1362639,2012372174,1363562,2013734813,1364485,2015098375,1365408,2016462860,1366334,2017828268,1367258,2019194602,1368185,2020561860,\n  1369111,2021930045,1370038,2023299156,1370965,2024669194,1371894,2026040159,1372823,2027412053,1373753,2028784876,1374683,2030158629,1375613,2031533312,1376545,2032908925,1377477,2034285470,1378410,2035662947,\n  1379343,2037041357,1380278,2038420700,1381211,2039800978,1382148,2041182189,1383083,2042564337,1384019,2043947420,1384957,2045331439,1385894,2046716396,1386833,2048102290,1387772,2049489123,1388712,2050876895,\n  1389652,2052265607,1390593,2053655259,1391535,2055045852,1392476,2056437387,1393420,2057829863,1394363,2059223283,1395308,2060617646,1396252,2062012954,1397198,2063409206,1398144,2064806404,1399090,2066204548,\n  1400038,2067603638,1400986,2069003676,1401935,2070404662,1402883,2071806597,1403834,2073209480,1404785,2074613314,1405735,2076018099,1406688,2077423834,1407639,2078830522,1408594,2080238161,1409546,2081646755,\n  1410502,2083056301,1411456,2084466803,1412412,2085878259,1413369,2087290671,1414326,2088704040,1415283,2090118366,1416242,2091533649,1417200,2092949891,1418160,2094367091,1419121,2095785251,1420081,2097204372,\n  1421043,2098624453,1422006,2100045496,1422968,2101467502,1423932,2102890470,1424895,2104314402,1425861,2105739297,1426826,2107165158,1427793,2108591984,1428759,2110019777,1429726,2111448536,1430695,2112878262,\n  1431664,2114308957,1432633,2115740621,1433603,2117173254,1434573,2118606857,1435545,2120041430,1436518,2121476975,1437489,2122913493,1438464,2124350982,1439437,2125789446,1440412,2127228883,1441387,2128669295,\n  1442364,2130110682,1443340,2131553046,1444317,2132996386,1445295,2134440703,1446274,2135885998,1447253,2137332272,1448234,2138779525,1449214,2140227759,1450195,2141676973,1451177,2143127168,1452160,2144578345,\n  1453143,2146030505,\n};\n\nvoid Tanh::init() {}\n\n#else\n\nint32_t exp2tab[EXP2_N_SAMPLES << 1];\n\nvoid Exp2::init() {\n  double inc = exp2(1.0 / EXP2_N_SAMPLES);\n  double y = 1 << 30;\n  for (int i = 0; i < EXP2_N_SAMPLES; i++) {\n    exp2tab[(i << 1) + 1] = (int32_t)floor(y + 0.5);\n    y *= inc;\n  }\n  for (int i = 0; i < EXP2_N_SAMPLES - 1; i++) {\n    exp2tab[i << 1] = exp2tab[(i << 1) + 3] - exp2tab[(i << 1) + 1];\n  }\n  exp2tab[(EXP2_N_SAMPLES << 1) - 2] = (1U << 31) - exp2tab[(EXP2_N_SAMPLES << 1) - 1];\n}\n\nint32_t tanhtab[TANH_N_SAMPLES << 1];\n\nstatic double dtanh(double y) {\n  return 1 - y * y;\n}\n\nvoid Tanh::init() {\n  double step = 4.0 / TANH_N_SAMPLES;\n  double y = 0;\n  for (int i = 0; i < TANH_N_SAMPLES; i++) {\n    tanhtab[(i << 1) + 1] = (1 << 24) * y + 0.5;\n    //printf(\"%d\\n\", tanhtab[(i << 1) + 1]);\n    // Use a basic 4th order Runge-Kutte to compute tanh from its\n    // differential equation.\n    double k1 = dtanh(y);\n    double k2 = dtanh(y + 0.5 * step * k1);\n    double k3 = dtanh(y + 0.5 * step * k2);\n    double k4 = dtanh(y + step * k3);\n    double dy = (step / 6) * (k1 + k4 + 2 * (k2 + k3));\n    y += dy;\n  }\n  for (int i = 0; i < TANH_N_SAMPLES - 1; i++) {\n    tanhtab[i << 1] = tanhtab[(i << 1) + 3] - tanhtab[(i << 1) + 1];\n  }\n  int32_t lasty = (1 << 24) * y + 0.5;\n  tanhtab[(TANH_N_SAMPLES << 1) - 2] = lasty - tanhtab[(TANH_N_SAMPLES << 1) - 1];\n}\n\n#endif"
  },
  {
    "path": "lib/msfa/exp2.h",
    "content": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#pragma once\n\nclass Exp2 {\n public:\n  Exp2();\n\n  static void init();\n\n  // Q24 in, Q24 out\n  static int32_t lookup(int32_t x);\n};\n\n#define EXP2_LG_N_SAMPLES 10\n#define EXP2_N_SAMPLES (1 << EXP2_LG_N_SAMPLES)\n\n#define EXP2_INLINE\n\nextern const int32_t exp2tab[EXP2_N_SAMPLES << 1];\n\n#ifdef EXP2_INLINE\ninline\nint32_t Exp2::lookup(int32_t x) {\n  const int SHIFT = 24 - EXP2_LG_N_SAMPLES;\n  int lowbits = x & ((1 << SHIFT) - 1);\n  int x_int = (x >> (SHIFT - 1)) & ((EXP2_N_SAMPLES - 1) << 1);\n  int dy = exp2tab[x_int];\n  int y0 = exp2tab[x_int + 1];\n\n  int y = y0 + (((int64_t)dy * (int64_t)lowbits) >> SHIFT);\n  return y >> (6 - (x >> 24));\n}\n#endif\n\nclass Tanh {\n public:\n  static void init();\n\n  // Q24 in, Q24 out\n  static int32_t lookup(int32_t x);\n};\n\n#define TANH_LG_N_SAMPLES 10\n#define TANH_N_SAMPLES (1 << TANH_LG_N_SAMPLES)\n\nextern const int32_t tanhtab[TANH_N_SAMPLES << 1];\n\ninline\nint32_t Tanh::lookup(int32_t x) {\n  int32_t signum = x >> 31;\n  x ^= signum;\n  if (x >= (4 << 24)) {\n    if (x >= (17 << 23)) {\n      return signum ^ (1 << 24);\n    }\n    int32_t sx = ((int64_t)-48408812 * (int64_t)x) >> 24;\n    return signum ^ ((1 << 24) - 2 * Exp2::lookup(sx));\n  } else {\n    const int SHIFT = 26 - TANH_LG_N_SAMPLES;\n    int lowbits = x & ((1 << SHIFT) - 1);\n    int x_int = (x >> (SHIFT - 1)) & ((TANH_N_SAMPLES - 1) << 1);\n    int dy = tanhtab[x_int];\n    int y0 = tanhtab[x_int + 1];\n    int y = y0 + (((int64_t)dy * (int64_t)lowbits) >> SHIFT);\n    return y ^ signum;\n  }\n}\n"
  },
  {
    "path": "lib/msfa/fm_core.cc",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#ifdef VERBOSE\r\n#include <iostream>\r\n#endif\r\n\r\n#include \"synth.h\"\r\n#include \"exp2.h\"\r\n#include \"fm_op_kernel.h\"\r\n#include \"fm_core.h\"\r\n\r\n\r\n//using namespace std;\r\n\r\nconst FmAlgorithm FmCore::algorithms[32] = {\r\n  { { 0xc1, 0x11, 0x11, 0x14, 0x01, 0x14 } }, // 1\r\n  { { 0x01, 0x11, 0x11, 0x14, 0xc1, 0x14 } }, // 2\r\n  { { 0xc1, 0x11, 0x14, 0x01, 0x11, 0x14 } }, // 3\r\n  { { 0xc1, 0x11, 0x94, 0x01, 0x11, 0x14 } }, // 4\r\n  { { 0xc1, 0x14, 0x01, 0x14, 0x01, 0x14 } }, // 5\r\n  { { 0xc1, 0x94, 0x01, 0x14, 0x01, 0x14 } }, // 6\r\n  { { 0xc1, 0x11, 0x05, 0x14, 0x01, 0x14 } }, // 7\r\n  { { 0x01, 0x11, 0xc5, 0x14, 0x01, 0x14 } }, // 8\r\n  { { 0x01, 0x11, 0x05, 0x14, 0xc1, 0x14 } }, // 9\r\n  { { 0x01, 0x05, 0x14, 0xc1, 0x11, 0x14 } }, // 10\r\n  { { 0xc1, 0x05, 0x14, 0x01, 0x11, 0x14 } }, // 11\r\n  { { 0x01, 0x05, 0x05, 0x14, 0xc1, 0x14 } }, // 12\r\n  { { 0xc1, 0x05, 0x05, 0x14, 0x01, 0x14 } }, // 13\r\n  { { 0xc1, 0x05, 0x11, 0x14, 0x01, 0x14 } }, // 14\r\n  { { 0x01, 0x05, 0x11, 0x14, 0xc1, 0x14 } }, // 15\r\n  { { 0xc1, 0x11, 0x02, 0x25, 0x05, 0x14 } }, // 16\r\n  { { 0x01, 0x11, 0x02, 0x25, 0xc5, 0x14 } }, // 17\r\n  { { 0x01, 0x11, 0x11, 0xc5, 0x05, 0x14 } }, // 18\r\n  { { 0xc1, 0x14, 0x14, 0x01, 0x11, 0x14 } }, // 19\r\n  { { 0x01, 0x05, 0x14, 0xc1, 0x14, 0x14 } }, // 20\r\n  { { 0x01, 0x14, 0x14, 0xc1, 0x14, 0x14 } }, // 21\r\n  { { 0xc1, 0x14, 0x14, 0x14, 0x01, 0x14 } }, // 22\r\n  { { 0xc1, 0x14, 0x14, 0x01, 0x14, 0x04 } }, // 23\r\n  { { 0xc1, 0x14, 0x14, 0x14, 0x04, 0x04 } }, // 24\r\n  { { 0xc1, 0x14, 0x14, 0x04, 0x04, 0x04 } }, // 25\r\n  { { 0xc1, 0x05, 0x14, 0x01, 0x14, 0x04 } }, // 26\r\n  { { 0x01, 0x05, 0x14, 0xc1, 0x14, 0x04 } }, // 27\r\n  { { 0x04, 0xc1, 0x11, 0x14, 0x01, 0x14 } }, // 28\r\n  { { 0xc1, 0x14, 0x01, 0x14, 0x04, 0x04 } }, // 29\r\n  { { 0x04, 0xc1, 0x11, 0x14, 0x04, 0x04 } }, // 30\r\n  { { 0xc1, 0x14, 0x04, 0x04, 0x04, 0x04 } }, // 31\r\n  { { 0xc4, 0x04, 0x04, 0x04, 0x04, 0x04 } }, // 32\r\n};\r\n\r\nint n_out(const FmAlgorithm &alg) {\r\n  int count = 0;\r\n  for (int i = 0; i < 6; i++) {\r\n    if ((alg.ops[i] & 7) == OUT_BUS_ADD) count++;\r\n  }\r\n  return count;\r\n}\r\n\r\nvoid FmCore::dump() {\r\n#ifdef VERBOSE\r\n  for (int i = 0; i < 32; i++) {\r\n    cout << (i + 1) << \":\";\r\n    const FmAlgorithm &alg = algorithms[i];\r\n    for (int j = 0; j < 6; j++) {\r\n      int flags = alg.ops[j];\r\n      cout << \" \";\r\n      if (flags & FB_IN) cout << \"[\";\r\n      cout << (flags & IN_BUS_ONE ? \"1\" : flags & IN_BUS_TWO ? \"2\" : \"0\") << \"->\";\r\n      cout << (flags & OUT_BUS_ONE ? \"1\" : flags & OUT_BUS_TWO ? \"2\" : \"0\");\r\n      if (flags & OUT_BUS_ADD) cout << \"+\";\r\n      //cout << alg.ops[j].in << \"->\" << alg.ops[j].out;\r\n      if (flags & FB_OUT) cout << \"]\";\r\n    }\r\n    cout << \" \" << n_out(alg);\r\n    cout << endl;\r\n  }\r\n#endif\r\n}\r\n\r\nvoid FmCore::render(int32_t *output, FmOpParams *params, int algorithm, int32_t *fb_buf, int32_t feedback_shift) {\r\n    const int kLevelThresh = 1120;\r\n    const FmAlgorithm alg = algorithms[algorithm];\r\n    bool has_contents[3] = { true, false, false };\r\n    for (int op = 0; op < 6; op++) {\r\n        int flags = alg.ops[op];\r\n        bool add = (flags & OUT_BUS_ADD) != 0;\r\n        FmOpParams &param = params[op];\r\n        int inbus = (flags >> 4) & 3;\r\n        int outbus = flags & 3;\r\n        int32_t *outptr = (outbus == 0) ? output : buf_[outbus - 1].get();\r\n        int32_t gain1 = param.gain_out;\r\n        int32_t gain2 = Exp2::lookup(param.level_in - (14 * (1 << 24)));\r\n        param.gain_out = gain2;\r\n        \r\n        if (gain1 >= kLevelThresh || gain2 >= kLevelThresh) {\r\n            if (!has_contents[outbus]) {\r\n                add = false;\r\n            }\r\n            if (inbus == 0 || !has_contents[inbus]) {\r\n                // todo: more than one op in a feedback loop\r\n                if ((flags & 0xc0) == 0xc0 && feedback_shift < 16) {\r\n                    // cout << op << \" fb \" << inbus << outbus << add << endl;\r\n                    FmOpKernel::compute_fb(outptr, param.phase, param.freq,\r\n                                           gain1, gain2,\r\n                                           fb_buf, feedback_shift, add);\r\n                } else {\r\n                    // cout << op << \" pure \" << inbus << outbus << add << endl;\r\n                    FmOpKernel::compute_pure(outptr, param.phase, param.freq,\r\n                                             gain1, gain2, add);\r\n                }\r\n            } else {\r\n                // cout << op << \" normal \" << inbus << outbus << \" \" << param.freq << add << endl;\r\n                FmOpKernel::compute(outptr, buf_[inbus - 1].get(),\r\n                                    param.phase, param.freq, gain1, gain2, add);\r\n            }\r\n            has_contents[outbus] = true;\r\n        } else if (!add) {\r\n            has_contents[outbus] = false;\r\n        }\r\n        param.phase += param.freq << LG_N;\r\n    }\r\n}\r\n"
  },
  {
    "path": "lib/msfa/fm_core.h",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#ifndef __FM_CORE_H\r\n#define __FM_CORE_H\r\n\r\n#include \"aligned_buf.h\"\r\n#include \"fm_op_kernel.h\"\r\n#include \"synth.h\"\r\n#include \"controllers.h\"\r\n\r\n\r\nclass FmOperatorInfo {\r\npublic:\r\n    int in;\r\n    int out;\r\n};\r\n\r\nenum FmOperatorFlags {\r\n    OUT_BUS_ONE = 1 << 0,\r\n    OUT_BUS_TWO = 1 << 1,\r\n    OUT_BUS_ADD = 1 << 2,\r\n    IN_BUS_ONE = 1 << 4,\r\n    IN_BUS_TWO = 1 << 5,\r\n    FB_IN = 1 << 6,\r\n    FB_OUT = 1 << 7\r\n};\r\n\r\nclass FmAlgorithm {\r\npublic:\r\n    int ops[6];\r\n};\r\n\r\nclass FmCore {\r\npublic:\r\n    virtual ~FmCore() {};\r\n    static void dump();\r\n    virtual void render(int32_t *output, FmOpParams *params, int algorithm, int32_t *fb_buf, int32_t feedback_gain);\r\nprotected:\r\n    AlignedBuf<int32_t, N>buf_[2];\r\n    const static FmAlgorithm algorithms[32];\r\n};\r\n\r\n#endif  // __FM_CORE_H\r\n"
  },
  {
    "path": "lib/msfa/fm_op_kernel.cc",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#include <math.h>\r\n\r\n#include <cstdlib>\r\n\r\n#ifdef HAVE_NEON\r\n#include <cpu-features.h>\r\n#endif\r\n\r\n#include \"synth.h\"\r\n#include \"sin.h\"\r\n#include \"fm_op_kernel.h\"\r\n\r\n#ifdef HAVE_NEONx\r\nstatic bool hasNeon() {\r\n  return true;\r\n  return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;\r\n}\r\n\r\nextern \"C\"\r\nvoid neon_fm_kernel(const int *in, const int *busin, int *out, int count,\r\n  int32_t phase0, int32_t freq, int32_t gain1, int32_t dgain);\r\n\r\nconst int32_t __attribute__ ((aligned(16))) zeros[N] = {0};\r\n\r\n#else\r\nstatic bool hasNeon() {\r\n  return false;\r\n}\r\n#endif\r\n\r\nvoid FmOpKernel::compute(int32_t *output, const int32_t *input,\r\n                         int32_t phase0, int32_t freq,\r\n                         int32_t gain1, int32_t gain2, bool add) {\r\n  int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n  int32_t gain = gain1;\r\n  int32_t phase = phase0;\r\n  if (hasNeon()) {\r\n#ifdef HAVE_NEON\r\n    neon_fm_kernel(input, add ? output : zeros, output, N,\r\n      phase0, freq, gain, dgain);\r\n#endif\r\n  } else {\r\n    if (add) {\r\n      for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        int32_t y = Sin::lookup(phase + input[i]);\r\n        int32_t y1 = ((int64_t)y * (int64_t)gain) >> 24;\r\n        output[i] += y1;\r\n        phase += freq;\r\n      }\r\n    } else {\r\n      for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        int32_t y = Sin::lookup(phase + input[i]);\r\n        int32_t y1 = ((int64_t)y * (int64_t)gain) >> 24;\r\n        output[i] = y1;\r\n        phase += freq;\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\nvoid FmOpKernel::compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                              int32_t gain1, int32_t gain2, bool add) {\r\n  int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n  int32_t gain = gain1;\r\n  int32_t phase = phase0;\r\n  if (hasNeon()) {\r\n#ifdef HAVE_NEON\r\n    neon_fm_kernel(zeros, add ? output : zeros, output, N,\r\n      phase0, freq, gain, dgain);\r\n#endif\r\n  } else {\r\n    if (add) {\r\n      for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        int32_t y = Sin::lookup(phase);\r\n        int32_t y1 = ((int64_t)y * (int64_t)gain) >> 24;\r\n        output[i] += y1;\r\n        phase += freq;\r\n      }\r\n    } else {\r\n      for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        int32_t y = Sin::lookup(phase);\r\n        int32_t y1 = ((int64_t)y * (int64_t)gain) >> 24;          \r\n        output[i] = y1;\r\n        phase += freq;\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n#define noDOUBLE_ACCURACY\r\n#define HIGH_ACCURACY\r\n\r\nvoid FmOpKernel::compute_fb(int32_t *output, int32_t phase0, int32_t freq,\r\n                            int32_t gain1, int32_t gain2,\r\n                            int32_t *fb_buf, int fb_shift, bool add) {\r\n  int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n  int32_t gain = gain1;\r\n  int32_t phase = phase0;\r\n  int32_t y0 = fb_buf[0];\r\n  int32_t y = fb_buf[1];\r\n  if (add) {\r\n    for (int i = 0; i < N; i++) {\r\n      gain += dgain;\r\n      int32_t scaled_fb = (y0 + y) >> (fb_shift + 1);\r\n      y0 = y;\r\n      y = Sin::lookup(phase + scaled_fb);\r\n      y = ((int64_t)y * (int64_t)gain) >> 24;\r\n      output[i] += y;\r\n      phase += freq;\r\n    }\r\n  } else {\r\n    for (int i = 0; i < N; i++) {\r\n      gain += dgain;\r\n      int32_t scaled_fb = (y0 + y) >> (fb_shift + 1);\r\n      y0 = y;\r\n      y = Sin::lookup(phase + scaled_fb);\r\n      y = ((int64_t)y * (int64_t)gain) >> 24;\r\n      output[i] = y;\r\n      phase += freq;\r\n    }\r\n  }\r\n  fb_buf[0] = y0;\r\n  fb_buf[1] = y;\r\n}\r\n\r\n////////////////////////////////////////////////////////////////////////////////////\r\n////////////////////////////////////////////////////////////////////////////////////\r\n////////////////////////////////////////////////////////////////////////////////////\r\n////////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Experimental sine wave generators below\r\n#if 0\r\n// Results: accuracy 64.3 mean, 170 worst case\r\n// high accuracy: 5.0 mean, 49 worst case\r\nvoid FmOpKernel::compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                              int32_t gain1, int32_t gain2, bool add) {\r\n    int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n    int32_t gain = gain1;\r\n    int32_t phase = phase0;\r\n#ifdef HIGH_ACCURACY\r\n    int32_t u = Sin::compute10(phase << 6);\r\n    u = ((int64_t)u * gain) >> 30;\r\n    int32_t v = Sin::compute10((phase << 6) + (1 << 28));  // quarter cycle\r\n    v = ((int64_t)v * gain) >> 30;\r\n    int32_t s = Sin::compute10(freq << 6);\r\n    int32_t c = Sin::compute10((freq << 6) + (1 << 28));\r\n#else\r\n    int32_t u = Sin::compute(phase);\r\n    u = ((int64_t)u * gain) >> 24;\r\n    int32_t v = Sin::compute(phase + (1 << 22));  // quarter cycle\r\n    v = ((int64_t)v * gain) >> 24;\r\n    int32_t s = Sin::compute(freq) << 6;\r\n    int32_t c = Sin::compute(freq + (1 << 22)) << 6;\r\n#endif\r\n    for (int i = 0; i < N; i++) {\r\n        output[i] = u;\r\n        int32_t t = ((int64_t)v * (int64_t)c - (int64_t)u * (int64_t)s) >> 30;\r\n        u = ((int64_t)u * (int64_t)c + (int64_t)v * (int64_t)s) >> 30;\r\n        v = t;\r\n    }\r\n}\r\n#endif\r\n\r\n#if 0\r\n// Results: accuracy 392.3 mean, 15190 worst case (near freq = 0.5)\r\n// for freq < 0.25, 275.2 mean, 716 worst\r\n// high accuracy: 57.4 mean, 7559 worst\r\n//  freq < 0.25: 17.9 mean, 78 worst\r\nvoid FmOpKernel::compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                              int32_t gain1, int32_t gain2, bool add) {\r\n    int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n    int32_t gain = gain1;\r\n    int32_t phase = phase0;\r\n#ifdef HIGH_ACCURACY\r\n    int32_t u = floor(gain * sin(phase * (M_PI / (1 << 23))) + 0.5);\r\n    int32_t v = floor(gain * cos((phase - freq * 0.5) * (M_PI / (1 << 23))) + 0.5);\r\n    int32_t a = floor((1 << 25) * sin(freq * (M_PI / (1 << 24))) + 0.5);\r\n#else\r\n    int32_t u = Sin::compute(phase);\r\n    u = ((int64_t)u * gain) >> 24;\r\n    int32_t v = Sin::compute(phase + (1 << 22) - (freq >> 1));\r\n    v = ((int64_t)v * gain) >> 24;\r\n    int32_t a = Sin::compute(freq >> 1) << 1;\r\n#endif\r\n    for (int i = 0; i < N; i++) {\r\n        output[i] = u;\r\n        v -= ((int64_t)a * (int64_t)u) >> 24;\r\n        u += ((int64_t)a * (int64_t)v) >> 24;\r\n    }\r\n}\r\n#endif\r\n\r\n#if 0\r\n// Results: accuracy 370.0 mean, 15480 worst case (near freq = 0.5)\r\n// with double accuracy initialization: mean 1.55, worst 58 (near freq = 0)\r\n// with high accuracy: mean 4.2, worst 292 (near freq = 0.5)\r\nvoid FmOpKernel::compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                              int32_t gain1, int32_t gain2, bool add) {\r\n    int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n    int32_t gain = gain1;\r\n    int32_t phase = phase0;\r\n#ifdef DOUBLE_ACCURACY\r\n    int32_t u = floor((1 << 30) * sin(phase * (M_PI / (1 << 23))) + 0.5);\r\n    double a_d = sin(freq * (M_PI / (1 << 24)));\r\n    int32_t v = floor((1LL << 31) * a_d * cos((phase - freq * 0.5) *\r\n                                              (M_PI / (1 << 23))) + 0.5);\r\n    int32_t aa = floor((1LL << 31) * a_d * a_d + 0.5);\r\n#else\r\n#ifdef HIGH_ACCURACY\r\n    int32_t u = Sin::compute10(phase << 6);\r\n    int32_t v = Sin::compute10((phase << 6) + (1 << 28) - (freq << 5));\r\n    int32_t a = Sin::compute10(freq << 5);\r\n    v = ((int64_t)v * (int64_t)a) >> 29;\r\n    int32_t aa = ((int64_t)a * (int64_t)a) >> 29;\r\n#else\r\n    int32_t u = Sin::compute(phase) << 6;\r\n    int32_t v = Sin::compute(phase + (1 << 22) - (freq >> 1));\r\n    int32_t a = Sin::compute(freq >> 1);\r\n    v = ((int64_t)v * (int64_t)a) >> 17;\r\n    int32_t aa = ((int64_t)a * (int64_t)a) >> 17;\r\n#endif\r\n#endif\r\n    \r\n    if (aa < 0) aa = (1 << 31) - 1;\r\n    for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        output[i] = ((int64_t)u * (int64_t)gain) >> 30;\r\n        v -= ((int64_t)aa * (int64_t)u) >> 29;\r\n        u += v;\r\n    }\r\n}\r\n#endif\r\n\r\n#if 0\r\n// Results:: accuracy 112.3 mean, 4262 worst (near freq = 0.5)\r\n// high accuracy 2.9 mean, 143 worst\r\nvoid FmOpKernel::compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                              int32_t gain1, int32_t gain2, bool add) {\r\n    int32_t dgain = (gain2 - gain1 + (N >> 1)) >> LG_N;\r\n    int32_t gain = gain1;\r\n    int32_t phase = phase0;\r\n#ifdef HIGH_ACCURACY\r\n    int32_t u = Sin::compute10(phase << 6);\r\n    int32_t lastu = Sin::compute10((phase - freq) << 6);\r\n    int32_t a = Sin::compute10((freq << 6) + (1 << 28)) << 1;\r\n#else\r\n    int32_t u = Sin::compute(phase) << 6;\r\n    int32_t lastu = Sin::compute(phase - freq) << 6;\r\n    int32_t a = Sin::compute(freq + (1 << 22)) << 7;\r\n#endif\r\n    if (a < 0 && freq < 256) a = (1 << 31) - 1;\r\n    if (a > 0 && freq > 0x7fff00) a = -(1 << 31);\r\n    for (int i = 0; i < N; i++) {\r\n        gain += dgain;\r\n        output[i] = ((int64_t)u * (int64_t)gain) >> 30;\r\n        //output[i] = u;\r\n        int32_t newu = (((int64_t)u * (int64_t)a) >> 30) - lastu;\r\n        lastu = u;\r\n        u = newu;\r\n    }\r\n}\r\n#endif\r\n\r\n"
  },
  {
    "path": "lib/msfa/fm_op_kernel.h",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#ifndef __FM_OP_KERNEL_H\r\n#define __FM_OP_KERNEL_H\r\n\r\nstruct FmOpParams {\r\n    int32_t level_in;      // value to be computed (from level to gain[0])\r\n    int32_t gain_out;      // computed value (gain[1] to gain[0])\r\n    int32_t freq;\r\n    int32_t phase;\r\n};\r\n\r\nclass FmOpKernel {\r\n public:\r\n  // gain1 and gain2 represent linear step: gain for sample i is\r\n  // gain1 + (1 + i) / 64 * (gain2 - gain1)\r\n\r\n  // This is the basic FM operator. No feedback.\r\n  static void compute(int32_t *output, const int32_t *input,\r\n                      int32_t phase0, int32_t freq,\r\n                      int32_t gain1, int32_t gain2, bool add);\r\n  \r\n  // This is a sine generator, no feedback.\r\n  static void compute_pure(int32_t *output, int32_t phase0, int32_t freq,\r\n                           int32_t gain1, int32_t gain2, bool add);\r\n\r\n  // One op with feedback, no add.\r\n  static void compute_fb(int32_t *output, int32_t phase0, int32_t freq,\r\n                         int32_t gain1, int32_t gain2,\r\n                         int32_t *fb_buf, int fb_gain, bool add);\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "lib/msfa/freqlut.cc",
    "content": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Resolve frequency signal (1.0 in Q24 format = 1 octave) to phase delta.\n\n// The LUT is just a global, and we'll need the init function to be called before\n// use.\n\n#include <stdint.h>\n#include <math.h>\n#include \"freqlut.h\"\n\n#define LG_N_SAMPLES 10\n#define N_SAMPLES (1 << LG_N_SAMPLES)\n#define SAMPLE_SHIFT (24 - LG_N_SAMPLES)\n\n#define MAX_LOGFREQ_INT 20\n\n#if 1 //eh2k\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nconst int32_t lut[N_SAMPLES + 1] FLASHMEM = {\n  366503872,366752043,367000382,367248889,367497565,367746409,367995421,368244602,368493952,368743470,368993158,369243014,369493040,369743235,369993600,370244134,370494838,370745711,370996754,371247968,371499351,371750905,\n  372002628,372254523,372506588,372758823,373011230,373263807,373516556,373769475,374022566,374275828,374529262,374782867,375036644,375290593,375544714,375799006,376053472,376308109,376562919,376817901,377073056,377328384,\n  377583884,377839558,378095405,378351425,378607618,378863985,379120525,379377239,379634127,379891189,380148425,380405835,380663420,380921179,381179112,381437220,381695503,381953961,382212594,382471402,382730385,382989543,\n  383248877,383508387,383768072,384027933,384287970,384548183,384808573,385069139,385329881,385590799,385851895,386113167,386374616,386636242,386898045,387160026,387422184,387684519,387947032,388209723,388472592,388735639,\n  388998863,389262267,389525848,389789608,390053546,390317664,390581960,390846435,391111089,391375922,391640935,391906127,392171499,392437050,392702781,392968692,393234783,393501055,393767506,394034138,394300951,394567944,\n  394835118,395102473,395370009,395637727,395905625,396173705,396441966,396710409,396979034,397247841,397516829,397786000,398055353,398324889,398594607,398864507,399134591,399404857,399675306,399945939,400216755,400487754,\n  400758936,401030302,401301852,401573586,401845504,402117606,402389892,402662363,402935018,403207857,403480882,403754091,404027485,404301065,404574829,404848779,405122915,405397236,405671743,405946436,406221314,406496379,\n  406771631,407047068,407322692,407598503,407874500,408150685,408427056,408703615,408980360,409257293,409534414,409811722,410089219,410366903,410644775,410922835,411201083,411479520,411758146,412036960,412315962,412595154,\n  412874535,413154105,413433864,413713813,413993952,414274280,414554797,414835505,415116403,415397491,415678769,415960238,416241898,416523748,416805789,417088021,417370444,417653058,417935864,418218861,418502050,418785431,\n  419069003,419352768,419636724,419920873,420205214,420489748,420774475,421059394,421344506,421629812,421915310,422201002,422486887,422772966,423059239,423345705,423632365,423919220,424206269,424493512,424780949,425068581,\n  425356408,425644430,425932647,426221059,426509667,426798469,427087468,427376662,427666052,427955638,428245419,428535398,428825572,429115943,429406511,429697275,429988236,430279394,430570750,430862302,431154052,431446000,\n  431738145,432030489,432323030,432615769,432908706,433201842,433495176,433788709,434082441,434376371,434670501,434964830,435259358,435554085,435849012,436144139,436439466,436734992,437030719,437326646,437622773,437919101,\n  438215629,438512359,438809289,439106420,439403752,439701286,439999021,440296958,440595097,440893437,441191980,441490724,441789671,442088821,442388173,442687727,442987485,443287445,443587609,443887975,444188546,444489319,\n  444790297,445091478,445392863,445694452,445996245,446298243,446600445,446902852,447205464,447508280,447811302,448114529,448417961,448721599,449025442,449329491,449633745,449938206,450242873,450547746,450852826,451158112,\n  451463605,451769305,452075212,452381326,452687647,452994176,453300912,453607856,453915008,454222368,454529936,454837712,455145697,455453890,455762292,456070902,456379722,456688750,456997988,457307436,457617093,457926959,\n  458237036,458547322,458857819,459168525,459479442,459790570,460101908,460413457,460725217,461037189,461349371,461661765,461974370,462287187,462600216,462913457,463226910,463540575,463854453,464168543,464482845,464797361,\n  465112090,465427031,465742186,466057555,466373136,466688932,467004941,467321165,467637602,467954254,468271120,468588201,468905496,469223007,469540732,469858672,470176828,470495199,470813786,471132589,471451607,471770841,\n  472090292,472409959,472729842,473049942,473370258,473690792,474011542,474332510,474653695,474975098,475296718,475618556,475940612,476262886,476585378,476908089,477231018,477554166,477877532,478201118,478524923,478848946,\n  479173190,479497653,479822335,480147238,480472360,480797703,481123266,481449049,481775053,482101277,482427723,482754390,483081277,483408387,483735717,484063270,484391044,484719040,485047258,485375698,485704361,486033246,\n  486362354,486691685,487021239,487351016,487681017,488011240,488341688,488672359,489003254,489334373,489665716,489997284,490329076,490661093,490993335,491325801,491658493,491991410,492324553,492657921,492991515,493325334,\n  493659380,493993652,494328150,494662875,494997826,495333005,495668410,496004042,496339902,496675989,497012303,497348845,497685616,498022614,498359840,498697295,499034978,499372890,499711031,500049401,500387999,500726827,\n  501065885,501405172,501744689,502084436,502424412,502764619,503105057,503445725,503786623,504127752,504469113,504810704,505152527,505494581,505836867,506179385,506522135,506865116,507208330,507551777,507895455,508239367,\n  508583512,508927889,509272500,509617344,509962421,510307733,510653278,510999057,511345070,511691317,512037799,512384516,512731467,513078653,513426074,513773731,514121623,514469750,514818114,515166713,515515548,515864619,\n  516213927,516563471,516913252,517263270,517613525,517964017,518314746,518665713,519016918,519368360,519720040,520071959,520424115,520776511,521129144,521482017,521835128,522188479,522542069,522895898,523249967,523604275,\n  523958824,524313613,524668641,525023911,525379420,525735171,526091162,526447395,526803869,527160584,527517540,527874739,528232179,528589861,528947785,529305952,529664361,530023013,530381908,530741046,531100427,531460052,\n  531819920,532180031,532540387,532900986,533261830,533622918,533984250,534345827,534707649,535069716,535432028,535794586,536157389,536520437,536883732,537247272,537611059,537975092,538339371,538703897,539068670,539433690,\n  539798957,540164472,540530234,540896243,541262501,541629006,541995760,542362762,542730012,543097511,543465259,543833256,544201503,544569998,544938743,545307738,545676983,546046477,546416222,546786217,547156463,547526959,\n  547897707,548268705,548639955,549011456,549383208,549755212,550127468,550499977,550872737,551245750,551619015,551992533,552366305,552740329,553114606,553489137,553863922,554238960,554614252,554989798,555365599,555741654,\n  556117964,556494528,556871348,557248423,557625753,558003338,558381179,558759276,559137629,559516239,559895104,560274226,560653605,561033241,561413134,561793284,562173691,562554356,562935279,563316460,563697899,564079596,\n  564461552,564843766,565226239,565608971,565991962,566375213,566758723,567142492,567526522,567910812,568295362,568680172,569065243,569450574,569836167,570222020,570608135,570994511,571381149,571768049,572155211,572542634,\n  572930321,573318269,573706481,574094955,574483692,574872693,575261957,575651484,576041276,576431331,576821650,577212234,577603082,577994195,578385572,578777215,579169123,579561296,579953735,580346439,580739410,581132646,\n  581526149,581919918,582313954,582708256,583102826,583497663,583892767,584288139,584683778,585079686,585475861,585872305,586269017,586665998,587063247,587460766,587858553,588256610,588654937,589053533,589452400,589851536,\n  590250942,590650620,591050567,591450786,591851275,592252036,592653068,593054371,593455947,593857794,594259913,594662305,595064969,595467906,595871115,596274598,596678354,597082383,597486686,597891262,598296113,598701238,\n  599106637,599512310,599918258,600324481,600730979,601137753,601544802,601952126,602359726,602767603,603175755,603584184,603992889,604401871,604811130,605220667,605630480,606040571,606450940,606861586,607272511,607683714,\n  608095195,608506955,608918994,609331312,609743908,610156785,610569941,610983376,611397092,611811088,612225364,612639920,613054758,613469876,613885275,614300956,614716918,615133161,615549687,615966494,616383584,616800957,\n  617218611,617636549,618054770,618473274,618892061,619311132,619730486,620150125,620570047,620990254,621410746,621831522,622252583,622673930,623095561,623517479,623939681,624362170,624784945,625208006,625631353,626054988,\n  626478909,626903117,627327612,627752395,628177465,628602824,629028470,629454404,629880627,630307139,630733939,631161028,631588407,632016075,632444032,632872280,633300817,633729644,634158762,634588170,635017869,635447860,\n  635878141,636308713,636739578,637170733,637602181,638033921,638465954,638898279,639330896,639763807,640197011,640630508,641064298,641498382,641932761,642367433,642802400,643237661,643673217,644109068,644545214,644981655,\n  645418392,645855425,646292753,646730378,647168299,647606516,648045031,648483842,648922950,649362356,649802059,650242060,650682359,651122956,651563851,652005045,652446538,652888329,653330420,653772810,654215500,654658489,\n  655101778,655545368,655989258,656433448,656877939,657322732,657767825,658213220,658658916,659104914,659551215,659997817,660444722,660891929,661339439,661787253,662235369,662683789,663132512,663581540,664030871,664480507,\n  664930447,665380692,665831242,666282096,666733256,667184722,667636493,668088570,668540954,668993643,669446639,669899942,670353552,670807469,671261693,671716225,672171065,672626213,673081668,673537433,673993506,674449887,\n  674906578,675363578,675820887,676278506,676736435,677194674,677653224,678112083,678571254,679030735,679490528,679950632,680411047,680871774,681332814,681794165,682255829,682717805,683180094,683642697,684105612,684568841,\n  685032383,685496240,685960410,686424895,686889695,687354809,687820238,688285982,688752042,689218417,689685108,690152115,690619438,691087077,691555034,692023307,692491897,692960805,693430030,693899572,694369433,694839612,\n  695310109,695780925,696252060,696723513,697195286,697667378,698139790,698612522,699085574,699558947,700032639,700506653,700980988,701455643,701930620,702405919,702881540,703357482,703833747,704310335,704787245,705264478,\n  705742034,706219914,706698117,707176644,707655495,708134670,708614170,709093994,709574144,710054618,710535418,711016543,711497994,711979772,712461875,712944305,713427061,713910145,714393555,714877293,715361358,715845751,\n  716330472,716815522,717300900,717786606,718272641,718759006,719245700,719732723,720220076,720707759,721195773,721684116,722172791,722661796,723151133,723640800,724130800,724621131,725111794,725602790,726094118,726585778,\n  727077772,727570098,728062758,728555752,729049080,729542741,730036737,730531067,731025732,731520732,732016067,732511738,733007744,\n};\n\nvoid Freqlut::init(float sample_rate) {\n}\n\n#else\n\nint32_t lut[N_SAMPLES + 1];\n\nvoid Freqlut::init(float sample_rate) {\n  double y = (1LL << (24 + MAX_LOGFREQ_INT)) / sample_rate;\n  double inc = pow(2, 1.0 / N_SAMPLES);\n  for (int i = 0; i < N_SAMPLES + 1; i++) {\n    lut[i] = (int32_t)floor(y + 0.5);\n    y *= inc;\n  }\n}\n\n#endif\n\n// Note: if logfreq is more than 20.0, the results will be inaccurate. However,\n// that will be many times the Nyquist rate.\nint32_t Freqlut::lookup(int32_t logfreq) {\n  int ix = (logfreq & 0xffffff) >> SAMPLE_SHIFT;\n\n  int32_t y0 = lut[ix];\n  int32_t y1 = lut[ix + 1];\n  int lowbits = logfreq & ((1 << SAMPLE_SHIFT) - 1);\n  int32_t y = y0 + ((((int64_t)(y1 - y0) * (int64_t)lowbits)) >> SAMPLE_SHIFT);\n  int hibits = logfreq >> 24;\n  return y >> (MAX_LOGFREQ_INT - hibits);\n}\n"
  },
  {
    "path": "lib/msfa/freqlut.h",
    "content": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#pragma once\n\nclass Freqlut {\n public:\n  static void init(float sample_rate);\n  static int32_t lookup(int32_t logfreq);\n};\n"
  },
  {
    "path": "lib/msfa/lfo.cc",
    "content": "/*\r\n * Copyright 2013 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n// Low frequency oscillator, compatible with DX7\r\n\r\n#include \"synth.h\"\r\n\r\n#include \"sin.h\"\r\n#include \"lfo.h\"\r\n\r\nuint32_t Lfo::unit_;\r\n\r\nvoid Lfo::init(float sample_rate) {\r\n    // constant is 1 << 32 / 15.5s / 11\r\n    Lfo::unit_ = (int32_t)(N * 25190424 / sample_rate + 0.5f);\r\n}\r\n\r\nvoid Lfo::reset(const uint8_t params[6]) {\r\n    int rate = params[0];  // 0..99\r\n    int sr = rate == 0 ? 1 : (165 * rate) >> 6;\r\n    sr *= sr < 160 ? 11 : (11 + ((sr - 160) >> 4));\r\n    delta_ = unit_ * sr;\r\n    int a = 99 - params[1];  // LFO delay\r\n    if (a == 99) {\r\n        delayinc_ = ~0u;\r\n        delayinc2_ = ~0u;\r\n    } else {\r\n        a = (16 + (a & 15)) << (1 + (a >> 4));\r\n        delayinc_ = unit_ * a;\r\n        a &= 0xff80;\r\n        a = max(0x80, a);\r\n        delayinc2_ = unit_ * a;\r\n    }\r\n    waveform_ = params[5];\r\n    sync_ = params[4] != 0;\r\n}\r\n\r\nint32_t Lfo::getsample() {\r\n    phase_ += delta_;\r\n    int32_t x;\r\n    switch (waveform_) {\r\n        case 0:  // triangle\r\n            x = phase_ >> 7;\r\n            x ^= -(phase_ >> 31);\r\n            x &= (1 << 24) - 1;\r\n            return x;\r\n        case 1:  // sawtooth down\r\n            return (~phase_ ^ (1U << 31)) >> 8;\r\n        case 2:  // sawtooth up\r\n            return (phase_ ^ (1U << 31)) >> 8;\r\n        case 3:  // square\r\n            return ((~phase_) >> 7) & (1 << 24);\r\n        case 4:  // sine\r\n            return (1 << 23) + (Sin::lookup(phase_ >> 8) >> 1);\r\n        case 5:  // s&h\r\n            if (phase_ < delta_) {\r\n                randstate_ = (randstate_ * 179 + 17) & 0xff;\r\n            }\r\n            x = randstate_ ^ 0x80;\r\n            return (x + 1) << 16;\r\n    }\r\n    return 1 << 23;\r\n}\r\n\r\nint32_t Lfo::getdelay() {\r\n    uint32_t delta = delaystate_ < (1U << 31) ? delayinc_ : delayinc2_;\r\n    uint64_t d = ((uint64_t)delaystate_) + delta;\r\n    if (d > ~0u) {\r\n        return 1 << 24;\r\n    }\r\n    delaystate_ = d;\r\n    if (d < (1U << 31)) {\r\n        return 0;\r\n    } else {\r\n        return (d >> 7) & ((1 << 24) - 1);\r\n    }\r\n}\r\n\r\nvoid Lfo::keydown() {\r\n    if (sync_) {\r\n        phase_ = (1U << 31) - 1;\r\n    }\r\n    delaystate_ = 0;\r\n}\r\n"
  },
  {
    "path": "lib/msfa/lfo.h",
    "content": "/*\r\n * Copyright 2013 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n// Low frequency oscillator, compatible with DX7\r\n\r\n#pragma once\r\n\r\nclass Lfo {\r\n public:\r\n  static void init(float sample_rate);\r\n  void reset(const uint8_t params[6]);\r\n\r\n  // result is 0..1 in Q24\r\n  int32_t getsample();\r\n\r\n  // result is 0..1 in Q24\r\n  int32_t getdelay();\r\n\r\n  void keydown();\r\n private:\r\n  static uint32_t unit_;\r\n\r\n  uint32_t phase_;  // Q32\r\n  uint32_t delta_;\r\n  uint8_t waveform_;\r\n  uint8_t randstate_;\r\n  bool sync_;\r\n\r\n  uint32_t delaystate_;\r\n  uint32_t delayinc_;\r\n  uint32_t delayinc2_;\r\n};\r\n"
  },
  {
    "path": "lib/msfa/midinotes.h",
    "content": "/*************************************************\n   MIDI note values\n *************************************************/\n\n#ifndef _MIDINOTES_H\n#define _MIDINOTES_H\n\n#define MIDI_A0   21\n#define MIDI_AIS0 22\n#define MIDI_B0   23\n#define MIDI_C1   24\n#define MIDI_CIS1 25\n#define MIDI_D1   26\n#define MIDI_DIS1 27\n#define MIDI_E1   28\n#define MIDI_F1   29\n#define MIDI_FIS1 30\n#define MIDI_G1   31\n#define MIDI_GIS1 32\n#define MIDI_A1   33\n#define MIDI_AIS1 34\n#define MIDI_B1   35\n#define MIDI_C2   36\n#define MIDI_CIS2 37\n#define MIDI_D2   38\n#define MIDI_DIS2 39\n#define MIDI_E2   40\n#define MIDI_F2   41\n#define MIDI_FIS2 42\n#define MIDI_G2   43\n#define MIDI_GIS2 44\n#define MIDI_A2   45\n#define MIDI_AIS2 46\n#define MIDI_B2   47\n#define MIDI_C3   48\n#define MIDI_CIS3 49\n#define MIDI_D3   50\n#define MIDI_DIS3 51\n#define MIDI_E3   52\n#define MIDI_F3   53\n#define MIDI_FIS3 54\n#define MIDI_G3   55\n#define MIDI_GIS3 56\n#define MIDI_A3   57\n#define MIDI_AIS3 58\n#define MIDI_B3   59\n#define MIDI_C4   60\n#define MIDI_CIS4 61\n#define MIDI_D4   62\n#define MIDI_DIS4 63\n#define MIDI_E4   64\n#define MIDI_F4   65\n#define MIDI_FIS4 66\n#define MIDI_G4   67\n#define MIDI_GIS4 68\n#define MIDI_A4   69\n#define MIDI_AIS4 70\n#define MIDI_B4   71\n#define MIDI_C5   72\n#define MIDI_CIS5 73\n#define MIDI_D5   74\n#define MIDI_DIS5 75\n#define MIDI_E5   76\n#define MIDI_F5   77\n#define MIDI_FIS5 78\n#define MIDI_G5   79\n#define MIDI_GIS5 80\n#define MIDI_A5   81\n#define MIDI_AIS5 82\n#define MIDI_B5   83\n#define MIDI_C6   84\n#define MIDI_CIS6 85\n#define MIDI_D6   86\n#define MIDI_DIS6 87\n#define MIDI_E6   88\n#define MIDI_F6   89\n#define MIDI_FIS6 90\n#define MIDI_G6   91\n#define MIDI_GIS6 92\n#define MIDI_A6   93\n#define MIDI_AIS6 94\n#define MIDI_B6   95\n#define MIDI_C7   96\n#define MIDI_CIS7 97\n#define MIDI_D7   98\n#define MIDI_DIS7 99\n#define MIDI_E7   100\n#define MIDI_F7   101\n#define MIDI_FIS7 102\n#define MIDI_G7   103\n#define MIDI_GIS7 104\n#define MIDI_A7   105\n#define MIDI_AIS7 106\n#define MIDI_B7   107\n#define MIDI_C8   108\n\n#endif\n"
  },
  {
    "path": "lib/msfa/module.h",
    "content": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef SYNTH_MODULE_H\n#define SYNTH_MODULE_H\n\n#include <stdint.h>\n\nclass Module {\n public:\n  static const int lg_n = 6;\n  static const int n = 1 << lg_n;\n  virtual void process(const int32_t **inbufs, const int32_t *control_in,\n\t\t\t\t\t   const int32_t *control_last, int32_t **outbufs) = 0;\n};\n\n#endif  // SYNTH_MODULE_H\n\n"
  },
  {
    "path": "lib/msfa/patch.cc",
    "content": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include <cstring>\n\n#include \"patch.h\"\n\nvoid UnpackPatch(const char bulk[128], char patch[156]) {\n\tfor (int op = 0; op < 6; op++) {\n\t\t// eg rate and level, brk pt, depth, scaling\n\t\tmemcpy(patch + op * 21, bulk + op * 17, 11);\n\t\tchar leftrightcurves = bulk[op * 17 + 11];\n\t\tpatch[op * 21 + 11] = leftrightcurves & 3;\n\t\tpatch[op * 21 + 12] = (leftrightcurves >> 2) & 3;\n\t\tchar detune_rs = bulk[op * 17 + 12];\n\t\tpatch[op * 21 + 13] = detune_rs & 7;\n\t\tpatch[op * 21 + 20] = detune_rs >> 3;\n\t\tchar kvs_ams = bulk[op * 17 + 13];\n\t\tpatch[op * 21 + 14] = kvs_ams & 3;\n\t\tpatch[op * 21 + 15] = kvs_ams >> 2;\n\t\tpatch[op * 21 + 16] = bulk[op * 17 + 14];  // output level\n\t\tchar fcoarse_mode = bulk[op * 17 + 15];\n\t\tpatch[op * 21 + 17] = fcoarse_mode & 1;\n\t\tpatch[op * 21 + 18] = fcoarse_mode >> 1;\n\t\tpatch[op * 21 + 19] = bulk[op * 17 + 16];  // fine freq\n\t}\n\tmemcpy(patch + 126, bulk + 102, 9);  // pitch env, algo\n\tchar oks_fb = bulk[111];\n\tpatch[135] = oks_fb & 7;\n\tpatch[136] = oks_fb >> 3;\n\tmemcpy(patch + 137, bulk + 112, 4);  // lfo\n\tchar lpms_lfw_lks = bulk[116];\n\tpatch[141] = lpms_lfw_lks & 1;\n\tpatch[142] = (lpms_lfw_lks >> 1) & 7;\n\tpatch[143] = lpms_lfw_lks >> 4;\n\tmemcpy(patch + 144, bulk + 117, 11);  // transpose, name\n\tpatch[155] = 0x3f;  // operator on/off\n}\n\nvoid PackPatch(const char patch[156], char bulk[128]) {\n    for (int op = 0; op < 6; op++) {\n        memcpy(bulk + op * 17, patch + op * 21, 11);\n        bulk[op * 17 + 11] = (patch[op * 21 + 11] & 3) | ((patch[op * 21 + 12] & 3) << 2);\n        bulk[op * 17 + 12] = (patch[op * 21 + 13] & 7) | ((patch[op * 21 + 20]) << 3);\n        bulk[op * 17 + 13] = (patch[op * 21 + 14] & 3) | ((patch[op * 21 + 15]) << 2);\n        bulk[op * 17 + 14] = patch[op * 21 + 16];\n        bulk[op * 17 + 15] = (patch[op * 21 + 17] & 1) | ((patch[op * 21 + 18]) << 1);\n\t\tbulk[op * 17 + 16] = patch[op * 21 + 19];\n    }\n    memcpy(bulk + 102, patch + 126, 9);\n    bulk[111] = (patch[135] & 7) | ((patch[136]) << 3);\n    memcpy(bulk + 112, patch + 137, 4);\n    bulk[116] = (patch[141] & 1) | ((patch[142] & 7) << 1) | ((patch[143] & 15) << 4);\n    memcpy(bulk + 117, patch + 144, 11);\n}"
  },
  {
    "path": "lib/msfa/patch.h",
    "content": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef SYNTH_PATCH_H_\n#define SYNTH_PATCH_H_\n\nvoid UnpackPatch(const char bulk[128], char patch[156]);\nvoid PackPatch(const char patch[156], char bulk[128]);\n\n#endif"
  },
  {
    "path": "lib/msfa/pitchenv.cc",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#include \"synth.h\"\r\n#include \"pitchenv.h\"\r\n\r\nint PitchEnv::unit_;\r\n\r\nvoid PitchEnv::init(float sample_rate) {\r\n  unit_ = N * (1 << 24) / (21.3f * sample_rate) + 0.5f;\r\n}\r\n\r\nconst uint8_t pitchenv_rate[] = {\r\n  1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12,\r\n  12, 13, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24,\r\n  25, 26, 27, 28, 30, 31, 33, 34, 36, 37, 38, 39, 41, 42, 44, 46, 47,\r\n  49, 51, 53, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 79, 82,\r\n  85, 88, 91, 94, 98, 102, 106, 110, 115, 120, 125, 130, 135, 141, 147,\r\n  153, 159, 165, 171, 178, 185, 193, 202, 211, 232, 243, 254, 255\r\n};\r\n\r\nconst int8_t pitchenv_tab[] = {\r\n  -128, -116, -104, -95, -85, -76, -68, -61, -56, -52, -49, -46, -43,\r\n  -41, -39, -37, -35, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24,\r\n  -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10,\r\n  -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,\r\n  11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,\r\n  28, 29, 30, 31, 32, 33, 34, 35, 38, 40, 43, 46, 49, 53, 58, 65, 73,\r\n  82, 92, 103, 115, 127\r\n};\r\n\r\nvoid PitchEnv::set(const int r[4], const int l[4]) {\r\n  for (int i = 0; i < 4; i++) {\r\n    rates_[i] = r[i];\r\n    levels_[i] = l[i];\r\n  }\r\n  level_ = pitchenv_tab[l[3]] << 19;\r\n  down_ = true;\r\n  advance(0);\r\n}\r\n\r\nint32_t PitchEnv::getsample() {\r\n  if (ix_ < 3 || ((ix_ < 4) && !down_)) {\r\n    if (rising_) {\r\n      level_ += inc_;\r\n      if (level_ >= targetlevel_) {\r\n        level_ = targetlevel_;\r\n        advance(ix_ + 1);\r\n      }\r\n    } else {  // !rising\r\n      level_ -= inc_;\r\n      if (level_ <= targetlevel_) {\r\n        level_ = targetlevel_;\r\n        advance(ix_ + 1);\r\n      }\r\n    }\r\n  }\r\n  return level_;\r\n}\r\n\r\nvoid PitchEnv::keydown(bool d) {\r\n  if (down_ != d) {\r\n    down_ = d;\r\n    advance(d ? 0 : 3);\r\n  }\r\n}\r\n\r\nvoid PitchEnv::advance(int newix) {\r\n  ix_ = newix;\r\n  if (ix_ < 4) {\r\n    int newlevel = levels_[ix_];\r\n    targetlevel_ = pitchenv_tab[newlevel] << 19;\r\n    rising_ = (targetlevel_ > level_);\r\n    inc_ = pitchenv_rate[rates_[ix_]] * unit_;\r\n  }\r\n}\r\n\r\nvoid PitchEnv::getPosition(char *step) {\r\n  *step = ix_;\r\n}\r\n\r\n\r\n"
  },
  {
    "path": "lib/msfa/pitchenv.h",
    "content": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef __PITCHENV_H\n#define __PITCHENV_H\n\n// Computation of the DX7 pitch envelope\n\nclass PitchEnv {\n public:\n  static void init(float sample_rate);\n\n  // The rates and levels arrays are calibrated to match the Dx7 parameters\n  // (ie, value 0..99).\n  void set(const int rates[4], const int levels[4]);\n\n  // Result is in Q24/octave\n  int32_t getsample();\n  void keydown(bool down);\n  void getPosition(char *step);\n private:\n  static int unit_;\n  int rates_[4];\n  int levels_[4];\n  int32_t level_;\n  int targetlevel_;\n  bool rising_;\n  int ix_;\n  int inc_;\n\n  bool down_;\n\n  void advance(int newix);\n};\n\nextern const uint8_t pitchenv_rate[];\nextern const int8_t pitchenv_tab[];\n\n #endif  // __PITCHENV_H\n\n"
  },
  {
    "path": "lib/msfa/porta.cc",
    "content": "/*\n   Copyright 2019 Jean Pierre Cimalando.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n#include <math.h>\n#include \"porta.h\"\n#include \"synth.h\"\n\nvoid Porta::init_sr(float sampleRate)\n{\n  // compute portamento for CC 7-bit range\n\n  for (unsigned int i = 0; i < 128; ++i) {\n    // number of semitones travelled\n    auto sps = 350.f * powf(2.0, -0.062f * i);  // per second\n    auto spf = sps / sampleRate;              // per frame\n    auto spp = spf * N;                       // per period\n    const int step = (1 << 24) / 12;\n    rates[i] = (int32_t)(0.5f + step * spp);    // to pitch units\n  }\n}\n\nint32_t Porta::rates[128];\n"
  },
  {
    "path": "lib/msfa/porta.h",
    "content": "/*\n   Copyright 2019 Jean Pierre Cimalando.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n\n#ifndef SYNTH_PORTA_H_\n#define SYNTH_PORTA_H_\n\n#include <stdint.h>\n\nstruct Porta {\n  public:\n    static void init_sr(float sampleRate);\n    static int32_t rates[128];\n};\n\n#endif  // SYNTH_PORTA_H_\n"
  },
  {
    "path": "lib/msfa/sin.cc",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#define _USE_MATH_DEFINES\r\n#include <math.h>\r\n\r\n#include \"synth.h\"\r\n#include \"sin.h\"\r\n\r\n#if 1 //eh2k\r\n\r\n#ifndef FLASHMEM\r\n#include \"pgmspace.h\"\r\n#endif\r\n\r\nconst int32_t sintab[2048] FLASHMEM = {\r\n    102943, 0, 102939, 102943, 102932, 205882, 102920, 308814, 102904, 411734, 102885, 514638, 102861, 617523, 102835, 720384, 102804, 823219, 102768, 926023, 102730, 1028791,\r\n    102688, 1131521, 102641, 1234209, 102590, 1336850, 102536, 1439440, 102479, 1541976, 102416, 1644455, 102351, 1746871, 102281, 1849222, 102207, 1951503, 102131, 2053710, 102049, 2155841,\r\n    101964, 2257890, 101875, 2359854, 101782, 2461729, 101686, 2563511, 101586, 2665197, 101482, 2766783, 101373, 2868265, 101262, 2969638, 101146, 3070900, 101026, 3172046, 100904, 3273072,\r\n    100776, 3373976, 100646, 3474752, 100511, 3575398, 100372, 3675909, 100231, 3776281, 100084, 3876512, 99935, 3976596, 99781, 4076531, 99624, 4176312, 99463, 4275936, 99299, 4375399,\r\n    99129, 4474698, 98958, 4573827, 98782, 4672785, 98602, 4771567, 98418, 4870169, 98232, 4968587, 98041, 5066819, 97846, 5164860, 97649, 5262706, 97446, 5360355, 97241, 5457801,\r\n    97032, 5555042, 96819, 5652074, 96602, 5748893, 96383, 5845495, 96159, 5941878, 95931, 6038037, 95701, 6133968, 95466, 6229669, 95228, 6325135, 94986, 6420363, 94741, 6515349,\r\n    94492, 6610090, 94239, 6704582, 93984, 6798821, 93724, 6892805, 93461, 6986529, 93194, 7079990, 92925, 7173184, 92650, 7266109, 92374, 7358759, 92093, 7451133, 91810, 7543226,\r\n    91521, 7635036, 91231, 7726557, 90937, 7817788, 90639, 7908725, 90337, 7999364, 90033, 8089701, 89725, 8179734, 89414, 8269459, 89099, 8358873, 88781, 8447972, 88460, 8536753,\r\n    88135, 8625213, 87806, 8713348, 87476, 8801154, 87141, 8888630, 86802, 8975771, 86462, 9062573, 86117, 9149035, 85770, 9235152, 85418, 9320922, 85065, 9406340, 84707, 9491405,\r\n    84346, 9576112, 83983, 9660458, 83616, 9744441, 83246, 9828057, 82873, 9911303, 82496, 9994176, 82117, 10076672, 81735, 10158789, 81349, 10240524, 80961, 10321873, 80569, 10402834,\r\n    80174, 10483403, 79776, 10563577, 79376, 10643353, 78972, 10722729, 78565, 10801701, 78156, 10880266, 77743, 10958422, 77328, 11036165, 76909, 11113493, 76488, 11190402, 76063, 11266890,\r\n    75637, 11342953, 75207, 11418590, 74774, 11493797, 74338, 11568571, 73900, 11642909, 73459, 11716809, 73015, 11790268, 72569, 11863283, 72119, 11935852, 71667, 12007971, 71212, 12079638,\r\n    70754, 12150850, 70295, 12221604, 69832, 12291899, 69366, 12361731, 68898, 12431097, 68428, 12499995, 67955, 12568423, 67478, 12636378, 67001, 12703856, 66519, 12770857, 66037, 12837376,\r\n    65550, 12903413, 65062, 12968963, 64572, 13034025, 64078, 13098597, 63583, 13162675, 63085, 13226258, 62585, 13289343, 62081, 13351928, 61577, 13414009, 61070, 13475586, 60559, 13536656,\r\n    60048, 13597215, 59534, 13657263, 59017, 13716797, 58499, 13775814, 57977, 13834313, 57455, 13892290, 56930, 13949745, 56402, 14006675, 55872, 14063077, 55342, 14118949, 54807, 14174291,\r\n    54272, 14229098, 53734, 14283370, 53194, 14337104, 52652, 14390298, 52109, 14442950, 51563, 14495059, 51015, 14546622, 50466, 14597637, 49914, 14648103, 49361, 14698017, 48805, 14747378,\r\n    48249, 14796183, 47689, 14844432, 47129, 14892121, 46567, 14939250, 46002, 14985817, 45436, 15031819, 44869, 15077255, 44299, 15122124, 43729, 15166423, 43155, 15210152, 42582, 15253307,\r\n    42005, 15295889, 41428, 15337894, 40849, 15379322, 40269, 15420171, 39686, 15460440, 39103, 15500126, 38518, 15539229, 37931, 15577747, 37344, 15615678, 36754, 15653022, 36163, 15689776,\r\n    35571, 15725939, 34978, 15761510, 34383, 15796488, 33787, 15830871, 33190, 15864658, 32591, 15897848, 31992, 15930439, 31390, 15962431, 30788, 15993821, 30185, 16024609, 29581, 16054794,\r\n    28975, 16084375, 28368, 16113350, 27761, 16141718, 27152, 16169479, 26542, 16196631, 25931, 16223173, 25320, 16249104, 24706, 16274424, 24093, 16299130, 23479, 16323223, 22863, 16346702,\r\n    22247, 16369565, 21630, 16391812, 21011, 16413442, 20393, 16434453, 19774, 16454846, 19153, 16474620, 18532, 16493773, 17911, 16512305, 17288, 16530216, 16665, 16547504, 16041, 16564169,\r\n    15418, 16580210, 14792, 16595628, 14167, 16610420, 13541, 16624587, 12915, 16638128, 12288, 16651043, 11661, 16663331, 11032, 16674992, 10405, 16686024, 9776, 16696429, 9147, 16706205,\r\n    8517, 16715352, 7888, 16723869, 7258, 16731757, 6628, 16739015, 5997, 16745643, 5367, 16751640, 4735, 16757007, 4105, 16761742, 3474, 16765847, 2842, 16769321, 2210, 16772163,\r\n    1579, 16774373, 948, 16775952, 316, 16776900, -316, 16777216, -948, 16776900, -1579, 16775952, -2210, 16774373, -2842, 16772163, -3474, 16769321, -4105, 16765847, -4735, 16761742,\r\n    -5367, 16757007, -5997, 16751640, -6628, 16745643, -7258, 16739015, -7888, 16731757, -8518, 16723869, -9146, 16715351, -9776, 16706205, -10405, 16696429, -11033, 16686024, -11660, 16674991,\r\n    -12288, 16663331, -12915, 16651043, -13541, 16638128, -14167, 16624587, -14792, 16610420, -15418, 16595628, -16041, 16580210, -16665, 16564169, -17289, 16547504, -17910, 16530215, -18532, 16512305,\r\n    -19154, 16493773, -19773, 16474619, -20393, 16454846, -21012, 16434453, -21629, 16413441, -22247, 16391812, -22863, 16369565, -23479, 16346702, -24093, 16323223, -24707, 16299130, -25319, 16274423,\r\n    -25931, 16249104, -26542, 16223173, -27152, 16196631, -27761, 16169479, -28368, 16141718, -28975, 16113350, -29581, 16084375, -30185, 16054794, -30788, 16024609, -31391, 15993821, -31991, 15962430,\r\n    -32591, 15930439, -33190, 15897848, -33787, 15864658, -34383, 15830871, -34978, 15796488, -35571, 15761510, -36164, 15725939, -36754, 15689775, -37343, 15653021, -37931, 15615678, -38518, 15577747,\r\n    -39103, 15539229, -39686, 15500126, -40269, 15460440, -40849, 15420171, -41428, 15379322, -42005, 15337894, -42582, 15295889, -43156, 15253307, -43728, 15210151, -44299, 15166423, -44869, 15122124,\r\n    -45436, 15077255, -46002, 15031819, -46567, 14985817, -47129, 14939250, -47689, 14892121, -48249, 14844432, -48806, 14796183, -49360, 14747377, -49914, 14698017, -50466, 14648103, -51015, 14597637,\r\n    -51563, 14546622, -52109, 14495059, -52652, 14442950, -53195, 14390298, -53734, 14337103, -54271, 14283369, -54808, 14229098, -55341, 14174290, -55873, 14118949, -56402, 14063076, -56929, 14006674,\r\n    -57455, 13949745, -57978, 13892290, -58498, 13834312, -59018, 13775814, -59533, 13716796, -60048, 13657263, -60560, 13597215, -61069, 13536655, -61577, 13475586, -62082, 13414009, -62584, 13351927,\r\n    -63085, 13289343, -63583, 13226258, -64078, 13162675, -64572, 13098597, -65062, 13034025, -65551, 12968963, -66036, 12903412, -66520, 12837376, -67000, 12770856, -67479, 12703856, -67955, 12636377,\r\n    -68427, 12568422, -68899, 12499995, -69366, 12431096, -69832, 12361730, -70294, 12291898, -70755, 12221604, -71212, 12150849, -71667, 12079637, -72119, 12007970, -72568, 11935851, -73015, 11863283,\r\n    -73459, 11790268, -73901, 11716809, -74338, 11642908, -74774, 11568570, -75207, 11493796, -75636, 11418589, -76064, 11342953, -76488, 11266889, -76909, 11190401, -77328, 11113492, -77743, 11036164,\r\n    -78155, 10958421, -78566, 10880266, -78972, 10801700, -79375, 10722728, -79777, 10643353, -80174, 10563576, -80569, 10483402, -80960, 10402833, -81349, 10321873, -81735, 10240524, -82117, 10158789,\r\n    -82497, 10076672, -82873, 9994175, -83245, 9911302, -83616, 9828057, -83983, 9744441, -84347, 9660458, -84707, 9576111, -85064, 9491404, -85419, 9406340, -85769, 9320921, -86117, 9235152,\r\n    -86462, 9149035, -86803, 9062573, -87141, 8975770, -87475, 8888629, -87807, 8801154, -88135, 8713347, -88459, 8625212, -88781, 8536753, -89099, 8447972, -89414, 8358873, -89725, 8269459,\r\n    -90033, 8179734, -90338, 8089701, -90639, 7999363, -90936, 7908724, -91231, 7817788, -91522, 7726557, -91809, 7635035, -92093, 7543226, -92374, 7451133, -92651, 7358759, -92924, 7266108,\r\n    -93195, 7173184, -93461, 7079989, -93724, 6986528, -93984, 6892804, -94239, 6798820, -94492, 6704581, -94741, 6610089, -94986, 6515348, -95228, 6420362, -95466, 6325134, -95700, 6229668,\r\n    -95932, 6133968, -96159, 6038036, -96382, 5941877, -96603, 5845495, -96819, 5748892, -97032, 5652073, -97241, 5555041, -97446, 5457800, -97648, 5360354, -97847, 5262706, -98040, 5164859,\r\n    -98232, 5066819, -98419, 4968587, -98602, 4870168, -98782, 4771566, -98957, 4672784, -99130, 4573827, -99298, 4474697, -99463, 4375399, -99624, 4275936, -99782, 4176312, -99934, 4076530,\r\n    -100085, 3976596, -100230, 3876511, -100373, 3776281, -100511, 3675908, -100645, 3575397, -100777, 3474752, -100903, 3373975, -101027, 3273072, -101146, 3172045, -101261, 3070899, -101374, 2969638,\r\n    -101481, 2868264, -101586, 2766783, -101686, 2665197, -101783, 2563511, -101875, 2461728, -101964, 2359853, -102049, 2257889, -102130, 2155840, -102208, 2053710, -102281, 1951502, -102350, 1849221,\r\n    -102417, 1746871, -102478, 1644454, -102536, 1541976, -102591, 1439440, -102641, 1336849, -102687, 1234208, -102730, 1131521, -102769, 1028791, -102803, 926022, -102835, 823219, -102862, 720384,\r\n    -102885, 617522, -102904, 514637, -102920, 411733, -102931, 308813, -102939, 205882, -102943, 102943, -102943, 0, -102939, -102943, -102932, -205882, -102920, -308814, -102904, -411734,\r\n    -102885, -514638, -102861, -617523, -102835, -720384, -102804, -823219, -102768, -926023, -102730, -1028791, -102688, -1131521, -102641, -1234209, -102590, -1336850, -102536, -1439440, -102479, -1541976,\r\n    -102416, -1644455, -102351, -1746871, -102281, -1849222, -102207, -1951503, -102131, -2053710, -102049, -2155841, -101964, -2257890, -101875, -2359854, -101782, -2461729, -101686, -2563511, -101586, -2665197,\r\n    -101482, -2766783, -101373, -2868265, -101262, -2969638, -101146, -3070900, -101026, -3172046, -100904, -3273072, -100776, -3373976, -100646, -3474752, -100511, -3575398, -100372, -3675909, -100231, -3776281,\r\n    -100084, -3876512, -99935, -3976596, -99781, -4076531, -99624, -4176312, -99463, -4275936, -99299, -4375399, -99129, -4474698, -98958, -4573827, -98782, -4672785, -98602, -4771567, -98418, -4870169,\r\n    -98232, -4968587, -98041, -5066819, -97846, -5164860, -97649, -5262706, -97446, -5360355, -97241, -5457801, -97032, -5555042, -96819, -5652074, -96602, -5748893, -96383, -5845495, -96159, -5941878,\r\n    -95931, -6038037, -95701, -6133968, -95466, -6229669, -95228, -6325135, -94986, -6420363, -94741, -6515349, -94492, -6610090, -94239, -6704582, -93984, -6798821, -93724, -6892805, -93461, -6986529,\r\n    -93194, -7079990, -92925, -7173184, -92650, -7266109, -92374, -7358759, -92093, -7451133, -91810, -7543226, -91521, -7635036, -91231, -7726557, -90937, -7817788, -90639, -7908725, -90337, -7999364,\r\n    -90033, -8089701, -89725, -8179734, -89414, -8269459, -89099, -8358873, -88781, -8447972, -88460, -8536753, -88135, -8625213, -87806, -8713348, -87476, -8801154, -87141, -8888630, -86802, -8975771,\r\n    -86462, -9062573, -86117, -9149035, -85770, -9235152, -85418, -9320922, -85065, -9406340, -84707, -9491405, -84346, -9576112, -83983, -9660458, -83616, -9744441, -83246, -9828057, -82873, -9911303,\r\n    -82496, -9994176, -82117, -10076672, -81735, -10158789, -81349, -10240524, -80961, -10321873, -80569, -10402834, -80174, -10483403, -79776, -10563577, -79376, -10643353, -78972, -10722729, -78565, -10801701,\r\n    -78156, -10880266, -77743, -10958422, -77328, -11036165, -76909, -11113493, -76488, -11190402, -76063, -11266890, -75637, -11342953, -75207, -11418590, -74774, -11493797, -74338, -11568571, -73900, -11642909,\r\n    -73459, -11716809, -73015, -11790268, -72569, -11863283, -72119, -11935852, -71667, -12007971, -71212, -12079638, -70754, -12150850, -70295, -12221604, -69832, -12291899, -69366, -12361731, -68898, -12431097,\r\n    -68428, -12499995, -67955, -12568423, -67478, -12636378, -67001, -12703856, -66519, -12770857, -66037, -12837376, -65550, -12903413, -65062, -12968963, -64572, -13034025, -64078, -13098597, -63583, -13162675,\r\n    -63085, -13226258, -62585, -13289343, -62081, -13351928, -61577, -13414009, -61070, -13475586, -60559, -13536656, -60048, -13597215, -59534, -13657263, -59017, -13716797, -58499, -13775814, -57977, -13834313,\r\n    -57455, -13892290, -56930, -13949745, -56402, -14006675, -55872, -14063077, -55342, -14118949, -54807, -14174291, -54272, -14229098, -53734, -14283370, -53194, -14337104, -52652, -14390298, -52109, -14442950,\r\n    -51563, -14495059, -51015, -14546622, -50466, -14597637, -49914, -14648103, -49361, -14698017, -48805, -14747378, -48249, -14796183, -47689, -14844432, -47129, -14892121, -46567, -14939250, -46002, -14985817,\r\n    -45436, -15031819, -44869, -15077255, -44299, -15122124, -43729, -15166423, -43155, -15210152, -42582, -15253307, -42005, -15295889, -41428, -15337894, -40849, -15379322, -40269, -15420171, -39686, -15460440,\r\n    -39103, -15500126, -38518, -15539229, -37931, -15577747, -37344, -15615678, -36754, -15653022, -36163, -15689776, -35571, -15725939, -34978, -15761510, -34383, -15796488, -33787, -15830871, -33190, -15864658,\r\n    -32591, -15897848, -31992, -15930439, -31390, -15962431, -30788, -15993821, -30185, -16024609, -29581, -16054794, -28975, -16084375, -28368, -16113350, -27761, -16141718, -27152, -16169479, -26542, -16196631,\r\n    -25931, -16223173, -25320, -16249104, -24706, -16274424, -24093, -16299130, -23479, -16323223, -22863, -16346702, -22247, -16369565, -21630, -16391812, -21011, -16413442, -20393, -16434453, -19774, -16454846,\r\n    -19153, -16474620, -18532, -16493773, -17911, -16512305, -17288, -16530216, -16665, -16547504, -16041, -16564169, -15418, -16580210, -14792, -16595628, -14167, -16610420, -13541, -16624587, -12915, -16638128,\r\n    -12288, -16651043, -11661, -16663331, -11032, -16674992, -10405, -16686024, -9776, -16696429, -9147, -16706205, -8517, -16715352, -7888, -16723869, -7258, -16731757, -6628, -16739015, -5997, -16745643,\r\n    -5367, -16751640, -4735, -16757007, -4105, -16761742, -3474, -16765847, -2842, -16769321, -2210, -16772163, -1579, -16774373, -948, -16775952, -316, -16776900, 316, -16777216, 948, -16776900,\r\n    1579, -16775952, 2210, -16774373, 2842, -16772163, 3474, -16769321, 4105, -16765847, 4735, -16761742, 5367, -16757007, 5997, -16751640, 6628, -16745643, 7258, -16739015, 7888, -16731757,\r\n    8518, -16723869, 9146, -16715351, 9776, -16706205, 10405, -16696429, 11033, -16686024, 11660, -16674991, 12288, -16663331, 12915, -16651043, 13541, -16638128, 14167, -16624587, 14792, -16610420,\r\n    15418, -16595628, 16041, -16580210, 16665, -16564169, 17289, -16547504, 17910, -16530215, 18532, -16512305, 19154, -16493773, 19773, -16474619, 20393, -16454846, 21012, -16434453, 21629, -16413441,\r\n    22247, -16391812, 22863, -16369565, 23479, -16346702, 24093, -16323223, 24707, -16299130, 25319, -16274423, 25931, -16249104, 26542, -16223173, 27152, -16196631, 27761, -16169479, 28368, -16141718,\r\n    28975, -16113350, 29581, -16084375, 30185, -16054794, 30788, -16024609, 31391, -15993821, 31991, -15962430, 32591, -15930439, 33190, -15897848, 33787, -15864658, 34383, -15830871, 34978, -15796488,\r\n    35571, -15761510, 36164, -15725939, 36754, -15689775, 37343, -15653021, 37931, -15615678, 38518, -15577747, 39103, -15539229, 39686, -15500126, 40269, -15460440, 40849, -15420171, 41428, -15379322,\r\n    42005, -15337894, 42582, -15295889, 43156, -15253307, 43728, -15210151, 44299, -15166423, 44869, -15122124, 45436, -15077255, 46002, -15031819, 46567, -14985817, 47129, -14939250, 47689, -14892121,\r\n    48249, -14844432, 48806, -14796183, 49360, -14747377, 49914, -14698017, 50466, -14648103, 51015, -14597637, 51563, -14546622, 52109, -14495059, 52652, -14442950, 53195, -14390298, 53734, -14337103,\r\n    54271, -14283369, 54808, -14229098, 55341, -14174290, 55873, -14118949, 56402, -14063076, 56929, -14006674, 57455, -13949745, 57978, -13892290, 58498, -13834312, 59018, -13775814, 59533, -13716796,\r\n    60048, -13657263, 60560, -13597215, 61069, -13536655, 61577, -13475586, 62082, -13414009, 62584, -13351927, 63085, -13289343, 63583, -13226258, 64078, -13162675, 64572, -13098597, 65062, -13034025,\r\n    65551, -12968963, 66036, -12903412, 66520, -12837376, 67000, -12770856, 67479, -12703856, 67955, -12636377, 68427, -12568422, 68899, -12499995, 69366, -12431096, 69832, -12361730, 70294, -12291898,\r\n    70755, -12221604, 71212, -12150849, 71667, -12079637, 72119, -12007970, 72568, -11935851, 73015, -11863283, 73459, -11790268, 73901, -11716809, 74338, -11642908, 74774, -11568570, 75207, -11493796,\r\n    75636, -11418589, 76064, -11342953, 76488, -11266889, 76909, -11190401, 77328, -11113492, 77743, -11036164, 78155, -10958421, 78566, -10880266, 78972, -10801700, 79375, -10722728, 79777, -10643353,\r\n    80174, -10563576, 80569, -10483402, 80960, -10402833, 81349, -10321873, 81735, -10240524, 82117, -10158789, 82497, -10076672, 82873, -9994175, 83245, -9911302, 83616, -9828057, 83983, -9744441,\r\n    84347, -9660458, 84707, -9576111, 85064, -9491404, 85419, -9406340, 85769, -9320921, 86117, -9235152, 86462, -9149035, 86803, -9062573, 87141, -8975770, 87475, -8888629, 87807, -8801154,\r\n    88135, -8713347, 88459, -8625212, 88781, -8536753, 89099, -8447972, 89414, -8358873, 89725, -8269459, 90033, -8179734, 90338, -8089701, 90639, -7999363, 90936, -7908724, 91231, -7817788,\r\n    91522, -7726557, 91809, -7635035, 92093, -7543226, 92374, -7451133, 92651, -7358759, 92924, -7266108, 93195, -7173184, 93461, -7079989, 93724, -6986528, 93984, -6892804, 94239, -6798820,\r\n    94492, -6704581, 94741, -6610089, 94986, -6515348, 95228, -6420362, 95466, -6325134, 95700, -6229668, 95932, -6133968, 96159, -6038036, 96382, -5941877, 96603, -5845495, 96819, -5748892,\r\n    97032, -5652073, 97241, -5555041, 97446, -5457800, 97648, -5360354, 97847, -5262706, 98040, -5164859, 98232, -5066819, 98419, -4968587, 98602, -4870168, 98782, -4771566, 98957, -4672784,\r\n    99130, -4573827, 99298, -4474697, 99463, -4375399, 99624, -4275936, 99782, -4176312, 99934, -4076530, 100085, -3976596, 100230, -3876511, 100373, -3776281, 100511, -3675908, 100645, -3575397,\r\n    100777, -3474752, 100903, -3373975, 101027, -3273072, 101146, -3172045, 101261, -3070899, 101374, -2969638, 101481, -2868264, 101586, -2766783, 101686, -2665197, 101783, -2563511, 101875, -2461728,\r\n    101964, -2359853, 102049, -2257889, 102130, -2155840, 102208, -2053710, 102281, -1951502, 102350, -1849221, 102417, -1746871, 102478, -1644454, 102536, -1541976, 102591, -1439440, 102641, -1336849,\r\n    102687, -1234208, 102730, -1131521, 102769, -1028791, 102803, -926022, 102835, -823219, 102862, -720384, 102885, -617522, 102904, -514637, 102920, -411733, 102931, -308813, 102939, -205882,\r\n    102943, -102943};\r\n\r\nvoid Sin::init() {\r\n}\r\n\r\n#else\r\n\r\n#define R (1 << 29)\r\n\r\n#ifdef SIN_DELTA\r\nint32_t sintab[SIN_N_SAMPLES << 1];\r\n#else\r\nint32_t sintab[SIN_N_SAMPLES + 1];\r\n#endif\r\n\r\nvoid Sin::init() {\r\n  double dphase = 2 * M_PI / SIN_N_SAMPLES;\r\n  int32_t c = (int32_t)floor(cos(dphase) * (1 << 30) + 0.5);\r\n  int32_t s = (int32_t)floor(sin(dphase) * (1 << 30) + 0.5);\r\n  int32_t u = 1 << 30;\r\n  int32_t v = 0;\r\n  for (int i = 0; i < SIN_N_SAMPLES / 2; i++) {\r\n#ifdef SIN_DELTA\r\n    sintab[(i << 1) + 1] = (v + 32) >> 6;\r\n    sintab[((i + SIN_N_SAMPLES / 2) << 1) + 1] = -((v + 32) >> 6);\r\n#else\r\n    sintab[i] = (v + 32) >> 6;\r\n    sintab[i + SIN_N_SAMPLES / 2] = -((v + 32) >> 6);\r\n#endif\r\n    int32_t t = ((int64_t)u * (int64_t)s + (int64_t)v * (int64_t)c + R) >> 30;\r\n    u = ((int64_t)u * (int64_t)c - (int64_t)v * (int64_t)s + R) >> 30;\r\n    v = t;\r\n  }\r\n#ifdef SIN_DELTA\r\n  for (int i = 0; i < SIN_N_SAMPLES - 1; i++) {\r\n    sintab[i << 1] = sintab[(i << 1) + 3] - sintab[(i << 1) + 1];\r\n  }\r\n  sintab[(SIN_N_SAMPLES << 1) - 2] = -sintab[(SIN_N_SAMPLES << 1) - 1];\r\n#else\r\n  sintab[SIN_N_SAMPLES] = 0;\r\n#endif\r\n}\r\n\r\n#ifndef SIN_INLINE\r\nint32_t Sin::lookup(int32_t phase) {\r\n  const int SHIFT = 24 - SIN_LG_N_SAMPLES;\r\n  int lowbits = phase & ((1 << SHIFT) - 1);\r\n#ifdef SIN_DELTA\r\n  int phase_int = (phase >> (SHIFT - 1)) & ((SIN_N_SAMPLES - 1) << 1);\r\n  int dy = sintab[phase_int];\r\n  int y0 = sintab[phase_int + 1];\r\n\r\n  return y0 + (((int64_t)dy * (int64_t)lowbits) >> SHIFT);\r\n#else \r\n  int phase_int = (phase >> SHIFT) & (SIN_N_SAMPLES - 1);\r\n  int y0 = sintab[phase_int];\r\n  int y1 = sintab[phase_int + 1];\r\n\r\n  return y0 + (((int64_t)(y1 - y0) * (int64_t)lowbits) >> SHIFT);\r\n#endif\r\n}\r\n#endif\r\n\r\n#endif\r\n\r\n#if 0\r\n// The following is an implementation designed not to use any lookup tables,\r\n// based on the following implementation by Basile Graf:\r\n// http://www.rossbencina.com/static/code/sinusoids/even_polynomial_sin_approximation.txt\r\n\r\n#define C0 (1 << 24)\r\n#define C1 (331121857 >> 2)\r\n#define C2 (1084885537 >> 4)\r\n#define C3 (1310449902 >> 6)\r\n\r\nint32_t Sin::compute(int32_t phase) {\r\n  int32_t x = (phase & ((1 << 23) - 1)) - (1 << 22);\r\n  int32_t x2 = ((int64_t)x * (int64_t)x) >> 22;\r\n  int32_t x4 = ((int64_t)x2 * (int64_t)x2) >> 24;\r\n  int32_t x6 = ((int64_t)x2 * (int64_t)x4) >> 24;\r\n  int32_t y = C0 -\r\n    (((int64_t)C1 * (int64_t)x2) >> 24) +\r\n    (((int64_t)C2 * (int64_t)x4) >> 24) -\r\n    (((int64_t)C3 * (int64_t)x6) >> 24);\r\n  y ^= -((phase >> 23) & 1);\r\n  return y;\r\n}\r\n#endif\r\n\r\n#if 1\r\n// coefficients are Chebyshev polynomial, computed by compute_cos_poly.py\r\n#define C8_0 16777216\r\n#define C8_2 -331168742\r\n#define C8_4 1089453524\r\n#define C8_6 -1430910663\r\n#define C8_8 950108533\r\n\r\nint32_t Sin::compute(int32_t phase) {\r\n  int32_t x = (phase & ((1 << 23) - 1)) - (1 << 22);\r\n  int32_t x2 = ((int64_t)x * (int64_t)x) >> 16;\r\n  int32_t y = (((((((((((((int64_t)C8_8\r\n    * (int64_t)x2) >> 32) + C8_6)\r\n    * (int64_t)x2) >> 32) + C8_4)\r\n    * (int64_t)x2) >> 32) + C8_2)\r\n    * (int64_t)x2) >> 32) + C8_0);\r\n  y ^= -((phase >> 23) & 1);\r\n  return y;\r\n}\r\n#endif\r\n\r\n#define C10_0 (1 << 30)\r\n#define C10_2 -1324675874  // scaled * 4\r\n#define C10_4 1089501821\r\n#define C10_6 -1433689867\r\n#define C10_8 1009356886\r\n#define C10_10 -421101352\r\nint32_t Sin::compute10(int32_t phase) {\r\n  int32_t x = (phase & ((1 << 29) - 1)) - (1 << 28);\r\n  int32_t x2 = ((int64_t)x * (int64_t)x) >> 26;\r\n  int32_t y = ((((((((((((((((int64_t)C10_10\r\n    * (int64_t)x2) >> 34) + C10_8)\r\n    * (int64_t)x2) >> 34) + C10_6)\r\n    * (int64_t)x2) >> 34) + C10_4)\r\n    * (int64_t)x2) >> 32) + C10_2)\r\n    * (int64_t)x2) >> 30) + C10_0);\r\n  y ^= -((phase >> 29) & 1);\r\n  return y;\r\n}\r\n"
  },
  {
    "path": "lib/msfa/sin.h",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#pragma once\r\n\r\nclass Sin {\r\n public:\r\n  Sin();\r\n\r\n  static void init();\r\n  static int32_t lookup(int32_t phase);\r\n  static int32_t compute(int32_t phase);\r\n\r\n  // A more accurate sine, both input and output Q30\r\n  static int32_t compute10(int32_t phase);\r\n};\r\n\r\n#define SIN_LG_N_SAMPLES 10\r\n#define SIN_N_SAMPLES (1 << SIN_LG_N_SAMPLES)\r\n\r\n#define SIN_INLINE\r\n\r\n// Use twice as much RAM for the LUT but avoid a little computation\r\n#define SIN_DELTA\r\n\r\n#ifdef SIN_DELTA\r\nextern const int32_t sintab[SIN_N_SAMPLES << 1];\r\n#else\r\nextern const int32_t sintab[SIN_N_SAMPLES + 1];\r\n#endif\r\n\r\n#ifdef SIN_INLINE\r\ninline\r\nint32_t Sin::lookup(int32_t phase) {\r\n  const int SHIFT = 24 - SIN_LG_N_SAMPLES;\r\n  int lowbits = phase & ((1 << SHIFT) - 1);\r\n#ifdef SIN_DELTA\r\n  int phase_int = (phase >> (SHIFT - 1)) & ((SIN_N_SAMPLES - 1) << 1);\r\n  int dy = sintab[phase_int];\r\n  int y0 = sintab[phase_int + 1];\r\n\r\n  return y0 + (((int64_t)dy * (int64_t)lowbits) >> SHIFT);\r\n#else\r\n  int phase_int = (phase >> SHIFT) & (SIN_N_SAMPLES - 1);\r\n  int y0 = sintab[phase_int];\r\n  int y1 = sintab[phase_int + 1];\r\n\r\n  return y0 + (((int64_t)(y1 - y0) * (int64_t)lowbits) >> SHIFT);\r\n#endif\r\n}\r\n#endif\r\n"
  },
  {
    "path": "lib/msfa/synth.h",
    "content": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n#ifndef __SYNTH_H\r\n#define __SYNTH_H\r\n\r\n// This IS not be present on MSVC.\r\n// See http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio\r\n#include <stdint.h>\r\n#ifdef _MSC_VER\r\ntypedef __int32 int32_t;\r\ntypedef unsigned __int32 uint32_t;\r\ntypedef __int16 SInt16;\r\n#endif\r\n\r\nconstexpr static int LG_N = 6;\r\nconstexpr static int N = (1 << LG_N);\r\n\r\n#if defined(__APPLE__)\r\n#include <libkern/OSAtomic.h>\r\n#define SynthMemoryBarrier() OSMemoryBarrier()\r\n#elif defined(__GNUC__)\r\n#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)\r\n#define SynthMemoryBarrier() __sync_synchronize()\r\n#endif\r\n#endif\r\n\r\n\r\n// #undef SynthMemoryBarrier()\r\n\r\n#ifndef SynthMemoryBarrier\r\n// need to understand why this must be defined\r\n// #warning Memory barrier is not enabled\r\n#define SynthMemoryBarrier()\r\n#endif\r\n\r\ntemplate<typename T>\r\ninline static T min(const T& a, const T& b) {\r\n    return a < b ? a : b;\r\n}\r\n\r\ntemplate<typename T>\r\ninline static T max(const T& a, const T& b) {\r\n    return a > b ? a : b;\r\n}\r\n\r\n#define QER(n,b) ( ((float)n)/(1<<b) )\r\n\r\n#endif  // __SYNTH_H\r\n"
  },
  {
    "path": "lib/open303/src/GlobalDefinitions.h",
    "content": "#ifndef GlobalDefinitions_h\r\n#define GlobalDefinitions_h\r\n\r\n#include <float.h>\r\n#include <inttypes.h>\r\n\r\n#define INLINE inline\r\n\r\n#ifndef REAL_T_IS_DOUBLE\r\n#define REAL_T_IS_FLOAT\r\n#endif\r\n\r\n#ifdef REAL_T_IS_FLOAT\r\ntypedef float real_t; //[eh2k]\r\n#else\r\ntypedef double real_t; \r\n#endif\r\n//_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON)\r\n\r\nconstexpr int SAMPLE_RATE = 48000;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// mathematical constants:\r\n\r\n#define PI 3.1415926535897932384626433832795\r\n#define EULER 2.7182818284590452353602874713527\r\n#define SQRT2 1.4142135623730950488016887242097\r\n#define ONE_OVER_SQRT2 0.70710678118654752440084436210485\r\n#define LN10 2.3025850929940456840179914546844\r\n#define ONE_OVER_LN10 0.43429448190325182765112891891661\r\n#define LN2 0.69314718055994530941723212145818\r\n#define ONE_OVER_LN2 1.4426950408889634073599246810019\r\n#define SEMITONE_FACTOR 1.0594630943592952645618252949463\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// type definitions:\r\n\r\n// unsigned 64 bit integers:\r\n#ifdef _MSC_VER\r\ntypedef unsigned __int64 UINT64;\r\n#else\r\ntypedef unsigned long long UINT64;\r\n#endif\r\n\r\n// signed 64 bit integers:\r\n#ifdef _MSC_VER\r\ntypedef signed __int64 INT64;\r\n#else\r\ntypedef signed long long INT64;\r\n#endif\r\n\r\n// unsigned 32 bit integers:\r\n#ifdef _MSC_VER\r\ntypedef unsigned __int32 UINT32;\r\n#else\r\ntypedef unsigned long UINT32;\r\n#endif\r\n\r\n// ...constants for numerical precision issues, denorm, etc.:\r\n#define TINY FLT_MIN\r\n#define EPS DBL_EPSILON\r\n\r\n// define infinity values:\r\n\r\ninline real_t dummyFunction(real_t x) { return x; }\r\n#define INF (1.0/dummyFunction(0.0))\r\n#define NEG_INF (-1.0/dummyFunction(0.0))\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// debug stuff:\r\n\r\n// this will try to break the debugger if one is currently hosting this app:\r\n#ifdef _DEBUG\r\n\r\n#ifdef _MSC_VER\r\n#pragma intrinsic (__debugbreak)\r\n#define DEBUG_BREAK __debugbreak();\r\n#else\r\n#define DEBUG_BREAK {}\r\n#endif\r\n\r\n#else\r\n\r\n#define DEBUG_BREAK {}  // evaluate to no op in release builds\r\n\r\n#endif\r\n\r\n// an replacement of the ASSERT macro\r\n#define rassert(expression)  { if (! (expression)) DEBUG_BREAK }\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// bit twiddling:\r\n\r\n//extract the exponent from a IEEE 754 real_ting point number (single and double precision):\r\n#ifdef REAL_T_IS_FLOAT\r\n#define EXPOF(value) (((*((reinterpret_cast<UINT32 *>(&value)))&0x7FFFFFFF)>>23)-127)\r\n#else\r\n#define EXPOF(value) (((*((reinterpret_cast<UINT64 *>(&value)))&0x7FFFFFFFFFFFFFFFULL)>>52)-1023)\r\n#endif\r\n// ULL indicates an unsigned long long literal constant\r\n\r\n#endif\r\n"
  },
  {
    "path": "lib/open303/src/GlobalFunctions.cpp",
    "content": "#include \"GlobalFunctions.h\"\r\n\r\n\r\n"
  },
  {
    "path": "lib/open303/src/GlobalFunctions.h",
    "content": "#ifndef GlobalFunctions_h\r\n#define GlobalFunctions_h\r\n\r\n#include <math.h>\r\n#include <stdlib.h>\r\n#include \"GlobalDefinitions.h\"\r\n\r\nnamespace rosic { //[eh2k] start namespace\r\n\r\n  //[eh2k]>\r\n  #ifdef REAL_T_IS_FLOAT\r\n  \r\n  INLINE real_t sin(real_t x)\r\n  {\r\n    return sinf(x);\r\n  }\r\n\r\n  INLINE real_t sinh(real_t x)\r\n  {\r\n    return sinhf(x);\r\n  }\r\n\r\n  INLINE real_t cos(real_t x)\r\n  {\r\n    return cosf(x);\r\n  }\r\n\r\n  INLINE real_t cosh(real_t x)\r\n  {\r\n    return coshf(x);\r\n  }\r\n\r\n  INLINE real_t log(real_t x)\r\n  {\r\n    return logf(x);\r\n  }\r\n\r\n  INLINE real_t fabs(real_t x)\r\n  {\r\n    return fabsf(x);\r\n  }\r\n\r\n  INLINE real_t floor(real_t x)\r\n  {\r\n    return floorf(x);\r\n  }\r\n\r\n  INLINE real_t sqrt(real_t x)\r\n  {\r\n    return sqrtf(x);\r\n  }\r\n\r\n  INLINE real_t exp(real_t x)\r\n  {\r\n    return expf(x);\r\n  }\r\n\r\n  INLINE real_t pow(real_t x, real_t y)\r\n  {\r\n    return powf(x, y);\r\n  }\r\n\r\n  INLINE real_t fmod(real_t x, real_t y)\r\n  {\r\n    return fmodf(x, y);\r\n  }\r\n\r\n  INLINE real_t atan(real_t x)\r\n  {\r\n    return atanf(x);\r\n  }\r\n\r\n  INLINE real_t tan(real_t x)\r\n  {\r\n    return tanf(x);\r\n  }\r\n\r\n  INLINE real_t ceil(real_t x)\r\n  {\r\n    return ceilf(x);\r\n  }\r\n  #endif\r\n  //<[eh2k]\r\n\r\n/** This file contains a bunch of useful macros and functions which are not wrapped into the\r\nrosic namespace to facilitate their global use. */\r\n\r\n/** Converts a raw amplitude value/factor to a value in decibels. */\r\nINLINE real_t amp2dB(real_t amp);\r\n\r\n/** Converts a raw amplitude value/factor to a value in decibels with a check, if the amplitude is\r\nclose to zero (to avoid log-of-zero and related errors). */\r\nINLINE real_t amp2dBWithCheck(real_t amp, real_t lowAmplitude = 0.000001);\r\n\r\n/** Returns the index of the maximum value in an array of doubles where the array should be of\r\nlength numValues. */\r\ntemplate <class T>\r\nINLINE int arrayMaxIndex(T* theArray, int numValues);\r\n\r\n/** Returns the index of the minimum value in an array of doubles where the array should be of\r\nlength numValues. */\r\ntemplate <class T>\r\nINLINE int arrayMinIndex(T* theArray, int numValues);\r\n\r\n/** Converts a time-stamp given in beats into seconds acording to a tempo measured in beats per\r\nminute (bpm). */\r\nINLINE real_t beatsToSeconds(real_t beat, real_t bpm);\r\n\r\n/** Converts a value in decibels to a raw amplitude value/factor. */\r\nINLINE real_t dB2amp(real_t x);\r\n\r\n/** Converts an angle in degrees into radiant. */\r\nINLINE real_t degreeToRadiant(real_t degrees);\r\n\r\n/** Frees the memory associated with the pointer ans sets the poiter itself to NULL */\r\n//INLINE void deleteAndNullifyPointer(void *pointer);\r\n\r\n/** Returns the Euclidean distance between points at coordinates (x1,y1), (x2,y2). */\r\nINLINE real_t euclideanDistance(real_t x1, real_t y1, real_t x2, real_t y2);\r\n\r\n/** Calculates the exponential function with base 10. */\r\nINLINE real_t exp10(real_t x);\r\n\r\n/** Calculates the exponential function with base 2. */\r\nINLINE real_t exp2(real_t x);\r\n\r\n/** Calculates the factorial of some integer n >= 0. */\r\n//INLINE int factorial(int n);\r\n\r\n/** Converts a frequency in Hz into a MIDI-note value assuming A4 = 440 Hz. */\r\nINLINE real_t freqToPitch(real_t freq);\r\n\r\n/** Converts a frequency in Hz into a MIDI-note value for tunings different than the\r\ndefault 440 Hz. */\r\nINLINE real_t freqToPitch(real_t freq, real_t masterTuneA4);\r\n\r\n/** Checks a pointer for nullity and if it is not NULL, it calls delete for the associated object\r\nand then sets the pointer to NULL. */\r\nINLINE void ifNotNullDeleteAndSetNull(void* pointer);\r\n\r\n/** Maps an integer index in the range 0...numIndices-1 into a normalized floating point number in \r\nthe range 0...1. */\r\nINLINE float indexToNormalizedValue(int index, int numIndices);\r\n\r\n/** Checks, if x is close to some target-value within some tolerance. */\r\nINLINE bool isCloseTo(real_t x, real_t targetValue, real_t tolerance);\r\n\r\n/** Checks, if x is even. */\r\nINLINE bool isEven(int x);\r\n\r\n/** Checks, if x is odd. */\r\nINLINE bool isOdd(int x);\r\n\r\n/** Checks, if x is a power of 2. */\r\nINLINE bool isPowerOfTwo(unsigned int x);\r\n\r\n/** Calculates the logarithm to base 2. */\r\nINLINE real_t log2(real_t x);\r\n\r\n/** Calculates logarithm to an arbitrary base b. */\r\nINLINE real_t logB(real_t x, real_t b);\r\n\r\n/** Converts a value between inMin and inMax into a value between outMin and outMax where the\r\nmapping is linear for the input and the output. Example: y = linToLin(x, 0.0, 1.0, -96.0, 24.0)\r\nwill map the input x assumed to lie inside 0.0...1.0 to the range between -96.0...24.0. This\r\nfunction is useful to convert between parameter representations between 0.0...1.0 and the\r\nclear-text parameters. */\r\nINLINE real_t linToLin(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax);\r\n\r\n/** Converts a value between inMin and inMax into a value between outMin and outMax where the\r\nmapping of the output is exponential. Example: y = linToExp(x, 0.0, 1.0, 20.0, 20000.0) will map\r\nthe input x assumed to lie inside 0.0...1.0 to the range between 20.0...20000.0 where equal\r\ndifferences in the input lead to equal factors in the output. Make sure that the outMin value is\r\ngreater than zero! */\r\nINLINE real_t linToExp(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax);\r\n\r\n/** Same as linToExp but adds an offset afterwards and compensates for that offset by scaling the\r\noffsetted value so as to hit the outMax correctly. */\r\nINLINE real_t linToExpWithOffset(real_t in, real_t inMin, real_t inMax, real_t outMin,\r\n                                 real_t outMax, real_t offset = 0.0);\r\n\r\n/** The Inverse of \"linToExp\" */\r\nINLINE real_t expToLin(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax);\r\n\r\n/** The Inverse of \"linToExpWithOffset\" */\r\nINLINE real_t expToLinWithOffset(real_t in, real_t inMin, real_t inMax, real_t outMin,\r\n                                 real_t outMax, real_t offset = 0.0);\r\n\r\n/** Returns a power of two which is greater than or equal to the input argument. */\r\ntemplate <class T>\r\nINLINE T nextPowerOfTwo(T x);\r\n\r\n/** Maps a normalized floating point number in the range 0...1 into an integer index in the range \r\n0...numIndices-1. */\r\nINLINE int normalizedValueToIndex(float normalizedValue, int numIndices);\r\n\r\n/** Converts a picth-offset in semitones value into a frequency multiplication factor. */\r\nINLINE real_t pitchOffsetToFreqFactor(real_t pitchOffset);\r\n\r\n/** Converts a MIDI-note value into a frequency in Hz assuming A4 = 440 Hz. */\r\nINLINE real_t pitchToFreq(real_t pitch);\r\n\r\n/** Converts a MIDI-note value into a frequency in Hz for arbitrary master-tunings of A4. */\r\nINLINE real_t pitchToFreq(real_t pitch, real_t masterTuneA4);\r\n\r\n/** Converts an angle in radiant into degrees. */\r\nINLINE real_t radiantToDegree(real_t radiant);\r\n\r\n/** Generates a random number that is uniformly distributed between min and max (inclusive). The\r\nunderlying integer pseudo random number generator is a linear congruential with period length of \r\n2^32. It is based on Numerical Recipies in C (2nd edition), page 284. You may pass a seed to the \r\nfirst call to initialize it - otherwise it will use 0 as seed. A negative number (as in the default \r\nargument) will indicate to not initialize the state and just generate a random number based on the \r\nlast state (which is the case for a typical call). */\r\nINLINE real_t randomUniform(real_t min = 0.0, real_t max = 1.0, int seed = -1);\r\n\r\n/** Returns the nearest integer (as real_t, without typecast). */\r\nINLINE real_t round(real_t x);\r\n\r\n/** Converts a time value in seconds into a time value measured in beats. */\r\nINLINE real_t secondsToBeats(real_t timeInSeconds, real_t bpm);\r\n\r\n/** Returns the sign of x as real_t. */\r\nINLINE real_t sign(real_t x);\r\n\r\n/** Converts a time-stamp given in whole notes into seconds according to a tempo measured in\r\nbeats per minute (bpm). */\r\nINLINE real_t wholeNotesToSeconds(real_t noteValue, real_t bpm);\r\n\r\n//=================================================================================================\r\n//implementation:\r\n\r\nINLINE real_t amp2dB(real_t amp)\r\n{\r\n  return 8.6858896380650365530225783783321 * log(amp);\r\n  //return 20*log10(amp); // naive version\r\n}\r\n\r\nINLINE real_t amp2dBWithCheck(real_t amp, real_t lowAmplitude)\r\n{\r\n  if( amp >= lowAmplitude )\r\n    return 8.6858896380650365530225783783321 * log(amp);\r\n  else\r\n    return 8.6858896380650365530225783783321 * log(lowAmplitude);\r\n}\r\n\r\ntemplate <class T>\r\nINLINE int arrayMaxIndex(T* theArray, int numValues)\r\n{\r\n  int    maxIndex = 0;\r\n  real_t maxValue = theArray[0];\r\n  for(int i=0; i<numValues; i++)\r\n  {\r\n    if( theArray[i] > maxValue )\r\n    {\r\n      maxValue = theArray[i];\r\n      maxIndex = i;\r\n    }\r\n  }\r\n  return maxIndex;\r\n}\r\n\r\ntemplate <class T>\r\nINLINE int arrayMinIndex(T* theArray, int numValues)\r\n{\r\n  int    minIndex = 0;\r\n  real_t minValue = theArray[0];\r\n  for(int i=0; i<numValues; i++)\r\n  {\r\n    if( theArray[i] < minValue )\r\n    {\r\n      minValue = theArray[i];\r\n      minIndex = i;\r\n    }\r\n  }\r\n  return minIndex;\r\n}\r\n\r\nINLINE real_t beatsToSeconds(real_t beat, real_t bpm)\r\n{\r\n  return (60.0/bpm)*beat;\r\n}\r\n\r\nINLINE real_t dB2amp(real_t dB)\r\n{\r\n  return exp(dB * 0.11512925464970228420089957273422);\r\n  //return pow(10.0, (0.05*dB)); // naive, inefficient version\r\n}\r\n\r\nINLINE real_t degreeToRadiant(real_t degrees)\r\n{\r\n  return (PI/180.0)*degrees;\r\n}\r\n\r\n/*\r\nINLINE void deleteAndNullifyPointer(void *pointer)\r\n{\r\n  delete pointer;\r\n  pointer = NULL;\r\n}\r\n*/\r\n\r\nINLINE real_t euclideanDistance(real_t x1, real_t y1, real_t x2, real_t y2)\r\n{\r\n  return sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );\r\n}\r\n\r\nINLINE real_t exp10(real_t x)\r\n{\r\n  return exp(LN10*x);\r\n}\r\n\r\nINLINE real_t exp2(real_t x)\r\n{\r\n  return exp(LN2*x);\r\n}\r\n\r\nINLINE real_t freqToPitch(real_t freq)\r\n{\r\n  return 12.0 * log2(freq/440.0) + 69.0;\r\n}\r\n\r\nINLINE real_t freqToPitch(real_t freq, real_t masterTuneA4)\r\n{\r\n  return 12.0 * log2(freq/masterTuneA4) + 69.0;\r\n}\r\n\r\n/*\r\nINLINE void ifNotNullDeleteAndSetNull(void* pointer)\r\n{\r\n  if( pointer != NULL )\r\n  {\r\n    delete pointer;\r\n    pointer = NULL;\r\n  }\r\n}\r\n*/\r\n\r\nINLINE float indexToNormalizedValue(int index, int numIndices)\r\n{\r\n  return (float) (2*index+1) / (float) (2*numIndices);\r\n}\r\n\r\nINLINE bool isCloseTo(real_t x, real_t targetValue, real_t tolerance)\r\n{\r\n  if( fabs(x-targetValue) <= tolerance )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n\r\nINLINE bool isEven(int x)\r\n{\r\n  if( x%2 == 0 )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n\r\nINLINE bool isOdd(int x)\r\n{\r\n  if( x%2 != 0 )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n\r\nINLINE bool isPowerOfTwo(unsigned int x)\r\n{\r\n  unsigned int currentPower = 1;\r\n  while( currentPower <= x )\r\n  {\r\n    if( currentPower == x )\r\n      return true;\r\n    currentPower *= 2;\r\n  }\r\n  return false;\r\n}\r\n\r\nINLINE real_t log2(real_t x)\r\n{\r\n  return ONE_OVER_LN2*log(x);\r\n}\r\n\r\nINLINE real_t logB(real_t x, real_t b)\r\n{\r\n  return log(x)/log(b);\r\n}\r\n\r\nINLINE real_t linToLin(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax)\r\n{\r\n  // map input to the range 0.0...1.0:\r\n  real_t tmp = (in-inMin) / (inMax-inMin);\r\n\r\n  // map the tmp-value to the range outMin...outMax:\r\n  tmp *= (outMax-outMin);\r\n  tmp += outMin;\r\n\r\n  return tmp;\r\n}\r\n\r\nINLINE real_t linToExp(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax)\r\n{\r\n  // map input to the range 0.0...1.0:\r\n  real_t tmp = (in-inMin) / (inMax-inMin);\r\n\r\n  // map the tmp-value exponentially to the range outMin...outMax:\r\n  //tmp = outMin * exp( tmp*(log(outMax)-log(outMin)) );\r\n  return outMin * exp( tmp*(log(outMax/outMin)) );\r\n}\r\n\r\nINLINE real_t linToExpWithOffset(real_t in, real_t inMin, real_t inMax, real_t outMin,\r\n                                 real_t outMax, real_t offset)\r\n{\r\n  real_t tmp = linToExp(in, inMin, inMax, outMin, outMax);\r\n  tmp += offset;\r\n  tmp *= outMax/(outMax+offset);\r\n  return tmp;\r\n}\r\n\r\nINLINE real_t expToLin(real_t in, real_t inMin, real_t inMax, real_t outMin, real_t outMax)\r\n{\r\n  real_t tmp = log(in/inMin) / log(inMax/inMin);\r\n  return outMin + tmp * (outMax-outMin);\r\n}\r\n\r\nINLINE real_t expToLinWithOffset(real_t in, real_t inMin, real_t inMax, real_t outMin,\r\n                                 real_t outMax, real_t offset)\r\n{\r\n  real_t tmp = in*(inMax+offset)/inMax;\r\n  tmp -= offset;\r\n  return expToLin(tmp, inMin, inMax, outMin, outMax);\r\n  /*\r\n  real_t tmp = linToExp(in, inMin, inMax, outMin, outMax);\r\n  tmp += offset;\r\n  tmp *= outMax/(outMax+offset);\r\n  return tmp;\r\n  */\r\n}\r\n\r\ntemplate <class T>\r\nINLINE T nextPowerOfTwo(T x)\r\n{\r\n  T accu = 1;\r\n  while(accu < x)\r\n    accu *= 2;\r\n  return accu;\r\n}\r\n\r\nINLINE int normalizedValueToIndex(float normalizedValue, int numIndices)\r\n{\r\n  return (int) floor(normalizedValue*numIndices);\r\n}\r\n\r\nINLINE real_t pitchOffsetToFreqFactor(real_t pitchOffset)\r\n{\r\n  return exp(0.057762265046662109118102676788181 * pitchOffset);\r\n  //return pow(2.0, pitchOffset/12.0); // naive, slower but numerically more precise\r\n}\r\n\r\nINLINE real_t pitchToFreq(real_t pitch)\r\n{\r\n  return 8.1757989156437073336828122976033 * exp(0.057762265046662109118102676788181*pitch);\r\n  //return 440.0*( pow(2.0, (pitch-69.0)/12.0) ); // naive, slower but numerically more precise\r\n}\r\n\r\nINLINE real_t pitchToFreq(real_t pitch, real_t masterTuneA4)\r\n{\r\n  return masterTuneA4 * 0.018581361171917516667460937040007\r\n    * exp(0.057762265046662109118102676788181*pitch);\r\n}\r\n\r\nINLINE real_t radiantToDegree(real_t radiant)\r\n{\r\n  return (180.0/PI)*radiant;\r\n}\r\n\r\nINLINE real_t randomUniform(real_t min, real_t max, int seed)\r\n{\r\n  static unsigned long state = 0;\r\n  if( seed >= 0 )\r\n    state = seed;                                        // initialization, if desired\r\n  state = 1664525*state + 1013904223;                    // mod implicitely by integer overflow\r\n  return min + (max-min) * ((1.0/4294967296.0) * state); // transform to desired range\r\n}\r\n\r\nINLINE real_t round(real_t x)\r\n{\r\n  if( x-floor(x) >= 0.5 )\r\n    return ceil(x);\r\n  else\r\n    return floor(x);\r\n}\r\n\r\nINLINE real_t secondsToBeats(real_t timeInSeconds, real_t bpm)\r\n{\r\n  return timeInSeconds*(bpm/60.0);\r\n}\r\n\r\nINLINE real_t sign(real_t x)\r\n{\r\n  if(x<0)\r\n    return -1.0;\r\n  else if(x>0)\r\n    return 1.0;\r\n  else\r\n    return 0;\r\n}\r\n\r\nINLINE real_t wholeNotesToSeconds(real_t noteValue, real_t bpm)\r\n{\r\n  return (240.0/bpm)*noteValue;\r\n}\r\n\r\n} //[eh2k] end namespace\r\n\r\n#endif // #ifndef GlobalFunctions_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_AnalogEnvelope.cpp",
    "content": "#include \"rosic_AnalogEnvelope.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nAnalogEnvelope::AnalogEnvelope()\r\n{\r\n  sampleRate     = SAMPLE_RATE;\r\n  startLevel     = 0.0;\r\n  attackTime     = 0.0;\r\n  peakLevel      = 1.0;\r\n  holdTime       = 0.0;\r\n  decayTime      = 0.1;\r\n  sustainLevel   = 0.5;\r\n  releaseTime    = 0.01;\r\n  endLevel       = 0.0;\r\n  time           = 0.0;\r\n  timeScale      = 1.0;\r\n  peakByVel      = 1.0;\r\n  peakByKey      = 1.0;\r\n  timeScaleByVel = 1.0;\r\n  timeScaleByKey = 1.0;\r\n  increment      = 1000.0*timeScale/sampleRate;\r\n  tauScale       = 1.0;\r\n  peakScale      = 1.0;\r\n  noteIsOn       = false;\r\n  outputIsZero   = true;\r\n\r\n  previousOutput = 0.0;\r\n\r\n  // call these functions to trigger the coefficient calculations:\r\n  setAttack(attackTime);\r\n  setDecay(decayTime);\r\n  setRelease(releaseTime);\r\n}\r\n\r\nAnalogEnvelope::~AnalogEnvelope()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid AnalogEnvelope::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n\r\n  // adjust time increment:\r\n  increment = 1000.0*timeScale/sampleRate;\r\n\r\n  //re-calculate coefficients for the 3 filters:\r\n  setAttack (attackTime);\r\n  setDecay  (decayTime);\r\n  setRelease(releaseTime);\r\n}\r\n\r\nvoid AnalogEnvelope::setAttack(real_t newAttackTime)\r\n{\r\n  if( newAttackTime > 0.0 )\r\n  {\r\n    attackTime  = newAttackTime;\r\n    real_t tau  = (sampleRate*0.001*attackTime) * tauScale/timeScale;\r\n    attackCoeff = 1.0 - exp( -1.0 / tau );\r\n  }\r\n  else // newAttackTime <= 0\r\n  {\r\n    attackTime  = 0.0;\r\n    attackCoeff = 1.0;\r\n  }\r\n  calculateAccumulatedTimes();\r\n}\r\n\r\nvoid AnalogEnvelope::setHold(real_t newHoldTime)\r\n{\r\n  if( newHoldTime >= 0 )\r\n    holdTime = newHoldTime;\r\n  calculateAccumulatedTimes();\r\n}\r\n\r\nvoid AnalogEnvelope::setDecay(real_t newDecayTime)\r\n{\r\n  if( newDecayTime > 0.0 )\r\n  {\r\n    decayTime  = newDecayTime;\r\n    real_t tau = (sampleRate*0.001*decayTime) * tauScale/timeScale;\r\n    decayCoeff = 1.0 - exp( -1.0 / tau  );\r\n  }\r\n  else // newDecayTime <= 0\r\n  {\r\n    decayTime  = 0.0;\r\n    decayCoeff = 1.0;\r\n  }\r\n  calculateAccumulatedTimes();\r\n}\r\n\r\nvoid AnalogEnvelope::setRelease(real_t newReleaseTime)\r\n{\r\n  if( newReleaseTime > 0.0 )\r\n  {\r\n    releaseTime  = newReleaseTime;\r\n    real_t tau   = (sampleRate*0.001*releaseTime) * tauScale/timeScale;\r\n    releaseCoeff = 1.0 - exp( -1.0 / tau  );\r\n  }\r\n  else // newReleaseTime <= 0\r\n  {\r\n    releaseTime  = 0.0;\r\n    releaseCoeff = 1.0;\r\n  }\r\n  calculateAccumulatedTimes();\r\n}\r\n\r\nvoid AnalogEnvelope::setTimeScale(real_t newTimeScale)\r\n{\r\n  if( newTimeScale > 0 )\r\n    timeScale = newTimeScale;\r\n\r\n  increment  = 1000.0*timeScale/sampleRate;\r\n\r\n  //re-calculate coefficients for the 3 filters:\r\n  setAttack (attackTime);\r\n  setDecay  (decayTime);\r\n  setRelease(releaseTime);\r\n}\r\n\r\nvoid AnalogEnvelope::setTauScale(real_t newTauScale)\r\n{\r\n  if( newTauScale > 0 )\r\n    tauScale = newTauScale;\r\n\r\n  setAttack(attackTime);\r\n  setDecay(decayTime);\r\n  setRelease(releaseTime);\r\n}\r\n\r\nvoid AnalogEnvelope::setPeakScale(real_t newPeakScale)\r\n{\r\n  if( newPeakScale > 0 )\r\n    peakScale = newPeakScale;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// others:\r\n\r\nvoid AnalogEnvelope::reset()\r\n{\r\n  time = 0.0;\r\n}\r\n\r\nvoid AnalogEnvelope::noteOn(bool startFromCurrentLevel, int newKey, int newVel)\r\n{\r\n  if( !startFromCurrentLevel )\r\n    previousOutput = startLevel;  // may lead to clicks\r\n\r\n\r\n  // \\todo: calculate key and velocity scale factors for duration and peak-value...\r\n\r\n\r\n  // reset time for the new note:\r\n  time         = 0.0;\r\n  noteIsOn     = true;\r\n  outputIsZero = false;\r\n}\r\n\r\nvoid AnalogEnvelope::noteOff()\r\n{\r\n  noteIsOn = false;\r\n\r\n  // advance time to the beginnig of the release phase:\r\n  time = (attackTime + holdTime + decayTime + increment);\r\n}\r\n\r\nbool AnalogEnvelope::endIsReached()\r\n{\r\n  //return false; // test\r\n\r\n  if( noteIsOn == false && previousOutput < 0.000001 )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// internal functions:\r\n\r\nvoid AnalogEnvelope::calculateAccumulatedTimes()\r\n{\r\n  attPlusHld               = attackTime + holdTime;\r\n  attPlusHldPlusDec        = attPlusHld + decayTime;\r\n  attPlusHldPlusDecPlusRel = attPlusHldPlusDec + releaseTime;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_AnalogEnvelope.h",
    "content": "#ifndef rosic_AnalogEnvelope_h\r\n#define rosic_AnalogEnvelope_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class which generates an exponential envelope with adjustable start-, attack-, peak-, \r\n  hold-,  decay-, sustain-, release- and end-values. It is based on feeding a stairstep-like \r\n  input signal into a RC-filter unit. The filter input signal is switched to a new value \r\n  according to the time and level values, at the same time the filter is switched to it's new \r\n  time constant. This also implies, that the level-value will not really be reached (in theory) but \r\n  only approached asymptotically. So the time values are not really the time between the levels, \r\n  but rather time constants tau of the RC unit. The time constant tau is defined as the time until \r\n  the filter reaches 63.2% of the end value (for an incoming step-function). This time constant can \r\n  be scaled to re-define the ramp time to other values than 63.2%.\r\n\r\n  */\r\n\r\n  class AnalogEnvelope\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    AnalogEnvelope();  \r\n\r\n    /** Destructor. */\r\n    ~AnalogEnvelope(); \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** sets the sample-rate. */\r\n    void setSampleRate(real_t newSampleRate);  \r\n\r\n    /** Sets the point where the envelope starts (as raw value). */\r\n    void setStartLevel(real_t newStart) { startLevel = newStart; }\r\n\r\n    /** Sets the point where the envelope starts (in dB). */\r\n    void setStartInDecibels(real_t newStart) { setStartLevel(dB2amp(newStart)); }\r\n\r\n    /** Sets the point where the envelope starts (in semitones). */\r\n    void setStartInSemitones(real_t newStart) { setStartLevel(pitchOffsetToFreqFactor(newStart)); }  \r\n\r\n    /** Sets the highest point of the envelope (as raw value). */\r\n    void setPeakLevel(real_t newPeak) { peakLevel = newPeak; }\r\n\r\n    /** Sets the highest point of the envelope (in dB). */\r\n    void setPeakInDecibels(real_t newPeak) { setPeakLevel(dB2amp(newPeak)); }\r\n\r\n    /** Sets the highest point of the envelope (in semitones). */\r\n    void setPeakInSemitones(real_t newPeak) { setPeakLevel(pitchOffsetToFreqFactor(newPeak)); }\r\n\r\n    /** Sets the velocity dependence of the peak level as scaling factor of the peak by notes with \r\n    velocity == 127. Notes with velocity == 1 will use the reciprocal value and notes with \r\n    velocity == 64 will use the unmodified peak value. */\r\n    void setPeakLevelByVel(real_t newPeakByVel) { peakByVel = newPeakByVel; }\r\n\r\n    /** Sets the velocity dependence of the peak level in dB - notes with velocity == 127 will peak \r\n    this value louder, notes with velocity == 0 will peak this value more quiet and notes with \r\n    velocity == 64 will have an unmodified peak amplitude. */\r\n    void setPeakByVelInDecibels(real_t newPeakByVel) { setPeakLevelByVel(dB2amp(newPeakByVel)); }\r\n\r\n    /** Sets the velocity dependence of the peak level in semitones .... */\r\n    void setPeakByVelInSemitones(real_t newPeakByVel) \r\n    { setPeakLevelByVel(pitchOffsetToFreqFactor(newPeakByVel)); }\r\n\r\n    /** Sets the sustain level (as raw value). */\r\n    void setSustainLevel(real_t newSustain) { sustainLevel = newSustain; }\r\n\r\n    /** Sets the sustain level (in dB). */\r\n    void setSustainInDecibels(real_t newSustain) { setSustainLevel(dB2amp(newSustain)); }\r\n\r\n    /** Sets the sustain level (in semitones). */\r\n    void setSustainInSemitones(real_t newSustain) \r\n    { setSustainLevel(pitchOffsetToFreqFactor(newSustain)); }\r\n\r\n    /** Sets the end point of the envelope (as raw value). */\r\n    void setEndLevel(real_t newEnd) { endLevel = newEnd; }\r\n\r\n    /** Sets the end point of the envelope (in dB). */\r\n    void setEndInDecibels(real_t newEnd) { setEndLevel(dB2amp(newEnd)); }\r\n\r\n    /** Sets the end point of the envelope (in semitones). */\r\n    void setEndInSemitones(real_t newEnd) { setEndLevel(pitchOffsetToFreqFactor(newEnd)); }\r\n\r\n    /** Sets the length of the attack phase (in milliseconds). */\r\n    void setAttack(real_t newAttackTime);    \r\n\r\n    /** Sets the hold time (in milliseconds). */\r\n    void setHold(real_t newHoldTime);      \r\n\r\n    /** Sets the length of the decay phase (in milliseconds). */\r\n    void setDecay(real_t newDecayTime);     \r\n \r\n    /** Sets the length of the release phase (in milliseconds). */\r\n    void setRelease(real_t newReleaseTime);  \r\n\r\n    /** Scales the A,D,H and R times by adjusting the increment. It is 1 if not used - a timescale \r\n    of 2 means the envelope is twice as fast, 0.5 means half as fast -> useful for implementing a \r\n    key/velocity-tracking feature for the overall length for the envelope. */\r\n    void setTimeScale(real_t newTimeScale); \r\n\r\n    /** Scales the time constants tau. Can be used to reach other values than 63.2% in the \r\n    specified time values */\r\n    void setTauScale(real_t newTauScale);  \r\n\r\n    /** Scales the peak-value of the envelope - useful for velocity response. */\r\n    void setPeakScale(real_t newPeakScale); \r\n\r\n    /** Sets the internal state of the RC-filter. */\r\n    void setInternalState(real_t newState) { previousOutput = newState; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the length of the attack phase (in milliseconds). */\r\n    real_t getAttack() const { return attackTime; }\r\n\r\n    /** Returns the length of the decay phase (in milliseconds). */\r\n    real_t getDecay() const { return decayTime; }\r\n\r\n    /** Returns the sustain level (as raw value). */\r\n    real_t getSustain() const { return sustainLevel; }\r\n\r\n    /** Returns the length of the release phase (in milliseconds). */\r\n    real_t getRelease() const { return releaseTime; }\r\n\r\n    /** Returns, when currently a note is on (the noteIsOn flag is set). */\r\n    bool isNoteOn() const { return noteIsOn; }\r\n\r\n    /** True, if output is below 40 dB. */\r\n    bool endIsReached();  \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates one output sample at a time. */\r\n    INLINE real_t getSample();    \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Causes the envelope to start with its attack-phase. When the parameter \r\n    'startFromCurrentValue' is true, the internal state will not be reset to startLevel, such that \r\n    the curve begins at the level, where the envelope currently is. */  \r\n    void noteOn(bool startFromCurrentLevel = false, int newKey = 64, int newVel = 64);\r\n\r\n    /** Causes the envelope to start with its release-phase. */\r\n    void noteOff();  \r\n\r\n    /** Resets the time variable. */\r\n    void reset();   \r\n\r\n  protected:\r\n\r\n    /** Calculates our members that represent accumulated time values from attack, hold, etc. */\r\n    void calculateAccumulatedTimes();\r\n\r\n    // level and time parameters:\r\n    real_t startLevel, peakLevel, sustainLevel, endLevel;  \r\n    real_t attackTime, holdTime, decayTime, releaseTime;    // in seconds\r\n    real_t peakByVel, peakByKey, timeScaleByVel, timeScaleByKey;\r\n\r\n    // accumulated time values:\r\n    real_t attPlusHld, attPlusHldPlusDec, attPlusHldPlusDecPlusRel;\r\n\r\n    real_t time;       // time since the last call to to trigger() \r\n    real_t timeScale;  // scale the time constants in the filters according to\r\n    real_t increment;  // increment for the time variable per sample \r\n    real_t tauScale;   // scale factor for the time constants of the filters\r\n    real_t peakScale;  // scale factor for the peak-value\r\n\r\n    real_t attackCoeff,  decayCoeff, releaseCoeff;   // filter coefficients\r\n    real_t previousOutput;                           // previous output sample\r\n    real_t sampleRate;                               // sample-rate\r\n    bool   outputIsZero;                             // indicates if envelope has reached its end\r\n    bool   noteIsOn;                                 // indicates if note is being held\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t AnalogEnvelope::getSample()\r\n  {\r\n    real_t out;\r\n\r\n    // attack or hold phase:\r\n    if(time <= attPlusHld)   // noteIsOn has not to be checked, because, time is advanced to the \r\n                             // beginning of the release phase in noteOff()\r\n    {\r\n      out   = previousOutput + attackCoeff * (peakScale*peakLevel - previousOutput);\r\n      time += increment;\r\n    }\r\n\r\n    // decay phase:\r\n    else if(time <= (attPlusHldPlusDec)) // noteIsOn has not to be checked\r\n    {\r\n      out   = previousOutput + decayCoeff * (sustainLevel - previousOutput);\r\n      time += increment;\r\n    }\r\n\r\n    // sustain phase:\r\n    else if(noteIsOn)\r\n    {\r\n      out = previousOutput + decayCoeff * (sustainLevel - previousOutput);\r\n      // time is not incremented in sustain\r\n    }\r\n\r\n    // release phase:\r\n    else\r\n    {\r\n      out   = previousOutput + releaseCoeff * (endLevel - previousOutput);\r\n      time += increment;\r\n    }\r\n\r\n    // store output sample for next call:\r\n    previousOutput = out; // + TINY;  // TINY is to avoid denorm problems\r\n\r\n    return out;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_AnalogEnvelope_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_BiquadFilter.cpp",
    "content": "#include \"rosic_BiquadFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nBiquadFilter::BiquadFilter()\r\n{\r\n  frequency  = 1000.0;\r\n  gain       = 0.0;\r\n  bandwidth  = 2.0*asinh(1.0/sqrt(2.0))/log(2.0);\r\n  sampleRate = SAMPLE_RATE;\r\n  mode       = BYPASS;\r\n  calcCoeffs();\r\n  reset();    \r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid BiquadFilter::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n  calcCoeffs();\r\n}\r\n\r\nvoid BiquadFilter::setMode(int newMode)\r\n{\r\n  mode = newMode; // 0:bypass, 1:Low Pass, 2:High Pass\r\n  calcCoeffs();\r\n}\r\n\r\nvoid BiquadFilter::setFrequency(real_t newFrequency)\r\n{\r\n  frequency = newFrequency;\r\n  calcCoeffs();\r\n}\r\n\r\nvoid BiquadFilter::setGain(real_t newGain)\r\n{\r\n  gain = newGain;\r\n  calcCoeffs();\r\n}\r\n\r\nvoid BiquadFilter::setBandwidth(real_t newBandwidth)\r\n{\r\n  bandwidth = newBandwidth;\r\n  calcCoeffs();\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n//others:\r\n\r\nvoid BiquadFilter::calcCoeffs()\r\n{\r\n  real_t w = 2*PI*frequency/sampleRate;\r\n  real_t s, c;\r\n  switch(mode)\r\n  {\r\n  case LOWPASS6: \r\n    {\r\n      // formula from dspguide:\r\n      real_t x = exp(-w);\r\n      a1 = x;\r\n      a2 = 0.0;\r\n      b0 = 1.0-x;\r\n      b1 = 0.0;\r\n      b2 = 0.0;\r\n    }\r\n    break;\r\n  case LOWPASS12: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:\r\n      sinCos(w, &s, &c);\r\n      real_t q     = dB2amp(gain);\r\n      real_t alpha = s/(2.0*q);\r\n      real_t scale = 1.0/(1.0+alpha);\r\n      a1 = 2.0*c       * scale;\r\n      a2 = (alpha-1.0) * scale;\r\n      b1 = (1.0-c)     * scale;\r\n      b0 = 0.5*b1;\r\n      b2 = b0;\r\n    }\r\n    break;\r\n  case HIGHPASS6: \r\n    {\r\n      // formula from dspguide:\r\n      real_t x = exp(-w);\r\n      a1 = x;\r\n      a2 = 0.0;\r\n      b0 = 0.5*(1.0+x);\r\n      b1 = -b0;\r\n      b2 = 0.0;\r\n    }\r\n    break;\r\n  case HIGHPASS12: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:\r\n      sinCos(w, &s, &c);\r\n      real_t q     = dB2amp(gain);\r\n      real_t alpha = s/(2.0*q);\r\n      real_t scale = 1.0/(1.0+alpha);\r\n      a1 = 2.0*c       * scale;\r\n      a2 = (alpha-1.0) * scale;\r\n      b1 = -(1.0+c)    * scale;\r\n      b0 = -0.5*b1;\r\n      b2 = b0;\r\n    }\r\n    break;\r\n  case BANDPASS: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:      \r\n      sinCos(w, &s, &c);\r\n      real_t alpha = s * sinh( 0.5*log(2.0) * bandwidth * w / s );\r\n      real_t scale = 1.0/(1.0+alpha);\r\n      a1 = 2.0*c       * scale;\r\n      a2 = (alpha-1.0) * scale;\r\n      b1 = 0.0;\r\n      b0 = 0.5*s       * scale;\r\n      b2 = -b0;\r\n    }\r\n    break;\r\n  case BANDREJECT: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:\r\n      sinCos(w, &s, &c);\r\n      real_t alpha = s * sinh( 0.5*log(2.0) * bandwidth * w / s );\r\n      real_t scale = 1.0/(1.0+alpha);\r\n      a1 = 2.0*c       * scale;\r\n      a2 = (alpha-1.0) * scale;\r\n      b0 = 1.0         * scale;\r\n      b1 = -2.0*c      * scale;\r\n      b2 = 1.0         * scale;\r\n    }\r\n    break;\r\n  case PEAK: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:\r\n      sinCos(w, &s, &c);\r\n      real_t alpha = s * sinh( 0.5*log(2.0) * bandwidth * w / s );\r\n      real_t A     = dB2amp(gain);\r\n      real_t scale = 1.0/(1.0+alpha/A);\r\n      a1 = 2.0*c             * scale;\r\n      a2 = ((alpha/A) - 1.0) * scale;\r\n      b0 = (1.0+alpha*A)     * scale;\r\n      b1 = -2.0*c            * scale;\r\n      b2 = (1.0-alpha*A)     * scale;\r\n    }\r\n    break;\r\n  case LOW_SHELF: \r\n    {\r\n      // formula from Robert Bristow Johnson's biquad cookbook:\r\n      sinCos(w, &s, &c);\r\n      real_t A     = dB2amp(0.5*gain);\r\n      real_t q     = 1.0 / (2.0*sinh( 0.5*log(2.0) * bandwidth ));\r\n      real_t beta  = sqrt(A) / q;\r\n      real_t scale = 1.0 / ( (A+1.0) + (A-1.0)*c + beta*s);\r\n      a1 = 2.0 *     ( (A-1.0) + (A+1.0)*c          ) * scale;\r\n      a2 = -         ( (A+1.0) + (A-1.0)*c - beta*s ) * scale;\r\n      b0 =       A * ( (A+1.0) - (A-1.0)*c + beta*s ) * scale;\r\n      b1 = 2.0 * A * ( (A-1.0) - (A+1.0)*c          ) * scale;\r\n      b2 =       A * ( (A+1.0) - (A-1.0)*c - beta*s ) * scale;\r\n    }\r\n    break;\r\n\r\n\r\n\r\n\r\n    // \\todo: implement shelving and allpass modes\r\n\r\n  default: // bypass\r\n    {\r\n      b0 = 1.0;\r\n      b1 = 0.0;\r\n      b2 = 0.0;\r\n      a1 = 0.0;\r\n      a2 = 0.0;\r\n    }break;\r\n  }\r\n}\r\n\r\nvoid BiquadFilter::reset()\r\n{\r\n  x1 = 0.0;\r\n  x2 = 0.0;\r\n  y1 = 0.0;\r\n  y2 = 0.0;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_BiquadFilter.h",
    "content": "#ifndef rosic_BiquadFilter_h\r\n#define rosic_BiquadFilter_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is an implementation of a simple one-pole filter unit.\r\n\r\n  */\r\n\r\n  class BiquadFilter\r\n  {\r\n\r\n  public:\r\n\r\n    /** Enumeration of the available filter modes. */\r\n    enum modes\r\n    {\r\n      BYPASS = 0,\r\n      LOWPASS6,\r\n      LOWPASS12,\r\n      HIGHPASS6,\r\n      HIGHPASS12,\r\n      BANDPASS,\r\n      BANDREJECT,\r\n      PEAK,\r\n      LOW_SHELF,\r\n      //HIGH_SHELF,\r\n      //ALLPASS,\r\n\r\n      NUM_FILTER_MODES\r\n    };\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    BiquadFilter();   \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate (in Hz) at which the filter runs. */\r\n    void setSampleRate(real_t newSampleRate);\r\n\r\n    /** Sets the filter mode as one of the values in enum modes. */\r\n    void setMode(int newMode);\r\n\r\n    /** Sets the center frequency in Hz. */\r\n    void setFrequency(real_t newFrequency);\r\n\r\n    /** Sets the boost/cut gain in dB. */\r\n    void setGain(real_t newGain);\r\n\r\n    /** Sets the bandwidth in octaves. */\r\n    void setBandwidth(real_t newBandwidth);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry\r\n\r\n    /** Sets the filter mode as one of the values in enum modes. */\r\n    int getMode() const { return mode; }\r\n\r\n    /** Returns the center frequency in Hz. */\r\n    real_t getFrequency() const { return frequency; }\r\n\r\n    /** Returns the boost/cut gain in dB. */\r\n    real_t getGain() const { return gain; }\r\n\r\n    /** Returns the bandwidth in octaves. */\r\n    real_t getBandwidth() const { return bandwidth; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates a single filtered output-sample. */\r\n    INLINE real_t getSample(real_t in);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Resets the internal buffers (for the \\f$ x[n-1], y[n-1] \\f$-samples) to zero. */\r\n    void reset();\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    // internal functions:\r\n    void calcCoeffs();  // calculates filter coefficients from filter parameters\r\n\r\n    real_t b0, b1, b2, a1, a2;\r\n    real_t x1, x2, y1, y2;\r\n\r\n    real_t frequency, gain, bandwidth;\r\n    real_t sampleRate;\r\n    int    mode;\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t BiquadFilter::getSample(real_t in)\r\n  {\r\n    // calculate the output sample:\r\n    real_t y = b0*in + b1*x1 + b2*x2 + a1*y1 + a2*y2 + TINY;\r\n\r\n    // update the buffer variables:\r\n    x2 = x1;\r\n    x1 = in;\r\n    y2 = y1;\r\n    y1 = y;\r\n\r\n    return y;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_BiquadFilter_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_BlendOscillator.cpp",
    "content": "#include \"rosic_BlendOscillator.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nBlendOscillator::BlendOscillator()\r\n{\r\n  // init member variables:\r\n  tableLengthDbl       = (real_t) WaveTableLength;  // typecasted version\r\n  sampleRate           = SAMPLE_RATE;\r\n  freq                 = 440.0;\r\n  increment            = (tableLengthDbl*freq)/sampleRate;\r\n  phaseIndex           = 0.0;\r\n  startIndex           = 0.0;\r\n  waveTable1           = NULL;\r\n  waveTable2           = NULL;\r\n\r\n  // somewhat redundant:\r\n  setSampleRate(sampleRate);       // sampleRate = 44100 Hz by default\r\n  setFrequency (freq);            // frequency = 440 Hz by default\r\n  setStartPhase(0.0);              // sartPhase = 0 by default\r\n\r\n  //setWaveForm1(MipMappedWaveTable::SAW);\r\n  //setWaveForm2(MipMappedWaveTable::SQUARE);\r\n\r\n  resetPhase();\r\n}\r\n\r\nBlendOscillator::~BlendOscillator()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid BlendOscillator::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n  sampleRateRec = 1.0 / sampleRate;\r\n  increment = tableLengthDbl*freq*sampleRateRec;\r\n}\r\n\r\nvoid BlendOscillator::setWaveTables(const WaveTable* newWaveTable1, const WaveTable* newWaveTable2)\r\n{\r\n  waveTable1 = newWaveTable1;\r\n  waveTable2 = newWaveTable2;\r\n}\r\n\r\nvoid BlendOscillator::setStartPhase(real_t StartPhase)\r\n{\r\n  if( (StartPhase>=0) && (StartPhase<=360) )\r\n    startIndex = (StartPhase/360.0)*tableLengthDbl;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// event processing:\r\n\r\nvoid BlendOscillator::resetPhase()\r\n{\r\n  phaseIndex = startIndex;\r\n}\r\n\r\nvoid BlendOscillator::setPhase(real_t PhaseIndex)\r\n{\r\n  phaseIndex = startIndex+PhaseIndex;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_BlendOscillator.h",
    "content": "#ifndef rosic_BlendOscillator_h\r\n#define rosic_BlendOscillator_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_NumberManipulations.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is an oscillator that can continuously blend between two waveforms - this is more efficient\r\n  than using two separate oscillators because the phase-accumulator has to be calculated only once\r\n  for both waveforms.\r\n\r\n  */\r\n\r\n  static constexpr int WaveTableLength = 2048;\r\n  typedef real_t WaveTable[12][2052];\r\n\r\n  class BlendOscillator\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    BlendOscillator();\r\n\r\n    /** Destructor. */\r\n    ~BlendOscillator();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rateRate(). */\r\n    void setSampleRate(real_t newSampleRate);\r\n\r\n    /** Set start phase (range 0 - 360 degrees). */\r\n    void setStartPhase(real_t StartPhase);\r\n\r\n    /** An object of class WaveTable should be passed with this function which will be used in the \r\n    oscillator. Not to have \"our own\" WaveTable-object as member-variable avoids the need to have \r\n    the same waveform for different synth-voices multiple times in the memory. This function sets \r\n    the 1st wavetable. */\r\n    void setWaveTables(const WaveTable* newWaveTable1, const WaveTable* newWaveTable2);\r\n\r\n    /** Sets the blend/mix factor between the two waveforms. The value is expected between 0...1\r\n    where 0 means waveform1 only, 1 means waveform2 only - in between there will be a linear blend\r\n    between the two waveforms. */\r\n    void setBlendFactor(real_t newBlendFactor) { blend = newBlendFactor; }\r\n\r\n    /** Sets the frequency of the oscillator. */\r\n    INLINE void setFrequency(real_t newFrequency);\r\n\r\n    /** Sets the phase increment from outside. */\r\n    INLINE void setIncrement(real_t newIncrement) { increment = newIncrement; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the blend/mix factor between the two waveforms as a value between 0...1 where 0 \r\n    means waveform1 only, 1 means waveform2 only - in between there will be a linear blend between \r\n    the two waveforms. */\r\n    real_t getBlendFactor() const { return blend; }\r\n\r\n    /** Returns the phase increment. */\r\n    INLINE real_t getIncrement() const { return increment; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates one output sample at a time. */\r\n    INLINE real_t getSample();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Calculates the phase-increments for first and second half-period according to freq and \r\n    pulseWidth. */\r\n    INLINE void calculateIncrement();\r\n\r\n    INLINE real_t interpolateLinear(const real_t* tableSet, int integerPart, real_t fractionalPart);\r\n\r\n    /** Resets the phaseIndex to startIndex. */\r\n    void resetPhase();\r\n\r\n    /** Reset the phaseIndex to startIndex+PhaseIndex. */\r\n    void setPhase(real_t PhaseIndex);\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    real_t tableLengthDbl;    // tableLength as real_t variable\r\n    real_t phaseIndex;        // current phase index\r\n    real_t freq;              // frequency of the oscillator\r\n    real_t increment;         // phase increment per sample\r\n    real_t blend;             // the blend factor between the two waveforms\r\n    real_t startIndex;        // start-phase-index of the osc (range: 0 - tableLength)\r\n    real_t sampleRate;        // the samplerate\r\n    real_t sampleRateRec;     // 1/sampleRate\r\n\r\n    const WaveTable *waveTable1, *waveTable2; // the 2 wavetables between which we blend\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE void BlendOscillator::setFrequency(real_t newFrequency)\r\n  {\r\n    if( (newFrequency > 0.0) && (newFrequency < 20000.0) )\r\n      freq = newFrequency;\r\n  }\r\n\r\n  INLINE void BlendOscillator::calculateIncrement()\r\n  {\r\n    increment = tableLengthDbl*freq*sampleRateRec;\r\n  }\r\n\r\n  INLINE real_t BlendOscillator::interpolateLinear(const real_t* tableSet, int integerPart, real_t fractionalPart)\r\n  {\r\n    return   (1.0-fractionalPart) * tableSet[integerPart] \r\n           +      fractionalPart  * tableSet[integerPart+1];\r\n  }\r\n\r\n  INLINE real_t BlendOscillator::getSample()\r\n  {\r\n    real_t out1, out2;\r\n    int    tableNumber;\r\n\r\n    // from this increment, decide which table is to be used:\r\n    tableNumber  = ((int)EXPOF(increment));\r\n    //tableNumber += 1;           // generate frequencies up to nyquist/2 on the highest note\r\n    tableNumber += 2;             // generate frequencies up to nyquist/4 on the highest note\r\n                                  // \\todo: make this number adjustable from outside\r\n\r\n    // wraparound if necessary:\r\n    while( phaseIndex>=tableLengthDbl )\r\n      phaseIndex -= tableLengthDbl;\r\n\r\n    int    intIndex = floorInt(phaseIndex);\r\n    real_t frac     = phaseIndex  - (real_t) intIndex;\r\n\r\n    out1 = (1.0-blend) * interpolateLinear(&(*waveTable1)[tableNumber][0], intIndex, frac);\r\n    out2 =      blend  * interpolateLinear(&(*waveTable2)[tableNumber][0], intIndex, frac);\r\n    \r\n    out2 *= 0.5; // \\todo: this is preliminary to scale the square in AciDevil we need to\r\n                 // implement something more general here (like a kind of crest-compensation in \r\n                 // the wavetable-class)\r\n\r\n    phaseIndex += increment;\r\n    return out1 + out2;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_BlendOscillator_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_DecayEnvelope.cpp",
    "content": "#include \"rosic_DecayEnvelope.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nDecayEnvelope::DecayEnvelope()\r\n{  \r\n  c            = 1.0;    \r\n  y            = 1.0;\r\n  yInit        = 1.0;\r\n  tau          = 200.0;  \r\n  fs           = SAMPLE_RATE;\r\n  normalizeSum = false;\r\n  calculateCoefficient();\r\n}\r\n\r\nDecayEnvelope::~DecayEnvelope()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid DecayEnvelope::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n  {\r\n    fs = newSampleRate;\r\n    calculateCoefficient();\r\n  }\r\n}\r\n\r\nvoid DecayEnvelope::setDecayTimeConstant(real_t newTimeConstant)\r\n{\r\n  if( newTimeConstant > 0.001 ) // at least 0.001 ms decay\r\n  {\r\n    tau = newTimeConstant;\r\n    calculateCoefficient();\r\n  }\r\n}\r\n\r\nvoid DecayEnvelope::setNormalizeSum(bool shouldNormalizeSum)\r\n{\r\n  normalizeSum = shouldNormalizeSum;\r\n  calculateCoefficient();\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// others:\r\n\r\nvoid DecayEnvelope::trigger()\r\n{\r\n  y = yInit;\r\n}\r\n\r\nbool DecayEnvelope::endIsReached(real_t threshold)\r\n{\r\n  if( y < threshold )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// internal functions:\r\n\r\nvoid DecayEnvelope::calculateCoefficient()\r\n{\r\n  c     = exp( -1.0 / (0.001*tau*fs) );\r\n  if( normalizeSum == true )\r\n    yInit = (1.0-c)/c;\r\n  else  \r\n    yInit = 1.0/c;\r\n}\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_DecayEnvelope.h",
    "content": "#ifndef rosic_DecayEnvelope_h\r\n#define rosic_DecayEnvelope_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class implements an envelope generator that realizes a pure exponential decay. The \r\n  output of the envelope is normalized to the range 0...1.\r\n\r\n  */\r\n\r\n  class DecayEnvelope\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    DecayEnvelope();  \r\n\r\n    /** Destructor. */\r\n    ~DecayEnvelope(); \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate. */\r\n    void setSampleRate(real_t newSampleRate);  \r\n\r\n    /** Sets the time constant for the multiplicative accumulator (which we consider as primarily \r\n    responsible for the decaying part) in milliseconds. */\r\n    void setDecayTimeConstant(real_t newTimeConstant);\r\n\r\n    /** Switches into a mode where the normalization is not made with respect to the peak amplitude \r\n    but to the sum of the impulse response - if true, the output will be equivalent to a leaky \r\n    integrator's impulse response. */\r\n    void setNormalizeSum(bool shouldNormalizeSum);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the length of the decay phase (in milliseconds). */\r\n    real_t getDecayTimeConstant() const { return tau; }\r\n\r\n    /** True, if output is below some threshold. */\r\n    bool endIsReached(real_t threshold);  \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates one output sample at a time. */\r\n    INLINE real_t getSample();    \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Triggers the envelope - the next sample retrieved via getSample() will be 1. */\r\n    void trigger();\r\n\r\n  protected:\r\n\r\n    /** Calculates the coefficient for multiplicative accumulation. */\r\n    void calculateCoefficient();\r\n\r\n    real_t c;             // coefficient for multiplicative accumulation\r\n    real_t y;             // previous output\r\n    real_t yInit;         // initial yalue for previous output (= y/c)\r\n    real_t tau;           // time-constant (in milliseconds)\r\n    real_t fs;            // sample-rate\r\n    bool   normalizeSum;  // flag to indicate that the output should be normalized such that the \r\n                          // sum of the impulse response is unity (instead of the peak) - if true\r\n                          // the output will be equivalent to a leaky integrator's impulse \r\n                          // response\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t DecayEnvelope::getSample()\r\n  {\r\n    y *= c;\r\n    return y;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_DecayEnvelope_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_EllipticQuarterBandFilter.cpp",
    "content": "#include \"rosic_EllipticQuarterBandFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nEllipticQuarterBandFilter::EllipticQuarterBandFilter()\r\n{\r\n  reset();  \r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid EllipticQuarterBandFilter::reset()\r\n{\r\n  for(int i=0; i<12; i++)\r\n    w[i] = 0.0;\r\n}\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_EllipticQuarterBandFilter.h",
    "content": "#ifndef rosic_EllipticQuarterBandFilter_h\r\n#define rosic_EllipticQuarterBandFilter_h\r\n\r\n#include <string.h> // for memmove\r\n\r\n// rosic-indcludes:\r\n#include \"GlobalDefinitions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is an elliptic subband filter of 12th order using a Direct Form II implementation structure.\r\n\r\n  */\r\n\r\n  class EllipticQuarterBandFilter\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    EllipticQuarterBandFilter();   \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Resets the filter state. */\r\n    void reset();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates a single filtered output-sample. */\r\n    INLINE real_t getSample(real_t in);\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    // state buffer:\r\n    real_t w[12];\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t EllipticQuarterBandFilter::getSample(real_t in)\r\n  {\r\n    const real_t a01 =   -9.1891604652189471;\r\n    const real_t a02 =   40.177553696870497;\r\n    const real_t a03 = -110.11636661771178;\r\n    const real_t a04 =  210.18506612078195;\r\n    const real_t a05 = -293.84744771903240;\r\n    const real_t a06 =  308.16345558359234;\r\n    const real_t a07 = -244.06786780384243;\r\n    const real_t a08 =  144.81877911392738;\r\n    const real_t a09 =  -62.770692151724198;\r\n    const real_t a10 =   18.867762095902137;\r\n    const real_t a11 =   -3.5327094230551848;\r\n    const real_t a12 =    0.31183189275203149;\r\n\r\n    const real_t b00 =    0.00013671732099945628;\r\n    const real_t b01 =   -0.00055538501265606384;\r\n    const real_t b02 =    0.0013681887636296387;\r\n    const real_t b03 =   -0.0022158566490711852;\r\n    const real_t b04 =    0.0028320091007278322;\r\n    const real_t b05 =   -0.0029776933151090413;\r\n    const real_t b06 =    0.0030283628243514991;    \r\n    const real_t b07 =   -0.0029776933151090413;\r\n    const real_t b08 =    0.0028320091007278331;\r\n    const real_t b09 =   -0.0022158566490711861;\r\n    const real_t b10 =    0.0013681887636296393;    \r\n    const real_t b11 =   -0.00055538501265606384;\r\n    const real_t b12 =    0.00013671732099945636;\r\n\r\n    // calculate intermediate and output sample via direct form II - the parentheses facilitate \r\n    // out-of-order execution of the independent additions (for performance optimization):\r\n    real_t tmp =   (in + TINY)\r\n                 - ( (a01*w[0] + a02*w[1] ) + (a03*w[2]  + a04*w[3]   ) ) \r\n                 - ( (a05*w[4] + a06*w[5] ) + (a07*w[6]  + a08*w[7]   ) )\r\n                 - ( (a09*w[8] + a10*w[9] ) + (a11*w[10] +  a12*w[11] ) );\r\n   \r\n    real_t y =     b00*tmp \r\n                 + ( (b01*w[0] + b02*w[1])  +  (b03*w[2]  + b04*w[3]  ) )  \r\n                 + ( (b05*w[4] + b06*w[5])  +  (b07*w[6]  + b08*w[7]  ) )\r\n                 + ( (b09*w[8] + b10*w[9])  +  (b11*w[10] + b12*w[11] ) );\r\n\r\n    // update state variables:\r\n    memmove(&w[1], &w[0], 11*sizeof(real_t));\r\n    w[0] = tmp;\r\n\r\n    return y;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_EllipticQuarterBandFilter_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_FunctionTemplates.cpp",
    "content": "#include \"rosic_FunctionTemplates.h\"\r\nusing namespace rosic;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_FunctionTemplates.h",
    "content": "#ifndef rosic_FunctionTemplates_h\r\n#define rosic_FunctionTemplates_h\r\n\r\n// rosic includes:\r\n//#include \"GlobalDefinitions.h\"\r\n#include \"rosic_RealFunctions.h\"\r\n#include <string.h>\r\n\r\nnamespace rosic\r\n{\r\n  // todo write functions for element-wise multiply, divide, negate,\r\n  // max, min, absMax, createCopy, filter, impulseResponse, impulseResponseLength,\r\n  // fillWith(real_t value = 0.0), circularShift, resample,\r\n\r\n  // maybe introduce a range (start....end) to which the process is to be applied\r\n\r\n  /** Returns the absolute value of the input argument for types that define the comparison\r\n  operators: '<', '>', the unary operator '-' and a constructor that takes an int and initializes\r\n  to zero when 0 is passed.  */\r\n  template <class T>\r\n  T absT(T x);\r\n\r\n  /** Adds the elements of 'buffer1' and 'buffer2' - type must define operator '+'. The 'result'\r\n  buffer may be the same as 'buffer1' or 'buffer2'. */\r\n  template <class T>\r\n  void add(T *buffer1, T *buffer2, T *result, int length);\r\n\r\n  /** Circularly shifts the content of the buffer by 'numPositions' to the right - for leftward\r\n  shifts use negative values for numPositions. If the absolute value of 'numPositions' is greater\r\n  than the length of the buffer, it will use numPositions modulo the length - so if the length is 6\r\n  and numPositions is 8, it will whift by 2 positions. */\r\n  template<class T>\r\n  void circularShift(T *buffer, int length, int numPositions);\r\n\r\n  /** Restricts the values in the buffer to the range between min and max for types that define the\r\n  operators '<' and '>'. */\r\n  template <class T>\r\n  void clipBuffer(T *buffer, int length, T min, T max);\r\n\r\n  /** Copies the data of one array into another one. */\r\n  template <class T>\r\n  void copyBuffer(T *source, T *destination, int length);\r\n\r\n  /** Fills the passed array with all zeros - the type must have a constructor that takes an int\r\n  and initializes to the zero element when 0 is passed. */\r\n  template <class T>\r\n  void fillWithZeros(T *buffer, int length);\r\n\r\n  /** Finds and returns the maximum absolute value of the buffer. */\r\n  template <class T>\r\n  T maxAbs(T *buffer, int length);\r\n\r\n  /** Returns the index of maximum value of the buffer (\">\"-operator must be defined). */\r\n  template <class T>\r\n  INLINE int maxIndex(T *buffer, int length);\r\n\r\n  /** Returns the maximum value of the buffer (\">\"-operator must be defined). */\r\n  template <class T>\r\n  INLINE T maxValue(T *buffer, int length);\r\n\r\n  /** Returns the index of minimum value of the buffer (\"<\"-operator must be defined). */\r\n  template <class T>\r\n  INLINE int minIndex(T *buffer, int length);\r\n\r\n  /** Returns the minimum value of the buffer (\"<\"-operator must be defined). */\r\n  template <class T>\r\n  INLINE T minValue(T *buffer, int length);\r\n\r\n  /** Computes the mean (i.e. the DC-component) from the passed buffer. The type must define operators:\r\n  +=, / and a constructor which takes an int and initializes to zero when 0 is passed and a typecast\r\n  from int. */\r\n  template <class T>\r\n  T mean(T *buffer, int length);\r\n\r\n  /** Returns the median of the passed buffer. */\r\n  template <class T>\r\n  T median(T *buffer, int length);\r\n\r\n  /** Multiplies the elements of 'buffer1' and 'buffer2' - type must define operator '*'. The\r\n  'result' buffer may be the same as 'buffer1' or 'buffer2'. */\r\n  template <class T>\r\n  void multiply(T *buffer1, T *buffer2, T *result, int length);\r\n\r\n  /** Normalizes the maximum value of the passed array. The type must define: >, *=, / and a\r\n  constructor that takes an int and initializes to 0 when 0 is passed. Additionaly, it must be\r\n  suitable for absT - that additionaly requires definition of unary '-' and '<'. */\r\n  template <class T>\r\n  void normalize(T *buffer, int length, T maximum);\r\n\r\n  /** Rearranges/permutes and array of type T into bit-reversed order. The 'length' MUST be the\r\n  'numBits' th power of two (this is not checked for). */\r\n  template <class T>\r\n  INLINE void orderBitReversedOutOfPlace(T *inBuffer, T *outBuffer, int length, int numBits);\r\n\r\n  /** Returns the product of the elements in the buffer for types which define the\r\n  multiplication operator (the *= version thereof) and a constructor which can take an int\r\n  paramater as argument and initializes to the multiplicative neutral element of that class when 1\r\n  is passed . */\r\n  template <class T>\r\n  INLINE T product(T *buffer, int length);\r\n\r\n  /** Removes mean (i.e. the DC-component) from the passed buffer. The type must define operators:\r\n  +=, -=, / and a constructor which takes an int and initializes to zero when 0 is passed and a\r\n  typecast from int. */\r\n  template <class T>\r\n  void removeMean(T *buffer, int length);\r\n\r\n  /** Reverses the order of the elements the passed array. */\r\n  template <class T>\r\n  void reverse(T *buffer, int length);\r\n\r\n  /** The maximum of two objects on which the \">\"-operator is defined. */\r\n  template <class T>\r\n  INLINE T rmax(T in1, T in2);\r\n\r\n  /** The maximum of four objects on which the \">\"-operator is defined. */\r\n  template <class T>\r\n  INLINE T rmax(T in1, T in2, T in3, T in4);\r\n\r\n  /** The minimum of two objects on which the \">\"-operator is defined. */\r\n  template <class T>\r\n  INLINE T rmin(T in1, T in2);\r\n\r\n  /** The minimum of four objects on which the \">\"-operator is defined. */\r\n  template <class T>\r\n  INLINE T rmin(T in1, T in2, T in3, T in4);\r\n\r\n  /** Scales the buffer by a constant factor. */\r\n  template <class T>\r\n  void scale(T *buffer, int length, T scaleFactor);\r\n\r\n  /** Subtracts the elements of 'buffer2' from 'buffer1' - type must define operator '-'. The\r\n  'result' buffer may be the same as 'buffer1' or 'buffer2'. */\r\n  template <class T>\r\n  void subtract(T *buffer1, T *buffer2, T *result, int length);\r\n\r\n  /** Returns the sum of the elements in the buffer for types which define the\r\n  addition operator (the += version thereof) and a constructor which can take an int\r\n  paramater as argument and initializes to the additive neutral element of that class when 0\r\n  is passed . */\r\n  template <class T>\r\n  INLINE T sum(T *buffer, int length);\r\n\r\n  /** Swaps two objects of class T. */\r\n  template <class T>\r\n  INLINE void swap(T &in1, T &in2);\r\n\r\n  //===============================================================================================\r\n  // implementation:\r\n\r\n  template <class T>\r\n  T absT(T x)\r\n  {\r\n    if( x > T(0) )\r\n      return x;\r\n    else if( x < T(0) )\r\n      return -x;\r\n    else\r\n      return T(0);\r\n  }\r\n\r\n  template <class T>\r\n  void add(T *buffer1, T *buffer2, T *result, int length)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n      result[i] = buffer1[i] + buffer2[i];\r\n  }\r\n\r\n  template <class T>\r\n  void circularShift(T *buffer, int length, int numPositions)\r\n  {\r\n    int na = abs(numPositions);\r\n    while( na > length )\r\n      na -=length;\r\n    T *tmp = new T[na];\r\n    if( numPositions < 0 )\r\n    {\r\n      memcpy(  tmp,                buffer,              na*sizeof(T));\r\n      memmove( buffer,            &buffer[na], (length-na)*sizeof(T));\r\n      memcpy( &buffer[length-na],  tmp,                 na*sizeof(T));\r\n    }\r\n    else if( numPositions > 0 )\r\n    {\r\n      memcpy(  tmp,        &buffer[length-na],          na*sizeof(T));\r\n      memmove(&buffer[na],  buffer,            (length-na)*sizeof(T));\r\n      memcpy(  buffer,      tmp,                        na*sizeof(T));\r\n    }\r\n    delete[] tmp;\r\n  }\r\n\r\n  template <class T>\r\n  void clipBuffer(T *buffer, int length, T min, T max)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n    {\r\n      if( buffer[i] < min )\r\n        buffer[i] = min;\r\n      else if( buffer[i] > max )\r\n        buffer[i] = max;\r\n    }\r\n  }\r\n\r\n  template <class T>\r\n  void copyBuffer(T *source, T *destination, int length)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n      destination[i] = source[i];\r\n  }\r\n\r\n  template <class T>\r\n  void fillWithZeros(T *buffer, int length)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n      buffer[i] = T(0);\r\n  }\r\n\r\n  template <class T>\r\n  T maxAbs(T *buffer, int length)\r\n  {\r\n    T max = T(0);\r\n    for(int i=0; i<length; i++)\r\n    {\r\n      if( absT(buffer[i]) > max)\r\n        max = absT(buffer[i]);\r\n    }\r\n    return max;\r\n  }\r\n\r\n  template <class T>\r\n  int maxIndex(T *buffer, int length)\r\n  {\r\n    T   value = buffer[0];\r\n    int index = 0;\r\n    for(int i=0; i<length; i++)\r\n    {\r\n      if( buffer[i] > value )\r\n      {\r\n        value = buffer[i];\r\n        index = i;\r\n      }\r\n    }\r\n    return index;\r\n  }\r\n\r\n  template <class T>\r\n  T maxValue(T *buffer, int length)\r\n  {\r\n    return buffer[maxIndex(buffer, length)];\r\n  }\r\n\r\n  template <class T>\r\n  int minIndex(T *buffer, int length)\r\n  {\r\n    T   value = buffer[0];\r\n    int index = 0;\r\n    for(int i=0; i<length; i++)\r\n    {\r\n      if( buffer[i] < value )\r\n      {\r\n        value = buffer[i];\r\n        index = i;\r\n      }\r\n    }\r\n    return index;\r\n  }\r\n\r\n  template <class T>\r\n  T minValue(T *buffer, int length)\r\n  {\r\n    return buffer[minIndex(buffer, length)];\r\n  }\r\n\r\n  template <class T>\r\n  T mean(T *buffer, int length)\r\n  {\r\n    return sum(buffer, length) / (T) length;\r\n  }\r\n\r\n  template <class T>\r\n  void multiply(T *buffer1, T *buffer2, T *result, int length)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n      result[i] = buffer1[i] * buffer2[i];\r\n  }\r\n\r\n  template <class T>\r\n  void normalize(T *buffer, int length, T maximum)\r\n  {\r\n    T max   = maxAbs(buffer, length);;\r\n    T scale = maximum / max;\r\n    for(int i=0; i<length; i++)\r\n      buffer[i] *= scale;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T product(T *buffer, int length)\r\n  {\r\n    T accu = T(1); // constructor call with 1 should initilize to multiplicative neutral element\r\n    for(int n=0; n<length; n++)\r\n      accu *= buffer[n];\r\n    return accu;\r\n  }\r\n\r\n  template <class T>\r\n  void removeMean(T *buffer, int length)\r\n  {\r\n    T m = mean(buffer, length);\r\n    for(int i=0; i<length; i++)\r\n      buffer[i] -= m;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T rmax(T in1, T in2)\r\n  {\r\n    if( in1 > in2 )\r\n      return in1;\r\n    else\r\n      return in2;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T rmax(T in1, T in2, T in3, T in4)\r\n  {\r\n    return rmax(rmax(in1, in2), rmax(in3, in4));\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T rmin(T in1, T in2)\r\n  {\r\n    if( in1 < in2 )\r\n      return in1;\r\n    else\r\n      return in2;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T rmin(T in1, T in2, T in3, T in4)\r\n  {\r\n    return rmin(rmin(in1, in2), rmin(in3, in4));\r\n  }\r\n\r\n  template <class T>\r\n  void reverse(T *buffer, int length)\r\n  {\r\n    T tmp;\r\n    int lengthMinus1 = length-1;\r\n    for(int i=0; i<=(length-2)/2; i++)\r\n    {\r\n      tmp                    = buffer[lengthMinus1-i];\r\n      buffer[lengthMinus1-i] = buffer[i];\r\n      buffer[i]              = tmp;\r\n    }\r\n  }\r\n\r\n  template <class T>\r\n  void scale(T *buffer, int length, T scaleFactor)\r\n  {\r\n    for(int n=0; n<length; n++)\r\n      buffer[n] *= scaleFactor;\r\n  }\r\n\r\n  template <class T>\r\n  void subtract(T *buffer1, T *buffer2, T *result, int length)\r\n  {\r\n    for(int i=0; i<length; i++)\r\n      result[i] = buffer1[i] - buffer2[i];\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T sum(T *buffer, int length)\r\n  {\r\n    T accu = T(0); // constructor call with 0 should initilizes to additive neutral element\r\n    for(int n=0; n<length; n++)\r\n      accu += buffer[n];\r\n    return accu;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE void swap(T &in1, T &in2)\r\n  {\r\n    T tmp = in1;\r\n    in1   = in2;\r\n    in2   = tmp;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // #ifndef rosic_FunctionTemplates_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_LeakyIntegrator.cpp",
    "content": "#include \"rosic_LeakyIntegrator.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nLeakyIntegrator::LeakyIntegrator()\r\n{\r\n  sampleRate  = SAMPLE_RATE; \r\n  tau         = 10.0f;    \r\n  y1          = 0.0;\r\n\r\n  calculateCoefficient();\r\n}\r\n\r\nLeakyIntegrator::~LeakyIntegrator()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid LeakyIntegrator::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n  {\r\n    sampleRate = newSampleRate;\r\n    calculateCoefficient();\r\n  }\r\n}\r\n\r\nvoid LeakyIntegrator::setTimeConstant(real_t newTimeConstant)\r\n{\r\n  if( newTimeConstant >= 0.0 && newTimeConstant != tau )\r\n  {\r\n    tau = newTimeConstant; \r\n    calculateCoefficient();\r\n  }\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// inquiry:\r\n\r\nreal_t LeakyIntegrator::getNormalizer(real_t tau1, real_t tau2, real_t fs)\r\n{\r\n  real_t td = 0.001*tau1;\r\n  real_t ta = 0.001*tau2;\r\n\r\n  // catch some special cases:\r\n  if( ta == 0.0 && td == 0.0 )\r\n    return 1.0;\r\n  else if( ta == 0.0 )\r\n  {\r\n    return 1.0 / (1.0-exp(-1.0/(fs*td)));\r\n  }\r\n  else if( td == 0.0 )\r\n  {\r\n    return 1.0 / (1.0-exp(-1.0/(fs*ta)));\r\n  }\r\n\r\n  // compute the filter coefficients:\r\n  real_t x  = exp( -1.0 / (fs*td)  );\r\n  real_t bd = 1-x;\r\n  real_t ad = -x;\r\n  x         = exp( -1.0 / (fs*ta)  );\r\n  real_t ba = 1-x;\r\n  real_t aa = -x;\r\n\r\n  // compute the location and height of the peak:\r\n  real_t xp;\r\n  if( ta == td )\r\n  {\r\n    real_t tp  = ta;\r\n    real_t np  = fs*tp;\r\n    xp         = (np+1.0)*ba*ba*pow(aa, np);\r\n  }\r\n  else\r\n  {\r\n    real_t tp  = log(ta/td) / ( (1.0/td) - (1.0/ta) );\r\n    real_t np  = fs*tp;\r\n    real_t s   = 1.0 / (aa-ad);\r\n    real_t b01 = s * aa*ba*bd;\r\n    real_t b02 = s * ad*ba*bd;\r\n    real_t a01 = s * (ad-aa)*aa;\r\n    real_t a02 = s * (ad-aa)*ad;\r\n    xp         = b01*pow(a01, np) - b02*pow(a02, np);\r\n  }\r\n\r\n  // return the normalizer as reciprocal of the peak height:\r\n  return 1.0/xp;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// others:\r\n\r\nvoid LeakyIntegrator::reset()\r\n{\r\n  y1 = 0;\r\n}\r\n\r\nvoid LeakyIntegrator::calculateCoefficient()\r\n{\r\n  if( tau > 0.0 )\r\n    coeff = exp( -1.0 / (sampleRate*0.001*tau)  );\r\n  else\r\n    coeff = 0.0;\r\n}\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_LeakyIntegrator.h",
    "content": "#ifndef rosic_LeakyIntegrator_h\r\n#define rosic_LeakyIntegrator_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a leaky integrator type lowpass filter with user adjustable time constant which is set \r\n  up in milliseconds.\r\n\r\n  */\r\n\r\n  class LeakyIntegrator  \r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    LeakyIntegrator();  \r\n\r\n    /** Destructor. */\r\n    ~LeakyIntegrator();  \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate. */\r\n    void setSampleRate(real_t newSampleRate);    \r\n\r\n    /** Sets the time constant (tau), value is expected in milliseconds. */\r\n    void setTimeConstant(real_t newTimeConstant); \r\n\r\n    /** Sets the internal state of the filter to the passed value. */\r\n    void setState(real_t newState) { y1 = newState; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the time constant (tau) in milliseconds. */\r\n    real_t getTimeConstant() const { return tau; }\r\n\r\n    /** Returns the normalizer, required to normalize the impulse response of a series connection \r\n    of two digital RC-type filters with time constants tau1 and tau2 (in milliseconds) to unity at \r\n    the given samplerate. */\r\n    static real_t getNormalizer(real_t tau1, real_t tau2, real_t sampleRate);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates one sample at a time. */\r\n    INLINE real_t getSample(real_t in);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Resets the internal state of the filter. */\r\n    void reset();\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    /** Calculates the filter coefficient. */\r\n    void calculateCoefficient();\r\n\r\n    real_t coeff;        // filter coefficient\r\n    real_t y1;           // previous output sample\r\n    real_t sampleRate;   // the samplerate\r\n    real_t tau;          // time constant in milliseconds\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t LeakyIntegrator::getSample(real_t in)\r\n  {\r\n    return y1 = in + coeff*(y1-in);\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif \r\n"
  },
  {
    "path": "lib/open303/src/rosic_MidiNoteEvent.cpp",
    "content": "#include \"rosic_MidiNoteEvent.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nMidiNoteEvent::MidiNoteEvent()\r\n{\r\n  key       = 64;\r\n  vel       = 64;\r\n  detune    = 0.0;\r\n  priority  = 0;\r\n}\r\n\r\nMidiNoteEvent::MidiNoteEvent(int initKey, int initVel, int initDetune, int initPriority)\r\n{\r\n  if( initKey >=0 && initKey <= 127)\r\n    key = initKey;\r\n  else\r\n    key = 64;\r\n\r\n  if( initVel >=0 && initVel <= 127)\r\n    vel = initVel;\r\n  else\r\n    vel = 64;\r\n\r\n  if( initPriority >=0 )\r\n    priority = initPriority;\r\n  else\r\n    priority = 0;\r\n\r\n  detune = initDetune;\r\n}\r\n\r\nMidiNoteEvent::~MidiNoteEvent()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid MidiNoteEvent::setKey(int newKey)\r\n{\r\n  if( newKey >=0 && newKey <= 127)\r\n    key = newKey;\r\n}\r\n\r\nvoid MidiNoteEvent::setVelocity(int newVelocity)\r\n{\r\n  if( newVelocity >=0 && newVelocity <= 127)\r\n    vel = newVelocity;\r\n}\r\n\r\nvoid MidiNoteEvent::setDetune(real_t newDetune)\r\n{\r\n  detune = newDetune;\r\n}\r\n\r\nvoid MidiNoteEvent::setPriority(int newPriority)\r\n{\r\n  if( newPriority >=0 )\r\n    priority = newPriority;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_MidiNoteEvent.h",
    "content": "#ifndef rosic_MidiNoteEvent_h\r\n#define rosic_MidiNoteEvent_h\r\n\r\n#include \"GlobalDefinitions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class for representing MIDI note-events.\r\n\r\n  */\r\n\r\n  class MidiNoteEvent\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Default constructor. */\r\n    MidiNoteEvent();\r\n\r\n    /** Constructor with initializations. */\r\n    MidiNoteEvent(int initKey, int initVel, int initDetune = 0, int initPriority = 0 );\r\n\r\n    /** Destructor. */\r\n    ~MidiNoteEvent();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the key of the note (as MIDI note number between 0...127). */\r\n    void setKey(int newKey);\r\n\r\n    /** Sets the velocity of the note (between 0...127). */\r\n    void setVelocity(int newVelocity);\r\n\r\n    /** Sets the detuning of the note (in semitones). */\r\n    void setDetune(real_t newDetune);\r\n\r\n    /** Sets the priority of the note. */\r\n    void setPriority(int newPriority);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the key of the note (as MIDI note number between 0...127). */\r\n    int getKey() const { return key; }\r\n\r\n    /** Returns the velocity of the note (between 0...127). */\r\n    int getVelocity() const { return vel; }\r\n\r\n    /** Returns the detuning of the note (in semitones). */\r\n    real_t getDetune() const { return detune; }\r\n\r\n    /** Returns the priority of the note. */\r\n    int getPriority() const { return priority; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // overloaded operators:\r\n\r\n    /** Note events are interpreted as equal if the have the same key. */\r\n    bool operator==(const MidiNoteEvent& note2) const\r\n    {\r\n      if( note2.key == key )\r\n        return true;\r\n      else\r\n        return false;\r\n    }\r\n\r\n  protected:\r\n\r\n    int    key;       // key of the note in the range 0...127\r\n    int    vel;       // velocity of the note in the range 0...127\r\n    real_t detune;    // detuning in cents (for microtuning)\r\n    int    priority;  // a priority value\r\n\r\n  };\r\n\r\n} // end namespace rosic\r\n\r\n#endif // MidiNoteEvent_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_NumberManipulations.cpp",
    "content": "#include \"rosic_NumberManipulations.h\"\r\nusing namespace rosic;\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_NumberManipulations.h",
    "content": "#ifndef rosic_NumberManipulations_h\r\n#define rosic_NumberManipulations_h\r\n\r\n// rosic includes:\r\n#include \"GlobalDefinitions.h\"\r\n#include <math.h>\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /** \\todo: check the linux versions....they have been inserted here sloppily in order to make it compile when\r\n  porting. */\r\n\r\n\r\n\r\n  /** Assuming, that the FPU is in 'to nearest even integer' rounding mode (which is the default),\r\n  this function rounds to the nearest integer using upward rounding when the argument is exactly\r\n  halfway between two integers (instead of returning the nearest even integer in this case).\r\n  Argument x must satify (INT_MIN/2)�1.0 < x < (INT_MAX/2)+1.0.  */\r\n  INLINE int roundToInt(real_t x)\r\n  {\r\n#  if defined _MSC_VER\r\n    const float round_to_nearest = 0.5f;\r\n    int i;\r\n     __asm\r\n     {\r\n       fld x;\r\n       fadd st, st (0);\r\n       fadd round_to_nearest;\r\n       fistp i;\r\n       sar i, 1;\r\n     }\r\n     return (i);\r\n    /*\r\n#  elif defined __GNUC__  // too many memory references for 'add', too many memory references for 'sar'\r\n    const float round_to_nearest = 0.5f;\r\n    int i;\r\n    asm(\"fld x\");\r\n    asm(\"fadd st, st(0)\");\r\n    asm(\"fadd round_to_nearest\");\r\n    asm(\"fistp i\");\r\n    asm(\"sar i, 1\");\r\n    return (i);\r\n     */\r\n#  else\r\n    real_t xFloor = floor(x);\r\n    real_t xFrac  = x-xFloor;\r\n    if( xFrac >= 0.5 )\r\n      return (int) xFloor + 1;\r\n    else\r\n      return (int) xFloor;\r\n#  endif\r\n  }\r\n\r\n\r\n  INLINE int floorInt(real_t x)\r\n  {\r\n#  if defined _MSC_VER\r\n    const float round_towards_m_i = -0.5f;\r\n    int i;\r\n    __asm\r\n    {\r\n      fld x;\r\n      fadd st, st (0);\r\n      fadd round_towards_m_i;\r\n      fistp i;\r\n      sar i, 1;\r\n    }\r\n    return (i);\r\n    /*\r\n#  elif defined __GNUC__  // under Linux, it says: memory input 2 is not directly addressable\r\n    const float round_towards_m_i = -0.5f;\r\n    int i;\r\n    __asm__ __volatile__\r\n    (\r\n    \"fldl     %1             \\n\\t\"\r\n    \"fadd     %%st(0), %%st  \\n\\t\"\r\n    \"fadds    %2             \\n\\t\"\r\n    \"fistpl   %0             \\n\\t\"\r\n    \"sarl     %0             \\n\\t\"\r\n    : \"=m\"(i)\r\n    : \"m\"(x), \"m\"(round_towards_m_i)\r\n    : \"memory\"\r\n    );\r\n    return (i);\r\n#  elif defined __GNUC__  // too many memory references for 'add', too many memory references for 'sar'\r\n    const float round_towards_m_i = -0.5f;\r\n    int i;\r\n    asm(\"fld x\");\r\n    asm(\"fadd st, st (0)\");\r\n    asm(\"fadd round_towards_m_i\");\r\n    asm(\"fistp i\");\r\n    asm(\"sar i, 1\");\r\n    return (i);\r\n     */\r\n#  else\r\n     return (int) floor(x);\r\n#  endif\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // #ifndef rosic_NumberManipulations_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_OnePoleFilter.cpp",
    "content": "#include \"rosic_OnePoleFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nOnePoleFilter::OnePoleFilter()\r\n{\r\n  shelvingGain = 1.0;\r\n  setSampleRate(SAMPLE_RATE);  // sampleRate = 44100 Hz by default\r\n  setMode      (0);        // bypass by default\r\n  setCutoff    (20000.0);  // cutoff = 20000 Hz by default\r\n  reset();                 // reset memorized samples to zero\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid OnePoleFilter::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n  sampleRateRec = 1.0 / sampleRate;\r\n\r\n  calcCoeffs();\r\n  return;\r\n}\r\n\r\nvoid OnePoleFilter::setMode(int newMode)\r\n{\r\n  mode = newMode; // 0:bypass, 1:Low Pass, 2:High Pass\r\n  calcCoeffs();\r\n}\r\n\r\nvoid OnePoleFilter::setCutoff(real_t newCutoff)\r\n{\r\n  if( (newCutoff>0.0) && (newCutoff<=20000.0) )\r\n    cutoff = newCutoff;\r\n  else\r\n    cutoff = 20000.0;\r\n\r\n  calcCoeffs();\r\n  return;\r\n}\r\n\r\nvoid OnePoleFilter::setShelvingGain(real_t newGain)\r\n{\r\n  if( newGain > 0.0 )\r\n  {\r\n    shelvingGain = newGain;\r\n    calcCoeffs();\r\n  }\r\n  else\r\n    DEBUG_BREAK; // this is a linear gain factor and must be >= 0.0\r\n}\r\n\r\nvoid OnePoleFilter::setShelvingGainInDecibels(real_t newGain)\r\n{\r\n  setShelvingGain(dB2amp(newGain));\r\n}\r\n\r\nvoid OnePoleFilter::setCoefficients(real_t newB0, real_t newB1, real_t newA1)\r\n{\r\n  b0 = newB0;\r\n  b1 = newB1;\r\n  a1 = newA1;\r\n}\r\n\r\nvoid OnePoleFilter::setInternalState(real_t newX1, real_t newY1)\r\n{\r\n  x1 = newX1;\r\n  y1 = newY1;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n//others:\r\n\r\nvoid OnePoleFilter::calcCoeffs()\r\n{\r\n  switch(mode)\r\n  {\r\n  case LOWPASS: \r\n    {\r\n      // formula from dspguide:\r\n      real_t x = exp( -2.0 * PI * cutoff * sampleRateRec); \r\n      b0 = 1-x;\r\n      b1 = 0.0;\r\n      a1 = x;\r\n    }\r\n    break;\r\n  case HIGHPASS:  \r\n    {\r\n      // formula from dspguide:\r\n      real_t x = exp( -2.0 * PI * cutoff * sampleRateRec);\r\n      b0 =  0.5*(1+x);\r\n      b1 = -0.5*(1+x);\r\n      a1 = x;\r\n    }\r\n    break;\r\n  case LOWSHELV:\r\n    {\r\n      // formula from DAFX:\r\n      real_t c = 0.5*(shelvingGain-1.0);\r\n      real_t t = tan(PI*cutoff*sampleRateRec);\r\n      real_t a;\r\n      if( shelvingGain >= 1.0 )\r\n        a = (t-1.0)/(t+1.0);\r\n      else\r\n        a = (t-shelvingGain)/(t+shelvingGain);\r\n\r\n      b0 = 1.0 + c + c*a;\r\n      b1 = c + c*a + a;\r\n      a1 = -a;\r\n    }\r\n    break;\r\n  case HIGHSHELV:\r\n    {\r\n      // formula from DAFX:\r\n      real_t c = 0.5*(shelvingGain-1.0);\r\n      real_t t = tan(PI*cutoff*sampleRateRec);\r\n      real_t a;\r\n      if( shelvingGain >= 1.0 )\r\n        a = (t-1.0)/(t+1.0);\r\n      else\r\n        a = (shelvingGain*t-1.0)/(shelvingGain*t+1.0);\r\n\r\n      b0 = 1.0 + c - c*a;\r\n      b1 = a + c*a - c;\r\n      a1 = -a;\r\n    }\r\n    break;\r\n\r\n  case ALLPASS:  \r\n    {\r\n      // formula from DAFX:\r\n      real_t t = tan(PI*cutoff*sampleRateRec);\r\n      real_t x = (t-1.0) / (t+1.0);\r\n\r\n      b0 = x;\r\n      b1 = 1.0;\r\n      a1 = -x;\r\n    }\r\n    break;\r\n\r\n  default: // bypass\r\n    {\r\n      b0 = 1.0;\r\n      b1 = 0.0;\r\n      a1 = 0.0;\r\n    }break;\r\n  }\r\n}\r\n\r\nvoid OnePoleFilter::reset()\r\n{\r\n  x1 = 0.0;\r\n  y1 = 0.0;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_OnePoleFilter.h",
    "content": "#ifndef rosic_OnePoleFilter_h\r\n#define rosic_OnePoleFilter_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is an implementation of a simple one-pole filter unit.\r\n\r\n  */\r\n\r\n  class OnePoleFilter\r\n  {\r\n\r\n  public:\r\n\r\n    /** This is an enumeration of the available filter modes. */\r\n    enum modes\r\n    {\r\n      BYPASS = 0,\r\n      LOWPASS,\r\n      HIGHPASS,\r\n      LOWSHELV,\r\n      HIGHSHELV,\r\n      ALLPASS\r\n    };\r\n    // \\todo (maybe): let the user choose between LP/HP versions obtained via bilinear trafo and \r\n    // impulse invariant trafo\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    OnePoleFilter();   \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate. */\r\n    void setSampleRate(real_t newSampleRate);\r\n\r\n    /** Chooses the filter mode. See the enumeration for available modes. */\r\n    void setMode(int newMode);\r\n\r\n    /** Sets the cutoff-frequency for this filter. */\r\n    void setCutoff(real_t newCutoff);\r\n\r\n    /** This will set the time constant 'tau' for the case, when lowpass mode is chosen. This is \r\n    the time, it takes for the impulse response to die away to 1/e = 0.368... or equivalently, the\r\n    time it takes for the step response to raise to 1-1/e = 0.632... */\r\n    void setLowpassTimeConstant(real_t newTimeConstant) { setCutoff(1.0/(2*PI*newTimeConstant)); }\r\n\r\n    /** Sets the gain factor for the shelving modes (this is not in decibels). */\r\n    void setShelvingGain(real_t newGain);\r\n\r\n    /** Sets the gain for the shelving modes in decibels. */\r\n    void setShelvingGainInDecibels(real_t newGain);\r\n\r\n    /** Sets the filter coefficients manually. */\r\n    void setCoefficients(real_t newB0, real_t newB1, real_t newA1);\r\n\r\n    /** Sets up the internal state variables for both channels. */\r\n    void setInternalState(real_t newX1, real_t newY1);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry\r\n\r\n    /** Returns the cutoff-frequency. */\r\n    real_t getCutoff() const { return cutoff; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates a single filtered output-sample. */\r\n    INLINE real_t getSample(real_t in);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Resets the internal buffers (for the \\f$ x[n-1], y[n-1] \\f$-samples) to zero. */\r\n    void reset();\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    // buffering:\r\n    real_t x1, y1;\r\n\r\n    // filter coefficients:\r\n    real_t b0; // feedforward coeffs\r\n    real_t b1;\r\n    real_t a1; // feedback coeff\r\n\r\n    // filter parameters:\r\n    real_t cutoff;\r\n    real_t shelvingGain;\r\n    int    mode;  \r\n\r\n    real_t sampleRate; \r\n    real_t sampleRateRec;  // reciprocal of the sampleRate\r\n\r\n    // internal functions:\r\n    void calcCoeffs();  // calculates filter coefficients from filter parameters\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t OnePoleFilter::getSample(real_t in)\r\n  {\r\n    // calculate the output sample:\r\n    y1 = b0*in + b1*x1 + a1*y1 + TINY;\r\n\r\n    // update the buffer variables:\r\n    x1 = in;\r\n\r\n    return y1;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_OnePoleFilter_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_Open303.cpp",
    "content": "#include \"rosic_Open303.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nOpen303::Open303(const rosic::WaveTable *saw, const rosic::WaveTable *square)\r\n{\r\n  tuning           =   440.0;\r\n  ampScaler        =     1.0;\r\n  oscFreq          =   440.0;\r\n  sampleRate       = SAMPLE_RATE;\r\n  level            =   -12.0;\r\n  levelByVel       =    12.0;\r\n  accent           =     0.0;\r\n  slideTime        =    60.0;\r\n  cutoff           =  1000.0;\r\n  envUpFraction    =     2.0/3.0;\r\n  normalAttack     =     3.0;\r\n  accentAttack     =     3.0;\r\n  normalDecay      =  1000.0;\r\n  accentDecay      =   200.0;\r\n  normalAmpRelease =     1.0;\r\n  accentAmpRelease =    50.0;\r\n  accentGain       =     0.0;\r\n  pitchWheelFactor =     1.0;\r\n  currentNote      =    -1;\r\n  currentVel       =     0;\r\n  noteOffCountDown =     0;\r\n  slideToNextNote  = false;\r\n  idle             = true;\r\n\r\n  setEnvMod(25.0);\r\n\r\n  oscillator.setWaveTables(saw, square);\r\n\r\n  //mainEnv.setNormalizeSum(true);\r\n  mainEnv.setNormalizeSum(false);\r\n\r\n  ampEnv.setAttack(0.0);\r\n  ampEnv.setDecay(1230.0);\r\n  ampEnv.setSustainLevel(0.0);\r\n  ampEnv.setRelease(0.5);\r\n  ampEnv.setTauScale(1.0);\r\n\r\n  pitchSlewLimiter.setTimeConstant(60.0);\r\n  //ampDeClicker.setTimeConstant(2.0);\r\n  ampDeClicker.setMode(BiquadFilter::LOWPASS12);\r\n  ampDeClicker.setGain( amp2dB(sqrt(0.5)) );\r\n  ampDeClicker.setFrequency(200.0);\r\n\r\n  rc1.setTimeConstant(0.0);\r\n  rc2.setTimeConstant(15.0);\r\n\r\n  highpass1.setMode(OnePoleFilter::HIGHPASS);\r\n  highpass2.setMode(OnePoleFilter::HIGHPASS);\r\n  allpass.setMode(OnePoleFilter::ALLPASS);\r\n  notch.setMode(BiquadFilter::BANDREJECT);\r\n\r\n  setSampleRate(sampleRate);\r\n\r\n  // tweakables:\r\n  highpass1.setCutoff(44.486);\r\n  highpass2.setCutoff(24.167);\r\n  allpass.setCutoff(14.008);\r\n  notch.setFrequency(7.5164);\r\n  notch.setBandwidth(4.7);\r\n\r\n  filter.setFeedbackHighpassCutoff(150.0);\r\n}\r\n\r\nOpen303::~Open303()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid Open303::setSampleRate(real_t newSampleRate, int oversampling /*= 4*/)\r\n{\r\n  mainEnv.setSampleRate         (       newSampleRate);\r\n  ampEnv.setSampleRate          (       newSampleRate);\r\n  pitchSlewLimiter.setSampleRate((float)newSampleRate);\r\n  ampDeClicker.setSampleRate(    (float)newSampleRate);\r\n  rc1.setSampleRate(             (float)newSampleRate);\r\n  rc2.setSampleRate(             (float)newSampleRate);\r\n\r\n#ifdef SEQUENCER\r\n  sequencer.setSampleRate(              newSampleRate);\r\n#endif\r\n\r\n  highpass2.setSampleRate     (         newSampleRate);\r\n  allpass.setSampleRate       (         newSampleRate);\r\n  notch.setSampleRate         (         newSampleRate);\r\n\r\n  highpass1.setSampleRate     (  oversampling*newSampleRate);\r\n\r\n  oscillator.setSampleRate    (  oversampling*newSampleRate);\r\n  filter.setSampleRate        (  oversampling*newSampleRate);\r\n}\r\n\r\nvoid Open303::setCutoff(real_t newCutoff)\r\n{\r\n  cutoff = newCutoff;\r\n  calculateEnvModScalerAndOffset();\r\n}\r\n\r\nvoid Open303::setEnvMod(real_t newEnvMod)\r\n{\r\n  envMod = newEnvMod;\r\n  calculateEnvModScalerAndOffset();\r\n}\r\n\r\nvoid Open303::setAccent(real_t newAccent)\r\n{\r\n  accent = 0.01 * newAccent;\r\n}\r\n\r\nvoid Open303::setVolume(real_t newLevel)\r\n{\r\n  level     = newLevel;\r\n  ampScaler = dB2amp(level);\r\n}\r\n\r\nvoid Open303::setSlideTime(real_t newSlideTime)\r\n{\r\n  if( newSlideTime >= 0.0 )\r\n  {\r\n    slideTime = newSlideTime;\r\n    pitchSlewLimiter.setTimeConstant((float)(0.2*slideTime));  // \\todo: tweak the scaling constant\r\n  }\r\n}\r\n\r\nvoid Open303::setPitchBend(real_t newPitchBend)\r\n{\r\n  pitchWheelFactor = pitchOffsetToFreqFactor(newPitchBend);\r\n}\r\n\r\n//------------------------------------------------------------------------------------------------------------\r\n// others:\r\n\r\nvoid Open303::noteOn(int noteNumber, int velocity, real_t detune)\r\n{\r\n#ifdef SEQUENCER\r\n  if( sequencer.modeWasChanged() )\r\n    allNotesOff();\r\n\r\n  if( sequencer.getSequencerMode() != AcidSequencer::OFF )\r\n  {\r\n    if( velocity == 0 )\r\n    {\r\n      sequencer.stop();\r\n      releaseNote(currentNote);\r\n      currentNote = -1;\r\n      currentVel  = 0;\r\n    }\r\n    else\r\n    {\r\n      sequencer.start();\r\n      noteOffCountDown = INT32_MAX;\r\n      slideToNextNote  = false;\r\n      currentNote      = noteNumber;\r\n      currentVel       = velocity;\r\n    }\r\n    idle = false;\r\n    return;\r\n  }\r\n#endif\r\n  if( velocity == 0 ) // velocity zero indicates note-off events\r\n  {\r\n    MidiNoteEvent releasedNote(noteNumber, 0);\r\n    noteList.remove(releasedNote);\r\n    if( noteList.empty() )\r\n    {\r\n      currentNote = -1;\r\n      currentVel  = 0;\r\n    }\r\n    else\r\n    {\r\n      currentNote = noteList.front().getKey();\r\n      currentVel  = noteList.front().getVelocity();\r\n    }\r\n    releaseNote(noteNumber);\r\n  }\r\n  else // velocity was not zero, so this is an actual note-on\r\n  {\r\n    // check if the note-list is empty (indicating that currently no note is playing) - if so,\r\n    // trigger a new note, otherwise, slide to the new note:\r\n    if( noteList.empty() )\r\n      triggerNote(noteNumber, velocity >= 100);\r\n    else\r\n      slideToNote(noteNumber, velocity >= 100);\r\n\r\n    currentNote = noteNumber;\r\n    currentVel  = 64;\r\n\r\n    // and we need to add the new note to our list, of course:\r\n    MidiNoteEvent newNote(noteNumber, velocity);\r\n    noteList.push_front(newNote);\r\n  }\r\n  idle = false;\r\n}\r\n\r\nvoid Open303::allNotesOff()\r\n{\r\n  noteList.clear();\r\n  ampEnv.noteOff();\r\n  currentNote = -1;\r\n  currentVel  = 0;\r\n}\r\n\r\nvoid Open303::triggerNote(int noteNumber, bool hasAccent)\r\n{\r\n  // retrigger osc and reset filter buffers only if amplitude is near zero (to avoid clicks):\r\n  if( idle )\r\n  {\r\n    oscillator.resetPhase();\r\n    filter.reset();\r\n    highpass1.reset();\r\n    highpass2.reset();\r\n    allpass.reset();\r\n    notch.reset();\r\n    antiAliasFilter.reset();\r\n    ampDeClicker.reset();\r\n  }\r\n\r\n  if( hasAccent )\r\n  {\r\n    accentGain = accent;\r\n    setMainEnvDecay(accentDecay);\r\n    ampEnv.setRelease(accentAmpRelease);\r\n  }\r\n  else\r\n  {\r\n    accentGain = 0.0;\r\n    setMainEnvDecay(normalDecay);\r\n    ampEnv.setRelease(normalAmpRelease);\r\n  }\r\n\r\n  oscFreq = pitchToFreq(noteNumber, tuning);\r\n  pitchSlewLimiter.setState(oscFreq);\r\n  mainEnv.trigger();\r\n  ampEnv.noteOn(true, noteNumber, 64);\r\n  idle = false;\r\n}\r\n\r\nvoid Open303::slideToNote(int noteNumber, bool hasAccent)\r\n{\r\n  oscFreq = pitchToFreq(noteNumber, tuning);\r\n\r\n  if( hasAccent )\r\n  {\r\n    accentGain = accent;\r\n    setMainEnvDecay(accentDecay);\r\n    ampEnv.setRelease(accentAmpRelease);\r\n  }\r\n  else\r\n  {\r\n    accentGain = 0.0;\r\n    setMainEnvDecay(normalDecay);\r\n    ampEnv.setRelease(normalAmpRelease);\r\n  }\r\n  idle = false;\r\n}\r\n\r\nvoid Open303::releaseNote(int noteNumber)\r\n{\r\n  // check if the note-list is empty now. if so, trigger a release, otherwise slide to the note\r\n  // at the beginning of the list (this is the most recent one which is still in the list). this\r\n  // initiates a slide back to the most recent note that is still being held:\r\n  if( noteList.empty() )\r\n  {\r\n    //filterEnvelope.noteOff();\r\n    ampEnv.noteOff();\r\n  }\r\n  else\r\n  {\r\n    // initiate slide back:\r\n    oscFreq     = pitchToFreq(currentNote);\r\n  }\r\n}\r\n\r\nvoid Open303::setMainEnvDecay(real_t newDecay)\r\n{\r\n  mainEnv.setDecayTimeConstant(newDecay);\r\n  updateNormalizer1();\r\n  updateNormalizer2();\r\n}\r\n\r\nvoid Open303::calculateEnvModScalerAndOffset()\r\n{\r\n  bool useMeasuredMapping = true; // might be shown as user parameter later\r\n  if( useMeasuredMapping == true )\r\n  {\r\n    // define some constants that arise from the measurements:\r\n    const real_t c0   = 3.138152786059267e+002;  // lowest nominal cutoff\r\n    const real_t c1   = 2.394411986817546e+003;  // highest nominal cutoff\r\n    const real_t oF   = 0.048292930943553;       // factor in line equation for offset\r\n    const real_t oC   = 0.294391201442418;       // constant in line equation for offset\r\n    const real_t sLoF = 3.773996325111173;       // factor in line eq. for scaler at low cutoff\r\n    const real_t sLoC = 0.736965594166206;       // constant in line eq. for scaler at low cutoff\r\n    const real_t sHiF = 4.194548788411135;       // factor in line eq. for scaler at high cutoff\r\n    const real_t sHiC = 0.864344900642434;       // constant in line eq. for scaler at high cutoff\r\n\r\n    // do the calculation of the scaler and offset:\r\n    real_t e   = linToLin(envMod, 0.0, 100.0, 0.0, 1.0);\r\n    real_t c   = expToLin(cutoff, c0,   c1,   0.0, 1.0);\r\n    real_t sLo = sLoF*e + sLoC;\r\n    real_t sHi = sHiF*e + sHiC;\r\n    envScaler  = (1-c)*sLo + c*sHi;\r\n    envOffset  =  oF*c + oC;\r\n  }\r\n  else\r\n  {\r\n    real_t upRatio   = pitchOffsetToFreqFactor(      envUpFraction *envMod);\r\n    real_t downRatio = pitchOffsetToFreqFactor(-(1.0-envUpFraction)*envMod);\r\n    envScaler        = upRatio - downRatio;\r\n    if( envScaler != 0.0 ) // avoid division by zero\r\n      envOffset = - (downRatio - 1.0) / (upRatio - downRatio);\r\n    else\r\n      envOffset = 0.0;\r\n  }\r\n}\r\n\r\nvoid Open303::updateNormalizer1()\r\n{\r\n  n1 = LeakyIntegrator::getNormalizer(mainEnv.getDecayTimeConstant(), rc1.getTimeConstant(),\r\n    sampleRate);\r\n  n1 = 1.0; // test\r\n}\r\n\r\nvoid Open303::updateNormalizer2()\r\n{\r\n  n2 = LeakyIntegrator::getNormalizer(mainEnv.getDecayTimeConstant(), rc2.getTimeConstant(),\r\n    sampleRate);\r\n  n2 = 1.0; // test\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_Open303.h",
    "content": "#ifndef rosic_Open303_h\r\n#define rosic_Open303_h\r\n\r\n#include \"rosic_MidiNoteEvent.h\"\r\n#include \"rosic_BlendOscillator.h\"\r\n#include \"rosic_BiquadFilter.h\"\r\n#include \"rosic_TeeBeeFilter.h\"\r\n#include \"rosic_AnalogEnvelope.h\"\r\n#include \"rosic_DecayEnvelope.h\"\r\n#include \"rosic_LeakyIntegrator.h\"\r\n#include \"rosic_EllipticQuarterBandFilter.h\"\r\n#ifdef SEQUENCER\r\n#include \"rosic_AcidSequencer.h\"\r\n#endif\r\n#define FLASHMEM_WAVETABLE\r\n#ifndef FLASHMEM_WAVETABLE\r\n#include \"wavetable_gen/rosic_MipMappedWaveTable.h\"\r\n#endif\r\n\r\n// #include <list>\r\n// using namespace std; // for the noteList\r\ntemplate <class T>\r\nstruct list\r\n{\r\n  T _front;\r\n\r\n  bool empty()\r\n  {\r\n    return _front == T();\r\n  }\r\n\r\n  void clear()\r\n  {\r\n    _front = T();\r\n  }\r\n\r\n  T &front()\r\n  {\r\n    return _front;\r\n  }\r\n\r\n  void push_front(T &e)\r\n  {\r\n    _front = e;\r\n  }\r\n\r\n  void remove(T &e)\r\n  {\r\n    if (_front == e)\r\n      _front = T();\r\n  }\r\n};\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a monophonic bass-synth that aims to emulate the sound of the famous Roland TB 303 and\r\n  goes a bit beyond.\r\n\r\n  */\r\n\r\n  class Open303\r\n  {\r\n\r\n  public:\r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    Open303(const rosic::WaveTable *saw, const rosic::WaveTable *square);\r\n\r\n    /** Destructor. */\r\n    ~Open303();\r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate (in Hz). */\r\n    void setSampleRate(real_t newSampleRate, int oversampling = 4);\r\n\r\n    /** Sets up the waveform continuously between saw and square - the input should be in the range \r\n    0...1 where 0 means pure saw and 1 means pure square. */\r\n    void setWaveform(real_t newWaveform) { oscillator.setBlendFactor(newWaveform); }\r\n\r\n    /** Sets the master tuning frequency for note A4 (usually 440 Hz). */\r\n    void setTuning(real_t newTuning) { tuning = newTuning; }\r\n\r\n    /** Sets the filter's nominal cutoff frequency (in Hz). */\r\n    void setCutoff(real_t newCutoff); \r\n\r\n    /** Sets the resonance amount for the filter. */\r\n    void setResonance(real_t newResonance) { filter.setResonance(newResonance); }\r\n\r\n    /** Sets the modulation depth of the filter's cutoff frequency by the filter-envelope generator \r\n    (in percent). */\r\n    void setEnvMod(real_t newEnvMod);\r\n\r\n    /** Sets the main envelope's decay time for non-accented notes (in milliseconds). \r\n    Devil Fish provides range of 30...3000 ms for this parameter. On the normal 303, this \r\n    parameter had a range of 200...2000 ms.  */\r\n    void setDecay(real_t newDecay) { normalDecay = newDecay; }\r\n\r\n    /** Sets the accent (in percent).  */\r\n    void setAccent(real_t newAccent);\r\n\r\n    /** Sets the master volume level (in dB). */\r\n    void setVolume(real_t newVolume);     \r\n\r\n    //  from here: parameter settings which were not available to the user in the 303:\r\n\r\n    /** Sets the amplitudes envelope's sustain level in decibels. Devil Fish uses the second half \r\n    of the range of the (amplitude) decay pot for this and lets the user adjust it between 0 \r\n    and 100% of the full volume. In the normal 303, this parameter was fixed to zero. */\r\n    void setAmpSustain(real_t newAmpSustain) { ampEnv.setSustainInDecibels(newAmpSustain); }\r\n\r\n    /** Sets the cutoff frequency for the highpass before the main filter. */\r\n    void setPreFilterHighpass(real_t newCutoff) { highpass1.setCutoff(newCutoff); }\r\n\r\n    /** Sets the cutoff frequency for the highpass inside the feedback loop of the main filter. */\r\n    void setFeedbackHighpass(real_t newCutoff) { filter.setFeedbackHighpassCutoff(newCutoff); }\r\n\r\n    /** Sets the cutoff frequency for the highpass after the main filter. */\r\n    void setPostFilterHighpass(real_t newCutoff) { highpass2.setCutoff(newCutoff); }\r\n\r\n    /** Sets the slide-time (in ms). The TB-303 had a slide time of 60 ms. */\r\n    void setSlideTime(real_t newSlideTime);\r\n\r\n    /** Sets the filter envelope's attack time for non-accented notes (in milliseconds). \r\n    Devil Fish provides range of 0.3...30 ms for this parameter. */\r\n    void setNormalAttack(real_t newNormalAttack) \r\n    { \r\n      normalAttack = newNormalAttack; \r\n      rc1.setTimeConstant(normalAttack);\r\n    }\r\n\r\n    /** Sets the filter envelope's attack time for accented notes (in milliseconds). In the \r\n    Devil Fish, accented notes have a fixed attack time of 3 ms.  */\r\n    void setAccentAttack(real_t newAccentAttack) \r\n    { \r\n      accentAttack = newAccentAttack; \r\n      rc2.setTimeConstant(accentAttack);\r\n    }\r\n\r\n    /** Sets the filter envelope's decay time for accented notes (in milliseconds). \r\n    Devil Fish provides range of 30...3000 ms for this parameter. On the normal 303, this \r\n    parameter was fixed to 200 ms.  */\r\n    void setAccentDecay(real_t newAccentDecay) { accentDecay = newAccentDecay; }\r\n\r\n    /** Sets the amplitudes envelope's decay time (in milliseconds). Devil Fish provides range of \r\n    16...3000 ms for this parameter. On the normal 303, this parameter was fixed to \r\n    approximately 3-4 seconds.  */\r\n    void setAmpDecay(real_t newAmpDecay) { ampEnv.setDecay(newAmpDecay); }\r\n\r\n    /** Sets the amplitudes envelope's release time (in milliseconds). On the normal 303, this \r\n    parameter was fixed to .....  */\r\n    void setAmpRelease(real_t newAmpRelease) \r\n    { \r\n      normalAmpRelease = newAmpRelease;\r\n      ampEnv.setRelease(newAmpRelease); \r\n    }\r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the waveform as a continuous value between 0...1 where 0 means pure saw and 1 means \r\n    pure square. */\r\n    real_t getWaveform() const { return oscillator.getBlendFactor(); }\r\n\r\n    /** Sets the master tuning frequency for note A4 (usually 440 Hz). */\r\n    real_t getTuning() const { return tuning; }\r\n\r\n    /** Returns the filter's nominal cutoff frequency (in Hz). */\r\n    real_t getCutoff() const { return cutoff; }\r\n\r\n    /** Returns the filter's resonance amount (in percent) */\r\n    real_t getResonance() const { return filter.getResonance(); }\r\n\r\n    /** Returns the modulation depth of the filter's cutoff frequency by the filter-envelope \r\n    generator (in percent). */\r\n    real_t getEnvMod() const { return envMod; }\r\n\r\n    /** Returns the filter envelope's decay time for non-accented notes (in milliseconds). */\r\n    real_t getDecay() const { return normalDecay; }\r\n\r\n    /** Returns the accent (in percent). */\r\n    real_t getAccent() const { return 100.0 * accent; }\r\n\r\n    /** Returns the master volume level (in dB). */\r\n    real_t getVolume() const { return level; }\r\n\r\n    //  from here: parameters which were not available to the user in the 303:\r\n\r\n    /** Returns the amplitudes envelope's sustain level (in dB). */\r\n    real_t getAmpSustain() const { return amp2dB(ampEnv.getSustain()); }\r\n\r\n    /** Returns the cutoff frequency for the highpass before the main filter. */\r\n    real_t getPreFilterHighpass() const { return highpass1.getCutoff(); }\r\n\r\n    /** Retruns the cutoff frequency for the highpass inside the feedback loop of the main \r\n    filter. */\r\n    real_t getFeedbackHighpass() const { return filter.getFeedbackHighpassCutoff(); }\r\n\r\n    /** Returns the cutoff frequency for the highpass after the main filter. */\r\n    real_t getPostFilterHighpass() const { return highpass2.getCutoff(); }\r\n\r\n    /** Returns the slide-time (in ms). */\r\n    real_t getSlideTime() const { return slideTime; }\r\n\r\n    /** Returns the filter envelope's attack time for non-accented notes (in milliseconds). */\r\n    real_t getNormalAttack() const { return normalAttack; }\r\n\r\n    /** Returns the filter envelope's attack time for non-accented notes (in milliseconds). */\r\n    real_t getAccentAttack() const { return accentAttack; }\r\n\r\n    /** Returns the filter envelope's decay time for non-accented notes (in milliseconds). */\r\n    real_t getAccentDecay() const { return accentDecay; }\r\n\r\n    /** Returns the amplitudes envelope's decay time (in milliseconds). */\r\n    real_t getAmpDecay() const { return ampEnv.getDecay(); }\r\n\r\n    /** Returns the amplitudes envelope's release time (in milliseconds). */\r\n    real_t getAmpRelease() const { return normalAmpRelease; }\r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates onse output sample at a time. */\r\n    INLINE real_t getSample(); \r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // event handling:\r\n\r\n    /** Accepts note-on events (note offs are also handled here as note ons with velocity zero). */ \r\n    void noteOn(int noteNumber, int velocity, real_t detune);\r\n\r\n    /** Turns all possibly running notes off. */\r\n    void allNotesOff();\r\n\r\n    /** Sets the pitchbend value in semitones. */ \r\n    void setPitchBend(real_t newPitchBend);  \r\n\r\n    //-----------------------------------------------------------------------------------------------\r\n    // embedded objects: \r\n    BlendOscillator           oscillator;\r\n    TeeBeeFilter              filter;\r\n    AnalogEnvelope            ampEnv; \r\n    DecayEnvelope             mainEnv;\r\n    LeakyIntegrator           pitchSlewLimiter;\r\n    //LeakyIntegrator           ampDeClicker;\r\n    BiquadFilter              ampDeClicker;\r\n    LeakyIntegrator           rc1, rc2;\r\n    OnePoleFilter             highpass1, highpass2, allpass; \r\n    BiquadFilter              notch;\r\n    EllipticQuarterBandFilter antiAliasFilter;\r\n#ifdef SEQUENCER\r\n    AcidSequencer             sequencer;\r\n#endif\r\n\r\n  protected:\r\n\r\n    /** Triggers a note (called either directly in noteOn or in getSample when the sequencer is \r\n    used). */\r\n    void triggerNote(int noteNumber, bool hasAccent);\r\n\r\n    /** Slides to a note (called either directly in noteOn or in getSample when the sequencer is \r\n    used). */\r\n    void slideToNote(int noteNumber, bool hasAccent);\r\n\r\n    /** Releases a note (called either directly in noteOn or in getSample when the sequencer is \r\n    used). */\r\n    void releaseNote(int noteNumber);\r\n\r\n    /** Sets the decay-time of the main envelope and updates the normalizers n1, n2 accordingly. */\r\n    void setMainEnvDecay(real_t newDecay);\r\n\r\n    void calculateEnvModScalerAndOffset();\r\n\r\n    /** Updates the normalizer n1 according to the time-constant of rc1 and the decay-time of the\r\n    main envelope generator. */\r\n    void updateNormalizer1();\r\n\r\n    /** Updates the normalizer n2 according to the time-constant of rc2 and the decay-time of the\r\n    main envelope generator. */\r\n    void updateNormalizer2();\r\n\r\n    int oversampling = 1;\r\n\r\n    real_t tuning;           // master tunung for A4 in Hz\r\n    real_t ampScaler;        // final volume as raw factor\r\n    real_t oscFreq;          // frequecy of the oscillator (without pitchbend)\r\n    real_t sampleRate;       // the (non-oversampled) sample rate\r\n    real_t level;            // master volume level (in dB)\r\n    real_t levelByVel;       // velocity dependence of the level (in dB)\r\n    real_t accent;           // scales all \"byVel\" parameters\r\n    real_t slideTime;        // the time to slide from one note to another (in ms)\r\n    real_t cutoff;           // nominal cutoff frequency of the filter\r\n    real_t envMod;           // strength of the envelope modulation in percent\r\n    real_t envUpFraction;    // fraction of the envelope that goes upward\r\n    real_t envOffset;        // offset for the normalized envelope ('bipolarity' parameter)\r\n    real_t envScaler;        // scale-factor for the normalized envelope (derived from envMod)\r\n    real_t normalAttack;     // attack time for the filter envelope on non-accented notes\r\n    real_t accentAttack;     // attack time for the filter envelope on accented notes\r\n    real_t normalDecay;      // decay time for the filter envelope on non-accented notes\r\n    real_t accentDecay;      // decay time for the filter envelope on accented notes\r\n    real_t normalAmpRelease; // amp-env release time for non-accented notes\r\n    real_t accentAmpRelease; // amp-env release time for accented notes\r\n    real_t accentGain;       // between 0.0...1.0 - to scale the 3rd amp-envelope on accents\r\n    real_t pitchWheelFactor; // scale factor for oscillator frequency from pitch-wheel\r\n    real_t n1, n2;           // normalizers for the RCs that are driven by the MEG\r\n    int    currentNote;      // note which is currently played (-1 if none)\r\n    int    currentVel;       // velocity of currently played note\r\n    int    noteOffCountDown; // a countdown variable till next note-off in sequencer mode\r\n    bool   slideToNextNote;  // indicate that we need to slide to the next note in sequencer mode\r\n    bool   idle;             // flag to indicate that we have currently nothing to do in getSample\r\n\r\n    list<MidiNoteEvent> noteList;\r\n\r\n  };\r\n\r\n  //-------------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE real_t Open303::getSample()\r\n  {\r\n    //if( sequencer.getSequencerMode() == AcidSequencer::OFF && ampEnv.endIsReached() )\r\n    //  return 0.0;\r\n    if( idle )\r\n      return 0.0;\r\n\r\n#ifdef SEQUENCER\r\n    // check the sequencer if we have some note to trigger:\r\n    if( sequencer.getSequencerMode() != AcidSequencer::OFF )\r\n    {\r\n      noteOffCountDown--;\r\n      if( noteOffCountDown == 0 || sequencer.isRunning() == false )\r\n        releaseNote(currentNote);\r\n\r\n      AcidNote *note = sequencer.getNote();\r\n      if( note != NULL )\r\n      {\r\n        if( note->gate == true && currentNote != -1)\r\n        {\r\n          int key = note->key + 12*note->octave + currentNote;\r\n          key = clip(key, 0, 127);\r\n\r\n          if( !slideToNextNote )\r\n            triggerNote(key, note->accent);\r\n          else\r\n            slideToNote(key, note->accent);\r\n\r\n          AcidNote* nextNote = sequencer.getNextScheduledNote();\r\n          if( note->slide && nextNote->gate == true )\r\n          {\r\n            noteOffCountDown = INT32_MAX;\r\n            slideToNextNote  = true;\r\n          }\r\n          else\r\n          {\r\n            noteOffCountDown = sequencer.getStepLengthInSamples();\r\n            slideToNextNote  = false;\r\n          }\r\n        }\r\n      }\r\n    }\r\n#endif\r\n    // calculate instantaneous oscillator frequency and set up the oscillator:\r\n    const real_t instFreq = pitchSlewLimiter.getSample(oscFreq);\r\n\r\n    // calculate instantaneous cutoff frequency from the nominal cutoff and all its modifiers and \r\n    // set up the filter:\r\n    real_t mainEnvOut = mainEnv.getSample();\r\n    real_t tmp1       = n1 * rc1.getSample(mainEnvOut);\r\n    real_t tmp2       = 0.0;\r\n    if( accentGain > 0.0 )\r\n      tmp2 = mainEnvOut;\r\n    tmp2 = n2 * rc2.getSample(tmp2);  \r\n    tmp1 = envScaler * ( tmp1 - envOffset );  // seems not to work yet\r\n    tmp2 = accentGain*tmp2;\r\n    real_t instCutoff = cutoff * pow(2.0, tmp1+tmp2);\r\n    filter.setCutoff(instCutoff);\r\n\r\n    real_t ampEnvOut = ampEnv.getSample();\r\n    //ampEnvOut += 0.45*filterEnvOut + accentGain*6.8*filterEnvOut; \r\n    if( ampEnv.isNoteOn() )\r\n      ampEnvOut += 0.45*mainEnvOut + accentGain*4.0*mainEnvOut; \r\n    ampEnvOut = ampDeClicker.getSample(ampEnvOut);\r\n\r\n    oscillator.setFrequency(instFreq*pitchWheelFactor);\r\n    oscillator.calculateIncrement();\r\n    // oversampled calculations:\r\n    real_t tmp;\r\n    for(int i=1; i<=oversampling; i++)\r\n    {\r\n      tmp  = -oscillator.getSample();         // the raw oscillator signal \r\n      tmp  = highpass1.getSample(tmp);        // pre-filter highpass\r\n      tmp  = filter.getSample(tmp);           // now it's filtered\r\n      //[eh2k] tmp  = antiAliasFilter.getSample(tmp);  // anti-aliasing filtered\r\n    }\r\n\r\n    // these filters may actually operate without oversampling (but only if we reset them in\r\n    // triggerNote - avoid clicks)\r\n    tmp  = allpass.getSample(tmp);\r\n    tmp  = highpass2.getSample(tmp);        \r\n    tmp  = notch.getSample(tmp);\r\n    tmp *= ampEnvOut;                       // amplified\r\n    tmp *= ampScaler;\r\n\r\n    // find out whether we may switch ourselves off for the next call:\r\n    idle = false;\r\n    //idle = (sequencer.getSequencerMode() == AcidSequencer::OFF && ampEnv.endIsReached() \r\n    //        && fabs(tmp) < 0.000001); // ampEnvOut < 0.000001;\r\n\r\n    return tmp;\r\n  }\r\n\r\n}\r\n\r\n#endif \r\n"
  },
  {
    "path": "lib/open303/src/rosic_RealFunctions.cpp",
    "content": "#include \"rosic_RealFunctions.h\"\r\nusing namespace rosic;\r\n\r\n"
  },
  {
    "path": "lib/open303/src/rosic_RealFunctions.h",
    "content": "#ifndef rosic_RealFunctions_h\r\n#define rosic_RealFunctions_h\r\n\r\n// standard library includes:\r\n#include <math.h>\r\n#include <stdlib.h>\r\n\r\n// rosic includes:\r\n#include \"GlobalFunctions.h\"\r\n#include \"rosic_NumberManipulations.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /** Inverse hyperbolic sine. */\r\n  INLINE real_t asinh(real_t x);\r\n\r\n  /** Returns -1.0 if x is below low, 0.0 if x is between low and high and 1.0 if x is above high. */\r\n  INLINE real_t belowOrAbove(real_t x, real_t low, real_t high);\r\n\r\n  /** Clips x into the range min...max. */\r\n  template <class T>\r\n  INLINE T clip(T x, T min, T max);\r\n\r\n  /** Evaluates the quartic polynomial y = a4*x^4 + a3*x^3 + a2*x^2 + a1*x + a0 at x. */\r\n  INLINE real_t evaluateQuartic(real_t x, real_t a0, real_t a1, real_t a2, real_t a3, real_t a4);\r\n\r\n  /** foldover at the specified value */\r\n  INLINE real_t foldOver(real_t x, real_t min, real_t max);\r\n\r\n  /** Computes an integer power of x by successively multiplying x with itself. */\r\n  INLINE real_t integerPower(real_t x, int exponent);\r\n\r\n  /** Generates a pseudo-random number between min and max. */\r\n  INLINE real_t random(real_t min=0.0, real_t max=1.0);\r\n\r\n  /** Generates a 2*pi periodic saw wave. */\r\n  INLINE real_t sawWave(real_t x);\r\n\r\n  /** Calculates sine and cosine of x - this is more efficient than calling sin(x) and\r\n  cos(x) seperately. */\r\n  INLINE void sinCos(real_t x, real_t* sinResult, real_t* cosResult);\r\n\r\n  /** Calculates a parabolic approximation of the sine and cosine of x. */\r\n  INLINE void sinCosApprox(real_t x, real_t* sinResult, real_t* cosResult);\r\n\r\n  /** Generates a 2*pi periodic square wave. */\r\n  INLINE real_t sqrWave(real_t x);\r\n\r\n  /** Rational approximation of the hyperbolic tangent. */\r\n  INLINE real_t tanhApprox(real_t x);\r\n\r\n  /** Generates a 2*pi periodic triangle wave. */\r\n  INLINE real_t triWave(real_t x);\r\n\r\n  //===============================================================================================\r\n  // implementation:\r\n\r\n  INLINE real_t asinh(real_t x)\r\n  {\r\n    return log(x + sqrt(x*x+1) );\r\n  }\r\n\r\n  INLINE real_t belowOrAbove(real_t x, real_t low, real_t high)\r\n  {\r\n    if( x < low )\r\n      return -1.0;\r\n    else if ( x > high )\r\n      return 1.0;\r\n    else\r\n      return 0.0;\r\n  }\r\n\r\n  template <class T>\r\n  INLINE T clip(T x, T min, T max)\r\n  {\r\n    if( x > max )\r\n      return max;\r\n    else if ( x < min )\r\n      return min;\r\n    else return x;\r\n  }\r\n\r\n  INLINE real_t evaluateQuartic(real_t x, real_t a0, real_t a1, real_t a2, real_t a3, real_t a4)\r\n  {\r\n    real_t x2 = x*x;\r\n    return x*(a3*x2+a1) + x2*(a4*x2+a2) + a0;\r\n  }\r\n\r\n  INLINE real_t foldOver(real_t x, real_t min, real_t max)\r\n  {\r\n    if( x > max )\r\n      return max - (x-max);\r\n    else if( x < min )\r\n      return min - (x-min);\r\n    else return x;\r\n  }\r\n\r\n  INLINE real_t integerPower(real_t x, int exponent)\r\n  {\r\n    real_t accu = 1.0;\r\n    for(int i=0; i<exponent; i++)\r\n      accu *= x;\r\n    return accu;\r\n  }\r\n\r\n  INLINE real_t random(real_t min, real_t max)\r\n  {\r\n    real_t tmp = (1.0/RAND_MAX) * rand() ;  // between 0...1\r\n    return linToLin(tmp, 0.0, 1.0, min, max);\r\n  }\r\n\r\n  INLINE real_t sawWave(real_t x)\r\n  {\r\n    real_t tmp = fmod(x, 2*PI);\r\n    if( tmp < PI )\r\n      return tmp/PI;\r\n    else\r\n      return (tmp/PI)-2.0;\r\n  }\r\n\r\n  INLINE void sinCos(real_t x, real_t* sinResult, real_t* cosResult)\r\n  {\r\n    #ifdef __GNUC__  // \\todo assembly-version causes compiler errors on gcc\r\n      *sinResult = sin(x);\r\n      *cosResult = cos(x);\r\n    #else\r\n      real_t s, c;     // do we need these intermediate variables?\r\n      __asm fld x\r\n      __asm fsincos\r\n      __asm fstp c\r\n      __asm fstp s\r\n      *sinResult = s;\r\n      *cosResult = c;\r\n    #endif\r\n  }\r\n\r\n  INLINE void sinCosApprox(real_t x, real_t* sinResult, real_t* cosResult)\r\n  {\r\n    static const real_t c = 0.70710678118654752440;\r\n\r\n    // restrict input x to the range 0.0...2*PI:\r\n    while( x > 2.0*PI )\r\n      x -= 2*PI;\r\n    while( x < 0.0 )\r\n      x += 2*PI;\r\n\r\n    if( x < PI/2 )\r\n    {\r\n      real_t tmp1 = x;\r\n      real_t tmp2 = (2/PI) * tmp1 - 0.5;\r\n      real_t tmp3 = (2-4*c)*tmp2*tmp2 + c;\r\n      *sinResult  = tmp3 + tmp2;\r\n      *cosResult  = tmp3 - tmp2;\r\n    }\r\n    else if( x < PI )\r\n    {\r\n      real_t tmp1 = (x-PI/2);\r\n      real_t tmp2 = 0.5 - (2/PI) * tmp1;\r\n      real_t tmp3 = (2-4*c)*tmp2*tmp2 + c;\r\n      *sinResult  = tmp2 + tmp3;\r\n      *cosResult  = tmp2 - tmp3;\r\n    }\r\n    else if( x < 1.5*PI )\r\n    {\r\n      real_t tmp1 = (x-PI);\r\n      real_t tmp2 = (2/PI) * tmp1 - 0.5;\r\n      real_t tmp3 = (4*c-2)*tmp2*tmp2 - c;\r\n      *sinResult  = tmp3 - tmp2;\r\n      *cosResult  = tmp3 + tmp2;\r\n    }\r\n    else\r\n    {\r\n      real_t tmp1 = (x-1.5*PI);\r\n      real_t tmp2 = (2/PI) * tmp1 - 0.5;\r\n      real_t tmp3 = (2-4*c)*tmp2*tmp2 + c;\r\n      *sinResult  = tmp2 - tmp3;\r\n      *cosResult  = tmp2 + tmp3;\r\n    }\r\n  }\r\n\r\n  INLINE real_t sqrWave(real_t x)\r\n  {\r\n    real_t tmp = fmod(x, 2*PI);\r\n    if( tmp < PI )\r\n      return 1.0;\r\n    else\r\n      return -1.0;\r\n  }\r\n\r\n  INLINE real_t tanhApprox(real_t x)\r\n  {\r\n    real_t a = fabs(2*x);\r\n    real_t b = 24+a*(12+a*(6+a));\r\n    return 2*(x*b)/(a*b+48);\r\n  }\r\n\r\n  INLINE real_t triWave(real_t x)\r\n  {\r\n    real_t tmp = fmod(x, 2*PI);\r\n    if( tmp < 0.5*PI )\r\n      return tmp/(0.5*PI);\r\n    else if( tmp < 1.5*PI )\r\n      return 1.0 - ((tmp-0.5*PI)/(0.5*PI));\r\n    else\r\n      return -1.0 + ((tmp-1.5*PI)/(0.5*PI));\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // #ifndef rosic_RealFunctions_h\r\n"
  },
  {
    "path": "lib/open303/src/rosic_TeeBeeFilter.cpp",
    "content": "#include \"rosic_TeeBeeFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nTeeBeeFilter::TeeBeeFilter()\r\n{\r\n  cutoff              =  1000.0;\r\n  drive               =     0.0;\r\n  driveFactor         =     1.0;\r\n  resonanceRaw        =     0.0;\r\n  resonanceSkewed     =     0.0;\r\n  g                   =     1.0;\r\n  sampleRate          = SAMPLE_RATE;\r\n  twoPiOverSampleRate = 2.0*PI/sampleRate;\r\n\r\n  feedbackHighpass.setMode(OnePoleFilter::HIGHPASS);\r\n  feedbackHighpass.setCutoff(150.0);\r\n\r\n  //setMode(LP_18);\r\n  setMode(TB_303);\r\n  calculateCoefficientsExact();\r\n  reset();\r\n}\r\n\r\nTeeBeeFilter::~TeeBeeFilter()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid TeeBeeFilter::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n  twoPiOverSampleRate = 2.0*PI/sampleRate;\r\n  feedbackHighpass.setSampleRate(newSampleRate);\r\n  calculateCoefficientsExact();\r\n}\r\n\r\nvoid TeeBeeFilter::setDrive(real_t newDrive)\r\n{\r\n  drive       = newDrive;\r\n  driveFactor = dB2amp(drive);\r\n}\r\n\r\nvoid TeeBeeFilter::setMode(int newMode)\r\n{\r\n  if( newMode >= 0 && newMode < NUM_MODES )\r\n  {\r\n    mode = newMode;\r\n    switch(mode)\r\n    {\r\n    case FLAT:      c0 =  1.0; c1 =  0.0; c2 =  0.0; c3 =  0.0; c4 =  0.0;  break;\r\n    case LP_6:      c0 =  0.0; c1 =  1.0; c2 =  0.0; c3 =  0.0; c4 =  0.0;  break;\r\n    case LP_12:     c0 =  0.0; c1 =  0.0; c2 =  1.0; c3 =  0.0; c4 =  0.0;  break;\r\n    case LP_18:     c0 =  0.0; c1 =  0.0; c2 =  0.0; c3 =  1.0; c4 =  0.0;  break;\r\n    case LP_24:     c0 =  0.0; c1 =  0.0; c2 =  0.0; c3 =  0.0; c4 =  1.0;  break;\r\n    case HP_6:      c0 =  1.0; c1 = -1.0; c2 =  0.0; c3 =  0.0; c4 =  0.0;  break;\r\n    case HP_12:     c0 =  1.0; c1 = -2.0; c2 =  1.0; c3 =  0.0; c4 =  0.0;  break;\r\n    case HP_18:     c0 =  1.0; c1 = -3.0; c2 =  3.0; c3 = -1.0; c4 =  0.0;  break;\r\n    case HP_24:     c0 =  1.0; c1 = -4.0; c2 =  6.0; c3 = -4.0; c4 =  1.0;  break;\r\n    case BP_12_12:  c0 =  0.0; c1 =  0.0; c2 =  1.0; c3 = -2.0; c4 =  1.0;  break;\r\n    case BP_6_18:   c0 =  0.0; c1 =  0.0; c2 =  0.0; c3 =  1.0; c4 = -1.0;  break;\r\n    case BP_18_6:   c0 =  0.0; c1 =  1.0; c2 = -3.0; c3 =  3.0; c4 = -1.0;  break;\r\n    case BP_6_12:   c0 =  0.0; c1 =  0.0; c2 =  1.0; c3 = -1.0; c4 =  0.0;  break;\r\n    case BP_12_6:   c0 =  0.0; c1 =  1.0; c2 = -2.0; c3 =  1.0; c4 =  0.0;  break;\r\n    case BP_6_6:    c0 =  0.0; c1 =  1.0; c2 = -1.0; c3 =  0.0; c4 =  0.0;  break;\r\n    default:        c0 =  1.0; c1 =  0.0; c2 =  0.0; c3 =  0.0; c4 =  0.0;  // flat\r\n    }\r\n  }\r\n  calculateCoefficientsApprox4();\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// others:\r\n\r\nvoid TeeBeeFilter::reset()\r\n{\r\n  feedbackHighpass.reset();\r\n  y1 = 0.0;\r\n  y2 = 0.0;\r\n  y3 = 0.0;\r\n  y4 = 0.0;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/rosic_TeeBeeFilter.h",
    "content": "#ifndef rosic_TeeBeeFilter_h\r\n#define rosic_TeeBeeFilter_h\r\n\r\n// standard-library includes:\r\n#include <stdlib.h>          // for the NULL macro\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_OnePoleFilter.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This class is a filter that aims to emulate the filter in the Roland TB 303. It's a variation of \r\n  the Moog ladder filter which includes a highpass in the feedback path that reduces the resonance\r\n  on low cutoff frequencies. Moreover, it has a highpass and an allpass filter in the input path to\r\n  pre-shape the input signal (important for the sonic character of internal and subsequent \r\n  nonlinearities).\r\n\r\n  ...18 vs. 24 dB? blah?\r\n\r\n  */\r\n\r\n  class TeeBeeFilter\r\n  {\r\n\r\n  public:\r\n\r\n    /** Enumeration of the available filter modes. */\r\n    enum modes\r\n    {\r\n      FLAT = 0,\r\n      LP_6,\r\n      LP_12,\r\n      LP_18,\r\n      LP_24,\r\n      HP_6,\r\n      HP_12,\r\n      HP_18,\r\n      HP_24,\r\n      BP_12_12,\r\n      BP_6_18,\r\n      BP_18_6,\r\n      BP_6_12,\r\n      BP_12_6,\r\n      BP_6_6,\r\n      TB_303,      // ala mystran & kunn (page 40 in the kvr-thread)\r\n\r\n      NUM_MODES\r\n    };\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    TeeBeeFilter();\r\n\r\n    /** Destructor. */\r\n    ~TeeBeeFilter();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** Sets the sample-rate for this filter. */\r\n    void setSampleRate(real_t newSampleRate);\r\n\r\n    /** Sets the cutoff frequency for this filter - the actual coefficient calculation may be \r\n    supressed by passing 'false' as second parameter, in this case, it should be triggered\r\n    manually later by calling calculateCoefficients. */\r\n    INLINE void setCutoff(real_t newCutoff, bool updateCoefficients = true);\r\n\r\n    /** Sets the resonance in percent where 100% is self oscillation. */\r\n    INLINE void setResonance(real_t newResonance, bool updateCoefficients = true);\r\n\r\n    /** Sets the input drive in decibels. */\r\n    void setDrive(real_t newDrive);\r\n\r\n    /** Sets the mode of the filter, @see: modes */\r\n    void setMode(int newMode);\r\n\r\n    /** Sets the cutoff frequency for the highpass filter in the feedback path. */\r\n    void setFeedbackHighpassCutoff(real_t newCutoff) { feedbackHighpass.setCutoff(newCutoff); }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the cutoff frequency of this filter. */\r\n    real_t getCutoff() const { return cutoff; }\r\n\r\n    /** Returns the resonance parameter of this filter. */\r\n    real_t getResonance() const { return 100.0 * resonanceRaw; }\r\n\r\n    /** Returns the drive parameter in decibels. */\r\n    real_t getDrive() const { return drive; }\r\n\r\n    /** Returns the slected filter mode. */\r\n    int getMode() const { return mode; }\r\n\r\n    /** Returns the cutoff frequency for the highpass filter in the feedback path. */\r\n    real_t getFeedbackHighpassCutoff() const { return feedbackHighpass.getCutoff(); }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Calculates one output sample at a time. */\r\n    INLINE real_t getSample(real_t in);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    /** Causes the filter to re-calculate the coeffiecients via the exact formulas. */\r\n    INLINE void calculateCoefficientsExact();\r\n\r\n    /** Causes the filter to re-calculate the coeffiecients using an approximation that is valid\r\n    for normalized radian cutoff frequencies up to pi/4. */\r\n    INLINE void calculateCoefficientsApprox4();\r\n\r\n    /** Implements the waveshaping nonlinearity between the stages. */\r\n    INLINE real_t shape(real_t x);\r\n\r\n    /** Resets the internal state variables. */\r\n    void reset();\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    real_t b0, a1;              // coefficients for the first order sections\r\n    real_t y1, y2, y3, y4;      // output signals of the 4 filter stages \r\n    real_t c0, c1, c2, c3, c4;  // coefficients for combining various ouput stages\r\n    real_t k;                   // feedback factor in the loop\r\n    real_t g;                   // output gain\r\n    real_t driveFactor;         // filter drive as raw factor\r\n    real_t cutoff;              // cutoff frequency\r\n    real_t drive;               // filter drive in decibels\r\n    real_t resonanceRaw;        // resonance parameter (normalized to 0...1)\r\n    real_t resonanceSkewed;     // mapped resonance parameter to make it behave more musical\r\n    real_t sampleRate;          // the sample rate in Hz\r\n    real_t twoPiOverSampleRate; // 2*PI/sampleRate\r\n    int    mode;                // the selected filter-mode\r\n\r\n    OnePoleFilter feedbackHighpass;\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n\r\n  INLINE void TeeBeeFilter::setCutoff(real_t newCutoff, bool updateCoefficients)\r\n  {\r\n    if( newCutoff != cutoff )\r\n    {\r\n      if( newCutoff < 200.0 )  // an absolute floor for the cutoff frequency - tweakable\r\n        cutoff = 200.0;  \r\n      else if( newCutoff > 20000.0 )\r\n        cutoff = 20000.0;\r\n      else\r\n        cutoff = newCutoff;\r\n\r\n      if( updateCoefficients == true )\r\n        calculateCoefficientsApprox4();\r\n    }\r\n  }\r\n\r\n  INLINE void TeeBeeFilter::setResonance(real_t newResonance, bool updateCoefficients)\r\n  {\r\n    resonanceRaw    = 0.01 * newResonance;\r\n    resonanceSkewed = (1.0-exp(-3.0*resonanceRaw)) / (1.0-exp(-3.0));\r\n    if( updateCoefficients == true )\r\n      calculateCoefficientsApprox4();\r\n  }\r\n\r\n  INLINE void TeeBeeFilter::calculateCoefficientsExact()\r\n  {\r\n    // calculate intermediate variables:\r\n    real_t wc = twoPiOverSampleRate * cutoff;\r\n    real_t s, c;\r\n    sinCos(wc, &s, &c);             // c = cos(wc); s = sin(wc);\r\n    real_t t  = tan(0.25*(wc-PI));\r\n    real_t r  = resonanceSkewed;\r\n\r\n    // calculate filter a1-coefficient tuned such the resonance frequency is just right:\r\n    real_t a1_fullRes = t / (s-c*t);\r\n\r\n    // calculate filter a1-coefficient as if there were no resonance:\r\n    real_t x        = exp(-wc);\r\n    real_t a1_noRes = -x;\r\n\r\n    // use a weighted sum between the resonance-tuned and no-resonance coefficient:\r\n    a1 = r*a1_fullRes + (1.0-r)*a1_noRes;\r\n\r\n    // calculate the b0-coefficient from the condition that each stage should be a leaky\r\n    // integrator:\r\n    b0 = 1.0+a1;\r\n\r\n    // calculate feedback factor by dividing the resonance parameter by the magnitude at the\r\n    // resonant frequency:\r\n    real_t gsq = b0*b0 / (1.0 + a1*a1 + 2.0*a1*c);\r\n    k          = r / (gsq*gsq);\r\n\r\n    if( mode == TB_303 )\r\n      k *= (17.0/4.0);\r\n  }\r\n\r\n  INLINE void TeeBeeFilter::calculateCoefficientsApprox4()\r\n  {\r\n    // calculate intermediate variables:\r\n    real_t wc  = twoPiOverSampleRate * cutoff;\r\n    real_t wc2 = wc*wc;\r\n    real_t r   = resonanceSkewed;\r\n    real_t tmp;\r\n\r\n    // compute the filter coefficient via a 12th order polynomial approximation (polynomial \r\n    // evaluation is done with a Horner-rule alike scheme with nested quadratic factors in the hope\r\n    // for potentially better parallelization compared to Horner's rule as is):\r\n    const real_t pa12 = -1.341281325101042e-02;\r\n    const real_t pa11 =  8.168739417977708e-02;\r\n    const real_t pa10 = -2.365036766021623e-01;\r\n    const real_t pa09 =  4.439739664918068e-01;\r\n    const real_t pa08 = -6.297350825423579e-01;\r\n    const real_t pa07 =  7.529691648678890e-01;\r\n    const real_t pa06 = -8.249882473764324e-01;\r\n    const real_t pa05 =  8.736418933533319e-01;\r\n    const real_t pa04 = -9.164580250284832e-01;\r\n    const real_t pa03 =  9.583192455599817e-01;\r\n    const real_t pa02 = -9.999994950291231e-01;\r\n    const real_t pa01 =  9.999999927726119e-01;\r\n    const real_t pa00 = -9.999999999857464e-01;\r\n    tmp  = wc2*pa12 + pa11*wc + pa10;\r\n    tmp  = wc2*tmp  + pa09*wc + pa08;\r\n    tmp  = wc2*tmp  + pa07*wc + pa06;\r\n    tmp  = wc2*tmp  + pa05*wc + pa04;\r\n    tmp  = wc2*tmp  + pa03*wc + pa02;\r\n    a1   = wc2*tmp  + pa01*wc + pa00;\r\n    b0   = 1.0 + a1;\r\n\r\n    // compute the scale factor for the resonance parameter (the factor to obtain k from r) via an\r\n    // 8th order polynomial approximation:\r\n    const real_t pr8 = -4.554677015609929e-05;\r\n    const real_t pr7 = -2.022131730719448e-05;\r\n    const real_t pr6 =  2.784706718370008e-03;\r\n    const real_t pr5 =  2.079921151733780e-03;\r\n    const real_t pr4 = -8.333236384240325e-02;\r\n    const real_t pr3 = -1.666668203490468e-01;\r\n    const real_t pr2 =  1.000000012124230e+00;\r\n    const real_t pr1 =  3.999999999650040e+00;\r\n    const real_t pr0 =  4.000000000000113e+00;\r\n    tmp  = wc2*pr8 + pr7*wc + pr6;\r\n    tmp  = wc2*tmp + pr5*wc + pr4;\r\n    tmp  = wc2*tmp + pr3*wc + pr2;\r\n    tmp  = wc2*tmp + pr1*wc + pr0; // this is now the scale factor\r\n    k    = r * tmp;\r\n    g    = 1.0;\r\n\r\n    if( mode == TB_303 )\r\n    {\r\n      real_t fx = wc * ONE_OVER_SQRT2/(2*PI); \r\n      b0 = (0.00045522346 + 6.1922189 * fx) / (1.0 + 12.358354 * fx + 4.4156345 * (fx * fx)); \r\n      k  = fx*(fx*(fx*(fx*(fx*(fx+7198.6997)-5837.7917)-476.47308)+614.95611)+213.87126)+16.998792; \r\n      g  = k * 0.058823529411764705882352941176471; // 17 reciprocal \r\n      g  = (g - 1.0) * r + 1.0;                     // r is 0 to 1.0\r\n      g  = (g * (1.0 + r)); \r\n      k  = k * r;                                   // k is ready now \r\n    }\r\n  }\r\n\r\n  INLINE real_t TeeBeeFilter::shape(real_t x)\r\n  {\r\n    // return tanhApprox(x); // \\todo: find some more suitable nonlinearity here\r\n    //return x; // test\r\n\r\n    const real_t r6 = 1.0/6.0;\r\n    x = clip<real_t>(x, -SQRT2, SQRT2);\r\n    return x - r6*x*x*x;\r\n\r\n    //return clip(x, -1.0, 1.0);\r\n  }\r\n\r\n  INLINE real_t TeeBeeFilter::getSample(real_t in)\r\n  {\r\n    real_t y0;\r\n\r\n    if( mode == TB_303 )\r\n    {\r\n      //y0  = in - feedbackHighpass.getSample(k * shape(y4));  \r\n      y0 = in - feedbackHighpass.getSample(k*y4);  \r\n      //y0  = in - k*shape(y4);  \r\n      //y0  = in-k*y4;  \r\n      y1 += 2*b0*(y0-y1+y2);\r\n      y2 +=   b0*(y1-2*y2+y3);\r\n      y3 +=   b0*(y2-2*y3+y4);\r\n      y4 +=   b0*(y3-2*y4);\r\n      return 2*g*y4;\r\n      //return 3*y4;\r\n    }\r\n\r\n    // apply drive and feedback to obtain the filter's input signal:\r\n    //real_t y0 = inputFilter.getSample(0.125*driveFactor*in) - feedbackHighpass.getSample(k*y4);\r\n    y0 = 0.125*driveFactor*in - feedbackHighpass.getSample(k*y4);  \r\n\r\n    /*\r\n    // cascade of four 1st order sections with nonlinearities:\r\n    y1 = shape(b0*y0 - a1*y1);\r\n    y2 = shape(b0*y1 - a1*y2);\r\n    y3 = shape(b0*y2 - a1*y3);\r\n    y4 = shape(b0*y3 - a1*y4);\r\n    */\r\n\r\n    // cascade of four 1st order sections with only 1 nonlinearity:\r\n    /*\r\n    y1 =       b0*y0 - a1*y1;\r\n    y2 =       b0*y1 - a1*y2;\r\n    y3 =       b0*y2 - a1*y3;\r\n    y4 = shape(b0*y3 - a1*y4);\r\n    */    \r\n    y1 = y0 + a1*(y0-y1);\r\n    y2 = y1 + a1*(y1-y2);\r\n    y3 = y2 + a1*(y2-y3);\r\n    y4 = y3 + a1*(y3-y4); // \\todo: performance test both versions of the ladder\r\n    //y4 = shape(y3 + a1*(y3-y4)); // \\todo: performance test both versions of the ladder\r\n\r\n    return 8.0 * (c0*y0 + c1*y1 + c2*y2 + c3*y3 + c4*y4);;\r\n  }\r\n\r\n}\r\n\r\n#endif // rosic_TeeBeeFilter_h\r\n"
  },
  {
    "path": "lib/open303/src/sequencer/rosic_AcidPattern.cpp",
    "content": "#include \"rosic_AcidPattern.h\"\r\nusing namespace rosic;\r\n\r\nAcidPattern::AcidPattern()\r\n{\r\n  numSteps   = 16;\r\n  stepLength = 0.5;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// setup:\r\n\r\nvoid AcidPattern::clear()\r\n{\r\n  for(int i=0; i<maxNumSteps; i++)\r\n  {\r\n    notes[i].key    = 0;\r\n    notes[i].octave = 0;\r\n    notes[i].accent = false;\r\n    notes[i].slide  = false;\r\n    notes[i].gate   = false;\r\n  }\r\n}\r\n\r\nvoid AcidPattern::randomize()\r\n{\r\n  for(int i=0; i<maxNumSteps; i++)\r\n  {\r\n    notes[i].key    = roundToInt(randomUniform( 0, 11));\r\n    notes[i].octave = roundToInt(randomUniform(-2,  2));\r\n    notes[i].accent = roundToInt(randomUniform( 0,  1)) == 1;\r\n    notes[i].slide  = roundToInt(randomUniform( 0,  1)) == 1;\r\n    notes[i].gate   = roundToInt(randomUniform( 0,  1)) == 1;\r\n  }\r\n}\r\n\r\nvoid AcidPattern::circularShift(int numStepsToShift)\r\n{\r\n  rosic::circularShift(notes, maxNumSteps, numStepsToShift);\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// inquiry:\r\n\r\nbool AcidPattern::isEmpty() const\r\n{\r\n  for(int i=0; i<maxNumSteps; i++)\r\n  {\r\n    if( notes[i].gate == true )\r\n      return false;\r\n  }\r\n  return true;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/sequencer/rosic_AcidPattern.h",
    "content": "#ifndef rosic_AcidPattern_h\r\n#define rosic_AcidPattern_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_RealFunctions.h\"\r\n#include \"../rosic_FunctionTemplates.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class for representing note-events of acid-lines involving slides and accents.\r\n\r\n  */\r\n\r\n  class AcidNote\r\n  {\r\n  public:\r\n\r\n    int  key;\r\n    int  octave;\r\n    bool accent;\r\n    bool slide;\r\n    bool gate;\r\n\r\n    AcidNote()\r\n    {\r\n      key    = 0;\r\n      octave = 0;\r\n      accent = false;\r\n      slide  = false;\r\n      gate   = false;\r\n    }\r\n\r\n    bool isInDefaultState()\r\n    { return key == 0 && octave == 0 && accent == false && slide == false && gate == false; }\r\n\r\n  };\r\n\r\n  /**\r\n\r\n  This is a class for representing typical acid-lines involving slides and accents.\r\n\r\n  */\r\n\r\n  class AcidPattern\r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    AcidPattern();   \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // setup:\r\n\r\n    /** Sets the length of one step (the time while gate is open) in units of one step (which \r\n    is one 16th note). */\r\n    void setStepLength(real_t newStepLength) { stepLength = newStepLength; }\r\n\r\n    /** Sets the key for one of the steps (between 0...12, where 0 and 12 is a C). */\r\n    void setKey(int step, int newKey) { notes[step].key = newKey; }\r\n\r\n    /** Sets the octave for one of the steps (0 is the root octave between C2...B2). */\r\n    void setOctave(int step, int newOctave) { notes[step].octave = newOctave; }\r\n\r\n    /** Sets the accent flag for one of the steps. */\r\n    void setAccent(int step, bool shouldBeAccented) { notes[step].accent = shouldBeAccented; }\r\n\r\n    /** Sets the slide flag for one of the steps. */\r\n    void setSlide(int step, bool shouldHaveSlide) { notes[step].slide = shouldHaveSlide; }\r\n\r\n    /** Sets the gate flag for one of the steps. */\r\n    void setGate(int step, bool shouldBeOpen) { notes[step].gate = shouldBeOpen; }\r\n\r\n    /** Clears all notes in the pattern. */\r\n    void clear();\r\n\r\n    /** Randomizes all notes in the pattern. \\todo: restrict possible note-values to some scales*/\r\n    void randomize();\r\n\r\n    /*\r\n    void setRandomSeed(int newSeed);\r\n    void resetRandomSeed();\r\n    void rendomizeGates();\r\n    void randomizeNotes(); \r\n    void randomizeAccents();\r\n    void randomizeSlides();\r\n    void randomizeOctaves(int maxOctavesUp, int maxOctavesDown);\r\n    */\r\n\r\n    /** Circularly shifts the whole pattern by the given number of steps. */\r\n    void circularShift(int numStepsToShift);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the length of one step (the time while gate is open) in units of one step (which \r\n    is one 16th note). */\r\n    real_t getStepLength() const { return stepLength; }\r\n\r\n    /** Returns the key for one of the steps (between 0...12, where 0 and 12 is a C). */\r\n    int getKey(int step) const { return notes[step].key; }\r\n\r\n    /** Returns the octave for one of the steps (0 is the root octave between C2...B2). */\r\n    int getOctave(int step) const { return notes[step].octave; }\r\n\r\n    /** Returns the accent flag for one of the steps. */\r\n    bool getAccent(int step) const { return notes[step].accent; }\r\n\r\n    /** Returns the slide flag for one of the steps. */\r\n    bool getSlide(int step) const { return notes[step].slide; }\r\n\r\n    /** Returns the gate flag for one of the steps. */\r\n    bool getGate(int step) const { return notes[step].gate; }\r\n\r\n    /** Returns the maximum number of steps. */\r\n    static int getMaxNumSteps() { return maxNumSteps; }\r\n\r\n    /** Returns the current number of steps. */\r\n    int getNumSteps() const { return numSteps; }\r\n\r\n    /** Returns true if the pattern is empty, false otherwise. */\r\n    bool isEmpty() const;\r\n\r\n    /** Returns a pointer to the note at the given step. */\r\n    AcidNote* getNote(int step) { return &notes[step]; }\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    static const int maxNumSteps = 16;\r\n    AcidNote notes[maxNumSteps];\r\n\r\n    int    numSteps;         // number of steps in the pattern\r\n    real_t stepLength;       // step length in step units (16th notes)\r\n\r\n  };\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_AcidPattern_h\r\n"
  },
  {
    "path": "lib/open303/src/sequencer/rosic_AcidSequencer.cpp",
    "content": "#include \"rosic_AcidSequencer.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nAcidSequencer::AcidSequencer()\r\n{\r\n  sampleRate    = SAMPLE_RATE;\r\n  bpm           = 140.0;\r\n  activePattern = 0;\r\n  running       = false;\r\n  countDown     = 0;\r\n  step          = 0;\r\n  sequencerMode = OFF;\r\n  driftError    = 0.0;\r\n  modeChanged   = false;\r\n\r\n  for(int k=0; k<=12; k++)\r\n    keyPermissible[k] = true;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid AcidSequencer::setSampleRate(real_t newSampleRate)\r\n{\r\n  if( newSampleRate > 0.0 )\r\n    sampleRate = newSampleRate;\r\n}\r\n\r\nvoid AcidSequencer::setMode(int newMode)\r\n{\r\n  if( newMode >= 0 && newMode < NUM_SEQUENCER_MODES )\r\n  {\r\n    sequencerMode = newMode;\r\n    modeChanged   = true;\r\n  }\r\n}\r\n\r\nvoid AcidSequencer::setKeyPermissible(int key, bool shouldBePermissible)\r\n{\r\n  if( key >= 0 && key <= 12 )\r\n    keyPermissible[key] = shouldBePermissible;\r\n}\r\n\r\nvoid AcidSequencer::toggleKeyPermissibility(int key)\r\n{\r\n  if( key >= 0 && key <= 12 )\r\n    keyPermissible[key] = !keyPermissible[key];\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// inquiry:\r\n\r\nAcidPattern* AcidSequencer::getPattern(int index)\r\n{\r\n  if( index < 0 || index >= numPatterns )\r\n    return NULL;\r\n  else\r\n    return &patterns[index];\r\n}\r\n\r\nbool AcidSequencer::modeWasChanged()\r\n{\r\n  bool result = modeChanged;\r\n  modeChanged = false;\r\n  return result;\r\n  // mmm...wouldn't we need mutexes here? the mode changes from the GUI and modeWasChanged\r\n  // is called from the audio-thread - otherwise note-hangs could happen?\r\n}\r\n\r\nbool AcidSequencer::isKeyPermissible(int key)\r\n{\r\n  if( key >= 0 && key <= 12 )\r\n    return keyPermissible[key];\r\n  else\r\n    return false;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// event handling:\r\n\r\nvoid AcidSequencer::start()\r\n{\r\n  // set up members such that we will trap in the else-branch in the next call to getNote():\r\n  running    = true;\r\n  countDown  = -1;\r\n  step       = 0;\r\n  driftError = 0.0;\r\n}\r\n\r\nvoid AcidSequencer::stop()\r\n{\r\n  running = false;\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// others:\r\n"
  },
  {
    "path": "lib/open303/src/sequencer/rosic_AcidSequencer.h",
    "content": "#ifndef rosic_AcidSequencer_h\r\n#define rosic_AcidSequencer_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_AcidPattern.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a sequencer for typical acid-lines involving slides and accents.\r\n\r\n  \\todo: make the permissibility-thing work correctly\r\n\r\n  */\r\n\r\n  class AcidSequencer\r\n  {\r\n\r\n  public:\r\n\r\n    enum sequencerModes\r\n    {\r\n      OFF = 0,\r\n      KEY_SYNC,\r\n      HOST_SYNC,\r\n\r\n      NUM_SEQUENCER_MODES\r\n    };\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    AcidSequencer();   \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // setup:\r\n\r\n    /** Sets the sample-rate. */\r\n    void setSampleRate(real_t newSampleRate);\r\n\r\n    /** Sets the tempo in BPM. */\r\n    void setTempo(real_t newTempoInBpm) { bpm = newTempoInBpm; }\r\n\r\n    /** Sets the key in one of the patterns for one of the steps (between 0...11, 0 is C). */\r\n    void setKey(int pattern, int step, int newKey);\r\n\r\n    /** Sets the octave for one of the steps (0 is the root octave between C2...B2). */\r\n    void setOctave(int pattern, int step, int newOctave);\r\n\r\n    /** Sets the accent flag for one of the steps. */\r\n    void setAccent(int pattern, int step, bool shouldBeAccented);\r\n\r\n    /** Sets the slide flag for one of the steps. */\r\n    void setSlide(int pattern, int step, bool shouldHaveSlide);\r\n\r\n    /** Sets the gate flag for one of the steps. */\r\n    void setGate(int pattern, int step, bool shouldBeOpen);\r\n\r\n    /** Selects one of the modes for the sequencer @see sequencerModes. */\r\n    void setMode(int newMode);\r\n\r\n    /** Sets the length of one step (the time while gate is open) in units of one step (which \r\n    is one 16th note). */\r\n    void setStepLength(real_t newStepLength) \r\n    { patterns[activePattern].setStepLength(newStepLength); }\r\n\r\n    /** Circularly shifts the active pattern by the given number of steps. */\r\n    void circularShift(int numSteps) { patterns[activePattern].circularShift(numSteps); }\r\n\r\n    /** Marks a key (note value from 0...12, where 0 and 12 is a C) as permissible or not. \r\n    Whenever the pattern currently played requires a key that is not permissible, the sequencer\r\n    will play the closest key among the permissible ones (it will select the lower when two \r\n    permissible keys are at equal distance). */\r\n    void setKeyPermissible(int key, bool shouldBePermissible);\r\n\r\n    /** Toggles the permissibility of a key on/off. */\r\n    void toggleKeyPermissibility(int key);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the number of patterns. */\r\n    int getNumPatterns() const { return numPatterns; }\r\n\r\n    /** Returns a pointer to the pattern with given index - NULL if index is out of range. */\r\n    AcidPattern* getPattern(int index);\r\n\r\n    /** Returns true when the sequencer is running, false otherwise. */\r\n    bool isRunning() const { return running; }\r\n\r\n    /** Returns once true, when the mode was changed due to a call to setMode. Thereafter, it will\r\n    always return false until a new call to setMode happens - whereafter it will again return true\r\n    once, ...and so on. The idea is that an outlying class may have to become aware of such changes\r\n    in order to turn off running notes (trigger all-notes-off or something). */\r\n    bool modeWasChanged();\r\n\r\n    /** Returns the length of one step (the time while gate is open) in units of one step (which \r\n    is one 16th note). */\r\n    real_t getStepLength() const { return patterns[activePattern].getStepLength(); }\r\n\r\n    /** Returns the length of one step (the time while gate is open) in samples. */\r\n    int getStepLengthInSamples() const \r\n    { return roundToInt(sampleRate*getStepLength()*beatsToSeconds(0.25, bpm)); }\r\n\r\n    /** Returns the selected sequencer mode @see sequencerModes. */\r\n    int getSequencerMode() const { return sequencerMode; }\r\n\r\n    /** Returns, if the given key is among the permissible ones. */\r\n    bool isKeyPermissible(int key);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Returns a pointer to the note that occurs at this sample if any, NULL otherwise. */\r\n    INLINE AcidNote* getNote();\r\n\r\n    /** Returns the next note that will be scheduled - after getNote() has returned a non-NULL \r\n    pointer, this will be the next non-NULL note that will be returned. So, if an event has \r\n    occurred at some time instant, you may investigate the next upcoming event beforehand by \r\n    calling this function. */\r\n    INLINE AcidNote* getNextScheduledNote() \r\n    { \r\n      AcidNote* note = patterns[activePattern].getNote(step);\r\n      note->key      = getClosestPermissibleKey(note->key); \r\n      return note;\r\n    }\r\n\r\n    /** Returns the key among the permissible ones which is closest to the given key - if two keys \r\n    are at the same distance, it returns the lower of them. If the passed key is itself \r\n    permissible, it will be returned unchanged. */\r\n    INLINE int getClosestPermissibleKey(int key);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // event handling:\r\n\r\n    /** Lets the sequencer start playing. */\r\n    void start();\r\n\r\n    /** Lets the sequencer stop playing. */\r\n    void stop();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // others:\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    static const int numPatterns = 16;\r\n    AcidPattern patterns[numPatterns];\r\n\r\n    int    activePattern;      // the currently selected pattern\r\n    bool   running;            // flag to indicate that sequencer is running\r\n    bool   modeChanged;        // flag that is set to true in setMode and to false in modeChanged\r\n    real_t sampleRate;         // the sample-rate\r\n    real_t bpm;                // the tempo in bpm\r\n    int    countDown;          // a sample-countdown - counts down for the next step to occur\r\n    int    step;               // the current step\r\n    int    sequencerMode;      // the selected mode for the sequencer\r\n    real_t driftError;         // to keep track and compensate for accumulating timing error\r\n    bool   keyPermissible[13]; // array of flags to indicate if a particular key is permissible\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // from here: definitions of the functions to be inlined, i.e. all functions which are supposed \r\n  // to be called at audio-rate (they can't be put into the .cpp file):\r\n\r\n  INLINE AcidNote* AcidSequencer::getNote()\r\n  {\r\n    if( running == false )\r\n      return NULL;\r\n\r\n    if( countDown > 0 )\r\n    {\r\n      countDown--;\r\n      return NULL;\r\n    }\r\n    else\r\n    {\r\n      real_t secondsToNextStep = beatsToSeconds(0.25, bpm);\r\n      real_t samplesToNextStep = secondsToNextStep * sampleRate;\r\n      countDown                = roundToInt(samplesToNextStep);\r\n\r\n      // keep track of accumulating error due to rounding and compensate when the accumulated error\r\n      // exceeds half a sample:\r\n      driftError += countDown - samplesToNextStep;\r\n      if( driftError < -0.5 ) // negative errors indicate that we are too early\r\n      {\r\n        driftError += 1.0;\r\n        countDown  += 1;\r\n      }\r\n      else if( driftError >= 0.5 )\r\n      {\r\n        driftError -= 1.0;\r\n        countDown  -= 1;\r\n      }\r\n\r\n      AcidNote* note = patterns[activePattern].getNote(step);\r\n      note->key      = getClosestPermissibleKey(note->key);\r\n      step           = (step+1) % patterns[activePattern].getNumSteps();\r\n      return note; \r\n    }\r\n  }\r\n\r\n  INLINE int AcidSequencer::getClosestPermissibleKey(int key)\r\n  {\r\n    if( key >= 0 && key <= 12 )\r\n    {\r\n      if( keyPermissible[key] )\r\n        return key;\r\n      else\r\n      {\r\n        // find the closest lower permissible key:\r\n        int kLo = key-1;\r\n        while( kLo >= 0 )\r\n        {\r\n          if( keyPermissible[kLo] )\r\n            break;\r\n          kLo--;\r\n        }\r\n\r\n        // find the closest higher permissible key:\r\n        int kHi = key+1;\r\n        while( kHi < 12 )\r\n        {\r\n          if( keyPermissible[kHi] )\r\n            break;\r\n          kHi++;\r\n        }\r\n\r\n        // select the closest (subject to the constraint that it must be between 0 and 12):\r\n        if(      (kHi-key) <  (kLo-key) && kHi <= 12 )\r\n          return kHi;\r\n        else if( (kLo-key) <  (kHi-key) && kLo >= 0  )\r\n          return kLo;\r\n        else if( (kHi-key) == (kLo-key) && kLo >= 0  )\r\n          return kLo;\r\n        else return -1; // none of the keys is permissible\r\n      }\r\n    }\r\n    else\r\n      return 0;\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_AcidSequencer_h\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/fft4g.h",
    "content": "/*\nFast Fourier/Cosine/Sine Transform\n    dimension   :one\n    data length :power of 2\n    decimation  :frequency\n    radix       :4, 2\n    data        :inplace\n    table       :use\nfunctions\n    cdft: Complex Discrete Fourier Transform\n    rdft: Real Discrete Fourier Transform\n    ddct: Discrete Cosine Transform\n    ddst: Discrete Sine Transform\n    dfct: Cosine Transform of RDFT (Real Symmetric DFT)\n    dfst: Sine Transform of RDFT (Real Anti-symmetric DFT)\nfunction prototypes\n    void cdft(int, int, double *, int *, double *);\n    void rdft(int, int, double *, int *, double *);\n    void ddct(int, int, double *, int *, double *);\n    void ddst(int, int, double *, int *, double *);\n    void dfct(int, double *, double *, int *, double *);\n    void dfst(int, double *, double *, int *, double *);\n\n\n-------- Complex DFT (Discrete Fourier Transform) --------\n    [definition]\n        <case1>\n            X[k] = sum_j=0^n-1 x[j]*exp(2*pi*i*j*k/n), 0<=k<n\n        <case2>\n            X[k] = sum_j=0^n-1 x[j]*exp(-2*pi*i*j*k/n), 0<=k<n\n        (notes: sum_j=0^n-1 is a summation from j=0 to n-1)\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            cdft(2*n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            cdft(2*n, -1, a, ip, w);\n    [parameters]\n        2*n            :data length (int)\n                        n >= 1, n = power of 2\n        a[0...2*n-1]   :input/output data (double *)\n                        input data\n                            a[2*j] = Re(x[j]), \n                            a[2*j+1] = Im(x[j]), 0<=j<n\n                        output data\n                            a[2*k] = Re(X[k]), \n                            a[2*k+1] = Im(X[k]), 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            cdft(2*n, -1, a, ip, w);\n        is \n            cdft(2*n, 1, a, ip, w);\n            for (j = 0; j <= 2 * n - 1; j++) {\n                a[j] *= 1.0 / n;\n            }\n        .\n\n\n-------- Real DFT / Inverse of Real DFT --------\n    [definition]\n        <case1> RDFT\n            R[k] = sum_j=0^n-1 a[j]*cos(2*pi*j*k/n), 0<=k<=n/2\n            I[k] = sum_j=0^n-1 a[j]*sin(2*pi*j*k/n), 0<k<n/2\n        <case2> IRDFT (excluding scale)\n            a[k] = (R[0] + R[n/2]*cos(pi*k))/2 + \n                   sum_j=1^n/2-1 R[j]*cos(2*pi*j*k/n) + \n                   sum_j=1^n/2-1 I[j]*sin(2*pi*j*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            rdft(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            rdft(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        <case1>\n                            output data\n                                a[2*k] = R[k], 0<=k<n/2\n                                a[2*k+1] = I[k], 0<k<n/2\n                                a[1] = R[n/2]\n                        <case2>\n                            input data\n                                a[2*j] = R[j], 0<=j<n/2\n                                a[2*j+1] = I[j], 0<j<n/2\n                                a[1] = R[n/2]\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n/2-1]   :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            rdft(n, 1, a, ip, w);\n        is \n            rdft(n, -1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DCT (Discrete Cosine Transform) / Inverse of DCT --------\n    [definition]\n        <case1> IDCT (excluding scale)\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DCT\n            C[k] = sum_j=0^n-1 a[j]*cos(pi*(j+1/2)*k/n), 0<=k<n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddct(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddct(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        output data\n                            a[k] = C[k], 0<=k<n\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            ddct(n, -1, a, ip, w);\n        is \n            a[0] *= 0.5;\n            ddct(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- DST (Discrete Sine Transform) / Inverse of DST --------\n    [definition]\n        <case1> IDST (excluding scale)\n            S[k] = sum_j=1^n A[j]*sin(pi*j*(k+1/2)/n), 0<=k<n\n        <case2> DST\n            S[k] = sum_j=0^n-1 a[j]*sin(pi*(j+1/2)*k/n), 0<k<=n\n    [usage]\n        <case1>\n            ip[0] = 0; // first time only\n            ddst(n, 1, a, ip, w);\n        <case2>\n            ip[0] = 0; // first time only\n            ddst(n, -1, a, ip, w);\n    [parameters]\n        n              :data length (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        <case1>\n                            input data\n                                a[j] = A[j], 0<j<n\n                                a[0] = A[n]\n                            output data\n                                a[k] = S[k], 0<=k<n\n                        <case2>\n                            output data\n                                a[k] = S[k], 0<k<n\n                                a[0] = S[n]\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/2)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/2+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/4-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            ddst(n, -1, a, ip, w);\n        is \n            a[0] *= 0.5;\n            ddst(n, 1, a, ip, w);\n            for (j = 0; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Cosine Transform of RDFT (Real Symmetric DFT) --------\n    [definition]\n        C[k] = sum_j=0^n a[j]*cos(pi*j*k/n), 0<=k<=n\n    [usage]\n        ip[0] = 0; // first time only\n        dfct(n, a, t, ip, w);\n    [parameters]\n        n              :data length - 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n]       :input/output data (double *)\n                        output data\n                            a[k] = C[k], 0<=k<=n\n        t[0...n/2]     :work area (double *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n        is \n            a[0] *= 0.5;\n            a[n] *= 0.5;\n            dfct(n, a, t, ip, w);\n            for (j = 0; j <= n; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\n-------- Sine Transform of RDFT (Real Anti-symmetric DFT) --------\n    [definition]\n        S[k] = sum_j=1^n-1 a[j]*sin(pi*j*k/n), 0<k<n\n    [usage]\n        ip[0] = 0; // first time only\n        dfst(n, a, t, ip, w);\n    [parameters]\n        n              :data length + 1 (int)\n                        n >= 2, n = power of 2\n        a[0...n-1]     :input/output data (double *)\n                        output data\n                            a[k] = S[k], 0<k<n\n                        (a[0] is used for work area)\n        t[0...n/2-1]   :work area (double *)\n        ip[0...*]      :work area for bit reversal (int *)\n                        length of ip >= 2+sqrt(n/4)\n                        strictly, \n                        length of ip >= \n                            2+(1<<(int)(log(n/4+0.5)/log(2))/2).\n                        ip[0],ip[1] are pointers of the cos/sin table.\n        w[0...n*5/8-1] :cos/sin table (double *)\n                        w[],ip[] are initialized if ip[0] == 0.\n    [remark]\n        Inverse of \n            dfst(n, a, t, ip, w);\n        is \n            dfst(n, a, t, ip, w);\n            for (j = 1; j <= n - 1; j++) {\n                a[j] *= 2.0 / n;\n            }\n        .\n\n\nAppendix :\n    The cos/sin table is recalculated when the larger table required.\n    w[] and ip[] are compatible with all routines.\n*/\n\n\nvoid cdft(int n, int isgn, real_t *a, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void bitrv2(int n, int *ip, real_t *a);\n    void bitrv2conj(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void cftbsub(int n, real_t *a, real_t *w);\n    \n    if (n > (ip[0] << 2)) {\n        makewt(n >> 2, ip, w);\n    }\n    if (n > 4) {\n        if (isgn >= 0) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n        } else {\n            bitrv2conj(n, ip + 2, a);\n            cftbsub(n, a, w);\n        }\n    } else if (n == 4) {\n        cftfsub(n, a, w);\n    }\n}\n\n\nvoid rdft(int n, int isgn, real_t *a, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void makect(int nc, int *ip, real_t *c);\n    void bitrv2(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void cftbsub(int n, real_t *a, real_t *w);\n    void rftfsub(int n, real_t *a, int nc, real_t *c);\n    void rftbsub(int n, real_t *a, int nc, real_t *c);\n    int nw, nc;\n    real_t xi;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 2)) {\n        nc = n >> 2;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xi = a[0] - a[1];\n        a[0] += a[1];\n        a[1] = xi;\n    } else {\n        a[1] = 0.5 * (a[0] - a[1]);\n        a[0] -= a[1];\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n}\n\n\nvoid ddct(int n, int isgn, real_t *a, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void makect(int nc, int *ip, real_t *c);\n    void bitrv2(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void cftbsub(int n, real_t *a, real_t *w);\n    void rftfsub(int n, real_t *a, int nc, real_t *c);\n    void rftbsub(int n, real_t *a, int nc, real_t *c);\n    void dctsub(int n, real_t *a, int nc, real_t *c);\n    int j, nw, nc;\n    real_t xr;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = a[j] - a[j - 1];\n            a[j] += a[j - 1];\n        }\n        a[1] = a[0] - xr;\n        a[0] += xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dctsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = a[j] - a[j + 1];\n            a[j] += a[j + 1];\n        }\n        a[n - 1] = xr;\n    }\n}\n\n\nvoid ddst(int n, int isgn, real_t *a, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void makect(int nc, int *ip, real_t *c);\n    void bitrv2(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void cftbsub(int n, real_t *a, real_t *w);\n    void rftfsub(int n, real_t *a, int nc, real_t *c);\n    void rftbsub(int n, real_t *a, int nc, real_t *c);\n    void dstsub(int n, real_t *a, int nc, real_t *c);\n    int j, nw, nc;\n    real_t xr;\n    \n    nw = ip[0];\n    if (n > (nw << 2)) {\n        nw = n >> 2;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > nc) {\n        nc = n;\n        makect(nc, ip, w + nw);\n    }\n    if (isgn < 0) {\n        xr = a[n - 1];\n        for (j = n - 2; j >= 2; j -= 2) {\n            a[j + 1] = -a[j] - a[j - 1];\n            a[j] -= a[j - 1];\n        }\n        a[1] = a[0] + xr;\n        a[0] -= xr;\n        if (n > 4) {\n            rftbsub(n, a, nc, w + nw);\n            bitrv2(n, ip + 2, a);\n            cftbsub(n, a, w);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n    }\n    dstsub(n, a, nc, w + nw);\n    if (isgn >= 0) {\n        if (n > 4) {\n            bitrv2(n, ip + 2, a);\n            cftfsub(n, a, w);\n            rftfsub(n, a, nc, w + nw);\n        } else if (n == 4) {\n            cftfsub(n, a, w);\n        }\n        xr = a[0] - a[1];\n        a[0] += a[1];\n        for (j = 2; j < n; j += 2) {\n            a[j - 1] = -a[j] - a[j + 1];\n            a[j] -= a[j + 1];\n        }\n        a[n - 1] = -xr;\n    }\n}\n\n\nvoid dfct(int n, real_t *a, real_t *t, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void makect(int nc, int *ip, real_t *c);\n    void bitrv2(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void rftfsub(int n, real_t *a, int nc, real_t *c);\n    void dctsub(int n, real_t *a, int nc, real_t *c);\n    int j, k, l, m, mh, nw, nc;\n    real_t xr, xi, yr, yi;\n    \n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    m = n >> 1;\n    yi = a[m];\n    xi = a[0] + a[n];\n    a[0] -= a[n];\n    t[0] = xi - yi;\n    t[m] = xi + yi;\n    if (n > 2) {\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] - a[n - j];\n            xi = a[j] + a[n - j];\n            yr = a[k] - a[n - k];\n            yi = a[k] + a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi - yi;\n            t[k] = xi + yi;\n        }\n        t[mh] = a[mh] + a[n - mh];\n        a[mh] -= a[n - mh];\n        dctsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[0] - a[1];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] + a[j + 1];\n            a[2 * j - 1] = a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dctsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[0] - t[1];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = t[j] - t[j + 1];\n                a[k + l] = t[j] + t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 0; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] - t[m + j];\n                t[k] = t[m + k] + t[m + j];\n            }\n            t[mh] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n        a[n] = t[2] - t[1];\n        a[0] = t[2] + t[1];\n    } else {\n        a[1] = a[0];\n        a[2] = t[0];\n        a[0] = t[1];\n    }\n}\n\n\nvoid dfst(int n, real_t *a, real_t *t, int *ip, real_t *w)\n{\n    void makewt(int nw, int *ip, real_t *w);\n    void makect(int nc, int *ip, real_t *c);\n    void bitrv2(int n, int *ip, real_t *a);\n    void cftfsub(int n, real_t *a, real_t *w);\n    void rftfsub(int n, real_t *a, int nc, real_t *c);\n    void dstsub(int n, real_t *a, int nc, real_t *c);\n    int j, k, l, m, mh, nw, nc;\n    real_t xr, xi, yr, yi;\n    \n    nw = ip[0];\n    if (n > (nw << 3)) {\n        nw = n >> 3;\n        makewt(nw, ip, w);\n    }\n    nc = ip[1];\n    if (n > (nc << 1)) {\n        nc = n >> 1;\n        makect(nc, ip, w + nw);\n    }\n    if (n > 2) {\n        m = n >> 1;\n        mh = m >> 1;\n        for (j = 1; j < mh; j++) {\n            k = m - j;\n            xr = a[j] + a[n - j];\n            xi = a[j] - a[n - j];\n            yr = a[k] + a[n - k];\n            yi = a[k] - a[n - k];\n            a[j] = xr;\n            a[k] = yr;\n            t[j] = xi + yi;\n            t[k] = xi - yi;\n        }\n        t[0] = a[mh] - a[n - mh];\n        a[mh] += a[n - mh];\n        a[0] = a[m];\n        dstsub(m, a, nc, w + nw);\n        if (m > 4) {\n            bitrv2(m, ip + 2, a);\n            cftfsub(m, a, w);\n            rftfsub(m, a, nc, w + nw);\n        } else if (m == 4) {\n            cftfsub(m, a, w);\n        }\n        a[n - 1] = a[1] - a[0];\n        a[1] = a[0] + a[1];\n        for (j = m - 2; j >= 2; j -= 2) {\n            a[2 * j + 1] = a[j] - a[j + 1];\n            a[2 * j - 1] = -a[j] - a[j + 1];\n        }\n        l = 2;\n        m = mh;\n        while (m >= 2) {\n            dstsub(m, t, nc, w + nw);\n            if (m > 4) {\n                bitrv2(m, ip + 2, t);\n                cftfsub(m, t, w);\n                rftfsub(m, t, nc, w + nw);\n            } else if (m == 4) {\n                cftfsub(m, t, w);\n            }\n            a[n - l] = t[1] - t[0];\n            a[l] = t[0] + t[1];\n            k = 0;\n            for (j = 2; j < m; j += 2) {\n                k += l << 2;\n                a[k - l] = -t[j] - t[j + 1];\n                a[k + l] = t[j] - t[j + 1];\n            }\n            l <<= 1;\n            mh = m >> 1;\n            for (j = 1; j < mh; j++) {\n                k = m - j;\n                t[j] = t[m + k] + t[m + j];\n                t[k] = t[m + k] - t[m + j];\n            }\n            t[0] = t[m + mh];\n            m = mh;\n        }\n        a[l] = t[0];\n    }\n    a[0] = 0;\n}\n\n\n/* -------- initializing routines -------- */\n\n\n#include <math.h>\n\nvoid makewt(int nw, int *ip, real_t *w)\n{\n    void bitrv2(int n, int *ip, real_t *a);\n    int j, nwh;\n    real_t delta, x, y;\n    \n    ip[0] = nw;\n    ip[1] = 1;\n    if (nw > 2) {\n        nwh = nw >> 1;\n        delta = atan(1.0) / nwh;\n        w[0] = 1;\n        w[1] = 0;\n        w[nwh] = cos(delta * nwh);\n        w[nwh + 1] = w[nwh];\n        if (nwh > 2) {\n            for (j = 2; j < nwh; j += 2) {\n                x = cos(delta * j);\n                y = sin(delta * j);\n                w[j] = x;\n                w[j + 1] = y;\n                w[nw - j] = y;\n                w[nw - j + 1] = x;\n            }\n            bitrv2(nw, ip + 2, w);\n        }\n    }\n}\n\n\nvoid makect(int nc, int *ip, real_t *c)\n{\n    int j, nch;\n    real_t delta;\n    \n    ip[1] = nc;\n    if (nc > 1) {\n        nch = nc >> 1;\n        delta = atan(1.0) / nch;\n        c[0] = cos(delta * nch);\n        c[nch] = 0.5 * c[0];\n        for (j = 1; j < nch; j++) {\n            c[j] = 0.5 * cos(delta * j);\n            c[nc - j] = 0.5 * sin(delta * j);\n        }\n    }\n}\n\n\n/* -------- child routines -------- */\n\n\nvoid bitrv2(int n, int *ip, real_t *a)\n{\n    int j, j1, k, k1, l, m, m2;\n    real_t xr, xi, yr, yi;\n    \n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            j1 = 2 * k + m2 + ip[k];\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = a[j1 + 1];\n            yr = a[k1];\n            yi = a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n        }\n    } else {\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = a[j1 + 1];\n                yr = a[k1];\n                yi = a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n        }\n    }\n}\n\n\nvoid bitrv2conj(int n, int *ip, real_t *a)\n{\n    int j, j1, k, k1, l, m, m2;\n    real_t xr, xi, yr, yi;\n    \n    ip[0] = 0;\n    l = n;\n    m = 1;\n    while ((m << 3) < l) {\n        l >>= 1;\n        for (j = 0; j < m; j++) {\n            ip[m + j] = ip[j] + l;\n        }\n        m <<= 1;\n    }\n    m2 = 2 * m;\n    if ((m << 3) == l) {\n        for (k = 0; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 -= m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += 2 * m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            j1 = k1 + m2;\n            k1 = j1 + m2;\n            xr = a[j1];\n            xi = -a[j1 + 1];\n            yr = a[k1];\n            yi = -a[k1 + 1];\n            a[j1] = yr;\n            a[j1 + 1] = yi;\n            a[k1] = xr;\n            a[k1 + 1] = xi;\n            k1 += m2;\n            a[k1 + 1] = -a[k1 + 1];\n        }\n    } else {\n        a[1] = -a[1];\n        a[m2 + 1] = -a[m2 + 1];\n        for (k = 1; k < m; k++) {\n            for (j = 0; j < k; j++) {\n                j1 = 2 * j + ip[k];\n                k1 = 2 * k + ip[j];\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n                j1 += m2;\n                k1 += m2;\n                xr = a[j1];\n                xi = -a[j1 + 1];\n                yr = a[k1];\n                yi = -a[k1 + 1];\n                a[j1] = yr;\n                a[j1 + 1] = yi;\n                a[k1] = xr;\n                a[k1 + 1] = xi;\n            }\n            k1 = 2 * k + ip[k];\n            a[k1 + 1] = -a[k1 + 1];\n            a[k1 + m2 + 1] = -a[k1 + m2 + 1];\n        }\n    }\n}\n\n\nvoid cftfsub(int n, real_t *a, real_t *w)\n{\n    void cft1st(int n, real_t *a, real_t *w);\n    void cftmdl(int n, int l, real_t *a, real_t *w);\n    int j, j1, j2, j3, l;\n    real_t x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i - x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i + x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i - x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = a[j + 1] - a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] += a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nvoid cftbsub(int n, real_t *a, real_t *w)\n{\n    void cft1st(int n, real_t *a, real_t *w);\n    void cftmdl(int n, int l, real_t *a, real_t *w);\n    int j, j1, j2, j3, l;\n    real_t x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    l = 2;\n    if (n > 8) {\n        cft1st(n, a, w);\n        l = 8;\n        while ((l << 2) < n) {\n            cftmdl(n, l, a, w);\n            l <<= 2;\n        }\n    }\n    if ((l << 2) == n) {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = -a[j + 1] - a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = -a[j + 1] + a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i - x2i;\n            a[j2] = x0r - x2r;\n            a[j2 + 1] = x0i + x2i;\n            a[j1] = x1r - x3i;\n            a[j1 + 1] = x1i - x3r;\n            a[j3] = x1r + x3i;\n            a[j3 + 1] = x1i + x3r;\n        }\n    } else {\n        for (j = 0; j < l; j += 2) {\n            j1 = j + l;\n            x0r = a[j] - a[j1];\n            x0i = -a[j + 1] + a[j1 + 1];\n            a[j] += a[j1];\n            a[j + 1] = -a[j + 1] - a[j1 + 1];\n            a[j1] = x0r;\n            a[j1 + 1] = x0i;\n        }\n    }\n}\n\n\nvoid cft1st(int n, real_t *a, real_t *w)\n{\n    int j, k1, k2;\n    real_t wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    real_t x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    x0r = a[0] + a[2];\n    x0i = a[1] + a[3];\n    x1r = a[0] - a[2];\n    x1i = a[1] - a[3];\n    x2r = a[4] + a[6];\n    x2i = a[5] + a[7];\n    x3r = a[4] - a[6];\n    x3i = a[5] - a[7];\n    a[0] = x0r + x2r;\n    a[1] = x0i + x2i;\n    a[4] = x0r - x2r;\n    a[5] = x0i - x2i;\n    a[2] = x1r - x3i;\n    a[3] = x1i + x3r;\n    a[6] = x1r + x3i;\n    a[7] = x1i - x3r;\n    wk1r = w[2];\n    x0r = a[8] + a[10];\n    x0i = a[9] + a[11];\n    x1r = a[8] - a[10];\n    x1i = a[9] - a[11];\n    x2r = a[12] + a[14];\n    x2i = a[13] + a[15];\n    x3r = a[12] - a[14];\n    x3i = a[13] - a[15];\n    a[8] = x0r + x2r;\n    a[9] = x0i + x2i;\n    a[12] = x2i - x0i;\n    a[13] = x0r - x2r;\n    x0r = x1r - x3i;\n    x0i = x1i + x3r;\n    a[10] = wk1r * (x0r - x0i);\n    a[11] = wk1r * (x0r + x0i);\n    x0r = x3i + x1r;\n    x0i = x3r - x1i;\n    a[14] = wk1r * (x0i - x0r);\n    a[15] = wk1r * (x0i + x0r);\n    k1 = 0;\n    for (j = 16; j < n; j += 16) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        x0r = a[j] + a[j + 2];\n        x0i = a[j + 1] + a[j + 3];\n        x1r = a[j] - a[j + 2];\n        x1i = a[j + 1] - a[j + 3];\n        x2r = a[j + 4] + a[j + 6];\n        x2i = a[j + 5] + a[j + 7];\n        x3r = a[j + 4] - a[j + 6];\n        x3i = a[j + 5] - a[j + 7];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 4] = wk2r * x0r - wk2i * x0i;\n        a[j + 5] = wk2r * x0i + wk2i * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 2] = wk1r * x0r - wk1i * x0i;\n        a[j + 3] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 6] = wk3r * x0r - wk3i * x0i;\n        a[j + 7] = wk3r * x0i + wk3i * x0r;\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        x0r = a[j + 8] + a[j + 10];\n        x0i = a[j + 9] + a[j + 11];\n        x1r = a[j + 8] - a[j + 10];\n        x1i = a[j + 9] - a[j + 11];\n        x2r = a[j + 12] + a[j + 14];\n        x2i = a[j + 13] + a[j + 15];\n        x3r = a[j + 12] - a[j + 14];\n        x3i = a[j + 13] - a[j + 15];\n        a[j + 8] = x0r + x2r;\n        a[j + 9] = x0i + x2i;\n        x0r -= x2r;\n        x0i -= x2i;\n        a[j + 12] = -wk2i * x0r - wk2r * x0i;\n        a[j + 13] = -wk2i * x0i + wk2r * x0r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j + 10] = wk1r * x0r - wk1i * x0i;\n        a[j + 11] = wk1r * x0i + wk1i * x0r;\n        x0r = x1r + x3i;\n        x0i = x1i - x3r;\n        a[j + 14] = wk3r * x0r - wk3i * x0i;\n        a[j + 15] = wk3r * x0i + wk3i * x0r;\n    }\n}\n\n\nvoid cftmdl(int n, int l, real_t *a, real_t *w)\n{\n    int j, j1, j2, j3, k, k1, k2, m, m2;\n    real_t wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;\n    real_t x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;\n    \n    m = l << 2;\n    for (j = 0; j < l; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x0r - x2r;\n        a[j2 + 1] = x0i - x2i;\n        a[j1] = x1r - x3i;\n        a[j1 + 1] = x1i + x3r;\n        a[j3] = x1r + x3i;\n        a[j3 + 1] = x1i - x3r;\n    }\n    wk1r = w[2];\n    for (j = m; j < l + m; j += 2) {\n        j1 = j + l;\n        j2 = j1 + l;\n        j3 = j2 + l;\n        x0r = a[j] + a[j1];\n        x0i = a[j + 1] + a[j1 + 1];\n        x1r = a[j] - a[j1];\n        x1i = a[j + 1] - a[j1 + 1];\n        x2r = a[j2] + a[j3];\n        x2i = a[j2 + 1] + a[j3 + 1];\n        x3r = a[j2] - a[j3];\n        x3i = a[j2 + 1] - a[j3 + 1];\n        a[j] = x0r + x2r;\n        a[j + 1] = x0i + x2i;\n        a[j2] = x2i - x0i;\n        a[j2 + 1] = x0r - x2r;\n        x0r = x1r - x3i;\n        x0i = x1i + x3r;\n        a[j1] = wk1r * (x0r - x0i);\n        a[j1 + 1] = wk1r * (x0r + x0i);\n        x0r = x3i + x1r;\n        x0i = x3r - x1i;\n        a[j3] = wk1r * (x0i - x0r);\n        a[j3 + 1] = wk1r * (x0i + x0r);\n    }\n    k1 = 0;\n    m2 = 2 * m;\n    for (k = m2; k < n; k += m2) {\n        k1 += 2;\n        k2 = 2 * k1;\n        wk2r = w[k1];\n        wk2i = w[k1 + 1];\n        wk1r = w[k2];\n        wk1i = w[k2 + 1];\n        wk3r = wk1r - 2 * wk2i * wk1i;\n        wk3i = 2 * wk2i * wk1r - wk1i;\n        for (j = k; j < l + k; j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = wk2r * x0r - wk2i * x0i;\n            a[j2 + 1] = wk2r * x0i + wk2i * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n        wk1r = w[k2 + 2];\n        wk1i = w[k2 + 3];\n        wk3r = wk1r - 2 * wk2r * wk1i;\n        wk3i = 2 * wk2r * wk1r - wk1i;\n        for (j = k + m; j < l + (k + m); j += 2) {\n            j1 = j + l;\n            j2 = j1 + l;\n            j3 = j2 + l;\n            x0r = a[j] + a[j1];\n            x0i = a[j + 1] + a[j1 + 1];\n            x1r = a[j] - a[j1];\n            x1i = a[j + 1] - a[j1 + 1];\n            x2r = a[j2] + a[j3];\n            x2i = a[j2 + 1] + a[j3 + 1];\n            x3r = a[j2] - a[j3];\n            x3i = a[j2 + 1] - a[j3 + 1];\n            a[j] = x0r + x2r;\n            a[j + 1] = x0i + x2i;\n            x0r -= x2r;\n            x0i -= x2i;\n            a[j2] = -wk2i * x0r - wk2r * x0i;\n            a[j2 + 1] = -wk2i * x0i + wk2r * x0r;\n            x0r = x1r - x3i;\n            x0i = x1i + x3r;\n            a[j1] = wk1r * x0r - wk1i * x0i;\n            a[j1 + 1] = wk1r * x0i + wk1i * x0r;\n            x0r = x1r + x3i;\n            x0i = x1i - x3r;\n            a[j3] = wk3r * x0r - wk3i * x0i;\n            a[j3 + 1] = wk3r * x0i + wk3i * x0r;\n        }\n    }\n}\n\n\nvoid rftfsub(int n, real_t *a, int nc, real_t *c)\n{\n    int j, k, kk, ks, m;\n    real_t wkr, wki, xr, xi, yr, yi;\n    \n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5 - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr - wki * xi;\n        yi = wkr * xi + wki * xr;\n        a[j] -= yr;\n        a[j + 1] -= yi;\n        a[k] += yr;\n        a[k + 1] -= yi;\n    }\n}\n\n\nvoid rftbsub(int n, real_t *a, int nc, real_t *c)\n{\n    int j, k, kk, ks, m;\n    real_t wkr, wki, xr, xi, yr, yi;\n    \n    a[1] = -a[1];\n    m = n >> 1;\n    ks = 2 * nc / m;\n    kk = 0;\n    for (j = 2; j < m; j += 2) {\n        k = n - j;\n        kk += ks;\n        wkr = 0.5 - c[nc - kk];\n        wki = c[kk];\n        xr = a[j] - a[k];\n        xi = a[j + 1] + a[k + 1];\n        yr = wkr * xr + wki * xi;\n        yi = wkr * xi - wki * xr;\n        a[j] -= yr;\n        a[j + 1] = yi - a[j + 1];\n        a[k] += yr;\n        a[k + 1] = yi - a[k + 1];\n    }\n    a[m + 1] = -a[m + 1];\n}\n\n\nvoid dctsub(int n, real_t *a, int nc, real_t *c)\n{\n    int j, k, kk, ks, m;\n    real_t wkr, wki, xr;\n    \n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[j] - wkr * a[k];\n        a[j] = wkr * a[j] + wki * a[k];\n        a[k] = xr;\n    }\n    a[m] *= c[0];\n}\n\n\nvoid dstsub(int n, real_t *a, int nc, real_t *c)\n{\n    int j, k, kk, ks, m;\n    real_t wkr, wki, xr;\n    \n    m = n >> 1;\n    ks = nc / n;\n    kk = 0;\n    for (j = 1; j < m; j++) {\n        k = n - j;\n        kk += ks;\n        wkr = c[kk] - c[nc - kk];\n        wki = c[kk] + c[nc - kk];\n        xr = wki * a[k] - wkr * a[j];\n        a[k] = wkr * a[k] + wki * a[j];\n        a[j] = xr;\n    }\n    a[m] *= c[0];\n}\n\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_Complex.cpp",
    "content": "#include \"rosic_Complex.h\"\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nComplex::Complex()\r\n{\r\n  re = im = 0.0;\r\n}\r\n\r\nComplex::Complex(real_t reInit)\r\n{\r\n  re = reInit;\r\n  im = 0.0;\r\n}\r\n\r\nComplex::Complex(real_t reInit, real_t imInit)\r\n{\r\n  re = reInit;\r\n  im = imInit;\r\n}\r\n\r\nComplex::~Complex()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// magnitude, angle, etc.\r\n\r\nreal_t Complex::getRadius()\r\n{\r\n  return sqrt(re*re + im*im);\r\n}\r\n\r\nreal_t Complex::getAngle()\r\n{\r\n  if((re==0.0) && (im==0))\r\n    return 0.0;\r\n  else\r\n    return atan2(im, re);\r\n}\r\n\r\nvoid Complex::setRadius(real_t newRadius)\r\n{\r\n  real_t phi = getAngle();\r\n  sinCos(phi, &im, &re);\r\n  re *= newRadius;           // re = newRadius * cos(phi);\r\n  im *= newRadius;           // im = newRadius * sin(phi);\r\n}\r\n\r\nvoid Complex::setAngle(real_t newAngle)\r\n{\r\n  real_t r = getRadius();\r\n  sinCos(newAngle, &im, &re);\r\n  re *= r;                   // re = r * cos(newAngle);\r\n  im *= r;                   // im = r * sin(newAngle);\r\n}\r\n\r\nvoid Complex::setRadiusAndAngle(real_t newRadius, real_t newAngle)\r\n{\r\n  sinCos(newAngle, &im, &re);\r\n  re *= newRadius;           // re = newRadius * cos(newAngle);\r\n  im *= newRadius;           // im = newRadius * sin(newAngle);\r\n}\r\n\r\nComplex Complex::getConjugate()\r\n{\r\n  return Complex(re, -im);\r\n}\r\n\r\nComplex Complex::getReciprocal()\r\n{\r\n  real_t scaler = 1.0 / (re*re + im*im);\r\n  return Complex(scaler*re, -scaler*im);\r\n}\r\n\r\nbool Complex::isReal()\r\n{\r\n  return (im == 0.0);\r\n}\r\n\r\nbool Complex::isImaginary()\r\n{\r\n  return (re == 0.0);\r\n}\r\n\r\nbool Complex::isInfinite()\r\n{\r\n  if( re == INF || re == NEG_INF || im == INF || im == NEG_INF )\r\n    return true;\r\n  else\r\n    return false;\r\n}\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_Complex.h",
    "content": "#ifndef rosic_Complex_h\r\n#define rosic_Complex_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_RealFunctions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class for complex numbers. It defines the basic arithmetic operations between complex \r\n  numbers as well as the special cases when one of the operands is real (real_t).\r\n\r\n  ATTENTION: do not define any further member variables, nor switch the ordering of re and im \r\n  because the FourierTransformer classes rely on the fact that a complex number consists of two \r\n  doubles re, im and nothing else (the algorithms actually run on buffers of doubles).\r\n\r\n  */\r\n\r\n  class Complex  \r\n  {\r\n\r\n  public:\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // public member variables:\r\n\r\n    /** Real part */\r\n    real_t re;  \r\n\r\n    /** Imaginary part */\r\n    real_t im;  \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. Initializes real and imaginary part to zero. */\r\n    Complex(); \r\n\r\n    /** Constructor. Initializes real part to the argument \"reInit\" and imaginary part to zero. */\r\n    Complex(real_t reInit);\r\n\r\n    /** Constructor. Initializes real and imaginary parts with the parameters. */\r\n    Complex(real_t reInit, real_t imInit);\r\n\r\n    /** Destructor. */\r\n    ~Complex(); \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // overloaded operators:\r\n\r\n    /** Compares two complex numbers of equality. */\r\n    bool operator==(const Complex& z) const  \r\n    {\r\n      if( re == z.re && im == z.im )\r\n        return true;\r\n      else\r\n        return false;\r\n    }\r\n\r\n    /** Compares two complex numbers of inequality. */\r\n    bool operator!=(const Complex& z) const  \r\n    {\r\n      if( re != z.re || im != z.im )\r\n        return true;\r\n      else\r\n        return false;\r\n    }\r\n\r\n    /** Defines the negative of a complex number. */\r\n    Complex operator-()\r\n    { return Complex(-re, -im); }\r\n\r\n    /** Adds another complex number to this complex and returns the result. */\r\n    Complex& operator+=(const Complex &z)\r\n    {\r\n      this->re += z.re;\r\n      this->im += z.im;\r\n      return *this;\r\n    }\r\n\r\n    /** Adds a real number to this complex and returns the result. */\r\n    Complex& operator+=(const real_t &r)\r\n    {\r\n      this->re += r;\r\n      return *this;\r\n    }\r\n\r\n    /** Subtracts another complex number from this complex and returns the result. */\r\n    Complex& operator-=(const Complex &z)\r\n    {\r\n      this->re -= z.re;\r\n      this->im -= z.im;\r\n      return *this;\r\n    }\r\n\r\n    /** Subtracts a real number from this complex and returns the result. */\r\n    Complex& operator-=(const real_t &r)\r\n    {\r\n      this->re -= r;\r\n      return *this;\r\n    }\r\n\r\n    /** Multiplies this complex number by another complex number and returns the result. */\r\n    Complex& operator*=(const Complex &z)\r\n    {\r\n      real_t reNew = re*z.re - im*z.im;\r\n      real_t imNew = re*z.im + im*z.re;\r\n      this->re     = reNew;\r\n      this->im     = imNew;\r\n      return *this;\r\n    }\r\n\r\n    /** Multiplies this complex number by a real number and returns the result. */\r\n    Complex& operator*=(const real_t &r)\r\n    {\r\n      this->re *= r;\r\n      this->im *= r;\r\n      return *this;\r\n    }\r\n\r\n    /** Divides this complex number by another complex number and returns the result. */\r\n    Complex& operator/=(const Complex &z)\r\n    {\r\n      real_t scale = 1.0 / (z.re*z.re + z.im*z.im);\r\n      real_t reNew = scale*( re*z.re  + im*z.im  );\r\n      real_t imNew = scale*( im*z.re  - re*z.im  );\r\n      this->re     = reNew;\r\n      this->im     = imNew;\r\n      return *this;\r\n    }\r\n\r\n    /** Divides this complex number by a real number and returns the result. */\r\n    Complex& operator/=(const real_t &r)\r\n    {\r\n      real_t scale = 1.0 / r;\r\n      this->re *= scale;\r\n      this->im *= scale;\r\n      return *this;\r\n    }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // set-functions:\r\n\r\n    /** Adjusts the radius of this complex number leaving the angle unchanged. */\r\n    void setRadius(real_t newRadius);\r\n\r\n    /** Adjusts the angle of this complex number leaving the magnitude unchanged. */    \r\n    void setAngle(real_t newAngle);\r\n\r\n    /** Sets the radius and angle of this complex number. */\r\n    void setRadiusAndAngle(real_t newRadius, real_t newAngle);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // get-functions:\r\n\r\n    /** Returns the radius of this complex number. */\r\n    real_t getRadius();\r\n\r\n    /** Returns the angle of this complex number. */\r\n    real_t getAngle();\r\n\r\n    /** Returns the complex conjugate of this complex number. */\r\n    Complex getConjugate();\r\n\r\n    /** Returns the reciprocal of this complex number. */\r\n    Complex getReciprocal();\r\n\r\n    /** Returns true, if this complex number is purely real. */\r\n    bool isReal();\r\n\r\n    /** Returns true, if this complex number is purely imaginary. */\r\n    bool isImaginary();\r\n\r\n    /** Returns true if real or imaginary part (or both) are plus or minus infinity, false \r\n    otherwise. */\r\n    bool isInfinite();\r\n\r\n  }; // end of class Complex\r\n\r\n  // some binary operators are defined outside the class such that the left hand operand does \r\n  // not necesarrily need to be of class Complex\r\n\r\n  /** Adds two complex numbers. */\r\n  INLINE Complex operator+(const Complex &z, const Complex &w)\r\n  { return Complex(z.re+w.re, z.im+w.im); }\r\n\r\n  /** Adds a complex and a real number. */\r\n  INLINE Complex operator+(const Complex &z, const real_t &r)\r\n  { return Complex(z.re+r, z.im); }\r\n\r\n  /** Adds a real and a complex number. */\r\n  INLINE Complex operator+(const real_t &r, const Complex &z)\r\n  { return Complex(z.re+r, z.im); }\r\n\r\n  /** Subtracts two complex numbers. */\r\n  INLINE Complex operator-(const Complex &z, const Complex &w)\r\n  { return Complex(z.re-w.re, z.im-w.im); }\r\n\r\n  /** Subtracts a real number from a complex number. */\r\n  INLINE Complex operator-(const Complex &z, const real_t &r)\r\n  { return Complex(z.re-r, z.im); }\r\n\r\n  /** Subtracts a complex number from a real number. */\r\n  INLINE Complex operator-(const real_t &r, const Complex &z)\r\n  { return Complex(r-z.re, -z.im); }\r\n\r\n  /** Multiplies two complex numbers. */\r\n  INLINE Complex operator*(const Complex &z, const Complex &w)\r\n  { return Complex(z.re*w.re-z.im*w.im, z.re*w.im+z.im*w.re); }\r\n\r\n  /** Multiplies a complex number and a real number. */\r\n  INLINE Complex operator*(const Complex &z, const real_t &r)\r\n  { return Complex(z.re*r, z.im*r); }\r\n\r\n  /** Multiplies a real number and a complex number. */\r\n  INLINE Complex operator*(const real_t &r, const Complex &z)\r\n  { return Complex(z.re*r, z.im*r); }\r\n\r\n  /** Divides two complex numbers. */\r\n  INLINE Complex operator/(const Complex &z, const Complex &w)\r\n  { \r\n    real_t scale = 1.0 / (w.re*w.re + w.im*w.im);\r\n    return Complex( scale*( z.re*w.re + z.im*w.im),     // real part\r\n                    scale*( z.im*w.re - z.re*w.im)  );  // imaginary part\r\n  }\r\n\r\n  /** Divides a complex number by a real number. */\r\n  INLINE Complex operator/(const Complex &z, const real_t &r)  \r\n  {\r\n    real_t scale = 1.0 / r;\r\n    return Complex(scale*z.re, scale*z.im);\r\n  }\r\n\r\n  /** Divides a real number by a complex number. */\r\n  INLINE Complex operator/(const real_t &r, const Complex &z)  \r\n  {\r\n    real_t scale = r / (z.re*z.re + z.im*z.im);\r\n    return Complex(scale*z.re, -scale*z.im);\r\n  }\r\n\r\n}  // end namespace rosic\r\n\r\n#endif // rosic_Complex_h\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.cpp",
    "content": "#include \"rosic_FourierTransformerRadix2.h\"\r\nnamespace rosic\r\n{\r\n#include \"fft4g.h\"\r\n}\r\n\r\nusing namespace rosic;\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// construction/destruction:\r\n\r\nFourierTransformerRadix2::FourierTransformerRadix2()\r\n{\r\n  N                   = 0;\r\n  logN                = 0;\r\n  direction           = FORWARD;\r\n  normalizationMode   = NORMALIZE_ON_INVERSE_TRAFO;\r\n  normalizationFactor = 1.0;\r\n#ifndef STATIC_N\r\n  w                   = NULL;\r\n  ip                  = NULL;\r\n  tmpBuffer           = NULL;\r\n#endif\r\n  setBlockSize(256);\r\n}\r\n\r\nFourierTransformerRadix2::~FourierTransformerRadix2()\r\n{\r\n  // free dynamically allocated memory:\r\n#ifndef STATIC_N\r\n  if( w != NULL )\r\n    delete[] w;\r\n  if( ip != NULL )\r\n    delete[] ip;\r\n  if( tmpBuffer != NULL )\r\n    delete[] tmpBuffer;\r\n#endif\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid FourierTransformerRadix2::setBlockSize(int newBlockSize)\r\n{\r\n  // check new blocksize for validity:\r\n  if( newBlockSize >= 2 && isPowerOfTwo(newBlockSize) )\r\n  {\r\n    // check, if the new blocksize is actually different from the old one in order to avoid \r\n    // unnecesarry re-allocations and re-computations:\r\n    if( newBlockSize != N )\r\n    {\r\n      N    = newBlockSize;\r\n      logN = (int) floor( log2((real_t) N + 0.5 ) );\r\n      updateNormalizationFactor();\r\n\r\n#ifndef STATIC_N\r\n      if( w != NULL )\r\n        delete[] w;\r\n      w    = new real_t[2*N];\r\n\r\n      if( ip != NULL )\r\n        delete[] ip;\r\n      ip    = new int[(int) ceil(4.0+sqrt((real_t)N))];\r\n      ip[0] = 0; // indicate that re-initialization is necesarry\r\n\r\n      if( tmpBuffer != NULL )\r\n        delete[] tmpBuffer;\r\n      tmpBuffer = new Complex[N];\r\n#else\r\n    ip[0] = 0;\r\n#endif\r\n    }\r\n  }\r\n  else if( !isPowerOfTwo(newBlockSize) || newBlockSize <= 1 )\r\n    DEBUG_BREAK; // this class can only deal with blocksizes >= 2 that are a power of two\r\n}\r\n\r\nvoid FourierTransformerRadix2::setDirection(int newDirection)\r\n{\r\n  if( newDirection >= FORWARD && newDirection <= INVERSE )\r\n  {\r\n    // only when the new direction is actually different form the old one, we have to conjugate \r\n    // all the twiddle-factors, otherwise everything must stay as is:\r\n    if( newDirection != direction )\r\n    {\r\n      direction = newDirection;\r\n      updateNormalizationFactor();\r\n    }\r\n  }\r\n  else\r\n    DEBUG_BREAK; // passed int-parameter does not correspond to any meaningful enum-field\r\n}\r\n\r\nvoid FourierTransformerRadix2::setNormalizationMode(int newNormalizationMode)\r\n{\r\n  if( newNormalizationMode >= NORMALIZE_ON_FORWARD_TRAFO && \r\n      newNormalizationMode <= ORTHONORMAL_TRAFO )\r\n  {\r\n    normalizationMode = newNormalizationMode;\r\n    updateNormalizationFactor();\r\n  }\r\n  else\r\n    DEBUG_BREAK; // passed int-parameter does not correspond to any meaningful enum-field\r\n}\r\n\r\nvoid FourierTransformerRadix2::setRealSignalMode(bool willBeUsedForRealSignals)\r\n{\r\n  ip[0] = 0; // retriggers twiddle-factor computation\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// signal processing:\r\n\r\nvoid FourierTransformerRadix2::transformComplexBufferInPlace(Complex *buffer)\r\n{\r\n  // retrieve the adresses of the real part of the first array entries in order to treat the \r\n  // Complex arrays as arrays of two successive real_t-numbers:\r\n  real_t* d_buffer = &(buffer[0].re);\r\n\r\n  // normalize the FFT-input, if required:\r\n  if( normalizationFactor != 1.0 )\r\n  {\r\n    for(int n=0; n<2*N; n++)\r\n      d_buffer[n] *= normalizationFactor;\r\n  }\r\n\r\n  // use Ooura's routine:\r\n  int sign;\r\n  if( direction == FORWARD )\r\n    sign = -1;\r\n  else\r\n    sign = +1;\r\n  cdft(2*N, sign, d_buffer, ip, w);\r\n}\r\n\r\nvoid FourierTransformerRadix2::transformComplexBuffer(Complex *inBuffer, Complex *outBuffer)\r\n{\r\n  // retrieve the adresses of the real part of the first array entries in order to treat the \r\n  // Complex arrays as arrays of two successive real_t-numbers:\r\n  real_t* d_inBuffer  = &(inBuffer[0].re);\r\n  real_t* d_outBuffer = &(outBuffer[0].re);\r\n\r\n  // copy the input into the output for the in-place routine (thereby normalize, if necesarry):\r\n  int n;\r\n  if( normalizationFactor != 1.0 )\r\n  {\r\n    for(n=0; n<2*N; n++)\r\n      d_outBuffer[n] = d_inBuffer[n] * normalizationFactor;\r\n  }\r\n  else\r\n  {\r\n    for(n=0; n<2*N; n++)\r\n      d_outBuffer[n] = d_inBuffer[n];\r\n  }\r\n\r\n  // use Ooura's routine:\r\n  int sign;\r\n  if( direction == FORWARD )\r\n    sign = -1;\r\n  else\r\n    sign = +1;\r\n  cdft(2*N, sign, d_outBuffer, ip, w);\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// convenience functions for real signal:\r\n\r\nvoid FourierTransformerRadix2::transformRealSignal(real_t *inSignal, Complex *outSpectrum)\r\n{\r\n  setDirection(FORWARD);\r\n\r\n  // retrieve the adress of the real part of the first array entry of the output array in order to\r\n  // treat the Complex array as array of two successive real_t-numbers:\r\n  real_t* d_outBuffer = &(outSpectrum[0].re);\r\n\r\n  // copy the input into the output for the in-place routine (thereby normalize, if necesarry):\r\n  int n;\r\n  if( normalizationFactor != 1.0 )\r\n  {\r\n    for(n=0; n<N; n++)\r\n      d_outBuffer[n] = inSignal[n] * normalizationFactor;\r\n  }\r\n  else\r\n  {\r\n    for(n=0; n<N; n++)\r\n      d_outBuffer[n] = inSignal[n];\r\n  }\r\n\r\n  // use Ooura's routine:\r\n  rdft(N, 1, d_outBuffer, ip, w);\r\n\r\n  // for some reason, this routine returns the second half of the spectrum (the complex conjugate \r\n  // values of the desired first half), so we need to take the complex conjugates:\r\n  for(n=3; n<N; n+=2) // start at n=3 (imaginary part of the first bin after DC)\r\n    d_outBuffer[n] = -d_outBuffer[n];\r\n}\r\n\r\nvoid FourierTransformerRadix2::transformRealSignal(real_t *signal, real_t *reAndIm)\r\n{\r\n  Complex* c_reAndIm = (Complex*) &(reAndIm[0]);\r\n  transformRealSignal(signal, c_reAndIm);\r\n}\r\n\r\n\r\nvoid FourierTransformerRadix2::getRealSignalMagnitudesAndPhases(real_t *signal, \r\n                                                                real_t *magnitudes, real_t *phases)\r\n{\r\n  transformRealSignal(signal, tmpBuffer);\r\n\r\n  // store the two purely real transform values at DC and Nyquist-frequency in the first fields of \r\n  // the magnitude- and phase- arrays respectively:\r\n  magnitudes[0] = tmpBuffer[0].re;\r\n  phases[0]     = tmpBuffer[0].im;\r\n\r\n  // fill the rest of the array with the magnitudes and phases of the regular bins:\r\n  real_t* dBuffer = &(tmpBuffer[0].re);\r\n  real_t  re, im;\r\n  int     k;\r\n  for(k=1; k<N/2; k++)\r\n  {\r\n    re            = dBuffer[2*k];\r\n    im            = dBuffer[2*k+1];\r\n    magnitudes[k] = sqrt(re*re + im*im);\r\n    if( re == 0.0 && im == 0.0 )\r\n      phases[k] = 0.0;\r\n    else\r\n      phases[k] = atan2(im, re);\r\n  }\r\n}\r\n\r\nvoid FourierTransformerRadix2::getRealSignalMagnitudes(real_t *signal, real_t *magnitudes)\r\n{\r\n  transformRealSignal(signal, tmpBuffer);\r\n  magnitudes[0] = tmpBuffer[0].re;\r\n\r\n  real_t* dBuffer = &(tmpBuffer[0].re);\r\n  real_t  re, im;\r\n  int     k;\r\n  for(k=1; k<N/2; k++)\r\n  {\r\n    re            = dBuffer[2*k];\r\n    im            = dBuffer[2*k+1];\r\n    magnitudes[k] = sqrt(re*re + im*im);\r\n  }\r\n}\r\n\r\nvoid FourierTransformerRadix2::transformSymmetricSpectrum(Complex *inSpectrum, real_t *outSignal)\r\n{\r\n  setDirection(INVERSE);\r\n\r\n  // retrieve the adress of the real part of the first array entry of the output array in order to\r\n  // treat the Complex array as array of two successive real_t-numbers:\r\n  real_t* d_inBuffer = &(inSpectrum[0].re);\r\n\r\n  // copy the input into the output for the in-place routine (thereby normalize, if necesarry):\r\n  int n;\r\n  if( normalizationFactor != 1.0 )\r\n  {\r\n    for(n=0; n<N; n++)\r\n      outSignal[n] = 2.0 * d_inBuffer[n] * normalizationFactor;\r\n  }\r\n  else\r\n  {\r\n    for(n=0; n<N; n++)\r\n      outSignal[n] = 2.0 * d_inBuffer[n];\r\n  }\r\n\r\n  // for some reason, the subsequent routine expects the second half of the spectrum (the complex \r\n  // conjugate values of the first half), so we need to take the complex conjugates:\r\n  for(n=3; n<N; n+=2) // start at n=3 (imaginary part of the first bin after DC)\r\n    outSignal[n] = -outSignal[n];\r\n\r\n  // use Ooura's routine:\r\n  rdft(N, -1, outSignal, ip, w);\r\n}\r\n\r\nvoid FourierTransformerRadix2::transformSymmetricSpectrum(real_t *reAndIm, real_t *signal)\r\n{\r\n  Complex* c_reAndIm = (Complex*) &(reAndIm[0]);\r\n  transformSymmetricSpectrum(c_reAndIm, signal);\r\n}\r\n\r\nvoid FourierTransformerRadix2::getRealSignalFromMagnitudesAndPhases(real_t *magnitudes, \r\n                                                                    real_t *phases, \r\n                                                                    real_t *signal)\r\n{\r\n  tmpBuffer[0].re = magnitudes[0];\r\n  tmpBuffer[0].im = phases[0];\r\n\r\n  int k;\r\n  real_t* dBuffer = &(tmpBuffer[0].re);\r\n  real_t  s, c;\r\n  for(k=1; k<N/2; k++)\r\n  {\r\n    sinCos(phases[k], &s, &c);\r\n    dBuffer[2*k]   = magnitudes[k] * c;\r\n    dBuffer[2*k+1] = magnitudes[k] * s;\r\n  }\r\n\r\n  transformSymmetricSpectrum(tmpBuffer, signal);\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// pre-calculations:\r\n\r\nvoid FourierTransformerRadix2::updateNormalizationFactor()\r\n{\r\n  if( (normalizationMode == NORMALIZE_ON_FORWARD_TRAFO && direction == FORWARD) ||\r\n      (normalizationMode == NORMALIZE_ON_INVERSE_TRAFO && direction == INVERSE)    )\r\n  {\r\n    normalizationFactor = 1.0 / (real_t) N;\r\n  }\r\n  else if( normalizationMode == ORTHONORMAL_TRAFO )\r\n  {\r\n    normalizationFactor = 1.0 / sqrt((real_t) N);\r\n  }\r\n  else\r\n    normalizationFactor = 1.0;\r\n}\r\n\r\n\r\n\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.h",
    "content": "#ifndef rosic_FourierTransformerRadix2_h\r\n#define rosic_FourierTransformerRadix2_h\r\n\r\n// standard includes:\r\n#include <stdio.h>\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_Complex.h\"\r\n#include \"../rosic_RealFunctions.h\"\r\n\r\n#define STATIC_N 256 //[eh2k] remove this, to use the original implementation (with new/delete)\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This class performs a fast Fourier Transform on a block of complex numbers (which are of class\r\n  \"Complex\"). The length of the block has to be a power of 2. It uses the FFT library by Takuya Ooura\r\n  which seems to be rather efficient. It handles the conversion between doubles and Complex numbers\r\n  by means of some hacky pointer trickery which relies on the fact that an object of class Complex \r\n  can be interpreted as two doubles stored in subsequent memory locations. This is true for the \r\n  compiler in MSVC 2005 but may or may not be true for other compilers. In case of problems, try the \r\n  class FourierTransfromerRadix2Clean which goes without such nasty hacks but is vastly inferior \r\n  efficiency-wise.\r\n\r\n  */\r\n\r\n  class FourierTransformerRadix2  \r\n  {\r\n\r\n  public:\r\n\r\n    /** The direction of the transform. */\r\n    enum directions\r\n    {\r\n      FORWARD,\r\n      INVERSE\r\n    };\r\n\r\n    /** These are the possible normalization modes. */\r\n    enum normalizationModes\r\n    {\r\n      NORMALIZE_ON_FORWARD_TRAFO, // divide by blockSize on forward FFT\r\n      NORMALIZE_ON_INVERSE_TRAFO, // divide by blockSize on inverse FFT (default)\r\n      ORTHONORMAL_TRAFO           // divide by sqrt(blockSize) on both transforms\r\n    };\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    FourierTransformerRadix2();  \r\n\r\n    /** Destructor. */\r\n    ~FourierTransformerRadix2();\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parameter settings:\r\n\r\n    /** FFT-size, has to be a power of 2 and >= 2. */\r\n    void setBlockSize(int newBlockSize);     \r\n\r\n    /** Sets the direction of the transform (@see: directions). This will affect the sign of the \r\n    exponent (or equivalently: theimaginary part) in the twiddling factors and the normalization \r\n    constant. */\r\n    void setDirection(int newDirection);\r\n\r\n    /** When you switch bewteen usage of this object for real or complex signals, you will need to \r\n    call this switch-function in between which just triggers a re-computation of the twiddle \r\n    factors (which must be different for the two cases). */\r\n    void setRealSignalMode(bool willBeUsedForRealSignals);\r\n\r\n    /** Sets the mode for normalization of the output (@see: normalizationModes). */\r\n    void setNormalizationMode(int newNormalizationMode);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // complex Fourier transforms:\r\n\r\n    /** Transforms a buffer of complex numbers into its (forward or inverse) fourier transform. \r\n    The inBuffer will remain intact. Both, inBuffer and outBuffer must be of the size which was \r\n    specified when setting up the blockSize with setBlockSize(). */\r\n    void transformComplexBuffer(Complex *inBuffer, Complex *outBuffer);   \r\n\r\n    /** Does the same thing as transformComplexBuffer but performes in-place calculation \r\n    (overwrites the input buffer). */\r\n    void transformComplexBufferInPlace(Complex *buffer);         \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // some convenience functions for dealing with real signals:\r\n\r\n    /** Transforms a real signal into its corresponding (conjugate symmetric) complex spectrum \r\n    using an algorithm which exploits the symmetries for more efficiency. When the input array is\r\n    an array of doubles of length N, the output array will be an array of complex numbers (class \r\n    Complex) of length N/2 with the (purely real) transform value of bin N/2 stored in the \r\n    imaginary part of the first array entry (outSpectrum[0].im = real(N/2)). */\r\n    void transformRealSignal(real_t *inSignal, Complex *outSpectrum);  \r\n\r\n    /** Calculates real and imaginary part of the spectrum as interleaved real_t buffer: \r\n    buf[2]=re[1], buf[3]=im[1], buf[4]=re[2], buf[5]=im[2],... in general: buf[2*k]=re[k], \r\n    buf[2k+1]=im[k], k=1,..,(N/2)-1 where N is the FFT-size. The first two elements of the buffer \r\n    have a special meaning: buf[0] is the (purely real) DC and buf[1] is the (purely real) \r\n    coefficient for the Nyquist frequency. The other fields contain the real and imaginary parts of\r\n    the positive frequencies only (interleaved) because the negative frequencies are redundant \r\n    (they are conjugate symmetric). */\r\n    void transformRealSignal(real_t *signal, real_t *reAndIm);  \r\n\r\n    /** Calculates spectral magnitudes and phases from a signal, where *signal should be of\r\n    length N, where N is the block-size as chosen with setBlockSize() *magnitudes and *phases \r\n    should be of length N/2. */\r\n    void getRealSignalMagnitudesAndPhases(real_t *signal, real_t *magnitudes, real_t *phases);\r\n\r\n    /** Calculates the magnitudes only from a signal (useful for analyzer-stuff). */\r\n    void getRealSignalMagnitudes(real_t *signal, real_t *magnitudes);\r\n\r\n    /** Transforms a complex conjugate symmetric spectrum (i.e. a spectrum of a real signal) into\r\n    the corresponding real signal. */\r\n    void transformSymmetricSpectrum(Complex *inSpectrum, real_t *outSignal);\r\n\r\n    /** Calculates a time signal from and interleaved buffer containing the real and imaginary \r\n    parts of the positive frequencies (the negative frequencies are assumed to be conjugate \r\n    symmetric). */\r\n    void transformSymmetricSpectrum(real_t *reAndIm, real_t *signal);\r\n\r\n    /** Calculates a real time signal from its magnitudes and phases, *magnitudes and *phases\r\n    should be of length N/2, *signal is of length N where N is the block-size as chosen with \r\n    setBlockSize(). */\r\n    void getRealSignalFromMagnitudesAndPhases(real_t *magnitudes, real_t *phases, real_t *signal);\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // static functions\r\n\r\n    /** Returns the physical frequency in Hz that corresponds to the given 'binIndex' for a given\r\n    'fftSize' and 'sampleRate'. */\r\n    static real_t binIndexToFrequency(int binIndex, int fftSize, real_t sampleRate) \r\n    { return binIndex*sampleRate/fftSize; }\r\n\r\n\r\n    //=============================================================================================\r\n\r\n  protected:\r\n\r\n    /** Updates the normalizationFactor member variable acording to a new blockSize, direction or\r\n    normalizationMode. */\r\n    void updateNormalizationFactor();\r\n\r\n    int    N;                    /**< the blocksize of the FFT. */\r\n    int    logN;                 /**< Base 2 logarithm of the blocksize. */\r\n    int    direction;            /**< The direction of the transform (@see: directions). */\r\n    int    normalizationMode;    /**< The normalization mode (@see: normalizationModes. */\r\n    real_t normalizationFactor;  /**< The normalization factor (can be 1, 1/N or 1/sqrt(N)). */\r\n\r\n#ifndef STATIC_N\r\n    // work-area stuff for Ooura's fft-routines:\r\n    real_t *w;                   /**< Table of the twiddle-factors. */\r\n    int    *ip;                  /**< Work area for bit-reversal (index pointer?). */\r\n\r\n    // our own temporary storage area:\r\n    Complex* tmpBuffer;\r\n#else\r\n    real_t w[2*STATIC_N];\r\n    int    ip[4+16]; //ceil(4.0+sqrt(STATIC_N))]; \r\n    Complex tmpBuffer[STATIC_N];\r\n#endif\r\n\r\n  };\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_FourierTransformerRadix2_h\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_MipMappedWaveTable.cpp",
    "content": "#include \"rosic_MipMappedWaveTable.h\"\r\n#include <algorithm>\r\nusing namespace rosic;\r\n\r\nMipMappedWaveTable::MipMappedWaveTable()\r\n{\r\n  // init member variables:\r\n  sampleRate = SAMPLE_RATE;\r\n  waveform   = 0;\r\n  symmetry   = 0.5;\r\n\r\n  // initialize internal 'back-panel' parameters\r\n  tanhShaperFactor = dB2amp(36.9);\r\n  tanhShaperOffset = 4.37;\r\n  squarePhaseShift = 180.0;\r\n\r\n  // set up the fourier-transformer:\r\n  fourierTransformer.setBlockSize(tableLength);\r\n\r\n  // initialize the buffers:\r\n  initPrototypeTable();\r\n}\r\n\r\nMipMappedWaveTable::~MipMappedWaveTable()\r\n{\r\n\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// parameter settings:\r\n\r\nvoid MipMappedWaveTable::setWaveform(real_t* newWaveForm, int lengthInSamples)\r\n{\r\n  int i;\r\n  if( lengthInSamples == tableLength )\r\n  {\r\n    // just copy the values into the internal buffer, when the length of the passed table and the\r\n    // internal table match:\r\n    for( i=0; i<tableLength; i++ )\r\n      prototypeTable[i] = newWaveForm[i];\r\n  }\r\n  else\r\n  {\r\n    // implement periodic sinc-interpolation here...\r\n  }\r\n}\r\n\r\nvoid MipMappedWaveTable::setWaveform(int newWaveform)\r\n{\r\n  if( (newWaveform >= 0) && (newWaveform != waveform) )\r\n  {\r\n    waveform = newWaveform;\r\n    renderWaveform();\r\n  }\r\n}\r\n\r\nvoid MipMappedWaveTable::setSymmetry(real_t newSymmetry)\r\n{\r\n  symmetry = newSymmetry;\r\n  renderWaveform();\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// internal functions:\r\n\r\nvoid MipMappedWaveTable::initPrototypeTable()\r\n{\r\n  for(int i=0; i<(tableLength/* [eh2k] +4 */); i++)\r\n    prototypeTable[i] = 0.0;\r\n}\r\nvoid MipMappedWaveTable::removeDC()\r\n{\r\n  // calculate DC-offset (= average value of the table):\r\n  real_t dcOffset = 0.0;\r\n  int i;\r\n  for(i=0; i<tableLength; i++)\r\n    dcOffset += prototypeTable[i];\r\n  dcOffset = dcOffset / tableLength;\r\n\r\n  // remove DC-Offset:\r\n  for(i=0; i<tableLength; i++)\r\n    prototypeTable[i] -= dcOffset;\r\n}\r\n\r\nvoid MipMappedWaveTable::normalize()\r\n{\r\n  // find maximum:\r\n  real_t max = 0.0;\r\n  int    i;\r\n  for(i=0; i<tableLength; i++)\r\n    if( fabs(prototypeTable[i]) > max)\r\n      max = fabs(prototypeTable[i]);\r\n\r\n  // normalize to amplitude 1.0:\r\n  real_t scale = 1.0/max;\r\n  for(i=0; i<tableLength; i++)\r\n    prototypeTable[i] *= scale;\r\n}\r\n\r\nvoid MipMappedWaveTable::reverseTime()\r\n{\r\n  int    i;\r\n  real_t tmpTable[tableLength+4];\r\n\r\n  for(i=0; i<tableLength; i++)\r\n    tmpTable[i] = prototypeTable[tableLength-i-1];\r\n\r\n  for(i=0; i<tableLength; i++)\r\n    prototypeTable[i] = tmpTable[i];\r\n}\r\n\r\nvoid MipMappedWaveTable::renderWaveform()\r\n{\r\n  switch( waveform )\r\n  {\r\n  case   SINE:      fillWithSine();        break;\r\n  case   TRIANGLE:  fillWithTriangle();    break;\r\n  case   SQUARE:    fillWithSquare();      break;\r\n  case   SAW:       fillWithSaw();         break;\r\n  case   SQUARE303: fillWithSquare303();   break;\r\n  case   SAW303:    fillWithSaw303();      break;\r\n\r\n  default :  fillWithSine();\r\n  }\r\n}\r\n\r\nvoid MipMappedWaveTable::generateMipMap(WaveTable& tableSet)\r\n{\r\n  real_t spectrum[tableLength];\r\n  //static int    position, offset;\r\n  int t, i; // indices for the table and position\r\n\r\n  //position = 0;             // begin of the 1st table (index 0)\r\n  //offset   = tableLength+4; // offset between tow tables, the 4 is the number\r\n  // of additional samples used for interpolation\r\n\r\n  // copy the prototypeTable into the 1st table of the mipmap (this actually makes the\r\n  // prototypeTable redundant - room for optimization here):\r\n  t = 0;\r\n  for(i=0; i<tableLength; i++)\r\n    tableSet[0][i] = prototypeTable[i];\r\n\r\n  // additional sample(s) for the interpolator:\r\n  tableSet[t][tableLength]   = tableSet[t][0];\r\n  tableSet[t][tableLength+1] = tableSet[t][1];\r\n  tableSet[t][tableLength+2] = tableSet[t][2];\r\n  tableSet[t][tableLength+3] = tableSet[t][3];\r\n\r\n  // get the spectrum from the prototype-table:\r\n  fourierTransformer.transformRealSignal(prototypeTable, spectrum);\r\n\r\n  // ensure that DC and Nyquist are zero:\r\n  spectrum[0] = 0.0;\r\n  spectrum[1] = 0.0;\r\n\r\n  // now, render the bandlimited versions by successively shrinking the\r\n  // spectrum by one octave and iFFT'ing this spectrum:\r\n  int lowBin, highBin;\r\n  for(t=1; t<numTables; t++)\r\n  {\r\n    lowBin  = (int) (tableLength / pow(2.0, t));   // the cutoff-bin\r\n    highBin = (int) (tableLength / pow(2.0, t-1)); // the bin up to which the\r\n    // spectrum is currently still nonzero\r\n\r\n    // zero out the bins above the cutoff-bin:\r\n    for(i=lowBin; i<highBin; i++)\r\n      spectrum[i] = 0.0;\r\n\r\n    // transform the truncated spectrum back to the time-domain and store it in\r\n    // the tableSet\r\n    fourierTransformer.transformSymmetricSpectrum(spectrum, tableSet[t]);\r\n\r\n    // additional sample(s) for the interpolator:\r\n    tableSet[t][tableLength]   = tableSet[t][0];\r\n    tableSet[t][tableLength+1] = tableSet[t][1];\r\n    tableSet[t][tableLength+2] = tableSet[t][2];\r\n    tableSet[t][tableLength+3] = tableSet[t][3];\r\n  }\r\n}\r\n\r\n//-------------------------------------------------------------------------------------------------\r\n// fill the prototype-table with various standard waveforms:\r\n\r\nvoid MipMappedWaveTable::fillWithSine()\r\n{\r\n  for (long i=0; i<tableLength; i++)\r\n    prototypeTable[i] = sin( (2.0*PI*i) / (real_t) (tableLength) );\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithTriangle()\r\n{\r\n  int i;\r\n  for (i=0; i<(tableLength/4); i++)\r\n    prototypeTable[i] = (real_t)(4*i) / (real_t)(tableLength);\r\n\r\n  for (i=(tableLength/4); i<(3*tableLength/4); i++)\r\n    prototypeTable[i] = 2.0 - ((real_t)(4*i) / (real_t)(tableLength));\r\n\r\n  for (i=(3*tableLength/4); i<(tableLength); i++)\r\n    prototypeTable[i] = -4.0+ ((real_t)(4*i) / (real_t)(tableLength));\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithSquare()\r\n{\r\n  int    N  = tableLength;\r\n  real_t k  = symmetry;\r\n  int    N1 = clip(roundToInt(k*(N-1)), 1, N-1);\r\n  for(int n=0; n<N1; n++)\r\n    prototypeTable[n] = +1.0;\r\n  for(int n=N1; n<N; n++)\r\n    prototypeTable[n] = -1.0;\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithSaw()\r\n{\r\n  int    N  = tableLength;\r\n  real_t k  = symmetry;\r\n  int    N1 = clip(roundToInt(k*(N-1)), 1, N-1);\r\n  int    N2 = N-N1;\r\n  real_t s1 = 1.0 / (N1-1);\r\n  real_t s2 = 1.0 / N2;\r\n  for(int n=0; n<N1; n++)\r\n    prototypeTable[n] = s1*n;\r\n  for(int n=N1; n<N; n++)\r\n    prototypeTable[n] = -1.0 + s2*(n-N1);\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithSquare303()\r\n{\r\n  // generate the saw-wave:\r\n  int    N  = tableLength;\r\n  real_t k  = 0.5;\r\n  int    N1 = clip(roundToInt(k*(N-1)), 1, N-1);\r\n  int    N2 = N-N1;\r\n  real_t s1 = 1.0 / (N1-1);\r\n  real_t s2 = 1.0 / N2;\r\n  for(int n=0; n<N1; n++)\r\n    prototypeTable[n] = s1*n;\r\n  for(int n=N1; n<N; n++)\r\n    prototypeTable[n] = -1.0 + s2*(n-N1);\r\n\r\n  // switch polarity and apply tanh-shaping with dc-offset:\r\n  for(int n=0; n<N; n++)\r\n    prototypeTable[n] = -tanh(tanhShaperFactor*prototypeTable[n] + tanhShaperOffset);\r\n\r\n  // do a circular shift to phase-align with the saw-wave, when both waveforms are mixed:\r\n  int nShift = roundToInt(N*squarePhaseShift/360.0);\r\n  \r\n  std::rotate(&prototypeTable[0], &prototypeTable[0] + nShift, &prototypeTable[N]); //[eh2k] circularShift(prototypeTable, N, nShift);\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithSaw303()\r\n{\r\n  // generate the saw-wave:\r\n  int    N  = tableLength;\r\n  real_t k  = 0.5;\r\n  int    N1 = clip(roundToInt(k*(N-1)), 1, N-1);\r\n  int    N2 = N-N1;\r\n  real_t s1 = 1.0 / (N1-1);\r\n  real_t s2 = 1.0 / N2;\r\n  for(int n=0; n<N1; n++)\r\n    prototypeTable[n] = s1*n;\r\n  for(int n=N1; n<N; n++)\r\n    prototypeTable[n] = -1.0 + s2*(n-N1);\r\n\r\n  // switch polarity:\r\n  //for(int n=0; n<N; n++)\r\n  //  prototypeTable[n] = -prototypeTable[n];\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithPeak()\r\n{\r\n  int i;\r\n  for (i=0; i<(tableLength/2); i++)\r\n    prototypeTable[i] = 1 - (real_t)(2*i) / (real_t)(tableLength);\r\n\r\n  for (i=(tableLength/2); i<(tableLength); i++)\r\n    prototypeTable[i] = 0.0;\r\n\r\n  removeDC();\r\n  normalize();\r\n}\r\n\r\nvoid MipMappedWaveTable::fillWithMoogSaw()\r\n{\r\n  // the sawUp part:\r\n  int i;\r\n  for (i=0; i<(tableLength/2); i++)\r\n    prototypeTable[i] = (real_t)(2*i) / (real_t)(tableLength);\r\n\r\n  for (i=(tableLength/2); i<(tableLength); i++)\r\n    prototypeTable[i] = (real_t)(2*i) / (real_t)(tableLength) - 2.0;\r\n\r\n  // the triangle part:\r\n  for (i=0; i<(tableLength/2); i++)\r\n    prototypeTable[i] += 1 - (real_t)(4*i) / (real_t)(tableLength);\r\n\r\n  for (i=(tableLength/2); i<tableLength; i++)\r\n    prototypeTable[i] += -1 + (real_t)(4*i) / (real_t)(tableLength);\r\n\r\n  removeDC();\r\n  normalize();\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "lib/open303/src/wavetable_gen/rosic_MipMappedWaveTable.h",
    "content": "#ifndef rosic_MipMappedWaveTable_h\r\n#define rosic_MipMappedWaveTable_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_FunctionTemplates.h\"\r\n#include \"rosic_FourierTransformerRadix2.h\"\r\n#include \"../rosic_BlendOscillator.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n  /**\r\n\r\n  This is a class for generating and storing a single-cycle-waveform in a lookup-table and \r\n  retrieving values form it at arbitrary positions by means of interpolation.\r\n\r\n  */\r\n\r\n  class MipMappedWaveTable\r\n  {\r\n\r\n    // Oscillator and SuperOscillator classes need access to certain protected member-variables \r\n    // (namely the tableLength and related quantities), so we declare them as friend-classes:\r\n    friend class Oscillator;\r\n    friend class BlendOscillator;\r\n    friend class SuperOscillator;\r\n    friend class Open303;\r\n    // \\ todo: get rid of this by providing get-functions\r\n\r\n  public:\r\n\r\n    enum waveforms\r\n    {\r\n      SILENCE = 0,\r\n      SINE, \r\n      TRIANGLE,\r\n      SQUARE,\r\n      SAW,\r\n      SQUARE303,\r\n      SAW303\r\n    };\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // construction/destruction:\r\n\r\n    /** Constructor. */\r\n    MipMappedWaveTable();          \r\n\r\n    /** Destructor. */\r\n    ~MipMappedWaveTable();         \r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // parmeter-settings:\r\n\r\n    /** Selects a waveform from the set of built-in wavforms. The object generates the \r\n    prototype-waveform by some algorithmic rules and renders various bandlimited version of it via \r\n    FFT/iFFT. */\r\n    void setWaveform(int newWaveform);\r\n\r\n    /** Overloaded function to set the waveform form outside this class. This function expects a \r\n    pointer to the prototype-waveform to be handed over along with the length of this waveform. It \r\n    copies the values into the internal buffers and renders various bandlimited version via \r\n    FFT/iFFT.\r\n    \\todo: Interpolation for the case that lengthInSamples does not match the length of the \r\n    internal table-length. */\r\n    void setWaveform(real_t* newWaveform, int lengthInSamples);\r\n\r\n    /** Sets the time symmetry between the first and second half-wave (as value between 0...1) - \r\n    for a square wave, this is also known as pulse-width. Currently only implemented for square and \r\n    saw waveforms. */\r\n    void setSymmetry(real_t newSymmetry);\r\n\r\n    static constexpr int tableLength = 2048;\r\n      // Length of the lookup-table. The actual length of the allocated memory is 4 samples longer, \r\n      // to store additional samples for the interpolator (which are the same values as at the \r\n      // beginning of the buffer) */\r\n\r\n    static constexpr int numTables = 12;\r\n      // The Oscillator class uses a one table-per octave multisampling to avoid aliasing. With a \r\n      // table-size of 8192 and a sample-sample rate of  44100, the 12th table will have a \r\n      // fundamental frequency (the frequency where the increment is 1) of 11025 which is good for \r\n      // the highest frequency. \r\n\r\n    void generateMipMap(WaveTable& wavTable);\r\n      // generates a multisample from the prototype table, where each of the\r\n      // successive tables contains one half of the spectrum of the previous one\r\n\r\n    // internal 'back-panel' parameters:\r\n\r\n    /** Sets the drive (in dB) for the tanh-shaper for 303-square waveform - internal parameter, to \r\n    be scrapped eventually. */\r\n    void setTanhShaperDriveFor303Square(real_t newDrive)\r\n    { tanhShaperFactor = dB2amp(newDrive); fillWithSquare303(); }\r\n\r\n    /** Sets the offset (as raw value for the tanh-shaper for 303-square waveform - internal \r\n    parameter, to be scrapped eventually. */\r\n    void setTanhShaperOffsetFor303Square(real_t newOffset)\r\n    { tanhShaperOffset = newOffset; fillWithSquare303(); }\r\n\r\n    /** Sets the phase shift of tanh-shaped square wave with respect to the saw-wave (in degrees)\r\n    - this is important when the two are mixed. */\r\n    void set303SquarePhaseShift(real_t newShift)\r\n    { squarePhaseShift = newShift; fillWithSquare303(); }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // inquiry:\r\n\r\n    /** Returns the drive (in dB) for the tanh-shaper for 303-square waveform - internal parameter, to \r\n    be scrapped eventually. */\r\n    real_t getTanhShaperDriveFor303Square() const { return amp2dB(tanhShaperFactor); }\r\n\r\n    /** Returns the offset (as raw value for the tanh-shaper for 303-square waveform - internal \r\n    parameter, to be scrapped eventually. */\r\n    real_t getTanhShaperOffsetFor303Square() const { return tanhShaperOffset; }\r\n\r\n    /** Returns the phase shift of tanh-shaped square wave with respect to the saw-wave (in degrees)\r\n    - this is important when the two are mixed. */\r\n    real_t get303SquarePhaseShift() const { return squarePhaseShift; }\r\n\r\n    //---------------------------------------------------------------------------------------------\r\n    // audio processing:\r\n\r\n    /** Returns the value at position 'integerPart+fractionalPart' of table 'tableIndex' with \r\n    linear interpolation - this function may be preferred over \r\n    getValueLinear(real_t phaseIndex, int tableIndex) when you want to calculate the integer and \r\n    fractional part of the phase-index yourself. */\r\n    INLINE real_t getValueLinear(const WaveTable& tableSet, int integerPart, real_t fractionalPart, int tableIndex);\r\n\r\n    /** Returns the value at position 'phaseIndex' of table 'tableIndex' with linear \r\n    interpolation - this function computes the integer and fractional part of the phaseIndex\r\n    internally. */\r\n    INLINE real_t getValueLinear(const WaveTable& tableSet, real_t phaseIndex, int tableIndex);\r\n\r\n  protected:\r\n\r\n    // functions to fill table with the built-in waveforms (these functions are\r\n    // called from setWaveform(int newWaveform):\r\n    void fillWithSine();\r\n    void fillWithTriangle();\r\n    void fillWithSquare();\r\n    void fillWithSaw();\r\n    void fillWithSquare303();\r\n    void fillWithSaw303();\r\n    void fillWithPeak();\r\n    void fillWithMoogSaw();\r\n\r\n    void initPrototypeTable();\r\n      // fills the \"prototypeTable\"-variable with all zeros\r\n\r\n    void removeDC();\r\n      // removes dc-component from the waveform in the prototype-table\r\n\r\n    void normalize();\r\n      // normalizes the amplitude of the prototype-table to 1.0\r\n\r\n    void reverseTime();\r\n      // time-reverses the prototype-table\r\n\r\n    /** Renders the prototype waveform and generates the mip-map from that. */\r\n    void renderWaveform();\r\n\r\n    real_t symmetry; // symmetry between 1st and 2nd half-wave\r\n\r\n    int    waveform;   // index of the currently chosen native waveform\r\n    real_t sampleRate; // the sampleRate\r\n\r\n    real_t prototypeTable[tableLength];\r\n      // this is the prototype-table with full bandwidth. one additional sample (same as \r\n      // prototypeTable[0]) for linear interpolation without need for table wraparound at the last \r\n      // sample (-> saves one if-statement each audio-cycle) ...and a three further addtional \r\n      // samples for more elaborate interpolations like cubic (not implemented yet, also:\r\n      // the fillWith...()-functions don't support these samples yet). */\r\n\r\n    //eh2k real_t tableSet[numTables][tableLength+4];\r\n      // The multisample for anti-aliased waveform generation. The 4 additional values are equal \r\n      // to the first 4 values in the table for easier interpolation. The first index is for the \r\n      // table-number - index 0 accesses the first version which has full bandwidth, index 1 \r\n      // accesses the second version which is bandlimited to Nyquist/2, 2->Nyquist/4, \r\n      // 3->Nyquist/8, etc. */\r\n\r\n    // embedded objects:\r\n    FourierTransformerRadix2 fourierTransformer;\r\n\r\n    // internal parameters:\r\n    real_t tanhShaperFactor, tanhShaperOffset, squarePhaseShift;\r\n\r\n  };\r\n\r\n  //-----------------------------------------------------------------------------------------------\r\n  // inlined functions:\r\n    \r\n  INLINE real_t MipMappedWaveTable::getValueLinear(const WaveTable& tableSet, int integerPart, real_t fractionalPart, int tableIndex)\r\n  {\r\n    // ensure, that the table index is in the valid range:\r\n    if( tableIndex<=0 )\r\n      tableIndex = 0;\r\n    else if ( tableIndex>numTables )\r\n      tableIndex = 11;\r\n\r\n    return   (1.0-fractionalPart) * tableSet[tableIndex][integerPart] \r\n           +      fractionalPart  * tableSet[tableIndex][integerPart+1];\r\n  }\r\n\r\n  INLINE real_t MipMappedWaveTable::getValueLinear(const WaveTable& tableSet, real_t phaseIndex, int tableIndex)\r\n  {\r\n    /*\r\n    // ensure, that the table index is in the valid range:\r\n    if( tableIndex<=0 )\r\n      tableIndex = 0;\r\n    else if ( tableIndex>numTables )\r\n      tableIndex = 11;\r\n      */\r\n\r\n    // calculate integer and fractional part of the phaseIndex:\r\n    int    intIndex = floorInt(phaseIndex);\r\n    real_t frac     = phaseIndex  - (real_t) intIndex;\r\n    return getValueLinear(tableSet, intIndex, frac, tableIndex);\r\n\r\n    // lookup value in the table with linear interpolation and return it:\r\n    //return (1.0-frac)*tableSet[tableIndex][intIndex] + frac*tableSet[tableIndex][intIndex+1];\r\n  }\r\n\r\n} // end namespace rosic\r\n\r\n#endif // rosic_MipMappedWaveTable_h\r\n"
  },
  {
    "path": "lib/peaks/drums/bass_drum.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style bass drum.\n\n#include \"peaks/drums/bass_drum.h\"\n\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid BassDrum::Init() {\n  pulse_up_.Init();\n  pulse_down_.Init();\n  attack_fm_.Init();\n  resonator_.Init();\n  \n  pulse_up_.set_delay(0);\n  pulse_up_.set_decay(3340);\n\n  pulse_down_.set_delay(1.0e-3 * 48000);\n  pulse_down_.set_decay(3072);\n\n  attack_fm_.set_delay(4.0e-3 * 48000);\n  attack_fm_.set_decay(4093);\n  \n  resonator_.set_punch(32768);\n  \n  set_frequency(0);\n  set_decay(32768);\n  set_tone(32768);\n  set_punch(65535);\n  \n  lp_state_ = 0;\n}\n\nvoid BassDrum::Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n  while (size--) {\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      pulse_up_.Trigger(12 * 32768 * 0.7);\n      pulse_down_.Trigger(-19662 * 0.7);\n      attack_fm_.Trigger(18000);\n    }\n    \n    int32_t excitation = 0;\n    excitation += pulse_up_.Process();\n    excitation += !pulse_down_.done() ? 16384 : 0;\n    excitation += pulse_down_.Process();\n    attack_fm_.Process();\n    resonator_.set_frequency(frequency_ + (attack_fm_.done() ? 0 : 17 << 7));\n\n    int32_t resonator_output = (excitation >> 4) + \\\n        resonator_.Process<SVF_MODE_BP>(excitation);\n    lp_state_ += (resonator_output - lp_state_) * lp_coefficient_ >> 15;\n    int32_t output = lp_state_;\n    CLIP(output);\n    \n    *out++ = output;\n  }\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/drums/bass_drum.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style bass drum.\n \n#ifndef PEAKS_DRUMS_BASS_DRUM_H_\n#define PEAKS_DRUMS_BASS_DRUM_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"peaks/drums/svf.h\"\n#include \"peaks/drums/excitation.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass BassDrum {\n public:\n  BassDrum() { }\n  ~BassDrum() { }\n\n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_frequency(0);\n      set_punch(40000);\n      set_tone(8192 + (parameter[0] >> 1));\n      set_decay(parameter[1]);\n    } else {\n      set_frequency(parameter[0] - 32768);\n      set_punch(parameter[1]);\n      set_tone(parameter[2]);\n      set_decay(parameter[3]);\n    }\n  }\n  \n  void set_frequency(int16_t frequency) {\n    frequency_ = (31 << 7) + (static_cast<int32_t>(frequency) * 896 >> 15);\n  }\n  \n  void set_decay(uint16_t decay) {\n    uint32_t scaled;\n    uint32_t squared;\n    scaled = 65535 - decay;\n    squared = scaled * scaled >> 16;\n    scaled = squared * scaled >> 18;\n    resonator_.set_resonance(32768 - 128 - scaled);\n  }\n  \n  void set_tone(uint16_t tone) {\n    uint32_t coefficient = tone;\n    coefficient = coefficient * coefficient >> 16;\n    lp_coefficient_ = 512 + (coefficient >> 2) * 3;\n  }\n\n  void set_punch(uint16_t punch) {\n    resonator_.set_punch(punch * punch >> 16);\n  }\n\n private:\n  Excitation pulse_up_;\n  Excitation pulse_down_;\n  Excitation attack_fm_;\n  Svf resonator_;\n\n  int32_t frequency_;\n  int32_t lp_coefficient_;\n  int32_t lp_state_;\n\n  DISALLOW_COPY_AND_ASSIGN(BassDrum);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_BASS_DRUM_H_\n"
  },
  {
    "path": "lib/peaks/drums/excitation.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Exponential decay excitation.\n\n#ifndef PEAKS_DRUMS_EXCITATION_H_\n#define PEAKS_DRUMS_EXCITATION_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace peaks {\n\nclass Excitation {\n public:\n  Excitation() { }\n  ~Excitation() { }\n\n  void Init() {\n    delay_ = 0;\n    decay_ = 4093;\n    counter_ = 0;\n    state_ = 0;\n  }\n\n  void set_delay(uint16_t delay) {\n    delay_ = delay;\n  }\n  \n  void set_decay(uint16_t decay) {\n    decay_ = decay;\n  }\n  \n  void Trigger(int32_t level) {\n    level_ = level;\n    counter_ = delay_ + 1;\n    state_ = 0;\n  }\n  \n  bool done() {\n    return counter_ == 0;\n  }\n\n  inline int32_t Process() {\n    state_ = (state_ * decay_ >> 12);\n    if (counter_ > 0) {\n      --counter_;\n      if (counter_ == 0) {\n        state_ += level_ < 0 ? -level_ : level_;\n      }\n    }\n    return level_ < 0 ? -state_ : state_;\n  }\n  \n private:\n  uint32_t delay_;\n  uint32_t decay_;\n  int32_t counter_;\n  int32_t state_;\n  int32_t level_;\n\n  DISALLOW_COPY_AND_ASSIGN(Excitation);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_EXCITATION_H_\n"
  },
  {
    "path": "lib/peaks/drums/fm_drum.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sine FM drum - similar to the BD/SD in Anushri.\n\n#include \"peaks/drums/fm_drum.h\"\n#include <cstdio>\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid FmDrum::Init() {\n  phase_ = 0;\n  fm_envelope_phase_ = 0xffffffff;\n  am_envelope_phase_ = 0xffffffff;\n  previous_sample_ = 0;\n}\n\nstatic const uint16_t kHighestNote = 128 * 128;\nstatic const uint16_t kPitchTableStart = 116 * 128;\nstatic const uint16_t kOctave = 128 * 12;\n\nstatic const uint16_t bd_map[10][4] = {\n  { 4096, 0, 65535, 32768 },\n  { 8192 + 4096, 0, 65535, 32768 },\n\n  { 8192, 4096, 49512, 32768 },\n  { 8192, 16384, 40960, 32768 },\n\n  { 10240, 4096, 24576, 32768 },\n  { 10240, 16384, 24576, 16384 },\n\n  { 8192, 8192, 32768, 16384 },\n  { 8192, 24576, 49152, 8192 },\n\n  { 4096, 16384, 40960, 16384 },\n  { 8192, 24576, 49152, 0 },\n};\n\nstatic const uint16_t sd_map[10][4] = {\n  { 24576, 0, 24576, 36864 },\n  { 24576, 0, 16384, 65535 },\n\n  { 28672, 0, 16384, 36864 },\n  { 28672, 0, 16384, 65535 },\n\n  { 20488, 0, 32768, 57344 },\n  { 28672, 0, 24576, 65535 },\n\n  { 20488, 0, 24576, 65535 },\n  { 28672, 0, 32768, 65535 },\n\n  { 20488, 65535, 16384, 0 },\n  { 65535, 0, 8192, 32768 },\n};\n\nvoid FmDrum::Morph(uint16_t x, uint16_t y) {\n  const uint16_t (*map)[4] = sd_range_ ? sd_map : bd_map;\n  uint16_t parameters[4];\n  for (uint8_t i = 0; i < 4; ++i) {\n    uint16_t x_integral = (x >> 14) << 1;\n    uint16_t x_fractional = x << 2;\n    uint16_t a = map[x_integral][i];\n    uint16_t b = map[x_integral + 2][i];\n    uint16_t c = map[x_integral + 1][i];\n    uint16_t d = map[x_integral + 3][i];\n    \n    uint16_t e = a + ((b - a) * x_fractional >> 16);\n    uint16_t f = c + ((d - c) * x_fractional >> 16);\n    parameters[i] = e + ((f - e) * y >> 16);\n  }\n  Configure(parameters, CONTROL_MODE_FULL);\n}\n\nuint32_t FmDrum::ComputeEnvelopeIncrement(uint16_t decay) {\n  uint32_t a = lut_env_increments[decay >> 8];\n  uint32_t b = lut_env_increments[(decay >> 8) + 1];\n  return a - ((a - b) * (decay & 0xff) >> 8);\n}\n\nuint32_t FmDrum::ComputePhaseIncrement(int16_t midi_pitch) {\n  if (midi_pitch >= kHighestNote) {\n    midi_pitch = kHighestNote - 1;\n  }\n\n  int32_t ref_pitch = midi_pitch;\n  ref_pitch -= kPitchTableStart;\n\n  size_t num_shifts = 0;\n  while (ref_pitch < 0) {\n    ref_pitch += kOctave;\n    ++num_shifts;\n  }\n\n  uint32_t a = lut_oscillator_increments[ref_pitch >> 4];\n  uint32_t b = lut_oscillator_increments[(ref_pitch >> 4) + 1];\n  uint32_t phase_increment = a + \\\n      (static_cast<int32_t>(b - a) * (ref_pitch & 0xf) >> 4);\n  phase_increment >>= num_shifts;\n  return phase_increment;\n}\n\nvoid FmDrum::Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n  uint32_t am_envelope_increment = ComputeEnvelopeIncrement(am_decay_);\n  uint32_t fm_envelope_increment = ComputeEnvelopeIncrement(fm_decay_);\n  uint32_t phase = phase_;\n  uint32_t fm_envelope_phase = fm_envelope_phase_;\n  uint32_t am_envelope_phase = am_envelope_phase_;\n  uint32_t aux_envelope_phase = aux_envelope_phase_;\n  uint32_t phase_increment = phase_increment_;\n  while (size--) {\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      fm_envelope_phase = 0;\n      am_envelope_phase = 0;\n      aux_envelope_phase = 0;\n      phase = 0x3fff * fm_amount_ >> 16;\n    }\n\n    fm_envelope_phase += fm_envelope_increment;\n    if (fm_envelope_phase < fm_envelope_increment) {\n      fm_envelope_phase = 0xffffffff;\n    }\n    aux_envelope_phase += 4473924;\n    if (aux_envelope_phase < 4473924) {\n      aux_envelope_phase = 0xffffffff;\n    }\n    if ((size & 3) == 0) {\n      uint32_t aux_envelope = 65535 - Interpolate824(\n          lut_env_expo, aux_envelope_phase);\n      uint32_t fm_envelope = 65535 - Interpolate824(\n          lut_env_expo, fm_envelope_phase);\n      phase_increment = ComputePhaseIncrement(\n          frequency_ + \\\n          (fm_envelope * fm_amount_ >> 16) + \\\n          (aux_envelope * aux_envelope_strength_ >> 15) + \\\n          (previous_sample_ >> 6));\n    }\n    phase += phase_increment;\n\n    int16_t mix = Interpolate1022(wav_sine, phase);\n    if (noise_) {\n      mix = Mix(mix, Random::GetSample(), noise_);\n    }\n\n    am_envelope_phase += am_envelope_increment;\n    if (am_envelope_phase < am_envelope_increment) {\n      am_envelope_phase = 0xffffffff;\n    }\n    uint32_t am_envelope = 65535 - Interpolate824(\n        lut_env_expo, am_envelope_phase);\n    mix = mix * am_envelope >> 16;\n    if (overdrive_) {\n      uint32_t phi = (static_cast<int32_t>(mix) << 16) + (1L << 31);\n      int16_t overdriven = Interpolate1022(wav_overdrive, phi);\n      mix = Mix(mix, overdriven, overdrive_);\n    }\n    previous_sample_ = mix;\n    *out++ = mix;\n  }\n  phase_ = phase;\n  fm_envelope_phase_ = fm_envelope_phase;\n  am_envelope_phase_ = am_envelope_phase;\n  aux_envelope_phase_ = aux_envelope_phase;\n  phase_increment_ = phase_increment;\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/drums/fm_drum.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sine FM drum - similar to the BD/SD in Anushri.\n\n#ifndef PEAKS_DRUMS_FM_DRUM_H_\n#define PEAKS_DRUMS_FM_DRUM_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass FmDrum {\n public:\n  FmDrum() { }\n  ~FmDrum() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n\n  void Morph(uint16_t x, uint16_t y);\n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      Morph(parameter[0], parameter[1]);\n    } else {\n      set_frequency(parameter[0]);\n      set_fm_amount((parameter[1] >> 2) * 3);\n      set_decay(parameter[2]);\n      set_noise(parameter[3]);\n    }\n  }\n  \n  inline void set_sd_range(bool sd_range) {\n    sd_range_ = sd_range;\n  }\n\n  inline void set_frequency(uint16_t frequency) {\n    if (frequency <= 16384) {\n      aux_envelope_strength_ = 1024;\n    } else if (frequency <= 32768) {\n      aux_envelope_strength_ = 2048 - (frequency >> 4);\n    } else {\n      aux_envelope_strength_ = 0;\n    }\n    frequency_ = (24 << 7) + ((72 << 7) * frequency >> 16);\n  }\n  \n  inline void set_fm_amount(uint16_t fm_amount) {\n    fm_amount_ = fm_amount >> 2;\n  }\n\n  inline void set_decay(uint16_t decay) {\n    am_decay_ = 16384 + (decay >> 1);\n    fm_decay_ = 8192 + (decay >> 2);\n  }\n  \n  inline void set_noise(uint16_t noise) {\n    uint32_t n = noise;\n    noise_ = noise >= 32768 ? ((n - 32768) * (n - 32768) >> 15) : 0;\n    noise_ = (noise_ >> 2) * 5;\n    overdrive_ = noise <= 32767 ? ((32767 - n) * (32767 - n) >> 14) : 0;\n  }\n  \n private:\n  bool sd_range_;\n\n  uint32_t ComputePhaseIncrement(int16_t midi_pitch);\n  uint32_t ComputeEnvelopeIncrement(uint16_t time);\n\n  uint16_t aux_envelope_strength_;\n  uint16_t frequency_;\n  uint16_t fm_amount_;\n  uint16_t am_decay_;\n  uint16_t fm_decay_;\n  uint16_t noise_;\n  uint16_t overdrive_;\n  int16_t previous_sample_;\n\n  uint32_t phase_;\n  uint32_t fm_envelope_phase_;\n  uint32_t am_envelope_phase_;\n  uint32_t aux_envelope_phase_;\n  uint32_t phase_increment_;\n\n  DISALLOW_COPY_AND_ASSIGN(FmDrum);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_FM_DRUM_H_\n"
  },
  {
    "path": "lib/peaks/drums/high_hat.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style HH.\n\n#include \"peaks/drums/high_hat.h\"\n\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid HighHat::Init() {\n  noise_.Init();\n  noise_.set_frequency(105 << 7);  // 8kHz\n  noise_.set_resonance(24000);\n  \n  vca_coloration_.Init();\n  vca_coloration_.set_frequency(110 << 7);  // 13kHz\n  vca_coloration_.set_resonance(0);\n  \n  vca_envelope_.Init();\n  vca_envelope_.set_delay(0);\n  vca_envelope_.set_decay(4093);\n}\n\nvoid HighHat::Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n  while (size--) {\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      vca_envelope_.Trigger(32768 * 15);\n    }\n  \n    phase_[0] += 48318382;\n    phase_[1] += 71582788;\n    phase_[2] += 37044092;\n    phase_[3] += 54313440;\n    phase_[4] += 66214079;\n    phase_[5] += 93952409;\n\n    int16_t noise = 0;\n    noise += phase_[0] >> 31;\n    noise += phase_[1] >> 31;\n    noise += phase_[2] >> 31;\n    noise += phase_[3] >> 31;\n    noise += phase_[4] >> 31;\n    noise += phase_[5] >> 31;\n    noise <<= 12;\n  \n    // Run the SVF at the double of the original sample rate for stability.\n    int32_t filtered_noise = 0;\n    filtered_noise += noise_.Process<SVF_MODE_BP>(noise);\n    filtered_noise += noise_.Process<SVF_MODE_BP>(noise);\n\n    // The 808-style VCA amplifies only the positive section of the signal.\n    if (filtered_noise < 0) {\n      filtered_noise = 0;\n    } else if (filtered_noise > 32767) {\n      filtered_noise = 32767;\n    }\n  \n    int32_t envelope = vca_envelope_.Process() >> 4;\n    int32_t vca_noise = envelope * filtered_noise >> 14;\n    CLIP(vca_noise);\n    int32_t hh = 0;\n    hh += vca_coloration_.Process<SVF_MODE_HP>(vca_noise);\n    hh += vca_coloration_.Process<SVF_MODE_HP>(vca_noise);\n    hh <<= 1;\n    CLIP(hh);\n    *out++ = hh;\n  }\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/drums/high_hat.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style HH.\n \n#ifndef PEAKS_DRUMS_HIGH_HAT_H_\n#define PEAKS_DRUMS_HIGH_HAT_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"peaks/drums/svf.h\"\n#include \"peaks/drums/excitation.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass HighHat {\n public:\n  HighHat() { }\n  ~HighHat() { }\n\n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  void Configure(uint16_t* parameter, ControlMode control_mode) \n  { \n    vca_envelope_.set_decay(4092 + (parameter[0] >> 14) + 1);\n  }\n  \n private:\n  Svf noise_;\n  Svf vca_coloration_;\n  Excitation vca_envelope_;\n  \n  uint32_t phase_[6];\n\n  DISALLOW_COPY_AND_ASSIGN(HighHat);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_HIGH_HAT_H_\n"
  },
  {
    "path": "lib/peaks/drums/snare_drum.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style snare drum.\n\n#include \"peaks/drums/snare_drum.h\"\n\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid SnareDrum::Init() {\n  excitation_1_up_.Init();\n  excitation_1_up_.set_delay(0);\n  excitation_1_up_.set_decay(1536);\n  \n  excitation_1_down_.Init();\n  excitation_1_down_.set_delay(1e-3 * 48000);\n  excitation_1_down_.set_decay(3072);\n\n  excitation_2_.Init();\n  excitation_2_.set_delay(1e-3 * 48000);\n  excitation_2_.set_decay(1200);\n  \n  excitation_noise_.Init();\n  excitation_noise_.set_delay(0);\n  \n  body_1_.Init();\n  body_2_.Init();\n\n  noise_.Init();\n  noise_.set_resonance(2000);\n  \n  set_tone(0);\n  set_snappy(32768);\n  set_decay(32768);\n  set_frequency(0);\n}\n\nvoid SnareDrum::Process(\n    const GateFlags* gate_flags, int16_t* out, size_t size) {\n  while (size--) {\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      excitation_1_up_.Trigger(15 * 32768);\n      excitation_1_down_.Trigger(-1 * 32768);\n      excitation_2_.Trigger(13107);\n      excitation_noise_.Trigger(snappy_);\n    }\n  \n    int32_t excitation_1 = 0;\n    excitation_1 += excitation_1_up_.Process();\n    excitation_1 += excitation_1_down_.Process();\n    excitation_1 += !excitation_1_down_.done() ? 2621 : 0;\n  \n    int32_t body_1 = body_1_.Process<SVF_MODE_BP>(excitation_1) + (excitation_1 >> 4);\n  \n    int32_t excitation_2 = 0;\n    excitation_2 += excitation_2_.Process();\n    excitation_2 += !excitation_2_.done() ? 13107 : 0;\n\n    int32_t body_2 = body_2_.Process<SVF_MODE_BP>(excitation_2) + (excitation_2 >> 4);\n    int32_t noise_sample = Random::GetSample();\n    int32_t noise = noise_.Process<SVF_MODE_BP>(noise_sample);\n    int32_t noise_envelope = excitation_noise_.Process();\n    int32_t sd = 0;\n    sd += body_1 * gain_1_ >> 15;\n    sd += body_2 * gain_2_ >> 15;\n    sd += noise_envelope * noise >> 15;\n    CLIP(sd);\n    *out++ = sd;\n  }\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/drums/snare_drum.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style snare drum.\n \n#ifndef PEAKS_DRUMS_SNARE_DRUM_H_\n#define PEAKS_DRUMS_SNARE_DRUM_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"peaks/drums/svf.h\"\n#include \"peaks/drums/excitation.h\"\n\n#include <cstdio>\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass SnareDrum {\n public:\n  SnareDrum() { }\n  ~SnareDrum() { }\n\n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_frequency(0);\n      set_decay(32768);\n      set_tone(parameter[0]);\n      set_snappy(parameter[1]);\n    } else {\n      set_frequency(parameter[0] - 32768);\n      set_tone(parameter[1]);\n      set_snappy(parameter[2]);\n      set_decay(parameter[3]);\n    }\n  }\n\n  void set_tone(uint16_t tone) {\n    gain_1_ = 22000 - (tone >> 2);\n    gain_2_ = 22000 + (tone >> 2);\n  }\n\n  void set_snappy(uint16_t snappy) {\n    snappy >>= 1;\n    if (snappy >= 28672) {\n      snappy = 28672;\n    }\n    snappy_ = 512 + snappy;\n  }\n\n  void set_decay(uint16_t decay) {\n    body_1_.set_resonance(29000 + (decay >> 5));\n    body_2_.set_resonance(26500 + (decay >> 5));\n    excitation_noise_.set_decay(4092 + (decay >> 14));\n  }\n  \n  void set_frequency(int16_t frequency) {\n    int16_t base_note = 52 << 7;\n    int32_t transposition = frequency;\n    base_note += transposition * 896 >> 15;\n    body_1_.set_frequency(base_note);\n    body_2_.set_frequency(base_note + (12 << 7));\n    noise_.set_frequency(base_note + (48 << 7));\n  }\n\n private:\n  Excitation excitation_1_up_;\n  Excitation excitation_1_down_;\n  Excitation excitation_2_;\n  Excitation excitation_noise_;\n  Svf body_1_;\n  Svf body_2_;\n  Svf noise_;\n  \n  int32_t gain_1_;\n  int32_t gain_2_;\n  \n  uint16_t snappy_;\n\n  DISALLOW_COPY_AND_ASSIGN(SnareDrum);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_SNARE_DRUM_H_\n"
  },
  {
    "path": "lib/peaks/drums/svf.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SVF used for modeling the bridged T-networks.\n\n#ifndef PEAKS_DRUMS_SVF_H_\n#define PEAKS_DRUMS_SVF_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/dsp.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nenum SvfMode {\n  SVF_MODE_LP,\n  SVF_MODE_BP,\n  SVF_MODE_HP\n};\n\nclass Svf {\n public:\n  Svf() { }\n  ~Svf() { }\n  \n  inline void Init() {\n    lp_ = 0;\n    bp_ = 0;\n    frequency_ = 33 << 7;\n    resonance_ = 16384;\n    dirty_ = true;\n    punch_ = 0;\n  }\n  \n  inline void set_frequency(int16_t frequency) {\n    dirty_ = dirty_ || (frequency_ != frequency);\n    frequency_ = frequency;\n  }\n  \n  inline void set_resonance(int16_t resonance) {\n    resonance_ = resonance;\n    dirty_ = true;\n  }\n  \n  inline void set_punch(uint16_t punch) {\n    punch_ = (static_cast<uint32_t>(punch) * punch) >> 24;\n  }\n  \n  template<SvfMode mode>\n  inline int32_t Process(int32_t in) {\n    if (dirty_) {\n      f_ = stmlib::Interpolate824(lut_svf_cutoff, frequency_ << 17);\n      damp_ = stmlib::Interpolate824(lut_svf_damp, resonance_ << 17);\n      dirty_ = false;\n    }\n    int32_t f = f_;\n    int32_t damp = damp_;\n    if (punch_) {\n      int32_t punch_signal = lp_ > 4096 ? lp_ : 2048;\n      f += ((punch_signal >> 4) * punch_) >> 9;\n      damp += ((punch_signal - 2048) >> 3);\n    }\n    int32_t notch = in - (bp_ * damp >> 15);\n    lp_ += f * bp_ >> 15;\n    CLIP(lp_)\n    int32_t hp = notch - lp_;\n    bp_ += f * hp >> 15;\n    CLIP(bp_)\n  \n    return mode == SVF_MODE_BP ? bp_ : (mode == SVF_MODE_HP ? hp : lp_);\n  }\n  \n private:\n  bool dirty_;\n  \n  int16_t frequency_;\n  int16_t resonance_;\n  \n  int32_t punch_;\n  int32_t f_;\n  int32_t damp_;\n\n  int32_t lp_;\n  int32_t bp_;\n  \n  SvfMode mode_;\n\n  DISALLOW_COPY_AND_ASSIGN(Svf);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_DRUMS_SVF_H_\n"
  },
  {
    "path": "lib/peaks/gate_processor.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// General declarations used by all trigger/gate processors.\n\n#ifndef PEAKS_GATE_PROCESSOR_H_\n#define PEAKS_GATE_PROCESSOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/utils/ring_buffer.h\"\n\nnamespace peaks {\n\nenum ControlMode {\n  CONTROL_MODE_FULL,\n  CONTROL_MODE_HALF\n};\n\nenum GateFlagsBits {\n  GATE_FLAG_LOW = 0,\n  GATE_FLAG_HIGH = 1,\n  GATE_FLAG_RISING = 2,\n  GATE_FLAG_FALLING = 4,\n  GATE_FLAG_FROM_BUTTON = 8,\n  \n  GATE_FLAG_AUXILIARY_LOW = 0,\n  GATE_FLAG_AUXILIARY_HIGH = 16,\n  GATE_FLAG_AUXILIARY_RISING = 32,\n  GATE_FLAG_AUXILIARY_FALLING = 64,\n};\n\ntypedef uint8_t GateFlags;\n\ninline GateFlags ExtractGateFlags(GateFlags previous, bool current) {\n  previous &= GATE_FLAG_HIGH;\n  if (current) {\n    return previous ? GATE_FLAG_HIGH : (GATE_FLAG_RISING | GATE_FLAG_HIGH);\n  } else {\n    return previous ? GATE_FLAG_FALLING : GATE_FLAG_LOW;\n  }\n}\n\n}  // namespace peaks\n\n#endif  // PEAKS_GATE_PROCESSOR_H_\n"
  },
  {
    "path": "lib/peaks/modulations/bouncing_ball.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Bouncing ball.\n\n#ifndef PEAKS_MODULATIONS_BOUNCING_BALL_H_\n#define PEAKS_MODULATIONS_BOUNCING_BALL_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"peaks/resources.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass BouncingBall {\n public:\n  BouncingBall() { }\n  ~BouncingBall() { }\n  \n  void Init() {\n    initial_amplitude_ = 65535L << 14;\n    gravity_ = 40;\n    bounce_loss_ = 4095;\n    initial_velocity_ = 0;\n  }\n    \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_initial_amplitude(65535);\n      set_initial_velocity(0);\n      set_gravity(parameter[0]);\n      set_bounce_loss(parameter[1]);\n    } else {\n      set_gravity(parameter[0]);\n      set_bounce_loss(parameter[1]);\n      set_initial_amplitude(parameter[2]);\n      set_initial_velocity(parameter[3] - 32768);\n    }\n  }\n  \n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n    while (size--) {\n      GateFlags gate_flag = *gate_flags++;\n      if (gate_flag & GATE_FLAG_RISING) {\n        velocity_ = initial_velocity_;\n        position_ = initial_amplitude_;\n      }\n      velocity_ -= gravity_;\n      position_ += velocity_;\n      if (position_ < 0) {\n        position_ = 0;\n        velocity_ = -(velocity_ >> 12) * bounce_loss_;\n      }\n      if (position_ > (32767L << 15)) {\n        position_ = 32767L << 15;\n        velocity_ = -(velocity_ >> 12) * bounce_loss_;\n      }\n      *out++ = position_ >> 15;\n    }\n  }\n  \n  inline void set_gravity(uint16_t gravity) {\n    gravity_ = stmlib::Interpolate88(lut_gravity, gravity);\n  }\n  \n  inline void set_bounce_loss(uint16_t bounce_loss) {\n    uint32_t b = 65535 - bounce_loss;\n    b = b * b >> 16;\n    bounce_loss_ = 4095 - (b >> 4);\n  }\n\n  inline void set_initial_amplitude(uint16_t initial_amplitude) {\n    initial_amplitude_ = static_cast<int32_t>(initial_amplitude) << 14;\n  }\n  \n  inline void set_initial_velocity(int16_t initial_velocity) {\n    initial_velocity_ = static_cast<int32_t>(initial_velocity) << 4;\n  }\n  \n  inline bool FillBuffer() const {\n    return true;\n  }\n  \n private:\n  int32_t gravity_;\n  int32_t bounce_loss_;\n  int32_t initial_amplitude_;\n  int32_t initial_velocity_;\n   \n  int32_t velocity_;\n  int32_t position_; \n\n  DISALLOW_COPY_AND_ASSIGN(BouncingBall);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_MODULATIONS_BOUNCING_BALL_H_\n"
  },
  {
    "path": "lib/peaks/modulations/lfo.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LFO.\n\n#include \"peaks/modulations/lfo.h\"\n\n#include <cstdio>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nconst uint16_t kSlopeBits = 12;\nconst uint32_t kSyncCounterMaxTime = 8 * 48000;\n\nusing namespace stmlib;\n\nvoid Lfo::Init() {\n  rate_ = 0;\n  shape_ = LFO_SHAPE_SQUARE;\n  parameter_ = 0;\n  reset_phase_ = 0;\n  sync_ = false;\n  previous_parameter_ = 32767;\n  sync_counter_ = kSyncCounterMaxTime;\n  level_ = 32767;\n  pattern_predictor_.Init();\n}\n\nconst int16_t presets[7][2] = {\n  { LFO_SHAPE_SINE, 0 },\n  { LFO_SHAPE_TRIANGLE, 0 },\n  { LFO_SHAPE_TRIANGLE, 32767 },\n  { LFO_SHAPE_SQUARE, 0 },\n  { LFO_SHAPE_STEPS, 0 },\n  { LFO_SHAPE_NOISE, -32767 },\n  { LFO_SHAPE_NOISE, 32767 },\n};\n\nvoid Lfo::set_shape_parameter_preset(uint16_t value) {\n  value = (value >> 8) * 7 >> 8;\n  set_shape(static_cast<LfoShape>(presets[value][0]));\n  set_parameter(presets[value][1]);\n}\n\nvoid Lfo::Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n  if (!sync_) {\n    int32_t a = lut_lfo_increments[rate_ >> 8];\n    int32_t b = lut_lfo_increments[(rate_ >> 8) + 1];\n    phase_increment_ = a + (((b - a) >> 1) * (rate_ & 0xff) >> 7);\n  }\n  while (size--) {\n    ++sync_counter_;\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      bool reset_phase = true;\n      if (sync_) {\n        if (sync_counter_ < kSyncCounterMaxTime) {\n          uint32_t period = 0;\n          if (gate_flag & GATE_FLAG_FROM_BUTTON) {\n            period = sync_counter_;\n          } else if (sync_counter_ < 1920) {\n            period = (3 * period_ + sync_counter_) >> 2;\n            reset_phase = false;\n          } else {\n            period = pattern_predictor_.Predict(sync_counter_);\n          }\n          if (period != period_) {\n            period_ = period;\n            phase_increment_ = 0xffffffff / period_;\n          }\n        }\n        sync_counter_ = 0;\n      }\n      if (reset_phase) {\n        phase_ = reset_phase_;\n      }\n    }\n    phase_ += phase_increment_;\n    int32_t sample = (this->*compute_sample_fn_table_[shape_])();\n    *out++ = sample * level_ >> 15;\n  }\n}\n\nint16_t Lfo::ComputeSampleSine() {\n  uint32_t phase = phase_;\n  int16_t sine = Interpolate1022(wav_sine, phase);\n  int16_t sample;\n  if (parameter_ > 0) {\n    int32_t wf_balance = parameter_;\n    int32_t wf_gain = 2048 + \\\n        (static_cast<int32_t>(parameter_) * (65535 - 2048) >> 15);\n    int32_t original = sine;\n    int32_t folded = Interpolate1022(\n        wav_fold_sine, original * wf_gain + (1UL << 31));\n    sample = original + ((folded - original) * wf_balance >> 15);\n  } else {\n    int32_t wf_balance = -parameter_;\n    int32_t original = sine;\n    phase += 1UL << 30;\n    int32_t tri = phase < (1UL << 31) ? phase << 1 : ~(phase << 1);\n    int32_t folded = Interpolate1022(wav_fold_power, tri);\n    sample = original + ((folded - original) * wf_balance >> 15);\n  }\n  return sample;\n}\n\nint16_t Lfo::ComputeSampleTriangle() {\n  if (parameter_ != previous_parameter_) {\n    uint16_t slope_offset = parameter_ + 32768;\n    if (slope_offset <= 1) {\n      decay_factor_ = 32768 << kSlopeBits;\n      attack_factor_ = 1 << (kSlopeBits - 1);\n    } else {\n      decay_factor_ = (32768 << kSlopeBits) / slope_offset;\n      attack_factor_ = (32768 << kSlopeBits) / (65536 - slope_offset);\n    }\n    end_of_attack_ = (static_cast<uint32_t>(slope_offset) << 16);\n    previous_parameter_ = parameter_;\n  }\n  \n  uint32_t phase = phase_;\n  uint32_t skewed_phase = phase;\n  if (phase < end_of_attack_) {\n    skewed_phase = (phase >> kSlopeBits) * decay_factor_;\n  } else {\n    skewed_phase = ((phase - end_of_attack_) >> kSlopeBits) * attack_factor_;\n    skewed_phase += 1L << 31;\n  }\n  return skewed_phase < 1UL << 31\n      ? -32768 + (skewed_phase >> 15)\n      :  32767 - (skewed_phase >> 15);\n}\n\nint16_t Lfo::ComputeSampleSquare() {\n  uint32_t threshold = static_cast<uint32_t>(parameter_ + 32768) << 16;\n  if (threshold < (phase_increment_ << 1)) {\n    threshold = phase_increment_ << 1;\n  } else if (~threshold < (phase_increment_ << 1)) {\n    threshold = ~(phase_increment_ << 1);\n  }\n  return phase_ < threshold ? 32767 : -32767;\n}\n\nint16_t Lfo::ComputeSampleSteps() {\n  uint16_t quantization_levels = 2 + (((parameter_ + 32768) * 15) >> 16);\n  uint16_t scale = 65535 / (quantization_levels - 1);\n  uint32_t phase = phase_;\n  uint32_t tri_phase = phase;\n  uint32_t tri = tri_phase < (1UL << 31) ? tri_phase << 1 : ~(tri_phase << 1);\n  return ((tri >> 16) * quantization_levels >> 16) * scale - 32768;\n}\n\nint16_t Lfo::ComputeSampleNoise() {\n  uint32_t phase = phase_;\n  if (phase < phase_increment_) {\n    value_ = next_value_;\n    next_value_ = Random::GetSample();\n  }\n  int16_t sample;\n  int32_t linear_interpolation = value_ + \\\n      ((next_value_ - value_) * static_cast<int32_t>(phase >> 17) >> 15);\n  if (parameter_ < 0) {\n    int32_t balance = parameter_ + 32767;\n    sample = value_ + ((linear_interpolation - value_) * balance >> 15);\n  } else {\n    int16_t raised_cosine = Interpolate824(lut_raised_cosine, phase) >> 1;\n    int32_t smooth_interpolation = value_ + \\\n        ((next_value_ - value_) * raised_cosine >> 15);\n    sample = linear_interpolation + \\\n        ((smooth_interpolation - linear_interpolation) * parameter_ >> 15);\n  }\n  return sample;\n}\n\n/* static */\nLfo::ComputeSampleFn Lfo::compute_sample_fn_table_[] = {\n  &Lfo::ComputeSampleSine,\n  &Lfo::ComputeSampleTriangle,\n  &Lfo::ComputeSampleSquare,\n  &Lfo::ComputeSampleSteps,\n  &Lfo::ComputeSampleNoise\n};\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/modulations/lfo.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LFO.\n\n#ifndef PEAKS_MODULATIONS_LFO_H_\n#define PEAKS_MODULATIONS_LFO_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/algorithms/pattern_predictor.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nenum LfoShape {\n  LFO_SHAPE_SINE,\n  LFO_SHAPE_TRIANGLE,\n  LFO_SHAPE_SQUARE,\n  LFO_SHAPE_STEPS,\n  LFO_SHAPE_NOISE,\n  LFO_SHAPE_LAST\n};\n\nclass Lfo {\n public:\n  typedef int16_t (Lfo::*ComputeSampleFn)();\n   \n  Lfo() { }\n  ~Lfo() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      if (sync_) {\n        set_shape_integer(parameter[0]);\n        set_parameter(parameter[1] - 32768);\n      } else {\n        set_rate(parameter[0]);\n        set_shape_parameter_preset(parameter[1]);\n      }\n      set_reset_phase(0);\n      set_level(40960);\n    } else {\n      if (sync_) {\n        set_level(parameter[0]);\n        set_shape_integer(parameter[1]);\n        set_parameter(parameter[2] - 32768);\n        set_reset_phase(parameter[3] - 32768);\n      } else {\n        set_level(40960);\n        set_rate(parameter[0]);\n        set_shape_integer(parameter[1]);\n        set_parameter(parameter[2] - 32768);\n        set_reset_phase(parameter[3] - 32768);\n      }\n    }\n  }\n  \n  inline void set_rate(uint16_t rate) {\n    rate_ = rate;\n  }\n  \n  inline void set_shape(LfoShape shape) {\n    shape_ = shape;\n  }\n\n  inline void set_shape_integer(uint16_t value) {\n    shape_ = static_cast<LfoShape>(value * LFO_SHAPE_LAST >> 16);\n  }\n  \n  void set_shape_parameter_preset(uint16_t value);\n  \n  inline void set_parameter(int16_t parameter) {\n    parameter_ = parameter;\n  }\n  \n  inline void set_reset_phase(int16_t reset_phase) {\n    reset_phase_ = static_cast<int32_t>(reset_phase) << 16;\n  }\n  \n  inline void set_sync(bool sync) {\n    if (!sync_ && sync) {\n      pattern_predictor_.Init();\n    }\n    sync_ = sync;\n  }\n  \n  inline void set_level(uint16_t level) {\n    level_ = level >> 1;\n  }\n  \n private:\n  int16_t ComputeSampleSine();\n  int16_t ComputeSampleTriangle();\n  int16_t ComputeSampleSquare();\n  int16_t ComputeSampleSteps();\n  int16_t ComputeSampleNoise();\n   \n  uint16_t rate_;\n  LfoShape shape_;\n  int16_t parameter_;\n  int32_t reset_phase_;\n  int32_t level_;\n\n  bool sync_;\n  uint32_t sync_counter_;\n  stmlib::PatternPredictor<32, 8> pattern_predictor_;\n  \n  uint32_t phase_;\n  uint32_t phase_increment_;\n  \n  uint32_t period_;\n  uint32_t end_of_attack_;\n  uint32_t attack_factor_;\n  uint32_t decay_factor_;\n  int16_t previous_parameter_;\n  \n  int32_t value_;\n  int32_t next_value_;\n  \n  static ComputeSampleFn compute_sample_fn_table_[];\n\n  DISALLOW_COPY_AND_ASSIGN(Lfo);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_MODULATIONS_LFO_H_\n"
  },
  {
    "path": "lib/peaks/modulations/mini_sequencer.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Mini sequencer.\n\n#ifndef PEAKS_MODULATIONS_MINI_SEQUENCER_H_\n#define PEAKS_MODULATIONS_MINI_SEQUENCER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nconst uint8_t kMaxNumSteps = 4;\n\nclass MiniSequencer {\n public:\n  MiniSequencer() { }\n  ~MiniSequencer() { }\n  \n  void Init() {\n    std::fill(&steps_[0], &steps_[kMaxNumSteps], 0);\n    num_steps_ = 4;\n    step_ = 0;\n    reset_at_next_clock_ = false;\n  }\n  \n  inline void set_step(uint8_t index, int16_t value) {\n    int32_t difference = abs(int32_t(steps_[index]) - value);\n    if (difference > 0) {\n      steps_[index] = value;\n    }\n  }\n  \n  inline void set_num_steps(uint8_t num_steps) {\n    num_steps_ = num_steps;\n  }\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_step(0, parameter[0] - 32768);\n      set_step(1, parameter[1] - 32768);\n      set_num_steps(2);\n    } else {\n      set_step(0, parameter[0] - 32768);\n      set_step(1, parameter[1] - 32768);\n      set_step(2, parameter[2] - 32768);\n      set_step(3, parameter[3] - 32768);\n      set_num_steps(4);\n    }\n  }\n  \n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size) {\n    while (size--) {\n      GateFlags gate_flag = *gate_flags++;\n      if (gate_flag & GATE_FLAG_RISING) {\n        ++step_;\n        if (reset_at_next_clock_) {\n          reset_at_next_clock_  = false;\n          step_ = 0;\n        }\n      }\n      if (num_steps_ > 2 && gate_flag & GATE_FLAG_AUXILIARY_RISING) {\n        reset_at_next_clock_ = true;\n      }\n      if (step_ >= num_steps_) {\n        step_ = 0;\n      }\n      *out++ = static_cast<int32_t>(steps_[step_]) * 40960 >> 16;\n    }\n  }\n  \n private:\n  uint8_t num_steps_;\n  uint8_t step_;\n  int16_t steps_[kMaxNumSteps];\n\n  bool reset_at_next_clock_;\n\n  DISALLOW_COPY_AND_ASSIGN(MiniSequencer);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_MODULATIONS_MINI_SEQUENCER_H_\n"
  },
  {
    "path": "lib/peaks/modulations/multistage_envelope.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Multistage envelope.\n\n#include \"peaks/modulations/multistage_envelope.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid MultistageEnvelope::Init() {\n  set_adsr(0, 8192, 16384, 32767);\n  segment_ = num_segments_;\n  phase_ = 0;\n  phase_increment_ = 0;\n  start_value_ = 0;\n  value_ = 0;\n  hard_reset_ = false;\n}\n\nvoid MultistageEnvelope::Process(\n    const GateFlags* gate_flags, int16_t* out, size_t size) {\n  while (size--) {\n    GateFlags gate_flag = *gate_flags++;\n    if (gate_flag & GATE_FLAG_RISING) {\n      start_value_ = (segment_ == num_segments_ || hard_reset_)\n          ? level_[0]\n          : value_;\n      segment_ = 0;\n      phase_ = 0;\n    } else if (gate_flag & GATE_FLAG_FALLING && sustain_point_) {\n      start_value_ = value_;\n      segment_ = sustain_point_;\n      phase_ = 0;\n    } else if (phase_ < phase_increment_) {\n      start_value_ = level_[segment_ + 1];\n      ++segment_;\n      phase_ = 0;\n      if (segment_ == loop_end_) {\n        segment_ = loop_start_;\n      }\n    }\n  \n    bool done = segment_ == num_segments_;\n    bool sustained = sustain_point_ && segment_ == sustain_point_ &&\n        gate_flag & GATE_FLAG_HIGH;\n\n    phase_increment_ =\n        sustained || done ? 0 : lut_env_increments[time_[segment_] >> 8];\n\n    int32_t a = start_value_;\n    int32_t b = level_[segment_ + 1];\n\n    //eh2k >>>\n    const uint16_t * lutt[] = { lut_env_linear, lut_env_expo, lut_env_quartic };\n    //<<<\n\n    uint16_t t = Interpolate824(lutt[shape_[segment_]], phase_);\n    value_ = a + ((b - a) * (t >> 1) >> 15);\n    phase_ += phase_increment_;\n    *out++ = value_;\n  }\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/modulations/multistage_envelope.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Multistage envelope.\n\n#ifndef PEAKS_MODULATIONS_MULTISTAGE_ENVELOPE_H_\n#define PEAKS_MODULATIONS_MULTISTAGE_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/ring_buffer.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nenum EnvelopeShape {\n  ENV_SHAPE_LINEAR,\n  ENV_SHAPE_EXPONENTIAL,\n  ENV_SHAPE_QUARTIC\n};\n\nconst uint16_t kMaxNumSegments = 8;\n\nclass MultistageEnvelope {\n public:\n  MultistageEnvelope() { }\n  ~MultistageEnvelope() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_ad(parameter[0], parameter[1]);\n    } else {\n      set_adsr(parameter[0], parameter[1], parameter[2] >> 1, parameter[3]);\n    }\n    if (segment_ > num_segments_) {\n      segment_ = 0;\n      phase_ = 0;\n      value_ = 0;\n    }\n  }\n  \n  inline void set_time(uint16_t segment, uint16_t time) {\n    time_[segment] = time;\n  }\n  \n  inline void set_level(uint16_t segment, int16_t level) {\n    level_[segment] = level;\n  }\n  \n  inline void set_num_segments(uint16_t num_segments) {\n    num_segments_ = num_segments;\n  }\n  \n  inline void set_sustain_point(uint16_t sustain_point) {\n    sustain_point_ = sustain_point;\n  }\n  \n  inline void set_adsr(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 3;\n    sustain_point_ = 2;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = release;\n    \n    shape_[0] = ENV_SHAPE_QUARTIC;\n    shape_[1] = ENV_SHAPE_EXPONENTIAL;\n    shape_[2] = ENV_SHAPE_EXPONENTIAL;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_ad(uint16_t attack, uint16_t decay) {\n    num_segments_ = 2;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    \n    shape_[0] = ENV_SHAPE_EXPONENTIAL;\n    shape_[1] = ENV_SHAPE_EXPONENTIAL;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_adr(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 3;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_ar(uint16_t attack, uint16_t decay) {\n    num_segments_ = 2;\n    sustain_point_ = 1;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_adsar(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 4;\n    sustain_point_ = 2;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 32767;\n    level_[4] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = attack;\n    time_[3] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    shape_[3] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_adar(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 4;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 32767;\n    level_[4] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = attack;\n    time_[3] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    shape_[3] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = loop_end_ = 0;\n  }\n  \n  inline void set_ad_loop(uint16_t attack, uint16_t decay) {\n    num_segments_ = 2;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = 0;\n    loop_end_ = 2;\n  }\n  \n  inline void set_adr_loop(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 3;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    \n    loop_start_ = 0;\n    loop_end_ = 3;\n  }\n  \n  inline void set_adar_loop(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 4;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 32767;\n    level_[4] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = attack;\n    time_[3] = release;\n\n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    shape_[3] = ENV_SHAPE_LINEAR;\n\n    loop_start_ = 0;\n    loop_end_ = 4;\n  }\n  \n  inline void set_hard_reset(bool hard_reset) {\n    hard_reset_ = hard_reset;\n  }\n  \n private:\n  int16_t level_[kMaxNumSegments];\n  uint16_t time_[kMaxNumSegments];\n  EnvelopeShape shape_[kMaxNumSegments];\n  \n  int16_t segment_;\n  int16_t start_value_;\n  int16_t value_;\n\n  uint32_t phase_;\n  uint32_t phase_increment_;\n  \n  uint16_t num_segments_;\n  uint16_t sustain_point_;\n  uint16_t loop_start_;\n  uint16_t loop_end_;\n  \n  bool hard_reset_;\n  \n  DISALLOW_COPY_AND_ASSIGN(MultistageEnvelope);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_MODULATIONS_MULTISTAGE_ENVELOPE_H_\n"
  },
  {
    "path": "lib/peaks/number_station/number_station.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Number station.\n\n#include \"peaks/number_station/number_station.h\"\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nconst uint8_t kDownsample = 4;\n\nusing namespace stmlib;\n\nvoid NumberStation::Init() {\n  tone_amplitude_ = 0;\n  phase_ = 0;\n  lp_.Init();\n  lp_.set_frequency(120 << 7);\n  lp_.set_resonance(16000);\n\n  hp_.Init();\n  hp_.set_frequency(70 << 7);\n  hp_.set_resonance(8000);\n\n  previous_inner_sample_ = 0;\n  previous_outer_sample_ = 0;\n}\n\nsize_t voice_digits[] = {\n  0, 4913, 7830, 11306, 14601, 18651, 22308, 26438, 30495, 33296, 36801\n};\n\nvoid NumberStation::Process(\n    const GateFlags* gate_flags, int16_t* out, size_t size) {\n  uint32_t phase_increment;\n\n  if (voice_) {\n    phase_increment = pitch_shift_;\n  } else {\n    uint16_t frequency = tone_;\n    int32_t a = lut_lfo_increments[frequency >> 8];\n    int32_t b = lut_lfo_increments[(frequency >> 8) + 1];\n    phase_increment = a + (((b - a) >> 1) * (frequency & 0xff) >> 7);\n    phase_increment <<= 6;\n    phase_increment *= digit_ + 1;\n  }\n\n  int32_t drift_target = Random::GetSample();\n  if (drift_target > drift_) {\n    drift_ += (drift_target - drift_) >> 13;\n  } else {\n    drift_ -= (drift_ - drift_target) >> 13;\n  }\n  int32_t slow_noise = drift_ << 5;\n  CLIP(slow_noise);\n\n  size /= kDownsample;\n  while (size--) {\n    for (uint8_t i = 0; i < kDownsample; ++i) {\n      GateFlags gate_flag = *gate_flags++;\n      if (gate_flag & GATE_FLAG_RISING) {\n        uint16_t random = Random::GetSample();\n        if (random < transition_probability_) {\n          digit_ = random >> 2;\n          digit_ = voice_ ? digit_ % 10 : digit_ & 3;\n        }\n        if (voice_) {\n          phase_ = voice_digits[digit_] << 16;\n        }\n      }\n      if (gate_flag & GATE_FLAG_HIGH) {\n        tone_amplitude_ += (32767 - tone_amplitude_) >> 6;\n      } else {\n        tone_amplitude_ -= tone_amplitude_ >> 6;\n        if (tone_amplitude_ < 64 && tone_amplitude_) {\n          --tone_amplitude_;\n        }\n      }\n    }\n  \n    // Generate a distorted sine wave with fluctuating frequency.    \n    int32_t digit;\n    if (voice_) {\n      uint16_t integral = phase_ >> 16;\n      uint16_t fractional = phase_ & 0xffff;\n      if (integral < voice_digits[digit_ + 1]) {\n        uint8_t mask_a = integral * 53;\n        uint8_t mask_b = mask_a + 53;\n        int32_t a = static_cast<int32_t>(wav_digits[integral] ^ mask_a);\n        int32_t b = static_cast<int32_t>(wav_digits[integral + 1] ^ mask_b);\n        digit = (a << 8) + (((b - a) * fractional) >> 8);\n        digit -= 32768;\n        phase_ += phase_increment;\n        gate_ = true;\n      } else {\n        digit = 0;\n        gate_ = false;\n      }\n    } else {\n      phase_ += phase_increment + (lp_noise_ << 10);\n      digit = Interpolate1022(wav_sine, phase_);\n      digit = digit * tone_amplitude_ >> 16;\n      gate_ = tone_amplitude_ > 0;\n    }\n    digit = digit + ((digit - ((digit + 4096) ^ 0x055a)) * distortion_ >> 15);\n    \n    // Generate narrow-band noise.\n    int32_t random_sample = Random::GetSample();\n    lp_noise_ += (random_sample - lp_noise_) >> 6;\n    noise_phase_ += 238370685;\n    int32_t noise = lp_noise_ * Interpolate1022(wav_sine, noise_phase_) >> 12;\n\n    // Generate an interference tone.\n    interference_phase_ += 710101260;\n    noise += distortion_ * wav_sine[interference_phase_ >> 22] >> 18;\n\n    // Mix signal and noise.\n    int32_t inner_sample = digit + ((noise - digit) * noise_ >> 15);\n\n    if (random_sample >= 32767 - (noise_ >> 7)) {\n      inner_sample = 0;\n    }\n\n    // Final ringmod.\n    ringmod_phase_ += 38654706 + (38654706 * drift_ >> 10);\n    int32_t ringmod = Interpolate1022(wav_sine, ringmod_phase_) >> 1;\n    ringmod = ringmod * inner_sample >> 15;\n    inner_sample += ringmod * distortion_ >> 15;\n    CLIP(inner_sample)\n\n    // And a pass of wavefolding...\n    inner_sample = Interpolate1022(\n        wav_fold_sine,\n        inner_sample * 8192 + (1UL << 31));\n\n    int32_t outer_sample ;\n    outer_sample = lp_.Process<SVF_MODE_LP>(\n        hp_.Process<SVF_MODE_HP>((inner_sample + previous_inner_sample_) >> 1));\n    *out++ = (previous_outer_sample_ + outer_sample) >> 1;\n    *out++ = outer_sample;\n    previous_outer_sample_ = outer_sample;\n\n    outer_sample = lp_.Process<SVF_MODE_LP>(\n        hp_.Process<SVF_MODE_HP>(inner_sample));\n    *out++ = (previous_outer_sample_ + outer_sample) >> 1;\n    *out++ = outer_sample;\n    previous_outer_sample_ = outer_sample;\n\n    previous_inner_sample_ = inner_sample;\n  }\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/number_station/number_station.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Number station.\n\n#ifndef PEAKS_NUMBER_STATION_NUMBER_STATION_H_\n#define PEAKS_NUMBER_STATION_NUMBER_STATION_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"peaks/drums/svf.h\"\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nclass NumberStation {\n public:\n  NumberStation() { }\n  ~NumberStation() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_tone(parameter[0]);\n      set_transition_probability(parameter[1]);\n      set_noise(32768);\n      set_distortion(32768);\n    } else {\n      set_tone(parameter[0]);\n      set_transition_probability(parameter[1]);\n      set_noise(parameter[2]);\n      set_distortion(parameter[3]);\n    }\n  }\n  \n  inline void set_tone(uint16_t tone) {\n    tone_ = (tone >> 2) + 32768 + 8192;\n    pitch_shift_ = (tone < 32768) ? (24576 + (tone >> 2)) : 16384 + (tone >> 1);\n  }\n  \n  inline void set_transition_probability(uint16_t transition_probability) {\n    transition_probability_ = transition_probability;\n  }\n\n  inline void set_distortion(uint16_t distortion) {\n    distortion_ = 8192;\n    distortion_ += ((32767 - 8192) * static_cast<uint32_t>(distortion) >> 16);\n  }\n  \n  inline void set_noise(uint16_t noise) {\n    noise_ = 256 + (noise >> 3);\n  }\n  \n  inline void set_voice(bool voice) {\n    voice_ = voice;\n  }\n  \n  inline uint8_t digit() const { return digit_; }\n  inline bool gate() const { return gate_; }\n  \n private:\n  uint16_t tone_;\n  uint16_t pitch_shift_;\n  uint16_t transition_probability_;\n  int32_t distortion_;\n  int32_t noise_; \n  uint8_t digit_;\n\n  int32_t drift_;\n   \n  uint32_t phase_;\n  uint32_t noise_phase_;\n  uint32_t ringmod_phase_;\n  uint32_t interference_phase_;\n\n  int16_t tone_amplitude_;\n  int32_t lp_noise_;\n\n  int32_t previous_inner_sample_;\n  int32_t previous_outer_sample_;\n  \n  bool voice_;\n  bool gate_;\n\n  Svf lp_;\n  Svf hp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(NumberStation);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_NUMBER_STATION_NUMBER_STATION_H_\n"
  },
  {
    "path": "lib/peaks/pulse_processor/pulse_randomizer.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Create random repetitions of a pulse.\n\n#include \"peaks/pulse_processor/pulse_randomizer.h\"\n\n#include <algorithm>\n\n#include \"stmlib/utils/dsp.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid PulseRandomizer::Init() {\n  repetition_probability_ = 32767;\n  acceptance_probability_ = 65535;\n  delay_average_ = 32767;\n  delay_randomness_ = 0;\n\n  std::fill(\n      &delay_counter_[0],\n      &delay_counter_[kTriggerPulseBufferSize],\n      0xffff);\n  \n  num_pulses_ = 0;\n  retrig_counter_ = 0;\n}\n\ninline uint16_t PulseRandomizer::delay() const {\n  int32_t delay = delay_average_;\n  delay += delay_average_ + (Random::GetSample() * delay_randomness_ >> 16);\n  if (delay < 0) {\n    delay = 0;\n  } else if (delay > 0xffff) {\n    delay = 0xffff;\n  }\n  return Interpolate88(lut_delay_times, delay);\n}\n\nvoid PulseRandomizer::Process(\n    const GateFlags* gate_flags, int16_t* out, size_t size) {\n  bool new_pulse = false;\n  for (size_t i = 0; i < size; ++i) {\n    new_pulse |= gate_flags[i] & GATE_FLAG_RISING;\n  }\n    \n  if ((Random::GetWord() >> 16) > acceptance_probability_) {\n    // Randomly ignore incoming pulses.\n    new_pulse = false;\n  }\n  \n  if (new_pulse) {\n    ++num_pulses_;\n  }\n    \n  for (uint8_t i = 0; i < kTriggerPulseBufferSize; ++i) {\n    if (delay_counter_[i] == 0xffff) {\n      if (new_pulse) {\n        delay_counter_[i] = delay();\n        new_pulse = false;\n      }\n    } else if (delay_counter_[i]) {\n      --delay_counter_[i];\n    } else {\n      if ((Random::GetWord() >> 16) < repetition_probability_) {\n        ++num_pulses_;\n        delay_counter_[i] = delay();\n      } else {\n        delay_counter_[i] = 0xffff;\n      }\n    }\n  }\n    \n  if (retrig_counter_) {\n    --retrig_counter_;\n  } else {\n    if (num_pulses_) {\n      retrig_counter_ = 12;\n      --num_pulses_;\n    }\n  }\n    \n  int16_t output = retrig_counter_ > 6 ? 20480 : 0;\n  std::fill(&out[0], &out[size], output);\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/pulse_processor/pulse_randomizer.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Create random repetitions of a pulse.\n\n#ifndef PEAKS_PULSE_PROCESSOR_PULSE_RANDOMIZER_H_\n#define PEAKS_PULSE_PROCESSOR_PULSE_RANDOMIZER_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/ring_buffer.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nstruct TriggerPulse {\n  uint32_t delay_counter;\n};\n\nstatic const uint8_t kTriggerPulseBufferSize = 32;\n\nclass PulseRandomizer {\n public:\n  PulseRandomizer() { }\n  ~PulseRandomizer() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_acceptance_probability(65535);\n      set_repetition_probability(parameter[0]);\n      set_delay_average(parameter[1]);\n      set_delay_randomness(0);\n    } else {\n      set_acceptance_probability(parameter[0]);\n      set_repetition_probability(parameter[1]);\n      set_delay_average(parameter[2]);\n      set_delay_randomness(parameter[3]);\n    }\n  }\n\n  inline void set_repetition_probability(uint16_t repetition_probability) {\n    repetition_probability_ = repetition_probability;\n  }\n  \n  inline void set_acceptance_probability(uint16_t acceptance_probability) {\n    acceptance_probability_ = acceptance_probability;\n  }\n  \n  inline void set_delay_average(uint16_t delay_average) {\n    delay_average_ = delay_average >> 1;\n  }\n  \n  inline void set_delay_randomness(uint16_t delay_randomness) {\n    delay_randomness_ = delay_randomness;\n  }\n  \n private:\n  uint16_t delay() const;\n  \n  uint16_t repetition_probability_;\n  uint16_t acceptance_probability_;\n  uint16_t delay_average_;\n  uint16_t delay_randomness_;\n\n  uint16_t num_pulses_;\n  uint16_t retrig_counter_;\n  \n  uint16_t delay_counter_[kTriggerPulseBufferSize];\n\n  DISALLOW_COPY_AND_ASSIGN(PulseRandomizer);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_PULSE_PROCESSOR_PULSE_RANDOMIZER_H_\n"
  },
  {
    "path": "lib/peaks/pulse_processor/pulse_shaper.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Trigger to gate converter with pre-delay, duration, and repetitions.\n\n#include \"peaks/pulse_processor/pulse_shaper.h\"\n\n#include <algorithm>\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"peaks/resources.h\"\n\nnamespace peaks {\n\nusing namespace stmlib;\n\nvoid PulseShaper::Init() {\n  initial_delay_ = 0;\n  duration_ = 0;\n  delay_ = 0;\n  num_repetitions_ = 0;\n\n  Pulse p;\n  p.initial_delay_counter = 0;\n  p.duration_counter = 0;\n  p.delay_counter = 0;\n  p.repetition_counter = 0;\n  \n  std::fill(&pulse_buffer_[0], &pulse_buffer_[kPulseBufferSize], p);\n  \n  previous_num_pulses_ = 0;\n  retrig_counter_ = 0;\n}\n\ninline uint16_t PulseShaper::delay() const {\n  return Interpolate88(lut_delay_times, delay_) - 1;\n}\n\ninline uint16_t PulseShaper::duration() const {\n  return Interpolate88(lut_delay_times, duration_);\n}\n\ninline uint16_t PulseShaper::initial_delay() const {\n  return Interpolate88(lut_delay_times, initial_delay_);\n}\n\nvoid PulseShaper::Process(\n    const GateFlags* gate_flags, int16_t* out, size_t size) {\n  bool new_pulse = false;\n  for (size_t i = 0; i < size; ++i) {\n    new_pulse |= gate_flags[i] & GATE_FLAG_RISING;\n  }\n    \n  uint8_t num_pulses = 0;\n  for (uint8_t i = 0; i < kPulseBufferSize; ++i) {\n    Pulse& p = pulse_buffer_[i];\n    if (p.repetition_counter) {\n      // Handle the case when the duration of the pulse is larger than the\n      // delay time. In this case, set the duration to just a sample below\n      // the delay time.\n      if (p.delay_counter < p.duration_counter && p.repetition_counter > 1) {\n        p.duration_counter = p.delay_counter;\n      }\n      \n      if (p.initial_delay_counter == 0) {\n        if (p.duration_counter) {\n          // ON\n          --p.duration_counter;\n          ++num_pulses;\n        }\n        if (p.delay_counter) {\n          --p.delay_counter;\n        } else {\n          // Retrigger\n          --p.repetition_counter;\n          p.duration_counter = duration();\n          p.delay_counter = delay();\n        }\n      } else {\n        // Still in pre-delay phase...\n        --p.initial_delay_counter;\n      }\n    } else {\n      if (new_pulse) {\n        p.repetition_counter = num_repetitions_ + 1;\n        p.initial_delay_counter = initial_delay();\n        p.duration_counter = duration();\n        p.delay_counter = delay();\n        new_pulse = false;\n        num_pulses += p.initial_delay_counter ? 0 : 1;\n      }\n    }\n  }\n    \n  // The output is already high, but a new pulse is arriving. Create\n  // a short dip in the output to retrigger.\n  if (previous_num_pulses_ && num_pulses > previous_num_pulses_) {\n    retrig_counter_ = 6;\n  }\n  previous_num_pulses_ = num_pulses;\n\n  if (retrig_counter_) {\n    --retrig_counter_;\n  }\n  \n  int16_t output = num_pulses > 0 && !retrig_counter_ ? 20480 : 0;\n  std::fill(&out[0], &out[size], output);\n}\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/pulse_processor/pulse_shaper.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Trigger to gate converter with pre-delay, duration, and repetitions.\n\n#ifndef PEAKS_PULSE_PROCESSOR_PULSE_SHAPER_H_\n#define PEAKS_PULSE_PROCESSOR_PULSE_SHAPER_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/ring_buffer.h\"\n\n#include \"peaks/gate_processor.h\"\n\nnamespace peaks {\n\nstruct Pulse {\n  uint16_t initial_delay_counter;\n  uint16_t duration_counter;\n  uint16_t delay_counter;\n  uint16_t repetition_counter;\n};\n\nstatic const uint8_t kPulseBufferSize = 32;\n\nclass PulseShaper {\n public:\n  PulseShaper() { }\n  ~PulseShaper() { }\n  \n  void Init();\n  void Process(const GateFlags* gate_flags, int16_t* out, size_t size);\n  \n  void Configure(uint16_t* parameter, ControlMode control_mode) {\n    if (control_mode == CONTROL_MODE_HALF) {\n      set_initial_delay(0);\n      set_duration(parameter[0] >> 1);\n      set_delay((parameter[0] >> 1) + 2048);\n      set_num_repetitions(parameter[1]);\n    } else {\n      set_initial_delay(parameter[0]);\n      set_duration(parameter[1] >> 1);\n      set_delay(parameter[2] >> 1);\n      set_num_repetitions(parameter[3]);\n    }\n  }\n\n  inline void set_initial_delay(uint16_t initial_delay) {\n    initial_delay_ = initial_delay;\n  }\n  \n  inline void set_duration(uint16_t duration) {\n    duration_ = duration;\n  }\n  \n  inline void set_delay(uint16_t delay) {\n    delay_ = delay;\n  }\n  \n  inline void set_num_repetitions(uint16_t num_repetitions) {\n    num_repetitions_ = num_repetitions >> 13;\n  }\n  \n private:\n  uint16_t delay() const;\n  uint16_t duration() const;\n  uint16_t initial_delay() const;\n  \n  uint16_t initial_delay_;\n  uint16_t duration_;\n  uint16_t delay_;\n  uint16_t num_repetitions_;\n  \n  uint16_t previous_num_pulses_;\n  uint16_t retrig_counter_;\n  \n  Pulse pulse_buffer_[kPulseBufferSize];\n\n  DISALLOW_COPY_AND_ASSIGN(PulseShaper);\n};\n\n}  // namespace peaks\n\n#endif  // PEAKS_PULSE_PROCESSOR_PULSE_SHAPER_H_\n"
  },
  {
    "path": "lib/peaks/resources.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"peaks/resources.h\"\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nnamespace peaks {\n\nstatic const char str_dummy[] = \"dummy\";\n\n\nconst char* string_table[] = {\n  str_dummy,\n};\n\nconst uint16_t FLASHMEM lut_delay_times[] = {\n       5,      7,      8,     10,\n      12,     14,     16,     18,\n      21,     24,     27,     31,\n      34,     39,     43,     48,\n      53,     59,     65,     71,\n      78,     85,     93,    101,\n     109,    118,    128,    138,\n     149,    160,    172,    185,\n     198,    212,    226,    241,\n     257,    273,    290,    308,\n     327,    347,    367,    388,\n     410,    433,    456,    481,\n     506,    533,    560,    588,\n     617,    648,    679,    711,\n     745,    779,    815,    851,\n     889,    928,    968,   1009,\n    1052,   1096,   1141,   1187,\n    1235,   1284,   1334,   1386,\n    1439,   1493,   1549,   1607,\n    1666,   1726,   1788,   1851,\n    1916,   1982,   2050,   2120,\n    2192,   2265,   2339,   2416,\n    2494,   2574,   2655,   2739,\n    2824,   2911,   3000,   3091,\n    3184,   3278,   3375,   3474,\n    3574,   3677,   3782,   3888,\n    3997,   4108,   4221,   4337,\n    4454,   4574,   4696,   4820,\n    4946,   5075,   5206,   5340,\n    5475,   5614,   5754,   5897,\n    6043,   6191,   6341,   6494,\n    6650,   6808,   6969,   7133,\n    7299,   7468,   7639,   7814,\n    7991,   8171,   8353,   8539,\n    8727,   8919,   9113,   9310,\n    9510,   9713,   9920,  10129,\n   10341,  10556,  10775,  10996,\n   11221,  11449,  11680,  11915,\n   12152,  12393,  12638,  12885,\n   13137,  13391,  13649,  13910,\n   14175,  14444,  14715,  14991,\n   15270,  15553,  15839,  16129,\n   16423,  16720,  17021,  17326,\n   17635,  17947,  18264,  18584,\n   18908,  19236,  19568,  19905,\n   20245,  20589,  20937,  21289,\n   21646,  22007,  22371,  22740,\n   23114,  23491,  23873,  24259,\n   24650,  25045,  25444,  25848,\n   26256,  26668,  27086,  27507,\n   27934,  28365,  28800,  29240,\n   29685,  30135,  30589,  31049,\n   31512,  31981,  32455,  32933,\n   33417,  33905,  34399,  34897,\n   35400,  35909,  36422,  36941,\n   37465,  37994,  38528,  39068,\n   39612,  40162,  40718,  41278,\n   41844,  42416,  42993,  43575,\n   44163,  44756,  45355,  45960,\n   46570,  47186,  47807,  48435,\n   49068,  49706,  50351,  51001,\n   51657,  52319,  52987,  53661,\n   54341,  55027,  55719,  56417,\n   57121,  57832,  58548,  59271,\n   60000,\n};\nconst uint16_t FLASHMEM lut_gravity[] = {\n   33140,  31065,  29132,  27330,\n   25650,  24084,  22621,  21256,\n   19981,  18790,  17676,  16634,\n   15660,  14748,  13894,  13094,\n   12344,  11642,  10983,  10365,\n    9785,   9240,   8729,   8249,\n    7797,   7373,   6973,   6598,\n    6244,   5912,   5598,   5303,\n    5025,   4763,   4516,   4283,\n    4063,   3855,   3659,   3474,\n    3299,   3134,   2978,   2830,\n    2690,   2558,   2433,   2315,\n    2203,   2097,   1996,   1901,\n    1811,   1725,   1644,   1567,\n    1494,   1425,   1359,   1297,\n    1237,   1181,   1127,   1077,\n    1028,    982,    938,    897,\n     857,    820,    784,    750,\n     717,    686,    657,    629,\n     602,    576,    552,    529,\n     506,    485,    465,    446,\n     427,    410,    393,    377,\n     362,    347,    333,    320,\n     307,    295,    283,    272,\n     261,    251,    241,    232,\n     223,    214,    206,    198,\n     191,    183,    176,    170,\n     163,    157,    151,    146,\n     140,    135,    130,    125,\n     121,    116,    112,    108,\n     104,    100,     97,     93,\n      90,     87,     84,     81,\n      78,     75,     73,     70,\n      68,     65,     63,     61,\n      59,     57,     55,     53,\n      51,     50,     48,     46,\n      45,     43,     42,     40,\n      39,     38,     37,     35,\n      34,     33,     32,     31,\n      30,     29,     28,     27,\n      26,     25,     25,     24,\n      23,     22,     22,     21,\n      20,     20,     19,     19,\n      18,     17,     17,     16,\n      16,     15,     15,     14,\n      14,     14,     13,     13,\n      12,     12,     12,     11,\n      11,     11,     10,     10,\n      10,      9,      9,      9,\n       9,      8,      8,      8,\n       8,      7,      7,      7,\n       7,      7,      6,      6,\n       6,      6,      6,      5,\n       5,      5,      5,      5,\n       5,      5,      4,      4,\n       4,      4,      4,      4,\n       4,      4,      3,      3,\n       3,      3,      3,      3,\n       3,      3,      3,      3,\n       3,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      1,      1,\n       1,\n};\nconst uint16_t FLASHMEM lut_env_linear[] = {\n       0,    257,    514,    771,\n    1028,   1285,   1542,   1799,\n    2056,   2313,   2570,   2827,\n    3084,   3341,   3598,   3855,\n    4112,   4369,   4626,   4883,\n    5140,   5397,   5654,   5911,\n    6168,   6425,   6682,   6939,\n    7196,   7453,   7710,   7967,\n    8224,   8481,   8738,   8995,\n    9252,   9509,   9766,  10023,\n   10280,  10537,  10794,  11051,\n   11308,  11565,  11822,  12079,\n   12336,  12593,  12850,  13107,\n   13364,  13621,  13878,  14135,\n   14392,  14649,  14906,  15163,\n   15420,  15677,  15934,  16191,\n   16448,  16705,  16962,  17219,\n   17476,  17733,  17990,  18247,\n   18504,  18761,  19018,  19275,\n   19532,  19789,  20046,  20303,\n   20560,  20817,  21074,  21331,\n   21588,  21845,  22102,  22359,\n   22616,  22873,  23130,  23387,\n   23644,  23901,  24158,  24415,\n   24672,  24929,  25186,  25443,\n   25700,  25957,  26214,  26471,\n   26728,  26985,  27242,  27499,\n   27756,  28013,  28270,  28527,\n   28784,  29041,  29298,  29555,\n   29812,  30069,  30326,  30583,\n   30840,  31097,  31354,  31611,\n   31868,  32125,  32382,  32639,\n   32896,  33153,  33410,  33667,\n   33924,  34181,  34438,  34695,\n   34952,  35209,  35466,  35723,\n   35980,  36237,  36494,  36751,\n   37008,  37265,  37522,  37779,\n   38036,  38293,  38550,  38807,\n   39064,  39321,  39578,  39835,\n   40092,  40349,  40606,  40863,\n   41120,  41377,  41634,  41891,\n   42148,  42405,  42662,  42919,\n   43176,  43433,  43690,  43947,\n   44204,  44461,  44718,  44975,\n   45232,  45489,  45746,  46003,\n   46260,  46517,  46774,  47031,\n   47288,  47545,  47802,  48059,\n   48316,  48573,  48830,  49087,\n   49344,  49601,  49858,  50115,\n   50372,  50629,  50886,  51143,\n   51400,  51657,  51914,  52171,\n   52428,  52685,  52942,  53199,\n   53456,  53713,  53970,  54227,\n   54484,  54741,  54998,  55255,\n   55512,  55769,  56026,  56283,\n   56540,  56797,  57054,  57311,\n   57568,  57825,  58082,  58339,\n   58596,  58853,  59110,  59367,\n   59624,  59881,  60138,  60395,\n   60652,  60909,  61166,  61423,\n   61680,  61937,  62194,  62451,\n   62708,  62965,  63222,  63479,\n   63736,  63993,  64250,  64507,\n   64764,  65021,  65278,  65535,\n   65535,\n};\nconst uint16_t FLASHMEM lut_env_expo[] = {\n       0,   1035,   2054,   3057,\n    4045,   5018,   5975,   6918,\n    7846,   8760,   9659,  10545,\n   11416,  12275,  13120,  13952,\n   14771,  15577,  16371,  17152,\n   17921,  18679,  19425,  20159,\n   20881,  21593,  22294,  22983,\n   23662,  24331,  24989,  25637,\n   26274,  26902,  27520,  28129,\n   28728,  29318,  29899,  30471,\n   31034,  31588,  32133,  32670,\n   33199,  33720,  34232,  34737,\n   35233,  35722,  36204,  36678,\n   37145,  37604,  38056,  38502,\n   38940,  39371,  39796,  40215,\n   40626,  41032,  41431,  41824,\n   42211,  42592,  42967,  43336,\n   43699,  44057,  44409,  44756,\n   45097,  45434,  45764,  46090,\n   46411,  46727,  47037,  47344,\n   47645,  47941,  48233,  48521,\n   48804,  49083,  49357,  49627,\n   49893,  50155,  50412,  50666,\n   50916,  51162,  51404,  51642,\n   51877,  52108,  52335,  52559,\n   52780,  52997,  53210,  53421,\n   53628,  53831,  54032,  54230,\n   54424,  54616,  54804,  54990,\n   55173,  55353,  55530,  55704,\n   55876,  56045,  56211,  56375,\n   56536,  56695,  56851,  57005,\n   57157,  57306,  57453,  57597,\n   57740,  57880,  58018,  58153,\n   58287,  58419,  58548,  58676,\n   58801,  58925,  59047,  59167,\n   59285,  59401,  59515,  59628,\n   59739,  59848,  59955,  60061,\n   60165,  60267,  60368,  60468,\n   60566,  60662,  60757,  60850,\n   60942,  61032,  61121,  61209,\n   61295,  61380,  61464,  61546,\n   61628,  61707,  61786,  61863,\n   61939,  62014,  62088,  62161,\n   62233,  62303,  62372,  62441,\n   62508,  62574,  62639,  62703,\n   62767,  62829,  62890,  62950,\n   63010,  63068,  63125,  63182,\n   63238,  63293,  63347,  63400,\n   63452,  63504,  63554,  63604,\n   63654,  63702,  63750,  63797,\n   63843,  63888,  63933,  63977,\n   64021,  64063,  64105,  64147,\n   64188,  64228,  64267,  64306,\n   64344,  64382,  64419,  64456,\n   64492,  64527,  64562,  64596,\n   64630,  64664,  64696,  64729,\n   64760,  64792,  64822,  64853,\n   64883,  64912,  64941,  64969,\n   64997,  65025,  65052,  65079,\n   65105,  65131,  65157,  65182,\n   65206,  65231,  65255,  65278,\n   65302,  65324,  65347,  65369,\n   65391,  65412,  65434,  65454,\n   65475,  65495,  65515,  65535,\n   65535,\n};\nconst uint16_t FLASHMEM lut_env_quartic[] = {\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      1,      1,\n       2,      3,      4,      5,\n       6,      8,      9,     11,\n      14,     16,     19,     22,\n      25,     29,     33,     37,\n      42,     48,     53,     59,\n      66,     73,     81,     89,\n      98,    107,    117,    128,\n     139,    151,    164,    177,\n     191,    206,    222,    238,\n     256,    274,    293,    313,\n     334,    355,    378,    402,\n     427,    453,    480,    508,\n     537,    567,    599,    631,\n     665,    700,    737,    775,\n     814,    854,    896,    939,\n     984,   1030,   1077,   1127,\n    1177,   1230,   1283,   1339,\n    1396,   1455,   1515,   1577,\n    1641,   1707,   1775,   1844,\n    1916,   1989,   2064,   2141,\n    2220,   2302,   2385,   2470,\n    2557,   2647,   2739,   2833,\n    2929,   3027,   3128,   3231,\n    3336,   3444,   3554,   3667,\n    3782,   3899,   4019,   4142,\n    4267,   4395,   4525,   4658,\n    4794,   4933,   5074,   5218,\n    5365,   5515,   5668,   5824,\n    5983,   6144,   6309,   6477,\n    6648,   6822,   6999,   7179,\n    7363,   7550,   7740,   7933,\n    8130,   8330,   8534,   8741,\n    8951,   9165,   9383,   9604,\n    9829,  10057,  10289,  10525,\n   10765,  11008,  11255,  11507,\n   11761,  12020,  12283,  12550,\n   12821,  13096,  13375,  13658,\n   13945,  14237,  14532,  14832,\n   15137,  15445,  15758,  16076,\n   16397,  16724,  17054,  17390,\n   17730,  18074,  18423,  18777,\n   19136,  19499,  19868,  20241,\n   20618,  21001,  21389,  21781,\n   22179,  22582,  22990,  23403,\n   23821,  24244,  24672,  25106,\n   25545,  25990,  26440,  26895,\n   27355,  27821,  28293,  28770,\n   29253,  29742,  30236,  30735,\n   31241,  31752,  32270,  32793,\n   33321,  33856,  34397,  34944,\n   35497,  36056,  36621,  37192,\n   37769,  38353,  38943,  39539,\n   40142,  40751,  41366,  41988,\n   42617,  43251,  43893,  44541,\n   45196,  45857,  46526,  47201,\n   47882,  48571,  49267,  49969,\n   50678,  51395,  52118,  52849,\n   53587,  54332,  55084,  55843,\n   56610,  57384,  58165,  58954,\n   59750,  60553,  61364,  62183,\n   63010,  63843,  64685,  65535,\n   65535,\n};\nconst uint16_t FLASHMEM lut_raised_cosine[] = {\n       0,      2,      9,     22,\n      39,     61,     88,    120,\n     157,    199,    246,    298,\n     354,    416,    482,    553,\n     629,    710,    796,    886,\n     982,   1082,   1186,   1296,\n    1410,   1530,   1653,   1782,\n    1915,   2053,   2195,   2342,\n    2494,   2650,   2811,   2976,\n    3146,   3320,   3498,   3681,\n    3869,   4060,   4256,   4457,\n    4661,   4870,   5083,   5300,\n    5522,   5747,   5977,   6210,\n    6448,   6689,   6935,   7184,\n    7437,   7694,   7955,   8220,\n    8488,   8760,   9035,   9314,\n    9597,   9883,  10172,  10465,\n   10762,  11061,  11364,  11670,\n   11980,  12292,  12607,  12926,\n   13247,  13572,  13899,  14229,\n   14562,  14898,  15236,  15578,\n   15921,  16267,  16616,  16967,\n   17321,  17676,  18034,  18395,\n   18757,  19122,  19488,  19857,\n   20227,  20600,  20974,  21350,\n   21728,  22107,  22488,  22871,\n   23255,  23641,  24027,  24416,\n   24805,  25196,  25588,  25980,\n   26374,  26769,  27165,  27562,\n   27959,  28357,  28756,  29155,\n   29555,  29956,  30356,  30758,\n   31159,  31561,  31963,  32365,\n   32767,  33169,  33571,  33973,\n   34375,  34776,  35178,  35578,\n   35979,  36379,  36778,  37177,\n   37575,  37972,  38369,  38765,\n   39160,  39554,  39946,  40338,\n   40729,  41118,  41507,  41893,\n   42279,  42663,  43046,  43427,\n   43806,  44184,  44560,  44934,\n   45307,  45677,  46046,  46412,\n   46777,  47139,  47500,  47858,\n   48213,  48567,  48918,  49267,\n   49613,  49956,  50298,  50636,\n   50972,  51305,  51635,  51962,\n   52287,  52608,  52927,  53242,\n   53554,  53864,  54170,  54473,\n   54772,  55069,  55362,  55651,\n   55937,  56220,  56499,  56774,\n   57046,  57314,  57579,  57840,\n   58097,  58350,  58599,  58845,\n   59086,  59324,  59557,  59787,\n   60012,  60234,  60451,  60664,\n   60873,  61077,  61278,  61474,\n   61665,  61853,  62036,  62214,\n   62388,  62558,  62723,  62884,\n   63040,  63192,  63339,  63481,\n   63619,  63752,  63881,  64004,\n   64124,  64238,  64348,  64452,\n   64552,  64648,  64738,  64824,\n   64905,  64981,  65052,  65118,\n   65180,  65236,  65288,  65335,\n   65377,  65414,  65446,  65473,\n   65495,  65512,  65525,  65532,\n   65532,\n};\nconst uint16_t FLASHMEM lut_svf_cutoff[] = {\n      35,     37,     39,     41,\n      44,     46,     49,     52,\n      55,     58,     62,     66,\n      70,     74,     78,     83,\n      88,     93,     99,    105,\n     111,    117,    124,    132,\n     140,    148,    157,    166,\n     176,    187,    198,    210,\n     222,    235,    249,    264,\n     280,    297,    314,    333,\n     353,    374,    396,    420,\n     445,    471,    499,    529,\n     561,    594,    629,    667,\n     706,    748,    793,    840,\n     890,    943,    999,   1059,\n    1122,   1188,   1259,   1334,\n    1413,   1497,   1586,   1681,\n    1781,   1886,   1999,   2117,\n    2243,   2377,   2518,   2668,\n    2826,   2994,   3172,   3361,\n    3560,   3772,   3996,   4233,\n    4485,   4751,   5033,   5332,\n    5648,   5983,   6337,   6713,\n    7111,   7532,   7978,   8449,\n    8949,   9477,  10037,  10628,\n   11254,  11916,  12616,  13356,\n   14138,  14964,  15837,  16758,\n   17730,  18756,  19837,  20975,\n   22174,  23435,  24761,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,\n};\nconst uint16_t FLASHMEM lut_svf_damp[] = {\n   65534,  49166,  46069,  43993,\n   42386,  41058,  39917,  38910,\n   38007,  37184,  36427,  35726,\n   35070,  34454,  33873,  33322,\n   32798,  32299,  31820,  31361,\n   30920,  30496,  30086,  29690,\n   29306,  28935,  28574,  28224,\n   27883,  27551,  27228,  26912,\n   26605,  26304,  26010,  25723,\n   25441,  25166,  24896,  24631,\n   24371,  24116,  23866,  23620,\n   23379,  23141,  22908,  22678,\n   22452,  22229,  22010,  21794,\n   21581,  21371,  21164,  20960,\n   20759,  20560,  20365,  20171,\n   19980,  19791,  19605,  19421,\n   19239,  19059,  18882,  18706,\n   18532,  18360,  18190,  18022,\n   17856,  17691,  17528,  17367,\n   17207,  17049,  16892,  16737,\n   16583,  16431,  16280,  16131,\n   15982,  15836,  15690,  15546,\n   15403,  15261,  15120,  14981,\n   14843,  14705,  14569,  14434,\n   14300,  14167,  14036,  13905,\n   13775,  13646,  13518,  13391,\n   13265,  13140,  13015,  12892,\n   12769,  12648,  12527,  12407,\n   12287,  12169,  12051,  11934,\n   11818,  11703,  11588,  11474,\n   11361,  11249,  11137,  11026,\n   10915,  10805,  10696,  10588,\n   10480,  10373,  10266,  10160,\n   10055,   9950,   9846,   9742,\n    9639,   9537,   9435,   9333,\n    9233,   9132,   9033,   8933,\n    8835,   8737,   8639,   8542,\n    8445,   8349,   8253,   8158,\n    8063,   7969,   7875,   7782,\n    7689,   7596,   7504,   7413,\n    7321,   7231,   7140,   7050,\n    6961,   6872,   6783,   6695,\n    6607,   6519,   6432,   6346,\n    6259,   6173,   6088,   6003,\n    5918,   5833,   5749,   5665,\n    5582,   5499,   5416,   5334,\n    5251,   5170,   5088,   5007,\n    4926,   4846,   4766,   4686,\n    4607,   4527,   4449,   4370,\n    4292,   4214,   4136,   4059,\n    3982,   3905,   3828,   3752,\n    3676,   3601,   3525,   3450,\n    3375,   3301,   3226,   3152,\n    3078,   3005,   2932,   2859,\n    2786,   2713,   2641,   2569,\n    2497,   2426,   2355,   2284,\n    2213,   2142,   2072,   2002,\n    1932,   1862,   1793,   1724,\n    1655,   1586,   1518,   1449,\n    1381,   1313,   1246,   1178,\n    1111,   1044,    977,    911,\n     844,    778,    712,    647,\n     581,    516,    450,    385,\n     321,    256,    192,    127,\n      63,\n};\nconst uint16_t FLASHMEM lut_svf_scale[] = {\n   32767,  28381,  27473,  26846,\n   26352,  25936,  25573,  25248,\n   24953,  24682,  24429,  24193,\n   23970,  23759,  23557,  23365,\n   23181,  23003,  22832,  22667,\n   22507,  22352,  22201,  22055,\n   21912,  21772,  21636,  21503,\n   21373,  21245,  21120,  20998,\n   20877,  20759,  20643,  20528,\n   20416,  20305,  20196,  20088,\n   19982,  19877,  19774,  19672,\n   19571,  19471,  19373,  19275,\n   19179,  19083,  18989,  18896,\n   18803,  18712,  18621,  18531,\n   18442,  18353,  18266,  18179,\n   18092,  18007,  17922,  17837,\n   17754,  17671,  17588,  17506,\n   17424,  17343,  17263,  17183,\n   17103,  17024,  16946,  16868,\n   16790,  16713,  16636,  16559,\n   16483,  16407,  16331,  16256,\n   16181,  16107,  16033,  15959,\n   15885,  15812,  15739,  15666,\n   15594,  15522,  15450,  15378,\n   15306,  15235,  15164,  15093,\n   15022,  14952,  14882,  14812,\n   14742,  14672,  14602,  14533,\n   14464,  14395,  14326,  14257,\n   14188,  14120,  14051,  13983,\n   13915,  13847,  13779,  13711,\n   13643,  13575,  13508,  13440,\n   13372,  13305,  13238,  13170,\n   13103,  13036,  12969,  12902,\n   12835,  12768,  12701,  12634,\n   12567,  12500,  12433,  12366,\n   12299,  12232,  12165,  12098,\n   12031,  11964,  11897,  11830,\n   11762,  11695,  11628,  11561,\n   11493,  11426,  11359,  11291,\n   11223,  11156,  11088,  11020,\n   10952,  10884,  10816,  10747,\n   10679,  10610,  10542,  10473,\n   10404,  10335,  10266,  10196,\n   10127,  10057,   9987,   9917,\n    9846,   9776,   9705,   9634,\n    9563,   9491,   9420,   9348,\n    9276,   9203,   9130,   9057,\n    8984,   8910,   8836,   8762,\n    8687,   8613,   8537,   8461,\n    8385,   8309,   8232,   8155,\n    8077,   7998,   7920,   7841,\n    7761,   7680,   7600,   7518,\n    7436,   7354,   7270,   7187,\n    7102,   7017,   6931,   6844,\n    6756,   6668,   6578,   6488,\n    6397,   6305,   6211,   6117,\n    6021,   5925,   5827,   5727,\n    5626,   5524,   5420,   5315,\n    5207,   5098,   4987,   4873,\n    4758,   4639,   4518,   4394,\n    4267,   4137,   4002,   3864,\n    3720,   3571,   3417,   3255,\n    3086,   2907,   2717,   2514,\n    2293,   2049,   1774,   1447,\n    1022,\n};\n\n\nconst uint16_t* lookup_table_table[] = {\n  lut_delay_times,\n  lut_gravity,\n  lut_env_linear,\n  lut_env_expo,\n  lut_env_quartic,\n  lut_raised_cosine,\n  lut_svf_cutoff,\n  lut_svf_damp,\n  lut_svf_scale,\n};\n\nconst uint32_t FLASHMEM lut_lfo_increments[] = {\n    2796,   2891,   2989,   3090,\n    3195,   3303,   3415,   3531,\n    3651,   3775,   3903,   4036,\n    4172,   4314,   4460,   4612,\n    4768,   4930,   5097,   5270,\n    5449,   5634,   5825,   6023,\n    6227,   6438,   6657,   6883,\n    7116,   7357,   7607,   7865,\n    8132,   8408,   8693,   8988,\n    9293,   9608,   9934,  10271,\n   10620,  10980,  11353,  11738,\n   12136,  12548,  12974,  13414,\n   13869,  14339,  14826,  15329,\n   15849,  16387,  16943,  17517,\n   18112,  18726,  19361,  20018,\n   20698,  21400,  22126,  22876,\n   23652,  24455,  25285,  26142,\n   27029,  27946,  28894,  29875,\n   30888,  31936,  33020,  34140,\n   35298,  36496,  37734,  39014,\n   40338,  41706,  43121,  44584,\n   46097,  47660,  49277,  50949,\n   52678,  54465,  56313,  58223,\n   60198,  62241,  64352,  66535,\n   68793,  71126,  73539,  76034,\n   78614,  81281,  84039,  86890,\n   89837,  92885,  96036,  99295,\n  102663, 106146, 109747, 113471,\n  117320, 121300, 125415, 129670,\n  134069, 138618, 143321, 148183,\n  153210, 158408, 163782, 169338,\n  175083, 181023, 187165, 193514,\n  200079, 206867, 213885, 221142,\n  228644, 236401, 244421, 252713,\n  261287, 270151, 279316, 288792,\n  298590, 308720, 319193, 330022,\n  341218, 352794, 364763, 377138,\n  389933, 403162, 416839, 430981,\n  445602, 460719, 476350, 492510,\n  509219, 526495, 544356, 562824,\n  581918, 601660, 622072, 643176,\n  664997, 687557, 710883, 735000,\n  759936, 785717, 812373, 839933,\n  868429, 897891, 928352, 959847,\n  992411, 1026079, 1060890, 1096881,\n  1134094, 1172569, 1212349, 1253479,\n  1296004, 1339972, 1385431, 1432433,\n  1481029, 1531274, 1583224, 1636936,\n  1692470, 1749888, 1809255, 1870635,\n  1934097, 1999713, 2067555, 2137698,\n  2210221, 2285204, 2362732, 2442889,\n  2525766, 2611454, 2700050, 2791651,\n  2886359, 2984281, 3085525, 3190204,\n  3298434, 3410335, 3526034, 3645657,\n  3769338, 3897216, 4029432, 4166133,\n  4307472, 4453606, 4604698, 4760916,\n  4922433, 5089430, 5262093, 5440613,\n  5625190, 5816028, 6013341, 6217348,\n  6428276, 6646360, 6871842, 7104975,\n  7346016, 7595235, 7852908, 8119324,\n  8394778, 8679577, 8974038, 9278488,\n  9593267, 9918726, 10255226, 10603142,\n  10962861, 11334784, 11719324, 12116911,\n  12527986, 12953006, 13392446, 13846795,\n  14316557,\n};\nconst uint32_t FLASHMEM lut_env_increments[] = {\n  178956970, 162203921, 147263779, 133914742,\n  121965179, 111249129, 101622525, 92960022,\n  85152324, 78103929, 71731214, 65960813,\n  60728233, 55976673, 51656020, 47721976,\n  44135321, 40861270, 37868923, 35130786,\n  32622357, 30321772, 28209484, 26268003,\n  24481648, 22836346, 21319451, 19919582,\n  18626484, 17430905, 16324491, 15299685,\n  14349647, 13468178, 12649652, 11888959,\n  11181454, 10522909, 9909470, 9337624,\n  8804164, 8306157, 7840925, 7406012,\n  6999170, 6618338, 6261623, 5927288,\n  5613733, 5319488, 5043200, 4783621,\n  4539601, 4310076, 4094068, 3890668,\n  3699040, 3518407, 3348049, 3187303,\n  3035548, 2892213, 2756766, 2628711,\n  2507588, 2392971, 2284460, 2181685,\n  2084301, 1991984, 1904435, 1821372,\n  1742534, 1667676, 1596567, 1528995,\n  1464759, 1403670, 1345553, 1290243,\n  1237585, 1187435, 1139655, 1094119,\n  1050706, 1009303, 969803, 932108,\n  896122, 861758, 828932, 797565,\n  767584, 738918, 711503, 685274,\n  660174, 636148, 613143, 591109,\n  569999, 549770, 530379, 511787,\n  493956, 476850, 460436, 444683,\n  429558, 415035, 401085, 387683,\n  374804, 362424, 350523, 339078,\n  328069, 317479, 307287, 297478,\n  288035, 278942, 270184, 261748,\n  253620, 245786, 238236, 230956,\n  223936, 217166, 210635, 204334,\n  198253, 192383, 186717, 181245,\n  175961, 170858, 165927, 161162,\n  156558, 152107, 147805, 143644,\n  139621, 135729, 131964, 128321,\n  124796, 121384, 118081, 114883,\n  111787, 108788, 105883, 103069,\n  100343,  97700,  95139,  92657,\n   90250,  87917,  85654,  83459,\n   81330,  79265,  77261,  75316,\n   73428,  71596,  69817,  68090,\n   66413,  64784,  63202,  61666,\n   60173,  58722,  57312,  55942,\n   54610,  53315,  52056,  50832,\n   49641,  48484,  47357,  46262,\n   45196,  44159,  43149,  42167,\n   41211,  40280,  39374,  38492,\n   37632,  36796,  35981,  35187,\n   34414,  33660,  32926,  32211,\n   31513,  30834,  30172,  29526,\n   28896,  28282,  27684,  27100,\n   26531,  25975,  25434,  24905,\n   24390,  23886,  23395,  22916,\n   22449,  21992,  21546,  21111,\n   20687,  20272,  19867,  19471,\n   19085,  18708,  18339,  17979,\n   17627,  17283,  16947,  16619,\n   16298,  15985,  15678,  15378,\n   15085,  14799,  14519,  14245,\n   13977,  13716,  13459,  13209,\n   12964,  12724,  12490,  12260,\n   12036,  11816,  11601,  11390,\n   11184,\n};\nconst uint32_t FLASHMEM lut_oscillator_increments[] = {\n  594570139, 598878640, 603218361, 607589530,\n  611992374, 616427123, 620894008, 625393262,\n  629925120, 634489817, 639087591, 643718683,\n  648383334, 653081787, 657814287, 662581081,\n  667382416, 672218544, 677089717, 681996188,\n  686938214, 691916051, 696929960, 701980202,\n  707067040, 712190739, 717351567, 722549792,\n  727785686, 733059521, 738371572, 743722117,\n  749111434, 754539804, 760007511, 765514839,\n  771062075, 776649508, 782277431, 787946136,\n  793655918, 799407076, 805199909, 811034720,\n  816911812, 822831491, 828794068, 834799851,\n  840849155, 846942294, 853079587, 859261354,\n  865487916, 871759598, 878076727, 884439633,\n  890848647, 897304104, 903806339, 910355693,\n  916952505, 923597121, 930289887, 937031151,\n  943821265, 950660583, 957549461, 964488259,\n  971477339, 978517064, 985607802, 992749922,\n  999943798, 1007189803, 1014488315, 1021839716,\n  1029244387, 1036702717, 1044215092, 1051781905,\n  1059403550, 1067080425, 1074812930, 1082601467,\n  1090446444, 1098348268, 1106307352, 1114324111,\n  1122398963, 1130532329, 1138724632, 1146976300,\n  1155287763, 1163659455, 1172091811, 1180585271,\n  1189140279,\n};\n\n\nconst uint32_t* lookup_table_32_table[] = {\n  lut_lfo_increments,\n  lut_env_increments,\n  lut_oscillator_increments,\n};\n\nconst uint8_t FLASHMEM wav_digits[] = {\n     127,     74,     21,    224,\n     171,    118,     65,     12,\n     215,    162,    109,     56,\n     252,     49,    102,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     120,    173,     29,    232,\n     179,    126,     73,     20,\n     223,    170,    138,    191,\n     244,    214,     94,    147,\n     200,      2,    205,    103,\n     156,    209,      6,     59,\n     112,     90,    218,    240,\n     187,    134,     81,     28,\n     231,     77,    125,     72,\n      19,    222,     86,    116,\n      63,    245,     42,     95,\n     148,    201,    254,     51,\n     151,     98,     45,    248,\n      60,    142,    166,    219,\n     239,     69,    122,    175,\n      27,     25,     78,    131,\n     184,    237,     34,     87,\n     140,    193,    246,     43,\n      96,    149,    202,      0,\n     203,    150,     97,     44,\n     247,    194,    141,     88,\n      35,    238,    185,    132,\n      79,     26,    229,    176,\n     123,    185,    238,     35,\n      88,    114,    194,      8,\n     211,    158,    105,     52,\n       0,    202,    149,    159,\n      43,      9,     62,    140,\n      87,    221,    237,     71,\n     124,     78,    230,     27,\n      80,    133,     69,    239,\n      36,    166,    142,     60,\n     248,    210,     98,    104,\n      51,      1,    201,    107,\n      95,    213,     10,    192,\n     116,     86,    222,    236,\n     183,    125,     77,    231,\n     227,     81,    134,     68,\n     240,    218,     90,    112,\n     196,    249,    209,     99,\n     103,    205,    253,     55,\n     147,    161,     41,    244,\n      64,    138,     85,    223,\n     235,    182,    129,     76,\n     232,    226,     82,    120,\n     188,     14,    217,    164,\n     111,     58,      5,     47,\n     155,    153,     49,      3,\n      56,    146,    162,    215,\n     243,     65,    137,     84,\n     224,     21,     74,    128,\n     180,     22,     30,    172,\n     119,    189,     13,    216,\n      92,    110,     57,    251,\n     207,    101,    154,     48,\n     251,     57,    145,     92,\n     216,    242,     66,    136,\n      83,    225,    233,     75,\n     127,    181,    234,    224,\n      84,    118,    190,     12,\n      40,     93,    108,    198,\n       3,    206,    103,    101,\n     208,      5,    197,    111,\n     164,     38,     15,    188,\n     135,    172,     29,    232,\n      77,    127,    182,    234,\n     221,     87,    116,     64,\n     245,    215,     94,    108,\n      55,    253,    205,    152,\n     157,     44,      7,    196,\n     143,    165,     37,    240,\n      68,    121,     81,    227,\n      24,    178,    131,     72,\n      18,     35,    171,    139,\n     193,     11,     40,    161,\n     148,    201,      0,     50,\n     151,    157,    210,    249,\n      60,    113,     89,     36,\n      16,     69,    132,    173,\n      26,    230,     79,    125,\n     184,    236,    223,     86,\n     115,     63,    247,    213,\n      97,    104,    203,      0,\n     201,    106,     98,    209,\n     247,    194,    115,     90,\n     221,    239,     70,    123,\n      78,    228,    229,    176,\n     133,     71,    239,    220,\n     167,    143,     63,    245,\n     211,    159,    148,     54,\n       1,    202,    149,    159,\n      42,     11,    195,    114,\n      87,     34,     16,    186,\n     124,    176,     27,     25,\n      80,    120,    184,     17,\n      36,    166,    143,     62,\n     249,    210,    156,    149,\n      49,      1,     54,    148,\n     160,     42,    245,     63,\n     138,    168,     32,     18,\n     183,    130,    178,     24,\n      29,    172,    132,     70,\n     241,     37,    164,    142,\n      59,    249,    209,     98,\n     102,    205,      2,    200,\n     147,    160,     41,    244,\n      65,    139,    170,     32,\n      21,    183,    127,    179,\n      21,     28,     82,    121,\n     190,     15,    217,     90,\n     110,    196,      5,     47,\n     155,    153,     49,    252,\n      57,    144,    160,     40,\n     242,     66,    138,    170,\n     225,    233,     73,    129,\n      75,    233,     30,    172,\n     137,    189,     12,     37,\n     161,    144,     57,      4,\n      48,    154,    154,    207,\n     249,     56,    145,     92,\n     217,    243,     67,    136,\n      83,    224,    233,     75,\n     127,    181,     21,     31,\n      84,    118,    191,     12,\n      40,     93,    108,    199,\n     252,    207,    100,    101,\n      47,      5,    196,    110,\n      91,    216,    241,    188,\n     121,     83,    226,     23,\n     179,    126,    183,     21,\n     223,     84,    116,    191,\n     244,    212,     95,    108,\n      54,    255,    204,    152,\n     157,     46,      6,     59,\n     112,     91,    218,     15,\n     185,    123,     80,     28,\n      26,    176,    131,     72,\n      19,     33,    169,    139,\n      63,    245,    212,     94,\n     148,     52,    253,    205,\n     150,    159,     47,      7,\n      60,    142,     89,    219,\n     239,    186,    122,     80,\n      27,     25,     78,    124,\n      71,    237,    221,    168,\n     141,     63,    246,     43,\n     157,    151,     53,      1,\n      54,    151,     97,    210,\n     245,     61,    114,     90,\n     222,    239,    185,    122,\n      78,    228,    231,     77,\n     123,     70,    239,    220,\n      88,    115,    193,     10,\n      44,     96,    107,    202,\n     255,    202,    106,    159,\n      42,      9,    193,    115,\n      86,    221,     18,    185,\n     124,    177,     24,     27,\n      80,    120,    184,     18,\n     219,     91,    115,     60,\n     250,    209,     99,    151,\n      49,      3,    201,    148,\n     161,     42,    245,     63,\n     116,    169,     32,     17,\n     182,    125,    178,     24,\n      28,     81,    134,     68,\n     240,    218,     90,    113,\n     196,      6,    209,     99,\n     103,     50,      2,     55,\n     146,    160,    214,    245,\n      65,    117,     84,    222,\n     235,     73,    129,    179,\n      23,     29,    173,    120,\n      67,     14,     38,    164,\n     144,     59,    248,    211,\n     102,    102,     48,      2,\n     198,    108,     92,    213,\n     242,     65,    118,     84,\n     224,    235,     72,    129,\n     181,     23,     31,    173,\n     137,     67,     13,     37,\n     160,    146,     56,    251,\n      48,    154,    154,     48,\n     251,    198,    111,     93,\n      39,     12,    188,    119,\n      83,     30,     23,    181,\n     129,     75,    234,     31,\n     171,    136,     65,    242,\n     214,     92,    146,     58,\n     254,    207,    153,    153,\n      44,      7,    197,    144,\n     164,     38,     14,    189,\n     121,     82,    227,    233,\n      77,    127,    182,     20,\n      32,    170,    117,    190,\n       9,     40,    163,    145,\n      53,    253,     50,    153,\n     157,     47,      6,     58,\n     142,    164,     37,    240,\n      69,    135,    172,     30,\n      26,    179,    131,     72,\n      19,     32,    168,    138,\n      63,    245,    213,     95,\n     106,    203,      3,     50,\n     104,     99,    211,    249,\n      62,    141,    165,     37,\n      16,     69,    122,     81,\n     228,     25,    179,    128,\n      70,     19,     35,     87,\n     112,    194,      8,    212,\n      98,    107,    203,      0,\n      53,    148,    159,    211,\n     245,     62,    142,    165,\n      35,    239,     68,    134,\n     178,     27,     27,    176,\n     123,    184,     19,     34,\n     167,    114,    194,      8,\n      44,    158,    150,    203,\n     253,     54,    145,    157,\n     212,    247,     63,    140,\n     168,     35,     17,    187,\n     127,     79,    230,    228,\n      80,    122,     69,    236,\n     223,     90,    115,    194,\n       6,     47,    156,    104,\n     206,    253,     52,    149,\n     161,     43,     11,    192,\n     139,    169,     33,     19,\n     183,    124,     76,    230,\n     226,     81,    135,     70,\n     241,    218,     90,    112,\n     197,    249,    208,     97,\n     101,    205,      2,     55,\n     145,    163,     40,    244,\n      66,    137,    169,     34,\n      22,    181,    122,     72,\n     234,     29,    169,    131,\n      65,    241,     38,     91,\n     110,    196,    250,    209,\n     101,    102,     49,      2,\n     198,    111,     92,     40,\n      12,     65,    137,    171,\n     225,    232,     75,    128,\n      73,    235,    225,    173,\n     138,     64,    243,     39,\n      92,    110,    198,      4,\n     206,     97,     96,    203,\n     249,    198,    108,     95,\n     220,    240,     64,    138,\n     174,     28,     20,     75,\n     124,    182,     20,    226,\n      87,    118,     67,    247,\n     212,     95,    108,    198,\n       0,     50,    152,    101,\n     210,    251,     59,    146,\n     167,     36,     12,    189,\n     120,    173,     29,    232,\n     179,    128,     75,    234,\n     222,     84,    117,     64,\n     246,    212,     95,    108,\n      55,    252,    206,    100,\n      97,     46,      5,    192,\n     115,     90,     37,    240,\n      69,    135,     81,    225,\n     227,     79,    130,     74,\n     237,     32,    170,    136,\n     192,      9,     40,    160,\n     106,    200,      1,    205,\n     105,     98,     44,      6,\n      60,    142,     89,    219,\n     239,    186,    132,    174,\n      26,    231,     76,    126,\n     185,     19,     35,    169,\n     115,    195,     10,     40,\n     157,    151,     52,    255,\n      53,    149,    157,     44,\n     246,     63,    140,     88,\n     222,    236,     71,    123,\n      78,    229,     26,    176,\n     122,    187,     19,     35,\n     167,    115,    195,      9,\n      45,    158,    105,    203,\n     255,    202,    149,    159,\n      42,     11,    194,    114,\n     168,     35,     19,     71,\n     131,     78,    231,    231,\n      83,    121,    187,    239,\n     219,    167,    143,    193,\n       3,     41,    159,    151,\n      51,      1,     54,    149,\n     161,     43,    245,     63,\n     139,    169,     33,     19,\n      72,    128,    177,     27,\n      29,    174,    121,    187,\n      15,     37,    164,    141,\n      56,    250,    210,     99,\n     153,     48,      2,     52,\n     145,     95,    210,    247,\n      64,    118,     86,    223,\n      16,    176,    122,     76,\n      21,     28,    173,    134,\n      65,    245,    221,     88,\n     110,     57,    253,    216,\n      96,    103,     48,      1,\n     197,    110,     94,    211,\n     242,    191,    114,     82,\n     227,    234,    182,    123,\n      72,    235,    227,     82,\n     136,     67,    246,    221,\n      88,    108,     56,    249,\n      48,    154,    100,    204,\n     248,     56,    111,     93,\n     216,     12,    190,    118,\n     173,     29,     21,    180,\n     126,    180,    234,    226,\n      80,    116,     67,    246,\n     210,    162,    149,     61,\n       2,     57,    144,    155,\n     214,    252,     59,    106,\n      92,    216,      8,    182,\n     126,    175,     26,     19,\n      79,    120,    180,    238,\n     215,     81,    142,     71,\n     246,     45,    166,    147,\n     206,      7,    205,    100,\n      96,     46,      4,    197,\n     142,    161,     38,    240,\n      71,    130,    174,    225,\n     230,    178,    128,     74,\n      19,     35,    168,    117,\n     193,     10,     42,    160,\n     105,    202,      2,     51,\n     105,     98,     45,      6,\n     195,    143,    164,     38,\n     239,     71,    133,     82,\n     230,     24,    181,    130,\n     188,     17,    221,     82,\n     112,     60,    243,    214,\n     157,    145,     52,      3,\n      54,    150,     96,    210,\n       9,    193,    112,     89,\n      32,     23,    186,    134,\n     179,    229,    227,     77,\n     129,     78,    236,     38,\n     161,    114,    196,     12,\n     208,    105,    107,     50,\n       6,     55,    146,    157,\n     209,    243,    193,    119,\n      87,     32,     16,     71,\n     128,    179,     25,    229,\n      80,    133,     71,    239,\n      38,    165,    142,    199,\n       7,     45,    102,    151,\n      50,      3,     54,    150,\n      95,     46,    241,    196,\n     141,     84,     34,    237,\n     183,    126,    182,    225,\n      21,     89,    131,    191,\n     243,    219,    163,    114,\n      62,     10,    214,    159,\n     100,     52,      3,     51,\n     146,    165,    220,     14,\n      65,    125,    175,     32,\n      21,     73,    130,     74,\n      19,    224,    171,    123,\n     190,    241,    217,     90,\n     110,    197,    249,    210,\n     155,    152,     50,    253,\n      58,    109,     94,     40,\n      12,     65,    119,    173,\n     233,     28,     67,    119,\n     182,     21,    234,    191,\n     123,     79,      2,    208,\n     163,    144,    195,    244,\n      60,    108,    156,    206,\n       6,     56,    144,    161,\n     222,     12,     64,    113,\n      80,     23,    231,    164,\n     116,     67,     19,    226,\n      83,    133,    178,    252,\n      37,     85,    111,     60,\n       0,    205,    157,    100,\n     213,      1,     57,    108,\n      91,     45,    252,    182,\n     142,     90,     21,    233,\n      75,    136,    189,    231,\n      41,     86,    119,     65,\n       9,    215,     94,    151,\n     192,    250,     55,    152,\n     100,     33,    246,    207,\n     131,     82,     38,     11,\n      72,    118,    162,    239,\n      17,    177,    117,     75,\n      23,    220,     87,    131,\n     204,    252,     46,    163,\n     103,     36,     14,    195,\n     154,    101,    211,     14,\n      50,     96,    168,    209,\n     238,    191,    130,     88,\n      31,    230,     72,    143,\n     182,    228,     35,    160,\n     124,     49,      7,    218,\n     146,    105,    205,    241,\n      36,    102,    148,    209,\n     243,    197,    138,     93,\n      35,     23,     75,    117,\n     186,    224,    227,    161,\n     107,     72,      0,    204,\n     174,    143,    206,    231,\n      35,    109,    144,     52,\n     251,    205,    145,     96,\n     209,      5,     49,    126,\n     160,     33,    226,    171,\n     147,     92,      9,    239,\n     173,    142,    169,    253,\n      41,     80,    142,     58,\n       0,    219,    152,    150,\n     196,     12,     59,     98,\n     161,     35,    231,    208,\n     155,     89,     45,    233,\n      78,    109,    161,    233,\n      21,     80,    124,     67,\n       6,    220,     91,    133,\n     212,    232,     33,    101,\n      99,     34,    232,    218,\n     130,     81,     32,     11,\n      75,     97,    190,    211,\n      23,    178,    134,     68,\n      31,    230,     86,    137,\n     174,    254,     47,    164,\n      98,     47,     16,    194,\n     149,    108,     50,     10,\n      43,    123,    178,    208,\n     247,    183,    128,     94,\n      26,     23,     70,    108,\n     160,    231,     26,    169,\n     100,     91,     27,    201,\n     175,    105,    197,    247,\n      38,    115,    150,    206,\n     243,    204,    154,     84,\n      37,     10,     80,     97,\n     191,    234,     22,    185,\n     101,     80,      3,    240,\n     160,    117,    184,    225,\n      49,     79,    154,     59,\n       9,    196,    145,     98,\n     210,     11,     47,    121,\n     180,    223,    244,    175,\n     155,     73,      9,    229,\n     180,    128,    189,    252,\n      56,     69,    137,     70,\n       1,    220,    166,    110,\n     192,    236,     36,    116,\n     151,     46,    245,    222,\n     144,     66,     52,    249,\n     185,    126,    191,    249,\n      14,     65,    130,     65,\n      24,    215,    175,    138,\n     203,    230,     63,     79,\n     147,     50,     19,    210,\n     138,    116,     32,    255,\n      61,    125,    179,    194,\n       3,     77,    135,     90,\n      23,    238,    179,    133,\n     183,    249,     48,     90,\n     143,     55,     17,    246,\n     131,    121,     63,      4,\n      49,    121,    137,    203,\n       7,     56,    136,     83,\n      47,    233,     70,    114,\n     161,    241,     21,     70,\n     123,     75,     13,    252,\n     191,    127,     59,      8,\n      37,    115,    129,    223,\n      11,     53,    159,    109,\n      32,    240,     60,    126,\n     188,    201,     28,     66,\n     128,     92,      6,    249,\n     189,    115,     71,    235,\n      41,     74,    155,    205,\n     253,    215,    144,    101,\n      58,    255,     62,    120,\n     182,    199,      0,     62,\n     128,     76,      0,    245,\n     186,    134,    179,    237,\n      14,     69,    151,    178,\n     240,    208,    171,    125,\n      61,    251,     32,    117,\n     141,    194,     10,    203,\n     128,     65,     52,    231,\n     181,    136,    175,    208,\n       7,     90,    115,    182,\n      18,    236,    162,    116,\n      64,    246,     55,     77,\n     133,    203,    255,    216,\n     131,    123,     41,    238,\n     206,    147,    170,    216,\n      30,     81,    125,    168,\n      23,    231,    184,    135,\n     180,    227,     15,     71,\n     155,    176,    247,    222,\n     176,    120,     46,     19,\n     223,    156,    155,    201,\n       8,     52,    101,    167,\n      36,    246,    188,    117,\n     164,    238,      5,     89,\n     141,    176,     17,    241,\n     178,    109,     89,     28,\n     223,    162,    150,    207,\n     247,     60,    111,    154,\n      41,    252,    197,    109,\n     173,    201,     26,     83,\n     117,    170,     29,    230,\n     164,    102,     93,     26,\n     214,    168,    117,    188,\n     243,     35,     91,    110,\n      63,      5,    205,     98,\n     146,    196,     31,     47,\n      98,    170,    216,    254,\n     166,    152,     74,      8,\n     233,    181,    121,    183,\n     233,     43,     92,    143,\n      62,      8,     47,     86,\n     132,    218,    235,     60,\n     102,    144,    209,    243,\n     217,    148,     64,     48,\n     254,    176,    131,     83,\n     231,     19,     64,    133,\n      71,     17,     39,     93,\n     131,    211,    229,     36,\n     110,    155,    206,      9,\n     220,    143,    120,     58,\n     228,    207,    135,     95,\n     220,     24,     86,    115,\n     177,     27,     29,     68,\n     138,    171,    250,     50,\n      87,    156,    197,     15,\n     196,    133,    114,     44,\n     235,    196,    159,    104,\n     213,      3,     47,    122,\n     169,     34,     20,     77,\n     112,    160,    245,     10,\n      94,    151,    179,     20,\n     206,    189,    109,     38,\n      17,    221,    145,     98,\n     204,     11,     38,     98,\n     162,    213,      9,     55,\n     120,    186,    202,      0,\n      71,    105,    190,     26,\n     240,    178,    100,     88,\n      25,    203,    168,    123,\n      59,    240,     35,    106,\n     157,    204,      0,     63,\n      98,    180,    195,     31,\n      81,     97,    167,     33,\n     250,    171,    161,     83,\n      15,    241,    163,    115,\n      66,    249,     43,     86,\n     151,    199,    250,     39,\n     106,    141,    218,     21,\n      43,    126,    173,    215,\n     252,    162,    150,    116,\n       6,    254,    187,    140,\n      79,    236,     21,     95,\n     143,    188,     12,     32,\n      81,    130,    211,    236,\n      36,    113,    138,    204,\n     240,    220,    142,     67,\n      62,    230,    178,    133,\n      85,    226,     31,     70,\n     136,    183,     21,     23,\n      91,    157,    171,    228,\n      61,     78,    130,    195,\n      10,    214,    135,    122,\n      55,    238,    213,    157,\n      92,    216,      6,     79,\n     127,    173,     31,     16,\n      65,    147,    160,    252,\n      53,     70,    155,    185,\n      12,    193,    188,    114,\n      47,     23,    220,    151,\n     105,     47,      0,     48,\n     119,    167,     37,      8,\n      73,    106,    185,    251,\n      14,     89,    145,    176,\n      22,    203,    183,    107,\n      38,     29,    198,    175,\n      96,     52,    251,     57,\n     111,    159,     45,      1,\n      48,     98,    190,    204,\n       6,     80,    104,    167,\n      24,    242,    173,     97,\n      94,      5,    207,    184,\n     126,     61,    242,     34,\n     103,    150,    202,    248,\n      57,    122,    136,    196,\n      29,     46,     99,    175,\n      33,    252,    163,    152,\n      87,     15,    247,    160,\n     118,     66,    237,     42,\n      95,    137,    195,    241,\n      32,    115,    128,    221,\n      21,     38,    120,    150,\n      42,    231,    216,    150,\n      64,     55,    254,    169,\n     141,     72,    231,     28,\n      86,    134,    187,    233,\n      40,     75,    152,    213,\n     237,     62,    115,    158,\n      50,    238,    209,    141,\n      72,     63,    231,    207,\n     134,     80,    223,     20,\n      79,    121,    176,    225,\n      16,     64,    147,    174,\n     228,     55,     75,    134,\n      58,      9,    199,    132,\n     113,     38,    238,    217,\n     156,     89,    214,     13,\n      70,    118,    171,    217,\n      24,     88,    106,    167,\n     251,     15,     67,    142,\n      66,      1,    207,    188,\n     121,     46,     23,    192,\n     149,     96,    207,      4,\n      62,    111,    163,    209,\n       0,     80,     98,    190,\n     244,      6,     91,    118,\n      73,     25,    244,    187,\n      98,     81,     31,    200,\n     174,    104,    199,    254,\n      52,    100,    155,    201,\n      15,     41,    122,    182,\n     203,     30,     82,    127,\n      80,     17,    253,    161,\n     107,     88,      5,    239,\n     167,    112,    190,    247,\n      43,     93,    144,    193,\n     247,     33,    114,    143,\n     194,     23,     52,    106,\n      93,     54,    229,    169,\n     148,     67,     18,    229,\n     185,    123,    182,    232,\n      33,    170,    136,    184,\n     248,     56,     74,    134,\n     219,    239,     63,     99,\n     100,     62,    234,    215,\n     158,     85,     40,    253,\n     178,    133,    175,    225,\n     231,    179,    131,    176,\n     224,     48,     66,    159,\n     211,    231,     38,     93,\n      98,     38,     19,    221,\n     135,    108,     33,    244,\n     203,    141,    166,     36,\n     237,    184,    120,    168,\n     232,     11,     90,    144,\n     170,    253,     43,    168,\n     120,     46,     25,    219,\n     146,     97,     63,      9,\n     206,    151,    158,     45,\n     244,    192,    112,    175,\n     209,      3,     82,    104,\n     162,    235,     29,    179,\n     118,     86,     30,    210,\n     171,    120,     55,      1,\n     215,    158,    150,     54,\n     252,    203,    105,    150,\n     216,     25,     46,    124,\n     167,    214,     17,    190,\n     143,     67,     19,    236,\n     170,    126,     64,     21,\n     216,    164,    117,     53,\n      13,    215,     99,    158,\n     193,     19,     36,    122,\n     174,    220,    245,    202,\n     133,     91,     40,    234,\n     181,    131,     76,     25,\n     226,    172,    127,     78,\n       5,    220,     91,    134,\n     202,    235,     60,    115,\n     147,    207,    250,    196,\n     157,     85,     46,    246,\n      65,    119,    174,    221,\n      20,    181,    139,     71,\n      28,    230,     80,    143,\n     178,    254,     40,     80,\n     148,     57,     13,    218,\n     147,     99,    206,      0,\n      61,    107,    166,    215,\n     240,    180,    133,     89,\n      23,    235,     78,    115,\n     185,    231,     21,     80,\n     117,     74,      7,    223,\n     166,    145,    195,    252,\n      59,    109,    158,     49,\n     241,    200,    129,     80,\n      34,    243,     74,    124,\n     161,    237,     21,    181,\n     120,     64,     19,    228,\n      86,    142,    183,    253,\n      35,     85,    147,     49,\n      14,    223,    151,    108,\n      43,      1,     61,    100,\n     174,    219,    243,    186,\n     142,     84,     25,     20,\n      68,    139,    185,    230,\n      42,     86,    114,     75,\n      27,    216,    168,    106,\n     201,    249,     58,    111,\n     156,     44,    255,    194,\n     140,     88,    223,      7,\n      79,    118,    162,    239,\n      26,    180,    119,     88,\n      24,    213,    161,    117,\n      63,    240,     40,    163,\n     105,     49,      5,    205,\n     151,    154,    213,     10,\n      51,    122,    170,    218,\n     235,    178,    137,     86,\n      18,    227,    176,    125,\n     187,     16,    216,    171,\n     116,     63,      8,     40,\n     106,    157,    197,    242,\n      56,     99,     97,     46,\n     254,    203,    136,     80,\n      32,    234,    186,    132,\n      70,     28,    224,    182,\n     133,     71,    233,     43,\n      80,    131,    202,    252,\n      41,    156,    104,     60,\n     252,    201,    144,     96,\n      46,    244,    199,    135,\n      84,     42,    237,     69,\n     125,    187,    224,     23,\n      90,    141,    179,     16,\n      36,    164,    114,    195,\n       4,    208,    158,    109,\n      55,    243,    193,    145,\n      89,    214,     10,     56,\n     114,    175,    215,     22,\n      78,    124,    178,     24,\n     226,     83,    135,     70,\n      14,    223,    161,    123,\n      55,      5,    215,    103,\n     155,    200,      5,     52,\n     105,    162,    210,     10,\n     191,    117,     85,    220,\n      16,    182,    129,     73,\n      17,    235,    160,    122,\n      71,    245,     32,     95,\n     152,    199,    251,    208,\n     100,    103,     49,      3,\n      58,    105,    164,    214,\n     243,    187,    129,     94,\n      16,    234,    181,    121,\n     191,    239,     25,     82,\n     118,     64,     15,    222,\n     162,    145,    197,    253,\n      56,    103,    101,     52,\n     241,    205,    158,    163,\n     218,      4,     82,    127,\n     171,    224,    236,    177,\n     122,     67,     20,    225,\n      87,    129,    183,    240,\n     215,    164,    102,     53,\n      13,     50,     99,    144,\n     194,     15,     60,    110,\n      83,     32,    246,    183,\n     133,     80,    226,     16,\n      68,    128,     73,     28,\n     210,    165,    124,    185,\n     253,     57,     77,    153,\n     205,    252,    197,    155,\n     100,     36,    251,    199,\n     143,    173,    222,    241,\n     185,    141,     92,     19,\n     230,     71,    143,    163,\n     252,     38,     84,    117,\n      56,      9,    211,    168,\n     104,     53,      3,     53,\n     150,    103,     43,    247,\n     211,    134,    175,    213,\n       4,     81,    118,    172,\n     228,    228,    178,    127,\n      67,     16,    222,    170,\n     140,    193,      1,    221,\n     145,    126,     36,    251,\n      58,    123,    135,    220,\n      14,    194,    141,     90,\n      33,    236,    187,    133,\n      76,     27,     27,    183,\n     114,     75,      4,    202,\n     163,    157,    210,    239,\n      57,    102,    148,    202,\n       0,     54,    107,     98,\n     212,    244,    197,    112,\n      83,     40,    230,    174,\n     153,     68,    237,     21,\n      67,    150,    179,    238,\n      38,     95,    140,    197,\n     249,    209,    157,    108,\n      51,    254,    195,    159,\n      77,     55,    249,     53,\n     125,    166,    209,     17,\n     183,    127,    186,    237,\n      21,     86,    134,     69,\n      14,    216,    164,    119,\n      53,     23,    202,    151,\n     149,    202,      9,     59,\n     151,     88,    210,     12,\n      76,    101,    162,    221,\n      20,     73,    126,     79,\n      17,    238,    186,     96,\n      66,    248,     35,     81,\n     146,     54,     12,     43,\n      99,    149,    223,      4,\n      57,    111,    161,    210,\n      12,    186,    131,     76,\n      16,     19,     79,    125,\n     176,     17,    245,    171,\n     143,    187,    252,     40,\n      92,    110,    197,    253,\n      56,    102,    154,     59,\n     233,     60,    102,     93,\n     218,    246,    171,    154,\n     172,    231,     31,     70,\n     133,     77,     23,     28,\n      81,    128,    185,     13,\n     220,     88,    131,    196,\n       1,    202,    140,    121,\n      41,      3,     57,     99,\n     173,     44,    251,    188,\n     121,    168,    235,     19,\n     180,    134,    170,    230,\n     223,     84,    100,     98,\n       0,     47,     93,    148,\n     207,      8,    220,    159,\n     156,    208,      3,     49,\n     137,    162,    254,     28,\n      71,    122,     90,     60,\n     247,     70,    135,    181,\n     235,    211,    179,    127,\n      62,     14,     47,     86,\n     108,    193,    218,     39,\n     105,    153,     40,    228,\n     200,     99,    172,    216,\n      19,    181,    155,     67,\n      24,    229,     79,    137,\n      70,    225,      3,     88,\n     113,     62,     14,    195,\n     157,    128,    216,    246,\n      53,    153,    127,     52,\n     254,    196,    114,    165,\n     217,     10,     95,    125,\n      76,     19,    247,    191,\n     130,    175,    248,     47,\n     166,    127,     43,     27,\n     218,    152,    109,     55,\n      20,     20,    100,    159,\n      46,    228,    216,    142,\n     185,    205,     29,     79,\n     138,     92,     21,    236,\n     167,    120,     66,    239,\n       5,     67,    142,     58,\n      12,    207,    142,    156,\n     221,     12,     63,    144,\n      80,     36,    242,    192,\n     118,    168,    220,      9,\n     106,    119,     74,     19,\n     250,    179,    121,    168,\n     254,     32,    160,     96,\n      40,      8,    212,     97,\n     155,    201,     29,     27,\n     126,     95,     45,    227,\n     156,    140,    164,    213,\n      22,    177,    146,     90,\n       6,    235,    174,    121,\n     184,    210,     23,     66,\n     149,    199,      9,    204,\n     157,    136,    196,    249,\n     202,    135,     64,     60,\n     251,    182,    133,    170,\n     196,     59,     82,    118,\n     178,     30,    240,     86,\n     158,    173,      9,    202,\n     180,    113,     34,      8,\n     199,    137,    102,    233,\n      35,     52,    105,    166,\n      43,    248,     86,     86,\n     184,    225,    230,    162,\n      98,     80,     31,    234,\n     178,    116,    155,    238,\n      41,     95,    147,     41,\n      11,     40,     68,    139,\n      47,    253,    213,    136,\n      74,     34,    252,    170,\n     115,    139,    236,    239,\n     178,    116,     92,     20,\n      61,     74,    141,     71,\n      13,    218,    181,    107,\n     203,      9,    197,    124,\n     188,    211,    243,    194,\n     157,     78,    221,     20,\n      84,    130,     86,     26,\n     246,    163,    125,    183,\n      27,     42,    119,    157,\n      63,     14,    209,    178,\n     100,    194,    236,    204,\n     158,     99,     37,    237,\n     210,    139,     93,    221,\n      14,    103,    106,     80,\n      31,    225,    189,    124,\n     180,    239,    212,    174,\n     112,     53,     24,    196,\n     144,    149,    211,    226,\n      37,     97,    159,     43,\n     242,     62,    119,     91,\n      40,    233,    184,    134,\n      73,     22,    241,    185,\n     138,    160,    254,     43,\n      94,    140,     62,    245,\n      37,    156,    123,     58,\n     251,    200,    106,     99,\n      37,    243,     48,     97,\n     162,    217,     17,     69,\n     120,    183,    226,    231,\n     161,    110,     74,     21,\n      39,    167,    125,     62,\n     232,     57,    104,    147,\n     207,      0,     50,     98,\n     165,     44,    255,    206,\n     153,     93,    220,    237,\n     186,    131,    188,    232,\n      17,     91,    130,    186,\n     249,     44,    167,    125,\n      50,     12,    220,    152,\n     152,     58,    240,    200,\n     101,    168,    223,      0,\n      70,    119,    163,    211,\n     233,    162,    144,     68,\n      16,    227,     90,    120,\n      73,    241,     33,     90,\n     145,    201,    247,     40,\n     111,    146,     55,    234,\n     210,    157,     90,    212,\n       5,     67,    119,    173,\n     227,    238,    183,    120,\n     191,    231,     17,     80,\n     123,     87,     21,    203,\n     166,    151,    192,    248,\n      57,    110,    152,     52,\n       4,     62,     98,    177,\n     213,    246,    169,    145,\n      74,     14,    232,     76,\n     135,    190,    225,     26,\n     169,    117,    191,    249,\n      62,     72,    149,     48,\n      21,    209,    131,    105,\n      44,      3,     42,    124,\n     175,    216,    244,    187,\n     120,    189,    247,     25,\n      74,    121,     82,     10,\n     204,    167,    114,    184,\n     236,     60,     88,    108,\n      54,      3,     55,    106,\n     144,    213,    251,    201,\n     154,     78,     53,    250,\n      69,    107,    184,    238,\n      27,    177,    121,    181,\n     224,     47,     83,    126,\n      46,      5,    196,    178,\n     109,    197,    237,     61,\n      97,    159,     40,    253,\n      57,    126,    171,    218,\n     229,    181,    138,     64,\n      21,    229,     69,    146,\n     182,    234,    221,    173,\n     112,    199,    253,     45,\n     157,     98,     60,     11,\n     197,    157,    159,    217,\n       3,     52,    117,    166,\n      32,     16,     78,    127,\n      74,     29,    225,    181,\n     115,     64,     16,     33,\n      91,    139,    196,    244,\n      44,     98,    144,    201,\n     252,    204,    145,    101,\n      34,    241,     63,    118,\n     172,    216,     23,     68,\n     125,    179,    229,     25,\n     173,    115,     77,     16,\n     218,    161,    114,    199,\n     252,     47,    103,    144,\n     205,      1,     50,    111,\n      93,     32,    252,    196,\n     137,     87,    221,     21,\n      75,    130,    178,    228,\n      30,     80,    130,    189,\n     240,    210,    174,    119,\n      60,      0,     47,    105,\n     148,    202,      3,     55,\n     147,     92,     40,      8,\n      68,    136,     93,     39,\n     236,    189,    137,    183,\n     230,     16,     91,    143,\n     191,     13,    218,     91,\n     144,     62,     13,    212,\n     152,    110,     58,    255,\n      63,    100,    171,    219,\n       7,     69,    136,     85,\n      30,    238,    188,    135,\n      72,     16,    232,    168,\n     137,    190,    246,     47,\n      80,    152,    194,    249,\n      48,    159,    111,     56,\n     248,    197,    151,     88,\n     218,     14,     66,    118,\n     169,    233,     17,     77,\n     134,    180,     18,    234,\n     172,    112,     70,     15,\n      44,     85,    150,    199,\n     253,     51,    103,    152,\n     214,      1,    199,    151,\n      93,     33,    250,    181,\n     135,    165,    232,     16,\n      73,    130,     73,     22,\n      32,     81,    138,     67,\n       9,    212,    171,     96,\n      50,    255,     52,    111,\n     150,    217,      5,    198,\n     139,     88,     36,    240,\n      70,    122,     82,     21,\n     239,    176,    130,    180,\n     235,     43,     95,    136,\n      62,     14,    210,    168,\n     104,    203,    255,    206,\n     149,     98,     44,    249,\n      62,    119,    160,    223,\n      19,     69,    128,     87,\n      24,    230,    179,    127,\n      70,    239,     32,     85,\n     143,    197,    242,     42,\n     158,    149,     53,      1,\n     203,    105,    101,     43,\n     242,    192,    114,    164,\n     217,     22,     67,    123,\n      76,     31,    224,    177,\n     128,    190,    239,    217,\n     175,    116,     63,    244,\n      36,    104,    145,    202,\n     250,    195,    156,    100,\n     214,     15,     56,    114,\n      83,     36,    233,    184,\n     127,    184,    236,     29,\n     174,    124,     77,     22,\n     217,     91,    138,    194,\n       6,    208,    159,    104,\n     206,      7,     48,    111,\n      95,     41,    246,    193,\n     116,    169,     32,    239,\n     178,    134,     79,    230,\n      24,     84,    131,    191,\n      15,    223,    161,    112,\n     199,    250,     47,    157,\n      98,     53,    248,    201,\n     110,    164,    209,     14,\n      64,    137,     86,     33,\n      21,     74,    122,    179,\n      20,    231,    168,    124,\n      66,    243,     35,     93,\n     148,    197,      6,    210,\n     100,    152,    204,      1,\n      57,    144,     88,     44,\n     240,    188,    119,    175,\n     227,     20,    181,    128,\n      75,     22,     30,     82,\n     136,    189,     13,    218,\n     160,    108,     57,    250,\n      49,    100,    155,    205,\n       5,     57,    145,     93,\n      38,    242,    189,    136,\n      82,     30,    233,    180,\n     128,    181,     20,     31,\n      87,    138,    191,    243,\n     215,    161,    110,     58,\n       3,     49,    103,    154,\n      47,    251,    196,    144,\n     165,    219,     13,     65,\n     120,     83,     31,    235,\n     177,    126,    183,    232,\n      34,     85,    119,     66,\n      11,     40,     95,    145,\n     202,    252,    205,    154,\n      97,     44,    249,     57,\n     114,    164,     37,    241,\n     186,    134,    175,    226,\n      25,     76,    130,     72,\n      17,    220,    168,    116,\n     192,    244,     42,    160,\n     148,    201,      1,    204,\n     104,    157,     45,      7,\n      60,    142,     88,     36,\n     239,    186,    122,    175,\n      27,    230,     78,    131,\n      71,     18,    221,    168,\n     115,    193,    246,     43,\n      96,    148,     53,      1,\n     203,    105,    158,    211,\n       8,     61,    141,     89,\n      34,    239,    185,    122,\n     178,    228,     26,    176,\n     122,     70,    238,     35,\n      89,    141,    194,      9,\n     210,    159,    105,     52,\n       0,     52,    107,    159,\n      43,    246,    193,    115,\n     168,    221,     18,    184,\n     131,     79,     25,    228,\n      80,    133,    186,    239,\n      36,     89,    142,    195,\n     248,    210,    157,    105,\n      51,    254,    201,    148,\n     160,    213,     10,    192,\n     139,     86,    222,     18,\n      73,    125,     77,     25,\n     226,    175,    121,    187,\n     240,     37,    165,    143,\n      59,      6,     46,     99,\n     152,    205,      3,     55,\n     147,     94,     41,    244,\n     191,    117,    170,     32,\n     235,     73,    126,    179,\n     233,     28,    173,    120,\n     188,    241,    217,    164,\n     111,     58,      5,    208,\n     155,    153,    206,      3,\n      56,    109,     93,     40,\n     243,    190,    118,    171,\n      31,    234,    181,    128,\n      75,     22,    225,     83,\n     137,    188,    242,     39,\n     163,    111,     56,      4,\n      49,    100,    154,     48,\n     251,    198,    145,    163,\n     216,     13,     66,    119,\n     172,     30,    233,    180,\n     127,     74,     21,     31,\n      84,    137,    190,     12,\n     215,     93,    146,    199,\n     252,     49,    153,    100,\n      47,      5,     58,    111,\n     164,    217,     14,     67,\n     120,    173,    226,    232,\n     179,    129,    182,    235,\n      32,    170,    117,     64,\n      11,     41,     94,    147,\n     200,    253,     50,    103,\n      99,     46,    249,    196,\n     112,    165,    218,    240,\n     187,    134,     81,     28,\n     231,     77,    130,    183,\n     236,    222,    169,    116,\n     192,    245,     42,     95,\n     148,     54,      1,    204,\n     104,    157,    210,      7,\n      60,    113,     89,     36,\n      16,    186,    133,     80,\n      27,     25,     78,    131,\n      71,     18,    221,    168,\n     115,    193,    246,    212,\n     159,    106,     53,      0,\n      52,    105,    158,    211,\n       8,     61,    141,     88,\n      35,     17,     70,    123,\n     176,    229,    229,    176,\n     123,     70,     17,     35,\n      88,    141,    194,      8,\n     211,    158,    105,     52,\n       0,     53,    106,    159,\n      43,    246,    193,    140,\n      87,    221,     18,     71,\n     131,     78,     25,    228,\n     175,    122,     69,    239,\n      36,     89,    142,     60,\n       7,     45,     98,    151,\n     204,      1,     54,    148,\n      95,    213,    245,    192,\n     139,     86,    222,     19,\n      72,    125,    178,     24,\n     227,    174,    121,     68,\n     240,     37,     90,    143,\n      59,      6,    209,    156,\n     103,    205,      2,     55,\n     108,     94,     41,    244,\n     191,    117,    170,    223,\n      20,     73,    129,     76,\n      23,    226,    173,    135,\n     188,    241,    217,    164,\n     111,     58,      5,     47,\n     100,    153,    206,      3,\n      56,    146,     93,     40,\n     243,     65,    118,    171,\n     224,    234,    181,    128,\n      75,    233,     30,     83,\n     136,     66,     13,    216,\n     163,    110,    198,    251,\n      48,    101,    101,     48,\n     251,    198,    145,     92,\n     216,     13,     66,    136,\n      83,     30,    233,    180,\n     127,    181,    234,     31,\n     171,    118,     65,    243,\n      40,    162,    146,     56,\n     252,     49,    102,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     135,    173,    226,     23,\n      76,    129,    182,     20,\n     223,    170,    117,     64,\n      11,    214,     94,    147,\n     200,      2,    205,    152,\n      99,     46,    249,     59,\n     143,    165,    218,     15,\n      68,    121,     81,     28,\n     231,     77,    130,    183,\n     236,     33,     86,    139,\n     192,    245,    213,    160,\n     148,     54,      1,    204,\n     151,     98,     45,      7,\n      60,    113,    166,    219,\n      16,    186,    133,     80,\n      27,    230,     78,    124,\n     184,    237,     34,     87,\n     115,     62,      9,    212,\n     159,    106,     53,    255,\n      52,    105,    158,    211,\n       8,    194,    141,     88,\n      35,    238,     70,    123,\n      79,    229,     26,    176,\n     123,    185,    238,     35,\n     167,    114,     61,      8,\n     211,     97,    105,    203,\n     255,     53,    107,     96,\n     215,    246,     61,    113,\n      87,    223,    239,     71,\n     128,     76,     26,    230,\n     173,    120,     68,     19,\n     217,    175,    140,     60,\n     250,     39,     97,    157,\n     200,      4,     50,    144,\n     160,     35,    245,    195,\n     138,    160,    222,     26,\n      76,    124,     76,      8,\n     236,    164,    114,     69,\n     242,     32,     80,    135,\n     207,    250,     46,    152,\n     105,     56,    246,    204,\n     102,    168,    192,     25,\n      78,    124,     93,     43,\n     241,    151,    152,     94,\n      17,     23,     65,    154,\n     166,    230,     41,    164,\n     104,     45,     18,    195,\n     150,    159,    195,     27,\n      34,    124,    174,     45,\n     252,    163,    151,     67,\n      12,    234,     68,    108,\n     169,    245,     12,     88,\n     113,     82,     17,    193,\n     177,    106,    202,    234,\n      44,    115,    150,    202,\n     244,    220,    177,    124,\n      48,    249,     70,    102,\n     182,    254,     15,     90,\n     130,     67,      5,    243,\n     187,    117,    187,    253,\n      62,     77,    157,     57,\n      10,    215,    133,    114,\n      56,    249,     63,    127,\n     191,    193,     27,     72,\n     134,     94,     11,    248,\n     189,    127,    185,    251,\n      59,     71,    129,    191,\n      26,    204,    135,    113,\n      46,      8,     53,    119,\n     129,    204,     28,     52,\n     112,     81,     61,    229,\n     169,    130,    160,    241,\n      56,     85,    144,    179,\n      29,    201,    133,     87,\n      33,     24,     44,     79,\n     180,    232,    224,     37,\n     108,    100,     58,    225,\n     214,    131,    175,    212,\n      12,     88,    105,    162,\n      18,    245,    151,     86,\n      88,     14,    217,     92,\n     148,    229,    233,     48,\n     108,    105,     58,     26,\n     221,    132,    158,    221,\n      29,     34,    103,    182,\n     220,    225,    165,    174,\n     109,      5,    234,     73,\n     151,    155,    205,     60,\n      78,    137,     58,     29,\n     197,    143,     97,    195,\n      16,     44,    114,    144,\n     215,    248,    223,    168,\n     117,     63,    252,     71,\n     109,    169,    197,      7,\n      68,    131,     79,      1,\n     195,    182,    116,    203,\n     237,     52,    121,    134,\n     200,    246,    212,    179,\n     120,      9,    224,    196,\n     101,    181,    253,     55,\n      95,    115,     74,     10,\n     245,    184,    127,    190,\n     227,     57,     65,    150,\n     194,      3,    202,    183,\n      64,     25,    234,    195,\n      98,    189,    247,     33,\n      89,    103,     81,     52,\n     243,    171,    140,    178,\n     230,      1,     78,    155,\n     177,     15,    204,    131,\n      72,     17,     27,    223,\n     108,    141,    234,     43,\n      37,    122,     92,     36,\n     235,    166,    133,     85,\n     241,      3,     84,    101,\n     191,    235,    249,    178,\n      80,    104,     19,    201,\n      84,    157,    224,    219,\n      41,    124,     97,     57,\n     237,    210,    154,    162,\n     202,     30,     93,     98,\n     166,    227,    243,    148,\n      92,     99,     12,    234,\n     171,    147,    163,    208,\n       9,     81,    151,     44,\n      16,    215,    148,    145,\n     216,     38,     45,    118,\n     181,     44,    225,    149,\n     167,    126,      6,    228,\n     177,    154,    160,    193,\n      54,     71,    117,     84,\n       4,    203,     94,    146,\n     220,    226,     38,     71,\n     157,     45,    229,    230,\n     145,    118,     43,    226,\n      78,    106,    179,    192,\n      10,     92,    118,     67,\n      10,    209,     86,    143,\n     222,    227,     53,     76,\n     148,     62,     37,    212,\n     190,    127,     34,    244,\n      45,    127,    133,    194,\n       3,     66,    139,     94,\n       1,    238,     78,    143,\n     165,    245,     57,     91,\n     114,     42,     23,    207,\n     186,    126,     58,      0,\n      58,    124,    131,    199,\n       7,    198,    135,     75,\n      50,    238,     66,     98,\n     170,    249,     15,     76,\n     113,     88,      8,    253,\n     187,    126,     53,    253,\n      62,    118,    129,    199,\n       0,    193,    134,    115,\n      44,     13,     44,    109,\n     183,    199,     30,    190,\n     155,     85,     56,    250,\n     189,    112,    188,    225,\n      61,     77,    158,    192,\n      11,    220,    133,     97,\n      50,     13,     43,    117,\n     191,    197,     11,    211,\n     156,     75,      1,    253,\n     185,    126,    191,    242,\n      11,     92,    128,     72,\n      31,    204,    180,    143,\n     194,    229,     51,    125,\n     143,    205,    246,    222,\n     143,     64,     60,    248,\n      64,    123,    188,    201,\n      27,     77,    141,     95,\n      15,    240,    169,    130,\n     165,    239,      7,     67,\n     147,     60,     23,    203,\n     135,    126,     60,    252,\n      54,    122,    181,    196,\n       8,    183,    157,     77,\n      12,    225,     78,    109,\n     175,    246,     11,     86,\n     136,     78,     27,    206,\n     187,     98,     59,    246,\n      34,    118,    137,     48,\n     253,    210,    134,     83,\n      42,      8,     78,    111,\n     182,    237,     26,     75,\n     118,     68,      2,    240,\n     166,    137,    179,    254,\n      63,     84,    145,     63,\n      22,    193,    138,     99,\n     208,      2,     44,    100,\n     170,    215,    240,    188,\n     138,     66,     19,    227,\n      72,    133,    185,    224,\n      39,     82,    114,     69,\n       6,    218,    164,    107,\n     206,    255,     55,    118,\n     154,    219,      6,    193,\n     138,     87,     36,    245,\n      65,    122,    175,    232,\n     231,     75,    124,     77,\n      23,    210,    173,    122,\n      58,    253,     40,     78,\n     147,    206,    253,    201,\n     104,    105,     44,    242,\n     198,    117,     88,    203,\n      23,     77,    126,     87,\n      31,    241,    186,    120,\n      64,    224,     39,     88,\n     135,    199,    241,    211,\n     158,    121,     61,      5,\n     206,    102,    148,    193,\n       0,     62,    136,     76,\n      39,    255,    190,    132,\n      78,    235,     29,     94,\n     129,    186,     23,    205,\n     175,    125,    192,    240,\n      33,    110,    158,    204,\n     243,    201,    146,    110,\n      41,    253,     61,    112,\n     163,    209,     17,     66,\n     142,     72,     23,    226,\n      86,    131,    170,    232,\n      45,    160,    114,    194,\n      12,     46,    149,    151,\n     206,      3,     60,    148,\n     161,     36,    253,    205,\n     128,    175,    219,      3,\n      67,    116,     73,     29,\n      31,    164,    135,     66,\n     240,     35,     94,    129,\n     198,    248,    221,    147,\n     105,     35,      2,     51,\n     102,    176,    222,     10,\n      68,    116,     86,    223,\n     227,    180,    129,    183,\n     225,     26,     83,    127,\n      74,      3,    211,    166,\n     111,    193,    240,     47,\n     101,    145,    204,      6,\n      57,    145,     95,     42,\n       9,     64,    112,     86,\n      24,    239,    187,    126,\n     180,     22,     22,    175,\n     115,    189,     13,     37,\n      89,    144,    196,    251,\n      53,     96,    155,    206,\n     241,    206,    155,     84,\n     208,     15,     75,    124,\n      87,    229,    233,    178,\n     128,     66,     23,    227,\n      85,    131,    186,    249,\n     215,    164,    107,     52,\n       3,    207,    103,    147,\n      45,      2,     49,    110,\n     162,     34,    246,    182,\n     141,     82,     24,     17,\n      78,    127,    178,     17,\n      39,     87,    138,    183,\n       1,     40,     86,    147,\n     196,      2,     51,    158,\n     104,    208,    247,     59,\n     137,     82,    216,    245,\n      72,    126,    169,    237,\n     237,     69,    134,     75,\n     225,    213,     85,    127,\n      54,    244,    219,     88,\n     101,     50,      2,    198,\n     102,     99,    217,     12,\n     192,    102,    164,    215,\n      26,    179,    127,     74,\n      29,    246,    191,    128,\n      73,    229,    223,     82,\n     130,     62,    249,    210,\n     101,    155,     49,    232,\n     201,    110,     96,     60,\n     246,    220,    136,     75,\n      46,     18,    177,    105,\n     180,    232,     17,    180,\n     146,     66,    229,     37,\n     160,    135,     44,    244,\n     195,    149,    110,     32,\n       2,    193,     98,    150,\n     215,     24,    197,    103,\n     163,    216,      1,    176,\n     123,     94,     30,    233,\n     189,    120,     80,    237,\n     216,     92,    128,    198,\n     247,    214,    106,    144,\n      51,     19,    205,     98,\n      87,     34,    253,    214,\n     140,     79,     39,    235,\n      73,    111,    186,    255,\n      27,     95,    150,     64,\n     252,    211,     91,    123,\n      54,      3,    198,    158,\n     113,     52,    251,    204,\n     124,    162,    192,      1,\n      80,    108,    175,    202,\n     232,     73,    136,     88,\n      29,    254,    164,    109,\n      74,     10,    220,     75,\n     148,    215,    241,     35,\n     124,    159,    218,      2,\n      59,    145,     77,     47,\n     232,    181,    145,     90,\n      24,    224,     69,    123,\n     166,    230,     20,     71,\n     143,    176,    241,    217,\n     162,     98,     61,     10,\n     198,    147,    106,     53,\n     241,     58,    107,    164,\n     214,      7,     76,    126,\n     164,    226,    232,    177,\n     117,     66,     31,    229,\n     175,    117,    190,     15,\n      45,     93,    144,    195,\n     254,     57,    100,    147,\n      47,    251,    199,    155,\n      95,     45,    245,     67,\n     135,    164,    230,     29,\n      74,    128,    180,     16,\n     223,    175,    116,     68,\n      15,     41,    164,    146,\n      54,    253,     49,    103,\n     152,    208,      0,     63,\n     112,    166,     33,     12,\n     185,    143,     82,     20,\n     227,    183,    130,    180,\n     239,     40,     85,    141,\n     194,     11,     41,    164,\n     106,     55,      2,    204,\n     149,     98,     47,    249,\n     193,    140,    167,    219,\n      19,     65,    126,    172,\n     229,     24,    176,    125,\n      68,     16,    222,    169,\n     141,     62,    244,     43,\n      96,    148,     53,    255,\n     202,    151,     97,     46,\n       8,    195,    141,    167,\n      35,     17,    185,    121,\n     177,    228,     24,    176,\n     132,     71,     16,     35,\n     166,    141,     60,      8,\n     211,    156,    150,     54,\n       0,     53,    104,    154,\n     215,     15,     60,    114,\n     168,     38,    239,    188,\n     129,     78,     24,     27,\n     173,    123,     68,     18,\n     219,    166,    140,    193,\n     251,     47,     99,    149,\n      50,    254,    203,    150,\n      94,     43,     10,    192,\n     116,     87,     32,    236,\n     183,    124,    179,    229,\n      29,     81,    135,     69,\n      15,    219,    165,    143,\n      59,    250,     47,     97,\n     153,     50,    253,    202,\n     108,     95,    214,    244,\n     190,    117,     84,     32,\n     235,    182,    126,    179,\n     234,     28,     81,    133,\n     189,    243,    216,     91,\n     110,     56,      4,    212,\n     154,    101,     48,    252,\n     199,    108,    162,    214,\n      13,     64,    116,    170,\n     225,     20,     74,    127,\n      74,     23,    226,    174,\n     117,     64,     13,     39,\n      93,    147,    196,    249,\n      49,    100,    154,    207,\n     251,     57,    110,     92,\n     216,    243,    188,    137,\n      81,     30,    233,     74,\n     129,    180,    234,     31,\n      84,    118,     65,    243,\n     215,     93,    146,     56,\n       3,    207,    153,    101,\n      47,      5,     58,    110,\n     165,    216,     14,    188,\n     134,     83,     28,    232,\n      76,    128,    183,    234,\n      32,    170,    117,     64,\n      11,     41,     94,    145,\n     201,    252,     50,    153,\n      98,     45,    248,    197,\n     112,    167,    219,     14,\n      68,    134,     80,     29,\n     230,    178,    125,    183,\n     236,     33,     86,    116,\n      63,     11,    212,    160,\n     107,    200,    254,     50,\n     105,     98,    210,    249,\n     195,    113,    166,    219,\n     239,     69,    122,     80,\n     228,    230,     78,    124,\n     184,    237,    221,     87,\n     115,     62,      9,    212,\n      96,    106,     53,      0,\n     203,    150,     97,    211,\n       8,     60,    115,    167,\n     220,    238,    185,    133,\n      78,     26,    229,     79,\n     123,     70,    238,    220,\n      88,    114,    194,    247,\n      44,     96,    151,    202,\n       1,     53,    149,     97,\n      42,    247,    192,    140,\n      87,     34,    237,    184,\n     131,    177,    230,     27,\n      81,    132,    187,    238,\n      36,     89,    113,     61,\n       6,    211,    156,    105,\n      51,    254,    201,    148,\n     160,    213,     10,     62,\n     117,    168,    220,     18,\n      72,    125,     77,     25,\n     226,    175,    120,     68,\n      15,    218,    165,    112,\n     196,    249,     46,     99,\n     153,    204,      3,     55,\n     108,     94,     41,    244,\n     190,    139,     84,     33,\n     235,    183,    129,     76,\n      23,     29,     82,    134,\n     189,    240,     38,     91,\n     144,     58,    250,    208,\n     100,    102,     49,    252,\n     199,    146,     93,     40,\n     243,    190,    118,    171,\n     225,     20,     74,    127,\n     180,    233,    225,    172,\n     119,     66,     13,    216,\n     163,    110,     57,      4,\n     207,    101,    154,    207,\n       4,     57,    110,    163,\n     216,     13,    189,    136,\n      83,     30,    232,    180,\n     127,     74,    234,    224,\n      84,    137,    190,    243,\n      40,     93,    146,    199,\n     252,    206,    153,    100,\n      47,    250,    197,    111,\n     164,    217,     14,     67,\n     120,    173,    227,     23,\n      76,    129,     73,     20,\n     223,    171,    116,     65,\n      10,    214,    161,    147,\n     200,    253,     51,    102,\n     157,    208,      6,     59,\n     112,     90,     37,    240,\n     187,    135,     81,     28,\n     231,     77,    125,    183,\n     236,     33,     86,    139,\n     193,    245,     42,     95,\n     107,    201,      0,    204,\n     151,     98,     45,    248,\n     195,    142,    166,    219,\n      16,     69,    122,    175,\n     228,     25,     78,    124,\n      71,     18,    221,    168,\n     115,     62,      9,    212,\n      96,    149,    202,    255,\n      52,    105,    158,    211,\n       8,     61,    141,     88,\n      35,    238,    185,    132,\n      79,     26,     26,     79,\n     132,    185,    238,     35,\n      88,    141,    194,    247,\n      44,    158,    105,     52,\n     255,    202,    149,     96,\n      43,    246,    193,    115,\n     168,    221,     18,     71,\n     124,    177,    230,     27,\n      80,    133,     69,     16,\n     219,    166,    113,     60,\n       7,    210,     98,    151,\n     204,      1,     54,    107,\n     160,    213,     10,     63,\n     116,     86,     33,    236,\n     183,    130,     77,     24,\n     227,    174,    121,    187,\n     240,     37,     90,    143,\n     196,    249,     46,     99,\n     152,    205,    253,    200,\n     147,     94,     41,    244,\n     191,    138,     85,    223,\n     235,     73,    126,    179,\n     232,    226,     82,    135,\n     188,    241,     38,     91,\n     111,     58,      5,    208,\n     100,    102,    206,      3,\n      56,    109,     93,    215,\n     243,     65,    118,     84,\n     224,     21,     74,    128,\n      75,     22,    225,    172,\n     119,     66,     13,     39,\n      92,    145,    198,      4,\n      48,    154,    101,     48,\n     251,    198,    145,     92,\n      39,     13,     66,    119,\n     172,    225,     22,     75,\n     128,    181,    234,     31,\n      84,    137,    190,     12,\n      40,    162,    109,     56,\n       3,     49,    153,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     135,    173,     29,    232,\n     179,    126,     73,     20,\n      32,     85,    117,     64,\n      11,     41,    161,    147,\n     200,      2,     50,    152,\n     156,    209,    249,    196,\n     143,     90,     37,    240,\n     187,    134,    174,    227,\n      24,     77,    130,    183,\n     236,     33,     86,    139,\n     192,     10,    213,    160,\n     148,     54,    254,     51,\n     151,    157,    210,      7,\n      60,    142,     89,     36,\n     239,    186,    133,     80,\n      27,     25,    177,    124,\n      71,     18,     34,     87,\n     140,    193,    246,     43,\n      96,    149,    202,    255,\n     203,    105,     97,     44,\n     247,    194,    141,     88,\n      35,    238,    185,    123,\n     176,    229,     26,     79,\n     132,    185,    238,     35,\n      88,    141,    194,      8,\n      44,    158,    105,     52,\n     255,    202,    149,    159,\n     212,      9,    193,    140,\n     168,     34,     18,     71,\n     131,     78,     25,     27,\n     174,    129,     69,     21,\n      39,    165,    112,    199,\n       6,     45,     98,    105,\n     204,      3,     54,    149,\n     161,     40,    245,     63,\n     137,    168,     33,    236,\n      75,    125,    178,    230,\n      28,     81,    121,    184,\n      11,    217,     90,    115,\n     197,    248,     46,     98,\n     152,    204,      2,     54,\n     147,     95,     41,    246,\n     191,    137,    175,    221,\n     238,     76,    130,     77,\n     235,    224,     83,    120,\n      66,     14,     39,     90,\n     111,    199,      4,    209,\n     103,    100,    207,      0,\n     193,    109,    162,     41,\n      13,     65,    119,     85,\n     224,     21,    180,    125,\n      73,     22,     31,    175,\n     138,     67,     13,     38,\n     163,    145,    198,    251,\n      48,    101,    154,     48,\n     250,     57,    145,     92,\n      39,    242,     66,    119,\n     172,    225,     22,    180,\n     128,     74,     21,     31,\n     170,    118,     65,    241,\n      40,    163,    146,     56,\n     252,    206,    102,    100,\n      47,    250,    196,    110,\n      91,     38,     15,    184,\n     124,    175,     30,     21,\n     178,    124,    182,     20,\n     223,     85,    117,     64,\n     245,     41,     94,    146,\n      54,      2,    205,    152,\n     157,     47,      6,     59,\n     112,    164,     36,     15,\n      69,    135,    174,     28,\n     229,     79,    125,     72,\n     237,    223,     86,    116,\n      62,    245,    213,    160,\n     148,     54,      1,     51,\n     104,     98,    210,      7,\n     195,    113,     89,     37,\n      16,    186,    133,    175,\n     228,     25,     78,    124,\n     184,     18,    220,     87,\n     141,     63,    246,     42,\n     159,    149,    202,      1,\n      52,    105,     97,    211,\n     247,     61,    141,     88,\n     220,     17,     70,    123,\n     176,     26,    229,     79,\n     122,    185,    238,    220,\n      88,    141,    194,      8,\n      44,     97,    105,    203,\n     255,    202,    106,     96,\n     212,    246,    193,    115,\n      87,    221,     18,    184,\n     124,     78,     25,     27,\n      80,    122,    186,    239,\n     219,     89,    142,     60,\n       7,     45,     98,    104,\n     204,    254,     54,    107,\n      95,     42,    245,     63,\n     116,     86,    222,     19,\n      72,    130,     77,     24,\n     227,     81,    121,     68,\n     240,    218,    165,    143,\n      59,      6,     46,    156,\n     152,     50,    253,     55,\n     147,     94,    214,    245,\n      64,    138,     85,    223,\n     235,     73,    129,    179,\n     232,    226,     82,    120,\n     188,    241,    217,    164,\n     111,     58,      5,    208,\n     100,    102,    206,      3,\n     199,    109,    162,     40,\n     243,    190,    118,    171,\n      31,     21,    181,    128,\n     180,     22,     30,    172,\n     119,    189,     13,    216,\n      92,    145,     57,    251,\n     207,    154,    154,     48,\n     251,     57,    110,     92,\n     216,     13,    189,    119,\n      83,     30,     22,    180,\n     128,     74,    234,     31,\n     171,    137,     65,     12,\n      40,    162,    146,     56,\n     252,     49,    153,    155,\n      47,      5,     58,    144,\n     164,     38,    241,     67,\n     135,    173,     29,    232,\n      76,    126,    182,    235,\n      32,    170,    138,    191,\n      11,     41,     94,    108,\n     200,    253,    205,    103,\n     156,     46,      6,    196,\n     143,     90,    218,    240,\n     187,    121,     81,    227,\n     231,     77,    125,     72,\n     236,    222,     86,    116,\n      63,    245,    213,     95,\n     148,     54,      1,     51,\n     151,     98,    210,    248,\n      60,    113,     89,    219,\n      16,    186,    122,     80,\n      27,     25,     78,    124,\n     184,     18,    221,     87,\n     115,     62,      9,     43,\n     159,    149,     53,    255,\n     203,    105,    158,     44,\n     247,    194,    141,    167,\n      35,     17,     70,    132,\n     176,     26,     26,     79,\n     123,    185,     17,    220,\n      88,    114,    194,    247,\n     211,     97,    150,     52,\n       0,     53,    106,    159,\n     212,    246,    193,    140,\n     168,     34,    237,     71,\n     131,     78,     25,    228,\n      80,    122,     69,     16,\n      36,     89,    142,    195,\n       7,     45,    157,    104,\n     204,    254,     54,    107,\n      95,    213,     10,     63,\n     139,    169,     33,    236,\n      72,    130,     77,    231,\n     227,     81,    121,     68,\n     240,    218,    165,    143,\n     196,    249,     46,     99,\n     152,     50,      2,    200,\n     147,    161,     41,    244,\n      64,    138,    170,    223,\n     235,     73,    129,    179,\n     232,     29,     82,    120,\n     188,     14,     38,     91,\n     111,    197,      5,    208,\n     100,    102,     49,    252,\n     199,    109,    162,    215,\n     243,    190,    118,     84,\n     224,     21,    181,    128,\n      75,     22,     30,     83,\n     119,     66,    242,    216,\n      92,    145,    198,    251,\n      48,    154,    154,     48,\n     251,     57,    145,    163,\n     216,    242,     66,    136,\n      83,    225,    233,     75,\n     128,     74,    234,     31,\n      84,    137,    190,     12,\n     215,     93,    146,    199,\n     252,     49,    153,    100,\n     208,    250,    197,    111,\n      91,     38,     14,     67,\n     120,    173,     29,     23,\n     179,    126,     73,     20,\n     223,    170,    117,    191,\n      11,    214,    161,    108,\n     200,      2,    205,    103,\n     156,    209,      6,    196,\n     143,    165,     37,    240,\n     187,    134,    174,    227,\n     231,    178,    125,     72,\n      19,    222,     86,    139,\n      63,    245,     42,     95,\n     148,     54,    254,     51,\n     104,    157,    210,      7,\n      60,    113,    166,    219,\n      16,    186,    122,    175,\n      27,     25,    177,    131,\n      71,    237,     34,     87,\n     140,    193,    246,     43,\n      96,    149,    202,    255,\n      52,    105,    158,    211,\n       8,     61,    114,    167,\n     220,     17,     70,    123,\n     176,    229,     26,     79,\n     132,    185,    238,     35,\n      88,    141,    194,    247,\n      44,     97,    150,    203,\n       0,     53,    106,    159,\n     212,      9,     62,    115,\n     168,    221,    237,     71,\n     131,     78,     25,    228,\n     175,    122,     69,     16,\n     219,    166,    113,    195,\n     248,    210,    157,    151,\n      51,    254,     54,    148,\n      95,     42,    245,     63,\n     139,    169,    222,     19,\n      72,    125,    178,    231,\n      28,     81,    134,    187,\n     240,     37,    165,    112,\n      59,      6,    209,    156,\n     103,     50,      2,     55,\n     147,     94,    214,    244,\n     191,    138,     85,    223,\n      20,     73,    126,     76,\n      23,    226,    173,    120,\n      67,     14,    217,    164,\n     111,     58,      5,    208,\n     100,    153,    206,      3,\n      56,    109,    162,    215,\n      12,     65,    118,    171,\n     224,     21,     74,    128,\n      75,     22,    225,    172,\n     119,     66,     13,    216,\n     163,    110,    198,    251,\n      48,    101,    154,    207,\n       4,     57,    110,    163,\n     216,    242,    189,    136,\n      82,     31,    232,    181,\n     126,     75,     21,    224,\n      84,    137,    191,    242,\n      41,     95,    144,    197,\n     253,     48,    103,    154,\n     208,    250,    197,    145,\n      89,     37,    242,    191,\n     132,     80,     28,    232,\n      76,    128,    183,    233,\n      35,     86,    137,    189,\n     246,     43,     95,    146,\n     200,      2,    204,    154,\n      96,     42,    253,    192,\n     139,     89,     39,    241,\n     187,    120,    172,    224,\n      28,     73,    134,    179,\n     232,     37,     85,    136,\n     194,    244,    213,    161,\n     104,     51,      7,    203,\n     144,    100,     40,    251,\n     194,    113,    167,    216,\n      20,     65,    126,    170,\n     225,     31,     72,    133,\n     190,    232,     33,     86,\n     114,     58,     15,    221,\n     148,    102,     62,     10,\n     204,    146,     96,    210,\n      11,     56,    117,    160,\n     218,     23,     64,    125,\n     182,    227,     28,     74,\n     128,    186,    239,    221,\n     163,    117,     55,      4,\n     222,    146,     98,     61,\n     249,    200,    107,    155,\n     211,      1,     55,    123,\n     175,    219,     20,     65,\n     122,    180,    227,     31,\n      83,    132,     68,     19,\n     221,    175,    125,     49,\n      10,    222,    151,    111,\n      48,      0,     51,     99,\n     170,    223,      3,     56,\n     113,    173,    218,     23,\n      76,    121,    177,    228,\n      30,     81,    120,     64,\n       8,    208,    169,    124,\n      48,     15,    215,    159,\n     152,    206,      5,     63,\n     100,    166,    211,      8,\n      65,    116,    168,    221,\n      23,     74,    125,    176,\n     234,     28,    173,    123,\n      69,      6,    211,    174,\n     102,     50,      3,    211,\n     100,    154,    203,      5,\n      61,    105,    160,    215,\n      12,     64,    117,    174,\n     230,     18,     77,    121,\n     177,    234,     30,    175,\n     113,     75,      7,    211,\n     169,    103,     62,      1,\n     205,    101,    152,    204,\n       7,     58,    108,    161,\n     219,      9,     71,    112,\n     164,    233,     30,     76,\n     134,    182,    234,    226,\n     174,    126,     72,      6,\n     221,    168,    101,     62,\n       7,    207,    153,    154,\n     210,      7,     56,    109,\n     167,    221,     11,     68,\n     127,    165,    234,     16,\n      73,    130,    183,     21,\n     219,    172,    124,     74,\n       1,    220,    168,    107,\n      50,      1,    204,    103,\n     158,    210,      2,     63,\n     116,    160,    223,      9,\n      67,    113,    166,    228,\n      30,     73,    128,     72,\n      16,    219,    174,    124,\n      54,      3,    221,    168,\n     109,     51,      2,    206,\n     151,    156,    209,      3,\n      56,    117,    162,    222,\n      21,     67,    124,    169,\n     225,     29,     77,    130,\n      71,     16,    222,    173,\n     117,     57,     14,    211,\n     153,    111,     49,      3,\n     201,    150,    158,    209,\n      11,     62,    113,    164,\n     216,     21,     67,    126,\n     181,    225,     30,     76,\n     134,    184,    238,    220,\n     165,    113,     57,     13,\n     214,    155,    109,     48,\n     251,    201,    150,     98,\n      42,    246,    193,    115,\n     169,    223,     16,     68,\n     120,    181,    226,     31,\n      84,    129,    190,    236,\n      39,     91,    142,     60,\n       5,    209,    153,    109,\n      54,    248,    207,    146,\n      89,     47,    241,    195,\n     138,     86,    222,     17,\n      75,    121,    183,    225,\n      26,     86,    128,    189,\n     246,     32,     94,    141,\n     197,      6,    211,    159,\n      99,     53,    245,    192,\n     155,     86,     46,    242,\n     186,    137,     85,    222,\n      23,     77,    123,    183,\n     236,     24,     87,    130,\n     185,    244,     35,     95,\n     147,    198,    248,     46,\n     154,     98,     54,    247,\n     205,    154,     91,     46,\n     246,    188,    118,    169,\n     228,     17,     73,    126,\n     181,    233,     30,     81,\n     139,    185,    244,     32,\n      91,    151,    194,    249,\n     207,    159,    108,     60,\n     245,    202,    150,     88,\n      37,     12,     71,    113,\n     171,    230,     18,     75,\n     125,     78,     17,    225,\n      87,    129,    180,    255,\n      37,     87,    150,     57,\n       4,    193,    140,    124,\n      57,    246,    198,    108,\n     173,    200,     29,     81,\n     118,    171,     30,    228,\n     161,    111,     67,     21,\n      39,     69,    156,    168,\n     224,     34,     94,     98,\n      45,     38,    238,    129,\n     109,     44,     13,     34,\n     111,    186,    193,      0,\n      69,    136,     72,      6,\n     241,    185,    128,    184,\n     244,     60,     76,    155,\n     194,     26,    244,    140,\n      67,     40,     16,    206,\n     103,    189,    250,     47,\n      30,    101,    167,     54,\n     241,    165,    158,     95,\n     228,      9,     84,    156,\n     165,    254,     33,    185,\n      80,     16,     35,    203,\n     142,    104,    219,    220,\n      30,     67,    189,    198,\n       8,    209,    147,     70,\n      59,    226,     71,    116,\n     169,    248,      2,     66,\n     120,     81,     54,    241,\n     129,    107,     55,    244,\n      56,     66,    191,    236,\n      30,     56,    147,    117,\n      55,    237,    211,    136,\n     162,    200,      9,     90,\n     106,    184,     18,    251,\n     130,     84,    102,      4,\n     222,     81,    151,    229,\n     211,      8,    116,    146,\n      63,    228,    214,    136,\n      81,    215,      5,     39,\n     107,    182,    203,     16,\n     164,    166,     98,     52,\n     195,    190,    134,    171,\n     239,     12,    112,    174,\n     212,      5,    196,    130,\n      71,     41,    241,     49,\n     120,    189,    246,     22,\n      82,    139,     77,      9,\n     196,    144,    153,     68,\n     237,      8,    118,    171,\n     149,    234,     46,    174,\n     118,     26,     37,    198,\n     158,    144,    219,     25,\n      37,    116,    174,     32,\n     237,    146,    162,     74,\n      17,    234,     65,    102,\n     146,    194,     58,     64,\n     118,     80,     16,    199,\n     191,    127,     57,    244,\n      40,    126,    131,    221,\n       1,    201,    179,    113,\n       1,    231,    190,    127,\n     189,    252,     49,     97,\n     159,    191,     31,    251,\n     180,    107,     86,      7,\n      43,     79,    136,    220,\n     233,     58,    157,    124,\n       7,    214,    218,    156,\n     160,    215,     24,     99,\n      80,    138,    250,     22,\n     167,     94,    105,     13,\n     208,    169,    131,    170,\n     239,     51,     78,    145,\n      57,     29,    231,    191,\n     116,     45,     10,     46,\n     107,    135,    252,     46,\n      84,    129,     74,     62,\n     250,    163,    123,    180,\n     231,     53,     79,    158,\n     201,     12,    205,    133,\n      76,     45,     11,     54,\n     102,    139,    207,     37,\n      28,    100,    164,     53,\n     243,    166,    150,     86,\n     224,     19,     65,    145,\n     170,    224,    221,    185,\n      82,     24,     21,    222,\n     101,    155,    216,    233,\n      47,    117,    139,    214,\n     249,    217,    144,     76,\n      38,     23,     74,    118,\n     190,    232,     16,     78,\n     118,     88,     55,    195,\n     171,    132,    214,    226,\n      56,    119,    143,    221,\n       9,    192,    143,    127,\n      61,    241,     57,    124,\n     184,    208,     30,     78,\n     120,     70,      0,    194,\n     138,    110,    185,    249,\n      62,     79,    156,    215,\n     237,     34,    159,    126,\n      18,    227,    196,    111,\n     175,    197,      7,     54,\n     114,    173,     37,    255,\n     149,    164,     84,     25,\n       8,     76,    159,    170,\n     255,     52,     74,    138,\n      54,     26,    207,    142,\n     153,    194,     16,     58,\n     105,    160,     41,    247,\n     178,    144,    119,     59,\n     236,     88,     97,    173,\n     252,     22,     88,    140,\n     180,     10,    205,    184,\n     123,     56,    244,     59,\n     107,    156,     53,    251,\n     206,    156,     74,     54,\n     233,    182,    121,    139,\n     194,     12,     70,    122,\n     177,    236,    227,    163,\n     111,     81,     14,     41,\n      74,    131,    192,      1,\n     195,    149,    119,     39,\n     231,    222,    152,    175,\n     199,     40,     95,    120,\n     168,    225,     23,    181,\n     119,     90,      5,    228,\n      95,    159,    173,    244,\n     208,    178,    126,     44,\n      21,    215,    143,    110,\n     216,     31,     25,    112,\n     182,    221,    243,    190,\n     134,     81,     21,    226,\n     176,    136,    165,    249,\n      40,    172,    103,     86,\n      29,    192,    180,    125,\n      49,    244,     42,     71,\n     128,    193,      5,    193,\n     137,     94,     39,    243,\n     184,    121,    166,    236,\n       8,     74,    123,     90,\n      11,    199,    191,    103,\n      49,     14,     35,     73,\n     136,    208,    241,     49,\n     146,    100,     41,    249,\n     195,    113,    165,    210,\n      30,     72,    127,     86,\n      10,    241,    166,    105,\n      85,     31,    222,     94,\n     153,    218,    225,     37,\n      98,    110,     51,      4,\n     202,    105,    156,    215,\n       0,     54,    120,    163,\n      37,    254,    175,    146,\n      91,     11,    238,    177,\n     141,    170,    246,     55,\n      83,    140,     56,     13,\n     209,     97,    149,    206,\n       7,     63,     96,    152,\n     212,    254,    209,    153,\n      65,     54,    255,    180,\n     129,    184,    245,     12,\n      67,    143,    186,     21,\n     222,    167,    143,    199,\n     254,     42,    107,    158,\n     201,    252,    195,    132,\n      77,     59,    231,    209,\n     129,    168,    208,      5,\n      92,    118,    178,     30,\n     229,    175,    130,    179,\n     251,     41,     86,    131,\n     195,      7,    218,    142,\n     115,     35,    242,    199,\n     157,     88,    208,     24,\n      88,    100,    169,     41,\n     231,    177,    124,    187,\n     227,     16,     92,    136,\n     177,    244,    223,    180,\n     121,     44,     23,    222,\n     150,    108,     48,      8,\n      46,    122,    174,     43,\n     253,    176,    143,    175,\n     235,     24,     69,    109,\n     160,    249,     27,    164,\n      99,     88,     21,    203,\n     179,     97,     51,    250,\n      32,    124,    141,    197,\n     254,    200,    159,     89,\n     220,      7,     79,    103,\n     184,    244,      6,     72,\n     116,     92,     15,    247,\n     185,    103,     81,      4,\n      45,     78,    139,    212,\n     248,    199,    151,    110,\n      47,      3,     48,     98,\n     181,    204,     26,     72,\n     133,     92,     10,    240,\n     166,    108,     91,     27,\n     221,     88,    146,    168,\n     254,    211,    175,     97,\n      50,    254,     53,    109,\n     146,    196,     30,     47,\n     119,     93,     54,    233,\n     163,    144,     68,      8,\n     239,     71,    154,    171,\n     255,     32,    164,    100,\n      52,      8,     41,     89,\n     158,    218,    229,     40,\n     122,    156,     35,    224,\n     217,    151,     64,     62,\n     255,     65,    109,    143,\n     254,     17,    185,    115,\n      75,     22,    221,    168,\n     136,    207,    237,     11,\n     121,    157,     61,     21,\n     209,    140,    125,     51,\n     239,    193,     97,    134,\n     194,     30,    186,    136,\n      68,     31,    231,    179,\n     123,    179,    247,      0,\n      71,    131,     57,     27,\n     201,    133,    119,     22,\n     226,    194,    100,    128,\n     244,     26,     63,    139,\n      95,     39,    232,    176,\n     133,    183,    255,     63,\n     113,    151,     69,     31,\n     204,    188,    110,     26,\n      38,    222,    110,    139,\n     208,     16,     50,    148,\n      95,     40,    242,    206,\n     128,    173,    196,     53,\n     106,    110,    179,     19,\n     241,    185,    102,     99,\n      16,    208,     80,    154,\n     215,    243,     42,    101,\n     159,    206,    245,    219,\n     157,    165,    205,     47,\n      93,    123,    170,     41,\n     228,    162,    158,    105,\n       0,    225,     88,    138,\n     186,    241,     35,     85,\n     159,    192,     15,    195,\n     144,    144,    212,     29,\n      47,     97,    162,     47,\n     253,    166,    168,     77,\n      25,     19,     77,    128,\n      76,     18,     23,     65,\n     135,    188,      7,    210,\n      92,    156,    213,    233,\n      63,    108,    101,     58,\n     238,    217,    137,     95,\n     209,     10,    190,    133,\n      94,     30,     31,     64,\n     133,    181,    235,     24,\n      88,    130,    181,    254,\n      37,     88,    106,     44,\n      28,    216,    102,    150,\n     219,      5,    207,    155,\n      94,     36,    242,    191,\n     120,    164,    243,      7,\n      70,    134,    188,    231,\n      38,    175,     96,     95,\n      31,     41,     85,    154,\n     202,      6,    206,    154,\n     100,     32,    246,    194,\n     119,    183,    201,      0,\n      73,    117,    165,    230,\n     227,    161,    102,     70,\n     238,     38,     82,    138,\n     193,    241,     41,    165,\n     123,     34,     12,    204,\n      98,    147,    221,     22,\n      45,    124,    163,     32,\n     252,    172,    130,    171,\n     231,    228,    178,    131,\n     176,    235,    223,    164,\n      99,     50,     15,     43,\n     101,    153,    219,    239,\n      63,    111,    101,     60,\n     252,     61,    119,    166,\n      33,    237,     70,    126,\n     179,     25,    226,    184,\n     115,     64,     21,    220,\n      80,    128,    206,    255,\n      47,    150,     96,    203,\n       5,     54,    106,     96,\n     212,     13,     63,    142,\n      81,     37,    235,    188,\n     135,     72,     27,     31,\n      89,    140,    188,     18,\n     221,    167,    140,    194,\n       7,     44,    102,    159,\n     203,      3,    203,    156,\n      84,     45,    241,    197,\n     143,     86,    217,     31,\n      69,    123,     76,     29,\n     234,    164,    113,     64,\n     240,     34,     86,    129,\n     200,    252,    211,    154,\n      97,     53,    250,    207,\n     144,    160,    208,     15,\n     191,    136,     83,     40,\n     236,    181,    129,    176,\n     239,     16,     67,    137,\n     187,    240,    219,    163,\n     102,     48,     12,    213,\n     155,    152,     49,    252,\n     198,    144,     94,     41,\n      12,     64,    116,    174,\n     233,     31,     66,    122,\n     183,     20,    230,    164,\n     127,     71,     15,    216,\n     162,    145,     57,      7,\n     202,    158,    100,     48,\n     251,     57,    106,    166,\n     221,     11,     74,    112,\n     175,    225,    232,    182,\n     124,     79,     19,    228,\n     168,    117,     66,     13,\n      41,     95,    144,    197,\n     254,     49,    152,    155,\n     213,      3,     63,    106,\n     160,    216,    240,    184,\n     128,     84,     24,    238,\n     183,    126,    182,     20,\n      33,     86,    137,    189,\n      10,    212,    161,    146,\n     202,    249,     55,    101,\n      99,     44,    250,    197,\n     141,     88,     37,     14,\n      68,    121,    175,     28,\n     231,    179,    127,     72,\n     236,     32,     84,    136,\n     192,     11,    214,    164,\n     105,     54,    255,     55,\n     110,    153,    208,      5,\n      60,    140,     92,     33,\n     234,    190,    132,    172,\n     225,     26,    177,    120,\n      65,     23,    217,    169,\n     143,    201,    252,     33,\n     106,    157,    203,      4,\n     206,    144,    105,     37,\n     243,     61,    115,     88,\n      33,    237,    186,    128,\n      76,    229,     25,     75,\n     140,    183,    227,     36,\n      90,    115,     57,     13,\n     213,    152,    108,     51,\n     246,    204,    148,     97,\n      40,      8,     59,    119,\n     171,    219,     26,     65,\n     120,    181,    228,    228,\n     172,    123,     69,     19,\n     220,    175,    119,     58,\n       2,     45,    103,    147,\n     200,      9,     62,    111,\n      95,     40,    246,    196,\n     136,    169,    220,    236,\n     180,    125,    177,     25,\n     224,    174,    135,     68,\n     241,     32,     95,    141,\n      59,      7,    210,    155,\n     111,     54,    255,    203,\n     146,    165,    208,     13,\n      72,    124,    175,    223,\n     235,     73,    128,     74,\n      31,    229,    171,    126,\n      64,     12,    221,    160,\n     146,    194,    242,     35,\n     105,    147,    198,      4,\n      60,    147,     85,     36,\n     254,    176,    132,     92,\n      25,    236,    183,    121,\n     190,    229,     16,     92,\n     132,    183,    251,     34,\n     162,    102,     50,      9,\n     192,    149,    105,     60,\n     246,    192,    108,    171,\n     214,     24,     85,     98,\n     191,    238,     30,    181,\n     117,     69,      6,    244,\n     186,    121,     81,      3,\n     208,    162,    145,    205,\n     238,     36,    115,    141,\n     196,      8,     56,    149,\n      81,     54,    228,    175,\n     150,     65,     13,    238,\n      76,    132,    189,    251,\n      49,     68,    152,    175,\n     254,     43,    163,    106,\n      60,     15,    193,    150,\n     115,     34,    255,    196,\n     118,    169,    212,     31,\n      84,    119,    167,    227,\n     225,    184,    112,     68,\n      26,    212,    162,    124,\n      60,    247,     45,     84,\n     154,    198,    240,     62,\n      98,    156,     42,    244,\n     204,    158,     86,     52,\n     255,    176,    134,    172,\n     239,      8,     90,    150,\n     173,    255,     46,     85,\n     117,     53,      7,    196,\n     143,    123,     36,     14,\n     193,    147,    156,    217,\n      25,     40,    106,    176,\n     206,     24,     70,    130,\n      66,     10,    245,    161,\n     107,     75,     24,    217,\n      89,    138,    201,    249,\n      60,    110,    155,    195,\n       2,    207,    159,    106,\n      32,    250,    202,    132,\n      81,     33,     22,     77,\n     113,    191,    246,     21,\n      89,    132,     65,     29,\n     200,    182,    124,     48,\n       0,    211,    157,    147,\n     199,     17,     38,    121,\n     177,    222,     15,    193,\n     130,     71,     50,    248,\n     164,    146,     64,     16,\n     227,     86,    136,    174,\n     233,     60,     66,    156,\n     206,      6,    219,    143,\n     126,     43,    235,    217,\n     159,     89,     40,     14,\n      77,     97,    178,    198,\n       3,     88,    118,     77,\n      29,    243,    187,    110,\n      80,      1,    211,    167,\n     145,    195,    241,     32,\n     116,    150,    195,      4,\n      56,    150,     84,     37,\n     254,    181,    128,     81,\n      30,     20,     78,    119,\n     191,    229,     18,     89,\n     141,     66,     11,    212,\n     172,    126,     55,     14,\n     203,    103,    146,    193,\n      20,     41,     97,    174,\n     208,     12,    190,    129,\n      92,     12,    251,    166,\n     111,     67,     21,     26,\n      88,    155,    170,    224,\n      58,     82,    154,    198,\n       6,    194,    136,    119,\n      60,    233,    203,    151,\n      91,    220,      5,     77,\n     104,    189,    242,     27,\n      74,    129,     77,     29,\n     212,    167,    123,     75,\n      12,    212,     92,    148,\n     193,    247,     57,    109,\n     154,    210,    249,    193,\n     135,     82,     47,    250,\n     188,    130,     81,    224,\n      31,     68,    136,    189,\n     228,     37,     87,    118,\n      56,      3,    223,    171,\n      96,     62,      5,    205,\n     107,    149,    216,     12,\n      55,    120,    160,    217,\n     239,    190,    131,     88,\n      18,    239,    182,    122,\n      68,    236,     38,     81,\n     132,    200,    241,     46,\n      99,    149,     52,      1,\n     201,    146,    101,     40,\n     243,    192,    140,     88,\n     222,     21,     66,    120,\n     177,    229,    228,    177,\n     121,     68,     19,    221,\n     167,    141,    195,    246,\n      45,     96,    150,    203,\n       0,    202,    149,     96,\n      43,    247,    192,    142,\n      86,     34,     18,     70,\n     126,    179,    228,     26,\n      81,    122,     69,     16,\n     219,    166,    142,     60,\n       7,    210,    157,    104,\n      51,    254,    200,    149,\n      94,     42,    245,     63,\n     117,    168,    220,     17,\n      74,    127,    179,    230,\n      28,    175,    123,     64,\n      11,    222,    166,    114,\n      58,    249,     47,     96,\n     156,    200,      7,     51,\n     111,    160,    214,    245,\n     189,    137,     81,     36,\n     239,    181,    131,     77,\n     232,     28,     80,    132,\n     184,    242,     36,     90,\n     144,     58,      4,    209,\n     153,    100,     51,    253,\n     199,    109,    162,    214,\n      14,     67,    116,    170,\n     224,    234,    180,    129,\n      74,     23,    224,    173,\n     119,    189,    243,     38,\n      94,    147,    196,    250,\n      49,    101,    101,     49,\n     249,    197,    147,     94,\n      38,    242,     66,    119,\n     173,    227,     20,     73,\n     129,    180,     21,    224,\n     170,    116,     67,     14,\n     214,    162,    146,    199,\n     253,     48,    103,    155,\n     208,      5,    197,    144,\n     164,    217,     14,     67,\n     120,     82,     29,    232,\n     179,    129,    182,    235,\n      32,    170,    117,     65,\n      11,    214,    161,    108,\n      55,      2,    205,    103,\n     156,    208,      7,     58,\n     113,    164,    218,    240,\n     186,    135,     80,     29,\n     230,    179,    124,     72,\n      19,    222,     86,    138,\n     193,    244,     43,     94,\n     148,     54,      1,    204,\n     151,     98,     45,      7,\n     195,    142,     89,     36,\n     239,     69,    122,    175,\n     228,     25,     78,    131,\n      71,     18,    221,    168,\n     115,     62,      9,    212,\n     159,    106,     53,      0,\n     203,    150,     97,     44,\n       8,     61,    114,    167,\n     220,     17,     70,    123,\n      79,     26,    229,    176,\n     122,     71,     17,    220,\n     167,    141,    195,    246,\n      45,     96,    151,    203,\n       0,     53,    149,     97,\n      42,    247,    192,    141,\n      86,     34,     18,     70,\n     126,    179,    228,     26,\n      81,    133,    186,     16,\n     219,    167,    115,     62,\n       6,    211,    156,    104,\n     204,      1,     55,    106,\n     161,    212,     11,     63,\n     139,     86,     32,    237,\n     182,    128,     76,     25,\n     227,     81,    135,    185,\n     242,     39,     88,    141,\n     197,    249,    209,    157,\n     101,     48,    255,    202,\n     146,     95,     41,     11,\n      65,    116,    171,    222,\n      21,     72,    126,    179,\n      23,    227,    172,    121,\n      65,     15,    216,    165,\n     111,    197,    251,     45,\n     102,    155,    204,      2,\n      56,    146,     92,     41,\n     242,    188,    136,     85,\n      31,     21,     74,    126,\n     181,    232,     31,     83,\n     136,    189,    242,    216,\n     163,    110,     57,      4,\n     206,    154,    101,     48,\n     251,     57,    110,    163,\n     216,     13,     66,    136,\n      83,     30,    233,    180,\n     127,     74,     21,    224,\n      84,    137,    190,    243,\n      40,     93,    146,     56,\n       3,    206,    153,    100,\n      47,    250,    197,    111,\n     164,    217,     14,     67,\n     120,    173,    226,     23,\n      76,    126,     73,     20,\n     223,    171,    116,     65,\n      11,    214,     94,    147,\n     200,    252,     51,    103,\n     156,    209,    249,    196,\n     143,     90,     36,    240,\n     187,    134,     81,     28,\n      24,     77,    130,    183,\n     236,     33,     86,    139,\n     192,     10,    213,    160,\n     107,     54,      1,    204,\n     151,     98,     45,    248,\n      60,    113,    166,    219,\n      16,     69,    122,    175,\n     228,    230,    177,    124,\n      71,     18,    221,    168,\n     115,     62,      9,    212,\n      96,    149,    202,    255,\n     203,    150,     97,     44,\n     247,    194,    141,     88,\n      35,    238,    185,    123,\n     176,    229,     26,     79,\n     132,    185,    238,     35,\n     167,    114,     61,      8,\n     211,    158,    105,     52,\n     255,    202,    149,    159,\n     212,      9,     62,    115,\n     168,    221,    237,    184,\n     131,     78,     25,    228,\n     175,    122,     69,    239,\n      36,     89,    142,    195,\n     248,     45,     98,    151,\n     204,    254,    201,    148,\n      95,     42,    245,    192,\n     116,    169,    222,     19,\n      72,    125,    178,    231,\n     227,    174,    121,     68,\n      15,    218,    165,    112,\n      59,    249,     46,     99,\n     152,    205,      2,     55,\n     108,     94,     41,    244,\n     191,    138,     85,     32,\n     235,     73,    126,    179,\n     232,     29,     82,    135,\n      67,     14,    217,    164,\n     111,     58,      5,    208,\n     155,    153,    206,      3,\n      56,    109,    162,    215,\n      12,     65,    118,     84,\n      31,    234,    181,    128,\n      75,     22,     30,     83,\n     136,    189,    242,     39,\n     163,    110,     57,      4,\n     207,    154,    101,     48,\n     251,     57,    110,    163,\n     216,     13,     66,    119,\n     172,    225,     22,     75,\n     127,     74,     21,    224,\n     171,    118,     65,    243,\n     215,     93,    146,    199,\n     252,     49,    102,    155,\n     208,      5,    197,    144,\n      91,     38,    241,    188,\n     135,    173,    226,     23,\n      76,    129,    182,     20,\n      32,     85,    117,    191,\n     244,     41,    161,    108,\n      55,      2,    205,    152,\n      99,     46,    249,     59,\n     112,    165,    218,     15,\n      68,    134,     81,     28,\n      24,     77,    125,    183,\n     236,     33,     86,    139,\n     192,    245,     42,     95,\n     148,    201,    254,     51,\n     151,     98,     45,    248,\n     195,    142,     89,     36,\n     239,    186,    133,     80,\n      27,    230,     78,    131,\n     184,    237,     34,    168,\n     115,     62,      9,    212,\n     159,    106,     53,    255,\n      52,    105,    158,    211,\n       8,     61,    114,    167,\n     220,     17,     70,    123,\n     176,     26,    229,    176,\n     132,    185,    238,     35,\n      88,    141,    194,    247,\n      44,    158,    150,    203,\n     255,    202,    149,     96,\n      43,    246,    193,    140,\n      87,     34,    237,    184,\n     131,     78,     25,    228,\n      80,    133,    186,    239,\n      36,     89,    142,    195,\n     248,     45,     98,    151,\n     204,      1,     54,    107,\n     160,    213,     10,     63,\n     116,     86,     33,    236,\n     183,    130,     77,     24,\n     227,     81,    134,     68,\n      15,    218,    165,    112,\n      59,      6,    209,    156,\n     103,     50,    253,    200,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n      20,     73,    126,    179,\n     232,    226,     82,    120,\n      67,    241,    217,    164,\n     111,     58,      5,    208,\n     155,    102,     49,      3,\n      56,    109,    162,     40,\n      12,    190,    137,     84,\n      31,    234,    181,    128,\n      75,    233,    225,    172,\n     136,     66,    242,    216,\n      92,    145,    198,    251,\n      48,    101,    154,    207,\n       4,    198,    110,     92,\n     216,     13,    189,    136,\n      83,     30,    233,     75,\n     127,     74,     21,     31,\n      84,    137,     65,     12,\n     215,    162,    109,     56,\n     252,     49,    102,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     120,     82,     29,    232,\n     179,    129,     73,     20,\n      32,     85,    138,    191,\n     244,     41,     94,    147,\n      55,      2,    205,    152,\n     156,    209,      6,     59,\n     112,     90,     37,    240,\n     187,    134,     81,     28,\n      24,     77,    125,     72,\n     236,    222,    169,    116,\n      63,    245,     42,    160,\n     107,     54,    254,     51,\n     151,     98,    210,    248,\n      60,    142,    166,     37,\n      16,     64,    132,     82,\n      25,     26,     79,    127,\n      71,     19,    221,    169,\n     141,    195,      8,    212,\n      96,    149,    200,    250,\n      53,    147,    103,     47,\n     247,    194,    141,    164,\n     223,     16,    185,    121,\n     178,    229,     25,    176,\n     127,     67,     18,    221,\n     167,    140,    195,    246,\n      45,     96,    149,    201,\n       0,    202,    148,     97,\n      43,    246,    193,    140,\n     168,     34,    237,     71,\n     125,    177,     25,    228,\n      80,    133,     69,     16,\n      36,     89,    142,     60,\n       7,     45,    157,    104,\n      50,    254,    200,    148,\n     160,    213,     11,     63,\n     116,    169,    222,     18,\n     183,    128,     76,     24,\n     226,    174,    121,    187,\n     241,     36,     91,    143,\n      59,    249,     46,     99,\n     103,     50,    252,    201,\n     146,     94,     41,     11,\n      65,    117,    171,    222,\n     235,    182,    129,     77,\n      23,    227,    172,    135,\n     188,    240,     38,     91,\n     145,    197,    250,    209,\n     155,    153,    206,    252,\n     199,    146,    162,    215,\n      12,     65,    118,     84,\n      31,    234,    181,    128,\n     180,    233,    225,     83,\n     136,     66,     13,    216,\n      92,    145,    198,    251,\n      48,    154,    154,     48,\n     251,    198,    145,    163,\n      39,    242,    189,    136,\n     172,    225,     22,     75,\n     128,     74,    234,    224,\n     171,    118,     65,     12,\n     215,    162,    146,    199,\n     252,     49,    102,    155,\n     208,      5,     59,    110,\n     165,    216,     15,     67,\n     120,     83,     31,    234,\n     176,    122,     77,     23,\n     221,    170,    138,    188,\n     241,     46,     86,    155,\n     207,    248,     48,    152,\n     103,     38,    240,    205,\n     134,     93,     32,    244,\n      68,    123,    173,    228,\n      30,     75,    132,    180,\n     238,     32,    169,    116,\n      59,     14,    214,    162,\n     148,    203,    251,     49,\n     104,     96,     46,    248,\n     199,    141,     91,     32,\n     238,    186,    122,    173,\n     229,     25,    179,    124,\n      71,    239,     37,     95,\n     129,    207,    253,     34,\n      99,    111,     57,     13,\n     223,    130,    113,     35,\n     241,     63,    117,    169,\n     204,     30,     77,    125,\n     178,    229,    228,    179,\n     132,    186,    234,     38,\n      90,    141,     62,      3,\n     219,    145,    120,     57,\n     241,    207,    107,    151,\n     196,      6,     49,    121,\n     172,    220,    239,     71,\n     130,     78,    226,     31,\n      86,    134,    186,     21,\n     211,    175,     97,     50,\n       9,    222,    158,    150,\n     196,     13,     58,     96,\n     167,    208,      8,     60,\n     112,    171,    217,     21,\n      78,    121,     76,     30,\n     232,    165,    104,     86,\n       1,    215,    160,    143,\n     194,    245,     34,    111,\n     145,    197,      5,     50,\n     107,    164,    208,     12,\n      68,    119,     81,     43,\n     231,    185,    146,     92,\n      24,    233,    169,    134,\n     180,    253,     43,     80,\n     150,    192,    249,     43,\n      99,    159,    196,     10,\n      63,    104,     92,     33,\n     254,    174,    156,     71,\n      13,    228,    179,    127,\n     189,    231,     17,     94,\n     129,    186,    246,     34,\n      91,    151,    204,    242,\n      56,     96,    103,     58,\n     244,    212,    135,     73,\n      53,    252,    184,    117,\n     166,    241,      7,     68,\n     137,    176,    235,     31,\n      87,    139,    185,    251,\n      32,     85,    147,     60,\n       9,    195,    141,    112,\n      59,    235,    204,    145,\n     163,    212,      1,     76,\n     113,    170,    225,     20,\n      74,    133,    191,    224,\n      42,     92,    136,     68,\n       0,    217,    180,    123,\n      33,     22,    193,    156,\n     152,    220,     22,     43,\n     124,    173,    223,     11,\n      67,    124,    167,    232,\n      17,     71,    134,     74,\n      25,    208,    189,     99,\n      41,     28,    218,    167,\n     149,    195,    241,     60,\n     101,    151,    212,      1,\n      52,    118,    172,    215,\n      27,     78,    127,     80,\n      18,    233,    162,    101,\n      94,     10,    201,    162,\n     113,    198,    248,     59,\n     111,    153,    195,    248,\n      61,     96,    151,    216,\n       2,     55,    119,     88,\n      36,    224,    168,    156,\n      86,     13,    240,    188,\n     127,    188,    224,     51,\n      87,    128,    200,    255,\n      37,    104,    159,    192,\n      11,     63,    109,    157,\n      40,    251,    209,    152,\n      77,     53,    245,    169,\n     139,     78,    236,     21,\n      64,    138,    177,    231,\n      35,     81,    134,    202,\n     243,     39,    107,    145,\n     205,    249,    199,    133,\n      69,     48,    236,    214,\n     135,     82,    216,     30,\n      71,    109,    190,    236,\n      20,     89,    140,    179,\n     252,     46,     80,    134,\n     199,      7,    218,    140,\n     114,     46,    228,    209,\n     129,     87,     41,      0,\n      78,    100,    186,    211,\n      31,     78,    117,    186,\n     224,     17,     90,    142,\n     185,    241,    220,    180,\n     126,     32,     24,    201,\n     131,    107,     52,      7,\n      55,    124,    182,    199,\n       1,     74,    127,    160,\n     233,     30,     65,    119,\n     189,    235,    224,    160,\n      99,     84,     18,    196,\n     185,    120,     48,      5,\n      58,    116,    137,    219,\n      20,     52,    103,    170,\n     210,     10,     72,    126,\n     164,    231,     22,    176,\n     111,     94,     12,    255,\n     178,    110,     78,      9,\n      42,     83,    128,    210,\n     232,     33,    107,    146,\n     218,     12,     60,    102,\n     163,    222,     10,    189,\n     143,     65,      8,    244,\n     174,    102,     94,     31,\n     221,     83,    155,    172,\n     226,     61,     78,    159,\n     207,    247,     52,     97,\n     148,    212,      0,     59,\n     139,     87,     50,    231,\n     165,    156,     71,     14,\n     226,     76,    137,    163,\n     249,     54,     68,    132,\n     202,    253,     32,     90,\n     156,    193,    251,     53,\n     150,    100,     60,    224,\n     218,    145,     64,     49,\n     224,    185,    120,    161,\n     240,     15,     89,    146,\n     182,    229,     42,     95,\n     136,    201,    240,     46,\n      98,    111,     60,     21,\n     211,    140,    127,     58,\n     228,    200,    114,    160,\n     206,      4,     81,    109,\n     191,    233,     28,     71,\n     131,    189,    231,     38,\n      93,    140,     59,      4,\n     202,    137,    114,     40,\n     236,    216,    147,    158,\n     221,     29,     45,    100,\n     187,    211,     25,     66,\n     118,    183,    224,     17,\n      84,    128,     71,     24,\n     212,    188,    102,     33,\n      30,    192,    141,    107,\n     206,     13,     34,    127,\n     184,    199,      4,     54,\n     114,    163,    219,     27,\n      65,    121,    177,     29,\n     233,    186,     99,     92,\n      18,    204,    180,    124,\n      59,    252,     33,    119,\n     142,    219,     13,     58,\n     106,    166,    223,     15,\n      74,    115,    174,    222,\n     227,    189,    150,     85,\n      15,    255,    190,    105,\n      75,    240,     33,     73,\n     131,    211,    238,     34,\n     104,    159,    199,     11,\n      63,    102,    167,    211,\n     242,    183,    135,     78,\n       8,    240,    172,    145,\n      68,     18,     28,     88,\n     155,    169,    228,     54,\n      81,    152,    195,    242,\n      54,    109,    147,    204,\n       7,    195,    155,     79,\n      62,    228,    161,    157,\n      66,     18,    233,     79,\n     142,    161,    255,      9,\n      91,    133,    182,    244,\n      34,     91,    152,    192,\n     248,     48,    145,    105,\n      56,    226,    221,    138,\n      73,     54,    249,     67,\n     127,    188,    241,      2,\n      94,    141,    188,    237,\n      41,     93,    141,    181,\n     241,     45,    163,    101,\n      38,     26,    218,    131,\n     116,     60,    244,    198,\n     115,    168,    200,     28,\n      80,    119,    165,    235,\n      31,     71,    133,    188,\n     229,     39,     85,    113,\n      51,     28,    194,    186,\n     112,     34,     19,    196,\n     151,    154,    195,     20,\n      41,     99,    170,    210,\n      22,     76,    114,    167,\n     239,     30,     72,    125,\n      64,      3,    202,    176,\n     109,     38,     28,    218,\n     156,    151,    196,    236,\n      32,    125,    144,    216,\n      15,     53,    123,    175,\n     208,     24,     78,    120,\n      76,     17,    243,    165,\n     103,     93,      7,    201,\n     175,    115,    197,    230,\n      62,    116,    134,    199,\n       8,     51,     99,    151,\n     222,      2,     55,    116,\n     168,     36,    255,    173,\n     154,     80,     14,    243,\n     161,    126,    184,    225,\n      54,     77,    156,    206,\n     242,     43,    107,    159,\n     197,     13,     60,     97,\n     163,     40,    249,    212,\n     157,     73,     58,    244,\n     163,    133,     77,    237,\n      13,     66,    149,    181,\n     252,     34,     82,    134,\n     204,    244,     36,    105,\n     158,     50,    245,    218,\n     135,     66,     52,    237,\n     169,    128,     87,    216,\n      27,     88,    109,    189,\n     229,     21,     85,    140,\n     180,    252,     42,     81,\n     153,    199,      1,    223,\n     136,    125,     47,    230,\n     222,    157,     91,    213,\n       1,     81,    101,    164,\n     236,     31,     77,    117,\n     188,    226,     19,     89,\n     131,    185,     12,    212,\n     178,    118,     39,     31,\n     213,    136,    109,    207,\n      15,     54,    127,    172,\n     211,      7,     69,    125,\n     165,    234,     25,     71,\n     140,    178,    234,    233,\n     164,     99,     92,     16,\n     203,    183,    102,     58,\n     244,     63,    119,    148,\n     219,     15,     61,    100,\n     174,    210,      1,     79,\n     116,    165,    227,    239,\n     190,    109,     85,      8,\n     194,    188,    123,     69,\n     241,     37,     78,    156,\n     195,    244,     53,    108,\n     151,    221,     22,     53,\n     125,    172,    222,    245,\n     177,    151,     75,      6,\n     249,    165,    114,     79,\n     233,     42,     89,    134,\n     201,    253,     46,     86,\n     158,    194,    238,     61,\n     102,    151,    214,    252,\n     201,    158,     64,     62,\n     241,    162,    138,     87,\n     231,     19,     64,    142,\n     177,    234,     38,     94,\n     128,    204,    228,     59,\n     111,    158,    207,      4,\n     195,    135,    121,     53,\n     233,    213,    157,     80,\n     222,     25,     75,    113,\n     183,    227,     24,     70,\n     142,    180,    252,     51,\n      72,    129,    198,     11,\n     212,    143,    127,     44,\n     226,    220,    133,    104,\n     214,     14,     50,    122,\n     174,    217,     19,     79,\n     118,    191,    245,     10,\n      65,    136,    190,     18,\n     221,    183,    101,     36,\n      28,    198,    141,    110,\n     206,      7,     60,    110,\n     163,    212,     10,     55,\n     126,    185,    202,      0,\n      90,    113,    182,     27,\n     228,    191,    106,     83,\n      22,    200,    171,    116,\n     198,    255,     38,     96,\n     152,     51,      2,     48,\n     102,    179,    195,     31,\n      83,    121,    168,     35,\n     226,    164,    146,     91,\n       2,    242,    161,    121,\n     191,    247,     33,     91,\n     109,     57,      5,     40,\n     110,    138,    219,     23,\n      44,    103,    162,     42,\n     255,    175,    155,     67,\n      13,    228,    188,    128,\n     183,    236,     28,    175,\n     115,     70,    243,     32,\n      80,    132,    211,    238,\n      34,     98,    154,     52,\n     246,    201,    128,     79,\n      41,    248,    185,    119,\n     175,    227,    235,    179,\n     120,     73,    233,     22,\n      68,    156,    168,    230,\n      39,     89,    108,     48,\n      13,    193,    137,    106,\n      37,    255,    196,    110,\n     165,     36,    246,    183,\n     143,     81,    225,     28,\n      94,    151,    160,    248,\n      43,     87,    113,     74,\n       5,    217,    172,    102,\n      50,      3,     51,    100,\n      99,     43,    240,    207,\n     136,     90,    223,      1,\n      87,    108,    187,    236,\n      30,    179,    122,     68,\n      30,    211,    163,    114,\n      61,    245,     40,     94,\n     111,     63,     12,    192,\n     146,    156,    219,     22,\n      40,    100,    181,    208,\n      19,    185,    140,     92,\n      22,    236,    183,    125,\n     186,    238,     38,    169,\n     123,     51,      6,    223,\n     155,    151,    198,    238,\n      32,    124,    142,    219,\n       8,    196,    135,     85,\n      47,    230,    189,    123,\n     178,    230,     27,    181,\n     112,     73,     30,    212,\n     166,    139,    210,    227,\n      59,    121,    135,    195,\n     253,    195,    152,    112,\n      38,    255,    196,    115,\n     171,    216,     16,    188,\n     137,     64,     18,    225,\n      80,    140,    170,    253,\n      49,     75,    133,    194,\n       0,    217,    147,    102,\n      56,    248,    201,    104,\n     165,    208,     10,    198,\n     135,     89,     42,    233,\n      73,    119,    162,    244,\n       9,     64,    141,    187,\n       8,    209,    171,    125,\n      51,      2,     46,     96,\n     157,    201,    252,    207,\n     156,     81,     32,    247,\n      68,    120,    184,    203,\n       1,     89,    118,     79,\n      30,    239,    189,    117,\n      75,     13,     38,     95,\n     149,    198,      4,    216,\n     149,    106,     54,    253,\n      62,     96,    179,    196,\n      30,     76,    115,     80,\n      22,    230,    184,    138,\n      77,     20,     31,     87,\n     140,    191,     14,    210,\n     173,    100,     60,    251,\n      56,    107,    138,    221,\n      20,     51,    111,     90,\n      46,    254,    182,    128,\n      87,     30,     20,     79,\n     132,    181,     19,    236,\n     166,    126,     69,    241,\n      33,     83,    130,    215,\n     241,     54,    152,     98,\n      38,    240,    204,    149,\n      89,    216,     10,     71,\n     123,     80,     20,    228,\n     185,    121,     75,    239,\n      43,     91,    154,    177,\n     252,     43,    162,    106,\n      48,      5,    200,    154,\n     156,    213,      2,     56,\n     142,     82,     46,    251,\n     178,    131,    174,    229,\n      19,     67,    143,    191,\n     238,    223,    173,    113,\n      59,      9,    213,     94,\n     144,    205,    252,    207,\n     159,    105,     39,    241,\n     197,    143,    165,    211,\n      28,     78,    125,    173,\n      27,    228,    178,    126,\n      70,    237,     33,     82,\n     138,    194,     11,    211,\n     150,     99,     61,      6,\n     200,    105,    154,    212,\n      14,     62,    115,    167,\n      35,     17,     71,    121,\n     179,    227,     29,     74,\n     134,     69,     22,    212,\n     175,    122,     59,     12,\n     210,     96,    148,    201,\n       1,     53,    106,    158,\n     214,     13,     59,    116,\n     160,    213,     20,     70,\n     128,     72,     17,    237,\n     167,    114,     66,     21,\n     216,    167,    142,    193,\n     250,     46,    102,    145,\n     203,      9,     62,    108,\n     165,    214,    245,    193,\n     136,     83,     38,    229,\n     189,    137,     68,     30,\n     225,    174,    132,    190,\n     247,     44,     80,    133,\n     204,    255,     44,     99,\n     152,    205,    253,    202,\n     151,     86,     37,    249,\n     180,    130,     80,     33,\n      22,     79,    116,    191,\n     227,     20,     86,    135,\n      66,     14,     38,     90,\n     145,     58,      6,    215,\n     147,    111,     57,    251,\n     195,    146,    161,    208,\n       6,     74,    113,    170,\n      29,    233,    180,    128,\n     181,    235,     30,    172,\n     118,     67,     15,    219,\n     167,    109,     56,    249,\n      54,     98,    159,    206,\n     249,    194,    148,     89,\n      36,    243,    188,    136,\n     172,    226,     21,     73,\n     129,    180,    235,     29,\n      80,    140,    189,     13,\n     211,    164,    107,     62,\n       6,    202,    157,     96,\n      46,      7,     63,    106,\n     161,    220,     11,     69,\n     127,    170,    230,    233,\n     182,    120,     79,     19,\n     217,    172,    115,     70,\n       8,     41,     92,    144,\n     205,    251,     53,    111,\n     148,    214,      5,    197,\n     138,     92,     34,    247,\n     189,    131,     84,     24,\n     230,     76,    128,    180,\n     239,     37,     83,    141,\n     199,    240,     43,    162,\n     111,     51,      4,    201,\n     146,    103,     41,    249,\n      63,    119,    161,    221,\n      22,     64,    127,    172,\n     228,    228,    183,    123,\n      64,     20,    219,    174,\n     117,     58,      8,     40,\n     103,    156,    192,    244,\n      63,     99,    153,    208,\n     245,    202,    129,     86,\n      46,    226,    179,    141,\n      72,     25,     24,     72,\n     143,    181,    224,     44,\n      87,    128,    203,    244,\n     208,    151,    100,     58,\n     240,    197,    154,    109,\n      35,    244,     58,    122,\n     165,    205,      3,     85,\n     108,    189,    227,    229,\n     168,    113,     72,     29,\n     214,    168,    124,     54,\n       2,    210,     97,    159,\n     192,     14,     39,    123,\n     173,    221,     10,    197,\n     130,     93,     45,    225,\n     186,    137,     74,     25,\n      30,     87,    143,    176,\n     253,     40,     86,    134,\n     199,      5,    214,    150,\n     108,     57,    241,    196,\n     153,     91,    214,     14,\n      72,    126,    167,    208,\n      27,     69,    121,    179,\n      17,    233,    160,    118,\n      77,      0,    213,    172,\n     110,    193,    243,     35,\n     106,    150,    193,     13,\n      51,    104,     93,     46,\n     249,    178,    132,     90,\n      16,    231,    188,    131,\n     183,    224,     19,     67,\n     153,    173,    255,     47,\n      93,    107,     48,     15,\n     195,    150,    105,     60,\n     242,    195,    145,    167,\n     208,      6,     79,    121,\n     160,    235,     19,    181,\n     121,     67,     31,    235,\n     160,    125,     73,     15,\n      40,     88,    155,    204,\n     241,     60,    109,    156,\n     209,    254,    204,    154,\n      80,     44,    248,    180,\n     130,     82,    225,     17,\n      70,    141,    184,    229,\n      44,     82,    139,     70,\n       6,    198,    176,    124,\n      57,      9,    203,    103,\n     155,    220,     23,     40,\n      98,    181,    214,      9,\n     187,    143,     65,      8,\n     243,    163,    115,     66,\n      21,    222,     80,    135,\n     209,    230,     57,     78,\n     153,    206,      1,    196,\n     154,    115,     60,    232,\n     206,    132,     92,     36,\n      21,     79,    116,    160,\n     235,     23,     68,    135,\n      69,     26,    214,    165,\n     126,     50,      3,    211,\n     156,    148,    205,    245,\n      57,    100,    146,    218,\n      12,    192,    133,     84,\n      46,    226,    179,    131,\n      76,    229,     30,     71,\n     143,    181,    226,     47,\n      82,    139,    195,     13,\n     217,    144,    121,     59,\n     243,    194,    150,    157,\n     211,      2,     48,    124,\n     166,    209,     26,     68,\n     129,     73,     18,    233,\n     161,    119,     79,     23,\n     216,     89,    139,    203,\n     243,     33,    110,    156,\n     196,      2,    200,    146,\n      86,     33,    249,    203,\n     130,     80,     32,     17,\n      78,    116,    185,    236,\n      22,     89,    131,    186,\n      12,    220,    173,    121,\n      50,     14,    215,    159,\n     103,    206,      4,     63,\n     101,    168,    222,     14,\n      66,    139,     81,     39,\n     226,    191,    137,     75,\n      19,    227,     83,    131,\n     187,    248,     47,     82,\n     151,    193,    251,    210,\n     159,     97,     57,    244,\n     192,    148,     94,     41,\n      13,     66,    112,    172,\n     232,     18,     76,    124,\n     180,     20,    229,    170,\n     127,     74,     10,    221,\n     161,    110,    199,    248,\n      52,     99,    156,    201,\n       1,     58,    111,     93,\n      36,    246,    184,    141,\n      86,     29,    232,     75,\n     129,    182,    233,     27,\n      80,    141,    189,    241,\n      40,    162,    111,     59,\n       7,    202,    157,    102,\n      46,      5,     59,    109,\n     167,    218,     13,     65,\n     120,     82,     28,    234,\n     176,    125,     74,     22,\n     222,    170,    138,    189,\n     247,     45,     90,    151,\n     203,    252,    205,    153,\n      97,     45,    253,    192,\n     140,     88,     36,     15,\n      69,    123,    173,    224,\n      28,     73,    129,    181,\n     236,    222,    171,    119,\n      59,     14,    209,    163,\n     105,     55,    254,     50,\n     106,    158,    214,      3,\n      63,    115,    167,    219,\n     238,    184,    134,     83,\n      24,    229,    179,    124,\n     184,    236,     32,     85,\n     143,    194,    244,     42,\n      96,    106,     52,      1,\n     201,    148,     99,     45,\n     247,    194,    114,    166,\n     222,     19,     68,    122,\n     177,    229,    229,    177,\n     122,     68,     19,    222,\n     165,    115,     61,    247,\n      45,     99,    148,    201,\n       2,     55,    107,    159,\n     212,    246,    192,    142,\n      85,     32,    239,    186,\n     130,     78,    230,     26,\n      81,    135,    184,    237,\n      37,     88,    142,     60,\n       7,    210,    156,    105,\n      50,    255,    200,    149,\n      95,     42,     10,     63,\n     117,    168,    223,     18,\n      73,    125,    178,     24,\n     227,    174,    121,     68,\n      15,    218,    165,    112,\n      59,      6,     46,     99,\n     152,    205,      2,    200,\n     147,     94,     41,    244,\n     191,    138,     85,     32,\n     235,    182,    129,     76,\n     232,     29,     82,    135,\n     188,    241,    217,    164,\n     111,     58,      5,    208,\n     100,    153,    206,      3,\n      56,    109,    162,    215,\n      12,    190,    137,     84,\n      31,    234,    181,    128,\n      75,     22,    225,    172,\n     119,     66,     13,     39,\n      92,    145,    198,    251,\n     207,    154,    101,     48,\n       4,     57,    110,    163,\n     217,     13,     66,    119,\n     172,    225,    233,    180,\n     127,     74,     21,    224,\n     171,    118,     65,    243,\n      40,     93,    146,    199,\n     252,     49,    102,    155,\n      47,    250,    197,    144,\n      90,     39,    240,    189,\n     135,     82,    226,     23,\n      77,    128,    183,    234,\n      33,     85,    138,     64,\n      11,    214,    160,    109,\n      54,      2,    205,    152,\n     156,    209,      7,     58,\n     113,    164,    219,     15,\n      68,    134,     81,     29,\n     230,    179,    124,     73,\n      18,    222,     86,    138,\n     193,    244,     43,     94,\n     148,     54,      1,    204,\n     150,     99,     44,    249,\n     195,    142,     89,    219,\n      16,     68,    123,    174,\n     229,     24,     79,    131,\n     184,     18,    221,    169,\n     114,     63,      8,    213,\n     159,    106,    202,    255,\n      53,    104,    159,    210,\n       9,     60,    114,    167,\n      35,    238,    184,    133,\n      78,     27,    228,    176,\n     123,    185,    238,     35,\n      88,    141,    194,    247,\n      44,     97,    105,     52,\n     255,    202,    149,     96,\n      43,    246,    193,    115,\n     168,    221,     18,     71,\n     124,    177,    230,     27,\n     175,    122,     69,     16,\n     219,     89,    142,    195,\n     248,     45,     98,    151,\n     204,      1,     54,    107,\n      95,     42,    245,    192,\n     139,     86,     33,    236,\n     183,    125,    178,    231,\n      28,     81,    134,    187,\n     240,    218,    165,    112,\n      59,      6,    209,    156,\n     103,     50,    253,     55,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n     235,    182,    129,     76,\n      23,     29,     82,    135,\n     188,    241,     38,     91,\n     144,    197,      5,    208,\n     155,    102,     49,    252,\n     199,    146,     93,     40,\n     243,    190,    118,    171,\n     224,     21,     74,    127,\n     180,     22,    225,    172,\n     119,     66,     13,    216,\n     163,    110,     57,    251,\n      48,    101,    154,    207,\n       4,     57,    110,     92,\n      39,    242,    189,    136,\n      83,     30,    233,     75,\n     128,    181,    234,     31,\n      84,    137,    190,    243,\n      40,     93,    109,     56,\n       3,    206,    153,    100,\n      47,    250,    197,    111,\n     164,    217,     14,     67,\n     120,    173,    226,    232,\n     179,    126,     73,     20,\n     223,    170,    117,    191,\n     244,     41,     94,    147,\n     200,    253,     50,    103,\n     156,     46,    249,    196,\n     143,     90,     37,    240,\n     187,    134,     81,    227,\n      24,     77,    130,    183,\n     236,     33,     86,    139,\n      63,     10,    213,    160,\n     107,     54,    254,     51,\n     104,    157,    210,      7,\n      60,    113,    166,    219,\n      16,     69,    122,    175,\n     228,    230,    177,    124,\n      71,     18,    221,    168,\n     115,    193,    246,     43,\n      96,    149,    202,      0,\n     203,    150,    158,     44,\n     247,    194,    141,     88,\n      35,     17,     70,    123,\n      79,     26,    229,    176,\n     123,     70,     17,    220,\n     167,    141,    194,    247,\n      44,     97,    150,    203,\n       0,     53,    149,     96,\n     212,      9,    193,    140,\n     168,    221,     18,    184,\n     131,     78,     25,     27,\n      80,    133,    186,    239,\n      36,    166,    113,     60,\n     248,    210,    157,    151,\n     204,      1,     54,    148,\n     160,    213,     10,    192,\n     139,     86,     33,    236,\n      72,    125,    178,    231,\n     227,    174,    121,    187,\n     240,     37,     90,    143,\n     196,    249,     46,    156,\n     103,     50,    253,    200,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n      20,     73,    126,     76,\n     232,    226,    173,    120,\n      67,     14,    217,     91,\n     144,    197,    250,    208,\n     155,    102,     49,    252,\n     199,    146,     93,    215,\n      12,     65,    118,    171,\n      31,    234,    181,    128,\n     180,    233,     30,     83,\n     136,    189,    242,    216,\n     163,    110,    198,      4,\n      48,    154,    154,    207,\n       4,     57,    110,    163,\n     216,     13,     66,    119,\n     172,     30,    233,    180,\n     127,    181,     21,    224,\n      84,    137,     65,     12,\n     215,    162,    109,    199,\n     252,     49,    102,    100,\n     208,      5,    197,    111,\n     164,    217,     14,    188,\n     135,     82,     29,    232,\n     179,    126,     73,    235,\n      32,     85,    138,    191,\n     244,     41,     94,    108,\n     200,      2,     50,    103,\n      99,     46,    249,    196,\n     143,     90,     37,    240,\n     187,    121,    174,     28,\n      24,    178,    130,     72,\n      19,    222,     86,    116,\n      63,     10,     42,     95,\n     148,    201,      1,     51,\n     104,    157,    210,    248,\n      60,    142,    166,     37,\n      16,     68,    135,    175,\n     228,    230,     78,    131,\n      71,     18,     34,    168,\n     140,    193,      9,     43,\n     159,    106,    202,      0,\n      52,    150,     97,    211,\n       8,    195,    114,    164,\n      35,    236,    184,    123,\n     176,    229,     26,    177,\n     123,     70,     17,     34,\n      88,    114,     61,      8,\n     211,     97,    150,    203,\n     255,    202,    106,    159,\n     212,    246,     62,    115,\n      87,    221,     18,     71,\n     124,     78,     25,    228,\n      80,    122,     69,     16,\n     219,     89,    113,    195,\n     248,    210,     98,    104,\n      51,      1,     54,    148,\n      95,    213,     10,     63,\n     116,    169,    222,    236,\n      72,    130,    178,    231,\n      28,    174,    134,    187,\n     240,    218,    165,    143,\n      59,    249,     46,    156,\n     152,     50,      2,    200,\n     147,    161,     41,     11,\n     191,    138,     85,     32,\n     235,    182,    126,     76,\n      23,     29,    173,    135,\n      67,    241,    217,     91,\n     144,     58,    250,    208,\n     100,    153,    206,      3,\n      56,    146,    162,    215,\n     243,    190,    118,    171,\n     224,     21,    181,    127,\n     180,     22,     30,    172,\n     119,    189,     13,     39,\n      92,    110,     57,    251,\n     207,    154,    154,     48,\n     251,     57,    145,     92,\n     216,    242,    189,    119,\n      83,     30,     22,    180,\n     127,    181,     21,     31,\n     171,    137,     65,    243,\n     215,     93,    146,     56,\n       3,    206,    102,    100,\n     208,    250,     58,    144,\n     164,    217,    241,     67,\n     135,     82,    227,     23,\n     177,    129,    183,     20,\n      32,    170,    117,    191,\n      11,    214,     94,    147,\n     200,    253,     50,    153,\n     157,     46,    249,     58,\n     142,    165,    218,    240,\n     187,    121,     81,    227,\n      24,    178,    130,    183,\n      19,     33,     86,    116,\n     192,     10,    213,     95,\n     107,     54,    254,     51,\n     151,    157,    210,    248,\n      60,    113,     88,    219,\n      16,    186,    123,     80,\n      27,     25,    177,    131,\n     184,     18,    221,     86,\n     115,     63,    247,    212,\n     159,    149,     53,      0,\n      52,    105,     97,    210,\n     247,    195,    114,    167,\n      35,     17,    184,    123,\n     176,    229,    229,    176,\n     132,     70,     17,     35,\n      88,    141,    194,      8,\n      44,     97,    105,    203,\n       0,    202,    149,    158,\n      43,    246,    193,    115,\n     168,     34,     18,     71,\n     131,     78,     25,     27,\n     175,    122,    186,     16,\n      36,    166,    113,    195,\n       7,    210,     98,    151,\n      51,    254,    201,    107,\n      94,    212,     10,    193,\n     116,     87,    222,     18,\n     183,    125,    178,     25,\n     227,    174,    134,    186,\n     240,    219,    165,    142,\n      59,    249,     46,    156,\n     102,    205,      2,    201,\n     108,    161,     41,    244,\n      64,    138,     85,    222,\n     234,    182,    127,     77,\n     233,     29,    173,    135,\n     188,     14,     39,    164,\n     110,    196,      5,    208,\n     101,    103,     49,      2,\n     198,    146,    163,     40,\n     243,     64,    136,     84,\n     224,    234,    181,    127,\n      75,     22,     30,    173,\n     119,    188,     13,    216,\n      92,    111,    198,    251,\n     206,    101,    154,     49,\n     251,     57,    145,    163,\n     216,    242,    189,    136,\n     172,    225,     22,    180,\n     127,     74,     21,     31,\n      84,    118,    190,     12,\n     215,     93,    146,    199,\n     252,    206,    153,    155,\n      47,      5,     58,    144,\n     164,     38,    241,     67,\n     120,    173,     29,    232,\n     179,    126,    182,     20,\n      32,    170,    117,    191,\n      11,     41,     94,    108,\n     200,    253,    205,    103,\n     156,     46,    249,     59,\n     143,     90,    218,    240,\n      68,    121,     81,     28,\n      24,    178,    130,    183,\n      19,    222,     86,    116,\n      63,    245,    213,    160,\n     148,     54,      1,     51,\n     150,     98,    210,    248,\n      60,    112,    166,    218,\n      17,    186,    123,    174,\n     228,     25,     78,    124,\n      71,     18,    217,    172,\n     119,     54,     13,     43,\n      97,    147,    193,    244,\n      63,     98,    154,    211,\n     246,    203,    132,     80,\n      43,    230,    191,    132,\n      76,     26,    229,     79,\n     136,    181,    231,     41,\n      92,    115,     56,      9,\n     218,    144,    105,     62,\n     246,     63,    102,    157,\n     222,     14,    205,    139,\n      81,     37,     23,     78,\n     126,    185,    226,    226,\n     171,    125,     73,     26,\n     221,     89,    134,    205,\n     239,     61,    104,    148,\n      52,    237,    222,    156,\n      92,    213,      2,     52,\n     112,    168,    221,    234,\n     189,    134,     79,    229,\n      23,     65,    149,    182,\n     243,    216,    170,    104,\n      36,     26,    209,    100,\n     139,    210,     19,     53,\n     111,     88,     50,    230,\n     186,    131,    172,    199,\n       1,     90,    114,     77,\n      29,    243,    183,     92,\n      86,    249,     48,     65,\n     139,    213,      1,    219,\n     148,    117,     60,    245,\n      57,    125,    182,    196,\n      29,     73,    143,     92,\n      21,    252,    149,    148,\n     186,    241,     11,     69,\n     129,     73,     31,    211,\n     168,    100,     56,      4,\n      61,    117,    150,    192,\n      12,    198,    147,     94,\n      55,    232,    160,    138,\n     181,    241,     24,     69,\n     127,     69,     29,    226,\n     172,    114,     67,      9,\n      42,     90,    157,    214,\n     243,     61,    101,    111,\n      53,    216,    229,    107,\n     179,    213,      5,     79,\n     131,     94,    224,     21,\n     182,    123,     64,     27,\n     217,     94,    144,    164,\n     239,     38,    166,    116,\n      22,     47,    215,    113,\n     128,    193,     22,     51,\n     158,     85,    218,    241,\n     190,    131,     87,     26,\n      26,     84,    168,    149,\n     255,     33,    176,     93,\n      24,     39,    219,    119,\n     179,    216,    245,    201,\n     139,    108,    211,      6,\n      60,    136,     92,    219,\n      20,     94,     85,    180,\n     231,    234,    146,     81,\n      88,     50,    217,     96,\n     161,    203,    247,    218,\n     190,    101,    204,    250,\n      54,    144,    107,     45,\n      14,     32,     65,    187,\n      37,    248,    156,    162,\n      91,     12,    227,    125,\n     180,    187,     28,    204,\n     188,     99,    204,    230,\n      37,    150,    123,    202,\n      14,     41,     69,    130,\n      36,    212,    223,    149,\n      89,     41,    231,     90,\n      76,    185,     13,    244,\n     191,    105,    179,    247,\n      40,    170,    102,     62,\n     245,     52,     73,    137,\n      34,    218,    211,    159,\n      92,     42,    249,    192,\n      82,    188,     55,    251,\n     176,    140,     79,    242,\n      14,    166,     98,     64,\n     232,     60,     71,    146,\n      50,     47,    203,    102,\n     157,     49,    244,    209,\n     110,    133,    208,    238,\n     180,    142,     89,    215,\n      13,     78,    149,     67,\n     253,     63,     64,    136,\n     184,     20,    199,     92,\n     133,     62,      9,    207,\n     190,    142,    227,    248,\n     208,    147,     87,     34,\n      25,     88,    136,     71,\n      31,     14,     91,    127,\n     189,     23,    251,    164,\n     147,    183,     30,    197,\n     146,    127,    242,    222,\n     222,    149,    102,     33,\n     251,     37,    126,     85,\n      41,      5,     90,    113,\n      82,    228,    235,    190,\n     139,    172,     18,    193,\n     136,     91,     67,    179,\n      15,    182,    123,     53,\n      19,     55,    122,    148,\n      42,    240,     57,    124,\n     165,     35,      1,     69,\n     142,    165,    240,    253,\n     153,     96,    109,    224,\n     109,    114,    107,     99,\n       5,    223,     86,    136,\n     219,      2,    221,    103,\n     142,     45,      5,     33,\n     121,     93,    220,     10,\n     155,    172,     74,      2,\n       0,      0,    149,    102,\n      63,    210,    169,    132,\n     223,    237,    215,    184,\n     105,    221,    252,     59,\n     114,    145,     36,    254,\n     195,    145,    124,     43,\n     244,     85,     49,    183,\n      46,    215,    179,    137,\n     172,    207,     55,    171,\n     111,     53,    229,     38,\n     111,    130,    192,     16,\n     219,    147,    125,     55,\n     240,    216,    114,    231,\n     255,    194,    139,    133,\n     190,    234,      1,     85,\n     129,     91,      5,     52,\n      66,    134,    205,    240,\n     202,    131,    108,     56,\n     239,    203,    132,    113,\n     243,     39,    215,    185,\n      92,    200,      1,     81,\n      96,    186,      2,    250,\n      64,    158,    188,    229,\n      45,    183,    110,     52,\n     248,    214,     98,    103,\n      27,    251,      4,    124,\n     123,     61,     30,     43,\n     125,    189,    204,    224,\n     148,    132,    145,    255,\n      29,     81,    112,     93,\n       2,     44,     92,    117,\n      43,     45,    241,     68,\n     163,     50,    225,     55,\n     102,     94,    222,     24,\n      74,    154,     68,    208,\n       6,     76,    129,     69,\n       4,    236,     81,    137,\n     185,      1,    251,    142,\n     147,    133,    211,    223,\n     129,    109,     54,      3,\n      32,     76,    168,     48,\n     226,     76,    124,     82,\n      21,    238,    176,    130,\n     191,    227,    231,    181,\n      81,     88,    238,     28,\n      79,    115,     27,     14,\n      52,    124,    177,    239,\n     242,    239,    156,    179,\n     217,    255,     64,    103,\n     172,     28,     30,     77,\n     109,    111,     49,    236,\n     122,    179,    190,     39,\n     202,     89,    129,    227,\n     219,     55,    176,     73,\n     209,     23,     56,    106,\n     181,    223,    253,    191,\n     113,     87,      6,    202,\n     170,    139,    143,    194,\n     202,    154,    101,    175,\n     232,     13,     72,    124,\n       3,     23,     42,    118,\n      99,    214,     23,    192,\n     157,     91,    210,    248,\n     160,    157,     67,    244,\n      33,     94,     88,    109,\n     238,     53,     77,    149,\n     196,     21,    241,    161,\n     135,    194,    249,     56,\n     107,    112,     38,     10,\n      55,    131,     66,     56,\n     224,     96,     67,    173,\n      48,    253,     71,    150,\n     162,    255,    222,    180,\n     105,    199,    249,     41,\n      99,    153,     48,     19,\n      52,    121,    156,     58,\n     234,    223,    137,    149,\n     236,    226,    146,    137,\n     191,    244,     12,     95,\n     124,     90,      4,     32,\n      84,    128,    201,    244,\n     216,    148,    156,    198,\n     248,    208,    139,    124,\n     196,     54,     35,    172,\n     127,     33,     29,     81,\n     107,    184,     21,    251,\n     161,    140,    180,    229,\n      44,    166,    125,     63,\n     243,     39,    149,    117,\n      18,    242,     17,     89,\n      95,      3,    233,     54,\n      97,    190,    205,     16,\n     162,    161,     68,    244,\n      10,     88,    120,     67,\n       7,     32,     84,    139,\n      41,     39,    240,     96,\n     174,    232,    234,    228,\n     155,    179,    194,     24,\n      76,    130,     75,     52,\n      19,     93,    111,    182,\n      17,    235,    174,    143,\n     183,     13,    192,    130,\n     120,    228,    192,     39,\n     188,    123,    200,     18,\n      42,    127,    164,     38,\n     238,    181,    100,    177,\n     231,    226,    188,    133,\n     183,    226,     26,    160,\n      87,    107,     12,     29,\n     112,    124,     18,     10,\n      62,    113,    136,    196,\n     249,    210,    133,    163,\n     204,     30,     66,    130,\n      87,     31,     23,     78,\n     125,     83,     63,    243,\n     115,    177,    186,     36,\n     204,     91,    129,    214,\n     240,     54,    147,    120,\n      35,     17,     39,    105,\n      87,     33,    242,     67,\n     125,    173,     17,    200,\n     145,    143,    138,    244,\n     194,    130,    112,    173,\n     224,     36,     82,    147,\n      32,     23,     57,    120,\n     145,     39,    244,    195,\n     142,    167,    216,    246,\n     162,    163,    175,    208,\n      61,    162,     88,     69,\n     230,     48,     88,    134,\n     197,     27,    194,     93,\n     143,    216,      7,    193,\n     145,     98,     45,    250,\n     192,    128,    120,     47,\n      56,    108,    129,    112,\n       8,     26,     94,    146,\n     182,    229,    209,    190,\n     114,    217,    228,    215,\n     148,    108,     54,      3,\n     206,    149,    107,     50,\n     252,     25,     87,     93,\n      63,    229,     64,    112,\n     187,    232,     22,    183,\n     109,     66,    249,     54,\n     164,    124,     59,      8,\n     208,    150,    111,     60,\n     231,    195,     72,    190,\n      33,    235,    198,    122,\n     161,    216,     24,     74,\n     133,     90,     26,      2,\n      68,    127,     85,     23,\n      36,    165,    123,     54,\n      15,    197,    154,    179,\n     237,    242,    214,    144,\n     175,    217,      9,     56,\n     120,     87,     48,    238,\n      95,    110,     78,      8,\n     234,     81,    134,     72,\n      30,    214,    181,    138,\n     226,    225,    197,    131,\n     102,    220,     12,     52,\n     111,    166,     43,    255,\n      66,     96,    187,     34,\n     251,    186,    129,    178,\n      24,    246,    189,    113,\n     169,    212,     33,    184,\n     119,    193,    233,     32,\n      96,    154,    206,    250,\n     199,     98,    172,    211,\n     242,    183,    132,     81,\n     224,    231,    173,    152,\n     178,    199,      3,    185,\n      82,     69,    252,     53,\n      86,    146,    198,     12,\n     202,    107,    143,    203,\n     254,    199,    148,     81,\n      33,    241,    178,    151,\n      71,    194,     35,     73,\n      84,     80,    230,     11,\n      89,    140,    186,      9,\n     219,     90,    143,    214,\n       4,    197,    152,    103,\n      39,    242,    204,    133,\n     123,    209,     58,     94,\n     158,    122,     26,      6,\n      89,    136,    181,     23,\n     209,    168,    144,    162,\n     247,    217,    170,    110,\n      53,      5,    193,    138,\n     127,     47,     42,     36,\n     158,    121,     44,      8,\n      73,    118,    165,     30,\n     242,    186,    158,    145,\n     230,    211,    165,    114,\n      60,      9,    221,    180,\n      74,     53,    204,     23,\n     129,     75,     41,     22,\n      54,    114,    173,    211,\n     248,    175,     99,    128,\n     244,    247,    190,    121,\n      67,     20,    219,    185,\n      86,     59,    194,     13,\n     136,     71,     50,    236,\n      37,    104,    156,    213,\n     229,    214,    102,    137,\n     200,    224,    170,    130,\n      78,     31,    224,    162,\n      89,    189,    192,     59,\n     190,     82,     60,    249,\n      39,     97,    147,     52,\n     235,    207,     74,    184,\n     211,    248,    204,    139,\n      86,     33,    232,    163,\n     150,    171,    249,    237,\n     178,    120,    181,    229,\n      39,    162,    114,     53,\n      13,     34,     74,    139,\n      53,    234,    198,    145,\n     165,    209,    251,    223,\n     115,    129,    220,    198,\n     175,    104,    174,    234,\n     230,    164,    107,     94,\n     243,      8,    116,    136,\n      40,     16,    194,    148,\n     145,    199,    238,    194,\n     114,    174,      1,    223,\n      72,    107,    179,    212,\n     233,    162,    166,     66,\n     201,     46,     79,    135,\n      82,     18,    192,    160,\n     157,    197,    254,     48,\n     107,     65,      9,    244,\n      35,     77,    180,    210,\n     253,    151,    149,    190,\n     208,     10,     77,    133,\n      90,     12,    245,    171,\n     119,    166,    223,     46,\n     136,     93,     55,    244,\n      40,    124,    139,     58,\n     208,    220,    123,    134,\n     194,      4,    184,    135,\n      67,     18,    250,    191,\n     163,    131,    239,    210,\n     129,    114,    178,    225,\n      59,     86,    120,     30,\n       6,     42,    124,    139,\n     213,    243,    203,    148,\n      93,     59,    242,    119,\n      82,     75,     41,    230,\n      71,    139,    191,    251,\n      32,    140,     85,    180,\n     214,     52,     80,    102,\n      45,      4,     61,    145,\n     120,    197,     62,     48,\n     190,    124,    222,     29,\n      87,    107,    175,     60,\n     195,    182,    147,    161,\n     247,     45,    191,    107,\n     193,    250,    217,     92,\n     190,    208,     27,    231,\n     133,    153,    202,     38,\n      50,    146,    115,     46,\n      25,     67,    106,    184,\n      27,    253,    165,    131,\n     186,    255,      0,     88,\n     103,     35,      4,    211,\n     105,    181,    210,     15,\n     232,    155,    150,    217,\n      13,    198,    135,     89,\n     218,    232,    182,    109,\n     150,    230,    253,    189,\n     122,     66,    228,     59,\n      82,    102,     40,    246,\n      39,    107,    147,     59,\n     224,    198,    120,    148,\n     214,     29,     51,    157,\n      65,    221,     20,     66,\n     119,    187,    230,    235,\n     164,    129,    182,    230,\n     219,    183,    110,     44,\n     255,     62,    125,    133,\n      33,    224,    192,    104,\n     168,    195,      4,    200,\n     159,     80,    208,      1,\n      65,    130,     66,      1,\n     242,    174,    140,    155,\n     237,    211,    135,    103,\n      56,    241,     55,    119,\n      98,     43,    236,     48,\n     124,    181,    198,    240,\n     163,    151,     93,    213,\n      48,    106,    130,     83,\n      13,    232,     82,    149,\n     165,    251,    205,    186,\n     110,    212,    247,     39,\n      97,    108,     36,    242,\n      57,    113,    188,    209,\n     225,    165,    152,    171,\n     239,     26,     73,    143,\n      88,     23,     19,     89,\n     136,     70,      4,    208,\n     167,    155,    216,    234,\n     199,    148,    111,     55,\n       6,     42,     98,     84,\n      51,    227,    191,    122,\n     188,    226,    229,    187,\n     119,    182,    244,      6,\n     163,    123,     72,     28,\n     223,     70,    136,     49,\n      13,    198,    158,    102,\n     214,      9,     59,    155,\n      86,     37,      6,     79,\n     116,    174,     21,    227,\n     177,    135,    179,    234,\n      32,    168,    114,     71,\n       8,     47,     87,    108,\n      48,    252,     63,     97,\n     100,     38,    251,    192,\n     137,    163,    220,    246,\n     188,    134,     83,     26,\n      16,     70,    127,     74,\n     235,     44,     95,    142,\n      62,     27,    205,    172,\n     145,    192,    248,     50,\n     157,    114,     42,     14,\n      51,    118,    165,    220,\n      28,     76,    114,    172,\n      23,    243,    188,    131,\n      70,     16,     34,    172,\n     127,     55,    241,     59,\n     104,    145,    205,    245,\n      63,     96,     97,     38,\n     250,    204,    134,     93,\n     222,     23,     66,    129,\n      65,     30,     25,     77,\n     142,    173,    254,     43,\n      91,    116,     51,      5,\n     212,    155,    108,     53,\n     255,    206,    156,    159,\n     217,     14,    193,    115,\n     173,    215,      1,     84,\n     130,     95,     11,    234,\n     166,    122,    178,    233,\n     222,    168,    118,    203,\n     241,     41,    101,    154,\n     199,      6,     51,    107,\n      88,     38,    250,    204,\n     143,    170,    217,     23,\n     178,    139,     73,     24,\n      27,     64,    138,    190,\n     247,     38,    162,    121,\n      62,      0,    217,    155,\n      99,    205,      2,    203,\n     108,    164,    210,     15,\n      69,    114,    162,    215,\n      17,    182,    136,     67,\n      27,    228,     83,    129,\n     190,      8,    213,    162,\n     148,    204,    243,     36,\n      98,    154,    198,      4,\n     198,    149,     87,     35,\n     251,    187,    118,    173,\n     225,    237,    188,    130,\n     181,    238,     18,     90,\n     128,    180,    246,    218,\n     166,    107,     59,      6,\n     205,    101,    100,     54,\n     242,    194,    111,    160,\n     221,      9,     66,    119,\n     171,    230,     22,    182,\n     124,     79,     16,    224,\n      87,    141,    190,      4,\n     208,    166,    108,    194,\n     246,     55,    103,    154,\n      44,    255,    198,    147,\n      88,    217,     12,     64,\n     125,     82,     25,     22,\n      72,    131,    180,    233,\n      32,     86,    137,     66,\n      14,    208,    167,    104,\n      53,    253,     51,    100,\n     158,    209,      2,     61,\n     115,    167,    217,     14,\n     187,    134,     82,     25,\n     229,    177,    117,     79,\n      19,     35,     84,    142,\n     193,     10,     41,     93,\n     151,    207,    252,    205,\n     147,    102,     46,    248,\n     194,    139,     93,     37,\n     239,     70,    127,    172,\n      27,    231,    176,    130,\n     189,    239,     32,     84,\n     113,     59,     11,    213,\n     158,    149,    200,      1,\n     202,    104,     96,    210,\n      12,    194,    140,     89,\n      34,    239,     71,    120,\n     177,    228,     24,    177,\n     127,     71,    236,    220,\n     166,    141,    194,      8,\n     208,    156,    151,    202,\n     255,     53,    106,    159,\n     214,     13,     63,    141,\n      86,     35,    236,    185,\n     131,    179,    230,    224,\n     173,    133,     68,     16,\n      37,     88,    143,    192,\n     249,     45,     99,    104,\n      50,      1,     55,    148,\n      94,     42,    247,    193,\n     117,    169,     35,    237,\n     183,    125,    179,    229,\n      28,    174,    121,     69,\n      15,     36,     88,    143,\n      58,    249,     47,    157,\n     102,    207,      0,    201,\n     145,     94,    214,     11,\n      65,    116,     84,     35,\n     233,     73,    124,    177,\n     232,    226,    172,    135,\n     189,    241,     36,     90,\n     110,     57,      7,    208,\n     100,    102,    206,      3,\n     198,    144,     92,    215,\n      14,     64,    119,    171,\n      31,     21,     75,    126,\n     180,     22,    227,    175,\n     118,    189,     13,    217,\n     163,    110,     57,      4,\n      48,    100,    154,    207,\n       6,     58,    110,    163,\n     216,    240,    191,    136,\n     172,     30,     22,     74,\n     128,     74,    234,    224,\n     171,    118,    190,    242,\n     215,     93,    147,     56,\n       2,    207,    102,    155,\n     208,      5,     56,    109,\n      91,     39,    241,    189,\n     134,     83,     29,     23,\n      77,    128,    182,     20,\n     221,    168,    116,    191,\n     246,     43,     95,    147,\n      55,      3,    204,    152,\n     156,    209,    249,    197,\n     142,    165,    219,    240,\n     186,    135,     81,    227,\n      25,     79,    128,    183,\n      19,    223,    171,    116,\n     192,     10,     42,     94,\n     107,     55,      1,     50,\n     105,    156,    210,    248,\n     194,    142,    167,    218,\n      16,    186,    132,     81,\n      27,     24,     78,    131,\n      71,     19,    221,     87,\n     115,    193,    247,    212,\n     158,    106,     53,      1,\n      52,    104,    158,     44,\n     247,     61,    114,    167,\n     220,    238,    185,    123,\n     176,    229,     26,     79,\n     123,     71,     17,    220,\n     167,    114,     61,    247,\n      44,     97,    150,    203,\n       0,    202,    149,     96,\n     212,      9,     62,    114,\n     168,     35,    236,    184,\n     131,     78,    230,     26,\n      81,    133,     69,     16,\n     219,     89,    142,    195,\n     248,     45,    157,    104,\n      51,    254,    201,    148,\n      95,     43,     10,     63,\n     116,    169,     33,    236,\n      72,    124,    178,    231,\n      28,    174,    121,    187,\n      15,    219,    165,    112,\n      59,    249,     47,     99,\n     103,     50,      2,     55,\n     109,    161,     41,    244,\n     191,    138,     84,    223,\n      20,    182,    129,     76,\n      23,     29,     82,    135,\n     188,     14,    217,    164,\n     144,     58,    250,     47,\n     155,    103,     48,    252,\n      56,    109,    162,    215,\n      12,    190,    118,    171,\n     224,     21,     75,    126,\n      75,     22,    225,    172,\n     136,    188,    242,    216,\n     162,    111,     57,    250,\n      49,    101,    154,     48,\n     250,    198,    110,    163,\n     216,     13,    189,    137,\n      82,    225,     22,    180,\n     127,     74,     21,    224,\n      84,    137,     65,     12,\n      40,     93,    146,     56,\n       3,     49,    102,    100,\n      47,      5,    197,    145,\n      91,     38,    241,     67,\n     120,     82,     29,     23,\n      76,    126,    182,    234,\n      32,    170,    138,    191,\n      11,    214,    161,    147,\n     200,    253,     50,    152,\n      99,    209,      6,    196,\n     112,    165,     37,    241,\n     187,    134,     81,     28,\n      24,    178,    125,    183,\n     237,     33,    169,    139,\n     192,     10,    213,     95,\n     148,    201,    254,    204,\n     151,     98,     45,    248,\n     195,    113,    166,     36,\n     239,     69,    122,    175,\n      27,    230,     78,    131,\n      71,     18,    221,    168,\n     140,    193,      9,    212,\n     159,    106,     53,    255,\n      52,    105,    158,     44,\n     247,     61,    114,     88,\n     220,     17,     70,    132,\n      79,     26,     26,     79,\n     123,     70,    238,     35,\n      88,    141,    194,    247,\n      44,     97,    105,     52,\n     255,    202,    149,    159,\n     212,    246,    193,    140,\n     168,    221,    237,    184,\n     131,     78,    230,     27,\n     175,    122,    186,     16,\n     219,     89,    142,     60,\n       7,     45,    157,    104,\n     204,      1,    201,    107,\n     160,     42,    245,     63,\n     116,    169,    222,    236,\n     183,    130,     77,     24,\n      28,     81,    121,     68,\n      15,    218,    165,    143,\n     196,      6,     46,     99,\n     103,     50,      2,     55,\n     147,    161,     41,    244,\n     191,    117,    170,    223,\n     235,    182,    129,    179,\n     232,     29,    173,    120,\n      67,     14,     38,     91,\n     111,     58,    250,    208,\n     155,    153,    206,      3,\n      56,    109,     93,     40,\n     243,     65,    118,    171,\n     224,    234,    181,    128,\n     180,    233,     30,    172,\n     119,     66,    242,     39,\n      92,    145,     57,      4,\n     207,    101,    101,     48,\n     251,     57,    110,     92,\n      39,    242,    189,    119,\n     172,     30,    233,    180,\n     127,    181,    234,     31,\n      84,    137,     65,     12,\n      40,     93,    109,    199,\n     252,    206,    153,    155,\n     208,    250,     58,    111,\n     164,     38,     14,     67,\n     120,    173,    226,     23,\n     179,    126,     73,    235,\n     223,    170,    117,     64,\n      11,    214,     94,    108,\n      55,    253,     50,    152,\n      99,    209,    249,    196,\n     143,     90,     37,    240,\n      68,    134,     81,    227,\n      24,    178,    125,    183,\n      19,    222,    169,    116,\n      63,     10,     42,     95,\n     107,     54,    254,     51,\n     104,    157,    210,      7,\n      60,    113,    166,    219,\n      16,     69,    133,     80,\n     228,     25,    177,    124,\n     184,     18,    221,     87,\n     115,     62,    246,     43,\n      96,    149,    202,    255,\n      52,    105,    158,    211,\n       8,     61,    114,    167,\n      35,    238,     70,    132,\n      79,     26,    229,    176,\n     123,     70,     17,    220,\n     167,    114,     61,      8,\n     211,    158,    150,    203,\n     255,    202,    149,     96,\n      43,    246,     62,    115,\n      87,     34,     18,     71,\n     131,    177,    230,    228,\n     175,    133,    186,    239,\n      36,     89,    142,    195,\n     248,     45,     98,    151,\n     204,      1,    201,    148,\n      95,     42,    245,     63,\n     116,    169,     33,    236,\n      72,    125,    178,    231,\n      28,     81,    121,     68,\n      15,    218,    165,    112,\n      59,      6,    209,    156,\n     103,     50,    253,    200,\n     147,    161,    214,    244,\n      64,    138,     85,     32,\n     235,    182,    129,    179,\n     232,     29,     82,    120,\n     188,    241,     38,     91,\n     144,    197,    250,     47,\n     100,    153,    206,      3,\n      56,    109,     93,     40,\n      12,     65,    118,    171,\n     224,     21,     74,    127,\n     180,     22,    225,     83,\n     119,     66,     13,    216,\n     163,    110,     57,      4,\n     207,    154,    154,    207,\n       4,     57,    110,     92,\n     216,     13,     66,    119,\n     172,    225,     22,     75,\n     128,    181,    234,     31,\n      84,    137,    190,    243,\n      40,     93,    109,    199,\n     252,     49,    153,    100,\n      47,    250,    197,    144,\n      91,     38,    241,    188,\n     135,     82,     29,    232,\n     179,    129,     73,     20,\n     223,    170,    117,     64,\n      11,    214,    161,    108,\n     200,    253,     50,    103,\n     156,    209,      6,     59,\n     112,    165,    218,     15,\n      68,    121,    174,     28,\n     231,    178,    130,    183,\n      19,     33,     86,    139,\n      63,     10,     42,     95,\n     107,     54,      1,    204,\n     151,     98,     45,    248,\n     195,    142,     89,     36,\n     239,     69,    122,    175,\n      27,    230,    177,    124,\n      71,    237,     34,    168,\n     115,    193,    246,    212,\n     159,    149,    202,    255,\n      52,    105,    158,     44,\n       8,    194,    141,     88,\n      35,     17,     70,    132,\n      79,    229,     26,     79,\n     132,    185,    238,     35,\n      88,    141,    194,    247,\n      44,    158,    105,     52,\n     255,    202,    149,     96,\n      43,    246,    193,    115,\n     168,    221,     18,     71,\n     124,    177,    230,     27,\n      80,    133,     69,     16,\n     219,    166,    113,     60,\n     248,     45,    157,    104,\n     204,    254,    201,    148,\n      95,     42,    245,    192,\n     139,     86,     33,    236,\n     183,    130,     77,     24,\n     227,    174,    121,     68,\n      15,    218,     90,    143,\n     196,    249,     46,     99,\n     152,    205,      2,     55,\n     108,    161,    214,     11,\n      64,    138,    170,    223,\n      20,     73,    126,    179,\n     232,     29,     82,    135,\n     188,    241,     38,     91,\n     144,    197,    250,    208,\n     155,    102,     49,    252,\n     199,    109,     93,     40,\n     243,    190,    137,     84,\n      31,    234,    181,    128,\n      75,     22,    225,    172,\n     119,     66,     13,    216,\n     163,    145,    198,    251,\n      48,    101,    101,     48,\n       4,     57,    110,    163,\n     216,     13,     66,    119,\n     172,    225,     22,     75,\n     128,    181,     21,    224,\n      84,    137,    190,     12,\n     215,    162,    109,     56,\n       3,    206,    102,    155,\n     208,    250,     58,    111,\n      91,     38,    241,    188,\n     135,     82,     29,    232,\n     179,    126,     73,     20,\n     223,    170,    117,     64,\n     244,     41,     94,    147,\n     200,    253,    205,    152,\n      99,     46,    249,     59,\n     112,    165,    218,    240,\n     187,    121,     81,     28,\n     231,     77,    130,    183,\n     236,     33,    169,    116,\n     192,    245,    213,    160,\n     107,     54,      1,    204,\n     151,    157,    210,      7,\n      60,    113,    166,    219,\n      16,    186,    133,     80,\n      27,     25,     78,    131,\n     184,    237,     34,     87,\n     115,     62,      9,     43,\n      96,    149,    202,    255,\n      52,    105,     97,     44,\n     247,    194,    114,    167,\n     220,     17,     70,    123,\n     176,    229,     26,     79,\n     132,    185,    238,     35,\n      88,    141,     61,      8,\n     211,    158,    105,     52,\n     255,     53,    106,    159,\n     212,      9,     62,    115,\n      87,     34,    237,    184,\n     131,     78,     25,    228,\n     175,    122,     69,    239,\n      36,     89,    142,    195,\n     248,    210,    157,    104,\n      51,    254,    201,    148,\n      95,    213,     10,    192,\n     116,    169,     33,    236,\n      72,    125,    178,    231,\n      28,     81,    134,     68,\n      15,    218,    165,    112,\n      59,      6,    209,     99,\n     152,    205,      2,     55,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n      20,    182,    129,     76,\n      23,    226,     82,    135,\n     188,    241,    217,    164,\n     111,     58,      5,    208,\n     155,    102,     49,    252,\n     199,    146,     93,     40,\n     243,    190,    137,     84,\n     224,     21,     74,    127,\n     180,    233,     30,     83,\n     136,    189,    242,     39,\n      92,    145,    198,    251,\n      48,    101,    101,    207,\n       4,     57,    110,    163,\n      39,     13,    189,    136,\n     172,    225,     22,    180,\n     128,    181,     21,     31,\n      84,    137,    190,     12,\n     215,    162,    146,     56,\n       3,    206,    153,    100,\n      47,      5,     59,    111,\n     164,     38,    241,    188,\n     134,     82,     28,    233,\n     179,    129,    183,    234,\n      34,     84,    139,    190,\n     244,     41,    161,    108,\n      54,      0,    204,    153,\n      98,     47,    249,     58,\n     115,    161,    222,     11,\n      71,    120,    174,     28,\n     230,    179,    124,     74,\n      16,    221,    163,    121,\n      51,      3,    222,     86,\n     186,    226,    244,    221,\n     133,    119,     62,    253,\n      44,    105,    161,     35,\n     229,    189,    122,    161,\n     246,     28,    160,    102,\n      97,     14,     57,    104,\n     174,     46,     20,    206,\n     137,    111,    197,    232,\n      55,    157,    103,    215,\n       6,     43,    104,    169,\n      35,    224,    161,    155,\n      85,     58,    242,     98,\n     200,    162,     13,    198,\n     183,     99,    193,    233,\n      13,    153,     78,     59,\n      11,     32,    116,    130,\n     215,    215,    220,    128,\n      87,     34,    224,    157,\n     128,    137,    204,    236,\n     184,    124,     84,     26,\n      52,     66,    114,     26,\n      20,     58,     70,    183,\n     221,    248,    214,    129,\n     166,    223,    240,    216,\n     160,    127,    253,     93,\n     107,    150,     83,      6,\n     195,     89,    182,    146,\n       7,    255,    175,    131,\n     200,    236,     62,    153,\n     115,    201,      9,    205,\n     136,    118,      5,    252,\n      10,     56,     85,     26,\n     193,    160,    126,    128,\n     172,     11,    156,     56,\n      77,    229,      6,    127,\n     159,     52,     16,     44,\n     108,    110,     47,    216,\n     225,    105,    233,    238,\n     225,    138,    146,     95,\n     243,     85,    126,    145,\n      12,     60,     18,     74,\n     150,    157,    246,    199,\n     180,    156,    214,     13,\n     236,    182,     77,    212,\n      83,     19,    177,    112,\n      55,    247,     93,     74,\n     181,     50,    161,    160,\n     164,    150,    240,     19,\n     179,     92,    185,    216,\n      34,    188,     64,      9,\n      24,    112,     60,    145,\n      19,    209,    205,     99,\n     151,    238,    245,    248,\n     191,    188,    218,      8,\n      68,    112,    106,      1,\n       8,     99,    118,    120,\n      55,    227,    170,    203,\n     171,      3,    134,    179,\n      96,    194,     49,      8,\n     128,     16,     11,     20,\n      99,    115,    171,     22,\n     249,    178,    187,    148,\n      50,    157,    145,     81,\n     226,    132,     20,    146,\n      58,     46,    245,     27,\n      43,    190,      0,    171,\n     218,     88,    184,    209,\n      23,    176,    146,    187,\n     215,     25,    139,     65,\n     109,     30,    109,     60,\n     139,    105,     52,     47,\n      65,    175,    255,      9,\n     133,    211,    149,    231,\n      22,     58,    134,     67,\n      42,     61,    111,    145,\n      14,     46,    197,     85,\n     232,    251,     37,    135,\n     177,    150,    239,    206,\n      53,    179,     62,     43,\n      48,      5,    123,     99,\n      61,    237,     50,     67,\n     164,     14,    214,    146,\n     147,    242,    140,     18,\n     247,     69,    182,    202,\n      20,    117,    117,    116,\n      78,     33,     34,    176,\n     207,    232,    214,    158,\n     130,    241,    255,    238,\n     187,    115,    199,    113,\n     124,    181,      4,     30,\n      60,    119,    161,    176,\n      34,    156,    173,    186,\n     226,    251,    195,    133,\n     105,    217,     38,     50,\n     140,    117,     27,    247,\n      22,     62,    117,    110,\n     253,     93,     99,    151,\n     241,    244,    145,     97,\n     157,    208,     45,    167,\n     120,     44,    247,     10,\n     104,    113,     19,    205,\n     208,     46,    245,     45,\n     181,    158,    126,    185,\n     254,     52,    181,    175,\n      84,    255,      0,     90,\n     118,     76,     24,     37,\n      64,    155,     43,     17,\n     230,    141,    164,    136,\n     244,    253,    131,    165,\n     222,     24,     94,    118,\n     114,      9,     25,     94,\n     140,    179,     24,    248,\n     170,    159,    189,     28,\n     216,    138,    102,    133,\n     206,    237,    182,    152,\n     217,      4,     43,    119,\n      94,     57,    245,     91,\n     117,    169,    230,    229,\n     166,    131,    165,     24,\n     197,    164,    109,    170,\n     189,     61,    156,     68,\n     219,    236,     49,    110,\n     150,     35,    232,     42,\n     108,    164,     34,    241,\n     178,    136,    164,    237,\n     250,    151,    107,    189,\n     210,     17,    183,     73,\n      51,    237,     51,     80,\n     151,     56,     18,     55,\n      76,    136,     37,    242,\n     196,    135,     92,    203,\n     238,    147,    182,     89,\n     161,     93,    161,     66,\n      94,    235,     50,    116,\n     153,     45,     46,    223,\n      69,    184,    207,     19,\n     219,    146,     99,    213,\n       9,    212,    185,    123,\n     231,     67,    187,    198,\n      83,    239,     19,     87,\n     164,     70,     59,    195,\n      71,    182,    211,     26,\n     198,    147,    104,    219,\n       3,    211,    163,    123,\n     234,     73,    208,    188,\n      93,    222,     17,     82,\n     104,     77,     58,    243,\n     118,    176,    177,      2,\n     212,    169,    123,    206,\n     244,    207,    160,    156,\n     135,     16,    255,    131,\n     184,    210,     14,     50,\n     116,     67,     61,     27,\n     120,     88,     77,      8,\n     242,    162,    121,     70,\n      10,    193,    181,    162,\n     218,     32,    247,    105,\n     151,    193,     22,    201,\n     183,    124,    217,     37,\n      92,    115,    170,     42,\n     255,    176,    121,     73,\n      52,    229,    107,    153,\n     117,     57,     50,    120,\n     153,    203,    252,    242,\n     169,    157,    246,     39,\n      62,    146,     81,     60,\n     251,    190,    142,     91,\n     242,     62,    181,    178,\n      96,     23,      4,    116,\n     168,     75,     59,    246,\n      91,    191,    230,    246,\n      48,    151,    107,     55,\n     242,    220,    111,    227,\n     245,    213,    131,    152,\n     173,    234,     49,    106,\n     111,    102,     26,     17,\n      95,    133,    168,    243,\n     198,     94,    159,     26,\n      47,     24,     44,    159,\n      26,    218,    192,    108,\n     190,    197,    224,    145,\n     142,    178,    244,     19,\n     177,    109,     92,    232,\n       1,     86,    111,    179,\n     232,    223,    191,    106,\n     202,    248,     42,    118,\n     123,      5,    245,     44,\n     100,    172,    220,    247,\n     174,    141,    168,     29,\n       9,    107,    138,     87,\n       9,    220,    174,    128,\n     230,    228,    207,    131,\n      99,    199,    236,     53,\n     134,    122,     47,     31,\n      53,    138,    178,    201,\n     249,    154,    125,    160,\n     224,     30,    178,    109,\n      77,    234,     51,     92,\n     113,     49,     16,    201,\n     156,    131,    238,    215,\n     202,    191,    123,    212,\n       4,     44,    102,     93,\n      58,    253,     71,    107,\n     161,    233,    230,    167,\n     103,     75,     22,     48,\n      99,    144,     30,     56,\n     221,    109,    136,    232,\n       8,    235,    186,    100,\n     242,     19,    195,    134,\n      69,     55,    231,     79,\n      88,    170,     18,    249,\n     185,    115,    180,    241,\n      55,    164,    104,     33,\n     248,     13,    117,    110,\n      34,    240,    197,    145,\n     185,    253,     14,    216,\n     152,     68,     51,      0,\n     100,    119,     80,      3,\n     228,     88,    145,    174,\n      14,    198,    189,    143,\n     231,    222,    210,    135,\n     115,     62,    254,     36,\n     123,     91,     60,    248,\n     184,    138,    161,    210,\n      18,    176,    145,     68,\n     244,     60,     83,    119,\n      73,      2,    209,     75,\n     157,     61,     15,    213,\n     156,     96,    202,      5,\n     194,    151,    164,    194,\n      24,     65,    134,     65,\n      21,     29,     65,    126,\n     181,     20,    241,    160,\n     137,    187,    250,     35,\n     166,    110,    201,    234,\n      53,    152,    111,     34,\n     247,     56,    107,    162,\n     218,    240,    179,    128,\n     165,    234,     20,     77,\n     145,    164,    224,    224,\n     160,    103,     79,     11,\n     215,     93,    107,     49,\n       9,    202,    110,    156,\n      47,      6,     42,    117,\n     179,    220,    253,    179,\n     137,     90,    226,     22,\n     180,    115,     89,     30,\n      35,     95,    130,    184,\n     243,     32,     81,    157,\n     203,      6,    196,    147,\n     105,     40,      4,     57,\n     131,     87,     37,     12,\n      68,    126,    186,    242,\n      28,    177,    121,     76,\n      23,    222,     87,    114,\n      50,      6,    221,    161,\n     147,    196,    246,     50,\n     106,    149,    219,      1,\n      61,    138,     81,     47,\n     227,    176,    131,    172,\n     231,    229,    183,    125,\n     190,    228,     40,     90,\n     135,    195,     10,    213,\n      97,    105,     60,     10,\n     204,    147,    102,     41,\n      14,     55,    118,     88,\n     220,     21,     77,    119,\n     181,     24,    226,    186,\n     115,     68,     17,    217,\n     160,    115,    196,    240,\n      42,    103,    104,     60,\n     251,     48,     99,    152,\n     212,    240,    203,    135,\n      94,     33,     18,     68,\n     122,    184,    225,     24,\n      81,    123,    186,    231,\n      44,    167,    121,     53,\n      12,    216,    154,    106,\n     200,      9,     62,     98,\n     168,    215,     11,     60,\n     118,    169,    222,    239,\n     179,    129,     72,     31,\n     233,    166,    123,    191,\n     247,     32,     94,    142,\n     196,    253,     42,    156,\n     101,    205,      0,    205,\n     152,     86,     45,    246,\n      67,    115,    168,     32,\n      20,     75,    127,    178,\n     238,     27,    173,    123,\n     188,    240,    219,    167,\n     110,     57,      1,     45,\n     108,    159,    204,    252,\n     196,    148,     95,    211,\n       8,    191,    139,     84,\n      31,    234,    180,    127,\n     183,    237,     31,    173,\n     117,     67,    243,     38,\n     161,    104,     61,      4,\n      50,    102,    154,     51,\n     248,    198,    106,    164,\n     222,     12,    189,    136,\n     172,     30,    235,    176,\n     121,     79,     21,     30,\n     170,    119,    191,    243,\n     213,     93,    148,    193,\n     255,     50,     98,    154,\n      44,    254,    193,    147,\n      90,    217,    243,    184,\n     134,     82,     29,     21,\n      72,    129,     73,    234,\n      34,     87,    136,    188,\n      11,    213,    162,    111,\n      53,    255,     49,    153,\n     103,     46,      4,     57,\n     112,    165,    218,    241,\n     186,    120,    175,     29,\n     229,    178,    125,    183,\n     239,     34,    168,    118,\n     192,    244,     43,     94,\n     149,     52,      2,    205,\n     151,     98,     45,    249,\n     193,    113,    165,    217,\n      16,     69,    123,    175,\n     228,     25,     78,    131,\n     185,    237,    222,    173,\n     112,    192,    245,     41,\n      96,    107,     52,    255,\n      53,    107,    156,    210,\n       8,     61,    140,     90,\n     220,     16,    186,    129,\n      78,    231,     24,     76,\n     135,     70,     18,    221,\n      90,    143,    195,    245,\n     211,    157,    107,    203,\n       0,     53,    106,     96,\n      42,    247,     62,    113,\n     170,     34,    236,    184,\n     124,    177,    231,    228,\n     173,    121,     68,    239,\n      38,     91,    142,     61,\n       6,    211,    157,    151,\n     205,      1,    201,    107,\n     161,     40,    241,    193,\n     117,    168,    223,     18,\n      73,    130,     76,     24,\n      28,     81,    135,    185,\n     241,    218,    164,    114,\n      57,      5,    208,     98,\n     153,    205,      2,     54,\n     109,    160,    214,    244,\n     191,    116,    168,    222,\n      20,    183,    131,     78,\n      22,    226,     82,    135,\n     188,     14,    217,     91,\n     145,    197,    250,     47,\n     100,    153,    206,      3,\n     198,    147,     93,    215,\n      12,    190,    137,     84,\n      31,     21,    181,    128,\n     180,    232,     31,     83,\n     118,     64,     12,     39,\n      92,    145,    199,    251,\n     206,    155,    154,    207,\n       4,     57,    110,     92,\n      39,     13,     67,    118,\n     172,     28,    234,    180,\n     129,    180,    232,     29,\n      84,    116,     66,     13,\n      41,     92,    146,     57,\n       3,    206,    153,    101,\n      47,      5,     58,    111,\n     165,    216,    241,    188,\n     120,    173,     29,     23,\n      77,    128,     73,     21,\n     223,    170,    117,     64,\n     244,     41,     94,    147,\n      55,      3,    204,    153,\n      99,    208,      4,     59,\n     141,     91,     36,    240,\n      68,    121,     80,     28,\n      25,     79,    130,     73,\n      18,    220,    169,    137,\n     194,    245,     42,    160,\n     106,     55,    254,     51,\n     104,    156,    211,      7,\n     195,    143,     89,     36,\n      16,    186,    122,    175,\n      27,    230,     78,    131,\n      71,    237,     34,     86,\n     141,    193,      9,    213,\n     157,    107,    202,    255,\n      52,    150,     96,     45,\n     247,     61,    114,    167,\n     220,     17,     71,    123,\n      79,     26,    229,    177,\n     123,    185,    238,     35,\n      88,    114,     60,      8,\n     211,     97,    151,    202,\n       0,    202,    149,     97,\n      42,    246,     62,    115,\n     168,    221,    237,    184,\n     124,    176,    230,    228,\n     175,    133,    186,    238,\n      37,    166,    112,     61,\n       6,    210,     98,    150,\n     204,    254,    200,    148,\n      95,    213,     11,     63,\n     116,    169,     33,    237,\n     183,    125,     77,     24,\n      28,     81,    121,     69,\n     240,     37,    165,    112,\n     196,    249,     46,     99,\n     152,     50,    253,     55,\n     147,     94,     41,     11,\n     191,    138,    170,     32,\n     235,    182,    126,    179,\n     232,     28,     82,    121,\n      66,     14,     38,     91,\n     144,     58,      5,    208,\n     155,    153,    206,    252,\n     199,    146,    162,    215,\n      12,    190,    137,     84,\n      31,     21,     74,    128,\n      75,     22,    225,     83,\n     136,    188,    242,    216,\n     163,    145,    198,    251,\n      48,    154,    101,     48,\n     251,     57,    110,    163,\n      39,    242,     66,    119,\n      83,     30,     22,     75,\n     128,     74,     21,    224,\n     171,    137,    190,    243,\n     215,     93,    109,     56,\n       3,    207,    101,    100,\n      46,      5,    196,    144,\n      91,    217,    241,     67,\n     120,     83,    227,     23,\n     179,    129,     73,    235,\n      32,    170,    117,     64,\n     244,     41,     94,    108,\n      55,    253,     50,    103,\n      99,    209,      6,     59,\n     143,     90,     37,     15,\n      68,    134,    174,    227,\n      24,    178,    125,    183,\n     236,     33,    169,    116,\n     192,    245,    213,     95,\n     148,     54,      1,     51,\n     151,    157,    210,    248,\n     195,    113,     89,     36,\n     239,     69,    122,    175,\n     228,    230,    177,    124,\n     184,    237,    221,    168,\n     115,     62,      9,     43,\n      96,    106,    202,      0,\n     203,    105,    158,    211,\n       8,     61,    141,     88,\n     220,     17,    185,    132,\n     176,     26,    229,     79,\n     132,    185,     17,    220,\n     167,    114,    194,    247,\n      44,     97,    105,     52,\n       0,     53,    149,     96,\n     212,      9,    193,    115,\n     168,     34,    237,    184,\n     131,    177,    230,    228,\n     175,    122,     69,    239,\n      36,    166,    113,     60,\n       7,     45,     98,    151,\n      51,    254,    201,    148,\n     160,    213,     10,    192,\n     139,     86,    222,     19,\n      72,    125,     77,     24,\n      28,     81,    134,     68,\n      15,    218,    165,    143,\n     196,    249,    209,    156,\n     152,    205,      2,     55,\n     108,    161,     41,    244,\n     191,    138,    170,    223,\n      20,     73,    129,     76,\n     232,     29,    173,    120,\n      67,    241,    217,     91,\n     144,    197,      5,    208,\n     100,    153,     49,    252,\n     199,    109,    162,    215,\n      12,    190,    137,    171,\n     224,     21,     74,    128,\n      75,    233,     30,     83,\n     136,     66,     13,     39,\n      92,    145,     57,      4,\n     207,    154,    101,    207,\n       5,    198,    147,     92,\n     217,     13,     66,    136,\n      83,     30,    233,     75,\n     128,    181,     21,    224,\n      84,    137,    190,     12,\n     215,    162,    109,    199,\n     252,    206,    153,    155,\n     208,      5,    197,    144,\n     164,     38,    241,     67,\n     120,     82,    226,    232,\n     179,    129,    182,     20,\n      32,    170,    117,    191,\n     244,     41,    161,    108,\n      55,    253,     50,    103,\n      99,     46,      6,     59,\n     112,    165,     37,     15,\n     187,    121,    174,    227,\n     231,    178,    125,    183,\n     236,    222,    169,    139,\n      63,     10,    213,     95,\n     148,     54,    254,    204,\n     104,    157,     45,      6,\n     195,    142,    166,    219,\n      16,    186,    133,    175,\n     228,    230,     78,    124,\n     184,    237,     34,    168,\n     115,    193,    246,     43,\n     159,    106,    202,    255,\n     203,    105,     97,     44,\n       8,    194,    141,    165,\n      35,    239,     70,    122,\n      79,    229,     27,    176,\n     122,    185,    238,     35,\n      88,    114,     61,    247,\n      45,    158,    105,    203,\n     254,     53,    106,     96,\n      43,      9,    193,    140,\n     168,     34,    237,     71,\n     131,     78,    230,     27,\n     175,    133,    186,     16,\n     219,     89,    143,    195,\n       7,    210,    157,    151,\n      51,    254,     55,    107,\n      94,     42,     11,    192,\n     116,    168,     33,    236,\n     183,    130,    178,    231,\n      28,    174,    121,     68,\n      15,     36,     90,    112,\n      59,    249,    209,     99,\n     103,     50,      2,     55,\n     147,     94,    214,     11,\n     191,    138,     85,    223,\n      20,    182,    129,     76,\n     232,     29,    173,    120,\n     188,    241,    217,     91,\n     111,    197,      5,    208,\n     155,    153,    207,      3,\n     199,    109,     93,    215,\n     243,     65,    118,     84,\n      31,     21,    181,    127,\n     181,     22,    225,     83,\n     119,     66,    243,    216,\n     163,    145,     57,    251,\n      48,    101,    101,     48,\n       4,    198,    145,    163,\n     216,    242,     66,    136,\n     172,    225,     22,     75,\n     127,     74,    234,     30,\n     171,    119,    191,    243,\n     214,     93,    146,     56,\n       3,     48,    153,    100,\n     209,      5,    197,    145,\n      91,    216,     14,    189,\n     135,    173,     29,     23,\n     179,    129,    182,     21,\n     223,     85,    117,    191,\n     244,    214,    160,    147,\n     200,      2,     50,    103,\n      98,    209,      6,    196,\n     143,     90,    218,    240,\n      68,    120,     80,     28,\n      24,     77,    125,     72,\n     236,    222,     86,    139,\n      63,    245,    213,     94,\n     148,    201,    254,    204,\n     151,     98,    211,      7,\n     195,    142,    166,     36,\n      16,     69,    133,    175,\n      27,    230,    177,    131,\n     184,     18,    221,    168,\n     140,    193,      9,    212,\n      96,    149,     53,      0,\n     203,    150,    158,     44,\n       8,    194,    141,    166,\n     220,    238,    185,    123,\n      79,     26,     26,    176,\n     132,     70,    238,     35,\n      88,    114,    194,    247,\n     211,     97,    150,     52,\n     255,    202,    106,     96,\n     212,      9,    193,    115,\n      87,    221,    237,     71,\n     124,    177,    230,     27,\n      80,    122,    186,     16,\n     219,     89,    113,    195,\n     248,    210,    157,    104,\n     204,      1,     54,    148,\n     160,     42,    245,    192,\n     139,    169,     33,    236,\n      72,    130,     77,    231,\n      28,    175,    134,     68,\n      15,     37,    164,    143,\n     196,      6,     46,    156,\n     103,    204,      2,    201,\n     147,    161,    214,    244,\n      64,    117,     85,     32,\n      20,     72,    129,     76,\n     232,     29,     82,    135,\n     188,     14,    217,     91,\n     111,     58,    250,     47,\n     155,    102,     49,    252,\n      56,    146,     93,    215,\n     243,    190,    137,    171,\n      31,     21,     74,    128,\n      75,    233,    225,     83,\n     119,     66,    242,    216,\n     163,    110,    198,      4,\n     207,    101,    101,    207,\n     251,    198,    110,    163,\n      39,    242,    189,    136,\n      83,    225,     22,    180,\n     127,    181,    234,    224,\n      84,    137,     65,     12,\n     214,     93,    146,     56,\n     252,    206,    153,    100,\n     209,      5,     58,    144,\n      91,    217,    241,     67,\n     120,     82,     29,    232,\n     179,    129,    182,     20,\n      32,    170,    116,    191,\n     245,    214,     94,    108,\n      55,    253,     50,    152,\n      99,     46,    249,     59,\n     143,     90,     37,     14,\n      68,    121,     81,     28,\n      24,    178,    130,    183,\n      19,    222,     86,    139,\n      63,    245,    213,     95,\n     148,    201,      1,    204,\n     104,    157,    210,      7,\n     194,    142,    166,     36,\n      16,     69,    132,     80,\n      27,    230,     79,    124,\n     184,    237,    220,    168,\n     140,    192,      9,     43,\n     159,    107,    202,    255,\n      52,    105,     97,     44,\n       8,     61,    141,    167,\n      35,    238,    185,    123,\n     176,    229,     26,    176,\n     123,    185,    238,    220,\n     167,    141,    194,      8,\n     211,    158,    150,     52,\n     255,     53,    106,    159,\n      43,    246,    193,    140,\n     169,    221,    237,    184,\n     131,    177,    231,     27,\n     175,    133,    186,     16,\n      36,     89,    113,     60,\n       7,     45,     98,    104,\n      51,      0,     55,    107,\n      95,     42,     10,     63,\n     139,     86,     33,     19,\n     183,    125,    178,     24,\n      28,     81,    121,     69,\n     240,     36,    164,    143,\n     196,    249,     46,     99,\n     103,     50,      2,     55,\n     147,    161,    214,    244,\n      64,    138,    170,    223,\n     235,    182,    129,    179,\n     232,    226,     82,    120,\n      67,     14,    216,     91,\n     146,    197,      4,    208,\n     100,    153,     49,      3,\n     199,    109,    162,     40,\n     243,    190,    118,    171,\n     224,    234,    181,    127,\n     180,    233,     30,     83,\n     136,     66,    242,     39,\n     162,    145,    198,      4,\n      48,    154,    101,     48,\n       4,    198,    145,    163,\n      39,     13,    189,    136,\n     172,    225,    233,     75,\n     128,     74,    234,    224,\n     171,    137,    191,     12,\n     214,    162,    146,    199,\n     252,     49,    152,    155,\n     208,    250,    197,    110,\n     164,    217,    241,    188,\n     121,     82,    226,    232,\n     179,    129,    182,    235,\n      32,     85,    116,     64,\n     245,     41,    161,    108,\n      55,    253,     50,    103,\n      99,     46,      6,    196,\n     112,    165,    218,    240,\n     187,    134,     81,     28,\n      24,    178,    130,    183,\n      19,    222,    169,    139,\n     192,     10,     42,    161,\n     107,     54,      1,     51,\n     104,    157,     45,    248,\n     195,    113,     89,     36,\n      16,     69,    133,    175,\n     228,    230,     78,    131,\n      71,    237,     34,     87,\n     115,     62,    246,    212,\n      96,    149,    202,    255,\n     203,    150,     97,     44,\n       8,     61,    141,     88,\n      35,    238,     70,    123,\n      79,     26,    229,    176,\n     132,    185,     17,    220,\n      88,    114,    194,    247,\n     211,     97,    150,     52,\n       0,     53,    149,    159,\n     212,      9,     62,    140,\n      87,    221,    237,    184,\n     125,     78,     25,     26,\n     175,    133,    186,     16,\n      36,     89,    113,     60,\n     248,    210,     98,    104,\n      51,      1,     54,    148,\n      95,    213,    245,    192,\n     116,     86,     33,    236,\n      72,    130,    178,     24,\n     227,     81,    120,     68,\n     241,    218,    165,    143,\n      59,      6,     46,    156,\n     103,    205,    253,     55,\n     108,     94,    214,     11,\n     191,    117,    170,    223,\n     235,     73,    129,    179,\n     232,     29,     82,    120,\n      67,    241,     38,    164,\n     144,     58,      5,    208,\n     100,    102,    206,      3,\n     199,    109,    162,     40,\n      12,     65,    136,    171,\n      31,    234,     74,    127,\n      75,    233,     30,    172,\n     136,     66,     13,     39,\n     163,    145,    198,      4,\n     207,    101,    101,    207,\n       4,     57,    110,    163,\n     216,    242,     66,    119,\n      83,     30,    233,    180,\n     128,    181,     21,     31,\n     171,    118,    190,     12,\n     215,     93,    146,     56,\n     252,     49,    153,    155,\n     208,    250,     58,    144,\n      91,    217,    241,    188,\n     120,    173,     29,     23,\n     179,    126,    182,     20,\n     223,     85,    117,     64,\n     244,    214,    161,    147,\n      55,      2,     50,    152,\n      99,    209,    249,     59,\n     112,     90,    218,     15,\n     187,    134,    174,     28,\n     231,     77,    125,     72,\n     236,    222,    169,    139,\n      63,     10,     42,    160,\n     107,    201,      1,     51,\n     104,     98,    210,      7,\n     195,    142,    166,    219,\n     239,     69,    133,     80,\n     228,    230,    177,    131,\n      71,     18,    221,    168,\n     115,    193,      9,    212,\n      96,    149,     53,      0,\n     203,    150,    158,    211,\n     247,     61,    114,    167,\n     220,     17,     70,    123,\n      79,     26,     26,    176,\n     132,    185,    238,     35,\n      88,    141,    194,      8,\n     211,    158,    105,     52,\n     255,     53,    106,     96,\n     212,      9,     62,    140,\n      87,     34,    237,    184,\n     131,     78,     25,    228,\n      80,    133,    186,    239,\n     219,     89,    142,     60,\n     248,     45,    157,    104,\n      51,    254,    201,    148,\n      95,    213,     10,     63,\n     116,     86,     33,     19,\n      72,    125,    178,    231,\n     227,     81,    134,     68,\n     240,     37,    165,    112,\n      59,      6,     46,     99,\n     103,     50,    253,    200,\n     147,    161,    214,     11,\n      64,    138,    170,     32,\n     235,    182,    129,     76,\n     232,     29,     82,    135,\n     188,     14,     38,     91,\n     111,     58,      5,    208,\n     155,    153,     49,    252,\n      56,    146,    162,    215,\n     243,     65,    118,    171,\n     224,     21,     74,    127,\n      75,     22,     30,    172,\n     136,    189,     13,    216,\n     163,    110,     57,    251,\n      48,    101,    154,    207,\n       4,     57,    145,     92,\n      39,    242,    189,    136,\n      83,     30,     22,    180,\n     127,    181,    234,     31,\n      84,    118,    190,    243,\n      40,     93,    146,    199,\n     252,     49,    102,    155,\n     208,      5,    197,    144,\n     164,    217,     14,    188,\n     135,     82,     29,    232,\n      76,    129,    182,    235,\n     223,    170,    117,     64,\n     244,    214,    161,    108,\n     200,      2,    205,    152,\n      99,     46,    249,    196,\n     143,     90,    218,     15,\n      68,    134,     81,     28,\n      24,     77,    130,    183,\n     236,     33,     86,    139,\n     192,    245,     42,     95,\n     148,    201,    254,     51,\n     104,    157,    210,      7,\n      60,    113,    166,    219,\n     239,     69,    133,    175,\n     228,    230,    177,    124,\n      71,     18,    221,    168,\n     115,     62,    246,    212,\n     159,    106,     53,      0,\n     203,    150,     97,    211,\n     247,     61,    114,    167,\n     220,    238,    185,    123,\n      79,     26,     26,     79,\n     132,    185,     17,    220,\n     167,    114,    194,    247,\n      44,     97,    150,     52,\n     255,    202,    149,     96,\n      43,      9,     62,    140,\n      87,    221,    237,    184,\n     131,     78,    230,     27,\n      80,    133,    186,    239,\n      36,    166,    113,    195,\n     248,     45,     98,    151,\n     204,      1,    201,    148,\n      95,     42,     10,    192,\n     116,    169,     33,     19,\n      72,    130,     77,     24,\n     227,    174,    121,     68,\n      15,    218,    165,    112,\n      59,      6,     46,     99,\n     152,    205,      2,     55,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n      20,     73,    126,     76,\n      23,    226,    173,    120,\n      67,    241,    217,     91,\n     144,    197,    250,    208,\n     155,    102,     49,    252,\n     199,    146,     93,     40,\n      12,    190,    137,     84,\n      31,    234,    181,    128,\n      75,    233,    225,     83,\n     136,    189,    242,     39,\n      92,    145,    198,    251,\n      48,    101,    154,    207,\n       4,     57,    110,    163,\n     216,     13,     66,    119,\n     172,     30,     22,     75,\n     128,    181,    234,    224,\n      84,    118,     65,     12,\n     215,    162,    109,     56,\n       3,     49,    102,    155,\n     208,      5,    197,    144,\n      91,     38,    241,    188,\n     135,     82,    226,     23,\n      76,    126,     73,     20,\n     223,    170,    138,    191,\n     244,     41,     94,    147,\n     200,      2,    205,    152,\n     156,    209,      6,     59,\n     112,    165,    218,     15,\n      68,    121,    174,    227,\n     231,    178,    130,     72,\n      19,    222,    169,    116,\n     192,    245,    213,    160,\n     107,     54,      1,    204,\n     151,     98,     45,      7,\n      60,    113,    166,    219,\n      16,    186,    133,     80,\n      27,     25,     78,    131,\n     184,    237,     34,     87,\n     140,     62,    246,     43,\n     159,    149,    202,    255,\n      52,    105,     97,     44,\n     247,    194,    114,     88,\n      35,     17,    185,    132,\n     176,     26,    229,     79,\n     123,    185,    238,    220,\n      88,    141,    194,      8,\n      44,    158,    105,    203,\n     255,     53,    106,     96,\n     212,      9,    193,    115,\n     168,    221,     18,     71,\n     124,    177,    230,    228,\n      80,    133,     69,    239,\n     219,    166,    142,     60,\n       7,     45,    157,    104,\n     204,    254,    201,    107,\n      95,    213,     10,    192,\n     116,    169,     33,    236,\n     183,    130,     77,     24,\n     227,     81,    134,    187,\n     240,     37,    165,    143,\n     196,    249,     46,     99,\n     152,    205,    253,    200,\n     147,    161,     41,    244,\n      64,    138,    170,     32,\n     235,    182,    129,     76,\n      23,     29,    173,    135,\n     188,    241,    217,     91,\n     144,     58,    250,    208,\n     155,    153,     49,    252,\n     199,    109,     93,     40,\n     243,    190,    137,     84,\n     224,     21,     74,    127,\n     180,    233,     30,     83,\n     136,     66,    242,     39,\n     163,    110,    198,      4,\n      48,    101,    101,     48,\n       4,     57,    110,    163,\n     216,     13,    189,    136,\n     172,    225,    233,     75,\n     128,     74,     21,    224,\n     171,    137,     65,     12,\n      40,    162,    109,    199,\n       3,    206,    102,    155,\n      47,      5,     58,    111,\n     164,     38,     14,     67,\n     120,    173,    226,    232,\n      76,    129,     73,     20,\n      32,     85,    138,    191,\n      11,    214,     94,    108,\n      55,    253,     50,    103,\n     156,     46,    249,     59,\n     143,     90,    218,    240,\n     187,    121,     81,     28,\n      24,    178,    125,    183,\n      19,    222,     86,    116,\n     192,    245,    213,     95,\n     148,     54,      1,     51,\n     151,     98,    210,    248,\n      60,    113,     89,    219,\n      16,    186,    122,    175,\n      27,    230,     78,    124,\n     184,    237,    221,    168,\n     140,     62,    246,     43,\n     159,    106,    202,      0,\n     203,    150,    158,     44,\n     247,     61,    141,     88,\n     220,    238,    185,    123,\n      79,     26,     26,    176,\n     123,     70,    238,     35,\n      88,    114,    194,    247,\n     211,    158,    150,     52,\n       0,     53,    149,    159,\n     212,    246,     62,    115,\n      87,    221,    237,    184,\n     124,     78,     25,     27,\n     175,    122,    186,    239,\n     219,    166,    113,     60,\n     248,     45,    157,    151,\n     204,    254,     54,    107,\n      95,    213,     10,    192,\n     116,    169,     33,     19,\n      72,    130,    178,    231,\n     227,     81,    134,     68,\n      15,     37,    165,    112,\n      59,    249,     46,     99,\n     152,     50,      2,    200,\n     108,    161,    214,     11,\n      64,    117,    170,     32,\n     235,     73,    129,     76,\n     232,    226,     82,    135,\n      67,     14,     38,    164,\n     111,    197,      5,    208,\n     155,    102,     49,      3,\n      56,    146,    162,     40,\n     243,    190,    137,     84,\n     224,    234,     74,    128,\n      75,    233,     30,    172,\n     136,    189,     13,    216,\n      92,    110,    198,    251,\n     207,    101,    154,    207,\n       4,     57,    110,     92,\n      39,    242,     66,    119,\n      83,    225,     22,    180,\n     128,    181,     21,    224,\n      84,    118,     65,    243,\n     215,    162,    146,    199,\n       3,     49,    102,    100,\n     208,    250,     58,    111,\n      91,    217,     14,     67,\n     120,    173,    226,    232,\n      76,    129,     73,     20,\n      32,     85,    117,     64,\n      11,    214,    161,    147,\n     200,      2,    205,    103,\n      99,    209,    249,    196,\n     112,     90,    218,     15,\n     187,    134,    174,     28,\n     231,     77,    125,    183,\n      19,     33,     86,    116,\n      63,    245,    213,     95,\n     148,    201,      1,    204,\n     104,    157,     45,    248,\n      60,    142,     89,    219,\n      16,    186,    122,    175,\n      27,     25,    177,    124,\n     184,     18,    221,     87,\n     140,    193,    246,     43,\n     159,    106,     53,    255,\n      52,    150,     97,     44,\n     247,     61,    114,     88,\n     220,     17,     70,    132,\n     176,     26,     26,     79,\n     132,    185,     17,    220,\n      88,    114,     61,    247,\n     211,     97,    105,     52,\n       0,     53,    149,    159,\n     212,    246,    193,    115,\n      87,     34,     18,    184,\n     131,    177,     25,    228,\n      80,    133,     69,    239,\n      36,    167,    142,    195,\n       7,    210,     98,    104,\n     204,      1,     54,    107,\n      95,    213,     10,    192,\n     116,     86,     33,     19,\n     183,    130,    178,    231,\n     227,    174,    134,    187,\n      15,     37,    165,    112,\n     196,      6,    209,     99,\n     152,     50,      2,     55,\n     108,    161,    214,    244,\n     191,    117,     85,     32,\n     235,    182,    126,    179,\n      23,     29,     82,    120,\n      67,    241,    217,     91,\n     144,     58,      5,     47,\n     100,    153,     49,      3,\n      56,    146,    162,    215,\n     243,    190,    118,     84,\n      31,     20,    181,    128,\n     180,    233,    225,     83,\n     119,     66,    242,     39,\n     163,    145,    198,    251,\n      48,    101,    154,     48,\n       4,     57,    145,    163,\n     216,     13,    189,    136,\n     172,     30,     22,     75,\n     127,    181,     21,    225,\n      85,    137,     65,    243,\n      40,    162,    109,    199,\n     252,     49,    102,    100,\n      47,      5,    197,    144,\n     164,    217,    241,    188,\n     135,    173,    226,    232,\n      76,    129,    182,     20,\n     223,     85,    138,     64,\n     244,    214,    161,    147,\n      55,    253,     50,    103,\n     156,     46,    249,    196,\n     112,     90,     37,     15,\n     187,    134,    174,    227,\n     231,     77,    130,     72,\n     236,     33,     86,    117,\n      63,    244,    213,     95,\n     148,    201,      1,    204,\n     104,     98,     45,      7,\n      60,    142,     89,    219,\n      16,    186,    122,     80,\n      27,     25,    176,    131,\n     184,     18,     34,     87,\n     115,     62,      9,    212,\n     159,    149,    202,    255,\n     203,    150,    158,     44,\n       8,     61,    141,     88,\n      35,     17,    185,    132,\n     177,     26,    229,     79,\n     132,     70,    238,     34,\n     167,    141,     61,      8,\n      44,    158,    105,     52,\n       0,    202,    106,    159,\n      43,      9,    193,    140,\n      87,    221,    237,    184,\n     124,     78,     25,     26,\n     175,    122,    186,     16,\n     219,    166,    142,    195,\n     248,    210,     98,    151,\n      51,      1,     54,    148,\n     160,     42,    245,     63,\n     116,     86,    222,     19,\n     183,    130,    179,     24,\n     227,     80,    121,     68,\n     240,    218,    165,    112,\n      59,      4,    208,    157,\n     102,     51,    253,    200,\n     108,    163,    215,     10,\n      67,    118,    169,    220,\n      21,     73,    129,     77,\n      22,    227,    175,    126,\n      69,     10,    222,    163,\n     108,     59,    252,     33,\n     105,    149,    194,      6,\n     197,    150,     84,     35,\n     251,    184,    141,    169,\n     228,     23,     76,    127,\n      66,     29,    229,     85,\n     128,    182,    249,     34,\n     167,    106,     62,     10,\n     196,    146,     99,    203,\n      11,     43,    120,    179,\n     216,    240,    183,    146,\n      79,     11,    232,     71,\n     144,    167,    248,     29,\n     161,    126,     76,     28,\n     213,     88,    149,    210,\n     235,     33,    104,    152,\n      35,    246,    208,    180,\n     122,     40,      3,     89,\n      99,    181,    236,    238,\n     190,    118,     71,     25,\n     219,     87,    131,    177,\n     251,     38,     87,    145,\n      54,      5,    221,    130,\n     120,     59,      3,     35,\n     100,    183,    209,    246,\n     180,    129,     89,     23,\n     230,     77,    129,    167,\n     254,     48,     69,    130,\n      61,     14,    217,    128,\n      74,     45,     18,     34,\n      74,    133,    198,     12,\n     205,    157,     95,     42,\n     226,     69,    120,    163,\n     252,      1,     87,    146,\n     184,     26,    205,    182,\n      91,     33,     17,     40,\n      73,    177,    223,    239,\n     204,    183,    117,     43,\n     251,     60,    127,    168,\n     203,      9,     82,    106,\n     177,     16,    244,    168,\n     100,     91,      2,    208,\n      78,    160,    213,    255,\n     210,    131,     77,     60,\n       2,     48,    120,    141,\n     219,      6,     50,    124,\n     164,     39,    226,    173,\n     153,     83,     13,    235,\n      80,    173,    159,    232,\n      36,    168,     82,     47,\n     242,     33,    111,    135,\n     201,      8,     58,     96,\n     181,    208,    230,    214,\n     159,     65,     54,    226,\n     190,    107,    157,    246,\n     225,    171,    100,     88,\n     244,     55,     85,    133,\n     196,      5,     40,    108,\n     131,    218,    244,    209,\n     138,     75,     56,    251,\n     174,    114,    128,    207,\n     227,    182,    145,     81,\n     234,     11,     89,    129,\n      68,      7,     40,     67,\n     143,    228,      1,    243,\n     131,    104,     58,    240,\n     211,    143,    162,    254,\n      23,     71,    116,     65,\n      63,    235,     83,    111,\n      75,     19,     31,     92,\n     144,    163,    224,    204,\n     189,    101,     58,     13,\n     219,    185,     65,    222,\n      48,     33,    103,     95,\n       5,    237,     73,     97,\n     160,    237,    224,    181,\n     152,    175,    252,     21,\n     189,    106,    191,    243,\n     192,    189,     71,     28,\n     224,     15,     70,    156,\n      62,    209,    219,    126,\n     133,    206,     11,    181,\n     135,    191,    244,     24,\n      78,    105,     89,    227,\n     222,    177,     89,    112,\n      43,     13,     14,    184,\n      49,     36,    226,    132,\n     129,    224,     28,     49,\n     159,     72,    211,     21,\n      82,    127,     94,      8,\n     230,    182,     96,    109,\n      49,    199,    116,    193,\n     229,      1,    242,    143,\n     114,    233,    204,     44,\n      99,    122,     58,     12,\n      37,    101,    173,     40,\n     249,    190,    140,    112,\n      57,    250,    164,    156,\n     254,    242,    204,    129,\n      95,     48,    221,     19,\n     121,    157,     35,     32,\n      53,     73,    190,    218,\n     249,    216,    130,     83,\n      53,    246,    169,    139,\n     161,    208,      0,    189,\n      90,    100,     25,      5,\n     106,    151,     61,     23,\n     203,    111,    139,    211,\n      11,    219,    181,    110,\n      44,    226,    213,    133,\n      95,    222,     48,     94,\n     137,    108,     13,     23,\n      78,    173,    167,     22,\n     198,    172,    128,    215,\n     239,     38,    135,     76,\n      61,    249,    207,    157,\n      92,     47,    243,     49,\n     102,     84,     52,    235,\n      66,    109,    170,    243,\n      28,    189,    116,    179,\n     230,     55,     94,     99,\n      26,     19,    211,    103,\n     101,     50,    245,    216,\n     107,    179,    215,    250,\n      67,    126,    163,    203,\n      26,    182,    140,     72,\n     229,      9,     66,    133,\n      84,     40,    205,     88,\n     154,    199,      6,    213,\n     138,    110,    199,      9,\n      57,    110,    164,    214,\n       5,     73,    112,    168,\n     224,     18,     71,    121,\n      66,      2,    249,    190,\n     139,    173,    248,    221,\n     169,    126,     46,    251,\n      32,    108,    152,    202,\n       3,    198,    104,    172,\n     211,     12,     64,    125,\n      83,     21,    228,    164,\n     115,    179,    254,     25,\n     160,    120,     78,     24,\n     212,     77,    153,    195,\n     249,     53,    155,    159,\n     223,     14,     57,    110,\n     160,     35,    253,    180,\n     129,     86,    230,     25,\n      77,    112,     70,     29,\n     211,    166,    143,    174,\n     243,     45,     91,    111,\n      53,    241,     36,     98,\n      99,    209,    254,    195,\n     141,    165,     45,    242,\n      77,    125,     88,     12,\n     237,    184,    126,    178,\n     228,     38,     87,    116,\n      60,    243,     39,     83,\n     146,    202,    250,    202,\n     159,    102,     46,    253,\n     193,    117,     89,     34,\n     230,    184,    122,     87,\n      27,     29,    181,    120,\n     177,    230,     32,     85,\n     132,    200,    240,     41,\n     158,     98,     63,      3,\n      54,    106,    156,     47,\n     254,    199,    113,    164,\n      33,    233,    187,    132,\n      75,    229,     30,     74,\n     142,    183,    238,    216,\n      94,    136,     56,     11,\n      44,    150,    108,    200,\n     253,    193,    106,    153,\n      45,    244,     61,    142,\n      95,     33,     18,    185,\n     121,    190,    237,    231,\n     174,    135,    184,    237,\n      32,    167,    120,     63,\n     248,     46,    159,    111,\n     205,      4,     54,    149,\n     162,     41,    255,    196,\n     143,     83,    220,     31,\n      66,    131,     76,     26,\n      30,     86,    128,     71,\n       2,    222,     89,    138,\n     199,      2,    213,    103,\n     159,    206,    253,    204,\n     149,     88,     43,    247,\n     188,    113,    163,    217,\n      20,    182,    133,     79,\n     234,     30,     82,    123,\n      66,    240,     39,     90,\n     144,     59,    249,     39,\n     101,     96,     57,    250,\n     196,    108,     94,     47,\n       9,     73,    141,     80,\n     224,     20,     72,    121,\n     179,     21,    227,     81,\n     140,     64,     13,     44,\n      88,    111,    197,    249,\n     200,    158,    155,     53,\n     252,    196,    149,     89,\n     216,    241,    185,    117,\n     164,    231,     22,    180,\n     127,    183,    235,     31,\n      82,    140,    188,    241,\n     214,    160,    147,    197,\n       7,    205,    154,    110,\n      40,    255,    194,    144,\n     161,    217,     14,     70,\n     125,    172,    230,     22,\n     178,    130,    177,    232,\n     222,     87,    136,    191,\n     244,     41,     95,    105,\n      62,      7,    202,    147,\n     103,    216,    251,    206,\n     117,    175,    218,    241,\n      76,    121,     82,    230,\n      17,     79,    126,    180,\n     228,     35,    170,    117,\n     193,     11,    208,    169,\n     108,     50,      3,    206,\n     146,    157,    211,      5,\n      63,    117,    164,    218,\n      22,     64,    121,    174,\n     228,     27,     76,    131,\n      70,     18,    221,    168,\n     112,     57,     13,    208,\n     152,    110,    202,      0,\n     207,    104,    155,    209,\n     247,    195,    116,    175,\n     216,    238,     70,    121,\n     178,    227,     27,    181,\n     120,    185,     19,    216,\n     161,    122,     57,     12,\n     211,    159,    106,     52,\n       6,     60,    107,    158,\n     214,     11,     61,    116,\n     174,     33,    236,     67,\n     127,     77,     26,    228,\n     174,    121,     67,     21,\n     223,    163,    118,     62,\n     252,     47,    157,    145,\n     203,    255,    200,    109,\n     166,    214,      9,     62,\n     136,     86,    219,    236,\n     177,    130,    179,     30,\n     233,    171,    125,     67,\n      12,     33,     93,    138,\n     198,      6,    209,     97,\n     145,    196,      3,    201,\n     110,    160,     43,     11,\n      65,    117,     84,     37,\n     237,    178,    132,     69,\n      18,     30,     90,    130,\n     188,    241,     38,     91,\n     144,    195,    253,     46,\n     153,    152,    205,      3,\n     199,    146,     93,     43,\n     245,    183,    129,     93,\n      22,     28,     94,    123,\n      64,     30,     23,     93,\n     142,     67,     15,    217,\n      93,    154,    207,      6,\n     201,    159,    154,     49,\n     243,    204,    152,     83,\n      40,      1,     89,    112,\n      67,     16,     28,     88,\n     135,     73,     21,    226,\n     173,    143,    177,    244,\n     212,    164,    110,     59,\n       9,    197,    159,    104,\n      62,     15,     27,    104,\n      67,     40,     28,     95,\n     125,     89,     30,     20,\n     178,    132,    185,    236,\n     217,    172,    139,     68,\n      26,    217,    164,    126,\n      56,    235,     19,    157,\n     125,     41,     16,     27,\n     123,     86,     41,    241,\n      66,    119,    191,    230,\n     224,    187,    127,     75,\n       3,    205,    164,     97,\n      59,    232,     61,    178,\n     119,    201,    228,     19,\n     100,    104,     34,    251,\n      48,    105,    183,    218,\n     234,    188,    128,     82,\n      17,    243,    164,    106,\n      71,    241,     45,    186,\n     105,     60,    229,     11,\n     115,     96,     39,      3,\n      38,    112,    143,    214,\n     244,    203,    135,     92,\n      37,    254,    163,    155,\n     177,    197,     23,    166,\n      98,     71,    252,      3,\n      77,    123,     40,     11,\n      59,     65,    135,    206,\n     252,    193,    158,     99,\n      47,    249,    221,    147,\n     168,    195,     25,    160,\n     154,     78,    244,      0,\n      68,    121,     81,     24,\n      51,    124,    155,    198,\n       4,    222,    146,    106,\n     205,    241,    214,    182,\n      95,    202,      7,    214,\n     150,     83,    206,      9,\n      95,    125,     94,     21,\n       9,    122,    159,    191,\n      11,    209,    169,    112,\n     199,      8,    241,    189,\n     100,    212,     15,    217,\n     138,     88,    220,     30,\n      85,    119,     69,     45,\n       4,     97,     96,    181,\n      17,    233,    167,    135,\n     190,      0,    199,    134,\n     105,    220,    234,    194,\n     133,    110,    197,     27,\n      44,    109,     76,     38,\n      29,    106,    105,    168,\n      23,    226,    179,    124,\n     180,     25,    250,    179,\n     116,    166,    253,    204,\n     130,    100,    200,    237,\n      63,     99,     98,     35,\n       7,     21,     70,    165,\n      45,    251,    187,    137,\n     175,     23,    242,    146,\n     111,    162,    240,    231,\n     180,    100,    187,    226,\n      62,     80,    100,     32,\n     254,     29,     79,    156,\n      36,    243,    193,    110,\n     162,     33,    234,    159,\n     150,    189,    251,    233,\n     168,    104,    183,    248,\n      49,     88,    116,     87,\n       3,     14,    111,    153,\n      58,      8,    201,    153,\n     152,     47,    239,    227,\n     150,    181,    198,    242,\n     166,    148,    171,    242,\n      21,     70,    134,     71,\n      27,      1,    102,    133,\n      52,      3,    214,    162,\n     150,     55,     19,    236,\n     138,    156,    196,      1,\n     209,    157,     90,    209,\n       0,     75,    126,     92,\n      23,     14,     97,    148,\n      79,     25,    223,    171,\n     140,    195,      7,    203,\n     191,    109,    223,    241,\n     197,    129,    103,    217,\n       5,     51,    122,     80,\n      46,     30,    104,    102,\n      77,     16,    225,    180,\n     122,    186,     24,    192,\n     133,    125,    205,    228,\n     213,    134,    101,    205,\n      14,     62,    111,    159,\n      46,     12,     31,     80,\n     174,     43,    233,    186,\n     134,    176,     29,    242,\n     142,     97,    185,    249,\n      35,    180,     97,    195,\n     240,     38,    105,    146,\n      52,    254,     42,     78,\n     170,     45,    246,    195,\n     142,    170,     32,    248,\n     170,    158,     73,    244,\n      17,    163,    108,     71,\n     252,     43,     95,    143,\n      59,    251,     56,     64,\n     137,     55,    251,    201,\n     151,     95,    214,    251,\n     163,    169,     91,    203,\n       0,    188,    155,     74,\n     228,     18,     91,    120,\n      71,    241,     50,    127,\n     134,     56,     15,    213,\n     153,    157,    204,    236,\n     220,    137,     87,    217,\n       1,    180,    159,     80,\n     237,     24,     78,    127,\n     181,    232,     19,    114,\n     147,    191,      4,    221,\n     167,    110,    198,     15,\n     215,    187,    117,    192,\n      20,    205,    136,     90,\n     215,     29,     69,    137,\n      84,     26,      6,    109,\n     155,    181,     30,    232,\n     169,    141,    190,      7,\n     195,    187,    103,    203,\n     251,    192,    136,    101,\n     221,     20,     62,    152,\n      94,    218,     28,     99,\n      98,    174,     21,    238,\n     182,    126,     73,     29,\n     202,    180,    112,    172,\n     240,    207,    185,    145,\n     219,    234,     52,    137,\n     119,    208,     24,     19,\n     103,     91,     43,    252,\n     187,    127,     82,     22,\n     243,    162,    139,    184,\n      28,    253,    165,    132,\n     218,    231,    211,    182,\n     101,    195,    225,     19,\n     122,     99,     39,    240,\n     193,    140,     95,     46,\n     251,    189,    105,    165,\n       6,    206,    181,    149,\n     167,    254,    208,    137,\n     124,    212,    222,     53,\n     105,    109,     56,      3,\n      54,    146,    107,     60,\n     245,     42,     98,     67,\n      12,    252,     72,    101,\n     168,     26,    255,    172,\n     135,    152,    206,     44,\n      90,    116,     58,      9,\n     213,    146,    103,     48,\n      20,     44,    146,     80,\n       8,      9,     41,    110,\n     162,     48,    205,    177,\n     101,    147,    244,     25,\n     168,    121,    185,     21,\n     209,    169,    113,    223,\n     239,    223,    186,    114,\n      48,     17,     35,    111,\n      80,     57,    241,     45,\n     110,    164,    223,    238,\n      75,    117,     72,     10,\n     240,     81,    166,    167,\n       0,    241,    178,    141,\n     215,    236,    215,    130,\n     112,    200,     24,     32,\n     106,     86,     33,      3,\n      77,    117,     68,     52,\n       4,     99,    115,    111,\n      48,    228,     67,    144,\n     180,     26,    248,    182,\n     156,    219,    239,     46,\n     151,    111,    196,      8,\n     196,    135,     86,    200,\n      38,    191,    167,    116,\n     225,      2,    106,    121,\n     107,     61,    238,     65,\n     148,    174,     12,    202,\n     165,    153,    207,      3,\n     223,    105,    185,    223,\n     236,    217,    154,    165,\n     207,     21,    189,    151,\n     115,     28,      2,     91,\n     133,     79,     18,     30,\n      80,    118,     81,     15,\n       8,    125,    100,     29,\n      12,     52,    117,    141,\n     208,    237,    221,    145,\n     169,    208,    243,    179,\n     128,    170,    238,     22,\n     163,    131,    168,    248,\n     208,    177,    114,    185,\n     250,     57,     93,    126,\n      46,      3,     42,    104,\n     106,     54,    246,     62,\n     124,    162,     46,    245,\n      93,     99,     87,      1,\n     232,     72,    145,    164,\n     237,    205,    188,    117,\n     211,    231,    214,    181,\n     122,     51,    246,     52,\n     108,    146,    220,    240,\n     212,    141,    172,    216,\n      16,     70,    123,     87,\n      19,     31,     67,    133,\n      65,     28,    212,    172,\n     141,    192,    240,     61,\n     109,    121,     46,    253,\n      38,    100,    156,     35,\n     226,    198,    124,    181,\n     212,    231,    169,    131,\n      76,     27,     24,     69,\n     147,    168,     31,    253,\n     168,    129,    208,    252,\n      40,    147,    117,     63,\n      23,     44,    104,    109,\n      38,    241,    194,    140,\n     174,    202,      8,     69,\n     152,     87,     25,     15,\n      69,    120,     93,      6,\n     218,     73,    129,     61,\n       9,    215,    157,    104,\n      49,      6,     45,    113,\n      91,     53,    230,     56,\n      96,    166,     34,    251,\n     173,    132,    166,    255,\n     231,    184,    116,     68,\n     245,     39,     95,    153,\n     210,      0,    202,    147,\n     147,    209,     13,    199,\n     143,     75,     43,     26,\n      81,    142,     71,     48,\n     232,     64,    111,    166,\n     231,    227,    163,    117,\n      69,    253,     59,     80,\n     124,     33,      9,     40,\n     107,    157,     55,    241,\n     214,    155,    170,    192,\n      26,     68,    130,     88,\n      28,     21,     76,    116,\n     177,     31,    243,    161,\n     118,    181,    245,    216,\n     169,     97,    196,    230,\n      42,    157,    115,     52,\n       2,     61,    107,    167,\n      37,    248,    181,    138,\n     175,    231,    233,    179,\n     123,    181,    225,     11,\n      93,    122,     83,      5,\n     214,     91,    153,    193,\n       5,    222,    150,    100,\n     222,      9,    196,    153,\n      94,    223,     26,     82,\n     134,     64,     12,    237,\n      73,    134,    183,     17,\n     214,    160,    113,    183,\n     249,     46,     94,    110,\n     201,    240,     32,    100,\n     104,     32,    242,    194,\n     114,    162,    216,    244,\n     177,    139,     82,    234,\n      18,     72,    134,    179,\n     232,     40,     92,    139,\n      51,      4,    221,     94,\n     146,    201,     11,    193,\n     144,    159,    219,      3,\n     198,    141,    174,    202,\n       2,     66,    130,     91,\n      30,     25,     79,    124,\n      68,     21,    213,    160,\n     117,    195,    254,     42,\n     157,    150,    204,    246,\n      56,     97,     96,     37,\n     254,    192,    117,    175,\n     221,    231,    168,    137,\n     176,    238,     18,    179,\n     125,    186,    231,     36,\n      91,    142,    195,     11,\n     213,    155,    150,    207,\n       2,    200,    159,    104,\n     214,     15,     63,    140,\n     169,    222,     20,     66,\n     124,     77,     25,     26,\n      80,    121,     64,     20,\n     218,    162,    119,     61,\n     252,     46,    157,    149,\n     202,      7,     50,    107,\n      95,     42,    246,    194,\n     118,    170,     37,    225,\n     187,    134,    182,    228,\n     226,    174,    130,    189,\n     245,     45,     93,    141,\n      59,      6,    208,    157,\n     102,     48,    249,    207,\n     153,     88,     41,     10,\n     190,    138,    175,    214,\n      28,     76,    125,    176,\n     233,     28,     86,    131,\n      64,      5,    213,    172,\n     110,    199,      5,    213,\n     158,    153,    202,      6,\n      59,    110,    166,    212,\n      15,     66,    116,     84,\n      29,    238,    176,    134,\n      72,    233,    225,    174,\n     117,     66,    243,     36,\n      93,    145,    196,    248,\n      51,    102,    153,    205,\n     249,    192,    148,     92,\n     218,    242,    191,    137,\n     172,    224,     20,    180,\n     124,     75,    233,     29,\n      85,    137,     65,     13,\n     213,    162,    144,    197,\n       3,    204,    152,    100,\n     208,      7,     59,    146,\n      95,     39,     15,     64,\n     121,     83,     25,    235,\n      77,    130,    180,    234,\n      33,     85,    117,    191,\n     245,     43,    161,    110,\n      51,      0,     50,    102,\n     157,     47,    251,    199,\n     142,    165,    216,     11,\n      71,    123,    175,    227,\n      25,     76,    125,     75,\n      23,    220,     86,    116,\n      61,      8,    215,    161,\n     148,    203,    255,    204,\n     104,    159,    214,      3,\n      60,    141,     91,    219,\n      16,    186,    132,     81,\n      27,    230,    176,    126,\n     184,    238,     32,     87,\n     115,     62,    247,     41,\n      97,    106,     52,      0,\n      53,    104,     97,     46,\n     245,    194,    114,     88,\n      33,    236,    185,    121,\n     177,     26,    229,     78,\n     134,    185,     16,    220,\n      89,    143,    194,     10,\n     209,     97,    148,    202,\n     253,    207,    150,    158,\n     215,     11,    193,    143,\n      84,    221,     22,     67,\n     126,     78,     24,    228,\n      80,    133,    186,    238,\n     219,    165,    114,     61,\n     248,     45,    156,    105,\n      51,      0,     54,    107,\n     161,    215,     11,    192,\n     139,    169,    223,     19,\n     183,    130,     77,     24,\n     227,     81,    134,    187,\n      15,    219,    164,    143,\n     198,    251,    209,    157,\n     103,    204,      0,     53,\n     108,     95,     43,    244,\n     191,    138,     84,     33,\n     234,    180,    129,    179,\n      23,    227,    173,    135,\n     188,    241,     38,     90,\n     144,    197,    250,     47,\n     100,    153,    206,      3,\n     199,    147,     93,     40,\n     243,    190,    137,     84,\n     224,     20,     72,    126,\n     180,     22,    225,     83,\n     136,    188,    243,    216,\n     162,    110,     57,      5,\n     206,    154,    154,     48,\n     250,    199,    111,    160,\n     217,    243,    191,    137,\n     173,    227,     23,    180,\n     126,     75,     21,     31,\n      84,    119,     64,     12,\n      40,     93,    109,     56,\n     252,     49,    102,    155,\n      47,    250,     58,    110,\n     165,    217,    240,    189,\n     120,    172,    226,    232,\n     179,    129,    182,     20,\n     223,     85,    138,     64,\n      11,    214,    161,    108,\n     200,    253,     50,    152,\n      99,    209,      6,     59,\n     112,     90,     37,    240,\n     187,    121,    174,     28,\n     230,    178,    130,    183,\n      19,    222,     86,    138,\n     192,     10,    213,     95,\n     148,    201,      1,    205,\n     151,    157,    211,      7,\n     195,    142,     89,     36,\n      16,     69,    133,     80,\n      27,     25,     78,    131,\n      71,     18,     34,     87,\n     140,     62,      9,    212,\n     159,    149,    202,      0,\n     203,    150,     97,     44,\n       8,     60,    114,     88,\n      35,    238,     70,    122,\n     176,     26,    229,     79,\n     132,    185,     17,    220,\n     167,    114,     61,      8,\n     211,     97,    150,     52,\n     255,     53,    106,    159,\n     212,      9,     62,    140,\n      87,     34,    237,    184,\n     131,     79,     25,     27,\n      81,    133,     69,     16,\n     219,     89,    142,    195,\n     248,     45,    157,    105,\n      51,      1,     54,    107,\n      95,     43,    245,     63,\n     116,    169,     33,     19,\n      72,    125,    178,     24,\n     227,     81,    134,     68,\n      15,    218,     90,    143,\n      59,      6,    209,     99,\n     152,    205,      2,     55,\n     108,    161,    214,    244,\n     191,    138,     85,     32,\n      20,     73,    129,     77,\n      23,     29,     82,    120,\n      67,     14,     38,     91,\n     144,    197,      5,     47,\n     100,    153,     49,      3,\n      56,    146,     93,    215,\n      12,    190,    137,    171,\n     224,     21,    181,    128,\n     180,    233,     30,    172,\n     119,     66,    242,     39,\n     163,    111,     57,    251,\n      48,    154,    100,     48,\n       4,     57,    110,     92,\n      39,    242,    189,    119,\n     172,    225,     22,    180,\n     127,     74,    234,     31,\n      84,    137,     65,     12,\n     215,    162,    146,    199,\n     252,    206,    153,    155,\n     208,      5,     58,    144,\n      91,     38,     14,     67,\n     120,     82,     29,     23,\n      76,    129,     73,     20,\n     223,     85,    117,     64,\n      11,     41,     94,    108,\n      55,      2,     50,    103,\n     156,     46,    249,    196,\n     112,    165,    218,    240,\n     187,    134,    174,    227,\n      24,    178,    125,     72,\n     236,     33,     86,    139,\n      63,    245,     42,     95,\n     148,    201,    254,     51,\n     151,     98,     45,      7,\n      60,    142,     89,     36,\n     239,     69,    122,    175,\n     228,    230,     78,    131,\n     184,    237,    221,    168,\n     115,     62,    246,    212,\n     159,    106,     53,      0,\n      52,    105,    158,     44,\n     247,    194,    114,    167,\n     220,     17,    185,    132,\n     176,    229,     26,     79,\n     123,     70,     17,    220,\n      88,    141,    194,    247,\n     211,    158,    105,    203,\n       0,     53,    149,     96,\n      43,      9,     62,    115,\n      87,     34,    237,    184,\n     124,    177,    230,    228,\n     175,    122,    186,    239,\n      36,    166,    113,     60,\n       7,    210,     98,    104,\n      51,    254,     54,    107,\n     160,    213,     10,     63,\n     116,    169,    222,     19,\n      72,    130,     77,     24,\n      28,     81,    121,    187,\n     240,    218,    165,    112,\n     196,    249,     46,    156,\n     103,     50,      2,     55,\n     147,     94,     41,    244,\n      64,    117,    170,     32,\n     235,     73,    126,    179,\n     232,     29,    173,    120,\n      67,     14,     38,     91,\n     144,     58,      5,    208,\n     100,    153,     49,    252,\n     199,    146,    162,    215,\n      12,     65,    118,    171,\n      31,    234,     74,    127,\n     180,     22,    225,    172,\n     136,    189,    242,    216,\n     163,    110,     57,    251,\n      48,    154,    154,    207,\n       4,    198,    145,    163,\n     216,     13,     66,    119,\n      83,     30,     22,     75,\n     128,    181,    234,     31,\n      84,    137,    190,    243,\n     215,    162,    109,     56,\n     252,     49,    153,    100,\n      47,    250,    197,    144,\n      91,     38,    241,    188,\n     135,    173,     29,    232,\n     179,    129,    182,     20,\n     223,    170,    138,    191,\n     244,     41,     94,    147,\n     200,    253,     50,    103,\n      99,     46,    249,    196,\n     143,     90,     37,     15,\n     187,    134,     81,     28,\n     231,    178,    125,     72,\n      19,    222,    169,    116,\n      63,     10,     42,    160,\n     107,    201,      1,    204,\n     151,    157,    210,      7,\n      60,    113,    166,    219,\n      16,     69,    122,    175,\n     228,     25,     78,    131,\n     184,    237,     34,     87,\n     140,    193,    246,     43,\n      96,    149,    202,      0,\n     203,    150,     97,     44,\n     247,    194,    141,     88,\n      35,    238,    185,    132,\n     176,    229,    229,     79,\n     132,    185,    238,     35,\n      88,    141,    194,      8,\n      44,     97,    105,    203,\n       0,    202,    106,    159,\n      43,      9,     62,    140,\n     168,    221,    237,     71,\n     124,     78,    230,     27,\n     175,    133,    186,     16,\n      36,     89,    113,    195,\n     248,    210,     98,    151,\n      51,      1,    201,    148,\n     160,    213,    245,     63,\n     116,     86,    222,     19,\n     183,    125,    178,     24,\n      28,     81,    121,    187,\n     240,    218,     90,    143,\n      59,    249,     46,    156,\n     152,    205,    253,     55,\n     108,     94,    214,    244,\n     191,    117,     85,     32,\n     235,    182,    129,    179,\n      23,    226,     82,    120,\n     188,    241,    217,    164,\n     144,     58,    250,     47,\n     155,    153,    206,    252,\n      56,    109,     93,     40,\n      12,    190,    137,    171,\n      31,    234,     74,    128,\n      75,    233,     30,    172,\n     136,    189,     13,     39,\n      92,    110,    198,    251,\n     207,    101,    154,     48,\n       4,     57,    145,    163,\n     216,    242,     66,    119,\n     172,     30,     22,    180,\n     127,    181,     21,    224,\n      84,    118,     65,    243,\n      40,    162,    109,    199,\n       3,     49,    153,    155,\n     208,    250,     58,    144,\n      91,    217,    241,     67,\n     135,    173,    226,     23,\n      76,    126,    182,     20,\n     223,     85,    117,     64,\n     244,    214,    161,    147,\n      55,      2,     50,    152,\n      99,     46,    249,    196,\n     112,    165,     37,     15,\n      68,    134,     81,    227,\n     231,    178,    125,     72,\n      19,     33,     86,    116,\n      63,    245,    213,    160,\n     148,     54,    254,     51,\n     151,    157,    210,    248,\n      60,    113,     89,     36,\n      16,    186,    133,    175,\n      27,     25,     78,    124,\n     184,    237,    221,     87,\n     140,     62,      9,     43,\n     159,    106,    202,      0,\n     203,    105,     97,     44,\n       8,    194,    141,    167,\n      35,    238,     70,    132,\n      79,    229,    229,     79,\n     132,     70,     17,     35,\n     167,    114,    194,      8,\n      44,     97,    105,    203,\n       0,    202,    106,    159,\n      43,      9,     62,    140,\n      87,    221,    237,     71,\n     124,     78,     25,     27,\n     175,    133,     69,     16,\n      36,    166,    113,     60,\n       7,    210,     98,    151,\n     204,      1,    201,    107,\n      95,     42,     10,     63,\n     139,    169,    222,    236,\n      72,    125,     77,    231,\n      28,    174,    121,    187,\n      15,    218,     90,    112,\n      59,    249,    209,    156,\n     103,     50,    253,    200,\n     108,     94,     41,     11,\n     191,    117,    170,     32,\n     235,     73,    129,     76,\n     232,    226,    173,    135,\n      67,    241,     38,     91,\n     144,    197,      5,    208,\n     100,    102,    206,      3,\n      56,    146,    162,    215,\n      12,     65,    118,    171,\n      31,    234,     74,    127,\n     180,     22,    225,     83,\n     119,    189,    242,    216,\n     163,    145,     57,    251,\n      48,    154,    101,     48,\n     251,    198,    110,    163,\n      39,     13,    189,    136,\n      83,     30,    233,    180,\n     128,     74,     21,     31,\n      84,    137,    190,    243,\n     215,    162,    146,     56,\n       3,     49,    102,    100,\n     208,      5,    197,    111,\n     164,     38,     14,     67,\n     135,    173,    226,    233,\n      76,    129,     72,    235,\n      32,    171,    138,    191,\n      10,     41,     94,    108,\n     200,    253,    204,    103,\n     156,     46,      6,    196,\n     143,    165,     37,    240,\n      68,    121,     81,    227,\n      24,    178,    130,    183,\n      19,    222,     86,    116,\n      63,    245,    213,    160,\n     148,     54,    254,     51,\n     104,     98,     45,    248,\n     195,    113,     89,    219,\n     239,    186,    133,     80,\n     228,    230,    177,    124,\n      71,    237,     34,    168,\n     115,    193,      9,    212,\n      96,    149,     53,    255,\n     203,    150,    158,     44,\n       8,     61,    141,     88,\n     220,     17,    185,    123,\n     176,     26,     26,    176,\n     132,    185,     17,    220,\n      88,    141,     61,    247,\n     211,    158,    150,    203,\n     255,    202,    106,    159,\n      43,    246,     62,    115,\n      87,     34,     18,     71,\n     131,     78,    230,     27,\n     175,    133,     69,     16,\n      36,     89,    113,     60,\n       7,     45,     98,    104,\n      51,      1,    201,    148,\n     160,     42,    245,     62,\n     116,     86,    222,     19,\n     183,    125,     77,    231,\n      28,     81,    121,     68,\n     241,    218,    165,    143,\n      59,    249,    209,    156,\n     103,    205,    253,    200,\n     147,     94,    214,    244,\n      64,    117,     85,     32,\n     235,     73,    126,    179,\n      23,    226,     82,    120,\n      67,    241,     38,    164,\n     144,     58,      5,     47,\n     100,    102,    206,    252,\n     199,    109,     93,    215,\n      12,    190,    136,    171,\n     224,    234,     74,    127,\n      75,    233,     30,    172,\n     119,    189,     13,     39,\n      92,    111,    198,    251,\n     207,    154,    154,     48,\n       4,     56,    144,     92,\n     217,    242,    189,    119,\n      83,     30,     23,    180,\n     127,    180,     21,    224,\n      84,    118,    190,    243,\n     215,    162,    146,    199,\n       3,     49,    153,    155,\n     208,    251,     58,    144,\n     164,     38,     14,     67,\n     135,    173,    226,    232,\n      76,    126,     73,    235,\n     223,     85,    138,     64,\n      11,     41,    161,    147,\n     200,      2,     50,    103,\n      99,     46,      7,     59,\n     142,    165,     37,     15,\n      68,    121,    174,     28,\n     231,    178,    131,     72,\n      19,     32,    168,    139,\n     192,     11,     42,     95,\n     107,     54,    254,    204,\n     151,    157,     45,    248,\n      60,    143,    167,    219,\n     238,     68,    133,     81,\n     229,     25,    177,    131,\n      71,     18,     35,    168,\n     114,    192,    246,    212,\n      96,    106,     53,    255,\n     203,    150,    158,     45,\n       8,     61,    140,    167,\n     221,    238,    185,    123,\n      79,     26,     27,    176,\n     123,    185,     17,    221,\n      89,    141,     60,    246,\n     210,    158,    151,     52,\n       0,     53,    149,     96,\n     212,    246,    193,    114,\n      87,     34,     19,    184,\n     124,    177,     25,    228,\n      80,    133,     68,    239,\n      36,    166,    142,    195,\n       7,    210,     98,    104,\n     204,      1,    201,    107,\n      95,     42,     10,     63,\n     116,     86,    222,    236,\n     183,    125,     77,     24,\n     227,    174,    134,     68,\n      15,     37,     90,    143,\n      59,      6,    209,     99,\n     103,     50,      2,    201,\n     108,    161,     41,    244,\n      64,    138,     85,    223,\n     235,    182,    126,    179,\n      23,     29,     82,    120,\n     188,    241,     38,     91,\n     111,    197,    250,    208,\n     100,    153,     49,      3,\n     199,    146,    162,     40,\n      12,     65,    118,     84,\n      31,     21,    181,    128,\n     180,     22,    225,     83,\n     136,     66,     13,    216,\n      92,    110,     57,      4,\n      48,    101,    101,    207,\n       4,     57,    110,     92,\n     216,     13,    189,    136,\n     172,    225,    233,     75,\n     127,     74,    234,    224,\n      84,    118,     65,    243,\n     215,    162,    146,    199,\n       3,     49,    153,    100,\n     208,      5,    197,    111,\n     164,     38,    241,     67,\n     135,     82,    226,     23,\n     179,    129,     73,    235,\n      32,     85,    117,    191,\n     244,    214,     94,    108,\n      55,    252,    204,    103,\n     156,     46,    249,     59,\n     143,     90,    218,    240,\n      68,    121,     81,    227,\n      24,    178,    125,    183,\n     236,     33,    169,    116,\n     193,     10,    213,     95,\n     107,    201,      1,    204,\n     151,    157,     45,    248,\n      60,    142,     89,    219,\n     239,    186,    122,     80,\n      27,     25,     78,    124,\n     184,    237,    221,     87,\n     140,     62,    246,     43,\n     159,    106,    202,    255,\n     203,    105,     97,     44,\n       8,     61,    141,     88,\n     220,     17,    185,    123,\n     176,    229,    229,     79,\n     123,    185,    238,    220,\n     167,    141,     61,    247,\n      44,    158,    105,    203,\n       0,    202,    106,    159,\n      43,    246,     62,    140,\n     168,     34,    237,     71,\n     131,     78,    230,    228,\n     175,    122,    187,     16,\n      36,     89,    113,    195,\n       7,     45,    157,    151,\n     204,    254,    201,    107,\n     160,     42,     10,     63,\n     139,     86,     33,    236,\n      72,    125,     77,     24,\n      28,    174,    134,     68,\n      15,    218,     90,    112,\n      59,    248,    209,    156,\n     152,     50,    253,     55,\n     108,     94,     41,     11,\n     191,    117,    170,    223,\n     235,    182,    126,    179,\n     232,    226,     82,    120,\n     188,    241,     38,     91,\n     111,     58,      5,    208,\n     155,    102,     49,    252,\n      56,    146,    162,    214,\n      13,     65,    119,    169,\n     224,     21,     74,    128,\n      74,     23,    226,    170,\n     114,     68,     10,    220,\n      93,    148,    206,    246,\n      32,    105,    157,    204,\n     255,    204,    154,     81,\n      44,    249,    181,    138,\n      83,     28,     22,     89,\n     151,    187,    228,     20,\n     169,    122,     70,      0,\n     199,    169,    107,     58,\n     255,     59,    111,    156,\n     209,    255,    200,    156,\n     162,    215,      3,     77,\n     116,     80,     16,    227,\n     160,    104,     68,     22,\n      40,     68,    157,    166,\n     230,     45,    160,    100,\n      47,     38,    220,    107,\n     147,    220,     20,     60,\n     159,     72,     46,    224,\n     177,    125,    191,    245,\n      15,     84,    143,     73,\n      20,    213,    186,    111,\n      29,     47,    214,    127,\n     138,    210,    228,     48,\n     131,    114,     39,    247,\n     203,    143,    162,    203,\n       2,     84,    117,    170,\n      25,    231,    184,    101,\n      89,     13,    216,     72,\n     147,    210,    229,    213,\n     131,    121,     49,      9,\n     206,    107,    157,    223,\n       4,     49,     98,    170,\n     223,     16,    186,    146,\n     108,     60,    239,     81,\n     153,    182,    255,    222,\n     185,     98,    193,     13,\n     215,    158,    106,    206,\n      12,     32,     75,    134,\n     208,    254,    210,    170,\n     123,      7,    237,    104,\n      86,    160,    234,    239,\n     140,    104,    186,     21,\n     222,    165,    112,    201,\n     234,     51,     74,    130,\n      54,    234,    232,    190,\n     121,     49,     30,    126,\n      83,    168,     37,    240,\n     154,    142,    188,    239,\n      30,    173,    117,     71,\n     232,     11,    119,    152,\n      50,     32,    248,    131,\n     125,     38,     17,     11,\n     115,     81,     57,    225,\n     157,    137,    183,    203,\n     233,    164,    147,     76,\n     244,     36,    107,    140,\n      92,     32,    240,    189,\n     100,     54,      5,      7,\n      67,     99,     33,    250,\n     212,    159,    179,    192,\n     240,    163,    145,    168,\n     250,     39,    115,    117,\n      96,     58,    244,    168,\n     139,     65,     28,     35,\n     121,    157,     43,      3,\n     202,    137,    100,    214,\n      14,    208,    136,    168,\n     199,     20,    104,    107,\n     116,     50,     21,     66,\n     120,     67,      2,    198,\n      93,    186,    172,      0,\n     222,    173,    117,    194,\n     227,     53,    129,    107,\n     196,     36,     43,    115,\n     161,      8,    233,     90,\n     107,     95,      9,    205,\n     130,    145,    245,    245,\n     212,    177,     86,     88,\n     230,      2,     78,     98,\n      33,      2,     47,    125,\n     136,    212,    238,    203,\n     104,    190,     54,    192,\n     141,    181,    190,    177,\n      41,    160,     83,    106,\n      27,     61,    102,    155,\n      40,     46,    211,    120,\n     139,    194,    251,    216,\n     134,    133,    242,    224,\n     245,    168,    114,     35,\n      66,     15,    144,     17,\n      59,     24,     89,    173,\n     152,     29,    246,    188,\n     146,    233,    250,    212,\n     149,    103,    193,    235,\n     219,    166,     67,     55,\n     226,      9,     36,    160,\n      98,    222,    187,    105,\n     150,    205,     26,    149,\n      89,    180,    223,     58,\n     166,    113,     55,      4,\n      41,    100,    114,     20,\n     248,    216,    157,    166,\n     231,    215,    128,    129,\n     179,    203,     15,     95,\n     142,     99,     10,     52,\n     124,    135,     68,     24,\n     198,    170,    129,     61,\n      16,    216,    152,     77,\n      48,     66,     42,    166,\n     123,    196,     26,     50,\n      84,    165,     60,    206,\n      88,     81,    189,     28,\n     235,    191,    105,    179,\n     255,    222,    171,    121,\n      27,     53,     57,     40,\n     147,     28,    238,     39,\n     100,    180,    245,     12,\n     159,    151,    189,    251,\n     234,    185,    141,     94,\n      16,     15,     70,    124,\n      84,     22,    242,    191,\n     170,    130,     13,    229,\n     144,    149,    201,     35,\n      29,    150,    113,     38,\n      45,     81,    152,     90,\n      26,    239,     65,    101,\n     178,     15,    254,    183,\n      92,    182,    168,     23,\n     142,     93,    198,    252,\n      36,     74,    131,     45,\n     200,     58,     75,    160,\n      54,    247,    189,    136,\n     163,    237,    231,    148,\n     106,     93,      7,     38,\n      26,    114,      9,     41,\n      35,     74,    185,    224,\n       7,    251,    188,    143,\n     202,    250,    195,    108,\n      89,     39,      1,     68,\n     136,     72,     15,    247,\n     176,    198,    128,     48,\n     224,    171,    151,    162,\n     208,     57,    131,     83,\n      58,    219,     42,    152,\n     156,     47,    243,     56,\n     127,    165,     48,    228,\n     175,    166,    182,    175,\n       9,    136,     88,    167,\n     248,     58,     75,    114,\n       9,     35,     63,    120,\n     153,     54,    255,    197,\n     144,    150,    216,    241,\n     213,    158,    121,     42,\n      44,    127,    147,    101,\n      29,     22,     94,    152,\n     182,      8,    241,    170,\n     169,    216,    242,    214,\n     145,    120,    203,    244,\n      54,    153,    113,     63,\n     233,     37,     54,    183,\n      12,    241,     64,    113,\n     165,    249,     25,    147,\n      98,    170,    242,     36,\n     167,    122,     41,     14,\n      33,    109,    109,     59,\n     240,    238,    152,    166,\n     225,    226,    240,    128,\n     172,    209,     50,     80,\n     146,    106,     28,     12,\n      64,    135,     68,     29,\n     215,     93,    130,    193,\n      11,    221,    188,    124,\n     231,     52,    203,    179,\n      77,     42,      1,     33,\n     105,     85,     62,    226,\n      68,    115,    183,    227,\n     228,    160,    120,    179,\n     245,    208,    171,    105,\n      45,    216,      0,     98,\n     120,     61,    248,     55,\n     119,    190,    211,    238,\n     168,    115,    165,    213,\n      30,    179,    149,     73,\n     225,    224,    160,    126,\n      86,     26,      3,    112,\n     102,     36,      1,     47,\n     152,    141,    213,      0,\n     210,    158,    171,    223,\n       4,     78,    141,     66,\n      28,     29,    185,    149,\n      75,     29,    236,    117,\n     171,     85,     47,     47,\n      87,    109,    202,    233,\n     207,    138,     99,    199,\n       0,     62,    127,     95,\n      48,    246,     79,    152,\n      77,     28,    239,     76,\n     165,    185,     55,    250,\n      68,    153,    183,    251,\n      42,    170,    100,    205,\n     243,    206,     96,    151,\n      39,    239,     58,     99,\n      65,      2,    253,     86,\n      73,    163,     61,    201,\n      76,    143,    167,    253,\n      32,    191,    100,    180,\n     212,     37,    169,    145,\n     200,     18,    199,    109,\n     102,     13,    209,     57,\n      48,    128,      5,    219,\n     186,    115,    169,    251,\n      10,    190,     99,     75,\n     200,     60,    169,    115,\n      60,     13,    211,     92,\n     108,     45,     36,    200,\n      92,    191,     59,    219,\n     197,    118,    171,    206,\n      26,    176,    156,     85,\n     196,     57,     73,    116,\n      74,     28,     35,     95,\n     122,     32,     45,     56,\n      83,    107,     28,      8,\n      58,    148,    150,    192,\n      11,    209,    159,    172,\n     249,      8,     70,    131,\n      64,     23,     26,     78,\n     124,    100,     22,     19,\n      75,     90,     30,    241,\n      34,    121,    128,     61,\n     224,    220,     96,    186,\n     203,      3,    195,    156,\n      71,    221,     19,    177,\n     153,    176,    207,     17,\n     134,     91,    178,    233,\n      40,     70,    131,     33,\n      42,    218,     74,    184,\n     217,    250,    223,    155,\n      94,     43,    241,    208,\n     121,    143,     33,    197,\n     147,    133,    190,    198,\n       1,    173,     90,    109,\n      12,      3,    122,    156,\n     206,     22,    201,    151,\n     152,     57,      1,      4,\n     117,    118,      6,    252,\n     183,    139,    130,    251,\n     227,    145,    159,     78,\n     254,     59,     73,    117,\n      84,    240,     47,    177,\n     117,    237,    205,    214,\n     176,    113,     60,    241,\n      32,     72,     94,      9,\n     226,     70,    124,    165,\n     242,    226,    160,    131,\n     160,    233,    245,     75,\n     169,     75,     18,    210,\n     160,    102,    213,    227,\n     195,    185,    116,    201,\n       3,     45,    114,     94,\n       4,    235,     75,    124,\n     187,    202,     31,    145,\n      98,     72,     29,     26,\n     117,    153,     87,     17,\n     219,     93,    153,    215,\n     248,    192,    151,    159,\n     210,      2,     27,    117,\n      74,      6,    240,     65,\n     122,    191,    225,    253,\n     189,    127,     73,    224,\n      43,    163,    110,     90,\n       8,     56,    121,    184,\n     193,     28,    238,    146,\n     153,    200,     31,    199,\n     155,     79,     42,     10,\n      83,    116,     85,      8,\n     253,    163,    139,    148,\n     200,     45,    185,    111,\n      42,    241,     48,     73,\n     156,     35,     39,    199,\n     125,    137,    212,    255,\n     223,    154,    191,    254,\n      22,    189,    130,     64,\n       8,     29,     88,    136,\n      79,     25,    212,    163,\n     140,    202,    255,    212,\n     154,    158,    211,    243,\n     201,    159,    115,     62,\n     245,     63,    140,    164,\n      35,    225,    168,    130,\n     180,    233,     13,    109,\n     157,    184,     26,    208,\n     183,    124,     62,    246,\n     210,    153,    102,     56,\n     248,    200,     99,    136,\n     202,     18,     49,    137,\n      68,     48,    231,    187,\n     134,     69,     21,    227,\n     171,    127,    186,    253,\n      63,     64,    150,    207,\n      14,    198,    146,     98,\n      57,    246,    195,    154,\n      83,     38,    240,     49,\n     105,    182,    197,      0,\n      78,    138,     95,      9,\n     235,    175,    123,     73,\n      27,    202,    175,    142,\n     213,    239,     58,    114,\n     147,     51,    246,    205,\n     146,     84,     36,    253,\n     186,    140,     81,    215,\n      25,     78,    121,    185,\n     227,     17,     88,    123,\n      82,     26,    201,    171,\n     104,     58,      7,    208,\n      99,    158,    202,     13,\n      47,     98,    161,    214,\n     241,    176,    153,     83,\n      26,    225,    190,    134,\n      75,    234,     27,     85,\n     128,    183,    248,     46,\n      88,    144,     57,      1,\n     197,    147,     96,     53,\n     253,    197,    110,    163,\n     220,      4,     75,    114,\n     174,    224,    232,    177,\n     124,    183,    232,    229,\n     160,    122,     71,    246,\n      37,     80,    149,    198,\n       0,    202,    152,    154,\n     212,      6,    199,    153,\n      86,     33,     10,     73,\n     127,    172,     30,    237,\n     183,    126,    181,    238,\n      33,    171,    116,    190,\n     246,     41,    162,    108,\n     204,    249,    205,    157,\n     103,     42,    253,    197,\n     114,    166,    219,     15,\n      68,    123,    172,     30,\n     230,     72,    132,    181,\n      17,    218,    170,    118,\n     192,    244,    212,    162,\n     107,     55,      3,     50,\n     109,    153,    209,      6,\n     192,    137,     95,     36,\n      19,     65,    126,     80,\n      24,    229,    176,    135,\n     189,    238,     35,    169,\n     112,     61,     11,    215,\n     158,    150,    201,      1,\n     201,    151,     96,    209,\n      14,     58,    119,    167,\n      32,    237,     70,    132,\n      76,     24,    231,    180,\n     120,     71,    238,     34,\n      93,    138,    196,    243,\n      45,    156,    109,     55,\n     253,    203,    149,     96,\n      42,    244,    196,    137,\n      87,    219,     27,     79,\n     122,    176,     29,    227,\n     172,    135,    190,    238,\n     217,    163,    118,     56,\n       7,     47,    103,    144,\n     202,      1,    203,    148,\n      94,     40,    244,    192,\n     117,    168,     32,    238,\n     181,    125,    179,    229,\n      29,     81,    135,    185,\n     240,    217,    161,    114,\n     196,      6,    209,    156,\n     102,     51,      0,     49,\n     106,    162,    215,    244,\n     188,    136,     84,     33,\n     234,    183,    131,     72,\n      19,    226,     81,    132,\n     189,    243,     39,     91,\n     144,    199,    255,     43,\n     100,     98,     52,    255,\n     197,    147,     93,    214,\n      14,     66,    119,     86,\n      28,    232,    180,    127,\n     182,    234,     31,    172,\n     117,     64,     13,     37,\n      95,    148,    194,      5,\n     203,    155,    101,     50,\n     250,     56,    111,     92,\n      37,    241,    191,    119,\n     175,    229,     18,     72,\n     129,     72,     17,    227,\n     171,    136,    188,    243,\n     213,    166,    110,     57,\n     253,     53,    101,    155,\n      47,      5,    197,    146,\n      91,    217,    241,    188,\n     121,    172,    226,     22,\n      78,    129,     72,     21,\n     223,     85,    136,    189,\n      11,    213,    165,    110,\n      55,    252,     48,    101,\n      99,    209,      7,     58,\n     113,    164,     37,    242,\n     185,    121,     81,     28,\n     231,    179,    124,     73,\n     236,     32,     87,    138,\n     193,    245,    213,     95,\n     148,     55,      0,    205,\n     150,     96,     47,    248,\n      61,    112,    166,    218,\n      17,     69,    120,    173,\n     229,     25,    177,    125,\n      70,     19,    221,    168,\n     115,    193,      9,    212,\n      96,    106,     53,    254,\n      54,    104,     96,     45,\n     246,    195,    140,    166,\n     221,     17,     70,    122,\n     176,     26,     26,     78,\n     132,     70,     17,    220,\n     165,    113,     60,    247,\n     211,    158,    150,    201,\n       1,     52,    106,     96,\n     212,     11,     60,    114,\n     168,     35,    233,    188,\n     130,    177,    230,     25,\n      81,    123,     71,    239,\n      37,     88,    142,    194,\n     249,     45,    157,    105,\n      49,    255,     54,    107,\n     160,     42,     10,     63,\n     139,     86,    222,    236,\n     183,    125,    179,     24,\n     226,    175,    120,     68,\n     240,     39,     88,    143,\n      58,      6,     46,     98,\n     152,     50,    253,    200,\n     147,     94,     41,    244,\n     191,    138,     85,     32,\n      20,     72,    124,    177,\n     232,    227,    172,    120,\n     188,    241,     38,    164,\n     111,     59,      7,    209,\n     155,    152,    204,      3,\n     199,    147,     92,     40,\n      12,     65,    119,    170,\n     224,    235,    180,    128,\n     180,    233,     30,    172,\n     119,    189,     13,    217,\n     163,    145,    198,      4,\n      48,    101,    154,    207,\n       4,    198,    145,    163,\n     217,     13,    188,    137,\n      83,    225,     22,     75,\n     127,     74,    234,     31,\n      84,    118,     65,     13,\n     215,     93,    146,     56,\n       3,     49,    102,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     120,     82,     29,     23,\n      76,    126,     73,    235,\n      32,     85,    138,    191,\n      11,    214,     94,    147,\n     200,      2,    205,    152,\n      99,     46,    249,    196,\n     143,     90,     37,    240,\n      68,    121,    174,    227,\n      24,     77,    125,     72,\n      19,    222,    169,    139,\n     193,    245,     42,     95,\n     148,     54,      1,     51,\n     104,    157,    210,      7,\n     195,    142,     89,     36,\n     239,     69,    122,     80,\n      27,     25,     78,    131,\n     184,    237,     34,    168,\n     115,     62,    246,    212,\n     159,    106,     53,    255,\n      52,    105,    158,     44,\n       8,     61,    114,     88,\n      35,    238,    185,    123,\n     176,     26,    228,    176,\n     132,    185,    238,     34,\n      88,    114,     61,    247,\n      44,     97,    150,    203,\n     255,    202,    149,     96,\n      43,      9,    193,    140,\n      87,    221,     18,     71,\n     124,    177,     25,    228,\n     175,    122,    186,    239,\n     219,    166,    142,    195,\n     248,    210,     98,    104,\n      51,      1,     54,    107,\n      95,     42,    245,    192,\n     139,    169,     33,    236,\n     183,    125,    178,    231,\n      29,    175,    133,    184,\n      11,    218,    164,    113,\n      59,      6,    209,    156,\n     103,    205,      0,     49,\n     111,     92,     43,    247,\n     190,    138,     84,     33,\n     235,     72,    129,    176,\n     236,     28,     80,    120,\n      64,     15,    216,    165,\n     110,     59,      5,     46,\n     100,    102,    204,      2,\n     198,    146,    162,     40,\n      12,    190,    137,    171,\n     225,    234,     74,    127,\n      75,     22,    225,    173,\n     119,    189,     13,    216,\n     163,    110,    198,    251,\n     207,    101,    155,    207,\n     251,    199,    145,     92,\n      39,     13,     66,    118,\n     172,     30,    233,     75,\n     128,     74,     21,     31,\n     171,    119,     65,     12,\n     215,     93,    146,    198,\n     252,     49,    103,    100,\n     208,      5,    196,    145,\n      91,     38,    241,     67,\n     120,     82,    226,     22,\n      76,    129,     73,     20,\n     222,    171,    117,     64,\n     244,     41,     95,    146,\n     200,    252,    205,    152,\n      99,     47,    249,    196,\n     143,     90,     37,     15,\n      68,    121,    174,     28,\n      24,    178,    125,    183,\n     237,     33,     86,    139,\n      63,    245,     42,    161,\n     107,    201,      1,     51,\n     105,     98,    210,      7,\n     195,    142,    166,     36,\n     239,     69,    133,     80,\n     228,    230,     78,    124,\n     184,    237,    221,    168,\n     115,    193,    246,     43,\n      96,    106,     53,      0,\n     203,    150,    158,    211,\n     247,    194,    114,    167,\n     220,     17,     70,    132,\n     176,     26,    229,     79,\n     123,    185,    238,    220,\n     167,    141,    194,      8,\n      44,     97,    150,    203,\n     255,    203,    107,    159,\n      42,      9,     62,    140,\n     168,    221,    236,    184,\n     124,     78,    230,     27,\n     175,    122,     69,     16,\n     219,     89,    113,     60,\n     248,    210,    157,    104,\n     204,      1,    201,    107,\n     160,     42,     10,     63,\n     139,    169,    222,    236,\n      72,    125,     77,     24,\n      28,    174,    121,    187,\n     240,     37,     90,    112,\n      59,    249,    208,    156,\n     152,     50,    253,     55,\n     108,     94,    215,    244,\n     191,    116,     85,     32,\n      20,    182,    129,    179,\n     232,    226,     82,    120,\n      66,    241,    217,    164,\n     145,     58,      4,     47,\n     100,    102,    206,      3,\n     199,    109,    162,     40,\n      12,     65,    137,    171,\n     224,    234,     74,    127,\n      75,    233,     30,    172,\n     119,    189,     13,    216,\n      92,    110,     57,      4,\n      48,    154,    154,    207,\n     251,    198,    110,     92,\n      39,     13,    189,    137,\n     172,     30,    233,     75,\n     128,     74,    234,     31,\n     171,    137,     65,     12,\n      40,     93,    109,     56,\n       3,    206,    102,    155,\n      47,    250,     58,    111,\n      91,    217,     14,    188,\n     120,     82,     29,     23,\n      76,    126,     73,    235,\n     223,    170,    117,     64,\n     244,     41,    161,    108,\n     200,      2,    205,    103,\n      99,     46,      6,    196,\n     143,    165,     37,    240,\n      68,    134,     81,    227,\n     231,    178,    130,     72,\n      19,    222,     86,    139,\n      63,    245,     42,    160,\n     148,    201,    254,     51,\n     151,     98,    210,    248,\n      60,    113,    166,     36,\n      16,    186,    122,    175,\n      27,    230,    177,    124,\n      71,    237,     34,    168,\n     115,     62,      9,     43,\n      96,    106,     53,    255,\n     203,    105,    158,     44,\n       8,     61,    141,     88,\n     220,     17,    185,    132,\n      79,     26,    229,     79,\n     123,     70,    238,    220,\n     167,    114,     61,      8,\n      44,    158,    105,    203,\n     255,    202,    106,    159,\n      43,      9,    193,    140,\n      87,     34,    237,     71,\n     124,    177,    230,     27,\n     175,    133,    186,     16,\n      36,     89,    113,    195,\n     248,    210,    157,    151,\n      51,    254,     54,    148,\n     160,    213,    245,    192,\n     116,    169,     33,    236,\n     183,    130,     77,    231,\n     227,     81,    134,     68,\n      15,     37,    165,    112,\n      59,      6,    209,     99,\n     103,    205,      2,    200,\n     108,    161,     41,    244,\n     191,    138,     85,    223,\n      20,    182,    126,    179,\n      23,     29,     82,    135,\n     188,    241,    217,    164,\n     144,    197,    250,     47,\n     100,    153,    206,      3,\n      56,    146,     93,     40,\n     243,    190,    118,     84,\n      31,     21,    181,    128,\n     180,     22,    225,     83,\n     136,     66,    242,     39,\n      92,    145,    198,      4,\n      48,    154,    101,     48,\n     251,    198,    145,    163,\n      39,     13,     66,    136,\n     172,    225,    233,     75,\n     128,     74,    234,     31,\n      84,    137,    190,     12,\n     215,     93,    146,    199,\n     252,     49,    102,    100,\n      47,    250,    197,    111,\n      91,     38,    241,    188,\n     120,    173,    226,    232,\n     179,    129,     73,    235,\n     223,     85,    117,     64,\n      11,     41,    161,    108,\n     200,      2,    205,    152,\n     156,    209,      6,     59,\n     112,    165,    218,     15,\n      68,    121,    174,     28,\n     231,    178,    125,     72,\n      19,    222,    169,    116,\n      63,     10,     42,     95,\n     148,    201,    254,     51,\n     104,    157,    210,      7,\n     195,    142,    166,     36,\n     239,    186,    133,     80,\n      27,    230,    177,    124,\n      71,     18,    221,    168,\n     140,    193,    246,     43,\n      96,    149,     53,      0,\n      52,    150,     97,    211,\n       8,    194,    114,    167,\n     220,     17,     70,    132,\n      79,     26,    229,    176,\n     123,    185,    238,     35,\n      88,    114,     61,      8,\n     211,    158,    105,     52,\n     255,    202,    149,     96,\n      43,    246,    193,    115,\n     168,    221,     18,     71,\n     124,    177,    230,     27,\n      80,    133,    186,    239,\n      36,     89,    142,     60,\n       7,     45,    157,    104,\n      51,    254,    201,    107,\n      95,     42,    245,    192,\n     139,     86,     33,    236,\n     183,    130,     77,     24,\n     227,    174,    121,    187,\n      15,    218,    165,    143,\n     196,    249,     46,     99,\n     152,    205,      2,     55,\n     108,    161,    214,     11,\n      64,    117,    170,    223,\n      20,    182,    129,    179,\n     232,     29,     82,    120,\n      67,     14,    217,    164,\n     111,     58,      5,    208,\n     100,    153,    206,    252,\n     199,    109,    162,     40,\n      12,     65,    118,    171,\n     224,    234,    181,    128,\n      75,     22,     30,    172,\n     119,    189,    242,     39,\n      92,    145,    198,    251,\n      48,    101,    101,    207,\n       4,    198,    145,     92,\n     216,     13,    189,    119,\n     172,    225,     22,    180,\n     128,     74,     21,    224,\n     171,    118,     65,     12,\n     215,    162,    109,     56,\n       3,    206,    153,    100,\n      47,      5,     58,    144,\n     164,    217,     14,     67,\n     120,     82,     29,     23,\n      76,    126,     73,    235,\n      32,     85,    138,    191,\n     244,    214,    161,    147,\n      55,    253,     50,    152,\n     156,    209,      6,    196,\n     112,     90,     37,    241,\n      71,    114,     84,     23,\n      31,     68,    113,     68,\n     232,     37,    173,    113,\n     192,    243,    215,    167,\n     150,    203,    236,     33,\n     129,     67,    212,     39,\n      59,    134,     90,    216,\n      17,    190,    124,    164,\n      30,    238,    180,    123,\n      79,     18,    215,    180,\n     151,    133,    255,    144,\n     179,    136,    226,    248,\n     197,    158,    109,     56,\n       0,     19,    111,     86,\n      52,     17,     76,    126,\n     180,     30,    240,    165,\n     118,     67,     24,    205,\n     120,    177,    198,     54,\n     244,    118,    179,    218,\n     250,    204,    155,    119,\n     211,     34,     32,    136,\n      69,     36,     16,     79,\n     123,     72,     15,    251,\n     167,    117,    168,    172,\n      42,    140,     89,     62,\n     242,     11,    113,    113,\n      39,    247,     55,     97,\n     177,    247,     25,    222,\n     149,    164,    204,    235,\n     186,    137,     81,     56,\n     250,    112,    218,    182,\n      62,    249,    163,    158,\n     239,    216,    240,    174,\n     119,    209,     30,     55,\n     120,    182,     49,    233,\n      77,    108,     83,     54,\n     247,    175,    160,     79,\n     175,     54,    168,    103,\n     105,     31,     23,     28,\n     105,      7,     41,     60,\n      64,    100,    196,     37,\n     197,    183,     90,    195,\n       5,    182,    154,    119,\n       0,    225,     89,     66,\n     168,      2,    195,    182,\n     154,    137,    224,    253,\n     176,    146,     40,      7,\n      26,     79,     98,     18,\n       6,     44,    151,     85,\n     221,    227,    141,    146,\n     175,    250,     56,     81,\n     101,    127,     16,     48,\n     118,    124,     88,      0,\n     223,    162,    135,    209,\n     247,     50,    158,     98,\n      46,      6,     58,    159,\n      68,     61,    255,     67,\n      83,    130,     29,    205,\n     168,    137,    170,    255,\n     222,    166,    110,     85,\n     225,      0,     87,    101,\n     203,    245,     48,    158,\n     102,     40,    234,    209,\n     128,     87,     37,     44,\n     109,    134,    115,     15,\n      12,    108,    139,     92,\n       6,    218,     85,    130,\n     210,    231,     41,    174,\n     107,    217,    253,    221,\n     141,    112,     33,    232,\n     196,    105,    130,    211,\n     244,    163,    113,    176,\n     232,    239,    161,    114,\n      66,    229,     49,     70,\n     132,    192,    244,     44,\n      98,    102,     59,     14,\n     197,    131,    112,    194,\n      44,     40,    130,     70,\n      35,     14,     85,    128,\n      68,      8,    233,     69,\n     157,    182,    239,    221,\n      92,    139,    192,     11,\n     222,    137,    120,     58,\n     235,     50,     77,    139,\n      57,    239,    193,     97,\n     165,    219,     18,    169,\n     144,    182,    243,     23,\n      84,    129,    184,    235,\n      34,    166,     96,     43,\n       8,    219,    145,    147,\n     236,     21,    198,    128,\n      93,    220,     25,     50,\n     138,     88,     44,     17,\n      68,    114,    188,    224,\n     224,    169,    133,    188,\n       6,    198,    189,    122,\n      56,    240,     52,    115,\n     104,     33,    255,     63,\n      99,    177,     43,    226,\n     177,    112,    167,    212,\n      31,     78,    128,     78,\n     238,     30,    162,    100,\n      91,      0,    221,     74,\n     136,    212,    250,    219,\n     148,    108,    193,     42,\n      33,    141,    113,     43,\n      17,     90,    124,     85,\n      23,    232,     76,    128,\n      68,      0,    244,    186,\n     117,    159,    208,    223,\n     129,    101,    210,    236,\n      54,    152,     97,     56,\n     252,     61,    100,    165,\n     219,     12,     66,    114,\n     170,     25,    254,    173,\n     110,     67,    250,     62,\n      88,    103,     83,    243,\n      34,     82,    131,    193,\n      18,    220,    111,    143,\n     216,    254,    192,    148,\n     167,    215,      9,    176,\n     158,     72,     11,     23,\n     104,    165,     79,     55,\n     207,     92,    154,    178,\n     254,    214,    176,     98,\n     193,    229,     56,    144,\n     104,     45,     14,     50,\n     141,     84,     54,    228,\n     169,    115,    134,    250,\n     247,    146,    122,    166,\n     250,     47,     84,    122,\n      40,      9,     62,     70,\n     156,     63,     17,    201,\n      97,    149,     41,    236,\n     219,    156,    166,    192,\n      15,     69,    156,     64,\n     226,      8,     94,    143,\n      70,     10,    200,     81,\n     148,    208,    247,    216,\n     147,    106,    205,    254,\n     198,    128,    114,     42,\n      28,     28,    122,     76,\n      55,    238,     87,     99,\n     160,     30,    243,    161,\n     129,    182,    229,     37,\n     163,    121,     63,    241,\n      46,    150,    125,     35,\n     241,     38,     67,    142,\n      60,    235,    194,    124,\n     189,    207,     21,    182,\n     148,     75,    233,      8,\n      86,    114,     74,     21,\n      33,     90,    120,     45,\n      21,    220,    110,    182,\n     217,    247,    220,    152,\n     162,    199,     18,     48,\n     131,     67,     39,     24,\n      71,    116,     75,     11,\n     232,     82,    133,     78,\n      28,    201,    172,    159,\n     219,    246,    221,    142,\n      98,    200,      9,     38,\n      97,     90,     36,    244,\n      74,    124,    175,     33,\n     225,    186,    135,     79,\n      29,    239,    161,    120,\n     165,    235,    218,    177,\n     106,    205,    242,     38,\n     110,    155,     55,      3,\n      51,    103,    163,     40,\n     245,    181,    142,     87,\n      18,    242,    166,    132,\n     163,    204,     22,    181,\n      97,    190,    253,     40,\n      86,    110,     53,      1,\n      32,    112,    159,     48,\n     251,    207,    158,     89,\n     216,    224,    156,    158,\n     160,    202,     12,    186,\n     100,     77,    227,     16,\n      70,    131,     74,     25,\n      44,    127,    132,     62,\n      10,    206,    154,    104,\n      38,    247,    210,    140,\n      94,    252,     43,    187,\n     166,     89,    233,     25,\n      92,    143,     72,      0,\n     216,     78,    170,    183,\n      12,    209,    169,    102,\n      49,     11,    219,    184,\n     111,    242,     33,    193,\n     175,     86,    221,      5,\n      74,    119,    175,     19,\n     225,     90,    157,    188,\n      23,    218,    174,    127,\n      55,      1,    193,    128,\n      98,    236,    225,    221,\n     138,    156,    222,      1,\n      52,    118,     95,     52,\n      20,    103,    100,    169,\n      28,    224,    183,    121,\n      66,     24,    202,    139,\n     142,    230,    251,    201,\n     136,    156,    219,    241,\n      50,    145,    115,     37,\n      28,     25,    101,    165,\n      37,    230,    190,    128,\n      74,     19,    253,    160,\n     157,    174,      7,    254,\n     167,    131,    207,    248,\n      47,    138,    117,    207,\n      41,     17,     99,     99,\n      44,    251,    201,    141,\n     168,     49,    245,     85,\n      92,     65,     55,    239,\n      64,    148,    172,    230,\n     194,    142,    119,    231,\n     212,     58,    102,     98,\n      32,    246,    203,    148,\n      86,     45,     28,     44,\n     158,    121,     50,     25,\n      81,     95,    190,      3,\n     211,    189,    154,    151,\n     235,     45,    163,    126,\n      48,     15,    214,    150,\n     148,    230,     12,    235,\n     190,     77,     43,     29,\n     106,    100,     78,      8,\n     230,     88,     98,    170,\n     229,    228,    167,    124,\n      71,     27,    201,    125,\n     160,     61,     43,    203,\n     145,    101,    211,     31,\n     215,    181,     80,    198,\n      24,     78,    113,     93,\n      17,     22,     88,    129,\n      85,    225,     51,     88,\n     104,     84,      8,    209,\n      77,    143,     48,     47,\n     216,    106,    140,    222,\n      16,    197,    138,     82,\n     200,      3,    173,    123,\n     132,    227,    203,    167,\n     123,     66,    252,     63,\n     163,     94,     90,    241,\n      36,     83,    156,     56,\n      19,    194,    110,    153,\n     213,     34,     32,    134,\n      68,     34,    244,    188,\n     109,    167,     14,    255,\n     177,    134,    176,    239,\n     217,    190,    101,    178,\n     231,     41,     72,    178,\n      62,     35,    206,     98,\n      99,    195,     11,    209,\n     145,     95,    214,     29,\n      73,    129,     78,     56,\n     238,     92,    150,    159,\n     200,    208,    130,    102,\n     199,    237,      8,     92,\n      74,     40,      4,     60,\n     113,    146,     36,    227,\n     218,    134,     90,    223,\n      59,     96,    137,    116,\n       8,    228,     89,    160,\n     178,      8,    251,    164,\n     148,    227,    253,    216,\n     132,    113,     49,    245,\n      47,     75,    159,     56,\n     236,    206,    121,    188,\n     211,    229,    160,    159,\n     177,    253,     10,    176,\n     112,     84,     26,     35,\n      68,    160,    193,     16,\n     220,    149,    101,    199,\n      31,     55,    137,    125,\n      45,     24,     46,    119,\n      87,     54,    246,    184,\n      76,    134,    231,    242,\n     187,    117,     66,    251,\n      58,    165,    106,     38,\n      12,     45,    101,    156,\n      51,    247,    219,    104,\n     141,    206,    246,    204,\n     135,     68,    222,     10,\n      67,    136,     94,     22,\n     225,     83,    130,    187,\n       4,    200,     82,    160,\n     220,      4,    218,    138,\n     124,    205,     24,     60,\n     111,     86,     59,    228,\n     187,    127,    187,    215,\n     228,     75,     88,    188,\n      18,    224,    163,     91,\n      68,    227,    221,    161,\n     144,     51,     21,     46,\n      98,    152,    204,     13,\n      17,    116,     93,     44,\n     255,    160,    135,    166,\n      22,    228,    183,    139,\n      95,     21,     21,     86,\n     141,    185,    229,     14,\n      74,    152,     60,     28,\n     215,    153,    152,     52,\n     255,    212,    138,     81,\n      39,     14,     77,    125,\n     190,    193,      4,     76,\n     125,     66,      7,    234,\n     169,    126,     68,      1,\n     195,    171,    108,    199,\n     244,     62,    120,    187,\n     223,    252,    213,    158,\n      81,    220,      9,    188,\n     136,    115,     11,    237,\n      72,    147,    164,    249,\n      55,     67,    131,     72,\n       7,    221,    162,    109,\n      49,     13,    214,    136,\n      98,    208,      1,     48,\n      96,    190,    248,     30,\n     179,    146,     70,     21,\n      30,     79,    117,     80,\n       4,    213,    175,    130,\n     210,    239,     52,     77,\n     150,     51,      3,    196,\n     157,    101,     37,    245,\n     213,    130,     93,     33,\n      19,     72,     96,    141,\n     196,     23,    180,    104,\n      83,     20,    216,    174,\n     120,     43,     27,    222,\n      96,    146,    193,    235,\n      47,    126,    144,    217,\n     240,    208,    128,     81,\n      42,    227,    181,    139,\n      66,     25,     30,     65,\n     147,    161,    252,     47,\n      90,    118,     56,      1,\n     217,    146,    100,     58,\n     243,    200,    105,    153,\n     211,      0,     49,     98,\n     162,    223,     18,    190,\n     138,     74,     28,    237,\n     168,    126,     71,     16,\n     219,     91,    138,    202,\n     244,     38,    103,    107,\n      59,    245,    204,    149,\n      92,     43,    247,    195,\n     118,    173,    221,     16,\n      76,    121,    179,    230,\n      30,     80,    123,     66,\n       6,    214,    163,    141,\n     192,    248,     47,     98,\n     156,    202,      4,     49,\n     111,    160,    215,    245,\n     183,    130,     86,     35,\n     235,    183,    132,     77,\n     233,     28,     82,    134,\n     190,    242,     35,     94,\n     148,     58,      6,    208,\n     155,    103,    206,    253,\n     194,    148,     94,     42,\n     242,     64,    119,    171,\n     225,     21,     74,    126,\n     182,    236,     22,     84,\n     137,     71,      5,    222,\n     160,    111,    198,      5,\n     206,    101,    155,    206,\n       5,     57,    111,    162,\n     219,     15,    189,    138,\n      82,     29,    237,    183,\n     127,    180,    233,     28,\n      85,    118,    190,    241,\n      41,    162,    109,     56,\n       1,    202,    154,    100,\n      47,    250,    196,    110,\n     162,    223,     11,     65,\n     135,     80,     29,     22,\n      77,    125,     79,     18,\n     221,    171,    117,     65,\n       8,     43,     86,    148,\n     204,    255,     50,    156,\n      96,    209,      6,     59,\n     112,     88,     44,    248,\n     184,    120,    171,    234,\n      16,     79,    124,     73,\n      18,    223,     86,    137,\n      63,      9,    215,    163,\n     111,     55,    255,    204,\n     105,    155,    213,      4,\n      60,    143,     93,     39,\n     238,     68,    123,     80,\n      31,    226,    178,    131,\n     188,    235,     38,     87,\n     140,     62,     11,    214,\n      96,    149,     53,      2,\n     202,    151,     97,     44,\n     247,     60,    115,    166,\n     223,     21,     71,    133,\n      77,     24,    231,    178,\n     122,    185,    238,     35,\n      89,    141,     60,     10,\n      44,     99,    149,    207,\n       3,    202,    150,     98,\n      41,    244,    193,    113,\n     171,    222,     19,    185,\n     135,     74,     27,     26,\n      82,    135,    187,    239,\n     218,    164,    112,     61,\n     248,     46,    102,    149,\n     204,    255,    202,    144,\n      94,    212,      8,     63,\n     116,     87,     36,    232,\n     183,    126,    182,    226,\n      31,    174,    123,     70,\n      14,    218,     90,    143,\n     196,      6,    208,    158,\n     101,     50,      3,     54,\n     109,    162,    213,    244,\n     189,    137,     87,     33,\n      21,     74,    127,     77,\n      20,    227,     82,    134,\n     190,    240,     38,    164,\n     111,     59,      4,    208,\n     155,    102,     48,    252,\n      57,    108,    162,    214,\n      13,     65,    119,    171,\n      31,    234,    181,    129,\n      74,     23,    224,    173,\n     119,    188,    243,     38,\n      93,    145,     57,    251,\n      48,    154,    101,     48,\n     251,    198,    145,     92,\n      39,    243,    189,    118,\n     173,    224,     20,     74,\n     127,     74,     20,    226,\n     168,    119,    191,    242,\n      40,    163,    109,    199,\n     253,     48,    102,    154,\n     210,      4,     58,    145,\n      88,     37,    242,    189,\n     120,    172,    226,     23,\n     179,    129,    183,    233,\n      34,     86,    136,     64,\n      10,    212,    163,    110,\n      53,      3,    205,    103,\n      99,     46,    249,     59,\n     112,    167,    217,     12,\n      70,    121,     81,     30,\n     227,    177,    125,    183,\n     236,     32,    169,    117,\n      63,    245,     43,     93,\n     150,    203,    255,    204,\n     149,     96,     47,    249,\n     195,    112,    167,    219,\n     239,    187,    132,     80,\n     229,     27,     76,    131,\n      71,     19,    223,    170,\n     114,     62,    246,     42,\n      97,    149,     53,      1,\n     203,    105,    156,    210,\n       8,    194,    114,     88,\n      34,    238,    185,    133,\n      79,    229,     27,     79,\n     132,     70,     17,     35,\n      88,    143,     61,    243,\n      46,    152,    151,     55,\n       0,    202,    104,    154,\n      45,    247,    192,    114,\n     169,     35,     19,    185,\n     124,     79,    230,    228,\n     172,    133,     69,     16,\n      37,     91,    113,    195,\n       7,    210,     99,    104,\n     204,    254,    201,    107,\n     160,    212,    245,     63,\n     139,     86,    223,     19,\n      74,    131,     76,    231,\n     226,     81,    135,    185,\n     240,    219,     91,    112,\n      59,      7,    211,     99,\n     101,     50,      3,    200,\n     147,     94,    214,    246,\n      67,    138,     85,    220,\n     238,    182,    127,    179,\n      22,     31,    173,    121,\n     191,     14,     39,     90,\n     111,     58,      5,     47,\n     155,    155,     49,    253,\n      57,    109,    162,     40,\n      14,    191,    119,    171,\n      31,     20,    181,    127,\n      75,    232,    224,     83,\n     137,     64,     13,    217,\n     162,    110,    198,      4,\n     207,    154,    101,     48,\n       6,     57,    110,    163,\n      39,    243,    189,    137,\n      82,    225,    232,    180,\n     128,     74,    235,     29,\n      84,    118,    190,     12,\n      41,     92,    146,     56,\n       3,    206,    102,    155,\n     209,      4,    197,    144,\n      91,     38,     14,     67,\n     120,    173,     29,    232,\n      76,    126,     73,    235,\n     222,    171,    138,     65,\n     244,     40,    161,    108,\n     201,      3,    205,    103,\n      98,    209,    249,    196,\n     112,     90,     36,     15,\n      68,    134,    174,    227,\n      24,     77,    131,     72,\n      19,    222,    169,    139,\n     192,    244,     42,    161,\n     106,    201,    254,     51,\n     105,    157,     45,    249,\n     195,    112,     88,    218,\n      16,    184,    122,    175,\n      26,     25,    177,    124,\n     186,     18,    221,     87,\n     115,     62,    247,     43,\n     159,    149,     52,      0,\n      52,    150,    159,    211,\n     246,     61,    141,     89,\n     222,     17,    184,    123,\n      78,     26,     26,    176,\n     133,    184,     16,    220,\n      89,    112,    194,    245,\n     211,     97,    105,     52,\n       0,    202,    149,    158,\n     212,    246,     63,    115,\n      87,     34,     18,    184,\n     131,    177,    230,     27,\n     174,    122,    187,     17,\n      36,     88,    113,    194,\n       7,    211,     98,    104,\n     204,      0,     54,    148,\n     160,     43,    244,     63,\n     139,    168,    223,    236,\n      72,    130,     76,    231,\n      29,    175,    135,    186,\n      14,     36,     90,    113,\n     196,    249,    208,     99,\n     103,     50,      2,     55,\n     147,     94,     41,    245,\n      65,    117,     85,    222,\n     234,    183,    126,     76,\n     232,     29,    173,    135,\n      67,     14,    217,     91,\n     111,    197,    251,    209,\n     100,    153,     49,      3,\n     199,    109,    162,    215,\n      13,     65,    136,     85,\n      30,    235,     74,    126,\n     180,    233,    225,    173,\n     136,     66,     13,     39,\n     163,    110,    198,    251,\n     207,    154,    154,     48,\n     251,     57,    145,    163,\n      39,    242,     66,    136,\n      83,    225,    233,    180,\n     127,     74,     21,    224,\n      84,    118,    190,    243,\n     215,    162,    109,    199,\n     252,     49,    102,    100,\n     208,    250,    197,    144,\n      91,     38,     14,     67,\n     120,    173,     29,    232,\n     179,    126,     73,    235,\n      32,     85,    138,     64,\n      11,    214,    161,    108,\n     200,    253,     50,    152,\n      99,     46,    249,     59,\n     112,    165,     37,     15,\n      68,    134,    174,     28,\n      24,     77,    130,    183,\n     236,    222,    169,    116,\n      63,    245,     42,    160,\n     148,    201,      1,     51,\n     104,     98,     45,      7,\n     195,    113,    166,     36,\n     239,     69,    133,    175,\n     228,    230,     78,    131,\n      71,    237,     34,    168,\n     140,     62,      9,     43,\n      96,    106,    202,      0,\n     203,    105,     97,    211,\n       8,    194,    141,    167,\n      35,     17,     70,    132,\n      79,     26,    229,    176,\n     132,     70,     17,    220,\n     167,    141,    194,      8,\n      44,    158,    105,     52,\n       0,     53,    106,    159,\n      43,      9,    193,    140,\n     168,    221,     18,     71,\n     131,     78,    230,     27,\n     175,    133,    186,     16,\n      36,     89,    113,    195,\n       7,    210,     98,    104,\n      51,      1,     54,    148,\n     160,    213,    245,    192,\n     139,     86,    222,    236,\n     183,    130,     77,     24,\n     227,     81,    121,    187,\n     240,    218,     90,    143,\n     196,    249,     46,    156,\n     103,    205,      2,     55,\n     108,    161,     41,     11,\n      64,    117,    170,    223,\n     235,    182,    129,     76,\n     232,     29,    173,    135,\n     188,     14,     38,    164,\n     111,     58,    250,     47,\n     155,    153,     49,    252,\n     199,    146,    162,     40,\n     243,     65,    137,     84,\n     224,    234,    181,    127,\n      75,    233,     30,    172,\n     119,    189,     13,    216,\n      92,    145,    198,    251,\n     207,    154,    154,    207,\n       4,     57,    110,     92,\n     216,     13,    189,    119,\n     172,    225,     22,     75,\n     128,     74,    234,    224,\n      84,    137,    190,     12,\n     215,    162,    109,     56,\n       3,     49,    153,    100,\n      47,    250,     58,    111,\n     164,     38,    241,    188,\n     135,     82,     29,     23,\n      76,    126,     73,    235,\n      32,     85,    138,     64,\n      11,    214,    161,    147,\n     200,      2,     50,    103,\n      99,    209,    249,    196,\n     143,     90,     37,     15,\n      68,    121,    174,     28,\n     231,     77,    125,    183,\n     236,    222,    169,    116,\n      63,     10,     42,    160,\n     148,    201,      1,    204,\n     151,     98,    210,    248,\n     195,    142,     89,    219,\n      16,    186,    133,    175,\n     228,     25,     78,    131,\n     184,     18,    221,     87,\n     140,    193,    246,     43,\n      96,    149,     53,    255,\n      52,    105,    158,    211,\n       8,    194,    141,     88,\n      35,    238,    185,    132,\n      79,    229,     26,     79,\n     123,     70,     17,    220,\n      88,    141,    194,    247,\n      44,     97,    105,     52,\n     255,     53,    149,     96,\n      43,    246,    193,    140,\n     168,    221,     18,     71,\n     131,     78,     25,     27,\n     175,    133,    186,    239,\n      36,     89,    142,    195,\n     248,     45,    157,    151,\n     204,    254,    201,    148,\n      95,     42,    245,    192,\n     139,     86,     33,     19,\n      72,    125,    178,    231,\n      28,     81,    134,    187,\n     240,     37,     90,    112,\n      59,    249,     46,     99,\n     152,    205,      2,     55,\n     108,    161,     41,    244,\n     191,    138,     85,     32,\n     235,    182,    129,     76,\n      23,     29,     82,    135,\n      67,    241,     38,     91,\n     144,    197,      5,    208,\n     155,    102,     49,      3,\n      56,    109,    162,    215,\n      12,     65,    137,     84,\n      31,    234,    181,    128,\n      75,     22,    225,    172,\n     119,     66,     13,    216,\n     163,    145,    198,    251,\n      48,    101,    101,     48,\n     251,    198,    145,     92,\n     216,     13,     66,    119,\n      83,     30,    233,    180,\n     127,     74,    234,     31,\n      84,    137,    190,    243,\n      40,     93,    146,     56,\n     252,     49,    153,    100,\n      47,    250,    197,    144,\n      91,     38,    241,    188,\n     135,     82,     29,     23,\n      76,    129,    182,    235,\n      32,     85,    138,    191,\n     244,    214,    161,    108,\n      55,      2,    205,    152,\n      99,     46,      6,     59,\n     112,    165,    218,     15,\n      68,    121,    174,    227,\n      24,     77,    125,     72,\n      19,    222,    169,    116,\n      63,     10,    213,    160,\n     107,    201,    254,     51,\n     104,    156,    211,      6,\n      61,    112,    166,    219,\n      16,    186,    133,     81,\n      26,    231,    179,    125,\n      70,     19,    221,     87,\n     140,    192,    244,     41,\n      98,    151,    200,    253,\n      53,    105,     97,     45,\n     245,    192,    142,     91,\n      32,    237,    187,    133,\n      79,    229,     27,     77,\n     134,    186,    237,     33,\n      90,    140,    195,    247,\n     211,    158,    104,     53,\n     253,    200,    151,     98,\n      41,    247,    192,    140,\n     168,    220,     19,     69,\n     126,    179,    231,     26,\n      81,    132,    187,    238,\n      36,     89,    142,     60,\n       6,    208,    159,    107,\n      48,    252,    203,    149,\n      95,    213,     11,     62,\n     118,    171,    220,     17,\n      74,    126,    177,    228,\n      31,     80,    134,     69,\n      12,    223,    163,    118,\n      62,      2,    210,    158,\n     103,    205,      3,     53,\n     110,    162,    213,     15,\n      68,    112,    172,    218,\n      17,     74,    127,     77,\n      20,    228,    165,    113,\n      75,      9,    223,    160,\n     109,     58,    251,     44,\n     103,    154,    205,      0,\n      59,    104,    164,    208,\n      11,     70,    112,    175,\n     225,    232,    178,    138,\n      70,     27,    237,    166,\n     112,     70,     12,     38,\n      88,    148,    195,    255,\n      52,     97,    156,    199,\n      14,     51,    100,    171,\n     222,     15,    188,    142,\n      88,     16,    230,    187,\n     114,     64,     18,    227,\n      84,    138,    184,    244,\n      47,     90,    149,    207,\n     245,     56,    111,    146,\n     215,      0,     56,    145,\n      93,     45,    255,    172,\n     150,     66,     16,    226,\n     181,    127,    181,    236,\n      42,     94,    129,    180,\n     254,     35,     84,    154,\n     192,    250,     54,    102,\n      97,     41,    245,    203,\n     158,     75,     53,    253,\n     177,    128,     80,    224,\n      16,     70,    142,    187,\n     231,     43,     92,    130,\n     200,    242,     47,     92,\n     149,     52,      7,    198,\n     153,    114,     61,    247,\n     207,    135,     95,     38,\n      18,     66,    112,    163,\n     232,     18,     69,    137,\n     177,    229,     37,     82,\n     143,    192,      8,    209,\n     150,    103,     37,     17,\n     219,    152,    109,     36,\n     243,     61,    119,    174,\n     208,     29,     74,    119,\n     187,    238,     16,     70,\n     131,    188,    236,    220,\n     163,    123,     48,     24,\n     194,    142,    102,     56,\n     246,    207,    149,    155,\n     220,      2,     51,    126,\n     165,    209,     25,     77,\n     117,    182,    227,     25,\n     175,    121,     66,     28,\n     212,    180,     96,     44,\n       9,    217,    154,    106,\n     206,      9,     58,    101,\n     174,    216,      6,     52,\n     126,    161,    216,     23,\n      74,    125,     79,     30,\n     233,    160,    104,     86,\n      31,    212,    174,    119,\n      56,    248,     41,    104,\n     150,    194,     12,     59,\n     103,    171,    222,     13,\n      68,    119,    170,     33,\n     239,    190,    141,     67,\n       6,    243,    162,    117,\n      74,     11,    216,     95,\n     153,    200,    245,     32,\n     106,    149,    196,     11,\n      62,    105,    160,    215,\n     243,    188,    140,     93,\n      18,    250,    167,    145,\n      69,     26,    233,    168,\n     137,    187,    254,     40,\n      77,    129,    200,    240,\n      57,     99,    158,    205,\n       5,    198,    144,     95,\n      33,    248,    179,    152,\n      66,     17,    228,    190,\n     121,     75,    233,     22,\n      90,    152,    175,    252,\n      36,     84,    148,    195,\n     253,     49,    153,    101,\n      46,    249,    195,    153,\n      86,     41,    254,    178,\n     140,     90,     25,     23,\n      73,    138,    185,    250,\n      48,     88,    128,    184,\n     241,     43,     94,    108,\n      54,      3,    204,    155,\n     101,     36,    244,    203,\n     129,     86,     47,    246,\n     184,    120,    168,    232,\n      22,     66,    140,    189,\n     235,     36,     85,    138,\n     192,     10,    213,     95,\n     107,     52,      4,    197,\n     155,    108,     32,    244,\n     201,    137,     93,    219,\n      21,     78,    116,    160,\n     233,     19,     73,    134,\n     187,    239,     35,     87,\n     140,    192,    246,    213,\n     155,     99,     56,     15,\n     197,    155,    106,     36,\n     243,     61,    119,    172,\n     211,     30,     75,    113,\n     183,    227,     30,     76,\n     134,    185,     16,     34,\n      88,    113,     58,      5,\n     193,    138,    100,     60,\n     251,     52,    108,    151,\n     223,      6,     51,    123,\n     172,     34,    239,    184,\n     125,    179,    228,     26,\n     175,    122,     70,     24,\n     213,    180,    103,     44,\n     248,     42,    105,    135,\n     220,      6,     62,     99,\n     160,     46,    247,    195,\n     137,    174,    212,     27,\n      79,    121,     79,     31,\n     239,    187,     99,     93,\n      29,     37,     86,    129,\n     213,    233,     40,    103,\n     144,    204,    253,     52,\n     109,    165,    221,      1,\n      71,    113,     87,     40,\n     231,    162,    155,     85,\n      14,    235,     89,    136,\n     173,    229,     44,    164,\n     149,    192,      4,     43,\n      98,    155,    198,      8,\n      63,    107,    162,     32,\n     254,    174,    144,     78,\n       9,    251,     76,    108,\n     165,    248,     15,    172,\n     112,    187,     13,    219,\n      86,    155,    192,    244,\n      32,    109,    158,     51,\n     246,    212,    134,     65,\n      62,    229,    186,    102,\n     184,    240,      7,     66,\n     121,     78,    232,    225,\n      87,    133,    179,    253,\n      38,     80,    149,     58,\n      10,    193,    140,    127,\n      50,    224,    209,    108,\n     177,    203,      1,     77,\n     122,     88,     28,     18,\n      76,    134,    166,    250,\n      46,     91,    134,    189,\n      12,    220,    174,    122,\n      43,     30,    214,    139,\n     148,    198,     23,     54,\n     124,     88,     41,     14,\n      67,    122,    165,    247,\n      10,     64,    142,    189,\n      17,    213,    162,    122,\n      41,     17,    207,    187,\n     123,    199,    228,     34,\n     101,    151,     43,    245,\n      61,    121,    162,    208,\n       5,     87,    115,    167,\n     237,    226,    186,    123,\n      77,      7,    192,    179,\n     111,     46,    230,     54,\n     113,    156,    204,      9,\n     218,    150,    148,    212,\n       5,     43,     97,    175,\n     219,     27,    184,    141,\n      74,     18,    241,    174,\n      96,     90,     30,     54,\n      71,    157,    197,    244,\n     223,    141,    105,    198,\n      12,     58,    126,    141,\n     210,     11,     57,    141,\n      93,     37,    229,    172,\n     162,     81,      2,    239,\n      71,    167,    175,    232,\n     218,    169,     98,     60,\n     246,     63,    112,    131,\n     220,      7,     55,    104,\n      95,     45,    243,    201,\n     152,    118,     62,    246,\n     190,    103,    148,    254,\n      26,    170,    104,     81,\n      12,     40,     79,    157,\n     203,    242,     45,    159,\n     103,    204,    249,    206,\n     153,     76,     55,    235,\n     166,    130,    182,    246,\n      14,     76,    135,     93,\n       2,    230,     92,    157,\n     174,    251,     44,     90,\n     104,     57,    254,    209,\n     159,     97,     62,    230,\n     218,    138,     85,    202,\n      37,     91,    117,     94,\n      14,    255,    176,    113,\n     169,    250,     25,     84,\n     119,     74,      8,     35,\n      92,    106,     49,     20,\n     213,    129,    114,     57,\n      24,     21,    114,    163,\n      42,    226,    169,    143,\n     160,    254,      0,     79,\n     132,    183,     16,    230,\n      86,    139,     66,      6,\n     199,    181,    117,     46,\n      10,     45,     72,    134,\n     208,    246,    200,    128,\n      83,    209,     19,     85,\n     123,     83,     29,    234,\n     181,    124,     73,     21,\n     215,    184,     98,     84,\n      25,    221,     72,    191,\n     232,    252,    195,    148,\n     104,     40,      5,     35,\n     104,    163,     38,    243,\n     186,    130,     84,     24,\n     230,    182,    109,     94,\n       1,    209,    175,    156,\n     233,    234,     43,    175,\n     101,     49,      2,     50,\n     121,    136,    217,    251,\n     197,    141,     89,     32,\n     230,    191,    129,     92,\n      12,    242,    188,    130,\n     163,    201,     59,     87,\n     125,     49,     15,    212,\n     100,    154,    219,    243,\n      54,    146,    101,    211,\n     245,    200,    133,     94,\n      41,    251,    175,    138,\n     186,    196,      5,     64,\n     120,     77,     28,    217,\n      89,    138,    207,    250,\n      38,     98,    107,     54,\n       1,    206,    158,    107,\n      34,    251,    215,    148,\n      93,    200,     55,     94,\n     120,     73,     16,    237,\n     173,    134,    176,    228,\n      46,     80,    139,    195,\n       6,    210,    155,     99,\n      62,    242,    217,    130,\n      72,    213,     40,     24,\n     123,     80,     43,    235,\n     180,    131,    183,    236,\n      22,     89,    129,    190,\n     242,     36,    166,    121,\n      54,      9,    195,    139,\n     124,     60,     23,     28,\n     114,    160,     37,    254,\n     187,    139,    170,    215,\n      30,     66,    116,    187,\n     237,     24,     80,    125,\n      79,      1,    200,    189,\n     112,     34,    243,      7,\n      76,    150,     59,    242,\n     192,    147,     95,    213,\n       5,     74,    122,    161,\n     230,     16,     78,    130,\n      64,     25,    240,    187,\n      86,     99,      9,      6,\n     112,    136,     56,     10,\n     197,    155,    100,     48,\n       1,     50,    126,    179,\n     209,      9,     65,    119,\n      91,     16,    249,    167,\n      98,    111,      5,      8,\n     120,    169,    184,      5,\n     221,    166,    105,     59,\n     253,     57,    119,    143,\n     222,      1,     59,    144,\n      89,     44,    224,    169,\n     157,    112,      8,     28,\n     104,    163,    189,     19,\n     214,    168,    119,     71,\n      14,     44,     74,    138,\n     217,    245,     51,    155,\n     101,     39,    247,    208,\n     147,     69,     40,      4,\n      93,     97,    164,     30,\n     227,    178,    124,     78,\n      24,    222,     67,    171,\n     215,    252,     40,    163,\n      98,     56,     16,    222,\n     142,    120,     43,      8,\n      40,    120,     89,     37,\n      21,     67,    132,     88,\n      21,    224,     94,    161,\n     167,    252,     33,    173,\n     121,     46,     28,    204,\n     133,    101,    205,    238,\n      56,    151,    107,     40,\n       3,     45,    113,     84,\n      50,    235,     73,    101,\n     175,    242,     16,    180,\n     116,     80,      9,    193,\n     188,    112,    219,    238,\n      46,    140,    124,     50,\n      14,     33,     98,    107,\n      57,    245,     47,    104,\n     179,    203,     30,    184,\n     147,     82,     56,    198,\n     189,    136,    152,    244,\n     217,    186,    111,     59,\n     247,     57,    103,     98,\n      59,      7,     36,    127,\n     180,    198,      7,     62,\n     155,    118,     11,    200,\n     178,     96,    154,    244,\n     238,    140,    101,     65,\n     253,     43,    165,    119,\n     197,    235,     56,    115,\n     147,    198,      9,     54,\n     156,    125,      4,    236,\n      76,     82,    136,    217,\n     252,    148,    149,     76,\n     224,     28,    171,    120,\n     172,    237,     62,     86,\n     149,    192,    255,    210,\n     136,     78,     21,    249,\n      37,     69,    177,     36,\n     236,    166,    128,    170,\n      27,    231,    178,    115,\n     169,    246,     11,     91,\n     137,    188,     12,    210,\n     184,    113,     50,    234,\n      18,    126,    154,     41,\n     224,    203,    145,     95,\n      40,    226,     64,    109,\n     136,    250,     28,    180,\n     125,     78,     30,    246,\n     188,    126,    179,    239,\n      63,     89,     98,     46,\n      18,    201,    159,    106,\n      61,    252,     42,     78,\n     134,    203,     12,    185,\n     129,     89,     11,    251,\n     179,    149,    170,    255,\n      33,    167,    122,     74,\n      13,    223,    176,    127,\n      62,    244,     40,    121,\n     137,    217,    250,    207,\n     155,     66,     40,      8,\n      93,    103,    188,     31,\n     247,    191,    120,     75,\n      25,    205,    186,    115,\n     200,    227,     50,     79,\n     145,     55,      8,    216,\n     128,    110,    216,     26,\n      28,     96,     88,     41,\n     227,    189,    128,     90,\n      10,    233,    180,    132,\n     169,    255,     41,     85,\n     118,     51,      6,    223,\n     157,    159,    223,    233,\n      57,    104,    100,     41,\n     242,    202,    128,     86,\n      41,    238,     78,    112,\n     184,    231,    231,    184,\n     112,     65,    239,     43,\n      82,    133,    196,    241,\n      41,     98,    104,     50,\n     246,    192,    157,     99,\n     213,     13,     58,    113,\n      85,     42,    228,    186,\n     122,    189,    237,     31,\n     173,    121,     69,    234,\n      34,     88,    116,     58,\n       3,     45,     98,    106,\n      54,    251,    205,    144,\n      92,    212,      2,     51,\n     127,    172,     34,    229,\n     191,    128,    176,    228,\n      29,     80,    133,    190,\n     245,    218,    173,    127,\n      52,      1,     42,    110,\n     150,    199,      7,     54,\n     146,     93,     47,    252,\n     182,    143,    168,    215,\n      30,     64,    120,    178,\n      17,    237,    185,    118,\n     189,    254,     48,     74,\n     149,     63,     13,    214,\n     159,     97,     59,    246,\n     197,    106,    172,    217,\n       4,    191,    128,     91,\n      16,    226,     75,    114,\n     162,    252,     20,    174,\n     126,     72,      5,    208,\n     169,    103,     59,    253,\n      61,    107,    146,     49,\n     246,    210,    158,     94,\n     211,     24,     87,    121,\n     169,     30,    236,    189,\n     115,     71,     30,    231,\n     170,    140,    178,    254,\n      32,    161,    124,     45,\n      13,    206,    104,    140,\n     198,      8,     62,    145,\n      95,     33,    250,    178,\n     138,     85,    227,     31,\n      71,    136,    181,     18,\n     210,    166,    112,    187,\n     249,     56,     81,    153,\n     204,      2,    206,    159,\n     104,     35,    242,    193,\n     113,    163,    221,     12,\n     191,    141,     90,     24,\n      29,     64,    143,    190,\n     233,     34,     84,    139,\n      60,     13,    220,    168,\n     110,     55,    255,     48,\n     106,     97,     36,    241,\n     193,    121,    182,    202,\n      27,     65,    133,     81,\n      26,    228,    181,    123,\n      79,     23,    220,     85,\n     136,    192,     15,    216,\n     148,    111,    207,    240,\n      39,    121,    151,    209,\n     244,    199,    136,     93,\n      36,    230,    191,    135,\n     176,    230,     24,    179,\n     115,     79,     20,     32,\n      84,    130,    207,    254,\n      41,     98,    151,     53,\n     249,    192,    153,    105,\n      40,     11,     58,    114,\n      84,     36,    235,    185,\n     120,    185,    239,     19,\n      86,    134,    184,    237,\n      37,    166,    114,     52,\n      12,    218,    158,    151,\n     205,    254,    202,    151,\n     160,    208,     13,     59,\n     118,    169,    223,     23,\n      77,    124,     79,     29,\n     229,    170,    120,     68,\n      13,    217,    164,    143,\n     198,    250,     45,     97,\n     153,    205,      2,    200,\n     147,     94,    214,    244,\n     189,    142,     87,    223,\n      22,     74,    124,    178,\n     232,     28,     83,    120,\n      65,     12,     38,     88,\n     146,     59,      0,    215,\n     156,    101,    206,      1,\n      59,    104,    165,    222,\n       4,     69,    136,     83,\n      22,    236,    181,    124,\n     182,    233,    226,    170,\n     113,     70,     15,    216,\n      95,    153,    205,    247,\n      59,     98,    155,     53,\n     242,    206,    148,     94,\n      39,    242,    191,    142,\n      85,     26,    233,     73,\n     134,    189,    227,     23,\n      81,    136,     64,      8,\n     211,    160,    111,     59,\n       6,    198,    145,     98,\n      44,    250,     57,    102,\n     170,    201,      2,     70,\n     132,     91,     22,    239,\n     178,    129,     73,     22,\n     218,    172,    113,     66,\n      11,     40,     91,    159,\n     217,    236,     57,    101,\n     101,     37,    245,    207,\n     134,     93,     35,    245,\n     184,    135,    174,    224,\n      16,     65,    143,    187,\n     228,     34,    169,    118,\n      61,      9,    211,    170,\n     102,     56,     10,    203,\n     149,    158,    216,      8,\n      46,     96,    171,    221,\n     239,    185,    129,     84,\n      31,    224,    185,    119,\n      74,     30,    213,    170,\n     142,    198,    253,     39,\n     107,    156,    205,    250,\n      55,    105,     99,     42,\n     253,    207,    131,     83,\n      36,    238,     67,    114,\n     186,    237,     31,     77,\n     123,     70,    236,     37,\n      95,    137,     60,     15,\n     217,    149,     96,     55,\n       2,     51,    109,    152,\n     208,      9,    195,    143,\n      85,     34,    237,    186,\n     135,     75,     27,     26,\n      86,    140,    178,    234,\n      38,    167,    117,     58,\n       1,    209,     98,    150,\n      51,    248,    194,    154,\n      85,     43,      0,     43,\n      99,    189,    211,     17,\n     177,    137,     70,     31,\n     224,    172,    124,     78,\n       1,    215,    163,    140,\n     200,    232,     60,    109,\n     144,    207,    252,    201,\n     147,    161,     41,    241,\n     179,    152,     70,     46,\n     239,     79,    113,    161,\n     248,     20,     83,    123,\n      64,     14,     36,     95,\n     145,     62,      9,    192,\n     149,     96,    202,     15,\n      55,     97,    167,     42,\n     245,    186,    137,    168,\n     227,     21,    177,    137,\n      71,     28,    229,     86,\n     133,    175,    226,     47,\n     162,    105,     49,      2,\n     205,    155,    103,     53,\n     242,    205,    152,     93,\n     223,     29,     87,    100,\n     166,    225,    238,    190,\n     118,     77,     19,    231,\n     163,    126,     70,     14,\n      44,     87,    157,    215,\n     241,     55,    153,     98,\n      38,    243,    204,    152,\n      93,     34,    241,     71,\n     113,    161,    238,     30,\n      72,    127,     79,     30,\n     211,    161,    125,     66,\n     246,     46,     87,    154,\n     192,    251,     49,    103,\n      97,     43,    241,    205,\n     133,     83,     35,    241,\n      64,    115,    163,    238,\n      18,     73,    124,     77,\n      27,    215,    161,    114,\n      59,     11,     40,     90,\n     147,    193,    246,     54,\n     107,     98,     46,    253,\n     197,    136,     95,     32,\n     237,     69,    121,    170,\n     227,     30,     72,    128,\n      71,     17,    217,    173,\n     119,     61,     11,    214,\n     158,    106,    203,    253,\n      55,    106,    156,    211,\n     245,    193,    143,     88,\n     223,     21,     66,    121,\n      79,     24,    231,    177,\n     123,     70,     17,    220,\n     166,    115,     60,    247,\n      46,     98,    149,    201,\n       0,    203,    151,     98,\n      41,    244,    192,    141,\n     168,    220,     19,     69,\n     126,    179,    231,     27,\n     175,    120,     70,     19,\n     216,    164,    112,     60,\n     249,     46,    103,    146,\n     201,      2,     55,    149,\n      92,     46,    241,    196,\n     136,     87,     33,     18,\n      74,    126,    182,    228,\n      30,     80,    134,     69,\n      12,    217,    166,    113,\n     196,    248,     47,     99,\n     103,     50,    253,     55,\n     109,    160,    214,    244,\n     189,    142,     86,     33,\n      21,     77,    123,    183,\n     233,    227,    169,    125,\n      71,     12,     38,     89,\n     146,    199,    251,     47,\n     100,    152,    204,      1,\n      57,    146,     95,     44,\n     247,    188,    137,    169,\n     227,     22,     72,    126,\n      75,     23,    224,    172,\n     119,     66,     12,    217,\n     162,    110,    198,    250,\n      50,    103,    155,    207,\n     250,    196,    147,     94,\n      37,    243,    189,    118,\n     174,    227,     20,     73,\n     129,     74,     20,    225,\n     170,    118,     65,     12,\n     215,    163,    109,    199,\n     253,     50,    101,    153,\n     208,    251,    198,    147,\n      89,     39,    241,     67,\n     120,    173,     29,    232,\n      76,    128,    180,    232,\n      33,    170,    119,     68,\n      15,    213,    161,    146,\n     202,    255,     51,    152,\n      98,     47,    249,     59,\n     114,    167,    219,    240,\n     186,    135,     80,    227,\n      25,     79,    131,    183,\n      18,    220,    171,    117,\n     192,    244,     40,     94,\n     148,     54,      1,    204,\n     104,    156,    210,    248,\n     194,    140,     91,     38,\n     239,     69,    123,    174,\n     229,     25,     78,    124,\n      71,     18,    221,    168,\n     115,     62,      9,     43,\n      97,    148,    200,    254,\n      52,    150,     99,     46,\n     245,    192,    140,     88,\n     220,     17,     70,    122,\n     178,    231,     25,     76,\n     134,    185,     16,    223,\n     164,    113,     63,      9,\n     211,     97,    150,    202,\n       1,     52,    107,    158,\n     213,      9,    192,    142,\n      84,     33,    239,    184,\n     125,    179,    228,     26,\n      80,    122,     69,    239,\n      36,     88,    143,    195,\n       7,    211,    156,    104,\n     204,      3,     52,    105,\n     160,     43,    247,    195,\n     137,     87,     33,     18,\n      73,    124,    178,    231,\n     227,    174,    121,     68,\n      14,    219,    167,    114,\n      58,      6,     46,     97,\n     155,    206,      0,     55,\n     147,     92,     43,    245,\n     191,    138,    170,    223,\n     235,     73,    126,    178,\n     234,     30,     80,    134,\n      67,     12,    218,    167,\n     110,    197,    251,     45,\n     102,    152,    206,    252,\n     199,    146,     93,     40,\n     243,    190,    136,     85,\n      30,    234,     74,    126,\n     181,    232,     30,    172,\n     118,     67,     12,    217,\n     162,    110,     57,    251,\n      48,    100,    155,    206,\n       5,     56,    110,     92,\n      38,    243,    188,    137,\n      83,    225,     22,     74,\n     129,    180,    234,     31,\n      84,    137,    190,     12,\n     215,    163,    108,     57,\n       3,    206,    102,    154,\n     209,      4,     58,    111,\n      91,     39,    240,    189,\n     135,    173,    226,     22,\n      77,    128,    183,    235,\n      32,    170,    117,     65,\n      10,    215,    161,    108,\n      55,    253,     50,    102,\n     157,    209,      6,     59,\n     143,     90,     37,    240,\n     187,    134,    174,    227,\n      24,     77,    130,    183,\n     236,    222,    169,    116,\n      63,     10,    213,    160,\n     148,    201,    255,     50,\n     105,    157,    210,    248,\n     195,    143,     88,     37,\n     238,    186,    133,    175,\n     228,     24,     79,    131,\n     184,    237,     34,    168,\n     115,     62,      8,    213,\n     159,    106,    202,    255,\n      52,    104,    158,    211,\n       8,     61,    141,     88,\n      35,    238,    185,    132,\n      79,    229,     26,     79,\n     132,    185,    238,     35,\n     167,    114,     61,      8,\n     211,    158,    105,     52,\n     255,     53,    106,    159,\n     212,      9,     62,    140,\n      87,     34,    237,    184,\n     131,    177,    230,     27,\n      80,    133,    186,    239,\n     219,    166,    113,     60,\n       7,    210,    157,    151,\n     204,      1,     54,    107,\n     160,    213,     10,     63,\n     139,     86,     33,    236,\n     183,    130,    178,    231,\n      28,     81,    134,    187,\n     240,    218,    165,    112,\n      59,      6,    209,    156,\n     152,    205,      2,     55,\n     108,    161,    214,    244,\n     191,    138,     85,     32,\n     235,    182,    126,    179,\n     232,     29,     82,    135,\n     188,    241,    217,    164,\n     111,     58,      5,    208,\n     155,    102,     49,      3,\n      56,    109,    162,    215,\n      12,    190,    137,     84,\n      31,    234,    181,    127,\n     180,    233,     30,     83,\n     136,    189,     13,    216,\n     163,    110,     57,    251,\n      48,    101,    154,    207,\n       4,     57,    110,    163,\n     216,     13,     66,    119,\n      83,     30,    233,    180,\n     127,    181,    234,     31,\n      84,    137,    190,     12,\n     215,    162,    109,     56,\n       3,    206,    153,    100,\n     208,      5,     58,    111,\n     164,    217,    241,    188,\n     135,     82,     29,     23,\n      76,    129,    182,    235,\n      32,     85,    138,    191,\n     244,     41,    161,    108,\n      55,      2,    205,    152,\n     156,    209,      6,     59,\n     112,     90,     37,    240,\n     187,    134,     81,     28,\n     231,    178,    125,    183,\n     236,     33,     86,    139,\n     192,     10,    213,    160,\n     107,     54,      1,    204,\n     151,    157,    210,      7,\n      60,    113,    166,    219,\n     239,    186,    133,     80,\n      27,    230,    177,    131,\n     184,    237,     34,     87,\n     140,    193,    246,     43,\n     159,    106,     53,      0,\n     203,    150,     97,    211,\n       8,     61,    114,    167,\n      35,    238,    185,    132,\n      79,     26,    229,    176,\n     132,    185,    238,     35,\n      88,    141,    194,    247,\n     211,    158,    105,     52,\n     255,    202,    106,    159,\n     212,      9,     62,    115,\n     168,    221,     18,    184,\n     124,    177,     25,     27,\n      80,    133,    186,    239,\n      36,     89,    142,     60,\n       7,    210,    157,    104,\n     204,      1,     54,    107,\n      95,     42,     10,     63,\n     116,    169,     33,    236,\n     183,    130,     77,     24,\n     227,     81,    134,    187,\n     240,     37,    165,    112,\n      59,      6,    209,     99,\n     152,    205,    253,     55,\n     108,    161,    214,     11,\n      64,    117,     85,     32,\n     235,    182,    129,     76,\n      23,     29,     82,    135,\n     188,    241,     38,     91,\n     144,    197,      5,    208,\n     155,    102,     49,    252,\n     199,    146,    162,    215,\n      12,     65,    137,     84,\n      31,    234,    181,    128,\n      75,     22,     30,     83,\n     136,    189,    242,     39,\n      92,    145,    198,    251,\n      48,    101,    154,    207,\n       4,     57,    110,    163,\n     216,     13,     66,    136,\n      83,     30,    233,    180,\n     127,     74,     21,    224,\n     171,    118,     65,     12,\n     215,    162,    109,     56,\n     252,     49,    102,    155,\n     208,      5,     58,    111,\n     164,    217,     14,     67,\n     120,    173,     29,    232,\n     179,    126,     73,     20,\n     223,     85,    138,    191,\n     244,     41,     94,    147,\n      55,      2,    205,    152,\n      99,     46,    249,    196,\n     143,     90,     37,     15,\n      68,    121,    174,    227,\n      24,     77,    125,     72,\n      19,    222,     86,    139,\n      63,     10,    213,    160,\n     107,     54,    254,     51,\n     104,     98,    210,      7,\n      60,    113,    166,    219,\n      16,     69,    122,    175,\n     228,     25,     78,    131,\n     184,     18,    221,    168,\n     115,     62,      9,    212,\n     159,    149,    202,    255,\n      52,    150,     97,     44,\n       8,     61,    114,    167,\n     220,     17,     70,    132,\n      79,     26,    229,    176,\n     123,     70,    238,     35,\n      88,    141,    194,    247,\n      44,     97,    105,     52,\n     255,    202,    106,    159,\n     212,      9,     62,    115,\n     168,    221,     18,     71,\n     124,    177,    230,    228,\n     175,    122,     69,    239,\n      36,     89,    142,    195,\n       7,    210,    157,    104,\n      51,    254,    201,    148,\n      95,     42,    245,    192,\n     139,     86,     33,    236,\n      72,    125,    178,    231,\n      28,     81,    134,     68,\n      15,     37,     90,    143,\n     196,    249,     46,     99,\n     152,    205,    253,    200,\n     147,     94,     41,    244,\n     191,    117,    170,    223,\n      20,     73,    126,    179,\n     232,     29,    173,    120,\n     188,     14,    217,    164,\n     111,     58,      5,    208,\n     155,    102,     49,    252,\n};\n\n\nconst uint8_t* waveform_8_table[] = {\n  wav_digits,\n};\n\nconst int16_t FLASHMEM wav_sine[] = {\n       0,    201,    402,    603,\n     804,   1005,   1206,   1406,\n    1607,   1808,   2009,   2209,\n    2410,   2610,   2811,   3011,\n    3211,   3411,   3611,   3811,\n    4011,   4210,   4409,   4608,\n    4807,   5006,   5205,   5403,\n    5601,   5799,   5997,   6195,\n    6392,   6589,   6786,   6982,\n    7179,   7375,   7571,   7766,\n    7961,   8156,   8351,   8545,\n    8739,   8932,   9126,   9319,\n    9511,   9703,   9895,  10087,\n   10278,  10469,  10659,  10849,\n   11038,  11227,  11416,  11604,\n   11792,  11980,  12166,  12353,\n   12539,  12724,  12909,  13094,\n   13278,  13462,  13645,  13827,\n   14009,  14191,  14372,  14552,\n   14732,  14911,  15090,  15268,\n   15446,  15623,  15799,  15975,\n   16150,  16325,  16499,  16672,\n   16845,  17017,  17189,  17360,\n   17530,  17699,  17868,  18036,\n   18204,  18371,  18537,  18702,\n   18867,  19031,  19194,  19357,\n   19519,  19680,  19840,  20000,\n   20159,  20317,  20474,  20631,\n   20787,  20942,  21096,  21249,\n   21402,  21554,  21705,  21855,\n   22004,  22153,  22301,  22448,\n   22594,  22739,  22883,  23027,\n   23169,  23311,  23452,  23592,\n   23731,  23869,  24006,  24143,\n   24278,  24413,  24546,  24679,\n   24811,  24942,  25072,  25201,\n   25329,  25456,  25582,  25707,\n   25831,  25954,  26077,  26198,\n   26318,  26437,  26556,  26673,\n   26789,  26905,  27019,  27132,\n   27244,  27355,  27466,  27575,\n   27683,  27790,  27896,  28001,\n   28105,  28208,  28309,  28410,\n   28510,  28608,  28706,  28802,\n   28897,  28992,  29085,  29177,\n   29268,  29358,  29446,  29534,\n   29621,  29706,  29790,  29873,\n   29955,  30036,  30116,  30195,\n   30272,  30349,  30424,  30498,\n   30571,  30643,  30713,  30783,\n   30851,  30918,  30984,  31049,\n   31113,  31175,  31236,  31297,\n   31356,  31413,  31470,  31525,\n   31580,  31633,  31684,  31735,\n   31785,  31833,  31880,  31926,\n   31970,  32014,  32056,  32097,\n   32137,  32176,  32213,  32249,\n   32284,  32318,  32350,  32382,\n   32412,  32441,  32468,  32495,\n   32520,  32544,  32567,  32588,\n   32609,  32628,  32646,  32662,\n   32678,  32692,  32705,  32717,\n   32727,  32736,  32744,  32751,\n   32757,  32761,  32764,  32766,\n   32767,  32766,  32764,  32761,\n   32757,  32751,  32744,  32736,\n   32727,  32717,  32705,  32692,\n   32678,  32662,  32646,  32628,\n   32609,  32588,  32567,  32544,\n   32520,  32495,  32468,  32441,\n   32412,  32382,  32350,  32318,\n   32284,  32249,  32213,  32176,\n   32137,  32097,  32056,  32014,\n   31970,  31926,  31880,  31833,\n   31785,  31735,  31684,  31633,\n   31580,  31525,  31470,  31413,\n   31356,  31297,  31236,  31175,\n   31113,  31049,  30984,  30918,\n   30851,  30783,  30713,  30643,\n   30571,  30498,  30424,  30349,\n   30272,  30195,  30116,  30036,\n   29955,  29873,  29790,  29706,\n   29621,  29534,  29446,  29358,\n   29268,  29177,  29085,  28992,\n   28897,  28802,  28706,  28608,\n   28510,  28410,  28309,  28208,\n   28105,  28001,  27896,  27790,\n   27683,  27575,  27466,  27355,\n   27244,  27132,  27019,  26905,\n   26789,  26673,  26556,  26437,\n   26318,  26198,  26077,  25954,\n   25831,  25707,  25582,  25456,\n   25329,  25201,  25072,  24942,\n   24811,  24679,  24546,  24413,\n   24278,  24143,  24006,  23869,\n   23731,  23592,  23452,  23311,\n   23169,  23027,  22883,  22739,\n   22594,  22448,  22301,  22153,\n   22004,  21855,  21705,  21554,\n   21402,  21249,  21096,  20942,\n   20787,  20631,  20474,  20317,\n   20159,  20000,  19840,  19680,\n   19519,  19357,  19194,  19031,\n   18867,  18702,  18537,  18371,\n   18204,  18036,  17868,  17699,\n   17530,  17360,  17189,  17017,\n   16845,  16672,  16499,  16325,\n   16150,  15975,  15799,  15623,\n   15446,  15268,  15090,  14911,\n   14732,  14552,  14372,  14191,\n   14009,  13827,  13645,  13462,\n   13278,  13094,  12909,  12724,\n   12539,  12353,  12166,  11980,\n   11792,  11604,  11416,  11227,\n   11038,  10849,  10659,  10469,\n   10278,  10087,   9895,   9703,\n    9511,   9319,   9126,   8932,\n    8739,   8545,   8351,   8156,\n    7961,   7766,   7571,   7375,\n    7179,   6982,   6786,   6589,\n    6392,   6195,   5997,   5799,\n    5601,   5403,   5205,   5006,\n    4807,   4608,   4409,   4210,\n    4011,   3811,   3611,   3411,\n    3211,   3011,   2811,   2610,\n    2410,   2209,   2009,   1808,\n    1607,   1406,   1206,   1005,\n     804,    603,    402,    201,\n       0,   -201,   -402,   -603,\n    -804,  -1005,  -1206,  -1406,\n   -1607,  -1808,  -2009,  -2209,\n   -2410,  -2610,  -2811,  -3011,\n   -3211,  -3411,  -3611,  -3811,\n   -4011,  -4210,  -4409,  -4608,\n   -4807,  -5006,  -5205,  -5403,\n   -5601,  -5799,  -5997,  -6195,\n   -6392,  -6589,  -6786,  -6982,\n   -7179,  -7375,  -7571,  -7766,\n   -7961,  -8156,  -8351,  -8545,\n   -8739,  -8932,  -9126,  -9319,\n   -9511,  -9703,  -9895, -10087,\n  -10278, -10469, -10659, -10849,\n  -11038, -11227, -11416, -11604,\n  -11792, -11980, -12166, -12353,\n  -12539, -12724, -12909, -13094,\n  -13278, -13462, -13645, -13827,\n  -14009, -14191, -14372, -14552,\n  -14732, -14911, -15090, -15268,\n  -15446, -15623, -15799, -15975,\n  -16150, -16325, -16499, -16672,\n  -16845, -17017, -17189, -17360,\n  -17530, -17699, -17868, -18036,\n  -18204, -18371, -18537, -18702,\n  -18867, -19031, -19194, -19357,\n  -19519, -19680, -19840, -20000,\n  -20159, -20317, -20474, -20631,\n  -20787, -20942, -21096, -21249,\n  -21402, -21554, -21705, -21855,\n  -22004, -22153, -22301, -22448,\n  -22594, -22739, -22883, -23027,\n  -23169, -23311, -23452, -23592,\n  -23731, -23869, -24006, -24143,\n  -24278, -24413, -24546, -24679,\n  -24811, -24942, -25072, -25201,\n  -25329, -25456, -25582, -25707,\n  -25831, -25954, -26077, -26198,\n  -26318, -26437, -26556, -26673,\n  -26789, -26905, -27019, -27132,\n  -27244, -27355, -27466, -27575,\n  -27683, -27790, -27896, -28001,\n  -28105, -28208, -28309, -28410,\n  -28510, -28608, -28706, -28802,\n  -28897, -28992, -29085, -29177,\n  -29268, -29358, -29446, -29534,\n  -29621, -29706, -29790, -29873,\n  -29955, -30036, -30116, -30195,\n  -30272, -30349, -30424, -30498,\n  -30571, -30643, -30713, -30783,\n  -30851, -30918, -30984, -31049,\n  -31113, -31175, -31236, -31297,\n  -31356, -31413, -31470, -31525,\n  -31580, -31633, -31684, -31735,\n  -31785, -31833, -31880, -31926,\n  -31970, -32014, -32056, -32097,\n  -32137, -32176, -32213, -32249,\n  -32284, -32318, -32350, -32382,\n  -32412, -32441, -32468, -32495,\n  -32520, -32544, -32567, -32588,\n  -32609, -32628, -32646, -32662,\n  -32678, -32692, -32705, -32717,\n  -32727, -32736, -32744, -32751,\n  -32757, -32761, -32764, -32766,\n  -32767, -32766, -32764, -32761,\n  -32757, -32751, -32744, -32736,\n  -32727, -32717, -32705, -32692,\n  -32678, -32662, -32646, -32628,\n  -32609, -32588, -32567, -32544,\n  -32520, -32495, -32468, -32441,\n  -32412, -32382, -32350, -32318,\n  -32284, -32249, -32213, -32176,\n  -32137, -32097, -32056, -32014,\n  -31970, -31926, -31880, -31833,\n  -31785, -31735, -31684, -31633,\n  -31580, -31525, -31470, -31413,\n  -31356, -31297, -31236, -31175,\n  -31113, -31049, -30984, -30918,\n  -30851, -30783, -30713, -30643,\n  -30571, -30498, -30424, -30349,\n  -30272, -30195, -30116, -30036,\n  -29955, -29873, -29790, -29706,\n  -29621, -29534, -29446, -29358,\n  -29268, -29177, -29085, -28992,\n  -28897, -28802, -28706, -28608,\n  -28510, -28410, -28309, -28208,\n  -28105, -28001, -27896, -27790,\n  -27683, -27575, -27466, -27355,\n  -27244, -27132, -27019, -26905,\n  -26789, -26673, -26556, -26437,\n  -26318, -26198, -26077, -25954,\n  -25831, -25707, -25582, -25456,\n  -25329, -25201, -25072, -24942,\n  -24811, -24679, -24546, -24413,\n  -24278, -24143, -24006, -23869,\n  -23731, -23592, -23452, -23311,\n  -23169, -23027, -22883, -22739,\n  -22594, -22448, -22301, -22153,\n  -22004, -21855, -21705, -21554,\n  -21402, -21249, -21096, -20942,\n  -20787, -20631, -20474, -20317,\n  -20159, -20000, -19840, -19680,\n  -19519, -19357, -19194, -19031,\n  -18867, -18702, -18537, -18371,\n  -18204, -18036, -17868, -17699,\n  -17530, -17360, -17189, -17017,\n  -16845, -16672, -16499, -16325,\n  -16150, -15975, -15799, -15623,\n  -15446, -15268, -15090, -14911,\n  -14732, -14552, -14372, -14191,\n  -14009, -13827, -13645, -13462,\n  -13278, -13094, -12909, -12724,\n  -12539, -12353, -12166, -11980,\n  -11792, -11604, -11416, -11227,\n  -11038, -10849, -10659, -10469,\n  -10278, -10087,  -9895,  -9703,\n   -9511,  -9319,  -9126,  -8932,\n   -8739,  -8545,  -8351,  -8156,\n   -7961,  -7766,  -7571,  -7375,\n   -7179,  -6982,  -6786,  -6589,\n   -6392,  -6195,  -5997,  -5799,\n   -5601,  -5403,  -5205,  -5006,\n   -4807,  -4608,  -4409,  -4210,\n   -4011,  -3811,  -3611,  -3411,\n   -3211,  -3011,  -2811,  -2610,\n   -2410,  -2209,  -2009,  -1808,\n   -1607,  -1406,  -1206,  -1005,\n    -804,   -603,   -402,   -201,\n       0,\n};\nconst int16_t FLASHMEM wav_fold_power[] = {\n  -32767, -32322, -31881, -31446,\n  -31017, -30592, -30172, -29757,\n  -29347, -28942, -28541, -28146,\n  -27755, -27368, -26987, -26610,\n  -26237, -25869, -25506, -25146,\n  -24791, -24441, -24095, -23752,\n  -23415, -23081, -22751, -22425,\n  -22104, -21786, -21472, -21162,\n  -20856, -20554, -20255, -19961,\n  -19670, -19382, -19098, -18818,\n  -18541, -18268, -17998, -17732,\n  -17469, -17209, -16953, -16700,\n  -16450, -16204, -15960, -15720,\n  -15483, -15249, -15018, -14790,\n  -14565, -14343, -14123, -13907,\n  -13694, -13483, -13275, -13070,\n  -12867, -12668, -12471, -12276,\n  -12084, -11895, -11709, -11524,\n  -11343, -11163, -10987, -10812,\n  -10640, -10471, -10303, -10138,\n   -9975,  -9815,  -9657,  -9501,\n   -9347,  -9195,  -9045,  -8898,\n   -8752,  -8609,  -8467,  -8328,\n   -8190,  -8055,  -7921,  -7789,\n   -7659,  -7532,  -7405,  -7281,\n   -7159,  -7038,  -6919,  -6802,\n   -6686,  -6572,  -6460,  -6349,\n   -6240,  -6133,  -6027,  -5923,\n   -5821,  -5719,  -5620,  -5522,\n   -5425,  -5330,  -5236,  -5144,\n   -5053,  -4963,  -4875,  -4788,\n   -4703,  -4619,  -4536,  -4454,\n   -4374,  -4295,  -4217,  -4140,\n   -4065,  -3990,  -3917,  -3845,\n   -3775,  -3705,  -3636,  -3569,\n   -3502,  -3437,  -3373,  -3309,\n   -3247,  -3186,  -3125,  -3066,\n   -3008,  -2950,  -2894,  -2839,\n   -2784,  -2730,  -2677,  -2626,\n   -2575,  -2524,  -2475,  -2426,\n   -2379,  -2332,  -2286,  -2240,\n   -2196,  -2152,  -2109,  -2067,\n   -2025,  -1984,  -1944,  -1905,\n   -1866,  -1828,  -1790,  -1754,\n   -1718,  -1682,  -1647,  -1613,\n   -1579,  -1546,  -1514,  -1482,\n   -1451,  -1420,  -1390,  -1361,\n   -1332,  -1303,  -1275,  -1248,\n   -1221,  -1194,  -1168,  -1143,\n   -1118,  -1093,  -1069,  -1046,\n   -1022,  -1000,   -977,   -956,\n    -934,   -913,   -892,   -872,\n    -852,   -833,   -814,   -795,\n    -777,   -759,   -741,   -724,\n    -707,   -691,   -674,   -659,\n    -643,   -628,   -613,   -598,\n    -584,   -570,   -556,   -543,\n    -529,   -516,   -504,   -491,\n    -479,   -467,   -456,   -445,\n    -433,   -423,   -412,   -401,\n    -391,   -381,   -372,   -362,\n    -353,   -344,   -335,   -326,\n    -318,   -309,   -301,   -293,\n    -285,   -278,   -270,   -263,\n    -256,   -249,   -242,   -236,\n    -229,   -223,   -217,   -211,\n    -205,   -199,   -194,   -188,\n    -183,   -178,   -173,   -168,\n    -163,   -158,   -154,   -149,\n    -145,   -141,   -136,   -132,\n    -129,   -125,   -121,   -117,\n    -114,   -110,   -107,   -104,\n    -101,    -97,    -94,    -91,\n     -89,    -86,    -83,    -80,\n     -78,    -75,    -73,    -71,\n     -68,    -66,    -64,    -62,\n     -60,    -58,    -56,    -54,\n     -52,    -50,    -49,    -47,\n     -45,    -44,    -42,    -41,\n     -39,    -38,    -37,    -35,\n     -34,    -33,    -32,    -31,\n     -29,    -28,    -27,    -26,\n     -25,    -24,    -23,    -23,\n     -22,    -21,    -20,    -19,\n     -19,    -18,    -17,    -16,\n     -16,    -15,    -15,    -14,\n     -13,    -13,    -12,    -12,\n     -11,    -11,    -10,    -10,\n     -10,     -9,     -9,     -8,\n      -8,     -8,     -7,     -7,\n      -7,     -6,     -6,     -6,\n      -6,     -5,     -5,     -5,\n      -5,     -4,     -4,     -4,\n      -4,     -4,     -3,     -3,\n      -3,     -3,     -3,     -3,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -1,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      2,\n       2,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      3,      3,      3,\n       3,      3,      3,      4,\n       4,      4,      4,      4,\n       5,      5,      5,      5,\n       6,      6,      6,      6,\n       7,      7,      7,      8,\n       8,      8,      9,      9,\n      10,     10,     10,     11,\n      11,     12,     12,     13,\n      13,     14,     15,     15,\n      16,     16,     17,     18,\n      19,     19,     20,     21,\n      22,     23,     23,     24,\n      25,     26,     27,     28,\n      29,     31,     32,     33,\n      34,     35,     37,     38,\n      39,     41,     42,     44,\n      45,     47,     49,     50,\n      52,     54,     56,     58,\n      60,     62,     64,     66,\n      68,     71,     73,     75,\n      78,     80,     83,     86,\n      89,     91,     94,     97,\n     101,    104,    107,    110,\n     114,    117,    121,    125,\n     129,    132,    136,    141,\n     145,    149,    154,    158,\n     163,    168,    173,    178,\n     183,    188,    194,    199,\n     205,    211,    217,    223,\n     229,    236,    242,    249,\n     256,    263,    270,    278,\n     285,    293,    301,    309,\n     318,    326,    335,    344,\n     353,    362,    372,    381,\n     391,    401,    412,    423,\n     433,    445,    456,    467,\n     479,    491,    504,    516,\n     529,    543,    556,    570,\n     584,    598,    613,    628,\n     643,    659,    674,    691,\n     707,    724,    741,    759,\n     777,    795,    814,    833,\n     852,    872,    892,    913,\n     934,    956,    977,   1000,\n    1022,   1046,   1069,   1093,\n    1118,   1143,   1168,   1194,\n    1221,   1248,   1275,   1303,\n    1332,   1361,   1390,   1420,\n    1451,   1482,   1514,   1546,\n    1579,   1613,   1647,   1682,\n    1718,   1754,   1790,   1828,\n    1866,   1905,   1944,   1984,\n    2025,   2067,   2109,   2152,\n    2196,   2240,   2286,   2332,\n    2379,   2426,   2475,   2524,\n    2575,   2626,   2677,   2730,\n    2784,   2839,   2894,   2950,\n    3008,   3066,   3125,   3186,\n    3247,   3309,   3373,   3437,\n    3502,   3569,   3636,   3705,\n    3775,   3845,   3917,   3990,\n    4065,   4140,   4217,   4295,\n    4374,   4454,   4536,   4619,\n    4703,   4788,   4875,   4963,\n    5053,   5144,   5236,   5330,\n    5425,   5522,   5620,   5719,\n    5821,   5923,   6027,   6133,\n    6240,   6349,   6460,   6572,\n    6686,   6802,   6919,   7038,\n    7159,   7281,   7405,   7532,\n    7659,   7789,   7921,   8055,\n    8190,   8328,   8467,   8609,\n    8752,   8898,   9045,   9195,\n    9347,   9501,   9657,   9815,\n    9975,  10138,  10303,  10471,\n   10640,  10812,  10987,  11163,\n   11343,  11524,  11709,  11895,\n   12084,  12276,  12471,  12668,\n   12867,  13070,  13275,  13483,\n   13694,  13907,  14123,  14343,\n   14565,  14790,  15018,  15249,\n   15483,  15720,  15960,  16204,\n   16450,  16700,  16953,  17209,\n   17469,  17732,  17998,  18268,\n   18541,  18818,  19098,  19382,\n   19670,  19961,  20255,  20554,\n   20856,  21162,  21472,  21786,\n   22104,  22425,  22751,  23081,\n   23415,  23752,  24095,  24441,\n   24791,  25146,  25506,  25869,\n   26237,  26610,  26987,  27368,\n   27755,  28146,  28541,  28942,\n   29347,  29757,  30172,  30592,\n   31017,  31446,  31881,  32322,\n   32322,\n};\nconst int16_t FLASHMEM wav_fold_sine[] = {\n  -32767, -32746, -32726, -32704,\n  -32683, -32662, -32640, -32618,\n  -32596, -32573, -32551, -32528,\n  -32505, -32482, -32458, -32435,\n  -32411, -32387, -32364, -32340,\n  -32316, -32291, -32267, -32243,\n  -32219, -32194, -32170, -32146,\n  -32122, -32097, -32073, -32049,\n  -32025, -32002, -31978, -31955,\n  -31932, -31909, -31886, -31863,\n  -31841, -31819, -31797, -31776,\n  -31755, -31734, -31714, -31694,\n  -31674, -31655, -31636, -31618,\n  -31600, -31582, -31565, -31548,\n  -31532, -31516, -31501, -31486,\n  -31471, -31457, -31443, -31430,\n  -31417, -31404, -31392, -31380,\n  -31368, -31356, -31345, -31334,\n  -31323, -31312, -31302, -31291,\n  -31280, -31269, -31259, -31248,\n  -31236, -31225, -31213, -31201,\n  -31189, -31175, -31162, -31148,\n  -31133, -31117, -31101, -31083,\n  -31065, -31046, -31025, -31003,\n  -30981, -30956, -30931, -30904,\n  -30875, -30845, -30814, -30780,\n  -30745, -30708, -30669, -30628,\n  -30585, -30540, -30494, -30445,\n  -30393, -30340, -30284, -30227,\n  -30167, -30104, -30040, -29973,\n  -29904, -29833, -29759, -29684,\n  -29606, -29526, -29444, -29360,\n  -29274, -29186, -29096, -29005,\n  -28912, -28817, -28721, -28623,\n  -28525, -28425, -28324, -28222,\n  -28119, -28016, -27913, -27809,\n  -27705, -27601, -27497, -27394,\n  -27291, -27189, -27088, -26988,\n  -26889, -26792, -26696, -26602,\n  -26511, -26421, -26334, -26249,\n  -26168, -26089, -26013, -25941,\n  -25872, -25807, -25745, -25687,\n  -25634, -25584, -25539, -25498,\n  -25461, -25430, -25402, -25380,\n  -25362, -25349, -25340, -25337,\n  -25338, -25344, -25354, -25370,\n  -25389, -25414, -25442, -25475,\n  -25512, -25553, -25597, -25645,\n  -25697, -25752, -25809, -25869,\n  -25931, -25996, -26062, -26130,\n  -26198, -26267, -26337, -26407,\n  -26476, -26544, -26611, -26677,\n  -26740, -26801, -26858, -26913,\n  -26963, -27009, -27050, -27086,\n  -27117, -27141, -27158, -27169,\n  -27172, -27167, -27153, -27131,\n  -27100, -27059, -27009, -26948,\n  -26877, -26794, -26701, -26596,\n  -26479, -26351, -26210, -26057,\n  -25892, -25715, -25524, -25322,\n  -25106, -24878, -24638, -24385,\n  -24120, -23843, -23554, -23253,\n  -22941, -22617, -22283, -21939,\n  -21585, -21221, -20849, -20468,\n  -20079, -19683, -19281, -18872,\n  -18458, -18040, -17618, -17193,\n  -16766, -16338, -15909, -15480,\n  -15053, -14628, -14205, -13787,\n  -13374, -12967, -12566, -12173,\n  -11789, -11414, -11050, -10697,\n  -10357, -10030,  -9716,  -9418,\n   -9135,  -8869,  -8620,  -8389,\n   -8177,  -7984,  -7810,  -7658,\n   -7526,  -7416,  -7327,  -7261,\n   -7218,  -7197,  -7199,  -7224,\n   -7273,  -7344,  -7439,  -7557,\n   -7698,  -7861,  -8047,  -8255,\n   -8484,  -8734,  -9004,  -9294,\n   -9603,  -9931, -10275, -10636,\n  -11013, -11404, -11808, -12225,\n  -12652, -13089, -13535, -13988,\n  -14446, -14909, -15374, -15841,\n  -16308, -16773, -17235, -17692,\n  -18142, -18585, -19017, -19439,\n  -19847, -20241, -20619, -20980,\n  -21321, -21642, -21940, -22215,\n  -22465, -22689, -22886, -23053,\n  -23191, -23297, -23372, -23413,\n  -23420, -23393, -23330, -23231,\n  -23095, -22922, -22712, -22463,\n  -22177, -21853, -21491, -21090,\n  -20653, -20178, -19666, -19118,\n  -18534, -17915, -17263, -16578,\n  -15860, -15112, -14335, -13530,\n  -12698, -11841, -10961, -10059,\n   -9137,  -8198,  -7242,  -6273,\n   -5292,  -4301,  -3303,  -2300,\n   -1294,   -287,    718,   1719,\n    2713,   3698,   4672,   5632,\n    6576,   7502,   8406,   9288,\n   10143,  10971,  11769,  12535,\n   13267,  13962,  14620,  15237,\n   15812,  16345,  16832,  17272,\n   17665,  18009,  18302,  18545,\n   18735,  18872,  18956,  18986,\n   18961,  18882,  18748,  18560,\n   18317,  18020,  17670,  17267,\n   16812,  16306,  15749,  15144,\n   14491,  13793,  13050,  12264,\n   11437,  10572,   9669,   8733,\n    7763,   6765,   5738,   4687,\n    3614,   2521,   1412,    289,\n    -844,  -1986,  -3132,  -4281,\n   -5428,  -6571,  -7707,  -8832,\n   -9945, -11040, -12117, -13171,\n  -14201, -15202, -16173, -17110,\n  -18011, -18874, -19695, -20474,\n  -21206, -21892, -22527, -23111,\n  -23641, -24116, -24536, -24897,\n  -25199, -25442, -25624, -25744,\n  -25803, -25798, -25732, -25603,\n  -25411, -25157, -24841, -24464,\n  -24027, -23530, -22975, -22363,\n  -21695, -20974, -20199, -19375,\n  -18502, -17582, -16619, -15613,\n  -14569, -13488, -12372, -11226,\n  -10051,  -8851,  -7629,  -6387,\n   -5129,  -3858,  -2578,  -1290,\n       0,   1290,   2578,   3858,\n    5129,   6387,   7629,   8851,\n   10051,  11226,  12372,  13488,\n   14569,  15613,  16619,  17582,\n   18502,  19375,  20199,  20974,\n   21695,  22363,  22975,  23530,\n   24027,  24464,  24841,  25157,\n   25411,  25603,  25732,  25798,\n   25803,  25744,  25624,  25442,\n   25199,  24897,  24536,  24116,\n   23641,  23111,  22527,  21892,\n   21206,  20474,  19695,  18874,\n   18011,  17110,  16173,  15202,\n   14201,  13171,  12117,  11040,\n    9945,   8832,   7707,   6571,\n    5428,   4281,   3132,   1986,\n     844,   -289,  -1412,  -2521,\n   -3614,  -4687,  -5738,  -6765,\n   -7763,  -8733,  -9669, -10572,\n  -11437, -12264, -13050, -13793,\n  -14491, -15144, -15749, -16306,\n  -16812, -17267, -17670, -18020,\n  -18317, -18560, -18748, -18882,\n  -18961, -18986, -18956, -18872,\n  -18735, -18545, -18302, -18009,\n  -17665, -17272, -16832, -16345,\n  -15812, -15237, -14620, -13962,\n  -13267, -12535, -11769, -10971,\n  -10143,  -9288,  -8406,  -7502,\n   -6576,  -5632,  -4672,  -3698,\n   -2713,  -1719,   -718,    287,\n    1294,   2300,   3303,   4301,\n    5292,   6273,   7242,   8198,\n    9137,  10059,  10961,  11841,\n   12698,  13530,  14335,  15112,\n   15860,  16578,  17263,  17915,\n   18534,  19118,  19666,  20178,\n   20653,  21090,  21491,  21853,\n   22177,  22463,  22712,  22922,\n   23095,  23231,  23330,  23393,\n   23420,  23413,  23372,  23297,\n   23191,  23053,  22886,  22689,\n   22465,  22215,  21940,  21642,\n   21321,  20980,  20619,  20241,\n   19847,  19439,  19017,  18585,\n   18142,  17692,  17235,  16773,\n   16308,  15841,  15374,  14909,\n   14446,  13988,  13535,  13089,\n   12652,  12225,  11808,  11404,\n   11013,  10636,  10275,   9931,\n    9603,   9294,   9004,   8734,\n    8484,   8255,   8047,   7861,\n    7698,   7557,   7439,   7344,\n    7273,   7224,   7199,   7197,\n    7218,   7261,   7327,   7416,\n    7526,   7658,   7810,   7984,\n    8177,   8389,   8620,   8869,\n    9135,   9418,   9716,  10030,\n   10357,  10697,  11050,  11414,\n   11789,  12173,  12566,  12967,\n   13374,  13787,  14205,  14628,\n   15053,  15480,  15909,  16338,\n   16766,  17193,  17618,  18040,\n   18458,  18872,  19281,  19683,\n   20079,  20468,  20849,  21221,\n   21585,  21939,  22283,  22617,\n   22941,  23253,  23554,  23843,\n   24120,  24385,  24638,  24878,\n   25106,  25322,  25524,  25715,\n   25892,  26057,  26210,  26351,\n   26479,  26596,  26701,  26794,\n   26877,  26948,  27009,  27059,\n   27100,  27131,  27153,  27167,\n   27172,  27169,  27158,  27141,\n   27117,  27086,  27050,  27009,\n   26963,  26913,  26858,  26801,\n   26740,  26677,  26611,  26544,\n   26476,  26407,  26337,  26267,\n   26198,  26130,  26062,  25996,\n   25931,  25869,  25809,  25752,\n   25697,  25645,  25597,  25553,\n   25512,  25475,  25442,  25414,\n   25389,  25370,  25354,  25344,\n   25338,  25337,  25340,  25349,\n   25362,  25380,  25402,  25430,\n   25461,  25498,  25539,  25584,\n   25634,  25687,  25745,  25807,\n   25872,  25941,  26013,  26089,\n   26168,  26249,  26334,  26421,\n   26511,  26602,  26696,  26792,\n   26889,  26988,  27088,  27189,\n   27291,  27394,  27497,  27601,\n   27705,  27809,  27913,  28016,\n   28119,  28222,  28324,  28425,\n   28525,  28623,  28721,  28817,\n   28912,  29005,  29096,  29186,\n   29274,  29360,  29444,  29526,\n   29606,  29684,  29759,  29833,\n   29904,  29973,  30040,  30104,\n   30167,  30227,  30284,  30340,\n   30393,  30445,  30494,  30540,\n   30585,  30628,  30669,  30708,\n   30745,  30780,  30814,  30845,\n   30875,  30904,  30931,  30956,\n   30981,  31003,  31025,  31046,\n   31065,  31083,  31101,  31117,\n   31133,  31148,  31162,  31175,\n   31189,  31201,  31213,  31225,\n   31236,  31248,  31259,  31269,\n   31280,  31291,  31302,  31312,\n   31323,  31334,  31345,  31356,\n   31368,  31380,  31392,  31404,\n   31417,  31430,  31443,  31457,\n   31471,  31486,  31501,  31516,\n   31532,  31548,  31565,  31582,\n   31600,  31618,  31636,  31655,\n   31674,  31694,  31714,  31734,\n   31755,  31776,  31797,  31819,\n   31841,  31863,  31886,  31909,\n   31932,  31955,  31978,  32002,\n   32025,  32049,  32073,  32097,\n   32122,  32146,  32170,  32194,\n   32219,  32243,  32267,  32291,\n   32316,  32340,  32364,  32387,\n   32411,  32435,  32458,  32482,\n   32505,  32528,  32551,  32573,\n   32596,  32618,  32640,  32662,\n   32683,  32704,  32726,  32746,\n   32746,\n};\nconst int16_t FLASHMEM wav_overdrive[] = {\n  -32767, -32767, -32767, -32767,\n  -32767, -32767, -32767, -32767,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32766, -32766, -32766,\n  -32766, -32765, -32765, -32765,\n  -32765, -32765, -32765, -32765,\n  -32765, -32765, -32765, -32765,\n  -32764, -32764, -32764, -32764,\n  -32764, -32764, -32764, -32764,\n  -32763, -32763, -32763, -32763,\n  -32763, -32763, -32763, -32763,\n  -32762, -32762, -32762, -32762,\n  -32762, -32762, -32761, -32761,\n  -32761, -32761, -32761, -32761,\n  -32760, -32760, -32760, -32760,\n  -32760, -32759, -32759, -32759,\n  -32759, -32759, -32758, -32758,\n  -32758, -32758, -32757, -32757,\n  -32757, -32757, -32756, -32756,\n  -32756, -32756, -32755, -32755,\n  -32755, -32754, -32754, -32754,\n  -32753, -32753, -32753, -32752,\n  -32752, -32752, -32751, -32751,\n  -32751, -32750, -32750, -32749,\n  -32749, -32749, -32748, -32748,\n  -32747, -32747, -32746, -32746,\n  -32745, -32745, -32744, -32744,\n  -32743, -32743, -32742, -32742,\n  -32741, -32741, -32740, -32740,\n  -32739, -32738, -32738, -32737,\n  -32736, -32736, -32735, -32734,\n  -32734, -32733, -32732, -32732,\n  -32731, -32730, -32729, -32728,\n  -32728, -32727, -32726, -32725,\n  -32724, -32723, -32722, -32721,\n  -32720, -32719, -32718, -32717,\n  -32716, -32715, -32714, -32713,\n  -32712, -32711, -32710, -32709,\n  -32707, -32706, -32705, -32704,\n  -32702, -32701, -32700, -32698,\n  -32697, -32695, -32694, -32692,\n  -32691, -32689, -32688, -32686,\n  -32684, -32683, -32681, -32679,\n  -32678, -32676, -32674, -32672,\n  -32670, -32668, -32666, -32664,\n  -32662, -32660, -32658, -32655,\n  -32653, -32651, -32649, -32646,\n  -32644, -32641, -32639, -32636,\n  -32633, -32631, -32628, -32625,\n  -32622, -32619, -32617, -32614,\n  -32610, -32607, -32604, -32601,\n  -32597, -32594, -32591, -32587,\n  -32584, -32580, -32576, -32572,\n  -32568, -32564, -32560, -32556,\n  -32552, -32548, -32543, -32539,\n  -32534, -32530, -32525, -32520,\n  -32515, -32510, -32505, -32500,\n  -32495, -32489, -32484, -32478,\n  -32473, -32467, -32461, -32455,\n  -32448, -32442, -32436, -32429,\n  -32422, -32416, -32409, -32402,\n  -32394, -32387, -32380, -32372,\n  -32364, -32356, -32348, -32340,\n  -32331, -32323, -32314, -32305,\n  -32296, -32287, -32277, -32268,\n  -32258, -32248, -32237, -32227,\n  -32216, -32206, -32195, -32183,\n  -32172, -32160, -32148, -32136,\n  -32124, -32111, -32098, -32085,\n  -32072, -32058, -32044, -32030,\n  -32016, -32001, -31986, -31971,\n  -31955, -31939, -31923, -31907,\n  -31890, -31873, -31855, -31838,\n  -31819, -31801, -31782, -31763,\n  -31743, -31723, -31703, -31682,\n  -31661, -31640, -31618, -31596,\n  -31573, -31550, -31526, -31502,\n  -31478, -31453, -31427, -31401,\n  -31375, -31348, -31320, -31293,\n  -31264, -31235, -31205, -31175,\n  -31145, -31113, -31082, -31049,\n  -31016, -30983, -30948, -30913,\n  -30878, -30842, -30805, -30767,\n  -30729, -30690, -30650, -30610,\n  -30569, -30527, -30484, -30440,\n  -30396, -30351, -30305, -30258,\n  -30211, -30162, -30113, -30063,\n  -30012, -29959, -29906, -29853,\n  -29798, -29742, -29685, -29627,\n  -29568, -29508, -29447, -29385,\n  -29321, -29257, -29191, -29125,\n  -29057, -28988, -28918, -28846,\n  -28774, -28700, -28625, -28548,\n  -28470, -28391, -28311, -28229,\n  -28146, -28061, -27975, -27887,\n  -27798, -27708, -27616, -27522,\n  -27427, -27331, -27232, -27132,\n  -27031, -26928, -26823, -26717,\n  -26609, -26499, -26387, -26274,\n  -26158, -26041, -25923, -25802,\n  -25679, -25555, -25428, -25300,\n  -25170, -25038, -24904, -24767,\n  -24629, -24489, -24346, -24202,\n  -24056, -23907, -23756, -23603,\n  -23448, -23291, -23131, -22970,\n  -22806, -22640, -22471, -22301,\n  -22128, -21952, -21775, -21595,\n  -21413, -21228, -21041, -20852,\n  -20660, -20466, -20270, -20071,\n  -19870, -19666, -19460, -19252,\n  -19041, -18828, -18613, -18395,\n  -18174, -17951, -17726, -17499,\n  -17269, -17036, -16802, -16565,\n  -16325, -16083, -15839, -15593,\n  -15344, -15093, -14840, -14584,\n  -14327, -14067, -13805, -13540,\n  -13274, -13005, -12735, -12462,\n  -12187, -11910, -11632, -11351,\n  -11068, -10784, -10498, -10210,\n   -9920,  -9628,  -9335,  -9040,\n   -8744,  -8446,  -8146,  -7845,\n   -7543,  -7239,  -6934,  -6628,\n   -6320,  -6012,  -5702,  -5391,\n   -5079,  -4766,  -4453,  -4138,\n   -3823,  -3507,  -3190,  -2873,\n   -2555,  -2237,  -1918,  -1599,\n   -1279,   -960,   -640,   -320,\n       0,    320,    640,    960,\n    1279,   1599,   1918,   2237,\n    2555,   2873,   3190,   3507,\n    3823,   4138,   4453,   4766,\n    5079,   5391,   5702,   6012,\n    6320,   6628,   6934,   7239,\n    7543,   7845,   8146,   8446,\n    8744,   9040,   9335,   9628,\n    9920,  10210,  10498,  10784,\n   11068,  11351,  11632,  11910,\n   12187,  12462,  12735,  13005,\n   13274,  13540,  13805,  14067,\n   14327,  14584,  14840,  15093,\n   15344,  15593,  15839,  16083,\n   16325,  16565,  16802,  17036,\n   17269,  17499,  17726,  17951,\n   18174,  18395,  18613,  18828,\n   19041,  19252,  19460,  19666,\n   19870,  20071,  20270,  20466,\n   20660,  20852,  21041,  21228,\n   21413,  21595,  21775,  21952,\n   22128,  22301,  22471,  22640,\n   22806,  22970,  23131,  23291,\n   23448,  23603,  23756,  23907,\n   24056,  24202,  24346,  24489,\n   24629,  24767,  24904,  25038,\n   25170,  25300,  25428,  25555,\n   25679,  25802,  25923,  26041,\n   26158,  26274,  26387,  26499,\n   26609,  26717,  26823,  26928,\n   27031,  27132,  27232,  27331,\n   27427,  27522,  27616,  27708,\n   27798,  27887,  27975,  28061,\n   28146,  28229,  28311,  28391,\n   28470,  28548,  28625,  28700,\n   28774,  28846,  28918,  28988,\n   29057,  29125,  29191,  29257,\n   29321,  29385,  29447,  29508,\n   29568,  29627,  29685,  29742,\n   29798,  29853,  29906,  29959,\n   30012,  30063,  30113,  30162,\n   30211,  30258,  30305,  30351,\n   30396,  30440,  30484,  30527,\n   30569,  30610,  30650,  30690,\n   30729,  30767,  30805,  30842,\n   30878,  30913,  30948,  30983,\n   31016,  31049,  31082,  31113,\n   31145,  31175,  31205,  31235,\n   31264,  31293,  31320,  31348,\n   31375,  31401,  31427,  31453,\n   31478,  31502,  31526,  31550,\n   31573,  31596,  31618,  31640,\n   31661,  31682,  31703,  31723,\n   31743,  31763,  31782,  31801,\n   31819,  31838,  31855,  31873,\n   31890,  31907,  31923,  31939,\n   31955,  31971,  31986,  32001,\n   32016,  32030,  32044,  32058,\n   32072,  32085,  32098,  32111,\n   32124,  32136,  32148,  32160,\n   32172,  32183,  32195,  32206,\n   32216,  32227,  32237,  32248,\n   32258,  32268,  32277,  32287,\n   32296,  32305,  32314,  32323,\n   32331,  32340,  32348,  32356,\n   32364,  32372,  32380,  32387,\n   32394,  32402,  32409,  32416,\n   32422,  32429,  32436,  32442,\n   32448,  32455,  32461,  32467,\n   32473,  32478,  32484,  32489,\n   32495,  32500,  32505,  32510,\n   32515,  32520,  32525,  32530,\n   32534,  32539,  32543,  32548,\n   32552,  32556,  32560,  32564,\n   32568,  32572,  32576,  32580,\n   32584,  32587,  32591,  32594,\n   32597,  32601,  32604,  32607,\n   32610,  32614,  32617,  32619,\n   32622,  32625,  32628,  32631,\n   32633,  32636,  32639,  32641,\n   32644,  32646,  32649,  32651,\n   32653,  32655,  32658,  32660,\n   32662,  32664,  32666,  32668,\n   32670,  32672,  32674,  32676,\n   32678,  32679,  32681,  32683,\n   32684,  32686,  32688,  32689,\n   32691,  32692,  32694,  32695,\n   32697,  32698,  32700,  32701,\n   32702,  32704,  32705,  32706,\n   32707,  32709,  32710,  32711,\n   32712,  32713,  32714,  32715,\n   32716,  32717,  32718,  32719,\n   32720,  32721,  32722,  32723,\n   32724,  32725,  32726,  32727,\n   32728,  32728,  32729,  32730,\n   32731,  32732,  32732,  32733,\n   32734,  32734,  32735,  32736,\n   32736,  32737,  32738,  32738,\n   32739,  32740,  32740,  32741,\n   32741,  32742,  32742,  32743,\n   32743,  32744,  32744,  32745,\n   32745,  32746,  32746,  32747,\n   32747,  32748,  32748,  32749,\n   32749,  32749,  32750,  32750,\n   32751,  32751,  32751,  32752,\n   32752,  32752,  32753,  32753,\n   32753,  32754,  32754,  32754,\n   32755,  32755,  32755,  32756,\n   32756,  32756,  32756,  32757,\n   32757,  32757,  32757,  32758,\n   32758,  32758,  32758,  32759,\n   32759,  32759,  32759,  32759,\n   32760,  32760,  32760,  32760,\n   32760,  32761,  32761,  32761,\n   32761,  32761,  32761,  32762,\n   32762,  32762,  32762,  32762,\n   32762,  32763,  32763,  32763,\n   32763,  32763,  32763,  32763,\n   32763,  32764,  32764,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32767,  32767,  32767,\n   32767,  32767,  32767,  32767,\n   32767,\n};\n\n\nconst int16_t* waveform_table[] = {\n  wav_sine,\n  wav_fold_power,\n  wav_fold_sine,\n  wav_overdrive,\n};\n\n\n}  // namespace peaks\n"
  },
  {
    "path": "lib/peaks/resources.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef PEAKS_RESOURCES_H_\n#define PEAKS_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace peaks {\n\ntypedef uint8_t ResourceId;\n\nextern const char* string_table[];\n\nextern const uint16_t* lookup_table_table[];\n\nextern const uint32_t* lookup_table_32_table[];\n\nextern const uint8_t* waveform_8_table[];\n\nextern const int16_t* waveform_table[];\n\nextern const uint16_t lut_delay_times[];\nextern const uint16_t lut_gravity[];\nextern const uint16_t lut_env_linear[];\nextern const uint16_t lut_env_expo[];\nextern const uint16_t lut_env_quartic[];\nextern const uint16_t lut_raised_cosine[];\nextern const uint16_t lut_svf_cutoff[];\nextern const uint16_t lut_svf_damp[];\nextern const uint16_t lut_svf_scale[];\nextern const uint32_t lut_lfo_increments[];\nextern const uint32_t lut_env_increments[];\nextern const uint32_t lut_oscillator_increments[];\nextern const uint8_t wav_digits[];\nextern const int16_t wav_sine[];\nextern const int16_t wav_fold_power[];\nextern const int16_t wav_fold_sine[];\nextern const int16_t wav_overdrive[];\n#define STR_DUMMY 0  // dummy\n#define LUT_DELAY_TIMES 0\n#define LUT_DELAY_TIMES_SIZE 257\n#define LUT_GRAVITY 1\n#define LUT_GRAVITY_SIZE 257\n#define LUT_ENV_LINEAR 2\n#define LUT_ENV_LINEAR_SIZE 257\nconst int  LUT_ENV_EXPO = 3;\n#define LUT_ENV_EXPO_SIZE 257\n#define LUT_ENV_QUARTIC 4\n#define LUT_ENV_QUARTIC_SIZE 257\n#define LUT_RAISED_COSINE 5\n#define LUT_RAISED_COSINE_SIZE 257\nconst int LUT_SVF_CUTOFF = 6;\n#define LUT_SVF_CUTOFF_SIZE 257\nconst int LUT_SVF_DAMP = 7;\n#define LUT_SVF_DAMP_SIZE 257\nconst int LUT_SVF_SCALE = 8;\n#define LUT_SVF_SCALE_SIZE 257\n#define LUT_LFO_INCREMENTS 0\n#define LUT_LFO_INCREMENTS_SIZE 257\n#define LUT_ENV_INCREMENTS 1\n#define LUT_ENV_INCREMENTS_SIZE 257\nconst int  LUT_OSCILLATOR_INCREMENTS = 2;\n#define LUT_OSCILLATOR_INCREMENTS_SIZE 97\n#define WAV_DIGITS 0\n#define WAV_DIGITS_SIZE 36824\nconst int WAV_SINE = 0;\nconst int WAV_SINE_SIZE = 1025;\n#define WAV_FOLD_POWER 1\n#define WAV_FOLD_POWER_SIZE 1025\n#define WAV_FOLD_SINE 2\n#define WAV_FOLD_SINE_SIZE 1025\n#define WAV_OVERDRIVE 3\n#define WAV_OVERDRIVE_SIZE 1025\n\n}  // namespace peaks\n\n#endif  // PEAKS_RESOURCES_H_\n"
  },
  {
    "path": "lib/plaits/dsp/chords/chord_bank.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chords: wavetable and divide-down organ/string machine.\n\n#include \"plaits/dsp/chords/chord_bank.h\"\n\n#include \"stmlib/dsp/units.h\"\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nnamespace plaits {\n\nusing namespace stmlib;\n\n#ifdef JON_CHORDS\n\n//[eh2k]\nconst char* const chord_names[kChordNumChords] = {\n    \"OCT\",\n    \"Fifth\",\n    \"min\",\n    \"min7\",\n    \"min9\",\n    \"min11\",\n    \"Maj\",\n    \"Maj7\",\n    \"Maj9\",\n    \"Sus4\",\n    \"69\",\n    \"6th\",\n    \"10th\",\n    \"D7\",\n    \"D7(b9)\",\n    \"HD\",\n    \"FD\",\n};\n\n// Alternative chord table by Jon Butler jonbutler88@gmail.com\n/* static */\nconst float ChordBank::chords_[kChordNumChords][kChordNumNotes] = {\n  // Fixed Intervals\n  { 0.00f, 0.01f, 11.99f, 12.00f },  // Octave\n  { 0.00f, 7.00f,  7.01f, 12.00f },  // Fifth\n  // Minor\n  { 0.00f, 3.00f,  7.00f, 12.00f },  // Minor\n  { 0.00f, 3.00f,  7.00f, 10.00f },  // Minor 7th\n  { 0.00f, 3.00f, 10.00f, 14.00f },  // Minor 9th\n  { 0.00f, 3.00f, 10.00f, 17.00f },  // Minor 11th\n  // Major\n  { 0.00f, 4.00f,  7.00f, 12.00f },  // Major\n  { 0.00f, 4.00f,  7.00f, 11.00f },  // Major 7th\n  { 0.00f, 4.00f, 11.00f, 14.00f },  // Major 9th\n  // Colour Chords\n  { 0.00f, 5.00f,  7.00f, 12.00f },  // Sus4\n  { 0.00f, 2.00f,  9.00f, 16.00f },  // 69\n  { 0.00f, 4.00f,  7.00f,  9.00f },  // 6th\n  { 0.00f, 7.00f, 16.00f, 23.00f },  // 10th (Spread maj7)\n  { 0.00f, 4.00f,  7.00f, 10.00f },  // Dominant 7th\n  { 0.00f, 7.00f, 10.00f, 13.00f },  // Dominant 7th (b9)\n  { 0.00f, 3.00f,  6.00f, 10.00f },  // Half Diminished\n  { 0.00f, 3.00f,  6.00f,  9.00f },  // Fully Diminished\n};\n\n#else\n\n/* static */\nconst float ChordBank::chords_[kChordNumChords][kChordNumNotes] = {\n  { 0.00f, 0.01f, 11.99f, 12.00f },  // OCT\n  { 0.00f, 7.00f,  7.01f, 12.00f },  // 5\n  { 0.00f, 5.00f,  7.00f, 12.00f },  // sus4\n  { 0.00f, 3.00f,  7.00f, 12.00f },  // m\n  { 0.00f, 3.00f,  7.00f, 10.00f },  // m7\n  { 0.00f, 3.00f, 10.00f, 14.00f },  // m9\n  { 0.00f, 3.00f, 10.00f, 17.00f },  // m11\n  { 0.00f, 2.00f,  9.00f, 16.00f },  // 69\n  { 0.00f, 4.00f, 11.00f, 14.00f },  // M9\n  { 0.00f, 4.00f,  7.00f, 11.00f },  // M7\n  { 0.00f, 4.00f,  7.00f, 12.00f },  // M\n};\n\n#endif  // JON_CHORDS\n\nvoid ChordBank::Init(BufferAllocator* allocator) {\n  ratios_ = allocator->Allocate<float>(kChordNumChords * kChordNumNotes);\n  note_count_ = allocator->Allocate<int>(kChordNumChords);\n  sorted_ratios_ = allocator->Allocate<float>(kChordNumNotes);\n\n  chord_index_quantizer_.Init(kChordNumChords, 0.075f, false);\n}\n\nvoid ChordBank::Reset() {\n  for (int i = 0; i < kChordNumChords; ++i) {\n    int count = 0;\n    for (int j = 0; j < kChordNumNotes; ++j) {\n      ratios_[i * kChordNumNotes + j] = SemitonesToRatio(chords_[i][j]);\n      if (chords_[i][j] !=  0.01f && chords_[i][j] !=  7.01f && \\\n          chords_[i][j] != 11.99f && chords_[i][j] != 12.00f) {\n        ++count;\n      }\n    }\n    note_count_[i] = count;\n  }\n  Sort();\n}\n\nint ChordBank::ComputeChordInversion(\n    float inversion,\n    float* ratios,\n    float* amplitudes) {\n  const float* base_ratio = this->ratios();\n  inversion = inversion * float(kChordNumNotes * kChordNumVoices);\n\n  MAKE_INTEGRAL_FRACTIONAL(inversion);\n  \n  int num_rotations = inversion_integral / kChordNumNotes;\n  int rotated_note = inversion_integral % kChordNumNotes;\n  \n  const float kBaseGain = 0.25f;\n  \n  int mask = 0;\n  \n  for (int i = 0; i < kChordNumNotes; ++i) {\n    float transposition = 0.25f * static_cast<float>(\n        1 << ((kChordNumNotes - 1 + inversion_integral - i) / kChordNumNotes));\n    int target_voice = (i - num_rotations + kChordNumVoices) % kChordNumVoices;\n    int previous_voice = (target_voice - 1 + kChordNumVoices) % kChordNumVoices;\n    \n    if (i == rotated_note) {\n      ratios[target_voice] = base_ratio[i] * transposition;\n      ratios[previous_voice] = ratios[target_voice] * 2.0f;\n      amplitudes[previous_voice] = kBaseGain * inversion_fractional;\n      amplitudes[target_voice] = kBaseGain * (1.0f - inversion_fractional);\n    } else if (i < rotated_note) {\n      ratios[previous_voice] = base_ratio[i] * transposition;\n      amplitudes[previous_voice] = kBaseGain;\n    } else {\n      ratios[target_voice] = base_ratio[i] * transposition;\n      amplitudes[target_voice] = kBaseGain;\n    }\n    \n    if (i == 0) {\n      if (i >= rotated_note) {\n        mask |= 1 << target_voice;\n      }\n      if (i <= rotated_note) {\n        mask |= 1 << previous_voice;\n      }\n    }\n  }\n  return mask;\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/chords/chord_bank.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chord bank shared by several engines.\n\n#ifndef PLAITS_DSP_CHORDS_CHORD_BANK_H_\n#define PLAITS_DSP_CHORDS_CHORD_BANK_H_\n\n#include \"stmlib/dsp/hysteresis_quantizer.h\"\n\n#include \"stmlib/utils/buffer_allocator.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nconst int kChordNumNotes = 4;\nconst int kChordNumVoices = kChordNumNotes + 1;\n\n#define JON_CHORDS\n\n#ifdef JON_CHORDS\nconst int kChordNumChords = 17;\n#else\nconst int kChordNumChords = 11;\n#endif  // JON_CHORDS\n\nextern const char* const chord_names[kChordNumChords];\n\nclass ChordBank {\n public:\n  ChordBank() { }\n  ~ChordBank() { }\n  \n  void Init(stmlib::BufferAllocator* allocator);\n  void Reset();\n  \n  int ComputeChordInversion(\n      float inversion, float* ratios, float* amplitudes);\n  \n  inline void Sort() {\n    for (int i = 0; i < kChordNumNotes; ++i) {\n      float r = ratio(i);\n      while (r > 2.0f) {\n        r *= 0.5f;\n      }\n      sorted_ratios_[i] = r;\n    }\n    std::sort(&sorted_ratios_[0], &sorted_ratios_[kChordNumNotes]);\n  }\n  \n  inline void set_chord(float parameter) {\n    chord_index_quantizer_.Process(parameter * 1.02f);\n  }\n  \n  inline int chord_index() const {\n    return chord_index_quantizer_.quantized_value();\n  }\n  \n  inline const float* ratios() const {\n    return &ratios_[chord_index() * kChordNumNotes];\n  }\n\n  inline float ratio(int note) const {\n    return ratios_[chord_index() * kChordNumNotes + note];\n  }\n\n  inline float sorted_ratio(int note) const {\n    return sorted_ratios_[note];\n  }\n  \n  inline int num_notes() const {\n    return note_count_[chord_index()];\n  }\n\n private:\n  stmlib::HysteresisQuantizer2 chord_index_quantizer_;\n  \n  float* ratios_;\n  float* sorted_ratios_;\n  int* note_count_;\n  \n  static const float chords_[kChordNumChords][kChordNumNotes];\n  \n  DISALLOW_COPY_AND_ASSIGN(ChordBank);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_CHORDS_CHORD_BANK_H_"
  },
  {
    "path": "lib/plaits/dsp/downsampler/4x_downsampler.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FIR Downsampler.\n\n#ifndef PLAITS_DSP_DOWNSAMPLER_4X_DOWNSAMPLER_H_\n#define PLAITS_DSP_DOWNSAMPLER_4X_DOWNSAMPLER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n  \nconst size_t kOversampling = 4;\n\nclass Downsampler {\n public:\n  Downsampler(float* state) {\n    head_ = *state;\n    tail_ = 0.0f;\n    state_ = state;\n  }\n  ~Downsampler() {\n    *state_ = head_;\n  }\n  inline void Accumulate(int i, float sample) {\n    head_ += sample * lut_4x_downsampler_fir[3 - (i & 3)];\n    tail_ += sample * lut_4x_downsampler_fir[i & 3];\n  }\n\n  inline float Read() {\n    float value = head_;\n    head_ = tail_;\n    tail_ = 0.0f;\n    return value;\n  }\n private:\n  float head_;\n  float tail_;\n  float* state_;\n\n  DISALLOW_COPY_AND_ASSIGN(Downsampler);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DOWNSAMPLER_4X_DOWNSAMPLER_H_"
  },
  {
    "path": "lib/plaits/dsp/drums/analog_bass_drum.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 bass drum model, revisited.\n\n#ifndef PLAITS_DSP_DRUMS_ANALOG_BASS_DRUM_H_\n#define PLAITS_DSP_DRUMS_ANALOG_BASS_DRUM_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nclass AnalogBassDrum {\n public:\n  AnalogBassDrum() { }\n  ~AnalogBassDrum() { }\n\n  void Init() {\n    pulse_remaining_samples_ = 0;\n    fm_pulse_remaining_samples_ = 0;\n    pulse_ = 0.0f;\n    pulse_height_ = 0.0f;\n    pulse_lp_ = 0.0f;\n    fm_pulse_lp_ = 0.0f;\n    retrig_pulse_ = 0.0f;\n    lp_out_ = 0.0f;\n    tone_lp_ = 0.0f;\n    sustain_gain_ = 0.0f;\n\n    resonator_.Init();\n    oscillator_.Init();\n  }\n  \n  inline float Diode(float x) {\n    if (x >= 0.0f) {\n      return x;\n    } else {\n      x *= 2.0f;\n      return 0.7f * x / (1.0f + fabsf(x));\n    }\n  }\n  \n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float tone,\n      float decay,\n      float attack_fm_amount,\n      float self_fm_amount,\n      float* out,\n      size_t size) {\n    const int kTriggerPulseDuration = 1.0e-3f * kSampleRate;\n    const int kFMPulseDuration = 6.0e-3f * kSampleRate;\n    const float kPulseDecayTime = 0.2e-3f * kSampleRate;\n    const float kPulseFilterTime = 0.1e-3f * kSampleRate;\n    const float kRetrigPulseDuration = 0.05f * kSampleRate;\n    \n    const float scale = 0.001f / f0;\n    const float q = 1500.0f * stmlib::SemitonesToRatio(decay * 80.0f);\n    const float tone_f = std::min(\n        4.0f * f0 * stmlib::SemitonesToRatio(tone * 108.0f),\n        1.0f);\n    const float exciter_leak = 0.08f * (tone + 0.25f);\n      \n\n    if (trigger) {\n      pulse_remaining_samples_ = kTriggerPulseDuration;\n      fm_pulse_remaining_samples_ = kFMPulseDuration;\n      pulse_height_ = 3.0f + 7.0f * accent;\n      lp_out_ = 0.0f;\n    }\n    \n    stmlib::ParameterInterpolator sustain_gain(\n        &sustain_gain_,\n        accent * decay,\n        size);\n    \n    while (size--) {\n      // Q39 / Q40\n      float pulse = 0.0f;\n      if (pulse_remaining_samples_) {\n        --pulse_remaining_samples_;\n        pulse = pulse_remaining_samples_ ? pulse_height_ : pulse_height_ - 1.0f;\n        pulse_ = pulse;\n      } else {\n        pulse_ *= 1.0f - 1.0f / kPulseDecayTime;\n        pulse = pulse_;\n      }\n      if (sustain) {\n        pulse = 0.0f;\n      }\n      \n      // C40 / R163 / R162 / D83\n      ONE_POLE(pulse_lp_, pulse, 1.0f / kPulseFilterTime);\n      pulse = Diode((pulse - pulse_lp_) + pulse * 0.044f);\n\n      // Q41 / Q42\n      float fm_pulse = 0.0f;\n      if (fm_pulse_remaining_samples_) {\n        --fm_pulse_remaining_samples_;\n        fm_pulse = 1.0f;\n        // C39 / C52\n        retrig_pulse_ = fm_pulse_remaining_samples_ ? 0.0f : -0.8f;\n      } else {\n        // C39 / R161\n        retrig_pulse_ *= 1.0f - 1.0f / kRetrigPulseDuration;\n      }\n      if (sustain) {\n        fm_pulse = 0.0f;\n      }\n      ONE_POLE(fm_pulse_lp_, fm_pulse, 1.0f / kPulseFilterTime);\n\n      // Q43 and R170 leakage\n      float punch = 0.7f + Diode(10.0f * lp_out_ - 1.0f);\n\n      // Q43 / R165\n      float attack_fm = fm_pulse_lp_ * 1.7f * attack_fm_amount;\n      float self_fm = punch * 0.08f * self_fm_amount;\n      float f = f0 * (1.0f + attack_fm + self_fm);\n      CONSTRAIN(f, 0.0f, 0.4f);\n\n      float resonator_out;\n      if (sustain) {\n        oscillator_.Next(f, sustain_gain.Next(), &resonator_out, &lp_out_);\n      } else {\n        resonator_.set_f_q<stmlib::FREQUENCY_DIRTY>(f, 1.0f + q * f);\n        resonator_.Process<stmlib::FILTER_MODE_BAND_PASS,\n                           stmlib::FILTER_MODE_LOW_PASS>(\n            (pulse - retrig_pulse_ * 0.2f) * scale,\n            &resonator_out,\n            &lp_out_);\n      }\n      \n      ONE_POLE(tone_lp_, pulse * exciter_leak + resonator_out, tone_f);\n      \n      *out++ = tone_lp_;\n    }\n  }\n\n private:\n  int pulse_remaining_samples_;\n  int fm_pulse_remaining_samples_;\n  float pulse_;\n  float pulse_height_;\n  float pulse_lp_;\n  float fm_pulse_lp_;\n  float retrig_pulse_;\n  float lp_out_;\n  float tone_lp_;\n  float sustain_gain_;\n  \n  stmlib::Svf resonator_;\n  \n  // Replace the resonator in \"free running\" (sustain) mode.\n  SineOscillator oscillator_;\n  \n  DISALLOW_COPY_AND_ASSIGN(AnalogBassDrum);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DRUMS_ANALOG_BASS_DRUM_H_\n"
  },
  {
    "path": "lib/plaits/dsp/drums/analog_snare_drum.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 snare drum model, revisited.\n\n#ifndef PLAITS_DSP_DRUMS_ANALOG_SNARE_DRUM_H_\n#define PLAITS_DSP_DRUMS_ANALOG_SNARE_DRUM_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nclass AnalogSnareDrum {\n public:\n  AnalogSnareDrum() { }\n  ~AnalogSnareDrum() { }\n\n  static const int kNumModes = 5;\n\n  void Init() {\n    pulse_remaining_samples_ = 0;\n    pulse_ = 0.0f;\n    pulse_height_ = 0.0f;\n    pulse_lp_ = 0.0f;\n    noise_envelope_ = 0.0f;\n    sustain_gain_ = 0.0f;\n\n    for (int i = 0; i < kNumModes; ++i) {\n      resonator_[i].Init();\n      oscillator_[i].Init();\n    }\n    noise_filter_.Init();\n  }\n  \n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float tone,\n      float decay,\n      float snappy,\n      float* out,\n      size_t size) {\n    const float decay_xt = decay * (1.0f + decay * (decay - 1.0f));\n    const int kTriggerPulseDuration = 1.0e-3f * kSampleRate;\n    const float kPulseDecayTime = 0.1e-3f * kSampleRate;\n    const float q = 2000.0f * stmlib::SemitonesToRatio(decay_xt * 84.0f);\n    const float noise_envelope_decay = 1.0f - 0.0017f * \\\n        stmlib::SemitonesToRatio(-decay * (50.0f + snappy * 10.0f));\n    const float exciter_leak = snappy * (2.0f - snappy) * 0.1f;\n    \n    snappy = snappy * 1.1f - 0.05f;\n    CONSTRAIN(snappy, 0.0f, 1.0f);\n    \n    if (trigger) {\n      pulse_remaining_samples_ = kTriggerPulseDuration;\n      pulse_height_ = 3.0f + 7.0f * accent;\n      noise_envelope_ = 2.0f;\n    }\n    \n    static const float kModeFrequencies[kNumModes] = {\n        1.00f,\n        2.00f,\n        3.18f,\n        4.16f,\n        5.62f};\n    \n    float f[kNumModes];\n    float gain[kNumModes];\n    \n    for (int i = 0; i < kNumModes; ++i) {\n      f[i] = std::min(f0 * kModeFrequencies[i], 0.499f);\n      resonator_[i].set_f_q<stmlib::FREQUENCY_FAST>(\n          f[i],\n          1.0f + f[i] * (i == 0 ? q : q * 0.25f));\n    }\n    \n    if (tone < 0.666667f) {\n      // 808-style (2 modes)\n      tone *= 1.5f;\n      gain[0] = 1.5f + (1.0f - tone) * (1.0f - tone) * 4.5f;\n      gain[1] = 2.0f * tone + 0.15f;\n      std::fill(&gain[2], &gain[kNumModes], 0.0f);\n    } else {\n      // What the 808 could have been if there were extra modes!\n      tone = (tone - 0.666667f) * 3.0f;\n      gain[0] = 1.5f - tone * 0.5f;\n      gain[1] = 2.15f - tone * 0.7f;\n      for (int i = 2; i < kNumModes; ++i) {\n        gain[i] = tone;\n        tone *= tone;\n      }\n    }\n\n    float f_noise = f0 * 16.0f;\n    CONSTRAIN(f_noise, 0.0f, 0.499f);\n    noise_filter_.set_f_q<stmlib::FREQUENCY_FAST>(\n        f_noise, 1.0f + f_noise * 1.5f);\n        \n    \n    stmlib::ParameterInterpolator sustain_gain(\n        &sustain_gain_,\n        accent * decay,\n        size);\n    \n    while (size--) {\n      // Q45 / Q46\n      float pulse = 0.0f;\n      if (pulse_remaining_samples_) {\n        --pulse_remaining_samples_;\n        pulse = pulse_remaining_samples_ ? pulse_height_ : pulse_height_ - 1.0f;\n        pulse_ = pulse;\n      } else {\n        pulse_ *= 1.0f - 1.0f / kPulseDecayTime;\n        pulse = pulse_;\n      }\n      \n      float sustain_gain_value = sustain_gain.Next();\n      \n      // R189 / C57 / R190 + C58 / C59 / R197 / R196 / IC14\n      ONE_POLE(pulse_lp_, pulse, 0.75f);\n      \n      float shell = 0.0f;\n      for (int i = 0; i < kNumModes; ++i) {\n        float excitation = i == 0\n            ? (pulse - pulse_lp_) + 0.006f * pulse\n            : 0.026f * pulse;\n        shell += gain[i] * (sustain\n            ? oscillator_[i].Next(f[i]) * sustain_gain_value * 0.25f\n            : resonator_[i].Process<stmlib::FILTER_MODE_BAND_PASS>(\n                  excitation) + excitation * exciter_leak);\n      }\n      shell = stmlib::SoftClip(shell);\n      \n      // C56 / R194 / Q48 / C54 / R188 / D54\n      float noise = 2.0f * stmlib::Random::GetFloat() - 1.0f;\n      if (noise < 0.0f) noise = 0.0f;\n      noise_envelope_ *= noise_envelope_decay;\n      noise *= (sustain ? sustain_gain_value : noise_envelope_) * snappy * 2.0f;\n\n      // C66 / R201 / C67 / R202 / R203 / Q49\n      noise = noise_filter_.Process<stmlib::FILTER_MODE_BAND_PASS>(noise);\n      \n      // IC13\n      *out++ = noise + shell * (1.0f - snappy);\n    }\n  }\n\n private:\n  int pulse_remaining_samples_;\n  float pulse_;\n  float pulse_height_;\n  float pulse_lp_;\n  float noise_envelope_;\n  float sustain_gain_;\n  \n  stmlib::Svf resonator_[kNumModes];\n  stmlib::Svf noise_filter_;\n\n  // Replace the resonators in \"free running\" (sustain) mode.\n  SineOscillator oscillator_[kNumModes];\n  \n  DISALLOW_COPY_AND_ASSIGN(AnalogSnareDrum);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DRUMS_ANALOG_SNARE_DRUM_H_\n"
  },
  {
    "path": "lib/plaits/dsp/drums/hi_hat.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 HH, with a few extra parameters to push things to the CY territory...\n// The template parameter MetallicNoiseSource allows another kind of \"metallic\n// noise\" to be used, for results which are more similar to KR-55 or FM hi-hats.\n\n#ifndef PLAITS_DSP_DRUMS_HI_HAT_H_\n#define PLAITS_DSP_DRUMS_HI_HAT_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n\n// 808 style \"metallic noise\" with 6 square oscillators.\nclass SquareNoise {\n public:\n  SquareNoise() { }\n  ~SquareNoise() { }\n\n  void Init() {\n    std::fill(&phase_[0], &phase_[6], 0);\n  }\n    \n  void Render(float f0, float* temp_1, float* temp_2, float* out, size_t size) {\n    const float ratios[6] = {\n        // Nominal f0: 414 Hz\n        1.0f, 1.304f, 1.466f, 1.787f, 1.932f, 2.536f\n    };\n  \n    uint32_t increment[6];\n    uint32_t phase[6];\n    for (int i = 0; i < 6; ++i) {\n      float f = f0 * ratios[i];\n      if (f >= 0.499f) f = 0.499f;\n      increment[i] = static_cast<uint32_t>(f * 4294967296.0f);\n      phase[i] = phase_[i];\n    }\n\n    while (size--) {\n      phase[0] += increment[0];\n      phase[1] += increment[1];\n      phase[2] += increment[2];\n      phase[3] += increment[3];\n      phase[4] += increment[4];\n      phase[5] += increment[5];\n      uint32_t noise = 0;\n      noise += (phase[0] >> 31);\n      noise += (phase[1] >> 31);\n      noise += (phase[2] >> 31);\n      noise += (phase[3] >> 31);\n      noise += (phase[4] >> 31);\n      noise += (phase[5] >> 31);\n      *out++ = 0.33f * static_cast<float>(noise) - 1.0f;\n    }\n  \n    for (int i = 0; i < 6; ++i) {\n      phase_[i] = phase[i];\n    }\n  }\n\n private:\n  uint32_t phase_[6];\n\n  DISALLOW_COPY_AND_ASSIGN(SquareNoise);\n};\n\nclass RingModNoise {\n public:\n  RingModNoise() { }\n  ~RingModNoise() { }\n\n  void Init() {\n    for (int i = 0; i < 6; ++i) {\n      oscillator_[i].Init();\n    }\n  }\n  \n  void Render(float f0, float* temp_1, float* temp_2, float* out, size_t size) {\n    const float ratio = f0 / (0.01f + f0);\n    const float f1a = 200.0f / kSampleRate * ratio;\n    const float f1b = 7530.0f / kSampleRate * ratio;\n    const float f2a = 510.0f / kSampleRate * ratio;\n    const float f2b = 8075.0f / kSampleRate * ratio;\n    const float f3a = 730.0f / kSampleRate * ratio;\n    const float f3b = 10500.0f / kSampleRate * ratio;\n    const float f[3][2] = { { f1a, f1b }, { f2a, f2b }, { f3a, f3b } };\n    \n    std::fill(&out[0], &out[size], 0.0f);\n    \n    for (int i = 0; i < 3; ++i) {\n      RenderPair(&oscillator_[2 * i], f[i], temp_1, temp_2, out, size);\n    }\n  }\n\n private:\n  void RenderPair(\n      Oscillator* osc,\n      const float* f,\n      float* temp_1,\n      float* temp_2,\n      float* out,\n      size_t size) {\n    osc[0].Render<OSCILLATOR_SHAPE_SQUARE>(f[0], 0.5f, temp_1, size);\n    osc[1].Render<OSCILLATOR_SHAPE_SAW>(f[1], 0.5f, temp_2, size);\n    while (size--) {\n      *out++ += *temp_1++ * *temp_2++;\n    }\n  }\n  Oscillator oscillator_[6];\n  \n  DISALLOW_COPY_AND_ASSIGN(RingModNoise);\n};\n\nclass SwingVCA {\n public:\n  float operator()(float s, float gain) {\n   s *= s > 0.0f ? 4.0f : 0.1f;\n   s = s / (1.0f + fabsf(s));\n   return (s + 0.1f) * gain;\n  }\n};\n\nclass LinearVCA {\n public:\n  float operator()(float s, float gain) {\n   return s * gain;\n  }\n};\n\ntemplate<\n    typename MetallicNoiseSource,\n    typename VCA,\n    bool resonance,\n    bool two_stage_envelope>\nclass HiHat {\n public:\n  HiHat() { }\n  ~HiHat() { }\n\n  void Init() {\n    envelope_ = 0.0f;\n    noise_clock_ = 0.0f;\n    noise_sample_ = 0.0f;\n    sustain_gain_ = 0.0f;\n\n    metallic_noise_.Init();\n    noise_coloration_svf_.Init();\n    hpf_.Init();\n  }\n  \n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float tone,\n      float decay,\n      float noisiness,\n      float* temp_1,\n      float* temp_2,\n      float* out,\n      size_t size) {\n    const float envelope_decay = 1.0f - 0.003f * stmlib::SemitonesToRatio(\n        -decay * 84.0f);\n    const float cut_decay = 1.0f - 0.0025f * stmlib::SemitonesToRatio(\n        -decay * 36.0f);\n    \n    if (trigger) {\n      envelope_ = (1.5f + 0.5f * (1.0f - decay)) * (0.3f + 0.7f * accent);\n    }\n\n    // Render the metallic noise.\n    metallic_noise_.Render(2.0f * f0, temp_1, temp_2, out, size);\n\n    // Apply BPF on the metallic noise.\n    float cutoff = 150.0f / kSampleRate * stmlib::SemitonesToRatio(\n        tone * 72.0f);\n    CONSTRAIN(cutoff, 0.0f, 16000.0f / kSampleRate);\n    noise_coloration_svf_.set_f_q<stmlib::FREQUENCY_ACCURATE>(\n        cutoff, resonance ? 3.0f + 3.0f * tone : 1.0f);\n    noise_coloration_svf_.Process<stmlib::FILTER_MODE_BAND_PASS>(\n        out, out, size);\n    \n    // This is not at all part of the 808 circuit! But to add more variety, we\n    // add a variable amount of clocked noise to the output of the 6 schmitt\n    // trigger oscillators.\n    noisiness *= noisiness;\n    float noise_f = f0 * (16.0f + 16.0f * (1.0f - noisiness));\n    CONSTRAIN(noise_f, 0.0f, 0.5f);\n    \n    for (size_t i = 0; i < size; ++i) {\n      noise_clock_ += noise_f;\n      if (noise_clock_ >= 1.0f) {\n        noise_clock_ -= 1.0f;\n        noise_sample_ = stmlib::Random::GetFloat() - 0.5f;\n      }\n      out[i] += noisiness * (noise_sample_ - out[i]);\n    }\n\n    // Apply VCA.\n    stmlib::ParameterInterpolator sustain_gain(\n        &sustain_gain_,\n        accent * decay,\n        size);\n    for (size_t i = 0; i < size; ++i) {\n      VCA vca;\n      envelope_ *= envelope_ > 0.5f || !two_stage_envelope\n          ? envelope_decay\n          : cut_decay;\n      out[i] = vca(out[i], sustain ? sustain_gain.Next() : envelope_);\n    }\n    \n    hpf_.set_f_q<stmlib::FREQUENCY_ACCURATE>(cutoff, 0.5f);\n    hpf_.Process<stmlib::FILTER_MODE_HIGH_PASS>(out, out, size);\n  }\n\n private:\n  float envelope_;\n  float noise_clock_;\n  float noise_sample_;\n  float sustain_gain_;\n\n  MetallicNoiseSource metallic_noise_;\n  stmlib::Svf noise_coloration_svf_;\n  stmlib::Svf hpf_;\n  \n  DISALLOW_COPY_AND_ASSIGN(HiHat);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DRUMS_HI_HAT_H_\n"
  },
  {
    "path": "lib/plaits/dsp/drums/synthetic_bass_drum.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Naive bass drum model (modulated oscillator with FM + envelope).\n// Inadvertently 909-ish.\n\n#ifndef PLAITS_DSP_DRUMS_SYNTHETIC_BASS_DRUM_H_\n#define PLAITS_DSP_DRUMS_SYNTHETIC_BASS_DRUM_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nclass SyntheticBassDrumClick {\n public:\n  SyntheticBassDrumClick() { }\n  ~SyntheticBassDrumClick() { }\n  \n  void Init() {\n    lp_ = 0.0f;\n    hp_ = 0.0f;\n    filter_.Init();\n    filter_.set_f_q<stmlib::FREQUENCY_FAST>(5000.0f / kSampleRate, 2.0f);\n  }\n  \n  float Process(float in) {\n    SLOPE(lp_, in, 0.5f, 0.1f);\n    ONE_POLE(hp_, lp_, 0.04f);\n    return filter_.Process<stmlib::FILTER_MODE_LOW_PASS>(lp_ - hp_);\n  }\n  \n private:\n  float lp_;\n  float hp_;\n  stmlib::Svf filter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SyntheticBassDrumClick);\n};\n\nclass SyntheticBassDrumAttackNoise {\n public:\n  SyntheticBassDrumAttackNoise() { }\n  ~SyntheticBassDrumAttackNoise() { }\n  \n  void Init() {\n    lp_ = 0.0f;\n    hp_ = 0.0f;\n  }\n  \n  float Render() {\n    float sample = stmlib::Random::GetFloat();\n    ONE_POLE(lp_, sample, 0.05f);\n    ONE_POLE(hp_, lp_, 0.005f);\n    return lp_ - hp_;\n  }\n  \n private:\n  float lp_;\n  float hp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SyntheticBassDrumAttackNoise);\n};\n\nclass SyntheticBassDrum {\n public:\n  SyntheticBassDrum() { }\n  ~SyntheticBassDrum() { }\n\n  void Init() {\n    phase_ = 0.0f;\n    phase_noise_ = 0.0f;\n    f0_ = 0.0f;\n    fm_ = 0.0f;\n    fm_lp_ = 0.0f;\n    body_env_lp_ = 0.0f;\n    body_env_ = 0.0f;\n    body_env_pulse_width_ = 0;\n    fm_pulse_width_ = 0;\n    tone_lp_ = 0.0f;\n    sustain_gain_ = 0.0f;\n    \n    click_.Init();\n    noise_.Init();\n  }\n  \n  inline float DistortedSine(float phase, float phase_noise, float dirtiness) {\n    phase += phase_noise * dirtiness;\n    MAKE_INTEGRAL_FRACTIONAL(phase);\n    phase = phase_fractional;\n    float triangle = (phase < 0.5f ? phase : 1.0f - phase) * 4.0f - 1.0f;\n    float sine = 2.0f * triangle / (1.0f + fabsf(triangle));\n    float clean_sine = Sine(phase + 0.75f);\n    return sine + (1.0f - dirtiness) * (clean_sine - sine);\n  }\n  \n  inline float TransistorVCA(float s, float gain) {\n    s = (s - 0.6f) * gain;\n    return 3.0f * s / (2.0f + fabsf(s)) + gain * 0.3f;\n  }\n  \n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float tone,\n      float decay,\n      float dirtiness,\n      float fm_envelope_amount,\n      float fm_envelope_decay,\n      float* out,\n      size_t size) {\n    decay *= decay;\n    fm_envelope_decay *= fm_envelope_decay;\n    \n    stmlib::ParameterInterpolator f0_mod(&f0_, f0, size);\n    \n    dirtiness *= std::max(1.0f - 8.0f * f0, 0.0f);\n    \n    const float fm_decay = 1.0f - \\\n        1.0f / (0.008f * (1.0f + fm_envelope_decay * 4.0f) * kSampleRate);\n\n    const float body_env_decay = 1.0f - 1.0f / (0.02f * kSampleRate) * \\\n        stmlib::SemitonesToRatio(-decay * 60.0f);\n    const float transient_env_decay = 1.0f - 1.0f / (0.005f * kSampleRate);\n    const float tone_f = std::min(\n        4.0f * f0 * stmlib::SemitonesToRatio(tone * 108.0f),\n        1.0f);\n    const float transient_level = tone;\n    \n    if (trigger) {\n      fm_ = 1.0f;\n      body_env_ = transient_env_ = 0.3f + 0.7f * accent;\n      body_env_pulse_width_ = kSampleRate * 0.001f;\n      fm_pulse_width_ = kSampleRate * 0.0013f;\n    }\n    \n    stmlib::ParameterInterpolator sustain_gain(\n        &sustain_gain_,\n        accent * decay,\n        size);\n    \n    while (size--) {\n      ONE_POLE(phase_noise_, stmlib::Random::GetFloat() - 0.5f, 0.002f);\n      \n      float mix = 0.0f;\n\n      if (sustain) {\n        phase_ += f0_mod.Next();\n        if (phase_ >= 1.0f) {\n          phase_ -= 1.0f;\n        }\n        float body = DistortedSine(phase_, phase_noise_, dirtiness);\n        mix -= TransistorVCA(body, sustain_gain.Next());\n      } else {\n        if (fm_pulse_width_) {\n          --fm_pulse_width_;\n          phase_ = 0.25f;\n        } else {\n          fm_ *= fm_decay;\n          float fm = 1.0f + fm_envelope_amount * 3.5f * fm_lp_;\n          phase_ += std::min(f0_mod.Next() * fm, 0.5f);\n          if (phase_ >= 1.0f) {\n            phase_ -= 1.0f;\n          }\n        }\n      \n        if (body_env_pulse_width_) {\n          --body_env_pulse_width_;\n        } else {\n          body_env_ *= body_env_decay;\n          transient_env_ *= transient_env_decay;\n        }\n      \n        const float envelope_lp_f = 0.1f;\n        ONE_POLE(body_env_lp_, body_env_, envelope_lp_f);\n        ONE_POLE(transient_env_lp_, transient_env_, envelope_lp_f);\n        ONE_POLE(fm_lp_, fm_, envelope_lp_f);\n      \n        float body = DistortedSine(phase_, phase_noise_, dirtiness);\n        float transient = click_.Process(\n            body_env_pulse_width_ ? 0.0f : 1.0f) + noise_.Render();\n      \n        mix -= TransistorVCA(body, body_env_lp_);\n        mix -= transient * transient_env_lp_ * transient_level;\n      }\n\n      ONE_POLE(tone_lp_, mix, tone_f);\n      *out++ = tone_lp_;\n    }\n  }\n\n private:\n  float f0_;\n  float phase_;\n  float phase_noise_;\n\n  float fm_;\n  float fm_lp_;\n  float body_env_;\n  float body_env_lp_;\n  float transient_env_;\n  float transient_env_lp_;\n  \n  float sustain_gain_;\n  \n  float tone_lp_;\n  \n  SyntheticBassDrumClick click_;\n  SyntheticBassDrumAttackNoise noise_;\n  \n  int body_env_pulse_width_;\n  int fm_pulse_width_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SyntheticBassDrum);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DRUMS_SYNTHETIC_BASS_DRUM_H_\n"
  },
  {
    "path": "lib/plaits/dsp/drums/synthetic_snare_drum.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Naive snare drum model (two modulated oscillators + filtered noise).\n// Uses a few magic numbers taken from the 909 schematics:\n// - Ratio between the two modes of the drum set to 1.47.\n// - Funky coupling between the two modes.\n// - Noise coloration filters and envelope shapes for the snare.\n\n#ifndef PLAITS_DSP_DRUMS_SYNTHETIC_SNARE_DRUM_H_\n#define PLAITS_DSP_DRUMS_SYNTHETIC_SNARE_DRUM_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include \"plaits/dsp/dsp.h\"\n\nnamespace plaits {\n\nclass SyntheticSnareDrum {\n public:\n  SyntheticSnareDrum() { }\n  ~SyntheticSnareDrum() { }\n\n  void Init() {\n    phase_[0] = 0.0f;\n    phase_[1] = 0.0f;\n    drum_amplitude_ = 0.0f;\n    snare_amplitude_ = 0.0f;\n    fm_ = 0.0f;\n    hold_counter_ = 0;\n    sustain_gain_ = 0.0f;\n\n    drum_lp_.Init();\n    snare_hp_.Init();\n    snare_lp_.Init();\n  }\n  \n  inline float DistortedSine(float phase) {\n    float triangle = (phase < 0.5f ? phase : 1.0f - phase) * 4.0f - 1.3f;\n    return 2.0f * triangle / (1.0f + fabsf(triangle));\n  }\n  \n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float fm_amount,\n      float decay,\n      float snappy,\n      float* out,\n      size_t size) {\n    const float decay_xt = decay * (1.0f + decay * (decay - 1.0f));\n    fm_amount *= fm_amount;\n    const float drum_decay = 1.0f - 1.0f / (0.015f * kSampleRate) * \\\n        stmlib::SemitonesToRatio(\n           -decay_xt * 72.0f - fm_amount * 12.0f + snappy * 7.0f);\n    const float snare_decay = 1.0f - 1.0f / (0.01f * kSampleRate) * \\\n        stmlib::SemitonesToRatio(-decay * 60.0f - snappy * 7.0f);\n    const float fm_decay = 1.0f - 1.0f / (0.007f * kSampleRate);\n    \n    snappy = snappy * 1.1f - 0.05f;\n    CONSTRAIN(snappy, 0.0f, 1.0f);\n    \n    const float drum_level = stmlib::Sqrt(1.0f - snappy);\n    const float snare_level = stmlib::Sqrt(snappy);\n    \n    const float snare_f_min = std::min(10.0f * f0, 0.5f);\n    const float snare_f_max = std::min(35.0f * f0, 0.5f);\n\n    snare_hp_.set_f<stmlib::FREQUENCY_FAST>(snare_f_min);\n    snare_lp_.set_f_q<stmlib::FREQUENCY_FAST>(snare_f_max,\n        0.5f + 2.0f * snappy);\n    drum_lp_.set_f<stmlib::FREQUENCY_FAST>(3.0f * f0);\n    \n    if (trigger) {\n      snare_amplitude_ = drum_amplitude_ = 0.3f + 0.7f * accent;\n      fm_ = 1.0f;\n      phase_[0] = phase_[1] = 0.0f;\n      hold_counter_ = static_cast<int>((0.04f + decay * 0.03f) * kSampleRate);\n    }\n    \n    stmlib::ParameterInterpolator sustain_gain(\n        &sustain_gain_,\n        accent * decay,\n        size);\n    while (size--) {\n      if (sustain) {\n        snare_amplitude_ = sustain_gain.Next();\n        drum_amplitude_ = snare_amplitude_;\n        fm_ = 0.0f;\n      } else {\n        // Compute all D envelopes.\n        // The envelope for the drum has a very long tail.\n        // The envelope for the snare has a \"hold\" stage which lasts between\n        // 40 and 70 ms\n        drum_amplitude_ *= (drum_amplitude_ > 0.03f || !(size & 1))\n            ? drum_decay\n            : 1.0f;\n        if (hold_counter_) {\n          --hold_counter_;\n        } else {\n          snare_amplitude_ *= snare_decay;\n        }\n        fm_ *= fm_decay;\n      }\n\n      // The 909 circuit has a funny kind of oscillator coupling - the signal\n      // leaving Q40's collector and resetting all oscillators allow some\n      // intermodulation.\n      float reset_noise = 0.0f;\n      float reset_noise_amount = (0.125f - f0) * 8.0f;\n      CONSTRAIN(reset_noise_amount, 0.0f, 1.0f);\n      reset_noise_amount *= reset_noise_amount;\n      reset_noise_amount *= fm_amount;\n      reset_noise += phase_[0] > 0.5f ? -1.0f : 1.0f;\n      reset_noise += phase_[1] > 0.5f ? -1.0f : 1.0f;\n      reset_noise *= reset_noise_amount * 0.025f;\n\n      float f = f0 * (1.0f + fm_amount * (4.0f * fm_));\n      phase_[0] += f;\n      phase_[1] += f * 1.47f;\n      if (reset_noise_amount > 0.1f) {\n        if (phase_[0] >= 1.0f + reset_noise) {\n          phase_[0] = 1.0f - phase_[0];\n        }\n        if (phase_[1] >= 1.0f + reset_noise) {\n          phase_[1] = 1.0f - phase_[1];\n        }\n      } else {\n        if (phase_[0] >= 1.0f) {\n          phase_[0] -= 1.0f;\n        }\n        if (phase_[1] >= 1.0f) {\n          phase_[1] -= 1.0f;\n        }\n      }\n      \n      float drum = -0.1f;\n      drum += DistortedSine(phase_[0]) * 0.60f;\n      drum += DistortedSine(phase_[1]) * 0.25f;\n      drum *= drum_amplitude_ * drum_level;\n      drum = drum_lp_.Process<stmlib::FILTER_MODE_LOW_PASS>(drum);\n      \n      float noise = stmlib::Random::GetFloat();\n      float snare = snare_lp_.Process<stmlib::FILTER_MODE_LOW_PASS>(noise);\n      snare = snare_hp_.Process<stmlib::FILTER_MODE_HIGH_PASS>(snare);\n      snare = (snare + 0.1f) * (snare_amplitude_ + fm_) * snare_level;\n      \n      *out++ = snare + drum;  // It's a snare, it's a drum, it's a snare drum.\n    }\n  }\n\n private:\n  float phase_[2];\n  float drum_amplitude_;\n  float snare_amplitude_;\n  float fm_;\n  float sustain_gain_;\n  int hold_counter_;\n  \n  stmlib::OnePole drum_lp_;\n  stmlib::OnePole snare_hp_;\n  stmlib::Svf snare_lp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SyntheticSnareDrum);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DRUMS_SYNTHETIC_SNARE_DRUM_H_\n"
  },
  {
    "path": "lib/plaits/dsp/dsp.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Utility DSP routines.\n\n#ifndef PLAITS_DSP_DSP_H_\n#define PLAITS_DSP_DSP_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace plaits {\n  \nstatic const float kSampleRate = 48000.0f;\n\n// There is no proper PLL for I2S, only a divider on the system clock to derive\n// the bit clock.\n// The division ratio is set to 47 (23 EVEN, 1 ODD) by the ST libraries.\n//\n// Bit clock = 72000000 / 47 = 1531.91 kHz\n// Frame clock = Bit clock / 32 = 47872.34 Hz\n//\n// That's only 4.6 cts of error, but we care!\n\nstatic const float kCorrectedSampleRate = kSampleRate; //[eh2k] 47872.34f;\nconst float a0 = (440.0f / 8.0f) / kCorrectedSampleRate;\n\nconst size_t kMaxBlockSize = 24;\nconst size_t kBlockSize = 12;\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DSP_H_\n"
  },
  {
    "path": "lib/plaits/dsp/engine/additive_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Additive synthesis with 32 partials.\n\n#include \"plaits/dsp/engine/additive_engine.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/cosine_oscillator.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid AdditiveEngine::Init(BufferAllocator* allocator) {\n  amplitudes_ = allocator->Allocate<float>(kNumHarmonics);\n  for (int i = 0; i < kNumHarmonicOscillators; ++i) {\n    harmonic_oscillator_[i].Init();\n  }\n}\n\nvoid AdditiveEngine::Reset() {\n  fill(\n      &amplitudes_[0],\n      &amplitudes_[kNumHarmonics],\n      0.0f);\n}\n\nvoid AdditiveEngine::UpdateAmplitudes(\n    float centroid,\n    float slope,\n    float bumps,\n    float* amplitudes,\n    const int* harmonic_indices,\n    size_t num_harmonics) {\n  const float n = (static_cast<float>(num_harmonics) - 1.0f);\n  const float margin = (1.0f / slope - 1.0f) / (1.0f + bumps);\n  const float center = centroid * (n + margin) - 0.5f * margin;\n\n  float sum = 0.001f;\n\n  for (size_t i = 0; i < num_harmonics; ++i) {\n    float order = fabsf(static_cast<float>(i) - center) * slope;\n    float gain = 1.0f - order;\n    gain += fabsf(gain);\n    gain *= gain;\n\n    float b = 0.25f + order * bumps;\n    float bump_factor = 1.0f + Sine(b);\n\n    gain *= bump_factor;\n    gain *= gain;\n    gain *= gain;\n    \n    int j = harmonic_indices[i];\n    \n    // Warning about the following line: this is not a proper LP filter because\n    // of the normalization. But in spite of its strange working, this line\n    // turns out to be absolutely essential.\n    //\n    // I have tried both normalizing the LP-ed spectrum, and LP-ing the\n    // normalized spectrum, and both of them cause more annoyances than this\n    // \"incorrect\" solution.\n    \n    ONE_POLE(amplitudes[j], gain, 0.001f);\n    sum += amplitudes[j];\n  }\n\n  sum = 1.0f / sum;\n\n  for (size_t i = 0; i < num_harmonics; ++i) {\n    amplitudes[harmonic_indices[i]] *= sum;\n  }\n}\n\ninline float Bump(float x, float centroid, float slope) {\n  float d = fabsf(x - centroid);\n  float bump = 1.0f - d * slope;\n  return bump + fabsf(bump);\n}\n\nconst int integer_harmonics[24] = {\n  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n  16, 17, 18, 19, 20, 21, 22, 23\n};\n\nconst int organ_harmonics[8] = {\n  0, 1, 2, 3, 5, 7, 9, 11\n};\n\nvoid AdditiveEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n\n  const float centroid = parameters.timbre;\n  const float raw_bumps = parameters.harmonics;\n  const float raw_slope = (1.0f - 0.6f * raw_bumps) * parameters.morph;\n  const float slope = 0.01f + 1.99f * raw_slope * raw_slope * raw_slope;\n  const float bumps = 16.0f * raw_bumps * raw_bumps;\n  UpdateAmplitudes(\n      centroid,\n      slope,\n      bumps,\n      &amplitudes_[0],\n      integer_harmonics,\n      24);\n  harmonic_oscillator_[0].Render<1>(f0, &amplitudes_[0], out, size);\n  harmonic_oscillator_[1].Render<13>(f0, &amplitudes_[12], out, size);\n\n  UpdateAmplitudes(\n      centroid,\n      slope,\n      bumps,\n      &amplitudes_[24],\n      organ_harmonics,\n      8);\n\n  harmonic_oscillator_[2].Render<1>(f0, &amplitudes_[24], aux, size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/additive_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Additive synthesis with 24+8 partials.\n\n#ifndef PLAITS_DSP_ENGINE_ADDITIVE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_ADDITIVE_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/harmonic_oscillator.h\"\n\nnamespace plaits {\n  \nconst int kHarmonicBatchSize = 12;\nconst int kNumHarmonics = 36;\nconst int kNumHarmonicOscillators = kNumHarmonics / kHarmonicBatchSize;\n\nclass AdditiveEngine : public Engine {\n public:\n  AdditiveEngine() { }\n  ~AdditiveEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n \n private:\n  void UpdateAmplitudes(\n      float centroid,\n      float slope,\n      float bumps,\n      float* amplitudes,\n      const int* harmonic_indices,\n      size_t num_harmonics);\n      \n  HarmonicOscillator<kHarmonicBatchSize> harmonic_oscillator_[kNumHarmonicOscillators];\n  \n  float* amplitudes_;\n  \n  DISALLOW_COPY_AND_ASSIGN(AdditiveEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_ADDITIVE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/bass_drum_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 and synthetic bass drum generators.\n\n#include \"plaits/dsp/engine/bass_drum_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid BassDrumEngine::Init(BufferAllocator* allocator) {\n  analog_bass_drum_.Init();\n  synthetic_bass_drum_.Init();\n  overdrive_.Init();\n}\n\nvoid BassDrumEngine::Reset() {\n  \n}\n\nvoid BassDrumEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  \n  const float attack_fm_amount = min(parameters.harmonics * 4.0f, 1.0f);\n  const float self_fm_amount = max(min(parameters.harmonics * 4.0f - 1.0f, 1.0f), 0.0f);\n  const float drive = max(parameters.harmonics * 2.0f - 1.0f, 0.0f) * \\\n      max(1.0f - 16.0f * f0, 0.0f);\n  \n  const bool sustain = parameters.trigger & TRIGGER_UNPATCHED;\n  \n  if(out)\n  {\n    analog_bass_drum_.Render(\n        sustain,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        attack_fm_amount,\n        self_fm_amount,\n        out,\n        size);\n\n    overdrive_.Process(\n        0.5f + 0.5f * drive,\n        out,\n        size);\n  }\n\n  if(aux)\n    synthetic_bass_drum_.Render(\n        sustain,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        sustain\n            ? parameters.harmonics\n            : 0.4f - 0.25f * parameters.morph * parameters.morph,\n        min(parameters.harmonics * 2.0f, 1.0f),\n        max(parameters.harmonics * 2.0f - 1.0f, 0.0f),\n        aux,\n        size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/bass_drum_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 and synthetic bass drum generators.\n\n#ifndef PLAITS_DSP_ENGINE_BASS_DRUM_ENGINE_H_\n#define PLAITS_DSP_ENGINE_BASS_DRUM_ENGINE_H_\n\n#include \"plaits/dsp/drums/analog_bass_drum.h\"\n#include \"plaits/dsp/drums/synthetic_bass_drum.h\"\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/fx/overdrive.h\"\n#include \"plaits/dsp/fx/sample_rate_reducer.h\"\n\nnamespace plaits {\n  \nclass BassDrumEngine : public Engine {\n public:\n  BassDrumEngine() { }\n  ~BassDrumEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  AnalogBassDrum analog_bass_drum_;\n  SyntheticBassDrum synthetic_bass_drum_;\n  \n  Overdrive overdrive_;\n  \n  DISALLOW_COPY_AND_ASSIGN(BassDrumEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_BASS_DRUM_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/chord_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chords: wavetable and divide-down organ/string machine.\n\n#include \"plaits/dsp/engine/chord_engine.h\"\n\n#include <algorithm>\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid ChordEngine::Init(BufferAllocator* allocator) {\n  for (int i = 0; i < kChordNumVoices; ++i) {\n    divide_down_voice_[i].Init();\n    wavetable_voice_[i].Init();\n  }\n  chords_.Init(allocator);\n  \n  morph_lp_ = 0.0f;\n  timbre_lp_ = 0.0f;\n}\n\nvoid ChordEngine::Reset() {\n  chords_.Reset();\n}\n\nconst float fade_point[kChordNumVoices] = {\n  0.55f, 0.47f, 0.49f, 0.51f, 0.53f\n};\n\nconst int kRegistrationTableSize = 8;\nconst float registrations[kRegistrationTableSize][kChordNumHarmonics * 2] = {\n  { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f },  // Square\n  { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },  // Saw\n  { 0.5f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f },  // Saw + saw\n  { 0.33f, 0.0f, 0.33f, 0.0f, 0.33f, 0.0f },  // Full saw\n  { 0.33f, 0.0f, 0.0f, 0.33f, 0.0f, 0.33f },  // Full saw + square hybrid\n  { 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f },  // Saw + high square harmo\n  { 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, 0.5f },  // Square + high square harmo\n  { 0.0f, 0.1f, 0.1f, 0.0f, 0.2f, 0.6f },  // // Saw+square + high harmo\n};\n\nvoid ChordEngine::ComputeRegistration(\n    float registration,\n    float* amplitudes) {\n  registration *= (kRegistrationTableSize - 1.001f);\n  MAKE_INTEGRAL_FRACTIONAL(registration);\n  \n  for (int i = 0; i < kChordNumHarmonics * 2; ++i) {\n    float a = registrations[registration_integral][i];\n    float b = registrations[registration_integral + 1][i];\n    amplitudes[i] = a + (b - a) * registration_fractional;\n  }\n}\n\n#define WAVE(bank, row, column) &wav_integrated_waves[(bank * 64 + row * 8 + column) * 132]\n\nconst int16_t* const wavetable[] = {\n  WAVE(2, 6, 1),\n  WAVE(2, 6, 6),\n  WAVE(2, 6, 4),\n  WAVE(0, 6, 0),\n  WAVE(0, 6, 1),\n  WAVE(0, 6, 2),\n  WAVE(0, 6, 7),\n  WAVE(2, 4, 7),\n  WAVE(2, 4, 6),\n  WAVE(2, 4, 5),\n  WAVE(2, 4, 4),\n  WAVE(2, 4, 3),\n  WAVE(2, 4, 2),\n  WAVE(2, 4, 1),\n  WAVE(2, 4, 0),\n};\n\nvoid ChordEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  ONE_POLE(morph_lp_, parameters.morph, 0.1f);\n  ONE_POLE(timbre_lp_, parameters.timbre, 0.1f);\n\n  /*[eh2k] Sorry for the hack :-) \n  chords_.set_chord(parameters.harmonics);\n  */\n\n  float harmonics[kChordNumHarmonics * 2 + 2];\n  float note_amplitudes[kChordNumVoices];\n  float registration = max(1.0f - morph_lp_ * 2.15f, 0.0f);\n  \n  ComputeRegistration(registration, harmonics);\n  harmonics[kChordNumHarmonics * 2] = 0.0f;\n\n  float ratios[kChordNumVoices];\n  int aux_note_mask = chords_.ComputeChordInversion(\n      timbre_lp_,\n      ratios,\n      note_amplitudes);\n  \n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  \n  const float f0 = NoteToFrequency(parameters.note) * 0.998f;\n  const float waveform = max((morph_lp_ - 0.535f) * 2.15f, 0.0f);\n  \n  for (int note = 0; note < kChordNumVoices; ++note) {\n    float wavetable_amount = 50.0f * (morph_lp_ - fade_point[note]);\n    CONSTRAIN(wavetable_amount, 0.0f, 1.0f);\n\n    float divide_down_amount = 1.0f - wavetable_amount;\n    float* destination = (1 << note) & aux_note_mask ? aux : out;\n    \n    const float note_f0 = f0 * ratios[note];\n    float divide_down_gain = 4.0f - note_f0 * 32.0f;\n    CONSTRAIN(divide_down_gain, 0.0f, 1.0f);\n    divide_down_amount *= divide_down_gain;\n    \n    if (wavetable_amount) {\n      wavetable_voice_[note].Render(\n          note_f0 * 1.004f,\n          note_amplitudes[note] * wavetable_amount,\n          waveform,\n          wavetable,\n          destination,\n          size);\n    }\n    \n    if (divide_down_amount) {\n      divide_down_voice_[note].Render(\n          note_f0,\n          harmonics,\n          note_amplitudes[note] * divide_down_amount,\n          destination,\n          size);\n    }\n  }\n  \n  for (size_t i = 0; i < size; ++i) {\n    out[i] += aux[i];\n    aux[i] *= 3.0f;\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/chord_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chords: wavetable and divide-down organ/string machine.\n\n#ifndef PLAITS_DSP_ENGINE_CHORD_ENGINE_H_\n#define PLAITS_DSP_ENGINE_CHORD_ENGINE_H_\n\n#include \"plaits/dsp/chords/chord_bank.h\"\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/string_synth_oscillator.h\"\n#include \"plaits/dsp/oscillator/wavetable_oscillator.h\"\n\nnamespace plaits {\n\nconst int kChordNumHarmonics = 3;\n\nclass ChordEngine : public Engine {\n public:\n  ChordEngine() { }\n  ~ChordEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  void ComputeRegistration(float registration, float* amplitudes);\n  int ComputeChordInversion(\n      float inversion,\n      float* ratios,\n      float* amplitudes);\n  \n  StringSynthOscillator divide_down_voice_[kChordNumVoices];\n  WavetableOscillator<128, 15> wavetable_voice_[kChordNumVoices];\n  ChordBank chords_;\n  \n  float morph_lp_;\n  float timbre_lp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ChordEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_CHORD_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Base class for all engines.\n\n#ifndef PLAITS_DSP_ENGINE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_ENGINE_H_\n\n#include \"plaits/dsp/dsp.h\"\n\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/buffer_allocator.h\"\n\nnamespace plaits {\n\ninline float NoteToFrequency(float midi_note) {\n  midi_note -= 9.0f;\n  CONSTRAIN(midi_note, -128.0f, 127.0f);\n  return a0 * 0.25f * stmlib::SemitonesToRatio(midi_note);\n}\n\nenum TriggerState {\n  TRIGGER_LOW = 0,\n  TRIGGER_RISING_EDGE = 1,\n  TRIGGER_UNPATCHED = 2,\n  TRIGGER_HIGH = 4,\n};\n\nstruct EngineParameters {\n  int trigger;\n  float note;\n  float timbre;\n  float morph;\n  float harmonics;\n  float accent;\n};\n\nstruct PostProcessingSettings {\n  // A negative value indicates that a limiter must be used.\n  float out_gain;\n  float aux_gain;\n  \n  // When this flag is set to true, the engine declares that it will \n  // render a signal that already has an envelope (eg: modal drum, 808 kick).\n  // By reporting this information, the synthesis voice upstream will\n  // bypass the internal envelope/LPG.\n  //\n  // This parameter can be changed on a per-call basis when calling Render()\n  // This is used by the speech synthesis engine, which renders either\n  // a continuous vowel sound (which needs to be enveloped by the LPG)\n  // or a word/sentence (which is already enveloped).\n  bool already_enveloped;\n};\n\nclass Engine {\n public:\n  Engine() { }\n  ~Engine() { }\n  virtual void Init(stmlib::BufferAllocator* allocator) = 0;\n  virtual void Reset() = 0;\n  virtual void LoadUserData(const uint8_t* user_data) = 0;\n  virtual void Render(\n      const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped) = 0;\n  PostProcessingSettings post_processing_settings;\n};\n\ntemplate<int max_size>\nclass EngineRegistry {\n public:\n  EngineRegistry() { }\n  ~EngineRegistry() { }\n  \n  void Init() {\n    num_engines_ = 0;\n  }\n\n  inline Engine* get(int index) {\n    return engine_[index];\n  }\n  \n  void RegisterInstance(\n      Engine* instance,\n      bool already_enveloped,\n      float out_gain,\n      float aux_gain) {\n    if (num_engines_ >= max_size) {\n      return;\n    }\n    engine_[num_engines_] = instance;\n    PostProcessingSettings* s = &instance->post_processing_settings;\n    s->already_enveloped = already_enveloped;\n    s->out_gain = out_gain;\n    s->aux_gain = aux_gain;\n    ++num_engines_;\n  }\n  \n  inline int size() const { return num_engines_; }\n\n private:\n  Engine* engine_[max_size];\n  int num_engines_;\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/fm_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Classic 2-op FM found in Braids, Rings and Elements.\n\n#include \"plaits/dsp/engine/fm_engine.h\"\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/dsp/downsampler/4x_downsampler.h\"\n\nnamespace plaits {\n\nusing namespace stmlib;\n\nvoid FMEngine::Init(BufferAllocator* allocator) {\n  carrier_phase_ = 0;\n  modulator_phase_ = 0;\n  sub_phase_ = 0;\n\n  previous_carrier_frequency_ = a0;\n  previous_modulator_frequency_ = a0;\n  previous_amount_ = 0.0f;\n  previous_feedback_ = 0.0f;\n  previous_sample_ = 0.0f;\n}\n\nvoid FMEngine::Reset() {\n  \n}\n\nvoid FMEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  \n  // 4x oversampling\n  const float note = parameters.note - 24.0f;\n  \n  const float ratio = Interpolate(\n      lut_fm_frequency_quantizer,\n      parameters.harmonics,\n      128.0f);\n  \n  float modulator_note = note + ratio;\n  float target_modulator_frequency = NoteToFrequency(modulator_note);\n  CONSTRAIN(target_modulator_frequency, 0.0f, 0.5f);\n\n  // Reduce the maximum FM index for high pitched notes, to prevent aliasing.\n  float hf_taming = 1.0f - (modulator_note - 72.0f) * 0.025f;\n  CONSTRAIN(hf_taming, 0.0f, 1.0f);\n  hf_taming *= hf_taming;\n  \n  ParameterInterpolator carrier_frequency(\n      &previous_carrier_frequency_, NoteToFrequency(note), size);\n  ParameterInterpolator modulator_frequency(\n      &previous_modulator_frequency_, target_modulator_frequency, size);\n  ParameterInterpolator amount_modulation(\n      &previous_amount_,\n      2.0f * parameters.timbre * parameters.timbre * hf_taming,\n      size);\n  ParameterInterpolator feedback_modulation(\n      &previous_feedback_, 2.0f * parameters.morph - 1.0f, size);\n  \n  Downsampler carrier_downsampler(&carrier_fir_);\n  Downsampler sub_downsampler(&sub_fir_);\n  \n  while (size--) {\n    const float max_uint32 = 4294967296.0f;\n    const float amount = amount_modulation.Next();\n    const float feedback = feedback_modulation.Next();\n    float phase_feedback = feedback < 0.0f ? 0.5f * feedback * feedback : 0.0f;\n    const uint32_t carrier_increment = static_cast<uint32_t>(\n        max_uint32 * carrier_frequency.Next());\n    float _modulator_frequency = modulator_frequency.Next();\n\n    for (size_t j = 0; j < kOversampling; ++j) {\n      modulator_phase_ += static_cast<uint32_t>(max_uint32 * \\\n           _modulator_frequency * (1.0f + previous_sample_ * phase_feedback));\n      carrier_phase_ += carrier_increment;\n      sub_phase_ += carrier_increment >> 1;\n      float modulator_fb = feedback > 0.0f ? 0.25f * feedback * feedback : 0.0f;\n      float modulator = SinePM(\n          modulator_phase_, modulator_fb * previous_sample_);\n      float carrier = SinePM(carrier_phase_, amount * modulator);\n      float sub = SinePM(sub_phase_, amount * carrier * 0.25f);\n      ONE_POLE(previous_sample_, carrier, 0.05f);\n      carrier_downsampler.Accumulate(j, carrier);\n      sub_downsampler.Accumulate(j, sub);\n    }\n    \n    *out++ = carrier_downsampler.Read();\n    *aux++ = sub_downsampler.Read();\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/fm_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Classic 2-op FM, as found in Braids, Rings and Elements.\n\n#ifndef PLAITS_DSP_ENGINE_FM_ENGINE_H_\n#define PLAITS_DSP_ENGINE_FM_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n\nnamespace plaits {\n  \nclass FMEngine : public Engine {\n public:\n  FMEngine() { }\n  ~FMEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  uint32_t carrier_phase_;\n  uint32_t modulator_phase_;\n  uint32_t sub_phase_;\n  \n  float previous_carrier_frequency_;\n  float previous_modulator_frequency_;\n  float previous_amount_;\n  float previous_feedback_;\n  float previous_sample_;\n  \n  float sub_fir_;\n  float carrier_fir_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FMEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_FM_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/grain_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Windowed sine segments.\n\n#include <algorithm>\n\n#include \"plaits/dsp/engine/grain_engine.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid GrainEngine::Init(BufferAllocator* allocator) {\n  grainlet_[0].Init();\n  grainlet_[1].Init();\n  // vosim_oscillator_.Init();\n  z_oscillator_.Init();\n  dc_blocker_[0].Init();\n  dc_blocker_[1].Init();\n}\n\nvoid GrainEngine::Reset() {\n  \n}\n\nvoid GrainEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float root = parameters.note;\n  const float f0 = NoteToFrequency(root);\n  \n  const float f1 = NoteToFrequency(24.0f + 84.0f * parameters.timbre);\n  const float ratio = SemitonesToRatio(-24.0f + 48.0f * parameters.harmonics);\n  const float carrier_bleed = parameters.harmonics < 0.5f\n      ? 1.0f - 2.0f * parameters.harmonics\n      : 0.0f;\n  const float carrier_bleed_fixed = carrier_bleed * (2.0f - carrier_bleed);\n  const float carrier_shape = 0.33f + (parameters.morph - 0.33f) * \\\n      max(1.0f - f0 * 24.0f, 0.0f);\n  \n  grainlet_[0].Render(f0, f1, carrier_shape, carrier_bleed_fixed, out, size);\n  grainlet_[1].Render(f0, f1 * ratio, carrier_shape, carrier_bleed_fixed, aux, size);\n  dc_blocker_[0].set_f<FREQUENCY_DIRTY>(0.3f * f0);\n  for (size_t i = 0; i < size; ++i) {\n    out[i] = dc_blocker_[0].Process<FILTER_MODE_HIGH_PASS>(out[i] + aux[i]);\n  }\n\n  const float cutoff = NoteToFrequency(root + 96.0f * parameters.timbre);\n  z_oscillator_.Render(\n      f0,\n      cutoff,\n      parameters.morph,\n      parameters.harmonics,\n      aux,\n      size);\n  \n  dc_blocker_[1].set_f<FREQUENCY_DIRTY>(0.3f * f0);\n  dc_blocker_[1].Process<FILTER_MODE_HIGH_PASS>(aux, size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/grain_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Windowed sine segments.\n\n#ifndef PLAITS_DSP_ENGINE_GRAIN_ENGINE_H_\n#define PLAITS_DSP_ENGINE_GRAIN_ENGINE_H_\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/grainlet_oscillator.h\"\n#include \"plaits/dsp/oscillator/vosim_oscillator.h\"\n#include \"plaits/dsp/oscillator/z_oscillator.h\"\n\nnamespace plaits {\n  \nclass GrainEngine : public Engine {\n public:\n  GrainEngine() { }\n  ~GrainEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n    \n private:\n  GrainletOscillator grainlet_[2];\n  // VOSIMOscillator vosim_oscillator_;\n  ZOscillator z_oscillator_;\n  stmlib::OnePole dc_blocker_[2];\n  \n  float grain_balance_;\n  \n  DISALLOW_COPY_AND_ASSIGN(GrainEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_GRAIN_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/hi_hat_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style HH with two noise sources - one faithful to the original, the other\n// more metallic.\n\n#include \"plaits/dsp/engine/hi_hat_engine.h\"\n\nnamespace plaits {\n\nusing namespace stmlib;\n\nvoid HiHatEngine::Init(BufferAllocator* allocator) {\n  hi_hat_1_.Init();\n  hi_hat_2_.Init();\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize * 2);\n}\n\nvoid HiHatEngine::Reset() {\n  \n}\n\nvoid HiHatEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  \n  if(out)\n    hi_hat_1_.Render(\n        parameters.trigger & TRIGGER_UNPATCHED,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        parameters.harmonics,\n        temp_buffer_,\n        temp_buffer_ + size,\n        out,\n        size);\n  if(aux)\n    hi_hat_2_.Render(\n        parameters.trigger & TRIGGER_UNPATCHED,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        parameters.harmonics,\n        temp_buffer_,\n        temp_buffer_ + size,\n        aux,\n        size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/hi_hat_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808-style HH with two noise sources - one faithful to the original, the other\n// more metallic.\n\n#ifndef PLAITS_DSP_ENGINE_HI_HAT_ENGINE_H_\n#define PLAITS_DSP_ENGINE_HI_HAT_ENGINE_H_\n\n#include \"plaits/dsp/drums/hi_hat.h\"\n#include \"plaits/dsp/engine/engine.h\"\n\nnamespace plaits {\n  \nclass HiHatEngine : public Engine {\n public:\n  HiHatEngine() { }\n  ~HiHatEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  HiHat<SquareNoise, SwingVCA, true, false> hi_hat_1_;\n  HiHat<RingModNoise, LinearVCA, false, true> hi_hat_2_;\n  \n  float* temp_buffer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(HiHatEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_HI_HAT_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/modal_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// One voice of modal synthesis.\n\n#include \"plaits/dsp/engine/modal_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid ModalEngine::Init(BufferAllocator* allocator) {\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize);\n  harmonics_lp_ = 0.0f;\n  Reset();\n}\n\nvoid ModalEngine::Reset() {\n  voice_.Init();\n}\n\nvoid ModalEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  \n  ONE_POLE(harmonics_lp_, parameters.harmonics, 0.01f);\n  \n  voice_.Render(\n      parameters.trigger & TRIGGER_UNPATCHED,\n      parameters.trigger & TRIGGER_RISING_EDGE,\n      parameters.accent,\n      NoteToFrequency(parameters.note),\n      harmonics_lp_,\n      parameters.timbre,\n      parameters.morph,\n      temp_buffer_,\n      out,\n      aux,\n      size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/modal_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// One voice of modal synthesis.\n\n#ifndef PLAITS_DSP_ENGINE_MODAL_ENGINE_H_\n#define PLAITS_DSP_ENGINE_MODAL_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/physical_modelling/modal_voice.h\"\n\nnamespace plaits {\n\nclass ModalEngine : public Engine {\n public:\n  ModalEngine() { }\n  ~ModalEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  ModalVoice voice_;\n  float* temp_buffer_;\n  float harmonics_lp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ModalEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_MODAL_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/noise_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Clocked noise processed by a multimode filter.\n\n#include \"plaits/dsp/engine/noise_engine.h\"\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid NoiseEngine::Init(BufferAllocator* allocator) {\n  clocked_noise_[0].Init();\n  clocked_noise_[1].Init();\n  lp_hp_filter_.Init();\n  bp_filter_[0].Init();\n  bp_filter_[1].Init();\n\n  previous_f0_ = 0.0f;\n  previous_f1_ = 0.0f;\n  previous_q_ = 0.0f;\n  previous_mode_ = 0.0f;\n\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize);\n}\n\nvoid NoiseEngine::Reset() {\n  \n}\n\nvoid NoiseEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  const float f1 = NoteToFrequency(\n      parameters.note + parameters.harmonics * 48.0f - 24.0f);\n  const float clock_lowest_note = parameters.trigger & TRIGGER_UNPATCHED\n      ? 0.0f\n      : -24.0f;\n  const float clock_f = NoteToFrequency(\n      parameters.timbre * (128.0f - clock_lowest_note) + clock_lowest_note);\n  const float q = 0.5f * SemitonesToRatio(parameters.morph * 120.0f);\n  const bool sync = parameters.trigger & TRIGGER_RISING_EDGE;\n  clocked_noise_[0].Render(sync, clock_f, aux, size);\n  clocked_noise_[1].Render(sync, clock_f * f1 / f0, temp_buffer_, size);\n  \n  ParameterInterpolator f0_modulation(&previous_f0_, f0, size);\n  ParameterInterpolator f1_modulation(&previous_f1_, f1, size);\n  ParameterInterpolator q_modulation(&previous_q_, q, size);\n  ParameterInterpolator mode_modulation(\n      &previous_mode_, parameters.harmonics, size);\n  \n  const float* in_1 = aux;\n  const float* in_2 = temp_buffer_;\n  while (size--) {\n    const float f0 = f0_modulation.Next();\n    const float f1 = f1_modulation.Next();\n    const float q = q_modulation.Next();\n    const float gain = 1.0f / Sqrt((0.5f + q) * 40.0f * f0);\n    lp_hp_filter_.set_f_q<FREQUENCY_ACCURATE>(f0, q);\n    bp_filter_[0].set_f_q<FREQUENCY_ACCURATE>(f0, q);\n    bp_filter_[1].set_f_q<FREQUENCY_ACCURATE>(f1, q);\n    \n    float input_1 = *in_1++ * gain;\n    float input_2 = *in_2++ * gain;\n    lp_hp_filter_.ProcessMultimodeLPtoHP(\n        &input_1, out++, 1, mode_modulation.Next());\n    *aux++ = bp_filter_[0].Process<FILTER_MODE_BAND_PASS>(input_1) + \\\n        bp_filter_[1].Process<FILTER_MODE_BAND_PASS>(input_2);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/noise_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Clocked noise processed by a multimode filter.\n\n#ifndef PLAITS_DSP_ENGINE_NOISE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_NOISE_ENGINE_H_\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/noise/clocked_noise.h\"\n\nnamespace plaits {\n\nclass NoiseEngine : public Engine {\n public:\n  NoiseEngine() { }\n  ~NoiseEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  ClockedNoise clocked_noise_[2];\n  stmlib::Svf lp_hp_filter_;\n  stmlib::Svf bp_filter_[2];\n  \n  float previous_f0_;\n  float previous_f1_;\n  float previous_q_;\n  float previous_mode_;\n  \n  float* temp_buffer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(NoiseEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_NOISE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/particle_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Clocked noise processed by a filter.\n\n#include \"plaits/dsp/engine/particle_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid ParticleEngine::Init(BufferAllocator* allocator) {\n  for (int i = 0; i < kNumParticles; ++i) {\n    particle_[i].Init();\n  }\n  diffuser_.Init(allocator->Allocate<uint16_t>(8192));\n  post_filter_.Init();\n}\n\nvoid ParticleEngine::Reset() {\n  diffuser_.Reset();\n}\n\nvoid ParticleEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  const float density_sqrt = NoteToFrequency(\n      60.0f + parameters.timbre * parameters.timbre * 72.0f);\n  const float density = density_sqrt * density_sqrt * (1.0f / kNumParticles);\n  const float gain = 1.0f / density;\n  const float q_sqrt = SemitonesToRatio(parameters.morph >= 0.5f\n      ? (parameters.morph - 0.5f) * 120.0f\n      : 0.0f);\n  const float q = 0.5f + q_sqrt * q_sqrt;\n  const float spread = 48.0f * parameters.harmonics * parameters.harmonics;\n  const float raw_diffusion_sqrt = 2.0f * fabsf(parameters.morph - 0.5f);\n  const float raw_diffusion = raw_diffusion_sqrt * raw_diffusion_sqrt;\n  const float diffusion = parameters.morph < 0.5f\n      ? raw_diffusion\n      : 0.0f;\n  const bool sync = parameters.trigger & TRIGGER_RISING_EDGE;\n  \n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  \n  for (int i = 0; i < kNumParticles; ++i) {\n    particle_[i].Render(\n        sync,\n        density,\n        gain,\n        f0,\n        spread,\n        q,\n        out,\n        aux,\n        size);\n  }\n  \n  post_filter_.set_f_q<FREQUENCY_DIRTY>(min(f0, 0.49f), 0.5f);\n  post_filter_.Process<FILTER_MODE_LOW_PASS>(out, out, size);\n  \n  diffuser_.Process(\n      0.8f * diffusion * diffusion,\n      0.5f * diffusion + 0.25f,\n      out,\n      size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/particle_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Filtered random pulses.\n\n#ifndef PLAITS_DSP_ENGINE_PARTICLE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_PARTICLE_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/fx/diffuser.h\"\n#include \"plaits/dsp/noise/particle.h\"\n\nnamespace plaits {\n\nconst int kNumParticles = 6;\n\nclass ParticleEngine : public Engine {\n public:\n  ParticleEngine() { }\n  ~ParticleEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  Particle particle_[kNumParticles];\n  Diffuser diffuser_;\n  stmlib::Svf post_filter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ParticleEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_PARTICLE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/snare_drum_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 and synthetic snare drum generators.\n\n#include \"plaits/dsp/engine/snare_drum_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid SnareDrumEngine::Init(BufferAllocator* allocator) {\n  analog_snare_drum_.Init();\n  synthetic_snare_drum_.Init();\n}\n\nvoid SnareDrumEngine::Reset() {\n  \n}\n\nvoid SnareDrumEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  \n  if(out)\n    analog_snare_drum_.Render(\n        parameters.trigger & TRIGGER_UNPATCHED,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        parameters.harmonics,\n        out,\n        size);\n  \n  if(aux)\n    synthetic_snare_drum_.Render(\n        parameters.trigger & TRIGGER_UNPATCHED,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        parameters.accent,\n        f0,\n        parameters.timbre,\n        parameters.morph,\n        parameters.harmonics,\n        aux,\n        size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/snare_drum_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 808 and synthetic snare drum generators.\n\n#ifndef PLAITS_DSP_ENGINE_SNARE_DRUM_ENGINE_H_\n#define PLAITS_DSP_ENGINE_SNARE_DRUM_ENGINE_H_\n\n#include \"plaits/dsp/drums/analog_snare_drum.h\"\n#include \"plaits/dsp/drums/synthetic_snare_drum.h\"\n#include \"plaits/dsp/engine/engine.h\"\n\nnamespace plaits {\n  \nclass SnareDrumEngine : public Engine {\n public:\n  SnareDrumEngine() { }\n  ~SnareDrumEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  AnalogSnareDrum analog_snare_drum_;\n  SyntheticSnareDrum synthetic_snare_drum_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SnareDrumEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_SNARE_DRUM_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/speech_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Various flavours of speech synthesis.\n\n#include \"plaits/dsp/engine/speech_engine.h\"\n\n#include \"plaits/dsp/speech/lpc_speech_synth_words.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid SpeechEngine::Init(BufferAllocator* allocator) {\n  sam_speech_synth_.Init();\n  naive_speech_synth_.Init();\n  lpc_speech_synth_word_bank_.Init(\n      word_banks_,\n      LPC_SPEECH_SYNTH_NUM_WORD_BANKS,\n      allocator);\n  lpc_speech_synth_controller_.Init(&lpc_speech_synth_word_bank_);\n  word_bank_quantizer_.Init(LPC_SPEECH_SYNTH_NUM_WORD_BANKS + 1, 0.1f, false);\n  \n  temp_buffer_[0] = allocator->Allocate<float>(kMaxBlockSize);\n  temp_buffer_[1] = allocator->Allocate<float>(kMaxBlockSize);\n  \n  prosody_amount_ = 0.0f;\n  speed_ = 0.0f;\n}\n\nvoid SpeechEngine::Reset() {\n  lpc_speech_synth_word_bank_.Reset();\n}\n\nvoid SpeechEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  \n  const float group = parameters.harmonics * 6.0f;\n  \n  // Interpolates between the 3 models: naive, SAM, LPC.\n  if (group <= 2.0f) {\n    *already_enveloped = false;\n    \n    float blend = group;\n    if (group <= 1.0f) {\n      naive_speech_synth_.Render(\n          parameters.trigger == TRIGGER_RISING_EDGE,\n          f0,\n          parameters.morph,\n          parameters.timbre,\n          temp_buffer_[0],\n          aux,\n          out,\n          size);\n    } else {\n      lpc_speech_synth_controller_.Render(\n          parameters.trigger & TRIGGER_UNPATCHED,\n          parameters.trigger & TRIGGER_RISING_EDGE,\n          -1,\n          f0,\n          0.0f,\n          0.0f,\n          parameters.morph,\n          parameters.timbre,\n          1.0f,\n          aux,\n          out,\n          size);\n      blend = 2.0f - blend;\n    }\n  \n    sam_speech_synth_.Render(\n        parameters.trigger == TRIGGER_RISING_EDGE,\n        f0,\n        parameters.morph,\n        parameters.timbre,\n        temp_buffer_[0],\n        temp_buffer_[1],\n        size);\n    \n    blend *= blend * (3.0f - 2.0f * blend);\n    blend *= blend * (3.0f - 2.0f * blend);\n    for (size_t i = 0; i < size; ++i) {\n      aux[i] += (temp_buffer_[0][i] - aux[i]) * blend;\n      out[i] += (temp_buffer_[1][i] - out[i]) * blend;\n    }\n  } else {\n    // Change phonemes/words for LPC.\n    const int word_bank = word_bank_quantizer_.Process(\n        (group - 2.0f) * 0.275f) - 1;\n    \n    const bool replay_prosody = word_bank >= 0 && \\\n        !(parameters.trigger & TRIGGER_UNPATCHED);\n    \n    *already_enveloped = replay_prosody;\n    \n    lpc_speech_synth_controller_.Render(\n        parameters.trigger & TRIGGER_UNPATCHED,\n        parameters.trigger & TRIGGER_RISING_EDGE,\n        word_bank,\n        f0,\n        prosody_amount_,\n        speed_,\n        parameters.morph,\n        parameters.timbre,\n        replay_prosody ? parameters.accent : 1.0f,\n        aux,\n        out,\n        size);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/speech_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Various flavours of speech synthesis.\n\n#ifndef PLAITS_DSP_ENGINE_SPEECH_ENGINE_H_\n#define PLAITS_DSP_ENGINE_SPEECH_ENGINE_H_\n\n#include \"stmlib/dsp/hysteresis_quantizer.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.h\"\n#include \"plaits/dsp/speech/naive_speech_synth.h\"\n#include \"plaits/dsp/speech/sam_speech_synth.h\"\n\nnamespace plaits {\n\nclass SpeechEngine : public Engine {\n public:\n  SpeechEngine() { }\n  ~SpeechEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n  inline void set_prosody_amount(float prosody_amount) {\n    prosody_amount_ = prosody_amount;\n  }\n  \n  inline void set_speed(float speed) {\n    speed_ = speed;\n  }\n\n private:\n  stmlib::HysteresisQuantizer2 word_bank_quantizer_;\n  \n  NaiveSpeechSynth naive_speech_synth_;\n  SAMSpeechSynth sam_speech_synth_;\n  \n  LPCSpeechSynthController lpc_speech_synth_controller_;\n  LPCSpeechSynthWordBank lpc_speech_synth_word_bank_;\n  \n  float* temp_buffer_[2];\n  float prosody_amount_;\n  float speed_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SpeechEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_SPEECH_ENGINE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/engine/string_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Three voices of string synthesis.\n\n#include \"plaits/dsp/engine/string_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid StringEngine::Init(BufferAllocator* allocator) {\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize);\n  for (int i = 0; i < kNumStrings; ++i) {\n    voice_[i].Init(allocator);\n    f0_[i] = 0.01f;\n  }\n  active_string_ = kNumStrings - 1;\n  f0_delay_.Init(allocator->Allocate<float>(16));\n}\n\nvoid StringEngine::Reset() {\n  f0_delay_.Reset();\n  for (int i = 0; i < kNumStrings; ++i) {\n    voice_[i].Reset();\n  }\n}\n\nvoid StringEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  if (parameters.trigger & TRIGGER_RISING_EDGE) {\n    // 8 in original firmware version.\n    // 05.01.18: mic.w: problem with microbrute.\n    f0_[active_string_] = f0_delay_.Read(14);\n    active_string_ = (active_string_ + 1) % kNumStrings;\n  }\n  \n  const float f0 = NoteToFrequency(parameters.note);\n  f0_[active_string_] = f0;\n  f0_delay_.Write(f0);\n  \n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  \n  for (int i = 0; i < kNumStrings; ++i) {\n    voice_[i].Render(\n        parameters.trigger & TRIGGER_UNPATCHED && i == active_string_,\n        parameters.trigger & TRIGGER_RISING_EDGE && i == active_string_,\n        parameters.accent,\n        f0_[i],\n        parameters.harmonics,\n        parameters.timbre * parameters.timbre,\n        parameters.morph,\n        temp_buffer_,\n        out,\n        aux,\n        size);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/string_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Three voices of string synthesis.\n\n#ifndef PLAITS_DSP_ENGINE_STRING_ENGINE_H_\n#define PLAITS_DSP_ENGINE_STRING_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/physical_modelling/string_voice.h\"\n\nnamespace plaits {\n\nconst int kNumStrings = 3;\n\nclass StringEngine : public Engine {\n public:\n  StringEngine() { }\n  ~StringEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  StringVoice voice_[kNumStrings];\n\n  float f0_[kNumStrings];\n  DelayLine<float, 16> f0_delay_;\n  int active_string_;\n  float* temp_buffer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(StringEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_STRING_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/swarm_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Swarm of sawtooths and sines.\n\n#include \"plaits/dsp/engine/swarm_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid SwarmEngine::Init(BufferAllocator* allocator) {\n  swarm_voice_ = allocator->Allocate<SwarmVoice>(kNumSwarmVoices);\n}\n\nvoid SwarmEngine::Reset() {\n  const float n = (kNumSwarmVoices - 1) / 2;\n  for (int i = 0; i < kNumSwarmVoices; ++i) {\n    float rank = (static_cast<float>(i) - n) / n;\n    swarm_voice_[i].Init(rank);\n  }\n}\n\nvoid SwarmEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  const float control_rate = static_cast<float>(size);\n  const float density = NoteToFrequency(parameters.timbre * 120.0f) * \\\n      0.025f * control_rate;\n  const float spread = parameters.harmonics * parameters.harmonics * \\\n      parameters.harmonics;\n  float size_ratio = 0.25f * SemitonesToRatio(\n      (1.0f - parameters.morph) * 84.0f);\n  \n  const bool burst_mode = !(parameters.trigger & TRIGGER_UNPATCHED);\n  const bool start_burst = parameters.trigger & TRIGGER_RISING_EDGE;\n\n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  \n  for (int i = 0; i < kNumSwarmVoices; ++i) {\n    swarm_voice_[i].Render(\n        f0,\n        density,\n        burst_mode,\n        start_burst,\n        spread,\n        size_ratio,\n        out,\n        aux,\n        size);\n    size_ratio *= 0.97f;\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/swarm_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Swarm of sawtooths and sines.\n\n#ifndef PLAITS_DSP_ENGINE_SWARM_ENGINE_H_\n#define PLAITS_DSP_ENGINE_SWARM_ENGINE_H_\n\n#include \"stmlib/dsp/polyblep.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/dsp/oscillator/string_synth_oscillator.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nconst int kNumSwarmVoices = 8;\n\nclass GrainEnvelope {\n public:\n  GrainEnvelope() { }\n  ~GrainEnvelope() { }\n  \n  void Init() {\n    from_ = 0.0f;\n    interval_ = 1.0f;\n    phase_ = 1.0f;\n    fm_ = 0.0f;\n    amplitude_ = 0.5f;\n    previous_size_ratio_ = 0.0f;\n    filter_coefficient_ = 0.0f;\n  }\n  \n  inline void Step(float rate, bool burst_mode, bool start_burst) {\n    bool randomize = false;\n    if (start_burst) {\n      phase_ = 0.5f;\n      fm_ = 16.0f;\n      randomize = true;\n    } else {\n      phase_ += rate * fm_;\n      if (phase_ >= 1.0f) {\n        phase_ -= static_cast<float>(static_cast<int>(phase_));\n        randomize = true;\n      }\n    }\n    \n    if (randomize) {\n      from_ += interval_;\n      interval_ = stmlib::Random::GetFloat() - from_;\n      // Randomize the duration of the grain.\n      if (burst_mode) {\n        fm_ *= 0.8f + 0.2f * stmlib::Random::GetFloat();\n      } else {\n        fm_ = 0.5f + 1.5f * stmlib::Random::GetFloat();\n      }\n    }\n  }\n  \n  inline float frequency(float size_ratio) const {\n    // We approximate two overlapping grains of frequencies f1 and f2\n    // By a continuous tone ramping from f1 to f2. This allows a continuous\n    // transition between the \"grain cloud\" and \"swarm of glissandi\" textures.\n    if (size_ratio < 1.0f) {\n      return 2.0f * (from_ + interval_ * phase_) - 1.0f;\n    } else {\n      return from_;\n    }\n  }\n  \n  inline float amplitude(float size_ratio) {\n    float target_amplitude = 1.0f;\n    if (size_ratio >= 1.0f) {\n      float phase = (phase_ - 0.5f) * size_ratio;\n      CONSTRAIN(phase, -1.0f, 1.0f);\n      float e = Sine(0.5f * phase + 1.25f);\n      target_amplitude = 0.5f * (e + 1.0f);\n    }\n    \n    if ((size_ratio >= 1.0f) ^ (previous_size_ratio_ >= 1.0f)) {\n      filter_coefficient_ = 0.5f;\n    }\n    filter_coefficient_ *= 0.95f;\n    \n    previous_size_ratio_ = size_ratio;\n    ONE_POLE(amplitude_, target_amplitude, 0.5f - filter_coefficient_);\n    return amplitude_;\n  }\n  \n private:\n  float from_;\n  float interval_;\n  float phase_;\n  float fm_;\n  float amplitude_;\n  float previous_size_ratio_;\n  float filter_coefficient_;\n  \n  DISALLOW_COPY_AND_ASSIGN(GrainEnvelope);\n};\n\nclass AdditiveSawOscillator {\n public:\n  AdditiveSawOscillator() { }\n  ~AdditiveSawOscillator() { }\n\n  inline void Init() {\n    phase_ = 0.0f;\n    next_sample_ = 0.0f;\n    frequency_ = 0.01f;\n    gain_ = 0.0f;\n  }\n\n  inline void Render(\n      float frequency,\n      float level,\n      float* out,\n      size_t size) {\n    if (frequency >= kMaxFrequency) {\n      frequency = kMaxFrequency;\n    }\n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    stmlib::ParameterInterpolator gain(&gain_, level, size);\n\n    float next_sample = next_sample_;\n    float phase = phase_;\n\n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n\n      const float frequency = fm.Next();\n\n      phase += frequency;\n  \n      if (phase >= 1.0f) {\n        phase -= 1.0f;\n        float t = phase / frequency;\n        this_sample -= stmlib::ThisBlepSample(t);\n        next_sample -= stmlib::NextBlepSample(t);\n      }\n\n      next_sample += phase;\n      *out++ += (2.0f * this_sample - 1.0f) * gain.Next();\n    }\n    phase_ = phase;\n    next_sample_ = next_sample;\n  }\n\n private:\n  // Oscillator state.\n  float phase_;\n  float next_sample_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float gain_;\n\n  DISALLOW_COPY_AND_ASSIGN(AdditiveSawOscillator);\n};\n\nclass SwarmVoice {\n public:\n  SwarmVoice() { }\n  ~SwarmVoice() { }\n  \n  void Init(float rank) {\n    rank_ = rank;\n    envelope_.Init();\n    saw_.Init();\n    sine_.Init();\n  }\n  \n  void Render(\n      float f0,\n      float density,\n      bool burst_mode,\n      bool start_burst,\n      float spread,\n      float size_ratio,\n      float* saw,\n      float* sine,\n      size_t size) {\n    envelope_.Step(density, burst_mode, start_burst);\n    \n    const float scale = 1.0f / kNumSwarmVoices;\n    const float amplitude = envelope_.amplitude(size_ratio) * scale;\n\n    const float expo_amount = envelope_.frequency(size_ratio);\n    f0 *= stmlib::SemitonesToRatio(48.0f * expo_amount * spread * rank_);\n    \n    const float linear_amount = rank_ * (rank_ + 0.01f) * spread * 0.25f;\n    f0 *= 1.0f + linear_amount;\n\n    saw_.Render(f0, amplitude, saw, size);\n    sine_.Render(f0, amplitude, sine, size);\n  };\n  \n private:\n  float rank_;\n\n  GrainEnvelope envelope_;\n  AdditiveSawOscillator saw_;\n  FastSineOscillator sine_;\n};\n\nclass SwarmEngine : public Engine {\n public:\n  SwarmEngine() { }\n  ~SwarmEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  SwarmVoice* swarm_voice_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SwarmEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_SWARM_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/virtual_analog_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 2 variable shape oscillators with sync, FM and crossfading.\n\n#include \"plaits/dsp/engine/virtual_analog_engine.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid VirtualAnalogEngine::Init(BufferAllocator* allocator) {\n  primary_.Init();\n  auxiliary_.Init();\n  auxiliary_.set_master_phase(0.25f);\n  sync_.Init();\n  variable_saw_.Init();\n  \n  auxiliary_amount_ = 0.0f;\n  xmod_amount_ = 0.0f;\n  \n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize);\n}\n\nvoid VirtualAnalogEngine::Reset() {\n  \n}\n\nconst float intervals[5] = {\n  0.0f, 7.01f, 12.01f, 19.01f, 24.01f\n};\n\ninline float Squash(float x) {\n  return x * x * (3.0f - 2.0f * x);\n}\n\nfloat VirtualAnalogEngine::ComputeDetuning(float detune) const {\n  detune = 2.05f * detune - 1.025f;\n  CONSTRAIN(detune, -1.0f, 1.0f);\n  \n  float sign = detune < 0.0f ? -1.0f : 1.0f;\n  detune = detune * sign * 3.9999f;\n  MAKE_INTEGRAL_FRACTIONAL(detune);\n  \n  float a = intervals[detune_integral];\n  float b = intervals[detune_integral + 1];\n  return (a + (b - a) * Squash(Squash(detune_fractional))) * sign;\n}\n\nvoid VirtualAnalogEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n\n#if VA_VARIANT == 0\n  \n  // 1 = variable waveshape controlled by TIMBRE.\n  // 2 = variable waveshape controlled by MORPH, detuned by HARMONICS.\n  // OUT = 1 + 2.\n  // AUX = 1 + sync 2.\n  const float auxiliary_detune = ComputeDetuning(parameters.harmonics);\n  const float primary_f = NoteToFrequency(parameters.note);\n  const float auxiliary_f = NoteToFrequency(parameters.note + auxiliary_detune);\n  const float sync_f = NoteToFrequency(\n      parameters.note + parameters.harmonics * 48.0f);\n\n  float shape_1 = parameters.timbre * 1.5f;\n  CONSTRAIN(shape_1, 0.0f, 1.0f);\n\n  float pw_1 = 0.5f + (parameters.timbre - 0.66f) * 1.4f;\n  CONSTRAIN(pw_1, 0.5f, 0.99f);\n\n  float shape_2 = parameters.morph * 1.5f;\n  CONSTRAIN(shape_2, 0.0f, 1.0f);\n\n  float pw_2 = 0.5f + (parameters.morph - 0.66f) * 1.4f;\n  CONSTRAIN(pw_2, 0.5f, 0.99f);\n  \n  primary_.Render(primary_f, pw_1, shape_1, temp_buffer_, size);\n  auxiliary_.Render(auxiliary_f, pw_2, shape_2, aux, size);\n  for (size_t i = 0; i < size; ++i) {\n    out[i] = (aux[i] + temp_buffer_[i]) * 0.5f;\n  }\n  \n  sync_.Render(primary_f, sync_f, pw_2, shape_2, aux, size);\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] = (aux[i] + temp_buffer_[i]) * 0.5f;\n  }\n\n#elif VA_VARIANT == 1\n  \n  // 1 = variable waveshape controlled by MORPH.\n  // 2 = variable waveshape controlled by MORPH.\n  // OUT = crossfade between 1 + 2, 1, 1 sync 2 controlled by TIMBRE.\n  // AUX = 2.\n  \n  float auxiliary_amount = max(0.5f - parameters.timbre, 0.0f) * 2.0f;\n  auxiliary_amount *= auxiliary_amount * 0.5f;\n\n  const float xmod_amount = max(parameters.timbre - 0.5f, 0.0f) * 2.0f;\n  const float squashed_xmod_amount = xmod_amount * (2.0f - xmod_amount);\n\n  const float auxiliary_detune = ComputeDetuning(parameters.harmonics);\n  const float primary_f = NoteToFrequency(parameters.note);\n  const float auxiliary_f = NoteToFrequency(parameters.note + auxiliary_detune);\n  const float sync_f = primary_f * SemitonesToRatio(\n      xmod_amount * (auxiliary_detune + 36.0f));\n\n  float shape = parameters.morph * 1.5f;\n  CONSTRAIN(shape, 0.0f, 1.0f);\n\n  float pw = 0.5f + (parameters.morph - 0.66f) * 1.4f;\n  CONSTRAIN(pw, 0.5f, 0.99f);\n\n  primary_.Render(primary_f, pw, shape, out, size);\n  sync_.Render(primary_f, sync_f, pw, shape, aux, size);\n\n  ParameterInterpolator xmod_amount_modulation(\n      &xmod_amount_,\n      squashed_xmod_amount * (2.0f - squashed_xmod_amount),\n      size);\n  for (size_t i = 0; i < size; ++i) {\n    out[i] += (aux[i] - out[i]) * xmod_amount_modulation.Next();\n  }\n\n  auxiliary_.Render(auxiliary_f, pw, shape, aux, size);\n\n  ParameterInterpolator auxiliary_amount_modulation(\n      &auxiliary_amount_,\n      auxiliary_amount,\n      size);\n  for (size_t i = 0; i < size; ++i) {\n    out[i] += (aux[i] - out[i]) * auxiliary_amount_modulation.Next();\n  }\n  \n#elif VA_VARIANT == 2\n\n  // 1 = variable square controlled by TIMBRE.\n  // 2 = variable saw controlled by MORPH.\n  // OUT = 1 + 2.\n  // AUX = dual variable waveshape controlled by MORPH, self sync by TIMBRE.\n  \n  const float sync_amount = parameters.timbre * parameters.timbre;\n  const float auxiliary_detune = ComputeDetuning(parameters.harmonics);\n  const float primary_f = NoteToFrequency(parameters.note);\n  const float auxiliary_f = NoteToFrequency(parameters.note + auxiliary_detune);\n  const float primary_sync_f = NoteToFrequency(\n      parameters.note + sync_amount * 48.0f);\n  const float auxiliary_sync_f = NoteToFrequency(\n      parameters.note + auxiliary_detune + sync_amount * 48.0f);\n\n  float shape = parameters.morph * 1.5f;\n  CONSTRAIN(shape, 0.0f, 1.0f);\n\n  float pw = 0.5f + (parameters.morph - 0.66f) * 1.46f;\n  CONSTRAIN(pw, 0.5f, 0.995f);\n  \n  // Render monster sync to AUX.\n  primary_.Render(primary_f, primary_sync_f, pw, shape, out, size);\n  auxiliary_.Render(auxiliary_f, auxiliary_sync_f, pw, shape, aux, size);\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] = (aux[i] - out[i]) * 0.5f;\n  }\n  \n  // Render double varishape to OUT.\n  float square_pw = 1.3f * parameters.timbre - 0.15f;\n  CONSTRAIN(square_pw, 0.005f, 0.5f);\n  \n  const float square_sync_ratio = parameters.timbre < 0.5f\n      ? 0.0f\n      : (parameters.timbre - 0.5f) * (parameters.timbre - 0.5f) * 4.0f * 48.0f;\n  \n  const float square_gain = min(parameters.timbre * 8.0f, 1.0f);\n  \n  float saw_pw = parameters.morph < 0.5f\n      ? parameters.morph + 0.5f\n      : 1.0f - (parameters.morph - 0.5f) * 2.0f;\n  saw_pw *= 1.1f;\n  CONSTRAIN(saw_pw, 0.005f, 1.0f);\n    \n  float saw_shape = 10.0f - 21.0f * parameters.morph;\n  CONSTRAIN(saw_shape, 0.0f, 1.0f);\n  \n  float saw_gain = 8.0f * (1.0f - parameters.morph);\n  CONSTRAIN(saw_gain, 0.02f, 1.0f);\n  \n  const float square_sync_f = NoteToFrequency(\n      parameters.note + square_sync_ratio);\n  \n  sync_.Render(\n      primary_f, square_sync_f, square_pw, 1.0f, temp_buffer_, size);\n  variable_saw_.Render(auxiliary_f, saw_pw, saw_shape, out, size);\n  \n  float norm = 1.0f / (std::max(square_gain, saw_gain));\n  \n  ParameterInterpolator square_gain_modulation(\n      &auxiliary_amount_,\n      square_gain * 0.3f * norm,\n      size);\n\n  ParameterInterpolator saw_gain_modulation(\n      &xmod_amount_,\n      saw_gain * 0.5f * norm,\n      size);\n  \n  for (size_t i = 0; i < size; ++i) {\n    out[i] = out[i] * saw_gain_modulation.Next() + \\\n        square_gain_modulation.Next() * temp_buffer_[i];\n  }\n\n#endif  // VA_VARIANT values\n\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/virtual_analog_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 2 variable shape oscillators with sync and crossfading.\n\n#ifndef PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_ENGINE_H_\n#define PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/variable_saw_oscillator.h\"\n#include \"plaits/dsp/oscillator/variable_shape_oscillator.h\"\n\n#define VA_VARIANT 2\n\nnamespace plaits {\n  \nclass VirtualAnalogEngine : public Engine {\n public:\n  VirtualAnalogEngine() { }\n  ~VirtualAnalogEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  float ComputeDetuning(float detune) const;\n  \n  VariableShapeOscillator primary_;\n  VariableShapeOscillator auxiliary_;\n\n  VariableShapeOscillator sync_;\n  VariableSawOscillator variable_saw_;\n\n  float auxiliary_amount_;\n  float xmod_amount_;\n  float* temp_buffer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(VirtualAnalogEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/waveshaping_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Slope -> Waveshaper -> Wavefolder.\n\n#include \"plaits/dsp/engine/waveshaping_engine.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/utils/dsp.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid WaveshapingEngine::Init(BufferAllocator* allocator) {\n  slope_.Init();\n  triangle_.Init();\n  previous_shape_ = 0.0f;\n  previous_wavefolder_gain_ = 0.0f;\n  previous_overtone_gain_ = 0.0f;\n}\n\nvoid WaveshapingEngine::Reset() {\n  \n}\n\nfloat Tame(float f0, float harmonics, float order) {\n  f0 *= harmonics;\n  float max_f = 0.5f / order;\n  float max_amount = 1.0f - (f0 - max_f) / (0.5f - max_f);\n  CONSTRAIN(max_amount, 0.0f, 1.0f);\n  return max_amount * max_amount * max_amount;\n}\n\nvoid WaveshapingEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float root = parameters.note;\n  \n  const float f0 = NoteToFrequency(root);\n  const float pw = parameters.morph * 0.45f + 0.5f;\n  \n  // Start from bandlimited slope signal.\n  slope_.Render<OSCILLATOR_SHAPE_SLOPE>(f0, pw, out, size);\n  triangle_.Render<OSCILLATOR_SHAPE_SLOPE>(f0, 0.5f, aux, size);\n\n  // Try to estimate how rich the spectrum is, and reduce the range of the\n  // waveshaping control accordingly.\n  const float slope = 3.0f + fabsf(parameters.morph - 0.5f) * 5.0f;\n  const float shape_amount = fabsf(parameters.harmonics - 0.5f) * 2.0f;\n  const float shape_amount_attenuation = Tame(f0, slope, 16.0f);\n  const float wavefolder_gain = parameters.timbre;\n  const float wavefolder_gain_attenuation = Tame(\n      f0,\n      slope * (3.0f + shape_amount * shape_amount_attenuation * 5.0f),\n      12.0f);\n  \n  // Apply waveshaper / wavefolder.\n  ParameterInterpolator shape_modulation(\n      &previous_shape_,\n      0.5f + (parameters.harmonics - 0.5f) * shape_amount_attenuation,\n      size);\n  ParameterInterpolator wf_gain_modulation(\n      &previous_wavefolder_gain_,\n      0.03f + 0.46f * wavefolder_gain * wavefolder_gain_attenuation,\n      size);\n  const float overtone_gain = parameters.timbre * (2.0f - parameters.timbre);\n  ParameterInterpolator overtone_gain_modulation(\n      &previous_overtone_gain_,\n      overtone_gain * (2.0f - overtone_gain),\n      size);\n  \n  for (size_t i = 0; i < size; ++i) {\n    float shape = shape_modulation.Next() * 3.9999f;\n    MAKE_INTEGRAL_FRACTIONAL(shape);\n    \n    const int16_t* shape_1 = lookup_table_i16_table[shape_integral];\n    const int16_t* shape_2 = lookup_table_i16_table[shape_integral + 1];\n    \n    float ws_index = 127.0f * out[i] + 128.0f;\n    MAKE_INTEGRAL_FRACTIONAL(ws_index)\n    ws_index_integral &= 255;\n    \n    float x0 = static_cast<float>(shape_1[ws_index_integral]) / 32768.0f;\n    float x1 = static_cast<float>(shape_1[ws_index_integral + 1]) / 32768.0f;\n    float x = x0 + (x1 - x0) * ws_index_fractional;\n\n    float y0 = static_cast<float>(shape_2[ws_index_integral]) / 32768.0f;\n    float y1 = static_cast<float>(shape_2[ws_index_integral + 1]) / 32768.0f;\n    float y = y0 + (y1 - y0) * ws_index_fractional;\n    \n    float mix = x + (y - x) * shape_fractional;\n    float index = mix * wf_gain_modulation.Next() + 0.5f;\n    float fold = InterpolateHermite(\n        lut_fold + 1, index, 512.0f);\n    float fold_2 = -InterpolateHermite(\n        lut_fold_2 + 1, index, 512.0f);\n    \n    float sine = Sine(aux[i] * 0.25f + 0.5f);\n    out[i] = fold;\n    aux[i] = sine + (fold_2 - sine) * overtone_gain_modulation.Next();\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/waveshaping_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Slope -> Waveshaper -> Wavefolder.\n\n#ifndef PLAITS_DSP_ENGINE_WAVESHAPING_ENGINE_H_\n#define PLAITS_DSP_ENGINE_WAVESHAPING_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n  \nclass WaveshapingEngine : public Engine {\n public:\n  WaveshapingEngine() { }\n  ~WaveshapingEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  Oscillator slope_;\n  Oscillator triangle_;\n  float previous_shape_;\n  float previous_wavefolder_gain_;\n  float previous_overtone_gain_;\n  \n  DISALLOW_COPY_AND_ASSIGN(WaveshapingEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_WAVESHAPING_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine/wavetable_engine.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 8x8x3 wave terrain.\n\n#include \"plaits/dsp/engine/wavetable_engine.h\"\n\n#include <algorithm>\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nconst int kNumBanks = 4;\nconst int kNumWavesPerBank = 64;\nconst int kNumWaves = 192;\nconst int kNumCustomWaves = 15;\n\nconst size_t kTableSize = 128;\nconst float kTableSizeF = float(kTableSize);\n\nvoid WavetableEngine::Init(BufferAllocator* allocator) {\n  phase_ = 0.0f;\n\n  x_lp_ = 0.0f;\n  y_lp_ = 0.0f;\n  z_lp_ = 0.0f;\n  \n  x_pre_lp_ = 0.0f;\n  y_pre_lp_ = 0.0f;\n  z_pre_lp_ = 0.0f;\n\n  previous_x_ = 0.0f;\n  previous_y_ = 0.0f;\n  previous_z_ = 0.0f;\n  previous_f0_ = a0;\n\n  diff_out_.Init();\n  \n  wave_map_ = allocator->Allocate<const int16_t*>(kNumWavesPerBank);\n}\n\nvoid WavetableEngine::Reset() {\n  \n}\n\nvoid WavetableEngine::LoadUserData(const uint8_t* user_data) {\n  for (int bank = 0; bank < kNumBanks; ++bank) {\n    for (int wave = 0; wave < kNumWavesPerBank; ++wave) {\n      int i = bank * kNumWavesPerBank + wave;\n\n      int w = i;\n      if (bank == kNumBanks - 1) {\n        w = user_data ? user_data[wave] : (w * 101 % kNumWaves);\n      }\n\n      const int16_t* base = wav_integrated_waves;\n      if (w >= kNumWaves) {\n        base = (const int16_t*)(user_data + 64);\n        w = min(w - kNumWaves, kNumCustomWaves);\n      }\n      wave_map_[i] = base + size_t(w) * (kTableSize + 4);\n    }\n  }\n}\n\ninline float Clamp(float x, float amount) {\n  x = x - 0.5f;\n  x *= amount;\n  CONSTRAIN(x, -0.5f, 0.5f);\n  x += 0.5f;\n  return x;\n}\n\ninline float WavetableEngine::ReadWave(\n    int x,\n    int y,\n    int z,\n    int phase_integral,\n    float phase_fractional) {\n  return InterpolateWaveHermite(\n      wave_map_[x + y * 8 + z * kNumWavesPerBank],\n      phase_integral,\n      phase_fractional);\n}\n\nvoid WavetableEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  \n  ONE_POLE(x_pre_lp_, parameters.timbre * 6.9999f, 0.2f);\n  ONE_POLE(y_pre_lp_, parameters.morph * 6.9999f, 0.2f);\n  ONE_POLE(z_pre_lp_, parameters.harmonics * 6.9999f, 0.05f);\n  \n  const float x = x_pre_lp_;\n  const float y = y_pre_lp_;\n  const float z = z_pre_lp_;\n  \n  const float quantization = min(max(z - 3.0f, 0.0f), 1.0f);\n  const float lp_coefficient = min(\n      max(2.0f * f0 * (4.0f - 3.0f * quantization), 0.01f), 0.1f);\n  \n  MAKE_INTEGRAL_FRACTIONAL(x);\n  MAKE_INTEGRAL_FRACTIONAL(y);\n  MAKE_INTEGRAL_FRACTIONAL(z);\n  \n  x_fractional += quantization * (Clamp(x_fractional, 16.0f) - x_fractional);\n  y_fractional += quantization * (Clamp(y_fractional, 16.0f) - y_fractional);\n  z_fractional += quantization * (Clamp(z_fractional, 16.0f) - z_fractional);\n  \n  ParameterInterpolator x_modulation(\n      &previous_x_, static_cast<float>(x_integral) + x_fractional, size);\n  ParameterInterpolator y_modulation(\n      &previous_y_, static_cast<float>(y_integral) + y_fractional, size);\n  ParameterInterpolator z_modulation(\n      &previous_z_, static_cast<float>(z_integral) + z_fractional, size);\n\n  ParameterInterpolator f0_modulation(&previous_f0_, f0, size);\n  \n  while (size--) {\n    const float f0 = f0_modulation.Next();\n    \n    const float gain = (1.0f / (f0 * 131072.0f)) * (0.95f - f0);\n    const float cutoff = min(kTableSizeF * f0, 1.0f);\n    \n    ONE_POLE(x_lp_, x_modulation.Next(), lp_coefficient);\n    ONE_POLE(y_lp_, y_modulation.Next(), lp_coefficient);\n    ONE_POLE(z_lp_, z_modulation.Next(), lp_coefficient);\n    \n    const float x = x_lp_;\n    const float y = y_lp_;\n    const float z = z_lp_;\n\n    MAKE_INTEGRAL_FRACTIONAL(x);\n    MAKE_INTEGRAL_FRACTIONAL(y);\n    MAKE_INTEGRAL_FRACTIONAL(z);\n\n    phase_ += f0;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n    }\n    \n    const float p = phase_ * kTableSizeF;\n    MAKE_INTEGRAL_FRACTIONAL(p);\n    \n    {\n      int x0 = x_integral;\n      int x1 = x_integral + 1;\n      int y0 = y_integral;\n      int y1 = y_integral + 1;\n      int z0 = z_integral;\n      int z1 = z_integral + 1;\n      \n      if (z0 >= 4) {\n        z0 = 7 - z0;\n      }\n      if (z1 >= 4) {\n        z1 = 7 - z1;\n      }\n      \n      float x0y0z0 = ReadWave(x0, y0, z0, p_integral, p_fractional);\n      float x1y0z0 = ReadWave(x1, y0, z0, p_integral, p_fractional);\n      float xy0z0 = x0y0z0 + (x1y0z0 - x0y0z0) * x_fractional;\n\n      float x0y1z0 = ReadWave(x0, y1, z0, p_integral, p_fractional);\n      float x1y1z0 = ReadWave(x1, y1, z0, p_integral, p_fractional);\n      float xy1z0 = x0y1z0 + (x1y1z0 - x0y1z0) * x_fractional;\n\n      float xyz0 = xy0z0 + (xy1z0 - xy0z0) * y_fractional;\n\n      float x0y0z1 = ReadWave(x0, y0, z1, p_integral, p_fractional);\n      float x1y0z1 = ReadWave(x1, y0, z1, p_integral, p_fractional);\n      float xy0z1 = x0y0z1 + (x1y0z1 - x0y0z1) * x_fractional;\n\n      float x0y1z1 = ReadWave(x0, y1, z1, p_integral, p_fractional);\n      float x1y1z1 = ReadWave(x1, y1, z1, p_integral, p_fractional);\n      float xy1z1 = x0y1z1 + (x1y1z1 - x0y1z1) * x_fractional;\n      \n      float xyz1 = xy0z1 + (xy1z1 - xy0z1) * y_fractional;\n\n      float mix = xyz0 + (xyz1 - xyz0) * z_fractional;\n      mix = diff_out_.Process(cutoff, mix) * gain;\n      *out++ = mix;\n      *aux++ = static_cast<float>(static_cast<int>(mix * 32.0f)) / 32.0f;\n    }\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine/wavetable_engine.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 8x8x3 wave terrain.\n\n#ifndef PLAITS_DSP_ENGINE_WAVETABLE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_WAVETABLE_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/wavetable_oscillator.h\"\n\nnamespace plaits {\n\nclass WavetableEngine : public Engine {\n public:\n  WavetableEngine() { }\n  ~WavetableEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data);\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  float ReadWave(int x, int y, int z, int phase_i, float phase_f);\n   \n  float phase_;\n  \n  float x_pre_lp_;\n  float y_pre_lp_;\n  float z_pre_lp_;\n  \n  float x_lp_;\n  float y_lp_;\n  float z_lp_;\n\n  float previous_x_;\n  float previous_y_;\n  float previous_z_;\n  float previous_f0_;\n  \n  // Maps a (bank, X, Y) coordinate to a waveform index.\n  // This allows all waveforms to be reshuffled by the user to create new maps.\n  const int16_t** wave_map_;\n  \n  Differentiator diff_out_;\n  \n  DISALLOW_COPY_AND_ASSIGN(WavetableEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_WAVETABLE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/arpeggiator.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Arpeggiator.\n\n#ifndef PLAITS_DSP_ENGINE_ARPEGGIATOR_H_\n#define PLAITS_DSP_ENGINE_ARPEGGIATOR_H_\n\n#include \"stmlib/utils/random.h\"\n\nnamespace plaits {\n\nenum ArpeggiatorMode {\n  ARPEGGIATOR_MODE_UP,\n  ARPEGGIATOR_MODE_DOWN,\n  ARPEGGIATOR_MODE_UP_DOWN,\n  ARPEGGIATOR_MODE_RANDOM,\n  ARPEGGIATOR_MODE_LAST\n};\n\nclass Arpeggiator{\n public:\n  Arpeggiator() { }\n  ~Arpeggiator() { }\n  \n  void Init() {\n    mode_ = ARPEGGIATOR_MODE_UP;\n    Reset();\n  }\n  \n  void Reset() {\n    note_ = 0;\n    octave_ = 0;\n    direction_ = 1;\n  }\n  \n  void set_mode(ArpeggiatorMode mode) {\n    mode_ = mode;\n  }\n  \n  void set_range(int range) {\n    range_ = range;\n  }\n  \n  inline int note() const { return note_; }\n  inline int octave() const { return octave_; }\n  \n  void Clock(int num_notes) {\n    if (num_notes == 1 && range_ == 1) {\n      note_ = octave_ = 0;\n      return;\n    }\n    \n    if (mode_ == ARPEGGIATOR_MODE_RANDOM) {\n      while (true) {\n        uint32_t w = stmlib::Random::GetWord();\n        int octave = (w >> 4) % range_;\n        int note = (w >> 20) % num_notes;\n        if (octave != octave_ || note != note_) {\n          octave_ = octave;\n          note_ = note;\n          break;\n        }\n      }\n      return;\n    }\n    \n    if (mode_ == ARPEGGIATOR_MODE_UP) {\n      direction_ = 1;\n    }\n\n    if (mode_ == ARPEGGIATOR_MODE_DOWN) {\n      direction_ = -1;\n    }\n    \n    note_ += direction_;\n    \n    bool done = false;\n    while (!done) {\n      done = true;\n      if (note_ >= num_notes || note_ < 0) {\n        octave_ += direction_;\n        note_= direction_ > 0 ? 0 : num_notes - 1;\n      }\n      if (octave_ >= range_ || octave_ < 0) {\n        octave_ = direction_ > 0 ? 0 : range_ - 1;\n        if (mode_ == ARPEGGIATOR_MODE_UP_DOWN) {\n          direction_ = -direction_;\n          note_ = direction_ > 0 ? 1 : num_notes - 2;\n          octave_ = direction_ > 0 ? 0 : range_ - 1;\n          done = false;\n        }\n      }\n    }\n  }\n  \n private:\n  ArpeggiatorMode mode_;\n  int range_;\n  \n  int note_;\n  int octave_;\n  int direction_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Arpeggiator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_ARPEGGIATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/chiptune_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chiptune waveforms with arpeggiator.\n\n#include \"plaits/dsp/engine2/chiptune_engine.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid ChiptuneEngine::Init(BufferAllocator* allocator) {\n  bass_.Init();\n  for (int i = 0; i < kChordNumNotes; ++i) {\n    voice_[i].Init();\n  }\n  \n  chords_.Init(allocator);\n  \n  arpeggiator_.Init();\n  \n  arpeggiator_pattern_selector_.Init(12, 0.075f, false);\n  \n  envelope_shape_ = NO_ENVELOPE;\n  envelope_state_ = 0.0f;\n  aux_envelope_amount_ = 0.0f;\n}\n\nvoid ChiptuneEngine::Reset() {\n  chords_.Reset();\n}\n\nvoid ChiptuneEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = NoteToFrequency(parameters.note);\n  const float shape = parameters.morph * 0.995f;\n  const bool clocked = !(parameters.trigger & TRIGGER_UNPATCHED);\n  float root_transposition = 1.0f;\n  \n  *already_enveloped = clocked;\n  \n  if (clocked) {\n    if (parameters.trigger & TRIGGER_RISING_EDGE) {\n      chords_.set_chord(parameters.harmonics);\n      chords_.Sort();\n\n      int pattern = arpeggiator_pattern_selector_.Process(parameters.timbre);\n      arpeggiator_.set_mode(ArpeggiatorMode(pattern / 3));\n      arpeggiator_.set_range(1 << (pattern % 3));\n      arpeggiator_.Clock(chords_.num_notes());\n      envelope_state_ = 1.0f;\n    }\n    const float octave = float(1 << arpeggiator_.octave());\n    const float note_f0 = f0 * chords_.sorted_ratio(\n        arpeggiator_.note()) * octave;\n    root_transposition = octave;\n    voice_[0].Render(note_f0, shape, out, size);\n  } else {\n    float ratios[kChordNumVoices];\n    float amplitudes[kChordNumVoices];\n\n    chords_.set_chord(parameters.harmonics);\n    chords_.ComputeChordInversion(parameters.timbre, ratios, amplitudes);\n    for (int j = 1; j < kChordNumVoices; j += 2) {\n      amplitudes[j] = -amplitudes[j];\n    }\n  \n    fill(&out[0], &out[size], 0.0f);\n    for (int voice = 0; voice < kChordNumVoices; ++voice) {\n      const float voice_f0 = f0 * ratios[voice];\n      voice_[voice].Render(voice_f0, shape, aux, size);\n      for (size_t j = 0; j < size; ++j) {\n        out[j] += aux[j] * amplitudes[voice];\n      }\n    }\n  }\n  \n  // Render bass note.\n  bass_.Render(f0 * 0.5f * root_transposition, aux, size);\n  \n  // Apply envelope if necessary.\n  if (envelope_shape_ != NO_ENVELOPE) {\n    const float shape = fabsf(envelope_shape_);\n    const float decay = 1.0f - \\\n        2.0f / kSampleRate * SemitonesToRatio(60.0f * shape) * shape;\n    float aux_envelope_amount = envelope_shape_ * 20.0f;\n    CONSTRAIN(aux_envelope_amount, 0.0f, 1.0f);\n    \n    for (size_t i = 0; i < size; ++i) {\n      ONE_POLE(aux_envelope_amount_, aux_envelope_amount, 0.01f);\n      envelope_state_ *= decay;\n      out[i] *= envelope_state_;\n      aux[i] *= 1.0f + aux_envelope_amount_ * (envelope_state_ - 1.0f);\n    }\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/chiptune_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chiptune waveforms with arpeggiator.\n\n#ifndef PLAITS_DSP_ENGINE_CHIPTUNE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_CHIPTUNE_ENGINE_H_\n\n#include \"plaits/dsp/chords/chord_bank.h\"\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/engine2/arpeggiator.h\"\n#include \"plaits/dsp/oscillator/nes_triangle_oscillator.h\"\n#include \"plaits/dsp/oscillator/super_square_oscillator.h\"\n\nnamespace plaits {\n\nclass ChiptuneEngine : public Engine {\n public:\n  ChiptuneEngine() { }\n  ~ChiptuneEngine() { }\n  \n  enum {\n    NO_ENVELOPE = 2\n  };\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n  inline void set_envelope_shape(float envelope_shape) {\n    envelope_shape_ = envelope_shape;\n  }\n  \n private:\n  SuperSquareOscillator voice_[kChordNumVoices];\n  NESTriangleOscillator<> bass_;\n  \n  ChordBank chords_;\n  Arpeggiator arpeggiator_;\n  stmlib::HysteresisQuantizer2 arpeggiator_pattern_selector_;\n  \n  float envelope_shape_;\n  float envelope_state_;\n  float aux_envelope_amount_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ChiptuneEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_CHIPTUNE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/phase_distortion_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Phase distortion and phase modulation with an asymmetric triangle as the\n// modulator.\n\n#include \"plaits/dsp/engine2/phase_distortion_engine.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid PhaseDistortionEngine::Init(BufferAllocator* allocator) {\n  modulator_.Init();\n  shaper_.Init();\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize * 4);\n}\n\nvoid PhaseDistortionEngine::Reset() {\n  \n}\n\nvoid PhaseDistortionEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const float f0 = 0.5f * NoteToFrequency(parameters.note);\n  const float modulator_f = min(0.25f, f0 * SemitonesToRatio(Interpolate(\n      lut_fm_frequency_quantizer,\n      parameters.harmonics,\n      128.0f)));\n  const float pw = 0.5f + parameters.morph * 0.49f;\n  const float amount = 8.0f * parameters.timbre * parameters.timbre * \\\n      (1.0f - modulator_f * 3.8f);\n  \n  // Upsample by 2x\n  float* synced = &temp_buffer_[0];\n  float* free_running = &temp_buffer_[2 * size];\n  shaper_.Render<true, true>(\n      f0, modulator_f, pw, 0.0f, amount, synced, 2 * size);\n  modulator_.Render<false, true>(\n      f0, modulator_f, pw, 0.0f, amount, free_running, 2 * size);\n  \n  for (size_t i = 0; i < size; ++i) {\n    // Naive 0.5x downsampling.\n    out[i] = 0.5f * Sine(*synced++ + 0.25f);\n    out[i] += 0.5f * Sine(*synced++ + 0.25f);\n    \n    aux[i] = 0.5f * Sine(*free_running++ + 0.25f);\n    aux[i] += 0.5f * Sine(*free_running++ + 0.25f);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/phase_distortion_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Phase distortion and phase modulation with an asymmetric triangle as the\n// modulator.\n\n#ifndef PLAITS_DSP_ENGINE_PHASE_DISTORTION_ENGINE_H_\n#define PLAITS_DSP_ENGINE_PHASE_DISTORTION_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/variable_shape_oscillator.h\"\n\nnamespace plaits {\n  \nclass PhaseDistortionEngine : public Engine {\n public:\n  PhaseDistortionEngine() { }\n  ~PhaseDistortionEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  VariableShapeOscillator shaper_;\n  VariableShapeOscillator modulator_;\n  float* temp_buffer_;\n  \n  DISALLOW_COPY_AND_ASSIGN(PhaseDistortionEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_PHASE_DISTORTION_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/six_op_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 6-operator FM synth.\n\n#include \"plaits/dsp/engine2/six_op_engine.h\"\n\n#include <algorithm>\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace fm;\nusing namespace std;\nusing namespace stmlib;\n\nvoid FMVoice::Init(fm::Algorithms<6>* algorithms, float sample_rate) {\n  voice_.Init(algorithms, sample_rate);\n  lfo_.Init(sample_rate);\n  \n  parameters_.sustain = false;\n  parameters_.gate = false;\n  parameters_.note = 48.0f;\n  parameters_.velocity = 0.5f;\n  parameters_.brightness = 0.5f;\n  parameters_.envelope_control = 0.5f;\n  parameters_.pitch_mod = 0.0f;\n  parameters_.amp_mod = 0.0f;\n  \n  patch_ = NULL;\n}\n\nvoid FMVoice::Render(float* buffer, size_t size) {\n  if (!patch_) {\n    return;\n  }\n  voice_.Render(parameters_, buffer, size);\n}\n\nvoid FMVoice::LoadPatch(const fm::Patch* patch) {\n  if (patch == patch_) {\n    return;\n  }\n  patch_ = patch;\n  voice_.SetPatch(patch_);\n  lfo_.Set(patch_->modulations);\n}\n\nconst int kNumPatchesPerBank = 96;\n\nvoid SixOpEngine::Init(BufferAllocator* allocator) {\n  patch_index_quantizer_.Init(kNumPatchesPerBank, 0.005f, false);\n\n  algorithms_.Init();\n  for (int i = 0; i < kNumSixOpVoices; ++i) {\n    voice_[i].Init(&algorithms_, kCorrectedSampleRate);\n  }\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize * 4);\n  acc_buffer_ = allocator->Allocate<float>(kMaxBlockSize * kNumSixOpVoices);\n  patches_ = allocator->Allocate<fm::Patch>(kNumPatchesPerBank);\n  \n  active_voice_ = kNumSixOpVoices - 1;\n  rendered_voice_ = 0;\n}\n\nvoid SixOpEngine::Reset() {\n  \n}\n\nvoid SixOpEngine::LoadUserData(const uint8_t* user_data) {\n  for (int i = 0; i < kNumPatchesPerBank; ++i) {\n    patches_[i].Unpack(user_data + i * fm::Patch::SYX_SIZE);\n  }\n  for (int i = 0; i < kNumSixOpVoices; ++i) {\n    voice_[i].UnloadPatch();\n  }\n}\n\nvoid SixOpEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  /*[eh2k] Sorry for the hack :-) \n  int patch_index = patch_index_quantizer_.Process(\n      parameters.harmonics * 1.02f);\n  */\n  if (parameters.trigger & TRIGGER_UNPATCHED) {\n    const float t = parameters.morph;\n    voice_[0].mutable_lfo()->Scrub(2.0f * kCorrectedSampleRate * t);\n\n    for (int i = 0; i < kNumSixOpVoices; ++i) {\n      voice_[i].LoadPatch(&patches_[patch_index]);\n      Voice<6>::Parameters* p = voice_[i].mutable_parameters();\n      p->sustain = i == 0 ? true : false;\n      p->gate = false;\n      p->note = parameters.note;\n      p->velocity = parameters.accent;\n      p->brightness = parameters.timbre;\n      p->envelope_control = t;\n      voice_[i].set_modulations(voice_[0].lfo());\n    }\n  } else {\n    if (parameters.trigger & TRIGGER_RISING_EDGE) {\n      active_voice_ = (active_voice_ + 1) % kNumSixOpVoices;\n      voice_[active_voice_].LoadPatch(&patches_[patch_index]);\n      voice_[active_voice_].mutable_lfo()->Reset();\n    }\n    Voice<6>::Parameters* p = voice_[active_voice_].mutable_parameters();\n    p->note = parameters.note;\n    p->velocity = parameters.accent;\n    p->envelope_control = parameters.morph;\n    voice_[active_voice_].mutable_lfo()->Step(float(size));\n    \n    for (int i = 0; i < kNumSixOpVoices; ++i) {\n      Voice<6>::Parameters* p = voice_[i].mutable_parameters();\n      p->brightness = parameters.timbre;\n      p->sustain = false;\n      p->gate = (parameters.trigger & TRIGGER_HIGH) && (i == active_voice_);\n      if (voice_[i].patch() != voice_[active_voice_].patch()) {\n        voice_[i].mutable_lfo()->Step(float(size));\n        voice_[i].set_modulations(voice_[i].lfo());\n      } else {\n        voice_[i].set_modulations(voice_[active_voice_].lfo());\n      }\n    }\n  }\n\n  // Naive block rendering.\n  // fill(temp_buffer_[0], temp_buffer_[size], 0.0f);\n  // for (int i = 0; i < kNumSixOpVoices; ++i) {\n  //   voice_[i].Render(temp_buffer_, size);\n  // }\n\n  // Staggered rendering.\n  copy(\n      &acc_buffer_[0],\n      &acc_buffer_[(kNumSixOpVoices - 1) * size],\n      &temp_buffer_[0]);\n  fill(\n      &temp_buffer_[(kNumSixOpVoices - 1) * size],\n      &temp_buffer_[kNumSixOpVoices * size],\n      0.0f);\n  rendered_voice_ = (rendered_voice_ + 1) % kNumSixOpVoices;\n  voice_[rendered_voice_].Render(temp_buffer_, size * kNumSixOpVoices);\n\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] = out[i] = SoftClip(temp_buffer_[i] * 0.25f);\n  }\n  copy(\n      &temp_buffer_[size],\n      &temp_buffer_[kNumSixOpVoices * size],\n      &acc_buffer_[0]);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/six_op_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// 6-operator FM synth.\n\n#ifndef PLAITS_DSP_ENGINE_SIX_OP_ENGINE_H_\n#define PLAITS_DSP_ENGINE_SIX_OP_ENGINE_H_\n\n#include \"stmlib/dsp/hysteresis_quantizer.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/fm/algorithms.h\"\n#include \"plaits/dsp/fm/lfo.h\"\n#include \"plaits/dsp/fm/voice.h\"\n#include \"plaits/dsp/fm/patch.h\"\n\nnamespace plaits {\n\nconst int kNumSixOpVoices = 2;\n\nclass FMVoice {\n public:\n  FMVoice() { }\n  ~FMVoice() { }\n  \n  void Init(fm::Algorithms<6>* algorithms, float sample_rate);\n  void LoadPatch(const fm::Patch* patch);\n  void Render(float* buffer, size_t size);\n  \n  inline void UnloadPatch() {\n    patch_ = NULL;\n  }\n  \n  inline const fm::Patch* patch() const {\n    return patch_;\n  }\n  \n  inline fm::Voice<6>::Parameters* mutable_parameters() {\n    return &parameters_;\n  }\n  \n  inline fm::Lfo* mutable_lfo() {\n    return &lfo_;\n  }\n  inline const fm::Lfo& lfo() const {\n    return lfo_;\n  }\n  \n  inline void set_modulations(const fm::Lfo& lfo) {\n    parameters_.pitch_mod = lfo.pitch_mod();\n    parameters_.amp_mod = lfo.amp_mod();\n  }\n  \n private:\n  const fm::Patch* patch_;\n\n  fm::Lfo lfo_;\n  fm::Voice<6> voice_;\n  fm::Voice<6>::Parameters parameters_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FMVoice);\n};\n\nclass SixOpEngine : public Engine {\n public:\n  SixOpEngine() { }\n  ~SixOpEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data);\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n      \n  void LoadBank(int bank);\n  uint8_t patch_index = 0; //[eh2k]\n  \n private:\n  stmlib::HysteresisQuantizer2 patch_index_quantizer_;\n  fm::Algorithms<6> algorithms_;\n  fm::Patch* patches_;\n  FMVoice voice_[kNumSixOpVoices];\n  float* temp_buffer_;\n  float* acc_buffer_;\n  int active_voice_;\n  int rendered_voice_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SixOpEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_SIX_OP_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/string_machine_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// String machine emulation with filter and chorus.\n\n#include \"plaits/dsp/engine2/string_machine_engine.h\"\n\n#include <algorithm>\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid StringMachineEngine::Init(BufferAllocator* allocator) {\n  for (int i = 0; i < kChordNumNotes; ++i) {\n    divide_down_voice_[i].Init();\n  }\n  chords_.Init(allocator);\n  morph_lp_ = 0.0f;\n  timbre_lp_ = 0.0f;\n  svf_[0].Init();\n  svf_[1].Init();\n  ensemble_.Init(allocator->Allocate<Ensemble::E::T>(1024));\n}\n\nvoid StringMachineEngine::Reset() {\n  chords_.Reset();\n  ensemble_.Reset();\n}\n\nconst int kRegistrationTableSize = 11;\nconst float registrations[kRegistrationTableSize][kChordNumHarmonics * 2] = {\n  { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },    // Saw\n  { 0.5f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f },    // Saw + saw\n  { 0.4f, 0.0f, 0.2f, 0.0f, 0.4f, 0.0f },    // Full saw\n  { 0.3f, 0.0f, 0.0f, 0.3f, 0.0f, 0.4f },    // Full saw + square hybrid\n  { 0.3f, 0.0f, 0.0f, 0.0f, 0.0f, 0.7f },    // Saw + high square harmo\n  { 0.2f, 0.0f, 0.0f, 0.2f, 0.0f, 0.6f },    // Weird hybrid\n  { 0.0f, 0.2f, 0.1f, 0.0f, 0.2f, 0.5f },    // Sawsquare high harmo\n  { 0.0f, 0.3f, 0.0f, 0.3f, 0.0f, 0.4f },    // Square high armo\n  { 0.0f, 0.4f, 0.0f, 0.3f, 0.0f, 0.3f },    // Full square\n  { 0.0f, 0.5f, 0.0f, 0.5f, 0.0f, 0.0f },    // Square + Square\n  { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f },    // Square\n};\n\nvoid StringMachineEngine::ComputeRegistration(\n    float registration,\n    float* amplitudes) {\n  registration *= (kRegistrationTableSize - 1.001f);\n  MAKE_INTEGRAL_FRACTIONAL(registration);\n  \n  for (int i = 0; i < kChordNumHarmonics * 2; ++i) {\n    float a = registrations[registration_integral][i];\n    float b = registrations[registration_integral + 1][i];\n    amplitudes[i] = a + (b - a) * registration_fractional;\n  }\n}\n\nvoid StringMachineEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  ONE_POLE(morph_lp_, parameters.morph, 0.1f);\n  ONE_POLE(timbre_lp_, parameters.timbre, 0.1f);\n\n  chords_.set_chord(parameters.harmonics);\n\n  float harmonics[kChordNumHarmonics * 2 + 2];\n  float registration = max(morph_lp_, 0.0f);\n  ComputeRegistration(registration, harmonics);\n  harmonics[kChordNumHarmonics * 2] = 0.0f;\n\n  // Render string/organ sound.\n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  const float f0 = NoteToFrequency(parameters.note) * 0.998f;\n  for (int note = 0; note < kChordNumNotes; ++note) {\n    const float note_f0 = f0 * chords_.ratio(note);\n    float divide_down_gain = 4.0f - note_f0 * 32.0f;\n    CONSTRAIN(divide_down_gain, 0.0f, 1.0f);\n    divide_down_voice_[note].Render(\n        note_f0,\n        harmonics,\n        0.25f * divide_down_gain,\n        note & 1 ? aux : out,\n        size);\n  }\n  \n  // Pass through VCF.\n  const float cutoff = 2.2f * f0 * SemitonesToRatio(120.0f * parameters.timbre);\n  svf_[0].set_f_q<FREQUENCY_DIRTY>(cutoff, 1.0f);\n  svf_[1].set_f_q<FREQUENCY_DIRTY>(cutoff * 1.5f, 1.0f);\n\n  // Mixdown.\n  for (size_t i = 0; i < size; ++i) {\n    const float l = svf_[0].Process<FILTER_MODE_LOW_PASS>(out[i]);\n    const float r = svf_[1].Process<FILTER_MODE_LOW_PASS>(aux[i]);\n    out[i] = 0.66f * l + 0.33f * r;\n    aux[i] = 0.66f * r + 0.33f * l;\n  }\n\n  // Ensemble FX.\n  const float amount = fabsf(parameters.timbre - 0.5f) * 2.0f;\n  const float depth = 0.35f + 0.65f * parameters.timbre;\n  ensemble_.set_amount(amount);\n  ensemble_.set_depth(depth);\n  ensemble_.Process(out, aux, size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/string_machine_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// String machine emulation with filter and chorus.\n\n#ifndef PLAITS_DSP_ENGINE_STRING_MACHINE_ENGINE_H_\n#define PLAITS_DSP_ENGINE_STRING_MACHINE_ENGINE_H_\n\n#include \"plaits/dsp/chords/chord_bank.h\"\n#include \"plaits/dsp/engine/chord_engine.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"plaits/dsp/fx/ensemble.h\"\n\nnamespace plaits {\n\nclass StringMachineEngine : public Engine {\n public:\n  StringMachineEngine() { }\n  ~StringMachineEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n\n private:\n  void ComputeRegistration(float registration, float* amplitudes);\n  \n  ChordBank chords_;\n  \n  Ensemble ensemble_;\n  StringSynthOscillator divide_down_voice_[kChordNumNotes];\n  stmlib::NaiveSvf svf_[2];\n  \n  float morph_lp_;\n  float timbre_lp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(StringMachineEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_STRING_MACHINE_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/virtual_analog_vcf_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Virtual analog with VCF.\n\n#include \"plaits/dsp/engine2/virtual_analog_vcf_engine.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\nusing namespace std;\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid VirtualAnalogVCFEngine::Init(BufferAllocator* allocator) {\n  oscillator_.Init();\n  sub_oscillator_.Init();\n  \n  svf_[0].Init();\n  svf_[1].Init();\n  \n  previous_sub_gain_ = 0.0f;\n  previous_cutoff_ = 0.0f;\n  previous_stage2_gain_ = 0.0f;\n  previous_q_ = 0.0f;\n  previous_gain_ = 0.0f;\n}\n\nvoid VirtualAnalogVCFEngine::Reset() {\n  \n}\n\nvoid VirtualAnalogVCFEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  // VA Oscillator (saw or PW square) + sub\n  const float f0 = NoteToFrequency(parameters.note);\n\n  float shape = (parameters.morph - 0.25f) * 2.0f + 0.5f;\n  CONSTRAIN(shape, 0.5f, 1.0f);\n\n  float pw = (parameters.morph - 0.5f) * 2.0f + 0.5f;\n  if (parameters.morph > 0.75f) {\n    pw = 2.5f - parameters.morph * 2.0f;\n  }\n  CONSTRAIN(pw, 0.5f, 0.98f);\n  \n  float sub_gain = max(fabsf(parameters.morph - 0.5f) - 0.3f, 0.0f) * 5.0f;\n\n  oscillator_.Render(f0, pw, shape, out, size);\n  sub_oscillator_.Render(f0 * 0.501f, 0.5f, 1.0f, aux, size);\n  \n  const float cutoff = f0 * SemitonesToRatio(\n      (parameters.timbre - 0.2f) * 120.0f);\n\n  float stage2_gain = 1.0f - (parameters.harmonics - 0.4f) * 4.0f;\n  CONSTRAIN(stage2_gain, 0.0f, 1.0f);\n  \n  const float resonance = 2.667f * \\\n      max(fabsf(parameters.harmonics - 0.5f) - 0.125f, 0.0f);\n  const float resonance_sqr = resonance * resonance;\n  const float q = resonance_sqr * resonance_sqr * 48.0f;\n  float gain = (parameters.harmonics - 0.7f) + 0.85f;\n  CONSTRAIN(gain, 0.7f - resonance_sqr * 0.3f, 1.0f);\n\n  ParameterInterpolator sub_gain_modulation(\n      &previous_sub_gain_, sub_gain, size);\n  ParameterInterpolator cutoff_modulation(\n      &previous_cutoff_, cutoff, size);\n  ParameterInterpolator stage2_gain_modulation(\n      &previous_stage2_gain_, stage2_gain, size);\n  ParameterInterpolator q_modulation(\n      &previous_q_, q, size);\n  ParameterInterpolator gain_modulation(&previous_gain_, gain, size);\n  \n  for (size_t i = 0; i < size; ++i) {\n    const float cutoff = min(cutoff_modulation.Next(), 0.25f);\n    const float q = q_modulation.Next();\n    const float stage2_gain = stage2_gain_modulation.Next();\n\n    svf_[0].set_f_q<FREQUENCY_FAST>(cutoff, 0.5f + q);\n    svf_[1].set_f_q<FREQUENCY_FAST>(cutoff, 0.5f + 0.025f * q);\n    \n    const float gain = gain_modulation.Next();\n    const float input = SoftClip(\n        (out[i] + aux[i] * sub_gain_modulation.Next()) * gain);\n    \n    float lp, hp;\n    svf_[0].Process<FILTER_MODE_LOW_PASS, FILTER_MODE_HIGH_PASS>(\n        input, &lp, &hp);\n\n    lp = SoftClip(lp * gain);\n    lp += stage2_gain * \\\n        (SoftClip(svf_[1].Process<FILTER_MODE_LOW_PASS>(lp)) - lp);\n    \n    out[i] = lp;\n    aux[i] = SoftClip(hp * gain);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/virtual_analog_vcf_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Virtual analog oscillator with VCF.\n\n#ifndef PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_VCF_ENGINE_H_\n#define PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_VCF_ENGINE_H_\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/variable_saw_oscillator.h\"\n#include \"plaits/dsp/oscillator/variable_shape_oscillator.h\"\n\nnamespace plaits {\n  \nclass VirtualAnalogVCFEngine : public Engine {\n public:\n  VirtualAnalogVCFEngine() { }\n  ~VirtualAnalogVCFEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) { }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  stmlib::Svf svf_[2];\n  VariableShapeOscillator oscillator_;\n  VariableShapeOscillator sub_oscillator_;\n  \n  float previous_cutoff_;\n  float previous_stage2_gain_;\n  float previous_q_;\n  float previous_gain_;\n  float previous_sub_gain_;\n  \n  DISALLOW_COPY_AND_ASSIGN(VirtualAnalogVCFEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_VCF_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/engine2/wave_terrain_engine.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Wave terrain synthesis.\n\n#include \"plaits/dsp/engine2/wave_terrain_engine.h\"\n\n#include <cmath>\n#include <algorithm>\n\n#include \"plaits/dsp/oscillator/wavetable_oscillator.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid WaveTerrainEngine::Init(BufferAllocator* allocator) {\n  path_.Init();\n  offset_ = 0.0f;\n  terrain_ = 0.0f;\n  temp_buffer_ = allocator->Allocate<float>(kMaxBlockSize * 4);\n  user_terrain_ = NULL;\n}\n\nvoid WaveTerrainEngine::Reset() {\n  \n}\n\ninline float TerrainLookup(float x, float y, const int8_t* terrain) {\n  const int terrain_size = 64;\n  const float value_scale = 1.0f / 128.0f;\n  const float coord_scale = float(terrain_size - 2) * 0.5f;\n\n  x = (x + 1.0f) * coord_scale;\n  y = (y + 1.0f) * coord_scale;\n\n  MAKE_INTEGRAL_FRACTIONAL(x);\n  MAKE_INTEGRAL_FRACTIONAL(y);\n  \n  float xy[2];\n  \n  terrain += y_integral * terrain_size;\n  xy[0] = InterpolateWave(terrain, x_integral, x_fractional);\n  terrain += terrain_size;\n  xy[1] = InterpolateWave(terrain, x_integral, x_fractional);\n  return (xy[0] + (xy[1] - xy[0]) * y_fractional) * value_scale;\n}\n\ntemplate<typename T>\ninline float InterpolateIntegratedWave(\n    const T* table,\n    int32_t index_integral,\n    float index_fractional) {\n  float a = static_cast<float>(table[index_integral]);\n  float b = static_cast<float>(table[index_integral + 1]);\n  float c = static_cast<float>(table[index_integral + 2]);\n  float t = index_fractional;\n  return (b - a) + (c - b - b + a) * t;\n}\n\n// The wavetables are stored in integrated form. Either we directly use the\n// integrated data (which can have large variations in amplitude), or we\n// differentiate it on the fly to recover the original waveform. This second\n// option can be noisier, and it would ideally need a low pass-filter.\n\n#define DIFFERENTIATE_WAVE_DATA\n\n// Lookup from the wavetable data re-interpreted as a terrain. :facepalm:\ninline float TerrainLookupWT(float x, float y, int bank) {\n  const int table_size = 128;\n  const int table_size_full = table_size + 4;  // Includes 4 wrapped samples\n  const int num_waves = 64;\n  const float sample = (y + 1.0f) * 0.5f * float(table_size);\n  const float wt = (x + 1.0f) * 0.5f * float(num_waves - 1);\n  \n  const int16_t* waves = wav_integrated_waves + \\\n      bank * num_waves * table_size_full;\n  \n  MAKE_INTEGRAL_FRACTIONAL(sample);\n  MAKE_INTEGRAL_FRACTIONAL(wt);\n  \n  float xy[2];\n#ifdef DIFFERENTIATE_WAVE_DATA\n  const float value_scale = 1.0f / 1024.0f;\n  waves += wt_integral * table_size_full;\n  xy[0] = InterpolateIntegratedWave(waves, sample_integral, sample_fractional);\n  waves += table_size_full;\n  xy[1] = InterpolateIntegratedWave(waves, sample_integral, sample_fractional);\n#else\n  const float value_scale = 1.0f / 32768.0f;\n  waves += wt_integral * table_size_full;\n  xy[0] = InterpolateWave(waves, sample_integral, sample_fractional);\n  waves += table_size_full;\n  xy[1] = InterpolateWave(waves, sample_integral, sample_fractional);\n#endif  // DIFFERENTIATE_WAVE_DATA\n  return (xy[0] + (xy[1] - xy[0]) * wt_fractional) * value_scale;\n}\n\ninline float Squash(float x, float a) {\n  x *= a;\n  return x / (1.0f + fabsf(x));\n}\n\ninline float WaveTerrainEngine::Terrain(float x, float y, int terrain_index) {\n  // The Sine function only works for a positive argument.\n  // Thus, all calls to Sine include a positive offset of the argument!\n  const float k = 4.0f;\n  switch (terrain_index) {\n    case 0:\n      {\n        return (Squash(Sine(k + x * 1.273f), 2.0f) - \\\n            Sine(k + y * (x + 1.571f) * 0.637f)) * 0.57f;\n      }\n      break;\n    case 1:\n      {\n        const float xy = x * y;\n        return Sine(k + Sine(k + (x + y) * 0.637f) / (0.2f + xy * xy) * 0.159f);\n      }\n      break;\n    case 2:\n      {\n        const float xy = x * y;\n        return Sine(k + Sine(k + 2.387f * xy) / (0.350f + xy * xy) * 0.159f);\n      }\n      break;\n    case 3:\n      {\n        const float xy = x * y;\n        const float xys = (x - 0.25f) * (y + 0.25f);\n        return Sine(k + xy / (2.0f + fabsf(5.0f * xys)) * 6.366f);\n      }\n      break;\n    case 4:\n      {\n        return Sine(\n          0.159f / (0.170f + fabsf(y - 0.25f)) + \\\n          0.477f / (0.350f + fabsf((x + 0.5f) * (y + 1.5f))) + k);\n      }\n      break;\n    case 5:\n    case 6:\n    case 7:\n      {\n        return TerrainLookupWT(x, y, 2 - (terrain_index - 5));\n      }\n      break;\n    case 8:\n      {\n        return TerrainLookup(x, y, user_terrain_);\n      }\n  }\n  return 0.0f;\n}\n\nvoid WaveTerrainEngine::Render(\n    const EngineParameters& parameters,\n    float* out,\n    float* aux,\n    size_t size,\n    bool* already_enveloped) {\n  const size_t kOversampling = 2;\n  const float kScale = 1.0f / float(kOversampling);\n\n  float* path_x = &temp_buffer_[0];\n  float* path_y = &temp_buffer_[kOversampling * size];\n  \n  const float f0 = NoteToFrequency(parameters.note);\n  const float attenuation = max(1.0f - 8.0f * f0, 0.0f);\n  const float radius = 0.1f + 0.9f * parameters.timbre * attenuation * \\\n      (2.0f - attenuation);\n\n  // Use the \"magic sine\" algorithm to generate sin and cos functions for the\n  // trajectory coordinates.\n  path_.RenderQuadrature(\n      f0 * kScale, radius, path_x, path_y, size * kOversampling);\n  \n  ParameterInterpolator offset(&offset_, 1.9f * parameters.morph - 1.0f, size);\n  int num_terrains = user_terrain_ ? 9 : 8;\n  ParameterInterpolator terrain(\n      &terrain_,\n      min(parameters.harmonics * 1.05f, 1.0f) * float(num_terrains - 1.0001f),\n      size);\n  \n  size_t ij = 0;\n  for (size_t i = 0; i < size; ++i) {\n    const float x_offset = offset.Next();\n    \n    const float z = terrain.Next();\n    MAKE_INTEGRAL_FRACTIONAL(z);\n\n    float out_s = 0.0f;\n    float aux_s = 0.0f;\n    \n    for (size_t j = 0; j < kOversampling; ++j) {\n      const float x = path_x[ij] * (1.0f - fabsf(x_offset)) + x_offset;\n      const float y = path_y[ij];\n      ++ij;\n      \n      const float z0 = Terrain(x, y, z_integral);\n      const float z1 = Terrain(x, y, z_integral + 1);\n      const float z = (z0 + (z1 - z0) * z_fractional);\n      out_s += z;\n      aux_s += y + z;\n    }\n    out[i] = kScale * out_s;\n    aux[i] = Sine(1.0f + 0.5f * kScale * aux_s);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/engine2/wave_terrain_engine.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Wave terrain synthesis - a 2D function evaluated along an elliptical path of\n// adjustable center and excentricity.\n//\n// This implementation initially used pre-computed terrains stored in flash\n// memory, but even at a poor resolution of 64x64 with 8-bit samples, this\n// takes 4kb per terrain! It turned out that directly evaluating the terrain\n// function on the fly uses less flash, but is also faster than bicubic\n// interpolation of the terrain data.\n\n#ifndef PLAITS_DSP_ENGINE_WAVE_TERRAIN_ENGINE_H_\n#define PLAITS_DSP_ENGINE_WAVE_TERRAIN_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n  \nclass WaveTerrainEngine : public Engine {\n public:\n  WaveTerrainEngine() { }\n  ~WaveTerrainEngine() { }\n  \n  virtual void Init(stmlib::BufferAllocator* allocator);\n  virtual void Reset();\n  virtual void LoadUserData(const uint8_t* user_data) {\n    user_terrain_ = (const int8_t*)(user_data);\n  }\n  virtual void Render(const EngineParameters& parameters,\n      float* out,\n      float* aux,\n      size_t size,\n      bool* already_enveloped);\n  \n private:\n  float Terrain(float x, float y, int terrain_index);\n  \n  FastSineOscillator path_;\n  float offset_;\n  float terrain_;\n  \n  float* temp_buffer_;\n  const int8_t* user_terrain_;\n  \n  DISALLOW_COPY_AND_ASSIGN(WaveTerrainEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENGINE_WAVE_TERRAIN_ENGINE_H_"
  },
  {
    "path": "lib/plaits/dsp/envelope.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Envelope for the internal LPG.\n\n#ifndef PLAITS_DSP_ENVELOPE_H_\n#define PLAITS_DSP_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace plaits {\n\nclass LPGEnvelope {\n public:\n  LPGEnvelope() { }\n  ~LPGEnvelope() { }\n  \n  inline void Init() {\n    vactrol_state_ = 0.0f;\n    gain_ = 1.0f;\n    frequency_ = 0.5f;\n    hf_bleed_ = 0.0f;\n    ramp_up_ = false;\n  }\n  \n  inline void Trigger() {\n    ramp_up_ = true;\n  }\n  \n  inline void ProcessPing(\n      float attack,\n      float short_decay,\n      float decay_tail,\n      float hf) {\n    if (ramp_up_) {\n      vactrol_state_ += attack;\n      if (vactrol_state_ >= 1.0f) {\n        vactrol_state_ = 1.0f;\n        ramp_up_ = false;\n      }\n    }\n    ProcessLP(ramp_up_ ? vactrol_state_ : 0.0f, short_decay, decay_tail, hf);\n  }\n  \n  inline void ProcessLP(\n      float level,\n      float short_decay,\n      float decay_tail,\n      float hf) {\n    float vactrol_input = level;\n    float vactrol_error = (vactrol_input - vactrol_state_);\n    float vactrol_state_2 = vactrol_state_ * vactrol_state_;\n    float vactrol_state_4 = vactrol_state_2 * vactrol_state_2;\n    float tail = 1.0f - vactrol_state_;\n    float tail_2 = tail * tail;\n    float vactrol_coefficient = (vactrol_error > 0.0f)\n        ? 0.6f\n        : short_decay + (1.0f - vactrol_state_4) * decay_tail;\n    vactrol_state_ += vactrol_coefficient * vactrol_error;\n    \n    gain_ = vactrol_state_;\n    frequency_ = 0.003f + 0.3f * vactrol_state_4 + hf * 0.04f;\n    hf_bleed_ = (tail_2 + (1.0f - tail_2) * hf) * hf * hf;\n  }\n  \n  inline float gain() const { return gain_; }\n  inline float frequency() const { return frequency_; }\n  inline float hf_bleed() const { return hf_bleed_; }\n  \n private:\n  float vactrol_state_;\n  float gain_;\n  float frequency_;\n  float hf_bleed_;\n  bool ramp_up_;\n  \n  DISALLOW_COPY_AND_ASSIGN(LPGEnvelope);\n};\n\nclass DecayEnvelope {\n public:\n  DecayEnvelope() { }\n  ~DecayEnvelope() { }\n  \n  inline void Init() {\n    value_ = 0.0f;\n  }\n  \n  inline void Trigger() {\n    value_ = 1.0f;\n  }\n  \n  inline void Process(float decay) {\n    value_ *= (1.0f - decay);\n  }\n  \n  inline float value() const { return value_; }\n  \n private:\n  float value_;\n  \n  DISALLOW_COPY_AND_ASSIGN(DecayEnvelope);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_ENVELOPE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/algorithms.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FM Algorithms and how to render them.\n\n#include \"plaits/dsp/fm/algorithms.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\n#define MOD(n) (n << 4)\n#define ADD(n) (n | Algorithms<4>::ADDITIVE_FLAG)\n#define OUT(n) n\n#define FB_SRC Algorithms<4>::FEEDBACK_SOURCE_FLAG\n#define FB_DST MOD(3)\n#define FB FB_SRC | FB_DST\n\n// Syntactic sugar\n#define NO_MOD MOD(0)\n  \n// This can be replaced by OUT(0) for code that does not mix into the output buffer.\n#define OUTPUT ADD(0)\n  \n/* static */\ntemplate<>\nconst uint8_t Algorithms<4>::opcodes_[8][4] = {\n  {\n    // Algorithm 1: 4 -> 3 -> 2 -> 1\n    FB | OUT(1),\n    MOD(1) | OUT(1),\n    MOD(1) | OUT(1),\n    MOD(1) | OUTPUT\n  },\n  {\n    // Algorithm 2: 4 + 3 -> 2 -> 1\n    FB | OUT(1),\n    ADD(1),\n    MOD(1) | OUT(1),\n    MOD(1) | OUTPUT\n  },\n  {\n    // Algorithm 3: 4 + (3 -> 2) -> 1\n    FB | OUT(1),\n    OUT(2),\n    MOD(2) | ADD(1),\n    MOD(1) | OUTPUT\n  },\n  {\n    // Algorithm 4: (4 -> 3) + 2 -> 1\n    FB | OUT(1),\n    MOD(1) | OUT(1),\n    ADD(1),\n    MOD(1) | OUTPUT\n  },\n  {\n    // Algorithm 5: (4 -> 3) + (2 -> 1)\n    FB | OUT(1),\n    MOD(1) | OUTPUT,\n    OUT(1),\n    MOD(1) | ADD(0)\n  },\n  {\n    // Algorithm 6: (4 -> 3) + (4 -> 2) + (4 -> 1)\n    FB | OUT(1),\n    MOD(1) | OUTPUT,\n    MOD(1) | ADD(0),\n    MOD(1) | ADD(0)\n  },\n  {\n    // Algorithm 7: (4 -> 3) + 2 + 1\n    FB | OUT(1),\n    MOD(1) | OUTPUT,\n    ADD(0),\n    ADD(0)\n  },\n  {\n    // Algorithm 8: 4 + 3 + 2 + 1\n    FB | OUTPUT,\n    ADD(0),\n    ADD(0),\n    ADD(0)\n  }\n};\n\n/* static */\ntemplate<>\nconst uint8_t Algorithms<6>::opcodes_[32][6] = {\n  {\n     // Algorithm 1\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 2\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     FB | OUT(1),               // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 3\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 4\n     FB_DST | NO_MOD | OUT(1),  // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     FB_SRC | MOD(1) | OUTPUT,  // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 5\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     NO_MOD | OUT(1),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 6\n     FB_DST | NO_MOD | OUT(1),  // Op 6\n     FB_SRC | MOD(1) | OUTPUT,  // Op 5\n     NO_MOD | OUT(1),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 7\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     NO_MOD | ADD(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 8\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     FB | ADD(1),               // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 9\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     NO_MOD | ADD(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     FB | OUT(1),               // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 10\n     NO_MOD | OUT(1),           // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     FB | OUT(1),               // Op 3\n     MOD(1) | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 11\n     FB | OUT(1),               // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 12\n     NO_MOD | OUT(1),           // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     NO_MOD | ADD(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     FB | OUT(1),               // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 13\n     FB | OUT(1),               // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     NO_MOD | ADD(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 14\n     FB | OUT(1),               // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 15\n     NO_MOD | OUT(1),           // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | OUTPUT,           // Op 3\n     FB | OUT(1),               // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 16\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     NO_MOD | OUT(2),           // Op 4\n     MOD(2) | ADD(1),           // Op 3\n     NO_MOD | ADD(1),           // Op 2\n     MOD(1) | OUTPUT            // Op 1\n  },\n  {\n     // Algorithm 17\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     NO_MOD | OUT(2),           // Op 4\n     MOD(2) | ADD(1),           // Op 3\n     FB | ADD(1),               // Op 2\n     MOD(1) | OUTPUT            // Op 1\n  },\n  {\n     // Algorithm 18\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUT(1),           // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     FB | ADD(1),               // Op 3\n     NO_MOD | ADD(1),           // Op 2\n     MOD(1) | OUTPUT            // Op 1\n  },\n  {\n     // Algorithm 19\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 20\n     NO_MOD | OUT(1),           // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     FB | OUT(1),               // Op 3\n     MOD(1) | ADD(0),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 21\n     NO_MOD | OUT(1),           // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     FB | OUT(1),               // Op 3\n     MOD(1) | ADD(0),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 22\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 23\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 24\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 25\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     MOD(1) | ADD(0),           // Op 4\n     NO_MOD | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 26\n     FB | OUT(1),               // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     NO_MOD | OUT(1),           // Op 3\n     MOD(1) | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 27\n     NO_MOD | OUT(1),           // Op 6\n     NO_MOD | ADD(1),           // Op 5\n     MOD(1) | OUTPUT,           // Op 4\n     FB | OUT(1),               // Op 3\n     MOD(1) | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 28\n     NO_MOD | OUTPUT,           // Op 6\n     FB | OUT(1),               // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | OUT(1),           // Op 2\n     MOD(1) | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 29\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     NO_MOD | OUT(1),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 30\n     NO_MOD | OUTPUT,           // Op 6\n     FB | OUT(1),               // Op 5\n     MOD(1) | OUT(1),           // Op 4\n     MOD(1) | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 31\n     FB | OUT(1),               // Op 6\n     MOD(1) | OUTPUT,           // Op 5\n     NO_MOD | ADD(0),           // Op 4\n     NO_MOD | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  },\n  {\n     // Algorithm 32\n     FB | OUTPUT,               // Op 6\n     NO_MOD | ADD(0),           // Op 5\n     NO_MOD | ADD(0),           // Op 4\n     NO_MOD | ADD(0),           // Op 3\n     NO_MOD | ADD(0),           // Op 2\n     NO_MOD | ADD(0)            // Op 1\n  }\n};\n\n#define INSTANTIATE_RENDERER(n, m, a) { n, m, a, &RenderOperators<n, m, a> }\n\n/* static */\ntemplate<>\nconst Algorithms<4>::RendererSpecs Algorithms<4>::renderers_[] = {\n  // Core\n  INSTANTIATE_RENDERER(1, -2, false),\n  INSTANTIATE_RENDERER(1, -2, true),\n  INSTANTIATE_RENDERER(1, -1, false),\n  INSTANTIATE_RENDERER(1, -1, true),\n  INSTANTIATE_RENDERER(1,  0, false),\n  INSTANTIATE_RENDERER(1,  0, true),\n  \n  // Optimized\n  /*INSTANTIATE_RENDERER(4, -1, true),\n  INSTANTIATE_RENDERER(4,  0, true),\n  INSTANTIATE_RENDERER(2, -1, true),\n  INSTANTIATE_RENDERER(2,  0, false),\n  INSTANTIATE_RENDERER(2,  0, true),*/\n\n  { 0, 0, 0, NULL}\n};\n\n/* static */\ntemplate<>\nconst Algorithms<6>::RendererSpecs Algorithms<6>::renderers_[] = {\n  // Core\n  INSTANTIATE_RENDERER(1, -2, false),\n  INSTANTIATE_RENDERER(1, -2, true),\n  INSTANTIATE_RENDERER(1, -1, false),\n  INSTANTIATE_RENDERER(1, -1, true),\n  INSTANTIATE_RENDERER(1,  0, false),\n  INSTANTIATE_RENDERER(1,  0, true),\n  \n  // Pesky feedback loops spanning several operators\n  INSTANTIATE_RENDERER(3,  2, true),\n  INSTANTIATE_RENDERER(2,  1, true),\n\n  // Optimized\n  /*INSTANTIATE_RENDERER(4, -1, true),\n  INSTANTIATE_RENDERER(4,  0, true),\n  INSTANTIATE_RENDERER(3, -1, false),\n  INSTANTIATE_RENDERER(3, -1, true),\n  INSTANTIATE_RENDERER(3,  0, true),\n  INSTANTIATE_RENDERER(2, -2, true),\n  INSTANTIATE_RENDERER(2, -1, false),\n  INSTANTIATE_RENDERER(2, -1, true),\n  INSTANTIATE_RENDERER(2,  0, false),\n  INSTANTIATE_RENDERER(2,  0, true),*/\n\n  { 0, 0, 0, NULL}\n};\n\n}  // namespace fm\n  \n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/fm/algorithms.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FM Algorithms and how to render them.\n\n#ifndef PLAITS_DSP_FM_ALGORITHMS_H_\n#define PLAITS_DSP_FM_ALGORITHMS_H_\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"plaits/dsp/fm/operator.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nnamespace fm {\n\n// Number of algorithms as a function of the number of operators.\ntemplate<int num_operators> struct NumAlgorithms { enum { N = 1 }; };\ntemplate<> struct NumAlgorithms<4> { enum { N = 8 }; };\ntemplate<> struct NumAlgorithms<6> { enum { N = 32 }; };\n\n// Store information about all FM algorithms, and which functions to call\n// to render them.\n// \n// The raw structure of each algorithm is stored as a sequence of \"opcodes\",\n// where each opcode indicates, for each operator, from where does it get\n// its phase modulation signal and to which buffer it writes the result.\n// This data is compact - 1 byte / algorithm / operator.\n//\n// At run time, this data is \"compiled\" into a sequence of function calls\n// to pre-compiled renderers. A renderer is specialized to efficiently render\n// (without any branching, and as much loop unrolling as possible) one\n// operator or a group of operators.\n//\n// Different code space and speed trade-off can be obtained by increasing the\n// palette of available renderers (for example by specializing the code for\n// a renderer rendering in a single pass a \"tower\" of 4 operators).\ntemplate<int num_operators>\nclass Algorithms {\n public:\n  Algorithms() { }\n  ~Algorithms() { }\n  \n  enum {\n    NUM_ALGORITHMS = NumAlgorithms<num_operators>::N\n  };\n  \n  enum OpcodeFlags {\n    DESTINATION_MASK = 0x03,\n    SOURCE_MASK = 0x30,\n    SOURCE_FEEDBACK = 0x30,\n    ADDITIVE_FLAG = 0x04,\n    FEEDBACK_SOURCE_FLAG = 0x40,\n  };\n  \n  struct RenderCall {\n    RenderFn render_fn;\n    int n;\n    int input_index;\n    int output_index;\n  };\n  \n  inline void Init() {\n    for (int i = 0; i < NUM_ALGORITHMS; ++i) {\n      Compile(i);\n    }\n  }\n  \n  inline const RenderCall& render_call(int algorithm, int op) const {\n    return render_call_[algorithm][op];\n  }\n  \n  inline bool is_modulator(int algorithm, int op) const {\n    return opcodes_[algorithm][op] & DESTINATION_MASK;\n  }\n  \n private:\n  struct RendererSpecs {\n    int n;\n    int modulation_source;\n    bool additive;\n    RenderFn render_fn;\n  };\n     \n  inline RenderFn GetRenderer(int n, int modulation_source, bool additive) {\n    for (const RendererSpecs* r = renderers_; r->n; ++r) {\n      if (r->n == n && \\\n          r->modulation_source == modulation_source && \\\n          r->additive == additive) {\n        return r->render_fn;\n      }\n    }\n    return NULL;\n  }\n  \n  inline void Compile(int algorithm) {\n    const uint8_t* opcodes = opcodes_[algorithm];\n    for (int i = 0; i < num_operators; ) {\n      uint8_t opcode = opcodes[i];\n\n      int n = 1;\n    \n      while (i + n < num_operators) {\n        uint8_t from = opcodes[i + n - 1];\n        uint8_t to = (opcodes[i + n] & SOURCE_MASK) >> 4;\n\n        bool has_additive = from & ADDITIVE_FLAG;\n        bool broken = (from & DESTINATION_MASK) != to;\n\n        if (has_additive || broken) {\n          if (to == (opcode & DESTINATION_MASK)) {\n            // If the same modulation happens to be reused by subsequent\n            // operators (algorithms 19 to 25), discard the chain.\n            n = 1;\n          }\n          break;\n        }\n        ++n;\n      }\n    \n      // Try to find if a pre-compiled renderer is available for this chain.\n      for (int attempt = 0; attempt < 2; ++attempt) {\n        uint8_t out_opcode = opcodes[i + n - 1];\n        bool additive = out_opcode & ADDITIVE_FLAG;\n      \n        int modulation_source = -3;\n        if (!(opcode & SOURCE_MASK)) {\n          modulation_source = -1;\n        } else if ((opcode & SOURCE_MASK) != SOURCE_FEEDBACK) {\n          modulation_source = -2;\n        } else {\n          for (int j = 0; j < n; ++j) {\n            if (opcodes[i + j] & FEEDBACK_SOURCE_FLAG) {\n              modulation_source = j;\n            }\n          }\n        }\n        RenderFn fn = GetRenderer(n, modulation_source, additive);\n        if (fn) {\n          RenderCall* call = &render_call_[algorithm][i];\n          call->render_fn = fn;\n          call->n = n;\n          call->input_index = (opcode & SOURCE_MASK) >> 4;\n          call->output_index = out_opcode & DESTINATION_MASK;\n          // printf(\"  Algo %02d. Op %d uses renderer (%d, %d, %d)\\n\",\n          //        algorithm + 1,\n          //        num_operators - i,\n          //        n, modulation_source, additive);\n          break;\n        } else {\n          // printf(\"! Algo %02d. Op %d: no renderer for (%d, %d, %d)\\n\",\n          //        algorithm + 1,\n          //        num_operators - i,\n          //        n, modulation_source, additive);\n          if (n == 1) {\n            // assert(false);\n          } else {\n            n = 1;\n          }\n        }\n      }\n      i += n;\n    }\n  }\n  \n  RenderCall render_call_[NUM_ALGORITHMS][num_operators];\n  static const uint8_t opcodes_[NUM_ALGORITHMS][num_operators];\n  static const RendererSpecs renderers_[];\n  \n  DISALLOW_COPY_AND_ASSIGN(Algorithms);\n};\n\n/* static */\ntemplate<> const uint8_t Algorithms<4>::opcodes_[][4];  // From DX100\n\n/* static */\ntemplate<> const Algorithms<4>::RendererSpecs Algorithms<4>::renderers_[];\n\n/* static */\ntemplate<> const uint8_t Algorithms<6>::opcodes_[][6];  // From DX7\n\n/* static */\ntemplate<> const Algorithms<6>::RendererSpecs Algorithms<6>::renderers_[];\n\n}  // namespace fm\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_ALGORITHMS_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/dx_units.cc",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Various conversion routines for DX7 patch data.\n\n#include \"plaits/dsp/fm/dx_units.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\n/* extern */\nconst float lut_coarse[32] = {\n -12.000000f,\n   0.000000f,\n  12.000000f,\n  19.019550f,\n  24.000000f,\n  27.863137f,\n  31.019550f,\n  33.688259f,\n  36.000000f,\n  38.039100f,\n  39.863137f,\n  41.513180f,\n  43.019550f,\n  44.405276f,\n  45.688259f,\n  46.882687f,\n  48.000000f,\n  49.049554f,\n  50.039100f,\n  50.975130f,\n  51.863137f,\n  52.707809f,\n  53.513180f,\n  54.282743f,\n  55.019550f,\n  55.726274f,\n  56.405276f,\n  57.058650f,\n  57.688259f,\n  58.295772f,\n  58.882687f,\n  59.450356f\n};\n\n/* extern */\nconst float lut_amp_mod_sensitivity[4] = {\n  0.0f,\n  0.2588f,\n  0.4274f,\n  1.0f\n};\n  \n/* extern */\nconst float lut_pitch_mod_sensitivity[8] = {\n  0.0f,\n  0.0781250f,\n  0.1562500f,\n  0.2578125f,\n  0.4296875f,\n  0.7187500f,\n  1.1953125f,\n  2.0f\n};\n\n/* extern */\nconst float lut_cube_root[17] = {\n  0.0f,\n  0.39685062976f,\n  0.50000000000f,\n  0.57235744065f,\n  0.62996081605f,\n  0.67860466725f,\n  0.72112502092f,\n  0.75914745216f,\n  0.79370070937f,\n  0.82548197054f,\n  0.85498810729f,\n  0.88258719406f,\n  0.90856038354f,\n  0.93312785379f,\n  0.95646563396f,\n  0.97871693135f,\n  1.0f\n};\n\n\n}  // namespace fm\n  \n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/fm/dx_units.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Various \"magic\" conversion functions for DX7 patch data.\n\n#ifndef PLAITS_DSP_DX_UNITS_H_\n#define PLAITS_DSP_DX_UNITS_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include <algorithm>\n#include <cmath>\n\n#include \"plaits/dsp/fm/patch.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\nextern const float lut_cube_root[17];\nextern const float lut_amp_mod_sensitivity[4];\nextern const float lut_pitch_mod_sensitivity[8];\nextern const float lut_coarse[32];\n\n// Computes 2^x by using a polynomial approximation of 2^frac(x) and directly\n// incrementing the exponent of the IEEE 754 representation of the result\n// by int(x). Depending on the use case, the order of the polynomial\n// approximation can be chosen.\ntemplate<int order>\ninline float Pow2Fast(float x) {\n  union {\n    float f;\n    int32_t w;\n  } r;\n\n  \n  if (order == 1) {\n    r.w = float(1 << 23) * (127.0f + x);\n    return r.f;\n  }\n  \n  int32_t x_integral = static_cast<int32_t>(x);\n  if (x < 0.0f) {\n    --x_integral;\n  }\n  x -= static_cast<float>(x_integral);\n\n  if (order == 1) {\n    r.f = 1.0f + x;\n  } else if (order == 2) {\n    r.f = 1.0f + x * (0.6565f + x * 0.3435f);\n  } else if (order == 3) {\n    r.f = 1.0f + x * (0.6958f + x * (0.2251f + x * 0.0791f));\n  }\n  r.w += x_integral << 23;\n  return r.f;\n}\n\n// Convert an operator (envelope) level from 0-99 to the complement of the\n// \"TL\" value.\n//   0 =   0  (TL = 127)\n//  20 =  48  (TL =  79)\n//  50 =  78  (TL =  49)\n//  99 = 127  (TL =   0)\ninline int OperatorLevel(int level) {\n  int tlc = int(level);\n  if (level < 20) {\n    tlc = tlc < 15 ? (tlc * (36 - tlc)) >> 3 : 27 + tlc;\n  } else {\n    tlc += 28;\n  }\n  return tlc;\n}\n\n// Convert an envelope level from 0-99 to an octave shift.\n//  0 = -4 octave\n// 18 = -1 octave\n// 50 =  0\n// 82 = +1 octave\n// 99 = +4 octave\ninline float PitchEnvelopeLevel(int level) {\n  float l = (float(level) - 50.0f) / 32.0f;\n  float tail = std::max(fabsf(l + 0.02f) - 1.0f, 0.0f);\n  return l * (1.0f + tail * tail * 5.3056f);\n}\n\n// Convert an operator envelope rate from 0-99 to a frequency.\ninline float OperatorEnvelopeIncrement(int rate) {\n  int rate_scaled = (rate * 41) >> 6;\n  int mantissa = 4 + (rate_scaled & 3);\n  int exponent = 2 + (rate_scaled >> 2);\n  return float(mantissa << exponent) / float(1 << 24);\n}\n\n// Convert a pitch envelope rate from 0-99 to a frequency.\ninline float PitchEnvelopeIncrement(int rate) {\n  float r = float(rate) * 0.01f;\n  return (1.0f + 192.0f * r * (r * r * r * r + 0.3333f)) / (21.3f * 44100.0f);\n}\n\nconst float kMinLFOFrequency = 0.005865f;\n\n// Convert an LFO rate from 0-99 to a frequency.\ninline float LFOFrequency(int rate) {\n  int rate_scaled = rate == 0 ? 1 : (rate * 165) >> 6;\n  rate_scaled *= rate_scaled < 160 ? 11 : (11 + ((rate_scaled - 160) >> 4));\n  return float(rate_scaled) * kMinLFOFrequency;\n}\n\n// Convert an LFO delay from 0-99 to the two increments.\ninline void LFODelay(int delay, float increments[2]) {\n  if (delay == 0) {\n    increments[0] = increments[1] = 100000.0f;\n  } else {\n    int d = 99 - delay;\n    d = (16 + (d & 15)) << (1 + (d >> 4));\n    increments[0] = float(d) * kMinLFOFrequency;\n    increments[1] = float(std::max(0x80, d & 0xff80)) * kMinLFOFrequency;\n  }\n}\n\n// Pre-process the velocity to easily compute the velocity scaling.\ninline float NormalizeVelocity(float velocity) {\n  // float cube_root = stmlib::Sqrt(\n  //     0.7f * stmlib::Sqrt(velocity) + 0.3f * velocity);\n  const float cube_root = stmlib::Interpolate(lut_cube_root, velocity, 16);\n  return 16.0f * (cube_root - 0.918f);\n}\n\n// MIDI note to envelope increment ratio.\ninline float RateScaling(float note, int rate_scaling) {\n  return Pow2Fast<1>(\n      float(rate_scaling) * (note * 0.33333f - 7.0f) * 0.03125f);\n}\n\n// Operator amplitude modulation sensitivity (0-3).\ninline float AmpModSensitivity(int amp_mod_sensitivity) {\n  return lut_amp_mod_sensitivity[amp_mod_sensitivity];\n}\n\n// Pitch modulation sensitivity (0-7).\ninline float PitchModSensitivity(int pitch_mod_sensitivity) {\n  return lut_pitch_mod_sensitivity[pitch_mod_sensitivity];\n}\n\n// Keyboard tracking to TL adjustment.\ninline float KeyboardScaling(float note, const Patch::KeyboardScaling& ks) {\n  const float x = note - float(ks.break_point) - 15.0f;\n  const int curve = x > 0.0f ? ks.right_curve : ks.left_curve;\n\n  float t = fabsf(x);\n  if (curve == 1 || curve == 2) {\n    t = std::min(t * 0.010467f, 1.0f);\n    t = t * t * t;\n    t *= 96.0f;\n  }\n  if (curve < 2) {\n    t = -t;\n  }\n\n  float depth = float(x > 0.0f ? ks.right_depth : ks.left_depth);\n  return t * depth * 0.02677f;\n}\n\ninline float FrequencyRatio(const Patch::Operator& op) {\n  const float detune = op.mode == 0 && op.fine\n      ? 1.0f + 0.01f * float(op.fine)\n      : 1.0f;\n\n  float base = op.mode == 0\n      ? lut_coarse[op.coarse]\n      : float(int(op.coarse & 3) * 100 + op.fine) * 0.39864f;\n  base += (float(op.detune) - 7.0f) * 0.015f;\n\n  return stmlib::SemitonesToRatioSafe(base) * detune;\n}\n\n}  // namespace fm\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_DX_UNITS_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/envelope.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Multi-segment envelope generator.\n//\n// The classic constant-time design (as found in many other MI products) might\n// cause differences in behavior from the original DX-series envelopes, in\n// particular when jumping to the last segment before having reached the sustain\n// phase.\n//\n// The unusual RenderAtSample() method allows the evaluation of the envelope at\n// an arbitrary point in time, used in Plaits' \"envelope scrubbing\" feature.\n//\n// A couple of quirks from the DX-series' operator envelopes are implemented,\n// namely:\n// - vaguely logarithmic shape for ascending segments.\n// - direct jump above a threshold for ascending segments.\n// - specific logic and rates for plateaus.\n\n#ifndef PLAITS_DSP_FM_ENVELOPE_H_\n#define PLAITS_DSP_FM_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"plaits/dsp/fm/dx_units.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\ntemplate<int num_stages=4, bool reshape_ascending_segments=false>\nclass Envelope {\n public:\n  Envelope() { }\n  ~Envelope() { }\n  \n  enum {\n    NUM_STAGES = num_stages,\n    PREVIOUS_LEVEL = -100\n  };\n  \n  inline void Init() {\n    Init(1.0f);\n  }\n  \n  inline void Init(float scale) {\n    scale_ = scale;\n    stage_ = num_stages - 1;\n    phase_ = 1.0f;\n    start_ = 0.0f;\n    for (int i = 0; i < num_stages; ++i) {\n      increment_[i] = 0.001f;\n      level_[i] = 1.0f / float(1 << i);\n    }\n    level_[num_stages - 1] = 0.0f;\n  }\n\n  // Directly copy the variables.\n  void Set(const float increment[num_stages], const float level[num_stages]) {\n    std::copy(&increment[0], &increment[num_stages], &increment_[0]);\n    std::copy(&level[0], &level[num_stages], &level_[0]);\n  }\n  \n  inline float RenderAtSample(float t, const float gate_duration) {\n    if (t > gate_duration) {\n      // Check how far we are into the release phase.\n      const float phase = (t - gate_duration) * increment_[num_stages - 1];\n      return phase >= 1.0f\n          ? level_[num_stages - 1]\n          : value(num_stages - 1, phase,\n                RenderAtSample(gate_duration, gate_duration));\n    }\n\n    int stage = 0;\n    for (; stage < num_stages - 1; ++stage) {\n      const float stage_duration = 1.0f / increment_[stage];\n      if (t < stage_duration) {\n        break;\n      }\n      t -= stage_duration;\n    }\n\n    if (stage == num_stages - 1) {\n      t -= gate_duration;\n      if (t <= 0.0f) {\n        // TODO(pichenettes): this should always be true.\n        return level_[num_stages - 2];\n      } else if (t * increment_[num_stages - 1] > 1.0f) {\n        return level_[num_stages - 1];\n      }\n    }\n    return value(stage, t * increment_[stage], PREVIOUS_LEVEL);\n  }\n  \n  inline float Render(bool gate) {\n    return Render(gate, 1.0f, 1.0f, 1.0f);\n  }\n  \n  inline float Render(\n      bool gate,\n      float rate,\n      float ad_scale,\n      float release_scale) {\n    if (gate) {\n      if (stage_ == num_stages - 1) {\n        start_ = value();\n        stage_ = 0;\n        phase_ = 0.0f;\n      }\n    } else {\n      if (stage_ != num_stages - 1) {\n        start_ = value();\n        stage_ = num_stages - 1;\n        phase_ = 0.0f;\n      }\n    }\n    phase_ += increment_[stage_] * rate * \\\n        (stage_ == num_stages - 1 ? release_scale : ad_scale);\n    if (phase_ >= 1.0f) {\n      if (stage_ >= num_stages - 2) {\n        phase_ = 1.0f;\n      } else {\n        phase_ = 0.0f;\n        ++stage_;\n      }\n      start_ = PREVIOUS_LEVEL;\n    }\n    \n    return value();\n  }\n  \n private:\n  inline float value() {\n    return value(stage_, phase_, start_);\n  }\n  \n  inline float value(int stage, float phase, float start_level) {\n   float from = start_level == PREVIOUS_LEVEL\n       ? level_[(stage - 1 + num_stages) % num_stages] : start_level;\n   float to = level_[stage];\n   \n   if (reshape_ascending_segments && from < to) {\n     from = std::max(6.7f, from);\n     to = std::max(6.7f, to);\n     phase *= (2.5f - phase) * 0.666667f;\n   }\n   \n   return phase * (to - from) + from;\n  }\n\n  int stage_;\n  float phase_;\n  float start_;\n  \n protected:\n  float increment_[num_stages];\n  float level_[num_stages];\n  float scale_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Envelope);\n};\n\nclass OperatorEnvelope : public Envelope<4, true> {\n public:\n  void Set(const uint8_t rate[NUM_STAGES], const uint8_t level[NUM_STAGES],\n           uint8_t global_level) {\n    // Configure levels.\n    for (int i = 0; i < NUM_STAGES; ++i) {\n      int level_scaled = OperatorLevel(level[i]);\n      level_scaled = (level_scaled & ~1) + global_level - 133; // 125 ?\n      level_[i] = 0.125f * \\\n          (level_scaled < 1 ? 0.5f : static_cast<float>(level_scaled));\n    }\n  \n    // Configure increments.\n    for (int i = 0; i < NUM_STAGES; ++i) {\n      float increment = OperatorEnvelopeIncrement(rate[i]);\n      float from = level_[(i - 1 + NUM_STAGES) % NUM_STAGES];\n      float to = level_[i];\n      \n      if (from == to) {\n        // Quirk: for plateaux, the increment is scaled.\n        increment *= 0.6f;\n        if (i == 0 && !level[i]) {\n          // Quirk: the attack plateau is faster.\n          increment *= 20.0f;\n        }\n      } else if (from < to) {\n        from = std::max(6.7f, from);\n        to = std::max(6.7f, to);\n        if (from == to) {\n          // Quirk: because of the jump, the attack might disappear.\n          increment = 1.0f;\n        } else {\n          // Quirk: because of the weird shape, the rate is adjusted.\n          increment *= 7.2f / (to - from);\n        }\n      } else {\n        increment *= 1.0f / (from - to);\n      }\n      increment_[i] = increment * scale_;\n    }\n  }\n};\n\nclass PitchEnvelope : public Envelope<4, false> {\n public:\n  void Set(const uint8_t rate[NUM_STAGES], const uint8_t level[NUM_STAGES]) {\n    // Configure levels.\n    for (int i = 0; i < NUM_STAGES; ++i) {\n      level_[i] = PitchEnvelopeLevel(level[i]);\n    }\n  \n    // Configure increments.\n    for (int i = 0; i < NUM_STAGES; ++i) {\n      float from = level_[(i - 1 + NUM_STAGES) % NUM_STAGES];\n      float to = level_[i];\n      float increment = PitchEnvelopeIncrement(rate[i]);\n      if (from != to) {\n        increment *= 1.0f / fabsf(from - to);\n      } else if (i != NUM_STAGES - 1) {\n        increment = 0.2f;\n      }\n      increment_[i] = increment * scale_;\n    }\n  }\n};\n\n}  // namespace fm\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_ENVELOPE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/lfo.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// DX7-compatible LFO.\n\n#ifndef PLAITS_DSP_FM_LFO_H_\n#define PLAITS_DSP_FM_LFO_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/fm/dx_units.h\"\n#include \"plaits/dsp/fm/patch.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\nclass Lfo {\n public:\n  Lfo() { };\n  ~Lfo() { };\n  \n  enum Waveform {\n    WAVEFORM_TRIANGLE,\n    WAVEFORM_RAMP_DOWN,\n    WAVEFORM_RAMP_UP,\n    WAVEFORM_SQUARE,\n    WAVEFORM_SINE,\n    WAVEFORM_S_AND_H\n  };\n  \n  inline void Init(float sample_rate) {\n    phase_ = 0.0f;\n    frequency_ = 0.1f;\n    delay_phase_ = 0.0f;\n    delay_increment_[0] = delay_increment_[1] = 0.1f;\n    random_value_ = value_ = 0.0f;\n    \n    one_hz_ = 1.0f / sample_rate;\n\n    amp_mod_depth_ = 0.0f;\n    pitch_mod_depth_ = 0.0f;\n    \n    waveform_ = WAVEFORM_TRIANGLE;\n    reset_phase_ = false;\n    \n    phase_integral_ = 0;\n  }\n  \n  inline void Set(const Patch::ModulationParameters& modulations) {\n    frequency_ = LFOFrequency(modulations.rate) * one_hz_;\n\n    LFODelay(modulations.delay, delay_increment_);\n    delay_increment_[0] *= one_hz_;\n    delay_increment_[1] *= one_hz_;\n    \n    waveform_ = Waveform(modulations.waveform);\n    reset_phase_ = modulations.reset_phase != 0;\n    \n    amp_mod_depth_ = float(modulations.amp_mod_depth) * 0.01f;\n\n    pitch_mod_depth_ = float(modulations.pitch_mod_depth) * 0.01f * \\\n        PitchModSensitivity(modulations.pitch_mod_sensitivity);\n  }\n  \n  inline void Reset() {\n    if (reset_phase_) {\n      phase_ = 0.0f;\n    }\n    delay_phase_ = 0.0f;\n  }\n  \n  inline void Step(float scale) {\n    phase_ += scale * frequency_;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n      random_value_ = stmlib::Random::GetFloat();\n    }\n    value_ = value();\n    \n    delay_phase_ += scale * delay_increment_[(delay_phase_ < 0.5f) ? 0 : 1];\n    if (delay_phase_ >= 1.0f) {\n      delay_phase_ = 1.0f;\n    }\n  }\n  \n  inline void Scrub(float sample) {\n    float phase = sample * frequency_;\n    MAKE_INTEGRAL_FRACTIONAL(phase)\n    phase_ = phase_fractional;\n    if (phase_integral != phase_integral_) {\n      phase_integral_ = phase_integral;\n      random_value_ = stmlib::Random::GetFloat();\n    }\n    value_ = value();\n    \n    delay_phase_ = sample * delay_increment_[0];\n    if (delay_phase_ > 0.5f) {\n      sample -= 0.5f / delay_increment_[0];\n      delay_phase_ = 0.5f + sample * delay_increment_[1];\n      if (delay_phase_ >= 1.0f) {\n        delay_phase_ = 1.0f;\n      }\n    }\n  }\n  \n  inline float value() const {\n    switch (waveform_) {\n      case WAVEFORM_TRIANGLE:\n        return 2.0f * (phase_ < 0.5f ? 0.5f - phase_ : phase_ - 0.5f);\n\n      case WAVEFORM_RAMP_DOWN:\n        return 1.0f - phase_;\n\n      case WAVEFORM_RAMP_UP:\n        return phase_;\n\n      case WAVEFORM_SQUARE:\n        return phase_ < 0.5f ? 0.0f : 1.0f;\n\n      case WAVEFORM_SINE:\n        return 0.5f + 0.5f * Sine(phase_ + 0.5f);\n\n      case WAVEFORM_S_AND_H:\n        return random_value_;\n    }\n    return 0.0f;\n  }\n  \n  inline float delay_ramp() const {\n    return delay_phase_ < 0.5f ? 0.0f : (delay_phase_ - 0.5f) * 2.0f;\n  }\n  \n  inline float pitch_mod() const {\n    return (value_ - 0.5f) * delay_ramp() * pitch_mod_depth_;\n  }\n  \n  inline float amp_mod() const {\n    return (1.0f - value_) * delay_ramp() * amp_mod_depth_;\n  }\n  \n private:\n  float phase_;\n  float frequency_;  \n  float delay_phase_;\n  float delay_increment_[2];\n  float value_;\n  \n  float random_value_;\n  float one_hz_;\n  \n  float amp_mod_depth_;\n  float pitch_mod_depth_;\n  \n  Waveform waveform_;\n  bool reset_phase_;\n  \n  int phase_integral_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Lfo);\n};\n\n}  // namespace fm\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_LFO_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/operator.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FM Operator.\n\n#ifndef PLAITS_DSP_FM_OPERATOR_H_\n#define PLAITS_DSP_FM_OPERATOR_H_\n\n#include <algorithm>\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\nstruct Operator {\n  enum ModulationSource {\n    MODULATION_SOURCE_EXTERNAL = -2,\n    MODULATION_SOURCE_NONE = -1,\n    MODULATION_SOURCE_FEEDBACK = 0\n  };\n\n  inline void Reset() {\n    phase = 0;\n    amplitude = 0.0f;\n  }\n  \n  uint32_t phase;\n  float amplitude;\n};\n\ntypedef void (*RenderFn)(\n    Operator* ops,\n    const float* f,\n    const float* a,\n    float* fb_state,\n    int fb_amount,\n    const float* modulation,\n    float* out,\n    size_t size);\n\ntemplate<int n, int modulation_source, bool additive>\nvoid RenderOperators(\n    Operator* ops,\n    const float* f,\n    const float* a,\n    float* fb_state,\n    int fb_amount,\n    const float* modulation,\n    float* out,\n    size_t size) {\n  float previous_0, previous_1;\n  \n  if (modulation_source >= Operator::MODULATION_SOURCE_FEEDBACK) {\n    previous_0 = fb_state[0];\n    previous_1 = fb_state[1];\n  }\n\n  uint32_t frequency[n];\n  uint32_t phase[n];\n  float amplitude[n];\n  float amplitude_increment[n];\n\n  const float scale = 1.0f / float(size);\n  for (int i = 0; i < n; ++i) {\n    frequency[i] = static_cast<uint32_t>(std::min(f[i], 0.5f) * 4294967296.0f);\n    phase[i] = ops[i].phase;\n    amplitude[i] = ops[i].amplitude;\n    amplitude_increment[i] = (std::min(a[i], 4.0f) - amplitude[i]) * scale;\n  }\n  \n  const float fb_scale = fb_amount ? float(1 << fb_amount) / 512.0f : 0.0f;\n\n  while (size--) {\n    float pm = 0.0f;\n    if (modulation_source >= Operator::MODULATION_SOURCE_FEEDBACK) {\n      pm = (previous_0 + previous_1) * fb_scale;\n    } else if (modulation_source == Operator::MODULATION_SOURCE_EXTERNAL) {\n      pm = *modulation++;\n    }\n    for (int i = 0; i < n; ++i) {\n      phase[i] += frequency[i];\n      pm = SinePM(phase[i], pm) * amplitude[i];\n      amplitude[i] += amplitude_increment[i];\n      if (i == modulation_source) {\n        previous_1 = previous_0;\n        previous_0 = pm;\n      }\n    }\n    if (additive) {\n      *out++ += pm;\n    } else {\n      *out++ = pm;\n    }\n  }\n  \n  for (int i = 0; i < n; ++i) {\n    ops[i].phase = phase[i];\n    ops[i].amplitude = amplitude[i];\n  }\n  \n  if (modulation_source >= Operator::MODULATION_SOURCE_FEEDBACK) {\n    fb_state[0] = previous_0;\n    fb_state[1] = previous_1;\n  }\n};\n\n}  // namespace fm\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_OPERATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/patch.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// DX7 patch.\n\n#ifndef PLAITS_DSP_FM_PATCH_H_\n#define PLAITS_DSP_FM_PATCH_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace plaits {\n\nnamespace fm {\n\nstruct Patch {\n  enum {\n    SYX_SIZE = 128\n  };\n  \n  // The layout conveniently matches the 156 bytes SysEx format.\n  \n  struct Envelope {\n    uint8_t rate[4];\n    uint8_t level[4];\n  };\n  \n  struct KeyboardScaling {\n    uint8_t break_point;\n    uint8_t left_depth;\n    uint8_t right_depth;\n    uint8_t left_curve;\n    uint8_t right_curve;\n  };\n\n  struct Operator {\n    Envelope envelope;    \n    KeyboardScaling keyboard_scaling;\n    \n    uint8_t rate_scaling;\n    uint8_t amp_mod_sensitivity;\n    uint8_t velocity_sensitivity;\n    uint8_t level;\n\n    uint8_t mode;\n    uint8_t coarse;\n    uint8_t fine;   // x frequency by 1 + 0.01 x fine\n    uint8_t detune; \n  } op[6];\n  \n  Envelope pitch_envelope;\n\n  uint8_t algorithm;\n  uint8_t feedback;\n  \n  uint8_t reset_phase;\n  \n  struct ModulationParameters {\n    uint8_t rate;\n    uint8_t delay;\n    uint8_t pitch_mod_depth;\n    uint8_t amp_mod_depth;\n    uint8_t reset_phase;\n    uint8_t waveform;\n    uint8_t pitch_mod_sensitivity;\n  } modulations;\n\n  uint8_t transpose;\n  uint8_t name[10];\n  uint8_t active_operators;\n  \n  inline uint8_t* bytes() {\n    return static_cast<uint8_t*>(static_cast<void*>(this));\n  }\n  \n  inline void Unpack(const uint8_t* data) {\n    for (int i = 0; i < 6; ++i) {\n      Operator* o = &op[i];\n      const uint8_t* op_data = &data[i * 17];\n      for (int j = 0; j < 4; ++j) {\n        o->envelope.rate[j] = std::min(op_data[j] & 0x7f, 99);\n        o->envelope.level[j] = std::min(op_data[4 + j] & 0x7f, 99);\n      }\n      o->keyboard_scaling.break_point = std::min(op_data[8] & 0x7f, 99);\n      o->keyboard_scaling.left_depth = std::min(op_data[9] & 0x7f, 99);\n      o->keyboard_scaling.right_depth = std::min(op_data[10] & 0x7f, 99);\n      o->keyboard_scaling.left_curve = op_data[11] & 0x3;\n      o->keyboard_scaling.right_curve = (op_data[11] >> 2) & 0x3;\n\n      o->rate_scaling = op_data[12] & 0x7;\n      o->amp_mod_sensitivity = op_data[13] & 0x3;\n      o->velocity_sensitivity = (op_data[13] >> 2) & 0x7;\n      o->level = std::min(op_data[14] & 0x7f, 99);\n      o->mode = op_data[15] & 0x1;\n      o->coarse = (op_data[15] >> 1) & 0x1f;\n      o->fine = std::min(op_data[16] & 0x7f, 99);\n      o->detune = std::min((op_data[12] >> 3) & 0xf, 14);\n    }\n    \n    for (int j = 0; j < 4; ++j) {\n      pitch_envelope.rate[j] = std::min(data[102 + j] & 0x7f, 99);\n      pitch_envelope.level[j] = std::min(data[106 + j] & 0x7f, 99);\n    }\n    \n    algorithm = data[110] & 0x1f;\n    feedback = data[111] & 0x7;\n    reset_phase = (data[111] >> 3) & 0x1;\n    \n    modulations.rate = std::min(data[112] & 0x7f, 99);\n    modulations.delay = std::min(data[113] & 0x7f, 99);\n    modulations.pitch_mod_depth = std::min(data[114] & 0x7f, 99);\n    modulations.amp_mod_depth = std::min(data[115] & 0x7f, 99);\n    modulations.reset_phase = data[116] & 0x1;\n    modulations.waveform = std::min((data[116] >> 1) & 0x7, 5);\n    modulations.pitch_mod_sensitivity = data[116] >> 4;\n    \n    transpose = std::min(data[117] & 0x7f, 48);\n    \n    for (size_t i = 0; i < sizeof(name); ++i) {\n      name[i] = data[118 + i] & 0x7f;\n    }\n    active_operators = 0x3f;\n  }\n};\n\n}  // namespace fm\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_PATCH_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fm/voice.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// DX7 voice.\n\n#ifndef PLAITS_DSP_FM_VOICE_H_\n#define PLAITS_DSP_FM_VOICE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"plaits/dsp/fm/algorithms.h\"\n#include \"plaits/dsp/fm/dx_units.h\"\n#include \"plaits/dsp/fm/envelope.h\"\n#include \"plaits/dsp/fm/patch.h\"\n\n// When enabled, the amplitude modulation LFO linearly modulates the amplitude\n// of an operator. Otherwise, a more complex formula involving an exponential\n// is used, to match Dexed's output.\n// #define FAST_OP_LEVEL_MODULATION\n\nnamespace plaits {\n\nnamespace fm {\n\ntemplate<int num_operators>\nclass Voice {\n public:\n  Voice() { }\n  ~Voice() { }\n  \n  struct Parameters {\n    bool sustain;\n    bool gate;\n    float note;\n    float velocity;\n    float brightness;\n    float envelope_control;\n    float pitch_mod;\n    float amp_mod;\n  };\n  \n  inline void Init(\n      const Algorithms<num_operators>* algorithms,\n      float sample_rate) {\n    algorithms_ = algorithms;\n\n    sample_rate_ = sample_rate;\n    one_hz_ = 1.0f / sample_rate;\n    a0_ = 55.0f / sample_rate;\n\n    const float native_sr = 44100.0f;  // Legacy sample rate.\n    const float envelope_scale = native_sr * one_hz_;\n\n    for (int i = 0; i < num_operators; ++i) {\n      operator_[i].Reset();\n      operator_envelope_[i].Init(envelope_scale);\n    }\n    pitch_envelope_.Init(envelope_scale);\n    \n    feedback_state_[0] = feedback_state_[1] = 0.0f;\n    \n    patch_ = NULL;\n    gate_ = false;\n    note_ = 48.0f;\n    normalized_velocity_ = 10.0f;\n    \n    dirty_ = true;\n  }\n  \n  inline void SetPatch(const Patch* patch) {\n    patch_ = patch;\n    dirty_ = true;\n  }\n  \n  // Pre-compute everything that can be pre-computed once a patch is loaded:\n  // - envelope constants\n  // - frequency ratios\n  inline bool Setup() {\n    if (!dirty_) {\n      return false;\n    }\n    \n    pitch_envelope_.Set(\n        patch_->pitch_envelope.rate,\n        patch_->pitch_envelope.level);\n    for (int i = 0; i < num_operators; ++i) {\n      const Patch::Operator& op = patch_->op[i];\n\n      int level = OperatorLevel(op.level);\n      operator_envelope_[i].Set(op.envelope.rate, op.envelope.level, level);\n    \n      // The level increase caused by keyboard scaling plus velocity\n      // scaling should not exceed this number - otherwise it would be\n      // equivalent to have an operator with a level above 99.\n      level_headroom_[i] = float(127 - level);\n\n      // Pre-compute frequency ratios. Encode the base frequency\n      // (1Hz or the root note) as the sign of the ratio.\n      float sign = op.mode == 0 ? 1.0f : -1.0f;\n      ratios_[i] = sign * FrequencyRatio(op);\n    }\n    dirty_ = false;\n    return true;\n  }\n  \n  inline float op_level(int i) const {\n    return level_[i];\n  }\n  \n  inline void Render(\n      const Parameters& parameters,\n      float* temp,\n      float* out,\n      float* aux,\n      size_t size) {\n    float* buffers[4] = { out, aux, temp, temp };\n    Render(parameters, buffers, size);\n  }\n  \n  inline void Render(\n      const Parameters& parameters,\n      float* temp,\n      size_t size) {\n    float* buffers[4] = { temp, temp + size, temp + 2 * size, temp + 2 * size };\n    Render(parameters, buffers, size);\n  }\n\n  inline void Render(\n      const Parameters& parameters,\n      float* buffers[4],\n      size_t size) {\n    if (Setup()) {\n      // This prevents a CPU overrun, since there is not enough CPU to perform\n      // both a patch setup and a full render in the time alloted for\n      // a render. As a drawback, this causes a 0.5ms blank before a new\n      // patch starts playing. But this is a clean blank, as opposed to a\n      // glitchy overrun.\n      return;\n    }\n    \n    const float envelope_rate = float(size);\n    const float ad_scale = Pow2Fast<1>(\n        (0.5f - parameters.envelope_control) * 8.0f);\n    const float r_scale = Pow2Fast<1>(\n        -fabsf(parameters.envelope_control - 0.3f) * 8.0f);\n    const float gate_duration = 1.5f * sample_rate_;\n    const float envelope_sample = gate_duration * parameters.envelope_control;\n    \n    // Apply LFO and pitch envelope modulations.\n    const float pitch_envelope = parameters.sustain\n        ? pitch_envelope_.RenderAtSample(envelope_sample, gate_duration)\n        : pitch_envelope_.Render(\n              parameters.gate,\n              envelope_rate,\n              ad_scale,\n              r_scale);\n    const float pitch_mod = pitch_envelope + parameters.pitch_mod;\n    const float f0 = a0_ * 0.25f * stmlib::SemitonesToRatioSafe(\n        parameters.note - 9.0f + pitch_mod * 12.0f);\n    \n    // Sample the note and velocity (used for scaling) only when a trigger\n    // is received, or constantly when we are in free-running mode.\n    const bool note_on = parameters.gate && !gate_;\n    gate_ = parameters.gate;\n    if (note_on || parameters.sustain) {\n      normalized_velocity_ = NormalizeVelocity(parameters.velocity);\n      note_ = parameters.note;\n    }\n    \n    // Reset operator phase if a note on is detected & if the patch requires it.\n    if (note_on && patch_->reset_phase) {\n      for (int i = 0; i < num_operators; ++i) {\n        operator_[i].phase = 0;\n      }\n    }\n\n    // Compute frequencies and amplitudes.\n    float f[num_operators];\n    float a[num_operators];\n    for (int i = 0; i < num_operators; ++i) {\n      const Patch::Operator& op = patch_->op[i];\n      \n      f[i] = ratios_[i] * (ratios_[i] < 0.0f ? -one_hz_ : f0);\n\n      const float rate_scaling = RateScaling(note_, op.rate_scaling);\n      float level = parameters.sustain\n          ? operator_envelope_[i].RenderAtSample(envelope_sample, gate_duration)\n          : operator_envelope_[i].Render(\n                parameters.gate,\n                envelope_rate * rate_scaling,\n                ad_scale,\n                r_scale);\n      const float kb_scaling = KeyboardScaling(note_, op.keyboard_scaling);\n      const float velocity_scaling = normalized_velocity_ * \\\n          float(op.velocity_sensitivity);\n      const float brightness = algorithms_->is_modulator(patch_->algorithm, i)\n          ? (parameters.brightness - 0.5f) * 32.0f\n          : 0.0f;\n      \n      level += 0.125f * std::min(\n          kb_scaling + velocity_scaling + brightness,\n          level_headroom_[i]);\n      \n      level_[i] = level;\n      \n      const float sensitivity = AmpModSensitivity(op.amp_mod_sensitivity);\n#ifdef FAST_OP_LEVEL_MODULATION\n      const float level_mod = 1.0f - sensitivity * parameters.amp_mod;\n      a[i] = Pow2Fast<2>(-14.0f + level) * level_mod;\n#else\n      const float log_level_mod = sensitivity * parameters.amp_mod - 1.0f;\n      const float level_mod = 1.0f - Pow2Fast<2>(6.4f * log_level_mod);\n      a[i] = Pow2Fast<2>(-14.0f + level * level_mod);\n#endif  // FAST_LINEAR_AMPLITUDE_MODULATION\n    }\n    \n    for (int i = 0; i < num_operators; ) {\n      const typename Algorithms<num_operators>::RenderCall& call = \\\n          algorithms_->render_call(patch_->algorithm, i);\n      (*call.render_fn)(\n          &operator_[i],\n          &f[i],\n          &a[i],\n          feedback_state_,\n          patch_->feedback,\n          buffers[call.input_index],\n          buffers[call.output_index],\n          size);\n      i += call.n;\n    }\n  }\n  \n private:\n  const Algorithms<num_operators>* algorithms_;\n  float sample_rate_;\n  float one_hz_;\n  float a0_;\n  \n  bool gate_;\n\n  Operator operator_[num_operators];\n  OperatorEnvelope operator_envelope_[num_operators];\n  PitchEnvelope pitch_envelope_;\n  \n  float normalized_velocity_;\n  float note_;\n  \n  float ratios_[num_operators];\n  float level_headroom_[num_operators];\n  float level_[num_operators];\n  \n  float feedback_state_[2];\n  \n  const Patch* patch_;\n  \n  bool dirty_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Voice);\n};\n\n}  // namespace fm\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FM_VOICE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fx/diffuser.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Granular diffuser.\n\n#ifndef PLAITS_DSP_FX_DIFFUSER_H_\n#define PLAITS_DSP_FX_DIFFUSER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"plaits/dsp/fx/fx_engine.h\"\n\nnamespace plaits {\n\nclass Diffuser {\n public:\n  Diffuser() { }\n  ~Diffuser() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    engine_.SetLFOFrequency(LFO_1, 0.3f / 48000.0f);\n    lp_decay_ = 0.0f;\n  }\n  \n  void Reset() {\n    engine_.Clear();\n  }\n  \n  void Process(float amount, float rt, float* in_out, size_t size) {\n    typedef E::Reserve<126,\n      E::Reserve<180,\n      E::Reserve<269,\n      E::Reserve<444,\n      E::Reserve<1653,\n      E::Reserve<2010,\n      E::Reserve<3411> > > > > > > Memory;\n    E::DelayLine<Memory, 0> ap1;\n    E::DelayLine<Memory, 1> ap2;\n    E::DelayLine<Memory, 2> ap3;\n    E::DelayLine<Memory, 3> ap4;\n    E::DelayLine<Memory, 4> dapa;\n    E::DelayLine<Memory, 5> dapb;\n    E::DelayLine<Memory, 6> del;\n    E::Context c;\n    const float kap = 0.625f;\n    const float klp = 0.75f;\n    float lp = lp_decay_;\n    while (size--) {\n      float wet;\n      engine_.Start(&c);\n      c.Read(*in_out);\n      c.Read(ap1 TAIL, kap);\n      c.WriteAllPass(ap1, -kap);\n      c.Read(ap2 TAIL, kap);\n      c.WriteAllPass(ap2, -kap);\n      c.Read(ap3 TAIL, kap);\n      c.WriteAllPass(ap3, -kap);\n      c.Interpolate(ap4, 400.0f, LFO_1, 43.0f, kap);\n      c.WriteAllPass(ap4, -kap);\n      c.Interpolate(del, 3070.0f, LFO_1, 340.0f, rt);\n      c.Lp(lp, klp);\n      c.Read(dapa TAIL, -kap);\n      c.WriteAllPass(dapa, kap);\n      c.Read(dapb TAIL, kap);\n      c.WriteAllPass(dapb, -kap);\n      c.Write(del, 2.0f);\n      c.Write(wet, 0.0f);\n      *in_out += amount * (wet - *in_out);\n      ++in_out;\n    }\n    lp_decay_ = lp;\n  }\n  \n private:\n  typedef FxEngine<8192, FORMAT_12_BIT> E;\n  E engine_;\n  float lp_decay_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Diffuser);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_DIFFUSER_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fx/ensemble.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Ensemble FX.\n\n#ifndef PLAITS_DSP_FX_ENSEMBLE_H_\n#define PLAITS_DSP_FX_ENSEMBLE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/dsp/fx/fx_engine.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nclass Ensemble {\n public:\n  typedef FxEngine<1024, FORMAT_32_BIT> E;\n  \n  Ensemble() { }\n  ~Ensemble() { }\n  \n  void Init(E::T* buffer) {\n    engine_.Init(buffer);\n    phase_1_ = 0;\n    phase_2_ = 0;\n  }\n  \n  void Reset() {\n    engine_.Clear();\n  }\n  \n  void Process(float* left, float* right, size_t size) {\n    typedef E::Reserve<511, E::Reserve<511> > Memory;\n    E::DelayLine<Memory, 0> line_l;\n    E::DelayLine<Memory, 1> line_r;\n    E::Context c;\n    \n    while (size--) {\n      engine_.Start(&c);\n      float dry_amount = 1.0f - amount_ * 0.5f;\n    \n      // Update LFO.\n      const uint32_t one_third = 1417339207UL;\n      const uint32_t two_third = 2834678415UL;\n      \n      phase_1_ += 67289; // 0.75 Hz\n      phase_2_ += 589980; // 6.57 Hz\n      float slow_0 = SineRaw(phase_1_);\n      float slow_120 = SineRaw(phase_1_ + one_third);\n      float slow_240 = SineRaw(phase_1_ + two_third);\n      float fast_0 = SineRaw(phase_2_);\n      float fast_120 = SineRaw(phase_2_ + one_third);\n      float fast_240 = SineRaw(phase_2_ + two_third);\n      \n      // Max deviation: 176\n      float a = depth_ * 160.0f;\n      float b = depth_ * 16.0f;\n      \n      float mod_1 = slow_0 * a + fast_0 * b;\n      float mod_2 = slow_120 * a + fast_120 * b;\n      float mod_3 = slow_240 * a + fast_240 * b;\n    \n      float wet = 0.0f;\n    \n      // Sum L & R channel to send to chorus line.\n      c.Read(*left, 1.0f);\n      c.Write(line_l, 0.0f);\n      c.Read(*right, 1.0f);\n      c.Write(line_r, 0.0f);\n    \n      c.Interpolate(line_l, mod_1 + 192, 0.33f);\n      c.Interpolate(line_l, mod_2 + 192, 0.33f);\n      c.Interpolate(line_r, mod_3 + 192, 0.33f);\n      c.Write(wet, 0.0f);\n      *left = wet * amount_ + *left * dry_amount;\n      \n      c.Interpolate(line_r, mod_1 + 192, 0.33f);\n      c.Interpolate(line_r, mod_2 + 192, 0.33f);\n      c.Interpolate(line_l, mod_3 + 192, 0.33f);\n      c.Write(wet, 0.0f);\n      *right = wet * amount_ + *right * dry_amount;\n      left++;\n      right++;\n    }\n  }\n  \n  inline void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n  inline void set_depth(float depth) {\n    depth_ = depth;\n  }\n  \n private:\n  E engine_;\n  \n  float amount_;\n  float depth_;\n  \n  uint32_t phase_1_;\n  uint32_t phase_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Ensemble);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_ENSEMBLE_H_"
  },
  {
    "path": "lib/plaits/dsp/fx/fx_engine.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Base class for building reverbs.\n\n#ifndef PLAITS_DSP_FX_FX_ENGINE_H_\n#define PLAITS_DSP_FX_FX_ENGINE_H_\n\n#include <algorithm>\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/cosine_oscillator.h\"\n\nnamespace plaits {\n\n#define TAIL , -1\n\nenum Format {\n  FORMAT_12_BIT,\n  FORMAT_16_BIT,\n  FORMAT_32_BIT\n};\n\nenum LFOIndex {\n  LFO_1,\n  LFO_2\n};\n\ntemplate<Format format>\nstruct DataType { };\n\ntemplate<>\nstruct DataType<FORMAT_12_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 4096.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 4096.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_16_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 32768.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 32768.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_32_BIT> {\n  typedef float T;\n  \n  static inline float Decompress(T value) {\n    return value;;\n  }\n  \n  static inline T Compress(float value) {\n    return value;\n  }\n};\n\ntemplate<\n    size_t size,\n    Format format = FORMAT_12_BIT>\nclass FxEngine {\n public:\n  typedef typename DataType<format>::T T;\n  FxEngine() { }\n  ~FxEngine() { }\n\n  void Init(T* buffer) {\n    buffer_ = buffer;\n  }\n  \n  void Clear() {\n    std::fill(&buffer_[0], &buffer_[size], 0);\n    write_ptr_ = 0;\n  }\n\n  struct Empty { };\n  \n  template<int32_t l, typename T = Empty>\n  struct Reserve {\n    typedef T Tail;\n    enum {\n      length = l\n    };\n  };\n  \n  template<typename Memory, int32_t index>\n  struct DelayLine {\n    enum {\n      length = DelayLine<typename Memory::Tail, index - 1>::length,\n      base = DelayLine<Memory, index - 1>::base + DelayLine<Memory, index - 1>::length + 1\n    };\n  };\n\n  template<typename Memory>\n  struct DelayLine<Memory, 0> {\n    enum {\n      length = Memory::length,\n      base = 0\n    };\n  };\n\n  class Context {\n   friend class FxEngine;\n   public:\n    Context() { }\n    ~Context() { }\n    \n    inline void Load(float value) {\n      accumulator_ = value;\n    }\n\n    inline void Read(float value, float scale) {\n      accumulator_ += value * scale;\n    }\n\n    inline void Read(float value) {\n      accumulator_ += value;\n    }\n\n    inline void Write(float& value) {\n      value = accumulator_;\n    }\n\n    inline void Write(float& value, float scale) {\n      value = accumulator_;\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T w = DataType<format>::Compress(accumulator_);\n      if (offset == -1) {\n        buffer_[(write_ptr_ + D::base + D::length - 1) & MASK] = w;\n      } else {\n        buffer_[(write_ptr_ + D::base + offset) & MASK] = w;\n      }\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, float scale) {\n      Write(d, 0, scale);\n    }\n\n    template<typename D>\n    inline void WriteAllPass(D& d, int32_t offset, float scale) {\n      Write(d, offset, scale);\n      accumulator_ += previous_read_;\n    }\n    \n    template<typename D>\n    inline void WriteAllPass(D& d, float scale) {\n      WriteAllPass(d, 0, scale);\n    }\n    \n    template<typename D>\n    inline void Read(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T r;\n      if (offset == -1) {\n        r = buffer_[(write_ptr_ + D::base + D::length - 1) & MASK];\n      } else {\n        r = buffer_[(write_ptr_ + D::base + offset) & MASK];\n      }\n      float r_f = DataType<format>::Decompress(r);\n      previous_read_ = r_f;\n      accumulator_ += r_f * scale;\n    }\n    \n    template<typename D>\n    inline void Read(D& d, float scale) {\n      Read(d, 0, scale);\n    }\n    \n    inline void Lp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ = state;\n    }\n\n    inline void Hp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ -= state;\n    }\n    \n    template<typename D>\n    inline void Interpolate(D& d, float offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n    template<typename D>\n    inline void Interpolate(\n        D& d, float offset, LFOIndex index, float amplitude, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      offset += amplitude * lfo_value_[index];\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n   private:\n    float accumulator_;\n    float previous_read_;\n    float lfo_value_[2];\n    T* buffer_;\n    int32_t write_ptr_;\n\n    DISALLOW_COPY_AND_ASSIGN(Context);\n  };\n  \n  inline void SetLFOFrequency(LFOIndex index, float frequency) {\n    lfo_[index].template Init<stmlib::COSINE_OSCILLATOR_APPROXIMATE>(frequency * 32.0f);\n  }\n  \n  inline void Start(Context* c) {\n    --write_ptr_;\n    if (write_ptr_ < 0) {\n      write_ptr_ += size;\n    }\n    c->accumulator_ = 0.0f;\n    c->previous_read_ = 0.0f;\n    c->buffer_ = buffer_;\n    c->write_ptr_ = write_ptr_;\n    if ((write_ptr_ & 31) == 0) {\n      c->lfo_value_[0] = lfo_[0].Next();\n      c->lfo_value_[1] = lfo_[1].Next();\n    } else {\n      c->lfo_value_[0] = lfo_[0].value();\n      c->lfo_value_[1] = lfo_[1].value();\n    }\n  }\n  \n private:\n  enum {\n    MASK = size - 1\n  };\n  \n  int32_t write_ptr_;\n  T* buffer_;\n  stmlib::CosineOscillator lfo_[2];\n  \n  DISALLOW_COPY_AND_ASSIGN(FxEngine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_FX_ENGINE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fx/low_pass_gate.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Approximative low pass gate.\n\n#ifndef PLAITS_DSP_FX_LOW_PASS_GATE_H_\n#define PLAITS_DSP_FX_LOW_PASS_GATE_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\nnamespace plaits {\n  \nclass LowPassGate {\n public:\n  LowPassGate() { }\n  ~LowPassGate() { }\n  \n  void Init() {\n    previous_gain_ = 0.0f;\n    filter_.Init();\n  }\n  \n  void Process(\n      float gain,\n      float frequency,\n      float hf_bleed,\n      float* in_out,\n      size_t size) {\n    stmlib::ParameterInterpolator gain_modulation(&previous_gain_, gain, size);\n    filter_.set_f_q<stmlib::FREQUENCY_DIRTY>(frequency, 0.4f);\n    while (size--) {\n      const float s = *in_out * gain_modulation.Next();\n      const float lp = filter_.Process<stmlib::FILTER_MODE_LOW_PASS>(s);\n      *in_out++ = lp + (s - lp) * hf_bleed;\n    }\n  }\n  \n  void Process(\n      float gain,\n      float frequency,\n      float hf_bleed,\n      float* in,\n      short* out,\n      size_t size,\n      size_t stride) {\n    stmlib::ParameterInterpolator gain_modulation(&previous_gain_, gain, size);\n    filter_.set_f_q<stmlib::FREQUENCY_DIRTY>(frequency, 0.4f);\n    while (size--) {\n      const float s = *in++ * gain_modulation.Next();\n      const float lp = filter_.Process<stmlib::FILTER_MODE_LOW_PASS>(s);\n      *out = stmlib::Clip16(1 + static_cast<int32_t>(lp + (s - lp) * hf_bleed));\n      out += stride;\n    }\n  }\n\n    void Process(\n      float gain,\n      float frequency,\n      float hf_bleed,\n      float* in,\n      float* out,\n      size_t size,\n      size_t stride) {\n    stmlib::ParameterInterpolator gain_modulation(&previous_gain_, gain, size);\n    filter_.set_f_q<stmlib::FREQUENCY_DIRTY>(frequency, 0.4f);\n    while (size--) {\n      const float s = *in++ * gain_modulation.Next();\n      const float lp = filter_.Process<stmlib::FILTER_MODE_LOW_PASS>(s);\n      *out = (lp + (s - lp) * hf_bleed);\n      out += stride;\n    }\n  }\n  \n private:\n  float previous_gain_;\n  stmlib::Svf filter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(LowPassGate);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_LOW_PASS_GATE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fx/overdrive.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Distortion/overdrive.\n\n#ifndef PLAITS_DSP_FX_OVERDRIVE_H_\n#define PLAITS_DSP_FX_OVERDRIVE_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\nnamespace plaits {\n  \nclass Overdrive {\n public:\n  Overdrive() { }\n  ~Overdrive() { }\n  \n  void Init() {\n    pre_gain_ = 0.0f;\n    post_gain_ = 0.0f;\n  }\n  \n  void Process(float drive, float* in_out, size_t size) {\n    const float drive_2 = drive * drive;\n    const float pre_gain_a = drive * 0.5f;\n    const float pre_gain_b = drive_2 * drive_2 * drive * 24.0f;\n    const float pre_gain = pre_gain_a + (pre_gain_b - pre_gain_a) * drive_2;\n    const float drive_squashed = drive * (2.0f - drive);\n    const float post_gain = 1.0f / stmlib::SoftClip(\n          0.33f + drive_squashed * (pre_gain - 0.33f));\n    \n    stmlib::ParameterInterpolator pre_gain_modulation(\n        &pre_gain_,\n        pre_gain,\n        size);\n    \n    stmlib::ParameterInterpolator post_gain_modulation(\n        &post_gain_,\n        post_gain,\n        size);\n    \n    while (size--) {\n      float pre = pre_gain_modulation.Next() * *in_out;\n      *in_out++ = stmlib::SoftClip(pre) * post_gain_modulation.Next();\n    }\n  }\n  \n private:\n  float pre_gain_;\n  float post_gain_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Overdrive);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_OVERDRIVE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/fx/sample_rate_reducer.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sample rate reducer.\n\n#ifndef PLAITS_DSP_FX_SAMPLE_RATE_REDUCER_H_\n#define PLAITS_DSP_FX_SAMPLE_RATE_REDUCER_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/polyblep.h\"\n\nnamespace plaits {\n  \nclass SampleRateReducer {\n public:\n  SampleRateReducer() { }\n  ~SampleRateReducer() { }\n  \n  void Init() {\n    phase_ = 0.0f;\n    sample_ = 0.0f;\n    next_sample_ = 0.0f;\n    previous_sample_ = 0.0f;\n  }\n  \n  template<bool optimized_handling_of_special_cases>\n  void Process(float frequency, float* in_out, size_t size) {\n    if (optimized_handling_of_special_cases) {\n      // Use fast specialized implementations for target rates close to the\n      // original rates. Caveats:\n      // - The size argument must be a multiple of 4.\n      // - There will be a transition glitch between the \"optimized\" and the\n      //   \"common case\" code, so don't use this when frequency is modulated!\n      // - The optimized code is not a truly variable reclocking, instead,\n      //   this is a crossfade between reclocking at SR / 2N and SR / N.\n      if (frequency >= 1.0f) {\n        return;\n      } else if (frequency >= 0.5f) {\n        ProcessHalf(2.0f - 2.0f * frequency, in_out, size);\n        return;\n      } else if (frequency >= 0.25f) {\n        ProcessQuarter(2.0f - 4.0f * frequency, in_out, size);\n        return;\n      }\n    } else {\n      CONSTRAIN(frequency, 0.0f, 1.0f);\n    }\n    float previous_sample = previous_sample_;\n    float next_sample = next_sample_;\n    float sample = sample_;\n    float phase = phase_;\n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n      phase += frequency;\n      if (phase >= 1.0f) {\n        phase -= 1.0f;\n        float t = phase / frequency;\n        // t = 0: the transition occurred right at this sample.\n        // t = 1: the transition occurred at the previous sample.\n        // Use linear interpolation to recover the fractional sample.\n        float new_sample = \\\n            previous_sample + (*in_out - previous_sample) * (1.0f - t);\n        float discontinuity = new_sample - sample;\n        this_sample += discontinuity * stmlib::ThisBlepSample(t);\n        next_sample += discontinuity * stmlib::NextBlepSample(t);\n        sample = new_sample;\n      }\n      next_sample += sample;\n      previous_sample = *in_out;\n      *in_out++ = this_sample;\n    }\n    phase_ = phase;\n    next_sample_ = next_sample;\n    sample_ = sample;\n    previous_sample_ = previous_sample;\n  }\n  \n private:\n  void ProcessHalf(float amount, float* in_out, size_t size) {\n    // assert(size % 2 == 0);\n    while (size) {\n      in_out[1] += (in_out[0] - in_out[1]) * amount;\n      in_out += 2;\n      size -= 2;\n    }\n    sample_ = next_sample_ = previous_sample_ = in_out[-1];\n  }\n  \n  void ProcessQuarter(float amount, float* in_out, size_t size) {\n    // assert(size % 4 == 0);\n    while (size) {\n      in_out[1] = in_out[0];\n      in_out[2] += (in_out[0] - in_out[2]) * amount;\n      in_out[3] = in_out[2];\n      in_out += 4;\n      size -= 4;\n    }\n    sample_ = next_sample_ = previous_sample_ = in_out[-1];\n  }\n   \n  float phase_;\n  float sample_;\n  float previous_sample_;\n  float next_sample_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SampleRateReducer);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_FX_SAMPLE_RATE_REDUCER_H_\n"
  },
  {
    "path": "lib/plaits/dsp/noise/clocked_noise.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Noise processed by a sample and hold running at a target frequency.\n\n#ifndef PLAITS_DSP_NOISE_CLOCKED_NOISE_H_\n#define PLAITS_DSP_NOISE_CLOCKED_NOISE_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace plaits {\n\nclass ClockedNoise {\n public:\n  ClockedNoise() { }\n  ~ClockedNoise() { }\n  \n  void Init() {\n    phase_ = 0.0f;\n    sample_ = 0.0f;\n    next_sample_ = 0.0f;\n    frequency_ = 0.001f;\n  }\n\n  void Render(bool sync, float frequency, float* out, size_t size) {\n    CONSTRAIN(frequency, 0.0f, 1.0f);\n    \n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n\n    float next_sample = next_sample_;\n    float sample = sample_;\n    \n    if (sync) {\n      phase_ = 1.0f;\n    }\n\n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n\n      const float frequency = fm.Next();\n      const float raw_sample = stmlib::Random::GetFloat() * 2.0f - 1.0f;\n      float raw_amount = 4.0f * (frequency - 0.25f);\n      CONSTRAIN(raw_amount, 0.0f, 1.0f);\n      \n      phase_ += frequency;\n      \n      if (phase_ >= 1.0f) {\n        phase_ -= 1.0f;\n        float t = phase_ / frequency;\n        float new_sample = raw_sample;\n        float discontinuity = new_sample - sample;\n        this_sample += discontinuity * stmlib::ThisBlepSample(t);\n        next_sample += discontinuity * stmlib::NextBlepSample(t);\n        sample = new_sample;\n      }\n      next_sample += sample;\n      *out++ = this_sample + raw_amount * (raw_sample - this_sample);\n    }\n    next_sample_ = next_sample;\n    sample_ = sample;\n  }\n  \n private:\n  // Oscillator state.\n  float phase_;\n  float sample_;\n  float next_sample_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ClockedNoise);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_NOISE_CLOCKED_NOISE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/noise/dust.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Randomly clocked samples.\n\n#ifndef PLAITS_DSP_NOISE_DUST_H_\n#define PLAITS_DSP_NOISE_DUST_H_\n\n#include \"stmlib/utils/random.h\"\n\nnamespace plaits {\n\ninline float Dust(float frequency) {\n  float inv_frequency = 1.0f / frequency;\n  float u = stmlib::Random::GetFloat();\n  if (u < frequency) {\n    return u * inv_frequency;\n  } else {\n    return 0.0f;\n  }\n}\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_NOISE_DUST_H_\n"
  },
  {
    "path": "lib/plaits/dsp/noise/fractal_random_generator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Stack octaves of a noise source to generate a fractal noise.\n\n#ifndef PLAITS_DSP_NOISE_FRACTAL_RANDOM_GENERATOR_H_\n#define PLAITS_DSP_NOISE_FRACTAL_RANDOM_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace plaits {\n\ntemplate<typename T, int order>\nclass FractalRandomGenerator {\n public:\n  FractalRandomGenerator() { }\n  ~FractalRandomGenerator() { }\n  \n  void Init() {\n    for (int i = 0; i < order; ++i) {\n      generator_[i].Init();\n    }\n  }\n  \n  float Render(float frequency) {\n    return Render(frequency, 0.5f);\n  }\n  \n  float Render(float frequency, float decay) {\n    float gain = 0.5f;\n    float sum = 0.0f;\n\n    for (int i = 0; i < order; ++i) {\n      sum += generator_[i].Render(frequency) * gain;\n      gain *= decay;\n      frequency *= 2.0f;\n    }\n\n    return sum;\n  }\n  \n private:\n  T generator_[order];\n  \n  DISALLOW_COPY_AND_ASSIGN(FractalRandomGenerator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_NOISE_FRACTAL_RANDOM_GENERATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/noise/particle.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Random impulse train processed by a resonant filter.\n\n#ifndef PLAITS_DSP_NOISE_PARTICLE_H_\n#define PLAITS_DSP_NOISE_PARTICLE_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace plaits {\n\nclass Particle {\n public:\n  Particle() { }\n  ~Particle() { }\n\n  inline void Init() {\n    pre_gain_ = 0.0f;\n    filter_.Init();\n  }\n  \n  inline void Render(\n      bool sync,\n      float density,\n      float gain,\n      float frequency,\n      float spread,\n      float q,\n      float* out,\n      float* aux,\n      size_t size) {\n    float u = stmlib::Random::GetFloat();\n    if (sync) {\n      u = density;\n    }\n    bool can_radomize_frequency = true;\n    while (size--) {\n      float s = 0.0f;\n      if (u <= density) {\n        s = u * gain;\n        if (can_radomize_frequency) {\n          const float u = 2.0f * stmlib::Random::GetFloat() - 1.0f;\n          const float f = std::min(\n              stmlib::SemitonesToRatio(spread * u) * frequency,\n              0.25f);\n          pre_gain_ = 0.5f / stmlib::Sqrt(q * f * stmlib::Sqrt(density));\n          filter_.set_f_q<stmlib::FREQUENCY_DIRTY>(f, q);\n          // Keep the cutoff constant for this whole block.\n          can_radomize_frequency = false;\n        }\n      }\n      *aux++ += s;\n      *out++ += filter_.Process<stmlib::FILTER_MODE_BAND_PASS>(pre_gain_ * s);\n      u = stmlib::Random::GetFloat();\n    }\n  }\n \n private:\n  float pre_gain_;\n  stmlib::Svf filter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Particle);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_NOISE_PARTICLE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/noise/smooth_random_generator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Smooth random generator for the internal modulations.\n\n#ifndef PLAITS_DSP_NOISE_SMOOTH_RANDOM_GENERATOR_H_\n#define PLAITS_DSP_NOISE_SMOOTH_RANDOM_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace plaits {\n\nclass SmoothRandomGenerator {\n public:\n  SmoothRandomGenerator() { }\n  ~SmoothRandomGenerator() { }\n  \n  void Init() {\n    phase_ = 0.0f;\n    from_ = 0.0f;\n    interval_ = 0.0f;\n  }\n  \n  float Render(float frequency) {\n    phase_ += frequency;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n      from_ += interval_;\n      interval_ = stmlib::Random::GetFloat() * 2.0f - 1.0f - from_;\n    }\n    float t = phase_ * phase_ * (3.0f - 2.0f * phase_);\n    return from_ + interval_ * t;\n  }\n  \n private:\n  float phase_;\n  float from_;\n  float interval_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SmoothRandomGenerator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_NOISE_SMOOTH_RANDOM_GENERATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/formant_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sinewave with aliasing-free phase reset.\n\n#ifndef PLAITS_DSP_OSCILLATOR_FORMANT_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_FORMANT_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n \nnamespace plaits {\n\nclass FormantOscillator {\n public:\n  FormantOscillator() { }\n  ~FormantOscillator() { }\n\n  void Init() {\n    carrier_phase_ = 0.0f;\n    formant_phase_ = 0.0f;\n    next_sample_ = 0.0f;\n  \n    carrier_frequency_ = 0.0f;\n    formant_frequency_ = 0.01f;\n    phase_shift_ = 0.0f;\n  }\n  \n  void Render(\n      float carrier_frequency,\n      float formant_frequency,\n      float phase_shift,\n      float* out,\n      size_t size) {\n    if (carrier_frequency >= kMaxFrequency) {\n      carrier_frequency = kMaxFrequency;\n    }\n    if (formant_frequency >= kMaxFrequency) {\n      formant_frequency = kMaxFrequency;\n    }\n\n    stmlib::ParameterInterpolator carrier_fm(\n        &carrier_frequency_, carrier_frequency, size);\n    stmlib::ParameterInterpolator formant_fm(\n        &formant_frequency_, formant_frequency, size);\n    stmlib::ParameterInterpolator pm(&phase_shift_, phase_shift, size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float carrier_frequency = carrier_fm.Next();\n      const float formant_frequency = formant_fm.Next();\n    \n      carrier_phase_ += carrier_frequency;\n      \n      if (carrier_phase_ >= 1.0f) {\n        carrier_phase_ -= 1.0f;\n        float reset_time = carrier_phase_ / carrier_frequency;\n    \n        float formant_phase_at_reset = formant_phase_ + \\\n            (1.0f - reset_time) * formant_frequency;\n        float before = Sine(\n            formant_phase_at_reset + pm.subsample(1.0f - reset_time));\n        float after = Sine(0.0f + pm.subsample(1.0f));\n        float discontinuity = after - before;\n        this_sample += discontinuity * stmlib::ThisBlepSample(reset_time);\n        next_sample += discontinuity * stmlib::NextBlepSample(reset_time);\n        formant_phase_ = reset_time * formant_frequency;\n      } else {\n        formant_phase_ += formant_frequency;\n        if (formant_phase_ >= 1.0f) {\n          formant_phase_ -= 1.0f;\n        }\n      }\n    \n      const float phase_shift = pm.Next();\n      next_sample += Sine(formant_phase_ + phase_shift);\n\n      *out++ = this_sample;\n    }\n    next_sample_ = next_sample;\n  }\n\n private:\n  // Oscillator state.\n  float carrier_phase_;\n  float formant_phase_;\n  float next_sample_;\n\n  // For interpolation of parameters.\n  float carrier_frequency_;\n  float formant_frequency_;\n  float phase_shift_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FormantOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_FORMANT_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/grainlet_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A phase-distortd single cycle sine * another continuously running sine,\n// the whole thing synced to a main oscillator.\n\n#ifndef PLAITS_DSP_OSCILLATOR_GRAINLET_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_GRAINLET_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nclass GrainletOscillator {\n public:\n  GrainletOscillator() { }\n  ~GrainletOscillator() { }\n\n  void Init() {\n    carrier_phase_ = 0.0f;\n    formant_phase_ = 0.0f;\n    next_sample_ = 0.0f;\n  \n    carrier_frequency_ = 0.0f;\n    formant_frequency_ = 0.0f;\n    carrier_shape_ = 0.0f;\n    carrier_bleed_ = 0.0f;\n  }\n  \n  void Render(\n      float carrier_frequency,\n      float formant_frequency,\n      float carrier_shape,\n      float carrier_bleed,\n      float* out,\n      size_t size) {\n    if (carrier_frequency >= kMaxFrequency * 0.5f) {\n      carrier_frequency = kMaxFrequency * 0.5f;\n    }\n    if (formant_frequency >= kMaxFrequency) {\n      formant_frequency = kMaxFrequency;\n    }\n    \n    stmlib::ParameterInterpolator carrier_frequency_modulation(\n        &carrier_frequency_,\n        carrier_frequency,\n        size);\n    stmlib::ParameterInterpolator formant_frequency_modulation(\n        &formant_frequency_,\n        formant_frequency,\n        size);\n    stmlib::ParameterInterpolator carrier_shape_modulation(\n        &carrier_shape_,\n        carrier_shape,\n        size);\n    stmlib::ParameterInterpolator carrier_bleed_modulation(\n        &carrier_bleed_,\n        carrier_bleed,\n        size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      bool reset = false;\n      float reset_time = 0.0f;\n\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float f0 = carrier_frequency_modulation.Next();\n      const float f1 = formant_frequency_modulation.Next();\n    \n      carrier_phase_ += f0;\n      reset = carrier_phase_ >= 1.0f;\n      \n      if (reset) {\n        carrier_phase_ -= 1.0f;\n        reset_time = carrier_phase_ / f0;\n        float before = Grainlet(\n            1.0f,\n            formant_phase_ + (1.0f - reset_time) * f1,\n            carrier_shape_modulation.subsample(1.0f - reset_time),\n            carrier_bleed_modulation.subsample(1.0f - reset_time));\n\n        float after = Grainlet(\n            0.0f,\n            0.0f,\n            carrier_shape_modulation.subsample(1.0f),\n            carrier_bleed_modulation.subsample(1.0f));\n\n        float discontinuity = after - before;\n        this_sample += discontinuity * stmlib::ThisBlepSample(reset_time);\n        next_sample += discontinuity * stmlib::NextBlepSample(reset_time);\n        formant_phase_ = reset_time * f1;\n      } else {\n        formant_phase_ += f1;\n        if (formant_phase_ >= 1.0f) {\n          formant_phase_ -= 1.0f;\n        }\n      }\n      \n      next_sample += Grainlet(\n          carrier_phase_,\n          formant_phase_,\n          carrier_shape_modulation.Next(),\n          carrier_bleed_modulation.Next());\n      *out++ = this_sample;\n    }\n    \n    next_sample_ = next_sample;\n  }\n\n private:\n  inline float Carrier(float phase, float shape) {\n    shape *= 3.0f;\n    MAKE_INTEGRAL_FRACTIONAL(shape);\n    float t = 1.0f - shape_fractional;\n    \n    if (shape_integral == 0) {\n      phase = phase * (1.0f + t * t * t * 15.0f);\n      if (phase >= 1.0f) {\n        phase = 1.0f;\n      }\n      phase += 0.75f;\n    } else if (shape_integral == 1) {\n      float breakpoint = 0.001f + 0.499f * t * t * t;\n      if (phase < breakpoint) {\n        phase *= (0.5f / breakpoint);\n      } else {\n        phase = 0.5f + (phase - breakpoint) * 0.5f / (1.0f - breakpoint);\n      }\n      phase += 0.75f;\n    } else {\n      t = 1.0f - t;\n      phase = 0.25f + phase * (0.5f + t * t * t * 14.5f);\n      if (phase >= 0.75f) phase = 0.75f;\n    }\n    return (Sine(phase) + 1.0f) * 0.25f;\n  }\n\n  inline float Grainlet(\n      float carrier_phase,\n      float formant_phase,\n      float shape,\n      float bleed) {\n    float carrier = Carrier(carrier_phase, shape);\n    float formant = Sine(formant_phase);\n    return carrier * (formant + bleed) / (1.0f + bleed);\n  }\n\n  // Oscillator state.\n  float carrier_phase_;\n  float formant_phase_;\n  float next_sample_;\n\n  // For interpolation of parameters.\n  float carrier_frequency_;\n  float formant_frequency_;\n  float carrier_shape_;\n  float carrier_bleed_;\n  \n  DISALLOW_COPY_AND_ASSIGN(GrainletOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_GRAINLET_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/harmonic_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Harmonic oscillator based on Chebyshev polynomials.\n// Works well for a small number of harmonics. For the higher order harmonics,\n// we need to reinitialize the recurrence by computing two high harmonics.\n\n#ifndef PLAITS_DSP_OSCILLATOR_HARMONIC_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_HARMONIC_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\ntemplate<int num_harmonics>\nclass HarmonicOscillator {\n public:\n  HarmonicOscillator() { }\n  ~HarmonicOscillator() { }\n\n  void Init() {\n    phase_ = 0.0f;\n    frequency_ = 0.0f;\n    for (int i = 0; i < num_harmonics; ++i) {\n      amplitude_[i] = 0.0f;\n    }\n  }\n  \n  template<int first_harmonic_index>\n  void Render(\n      float frequency,\n      const float* amplitudes,\n      float* out,\n      size_t size) {\n    if (frequency >= 0.5f) {\n      frequency = 0.5f;\n    }\n    \n    stmlib::ParameterInterpolator am[num_harmonics];\n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    \n    for (int i = 0; i < num_harmonics; ++i) {\n      float f = frequency * static_cast<float>(first_harmonic_index + i);\n      if (f >= 0.5f) {\n        f = 0.5f;\n      }\n      am[i].Init(&amplitude_[i], amplitudes[i] * (1.0f - f * 2.0f), size);\n    }\n\n    while (size--) {\n      phase_ += fm.Next();\n      if (phase_ >= 1.0f) {\n        phase_ -= 1.0f;\n      }\n      const float two_x = 2.0f * SineNoWrap(phase_);\n      float previous, current;\n      if (first_harmonic_index == 1) {\n        previous = 1.0f;\n        current = two_x * 0.5f;\n      } else {\n        const float k = first_harmonic_index;\n        previous = Sine(phase_ * (k - 1.0f) + 0.25f);\n        current = Sine(phase_ * k);\n      }\n      \n      float sum = 0.0f;\n      for (int i = 0; i < num_harmonics; ++i) {\n        sum += am[i].Next() * current;\n        float temp = current;\n        current = two_x * current - previous;\n        previous = temp;\n      }\n      if (first_harmonic_index == 1) {\n        *out++ = sum;\n      } else {\n        *out++ += sum;\n      }\n    }\n  }\n\n private:\n  // Oscillator state.\n  float phase_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float amplitude_[num_harmonics];\n  \n  DISALLOW_COPY_AND_ASSIGN(HarmonicOscillator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_HARMONIC_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/nes_triangle_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Triangle waveform approximated by 16 discrete steps.\n\n#ifndef PLAITS_DSP_OSCILLATOR_NES_TRIANGLE_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_NES_TRIANGLE_OSCILLATOR_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/wavetable_oscillator.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\ntemplate<int num_bits=5>\nclass NESTriangleOscillator {\n public:\n  NESTriangleOscillator() { }\n  ~NESTriangleOscillator() { }\n  \n  inline void Init() {\n    phase_ = 0.0f;\n    step_ = 0;\n    ascending_ = true;\n    next_sample_ = 0.0f;\n    frequency_ = 0.001f;\n  }\n  \n  inline void Render(float frequency, float* out, size_t size) {\n    // Compute all constants needed to scale the waveform and its\n    // discontinuities.\n    const int num_steps = 1 << num_bits;\n    const int half = num_steps / 2;\n    const int top = num_steps != 2 ? num_steps - 1 : 2;\n    const float num_steps_f = static_cast<float>(num_steps);\n    const float scale = num_steps != 2\n        ? 4.0f / static_cast<float>(top - 1)\n        : 2.0f;\n    \n    frequency = std::min(frequency, 0.25f);\n    \n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    \n    float next_sample = next_sample_;\n    while (size--) {\n      const float frequency = fm.Next();\n      phase_ += frequency;\n      \n      // Compute the point at which we transition between the \"full resolution\"\n      // NES triangle, and a naive band-limited triangle.\n      float fade_to_tri = (frequency - 0.5f / num_steps_f) * 2.0f * num_steps_f;\n      CONSTRAIN(fade_to_tri, 0.0f, 1.0f)\n      \n      const float nes_gain = 1.0f - fade_to_tri;\n      const float tri_gain = fade_to_tri * 2.0f / scale;\n      \n      float this_sample = next_sample;\n      next_sample = 0.0f;\n      \n      // Handle the discontinuity at the top of the naive triangle.\n      if (ascending_ && phase_ >= 0.5f) {\n        float discontinuity = 4.0f * frequency * tri_gain;\n        if (discontinuity) {\n          float t = (phase_ - 0.5f) / frequency;\n          this_sample -= stmlib::ThisIntegratedBlepSample(t) * discontinuity;\n          next_sample -= stmlib::NextIntegratedBlepSample(t) * discontinuity;\n        }\n        ascending_ = false;\n      }\n\n      int next_step = static_cast<int>(phase_ * num_steps_f);\n      if (next_step != step_) {\n        bool wrap = false;\n        if (next_step >= num_steps) {\n          phase_ -= 1.0f;\n          next_step -= num_steps;\n          wrap = true;\n        }\n        \n        float discontinuity = next_step < half ? 1.0f : -1.0f;\n        if (num_steps == 2) {\n          discontinuity = -discontinuity;\n        } else {\n          if (next_step == 0 || next_step == half) {\n            discontinuity = 0.0f;\n          }\n        }\n\n        // Handle the discontinuity at each step of the NES triangle.\n        discontinuity *= nes_gain;\n        if (discontinuity) {\n          float frac = (phase_ * num_steps_f - static_cast<float>(next_step));\n          float t = frac / (frequency * num_steps_f);\n          this_sample += stmlib::ThisBlepSample(t) * discontinuity;\n          next_sample += stmlib::NextBlepSample(t) * discontinuity;\n        }\n        \n        // Handle the discontinuity at the bottom of the naive triangle.\n        if (wrap) {\n          float discontinuity = 4.0f * frequency * tri_gain;\n          if (discontinuity) {\n            float t = phase_ / frequency;\n            this_sample += stmlib::ThisIntegratedBlepSample(t) * discontinuity;\n            next_sample += stmlib::NextIntegratedBlepSample(t) * discontinuity;\n          }\n          ascending_ = true;\n        }\n      }\n      step_ = next_step;\n      \n      // Contribution from NES triangle.\n      next_sample += nes_gain * \\\n          static_cast<float>(step_ < half ? step_ : top - step_);\n\n      // Contribution from naive triangle.\n      next_sample += tri_gain * \\\n          (phase_ < 0.5f ? 2.0f * phase_ : 2.0f - 2.0f * phase_);\n      \n      *out++ = this_sample * scale - 1.0f;\n    }\n    next_sample_ = next_sample;\n  }\n \n private:\n  // Oscillator state.\n  float phase_;\n  float next_sample_;\n  int step_;\n  bool ascending_;\n\n  // For interpolation of parameters.\n  float frequency_;\n\n  DISALLOW_COPY_AND_ASSIGN(NESTriangleOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_NES_TRIANGLE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Single waveform oscillator. Can optionally do audio-rate linear FM, with\n// through-zero capabilities (negative frequencies).\n\n#ifndef PLAITS_DSP_OSCILLATOR_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\nnamespace plaits {\n\nenum OscillatorShape {\n  OSCILLATOR_SHAPE_IMPULSE_TRAIN,\n  OSCILLATOR_SHAPE_SAW,\n  OSCILLATOR_SHAPE_TRIANGLE,\n  OSCILLATOR_SHAPE_SLOPE,\n  OSCILLATOR_SHAPE_SQUARE,\n  OSCILLATOR_SHAPE_SQUARE_BRIGHT,\n  OSCILLATOR_SHAPE_SQUARE_DARK,\n  OSCILLATOR_SHAPE_SQUARE_TRIANGLE\n};\n\nconst float kMaxFrequency = 0.25f;\nconst float kMinFrequency = 0.000001f;\n\nclass Oscillator {\n public:\n  Oscillator() { }\n  ~Oscillator() { }\n  \n  void Init() {\n    phase_ = 0.5f;\n    next_sample_ = 0.0f;\n    lp_state_ = 1.0f;\n    hp_state_ = 0.0f;\n    high_ = true;\n\n    frequency_ = 0.001f;\n    pw_ = 0.5f;\n  }\n\n  template<OscillatorShape shape>\n  void Render(float frequency, float pw, float* out, size_t size) {\n    Render<shape, false, false>(frequency, pw, NULL, out, size);\n  }\n  \n  template<OscillatorShape shape>\n  void Render(\n      float frequency,\n      float pw,\n      const float* fm,\n      float* out,\n      size_t size) {\n    if (!fm) {\n      Render<shape, false, false>(frequency, pw, NULL, out, size);\n    } else {\n      Render<shape, true, true>(frequency, pw, fm, out, size);\n    }\n  }\n\n  template<OscillatorShape shape, bool has_external_fm, bool through_zero_fm>\n  void Render(\n      float frequency,\n      float pw,\n      const float* external_fm,\n      float* out,\n      size_t size) {\n    \n    if (!has_external_fm) {\n      if (!through_zero_fm) {\n        CONSTRAIN(frequency, kMinFrequency, kMaxFrequency);\n      } else {\n        CONSTRAIN(frequency, -kMaxFrequency, kMaxFrequency);\n      }\n      CONSTRAIN(pw, fabsf(frequency) * 2.0f, 1.0f - 2.0f * fabsf(frequency))\n    }\n    \n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    stmlib::ParameterInterpolator pwm(&pw_, pw, size);\n  \n    float next_sample = next_sample_;\n  \n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n\n      float frequency = fm.Next();\n      if (has_external_fm) {\n        frequency *= (1.0f + *external_fm++);\n        if (!through_zero_fm) {\n          CONSTRAIN(frequency, kMinFrequency, kMaxFrequency);\n        } else {\n          CONSTRAIN(frequency, -kMaxFrequency, kMaxFrequency);\n        }\n      }\n      float pw = (shape == OSCILLATOR_SHAPE_SQUARE_TRIANGLE ||\n                  shape == OSCILLATOR_SHAPE_TRIANGLE) ? 0.5f : pwm.Next();\n      if (has_external_fm) {\n        CONSTRAIN(pw, fabsf(frequency) * 2.0f, 1.0f - 2.0f * fabsf(frequency))\n      }\n      phase_ += frequency;\n      \n      if (shape <= OSCILLATOR_SHAPE_SAW) {\n        if (phase_ >= 1.0f) {\n          phase_ -= 1.0f;\n          float t = phase_ / frequency;\n          this_sample -= stmlib::ThisBlepSample(t);\n          next_sample -= stmlib::NextBlepSample(t);\n        } else if (through_zero_fm && phase_ < 0.0f) {\n          float t = phase_ / frequency;\n          phase_ += 1.0f;\n          this_sample += stmlib::ThisBlepSample(t);\n          next_sample += stmlib::NextBlepSample(t);\n        }\n        next_sample += phase_;\n\n        if (shape == OSCILLATOR_SHAPE_SAW) {\n          *out++ = 2.0f * this_sample - 1.0f;\n        } else {\n          lp_state_ += 0.25f * ((hp_state_ - this_sample) - lp_state_);\n          *out++ = 4.0f * lp_state_;\n          hp_state_ = this_sample;\n        }\n      } else if (shape <= OSCILLATOR_SHAPE_SLOPE) {\n        float slope_up = 2.0f;\n        float slope_down = 2.0f;\n        if (shape == OSCILLATOR_SHAPE_SLOPE) {\n          slope_up = 1.0f / (pw);\n          slope_down = 1.0f / (1.0f - pw);\n        }\n        if (high_ ^ (phase_ < pw)) {\n          float t = (phase_ - pw) / frequency;\n          float discontinuity = (slope_up + slope_down) * frequency;\n          if (through_zero_fm && frequency < 0.0f) {\n            discontinuity = -discontinuity;\n          }\n          this_sample -= stmlib::ThisIntegratedBlepSample(t) * discontinuity;\n          next_sample -= stmlib::NextIntegratedBlepSample(t) * discontinuity;\n          high_ = phase_ < pw;\n        }\n        if (phase_ >= 1.0f) {\n          phase_ -= 1.0f;\n          float t = phase_ / frequency;\n          float discontinuity = (slope_up + slope_down) * frequency;\n          this_sample += stmlib::ThisIntegratedBlepSample(t) * discontinuity;\n          next_sample += stmlib::NextIntegratedBlepSample(t) * discontinuity;\n          high_ = true;\n        } else if (through_zero_fm && phase_ < 0.0f) {\n          float t = phase_ / frequency;\n          phase_ += 1.0f;\n          float discontinuity = (slope_up + slope_down) * frequency;\n          this_sample -= stmlib::ThisIntegratedBlepSample(t) * discontinuity;\n          next_sample -= stmlib::NextIntegratedBlepSample(t) * discontinuity;\n          high_ = false;\n        }\n        next_sample += high_\n          ? phase_ * slope_up\n          : 1.0f - (phase_ - pw) * slope_down;\n        *out++ = 2.0f * this_sample - 1.0f;\n      } else {\n        if (high_ ^ (phase_ >= pw)) {\n          float t = (phase_ - pw) / frequency;\n          float discontinuity = 1.0f;\n          if (through_zero_fm && frequency < 0.0f) {\n            discontinuity = -discontinuity;\n          }\n          this_sample += stmlib::ThisBlepSample(t) * discontinuity;\n          next_sample += stmlib::NextBlepSample(t) * discontinuity;\n          high_ = phase_ >= pw;\n        }\n        if (phase_ >= 1.0f) {\n          phase_ -= 1.0f;\n          float t = phase_ / frequency;\n          this_sample -= stmlib::ThisBlepSample(t);\n          next_sample -= stmlib::NextBlepSample(t);\n          high_ = false;\n        } else if (through_zero_fm && phase_ < 0.0f) {\n          float t = phase_ / frequency;\n          phase_ += 1.0f;\n          this_sample += stmlib::ThisBlepSample(t);\n          next_sample += stmlib::NextBlepSample(t);\n          high_ = true;\n        }\n        next_sample += phase_ < pw ? 0.0f : 1.0f;\n        \n        if (shape == OSCILLATOR_SHAPE_SQUARE_TRIANGLE) {\n          const float integrator_coefficient = frequency * 0.0625f;\n          this_sample = 128.0f * (this_sample - 0.5f);\n          lp_state_ += integrator_coefficient * (this_sample - lp_state_);\n          *out++ = lp_state_;\n        } else if (shape == OSCILLATOR_SHAPE_SQUARE_DARK) {\n          const float integrator_coefficient = frequency * 2.0f;\n          this_sample = 4.0f * (this_sample - 0.5f);\n          lp_state_ += integrator_coefficient * (this_sample - lp_state_);\n          *out++ = lp_state_;\n        } else if (shape == OSCILLATOR_SHAPE_SQUARE_BRIGHT) {\n          const float integrator_coefficient = frequency * 2.0f;\n          this_sample = 2.0f * this_sample - 1.0f;\n          lp_state_ += integrator_coefficient * (this_sample - lp_state_);\n          *out++ = (this_sample - lp_state_) * 0.5f;\n        } else {\n          this_sample = 2.0f * this_sample - 1.0f;\n          *out++ = this_sample;\n        }\n      }\n    }\n    next_sample_ = next_sample;\n  }\n  \n private:\n  // Oscillator state.\n  float phase_;\n  float next_sample_;\n  float lp_state_;\n  float hp_state_;\n  bool high_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float pw_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Oscillator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_OSCILLATOR_H_"
  },
  {
    "path": "lib/plaits/dsp/oscillator/sine_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple sine oscillator (wavetable) + fast sine oscillator (magic circle).\n//\n// The fast implementation might glitch a bit under heavy modulations of the\n// frequency.\n\n#ifndef PLAITS_DSP_OSCILLATOR_SINE_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_SINE_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/rsqrt.h\"\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n  \nconst float kSineLUTSize = 512.0f;\nconst size_t kSineLUTQuadrature = 128;\nconst size_t kSineLUTBits = 9;\n\n// Safe for phase >= 0.0f, will wrap.\ninline float Sine(float phase) {\n  return stmlib::InterpolateWrap(lut_sine, phase, kSineLUTSize);\n}\n\n// Potentially unsafe, if phase >= 1.25.\ninline float SineNoWrap(float phase) {\n  return stmlib::Interpolate(lut_sine, phase, kSineLUTSize);\n}\n\n// With positive of negative phase modulation up to an index of 32.\ninline float SinePM(uint32_t phase, float pm) {\n  const float max_uint32 = 4294967296.0f;\n  const int max_index = 32;\n  const float offset = float(max_index);\n  const float scale = max_uint32 / float(max_index * 2);\n\n  phase += static_cast<uint32_t>((pm + offset) * scale) * max_index * 2;\n  \n  uint32_t integral = phase >> (32 - kSineLUTBits);\n  float fractional = static_cast<float>(phase << kSineLUTBits) / float(max_uint32);\n  float a = lut_sine[integral];\n  float b = lut_sine[integral + 1];\n  return a + (b - a) * fractional;\n}\n\n// Direct lookup without interpolation.\ninline float SineRaw(uint32_t phase) {\n  return lut_sine[phase >> (32 - kSineLUTBits)];\n}\n\nclass SineOscillator {\n public:\n  SineOscillator() { }\n  ~SineOscillator() { }\n\n  void Init() {\n    phase_ = 0.0f;\n    frequency_ = 0.0f;\n    amplitude_ = 0.0f;\n  }\n  \n  inline float Next(float frequency) {\n    if (frequency >= 0.5f) {\n      frequency = 0.5f;\n    }\n    \n    phase_ += frequency;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n    }\n    \n    return SineNoWrap(phase_);\n  }\n  \n  inline void Next(float frequency, float amplitude, float* sin, float* cos) {\n    if (frequency >= 0.5f) {\n      frequency = 0.5f;\n    }\n    \n    phase_ += frequency;\n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n    }\n    \n    *sin = amplitude * SineNoWrap(phase_);\n    *cos = amplitude * SineNoWrap(phase_ + 0.25f);\n  }\n  \n  void Render(float frequency, float amplitude, float* out, size_t size) {\n    RenderInternal<true>(frequency, amplitude, out, size);\n  }\n  \n  void Render(float frequency, float* out, size_t size) {\n    RenderInternal<false>(frequency, 1.0f, out, size);\n  }\n\n private:\n  template<bool additive>\n  void RenderInternal(\n      float frequency, float amplitude, float* out, size_t size) {\n    if (frequency >= 0.5f) {\n      frequency = 0.5f;\n    }\n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    stmlib::ParameterInterpolator am(&amplitude_, amplitude, size);\n\n    while (size--) {\n      phase_ += fm.Next();\n      if (phase_ >= 1.0f) {\n        phase_ -= 1.0f;\n      }\n      float s = SineNoWrap(phase_);\n      if (additive) {\n        *out++ += am.Next() * s;\n      } else {\n        *out++ = s;\n      }\n    }\n  }\n  \n  // Oscillator state.\n  float phase_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float amplitude_;\n  \n  DISALLOW_COPY_AND_ASSIGN(SineOscillator);\n};\n\nclass FastSineOscillator {\n public:\n  FastSineOscillator() { }\n  ~FastSineOscillator() { }\n\n  void Init() {\n    x_ = 1.0f;\n    y_ = 0.0f;\n    epsilon_ = 0.0f;\n    amplitude_ = 0.0f;\n  }\n  \n  enum Mode {\n    NORMAL,\n    ADDITIVE,\n    QUADRATURE\n  };\n  \n  static inline float Fast2Sin(float f) {\n    // In theory, epsilon = 2 sin(pi f)\n    // Here, to avoid the call to sinf, we use a 3rd order polynomial\n    // approximation, which looks like a Taylor expansion, but with a\n    // correction term to give a good trade-off between average error\n    // (1.13 cents) and maximum error (7.33 cents) when generating sinewaves\n    // in the 16 Hz to 16kHz range (with sr = 48kHz).\n    const float f_pi = f * float(M_PI);\n    return f_pi * (2.0f - (2.0f * 0.96f / 6.0f) * f_pi * f_pi);\n  }\n  \n  void Render(float frequency, float* out, size_t size) {\n    RenderInternal<NORMAL>(frequency, 1.0f, out, NULL, size);\n  }\n  \n  void Render(float frequency, float amplitude, float* out, size_t size) {\n    RenderInternal<ADDITIVE>(frequency, amplitude, out, NULL, size);\n  }\n\n  void RenderQuadrature(\n      float frequency, float amplitude, float* x, float* y, size_t size) {\n    RenderInternal<QUADRATURE>(frequency, amplitude, x, y, size);\n  }\n  \n private:\n  template<Mode mode>\n  void RenderInternal(\n      float frequency, float amplitude, float* out, float* out_2, size_t size) {\n    if (frequency >= 0.25f) {\n      frequency = 0.25f;\n      amplitude = 0.0f;\n    } else {\n      amplitude *= 1.0f - frequency * 4.0f;\n    }\n    \n    stmlib::ParameterInterpolator epsilon(&epsilon_, Fast2Sin(frequency), size);\n    stmlib::ParameterInterpolator am(&amplitude_, amplitude, size);\n    float x = x_;\n    float y = y_;\n    \n    const float norm = x * x + y * y;\n    if (norm <= 0.5f || norm >= 2.0f) {\n      const float scale = stmlib::fast_rsqrt_carmack(norm);\n      x *= scale;\n      y *= scale;\n    }\n    \n    while (size--) {\n      const float e = epsilon.Next();\n      x += e * y;\n      y -= e * x;\n      if (mode == ADDITIVE) {\n        *out++ += am.Next() * x;\n      } else if (mode == NORMAL) {\n        *out++ = x;\n      } else if (mode == QUADRATURE) {\n        const float amplitude = am.Next();\n        *out++ = x * amplitude;\n        *out_2++ = y * amplitude;\n      }\n    }\n    x_ = x;\n    y_ = y;\n  }\n     \n  // Oscillator state.\n  float x_;\n  float y_;\n\n  // For interpolation of parameters.\n  float epsilon_;\n  float amplitude_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FastSineOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_SINE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/string_synth_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A mixture of 7 sawtooth and square waveforms in the style of divide-down\n// organs:\n//\n// [0]     [1]        [2]     [3]        [4]     [5]        [6]\n// Saw 8', Square 8', Saw 4', Square 4', Saw 2', Square 2', Saw 1'\n//\n// Internally, this renders 4 band-limited sawtooths, from 8' to 1' from a\n// single phase counter. The square waveforms are obtained by algebraic\n// manipulations on the sawtooths, using the identity:\n// Square 16' = 2 Sawtooth 16' - Sawtooth 8'\n\n#ifndef PLAITS_DSP_OSCILLATOR_STRING_SYNTH_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_STRING_SYNTH_OSCILLATOR_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\nnamespace plaits {\n\nclass StringSynthOscillator {\n public:\n  StringSynthOscillator() { }\n  ~StringSynthOscillator() { }\n  \n  inline void Init() {\n    phase_ = 0.0f;\n    next_sample_ = 0.0f;\n    segment_ = 0.0f;\n    \n    frequency_ = 0.001f;\n    saw_8_gain_ = 0.0f;\n    saw_4_gain_ = 0.0f;\n    saw_2_gain_ = 0.0f;\n    saw_1_gain_ = 0.0f;\n  }\n  \n  inline void Render(\n      float frequency,\n      const float* unshifted_registration,\n      float gain,\n      float* out,\n      size_t size) {\n    frequency *= 8.0f;\n    \n    // Deal with very high frequencies by shifting everything 1 or 2 octave\n    // down: Instead of playing the 1st harmonic of a 8kHz wave, we play the\n    // second harmonic of a 4kHz wave.\n    size_t shift = 0;\n    while (frequency > 0.5f) {\n      shift += 2;\n      frequency *= 0.5f;\n    }\n    // Frequency is just too high.\n    if (shift >= 8) {\n      return;\n    }\n    \n    float registration[7];\n    std::fill(&registration[0], &registration[shift], 0.0f);\n    std::copy(\n        &unshifted_registration[0],\n        &unshifted_registration[7 - shift],\n        &registration[shift]);\n    \n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    stmlib::ParameterInterpolator saw_8_gain_modulation(\n        &saw_8_gain_,\n        (registration[0] + 2.0f * registration[1]) * gain,\n        size);\n    stmlib::ParameterInterpolator saw_4_gain_modulation(\n        &saw_4_gain_,\n        (registration[2] - registration[1] + 2.0f * registration[3]) * gain,\n        size);\n    stmlib::ParameterInterpolator saw_2_gain_modulation(\n        &saw_2_gain_,\n        (registration[4] - registration[3] + 2.0f * registration[5]) * gain,\n        size);\n    stmlib::ParameterInterpolator saw_1_gain_modulation(\n        &saw_1_gain_,\n        (registration[6] - registration[5]) * gain,\n        size);\n    \n    float phase = phase_;\n    float next_sample = next_sample_;\n    int segment = segment_;\n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n  \n      const float frequency = fm.Next();\n      const float saw_8_gain = saw_8_gain_modulation.Next();\n      const float saw_4_gain = saw_4_gain_modulation.Next();\n      const float saw_2_gain = saw_2_gain_modulation.Next();\n      const float saw_1_gain = saw_1_gain_modulation.Next();\n\n      phase += frequency;\n      int next_segment = static_cast<int>(phase);\n      if (next_segment != segment) {\n        float discontinuity = 0.0f;\n        if (next_segment == 8) {\n          phase -= 8.0f;\n          next_segment -= 8;\n          discontinuity -= saw_8_gain;\n        }\n        if ((next_segment & 3) == 0) {\n          discontinuity -= saw_4_gain;\n        }\n        if ((next_segment & 1) == 0) {\n          discontinuity -= saw_2_gain;\n        }\n        discontinuity -= saw_1_gain;\n        if (discontinuity != 0.0f) {\n          float fraction = phase - static_cast<float>(next_segment);\n          float t = fraction / frequency;\n          this_sample += stmlib::ThisBlepSample(t) * discontinuity;\n          next_sample += stmlib::NextBlepSample(t) * discontinuity;\n        }\n      }\n      segment = next_segment;\n      \n      next_sample += (phase - 4.0f) * saw_8_gain * 0.125f;\n      next_sample += (phase - float(segment & 4) - 2.0f) * saw_4_gain * 0.25f;\n      next_sample += (phase - float(segment & 6) - 1.0f) * saw_2_gain * 0.5f;\n      next_sample += (phase - float(segment & 7) - 0.5f) * saw_1_gain;\n      *out++ += 2.0f * this_sample;\n    }\n    next_sample_ = next_sample;\n    phase_ = phase;\n    segment_ = segment;\n  }\n \n private:\n  // Oscillator state.\n  float phase_;\n  float next_sample_;\n  int segment_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float saw_8_gain_;\n  float saw_4_gain_;\n  float saw_2_gain_;\n  float saw_1_gain_;\n\n  DISALLOW_COPY_AND_ASSIGN(StringSynthOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_STRING_SYNTH_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/super_square_oscillator.h",
    "content": "// Copyright 2021 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Two hard-sync'ed square waves with a meta-parameter, also faking PWM.\n// Based on VariableShapeOscillator, with hard-coded pulse width (0.5),\n// waveshape (only square), and sync enabled by default.\n\n#ifndef PLAITS_DSP_OSCILLATOR_SUPERSQUARE_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_SUPERSQUARE_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nclass SuperSquareOscillator {\n public:\n  SuperSquareOscillator() { }\n  ~SuperSquareOscillator() { }\n\n  void Init() {\n    master_phase_ = 0.0f;\n    slave_phase_ = 0.0f;\n    next_sample_ = 0.0f;\n    high_ = false;\n  \n    master_frequency_ = 0.0f;\n    slave_frequency_ = 0.01f;\n  }\n  \n  void Render(\n      float frequency,\n      float shape,\n      float* out,\n      size_t size) {\n    float master_frequency = frequency;\n    frequency *= shape < 0.5f\n        ? (0.51f + 0.98f * shape)\n        : 1.0f + 16.0f * (shape - 0.5f) * (shape - 0.5f);\n\n    if (master_frequency >= kMaxFrequency) {\n      master_frequency = kMaxFrequency;\n    }\n    \n    if (frequency >= kMaxFrequency) {\n      frequency = kMaxFrequency;\n    }\n    \n    stmlib::ParameterInterpolator master_fm(\n        &master_frequency_, master_frequency, size);\n    stmlib::ParameterInterpolator fm(&slave_frequency_, frequency, size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      bool reset = false;\n      bool transition_during_reset = false;\n      float reset_time = 0.0f;\n\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float master_frequency = master_fm.Next();\n      const float slave_frequency = fm.Next();\n\n      master_phase_ += master_frequency;\n      if (master_phase_ >= 1.0f) {\n        master_phase_ -= 1.0f;\n        reset_time = master_phase_ / master_frequency;\n      \n        float slave_phase_at_reset = slave_phase_ + \\\n            (1.0f - reset_time) * slave_frequency;\n        reset = true;\n        if (slave_phase_at_reset >= 1.0f) {\n          slave_phase_at_reset -= 1.0f;\n          transition_during_reset = true;\n        }\n        if (!high_ && slave_phase_at_reset >= 0.5f) {\n          transition_during_reset = true;\n        }\n        float value = slave_phase_at_reset < 0.5f ? 0.0f : 1.0f;\n        this_sample -= value * stmlib::ThisBlepSample(reset_time);\n        next_sample -= value * stmlib::NextBlepSample(reset_time);\n      }\n      \n      slave_phase_ += slave_frequency;\n      while (transition_during_reset || !reset) {\n        if (!high_) {\n          if (slave_phase_ < 0.5f) {\n            break;\n          }\n          float t = (slave_phase_ - 0.5f) / slave_frequency;\n          this_sample += stmlib::ThisBlepSample(t);\n          next_sample += stmlib::NextBlepSample(t);\n          high_ = true;\n        }\n      \n        if (high_) {\n          if (slave_phase_ < 1.0f) {\n            break;\n          }\n          slave_phase_ -= 1.0f;\n          float t = slave_phase_ / slave_frequency;\n          this_sample -= stmlib::ThisBlepSample(t);\n          next_sample -= stmlib::NextBlepSample(t);\n          high_ = false;\n        }\n      }\n    \n      if (reset) {\n        slave_phase_ = reset_time * slave_frequency;\n        high_ = false;\n      }\n    \n      next_sample += slave_phase_ < 0.5f ? 0.0f : 1.0f;\n      *out++ = 2.0f * this_sample - 1.0f;\n    }\n    \n    next_sample_ = next_sample;\n  }\n\n private:\n  // Oscillator state.\n  float master_phase_;\n  float slave_phase_;\n  float next_sample_;\n  bool high_;\n\n  // For interpolation of parameters.\n  float master_frequency_;\n  float slave_frequency_;\n\n  DISALLOW_COPY_AND_ASSIGN(SuperSquareOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_SUPERSQUARE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/variable_saw_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Saw with variable slope or notch\n\n#ifndef PLAITS_DSP_OSCILLATOR_VARIABLE_SAW_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_VARIABLE_SAW_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include <algorithm>\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n\nconst float kVariableSawNotchDepth = 0.2f;\n\nclass VariableSawOscillator {\n public:\n  VariableSawOscillator() { }\n  ~VariableSawOscillator() { }\n\n  void Init() {\n    phase_ = 0.0f;\n    next_sample_ = 0.0f;\n    previous_pw_ = 0.5f;\n    high_ = false;\n  \n    frequency_ = 0.01f;\n    pw_ = 0.5f;\n    waveshape_ = 0.0f;\n  }\n  \n  void Render(\n      float frequency,\n      float pw,\n      float waveshape,\n      float* out,\n      size_t size) {\n    if (frequency >= kMaxFrequency) {\n      frequency = kMaxFrequency;\n    }\n    \n    if (frequency >= 0.25f) {\n      pw = 0.5f;\n    } else {\n      CONSTRAIN(pw, frequency * 2.0f, 1.0f - 2.0f * frequency);\n    }\n\n    stmlib::ParameterInterpolator fm(&frequency_, frequency, size);\n    stmlib::ParameterInterpolator pwm(&pw_, pw, size);\n    stmlib::ParameterInterpolator waveshape_modulation(\n        &waveshape_, waveshape, size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float frequency = fm.Next();\n      const float pw = pwm.Next();\n      const float waveshape = waveshape_modulation.Next();\n      const float triangle_amount = waveshape;\n      const float notch_amount = 1.0f - waveshape;\n      const float slope_up = 1.0f / (pw);\n      const float slope_down = 1.0f / (1.0f - pw);\n\n      phase_ += frequency;\n      \n      if (!high_ && phase_ >= pw) {\n        const float triangle_step = (slope_up + slope_down) * frequency * triangle_amount;\n        const float notch = (kVariableSawNotchDepth + 1.0f - pw) * notch_amount;\n        const float t = (phase_ - pw) / (previous_pw_ - pw + frequency);\n        this_sample += notch * stmlib::ThisBlepSample(t);\n        next_sample += notch * stmlib::NextBlepSample(t);\n        this_sample -= triangle_step * stmlib::ThisIntegratedBlepSample(t);\n        next_sample -= triangle_step * stmlib::NextIntegratedBlepSample(t);\n        high_ = true;\n      } else if (phase_ >= 1.0f) {\n        phase_ -= 1.0f;\n        const float triangle_step = (slope_up + slope_down) * frequency * triangle_amount;\n        const float notch = (kVariableSawNotchDepth + 1.0f) * notch_amount;\n        const float t = phase_ / frequency;\n        this_sample -= notch * stmlib::ThisBlepSample(t);\n        next_sample -= notch * stmlib::NextBlepSample(t);\n        this_sample += triangle_step * stmlib::ThisIntegratedBlepSample(t);\n        next_sample += triangle_step * stmlib::NextIntegratedBlepSample(t);\n        high_ = false;\n      }\n    \n      next_sample += ComputeNaiveSample(\n          phase_,\n          pw,\n          slope_up,\n          slope_down,\n          triangle_amount,\n          notch_amount);\n      previous_pw_ = pw;\n\n      *out++ = (2.0f * this_sample - 1.0f) / (1.0f + kVariableSawNotchDepth);\n    }\n    \n    next_sample_ = next_sample;\n  }\n\n\n private:\n  inline float ComputeNaiveSample(\n      float phase,\n      float pw,\n      float slope_up,\n      float slope_down,\n      float triangle_amount,\n      float notch_amount) const {\n    float notch_saw = phase < pw ? phase : 1.0f + kVariableSawNotchDepth;\n    float triangle = phase < pw\n        ? phase * slope_up\n        : 1.0f - (phase - pw) * slope_down;\n    return notch_saw * notch_amount + triangle * triangle_amount;\n  }\n\n  // Oscillator state.\n  float phase_;\n  float next_sample_;\n  float previous_pw_;\n  bool high_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float pw_;\n  float waveshape_;\n\n  DISALLOW_COPY_AND_ASSIGN(VariableSawOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_VARIABLE_SAW_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/variable_shape_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Continuously variable waveform: triangle > saw > square. Both square and\n// triangle have variable slope / pulse-width. Additionally, the phase resets\n// can be locked to a master frequency.\n//\n// A template parameter allows the generation of a master + slave signal,\n// which can be used as the phase for phase distortion or modulation synthesis.\n\n#ifndef PLAITS_DSP_OSCILLATOR_VARIABLE_SHAPE_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_VARIABLE_SHAPE_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\n#include <algorithm>\n\nnamespace plaits {\n\nclass VariableShapeOscillator {\n public:\n  VariableShapeOscillator() { }\n  ~VariableShapeOscillator() { }\n\n  void Init() {\n    master_phase_ = 0.0f;\n    slave_phase_ = 0.0f;\n    next_sample_ = 0.0f;\n    previous_pw_ = 0.5f;\n    high_ = false;\n  \n    master_frequency_ = 0.0f;\n    slave_frequency_ = 0.01f;\n    pw_ = 0.5f;\n    waveshape_ = 0.0f;\n    phase_modulation_ = 0.0f;\n  }\n\n  void Render(\n      float frequency,\n      float pw,\n      float waveshape,\n      float* out,\n      size_t size) {\n    Render<false, false>(0.0f, frequency, pw, waveshape, 0.0f, out, size);\n  }\n  \n  void Render(\n      float master_frequency,\n      float frequency,\n      float pw,\n      float waveshape,\n      float* out,\n      size_t size) {\n    Render<true, false>(\n        master_frequency,\n        frequency,\n        pw,\n        waveshape,\n        0.0f,\n        out, size);\n  }\n  \n  template<bool enable_sync, bool output_phase>\n  void Render(\n      float master_frequency,\n      float frequency,\n      float pw,\n      float waveshape,\n      float phase_modulation_amount,\n      float* out,\n      size_t size) {\n    if (master_frequency >= kMaxFrequency) {\n      master_frequency = kMaxFrequency;\n    }\n    if (frequency >= kMaxFrequency) {\n      frequency = kMaxFrequency;\n    }\n    \n    if (frequency >= 0.25f) {\n      pw = 0.5f;\n    } else {\n      CONSTRAIN(pw, frequency * 2.0f, 1.0f - 2.0f * frequency);\n    }\n    \n    stmlib::ParameterInterpolator master_fm(\n        &master_frequency_, master_frequency, size);\n    stmlib::ParameterInterpolator fm(&slave_frequency_, frequency, size);\n    stmlib::ParameterInterpolator pwm(&pw_, pw, size);\n    stmlib::ParameterInterpolator waveshape_modulation(\n        &waveshape_, waveshape, size);\n    stmlib::ParameterInterpolator phase_modulation(\n        &phase_modulation_, phase_modulation_amount, size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      bool reset = false;\n      bool transition_during_reset = false;\n      float reset_time = 0.0f;\n\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float master_frequency = master_fm.Next();\n      const float slave_frequency = fm.Next();\n      const float pw = pwm.Next();\n      const float waveshape = waveshape_modulation.Next();\n      \n      const float square_amount = std::max(waveshape - 0.5f, 0.0f) * 2.0f;\n      const float triangle_amount = std::max(1.0f - waveshape * 2.0f, 0.0f);\n      \n      const float slope_up = 1.0f / (pw);\n      const float slope_down = 1.0f / (1.0f - pw);\n\n      if (enable_sync) {\n        master_phase_ += master_frequency;\n        if (master_phase_ >= 1.0f) {\n          master_phase_ -= 1.0f;\n          reset_time = master_phase_ / master_frequency;\n      \n          float slave_phase_at_reset = slave_phase_ + \\\n              (1.0f - reset_time) * slave_frequency;\n          reset = true;\n          if (slave_phase_at_reset >= 1.0f) {\n            slave_phase_at_reset -= 1.0f;\n            transition_during_reset = true;\n          }\n          if (!high_ && slave_phase_at_reset >= pw) {\n            transition_during_reset = true;\n          }\n          float value = ComputeNaiveSample(\n              slave_phase_at_reset,\n              pw,\n              slope_up,\n              slope_down,\n              triangle_amount,\n              square_amount);\n          this_sample -= value * stmlib::ThisBlepSample(reset_time);\n          next_sample -= value * stmlib::NextBlepSample(reset_time);\n        }\n      } else if (output_phase) {\n        master_phase_ += master_frequency;\n        if (master_phase_ >= 1.0f) {\n          master_phase_ -= 1.0f;\n        }\n      }\n      \n      slave_phase_ += slave_frequency;\n      while (transition_during_reset || !reset) {\n        if (!high_) {\n          if (slave_phase_ < pw) {\n            break;\n          }\n          float t = (slave_phase_ - pw) / (previous_pw_ - pw + slave_frequency);\n          float triangle_step = (slope_up + slope_down) * slave_frequency;\n          triangle_step *= triangle_amount;\n          \n          this_sample += square_amount * stmlib::ThisBlepSample(t);\n          next_sample += square_amount * stmlib::NextBlepSample(t);\n          this_sample -= triangle_step * stmlib::ThisIntegratedBlepSample(t);\n          next_sample -= triangle_step * stmlib::NextIntegratedBlepSample(t);\n          high_ = true;\n        }\n      \n        if (high_) {\n          if (slave_phase_ < 1.0f) {\n            break;\n          }\n          slave_phase_ -= 1.0f;\n          float t = slave_phase_ / slave_frequency;\n          float triangle_step = (slope_up + slope_down) * slave_frequency;\n          triangle_step *= triangle_amount;\n\n          this_sample -= (1.0f - triangle_amount) * stmlib::ThisBlepSample(t);\n          next_sample -= (1.0f - triangle_amount) * stmlib::NextBlepSample(t);\n          this_sample += triangle_step * stmlib::ThisIntegratedBlepSample(t);\n          next_sample += triangle_step * stmlib::NextIntegratedBlepSample(t);\n          high_ = false;\n        }\n      }\n    \n      if (enable_sync && reset) {\n        slave_phase_ = reset_time * slave_frequency;\n        high_ = false;\n      }\n    \n      next_sample += ComputeNaiveSample(\n          slave_phase_,\n          pw,\n          slope_up,\n          slope_down,\n          triangle_amount,\n          square_amount);\n      previous_pw_ = pw;\n      \n      if (output_phase) {\n        float phasor = master_phase_;\n        if (enable_sync) {\n          // A trick to prevent discontinuities when the phase wraps around.\n          const float w = 4.0f * (1.0f - master_phase_) * master_phase_;\n          this_sample *= w * (2.0f - w);\n          \n          // Apply some asymmetry on the main phasor too.\n          const float p2 = phasor * phasor;\n          phasor += (p2 * p2 - phasor) * fabsf(pw - 0.5f) * 2.0f;\n        }\n        *out++ = phasor + phase_modulation.Next() * this_sample;\n      } else {\n        *out++ = (2.0f * this_sample - 1.0f);\n      }\n    }\n    \n    next_sample_ = next_sample;\n  }\n  \n  inline void set_master_phase(float master_phase) {\n    master_phase_ = master_phase;\n  }\n  \n private:\n  inline float ComputeNaiveSample(\n      float phase,\n      float pw,\n      float slope_up,\n      float slope_down,\n      float triangle_amount,\n      float square_amount) const {\n    float saw = phase;\n    float square = phase < pw ? 0.0f : 1.0f;\n    float triangle = phase < pw\n        ? phase * slope_up\n        : 1.0f - (phase - pw) * slope_down;\n    saw += (square - saw) * square_amount;\n    saw += (triangle - saw) * triangle_amount;\n    return saw;\n  }\n\n  // Oscillator state.\n  float master_phase_;\n  float slave_phase_;\n  float next_sample_;\n  float previous_pw_;\n  bool high_;\n\n  // For interpolation of parameters.\n  float master_frequency_;\n  float slave_frequency_;\n  float pw_;\n  float waveshape_;\n  float phase_modulation_;\n\n  DISALLOW_COPY_AND_ASSIGN(VariableShapeOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_VARIABLE_SHAPE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/vosim_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Two sinewaves multiplied by and sync'ed to a carrier.\n\n#ifndef PLAITS_DSP_OSCILLATOR_VOSIM_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_VOSIM_OSCILLATOR_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nclass VOSIMOscillator {\n public:\n  VOSIMOscillator() { }\n  ~VOSIMOscillator() { }\n\n  void Init() {\n    carrier_phase_ = 0.0f;\n    formant_1_phase_ = 0.0f;\n    formant_2_phase_ = 0.0f;\n  \n    carrier_frequency_ = 0.0f;\n    formant_1_frequency_ = 0.0f;\n    formant_2_frequency_ = 0.0f;\n    carrier_shape_ = 0.0f;\n  }\n  \n  void Render(\n      float carrier_frequency,\n      float formant_frequency_1,\n      float formant_frequency_2,\n      float carrier_shape,\n      float* out,\n      size_t size) {\n    if (carrier_frequency >= kMaxFrequency) {\n      carrier_frequency = kMaxFrequency;\n    }\n    if (formant_frequency_1 >= kMaxFrequency) {\n      formant_frequency_1 = kMaxFrequency;\n    }\n    if (formant_frequency_2 >= kMaxFrequency) {\n      formant_frequency_2 = kMaxFrequency;\n    }\n\n    stmlib::ParameterInterpolator f0_modulation(\n        &carrier_frequency_,\n        carrier_frequency,\n        size);\n    stmlib::ParameterInterpolator f1_modulation(\n        &formant_1_frequency_,\n        formant_frequency_1,\n        size);\n    stmlib::ParameterInterpolator f2_modulation(\n        &formant_2_frequency_,\n        formant_frequency_2,\n        size);\n    stmlib::ParameterInterpolator carrier_shape_modulation(\n        &carrier_shape_,\n        carrier_shape,\n        size);\n\n    while (size--) {\n      const float f0 = f0_modulation.Next();\n      const float f1 = f1_modulation.Next();\n      const float f2 = f2_modulation.Next();\n    \n      carrier_phase_ += carrier_frequency;\n      if (carrier_phase_ >= 1.0f) {\n        carrier_phase_ -= 1.0f;\n        float reset_time = carrier_phase_ / f0;\n        formant_1_phase_ = reset_time * f1;\n        formant_2_phase_ = reset_time * f2;\n      } else {\n        formant_1_phase_ += f1;\n        if (formant_1_phase_ >= 1.0f) {\n          formant_1_phase_ -= 1.0f;\n        }\n        formant_2_phase_ += f2;\n        if (formant_2_phase_ >= 1.0f) {\n          formant_2_phase_ -= 1.0f;\n        }\n      }\n      \n      float carrier = Sine(carrier_phase_ * 0.5f + 0.25f) + 1.0f;\n      float reset_phase = 0.75f - 0.25f * carrier_shape_modulation.Next();\n      float reset_amplitude = Sine(reset_phase);\n      float formant_0 = Sine(formant_1_phase_ + reset_phase) - reset_amplitude;\n      float formant_1 = Sine(formant_2_phase_ + reset_phase) - reset_amplitude;\n      *out++ = carrier * (formant_0 + formant_1) * 0.25f + reset_amplitude;\n    }\n  }\n\n private:\n  // Oscillator state.\n  float carrier_phase_;\n  float formant_1_phase_;\n  float formant_2_phase_;\n\n  // For interpolation of parameters.\n  float carrier_frequency_;\n  float formant_1_frequency_;\n  float formant_2_frequency_;\n  float carrier_shape_;\n  \n  DISALLOW_COPY_AND_ASSIGN(VOSIMOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_VOSIM_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/wavetable_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Integrated wavetable synthesis.\n\n#ifndef PLAITS_DSP_OSCILLATOR_WAVETABLE_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_WAVETABLE_OSCILLATOR_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n\nclass Differentiator {\n public:\n  Differentiator() { }\n  ~Differentiator() { }\n\n  void Init() {\n    previous_ = 0.0f;\n    lp_ = 0.0f;\n  }\n  \n  float Process(float coefficient, float s) {\n    ONE_POLE(lp_, s - previous_, coefficient);\n    previous_ = s;\n    return lp_;\n  }\n private:\n  float lp_;\n  float previous_;\n\n  DISALLOW_COPY_AND_ASSIGN(Differentiator);\n};\n\ntemplate<typename T>\ninline float InterpolateWave(\n    const T* table,\n    int32_t index_integral,\n    float index_fractional) {\n  float a = static_cast<float>(table[index_integral]);\n  float b = static_cast<float>(table[index_integral + 1]);\n  float t = index_fractional;\n  return a + (b - a) * t;\n}\n\ntemplate<typename T>\ninline float InterpolateWaveHermite(\n    const T* table,\n    int32_t index_integral,\n    float index_fractional) {\n  const float xm1 = static_cast<float>(table[index_integral]);\n  const float x0 = static_cast<float>(table[index_integral + 1]);\n  const float x1 = static_cast<float>(table[index_integral + 2]);\n  const float x2 = static_cast<float>(table[index_integral + 3]);\n  const float c = (x1 - xm1) * 0.5f;\n  const float v = x0 - x1;\n  const float w = c + v;\n  const float a = w + v + (x2 - x0) * 0.5f;\n  const float b_neg = w + a;\n  const float f = index_fractional;\n  return (((a * f) - b_neg) * f + c) * f + x0;\n}\n\ntemplate<\n    size_t wavetable_size,\n    size_t num_waves,\n    bool approximate_scale=true,\n    bool attenuate_high_frequencies=true>\nclass WavetableOscillator {\n public:\n  WavetableOscillator() { }\n  ~WavetableOscillator() { }\n\n  void Init() {\n    phase_ = 0.0f;\n    frequency_ = 0.0f;\n    amplitude_ = 0.0f;\n    waveform_ = 0.0f;\n    lp_ = 0.0f;\n    differentiator_.Init();\n  }\n  \n  void Render(\n      float frequency,\n      float amplitude,\n      float waveform,\n      const int16_t* const* wavetable,\n      float* out,\n      size_t size) {\n    CONSTRAIN(frequency, 0.0000001f, kMaxFrequency)\n\n    if (attenuate_high_frequencies) {\n      amplitude *= 1.0f - 2.0f * frequency;\n    }\n    if (approximate_scale) {\n      amplitude *= 1.0f / (frequency * 131072.0f);\n    }\n\n    stmlib::ParameterInterpolator frequency_modulation(\n        &frequency_,\n        frequency,\n        size);\n    stmlib::ParameterInterpolator amplitude_modulation(\n        &amplitude_,\n        amplitude,\n        size);\n    stmlib::ParameterInterpolator waveform_modulation(\n        &waveform_,\n        waveform * float(num_waves - 1.0001f),\n        size);\n    \n    float lp = lp_;\n    float phase = phase_;\n    while (size--) {\n      const float f0 = frequency_modulation.Next();\n      const float cutoff = std::min(float(wavetable_size) * f0, 1.0f);\n      const float scale = approximate_scale ? 1.0f : 1.0f / (f0 * 131072.0f);\n      \n      phase += f0;\n      if (phase >= 1.0f) {\n        phase -= 1.0f;\n      }\n      \n      const float waveform = waveform_modulation.Next();\n      MAKE_INTEGRAL_FRACTIONAL(waveform);\n      \n      const float p = phase * float(wavetable_size);\n      MAKE_INTEGRAL_FRACTIONAL(p);\n      \n      const float x0 = InterpolateWave(\n          wavetable[waveform_integral], p_integral, p_fractional);\n      const float x1 = InterpolateWave(\n          wavetable[waveform_integral + 1], p_integral, p_fractional);\n      \n      const float s = differentiator_.Process(\n          cutoff,\n          (x0 + (x1 - x0) * waveform_fractional) * scale);\n      ONE_POLE(lp, s, cutoff);\n      *out++ += amplitude_modulation.Next() * lp;\n    }\n    lp_ = lp;\n    phase_ = phase;\n  }\n\n private:\n  // Oscillator state.\n  float phase_;\n\n  // For interpolation of parameters.\n  float frequency_;\n  float amplitude_;\n  float waveform_;\n  float lp_;\n  \n  Differentiator differentiator_;\n  \n  DISALLOW_COPY_AND_ASSIGN(WavetableOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_WAVETABLE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/oscillator/z_oscillator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sinewave multiplied by and sync'ed to a carrier.\n\n#ifndef PLAITS_DSP_OSCILLATOR_Z_OSCILLATOR_H_\n#define PLAITS_DSP_OSCILLATOR_Z_OSCILLATOR_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/polyblep.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n\nnamespace plaits {\n\nclass ZOscillator {\n public:\n  ZOscillator() { }\n  ~ZOscillator() { }\n\n  void Init() {\n    carrier_phase_ = 0.0f;\n    discontinuity_phase_ = 0.0f;\n    formant_phase_ = 0.0f;\n    next_sample_ = 0.0f;\n  \n    carrier_frequency_ = 0.0f;\n    formant_frequency_ = 0.0f;\n    carrier_shape_ = 0.0f;\n    mode_ = 0.0f;\n  }\n  \n  void Render(\n      float carrier_frequency,\n      float formant_frequency,\n      float carrier_shape,\n      float mode,\n      float* out,\n      size_t size) {\n    if (carrier_frequency >= kMaxFrequency * 0.5f) {\n      carrier_frequency = kMaxFrequency * 0.5f;\n    }\n    if (formant_frequency >= kMaxFrequency) {\n      formant_frequency = kMaxFrequency;\n    }\n    \n    stmlib::ParameterInterpolator carrier_frequency_modulation(\n        &carrier_frequency_,\n        carrier_frequency,\n        size);\n    stmlib::ParameterInterpolator formant_frequency_modulation(\n        &formant_frequency_,\n        formant_frequency,\n        size);\n    stmlib::ParameterInterpolator carrier_shape_modulation(\n        &carrier_shape_,\n        carrier_shape,\n        size);\n    stmlib::ParameterInterpolator mode_modulation(\n        &mode_,\n        mode,\n        size);\n\n    float next_sample = next_sample_;\n    \n    while (size--) {\n      bool reset = false;\n      float reset_time = 0.0f;\n\n      float this_sample = next_sample;\n      next_sample = 0.0f;\n    \n      const float f0 = carrier_frequency_modulation.Next();\n      const float f1 = formant_frequency_modulation.Next();\n    \n      discontinuity_phase_ += 2.0f * f0;\n      carrier_phase_ += f0;\n      reset = discontinuity_phase_ >= 1.0f;\n      \n      if (reset) {\n        discontinuity_phase_ -= 1.0f;\n        reset_time = discontinuity_phase_ / (2.0f * f0);\n        \n        float carrier_phase_before = carrier_phase_ >= 1.0f ? 1.0f : 0.5f;\n        float carrier_phase_after = carrier_phase_ >= 1.0f ? 0.0f : 0.5f;\n        float before = Z(\n            carrier_phase_before,\n            1.0f,\n            formant_phase_ + (1.0f - reset_time) * f1,\n            carrier_shape_modulation.subsample(1.0f - reset_time),\n            mode_modulation.subsample(1.0f - reset_time));\n\n        float after = Z(\n            carrier_phase_after,\n            0.0f,\n            0.0f,\n            carrier_shape_modulation.subsample(1.0f),\n            mode_modulation.subsample(1.0f));\n\n        float discontinuity = after - before;\n        this_sample += discontinuity * stmlib::ThisBlepSample(reset_time);\n        next_sample += discontinuity * stmlib::NextBlepSample(reset_time);\n        formant_phase_ = reset_time * f1;\n        \n        if (carrier_phase_ > 1.0f) {\n          carrier_phase_ = discontinuity_phase_ * 0.5f;\n        }\n      } else {\n        formant_phase_ += f1;\n        if (formant_phase_ >= 1.0f) {\n          formant_phase_ -= 1.0f;\n        }\n      }\n      \n      if (carrier_phase_ >= 1.0f) {\n        carrier_phase_ -= 1.0f;\n      }\n      \n      next_sample += Z(\n          carrier_phase_,\n          discontinuity_phase_,\n          formant_phase_,\n          carrier_shape_modulation.Next(),\n          mode_modulation.Next());\n      *out++ = this_sample;\n    }\n    \n    next_sample_ = next_sample;\n  }\n\n private:\n  inline float Z(float c, float d, float f, float shape, float mode) {\n    float ramp_down = 0.5f * (1.0f + Sine(0.5f * d + 0.25f));\n    \n    float offset;\n    float phase_shift;\n    if (mode < 0.333f) {\n      offset = 1.0f;\n      phase_shift = 0.25f + mode * 1.50f;\n    } else if (mode < 0.666f) {\n      phase_shift = 0.7495f - (mode - 0.33f) * 0.75f;\n      offset = -Sine(phase_shift);\n    } else {\n      phase_shift = 0.7495f - (mode - 0.33f) * 0.75f;\n      offset = 0.001f;\n    }\n    \n    float discontinuity = Sine(f + phase_shift);\n    float contour;\n    if (shape < 0.5f) {\n      shape *= 2.0f;\n      if (c >= 0.5f) {\n        ramp_down *= shape;\n      }\n      contour = 1.0f + (Sine(c + 0.25f) - 1.0f) * shape;\n    } else {\n      contour = Sine(c + shape * 0.5f);\n    }\n    return (ramp_down * (offset + discontinuity) - offset) * contour;\n  }\n\n  // Oscillator state.\n  float carrier_phase_;\n  float discontinuity_phase_;\n  float formant_phase_;\n  float next_sample_;\n\n  // For interpolation of parameters.\n  float carrier_frequency_;\n  float formant_frequency_;\n  float carrier_shape_;\n  float mode_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ZOscillator);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_OSCILLATOR_Z_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/delay_line.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Delay line (same implementation as from stmlib, but does not own its buffer).\n\n#ifndef PLAITS_DSP_PHYSICAL_MODELLING_DELAY_LINE_H_\n#define PLAITS_DSP_PHYSICAL_MODELLING_DELAY_LINE_H_\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n\nnamespace plaits {\n\ntemplate<typename T, size_t max_delay>\nclass DelayLine {\n public:\n  DelayLine() { }\n  ~DelayLine() { }\n  \n  void Init(float* buffer) {\n    line_ = buffer;\n    Reset();\n  }\n  \n  void Reset() {\n    std::fill(&line_[0], &line_[max_delay], T(0));\n    write_ptr_ = 0;\n  }\n  \n  inline void Write(const T sample) {\n    line_[write_ptr_] = sample;\n    write_ptr_ = (write_ptr_ - 1 + max_delay) % max_delay;\n  }\n  \n  inline const T Allpass(const T sample, size_t delay, const T coefficient) {\n    T read = line_[(write_ptr_ + delay) % max_delay];\n    T write = sample + coefficient * read;\n    Write(write);\n    return -write * coefficient + read;\n  }\n\n  inline const T WriteRead(const T sample, float delay) {\n    Write(sample);\n    return Read(delay);\n  }\n  \n  inline const T Read(float delay) const {\n    MAKE_INTEGRAL_FRACTIONAL(delay)\n    const T a = line_[(write_ptr_ + delay_integral) % max_delay];\n    const T b = line_[(write_ptr_ + delay_integral + 1) % max_delay];\n    return a + (b - a) * T(delay_fractional);\n  }\n  \n  inline const T ReadHermite(float delay) const {\n    MAKE_INTEGRAL_FRACTIONAL(delay)\n    int32_t t = (write_ptr_ + delay_integral + max_delay);\n    const T xm1 = line_[(t - 1) % max_delay];\n    const T x0 = line_[(t) % max_delay];\n    const T x1 = line_[(t + 1) % max_delay];\n    const T x2 = line_[(t + 2) % max_delay];\n    const T c = (x1 - xm1) * 0.5f;\n    const T v = x0 - x1;\n    const T w = c + v;\n    const T a = w + v + (x2 - x0) * 0.5f;\n    const T b_neg = w + a;\n    const T f = delay_fractional;\n    return (((a * f) - b_neg) * f + c) * f + x0;\n  }\n\n private:\n  size_t write_ptr_;\n  T* line_;\n  \n  DISALLOW_COPY_AND_ASSIGN(DelayLine);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_PHYSICAL_MODELLING_DELAY_LINE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/modal_voice.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple modal synthesis voice with a mallet exciter:\n// click -> LPF -> resonator.\n// \n// The click is replaced by continuous white noise when the trigger input\n// of the module is not patched.\n\n#include \"plaits/dsp/physical_modelling/modal_voice.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/noise/dust.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid ModalVoice::Init() {\n  excitation_filter_.Init();\n  resonator_.Init(0.015f, kMaxNumModes);\n}\n\nvoid ModalVoice::Render(\n    bool sustain,\n    bool trigger,\n    float accent,\n    float f0,\n    float structure,\n    float brightness,\n    float damping,\n    float* temp,\n    float* out,\n    float* aux,\n    size_t size) {\n  const float density = brightness * brightness;\n  \n  brightness += 0.25f * accent * (1.0f - brightness);\n  damping += 0.25f * accent * (1.0f - damping);\n  \n  const float range = sustain ? 36.0f : 60.0f;\n  const float f = sustain ? 4.0f * f0 : 2.0f * f0;\n  const float cutoff = min(\n      f * SemitonesToRatio((brightness * (2.0f - brightness) - 0.5f) * range),\n      0.499f);\n  const float q = sustain ? 0.7f : 1.5f;\n  \n  // Synthesize excitation signal.\n  if (sustain) {\n    const float dust_f = 0.00005f + 0.99995f * density * density;\n    for (size_t i = 0; i < size; ++i) {\n      temp[i] = Dust(dust_f) * (4.0f - dust_f * 3.0f) * accent;\n    }\n  } else {\n    fill(&temp[0], &temp[size], 0.0f);\n    if (trigger) {\n      const float attenuation = 1.0f - damping * 0.5f;\n      const float amplitude = (0.12f + 0.08f * accent) * attenuation;\n      temp[0] = amplitude * SemitonesToRatio(cutoff * cutoff * 24.0f) / cutoff;\n    }\n  }\n  const float one = 1.0f;\n  excitation_filter_.Process<FILTER_MODE_LOW_PASS, false>(\n      &cutoff, &q, &one, temp, temp, size);\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] += temp[i];\n  }\n  \n  resonator_.Process(f0, structure, brightness, damping, temp, out, size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/modal_voice.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple modal synthesis voice with a mallet exciter:\n// click -> LPF -> resonator.\n// \n// The click is replaced by continuous white noise when the trigger input\n// of the module is not patched.\n\n#ifndef PLAITS_DSP_PHYSICAL_MODELLING_MODAL_VOICE_H_\n#define PLAITS_DSP_PHYSICAL_MODELLING_MODAL_VOICE_H_\n\n#include \"plaits/dsp/physical_modelling/resonator.h\"\n\nnamespace plaits {\n\nclass ModalVoice {\n public:\n  ModalVoice() { }\n  ~ModalVoice() { }\n  \n  void Init();\n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float structure,\n      float brightness,\n      float damping,\n      float* temp,\n      float* out,\n      float* aux,\n      size_t size);\n  \n private:\n  ResonatorSvf<1> excitation_filter_;\n  Resonator resonator_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ModalVoice);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_PHYSICAL_MODELLING_MODAL_VOICE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/resonator.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resonator, taken from Rings' code but with fixed position.\n\n#include \"plaits/dsp/physical_modelling/resonator.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/cosine_oscillator.h\"\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid Resonator::Init(float position, int resolution) {\n  resolution_ = min(resolution, kMaxNumModes);\n  \n  CosineOscillator amplitudes;\n  amplitudes.Init<COSINE_OSCILLATOR_APPROXIMATE>(position);\n  \n  for (int i = 0; i < resolution; ++i) {\n    mode_amplitude_[i] = amplitudes.Next() * 0.25f;\n  }\n  \n  for (int i = 0; i < kMaxNumModes / kModeBatchSize; ++i) {\n    mode_filters_[i].Init();\n  }\n}\n\ninline float NthHarmonicCompensation(int n, float stiffness) {\n  float stretch_factor = 1.0f;\n  for (int i = 0; i < n - 1; ++i) {\n    stretch_factor += stiffness;\n    if (stiffness < 0.0f) {\n      stiffness *= 0.93f;\n    } else {\n      stiffness *= 0.98f;\n    }\n  }\n  return 1.0f / stretch_factor;\n}\n\nvoid Resonator::Process(\n    float f0,\n    float structure,\n    float brightness,\n    float damping,\n    const float* in,\n    float* out,\n    size_t size) {\n  float stiffness = Interpolate(lut_stiffness, structure, 64.0f);\n  f0 *= NthHarmonicCompensation(3, stiffness);\n  \n  float harmonic = f0;\n  float stretch_factor = 1.0f;\n  float q_sqrt = SemitonesToRatio(damping * 79.7f);\n  float q = 500.0f * q_sqrt * q_sqrt;\n  brightness *= 1.0f - structure * 0.3f;\n  brightness *= 1.0f - damping * 0.3f;\n  float q_loss = brightness * (2.0f - brightness) * 0.85f + 0.15f;\n  \n  float mode_q[kModeBatchSize];\n  float mode_f[kModeBatchSize];\n  float mode_a[kModeBatchSize];\n  int batch_counter = 0;\n  \n  ResonatorSvf<kModeBatchSize>* batch_processor = &mode_filters_[0];\n  \n  \n  for (int i = 0; i < resolution_; ++i) {\n    float mode_frequency = harmonic * stretch_factor;\n    if (mode_frequency >= 0.499f) {\n      mode_frequency = 0.499f;\n    }\n    const float mode_attenuation = 1.0f - mode_frequency * 2.0f;\n    \n    mode_f[batch_counter] = mode_frequency;\n    mode_q[batch_counter] = 1.0f + mode_frequency * q;\n    mode_a[batch_counter] = mode_amplitude_[i] * mode_attenuation;\n    ++batch_counter;\n    \n    if (batch_counter == kModeBatchSize) {\n      batch_counter = 0;\n      batch_processor->Process<FILTER_MODE_BAND_PASS, true>(\n          mode_f,\n          mode_q,\n          mode_a,\n          in,\n          out,\n          size);\n      ++batch_processor;\n    }\n    \n    stretch_factor += stiffness;\n    if (stiffness < 0.0f) {\n      // Make sure that the partials do not fold back into negative frequencies.\n      stiffness *= 0.93f;\n    } else {\n      // This helps adding a few extra partials in the highest frequencies.\n      stiffness *= 0.98f;\n    }\n    harmonic += f0;\n    q *= q_loss;\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/resonator.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resonator, taken from Rings' code but with fixed position.\n\n#ifndef PLAITS_DSP_PHYSICAL_MODELLING_RESONATOR_H_\n#define PLAITS_DSP_PHYSICAL_MODELLING_RESONATOR_H_\n\n#include \"stmlib/dsp/filter.h\"\n\nnamespace plaits {\n\nconst int kMaxNumModes = 24;\nconst int kModeBatchSize = 4;\n\n// We render 4 modes simultaneously since there are enough registers to hold\n// all state variables.\ntemplate<int batch_size>\nclass ResonatorSvf {\n public:\n  ResonatorSvf() { }\n  ~ResonatorSvf() { }\n  \n  void Init() {\n    for (int i = 0; i < batch_size; ++i) {\n      state_1_[i] = state_2_[i] = 0.0f;\n    }\n  }\n  \n  template<stmlib::FilterMode mode, bool add>\n  void Process(\n      const float* f,\n      const float* q,\n      const float* gain,\n      const float* in,\n      float* out,\n      size_t size) {\n    float g[batch_size];\n    float r[batch_size];\n    float r_plus_g[batch_size];\n    float h[batch_size];\n    float state_1[batch_size];\n    float state_2[batch_size];\n    float gains[batch_size];\n    for (int i = 0; i < batch_size; ++i) {\n      g[i] = stmlib::OnePole::tan<stmlib::FREQUENCY_FAST>(f[i]);\n      r[i] = 1.0f / q[i];\n      h[i] = 1.0f / (1.0f + r[i] * g[i] + g[i] * g[i]);\n      r_plus_g[i] = r[i] + g[i];\n      state_1[i] = state_1_[i];\n      state_2[i] = state_2_[i];\n      gains[i] = gain[i];\n    }\n    \n    while (size--) {\n      float s_in = *in++;\n      float s_out = 0.0f;\n      for (int i = 0; i < batch_size; ++i) {\n        const float hp = (s_in - r_plus_g[i] * state_1[i] - state_2[i]) * h[i];\n        const float bp = g[i] * hp + state_1[i];\n        state_1[i] = g[i] * hp + bp;\n        const float lp = g[i] * bp + state_2[i];\n        state_2[i] = g[i] * bp + lp;\n        s_out += gains[i] * ((mode == stmlib::FILTER_MODE_LOW_PASS) ? lp : bp);\n      }\n      if (add) {\n        *out++ += s_out;\n      } else {\n        *out++ = s_out;\n      }\n    }\n    for (int i = 0; i < batch_size; ++i) {\n      state_1_[i] = state_1[i];\n      state_2_[i] = state_2[i];\n    }\n  }\n  \n private:\n  float state_1_[batch_size];\n  float state_2_[batch_size];\n  \n  DISALLOW_COPY_AND_ASSIGN(ResonatorSvf);\n};\n\nclass Resonator {\n public:\n  Resonator() { }\n  ~Resonator() { }\n  \n  void Init(float position, int resolution);\n  void Process(\n      float f0,\n      float structure,\n      float brightness,\n      float damping,\n      const float* in,\n      float* out,\n      size_t size);\n  \n private:\n  int resolution_;\n  \n  float mode_amplitude_[kMaxNumModes];\n  ResonatorSvf<kModeBatchSize> mode_filters_[kMaxNumModes / kModeBatchSize];\n  \n  DISALLOW_COPY_AND_ASSIGN(Resonator);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_PHYSICAL_MODELLING_RESONATOR_H_\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/string.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Comb filter / KS string. \"Lite\" version of the implementation used in Rings.\n\n#include \"plaits/dsp/physical_modelling/string.h\"\n\n#include <cmath>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n  \nusing namespace std;\nusing namespace stmlib;\n\nvoid String::Init(BufferAllocator* allocator) {\n  string_.Init(allocator->Allocate<float>(kDelayLineSize));\n  stretch_.Init(allocator->Allocate<float>(kDelayLineSize / 4));\n  delay_ = 100.0f;\n  Reset();\n}\n\nvoid String::Reset() {\n  string_.Reset();\n  stretch_.Reset();\n  iir_damping_filter_.Init();\n  dc_blocker_.Init(1.0f - 20.0f / kSampleRate);\n  dispersion_noise_ = 0.0f;\n  curved_bridge_ = 0.0f;\n  out_sample_[0] = out_sample_[1] = 0.0f;\n  src_phase_ = 0.0f;\n}\n\nvoid String::Process(\n    float f0,\n    float non_linearity_amount,\n    float brightness,\n    float damping,\n    const float* in,\n    float* out,\n    size_t size) {\n  if (non_linearity_amount <= 0.0f) {\n    ProcessInternal<STRING_NON_LINEARITY_CURVED_BRIDGE>(\n        f0, -non_linearity_amount, brightness, damping, in, out, size);\n  } else {\n    ProcessInternal<STRING_NON_LINEARITY_DISPERSION>(\n        f0, non_linearity_amount, brightness, damping, in, out, size);\n  }\n}\n\ntemplate<StringNonLinearity non_linearity>\nvoid String::ProcessInternal(\n    float f0,\n    float non_linearity_amount,\n    float brightness,\n    float damping,\n    const float* in,\n    float* out,\n    size_t size) {\n  float delay = 1.0f / f0;\n  CONSTRAIN(delay, 4.0f, kDelayLineSize - 4.0f);\n  \n  // If there is not enough delay time in the delay line, we play at the\n  // lowest possible note and we upsample on the fly with a shitty linear\n  // interpolator. We don't care because it's a corner case (f0 < 11.7Hz)\n  float src_ratio = delay * f0;\n  if (src_ratio >= 0.9999f) {\n    // When we are above 11.7 Hz, we make sure that the linear interpolator\n    // does not get in the way.\n    src_phase_ = 1.0f;\n    src_ratio = 1.0f;\n  }\n\n  float damping_cutoff = min(\n      12.0f + damping * damping * 60.0f + brightness * 24.0f,\n      84.0f);\n  float damping_f = min(f0 * SemitonesToRatio(damping_cutoff), 0.499f);\n  \n  // Crossfade to infinite decay.\n  if (damping >= 0.95f) {\n    float to_infinite = 20.0f * (damping - 0.95f);\n    brightness += to_infinite * (1.0f - brightness);\n    damping_f += to_infinite * (0.4999f - damping_f);\n    damping_cutoff += to_infinite * (128.0f - damping_cutoff);\n  }\n  \n  iir_damping_filter_.set_f_q<FREQUENCY_FAST>(damping_f, 0.5f);\n  \n  float damping_compensation = Interpolate(lut_svf_shift, damping_cutoff, 1.0f);\n  \n  // Linearly interpolate delay time.\n  ParameterInterpolator delay_modulation(\n      &delay_, delay * damping_compensation, size);\n  \n  float stretch_point = non_linearity_amount * (2.0f - non_linearity_amount) * 0.225f;\n  float stretch_correction = (160.0f / kSampleRate) * delay;\n  CONSTRAIN(stretch_correction, 1.0f, 2.1f);\n  \n  float noise_amount_sqrt = non_linearity_amount > 0.75f\n      ? 4.0f * (non_linearity_amount - 0.75f)\n      : 0.0f;\n  float noise_amount = noise_amount_sqrt * noise_amount_sqrt * 0.1f;\n  float noise_filter = 0.06f + 0.94f * brightness * brightness;\n  \n  float bridge_curving_sqrt = non_linearity_amount;\n  float bridge_curving = bridge_curving_sqrt * bridge_curving_sqrt * 0.01f;\n  \n  float ap_gain = -0.618f * non_linearity_amount / (0.15f + fabsf(non_linearity_amount));\n  \n  while (size--) {\n    src_phase_ += src_ratio;\n    if (src_phase_ > 1.0f) {\n      src_phase_ -= 1.0f;\n      \n      float delay = delay_modulation.Next();\n      float s = 0.0f;\n      \n      if (non_linearity == STRING_NON_LINEARITY_DISPERSION) {\n        float noise = Random::GetFloat() - 0.5f;\n        ONE_POLE(dispersion_noise_, noise, noise_filter)\n        delay *= 1.0f + dispersion_noise_ * noise_amount;\n      } else {\n        delay *= 1.0f - curved_bridge_ * bridge_curving;\n      }\n      \n      if (non_linearity == STRING_NON_LINEARITY_DISPERSION) {\n        float ap_delay = delay * stretch_point;\n        float main_delay = delay - ap_delay * (0.408f - stretch_point * 0.308f) * stretch_correction;\n        if (ap_delay >= 4.0f && main_delay >= 4.0f) {\n          s = string_.Read(main_delay);\n          s = stretch_.Allpass(s, ap_delay, ap_gain);\n        } else {\n          s = string_.ReadHermite(delay);\n        }\n      } else {\n        s = string_.ReadHermite(delay);\n      }\n      \n      if (non_linearity == STRING_NON_LINEARITY_CURVED_BRIDGE) {\n        float value = fabsf(s) - 0.025f;\n        float sign = s > 0.0f ? 1.0f : -1.5f;\n        curved_bridge_ = (fabsf(value) + value) * sign;\n      }\n    \n      s += *in;\n      CONSTRAIN(s, -20.0f, +20.0f);\n      \n      dc_blocker_.Process(&s, 1);\n      s = iir_damping_filter_.Process<FILTER_MODE_LOW_PASS>(s);\n      string_.Write(s);\n\n      out_sample_[1] = out_sample_[0];\n      out_sample_[0] = s;\n    }\n    *out++ += Crossfade(out_sample_[1], out_sample_[0], src_phase_);\n    in++;\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/string.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Comb filter / KS string. \"Lite\" version of the implementation used in Rings.\n\n#ifndef PLAITS_DSP_PHYSICAL_MODELLING_STRING_H_\n#define PLAITS_DSP_PHYSICAL_MODELLING_STRING_H_\n\n#include <algorithm>\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/utils/buffer_allocator.h\"\n\n#include \"plaits/dsp/physical_modelling/delay_line.h\"\n\nnamespace plaits {\n\nconst size_t kDelayLineSize = 1024;\n\nenum StringNonLinearity {\n  STRING_NON_LINEARITY_CURVED_BRIDGE,\n  STRING_NON_LINEARITY_DISPERSION\n};\n\nclass String {\n public:\n  String() { }\n  ~String() { }\n  \n  void Init(stmlib::BufferAllocator* allocator);\n  void Reset();\n  void Process(\n      float f0,\n      float non_linearity_amount,\n      float brightness,\n      float damping,\n      const float* in,\n      float* out,\n      size_t size);\n\n private:\n  template<StringNonLinearity non_linearity>\n  void ProcessInternal(\n      float f0,\n      float non_linearity_amount,\n      float brightness,\n      float damping,\n      const float* in,\n      float* out,\n      size_t size);\n  \n  DelayLine<float, kDelayLineSize> string_;\n  DelayLine<float, kDelayLineSize / 4> stretch_;\n  \n  stmlib::Svf iir_damping_filter_;\n  stmlib::DCBlocker dc_blocker_;\n  \n  float delay_;\n  float dispersion_noise_;\n  float curved_bridge_;\n  \n  // Very crappy linear interpolation upsampler used for low pitches that\n  // do not fit the delay line. Rarely used.\n  float src_phase_;\n  float out_sample_[2];\n\n  DISALLOW_COPY_AND_ASSIGN(String);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_PHYSICAL_MODELLING_STRING_H_\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/string_voice.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Extended Karplus-Strong, with all the niceties from Rings.\n\n#include \"plaits/dsp/physical_modelling/string_voice.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/noise/dust.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid StringVoice::Init(BufferAllocator* allocator) {\n  excitation_filter_.Init();\n  string_.Init(allocator);\n  remaining_noise_samples_ = 0;\n}\n\nvoid StringVoice::Reset() {\n  string_.Reset();\n}\n\nvoid StringVoice::Render(\n    bool sustain,\n    bool trigger,\n    float accent,\n    float f0,\n    float structure,\n    float brightness,\n    float damping,\n    float* temp,\n    float* out,\n    float* aux,\n    size_t size) {\n  const float density = brightness * brightness;\n\n  brightness += 0.25f * accent * (1.0f - brightness);\n  damping += 0.25f * accent * (1.0f - damping);\n  \n  // Synthesize excitation signal.\n  if (trigger || sustain) {\n    const float range = 72.0f;\n    const float f = 4.0f * f0;\n    const float cutoff = min(\n        f * SemitonesToRatio((brightness * (2.0f - brightness) - 0.5f) * range),\n        0.499f);\n    const float q = sustain ? 1.0f : 0.5f;\n    remaining_noise_samples_ = static_cast<size_t>(1.0f / f0);\n    excitation_filter_.set_f_q<FREQUENCY_DIRTY>(cutoff, q);\n  }\n\n  if (sustain) {\n    const float dust_f = 0.00005f + 0.99995f * density * density;\n    for (size_t i = 0; i < size; ++i) {\n      temp[i] = Dust(dust_f) * (8.0f - dust_f * 6.0f) * accent;\n    }\n  } else if (remaining_noise_samples_) {\n    size_t noise_samples = min(remaining_noise_samples_, size);\n    remaining_noise_samples_ -= noise_samples;\n    size_t tail = size - noise_samples;\n    float* start = temp;\n    while (noise_samples--) {\n      *start++ = 2.0f * Random::GetFloat() - 1.0f;\n    }\n    while (tail--) {\n      *start++ = 0.0f;\n    }\n  } else {\n    fill(&temp[0], &temp[size], 0.0f);\n  }\n  \n  excitation_filter_.Process<FILTER_MODE_LOW_PASS>(temp, temp, size);\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] += temp[i];\n  }\n  \n  float non_linearity = structure < 0.24f\n      ? (structure - 0.24f) * 4.166f\n      : (structure > 0.26f ? (structure - 0.26f) * 1.35135f : 0.0f);\n  string_.Process(f0, non_linearity, brightness, damping, temp, out, size);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/physical_modelling/string_voice.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Extended Karplus-Strong, with all the niceties from Rings.\n\n#ifndef PLAITS_DSP_PHYSICAL_STRING_VOICE_H_\n#define PLAITS_DSP_PHYSICAL_STRING_VOICE_H_\n\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/utils/buffer_allocator.h\"\n\n#include \"plaits/dsp/physical_modelling/string.h\"\n\nnamespace plaits {\n\nclass StringVoice {\n public:\n  StringVoice() { }\n  ~StringVoice() { }\n  \n  void Init(stmlib::BufferAllocator* allocator);\n  void Reset();\n  void Render(\n      bool sustain,\n      bool trigger,\n      float accent,\n      float f0,\n      float structure,\n      float brightness,\n      float damping,\n      float* temp,\n      float* out,\n      float* aux,\n      size_t size);\n  \n private:\n  stmlib::Svf excitation_filter_;\n  String string_;\n  size_t remaining_noise_samples_;\n  \n  DISALLOW_COPY_AND_ASSIGN(StringVoice);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_PHYSICAL_STRING_VOICE_H_\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LPC10 speech synth.\n\n#include \"plaits/dsp/speech/lpc_speech_synth.h\"\n\n#include <algorithm>\n\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid LPCSpeechSynth::Init() {\n  phase_ = 0.0f;\n  frequency_ = 0.0125f;\n  noise_energy_ = 0.0f;\n  pulse_energy_ = 0.0f;\n\n  next_sample_ = 0.0f;\n  excitation_pulse_sample_index_ = 0;\n\n  fill(&k_[0], &k_[kLPCOrder], 0);\n  fill(&s_[0], &s_[kLPCOrder + 1], 0);\n}\n\nvoid LPCSpeechSynth::Render(\n    float prosody_amount,\n    float pitch_shift,\n    float* excitation,\n    float* output,\n    size_t size) {\n  const float base_f0 = kLPCSpeechSynthDefaultF0 / 8000.0f;\n  float d = frequency_ - base_f0;\n  float f = (base_f0 + d * prosody_amount) * pitch_shift;\n  CONSTRAIN(f, 0.0f, 0.5f);\n  \n  float next_sample = next_sample_;\n  while (size--) {\n    phase_ += f;\n    \n    float this_sample = next_sample;\n    next_sample = 0.0f;\n    \n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n      float reset_time = phase_ / f;\n      int reset_sample = static_cast<int>(32.0f * reset_time);\n      \n      float discontinuity = 0.0f;\n      if (excitation_pulse_sample_index_ < LUT_LPC_EXCITATION_PULSE_SIZE) {\n        excitation_pulse_sample_index_ -= reset_sample;\n        int8_t s = lut_lpc_excitation_pulse[excitation_pulse_sample_index_];\n        discontinuity = static_cast<float>(s) / 128.0f * pulse_energy_;\n      }\n      \n      this_sample += -discontinuity * ThisBlepSample(reset_time);\n      next_sample += -discontinuity * NextBlepSample(reset_time);\n      \n      excitation_pulse_sample_index_ = reset_sample;\n    }\n    \n    float e[11];\n    e[10] = Random::GetSample() > 0 ? noise_energy_ : -noise_energy_;\n    if (excitation_pulse_sample_index_ < LUT_LPC_EXCITATION_PULSE_SIZE) {\n      int8_t s = lut_lpc_excitation_pulse[excitation_pulse_sample_index_];\n      next_sample += static_cast<float>(s) / 128.0f * pulse_energy_;\n      excitation_pulse_sample_index_ += 32;\n    }\n    e[10] += this_sample;\n    e[10] *= 1.5f;\n  \n    e[9] = e[10] - k_[9] * s_[9];\n    e[8] = e[9] - k_[8] * s_[8];\n    e[7] = e[8] - k_[7] * s_[7];\n    e[6] = e[7] - k_[6] * s_[6];\n    e[5] = e[6] - k_[5] * s_[5];\n    e[4] = e[5] - k_[4] * s_[4];\n    e[3] = e[4] - k_[3] * s_[3];\n    e[2] = e[3] - k_[2] * s_[2];\n    e[1] = e[2] - k_[1] * s_[1];\n    e[0] = e[1] - k_[0] * s_[0];\n  \n    CONSTRAIN(e[0], -2.0f, 2.0f);\n\n    s_[9] = s_[8] + k_[8] * e[8];\n    s_[8] = s_[7] + k_[7] * e[7];\n    s_[7] = s_[6] + k_[6] * e[6];\n    s_[6] = s_[5] + k_[5] * e[5];\n    s_[5] = s_[4] + k_[4] * e[4];\n    s_[4] = s_[3] + k_[3] * e[3];\n    s_[3] = s_[2] + k_[2] * e[2];\n    s_[2] = s_[1] + k_[1] * e[1];\n    s_[1] = s_[0] + k_[0] * e[0];\n    s_[0] = e[0];\n    \n    *excitation++ = e[10];\n    *output++ = e[0];\n  }\n  next_sample_ = next_sample;\n}\n\nvoid LPCSpeechSynth::PlayFrame(const Frame& f1, const Frame& f2, float blend) {\n  float frequency_1 = f1.period == 0\n      ? frequency_\n      : 1.0f / static_cast<float>(f1.period);\n  float frequency_2 = f2.period == 0\n      ? frequency_\n      : 1.0f / static_cast<float>(f2.period);\n  frequency_ = frequency_1 + (frequency_2 - frequency_1) * blend;\n  \n  float energy_1 = static_cast<float>(f1.energy) / 256.0f;\n  float energy_2 = static_cast<float>(f2.energy) / 256.0f;\n  float noise_energy_1 = f1.period == 0 ? energy_1 : 0.0f;\n  float noise_energy_2 = f2.period == 0 ? energy_2 : 0.0f;\n  noise_energy_ = noise_energy_1 + (noise_energy_2 - noise_energy_1) * blend;\n\n  float pulse_energy_1 = f1.period != 0 ? energy_1 : 0;\n  float pulse_energy_2 = f2.period != 0 ? energy_2 : 0;\n  pulse_energy_ = pulse_energy_1 + (pulse_energy_2 - pulse_energy_1) * blend;\n  \n  k_[0] = BlendCoefficient<32768>(f1.k0, f2.k0, blend);\n  k_[1] = BlendCoefficient<32768>(f1.k1, f2.k1, blend);\n  k_[2] = BlendCoefficient<128>(f1.k2, f2.k2, blend);\n  k_[3] = BlendCoefficient<128>(f1.k3, f2.k3, blend);\n  k_[4] = BlendCoefficient<128>(f1.k4, f2.k4, blend);\n  k_[5] = BlendCoefficient<128>(f1.k5, f2.k5, blend);\n  k_[6] = BlendCoefficient<128>(f1.k6, f2.k6, blend);\n  k_[7] = BlendCoefficient<128>(f1.k7, f2.k7, blend);\n  k_[8] = BlendCoefficient<128>(f1.k8, f2.k8, blend);\n  k_[9] = BlendCoefficient<128>(f1.k9, f2.k9, blend);\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LPC10 speech synth.\n\n#ifndef PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_H_\n#define PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_H_\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"plaits/dsp/dsp.h\"\n\nnamespace plaits {\n\nconst int kLPCOrder = 10;\n\nconst float kLPCSpeechSynthDefaultF0 = 100.0f;\n\nclass LPCSpeechSynth {\n public:\n  LPCSpeechSynth() { }\n  ~LPCSpeechSynth() { }\n\n  struct Frame {\n    // 14 bytes.\n    uint8_t energy;\n    uint8_t period;\n    int16_t k0;\n    int16_t k1;\n    int8_t k2;\n    int8_t k3;\n    int8_t k4;\n    int8_t k5;\n    int8_t k6;\n    int8_t k7;\n    int8_t k8;\n    int8_t k9;\n  };\n\n  void Init();\n  \n  void Render(\n      float prosody_amount,\n      float pitch_shift,\n      float* excitation,\n      float* output,\n      size_t size);\n  \n  void PlayFrame(const Frame* frames, float frame, bool interpolate) {\n    MAKE_INTEGRAL_FRACTIONAL(frame);\n    \n    if (!interpolate) {\n      frame_fractional = 0.0f;\n    }\n    PlayFrame(\n        frames[frame_integral],\n        frames[frame_integral + 1],\n        frame_fractional);\n  }\n\n private:\n  void PlayFrame(const Frame& f1, const Frame& f2, float blend);\n  \n  template <int scale, typename X>\n  float BlendCoefficient(X a, X b, float blend) {\n    float a_f = static_cast<float>(a) / float(scale);\n    float b_f = static_cast<float>(b) / float(scale);\n    return a_f + (b_f - a_f) * blend;\n  }\n  \n  float phase_;\n  float frequency_;\n  float noise_energy_;\n  float pulse_energy_;\n  \n  float next_sample_;\n  int excitation_pulse_sample_index_;\n\n  float k_[kLPCOrder];\n  float s_[kLPCOrder + 1];\n\n  DISALLOW_COPY_AND_ASSIGN(LPCSpeechSynth);\n};\n\n};  // namespace plaits\n\n#endif  // PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_H_\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth_controller.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Feeds frames to the LPC10 speech synth.\n\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\n/* static */\nconst uint8_t LPCSpeechSynthWordBank::energy_lut_[16] = {\n  0x00, 0x02, 0x03, 0x04, 0x05, 0x07, 0x0a, 0x0f,\n  0x14, 0x20, 0x29, 0x39, 0x51, 0x72, 0xa1, 0xff\n};\n\n/* static */\nconst uint8_t LPCSpeechSynthWordBank::period_lut_[64] = {\n  0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 47, 49, 51, 53,\n 54, 57, 59, 61, 63, 66, 69, 71, 73, 77, 79, 81, 85, 87, 92, 95, 99,\n 102, 106, 110, 115, 119, 123, 128, 133, 138, 143, 149, 154, 160\n};\n\n/* static */\nconst int16_t LPCSpeechSynthWordBank::k0_lut_[32] = {\n  -32064, -31872, -31808, -31680, -31552, -31424, -31232, -30848,\n  -30592, -30336, -30016, -29696, -29376, -28928, -28480, -27968,\n  -26368, -24256, -21632, -18368, -14528, -10048,  -5184,      0,\n    5184,  10048,  14528,  18368,  21632,  24256,  26368,  27968\n};\n\n/* static */\nconst int16_t LPCSpeechSynthWordBank::k1_lut_[32] = {\n  -20992, -19328, -17536, -15552, -13440, -11200,  -8768,  -6272,\n  -3712,   -1088,   1536,   4160,   6720,   9216,  11584,  13824,\n  15936,   17856,  19648,  21248,  22656,  24000,  25152,  26176,\n  27072,   27840,  28544,  29120,  29632,  30080,  30464,  32384\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k2_lut_[16] = {\n-110, -97, -83, -70, -56, -43, -29, -16, -2, 11, 25, 38, 52, 65, 79, 92\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k3_lut_[16] = {\n-82, -68, -54, -40, -26, -12, 1, 15, 29, 43, 57, 71, 85, 99, 113, 126\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k4_lut_[16] = {\n -82, -70, -59, -47, -35, -24, -12, -1, 11, 23, 34, 46, 57, 69, 81, 92\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k5_lut_[16] = {\n  -64, -53, -42, -31, -20, -9, 3, 14, 25, 36, 47, 58, 69, 80, 91, 102\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k6_lut_[16] = {\n  -77, -65, -53, -41, -29, -17, -5, 7, 19, 31, 43, 55, 67, 79, 90, 102\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k7_lut_[8] = {\n-64, -40, -16, 7, 31, 55, 79, 102\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k8_lut_[8] = {\n  -64, -44, -24, -4, 16, 37, 57, 77\n};\n\n/* static */\nconst int8_t LPCSpeechSynthWordBank::k9_lut_[8] = {\n  -51, -33, -15, 4, 22, 32, 59, 77\n};\n\nvoid LPCSpeechSynthWordBank::Init(\n    const LPCSpeechSynthWordBankData* word_banks,\n    int num_banks,\n    BufferAllocator* allocator) {\n  word_banks_ = word_banks;\n  num_banks_ = num_banks;\n  frames_ = allocator->Allocate<LPCSpeechSynth::Frame>(\n      kLPCSpeechSynthMaxFrames);\n  word_boundaries_ = allocator->Allocate<int>(kLPCSpeechSynthMaxWords);\n  Reset();\n}\n\nvoid LPCSpeechSynthWordBank::Reset() {\n  loaded_bank_ = -1;\n  num_frames_ = 0;\n  num_words_ = 0;\n  fill(\n      &word_boundaries_[0],\n      &word_boundaries_[kLPCSpeechSynthMaxWords], 0);\n}\n\nsize_t LPCSpeechSynthWordBank::LoadNextWord(const uint8_t* data) {\n  BitStream bitstream;\n  bitstream.Init(data);\n\n  LPCSpeechSynth::Frame frame;\n  frame.energy = 0;\n  frame.period = 0;\n  frame.k0 = 0;\n  frame.k1 = 0;\n  frame.k2 = 0;\n  frame.k3 = 0;\n  frame.k4 = 0;\n  frame.k5 = 0;\n  frame.k6 = 0;\n  frame.k7 = 0;\n  frame.k8 = 0;\n  frame.k9 = 0;\n\n  while (true) {\n    int energy = bitstream.GetBits(4);\n    if (energy == 0) {\n      frame.energy = 0;\n    } else if (energy == 0xf) {\n      bitstream.Flush();\n      break;\n    } else {\n      frame.energy = energy_lut_[energy];\n      bool repeat = bitstream.GetBits(1);\n      frame.period = period_lut_[bitstream.GetBits(6)];\n      if (!repeat) {\n        frame.k0 = k0_lut_[bitstream.GetBits(5)];\n        frame.k1 = k1_lut_[bitstream.GetBits(5)];\n        frame.k2 = k2_lut_[bitstream.GetBits(4)];\n        frame.k3 = k3_lut_[bitstream.GetBits(4)];\n        if (frame.period) {\n          frame.k4 = k4_lut_[bitstream.GetBits(4)];\n          frame.k5 = k5_lut_[bitstream.GetBits(4)];\n          frame.k6 = k6_lut_[bitstream.GetBits(4)];\n          frame.k7 = k7_lut_[bitstream.GetBits(3)];\n          frame.k8 = k8_lut_[bitstream.GetBits(3)];\n          frame.k9 = k9_lut_[bitstream.GetBits(3)];\n        }\n      }\n    }\n    frames_[num_frames_++] = frame;\n  }\n  return bitstream.ptr() - data;\n}\n\nbool LPCSpeechSynthWordBank::Load(int bank) {\n  if (bank == loaded_bank_ || bank >= num_banks_) {\n    return false;\n  }\n\n  num_frames_ = 0;\n  num_words_ = 0;\n  \n  const uint8_t* data = word_banks_[bank].data;\n  size_t size = word_banks_[bank].size;\n  \n  while (size) {\n    word_boundaries_[num_words_] = num_frames_;\n    size_t consumed = LoadNextWord(data);\n\n    data += consumed;\n    size -= consumed;\n    ++num_words_;\n  }\n  word_boundaries_[num_words_] = num_frames_;\n  loaded_bank_ = bank;\n  return true;\n}\n\nvoid LPCSpeechSynthController::Init(LPCSpeechSynthWordBank* word_bank) {\n  word_bank_ = word_bank;\n  \n  clock_phase_ = 0.0f;\n  playback_frame_ = -1;\n  last_playback_frame_ = -1;\n  remaining_frame_samples_ = 0;\n\n  fill(&sample_[0], &sample_[2], 0.0f);\n  fill(&next_sample_[0], &next_sample_[2], 0.0f);\n\n  gain_ = 0.0f;\n  \n  synth_.Init();\n}\n\nvoid LPCSpeechSynthController::Render(\n    bool free_running,\n    bool trigger,\n    int bank,\n    float frequency,\n    float prosody_amount,\n    float speed,\n    float address,\n    float formant_shift,\n    float gain,\n    float* excitation,\n    float* output,\n    size_t size) {\n  const float rate_ratio = SemitonesToRatio((formant_shift - 0.5f) * 36.0f);\n  const float rate = rate_ratio / 6.0f;\n  \n  // All utterances have been normalized for an average f0 of 100 Hz.\n  const float pitch_shift = frequency / \\\n      (rate_ratio * kLPCSpeechSynthDefaultF0 / kCorrectedSampleRate);\n  const float time_stretch = SemitonesToRatio(-speed * 24.0f +\n        (formant_shift < 0.4f ? (formant_shift - 0.4f) * -45.0f\n            : (formant_shift > 0.6f ? (formant_shift - 0.6f) * -45.0f : 0.0f)));\n  \n  if (bank != -1) {\n    bool reset_everything = word_bank_->Load(bank);\n    if (reset_everything) {\n      playback_frame_ = -1;\n      last_playback_frame_ = -1;\n    }\n  }\n  \n  const int num_frames = bank == -1\n      ? kLPCSpeechSynthNumVowels\n      : word_bank_->num_frames();\n\n  const LPCSpeechSynth::Frame* frames = bank == -1\n      ? phonemes_\n      : word_bank_->frames();\n  \n  if (trigger) {\n    if (bank == -1) {\n      // Pick a pseudo-random consonant, and play it for the duration of a\n      // frame.\n      int r = (address + 3.0f * formant_shift + 7.0f * frequency) * 8.0f;\n      playback_frame_ = (r % kLPCSpeechSynthNumConsonants);\n      playback_frame_ += kLPCSpeechSynthNumVowels;\n      last_playback_frame_ = playback_frame_ + 1;\n    } else {\n      word_bank_->GetWordBoundaries(\n          address,\n          &playback_frame_,\n          &last_playback_frame_);\n    }\n    remaining_frame_samples_ = 0;\n  }\n  \n  if (playback_frame_ == -1 && remaining_frame_samples_ == 0) {\n    synth_.PlayFrame(\n        frames,\n        address * (static_cast<float>(num_frames) - 1.0001f),\n        true);\n  } else {\n    if (remaining_frame_samples_ == 0) {\n      synth_.PlayFrame(frames, float(playback_frame_), false);\n      remaining_frame_samples_ = kSampleRate / kLPCSpeechSynthFPS * \\\n          time_stretch;\n      ++playback_frame_;\n      if (playback_frame_ >= last_playback_frame_) {\n        bool back_to_scan_mode = bank == -1 || free_running;\n        playback_frame_ = back_to_scan_mode ? -1 : last_playback_frame_;\n      }\n    }\n    remaining_frame_samples_ -= min(size, remaining_frame_samples_);\n  }\n  \n  ParameterInterpolator gain_modulation(&gain_, gain, size);\n  \n  while (size--) {\n    float this_sample[2];\n    copy(&next_sample_[0], &next_sample_[2], &this_sample[0]);\n    fill(&next_sample_[0], &next_sample_[2], 0.0f);\n    \n    clock_phase_ += rate;\n    if (clock_phase_ >= 1.0f) {\n      clock_phase_ -= 1.0f;\n      float reset_time = clock_phase_ / rate;\n      float new_sample[2];\n      \n      synth_.Render(\n          prosody_amount,\n          pitch_shift,\n          &new_sample[0],\n          &new_sample[1], 1);\n      \n      float discontinuity[2] = {\n        new_sample[0] - sample_[0],\n        new_sample[1] - sample_[1]\n      };\n      this_sample[0] += discontinuity[0] * ThisBlepSample(reset_time);\n      next_sample_[0] += discontinuity[0] * NextBlepSample(reset_time);\n      this_sample[1] += discontinuity[1] * ThisBlepSample(reset_time);\n      next_sample_[1] += discontinuity[1] * NextBlepSample(reset_time);\n      copy(&new_sample[0], &new_sample[2], &sample_[0]);\n    }\n    next_sample_[0] += sample_[0];\n    next_sample_[1] += sample_[1];\n    const float gain = gain_modulation.Next();\n    *excitation++ = this_sample[0] * gain;\n    *output++ = this_sample[1] * gain;\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth_controller.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Feeds frames to the LPC10 speech synth.\n\n#ifndef PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_CONTROLLER_H_\n#define PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_CONTROLLER_H_\n\n#include \"plaits/dsp/speech/lpc_speech_synth.h\"\n\n#include \"stmlib/utils/buffer_allocator.h\"\n\nnamespace plaits {\n\nclass BitStream {\n public:\n  BitStream() { }\n  ~BitStream() { }\n\n  inline void Init(const uint8_t* p) {\n    p_ = p;\n    available_ = 0;\n    bits_ = 0;\n  }\n\n  inline void Flush() {\n    while (available_) {\n      GetBits(1);\n    }\n  }\n\n  inline uint8_t GetBits(int num_bits) {\n    int shift = num_bits;\n    if (num_bits > available_) {\n      bits_ <<= available_;\n      shift -= available_;\n      bits_ |= Reverse(*p_++);\n      available_ += 8;\n    }\n    bits_ <<= shift;\n    uint8_t result = bits_ >> 8;\n    bits_ &= 0xff;\n    available_ -= num_bits;\n    return result;\n  }\n\n  inline const uint8_t* ptr() const { return p_; }\n\n private:\n  inline uint8_t Reverse(uint8_t b) const {\n    b = (b >> 4) | (b << 4);\n  \tb = ((b & 0xcc) >> 2) | ((b & 0x33) << 2);\n  \tb = ((b & 0xaa) >> 1) | ((b & 0x55) << 1);\n    return b;\n  }\n\n  const uint8_t* p_;\n  int available_;\n  uint16_t bits_;\n\n  DISALLOW_COPY_AND_ASSIGN(BitStream);\n};\n\nconst int kLPCSpeechSynthMaxWords = 32;\nconst int kLPCSpeechSynthMaxFrames = 1024;\nconst int kLPCSpeechSynthNumVowels = 5;\nconst int kLPCSpeechSynthNumConsonants = 10;\nconst int kLPCSpeechSynthNumPhonemes = \\\n    kLPCSpeechSynthNumVowels + kLPCSpeechSynthNumConsonants;\nconst float kLPCSpeechSynthFPS = 40.0f;\n\nstruct LPCSpeechSynthWordBankData {\n  const uint8_t* data;\n  size_t size;\n};\n\nclass LPCSpeechSynthWordBank {\n public:\n  LPCSpeechSynthWordBank() { }\n  ~LPCSpeechSynthWordBank() { }\n\n  void Init(\n      const LPCSpeechSynthWordBankData* word_banks,\n      int num_banks,\n      stmlib::BufferAllocator* allocator);\n  \n  bool Load(int index);\n  void Reset();\n  \n  inline int num_frames() const { return num_frames_; }\n  inline const LPCSpeechSynth::Frame* frames() const { return frames_; }\n  \n  inline void GetWordBoundaries(float address, int* start, int* end) {\n    if (num_words_ == 0) {\n      *start = *end = -1;\n    } else {\n      int word = static_cast<int>(address * static_cast<float>(num_words_));\n      if (word >= num_words_) {\n        word = num_words_ - 1;\n      }\n      *start = word_boundaries_[word];\n      *end = word_boundaries_[word + 1] - 1;\n    }\n  }\n  \n private:\n  size_t LoadNextWord(const uint8_t* data);\n  \n  const LPCSpeechSynthWordBankData* word_banks_;\n  \n  int num_banks_;\n  int loaded_bank_;\n  int num_frames_;\n  int num_words_;\n\n  int* word_boundaries_;\n  LPCSpeechSynth::Frame* frames_;\n  \n  static const uint8_t energy_lut_[16];\n  static const uint8_t period_lut_[64];\n  static const int16_t k0_lut_[32];\n  static const int16_t k1_lut_[32];\n  static const int8_t k2_lut_[16];\n  static const int8_t k3_lut_[16];\n  static const int8_t k4_lut_[16];\n  static const int8_t k5_lut_[16];\n  static const int8_t k6_lut_[16];\n  static const int8_t k7_lut_[8];\n  static const int8_t k8_lut_[8];\n  static const int8_t k9_lut_[8];\n};\n\nclass LPCSpeechSynthController {\n public:\n  LPCSpeechSynthController() { }\n  ~LPCSpeechSynthController() { }\n  \n  void Init(LPCSpeechSynthWordBank* word_bank);\n  \n  void Render(\n      bool free_running,\n      bool trigger,\n      int bank,\n      float frequency,\n      float prosody_amount,\n      float speed,\n      float address,\n      float formant_shift,\n      float gain,\n      float* excitation,\n      float* output,\n      size_t size);\n  \n private:\n  float clock_phase_;\n  float sample_[2];\n  float next_sample_[2];\n  float gain_;\n  LPCSpeechSynth synth_;\n\n  int playback_frame_;\n  int last_playback_frame_;\n  size_t remaining_frame_samples_;\n\n  LPCSpeechSynthWordBank* word_bank_;\n  \n  static const LPCSpeechSynth::Frame phonemes_[kLPCSpeechSynthNumPhonemes];\n  \n  DISALLOW_COPY_AND_ASSIGN(LPCSpeechSynthController);\n};\n\n};  // namespace plaits\n\n#endif  // PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_CONTROLLER_H_\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth_phonemes.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// This is a table with vowels (a, e, i, o, u) and a random selection of\n// consonnants for the LPC10 speech synth.\n\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.h\"\n\nnamespace plaits {\n\n/* static */\nconst LPCSpeechSynth::Frame\n  LPCSpeechSynthController::phonemes_[kLPCSpeechSynthNumPhonemes] = {\n  {\n    192,\n    80,\n    -18368, 11584, 52, 29, 23,\n    14, -17, 79, 37, 4\n  },\n  {\n    192,\n    80,\n    -14528, 1536, 38, 29, 11,\n    14, -41, 79, 57, 4\n  },\n  {\n    192,\n    80,\n    14528, 9216, 25, -54, -70,\n    36, 19, 79, 57, 22\n  },\n  {\n    192,\n    80,\n    -14528, -13440, 38, 57, 57,\n    14, -53, 7, 37, 77\n  },\n  {\n    192,\n    80,\n    -26368, 4160, 11, 15, -1,\n    36, -41, 31, 77, 22\n  },\n  {\n    15,\n    0,\n    5184, 9216, -29, -12, 0,\n    0, 0, 0, 0, 0\n  },\n  {\n    10,\n    0,\n    27968, 17856, 25, 43, -24,\n    -20, -53, 55, -4, -51\n  },\n  {\n    128,\n    160,\n    14528, -3712, -43, -26, -24,\n    -20, -53, 55, -4, -51\n  },\n  {\n    128,\n    160,\n    10048, 11584, -16, 15, 0,\n    0, 0, 0, 0, 0\n  },\n  {\n    224,\n    100,\n    18368, -13440, -97, -26, -12,\n    -53, -41, 7, 57, 32\n  },\n  { 192,\n    80,\n    -10048, 9216, -70, 15, 34,\n    -20, -17, 31, -24, 22\n  },\n  { 96,\n    160,\n    -18368, 17856, -29, -12, -35,\n    3, -5, 7, 37, 22\n  },\n  { 64,\n    80,\n    -21632, -6272, -83, 29, 57,\n    3, -5, 7, 16, 32\n  },\n  {\n    192,\n    80,\n    0, -1088, 11, -26, -24,\n    -9, -5, 55, 37, 22\n  },\n  {\n    64,\n    80,\n    21632, -17536, -97, 85, 57,\n    -20, -17, 31, -4, 59\n  }\n};\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth_words.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LPC10 encoded words extracted from various TI ROMs.\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\n#include \"plaits/dsp/speech/lpc_speech_synth_words.h\"\n\nnamespace plaits {\n\n/* extern */\nconst uint8_t FLASHMEM bank_0[] = {\n  // red\n  0x30, 0x4a, 0x57, 0xd8, 0x23, 0x2c, 0xc9, 0xa9,\n  0x62, 0xa1, 0x88, 0xb2, 0x36, 0xa7, 0xca, 0x95,\n  0xc3, 0xc3, 0x66, 0x9f, 0xb2, 0x64, 0x09, 0x4f,\n  0x9b, 0x7d, 0x8a, 0x52, 0x24, 0x35, 0xb3, 0xec,\n  0xc9, 0x6b, 0x92, 0xb2, 0xe8, 0xb0, 0x27, 0xcf,\n  0x41, 0x2a, 0x63, 0xcc, 0x9e, 0x22, 0x3b, 0x8d,\n  0xf2, 0x0e, 0x7b, 0xca, 0x1c, 0x34, 0xca, 0xda,\n  0xec, 0x29, 0xb3, 0xb7, 0x28, 0x6b, 0xb3, 0xa7,\n  0xce, 0xc1, 0xbc, 0xb2, 0xad, 0x9e, 0x2e, 0x05,\n  0xcd, 0x8c, 0x96, 0x7a, 0xfa, 0xe4, 0xcd, 0x3b,\n  0xd3, 0xcc, 0xe9, 0x8b, 0x76, 0xab, 0xa8, 0xd2,\n  0x67, 0xac, 0x5e, 0xdc, 0x63, 0xe2, 0x9c, 0xa9,\n  0x45, 0x71, 0xd3, 0x8e, 0x72, 0xa6, 0xee, 0x44,\n  0x43, 0x6a, 0x2a, 0xc0, 0x98, 0x07, 0x0b, 0xb5,\n  0xb0, 0x38, 0x6d, 0xae, 0x5a, 0x38, 0x7d, 0x8a,\n  0x00, 0x00, 0xfc,\n  // orange\n  0xa3, 0x0d, 0xa3, 0x9a, 0x39, 0x23, 0x9f, 0xcc,\n  0xd7, 0x0d, 0x57, 0x8b, 0x73, 0x92, 0x50, 0x2e,\n  0x8d, 0xad, 0xc9, 0x89, 0x43, 0x99, 0x74, 0x8c,\n  0xba, 0x23, 0xf6, 0xc3, 0xd3, 0xc8, 0x1b, 0x8d,\n  0xc4, 0x4f, 0xb7, 0x64, 0x9d, 0x3c, 0x92, 0x30,\n  0x92, 0x4b, 0x69, 0xf2, 0xc8, 0xc2, 0x54, 0x69,\n  0x91, 0x39, 0xab, 0x08, 0xc3, 0xa9, 0x8c, 0xeb,\n  0x8e, 0x3a, 0x4e, 0xaa, 0xc2, 0x2c, 0xd3, 0xda,\n  0x38, 0xb0, 0x92, 0xb3, 0xe8, 0xe8, 0x63, 0xa3,\n  0x0a, 0x8d, 0x30, 0xa3, 0x4f, 0x85, 0xda, 0x3d,\n  0x83, 0xac, 0x21, 0x67, 0x6a, 0xb3, 0x0a, 0xb3,\n  0x86, 0x92, 0xb0, 0xdc, 0x33, 0xcc, 0x18, 0xb3,\n  0xa3, 0x8c, 0xd6, 0xc0, 0x6b, 0x2c, 0x01, 0xd3,\n  0x3a, 0x2d, 0x8d, 0x29, 0x4b, 0x4a, 0x5d, 0xb5,\n  0x5c, 0x66, 0xcb, 0x6d, 0xd9, 0x2c, 0x49, 0x99,\n  0x8d, 0xb4, 0xd1, 0x34, 0x36, 0x69, 0xe1, 0xc6,\n  0x2a, 0xd2, 0x91, 0xa4, 0x95, 0x1b, 0xcf, 0xce,\n  0x82, 0xdb, 0xd6, 0x28, 0x39, 0xbc, 0xc5, 0xb1,\n  0x03, 0x02, 0xe5, 0x48, 0xc0, 0x0c, 0x42, 0x0e,\n  0x18, 0xa7, 0x4b, 0x01, 0x73, 0xa7, 0x01, 0x00,\n  0xfc,\n  // yellow\n  0xa9, 0xda, 0x94, 0xdc, 0x32, 0xe4, 0xb6, 0xaa,\n  0x03, 0xf2, 0xe8, 0xb2, 0x3b, 0x8a, 0x01, 0xb8,\n  0xb2, 0xc7, 0xea, 0xca, 0x33, 0x36, 0xef, 0x0e,\n  0x31, 0x27, 0x2f, 0x92, 0x3d, 0x3b, 0xa5, 0x9c,\n  0xac, 0x78, 0xca, 0xae, 0xb0, 0x7c, 0xb2, 0x1a,\n  0x39, 0x23, 0xd3, 0xca, 0xc9, 0x4a, 0x96, 0x28,\n  0x6b, 0x2b, 0x27, 0xcb, 0x59, 0x33, 0xac, 0xc2,\n  0x9c, 0x3c, 0x57, 0x2b, 0xb3, 0xb6, 0x72, 0xf2,\n  0xd4, 0x2c, 0xdd, 0x2a, 0xcc, 0xca, 0x63, 0x4e,\n  0x37, 0x8d, 0x28, 0xad, 0x08, 0x3e, 0x9a, 0xa4,\n  0x23, 0x8f, 0x3a, 0xd4, 0x0a, 0xe6, 0xae, 0xdc,\n  0x6a, 0x5f, 0xcb, 0x59, 0x3a, 0xca, 0x68, 0x43,\n  0x19, 0x55, 0xa9, 0xb2, 0xa3, 0x0b, 0x3d, 0xd5,\n  0x3c, 0xa3, 0xae, 0x2e, 0x94, 0x51, 0xf3, 0x8a,\n  0xb2, 0xfa, 0x58, 0xd3, 0xdc, 0x2a, 0xec, 0xe9,\n  0x53, 0x8a, 0x92, 0x68, 0x2b, 0x67, 0x48, 0x29,\n  0x53, 0xbd, 0xc2, 0x9c, 0x21, 0x87, 0x4a, 0xd3,\n  0x18, 0x73, 0xc6, 0x1c, 0xb2, 0x5c, 0x7d, 0xcc,\n  0x19, 0xb3, 0xaf, 0x72, 0x93, 0x31, 0x6b, 0xcc,\n  0x3e, 0xda, 0x55, 0xa6, 0xac, 0x29, 0xbb, 0x2a,\n  0x33, 0xae, 0x3c, 0xa6, 0xe4, 0x2b, 0x4d, 0xa5,\n  0x72, 0x9b, 0x63, 0xee, 0x14, 0xb1, 0xca, 0x61,\n  0x8d, 0xb5, 0x9d, 0x58, 0x2a, 0x9b, 0x29, 0x84,\n  0x0a, 0x64, 0xae, 0xa2, 0xa6, 0xe8, 0xda, 0xd0,\n  0xc9, 0x0a, 0x00, 0xc0, 0xff,\n  // green\n  0x80, 0x1a, 0xf0, 0xd7, 0x88, 0x25, 0x8d, 0x68,\n  0x40, 0x37, 0x9f, 0x4a, 0x4b, 0xa5, 0xce, 0x37,\n  0xdd, 0xd5, 0x62, 0xaf, 0xb2, 0x94, 0x74, 0x17,\n  0xb6, 0x3d, 0x6a, 0x1f, 0xdc, 0xc2, 0x23, 0x4e,\n  0x2b, 0x4d, 0xe5, 0xcc, 0x08, 0x27, 0xa5, 0xb0,\n  0x05, 0xab, 0xcd, 0x63, 0xb7, 0xc2, 0x47, 0x8a,\n  0x71, 0x2f, 0xb2, 0x0a, 0xef, 0xd4, 0xb6, 0x38,\n  0xf4, 0x2a, 0x92, 0x21, 0xdf, 0xb4, 0xc0, 0xa7,\n  0xc8, 0x9a, 0x6c, 0x5b, 0x43, 0x9f, 0x22, 0x6b,\n  0xb2, 0x19, 0x0b, 0x7d, 0xea, 0xaa, 0x48, 0x7b,\n  0xdc, 0xf4, 0xe9, 0xaa, 0x22, 0xeb, 0x36, 0x2b,\n  0x67, 0x68, 0x86, 0x34, 0xdb, 0xac, 0x9c, 0xa1,\n  0x1b, 0x92, 0x6c, 0x8b, 0x73, 0x86, 0x61, 0x98,\n  0xb3, 0x3d, 0xce, 0x19, 0xba, 0x25, 0x8d, 0x8c,\n  0x28, 0x67, 0xea, 0x9e, 0x2c, 0x3c, 0xe3, 0x8c,\n  0xa9, 0x7a, 0x92, 0xd4, 0x2c, 0x33, 0xa6, 0xe2,\n  0xd0, 0x5c, 0x3b, 0xea, 0x98, 0x6b, 0x40, 0x57,\n  0x1b, 0x3b, 0x6b, 0xae, 0x91, 0x4c, 0xb4, 0x93,\n  0xb6, 0x29, 0x19, 0x0a, 0x8f, 0x56, 0x92, 0xca,\n  0xa0, 0xc5, 0xad, 0x3c, 0x76, 0xf0, 0x9b, 0x56,\n  0x47, 0xb7, 0x35, 0x00, 0x00, 0xff,\n  // blue\n  0xa2, 0x81, 0x39, 0xd2, 0x2c, 0xa3, 0xa8, 0x12,\n  0x14, 0x2f, 0xf5, 0xb4, 0xa2, 0x4a, 0xd2, 0x39,\n  0x3d, 0xcd, 0x71, 0xcb, 0xbb, 0x4e, 0x17, 0xb5,\n  0x26, 0x2b, 0x8b, 0x2a, 0xd3, 0xc2, 0xcb, 0xac,\n  0x3a, 0xe8, 0x4d, 0x53, 0xab, 0xda, 0x2a, 0xaf,\n  0xde, 0xd1, 0xa3, 0x72, 0x29, 0x9d, 0xfc, 0x20,\n  0xf7, 0x3a, 0xa5, 0x70, 0x62, 0x4b, 0x5d, 0xe3,\n  0x94, 0x5c, 0x9b, 0x09, 0x53, 0xaf, 0x33, 0x72,\n  0xa7, 0x3a, 0xc4, 0xa3, 0xce, 0x28, 0x8c, 0xdb,\n  0x70, 0xc9, 0xd2, 0xa3, 0x50, 0x61, 0x3a, 0x39,\n  0x2a, 0xaf, 0x5a, 0xfb, 0xae, 0xd2, 0x2a, 0x7c,\n  0x5a, 0xe7, 0xc2, 0x23, 0xbb, 0xd2, 0xe9, 0x92,\n  0x72, 0x77, 0xcf, 0x45, 0xa7, 0xcf, 0xca, 0x4d,\n  0xc3, 0x57, 0x9e, 0x3e, 0x49, 0x0b, 0x0f, 0x5b,\n  0x78, 0x86, 0xa4, 0x2d, 0xdc, 0xec, 0xf6, 0x1a,\n  0xa2, 0xf6, 0x70, 0xb5, 0xdb, 0x6d, 0x08, 0x3e,\n  0x5d, 0xd9, 0x6e, 0xb7, 0x31, 0xa4, 0x54, 0x56,\n  0xaf, 0x13, 0x46, 0xef, 0xd2, 0x4c, 0xb5, 0xb6,\n  0x99, 0xa2, 0x0b, 0x55, 0xe5, 0x70, 0x66, 0x8e,\n  0xc9, 0x82, 0x49, 0xa3, 0xb2, 0x49, 0x07, 0x4d,\n  0x61, 0xb7, 0x0b, 0x00, 0xf0,\n  // indigo\n  0xae, 0xa8, 0x86, 0xbc, 0x33, 0x94, 0x9e, 0x62,\n  0x04, 0x43, 0x8b, 0xae, 0x7b, 0x8a, 0xa6, 0x48,\n  0x63, 0xda, 0xca, 0xc9, 0x47, 0x74, 0x62, 0xef,\n  0x26, 0x27, 0xef, 0x8a, 0xd5, 0xbb, 0x2d, 0x8f,\n  0x2c, 0x49, 0x72, 0xef, 0xb2, 0x3d, 0x92, 0x20,\n  0x39, 0xb3, 0xd2, 0x76, 0x4b, 0x9c, 0x92, 0xf2,\n  0x4d, 0x86, 0x25, 0x51, 0x56, 0xc6, 0x57, 0x6c,\n  0xa5, 0x8c, 0x26, 0x1f, 0x2b, 0x72, 0x14, 0x32,\n  0x12, 0xa2, 0xd3, 0x9d, 0xce, 0xca, 0x87, 0x4d,\n  0x15, 0x6d, 0xab, 0xa7, 0xa8, 0x86, 0xcd, 0x6a,\n  0x6c, 0x9f, 0x2a, 0x1b, 0xb6, 0xae, 0xb6, 0x72,\n  0xaa, 0x62, 0xd8, 0xb2, 0xdb, 0xce, 0x69, 0xab,\n  0x65, 0xa9, 0x9c, 0x28, 0xad, 0xcf, 0x9a, 0x22,\n  0xbd, 0x95, 0xa8, 0x91, 0x29, 0xeb, 0xc9, 0x90,\n  0x4c, 0x00, 0x6c, 0xa9, 0x03, 0x90, 0x03, 0xf9,\n  0xca, 0x8b, 0x13, 0xce, 0xec, 0x2a, 0x67, 0x28,\n  0x4a, 0xad, 0x3d, 0x8b, 0x9c, 0x21, 0x5b, 0xb7,\n  0xf0, 0xae, 0x72, 0x86, 0xe8, 0x2c, 0x23, 0x26,\n  0xca, 0x19, 0x83, 0x2f, 0x0f, 0xef, 0xd2, 0x67,\n  0x8c, 0x21, 0x3d, 0xbc, 0xaa, 0x9c, 0x31, 0xa4,\n  0x54, 0x8f, 0xaa, 0x72, 0xc6, 0x10, 0x46, 0xdd,\n  0x73, 0xd2, 0x19, 0x83, 0x5f, 0x35, 0xcf, 0xca,\n  0x67, 0x4c, 0x31, 0x8a, 0xa5, 0x5a, 0x9d, 0x29,\n  0xc6, 0x2c, 0xd6, 0x6c, 0x39, 0xa6, 0x98, 0x33,\n  0x49, 0x6b, 0xe5, 0x98, 0x42, 0xaa, 0x44, 0x8d,\n  0x56, 0x63, 0x0a, 0xb9, 0x02, 0x35, 0x5b, 0x8e,\n  0xc5, 0xd5, 0x74, 0xd6, 0x6e, 0xa4, 0x96, 0xe4,\n  0xc3, 0xcd, 0x3c, 0x09, 0x00, 0xfc,\n  // violet\n  0xa9, 0x11, 0x36, 0xb3, 0x5c, 0x23, 0xa6, 0x2e,\n  0x48, 0x73, 0x55, 0x4b, 0x5a, 0x9a, 0xa4, 0x5d,\n  0x4d, 0xd9, 0xc9, 0x68, 0xaa, 0x32, 0x77, 0x27,\n  0x2b, 0xab, 0xae, 0x32, 0x22, 0x1c, 0x1d, 0x9f,\n  0x32, 0xd9, 0x88, 0x14, 0xa9, 0x73, 0xca, 0x18,\n  0xcb, 0x43, 0x6d, 0xea, 0xa9, 0xe2, 0x28, 0x0d,\n  0xcd, 0x2a, 0xa7, 0x8a, 0x3b, 0xb8, 0x22, 0x43,\n  0x9f, 0x3c, 0xf6, 0xd2, 0xd2, 0x1c, 0x7d, 0xf2,\n  0xd8, 0xd2, 0x4b, 0xaa, 0xf4, 0xc9, 0x53, 0x1e,\n  0xa9, 0xb4, 0x4a, 0x27, 0x4f, 0x2d, 0x74, 0xd2,\n  0x23, 0x9f, 0x3c, 0xd5, 0xd0, 0xf1, 0x0c, 0x73,\n  0xca, 0x9c, 0x2c, 0xca, 0x26, 0xcc, 0xa9, 0x4a,\n  0x74, 0x2b, 0x9b, 0x2a, 0xa7, 0xc9, 0xd1, 0x3c,\n  0x7d, 0xad, 0x9c, 0x2e, 0x9b, 0xd2, 0xb4, 0x2a,\n  0x7d, 0xfa, 0x24, 0x47, 0xc3, 0xa3, 0xca, 0xe9,\n  0x33, 0x1f, 0x57, 0xb5, 0x39, 0x6b, 0x88, 0xba,\n  0xdc, 0xb8, 0xea, 0x9c, 0x21, 0xe9, 0x54, 0xd7,\n  0xae, 0x72, 0x86, 0xa4, 0x53, 0x43, 0xbb, 0xca,\n  0x19, 0x8a, 0xd2, 0x28, 0xe9, 0x2a, 0x67, 0x2c,\n  0xd6, 0xcc, 0x6d, 0xaa, 0x9e, 0x39, 0x6b, 0xd7,\n  0xb0, 0x1a, 0x72, 0xd6, 0x64, 0xdc, 0xc2, 0x6b,\n  0x6c, 0x1a, 0xa2, 0x57, 0xb5, 0x98, 0xa2, 0xa6,\n  0x51, 0xcd, 0xc3, 0x35, 0xac, 0x08, 0x20, 0x11,\n  0x4d, 0x06, 0x34, 0x2e, 0xc6, 0x80, 0x2c, 0xdc,\n  0x08, 0x90, 0x94, 0x39, 0x00, 0xc0, 0xff\n};\n\n/* extern */\nconst uint8_t FLASHMEM bank_1[] = {\n  // zero\n  0x69, 0xfc, 0x59, 0xdd, 0x51, 0xd5, 0xd7, 0xa1,\n  0x8f, 0x0a, 0x78, 0xc0, 0x52, 0x01, 0x0f, 0x50,\n  0xac, 0xfc, 0xa8, 0x16, 0x15, 0xf2, 0x7b, 0xb2,\n  0x19, 0x47, 0xd0, 0x64, 0xeb, 0x4d, 0x77, 0xba,\n  0xb3, 0x91, 0x97, 0x24, 0x6e, 0x62, 0x6d, 0x5b,\n  0x15, 0x0a, 0xa7, 0xb9, 0xc5, 0xab, 0xd5, 0xaa,\n  0x63, 0xf0, 0xf0, 0xe2, 0x6c, 0xb3, 0x19, 0x5d,\n  0x52, 0x1d, 0x19, 0x94, 0x6f, 0x76, 0x7d, 0xe8,\n  0x43, 0x19, 0x83, 0xdc, 0x48, 0xc7, 0x2e, 0x71,\n  0x8c, 0x93, 0x9f, 0xe0, 0xff,\n  // one\n  0xa6, 0x4e, 0xa8, 0x7a, 0x8d, 0xed, 0xc4, 0xb6,\n  0xd5, 0x89, 0xd4, 0xbc, 0xa2, 0xdb, 0x91, 0x25,\n  0xbe, 0x33, 0x4c, 0xd9, 0x4f, 0x92, 0x4d, 0x57,\n  0x8a, 0x76, 0xbe, 0xf1, 0x89, 0xaa, 0x2e, 0x4f,\n  0xd5, 0xcd, 0x37, 0xd9, 0x45, 0x6b, 0x87, 0x13,\n  0x4c, 0x0d, 0xa7, 0xb5, 0xab, 0x7d, 0x1e, 0xe3,\n  0x18, 0x67, 0x3f, 0xa7, 0xa5, 0xf9, 0xd0, 0x30,\n  0x5b, 0x1d, 0x96, 0x9a, 0x34, 0x44, 0xbc, 0xb6,\n  0x5d, 0xe0, 0xff,\n  // two\n  0x06, 0xb8, 0x59, 0x34, 0x00, 0x27, 0xd6, 0x38,\n  0x60, 0x58, 0xd3, 0x11, 0x55, 0x2d, 0xaa, 0x65,\n  0x9d, 0x4f, 0xd2, 0xb8, 0x39, 0x17, 0x67, 0xbf,\n  0xc9, 0xce, 0x5a, 0x1e, 0xb5, 0x7a, 0x06, 0xf6,\n  0xa9, 0x75, 0xed, 0x52, 0x6f, 0x55, 0xa5, 0x26,\n  0x75, 0xc9, 0x93, 0x9f, 0xfc, 0x6c, 0x16, 0x63,\n  0x3a, 0x34, 0x70, 0xaf, 0x5e, 0xe1, 0xff,\n  // three\n  0x0c, 0xe8, 0x2e, 0x94, 0x01, 0x4d, 0xba, 0x4a,\n  0x40, 0x03, 0x16, 0x68, 0x41, 0x36, 0x1c, 0xe9,\n  0xba, 0xb8, 0x45, 0x39, 0x70, 0x72, 0x84, 0xdb,\n  0x11, 0xa7, 0xa8, 0x4e, 0xa3, 0xc9, 0x77, 0xbc,\n  0x92, 0xd6, 0x52, 0xa8, 0x71, 0xed, 0x4a, 0x7a,\n  0x4b, 0xa6, 0xe0, 0x37, 0x37, 0x5d, 0xe5, 0x48,\n  0x8e, 0x94, 0xf1, 0x64, 0x76, 0xad, 0x1f, 0x55,\n  0x91, 0xbc, 0x6e, 0xd7, 0xb1, 0xce, 0x75, 0xad,\n  0x5b, 0xda, 0xc7, 0x70, 0x22, 0xcd, 0xc7, 0x79,\n  0x8f, 0x3b, 0xfc,\n  // four\n  0x08, 0x68, 0x21, 0x0d, 0x03, 0x1c, 0x90, 0xc0,\n  0x70, 0x93, 0xb2, 0x29, 0x87, 0x76, 0x2b, 0x28,\n  0x5c, 0x7b, 0x06, 0xd9, 0xed, 0x60, 0x04, 0x51,\n  0x54, 0x4d, 0xa2, 0xba, 0x19, 0xb5, 0x2c, 0xf8,\n  0xea, 0x74, 0xca, 0xd3, 0xeb, 0xde, 0x97, 0x29,\n  0xa4, 0xd4, 0x4e, 0xc9, 0x5f, 0xa7, 0xb2, 0xa5,\n  0x9c, 0x1c, 0x63, 0xde, 0xf2, 0x91, 0xce, 0x34,\n  0x84, 0x27, 0x2d, 0x4b, 0xb8, 0x52, 0x09, 0x9c,\n  0x0e, 0xb7, 0xee, 0xcc, 0x5b, 0x70, 0xdd, 0xb2,\n  0xc0, 0xff,\n  // five\n  0x08, 0x68, 0x4e, 0x9d, 0x02, 0x1c, 0x60, 0xc0,\n  0x8c, 0x69, 0x12, 0xb0, 0xc0, 0x88, 0xaa, 0x8c,\n  0x9c, 0xc0, 0x2d, 0x3b, 0x3a, 0x41, 0x31, 0x15,\n  0xa3, 0xb6, 0xe4, 0x46, 0x37, 0xda, 0xc9, 0xce,\n  0x56, 0xde, 0x54, 0x5b, 0x85, 0xbe, 0xd9, 0xd5,\n  0x6c, 0x47, 0xdf, 0x6d, 0xb1, 0xa5, 0xbf, 0x99,\n  0x7d, 0x1b, 0x5b, 0x30, 0x09, 0xaf, 0x2f, 0x6d,\n  0xea, 0x31, 0xc4, 0x5c, 0xbe, 0xd6, 0x29, 0x2d,\n  0xad, 0x88, 0x87, 0xe2, 0xd2, 0xb2, 0xf6, 0xe0,\n  0x16, 0x2a, 0xb2, 0xe3, 0x6a, 0x57, 0xb9, 0xf2,\n  0x15, 0xfe,\n  // six\n  0x04, 0xf8, 0xb9, 0x55, 0x01, 0xbf, 0xa5, 0x1b,\n  0xe0, 0x37, 0x0f, 0x03, 0xfc, 0x96, 0x61, 0x80,\n  0xdf, 0x3c, 0x0c, 0xf0, 0x93, 0xda, 0xea, 0x86,\n  0x49, 0x53, 0x91, 0x37, 0xab, 0x6b, 0xd2, 0x55,\n  0x23, 0xde, 0xac, 0xb9, 0xb9, 0x16, 0x09, 0xff,\n  0xb2, 0xf6, 0x66, 0x93, 0x3c, 0x63, 0xf3, 0xbc,\n  0x11, 0x3e, 0x45, 0xa9, 0x0a, 0xd5, 0x00, 0x00,\n  0x02, 0x14, 0x97, 0xaa, 0x80, 0xab, 0x6b, 0x0d,\n  0xf0, 0x63, 0xa5, 0x01, 0x7e, 0xcb, 0x30, 0xc0,\n  0x6f, 0xe9, 0x0a, 0xf8, 0x25, 0x93, 0x01, 0x3f,\n  0x57, 0xc0, 0xff,\n  // seven\n  0x0c, 0x78, 0xc6, 0x95, 0x01, 0x3f, 0xa5, 0x28,\n  0xe0, 0xb7, 0x52, 0x0b, 0x04, 0xe0, 0xb7, 0x54,\n  0x07, 0xfc, 0x52, 0x66, 0x80, 0x9f, 0xcb, 0x56,\n  0x5d, 0x6c, 0x98, 0x47, 0x3e, 0x59, 0x5d, 0x89,\n  0x69, 0x66, 0xb9, 0x7a, 0x74, 0x39, 0x86, 0x9b,\n  0xd9, 0xa6, 0x34, 0xe4, 0x10, 0xae, 0xca, 0xad,\n  0xc7, 0x90, 0x5d, 0x9a, 0xa9, 0xae, 0x1a, 0x6d,\n  0xb1, 0xa5, 0x66, 0xf9, 0xb2, 0xb4, 0x4d, 0x63,\n  0xb6, 0x84, 0x9a, 0x52, 0x77, 0x45, 0x11, 0x1a,\n  0xaa, 0x4b, 0x35, 0x0c, 0x79, 0x4a, 0xb0, 0x49,\n  0xd5, 0x50, 0xa2, 0x41, 0xa1, 0xc9, 0xe5, 0xd9,\n  0xab, 0x89, 0x56, 0x04, 0xf8,\n  // eight\n  0x6d, 0x18, 0xde, 0x58, 0x23, 0x17, 0xaf, 0x61,\n  0xe8, 0x20, 0xeb, 0x5c, 0xbc, 0xba, 0x61, 0x03,\n  0xad, 0x73, 0xf6, 0x6a, 0x66, 0x4a, 0xd0, 0xcc,\n  0xd9, 0xab, 0x1b, 0x45, 0xc1, 0xa3, 0x66, 0xaf,\n  0x69, 0x36, 0x03, 0x8b, 0x5a, 0x9c, 0xd6, 0x51,\n  0x04, 0xa2, 0x66, 0x96, 0x7b, 0xba, 0x47, 0xec,\n  0xed, 0x8a, 0x08, 0x9a, 0xa2, 0x54, 0x85, 0x6a,\n  0x00, 0x80, 0x02, 0x86, 0x74, 0x63, 0xc0, 0xe6,\n  0x6a, 0xf0,\n  // nine\n  0xa2, 0x73, 0xdc, 0x33, 0xb5, 0x62, 0xb9, 0x36,\n  0x0b, 0x8e, 0x34, 0x8f, 0xd3, 0xea, 0xae, 0x59,\n  0xd2, 0x34, 0xe9, 0xa8, 0x86, 0x27, 0xc9, 0xd0,\n  0x78, 0x2b, 0x6f, 0xce, 0xc2, 0x45, 0x1b, 0xaf,\n  0xb4, 0xf8, 0x51, 0x73, 0x9d, 0xb3, 0xd2, 0x12,\n  0xc7, 0x2c, 0x6d, 0xc9, 0x4a, 0x72, 0x4b, 0xf3,\n  0x88, 0x26, 0x2b, 0xc9, 0x2d, 0xcc, 0x23, 0xea,\n  0xac, 0x34, 0xb7, 0xd0, 0x88, 0x98, 0xb3, 0xf2,\n  0x5c, 0x43, 0x32, 0x7d, 0xce, 0x2a, 0x4b, 0x0a,\n  0xcd, 0xf4, 0x39, 0xab, 0xae, 0x3e, 0x24, 0xcb,\n  0x67, 0xaf, 0xae, 0xd9, 0xe4, 0x18, 0x5f, 0xb4,\n  0x86, 0x6e, 0x92, 0x62, 0x7d, 0xd1, 0x18, 0xbb,\n  0x09, 0xf2, 0x8d, 0x59, 0x6d, 0xec, 0x3a, 0xd8,\n  0x27, 0x16, 0xa6, 0xa5, 0x7b, 0xf2, 0x74, 0x4f,\n  0x92, 0xd6, 0x1e, 0xc8, 0x4a, 0xc3, 0x49, 0x5a,\n  0x9b, 0x25, 0x2b, 0xf5, 0x24, 0x69, 0xe9, 0xd1,\n  0x24, 0x25, 0x27, 0xba, 0xa5, 0x25, 0x51, 0xd3,\n  0xaa, 0x24, 0xe6, 0x5e, 0x54, 0x55, 0x3a, 0x14,\n  0xfc,\n  // ten\n  0x0a, 0xd8, 0x5c, 0x4d, 0x03, 0x2b, 0xa8, 0x5e,\n  0xc4, 0x33, 0x2b, 0xaf, 0x78, 0x84, 0x12, 0x0d,\n  0x7b, 0xb3, 0xe2, 0x66, 0x43, 0xa2, 0xe3, 0xf6,\n  0x4a, 0xaa, 0x4e, 0xc9, 0x89, 0xdb, 0x2b, 0x6b,\n  0xba, 0xc5, 0xdb, 0x66, 0xaf, 0xb6, 0xe8, 0xe6,\n  0x4c, 0xbf, 0x3d, 0xda, 0x6a, 0xc4, 0x4b, 0xca,\n  0x49, 0x19, 0xba, 0x61, 0x2b, 0x09, 0x25, 0x6d,\n  0xea, 0x5a, 0xb4, 0xc4, 0xed, 0xa6, 0x65, 0x18,\n  0xe1, 0x56, 0xb7, 0x9a, 0x96, 0xa6, 0x44, 0x47,\n  0xdc, 0x6e, 0x5e, 0xc2, 0xda, 0xa5, 0xf0, 0xb8,\n  0xd9, 0x85, 0xff\n};\n\n/* extern */\nconst uint8_t FLASHMEM bank_2[] = {\n  // a\n  0xa5, 0x2f, 0x96, 0xad, 0x7b, 0x6a, 0x9f, 0x6a,\n  0xe4, 0x20, 0x8d, 0x9c, 0x73, 0xf3, 0x9b, 0xdd,\n  0xec, 0xe6, 0x37, 0xbf, 0xe5, 0xaa, 0x66, 0x28,\n  0xa0, 0xce, 0xd5, 0xbb, 0xd9, 0xed, 0xee, 0x66,\n  0x3f, 0x87, 0x36, 0xce, 0x9c, 0x80, 0x51, 0x8b,\n  0xeb, 0x54, 0xe7, 0xbc, 0xc2, 0xff,\n  // b\n  0xa6, 0x2a, 0xaa, 0x05, 0x5c, 0xd6, 0x8c, 0xb8,\n  0xc7, 0x16, 0x70, 0x59, 0x33, 0xa2, 0x95, 0x0b,\n  0xc1, 0xfd, 0xcd, 0x8c, 0x66, 0x38, 0xe3, 0x91,\n  0xad, 0x98, 0x00, 0x55, 0x8b, 0x67, 0xd1, 0xdb,\n  0xde, 0xd5, 0xa9, 0xce, 0x75, 0x2e, 0xeb, 0x2c,\n  0x4d, 0x60, 0xbe, 0x26, 0xef, 0xf1, 0x88, 0x27,\n  0xfc,\n  // c\n  0x04, 0xf8, 0xa5, 0x83, 0x03, 0x12, 0xb0, 0x80,\n  0x07, 0x22, 0xb0, 0x9c, 0xee, 0x8d, 0x45, 0x7d,\n  0xc9, 0x8a, 0x66, 0x29, 0x42, 0xf5, 0x35, 0x3b,\n  0xda, 0xd1, 0x88, 0x67, 0x0d, 0x40, 0xcf, 0xd7,\n  0x33, 0x19, 0xf9, 0xac, 0x06, 0x14, 0xb5, 0x68,\n  0xd6, 0xbd, 0xeb, 0x7d, 0x1f, 0xd3, 0x32, 0x5b,\n  0x02, 0x44, 0xbd, 0xce, 0x6b, 0x5e, 0xf3, 0x96,\n  0xb6, 0x55, 0x0a, 0xc1, 0x73, 0x4d, 0xde, 0xf3,\n  0x0e, 0xff,\n  // d\n  0x08, 0x20, 0xba, 0x0d, 0x03, 0x6d, 0x38, 0x2c,\n  0x55, 0x45, 0xb3, 0x8c, 0xba, 0x05, 0x65, 0xd5,\n  0x78, 0x32, 0xaa, 0xee, 0x85, 0x34, 0xf2, 0xf6,\n  0xa8, 0x87, 0x33, 0xe0, 0xca, 0xc7, 0xad, 0x9e,\n  0xce, 0x81, 0xbb, 0x66, 0xb7, 0x76, 0x06, 0x07,\n  0xee, 0x9c, 0xd5, 0xba, 0xa9, 0x1d, 0x65, 0x72,\n  0x11, 0xfc,\n  // e\n  0xa2, 0x5a, 0x95, 0x51, 0xba, 0x17, 0xf7, 0x62,\n  0xe5, 0xab, 0x38, 0x42, 0xe4, 0x92, 0x9d, 0xef,\n  0x6c, 0x65, 0x33, 0x3b, 0x50, 0xd6, 0x92, 0x9d,\n  0xaf, 0x62, 0xc5, 0x04, 0xa8, 0x5a, 0xbc, 0xcb,\n  0x5d, 0xed, 0x7a, 0x37, 0xbb, 0xdd, 0xc3, 0x1e,\n  0xf6, 0x34, 0xa7, 0xbe, 0xf4, 0xa5, 0xad, 0xb3,\n  0x34, 0x81, 0xf9, 0x1a, 0xf8,\n  // f\n  0xab, 0x1a, 0x61, 0x94, 0xdd, 0xd6, 0xdc, 0xf6,\n  0x54, 0xdd, 0x37, 0xb9, 0xe7, 0xea, 0x53, 0x35,\n  0xb3, 0x1c, 0xe1, 0xaf, 0x6f, 0x75, 0xdb, 0x35,\n  0xd4, 0xe0, 0x56, 0x9c, 0x77, 0xdb, 0x58, 0x9d,\n  0xeb, 0x98, 0x8c, 0x61, 0xc0, 0x30, 0xe9, 0x1a,\n  0xb0, 0x80, 0x05, 0x14, 0x30, 0x6d, 0xbb, 0x06,\n  0x24, 0x20, 0x01, 0x0e, 0x10, 0xa0, 0x06, 0x35,\n  0xf8,\n  // g\n  0x6e, 0x3e, 0x29, 0x8d, 0x98, 0x95, 0xcd, 0x39,\n  0x00, 0xab, 0x38, 0x95, 0xf4, 0xd4, 0xeb, 0x34,\n  0x81, 0x7a, 0xe2, 0x51, 0x53, 0x50, 0x75, 0xeb,\n  0x8e, 0x76, 0xb4, 0xc3, 0x15, 0x8d, 0x92, 0x48,\n  0x99, 0xab, 0x77, 0xbc, 0xd3, 0x5d, 0x8e, 0x76,\n  0x96, 0x04, 0x8c, 0x5a, 0x3c, 0xfb, 0xd9, 0xf7,\n  0xa9, 0x4e, 0x75, 0x2b, 0xdb, 0x2a, 0x85, 0xe0,\n  0xb9, 0x26, 0x1e, 0xf1, 0x80, 0xff,\n  // h\n  0xa5, 0x1d, 0x6d, 0x90, 0x2d, 0xd6, 0xec, 0xf2,\n  0xe6, 0x37, 0xbb, 0xe9, 0x2e, 0x46, 0x3b, 0xa3,\n  0x01, 0x6d, 0x2d, 0xce, 0xa3, 0x5d, 0xdd, 0xdc,\n  0x3c, 0x61, 0x76, 0xc5, 0x25, 0xb3, 0x08, 0xe5,\n  0x2e, 0x22, 0x1b, 0x00, 0x80, 0x01, 0x2b, 0x87,\n  0x38, 0x60, 0xe5, 0xed, 0x08, 0x58, 0xc0, 0x02,\n  0x16, 0xb0, 0x80, 0x06, 0x34, 0x40, 0x80, 0x76,\n  0xd3, 0xe0, 0xff,\n  // i\n  0x2a, 0x8b, 0x63, 0xa8, 0xaa, 0x66, 0xad, 0xb6,\n  0xa8, 0xcb, 0x08, 0xdd, 0x7c, 0x8b, 0x9b, 0xde,\n  0xf4, 0x66, 0x37, 0x3b, 0x59, 0xb5, 0xa3, 0x15,\n  0xba, 0xf8, 0xe6, 0xbb, 0xd8, 0xcd, 0x6e, 0x57,\n  0xdf, 0x5c, 0x49, 0xa5, 0x2d, 0xde, 0x63, 0x1b,\n  0x6b, 0x76, 0x29, 0xaf, 0xc7, 0x6d, 0xec, 0x31,\n  0xd8, 0x5c, 0x1e, 0xf7, 0xb1, 0x4e, 0x75, 0x4a,\n  0xf3, 0x28, 0x89, 0xe2, 0xf2, 0x38, 0x2f, 0x79,\n  0x85, 0xff,\n  // j\n  0xae, 0x5e, 0xc1, 0x99, 0x54, 0xb2, 0x09, 0x60,\n  0x49, 0x22, 0x07, 0xec, 0xa8, 0x16, 0x80, 0x5d,\n  0x26, 0x47, 0xd5, 0xa3, 0x92, 0x78, 0x74, 0x3e,\n  0x71, 0x2f, 0x21, 0x6a, 0xb1, 0xfa, 0xc6, 0x37,\n  0xbe, 0xf1, 0x4d, 0x6f, 0x7a, 0xf3, 0x5d, 0x8d,\n  0x7e, 0xb4, 0x22, 0x36, 0x7f, 0x53, 0xe7, 0xbe,\n  0xb4, 0x6d, 0x96, 0x61, 0x34, 0xdb, 0x52, 0xb7,\n  0xb4, 0x8f, 0xdc, 0x88, 0xe1, 0x5f, 0xf2, 0x9a,\n  0x57, 0xf8,\n  // k\n  0x01, 0x18, 0x91, 0xb9, 0x00, 0x4d, 0x91, 0x46,\n  0x60, 0x05, 0x2d, 0xb3, 0xb8, 0x67, 0xed, 0x13,\n  0xf7, 0x14, 0x64, 0x11, 0x4b, 0x6e, 0x7c, 0xe3,\n  0x1b, 0xdf, 0xf8, 0x14, 0xc3, 0x05, 0x6a, 0xe7,\n  0xea, 0x5d, 0xef, 0x7a, 0xf7, 0x6d, 0x1a, 0xb1,\n  0x00, 0x2b, 0xdf, 0xf4, 0xa9, 0x4d, 0xb3, 0x24,\n  0x60, 0xd4, 0xe2, 0xba, 0xe6, 0x35, 0x6f, 0x69,\n  0x1b, 0x43, 0x48, 0xa3, 0xeb, 0xe4, 0x0d, 0xfe,\n  // l\n  0xab, 0x6c, 0x2e, 0xd8, 0x2a, 0x37, 0xdf, 0xe2,\n  0x16, 0xa7, 0xa8, 0x21, 0xbc, 0xc4, 0x17, 0xdf,\n  0xe2, 0x16, 0xa7, 0xcc, 0x6a, 0xc3, 0x4d, 0x3a,\n  0xdf, 0x72, 0xd5, 0x95, 0x6c, 0xa6, 0x71, 0x9e,\n  0xd1, 0x35, 0x98, 0x53, 0x49, 0x5e, 0x7b, 0x57,\n  0xc6, 0x0a, 0x7a, 0x43, 0xd9, 0x4f, 0x1c, 0xc3,\n  0x54, 0xe0, 0xf4, 0x08, 0xf9, 0x09, 0x53, 0x03,\n  0x31, 0x19, 0xa2, 0x25, 0x4e, 0xf0,\n  // m\n  0x29, 0xea, 0xc5, 0xd8, 0x73, 0x16, 0xcf, 0xe8,\n  0x56, 0x37, 0xbf, 0xd9, 0x49, 0xbb, 0x6f, 0xf1,\n  0xf0, 0xd5, 0x37, 0xbd, 0xd9, 0xce, 0x47, 0x55,\n  0x63, 0x72, 0x98, 0x58, 0xee, 0x6d, 0xef, 0xdb,\n  0xd0, 0x62, 0x72, 0x98, 0x58, 0xae, 0x63, 0x1d,\n  0xd3, 0x58, 0x45, 0x72, 0x93, 0xd8, 0x8d, 0x93,\n  0x9d, 0xec, 0x64, 0xe7, 0x30, 0x97, 0x58, 0xe1,\n  0xa2, 0x4d, 0xe2, 0x12, 0x57, 0xf8,\n  // n\n  0x81, 0xed, 0xd1, 0xc8, 0xb3, 0x16, 0xef, 0xe2,\n  0x64, 0xc3, 0x35, 0x59, 0xc4, 0xe3, 0x9b, 0xde,\n  0xf4, 0xa6, 0x3b, 0x5f, 0xf9, 0x92, 0xcd, 0x91,\n  0xb4, 0x78, 0xb7, 0xa3, 0x1f, 0x9e, 0x38, 0x2c,\n  0x9c, 0xce, 0xbe, 0x0f, 0x75, 0x0e, 0xf3, 0xb0,\n  0xc2, 0x61, 0x1e, 0x35, 0xce, 0x71, 0x89, 0x6b,\n  0xdc, 0xd2, 0xd6, 0x4d, 0x49, 0xb8, 0xce, 0x0e,\n  0xdb, 0x34, 0xad, 0x16, 0xbc, 0x19, 0xfe,\n  // o\n  0xa3, 0x68, 0xb4, 0xba, 0x8d, 0xbc, 0xad, 0xbc,\n  0x92, 0xec, 0x0e, 0xf2, 0xb6, 0xd3, 0x1d, 0x8f,\n  0xb8, 0xe0, 0xee, 0x16, 0xf6, 0x3f, 0x93, 0x59,\n  0xcf, 0xa6, 0x0c, 0x91, 0xe5, 0x0c, 0x8b, 0xbf,\n  0x30, 0x39, 0xd3, 0x1d, 0x28, 0x59, 0xe2, 0xe2,\n  0x17, 0xbb, 0xfa, 0x1d, 0xfe,\n  // p\n  0x02, 0x88, 0x26, 0xd4, 0x00, 0x6d, 0x96, 0xb5,\n  0xb8, 0x25, 0x05, 0x89, 0x6c, 0x3d, 0x92, 0xe6,\n  0x51, 0xb3, 0xa6, 0xf4, 0x48, 0x66, 0x09, 0xa0,\n  0x8c, 0xc7, 0x33, 0x9d, 0x79, 0xcb, 0x67, 0x0e,\n  0x80, 0xca, 0xd7, 0xbd, 0x6c, 0xe5, 0x72, 0x06,\n  0xb4, 0xb5, 0xba, 0x37, 0xbd, 0xab, 0x53, 0x5d,\n  0xf2, 0x9e, 0xf7, 0x78, 0xc0, 0xff,\n  // q\n  0x0e, 0x98, 0xd5, 0x28, 0x02, 0x11, 0x18, 0xc9,\n  0xcc, 0x46, 0x98, 0xf1, 0x66, 0x27, 0x27, 0x19,\n  0x21, 0x99, 0x92, 0xb6, 0xdc, 0x6c, 0xe7, 0xab,\n  0x28, 0xd2, 0x2d, 0x13, 0x3b, 0xef, 0xb2, 0xb5,\n  0xce, 0x94, 0x47, 0xd0, 0xee, 0xda, 0xc7, 0x31,\n  0xcf, 0x61, 0x31, 0x31, 0xa2, 0x50, 0xb6, 0xf8,\n  0xd5, 0xef, 0xf0,\n  // r\n  0x2b, 0xce, 0x72, 0x33, 0x93, 0xbb, 0xdc, 0xf2,\n  0x16, 0x37, 0xbf, 0xd9, 0x28, 0x52, 0x5c, 0xa9,\n  0xa6, 0x4d, 0xb3, 0x6c, 0x5d, 0x0a, 0xcb, 0x71,\n  0xd8, 0xbb, 0x0f, 0x7d, 0x2a, 0x73, 0xb6, 0xc7,\n  0xf4, 0x94, 0x37, 0x2d, 0xa9, 0x34, 0xf8, 0x53,\n  0x97, 0xb8, 0xc2, 0xff,\n  // s\n  0xab, 0x6f, 0xd9, 0x34, 0x6c, 0xe6, 0xdc, 0xe2,\n  0x16, 0x37, 0xbf, 0xf9, 0x69, 0xaa, 0x0f, 0x2d,\n  0xda, 0x25, 0x7b, 0x18, 0x53, 0x4d, 0x9a, 0xa2,\n  0xe7, 0xb8, 0x2d, 0x23, 0xa5, 0x26, 0x71, 0x2a,\n  0x03, 0xfc, 0x94, 0xe6, 0x01, 0x0f, 0x68, 0x40,\n  0x03, 0x12, 0xe0, 0x00, 0x07, 0x30, 0x00, 0xff,\n  // t\n  0x01, 0xd8, 0xb6, 0xdd, 0x01, 0x2f, 0xf4, 0x38,\n  0x60, 0xd5, 0xd1, 0x91, 0x4c, 0x97, 0x84, 0xe6,\n  0x4b, 0x4e, 0x32, 0xb2, 0x10, 0x67, 0xcd, 0x19,\n  0xc9, 0x2c, 0x01, 0x94, 0xf1, 0x78, 0x26, 0x33,\n  0xe9, 0x69, 0x2f, 0x7b, 0x53, 0xbb, 0x36, 0xae,\n  0x52, 0x08, 0x9e, 0x6b, 0xea, 0x5c, 0x97, 0xba,\n  0x95, 0x7d, 0x45, 0x47, 0xac, 0x5a, 0x9c, 0x0f,\n  0xf8,\n  // u\n  0xa1, 0x99, 0x9c, 0x94, 0x72, 0x26, 0x8d, 0x6a,\n  0x07, 0x55, 0x90, 0x78, 0x3c, 0x8b, 0x99, 0x9f,\n  0xac, 0x87, 0x60, 0x76, 0xda, 0x72, 0xb3, 0x93,\n  0x35, 0xa5, 0x64, 0x2d, 0x7b, 0x6e, 0xbe, 0x9a,\n  0x24, 0xdc, 0x32, 0xb1, 0x73, 0xef, 0xfa, 0x10,\n  0x46, 0xab, 0xc6, 0xca, 0xe0, 0xb5, 0x5f, 0xcc,\n  0xaa, 0xd4, 0x78, 0x1b, 0xb6, 0x53, 0xbb, 0x74,\n  0xa7, 0x21, 0xbc, 0x04, 0xfe,\n  // v\n  0x66, 0xf0, 0xd2, 0x38, 0x43, 0xb3, 0xd8, 0x21,\n  0xf4, 0x4d, 0xbb, 0x70, 0xb0, 0xdb, 0xd0, 0x0f,\n  0x17, 0x2c, 0x26, 0xae, 0x53, 0x37, 0x6c, 0xbb,\n  0x32, 0xab, 0x19, 0x75, 0xf7, 0x21, 0x6c, 0x9c,\n  0xe5, 0x64, 0x33, 0xb6, 0x80, 0xcb, 0x9a, 0x1b,\n  0xae, 0x60, 0xe5, 0x42, 0x70, 0x7f, 0xb3, 0x83,\n  0xed, 0xef, 0x70, 0x25, 0x2b, 0x26, 0x40, 0xd5,\n  0xe2, 0x99, 0xf7, 0xba, 0xb7, 0x75, 0xa8, 0x63,\n  0x9d, 0xca, 0x32, 0x4b, 0x13, 0x98, 0xaf, 0xa9,\n  0x4b, 0xde, 0xf3, 0x91, 0x8e, 0x19, 0x0b, 0x31,\n  0xf3, 0x0d, 0xfc,\n  // w\n  0x21, 0xdb, 0xc2, 0x44, 0xc2, 0xfc, 0x9c, 0x64,\n  0x88, 0x70, 0x09, 0x59, 0x7b, 0xe2, 0xca, 0x3b,\n  0x3d, 0xa4, 0xcf, 0x0d, 0x56, 0x90, 0xc4, 0xa6,\n  0xbb, 0xf4, 0x6e, 0x41, 0xe2, 0x9d, 0xea, 0xe2,\n  0x4a, 0x65, 0x12, 0x65, 0xbb, 0xb3, 0xeb, 0x91,\n  0x55, 0x12, 0x99, 0xc1, 0xd9, 0x6e, 0xb1, 0x9b,\n  0xd1, 0x36, 0x92, 0x6a, 0xc9, 0x9b, 0x47, 0x3b,\n  0x4c, 0x12, 0x46, 0x6c, 0x99, 0x5d, 0xef, 0x5b,\n  0xdf, 0x92, 0x92, 0x64, 0x6c, 0xee, 0x43, 0x19,\n  0x6b, 0x22, 0x71, 0x8f, 0xcf, 0x65, 0x29, 0x41,\n  0xd4, 0xdd, 0x36, 0xa5, 0x2d, 0x19, 0xf5, 0x0c,\n  0xee, 0x13, 0xb7, 0x7c, 0x98, 0xc3, 0x85, 0xc8,\n  0x62, 0xee, 0x6d, 0x4f, 0xf8,\n  // x\n  0xad, 0x69, 0xc9, 0xc5, 0x32, 0x56, 0xdf, 0xfe,\n  0x74, 0x2d, 0x35, 0x7b, 0xf8, 0xea, 0xdb, 0xdd,\n  0xe1, 0x6c, 0x6d, 0x04, 0xa6, 0xc5, 0xea, 0xb9,\n  0x87, 0xa3, 0x75, 0x23, 0x37, 0x4f, 0x83, 0x60,\n  0x11, 0xca, 0x5d, 0x44, 0x36, 0x00, 0x28, 0xa0,\n  0xe6, 0x31, 0x0f, 0x68, 0xc0, 0x00, 0xbf, 0x8d,\n  0x79, 0xc0, 0x03, 0x16, 0xd0, 0x00, 0x07, 0xe0,\n  0xff,\n  // y\n  0xaa, 0xb3, 0xa2, 0xa7, 0x95, 0xd2, 0xd8, 0x2e,\n  0x57, 0x23, 0x2f, 0xb2, 0x7a, 0x1c, 0xb3, 0xde,\n  0xec, 0xa4, 0x45, 0x6d, 0x56, 0xca, 0x9a, 0x9b,\n  0xde, 0xf4, 0xe6, 0xbb, 0xd8, 0xc5, 0xaa, 0x8a,\n  0x6f, 0x2b, 0xf3, 0x37, 0xbb, 0x1b, 0x5d, 0xd3,\n  0x25, 0x39, 0xfa, 0xb9, 0x0f, 0x6d, 0xe8, 0x31,\n  0xc4, 0x5c, 0x1e, 0xf7, 0xa1, 0x4f, 0x65, 0x1e,\n  0xa5, 0x48, 0x5c, 0x1e, 0xd7, 0x25, 0x2f, 0x79,\n  0x81, 0xff,\n  // z\n  0xad, 0xfb, 0xc6, 0x5c, 0x95, 0xd5, 0xf5, 0xce,\n  0x02, 0xbb, 0x5b, 0xf9, 0x51, 0x2d, 0x2a, 0xe4,\n  0x77, 0xe5, 0xa3, 0x3a, 0xb1, 0xfa, 0x9b, 0x9d,\n  0xec, 0x78, 0xc5, 0x33, 0x27, 0x60, 0xd4, 0xe2,\n  0x99, 0xce, 0x74, 0xd6, 0xb3, 0x9b, 0x43, 0x9f,\n  0xfa, 0x54, 0xe6, 0x55, 0x0a, 0xc1, 0x73, 0x4d,\n  0x9d, 0xeb, 0x92, 0xd6, 0x15, 0x12, 0xa0, 0x6b,\n  0x75, 0x5e, 0xe1, 0xff\n};\n\n/* extern */\nconst uint8_t FLASHMEM bank_3[] = {\n  // alpha\n  0x63, 0xac, 0x21, 0xb4, 0x3c, 0x16, 0xaf, 0xb2,\n  0x84, 0xd2, 0x0a, 0x5f, 0xb3, 0xf2, 0xe2, 0xda,\n  0x32, 0xf4, 0xcd, 0xca, 0x92, 0xdf, 0x28, 0xd7,\n  0x27, 0x2b, 0xcd, 0xe2, 0x5b, 0x93, 0x57, 0xaf,\n  0xac, 0xd0, 0x1b, 0x0b, 0xee, 0xb2, 0xb2, 0x24,\n  0xae, 0xc3, 0x28, 0x4b, 0x29, 0x0a, 0xaf, 0x0e,\n  0x13, 0x47, 0x02, 0xa8, 0xa6, 0x4c, 0x00, 0x4d,\n  0x57, 0x08, 0xa0, 0x99, 0x0c, 0x01, 0x74, 0xed,\n  0xb1, 0x8a, 0x22, 0xba, 0xd4, 0xa9, 0xcd, 0x2a,\n  0x2a, 0xef, 0xd6, 0xe0, 0xbd, 0x6b, 0x6c, 0xac,\n  0x5a, 0x83, 0xf7, 0xae, 0xad, 0xb1, 0x6a, 0x0b,\n  0xde, 0x32, 0x96, 0xa2, 0x3a, 0xc2, 0x79, 0x73,\n  0xdd, 0xf3, 0x01, 0xff,\n  // bravo\n  0x02, 0x10, 0x2c, 0x34, 0x94, 0x46, 0xaf, 0xc8,\n  0x8a, 0xbd, 0x54, 0x84, 0xa9, 0xe6, 0x2d, 0xfc,\n  0x46, 0x1e, 0x7b, 0x48, 0x87, 0x2a, 0x5f, 0x59,\n  0x76, 0x13, 0xe9, 0xba, 0x7a, 0xa7, 0x3b, 0x9d,\n  0x59, 0x29, 0xa3, 0xab, 0x48, 0xd7, 0xd5, 0xb1,\n  0x0e, 0x6d, 0xf7, 0xa1, 0xe6, 0x2a, 0x3b, 0xb6,\n  0xa5, 0x0d, 0xa9, 0x52, 0x55, 0x56, 0x8d, 0xb2,\n  0x92, 0x6a, 0x77, 0xf1, 0xbb, 0xda, 0x86, 0xb2,\n  0x3a, 0x44, 0xfd, 0xec, 0xdb, 0x50, 0x48, 0xd7,\n  0x38, 0xb9, 0xef, 0x73, 0x9d, 0xc3, 0xec, 0x7d,\n  0x67, 0xb0, 0xf4, 0x89, 0x6b, 0xdc, 0xe0, 0xff,\n  // charlie\n  0x06, 0xd8, 0x2d, 0x2c, 0x01, 0x33, 0xb7, 0x67,\n  0xa0, 0xb9, 0xc5, 0x8d, 0xc8, 0xb2, 0xb7, 0x16,\n  0x16, 0xbf, 0x26, 0x87, 0xf9, 0x5a, 0x94, 0xf3,\n  0xb0, 0x1f, 0x75, 0x19, 0x51, 0xce, 0xcd, 0x71,\n  0xd4, 0x65, 0xc4, 0x39, 0x8e, 0xda, 0x71, 0xb6,\n  0x91, 0xc7, 0x30, 0xe9, 0x6e, 0x69, 0x4b, 0x5b,\n  0x51, 0x8f, 0x15, 0x66, 0x49, 0xe3, 0x80, 0x31,\n  0xa2, 0xe6, 0x7d, 0xcd, 0x55, 0xb6, 0x59, 0xd8,\n  0xea, 0xb1, 0x0e, 0xde, 0xca, 0xe5, 0x9b, 0xc7,\n  0xd6, 0x65, 0x92, 0x55, 0x6c, 0x2e, 0xfb, 0x30,\n  0x49, 0x92, 0xb1, 0x3a, 0xed, 0xc3, 0x04, 0x72,\n  0xe7, 0xe6, 0x70, 0x74, 0xeb, 0xa8, 0x93, 0xab,\n  0xe1, 0xff,\n  // delta\n  0x0a, 0x28, 0x30, 0x6c, 0x8d, 0xc3, 0xa7, 0xaa,\n  0x70, 0xd7, 0x55, 0x76, 0x5d, 0x22, 0xee, 0x5b,\n  0x57, 0xd6, 0xf9, 0xb8, 0xa6, 0x6d, 0x59, 0x59,\n  0x16, 0x9b, 0xa1, 0xde, 0x7b, 0x15, 0x99, 0x6d,\n  0xa5, 0x58, 0xde, 0x55, 0x64, 0x11, 0x5d, 0xc2,\n  0x69, 0x4a, 0x3b, 0x25, 0x5b, 0x85, 0x32, 0x21,\n  0x40, 0x96, 0x26, 0x0e, 0x58, 0x4a, 0x33, 0x00,\n  0x4b, 0xb5, 0xad, 0xaa, 0x9a, 0xf0, 0x30, 0xdf,\n  0xb2, 0xbb, 0xd1, 0x37, 0x55, 0xe9, 0x21, 0x5d,\n  0x7b, 0x3f, 0x96, 0xaa, 0xc6, 0x3c, 0xa5, 0x73,\n  0x5f, 0xe1, 0xff,\n  // echo\n  0x2b, 0x6e, 0xb1, 0xd9, 0xd3, 0x36, 0xdf, 0xf2,\n  0x16, 0x37, 0x27, 0xa9, 0x08, 0xe5, 0x2e, 0x22,\n  0x1b, 0x20, 0x00, 0x25, 0xac, 0x2a, 0x20, 0xcf,\n  0xd3, 0x92, 0x45, 0x53, 0x6a, 0xa9, 0x9e, 0x4f,\n  0x99, 0x54, 0x47, 0xb9, 0xe4, 0xdf, 0xed, 0x6c,\n  0x47, 0x9b, 0x45, 0x65, 0xbb, 0x78, 0x9f, 0xc3,\n  0x1c, 0xd2, 0xe8, 0x43, 0x67, 0xb0, 0xe5, 0xcd,\n  0x73, 0x58, 0x9d, 0xad, 0x2c, 0x15, 0x37, 0x71,\n  0x85, 0xff,\n  // foxtrot\n  0x04, 0x18, 0xb6, 0x82, 0x00, 0xd3, 0x57, 0x08,\n  0x60, 0xba, 0xf4, 0x91, 0xc7, 0x58, 0x15, 0xca,\n  0x8b, 0x47, 0x9e, 0xfc, 0x64, 0x1a, 0xaf, 0x19,\n  0x45, 0x4a, 0x9d, 0xa1, 0xfa, 0x64, 0x14, 0xa9,\n  0x65, 0x86, 0xe4, 0xe2, 0x51, 0xa5, 0xee, 0x99,\n  0x92, 0xab, 0x04, 0xe0, 0xa2, 0x93, 0x04, 0x08,\n  0x90, 0x9d, 0x33, 0x03, 0x9e, 0x71, 0x65, 0xc0,\n  0x4f, 0x29, 0x0a, 0xf8, 0xad, 0xd4, 0x02, 0x08,\n  0x9e, 0xa2, 0x54, 0x85, 0x6a, 0x80, 0x00, 0x86,\n  0x21, 0x57, 0xc0, 0x48, 0x53, 0x01, 0x18, 0x36,\n  0xbc, 0x15, 0xa9, 0x4b, 0xaa, 0x4b, 0x9b, 0xd6,\n  0xc7, 0xee, 0x11, 0x41, 0x6b, 0xdb, 0x9a, 0xec,\n  0x94, 0x36, 0xed, 0x6d, 0x5b, 0x76, 0x93, 0x9e,\n  0xfc, 0xa5, 0x5d, 0xd9, 0x4d, 0x58, 0xea, 0x9a,\n  0x7e, 0xb5, 0x37, 0xc5, 0x76, 0x4f, 0x7f, 0x14,\n  0xfe, 0xd8, 0xcd, 0x2b, 0x7a, 0xb2, 0xfa, 0x9b,\n  0xf2, 0x88, 0xf0, 0xae, 0x08, 0x16, 0xa1, 0xdc,\n  0x45, 0x64, 0x03, 0x80, 0x00, 0x8e, 0xe0, 0x30,\n  0xc0, 0xb2, 0x53, 0xf0,\n  // golf\n  0x0a, 0x88, 0xa1, 0x71, 0x65, 0x85, 0x76, 0x45,\n  0x8a, 0xff, 0x9b, 0xde, 0x78, 0xc5, 0x99, 0x5c,\n  0xb7, 0x72, 0xde, 0x1d, 0xef, 0x7c, 0xd7, 0xb3,\n  0x6f, 0x63, 0x54, 0x35, 0x63, 0xe4, 0xa6, 0xae,\n  0x79, 0x33, 0x47, 0x94, 0x39, 0x63, 0xe4, 0x86,\n  0x1f, 0x04, 0x98, 0x34, 0xdd, 0x02, 0x0e, 0x98,\n  0x32, 0x5d, 0x03, 0x12, 0xe0, 0x00, 0xfc,\n  // hotel\n  0x08, 0xc8, 0x4a, 0x0c, 0x01, 0xc5, 0x74, 0x11,\n  0xa0, 0xca, 0xea, 0xd1, 0x35, 0x5a, 0xdd, 0x46,\n  0xde, 0x56, 0x5d, 0x49, 0x76, 0x07, 0x79, 0xdb,\n  0xd5, 0xa8, 0x0a, 0xee, 0x6e, 0x61, 0xff, 0xbd,\n  0xaa, 0x2d, 0x82, 0x44, 0x70, 0x17, 0x11, 0xd9,\n  0x00, 0x02, 0xe8, 0x54, 0x2d, 0x00, 0xd5, 0x84,\n  0x05, 0x60, 0x2a, 0xb3, 0x93, 0x37, 0x67, 0x66,\n  0x9c, 0x6b, 0x4e, 0x5e, 0xbd, 0x9b, 0x6a, 0xdd,\n  0x39, 0x79, 0xf1, 0xae, 0x6e, 0xbd, 0xf8, 0x54,\n  0xc5, 0xa7, 0x85, 0xe5, 0xe2, 0x53, 0x17, 0xd5,\n  0x9e, 0x2e, 0x9f, 0xcf, 0x58, 0xe4, 0xa6, 0x07,\n  0xbf, 0x59, 0x5b, 0xc5, 0x33, 0x19, 0xd8, 0xa5,\n  0x9c, 0x89, 0xce, 0x94, 0x61, 0x9b, 0x74, 0x79,\n  0xdd, 0x13, 0xc4, 0x4b, 0xfc, 0xe5, 0x2e, 0xa7,\n  0xae, 0x0a, 0xa5, 0x0d, 0xfc,\n  // india\n  0xa3, 0x98, 0xd6, 0x99, 0x32, 0x17, 0x8f, 0x7c,\n  0x86, 0x16, 0x74, 0x5f, 0xb3, 0xf2, 0xe1, 0x4a,\n  0xc4, 0xf4, 0xce, 0x4e, 0x47, 0xdc, 0x1d, 0x5a,\n  0x46, 0x3a, 0x99, 0x71, 0x8b, 0xab, 0x82, 0xac,\n  0x08, 0x27, 0x3e, 0x5d, 0xe5, 0x0c, 0x25, 0x42,\n  0xbc, 0x7b, 0x55, 0xd3, 0x17, 0x61, 0xf8, 0x96,\n  0x5d, 0xed, 0x7a, 0xf4, 0xcd, 0x8a, 0x44, 0xc6,\n  0xe3, 0x31, 0x55, 0x1b, 0x62, 0x69, 0xaf, 0xc7,\n  0x92, 0x9c, 0x7b, 0x66, 0x2c, 0x6e, 0x5b, 0xf6,\n  0x69, 0x11, 0xf6, 0xaa, 0x1c, 0x29, 0xa4, 0x87,\n  0xdb, 0xe7, 0x74, 0xe6, 0x14, 0x1e, 0x1a, 0xab,\n  0xdd, 0x95, 0x62, 0x7a, 0x68, 0xac, 0x82, 0xff,\n  // juliet\n  0x61, 0x5d, 0x96, 0x49, 0x34, 0xd2, 0x06, 0x60,\n  0xc7, 0x90, 0x0c, 0x8c, 0x66, 0xf6, 0x15, 0x22,\n  0x4d, 0x37, 0xaa, 0x6a, 0xc8, 0x2c, 0x6d, 0xcd,\n  0x28, 0xb2, 0x15, 0x8b, 0xe4, 0x35, 0xb3, 0x68,\n  0x79, 0x51, 0xe6, 0xda, 0x9c, 0xbe, 0x15, 0x43,\n  0x89, 0xf0, 0xa2, 0xdb, 0x95, 0x77, 0xa7, 0xa6,\n  0x66, 0x49, 0x77, 0xb1, 0x9a, 0x9e, 0x0a, 0xd5,\n  0x75, 0xeb, 0xee, 0xf6, 0xb0, 0xc6, 0xe6, 0x83,\n  0xd2, 0xe3, 0xeb, 0x5e, 0xd7, 0xda, 0x5c, 0x48,\n  0x87, 0x6d, 0x9e, 0x7b, 0xdf, 0xf3, 0x89, 0x40,\n  0x11, 0xca, 0x5d, 0x44, 0x36, 0x00, 0x38, 0x60,\n  0xea, 0x8c, 0x00, 0x2c, 0xb3, 0x6d, 0x01, 0x01,\n  0x14, 0x5f, 0x8e, 0x01, 0xf8,\n  // kilo\n  0x06, 0xe8, 0x12, 0xd9, 0x02, 0x12, 0x68, 0xee,\n  0x8c, 0x86, 0xd4, 0xf5, 0x76, 0x7a, 0xd3, 0x1d,\n  0xee, 0x74, 0x4a, 0x54, 0x1e, 0x6f, 0xfa, 0x2b,\n  0x5c, 0xdc, 0x42, 0x93, 0xb2, 0xed, 0x66, 0xb5,\n  0x95, 0x7b, 0x8e, 0x53, 0xdf, 0x3d, 0xac, 0xa1,\n  0xb0, 0xcc, 0x2a, 0xee, 0xbb, 0xa7, 0xb6, 0x24,\n  0x53, 0xd9, 0x4a, 0x7d, 0xfb, 0x52, 0x36, 0x1f,\n  0x2b, 0x1b, 0x75, 0x4d, 0xdc, 0xe2, 0x1e, 0x8e,\n  0xa0, 0xa6, 0x32, 0xc8, 0xaf, 0xbb, 0x92, 0x18,\n  0xaf, 0x20, 0x7d, 0xf0,\n  // lima\n  0xa1, 0x5f, 0x90, 0xba, 0xc0, 0xd7, 0xa6, 0x7e,\n  0x00, 0x19, 0x85, 0x6a, 0xda, 0xca, 0xcd, 0x24,\n  0xd9, 0xcc, 0xcb, 0x4a, 0x47, 0x76, 0x66, 0xf5,\n  0x37, 0x3b, 0x9e, 0xe1, 0x88, 0x7a, 0x50, 0xd4,\n  0x8e, 0xd9, 0x3d, 0xad, 0x45, 0x2b, 0xb3, 0x62,\n  0xee, 0xf4, 0xb8, 0xb5, 0xac, 0xf5, 0xa8, 0x1b,\n  0xaf, 0xcc, 0xa2, 0xce, 0xbb, 0xdd, 0xcb, 0xd8,\n  0xb2, 0xda, 0xc8, 0xd0, 0x55, 0xfd, 0xac, 0x57,\n  0xbd, 0xe0, 0xff,\n  // mike\n  0x66, 0x31, 0x3c, 0x7c, 0x52, 0xe3, 0xc4, 0x69,\n  0xf5, 0x85, 0x57, 0x86, 0x51, 0xaa, 0xd3, 0x56,\n  0x75, 0xa1, 0x69, 0x9d, 0x6f, 0x7d, 0xca, 0x6a,\n  0x57, 0x23, 0x6d, 0xf5, 0xcd, 0x57, 0xd1, 0x4b,\n  0x50, 0x78, 0x2c, 0xda, 0x75, 0x69, 0x46, 0x77,\n  0xb4, 0xce, 0xdb, 0xb1, 0x45, 0xad, 0x08, 0xe5,\n  0x2e, 0x22, 0x1b, 0x00, 0x18, 0xd0, 0x3c, 0x91,\n  0x03, 0x5a, 0x09, 0xb1, 0x80, 0x00, 0xb2, 0x13,\n  0x86, 0xff,\n  // november\n  0x66, 0x2c, 0x02, 0x62, 0x4b, 0xe3, 0x8e, 0xa1,\n  0xeb, 0x10, 0x77, 0x6e, 0xb3, 0xb2, 0x2a, 0x2a,\n  0x39, 0x74, 0xcb, 0x4a, 0x0b, 0xcb, 0xb2, 0xe4,\n  0xae, 0x2b, 0x4d, 0xbc, 0xdb, 0x9c, 0xfa, 0xb6,\n  0x2c, 0x8a, 0x29, 0x33, 0xee, 0x93, 0xf2, 0xa0,\n  0xa6, 0xc4, 0xb9, 0x55, 0xa8, 0x92, 0xa8, 0x54,\n  0xa7, 0xc4, 0xae, 0x1d, 0x32, 0xcc, 0x54, 0x2d,\n  0xb7, 0xb1, 0xa9, 0x72, 0x53, 0x51, 0xbc, 0xb2,\n  0xe2, 0x53, 0x2c, 0xb4, 0xf5, 0x4a, 0x8b, 0x2b,\n  0xb5, 0xd2, 0xd5, 0x2b, 0x2d, 0xa6, 0xd4, 0xda,\n  0x5a, 0xaf, 0x34, 0xfb, 0x32, 0x2b, 0x4b, 0xd3,\n  0xd2, 0x14, 0xdc, 0xda, 0xc8, 0x4e, 0xc9, 0x52,\n  0x24, 0x6b, 0x53, 0xb9, 0xaa, 0xf5, 0x51, 0xb5,\n  0x42, 0xe9, 0x31, 0xc0, 0x9b, 0xb0, 0xd4, 0xa7,\n  0xa6, 0xd4, 0x85, 0x6f, 0xca, 0x58, 0xc2, 0x0a,\n  0x2e, 0xe6, 0x6b, 0x6b, 0x89, 0xc3, 0xb4, 0xd8,\n  0x2f, 0x6d, 0x25, 0x0d, 0xd3, 0x52, 0xdf, 0x74,\n  0x14, 0xdf, 0x44, 0x47, 0xfb, 0xd2, 0x51, 0x72,\n  0xa2, 0x1e, 0x75, 0x09, 0x47, 0x89, 0x8d, 0x7c,\n  0xb4, 0x07, 0xfe,\n  // oscar\n  0xab, 0xcd, 0xe2, 0xb2, 0x42, 0x3a, 0xdf, 0xe2,\n  0xa6, 0x27, 0x49, 0xae, 0x7d, 0xc4, 0x17, 0xb7,\n  0x38, 0x45, 0xaf, 0xa4, 0xb6, 0x6d, 0x80, 0x03,\n  0xd8, 0x0c, 0xf0, 0xa7, 0x9b, 0x07, 0x3c, 0xe0,\n  0x80, 0xeb, 0xb5, 0x11, 0x38, 0x45, 0xa9, 0x0a,\n  0xd5, 0x00, 0x02, 0x34, 0x75, 0x65, 0xe6, 0xa6,\n  0xae, 0xa2, 0x34, 0x6e, 0xaa, 0x8b, 0x9b, 0x24,\n  0x13, 0xa5, 0xad, 0xca, 0xa9, 0xc8, 0x86, 0xf3,\n  0xce, 0x7a, 0x76, 0x6d, 0xcc, 0xcd, 0xb0, 0x5a,\n  0x7a, 0xcf, 0xb9, 0x2e, 0x75, 0x4b, 0x47, 0x89,\n  0x83, 0x3a, 0xa9, 0x37, 0xdf, 0xe1, 0x29, 0xad,\n  0x48, 0x87, 0xb3, 0xc0, 0xff,\n  // papa\n  0x0a, 0x28, 0x56, 0xb9, 0xe5, 0x45, 0x55, 0x84,\n  0x49, 0xcc, 0x93, 0x67, 0xd7, 0x19, 0x26, 0x4b,\n  0x4e, 0x91, 0xdd, 0x44, 0xba, 0xae, 0xbe, 0xc5,\n  0x2c, 0x10, 0x24, 0x42, 0xb9, 0x8b, 0xc8, 0x06,\n  0x60, 0x80, 0xf1, 0xe9, 0xab, 0xc9, 0xa6, 0x23,\n  0xd4, 0x36, 0xdf, 0xe9, 0xcc, 0x55, 0x74, 0x86,\n  0x6b, 0x9f, 0x71, 0x66, 0xbd, 0xe1, 0xe6, 0xbb,\n  0xdb, 0x9f, 0x53, 0x45, 0x88, 0xcf, 0xae, 0x3f,\n  0xfc,\n  // quebec\n  0x0c, 0x88, 0x7e, 0x8c, 0x02, 0xa5, 0x0c, 0x31,\n  0xdd, 0x5c, 0xb2, 0xac, 0x3a, 0x5b, 0xcf, 0x4c,\n  0xee, 0xbb, 0xbb, 0xde, 0xa5, 0xcd, 0xa8, 0xb4,\n  0x75, 0x4d, 0x1c, 0xb7, 0xd1, 0xd5, 0x28, 0xee,\n  0xe6, 0x5b, 0x76, 0x73, 0xea, 0x1a, 0xc4, 0x33,\n  0xf3, 0xf1, 0xad, 0x77, 0x37, 0xa7, 0xb6, 0xb6,\n  0xec, 0x12, 0x91, 0x9b, 0xf2, 0x8e, 0x40, 0x11,\n  0xca, 0x5d, 0x44, 0x36, 0x80, 0x00, 0x7a, 0x2f,\n  0x53, 0x40, 0x2d, 0x24, 0x14, 0x80, 0xff,\n  // romeo\n  0x22, 0xd7, 0x39, 0x38, 0xca, 0xec, 0xdb, 0xbe,\n  0xb4, 0xa1, 0x98, 0x5a, 0xb9, 0xf2, 0x53, 0x46,\n  0x6f, 0xe9, 0x69, 0xca, 0x4e, 0xd6, 0x89, 0x57,\n  0x0e, 0x69, 0x3f, 0x71, 0x61, 0xd9, 0x95, 0x98,\n  0x65, 0x87, 0x25, 0x6c, 0x86, 0x64, 0x4c, 0xac,\n  0xf5, 0xf8, 0xa4, 0xcd, 0x86, 0x7a, 0xd0, 0xe6,\n  0x55, 0x4f, 0xd7, 0x02, 0xa5, 0x7b, 0x76, 0xbd,\n  0xdb, 0xdd, 0xaf, 0xa1, 0xaa, 0x54, 0x1d, 0xdb,\n  0xb2, 0xa6, 0xec, 0xc3, 0xd3, 0x64, 0x73, 0x99,\n  0x62, 0xc8, 0x2c, 0xd5, 0xdf, 0x69, 0x09, 0xa1,\n  0x33, 0xd8, 0xf2, 0xe6, 0x25, 0xae, 0x6e, 0x0f,\n  0xb6, 0xb2, 0x54, 0xdc, 0xf8, 0x1d, 0xfe,\n  // sierra\n  0x0c, 0xf8, 0xad, 0x54, 0x03, 0x06, 0xf8, 0x2d,\n  0xd5, 0x01, 0xbf, 0x94, 0x39, 0xe0, 0xe7, 0x32,\n  0x0b, 0xb4, 0xb0, 0x3b, 0x25, 0x75, 0x5f, 0xbd,\n  0xe2, 0x11, 0x0d, 0x39, 0x63, 0xf5, 0x48, 0x46,\n  0x34, 0xe0, 0xea, 0x4d, 0x23, 0x1d, 0x49, 0x91,\n  0xbb, 0x56, 0x8d, 0x6c, 0x78, 0x45, 0xd9, 0x7c,\n  0xb2, 0xf2, 0xe1, 0x9c, 0x78, 0xe2, 0xf1, 0xc9,\n  0x87, 0x09, 0x92, 0xb1, 0xd7, 0x27, 0x6b, 0x2e,\n  0xd9, 0xc7, 0x5e, 0x9f, 0xac, 0x84, 0xe4, 0x1c,\n  0x79, 0xbd, 0xd2, 0xd4, 0xc4, 0xb2, 0x79, 0xcd,\n  0xc8, 0x52, 0x97, 0xf0, 0xa6, 0x3c, 0xa3, 0x4c,\n  0x53, 0xc3, 0x9a, 0xf2, 0x8c, 0x26, 0x55, 0x0b,\n  0x1d, 0xea, 0xb3, 0xa6, 0x14, 0x3d, 0x2d, 0x35,\n  0xcf, 0x99, 0xb2, 0x1b, 0xf3, 0xd0, 0x3e, 0x6b,\n  0x29, 0x7a, 0xdc, 0x53, 0x36, 0x8f, 0x35, 0xc5,\n  0xd6, 0x70, 0x7f, 0xd5, 0xf6, 0x14, 0xdb, 0xc2,\n  0x7c, 0x55, 0x39, 0x73, 0x4c, 0x2f, 0xf1, 0x97,\n  0xe9, 0xca, 0x6a, 0xb5, 0xc2, 0x76, 0x96, 0x2b,\n  0x87, 0xd2, 0xd2, 0x58, 0x09, 0xff,\n  // tango\n  0x0e, 0xd8, 0x5c, 0xcd, 0x03, 0xcb, 0x2b, 0xd9,\n  0xd4, 0x23, 0x2b, 0xad, 0xa8, 0x26, 0x57, 0x8f,\n  0x58, 0xb2, 0xe2, 0x56, 0x5c, 0x2d, 0x63, 0xf6,\n  0x8a, 0x5b, 0x36, 0xf5, 0xcc, 0x59, 0x2b, 0x6e,\n  0x91, 0xb5, 0xdb, 0x42, 0xb7, 0xa4, 0x5a, 0xea,\n  0x34, 0x57, 0x5d, 0xb2, 0x62, 0x68, 0x5c, 0x55,\n  0xb5, 0x2b, 0xa2, 0xa2, 0x09, 0x13, 0xa7, 0xa5,\n  0xad, 0x2a, 0x98, 0x53, 0x56, 0x8f, 0xbe, 0xb2,\n  0x30, 0x19, 0xdd, 0xb3, 0xfa, 0x22, 0xcb, 0xa4,\n  0xb4, 0xeb, 0xe8, 0xb2, 0xea, 0x90, 0x92, 0x2e,\n  0x6d, 0x0a, 0xbe, 0xc3, 0x52, 0x3a, 0xa7, 0x35,\n  0xc4, 0x0a, 0x4b, 0xd9, 0x5b, 0xf6, 0x50, 0x32,\n  0x3c, 0xa4, 0x73, 0xb8, 0x43, 0x0b, 0x37, 0x93,\n  0xd5, 0xe6, 0xf6, 0x35, 0xdd, 0x95, 0x7f, 0xab,\n  0xdb, 0x87, 0xf2, 0x34, 0xde, 0x07, 0xff,\n  // uniform\n  0xa1, 0x3f, 0x56, 0x98, 0xd4, 0xb6, 0xe6, 0xae,\n  0xd5, 0xc7, 0xa8, 0x01, 0xc5, 0xda, 0x53, 0x2d,\n  0x97, 0x06, 0x12, 0xd9, 0x4f, 0xdc, 0x6d, 0x30,\n  0xa6, 0x65, 0xdf, 0x61, 0xf3, 0x8b, 0x11, 0xcf,\n  0xe0, 0xae, 0xc9, 0xcf, 0x4e, 0x5d, 0x38, 0xea,\n  0x75, 0xff, 0x04, 0x45, 0x47, 0x84, 0xca, 0xe6,\n  0x1d, 0xf7, 0x8c, 0x01, 0xcd, 0x97, 0x6a, 0x40,\n  0x03, 0x1a, 0x28, 0x45, 0xd0, 0xdb, 0x61, 0xec,\n  0x7d, 0x17, 0xbb, 0x3e, 0x4d, 0x16, 0xdb, 0x9a,\n  0xea, 0xf5, 0x76, 0xab, 0x2f, 0x6a, 0x43, 0x46,\n  0xbc, 0xcd, 0xb9, 0x6d, 0xd9, 0xb5, 0xda, 0x70,\n  0xdf, 0xb2, 0xe6, 0x94, 0xea, 0xcd, 0x9d, 0xdd,\n  0x9a, 0xbc, 0x73, 0xa9, 0x28, 0x35, 0x5b, 0x12,\n  0x41, 0xe1, 0x96, 0xd4, 0x6d, 0x4d, 0x24, 0xa7,\n  0x8a, 0x94, 0xb8, 0xfb, 0x3d, 0x1c, 0xcd, 0x76,\n  0x78, 0x50, 0xea, 0x78, 0xc0, 0xff,\n  // victor\n  0xae, 0x6f, 0x52, 0x55, 0xcd, 0xdd, 0xa8, 0xb9,\n  0x72, 0x55, 0x95, 0x70, 0xe3, 0xe6, 0xe9, 0xdd,\n  0xd4, 0x84, 0x4e, 0x99, 0xa7, 0x4b, 0x0b, 0x65,\n  0xa5, 0x2b, 0x6c, 0x2e, 0x4d, 0x42, 0xb6, 0xac,\n  0xa8, 0xdb, 0x12, 0x49, 0x5d, 0xbd, 0xe2, 0x1e,\n  0x02, 0x2d, 0x6c, 0x35, 0x30, 0xa0, 0x72, 0x46,\n  0x04, 0x4e, 0x51, 0xaa, 0x42, 0x35, 0x00, 0x40,\n  0x01, 0x33, 0x49, 0x3a, 0x60, 0x5a, 0xf1, 0xd2,\n  0x95, 0x6c, 0x2c, 0x2d, 0x5d, 0x5a, 0x9f, 0x63,\n  0x21, 0x9f, 0xe6, 0x2f, 0x73, 0x29, 0x4d, 0xbc,\n  0x94, 0xaf, 0x2d, 0xa5, 0x34, 0xf1, 0x72, 0xb6,\n  0xb4, 0x94, 0xba, 0x82, 0xc3, 0xfe, 0xcb, 0x5a,\n  0x46, 0x93, 0x34, 0xe5, 0x2b, 0x5b, 0xe9, 0x85,\n  0x5a, 0xe2, 0xc7, 0xed, 0xe5, 0x0a, 0xa7, 0x4b,\n  0x27, 0xf8,\n  // whiskey\n  0x04, 0x88, 0xae, 0x8c, 0x03, 0x12, 0x08, 0x5e,\n  0x74, 0x65, 0xe9, 0xec, 0x68, 0x04, 0x59, 0x46,\n  0x78, 0x41, 0xd7, 0xe3, 0x37, 0x6d, 0x62, 0xc3,\n  0x5b, 0xaf, 0xdf, 0xc2, 0xea, 0x54, 0xd2, 0xe3,\n  0x89, 0x01, 0x7e, 0x2b, 0xf7, 0x80, 0x07, 0x14,\n  0xd0, 0xe5, 0x15, 0x38, 0x60, 0x8c, 0x70, 0x03,\n  0x04, 0x29, 0x36, 0xaa, 0x5e, 0x14, 0x34, 0x72,\n  0xf6, 0xa8, 0xa6, 0x6f, 0x82, 0xf4, 0x2d, 0xb3,\n  0xeb, 0x4b, 0x5a, 0x67, 0x6a, 0xc0, 0xf0, 0x2f,\n  0x71, 0x4f, 0xc7, 0xa8, 0x8a, 0x1c, 0xb9, 0xd8,\n  0xdf, 0xee, 0x1e, 0xbb, 0x59, 0xd0, 0xd6, 0xc2,\n  0xff,\n  // xray\n  0x2b, 0xae, 0xde, 0xb4, 0x62, 0x66, 0x9f, 0xb0,\n  0x75, 0x73, 0xd3, 0x6e, 0x72, 0xfc, 0x56, 0x54,\n  0xcb, 0xba, 0xb6, 0x01, 0x92, 0xc7, 0x26, 0x40,\n  0x4b, 0x43, 0x0c, 0xc8, 0x29, 0xc5, 0x01, 0xcf,\n  0xb8, 0x1a, 0xe0, 0xa7, 0x14, 0x07, 0xfc, 0x56,\n  0xea, 0x01, 0x05, 0x98, 0x60, 0x5a, 0x92, 0xd4,\n  0x29, 0xb5, 0xb8, 0xeb, 0xc8, 0x52, 0x17, 0xb3,\n  0x96, 0x6e, 0x23, 0x2f, 0x29, 0x54, 0x5b, 0xf6,\n  0x8d, 0xae, 0xa9, 0x32, 0x5e, 0xdb, 0x37, 0xfa,\n  0xa1, 0xdb, 0xb1, 0x74, 0xcb, 0x68, 0xbb, 0x49,\n  0x91, 0xf6, 0xcd, 0x63, 0x1e, 0x3a, 0x85, 0x3a,\n  0x56, 0xb7, 0x79, 0x98, 0x62, 0xea, 0xf8, 0xdc,\n  0xf6, 0x9e, 0x83, 0xd4, 0xe3, 0x49, 0x38, 0x7a,\n  0x71, 0x54, 0xaf, 0xd9, 0xe1, 0xe8, 0x53, 0x55,\n  0xb8, 0xe7, 0xc2, 0xff,\n  // yankee\n  0x6e, 0xe8, 0x42, 0x58, 0xb6, 0x6b, 0xa7, 0x61,\n  0x68, 0x25, 0xcc, 0x59, 0xb4, 0x86, 0x11, 0x82,\n  0xc8, 0x6a, 0xf1, 0x2a, 0x47, 0x2e, 0x12, 0x8d,\n  0x37, 0x27, 0xef, 0xc9, 0xc9, 0xa3, 0x6e, 0x9f,\n  0x6c, 0xd4, 0x22, 0x73, 0x7f, 0xb4, 0x92, 0x51,\n  0x0b, 0x2d, 0x62, 0xe2, 0x48, 0x46, 0x43, 0xd7,\n  0x2e, 0x29, 0x2e, 0x4b, 0x92, 0xaa, 0x28, 0x5c,\n  0x8b, 0xa6, 0x6a, 0xeb, 0x24, 0x95, 0xe3, 0x80,\n  0x1d, 0x93, 0x35, 0x90, 0xf2, 0x59, 0x03, 0x45,\n  0xb3, 0x75, 0x29, 0x47, 0x27, 0x96, 0x98, 0xc5,\n  0x65, 0x18, 0xcd, 0x88, 0xbc, 0x16, 0xd7, 0x21,\n  0xad, 0x63, 0x10, 0x49, 0x6e, 0xed, 0xb8, 0xf9,\n  0x1d, 0xfe,\n  // zulu\n  0x6d, 0xf8, 0xde, 0xc4, 0xc4, 0xe8, 0x29, 0x60,\n  0x00, 0x2e, 0x0f, 0x9c, 0x78, 0x29, 0x71, 0x2a,\n  0x4e, 0x77, 0xc3, 0x15, 0x74, 0x2a, 0xae, 0xc3,\n  0xce, 0x76, 0x30, 0xc2, 0xa5, 0x44, 0x78, 0xd1,\n  0x6d, 0x4f, 0x46, 0x39, 0xb8, 0xbb, 0x07, 0xf6,\n  0x5b, 0x6d, 0x91, 0x6e, 0xa9, 0xf2, 0x65, 0xf4,\n  0xc9, 0x98, 0x97, 0x69, 0x9f, 0x3a, 0xe7, 0x2d,\n  0x6c, 0xc1, 0x9a, 0x8f, 0xca, 0xde, 0x70, 0x04,\n  0x9d, 0xee, 0xc9, 0x79, 0xe2, 0xe1, 0x1f, 0xf8\n};\n\n/* extern */\nconst uint8_t FLASHMEM bank_4[] = {\n  // analog\n  0xa7, 0xa8, 0x51, 0xc3, 0x3b, 0xa4, 0x9c, 0xbc,\n  0x66, 0x73, 0x8f, 0xb2, 0x73, 0xf2, 0x1a, 0x35,\n  0xbc, 0x52, 0xf6, 0x49, 0x6b, 0x32, 0xf3, 0x48,\n  0xc9, 0x27, 0xa9, 0x5e, 0xd3, 0x3a, 0x64, 0x9f,\n  0xa4, 0x78, 0x75, 0x8f, 0xb2, 0x72, 0xd2, 0x6c,\n  0xa4, 0x35, 0x43, 0xce, 0xc8, 0x82, 0xd6, 0xd6,\n  0x30, 0x27, 0x2d, 0xf3, 0x5a, 0x5b, 0x22, 0x92,\n  0x8e, 0xdc, 0x1b, 0x6d, 0x33, 0x73, 0xb2, 0x0a,\n  0x6f, 0x23, 0x4d, 0xcd, 0xf1, 0xa8, 0x7c, 0x8d,\n  0x20, 0xcb, 0xd4, 0xa3, 0xf6, 0x35, 0x9d, 0x25,\n  0x13, 0xb7, 0xda, 0xc6, 0x35, 0x96, 0x98, 0xda,\n  0x3a, 0x67, 0xce, 0x59, 0x7c, 0xce, 0xe8, 0x6c,\n  0x58, 0x67, 0xae, 0x2a, 0xa7, 0x8b, 0x6e, 0x53,\n  0x39, 0xa3, 0x9d, 0x3e, 0xba, 0x4d, 0xa5, 0x1a,\n  0x7d, 0xfa, 0x18, 0x36, 0x94, 0xab, 0xca, 0xe9,\n  0x93, 0xbb, 0x50, 0xce, 0x51, 0x67, 0x48, 0xe1,\n  0xc2, 0x38, 0xc7, 0x9c, 0x21, 0xf9, 0x0b, 0x15,\n  0x9f, 0x7c, 0xc6, 0x58, 0x56, 0xcd, 0x7c, 0xf2,\n  0x19, 0x93, 0xbb, 0x30, 0xd3, 0xd9, 0x67, 0x2c,\n  0x66, 0x32, 0x54, 0xe6, 0x9c, 0xb9, 0xa8, 0x8a,\n  0x52, 0x99, 0x7d, 0xd6, 0x22, 0x53, 0x8b, 0x65,\n  0x4e, 0xd9, 0xa2, 0x35, 0x4b, 0xa8, 0xb9, 0x6a,\n  0x83, 0xc9, 0x4f, 0xd4, 0xed, 0x98, 0x0d, 0xa6,\n  0x9a, 0x64, 0x89, 0xac, 0x00, 0x27, 0x78, 0x08,\n  0x20, 0x04, 0x1d, 0x00, 0xc0, 0xff,\n  // circuit\n  0x0c, 0x98, 0xb2, 0x4d, 0x00, 0x47, 0x85, 0x0b,\n  0xe0, 0xe8, 0x0c, 0x03, 0xbc, 0x90, 0xe1, 0x80,\n  0x6f, 0xdd, 0x03, 0x70, 0xb5, 0x79, 0x01, 0x2a,\n  0x51, 0x3f, 0x65, 0x72, 0xea, 0xe9, 0x19, 0xfb,\n  0x94, 0x29, 0x8a, 0x57, 0x58, 0xa3, 0x53, 0xa5,\n  0x42, 0x5e, 0x6e, 0x8d, 0x4f, 0x95, 0x0a, 0xeb,\n  0x38, 0x2f, 0x59, 0x75, 0xac, 0xa4, 0x6b, 0x32,\n  0x65, 0xd4, 0x79, 0x62, 0x0c, 0xc6, 0xe8, 0xd6,\n  0xe6, 0x8d, 0x3e, 0x14, 0xb3, 0x08, 0xc0, 0x13,\n  0x36, 0x01, 0x54, 0xc1, 0x02, 0x05, 0x54, 0xa3,\n  0x62, 0x80, 0x20, 0x25, 0x4f, 0xdf, 0x2d, 0x8b,\n  0x67, 0x46, 0x3e, 0x43, 0x73, 0x22, 0x9a, 0x59,\n  0xe7, 0xcc, 0xcd, 0x8a, 0x5a, 0x66, 0xe5, 0xb3,\n  0x34, 0x2f, 0x66, 0x59, 0x55, 0xcf, 0x5a, 0x3d,\n  0xbb, 0x57, 0x85, 0x3d, 0x6b, 0x35, 0x62, 0x11,\n  0x55, 0xf9, 0x6c, 0xd5, 0xa8, 0x46, 0x56, 0xe9,\n  0xb6, 0x44, 0x61, 0xd5, 0x69, 0xa6, 0x08, 0xe0,\n  0x70, 0x0c, 0x01, 0x06, 0xa6, 0x6a, 0xf1, 0xf6,\n  0xa6, 0x91, 0x11, 0x6b, 0xc5, 0x4b, 0xa9, 0x79,\n  0x66, 0x64, 0xa3, 0x36, 0x11, 0xdc, 0x5d, 0xb5,\n  0x00, 0x00, 0xfe,\n  // clock\n  0xa0, 0x80, 0x72, 0x35, 0x14, 0x90, 0x36, 0xa5,\n  0x01, 0xf2, 0x75, 0x35, 0x40, 0x32, 0x4b, 0x06,\n  0x88, 0xba, 0x59, 0x01, 0xca, 0xb6, 0xb6, 0xda,\n  0x84, 0x35, 0xd5, 0xb4, 0x57, 0x6a, 0x53, 0xc7,\n  0x58, 0xc7, 0x4e, 0xab, 0x5c, 0x2b, 0x32, 0x6d,\n  0x6b, 0xa3, 0xf2, 0x23, 0x54, 0xb5, 0x9d, 0xac,\n  0x2a, 0xce, 0x0c, 0xf1, 0x55, 0xba, 0x9a, 0xb8,\n  0x22, 0x39, 0x47, 0xf1, 0xe9, 0xe2, 0x8c, 0xe4,\n  0x6c, 0xc5, 0x67, 0x88, 0xdb, 0x4b, 0x3a, 0x9c,\n  0xac, 0x39, 0x1e, 0x0f, 0xf7, 0x92, 0xd3, 0xb6,\n  0x58, 0x23, 0x95, 0xc3, 0x4a, 0x3b, 0x73, 0x8a,\n  0x72, 0x0a, 0xcb, 0xe3, 0xaf, 0xc9, 0x26, 0x38,\n  0x22, 0x1b, 0x20, 0x78, 0x11, 0x01, 0x04, 0xaf,\n  0x44, 0x80, 0x10, 0x04, 0x08, 0x10, 0xb3, 0x12,\n  0x01, 0x1c, 0x77, 0x41, 0x7e, 0x13, 0x6e, 0x51,\n  0x9e, 0xb8, 0xf8, 0xb5, 0xb5, 0x86, 0x7b, 0x9c,\n  0xe6, 0xb7, 0xde, 0xe4, 0xee, 0x75, 0x14, 0x50,\n  0x92, 0xa9, 0x02, 0x6a, 0x61, 0x61, 0x40, 0x89,\n  0xcc, 0x04, 0x48, 0x5a, 0x89, 0x00, 0xd1, 0x08,\n  0x03, 0x00, 0xfc,\n  // control\n  0x50, 0x82, 0xda, 0x56, 0x32, 0x3d, 0xce, 0x09,\n  0x5a, 0x38, 0xb1, 0x72, 0xcb, 0x27, 0x69, 0x75,\n  0x4d, 0x4d, 0x93, 0x9e, 0xb2, 0x06, 0x55, 0x57,\n  0xaf, 0x75, 0x9a, 0x1a, 0x45, 0x2d, 0x22, 0xd6,\n  0x69, 0x6a, 0x10, 0x55, 0x8f, 0xc6, 0xa7, 0xa9,\n  0x96, 0x9c, 0x23, 0x13, 0xae, 0x36, 0x4a, 0xca,\n  0xf0, 0xb2, 0x3d, 0x9a, 0xa8, 0xa8, 0x2c, 0xda,\n  0xd1, 0x68, 0x82, 0xe4, 0xd4, 0x1c, 0x45, 0xa3,\n  0x89, 0x9a, 0x9d, 0xa7, 0x1d, 0xb5, 0xc6, 0x2b,\n  0x09, 0xed, 0x95, 0x33, 0x9a, 0xa2, 0xd0, 0x2c,\n  0x33, 0x69, 0x00, 0x66, 0x11, 0x0a, 0xc0, 0x9c,\n  0x1d, 0x09, 0x98, 0x7d, 0x3c, 0x01, 0xbd, 0xa7,\n  0x25, 0xa0, 0xd7, 0xb4, 0x00, 0xb4, 0x14, 0x71,\n  0xd2, 0x16, 0xc2, 0x55, 0x55, 0xee, 0x49, 0x63,\n  0xe1, 0xb0, 0x30, 0xb7, 0x27, 0x8b, 0x5d, 0xd2,\n  0x4c, 0xd2, 0x9e, 0x22, 0x36, 0x69, 0x31, 0x69,\n  0xbd, 0xca, 0x30, 0x2c, 0xc5, 0xb4, 0xd5, 0xa9,\n  0x43, 0xcb, 0x10, 0xd3, 0x4e, 0xa7, 0x0d, 0xa5,\n  0x43, 0x55, 0x56, 0x9d, 0x2e, 0xe4, 0x09, 0x76,\n  0x5d, 0xb8, 0xfa, 0x90, 0x36, 0xc9, 0x75, 0xd5,\n  0xea, 0x43, 0xda, 0x24, 0xd7, 0x55, 0x63, 0xf0,\n  0x75, 0x9c, 0xdc, 0x66, 0xb6, 0xd1, 0x5f, 0x17,\n  0xa9, 0x2a, 0xdc, 0x46, 0x77, 0x43, 0xa4, 0xb2,\n  0x50, 0x99, 0xdc, 0x09, 0x92, 0xf1, 0xd0, 0x65,\n  0xf2, 0x7d, 0x0c, 0xcb, 0x4b, 0x95, 0xd9, 0xcd,\n  0x36, 0xf2, 0xa8, 0x99, 0x16, 0xdb, 0x46, 0xa1,\n  0xa2, 0x66, 0x5a, 0x6c, 0xda, 0x00, 0xf3, 0x59,\n  0x69, 0x35, 0x71, 0x0b, 0xcc, 0x6b, 0x13, 0x00,\n  0x6f, 0x67, 0x00, 0xf8,\n  // digital\n  0x20, 0x80, 0xc4, 0x6c, 0x4e, 0xb6, 0x9c, 0xb2,\n  0x69, 0xc6, 0x39, 0x79, 0x77, 0xc2, 0x1a, 0x13,\n  0xe7, 0xe4, 0xdd, 0x2a, 0x9b, 0x77, 0x95, 0x93,\n  0x37, 0xab, 0xe4, 0x59, 0x95, 0x4f, 0xde, 0xad,\n  0x91, 0x46, 0x4d, 0x3e, 0x79, 0xb7, 0xca, 0xea,\n  0x5d, 0xa5, 0xe5, 0x99, 0xb3, 0x67, 0x56, 0xa0,\n  0x50, 0x1a, 0xe6, 0x95, 0x13, 0x42, 0x52, 0x59,\n  0x31, 0x46, 0x75, 0xd7, 0x6e, 0xe9, 0x72, 0xca,\n  0xa4, 0x9e, 0x24, 0x00, 0x8d, 0xa2, 0x25, 0xa0,\n  0x10, 0x8c, 0xd3, 0x8c, 0xa0, 0x2a, 0x66, 0xad,\n  0x4e, 0x57, 0xa4, 0x9a, 0x65, 0xa5, 0x3a, 0x5d,\n  0x51, 0xe2, 0xd2, 0xde, 0x38, 0x00, 0x2a, 0x50,\n  0x05, 0x40, 0x46, 0xee, 0xd5, 0x87, 0x2c, 0xa1,\n  0x13, 0x8e, 0xcf, 0xe0, 0x93, 0xa6, 0x79, 0xd4,\n  0x5e, 0x83, 0xef, 0x6a, 0xd6, 0x19, 0x65, 0x0d,\n  0x3e, 0xa7, 0x71, 0x65, 0xa5, 0x31, 0xf8, 0xe1,\n  0xa2, 0x5d, 0x61, 0xd7, 0x10, 0x52, 0x05, 0x79,\n  0x8d, 0x5e, 0x63, 0xb4, 0x5d, 0x24, 0x7e, 0x7b,\n  0x8d, 0xd1, 0x75, 0x13, 0xfb, 0xec, 0x35, 0x46,\n  0x37, 0xc5, 0xec, 0x93, 0xc6, 0x14, 0xec, 0x34,\n  0x71, 0x4c, 0x19, 0x53, 0x70, 0xd3, 0xc8, 0x39,\n  0xa6, 0x4c, 0xc1, 0xcd, 0x20, 0xe7, 0x59, 0x00,\n  0x80, 0xff,\n  // electronic\n  0xa7, 0xef, 0xd2, 0xc5, 0xdd, 0x2b, 0x9f, 0xbe,\n  0x78, 0x17, 0xaf, 0x8a, 0x72, 0xba, 0x62, 0x5d,\n  0xcd, 0xb3, 0xcc, 0xe9, 0xb2, 0xf6, 0x50, 0xab,\n  0x29, 0xab, 0x8f, 0xdc, 0xd3, 0x35, 0xa6, 0x8e,\n  0x3e, 0xd0, 0x0e, 0x33, 0x1f, 0xd3, 0x3a, 0x4f,\n  0x36, 0xb9, 0xa2, 0x76, 0xeb, 0x3c, 0x5d, 0x97,\n  0x88, 0x29, 0xab, 0x0d, 0x36, 0xcd, 0x6c, 0xc2,\n  0x9e, 0x36, 0x79, 0x37, 0x8d, 0x91, 0x72, 0xda,\n  0x1c, 0xdd, 0xb5, 0x46, 0xca, 0x69, 0x4b, 0x32,\n  0xf7, 0x6a, 0xd9, 0xa7, 0x2d, 0x51, 0xc3, 0xb2,\n  0x2c, 0x9f, 0xa6, 0x26, 0x0e, 0x89, 0x92, 0x1d,\n  0xea, 0xec, 0xd5, 0x53, 0xdd, 0x32, 0xa9, 0x9b,\n  0x32, 0xcd, 0x8a, 0x34, 0x0a, 0x68, 0x8e, 0x95,\n  0x01, 0x99, 0x53, 0x10, 0x20, 0x11, 0x0a, 0x07,\n  0x34, 0xa3, 0x9d, 0x80, 0x55, 0xd3, 0x13, 0x30,\n  0xfa, 0x54, 0x02, 0x5a, 0xeb, 0x4c, 0x40, 0x8e,\n  0x6c, 0x27, 0xcf, 0x8d, 0xdd, 0xd3, 0xec, 0x9c,\n  0x22, 0x35, 0xae, 0x70, 0x4d, 0x73, 0x8a, 0xd4,\n  0xb4, 0xcd, 0xad, 0xc9, 0x29, 0x52, 0xf5, 0x76,\n  0x8d, 0x29, 0xa7, 0x48, 0x35, 0x33, 0x38, 0xab,\n  0x9c, 0x32, 0xe5, 0xca, 0xe4, 0xa8, 0x7a, 0x9a,\n  0x94, 0x2a, 0x5d, 0x32, 0xca, 0xe9, 0x52, 0x8b,\n  0x34, 0x2f, 0x39, 0xa7, 0x4f, 0x39, 0xc3, 0x35,\n  0xac, 0x9c, 0xb1, 0x84, 0x28, 0x0d, 0xb7, 0xbc,\n  0xe6, 0x6a, 0xa5, 0x78, 0x24, 0x74, 0xdb, 0x82,\n  0x92, 0x94, 0x76, 0x2b, 0x6b, 0x2f, 0xca, 0x4a,\n  0x2b, 0x44, 0x9f, 0x2d, 0x1b, 0xb7, 0x8a, 0x10,\n  0x73, 0xf6, 0x1a, 0x54, 0x2b, 0x3d, 0xf0, 0xd9,\n  0x5b, 0x11, 0x8d, 0xf0, 0xd0, 0x67, 0x6b, 0x4d,\n  0xc4, 0xdd, 0x4b, 0x0b, 0xc0, 0x6a, 0x32, 0x02,\n  0xc8, 0xe0, 0x4e, 0x00, 0x6a, 0xd3, 0x13, 0xd9,\n  0xc7, 0x79, 0x98, 0x2a, 0x29, 0x64, 0x6f, 0xcd,\n  0x6a, 0xde, 0x44, 0x01, 0x3d, 0x3a, 0x29, 0xa0,\n  0x79, 0x25, 0x01, 0x14, 0xc3, 0xcc, 0x80, 0xac,\n  0x54, 0x08, 0x90, 0x0d, 0x09, 0x00, 0xc0, 0xff,\n  // filter\n  0x8c, 0x9f, 0x69, 0x2a, 0x3d, 0xe2, 0x38, 0x7e,\n  0xfa, 0x9d, 0x72, 0x8f, 0xab, 0x80, 0x11, 0xca,\n  0x05, 0xd0, 0x4d, 0x9a, 0x02, 0x86, 0x73, 0x73,\n  0x40, 0x57, 0x69, 0x09, 0x90, 0x2a, 0xe2, 0x14,\n  0x45, 0xbb, 0x86, 0x66, 0xe5, 0x53, 0x45, 0x33,\n  0x1a, 0x9e, 0x45, 0x56, 0x15, 0xe4, 0xa7, 0xa9,\n  0x95, 0x5a, 0x55, 0x12, 0xb1, 0x45, 0x52, 0x7b,\n  0x55, 0x81, 0x6d, 0x07, 0x4b, 0x95, 0x51, 0x05,\n  0xbe, 0x9d, 0xa0, 0x93, 0x4b, 0xe5, 0xc5, 0x85,\n  0x92, 0xcf, 0x31, 0x5d, 0x04, 0x91, 0xe9, 0xe1,\n  0x14, 0x1c, 0xd0, 0x58, 0x59, 0x00, 0x36, 0x31,\n  0x4f, 0x40, 0xc6, 0x66, 0xa7, 0xcf, 0xc1, 0xcc,\n  0xdd, 0x2b, 0x9f, 0xbe, 0x24, 0x89, 0x08, 0x8d,\n  0xb3, 0xa6, 0x54, 0xa8, 0xc2, 0xac, 0xca, 0x9a,\n  0x53, 0xa3, 0x2a, 0xf5, 0xca, 0x63, 0x8e, 0x85,\n  0xb3, 0x5d, 0x26, 0x8d, 0x39, 0x57, 0xec, 0x52,\n  0x1b, 0xd2, 0xe6, 0x5c, 0xb1, 0xda, 0x74, 0x50,\n  0x5b, 0x52, 0xa1, 0x2c, 0xd3, 0x08, 0x65, 0xc9,\n  0x05, 0x23, 0x4d, 0x23, 0xa6, 0x35, 0x67, 0xf4,\n  0x70, 0xac, 0xe4, 0xd6, 0x14, 0x31, 0xdc, 0xa8,\n  0x8a, 0x28, 0x63, 0x80, 0x52, 0xd7, 0xb0, 0x62,\n  0xce, 0x11, 0x4c, 0x5d, 0x2a, 0x03, 0x00, 0xfc,\n  // frequency\n  0x04, 0xe8, 0x21, 0x9c, 0x00, 0xa3, 0x94, 0x33,\n  0x60, 0x78, 0x33, 0x03, 0x54, 0x13, 0xe6, 0x80,\n  0x61, 0x22, 0x1c, 0xd0, 0x6d, 0x78, 0x00, 0x9a,\n  0x0a, 0x73, 0x40, 0xd3, 0x61, 0x27, 0x2e, 0x2a,\n  0xdc, 0xdd, 0x9c, 0x8c, 0x30, 0x4c, 0xb4, 0x34,\n  0x5d, 0xbd, 0x82, 0xd8, 0xc8, 0xc3, 0x74, 0xca,\n  0x09, 0x72, 0x25, 0x0d, 0xd7, 0xc5, 0x27, 0xa8,\n  0x95, 0xc4, 0xdd, 0x6e, 0x9f, 0xb0, 0x26, 0xe2,\n  0xcc, 0x98, 0x72, 0xa2, 0xea, 0x89, 0x27, 0x73,\n  0x54, 0x4a, 0x8a, 0x27, 0x2e, 0xa9, 0xb1, 0xac,\n  0x60, 0xb6, 0xad, 0xc2, 0x6a, 0x97, 0x28, 0xe7,\n  0xb2, 0x0e, 0x4f, 0x32, 0xdc, 0x94, 0xca, 0x4b,\n  0x34, 0x76, 0xcb, 0xb3, 0x2b, 0x77, 0x05, 0xc7,\n  0xab, 0x8f, 0xc9, 0xc2, 0x30, 0xe6, 0x9c, 0x3e,\n  0x59, 0x8e, 0x56, 0x9b, 0x7d, 0xfa, 0xe2, 0x28,\n  0x43, 0xab, 0xca, 0x19, 0x8a, 0x23, 0x77, 0x9f,\n  0x28, 0x6b, 0xcc, 0x86, 0x22, 0x6c, 0xa3, 0x8c,\n  0x31, 0x6a, 0xca, 0xf4, 0xb5, 0x3c, 0xa6, 0x24,\n  0x29, 0x56, 0xc7, 0x6c, 0x99, 0x82, 0xe4, 0x7a,\n  0x49, 0xb1, 0x63, 0xec, 0xc4, 0x45, 0xc3, 0x13,\n  0x2b, 0xa0, 0x00, 0x77, 0x05, 0x2c, 0x16, 0xae,\n  0x80, 0x23, 0xcd, 0x15, 0xb0, 0x78, 0xa8, 0x01,\n  0x96, 0x4c, 0x75, 0x40, 0xc1, 0xae, 0x09, 0x10,\n  0xd6, 0xf3, 0x8c, 0xdd, 0x2a, 0x79, 0xd4, 0x94,\n  0x33, 0x76, 0x23, 0x14, 0x59, 0x93, 0xcf, 0xd4,\n  0x8d, 0x50, 0x54, 0x4d, 0x3e, 0x53, 0x37, 0x42,\n  0xd1, 0x35, 0xe5, 0xcc, 0x4d, 0x33, 0x67, 0x4f,\n  0xd9, 0x33, 0x37, 0xc3, 0x1c, 0xbd, 0xa5, 0xc7,\n  0x52, 0x24, 0x66, 0x4d, 0x84, 0x19, 0x4b, 0xb7,\n  0x28, 0xb1, 0x19, 0x65, 0x2c, 0xc3, 0x22, 0xfb,\n  0x76, 0x98, 0xb6, 0x0c, 0x03, 0x62, 0x5b, 0x61,\n  0xcb, 0xd2, 0x0d, 0xa8, 0x5f, 0x85, 0x29, 0x6b,\n  0x65, 0xa4, 0x7d, 0x1e, 0x06, 0x00, 0xe0, 0xff,\n  // generator\n  0xc8, 0x29, 0x98, 0xcb, 0x23, 0x24, 0x1b, 0x60,\n  0x7a, 0xce, 0x04, 0xac, 0x28, 0x9a, 0x80, 0xd5,\n  0xdb, 0x0b, 0x90, 0x05, 0xc5, 0x49, 0x8b, 0x67,\n  0x8d, 0xce, 0xca, 0x27, 0x2d, 0x5e, 0x34, 0x23,\n  0x2b, 0x9d, 0x34, 0x07, 0xb5, 0xf2, 0x8a, 0x74,\n  0xd2, 0x12, 0xcd, 0xda, 0x32, 0xf2, 0x49, 0x73,\n  0xd4, 0x28, 0xab, 0xc8, 0x27, 0xcb, 0xc9, 0xa2,\n  0xb4, 0x2c, 0x9f, 0x2c, 0x45, 0x4d, 0xf3, 0xb0,\n  0xb5, 0x8a, 0xec, 0xa5, 0xb1, 0x35, 0xd2, 0x29,\n  0x72, 0x90, 0xa2, 0xd6, 0xca, 0xa7, 0xcc, 0x49,\n  0x52, 0x86, 0x8b, 0xae, 0x2a, 0x17, 0x2a, 0x2d,\n  0x1a, 0xbb, 0x9a, 0xd4, 0x29, 0xbd, 0xb0, 0xe1,\n  0x68, 0x53, 0xc7, 0x31, 0xb5, 0x1a, 0xad, 0x8d,\n  0x1d, 0xc7, 0xd4, 0x6a, 0xb6, 0x2e, 0x36, 0x1c,\n  0x31, 0xab, 0x3c, 0xba, 0xdc, 0x31, 0xc3, 0x6d,\n  0xc8, 0xe9, 0x52, 0x14, 0xeb, 0xe6, 0x4a, 0xa7,\n  0xcb, 0x81, 0xbd, 0xc3, 0x4b, 0x9f, 0xbe, 0x18,\n  0x89, 0x0e, 0x0b, 0x73, 0xfa, 0x62, 0x54, 0x27,\n  0x2d, 0xf2, 0xe9, 0xb3, 0x32, 0xef, 0xb2, 0x30,\n  0xa7, 0xcf, 0xc6, 0xb4, 0xd3, 0xcd, 0x9c, 0x3e,\n  0x19, 0xb1, 0xca, 0x8c, 0x74, 0xfa, 0xe2, 0xd9,\n  0xad, 0xb2, 0xd2, 0xe9, 0x93, 0x93, 0xf4, 0x76,\n  0x5b, 0x67, 0xc8, 0x99, 0xd2, 0xdb, 0x63, 0xad,\n  0x21, 0x65, 0x8a, 0x18, 0x89, 0x3c, 0x86, 0x5c,\n  0x30, 0xb3, 0x65, 0x52, 0x1b, 0x52, 0xa6, 0xc8,\n  0xe6, 0x21, 0x6d, 0xc8, 0x95, 0x2c, 0x97, 0x86,\n  0xb4, 0xb1, 0x2c, 0x4c, 0x0f, 0x3d, 0xda, 0xc6,\n  0xb2, 0x30, 0x3c, 0xf4, 0x70, 0x19, 0x4b, 0x27,\n  0xf3, 0xe4, 0x23, 0x69, 0xac, 0x0b, 0x53, 0xcc,\n  0x86, 0x86, 0xb1, 0x66, 0x0c, 0x75, 0x29, 0xea,\n  0x96, 0x92, 0x39, 0xd4, 0xb9, 0x28, 0x01, 0xb8,\n  0xc7, 0x02, 0x00, 0xf8,\n  // instrument\n  0x27, 0x2f, 0x82, 0xbd, 0xa6, 0xac, 0x9c, 0x7c,\n  0x48, 0x61, 0xe9, 0x9a, 0x73, 0xf2, 0xee, 0x58,\n  0xb4, 0xb2, 0xca, 0xc8, 0xbd, 0xe5, 0x6c, 0x6d,\n  0xa6, 0x2d, 0x97, 0xd6, 0xda, 0xdd, 0xd5, 0xac,\n  0x34, 0x13, 0xb3, 0x48, 0x0f, 0x9d, 0x80, 0x06,\n  0x30, 0x02, 0xb0, 0x9d, 0x40, 0x00, 0x5e, 0x2d,\n  0x0f, 0xc0, 0xee, 0xe3, 0x06, 0x58, 0xad, 0x52,\n  0x01, 0x63, 0x76, 0x18, 0xa0, 0xcf, 0xee, 0x00,\n  0xf4, 0x39, 0x55, 0x80, 0x5e, 0x55, 0x4e, 0x51,\n  0xa3, 0xaa, 0x84, 0xa7, 0x3a, 0x55, 0xca, 0x98,\n  0x51, 0x9e, 0xf8, 0xd4, 0x29, 0x63, 0x44, 0x79,\n  0xe2, 0xd5, 0xa4, 0x44, 0x69, 0xa1, 0x8d, 0x5b,\n  0x1b, 0x1d, 0xb4, 0x47, 0xd4, 0x6e, 0x6d, 0x72,\n  0xd0, 0x1e, 0x59, 0x7b, 0xf4, 0xc9, 0x41, 0x69,\n  0x54, 0xec, 0xd5, 0x17, 0x8f, 0x29, 0x19, 0x55,\n  0x4e, 0x5f, 0x3c, 0xb9, 0xb9, 0xd7, 0x3e, 0x7d,\n  0x8d, 0x66, 0xea, 0x56, 0xeb, 0xf4, 0x35, 0x9b,\n  0x59, 0x78, 0x99, 0x33, 0xd4, 0xa2, 0x6e, 0x1e,\n  0x61, 0xcf, 0x58, 0x93, 0x99, 0x46, 0x9a, 0x3e,\n  0x63, 0x4d, 0x66, 0x96, 0x61, 0xe5, 0x8c, 0x2d,\n  0x9a, 0xa9, 0x97, 0x95, 0x33, 0xb6, 0x60, 0xaa,\n  0x56, 0x56, 0xda, 0x54, 0x2c, 0x05, 0x75, 0xca,\n  0x6a, 0x63, 0x31, 0x98, 0xd2, 0x41, 0x2b, 0xf5,\n  0x51, 0x61, 0xea, 0xb4, 0xec, 0x54, 0x55, 0x6e,\n  0x1e, 0x61, 0xb6, 0x4f, 0xb2, 0x9c, 0x97, 0x55,\n  0x99, 0x56, 0x40, 0xe1, 0x11, 0x00, 0x00, 0xff,\n  // knob\n  0xad, 0x31, 0xd2, 0xb3, 0x35, 0xa2, 0x96, 0x5a,\n  0x4a, 0xef, 0x33, 0x37, 0x5b, 0x2a, 0xad, 0x64,\n  0x32, 0x8b, 0xe1, 0xa8, 0x02, 0x57, 0xef, 0xcc,\n  0x52, 0xa7, 0x48, 0x81, 0x25, 0x2a, 0xac, 0x9c,\n  0x3c, 0x7b, 0x0d, 0xcb, 0x94, 0x7c, 0xb2, 0x50,\n  0xdd, 0xc5, 0x42, 0xf2, 0xc9, 0x62, 0x0f, 0x09,\n  0x0b, 0xb3, 0x27, 0x8b, 0x23, 0x29, 0xd2, 0xcc,\n  0xac, 0x2c, 0x2e, 0x93, 0x8c, 0x10, 0xbb, 0xb2,\n  0xb8, 0x4d, 0x32, 0x5c, 0xec, 0x2a, 0xe2, 0x32,\n  0x93, 0x72, 0x29, 0xab, 0x8e, 0xd3, 0x4d, 0x32,\n  0xc4, 0x9e, 0x26, 0xcd, 0xd0, 0x88, 0x30, 0x73,\n  0xfa, 0x54, 0x2b, 0x4c, 0x2b, 0xec, 0x19, 0x52,\n  0xae, 0x08, 0xcd, 0x30, 0x67, 0x48, 0x39, 0x23,\n  0x34, 0xc2, 0x9c, 0x29, 0x95, 0x0a, 0xd7, 0x0c,\n  0x73, 0xe6, 0x94, 0x2a, 0x42, 0xbd, 0xcc, 0x99,\n  0x53, 0xcc, 0x70, 0xf5, 0x32, 0x63, 0x49, 0x2e,\n  0x33, 0x54, 0xc7, 0x98, 0x85, 0x04, 0x2f, 0xd1,\n  0xae, 0x62, 0x26, 0x9e, 0x43, 0xc3, 0xdd, 0x0e,\n  0x01, 0xc0, 0x4b, 0x23, 0x80, 0x8c, 0x16, 0x04,\n  0x10, 0xd1, 0x02, 0x00, 0xfe,\n  // machine\n  0xad, 0x4a, 0x1a, 0xdb, 0x2c, 0xe4, 0x94, 0xd6,\n  0x49, 0xda, 0xf4, 0x92, 0x53, 0x5a, 0x23, 0x79,\n  0xca, 0xc6, 0x74, 0x6b, 0x83, 0xc6, 0xae, 0x68,\n  0x4b, 0xab, 0x8a, 0x96, 0x2a, 0xd3, 0x4b, 0xae,\n  0x3a, 0x19, 0x8a, 0x1a, 0x29, 0x72, 0xea, 0x1e,\n  0x44, 0x78, 0x74, 0x4c, 0x00, 0xbc, 0xc0, 0x28,\n  0xc0, 0x08, 0x42, 0x05, 0x98, 0xb3, 0x2c, 0x01,\n  0xf3, 0x74, 0x24, 0x60, 0xae, 0xcd, 0x04, 0xac,\n  0xbd, 0x99, 0x80, 0x39, 0x4b, 0x4e, 0xdc, 0x3d,\n  0x71, 0x64, 0xd4, 0x59, 0x71, 0x92, 0xec, 0xb3,\n  0x16, 0x7a, 0xc5, 0x49, 0x72, 0xec, 0x9a, 0xa8,\n  0x95, 0x64, 0x49, 0xbe, 0x13, 0x46, 0x57, 0x96,\n  0x39, 0xfb, 0xae, 0x88, 0x59, 0x79, 0x11, 0xe4,\n  0xd7, 0x26, 0xfe, 0xe4, 0x4d, 0xa1, 0x4e, 0x59,\n  0x94, 0x53, 0x0d, 0x4f, 0x9c, 0x15, 0x56, 0x4f,\n  0xdb, 0x3d, 0x6a, 0x46, 0xd8, 0x3d, 0x7d, 0xd3,\n  0x68, 0x1d, 0x2e, 0xf7, 0x0c, 0x85, 0x4b, 0x94,\n  0x9b, 0x9d, 0x33, 0x76, 0x43, 0x1e, 0x1e, 0x76,\n  0xd6, 0x58, 0x3d, 0xa9, 0x6a, 0xdb, 0x19, 0x63,\n  0x71, 0xe8, 0x52, 0x65, 0xbb, 0x8d, 0xd9, 0x60,\n  0x6a, 0x95, 0xe3, 0x36, 0x65, 0x8b, 0xa1, 0x5d,\n  0xb6, 0xc7, 0x54, 0x1c, 0x9a, 0x44, 0x39, 0x4a,\n  0x53, 0x50, 0x94, 0xd6, 0x19, 0xab, 0x3c, 0x49,\n  0x60, 0xf9, 0x14, 0x6d, 0x02, 0x78, 0x2e, 0x0d,\n  0x00, 0xf0,\n  // modular\n  0xad, 0x8e, 0x86, 0xd2, 0xd3, 0x9d, 0x8c, 0x3a,\n  0x69, 0xb2, 0xf0, 0x4a, 0xb2, 0xaa, 0xa4, 0xd8,\n  0x42, 0xd3, 0xe9, 0x2a, 0x83, 0xe4, 0x48, 0x2f,\n  0xa7, 0x23, 0xb7, 0x56, 0x3d, 0x34, 0x93, 0x9d,\n  0x3c, 0x84, 0x08, 0x13, 0x89, 0x73, 0xe2, 0x54,\n  0xaa, 0x55, 0x3d, 0xca, 0x89, 0x52, 0xcd, 0x16,\n  0x8f, 0x28, 0x27, 0x4c, 0x2d, 0x5b, 0x2d, 0xe2,\n  0x9c, 0x30, 0x8d, 0x28, 0xf1, 0xb2, 0x7b, 0xa2,\n  0xb4, 0x22, 0xd5, 0xdb, 0xca, 0x89, 0xe3, 0x8c,\n  0x74, 0x69, 0xab, 0x27, 0x4d, 0x35, 0xca, 0xb9,\n  0xa3, 0x9c, 0x32, 0x47, 0xed, 0x90, 0x8e, 0xd2,\n  0xda, 0x96, 0xa8, 0x45, 0x2d, 0xf1, 0x1a, 0xd7,\n  0x70, 0x22, 0x8f, 0xc4, 0x67, 0x18, 0x86, 0x39,\n  0x3a, 0x62, 0x9f, 0xbe, 0x2a, 0x72, 0xef, 0x6c,\n  0xb0, 0xfa, 0x24, 0x24, 0xb3, 0x2b, 0xc2, 0xea,\n  0xa3, 0xb4, 0x8c, 0xc9, 0x52, 0x6b, 0x88, 0xca,\n  0x3c, 0xab, 0x0a, 0xaf, 0x21, 0xe8, 0xf0, 0xa8,\n  0x8c, 0xbc, 0xc6, 0xe0, 0x33, 0xd8, 0xb2, 0xca,\n  0x1a, 0x42, 0xa8, 0x10, 0xaf, 0xd8, 0x6b, 0x88,\n  0x2e, 0x5b, 0xcc, 0x6b, 0x8e, 0x21, 0x86, 0x28,\n  0x75, 0x8d, 0xb9, 0x86, 0xe4, 0x3c, 0x2d, 0x25,\n  0xc5, 0x18, 0x72, 0xa1, 0xd2, 0xf4, 0x50, 0x63,\n  0x28, 0x99, 0xdd, 0x53, 0x46, 0x8d, 0x21, 0x47,\n  0xce, 0x08, 0x2a, 0x3d, 0xc6, 0x32, 0xd9, 0x2c,\n  0x79, 0xd4, 0x1a, 0x6b, 0xe3, 0xb0, 0xe0, 0x8a,\n  0x6d, 0xac, 0x1d, 0x53, 0x4d, 0x43, 0x97, 0xa9,\n  0x54, 0x0c, 0x37, 0x1a, 0x52, 0xa6, 0x52, 0xd1,\n  0xcd, 0x78, 0x48, 0x99, 0x6a, 0x27, 0x57, 0xe5,\n  0xb1, 0x61, 0xa8, 0x9d, 0x5c, 0x95, 0xc7, 0x00,\n  0x00, 0xfc,\n  // modulator\n  0xad, 0x0e, 0x9a, 0xd2, 0xd3, 0x9d, 0x8c, 0x2a,\n  0x69, 0xb2, 0xb0, 0x4a, 0x72, 0xaa, 0xa4, 0xd8,\n  0x42, 0xd3, 0xe9, 0x28, 0xbd, 0x94, 0x28, 0xab,\n  0x64, 0x2b, 0x0f, 0x8a, 0xb3, 0xbc, 0x92, 0xad,\n  0xcc, 0x68, 0x8b, 0xf2, 0xac, 0x7b, 0xe2, 0xd0,\n  0xbd, 0xd8, 0xc3, 0xc9, 0x89, 0xe3, 0x8c, 0x10,\n  0x73, 0x3b, 0x27, 0x4a, 0x23, 0x4d, 0x35, 0xec,\n  0x9c, 0x30, 0xd5, 0x16, 0x33, 0x8f, 0x72, 0xc2,\n  0x34, 0xdd, 0xdc, 0xcd, 0xca, 0x89, 0x52, 0xf5,\n  0x34, 0x8b, 0x28, 0x27, 0xc9, 0x59, 0x5b, 0xbc,\n  0xac, 0x9c, 0xac, 0x44, 0x09, 0xc9, 0xa8, 0xd2,\n  0x9a, 0xe4, 0xb4, 0x54, 0xd9, 0x4e, 0xa9, 0xab,\n  0x50, 0xd7, 0x30, 0xcb, 0xa7, 0xd9, 0x6b, 0x4b,\n  0x59, 0x28, 0x9f, 0x6e, 0x59, 0x51, 0x89, 0x48,\n  0x7d, 0xba, 0x6a, 0xc5, 0x3c, 0x33, 0xd6, 0xe9,\n  0x5b, 0x54, 0x17, 0xf3, 0x59, 0xa7, 0xaf, 0x4e,\n  0xc2, 0x3c, 0xa2, 0x8c, 0x21, 0xca, 0x2a, 0x65,\n  0x5b, 0xd2, 0x06, 0x1f, 0xcb, 0xc9, 0xb3, 0xea,\n  0xe8, 0x43, 0x28, 0xe5, 0x88, 0xaa, 0xab, 0x8f,\n  0x21, 0xd4, 0xdc, 0xab, 0x9e, 0x3e, 0x05, 0x37,\n  0x8b, 0x8c, 0x7b, 0xfa, 0x6a, 0xd5, 0xcd, 0xb3,\n  0xce, 0xe9, 0xab, 0x13, 0xf3, 0xa8, 0xaa, 0xa7,\n  0x2f, 0x9e, 0x2d, 0xb2, 0xa2, 0x9e, 0xa1, 0x58,\n  0xd6, 0xca, 0x2a, 0xbd, 0x86, 0xa4, 0xc4, 0xb7,\n  0x22, 0xe4, 0x18, 0x92, 0xe6, 0x8c, 0xaa, 0x4a,\n  0x63, 0xc8, 0x86, 0xc2, 0x2b, 0x63, 0xad, 0xa1,\n  0x44, 0x0a, 0x6b, 0xaf, 0xb5, 0x86, 0x92, 0x30,\n  0xbd, 0xbc, 0xd6, 0x1a, 0x4a, 0x23, 0xf7, 0xd2,\n  0x49, 0x63, 0x2c, 0x03, 0xd3, 0xdc, 0x27, 0x8d,\n  0xb1, 0x4c, 0xb2, 0x48, 0xbe, 0xd4, 0xc6, 0xb2,\n  0xb0, 0xd5, 0x7d, 0x58, 0x1a, 0x53, 0x26, 0xcd,\n  0xc1, 0x4a, 0x65, 0xca, 0x89, 0xd5, 0x0b, 0x4b,\n  0x85, 0xb1, 0x64, 0x54, 0x0f, 0xa9, 0xe5, 0xe6,\n  0x52, 0x29, 0x54, 0xcc, 0x92, 0x9a, 0x4a, 0xc5,\n  0x30, 0x93, 0x22, 0x04, 0xa0, 0x0e, 0x9b, 0x00,\n  0xc0, 0x4a, 0x01, 0x00, 0xfc,\n  // operator\n  0x09, 0x70, 0x9d, 0x2d, 0x00, 0x61, 0x91, 0x9e,\n  0x2c, 0xe5, 0xca, 0x14, 0xab, 0x72, 0x92, 0xd4,\n  0xa3, 0x8c, 0x2b, 0xec, 0x89, 0xd3, 0xf2, 0x52,\n  0x2b, 0x73, 0x2b, 0x8a, 0xcf, 0x2c, 0x3c, 0xc2,\n  0xac, 0x38, 0x3e, 0xe7, 0x2c, 0x8b, 0xd2, 0xe2,\n  0xb0, 0x2c, 0xcd, 0x2a, 0xac, 0xc9, 0x42, 0xa3,\n  0x94, 0x08, 0x29, 0x24, 0x53, 0x6e, 0x42, 0x59,\n  0x9d, 0x32, 0xa0, 0x28, 0x55, 0x06, 0x64, 0xad,\n  0xca, 0x00, 0x6f, 0xc4, 0x5a, 0x15, 0x9b, 0x99,\n  0xb8, 0xdb, 0x2e, 0xa5, 0x1d, 0xec, 0x51, 0xee,\n  0xa4, 0xb5, 0x61, 0x93, 0x95, 0xbb, 0xdd, 0xd2,\n  0xba, 0x89, 0xde, 0xe9, 0x71, 0x52, 0xab, 0x3a,\n  0x65, 0xa5, 0xa5, 0x5e, 0x6d, 0xac, 0x6c, 0x59,\n  0x9a, 0xa6, 0x74, 0x2e, 0xf3, 0x86, 0x5b, 0x91,\n  0xd1, 0xfb, 0xe0, 0xd1, 0x45, 0x95, 0x47, 0x1f,\n  0x83, 0xe8, 0x0c, 0x97, 0x39, 0x7d, 0x8d, 0x18,\n  0x5a, 0x55, 0x7b, 0xf5, 0x35, 0x60, 0x58, 0x75,\n  0xe5, 0xd1, 0x47, 0xc7, 0x55, 0x1d, 0xb6, 0xc6,\n  0x90, 0x2c, 0x55, 0x5c, 0x58, 0x6c, 0x7d, 0xab,\n  0xec, 0x64, 0xde, 0x78, 0xf5, 0xc5, 0xb1, 0xd9,\n  0x44, 0xad, 0x31, 0x44, 0xc3, 0x59, 0x27, 0xa1,\n  0xc6, 0x90, 0x02, 0x79, 0x8e, 0xcf, 0x1c, 0x63,\n  0x8a, 0x98, 0x39, 0x36, 0xab, 0x8d, 0x31, 0x62,\n  0x57, 0xf9, 0xa4, 0x36, 0xc6, 0x88, 0xd9, 0x6d,\n  0x33, 0xdb, 0x54, 0x26, 0x36, 0x65, 0x05, 0x6b,\n  0x53, 0x59, 0x58, 0x62, 0x31, 0xb4, 0x4d, 0x65,\n  0x60, 0xa9, 0x45, 0xe9, 0x34, 0x95, 0x81, 0x29,\n  0x16, 0xc5, 0xcc, 0x9c, 0x33, 0xba, 0x99, 0x0d,\n  0x25, 0x00, 0xf0, 0x34, 0x00, 0x00, 0xff,\n  // oscillator\n  0x27, 0x4d, 0xa5, 0x23, 0x3d, 0x6b, 0x9f, 0x34,\n  0xad, 0xb4, 0x8c, 0x8a, 0x72, 0xd2, 0x34, 0x2a,\n  0xc2, 0x2a, 0xca, 0x49, 0xd3, 0x8c, 0x34, 0xef,\n  0x28, 0x27, 0x8e, 0x3b, 0x34, 0xa2, 0xcd, 0x9c,\n  0x38, 0x4e, 0x0f, 0x8b, 0x96, 0x7a, 0xa2, 0x94,\n  0x7d, 0x28, 0x5b, 0x8a, 0x00, 0x98, 0x6c, 0x13,\n  0x40, 0x27, 0x69, 0x02, 0xd8, 0x22, 0x5c, 0x01,\n  0x5b, 0x84, 0x2b, 0xe0, 0x48, 0x0f, 0x03, 0x0c,\n  0xda, 0xe6, 0x80, 0x28, 0x3c, 0x4f, 0x1b, 0x5c,\n  0xbb, 0x6a, 0x54, 0x1e, 0xad, 0xf3, 0x23, 0x6e,\n  0x51, 0x77, 0xb5, 0x51, 0x76, 0x18, 0xc6, 0x9c,\n  0xd5, 0x26, 0x59, 0x65, 0x18, 0x73, 0x4e, 0x5b,\n  0x44, 0x85, 0xb3, 0xd7, 0x3d, 0x6d, 0x51, 0xe5,\n  0x2e, 0x51, 0xf7, 0xb4, 0xd5, 0xb9, 0x19, 0x77,\n  0x9d, 0xd3, 0x36, 0x6f, 0xe6, 0xdc, 0x55, 0x4f,\n  0xdf, 0xa3, 0x72, 0x68, 0x4d, 0x39, 0x7d, 0x0f,\n  0x46, 0xe1, 0x39, 0xe5, 0xf4, 0x2d, 0x89, 0xa4,\n  0xd5, 0x98, 0xd3, 0xf7, 0xa8, 0x9c, 0x96, 0x67,\n  0x56, 0x5f, 0x03, 0x9b, 0x59, 0x54, 0x3e, 0x7d,\n  0x4b, 0x6c, 0x5a, 0x36, 0xfb, 0xf4, 0xb5, 0xb0,\n  0x5a, 0xd9, 0xa2, 0xd3, 0xd7, 0x46, 0xee, 0xe9,\n  0xb3, 0x4f, 0x5f, 0x3a, 0x5a, 0x86, 0xce, 0x1e,\n  0x7d, 0xe9, 0x68, 0x99, 0x72, 0x79, 0xf5, 0xa5,\n  0xa3, 0x57, 0xc8, 0xa5, 0xd1, 0x97, 0x81, 0x11,\n  0x6a, 0x63, 0xda, 0x50, 0x16, 0x36, 0x45, 0x15,\n  0x6b, 0x43, 0x99, 0x58, 0x62, 0x31, 0xb4, 0x0c,\n  0x65, 0x40, 0x89, 0x47, 0xb1, 0x34, 0x94, 0x8e,\n  0x29, 0x16, 0xc5, 0xcc, 0x98, 0x33, 0x9a, 0x99,\n  0x0d, 0x05, 0x00, 0x80, 0xff,\n  // patch\n  0xc8, 0x2b, 0x2a, 0x3c, 0xcd, 0x12, 0x23, 0x2f,\n  0xba, 0xca, 0xf4, 0xb0, 0xa3, 0xbc, 0xa1, 0xdc,\n  0xc3, 0xd3, 0x8a, 0x01, 0x82, 0x09, 0x0f, 0x40,\n  0xf4, 0xee, 0xa7, 0xae, 0x51, 0xd2, 0xcd, 0x25,\n  0x9d, 0xa6, 0x46, 0x2d, 0x8f, 0x90, 0x7c, 0x9a,\n  0x9a, 0xb4, 0x2c, 0x42, 0xca, 0x69, 0x4a, 0xd6,\n  0xb6, 0x0c, 0xcb, 0xa7, 0x2b, 0xd5, 0xca, 0xa3,\n  0xec, 0x9c, 0xbe, 0x54, 0x6b, 0xad, 0x92, 0x73,\n  0xfa, 0x52, 0xad, 0xb5, 0x4a, 0xf1, 0x19, 0x4b,\n  0xb5, 0x96, 0x4e, 0xc5, 0x67, 0x2e, 0x4d, 0x5b,\n  0x26, 0x55, 0x9f, 0x25, 0x37, 0x1d, 0x59, 0x57,\n  0x75, 0xd6, 0x52, 0xb4, 0x65, 0x42, 0xf1, 0x39,\n  0x6b, 0xd4, 0x72, 0x6f, 0x3b, 0xe7, 0xaa, 0x41,\n  0x53, 0xb3, 0x2c, 0x9f, 0xab, 0x1a, 0x49, 0x8d,\n  0x8a, 0x92, 0xd6, 0xac, 0xdd, 0x2c, 0xc3, 0x8a,\n  0xe9, 0xaa, 0xac, 0x31, 0xf3, 0x38, 0x25, 0xdd,\n  0x25, 0xcb, 0x32, 0xe2, 0x38, 0x60, 0x79, 0xb1,\n  0x00, 0xec, 0xde, 0xe6, 0x80, 0xbd, 0xc7, 0x1d,\n  0xb0, 0x7b, 0x87, 0x01, 0x56, 0x16, 0x04, 0x40,\n  0x74, 0x57, 0x61, 0x6e, 0x66, 0x1b, 0xfe,\n  // sequencer\n  0x41, 0xba, 0xbe, 0xdd, 0xdd, 0x93, 0x28, 0x60,\n  0x09, 0x35, 0x05, 0x4c, 0x69, 0xa2, 0x80, 0xa5,\n  0x8c, 0x0d, 0x30, 0x85, 0x8b, 0x03, 0x96, 0x73,\n  0x09, 0xc0, 0xb4, 0xc2, 0x27, 0xa8, 0x92, 0x35,\n  0xa3, 0xad, 0xac, 0xa0, 0x28, 0x8c, 0xb8, 0x60,\n  0x7c, 0x82, 0xa6, 0xc8, 0x7c, 0x4b, 0xd6, 0x09,\n  0x9a, 0x24, 0x8b, 0x2b, 0x59, 0x2b, 0x6a, 0x8c,\n  0x35, 0x37, 0xad, 0xac, 0xb4, 0x7b, 0xe4, 0xe8,\n  0x8a, 0x32, 0xb2, 0x1e, 0x50, 0xbc, 0x2b, 0x8a,\n  0x00, 0xb8, 0xd2, 0x14, 0x40, 0x94, 0xcc, 0x0c,\n  0xc8, 0xdc, 0x90, 0x00, 0xbe, 0x2a, 0xa7, 0xde,\n  0x16, 0xd6, 0x4c, 0x6f, 0x5c, 0x46, 0x55, 0xa4,\n  0x39, 0x36, 0x6c, 0x19, 0x65, 0xb2, 0x71, 0xe9,\n  0xc2, 0x67, 0x4c, 0x56, 0xbd, 0x4c, 0x67, 0x9f,\n  0xb9, 0x05, 0x65, 0x8f, 0x28, 0x73, 0xe6, 0x62,\n  0x59, 0x3d, 0xaa, 0xf4, 0x9a, 0xb3, 0x42, 0xeb,\n  0xa8, 0xda, 0x6d, 0x76, 0x52, 0x6a, 0x3c, 0xcd,\n  0xb4, 0xd9, 0x09, 0xcd, 0xb1, 0x0a, 0x2d, 0x00,\n  0x8e, 0xa6, 0x15, 0xf0, 0x25, 0xa9, 0x03, 0x9e,\n  0x55, 0x3f, 0xe3, 0xd2, 0xa2, 0x5a, 0x96, 0xfa,\n  0x8c, 0xd9, 0xaa, 0x5b, 0x79, 0xa2, 0x31, 0x9b,\n  0x14, 0x51, 0x29, 0x96, 0xc6, 0xec, 0xa3, 0x56,\n  0x15, 0xd9, 0x6e, 0x73, 0x28, 0x34, 0x99, 0x1a,\n  0x6a, 0xcc, 0x29, 0x51, 0x67, 0xf2, 0x90, 0x36,\n  0xa7, 0x44, 0x9d, 0xc9, 0x43, 0xdb, 0x1c, 0x13,\n  0xad, 0xba, 0x87, 0x19, 0x6b, 0xce, 0x38, 0xee,\n  0x16, 0xaa, 0xad, 0xa9, 0xe2, 0x68, 0x58, 0xd0,\n  0xb2, 0x96, 0x86, 0x83, 0xe5, 0x54, 0xc2, 0x5c,\n  0x2a, 0x24, 0x59, 0xdb, 0x21, 0x00, 0x88, 0xb4,\n  0x00, 0x08, 0xed, 0x32, 0xcc, 0xcd, 0x6d, 0xc3,\n  0xff,\n  // synthesizer\n  0x0c, 0xe8, 0x22, 0x54, 0x01, 0x93, 0x87, 0x2a,\n  0x60, 0x0b, 0x57, 0x01, 0x1c, 0x1b, 0x2e, 0x80,\n  0x2b, 0x3c, 0x46, 0xf8, 0x5c, 0x5a, 0xb8, 0xc6,\n  0x1e, 0xd6, 0x15, 0x6e, 0xa6, 0x56, 0xfb, 0x44,\n  0xc9, 0x49, 0x68, 0xa7, 0xa2, 0x13, 0xa5, 0xc0,\n  0x91, 0xd9, 0xac, 0x4f, 0x94, 0x22, 0x7b, 0x66,\n  0x33, 0x49, 0xb1, 0xb3, 0x5c, 0xb2, 0xe9, 0xca,\n  0xc5, 0x34, 0x7a, 0x9b, 0xa7, 0x6a, 0x00, 0x05,\n  0x04, 0x6b, 0xb1, 0xca, 0xe4, 0x24, 0x34, 0x47,\n  0xce, 0xa9, 0xb2, 0x91, 0x70, 0x5b, 0x3b, 0xa7,\n  0x4a, 0x56, 0xdc, 0xfc, 0xec, 0x8c, 0x3a, 0x59,\n  0x35, 0x8f, 0x29, 0xab, 0x00, 0xc9, 0xca, 0x15,\n  0xd0, 0x80, 0xbb, 0x00, 0x36, 0x73, 0x55, 0xc0,\n  0x96, 0xe5, 0x06, 0xd8, 0xb2, 0xdc, 0x01, 0x81,\n  0x97, 0x9d, 0xa6, 0x78, 0x4b, 0xb7, 0x8c, 0x72,\n  0x9a, 0xec, 0x3d, 0x5d, 0x2b, 0xca, 0xe9, 0x52,\n  0xcc, 0x08, 0xad, 0xca, 0xa7, 0x4b, 0xb9, 0x22,\n  0x34, 0x2b, 0xaf, 0x3e, 0xb6, 0x68, 0x89, 0xb6,\n  0x7a, 0xfa, 0x14, 0x23, 0x8b, 0x33, 0xca, 0xea,\n  0x63, 0x2c, 0x6b, 0x77, 0x2b, 0xa7, 0xcf, 0xc1,\n  0xb5, 0x2c, 0x43, 0x9f, 0xa1, 0x78, 0xf5, 0xf2,\n  0x32, 0x72, 0x86, 0x12, 0xc4, 0x3c, 0x2a, 0xcc,\n  0x1a, 0xb2, 0x31, 0x4d, 0x9d, 0x30, 0x6d, 0xc9,\n  0x3c, 0x28, 0x2b, 0x46, 0x19, 0x20, 0x82, 0x4e,\n  0x03, 0x2c, 0xc0, 0x66, 0x80, 0x2f, 0xc9, 0x03,\n  0x50, 0x80, 0xf5, 0x19, 0xaa, 0x72, 0xd3, 0xb0,\n  0xc4, 0x6b, 0xc8, 0x81, 0x22, 0x3c, 0x1b, 0x8d,\n  0x21, 0x79, 0x4a, 0x4f, 0x8f, 0x35, 0x86, 0x9c,\n  0x30, 0x23, 0xad, 0xd6, 0x18, 0x4a, 0xc1, 0xf4,\n  0xb0, 0xca, 0x6d, 0xc8, 0x19, 0xcb, 0xd3, 0x2a,\n  0x95, 0x31, 0x25, 0x2c, 0x77, 0x8f, 0x5c, 0xc6,\n  0x52, 0x31, 0xcd, 0xad, 0x52, 0x19, 0x6b, 0x47,\n  0x57, 0x97, 0x49, 0x61, 0x2c, 0x8d, 0x54, 0x5d,\n  0x63, 0xb8, 0xb1, 0x24, 0x52, 0x73, 0xb3, 0xe1,\n  0xe6, 0x5a, 0xd8, 0xc9, 0x24, 0x91, 0x1b, 0x6a,\n  0x70, 0x65, 0x51, 0x3b, 0x00, 0x00, 0xff,\n  // vca\n  0x69, 0x10, 0x36, 0xb2, 0x5c, 0x23, 0xa6, 0xc1,\n  0xab, 0x70, 0x75, 0x8b, 0x93, 0xfa, 0xa0, 0xcc,\n  0x54, 0xd5, 0xcd, 0x6a, 0x5b, 0x0e, 0x55, 0x15,\n  0xdb, 0x2b, 0xef, 0xb1, 0x55, 0x99, 0xec, 0x9c,\n  0xac, 0x5a, 0x66, 0x2b, 0xaf, 0x72, 0xb2, 0xac,\n  0xd8, 0x72, 0x32, 0xcc, 0xca, 0x92, 0x10, 0xef,\n  0xf5, 0x30, 0x2b, 0x2f, 0x1a, 0x3d, 0xa6, 0xcc,\n  0x8c, 0xb2, 0x70, 0xcc, 0x9e, 0x92, 0xbc, 0xea,\n  0xca, 0xc9, 0xba, 0x5b, 0xca, 0x6a, 0x86, 0x21,\n  0xf6, 0x1a, 0xcb, 0xab, 0xde, 0x26, 0x48, 0x34,\n  0x62, 0x07, 0x60, 0x72, 0x23, 0x03, 0x6c, 0xe5,\n  0xe2, 0x80, 0xa5, 0x5d, 0x1c, 0x30, 0x5c, 0x52,\n  0x00, 0x88, 0x89, 0x59, 0x7d, 0x92, 0x94, 0x3d,\n  0x45, 0x7b, 0x74, 0x81, 0x79, 0x5e, 0x39, 0xdd,\n  0xd1, 0x45, 0xae, 0xb1, 0x93, 0x74, 0x56, 0x9b,\n  0x88, 0xe6, 0x74, 0x49, 0x3d, 0x6d, 0x61, 0xac,\n  0xb5, 0x2d, 0xfb, 0x34, 0x9d, 0xb3, 0xe4, 0xae,\n  0x95, 0xd3, 0x34, 0xc5, 0x9c, 0xd3, 0x76, 0x4e,\n  0xdd, 0x03, 0xb3, 0x57, 0x5b, 0x39, 0x45, 0x4f,\n  0xc2, 0x99, 0x61, 0xf9, 0x14, 0x3d, 0x92, 0x45,\n  0x85, 0x9d, 0x93, 0xf7, 0x40, 0x96, 0x99, 0x76,\n  0x4f, 0xde, 0x23, 0x59, 0x56, 0xda, 0x39, 0x55,\n  0x4f, 0xac, 0x9e, 0x65, 0xe5, 0x34, 0xdd, 0xb1,\n  0x44, 0x76, 0xa4, 0xd3, 0x8d, 0x20, 0x6c, 0x59,\n  0x95, 0xce, 0x30, 0x02, 0x93, 0x57, 0x55, 0x3a,\n  0x53, 0xf7, 0x24, 0x9e, 0x5d, 0xe9, 0xac, 0xcd,\n  0xa2, 0x65, 0x4d, 0xe4, 0xb3, 0x35, 0x8b, 0x56,\n  0xd5, 0x91, 0xcf, 0x31, 0x12, 0x8a, 0x77, 0xd7,\n  0x4a, 0x7d, 0x33, 0x98, 0x95, 0x61, 0x15, 0x00,\n  0xe0, 0xff,\n  // voltage\n  0xae, 0x75, 0x45, 0x13, 0x86, 0xdd, 0xa4, 0xd6,\n  0xe7, 0x70, 0x72, 0x1b, 0x9f, 0x9a, 0xe0, 0x32,\n  0x98, 0xa5, 0xf2, 0xa8, 0x86, 0x09, 0x57, 0x17,\n  0xc5, 0xa7, 0x48, 0x3e, 0xc3, 0x4d, 0xa3, 0x9c,\n  0x32, 0xc6, 0x31, 0x09, 0x49, 0x72, 0xca, 0x68,\n  0x27, 0xd5, 0x64, 0xd6, 0x28, 0x7d, 0x9c, 0x12,\n  0xf1, 0x4b, 0xa3, 0x74, 0x79, 0x53, 0xc4, 0x2e,\n  0x95, 0xd2, 0x8c, 0x49, 0x94, 0x1c, 0x5d, 0x0a,\n  0xdd, 0xce, 0x48, 0x72, 0x54, 0x29, 0x55, 0x5f,\n  0x67, 0xca, 0xda, 0xad, 0xf4, 0x66, 0xc3, 0x28,\n  0xa2, 0x96, 0xaa, 0xe0, 0xcc, 0x50, 0x49, 0x02,\n  0xe0, 0x80, 0xca, 0x52, 0x1c, 0x70, 0x98, 0x59,\n  0x02, 0x02, 0x76, 0x3b, 0x7d, 0xf7, 0xaa, 0xae,\n  0x3e, 0xfb, 0xf4, 0xdd, 0xaa, 0x58, 0xf8, 0xec,\n  0xd3, 0x77, 0xa7, 0x62, 0xe1, 0x53, 0x4e, 0xd7,\n  0x83, 0x88, 0x79, 0xcc, 0x3e, 0x7d, 0x77, 0xaa,\n  0xea, 0xb1, 0x68, 0x0d, 0x23, 0x91, 0x8a, 0xfa,\n  0xaa, 0x31, 0x8c, 0x80, 0x46, 0x96, 0x8d, 0xc3,\n  0xd8, 0x34, 0xa4, 0xe6, 0x54, 0x5c, 0xcb, 0x74,\n  0xec, 0x1a, 0x2a, 0xc7, 0x01, 0xd3, 0x10, 0x05,\n  0x60, 0x4e, 0xa7, 0x00, 0xcc, 0x99, 0x1a, 0x80,\n  0x35, 0x3a, 0x02, 0x30, 0x47, 0x6a, 0x00, 0x66,\n  0x4b, 0x75, 0xc0, 0x1c, 0xc6, 0x0e, 0x18, 0x51,\n  0x58, 0x00, 0x23, 0x8b, 0x00, 0xc0, 0xff,\n  // waveform\n  0xa9, 0x65, 0xd3, 0xc3, 0xc2, 0x22, 0xbb, 0x96,\n  0x3e, 0x53, 0x8d, 0xb0, 0x12, 0x6a, 0x7e, 0x59,\n  0x2d, 0xd2, 0x4a, 0xaa, 0xd8, 0x34, 0x33, 0x4d,\n  0xdb, 0xad, 0x10, 0xcd, 0x43, 0xcd, 0xed, 0x8e,\n  0xdc, 0x74, 0xa3, 0x9a, 0x8c, 0x3d, 0x32, 0x5b,\n  0xc5, 0xab, 0x22, 0xec, 0x8a, 0xbd, 0xf1, 0xce,\n  0xf0, 0x32, 0x27, 0x0e, 0x5a, 0xb3, 0x22, 0xca,\n  0x9e, 0x38, 0x29, 0xee, 0x69, 0xb7, 0x73, 0x82,\n  0x9e, 0x48, 0xbc, 0x3b, 0xf6, 0x09, 0x7a, 0x44,\n  0xc9, 0x9a, 0xd8, 0x27, 0x6a, 0x8e, 0x34, 0xa7,\n  0x63, 0x9f, 0xa4, 0x79, 0x94, 0xaa, 0x89, 0x73,\n  0xf2, 0x16, 0x50, 0xaa, 0xa6, 0x4a, 0x2b, 0xb2,\n  0x41, 0xcb, 0xa8, 0xaa, 0xa5, 0x0d, 0x5a, 0xb5,\n  0xd2, 0xaa, 0xa4, 0x21, 0x0a, 0xd1, 0x6e, 0x2d,\n  0xd3, 0x86, 0xa1, 0x55, 0xc4, 0x2c, 0xb6, 0x00,\n  0x02, 0x13, 0x15, 0x40, 0x15, 0x26, 0x02, 0xe8,\n  0xc6, 0xb5, 0x54, 0xc3, 0xb6, 0xb9, 0x7b, 0xdc,\n  0x56, 0x65, 0x6e, 0x11, 0xe9, 0x51, 0x56, 0xef,\n  0x43, 0x97, 0x9a, 0x26, 0x6e, 0x83, 0x8b, 0xd3,\n  0x2c, 0xd6, 0xba, 0x0c, 0xb6, 0x6c, 0x91, 0x78,\n  0x9b, 0x32, 0x9a, 0x3a, 0x45, 0xea, 0x69, 0xda,\n  0xe8, 0x73, 0x8e, 0xb0, 0xb6, 0x6e, 0x63, 0xc8,\n  0xbe, 0x24, 0xda, 0x78, 0x8c, 0x61, 0xba, 0x9b,\n  0x78, 0xa3, 0x31, 0xc5, 0xee, 0x9e, 0xaa, 0x0d,\n  0xc7, 0x14, 0xbb, 0x85, 0x9b, 0x54, 0x1a, 0x4b,\n  0x8a, 0x12, 0xe9, 0x94, 0x6a, 0x2c, 0xd1, 0x8a,\n  0x46, 0x88, 0xe7, 0xb6, 0x44, 0xc7, 0xe6, 0xc1,\n  0xa9, 0xca, 0xec, 0x2d, 0x65, 0xba, 0x36, 0x2e,\n  0x4b, 0x32, 0x18, 0x11, 0x56, 0xbb, 0x2c, 0xd9,\n  0xa2, 0x45, 0x59, 0xcd, 0x50, 0x07, 0x45, 0xd5,\n  0xa5, 0x0d, 0xcc, 0x62, 0xb4, 0x65, 0x8c, 0x1e,\n  0x54, 0x4b, 0x94, 0xe2, 0x3e, 0x3a, 0x1a, 0x00,\n  0xe0, 0xff\n};\n\n/* extern */\nconst LPCSpeechSynthWordBankData word_banks_[] = {\n  { bank_0, 1233 },\n  { bank_1, 900 },\n  { bank_2, 1552 },\n  { bank_3, 2524 },\n  { bank_4, 4802 },\n};\n\n}  // namespace plaits"
  },
  {
    "path": "lib/plaits/dsp/speech/lpc_speech_synth_words.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// LPC10 encoded words extracted from various TI ROMs.\n\n#ifndef PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_WORDS_H_\n#define PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_WORDS_H_\n\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.h\"\n\nnamespace plaits {\n\n#define LPC_SPEECH_SYNTH_NUM_WORD_BANKS 5\n\nextern const uint8_t bank_0[1233];\nextern const uint8_t bank_1[900];\nextern const uint8_t bank_2[1552];\nextern const uint8_t bank_3[2524];\nextern const uint8_t bank_4[4802];\n\nextern const LPCSpeechSynthWordBankData word_banks_[LPC_SPEECH_SYNTH_NUM_WORD_BANKS];\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_SPEECH_LPC_SPEECH_SYNTH_WORDS_H_\n"
  },
  {
    "path": "lib/plaits/dsp/speech/naive_speech_synth.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Naive speech synth - made from \"synthesizer\" building blocks (pulse\n// oscillator and zero-delay SVF).\n\n#include \"plaits/dsp/speech/naive_speech_synth.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\n/* static */\nconst NaiveSpeechSynth::Phoneme NaiveSpeechSynth::phonemes_[][kNaiveSpeechNumRegisters] = {\n  {\n    { { { 74, 255 }, { 83, 114 }, { 97, 90 }, { 98, 90 }, { 100, 25 } } },\n    { { { 75, 255 }, { 84, 128 }, { 100, 114 }, { 101, 101 }, { 103, 20 } } },\n    { { { 76, 255 }, { 85, 128 }, { 100, 18 }, { 102, 16 }, { 104, 3 } } },\n    { { { 79, 255 }, { 85, 161 }, { 101, 25 }, { 104, 4 }, { 110, 0 } } },\n    { { { 79, 255 }, { 85, 128 }, { 101, 6 }, { 106, 25 }, { 110, 0 } } }\n  },\n  {\n    { { { 67, 255 }, { 91, 64 }, { 98, 90 }, { 101, 64 }, { 102, 32 } } },\n    { { { 67, 255 }, { 92, 51 }, { 99, 64 }, { 103, 51 }, { 105, 25 } } },\n    { { { 69, 255 }, { 93, 51 }, { 100, 32 }, { 102, 25 }, { 103, 25 } } },\n    { { { 67, 255 }, { 91, 16 }, { 100, 8 }, { 103, 4 }, { 110, 0 } } },\n    { { { 65, 255 }, { 95, 25 }, { 101, 45 }, { 105, 2 }, { 110, 0 } } }\n  },\n  {\n    { { { 59, 255 }, { 92, 8 }, { 99, 40 }, { 102, 20 }, { 104, 10 } } },\n    { { { 61, 255 }, { 94, 45 }, { 101, 32 }, { 103, 25 }, { 105, 8 } } },\n    { { { 60, 255 }, { 93, 16 }, { 101, 16 }, { 104, 4 }, { 105, 4 } } },\n    { { { 65, 255 }, { 92, 25 }, { 100, 8 }, { 105, 4 }, { 110, 0 } } },\n    { { { 60, 255 }, { 96, 64 }, { 101, 12 }, { 106, 12 }, { 110, 1 } } }\n  },\n  {\n    { { { 67, 255 }, { 78, 72 }, { 98, 22 }, { 99, 25 }, { 101, 2 } } },\n    { { { 67, 255 }, { 79, 80 }, { 99, 64 }, { 101, 64 }, { 102, 12 } } },\n    { { { 68, 255 }, { 79, 80 }, { 100, 12 }, { 102, 20 }, { 103, 5 } } },\n    { { { 69, 255 }, { 79, 90 }, { 101, 40 }, { 104, 10 }, { 110, 0 } } },\n    { { { 69, 255 }, { 79, 72 }, { 101, 20 }, { 106, 20 }, { 110, 0 } } }\n  },\n  {\n    { { { 65, 255 }, { 74, 25 }, { 98, 6 }, { 100, 10 }, { 101, 4 } } },\n    { { { 65, 255 }, { 74, 25 }, { 100, 36 }, { 101, 51 }, { 103, 12 } } },\n    { { { 66, 255 }, { 75, 25 }, { 100, 18 }, { 102, 8 }, { 104, 5 } } },\n    { { { 63, 255 }, { 77, 64 }, { 99, 8 }, { 104, 2 }, { 110, 0 } } },\n    { { { 63, 255 }, { 77, 40 }, { 100, 4 }, { 106, 2 }, { 110, 0 } } }\n  },\n};\n\nvoid NaiveSpeechSynth::Init() {\n  pulse_.Init();\n  frequency_ = 0.0f;\n  click_duration_ = 0;\n  \n  for (int i = 0; i < kNaiveSpeechNumFormants; ++i) {\n    filter_[i].Init();\n  }\n  pulse_coloration_.Init();\n  pulse_coloration_.set_f_q<FREQUENCY_DIRTY>(800.0f / kSampleRate, 0.5f);\n}\n\nvoid NaiveSpeechSynth::Render(\n    bool click,\n    float frequency,\n    float phoneme,\n    float vocal_register,\n    float* temp,\n    float* excitation,\n    float* output,\n    size_t size) {\n  if (click) {\n    click_duration_ = kSampleRate * 0.05f;\n  }\n  click_duration_ -= min(click_duration_, size);\n  \n  if (click_duration_) {\n    frequency *= 0.5f;\n  }\n  \n  // Generate excitation signal (glottal pulse).\n  pulse_.Render<OSCILLATOR_SHAPE_IMPULSE_TRAIN>(\n      frequency, 0.5f, excitation, size);\n  pulse_coloration_.Process<FILTER_MODE_BAND_PASS>(\n      excitation, excitation, size);\n  for (size_t i = 0; i < size; ++i) {\n    excitation[i] *= 4.0f;\n  }\n  \n  float p = phoneme * (kNaiveSpeechNumPhonemes - 1.001f);\n  float r = vocal_register * (kNaiveSpeechNumRegisters - 1.001f);\n  \n  MAKE_INTEGRAL_FRACTIONAL(p);\n  MAKE_INTEGRAL_FRACTIONAL(r);\n  \n  fill(&output[0], &output[size], 0.0f);\n  for (int i = 0; i < kNaiveSpeechNumFormants; ++i) {\n    const Formant& p0r0 = phonemes_[p_integral][r_integral].formant[i];\n    const Formant& p0r1 = phonemes_[p_integral][r_integral + 1].formant[i];\n    const Formant& p1r0 = phonemes_[p_integral + 1][r_integral].formant[i];\n    const Formant& p1r1 = phonemes_[p_integral + 1][r_integral + 1].formant[i];\n\n    float p0r_f = p0r0.frequency + \\\n        (p0r1.frequency - p0r0.frequency) * r_fractional;\n    float p1r_f = p1r0.frequency + \\\n        (p1r1.frequency - p1r0.frequency) * r_fractional;\n    float f = p0r_f + (p1r_f - p0r_f) * p_fractional;\n\n    float p0r_a = p0r0.amplitude + \\\n        (p0r1.amplitude - p0r0.amplitude) * r_fractional;\n    float p1r_a = p1r0.amplitude + \\\n        (p1r1.amplitude - p1r0.amplitude) * r_fractional;\n    float a = (p0r_a + (p1r_a - p0r_a) * p_fractional) / 256.0f;\n    \n    if (f >= 160.0f) {\n      f = 160.0f;\n    }\n    f = a0 * stmlib::SemitonesToRatio(f - 33.0f);\n    if (click_duration_ && i == 0) {\n      f *= 0.5f;\n    }\n    filter_[i].set_f_q<FREQUENCY_DIRTY>(f, 20.0f);\n    filter_[i].ProcessAdd<FILTER_MODE_BAND_PASS>(excitation, output, size, a);\n  }\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/speech/naive_speech_synth.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Naive speech synth - made from \"synthesizer\" building blocks (pulse\n// oscillator and zero-delay SVF).\n\n#ifndef PLAITS_DSP_SPEECH_NAIVE_SPEECH_SYNTH_H_\n#define PLAITS_DSP_SPEECH_NAIVE_SPEECH_SYNTH_H_\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"plaits/dsp/dsp.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n\nnamespace plaits {\n\nconst int kNaiveSpeechNumFormants = 5;\nconst int kNaiveSpeechNumPhonemes = 5;\nconst int kNaiveSpeechNumRegisters = 5;\n\nclass NaiveSpeechSynth {\n public:\n  NaiveSpeechSynth() { }\n  ~NaiveSpeechSynth() { }\n\n  void Init();\n  \n  void Render(\n      bool click,\n      float frequency,\n      float phoneme,\n      float vocal_register,\n      float* temp,\n      float* excitation,\n      float* output,\n      size_t size);\n\n private:\n  struct Formant {\n    uint8_t frequency;\n    uint8_t amplitude;\n  };\n  \n  struct Phoneme {\n    Formant formant[kNaiveSpeechNumFormants];\n  };\n\n  Oscillator pulse_;\n  float frequency_;\n  size_t click_duration_;\n  \n  stmlib::Svf filter_[kNaiveSpeechNumFormants];\n  stmlib::Svf pulse_coloration_;\n\n  static const Phoneme phonemes_[kNaiveSpeechNumPhonemes][kNaiveSpeechNumRegisters];\n  \n  DISALLOW_COPY_AND_ASSIGN(NaiveSpeechSynth);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_SPEECH_NAIVE_SPEECH_SYNTH_H_\n"
  },
  {
    "path": "lib/plaits/dsp/speech/sam_speech_synth.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SAM-inspired speech synth (as used in Shruthi/Ambika/Braids).\n\n#include \"plaits/dsp/speech/sam_speech_synth.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"plaits/dsp/oscillator/sine_oscillator.h\"\n#include \"plaits/dsp/oscillator/oscillator.h\"\n#include \"plaits/resources.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid SAMSpeechSynth::Init() {\n  phase_ = 0.0f;\n  frequency_ = 0.0f;\n  pulse_next_sample_ = 0.0f;\n  pulse_lp_ = 0.0f;\n  \n  fill(&formant_phase_[0], &formant_phase_[3], 0);\n  consonant_samples_ = 0;\n  consonant_index_ = 0.0f;\n}\n\n// Phoneme data\n\n/* static */\nconst SAMSpeechSynth::Phoneme SAMSpeechSynth::phonemes_[] = {\n  { { { 60, 15 }, { 90, 13 }, { 200, 1 } } },\n  { { { 40, 13 }, { 114, 12 }, { 139, 6 } } },\n  { { { 33, 14 }, { 155, 12 }, { 209, 7 } } },\n  { { { 22, 13 }, { 189, 10 }, { 247, 8 } } },\n  { { { 51, 15 }, { 99, 12 }, { 195, 1 } } },\n  { { { 29, 13 }, { 65, 8 }, { 180, 0 } } },\n  { { { 13, 12 }, { 103, 3 }, { 182, 0 } } },\n  { { { 20, 15 }, { 114, 3 }, { 213, 0 } } },\n  { { { 13, 7 }, { 164, 3 }, { 222, 14 } } },\n  { { { 13, 9 }, { 121, 9 }, { 254, 0 } } },\n  { { { 40, 12 }, { 112, 10 }, { 114, 5 } } },\n  { { { 24, 13 }, { 54, 8 }, { 157, 0 } } },\n  { { { 33, 14 }, { 155, 12 }, { 166, 7 } } },\n  { { { 36, 14 }, { 83, 8 }, { 249, 1 } } },\n  { { { 40, 14 }, { 114, 12 }, { 139, 6 } } },\n  { { { 13, 5 }, { 58, 5 }, { 182, 5 } } },\n  { { { 13, 7 }, { 164, 10 }, { 222, 14 } } },\n  { { { 13, 7 }, { 164, 10 }, { 222, 14 } } }  // GUARD\n};\n\n/* static */\nconst float SAMSpeechSynth::formant_amplitude_lut[] = {\n  0.03125000f,  0.03756299f,  0.04515131f,  0.05427259f,  0.06523652f,\n  0.07841532f,  0.09425646f,  0.11329776f,  0.13618570f,  0.16369736f,\n  0.19676682f,  0.23651683f,  0.28429697f,  0.34172946f,  0.41076422f,\n  0.49374509f\n};\n\nvoid SAMSpeechSynth::InterpolatePhonemeData(\n  float phoneme,\n  float formant_shift,\n  uint32_t* formant_frequency,\n  float* formant_amplitude) {\n  MAKE_INTEGRAL_FRACTIONAL(phoneme);\n\n  const Phoneme& p_1 = phonemes_[phoneme_integral];\n  const Phoneme& p_2 = phonemes_[phoneme_integral + 1];\n\n  formant_shift = 1.0f + formant_shift * 2.5f;\n  for (int i = 0; i < kSAMNumFormants; ++i) {\n    float f_1 = p_1.formant[i].frequency;\n    float f_2 = p_2.formant[i].frequency;\n    float f = f_1 + (f_2 - f_1) * phoneme_fractional;\n    f *= 8.0f * formant_shift * 4294967296.0f / kSampleRate;\n    formant_frequency[i] = static_cast<uint32_t>(f);\n  \n    float a_1 = formant_amplitude_lut[p_1.formant[i].amplitude];\n    float a_2 = formant_amplitude_lut[p_2.formant[i].amplitude];\n    formant_amplitude[i] = a_1 + (a_2 - a_1) * phoneme_fractional;\n  }\n}\n\nvoid SAMSpeechSynth::Render(\n    bool consonant,\n    float frequency,\n    float vowel,\n    float formant_shift,\n    float* excitation,\n    float* output,\n    size_t size) {\n  if (frequency >= 0.0625f) {\n    frequency = 0.0625f;\n  }\n  \n  if (consonant) {\n    consonant_samples_ = kSampleRate * 0.05f;\n    int r = (vowel + 3.0f * frequency + 7.0f * formant_shift) * 8.0f;\n    consonant_index_ = (r % kSAMNumConsonants);\n  }\n  consonant_samples_ -= min(consonant_samples_, size);\n  \n  float phoneme = consonant_samples_\n      ? (consonant_index_ + kSAMNumVowels)\n      : vowel * (kSAMNumVowels - 1.0001f);\n\n  uint32_t formant_frequency[kSAMNumFormants];\n  float formant_amplitude[kSAMNumFormants];\n  \n  InterpolatePhonemeData(\n      phoneme,\n      formant_shift,\n      formant_frequency,\n      formant_amplitude);\n\n  ParameterInterpolator fm(&frequency_, frequency, size);\n  float pulse_next_sample = pulse_next_sample_;\n  \n  while (size--) {\n    float pulse_this_sample = pulse_next_sample;\n    pulse_next_sample = 0.0f;\n    const float frequency = fm.Next();\n    phase_ += frequency;\n  \n    if (phase_ >= 1.0f) {\n      phase_ -= 1.0f;\n      float t = phase_ / frequency;\n      formant_phase_[0] = static_cast<uint32_t>(\n          t * static_cast<float>(formant_frequency[0]));\n      formant_phase_[1] = static_cast<uint32_t>(\n          t * static_cast<float>(formant_frequency[1]));\n      formant_phase_[2] = static_cast<uint32_t>(\n          t * static_cast<float>(formant_frequency[2]));\n      pulse_this_sample -= ThisBlepSample(t);\n      pulse_next_sample -= NextBlepSample(t);\n    } else {\n      formant_phase_[0] += formant_frequency[0];\n      formant_phase_[1] += formant_frequency[1];\n      formant_phase_[2] += formant_frequency[2];\n    }\n    pulse_next_sample += phase_;\n    \n    float d = pulse_this_sample - 0.5f - pulse_lp_;\n    pulse_lp_ += min(16.0f * frequency, 1.0f) * d;\n    *excitation++ = d;\n  \n    float s = 0;\n    s += SineRaw(formant_phase_[0]) * formant_amplitude[0];\n    s += SineRaw(formant_phase_[1]) * formant_amplitude[1];\n    s += SineRaw(formant_phase_[2]) * formant_amplitude[2];\n    s *= (1.0f - phase_);\n    *output++ = s;\n  }\n  pulse_next_sample_ = pulse_next_sample;\n}\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/speech/sam_speech_synth.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SAM-inspired speech synth (as used in Shruthi/Ambika/Braids).\n\n#ifndef PLAITS_DSP_SPEECH_SAM_SPEECH_SYNTH_H_\n#define PLAITS_DSP_SPEECH_SAM_SPEECH_SYNTH_H_\n\n#include \"plaits/dsp/dsp.h\"\n\nnamespace plaits {\n  \nconst int kSAMNumFormants = 3;\nconst int kSAMNumVowels = 9;\nconst int kSAMNumConsonants = 8;\nconst int kSAMNumPhonemes = kSAMNumVowels + kSAMNumConsonants;\n\nclass SAMSpeechSynth {\n public:\n  SAMSpeechSynth() { }\n  ~SAMSpeechSynth() { }\n\n  void Init();\n  \n  void Render(\n      bool consonant,\n      float frequency,\n      float vowel,\n      float formant_shift,\n      float* excitation,\n      float* output,\n      size_t size);\n\n private:\n  void InterpolatePhonemeData(\n      float phoneme,\n      float formant_shift,\n      uint32_t* formant_frequency,\n      float* formant_amplitude);\n  \n  struct Formant {\n    uint8_t frequency;\n    uint8_t amplitude;\n  };\n  struct Phoneme {\n    Formant formant[kSAMNumFormants]; \n  };\n\n  float phase_;\n  float frequency_;\n\n  float pulse_next_sample_;\n  float pulse_lp_;\n\n  uint32_t formant_phase_[3];\n  size_t consonant_samples_;\n  float consonant_index_;\n  \n  static const Phoneme phonemes_[kSAMNumPhonemes + 1];\n  static const float formant_amplitude_lut[16];\n  \n  DISALLOW_COPY_AND_ASSIGN(SAMSpeechSynth);\n};\n  \n}  // namespace plaits\n\n#endif  // PLAITS_DSP_SPEECH_SAM_SPEECH_SYNTH_H_\n"
  },
  {
    "path": "lib/plaits/dsp/voice.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Main synthesis voice.\n\n#include \"plaits/dsp/voice.h\"\n//[eh2k] #include \"plaits/user_data.h\"\n\nnamespace plaits {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid Voice::Init() {\n  // engines_.Init();\n\n  // engines_.RegisterInstance(&virtual_analog_vcf_engine_, false, 1.0f, 1.0f);\n  // engines_.RegisterInstance(&phase_distortion_engine_, false, 0.7f, 0.7f);\n  // engines_.RegisterInstance(&six_op_engine_, true, 1.0f, 1.0f);\n  // engines_.RegisterInstance(&six_op_engine_, true, 1.0f, 1.0f);\n  // engines_.RegisterInstance(&six_op_engine_, true, 1.0f, 1.0f);\n  // engines_.RegisterInstance(&wave_terrain_engine_, false, 0.7f, 0.7f);\n  // engines_.RegisterInstance(&string_machine_engine_, false, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&chiptune_engine_, false, 0.5f, 0.5f);\n  \n  // engines_.RegisterInstance(&virtual_analog_engine_, false, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&waveshaping_engine_, false, 0.7f, 0.6f);\n  // engines_.RegisterInstance(&fm_engine_, false, 0.6f, 0.6f);\n  // engines_.RegisterInstance(&grain_engine_, false, 0.7f, 0.6f);\n  // engines_.RegisterInstance(&additive_engine_, false, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&wavetable_engine_, false, 0.6f, 0.6f);\n  // engines_.RegisterInstance(&chord_engine_, false, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&speech_engine_, false, -0.7f, 0.8f);\n\n  // engines_.RegisterInstance(&swarm_engine_, false, -3.0f, 1.0f);\n  // engines_.RegisterInstance(&noise_engine_, false, -1.0f, -1.0f);\n  // engines_.RegisterInstance(&particle_engine_, false, -2.0f, 1.0f);\n  // engines_.RegisterInstance(&string_engine_, true, -1.0f, 0.8f);\n  // engines_.RegisterInstance(&modal_engine_, true, -1.0f, 0.8f);\n  // engines_.RegisterInstance(&bass_drum_engine_, true, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&snare_drum_engine_, true, 0.8f, 0.8f);\n  // engines_.RegisterInstance(&hi_hat_engine_, true, 0.8f, 0.8f);\n  \n  // for (int i = 0; i < engines_.size(); ++i) {\n  //   // All engines will share the same RAM space.\n  //   allocator->Free();\n  //   engines_.get(i)->Init(allocator);\n  // }\n  \n  // engine_quantizer_.Init(engines_.size(), 0.05f, true);\n  // previous_engine_index_ = -1;\n  // reload_user_data_ = false;\n  // engine_cv_ = 0.0f;\n  \n  out_post_processor_.Init();\n  aux_post_processor_.Init();\n\n  decay_envelope_.Init();\n  lpg_envelope_.Init();\n  \n  trigger_state_ = false;\n  previous_note_ = 0.0f;\n  \n  trigger_delay_.Init(trigger_delay_line_);\n}\n\nvoid Voice::Render(\n    Engine* e,\n    const Patch& patch,\n    const Modulations& modulations,\n    float* out,\n    float* aux,\n    size_t size) {\n  // Trigger, LPG, internal envelope.\n      \n  // Delay trigger by 1ms to deal with sequencers or MIDI interfaces whose\n  // CV out lags behind the GATE out.\n  trigger_delay_.Write(modulations.trigger);\n  float trigger_value = trigger_delay_.Read(kTriggerDelay);\n  \n  bool previous_trigger_state = trigger_state_;\n  if (!previous_trigger_state) {\n    if (trigger_value > 0.3f) {\n      trigger_state_ = true;\n      if (!modulations.level_patched) {\n        lpg_envelope_.Trigger();\n      }\n      decay_envelope_.Trigger();\n      //engine_cv_ = modulations.engine;\n    }\n  } else {\n    if (trigger_value < 0.1f) {\n      trigger_state_ = false;\n    }\n  }\n  if (!modulations.trigger_patched) {\n    //engine_cv_ = modulations.engine;\n  }\n\n  int engine_index = patch.engine;\n  // Engine selection.\n  // int engine_index = engine_quantizer_.Process(\n  //     patch.engine,\n  //     engine_cv_);\n  \n  // Engine* e = engines_.get(engine_index);\n  \n  // if (engine_index != previous_engine_index_ || reload_user_data_) {\n  //   UserData user_data;\n  //   const uint8_t* data = user_data.ptr(engine_index);\n  //   if (!data && engine_index >= 2 && engine_index <= 4) {\n  //     data = fm_patches_table[engine_index - 2];\n  //   }\n  //   e->LoadUserData(data);\n  //   e->Reset();\n\n  //   out_post_processor_.Reset();\n  //   previous_engine_index_ = engine_index;\n  //   reload_user_data_ = false;\n  // }\n  EngineParameters p;\n\n  bool rising_edge = trigger_state_ && !previous_trigger_state;\n  float note = (modulations.note + previous_note_) * 0.5f;\n  previous_note_ = modulations.note;\n  const PostProcessingSettings& pp_s = e->post_processing_settings;\n\n  if (modulations.trigger_patched) {\n    p.trigger = (rising_edge ? TRIGGER_RISING_EDGE : TRIGGER_LOW) | \\\n      (trigger_state_ ? TRIGGER_HIGH : TRIGGER_LOW);\n  } else {\n    p.trigger = TRIGGER_UNPATCHED;\n  }\n  \n  const float short_decay = (200.0f * kBlockSize) / kSampleRate *\n      SemitonesToRatio(-96.0f * patch.decay);\n\n  decay_envelope_.Process(short_decay * 2.0f);\n\n  float compressed_level = 1.3f * modulations.level / (0.3f + fabsf(modulations.level));\n  CONSTRAIN(compressed_level, 0.0f, 1.0f);\n  p.accent = modulations.level_patched ? compressed_level : 0.8f;\n\n  bool use_internal_envelope = modulations.trigger_patched;\n\n  // Actual synthesis parameters.\n  \n  p.harmonics = patch.harmonics + modulations.harmonics;\n  CONSTRAIN(p.harmonics, 0.0f, 1.0f);\n\n  float internal_envelope_amplitude = 1.0f;\n  float internal_envelope_amplitude_timbre = 1.0f;\n  if (engine_index == 15) {\n    internal_envelope_amplitude = 2.0f - p.harmonics * 6.0f;\n    CONSTRAIN(internal_envelope_amplitude, 0.0f, 1.0f);\n    auto& speech_engine_ = *static_cast<SpeechEngine*>(e);\n    speech_engine_.set_prosody_amount(\n        !modulations.trigger_patched || modulations.frequency_patched ?\n            0.0f : patch.frequency_modulation_amount);\n    speech_engine_.set_speed( \n        !modulations.trigger_patched || modulations.morph_patched ?\n            0.0f : patch.morph_modulation_amount);\n  } else if (engine_index == 7) {\n    auto& chiptune_engine_ = *static_cast<ChiptuneEngine*>(e);\n    if (modulations.trigger_patched && !modulations.timbre_patched) {\n      // Disable internal envelope on TIMBRE, and enable the envelope generator\n      // built into the chiptune engine.\n      internal_envelope_amplitude_timbre = 0.0f;\n      chiptune_engine_.set_envelope_shape(patch.timbre_modulation_amount);\n    } else {\n      chiptune_engine_.set_envelope_shape(ChiptuneEngine::NO_ENVELOPE);\n    }\n  }\n  \n  p.note = ApplyModulations(\n      patch.note + note,\n      patch.frequency_modulation_amount,\n      modulations.frequency_patched,\n      modulations.frequency,\n      use_internal_envelope,\n      internal_envelope_amplitude * \\\n          decay_envelope_.value() * decay_envelope_.value() * 48.0f,\n      1.0f,\n      -119.0f,\n      120.0f);\n\n  p.timbre = ApplyModulations(\n      patch.timbre,\n      patch.timbre_modulation_amount,\n      modulations.timbre_patched,\n      modulations.timbre,\n      use_internal_envelope,\n      internal_envelope_amplitude_timbre * decay_envelope_.value(),\n      0.0f,\n      0.0f,\n      1.0f);\n\n  p.morph = ApplyModulations(\n      patch.morph,\n      patch.morph_modulation_amount,\n      modulations.morph_patched,\n      modulations.morph,\n      use_internal_envelope,\n      internal_envelope_amplitude * decay_envelope_.value(),\n      0.0f,\n      0.0f,\n      1.0f);\n\n  bool already_enveloped = pp_s.already_enveloped;\n  e->Render(p, \n    out ? out_buffer_ : nullptr, \n    aux ? aux_buffer_ : nullptr, \n    size, \n    &already_enveloped);\n  \n  bool lpg_bypass = already_enveloped || \\\n      (!modulations.level_patched && !modulations.trigger_patched);\n  \n  // Compute LPG parameters.\n  if (!lpg_bypass) {\n    const float hf = patch.lpg_colour;\n    const float decay_tail = (20.0f * kBlockSize) / kSampleRate *\n        SemitonesToRatio(-72.0f * patch.decay + 12.0f * hf) - short_decay;\n    \n    if (modulations.level_patched) {\n      lpg_envelope_.ProcessLP(compressed_level, short_decay, decay_tail, hf);\n    } else {\n      const float attack = NoteToFrequency(p.note) * float(kBlockSize) * 2.0f;\n      lpg_envelope_.ProcessPing(attack, short_decay, decay_tail, hf);\n    }\n  } else {\n    lpg_envelope_.Init();\n  }\n  \n  if(out)\n    out_post_processor_.Process(\n        pp_s.out_gain,\n        lpg_bypass,\n        lpg_envelope_.gain(),\n        lpg_envelope_.frequency(),\n        lpg_envelope_.hf_bleed(),\n        out_buffer_,\n        out,\n        size,\n        1);\n\n  if(aux)\n    aux_post_processor_.Process(\n        pp_s.aux_gain,\n        lpg_bypass,\n        lpg_envelope_.gain(),\n        lpg_envelope_.frequency(),\n        lpg_envelope_.hf_bleed(),\n        aux_buffer_,\n        aux,\n        size,\n        1);\n}\n  \n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/dsp/voice.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Main synthesis voice.\n\n#ifndef PLAITS_DSP_VOICE_H_\n#define PLAITS_DSP_VOICE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/limiter.h\"\n#include \"stmlib/utils/buffer_allocator.h\"\n\n#include \"plaits/dsp/engine/additive_engine.h\"\n#include \"plaits/dsp/engine/bass_drum_engine.h\"\n#include \"plaits/dsp/engine/chord_engine.h\"\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/engine/fm_engine.h\"\n#include \"plaits/dsp/engine/grain_engine.h\"\n#include \"plaits/dsp/engine/hi_hat_engine.h\"\n#include \"plaits/dsp/engine/modal_engine.h\"\n#include \"plaits/dsp/engine/noise_engine.h\"\n#include \"plaits/dsp/engine/particle_engine.h\"\n#include \"plaits/dsp/engine/snare_drum_engine.h\"\n#include \"plaits/dsp/engine/speech_engine.h\"\n#include \"plaits/dsp/engine/string_engine.h\"\n#include \"plaits/dsp/engine/swarm_engine.h\"\n#include \"plaits/dsp/engine/virtual_analog_engine.h\"\n#include \"plaits/dsp/engine/waveshaping_engine.h\"\n#include \"plaits/dsp/engine/wavetable_engine.h\"\n\n#include \"plaits/dsp/engine2/chiptune_engine.h\"\n#include \"plaits/dsp/engine2/phase_distortion_engine.h\"\n#include \"plaits/dsp/engine2/six_op_engine.h\"\n#include \"plaits/dsp/engine2/string_machine_engine.h\"\n#include \"plaits/dsp/engine2/virtual_analog_vcf_engine.h\"\n#include \"plaits/dsp/engine2/wave_terrain_engine.h\"\n\n#include \"plaits/dsp/envelope.h\"\n\n#include \"plaits/dsp/fx/low_pass_gate.h\"\n\nnamespace plaits {\n\nconst int kMaxEngines = 24;\nconst int kMaxTriggerDelay = 8;\nconst int kTriggerDelay = 0;\n\nclass ChannelPostProcessor {\n public:\n  ChannelPostProcessor() { }\n  ~ChannelPostProcessor() { }\n  \n  void Init() {\n    lpg_.Init();\n    Reset();\n  }\n  \n  void Reset() {\n    limiter_.Init();\n  }\n  \n  void Process(\n      float gain,\n      bool bypass_lpg,\n      float low_pass_gate_gain,\n      float low_pass_gate_frequency,\n      float low_pass_gate_hf_bleed,\n      float* in,\n      float* out,\n      size_t size,\n      size_t stride) {\n    if (gain < 0.0f) {\n      limiter_.Process(-gain, in, size);\n    }\n    const float post_gain = (gain < 0.0f ? 1.0f : gain);\n    if (!bypass_lpg) {\n      lpg_.Process(\n          post_gain * low_pass_gate_gain,\n          low_pass_gate_frequency,\n          low_pass_gate_hf_bleed,\n          in,\n          out,\n          size,\n          stride);\n    } else {\n      while (size--) {\n        *out = *in++ * post_gain;\n        out += stride;\n      }\n    }\n  } \n private:\n  stmlib::Limiter limiter_;\n  LowPassGate lpg_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ChannelPostProcessor);\n};\n\nstruct Patch {\n  float note;\n  float harmonics;\n  float timbre;\n  float morph;\n  float frequency_modulation_amount;\n  float timbre_modulation_amount;\n  float morph_modulation_amount;\n\n  int engine;\n  float decay;\n  float lpg_colour;\n};\n\nstruct Modulations {\n  float engine;\n  float note;\n  float frequency;\n  float harmonics;\n  float timbre;\n  float morph;\n  float trigger;\n  float level;\n\n  bool frequency_patched;\n  bool timbre_patched;\n  bool morph_patched;\n  bool trigger_patched;\n  bool level_patched;\n};\n\n// char (*__foo)[sizeof(HiHatEngine)] = 1;\n\n\nclass Voice {\n public:\n  Voice() { }\n  ~Voice() { }\n  \n  void Init();\n  void ReloadUserData() {\n    reload_user_data_ = true;\n  }\n  void Render(\n      Engine* engine,\n      const Patch& patch,\n      const Modulations& modulations,\n      float* out,\n      float* aux,\n      size_t size);\n    \n private:\n  void ComputeDecayParameters(const Patch& settings);\n  \n  inline float ApplyModulations(\n      float base_value,\n      float modulation_amount,\n      bool use_external_modulation,\n      float external_modulation,\n      bool use_internal_envelope,\n      float envelope,\n      float default_internal_modulation,\n      float minimum_value,\n      float maximum_value) {\n    float value = base_value;\n    modulation_amount *= std::max(fabsf(modulation_amount) - 0.05f, 0.05f);\n    modulation_amount *= 1.05f;\n    \n    float modulation = use_external_modulation\n        ? external_modulation\n        : (use_internal_envelope ? envelope : default_internal_modulation);\n    value += modulation_amount * modulation;\n    CONSTRAIN(value, minimum_value, maximum_value);\n    return value;\n  }\n\n  // VirtualAnalogEngine virtual_analog_engine_;\n  // WaveshapingEngine waveshaping_engine_;\n  // FMEngine fm_engine_;\n  // GrainEngine grain_engine_;\n  // AdditiveEngine additive_engine_;\n  // WavetableEngine wavetable_engine_;\n  // ChordEngine chord_engine_;\n  // SpeechEngine speech_engine_;\n\n  // SwarmEngine swarm_engine_;\n  // NoiseEngine noise_engine_;\n  // ParticleEngine particle_engine_;\n  // StringEngine string_engine_;\n  // ModalEngine modal_engine_;\n  // BassDrumEngine bass_drum_engine_;\n  // SnareDrumEngine snare_drum_engine_;\n  // HiHatEngine hi_hat_engine_;\n  \n  // VirtualAnalogVCFEngine virtual_analog_vcf_engine_;\n  // PhaseDistortionEngine phase_distortion_engine_;\n  // SixOpEngine six_op_engine_;\n  // WaveTerrainEngine wave_terrain_engine_;\n  // StringMachineEngine string_machine_engine_;\n  // ChiptuneEngine chiptune_engine_;\n\n  // stmlib::HysteresisQuantizer2 engine_quantizer_;\n  \n  bool reload_user_data_;\n  // int previous_engine_index_;\n  // float engine_cv_;\n  \n  float previous_note_;\n  bool trigger_state_;\n  \n  DecayEnvelope decay_envelope_;\n  LPGEnvelope lpg_envelope_;\n  \n  float trigger_delay_line_[kMaxTriggerDelay];\n  DelayLine<float, kMaxTriggerDelay> trigger_delay_;\n  \n  ChannelPostProcessor out_post_processor_;\n  ChannelPostProcessor aux_post_processor_;\n  \n  //EngineRegistry<kMaxEngines> engines_;\n  \n  float out_buffer_[kMaxBlockSize];\n  float aux_buffer_[kMaxBlockSize];\n  \n  DISALLOW_COPY_AND_ASSIGN(Voice);\n};\n\n}  // namespace plaits\n\n#endif  // PLAITS_DSP_VOICE_H_\n"
  },
  {
    "path": "lib/plaits/resources.cc",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"plaits/resources.h\"\n\n#ifndef FLASHMEM\n#define FLASHMEM\n#endif\n\nnamespace plaits {\n\nconst uint8_t syx_bank_0[] FLASHMEM = {\n      99,     58,     99,     60,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      56,      0,     79,      2,\n       0,     99,     99,     99,\n      60,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     50,\n       2,      0,     99,     99,\n      99,     66,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     56,      0,\n      70,      0,      0,     99,\n      41,     99,     65,     99,\n       0,      0,      0,      0,\n       0,      0,      0,     56,\n       0,     99,      0,      0,\n      99,     99,     99,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,      0,      0,      2,\n       0,     99,     99,     99,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,      0,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     13,     15,\n      35,      0,      0,      0,\n      49,     12,     83,     79,\n      76,     73,     68,     32,\n      66,     65,     83,     83,\n      85,     55,     55,     65,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      56,      0,     85,      2,\n      50,     80,     50,     40,\n      65,     99,     95,      0,\n       0,     27,      0,     20,\n       3,     56,      0,     80,\n       2,      0,     90,     30,\n      14,     65,     99,     95,\n      85,      0,     39,      0,\n      15,      3,     56,      0,\n      99,      0,      0,     90,\n      30,     14,     65,     99,\n      95,     85,      0,     27,\n       0,     10,      3,     56,\n       0,     80,      0,      0,\n      90,     30,     14,     65,\n      99,     95,     85,      0,\n      39,      0,     10,      3,\n      56,      0,     99,      0,\n       0,     90,     30,     14,\n      65,     99,     95,     85,\n       0,     39,      0,     15,\n       3,     56,      0,     99,\n       0,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     25,     14,\n      35,      0,      0,      0,\n      49,     12,     77,    111,\n     111,    103,    101,    114,\n      32,     76,    111,    119,\n      99,     99,     99,     39,\n      99,     99,     99,      0,\n      81,      0,      0,      0,\n      65,     20,     70,      4,\n       0,     49,     19,      0,\n      49,     99,     99,     99,\n       0,     55,      0,     99,\n       0,     63,      3,     75,\n       4,      0,     70,     39,\n      29,     33,     99,      9,\n       0,      0,      0,      0,\n       0,      0,     34,     12,\n      95,      0,      0,     70,\n      29,     29,     54,     99,\n       9,      0,      0,      0,\n       0,      0,      0,     80,\n       0,     99,      0,      0,\n      99,     70,     19,      9,\n      99,     59,      0,      0,\n       0,      0,      0,      0,\n      56,      0,     99,      6,\n       0,     70,     18,     18,\n      32,     99,     29,      0,\n       0,      0,      0,      0,\n       0,     63,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      5,      0,\n      35,      0,      0,      0,\n      49,     12,     76,    101,\n      97,    100,    101,    114,\n      84,     97,    112,    101,\n      90,     42,      7,     55,\n      90,     30,     99,      0,\n       0,      0,      0,      0,\n      56,      8,     99,      0,\n       0,     88,     96,     32,\n      30,     79,     65,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     65,\n       2,      0,     99,     20,\n       0,     99,     99,      0,\n      99,      0,      0,      0,\n       0,      0,     56,      8,\n      89,      0,      0,     95,\n      62,     17,     58,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n      12,     99,      0,      0,\n      99,     55,      0,     90,\n      99,     76,     99,      0,\n      48,      6,      0,      3,\n      56,      8,     96,      2,\n       0,     99,     99,     90,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,     12,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      1,     13,\n      35,      0,      0,      0,\n      49,     12,     77,     79,\n      82,     72,     79,     76,\n      32,     84,     66,     49,\n      25,     50,     24,     55,\n      96,     97,      0,      0,\n       0,      0,      0,      0,\n      65,      0,     91,      0,\n       0,     99,      0,      0,\n       0,     99,      0,      0,\n       0,     34,      0,     32,\n       0,     56,      8,     66,\n       2,      1,     80,     44,\n      28,     53,     86,     57,\n       0,      0,      0,      0,\n       0,      0,     60,     16,\n      99,      0,      0,     27,\n      25,     32,     30,     85,\n      78,      0,      0,      0,\n       0,      0,      0,    112,\n      14,     99,      0,      0,\n      28,     37,     42,     50,\n      99,      0,      0,      0,\n      41,      0,     35,      0,\n      56,      8,     74,      0,\n       3,     89,     30,     28,\n      63,     99,     90,      0,\n       0,     48,      0,     32,\n       0,     59,      8,     99,\n       0,      1,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     16,     15,\n      31,     33,      0,      0,\n      24,     12,     66,     65,\n      83,     83,     32,     32,\n      32,     32,     51,     32,\n      94,     56,     24,     80,\n      93,     28,      0,      0,\n       0,      0,      0,      0,\n      57,      0,     99,      8,\n       0,     99,     50,     50,\n      80,     99,      0,      0,\n       0,     52,     75,      0,\n       0,     63,      0,     99,\n       0,      0,     90,     60,\n      16,     80,     90,     30,\n       0,      0,      0,      0,\n       0,      0,     61,      0,\n      92,     10,      0,     99,\n      50,     20,     53,     79,\n      65,      0,      0,      0,\n       0,      0,      0,     62,\n       0,     90,      0,      0,\n      99,     10,     50,     57,\n      99,      0,      0,      0,\n      41,      0,      0,      0,\n      63,      4,     80,      0,\n       0,     96,     10,     17,\n      63,     99,     95,      0,\n       0,     36,     57,     14,\n       3,     63,      0,     99,\n       0,      0,     94,     67,\n      96,     57,     50,     50,\n      50,     50,     15,     15,\n      50,     25,     99,      0,\n       0,     24,     66,     73,\n      76,     76,     32,     66,\n      65,     83,     83,     32,\n      94,     56,     24,     55,\n      93,     28,      0,      0,\n       0,      0,      0,      0,\n      57,     28,     85,     18,\n       0,     99,      0,      0,\n       0,     99,      0,      0,\n       0,     52,     75,      0,\n       0,     63,     12,     62,\n       0,      0,     90,     42,\n       7,     55,     90,     30,\n       0,      0,      0,      0,\n       0,      0,     61,     20,\n      93,     10,      0,     88,\n      96,     32,     30,     79,\n      65,      0,      0,      0,\n       0,      0,      0,     62,\n      12,     99,      0,      0,\n      99,     20,      0,      0,\n      99,      0,      0,      0,\n      41,      0,      0,      0,\n      63,      0,     80,      0,\n       0,     95,     62,     17,\n      58,     99,     95,     32,\n       0,     36,     57,     14,\n       3,     63,      0,     99,\n       0,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     15,     15,\n      35,      0,      0,      0,\n      48,     12,     66,     65,\n      83,     83,     32,     32,\n      32,     32,     49,     32,\n      99,     99,     62,     99,\n      99,     99,      0,      0,\n       0,      0,      0,      0,\n      60,     20,     99,     12,\n       0,     99,     99,     38,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       0,     61,     28,     70,\n      18,      0,     59,     99,\n      41,     71,     99,     99,\n       0,      0,      0,      0,\n       0,      0,     53,     28,\n      63,     18,      0,     59,\n      99,     99,     71,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     61,\n       0,     75,      0,      0,\n      59,     99,     22,     71,\n      99,     86,      0,      0,\n       0,      0,      0,      0,\n     101,     20,     69,      6,\n       0,     99,     64,     33,\n      71,     99,     86,      0,\n       0,      0,      0,      0,\n       0,     72,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     16,     15,\n      35,      0,      0,      0,\n      49,     24,     69,     76,\n      69,     67,     32,     66,\n      65,     83,     83,     32,\n      64,     54,     40,     72,\n      81,     83,      0,      0,\n      43,      0,     18,      0,\n      69,     16,     62,     12,\n      25,     99,     99,     99,\n      64,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     60,      4,     71,\n       2,      0,     99,     99,\n      99,     66,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     51,      4,\n      90,      0,      0,     82,\n      52,     23,     67,     99,\n      99,      0,      0,      0,\n       0,      0,      0,     60,\n       0,     99,      1,     26,\n      93,     72,     39,     57,\n      93,     99,     92,      0,\n       0,      0,      0,      0,\n      56,      8,     90,      0,\n       0,     80,     26,     18,\n      59,     99,     97,      0,\n       0,      0,      0,      0,\n       0,     60,      0,     99,\n       1,     10,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     11,     13,\n      35,      0,      0,      0,\n      49,     12,     83,     46,\n      66,     65,     83,     32,\n      50,     55,     46,     55,\n      95,     90,     18,     32,\n      99,     50,     99,     99,\n       0,      0,     20,      0,\n     104,      0,     83,     10,\n       0,     95,     90,     18,\n      26,     99,     84,     99,\n      99,      0,      0,     20,\n       0,      8,      4,     94,\n       2,      0,     95,     90,\n      18,     32,     99,     50,\n      99,     99,      0,      0,\n      20,      0,      8,     15,\n      83,     14,      0,     95,\n      90,     18,     31,     99,\n      84,     99,     99,      0,\n       0,     20,      0,    112,\n       0,     94,      2,      0,\n      63,     15,     99,     28,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n       3,      0,     80,      0,\n       0,     63,     15,     99,\n      28,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     83,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     15,     14,\n      50,     44,     36,     99,\n      22,     36,     82,     69,\n      83,     79,     78,     65,\n      78,     67,     69,     83,\n      99,     39,     32,     71,\n      99,     98,     70,      0,\n      39,      0,     59,      3,\n      56,      0,     80,      0,\n       0,     99,     39,     32,\n      71,     99,     98,     70,\n       0,     39,      0,      0,\n      15,     64,      0,     99,\n       0,      0,     99,     39,\n      32,     71,     99,     98,\n      70,      0,     39,      0,\n       0,      3,     40,      0,\n      99,      0,      0,     99,\n      39,     32,     71,     99,\n      98,     70,      0,     39,\n       0,      0,     15,     32,\n       0,     99,      2,      0,\n      99,     39,     32,     46,\n      99,     98,     70,      0,\n      39,      0,      0,     15,\n     112,      4,     89,      0,\n       0,     99,     25,     25,\n      61,     99,     98,     70,\n       0,     39,      0,      0,\n      15,    112,      0,     99,\n       4,      0,     84,     95,\n      95,     60,     50,     50,\n      50,     50,      8,     14,\n      37,      0,      0,      0,\n      56,     12,     83,     89,\n      78,     45,     66,     65,\n      83,     83,     32,     50,\n      85,     16,     75,     61,\n      88,     44,     25,      0,\n      15,      0,     62,      4,\n      34,     24,     80,     16,\n       0,     85,     38,     75,\n      61,     88,     44,     25,\n       0,     48,      0,      0,\n       0,     58,     16,     86,\n       2,      0,     85,     28,\n      75,     61,     88,     44,\n      25,      0,     48,      0,\n       0,      0,     90,     16,\n      98,      0,      0,     98,\n      72,     75,     61,     99,\n      89,     99,      0,     32,\n       0,      0,      1,     51,\n      12,     99,      0,      0,\n      74,     28,     29,     61,\n      99,     71,     71,      0,\n      48,      0,      0,      0,\n      90,      8,     92,      0,\n       0,     98,     72,     75,\n      61,     99,     99,     99,\n       0,     32,      0,      0,\n       1,     64,      8,     99,\n       0,      0,      0,      0,\n       0,      0,     50,     50,\n      50,     50,      7,     13,\n      30,     23,      0,      0,\n      40,     24,     80,     82,\n      67,     32,     83,     89,\n      78,     84,     72,     49,\n      99,     25,     25,     54,\n      99,     98,     90,      0,\n      31,      0,     99,     12,\n     115,      8,     80,      0,\n       0,     75,     25,     25,\n      34,     99,     96,     90,\n       0,     31,     99,      0,\n       3,     48,      8,     99,\n       2,      0,     99,     25,\n      25,      0,     99,     96,\n      96,      0,     43,      0,\n      99,     12,      0,      8,\n      99,      0,      0,     75,\n      25,     25,     39,     99,\n      96,     96,      0,     31,\n      99,      0,      3,     64,\n       8,     99,      1,      0,\n      99,     25,     25,     36,\n      99,     96,     96,      0,\n      31,      0,     99,     12,\n     112,      8,     99,      0,\n       0,     75,     25,     25,\n      39,     99,     96,     96,\n       0,     43,     99,      0,\n       3,     48,      0,     99,\n       1,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      5,     11,\n      35,      0,      0,      0,\n      39,     24,     67,     82,\n      79,     77,     65,     32,\n      50,     32,     32,     32,\n      60,     16,     42,     59,\n      99,     44,     30,      0,\n      49,      2,      0,      3,\n     112,      8,     47,      4,\n       0,     60,     32,     12,\n      61,     99,     80,     60,\n       0,     50,      0,     36,\n       3,     80,     12,     91,\n       4,      0,     88,     31,\n      29,     60,     99,     92,\n      60,      0,     53,     17,\n       0,      3,    113,      4,\n      60,      2,      0,     81,\n      39,     27,     60,     99,\n      74,     84,      0,     42,\n       0,      0,      0,     16,\n      13,     96,      2,      0,\n      61,     32,     23,     62,\n      99,     71,     39,      0,\n      46,      3,     35,      3,\n      16,     14,     91,      4,\n       0,     99,     57,     24,\n      61,     99,     94,     90,\n       0,     98,      0,      0,\n      15,     88,      9,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     11,      5,\n      42,      0,      0,      0,\n      49,     12,     65,     78,\n      65,     76,     79,     71,\n      32,     32,     52,     32,\n      99,     57,     24,     81,\n      99,     82,     58,     79,\n      45,     21,     17,      3,\n     112,     16,     61,     10,\n       0,     99,     50,     15,\n      41,     99,     72,     61,\n      87,     34,      0,     78,\n       7,     96,     20,     92,\n       6,      0,     99,     46,\n      22,     80,     99,     60,\n      57,     78,     53,      7,\n       2,     15,     88,      8,\n      91,      2,      0,     99,\n      30,     27,     67,     99,\n      99,     57,      0,      0,\n       0,      0,      0,     16,\n       4,     99,      2,      0,\n      90,     50,     48,     90,\n      99,     92,     42,      0,\n      57,      2,     17,     15,\n      16,      4,     80,      4,\n       0,     99,     27,     26,\n      73,     99,     96,     60,\n       0,     98,     99,     99,\n      15,    112,      4,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      8,      7,\n      35,      0,      0,      0,\n      49,     12,     65,     78,\n      65,     76,     79,     71,\n      32,     65,     32,     32,\n      99,     57,     42,     81,\n      99,     75,     53,     79,\n      15,     28,     99,      3,\n     112,     20,     69,     10,\n       0,     99,     32,     62,\n      41,     99,     39,     69,\n      87,     34,     48,      7,\n       7,     56,     20,     57,\n       4,      0,     99,     46,\n      22,     80,     99,     31,\n      89,     78,     53,      7,\n      41,     11,     56,      8,\n      91,      2,      0,     99,\n      39,     27,     67,     94,\n      99,     28,      0,      0,\n       0,      0,      0,     56,\n       8,     99,      2,      0,\n      99,     50,     23,     90,\n      99,     71,     71,      0,\n      99,     99,     99,     15,\n     112,     28,     99,      2,\n       0,     99,     57,     46,\n      73,     60,     94,     99,\n       0,     98,     99,     99,\n      15,     56,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      7,      5,\n      35,      0,      0,      0,\n      49,     12,     65,     78,\n      65,     76,     79,     71,\n      32,     32,     54,     32,\n      99,     80,     80,     80,\n      99,     99,     99,     99,\n      39,     10,     15,      3,\n      96,      0,     76,      2,\n       0,     99,     80,     80,\n      80,     99,     99,     99,\n      99,     39,      5,      0,\n       3,     56,      8,     80,\n       1,     23,     99,     80,\n      80,     80,     99,     99,\n      99,     99,      0,      0,\n       0,      0,     56,      0,\n      75,      1,      0,     50,\n      80,     80,     40,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       0,     99,      1,     32,\n      15,     80,     20,     30,\n      99,     92,     95,      0,\n       0,      0,      0,      0,\n     112,      4,     97,      2,\n       0,     80,     10,     99,\n      30,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     32,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      1,     11,\n      35,     50,     30,      0,\n      16,     12,     67,     83,\n      32,     56,     48,     32,\n      32,     32,     32,     32,\n      52,     42,     39,     25,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       0,      0,     77,      4,\n       0,     52,     42,     39,\n      25,     99,     99,     99,\n       0,      0,      0,      0,\n       0,    116,      8,     77,\n       1,      0,     52,     42,\n      39,     25,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     56,      0,\n      50,      4,      0,     99,\n      42,     39,     25,     99,\n      88,     99,      0,      0,\n       0,      0,      0,     62,\n       4,     99,      4,      0,\n      35,     42,     39,     25,\n      99,     88,     89,      0,\n       0,      0,      0,      0,\n      96,      0,     81,      0,\n       0,     61,     42,     39,\n      25,     99,     99,     99,\n       0,      0,      0,      0,\n       0,    101,     16,     99,\n       0,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      6,      7,\n      26,      0,      5,      0,\n      49,     12,     73,     78,\n      83,     69,     82,     84,\n      32,     49,     32,     32,\n      99,      0,      0,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       5,      0,     30,      2,\n       0,     99,     42,     71,\n      34,     99,     99,     99,\n       0,      0,      0,      0,\n       0,    113,      0,     95,\n       2,      0,     81,     70,\n       9,     15,     99,     81,\n       0,      0,      0,      0,\n       0,      0,     62,      0,\n      91,      2,     50,     80,\n      49,     19,     30,     99,\n      91,      0,      0,      0,\n       0,      0,      0,     58,\n       0,     98,      0,      0,\n      99,      0,      0,      0,\n      39,     99,     99,      0,\n       0,      0,      0,      0,\n     103,      0,     88,      0,\n       0,     99,     42,     71,\n      35,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     59,      0,     95,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      0,     15,\n      25,     15,      0,      0,\n      55,     36,     83,     80,\n      73,     82,     65,     76,\n      32,     32,     32,     32,\n      99,     99,     99,      7,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n     104,      0,     67,      6,\n       0,     69,     64,     39,\n      41,     99,     78,     94,\n       0,      0,      0,      0,\n       0,     72,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     99,     99,\n      99,      0,      0,      0,\n       0,      0,    104,      0,\n      66,      4,     25,     99,\n      99,     99,     99,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       0,     99,      0,      0,\n      98,     68,     99,     99,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      56,      0,     58,     14,\n       0,     99,     99,     99,\n      41,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n       0,      0,     99,     99,\n      99,     99,     51,     50,\n      50,     50,      5,     15,\n      24,      0,      2,      0,\n      51,     24,     68,     88,\n      45,     84,     82,     79,\n      84,     84,     32,     32,\n      95,     82,     31,     35,\n      99,     95,      0,      0,\n      39,     99,     99,     11,\n      91,     16,     85,     10,\n       0,     95,     77,     55,\n      40,     99,     95,      0,\n       0,     39,      0,     40,\n       4,     27,     11,     99,\n      32,      0,     95,     84,\n      20,     25,     99,      0,\n       0,      0,     38,      0,\n       0,     10,     59,      4,\n      99,     22,      0,     96,\n      25,     25,     30,     99,\n      75,      0,      0,     38,\n       0,      0,     10,     59,\n       8,     99,      2,      0,\n      99,     46,     35,      0,\n      80,     75,     55,      0,\n      39,     99,     99,      8,\n      60,      8,     82,     24,\n       0,     95,     47,     30,\n      30,     99,     92,      0,\n       0,      2,      0,      0,\n      10,     59,      4,     99,\n       0,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     27,      7,\n      34,      0,      0,      0,\n       1,     24,     71,     65,\n      83,     72,     65,     85,\n      83,     32,     32,     32,\n      95,     46,     28,     24,\n      94,     70,      0,      0,\n       0,      0,      0,      0,\n       6,      5,     90,     42,\n       0,     95,     35,     99,\n      28,     99,     70,      0,\n       0,     51,      0,     35,\n       3,     92,      8,     79,\n      10,      0,     95,     32,\n      49,     33,     99,     70,\n       0,      0,      0,      0,\n       0,      0,     27,      0,\n      99,      6,      0,     95,\n      50,     44,     10,     99,\n      70,      0,      0,     58,\n       0,     37,      0,     11,\n       4,     77,      6,      0,\n      95,     46,     99,     12,\n      99,     70,      0,      0,\n      51,      8,      0,      3,\n      43,      8,     75,      0,\n       0,     95,     32,     45,\n      31,     99,     70,      0,\n       0,      0,      0,      0,\n       0,     99,      4,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     10,     14,\n      34,     33,      0,      0,\n      23,     12,     82,     73,\n      78,     71,     32,     68,\n      73,     78,     71,     32,\n      99,     99,     60,     80,\n      99,     99,     80,     90,\n      39,      0,     10,      0,\n      96,     16,     85,     22,\n       0,     75,     99,     50,\n      80,     99,     99,     90,\n      90,      0,      0,      0,\n       0,    112,      4,     80,\n       4,      0,     99,     99,\n      99,     70,     99,     99,\n      99,      0,      0,      0,\n       0,      0,    112,      0,\n      99,      2,      0,     99,\n      99,     60,     80,     99,\n      99,     80,     90,     39,\n       0,     10,      0,     16,\n      16,     90,     22,      0,\n      75,     99,     50,     80,\n      99,     99,     90,     90,\n       0,      0,      0,      0,\n       0,      4,     80,      4,\n       0,     99,     99,     99,\n      70,     99,     99,     99,\n       0,      0,      0,      0,\n       0,      0,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      2,      8,\n      35,      0,      0,      0,\n      17,     12,     80,     65,\n      80,     65,     71,     65,\n      89,     79,     32,     32,\n      99,     62,     99,     52,\n      99,     32,      0,      0,\n      39,     12,     12,     12,\n     127,     12,     99,     36,\n       0,     80,     85,     24,\n      46,     99,     90,      0,\n       0,      0,      0,      0,\n       0,    115,      8,     99,\n       4,      0,     80,     85,\n      24,     35,     99,     90,\n       0,      0,      0,      0,\n       0,      0,    107,     28,\n      99,      8,      0,     80,\n      59,     43,     35,     99,\n      74,      0,      0,     39,\n      12,     12,     12,     60,\n       8,     99,     30,      0,\n      80,     85,     24,     35,\n      99,     90,      0,      0,\n      39,      4,     12,     12,\n      58,      4,     99,      8,\n       0,     99,     28,     99,\n      35,     99,     25,      0,\n       0,     39,     12,     12,\n      12,     58,      4,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     22,     13,\n      34,     39,     38,      0,\n      33,     24,     87,     73,\n      78,     69,     71,     76,\n      65,     83,     83,     32,\n      63,     99,     99,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,      0,     90,     16,\n      11,     38,     99,     99,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     70,\n       2,      0,     37,     99,\n      99,     57,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     56,      2,\n      82,      0,      0,     55,\n      99,     99,     60,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       0,     90,     28,      0,\n      31,     99,     99,     21,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,      0,     99,      0,\n       0,     99,     99,     99,\n      52,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      0,     12,\n      35,      0,      0,     99,\n      49,      0,     65,     77,\n      89,     84,     65,     76,\n      32,     32,     32,     32,\n      99,     99,     99,      0,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,     28,     60,     62,\n       0,     99,     99,     99,\n       0,     99,     99,     99,\n       0,      0,      0,     15,\n       0,     56,     16,     80,\n      22,      0,     99,     99,\n      99,      0,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     56,      0,\n      70,      0,      0,     99,\n      80,     99,     99,     99,\n       0,      0,      0,      0,\n       0,      0,      0,     56,\n      28,     99,     63,     85,\n      99,     99,     99,     99,\n      99,     99,     99,      0,\n       0,      0,     15,      0,\n      56,      8,     99,      0,\n       0,     65,     99,     99,\n      46,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     58,      0,     99,\n       1,     30,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     17,      7,\n      35,      0,     30,      0,\n      22,     24,     70,     65,\n      73,     82,     76,     73,\n      71,     72,     84,     32,\n      94,     58,      0,      8,\n      99,     85,     75,      0,\n      38,     12,     54,      0,\n     112,      0,     53,     50,\n       0,     71,     15,      0,\n      15,     99,     69,     33,\n      64,     37,     17,      0,\n       0,    112,      0,     95,\n       0,      1,     99,     33,\n       0,     51,     99,     96,\n       0,      0,     40,      0,\n       8,      0,     64,      8,\n      99,      2,      1,     94,\n      58,      0,      8,     99,\n      85,     75,      0,     38,\n      17,     54,      0,     24,\n       0,     53,     50,      0,\n      71,     15,      0,     15,\n      99,     69,     33,     64,\n      37,     20,      0,      0,\n       8,      0,     96,      0,\n       1,     99,     33,      0,\n      51,     99,     96,      0,\n       0,     40,      0,      8,\n       0,     16,      8,     99,\n       2,      0,     99,     99,\n      43,     99,     50,     48,\n      50,     50,      3,      8,\n      50,      0,     29,      0,\n      25,     12,     42,     80,\n      80,     71,     42,     86,\n     111,    108,     46,     49,\n      80,     42,     38,     46,\n      99,     90,      0,      0,\n      51,      0,     17,      0,\n      56,      0,     63,     22,\n       1,     75,     24,     29,\n       6,     99,     89,      0,\n       0,     51,      0,      0,\n       0,      1,      4,     87,\n       0,      1,     57,     50,\n      56,     38,     99,     86,\n      99,      0,     17,      0,\n       0,      0,     43,      8,\n      99,      4,      1,     80,\n      42,     38,     46,     99,\n      90,      0,      0,     51,\n       0,     17,      0,     64,\n       0,     67,     22,      0,\n      75,     24,     29,      6,\n      99,     89,      0,      0,\n      51,      0,      0,      0,\n      41,      4,     87,      0,\n       0,     57,     50,     56,\n      38,     99,     86,     99,\n       0,     17,      0,      0,\n       0,     83,      8,     99,\n       4,      0,      0,      0,\n       0,      0,     50,     50,\n      50,     50,      2,      3,\n      19,     29,     35,      0,\n      24,     24,     42,     80,\n      80,     71,     42,     86,\n     111,    108,     46,     50,\n      80,     59,     24,     25,\n      99,     28,      0,      0,\n       0,      0,      0,      0,\n      57,      4,     99,      0,\n       0,     94,     52,     37,\n      17,     99,     86,      0,\n       0,     52,      0,      0,\n       0,     63,     12,     77,\n      38,      0,     90,     42,\n       7,     40,     90,     30,\n       0,      0,      0,      0,\n       0,      0,     61,     20,\n      93,     10,      0,     88,\n      96,     32,     42,     79,\n      65,      0,      0,      0,\n       0,      0,      0,     62,\n      12,     99,      0,      0,\n      99,     20,      0,      0,\n      99,      0,      0,      0,\n      41,      0,      0,      0,\n      63,     28,     99,      0,\n       0,     95,     62,     17,\n      39,     99,     95,     32,\n       0,     36,     57,     14,\n       3,    111,      0,     99,\n       0,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     15,     15,\n      35,      0,      0,      0,\n      48,     12,     42,     70,\n      97,    105,    114,    108,\n      46,     32,     51,     32,\n      65,     35,     32,     28,\n      98,     89,     89,      0,\n       0,      0,      0,      0,\n      56,     24,     67,     26,\n       0,     89,     37,     32,\n      28,     98,      0,      0,\n       0,      0,      0,      0,\n       0,     32,      0,     89,\n       0,      0,     75,      0,\n      87,     53,     99,     82,\n      94,      0,      0,      0,\n       0,      0,     88,      0,\n      71,      0,      1,     44,\n      56,     87,     75,     98,\n      75,     99,      0,      0,\n       0,      0,      0,     24,\n       0,     64,      1,     27,\n      75,      0,     87,     53,\n      99,     82,     94,      0,\n       0,      0,      0,      0,\n       0,      0,     92,      0,\n       1,     67,     56,     87,\n      75,     98,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     94,\n       1,     19,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     15,      7,\n      25,     71,      0,     99,\n      32,     12,     42,     86,\n     111,     99,    111,    100,\n     101,    114,     32,     50,\n      76,     69,     14,     35,\n      99,     66,      0,      0,\n      32,      0,      0,      4,\n      88,      0,     67,     18,\n       1,     64,     32,     21,\n      39,     99,     78,      0,\n       0,     42,      0,     19,\n       0,     24,      8,     99,\n       0,      3,     84,     42,\n      25,     51,     99,     97,\n       0,      0,     35,      0,\n       0,      3,     80,      8,\n      99,      1,     14,     76,\n      69,     14,     35,     99,\n      66,      0,      0,     32,\n       0,      0,      4,     48,\n       4,     70,     18,      0,\n      64,     32,     21,     39,\n      99,     78,      0,      0,\n      42,      0,     19,      0,\n      72,      8,     99,      0,\n       1,     84,     42,     25,\n      51,     99,     97,      0,\n       0,     35,      0,      0,\n       3,     88,      8,     99,\n       1,     10,     94,      3,\n      95,     60,     50,     50,\n      50,     50,      2,      2,\n      40,      0,      6,      0,\n      72,     36,     42,     83,\n     101,    113,    117,    101,\n     110,     99,    101,     32,\n      68,     19,      2,     34,\n      99,     65,     50,      0,\n      44,      0,      0,      0,\n      70,      8,     99,      8,\n       0,     88,     35,      5,\n      14,     99,     83,     86,\n       0,     51,      0,     20,\n       0,     48,      0,     73,\n       1,     45,     58,     35,\n       0,     45,     99,     80,\n      80,      0,     51,      0,\n       0,      0,     64,      0,\n      80,      0,     50,     99,\n      99,     99,     55,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       8,     99,      0,      0,\n      89,     35,      0,     34,\n      99,     83,     92,      0,\n      51,      0,      0,      1,\n      72,      0,     99,      0,\n       0,     80,     99,     99,\n      66,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n       1,      0,     99,     99,\n      94,     62,     48,     50,\n      50,     50,      7,     14,\n      35,     65,      1,      0,\n      48,     36,     66,    111,\n     117,    110,     99,    101,\n      32,     52,     32,     32,\n// };\n// const uint8_t syx_bank_1[] FLASHMEM = {\n      95,     29,     20,     50,\n      99,     95,      0,      0,\n      41,      0,     19,      0,\n     115,     24,     79,      2,\n       0,     95,     20,     20,\n      50,     99,     95,      0,\n       0,      0,      0,      0,\n       0,      3,      0,     99,\n       2,      0,     95,     29,\n      20,     50,     99,     95,\n       0,      0,      0,      0,\n       0,      0,     59,     24,\n      89,      2,      0,     95,\n      20,     20,     50,     99,\n      95,      0,      0,      0,\n       0,      0,      0,     59,\n       8,     99,      2,      0,\n      95,     50,     35,     78,\n      99,     75,      0,      0,\n       0,      0,      0,      0,\n      59,     28,     58,     28,\n       0,     96,     25,     25,\n      67,     99,     75,      0,\n       0,      0,      0,      0,\n       0,     83,      8,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      4,      6,\n      34,     33,      0,      0,\n      56,     24,     69,     46,\n      80,     73,     65,     78,\n      79,     32,     49,     32,\n      95,     29,     20,     50,\n      99,     95,      0,      0,\n      41,      0,     19,     12,\n     115,     24,     81,      2,\n       0,     95,     20,     20,\n      50,     99,     95,      0,\n       0,      0,      0,      0,\n       0,      3,      0,     99,\n       2,      0,     95,     25,\n      20,     50,     99,     95,\n       0,      0,      0,      0,\n       0,      0,     59,     24,\n      92,      2,      0,     95,\n      20,     20,     50,     99,\n      95,      0,      0,      0,\n       0,      0,      0,     59,\n       8,     99,      4,      0,\n      95,     50,     35,     78,\n      99,     75,      0,      0,\n       0,      0,      0,      0,\n      59,     28,     75,     42,\n       0,     96,     25,     25,\n      67,     99,     75,      0,\n       0,      0,      0,      0,\n       0,     80,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      4,     14,\n      34,     33,      0,      0,\n      54,     12,     70,     69,\n      78,     68,     69,     82,\n      32,     49,     32,     32,\n      95,     29,     59,     50,\n      99,     95,      0,      0,\n      41,      0,     19,      0,\n      99,     28,     39,     10,\n      80,     99,     99,     20,\n      50,     73,     96,      0,\n       0,     98,     99,      0,\n       2,     67,      0,     99,\n       2,      0,     95,     29,\n      20,     50,     99,     95,\n       0,      0,     99,     99,\n       0,      3,     63,     28,\n      85,      2,      0,     99,\n      20,     20,     50,     99,\n      95,      0,      0,     54,\n      87,      0,      2,      3,\n       8,     99,      2,      0,\n      99,     50,     35,     99,\n      94,     75,      0,      0,\n      99,     20,      0,      2,\n       7,     20,     99,     24,\n      25,     93,     25,     25,\n      67,     99,     75,      0,\n       0,     27,     99,      0,\n       0,     93,     28,     99,\n       4,     50,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      5,      6,\n      34,     33,      0,      0,\n       8,     12,     87,     73,\n      78,     84,     82,     72,\n      79,     68,     69,     83,\n      95,     39,     20,     50,\n      99,     73,      0,      0,\n      41,      0,     19,      0,\n     115,     12,     60,      2,\n       0,     95,     22,     20,\n      50,     99,     99,      0,\n       0,      0,      0,      0,\n       0,     83,     12,     99,\n       2,      0,     95,     22,\n      20,     50,     99,     99,\n       0,      0,      0,      0,\n       0,      0,     59,      0,\n      74,      2,      0,     95,\n      26,     20,     50,     99,\n      99,      0,      0,      0,\n       0,      0,      0,     59,\n      20,     99,      2,      0,\n      99,     46,     35,     78,\n      99,     80,      0,      0,\n       0,      0,      0,      0,\n      51,     16,     67,     32,\n       0,     99,     41,     25,\n      67,     99,     99,      0,\n       0,      0,      0,      0,\n       0,     59,     12,     99,\n       2,      0,     98,     98,\n      98,     98,     50,     50,\n      50,     50,      4,     14,\n      34,     33,      0,     99,\n      24,     24,     82,     83,\n      45,     69,     80,     32,\n      67,     32,     32,     32,\n      42,     51,     79,     50,\n      99,     16,      0,      0,\n      60,      0,     92,      0,\n      56,      8,     53,     18,\n      17,     77,     84,     79,\n       0,     99,      0,      0,\n       0,     46,     27,      0,\n       8,     59,     12,     95,\n      23,      5,     78,     26,\n      42,     67,     99,     21,\n       0,      0,     32,     55,\n      23,      0,     58,     20,\n      99,      2,      0,     75,\n      20,     25,     67,     99,\n      75,      0,      0,     37,\n       0,     59,      0,     47,\n      28,     66,     10,      0,\n      75,     20,     21,     68,\n      99,     99,      0,      0,\n      48,      0,     70,      0,\n      59,     20,     87,      2,\n       0,     75,     20,     21,\n      49,     99,     99,      0,\n       2,     91,      0,     67,\n       0,     59,     12,     99,\n       2,      0,     24,     12,\n      19,     59,     50,     50,\n      50,     50,      9,      8,\n      34,     33,     24,     12,\n       8,     12,     42,     77,\n      97,    114,    107,     32,\n      73,     73,     73,     32,\n      85,     38,     75,     61,\n      88,     44,     25,      0,\n       0,      0,      0,      0,\n      38,     28,     98,     28,\n       0,     85,     38,     75,\n      61,     88,     44,     25,\n       0,      0,      0,      0,\n       0,     58,     28,     67,\n      18,      0,     73,     35,\n      25,     61,     99,     93,\n       0,      0,      0,      0,\n       0,      0,     91,     28,\n      84,      2,      0,     73,\n      35,     25,     61,     99,\n      93,      0,      0,      0,\n       0,      0,      0,     51,\n       4,     99,      2,      0,\n      76,     64,     37,     61,\n      99,     94,      0,      0,\n       0,      0,      0,      0,\n      93,     12,     70,     20,\n       4,     73,     35,     25,\n      61,     99,     93,      0,\n       0,      0,      0,      0,\n       0,     67,      8,     99,\n       2,      0,     98,     98,\n      98,     98,     50,     50,\n      50,     50,      8,     15,\n      35,     23,      0,      0,\n      40,     24,     67,     76,\n      65,     86,     45,     69,\n      46,     80,     78,     79,\n      98,     26,     26,     27,\n      98,      0,      0,      0,\n       0,      0,      0,      0,\n      59,      4,     74,     30,\n       0,     99,     50,     26,\n      19,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     56,      4,     73,\n       6,      0,     99,     49,\n      17,     30,     99,     75,\n       0,      0,      0,      0,\n       0,      0,     63,      0,\n      61,     12,      0,     99,\n      19,     26,     23,     99,\n      72,      0,      0,      0,\n       0,      0,      0,     35,\n       0,     83,      0,      0,\n      99,     76,      0,      0,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      81,      0,     79,     23,\n      71,     92,     16,     98,\n      33,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     59,      4,     99,\n       0,      0,     82,     98,\n      75,     60,     50,     51,\n      50,     50,     16,     12,\n       0,      0,     38,      0,\n      23,     24,     83,     89,\n      78,     45,     67,     76,\n      65,     86,     32,     32,\n      98,     87,      0,      0,\n      87,     86,      0,      0,\n      32,      0,     21,      0,\n      59,     31,     77,     48,\n       0,     95,     95,      0,\n       0,     99,     96,     89,\n       0,     32,      0,      0,\n       0,     43,     24,     99,\n       0,      0,     95,     92,\n      28,     60,     99,     90,\n       0,      0,     32,      0,\n       0,      0,     59,     11,\n      99,      4,      0,     98,\n      87,      0,      0,     87,\n      86,      0,      0,     32,\n       0,     21,      0,     59,\n       4,     71,      2,      0,\n      95,     95,      0,      0,\n      99,     96,     89,      0,\n      32,      0,      0,      0,\n      51,      7,     99,      4,\n       0,     95,     92,     28,\n      60,     99,     90,      0,\n       0,     32,      0,      0,\n       0,     67,     12,     99,\n       0,      0,      0,      0,\n       0,      0,     50,     50,\n      50,     50,      2,     13,\n      50,      0,      0,      0,\n      11,     24,     67,     76,\n      65,     86,     73,     78,\n      69,     84,     32,     32,\n      94,      1,     33,     12,\n       4,     19,      0,      0,\n      53,      0,     38,      0,\n      58,      4,     67,     10,\n       0,     98,     20,      6,\n       2,     91,     90,      0,\n       0,     36,      0,      0,\n      15,     58,      4,     75,\n       2,      0,     70,     30,\n      23,     50,     99,     85,\n       0,      0,     32,      0,\n       0,      0,     60,     12,\n      99,      2,      0,     94,\n      21,     33,     12,     74,\n      19,      0,      0,     38,\n       0,     20,      0,     59,\n      28,     92,      6,      0,\n      98,     36,      6,     32,\n      91,     90,      0,      0,\n      50,     22,     50,      3,\n      58,      4,     72,      2,\n       0,     70,     30,     23,\n      50,     99,     85,      0,\n       0,     32,      0,      0,\n       0,     60,     12,     99,\n       2,      0,      0,      0,\n       0,      0,     50,     50,\n      50,     50,      2,     14,\n      30,      0,      0,      0,\n      32,     24,     80,     73,\n      65,     78,     79,     32,\n      32,     32,     53,     32,\n      97,     27,     20,     50,\n      99,     85,      0,      0,\n      41,     21,     90,      3,\n      67,      8,     71,     10,\n       0,     97,     27,     10,\n      25,     99,     86,     48,\n       0,      0,      0,      0,\n       0,     51,      8,     78,\n       2,      0,     88,     25,\n      28,     50,     99,     86,\n       0,      0,      0,      0,\n      99,      8,     58,      8,\n      99,      2,      0,     81,\n      25,     25,     14,     99,\n      99,     99,      0,     35,\n      17,     60,      3,     58,\n       8,     69,      8,      0,\n      99,      0,     25,      0,\n      99,     75,      0,      0,\n       0,      0,     14,      0,\n      74,      0,     89,      2,\n       0,     88,     25,     24,\n      48,     99,     93,      0,\n       0,      0,      0,     99,\n       8,     42,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     10,     13,\n      35,      0,      0,      0,\n      48,     12,     71,     82,\n      68,     32,     80,     73,\n      65,     78,     79,     49,\n      99,     29,     22,      4,\n      99,     95,      0,      0,\n      22,      4,     12,      3,\n      60,     12,     88,      6,\n       0,     99,     53,     19,\n      35,     99,     94,      0,\n       0,      0,      0,      5,\n       0,     25,      8,     76,\n       2,      0,     99,     51,\n      18,     51,     99,     94,\n       0,      0,      0,      0,\n       0,      0,     66,      4,\n      94,      2,      0,     99,\n      24,     22,      4,     99,\n      91,      4,      0,     22,\n       3,     32,      3,     27,\n      12,     88,      8,      0,\n      99,     38,     17,     35,\n      95,      0,     99,      0,\n       0,      0,      3,     12,\n      65,      8,     80,      2,\n       0,     99,     32,     18,\n      51,     99,     96,      0,\n       0,      0,      0,      0,\n       0,     11,      8,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      2,     12,\n      35,      0,      0,      0,\n       1,     12,     83,     84,\n      69,     73,     78,     87,\n      65,     89,     32,     32,\n      78,     73,     32,     46,\n      99,     71,      0,     90,\n      46,      0,      0,      3,\n      63,     12,     66,      7,\n      69,     74,     25,     24,\n      99,     99,     63,      0,\n      99,     62,      9,     36,\n       3,     60,      8,     76,\n      10,      0,     71,     16,\n      24,     35,     99,     27,\n      51,      0,     34,     11,\n       0,      7,     43,      4,\n      78,      6,      0,     71,\n      42,     24,     50,     99,\n      90,      0,      0,     25,\n       0,      0,     10,     61,\n      24,     99,      2,      0,\n      99,     49,     44,     70,\n       0,      0,      0,     99,\n      41,      0,      0,      0,\n      72,      0,     99,     22,\n      21,     75,     62,     24,\n      59,     99,     27,      0,\n       0,     25,      0,     13,\n       0,     57,      8,     99,\n       5,     13,     77,     98,\n      75,     60,     51,     50,\n      50,     49,     14,     13,\n      34,     85,      0,      0,\n      23,     24,     71,     85,\n      73,     84,     32,     65,\n      67,     79,     85,     83,\n      99,     41,     26,     10,\n      99,     98,      0,      0,\n      15,      0,      0,      4,\n      66,     12,     37,     18,\n       0,     99,     77,     26,\n       7,     99,     98,      0,\n       0,     15,      0,      0,\n       4,     18,      8,     87,\n       2,      0,     99,     41,\n      42,      7,     99,     98,\n       0,      0,     15,      0,\n       0,      4,     34,      4,\n      90,     14,      0,     99,\n      77,     26,     28,     99,\n      98,      0,      0,     15,\n       0,      0,      4,     58,\n       8,     91,      2,      0,\n      99,     41,     26,      7,\n      99,     98,      0,      0,\n      15,      0,      0,      4,\n      58,      8,     97,      2,\n       0,     99,     77,     26,\n      42,     99,     98,      0,\n       0,     15,      0,      0,\n       4,     58,      4,     73,\n      40,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      7,      8,\n      28,      0,      0,      0,\n      32,     24,     83,     73,\n      84,     65,     82,     32,\n      32,     32,     32,     32,\n      82,     53,     37,     48,\n      99,     81,      0,      0,\n       0,      0,      5,      0,\n      62,      4,     81,      6,\n       0,     91,     37,     29,\n      29,     99,     90,      0,\n       0,      0,      0,      5,\n       0,     62,      4,     83,\n       8,      0,     90,     28,\n      17,     39,     99,     76,\n       0,      0,     10,      0,\n      17,      4,     62,      4,\n      82,      2,      0,     94,\n      64,     30,     33,     99,\n      92,      0,      0,      0,\n       0,      0,      0,     61,\n      12,     99,      2,      0,\n      99,     68,     28,     48,\n      99,     83,      0,      0,\n       0,      0,     10,      0,\n      62,      0,     99,      8,\n       0,     94,     62,     58,\n      34,     99,     92,      0,\n       0,      0,      0,      0,\n       0,     62,     12,     90,\n       2,      0,     85,     99,\n      75,      0,     49,     50,\n      50,     50,      1,     15,\n      30,     40,     17,     15,\n      41,     24,     75,     79,\n      84,     79,     32,     32,\n      32,     32,     32,     32,\n      95,     72,     71,     99,\n      99,     97,     91,     98,\n      64,      0,     55,      0,\n      57,      0,     87,     12,\n       0,     95,     28,     27,\n      47,     99,     90,      0,\n       0,     49,      0,      0,\n       0,     51,     12,     83,\n       8,      0,     95,     72,\n      71,     99,     99,     97,\n      91,     98,     64,      0,\n      46,      0,     57,      0,\n      99,      6,      0,     95,\n      28,     27,     47,     99,\n      90,      0,      0,     49,\n       0,      0,      0,     51,\n       8,     85,      2,      0,\n      95,     72,     71,     99,\n      99,     97,     91,     98,\n      49,      0,      0,      0,\n      57,      0,     99,      0,\n       0,     95,     28,     27,\n      47,     99,     90,      0,\n       0,     49,      0,      0,\n       0,     59,      8,     89,\n       8,      0,      0,      0,\n       0,      0,     50,     50,\n      50,     50,      4,     25,\n      35,      0,      0,      0,\n       6,     24,     72,     65,\n      82,     80,     83,     73,\n      67,     72,     32,     49,\n      93,      5,     17,     30,\n      76,     51,      0,      0,\n      10,     32,      0,      4,\n      82,      4,     67,     24,\n       0,     99,     42,     15,\n      99,     99,     61,      0,\n       0,     10,      0,      0,\n       4,     56,      8,     91,\n       0,      0,     95,     99,\n      23,     84,     99,     99,\n       0,      0,      0,      0,\n       0,      4,     63,     12,\n      99,      4,      0,     95,\n      17,     17,     66,     99,\n      95,      0,      0,     38,\n      98,     98,      6,     56,\n      16,     77,      6,      0,\n      99,     39,     21,     30,\n      99,     85,      0,      0,\n       0,      0,      0,      4,\n     112,      8,     93,      0,\n       0,     80,     32,     18,\n      66,     99,     95,      0,\n       0,      0,      0,      0,\n       0,     60,     12,     99,\n       0,      0,     99,     98,\n      75,     60,     50,     50,\n      50,     50,      3,      0,\n      35,     30,      0,      0,\n      32,     24,     67,     76,\n      65,     86,     32,     32,\n      32,     32,     51,     32,\n       0,     81,     55,      0,\n      78,     78,      0,      0,\n      41,      0,      0,      0,\n      56,     20,     75,      8,\n       0,     99,     86,     55,\n       0,     96,     78,      0,\n       0,     41,      0,      0,\n       0,     56,      8,     79,\n       0,      0,     99,     73,\n       0,     14,     82,     48,\n       0,      0,     54,      0,\n      46,      0,     56,      8,\n      94,      6,      0,     95,\n      50,     49,     41,     99,\n      92,      0,      0,      0,\n       0,      0,      0,     59,\n      24,     99,      0,      0,\n      99,     71,      0,      0,\n      82,     48,      0,      0,\n      54,      0,     46,      0,\n      56,      8,     99,      6,\n       0,     95,     43,     49,\n      53,     99,     92,      0,\n       0,      0,      0,      0,\n       0,     58,     20,     99,\n       0,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      6,      8,\n      34,     33,      0,      0,\n      24,     48,     88,     89,\n      76,     79,     80,     72,\n      79,     78,     69,     32,\n      99,     77,     55,      0,\n      78,     78,      0,      0,\n      41,      0,      0,      0,\n      56,     16,     87,     14,\n       0,     99,     64,      0,\n       8,     82,     48,      0,\n       0,     54,      0,     46,\n       0,     56,      8,     97,\n      14,      0,     90,     75,\n       0,     82,     82,     48,\n       0,      0,     54,      0,\n       0,      0,     56,     20,\n      91,     14,      0,     99,\n      31,     50,     46,     99,\n      80,      0,      0,      0,\n       0,      0,      0,     59,\n      28,     99,      2,      0,\n      99,     33,     46,     50,\n      99,     80,      0,      0,\n      54,      0,     46,      0,\n      60,     24,     60,     10,\n       0,     99,     33,     50,\n      46,     99,     80,      0,\n       0,      0,      0,      0,\n       0,     59,     28,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      6,     15,\n      21,      0,      0,      0,\n      33,     24,     77,     65,\n      82,     73,     77,     66,\n      65,     32,     32,     32,\n      99,     48,     99,     50,\n      99,     32,      0,      0,\n      39,     12,     12,     12,\n      61,     28,     57,     28,\n       0,     80,     85,     24,\n      50,     99,     90,     42,\n       0,      9,      0,      0,\n       5,    115,     20,     99,\n       2,      0,     80,     85,\n      24,     50,     99,     90,\n       0,      0,      9,      0,\n       0,      5,      3,      4,\n      99,      2,      0,     80,\n      85,     43,     50,     99,\n      74,      0,      0,     39,\n      12,     12,     12,     60,\n      16,     72,      6,      0,\n      80,     85,     24,     50,\n      99,     90,      0,      0,\n      39,      4,     12,     12,\n      58,      4,     99,      2,\n       0,     99,     28,     99,\n      50,     99,     25,      0,\n       0,     39,     12,     12,\n      12,     58,     28,     50,\n       8,      0,     99,     98,\n      75,     60,     50,     50,\n      50,     50,     22,     13,\n      26,      0,      0,      0,\n      33,     24,     86,     73,\n      66,     69,     32,     32,\n      32,     32,     49,     32,\n      94,     56,     24,     55,\n      96,     78,      0,      0,\n       0,      0,      0,      0,\n      57,     20,     72,     32,\n       0,     99,     69,      0,\n      96,     99,      0,      0,\n       0,     68,     97,      0,\n       0,     56,     20,     69,\n       8,      0,     99,     71,\n       0,     97,     82,     48,\n       0,      0,     48,     74,\n      46,      0,     56,     20,\n      97,     16,      0,     95,\n      60,     49,     38,     99,\n      81,      0,      0,     34,\n       0,      0,      0,     60,\n      28,     99,      2,      0,\n      99,     46,     35,      0,\n      80,     75,     67,      0,\n      54,      0,      0,      0,\n      60,      8,     82,     16,\n       0,     95,     47,     30,\n      47,     99,     92,      0,\n       0,      0,      0,      0,\n       0,     59,      4,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      6,     15,\n      34,     33,      0,      0,\n      40,     36,     71,     76,\n      79,     75,     69,     78,\n      83,     80,     76,     32,\n      99,     58,     99,     51,\n      99,     85,     81,      0,\n      46,     13,     79,     12,\n      63,     20,     77,     47,\n      37,     99,     45,     21,\n      22,     99,     76,     45,\n       0,     51,      0,      0,\n       0,     44,     20,     80,\n      18,     33,     99,     21,\n      26,     14,     99,     26,\n       0,      0,      0,      0,\n       0,      0,     59,     12,\n      75,      9,     53,     99,\n      42,     47,     19,     99,\n      85,      0,      0,     44,\n      11,      0,      0,     61,\n      16,     64,     27,     99,\n      90,     40,     21,     16,\n      99,     73,     50,      0,\n      46,      7,      0,      3,\n     115,     20,     74,     14,\n       0,     99,     15,     28,\n      25,     99,     67,      0,\n       0,      0,      0,      0,\n       0,     61,      8,     99,\n       4,      0,     37,     50,\n      50,     50,     50,     50,\n      50,     50,      6,      7,\n      35,      0,      0,      0,\n      49,     24,     66,     69,\n      76,     76,     32,     67,\n      32,     32,     32,     32,\n      94,     28,     99,     23,\n      99,     25,      0,      0,\n      28,     12,      0,     12,\n      64,      0,     74,      6,\n       5,     94,     28,     99,\n      21,     99,     25,      0,\n       0,     28,     12,     12,\n      12,    114,      0,     48,\n       0,      0,     94,     28,\n      15,     25,     99,     25,\n       0,      0,     28,     12,\n       0,     12,      0,      0,\n      79,      2,     18,     94,\n      28,     99,     29,     99,\n      25,      0,      0,     28,\n      12,      0,     12,     56,\n       0,     81,      6,      5,\n      94,     28,     99,     29,\n      99,     25,      0,      0,\n      28,     12,      0,     12,\n      56,      0,     93,      2,\n      18,     94,     28,     99,\n      29,     99,     25,      0,\n       0,     28,     12,      0,\n      12,     56,      8,     99,\n       0,      0,     97,     94,\n      75,     60,     49,     51,\n      50,     50,     26,      5,\n      14,     14,      0,      0,\n      16,     12,     66,     69,\n      76,     76,     83,     32,\n      32,     32,     32,     32,\n      98,     91,      0,     28,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n       2,      0,     85,      4,\n       0,     76,     78,     71,\n      70,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     58,     20,     99,\n       5,     51,     98,     12,\n      71,     28,     99,      0,\n      32,      0,      0,      0,\n       0,      0,     42,      0,\n      75,      4,     75,     95,\n      33,     71,     25,     99,\n       0,     32,      0,      0,\n       0,      0,      0,     18,\n       0,     99,      2,      0,\n      98,     12,     71,     28,\n      99,      0,     32,      0,\n       0,      0,      0,      0,\n      82,      0,     78,      4,\n      75,     95,     33,     71,\n      25,     99,      0,     32,\n       0,      0,      0,      0,\n       0,     74,      0,     95,\n       2,      0,     67,     95,\n      95,     60,     50,     50,\n      50,     50,      4,      7,\n      35,      0,      0,      0,\n      18,     24,     84,     85,\n      66,     32,     66,     69,\n      76,     76,     83,     32,\n      40,     25,      7,     16,\n      86,     96,      0,      0,\n       0,      0,      0,      0,\n      56,      8,     65,     24,\n      20,     43,     30,     15,\n      10,     95,     87,      0,\n       0,      0,      0,      0,\n       0,     56,     28,     67,\n       8,     40,     79,     30,\n      15,     24,     95,     87,\n       0,      0,      0,      0,\n       0,      0,     56,      8,\n      65,      6,     26,     36,\n      30,     50,     24,     95,\n      87,      0,      0,      0,\n       0,      0,      0,     56,\n       4,     63,     14,     32,\n      29,     42,     20,     18,\n      99,     85,     41,      0,\n       0,      0,      0,      0,\n      57,      8,     56,      2,\n       0,     79,     26,     20,\n      41,     99,     95,     41,\n       0,      0,      0,      0,\n       0,     56,      4,     99,\n       2,      0,     99,     98,\n      75,     60,     50,     50,\n      50,     50,     16,     15,\n      35,     89,      0,      0,\n      89,     12,     71,     79,\n      78,     71,     32,     32,\n      32,     32,     50,     32,\n      98,      2,     26,     28,\n      98,      0,      0,      0,\n      41,      0,     24,      0,\n      60,      4,     73,      0,\n      56,     99,     50,     26,\n      20,     99,      0,      0,\n       0,     74,      0,      0,\n      10,     56,      4,     78,\n       0,      0,     65,     31,\n      17,     29,     99,     75,\n       0,      0,     41,      0,\n      15,      3,     59,     12,\n      91,      0,     75,     99,\n      77,     26,     24,     99,\n      72,      0,      0,      2,\n       0,      0,     10,     35,\n       8,     93,      0,     36,\n      99,     76,     26,     22,\n      99,     72,      0,      0,\n      50,      0,      0,     10,\n      63,      4,     82,      0,\n       0,     91,     36,     98,\n      34,     99,      0,      0,\n       0,      2,      0,      0,\n      10,     59,      8,     99,\n       0,      0,     98,     98,\n      75,     98,     50,     51,\n      50,     50,     15,     15,\n      11,      0,     16,      0,\n      32,     12,     75,     69,\n      84,     84,     76,     69,\n      32,     54,     32,     32,\n      93,     72,     25,     72,\n      96,     39,      0,      0,\n      38,      0,      0,     10,\n      56,      0,     99,     37,\n      69,     90,     42,     54,\n      44,     99,     90,      0,\n       0,     38,      0,      0,\n      10,     59,      0,     99,\n       0,      0,     93,     72,\n      25,     65,     96,     39,\n       0,      0,     38,      0,\n       0,     10,     56,      0,\n      99,     13,     69,     90,\n      42,     54,     46,     99,\n      90,      0,      0,     38,\n       0,      0,     10,     59,\n       0,     99,      0,      0,\n      93,     72,     25,     70,\n      96,     39,      0,      0,\n      38,      0,      0,     10,\n      56,      0,     99,     53,\n      78,     90,     42,     54,\n      44,     99,     90,      0,\n       0,     38,      0,      0,\n      10,     59,      0,     99,\n       0,      0,     98,     98,\n      98,     98,     50,     50,\n      50,     50,      5,     11,\n      15,      0,     38,      0,\n     115,     24,     77,     73,\n      68,     32,     68,     82,\n      77,     32,     51,     32,\n      89,     85,     81,     88,\n      99,     83,      0,      0,\n      26,      0,      0,     10,\n      58,      0,     98,      0,\n      75,     83,     80,     71,\n      99,     99,     99,      0,\n       0,     26,      0,      0,\n      10,     56,      0,     75,\n       5,     67,     94,     71,\n      50,     85,     99,     90,\n       0,      0,      2,      0,\n       0,     10,     59,      0,\n      99,      2,     67,     76,\n      85,     39,     46,     97,\n      80,      0,      0,      2,\n       0,      0,     10,     57,\n       0,     71,      2,     85,\n      82,     49,     43,     58,\n      99,      0,      0,      0,\n       2,      0,      0,     10,\n      61,      0,     89,      1,\n      42,     84,     46,     77,\n      53,     99,     32,      0,\n       0,      2,      0,      0,\n      10,     58,      0,     99,\n       0,     51,     75,     29,\n      98,     98,     52,     50,\n      50,     50,      3,     15,\n      35,      0,      0,      0,\n       1,     29,     79,     82,\n      73,     32,     68,     82,\n      85,     77,     32,     49,\n      99,     75,     54,     71,\n      99,     86,      0,      0,\n       2,      0,      0,     10,\n      57,      0,     77,      4,\n      65,     99,     57,     53,\n      54,     99,     72,      0,\n       0,      2,      0,      0,\n      10,     59,      0,     99,\n       2,      0,     99,     80,\n      50,     51,     99,     75,\n       0,      0,      2,      0,\n       0,     10,     58,      0,\n      89,      2,     80,     99,\n      54,     71,     70,     99,\n      72,      0,      0,      2,\n       0,      0,     10,     58,\n       0,     99,      2,      0,\n      99,     80,     50,     49,\n      99,     75,      0,      0,\n       2,      0,      0,     10,\n      58,      0,     85,      8,\n      60,     99,     54,     60,\n      59,     99,     90,      0,\n       0,      2,      0,      0,\n      10,     58,      4,     99,\n       2,      0,     98,     98,\n      98,     98,     53,     51,\n      50,     50,      5,     14,\n      17,     33,      0,      0,\n       5,     24,     87,     79,\n      79,     68,     32,     54,\n      32,     32,     32,     32,\n      98,     20,     26,     22,\n      98,      0,      0,      0,\n       2,      0,      0,     10,\n      56,      8,     99,     62,\n       0,     99,     57,     26,\n      52,     99,      0,      0,\n       0,     74,      0,      0,\n      10,     56,      4,     64,\n      19,     99,     99,     99,\n      46,     46,     99,     99,\n       0,      0,     74,      0,\n       0,     10,     56,      4,\n      88,     45,     94,     99,\n      99,     40,     48,     99,\n      99,      0,      0,      2,\n       0,      0,     10,     56,\n       5,     95,     13,     72,\n      99,     28,     43,     32,\n      99,     60,     97,      0,\n      38,      0,      0,     10,\n      61,      1,     98,     37,\n      34,     99,     35,     52,\n      38,     99,     63,      0,\n       0,      2,      0,      0,\n      10,     61,      0,     95,\n       2,     42,     98,     98,\n      98,     98,     50,     50,\n      50,     50,      6,     15,\n      99,      0,     92,      0,\n      35,     24,     76,     65,\n      84,     78,     32,     68,\n      82,     77,     32,     52,\n      99,     99,     99,     20,\n      99,      0,      0,      0,\n       2,      0,      0,     10,\n      63,      0,     99,     49,\n       0,     99,      9,     20,\n      12,     99,      0,      0,\n       0,      2,      0,      0,\n      10,     63,      0,     99,\n      23,     51,     99,     46,\n      99,     30,     99,      0,\n       0,      0,      2,      0,\n       0,     10,     63,      0,\n      97,     51,     99,     99,\n      20,     20,     20,     99,\n       0,      0,      0,      2,\n       0,      0,     10,     56,\n       4,     99,     15,     92,\n      99,     16,     20,     14,\n      99,      0,      0,      0,\n       2,      0,      0,     10,\n      56,      4,     91,      7,\n      34,     99,     28,     41,\n      28,     99,      0,      0,\n       0,      2,      0,      0,\n      10,     58,     12,     99,\n      39,     21,     98,     98,\n      98,     98,     50,     50,\n      50,     50,      2,     15,\n       0,      0,      0,      0,\n       0,     24,     67,     73,\n      77,     66,     65,     76,\n      32,     32,     32,     32,\n      99,     26,     99,     64,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      63,     28,     99,      2,\n       0,     99,     99,     99,\n       6,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n      62,      0,     99,     99,\n      99,     11,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     58,      0,\n      99,     15,     60,     99,\n      53,     99,     53,     99,\n       0,      0,      0,      0,\n       0,      0,      0,     58,\n      28,     96,      1,      0,\n      99,     77,     91,     40,\n      99,     82,      0,      0,\n       0,      0,      0,      0,\n      63,     12,     99,     20,\n       0,     99,     26,     99,\n      55,     99,      0,      0,\n       0,      0,      0,      0,\n       0,     63,     28,     99,\n       2,      0,     99,     87,\n      99,      1,     50,      0,\n       0,     50,     27,     15,\n      35,      0,      0,      0,\n      49,     12,     83,     89,\n      78,     68,     77,     32,\n      50,     53,     46,     56,\n      99,     99,     99,      0,\n      99,     99,     99,      0,\n      32,      0,      0,      8,\n      56,      0,     99,     55,\n      57,     99,     78,     60,\n      50,     99,     89,      0,\n       0,     80,      0,      0,\n       7,     56,      4,     90,\n       0,      0,     95,     50,\n      42,     45,     99,     80,\n       0,      0,     56,     98,\n      98,     12,     59,     12,\n      99,     21,     20,     99,\n      80,     35,     57,     99,\n      90,      0,      0,     48,\n       0,      0,      4,     32,\n       4,     94,     33,     83,\n      95,     57,      0,      0,\n      99,      0,      0,      0,\n      41,      0,      0,      4,\n      80,      0,     98,      3,\n       0,     90,     50,     33,\n      62,     99,      0,      0,\n       0,     51,     98,     98,\n       3,     59,      0,     99,\n      27,     91,     99,     99,\n      75,     60,     50,     50,\n      50,     50,      2,     15,\n      55,      0,      0,      0,\n       6,     24,     66,     46,\n      68,     82,     77,     45,\n      83,     78,     65,     82,\n// };\n// const uint8_t syx_bank_2[] FLASHMEM = {\n      97,     99,     85,     68,\n      99,     99,      0,      0,\n      56,     20,      0,      2,\n      56,      1,     66,     14,\n       7,     97,     99,     99,\n      68,     99,     99,     99,\n       0,     51,      0,     10,\n       0,     80,      0,     95,\n       2,     50,     96,     99,\n      99,     60,     99,     99,\n      99,      0,     63,     42,\n       0,      0,     56,      1,\n      99,      0,     50,     97,\n      99,     99,     68,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     32,\n       0,     99,      2,     50,\n      97,     99,     99,     68,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       0,      0,     99,      2,\n       0,     97,     99,     99,\n      68,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     23,      8,\n      32,      0,      6,     99,\n      17,     24,     67,     76,\n      73,     67,     75,     32,\n      49,     50,     52,     32,\n      96,     45,      0,     99,\n      99,      0,      0,      0,\n      38,     81,     34,      3,\n      56,      0,     99,     12,\n       0,     99,     85,     99,\n      99,     99,      0,      0,\n       0,     27,     83,      0,\n       0,     24,      0,     88,\n      12,      0,     97,     99,\n      98,     99,     99,     99,\n      99,      0,     48,      0,\n      80,      1,      8,      0,\n      42,      8,     52,     97,\n      99,     98,     99,     99,\n      99,     99,      0,     44,\n      85,     43,      3,      0,\n       0,     67,      6,      0,\n      97,     99,     98,     99,\n      99,     99,     99,      0,\n      55,     99,     58,      3,\n      56,      0,     89,      2,\n       1,     97,     99,     98,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     29,      8,\n      35,      0,      0,      0,\n       1,     12,     42,     72,\n      97,    109,    109,    111,\n     110,    100,     32,     49,\n      99,     61,     99,     99,\n      99,      0,      0,      0,\n      39,     98,      0,      0,\n      56,      0,     75,      8,\n       0,     99,     99,     99,\n      98,     99,     99,     99,\n       0,     39,      0,      0,\n       0,     56,      0,     86,\n       4,      0,     99,     99,\n      99,     98,     99,     99,\n      99,      0,     39,      0,\n       0,      0,     56,     28,\n      71,     10,      0,     99,\n      99,     99,     98,     99,\n      99,     99,      0,     86,\n      98,      0,     15,     56,\n      28,     99,      4,      0,\n      99,     99,     99,     98,\n      99,     99,     99,      0,\n      39,      0,      0,      0,\n      64,      0,     99,      2,\n       0,     99,     99,     99,\n      98,     99,     99,     99,\n       0,     39,      0,      0,\n       0,     56,      0,     99,\n       0,      0,     99,     71,\n      95,     60,     50,     50,\n      50,     50,     28,      0,\n      33,      0,      0,      0,\n      40,     24,     69,     46,\n      79,     82,     71,     65,\n      78,     32,     51,     32,\n      99,     98,     10,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,      0,     73,      2,\n       0,     99,     98,     10,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     89,\n       6,      0,     99,     98,\n      10,     99,     99,     99,\n      99,      0,      0,      0,\n       0,      0,     56,      0,\n      90,      6,      0,     99,\n      98,     10,     99,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       0,     90,      6,      0,\n      99,     98,     10,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      56,      0,     90,      4,\n       0,     99,     98,     10,\n      99,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     91,\n       0,    100,     75,     80,\n      75,     60,     50,     50,\n      50,     50,     28,     14,\n      35,     14,     22,      0,\n      25,     24,     54,     48,\n      45,     83,     32,     79,\n      82,     71,     65,     78,\n      87,     90,     99,     99,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      58,     11,     99,     18,\n      38,     99,     77,     30,\n      89,     99,     62,     99,\n      99,     38,     10,     56,\n      12,     56,     24,     68,\n       7,     32,     99,     68,\n      16,     57,     99,     90,\n      99,      0,     44,      0,\n      44,      0,      8,      8,\n      90,      8,      0,     96,\n      50,     16,     62,     99,\n      97,     99,      0,      0,\n       0,      0,      0,     58,\n      19,     99,      1,     21,\n      99,     68,     16,     90,\n      99,     87,     99,     94,\n      38,      0,      8,      0,\n      42,      8,     95,      2,\n       0,     96,     50,     16,\n      66,     99,     97,     99,\n       0,      0,      0,      0,\n       0,     74,      7,     99,\n       1,      1,     99,     99,\n      99,     99,     50,     50,\n      50,     49,     27,     14,\n      35,      0,     11,      0,\n      49,     12,     79,     80,\n      84,     73,     67,     32,\n      50,     56,     32,     32,\n      72,     25,     25,     70,\n      99,     99,     99,      0,\n      46,     10,      1,     12,\n      59,      8,     76,     20,\n       0,     61,     25,     25,\n      61,     99,     99,     93,\n       0,      0,      0,      0,\n       0,     59,      0,     97,\n       4,      0,     61,     25,\n      25,     50,     99,     99,\n      97,      0,     60,     10,\n      10,      0,     59,      0,\n      88,      8,      0,     99,\n      97,     62,     47,     99,\n      99,     90,      0,     46,\n      17,     40,      3,     61,\n       0,     75,      2,      0,\n      99,     97,     62,     47,\n      99,     99,     90,      0,\n       0,      0,      0,      0,\n      60,      0,     90,      0,\n       0,     45,     25,     25,\n      36,     99,     99,     98,\n       0,     41,      0,     50,\n       0,     61,      0,     99,\n       0,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     18,     15,\n      34,     33,      0,      0,\n      40,     12,     80,     73,\n      80,     69,     83,     32,\n      32,     32,     49,     32,\n      89,     80,     22,     65,\n      99,     99,     99,      0,\n       0,      0,     60,      4,\n      56,      0,     58,      8,\n       1,     88,     68,     22,\n      75,     60,     99,     99,\n       0,      0,      0,     50,\n       4,     56,      0,     80,\n      16,      1,     73,     80,\n      22,     50,     79,     99,\n      99,      0,      0,      0,\n      20,      0,     48,      0,\n      98,      4,      1,     76,\n      80,     22,     63,     99,\n      99,     99,      0,     35,\n      13,     15,      0,     60,\n       0,     87,      2,      1,\n      99,     99,     57,     64,\n      57,     52,     99,      0,\n       0,      0,     30,      0,\n      56,      0,     99,      8,\n       1,     77,     80,     74,\n      48,     99,     97,     99,\n       0,     35,     13,     10,\n       3,     58,      0,     99,\n       0,      0,     94,      3,\n      95,     60,     50,     50,\n      50,     50,     24,      3,\n      35,     63,      0,      0,\n      24,     24,     80,     73,\n      80,     69,     83,     32,\n      32,     32,     51,     32,\n      89,     80,     22,     65,\n      99,     99,     99,      0,\n       0,      0,     60,      4,\n      56,      0,     58,      8,\n       1,     88,     68,     22,\n      75,     70,     70,     70,\n       0,     78,      0,      5,\n       8,     56,      0,     84,\n      16,      1,     62,     80,\n      22,     50,     99,     99,\n      99,      0,      0,      0,\n      20,      0,     48,      0,\n      98,      4,      1,     47,\n      80,     22,     63,     99,\n      99,     99,      0,     35,\n      13,     15,      0,     60,\n       0,     97,      2,      1,\n      85,     30,     57,     64,\n      57,     75,     99,      0,\n       0,      0,     30,      0,\n      56,      0,     99,      8,\n       1,     53,     80,     41,\n      48,     99,     97,     99,\n       0,     35,     13,     10,\n       3,     58,      0,     99,\n       0,      0,     94,      3,\n      95,     60,     50,     50,\n      50,     50,     24,      3,\n      35,     63,      0,      0,\n      24,     24,     80,     73,\n      80,     69,     83,     32,\n      32,     32,     50,     32,\n      99,     99,     99,      0,\n      99,     99,     99,     99,\n      20,      0,     99,      0,\n     104,     29,     50,      1,\n      88,     52,     99,     99,\n       0,     98,     97,     97,\n       0,     48,      0,     20,\n       0,     40,      5,     90,\n       2,      1,     99,     99,\n      35,      0,     99,     85,\n      96,     90,     46,     90,\n       2,     14,     40,      5,\n      68,      2,      1,     50,\n      99,     99,     46,     99,\n      99,     99,      0,     26,\n       0,      6,      0,    104,\n       4,     99,      2,      0,\n      90,     90,     82,     40,\n      80,     94,     85,     80,\n      44,     76,     78,      3,\n      72,     14,     95,      2,\n       0,     52,     99,     99,\n      46,     99,     99,     99,\n       0,     15,      0,     33,\n       4,    104,     14,     99,\n       0,     99,     86,     90,\n      99,     99,     53,     52,\n      50,     50,      0,      7,\n      40,     30,      6,      8,\n      40,     24,     74,     88,\n      45,     51,     51,     45,\n      80,     32,     32,     32,\n      50,     76,     10,     20,\n      99,     92,      0,      0,\n       0,      0,      0,      0,\n       0,      3,     70,     12,\n       0,     42,     73,     10,\n      35,     98,     92,      0,\n       0,      0,      0,      0,\n       0,    112,      3,     65,\n       8,      0,     52,     74,\n      10,     20,     99,     98,\n      36,      0,      0,      0,\n       0,      0,     80,      0,\n      75,      4,      0,     42,\n      15,     15,     35,     99,\n      92,     32,      0,      0,\n       0,      0,      0,    104,\n       0,     99,      8,      0,\n      43,     13,      0,     20,\n      99,     92,     28,      0,\n       0,      0,      0,      0,\n       8,      3,     75,      4,\n       0,     70,     56,     10,\n      35,     98,     98,     35,\n       0,      0,      0,      0,\n       0,     32,      0,     99,\n       8,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      1,     15,\n      35,      0,     11,      0,\n      48,     12,     83,     79,\n      85,     78,     68,     84,\n      82,     65,     67,     75,\n      99,     38,     25,     41,\n      99,     71,     72,      0,\n      39,      0,      1,     15,\n     112,      4,     82,      6,\n       0,     99,     39,     25,\n      33,     99,     71,     64,\n       0,     39,      0,      0,\n      15,    112,      0,     76,\n       4,      0,     99,     76,\n      99,     47,     99,     88,\n      96,      0,     39,      0,\n       0,     15,    112,      0,\n      99,      2,      0,     99,\n      39,     25,     33,     99,\n      71,     64,      0,     39,\n       0,      1,     15,     56,\n       4,     83,      4,      0,\n      99,     38,     25,     36,\n      99,     72,     72,      0,\n      39,      0,      0,     15,\n      56,      0,     82,      2,\n       0,     99,     76,     99,\n      47,     99,     88,     96,\n       0,     39,      0,      0,\n      15,     56,      0,     99,\n       2,      0,     84,     95,\n      95,     60,     50,     50,\n      50,     50,      2,     14,\n      37,      0,      0,      0,\n      64,     24,     73,     67,\n      69,     32,     80,     65,\n      68,     32,     32,     50,\n      51,     22,     31,     41,\n      99,     92,      0,      0,\n       0,      0,      0,     11,\n     113,      7,     98,      4,\n       0,     91,     37,     36,\n      41,     99,     99,      0,\n       0,      0,      0,      0,\n       1,      3,      9,     83,\n       4,      0,     99,     22,\n      36,     40,     99,     91,\n       0,      0,      0,      0,\n       0,      1,     44,     16,\n      85,      0,     98,     91,\n      20,      8,     40,     99,\n      94,      0,      0,      0,\n       0,      0,      0,     93,\n       5,     99,      0,     98,\n      99,     43,     29,     37,\n      99,     86,      0,      0,\n       0,      0,      0,     12,\n      60,     16,     78,     22,\n       0,     92,     49,      6,\n      40,     99,     89,      0,\n       0,      0,      0,      0,\n       0,     26,      4,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     27,      2,\n      31,     11,     21,     63,\n      25,     24,     77,     49,\n      32,     80,     65,     68,\n      83,     32,     32,     32,\n      37,     32,     24,     28,\n      99,     96,     92,      0,\n      54,      0,      0,      0,\n      51,      4,     72,     22,\n       0,     37,     32,     24,\n      28,     99,     96,     92,\n       0,     54,      0,      0,\n       0,     57,      8,     59,\n      14,      0,     37,     32,\n      24,     28,     99,     96,\n      92,      0,     54,      0,\n       0,      0,     43,      8,\n      99,      2,      0,     99,\n      34,     20,     35,     99,\n      92,     84,      0,     49,\n       0,      0,      0,      2,\n       0,     61,      8,      0,\n      99,     46,      0,     28,\n      99,     93,     87,      0,\n      54,      0,      0,      0,\n       9,      8,     90,      4,\n       0,     47,     33,     20,\n      35,     99,     92,     84,\n       0,     49,      0,      0,\n       0,      2,      4,     99,\n       1,     28,     94,     67,\n      95,     60,     50,     50,\n      50,     50,      2,      7,\n      38,     33,     17,     71,\n      40,     12,     67,     65,\n      82,     76,     79,     83,\n      32,     32,     32,     50,\n      30,     41,     49,     40,\n      99,      0,      0,      0,\n      51,     99,      0,      0,\n      65,      3,     96,      2,\n       2,     79,     41,     99,\n      32,     99,      0,      0,\n       0,     51,     99,      0,\n       0,     57,     28,     99,\n       4,      0,     35,     99,\n      99,     40,     99,     99,\n      99,      0,     41,      0,\n      38,      5,     25,      0,\n      90,      8,      1,     35,\n      99,     99,     40,     99,\n      99,     99,      0,     41,\n       0,     38,      5,     25,\n       0,     97,      2,      1,\n      35,     99,     99,     40,\n      99,     99,     99,      0,\n      41,      0,     38,      5,\n      73,      0,     90,      8,\n       0,     35,     99,     99,\n      40,     99,     99,     99,\n       0,     41,      0,     38,\n       5,     57,      0,     94,\n       2,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,     30,      5,\n      35,     50,     16,     10,\n      40,     24,     83,     79,\n      70,     84,     32,     84,\n      79,     85,     67,     72,\n      36,     25,     49,     31,\n      99,     68,      0,      0,\n       0,      0,      0,      0,\n      56,      8,     62,     32,\n      75,     37,     22,     22,\n      50,     99,     22,     15,\n       0,      0,      0,      0,\n       0,    104,     12,     99,\n      10,      0,     36,     36,\n      22,     44,     99,     42,\n      37,      0,      0,      0,\n       0,      0,     88,      1,\n      44,     56,      0,     42,\n      16,     33,     41,     99,\n      32,      0,      0,      0,\n       0,      5,      0,     48,\n       0,     99,     10,      0,\n      25,     24,     22,     27,\n      99,     66,      0,      0,\n       0,      0,      0,      0,\n      88,      0,     36,     30,\n       0,     35,     18,     22,\n      35,     99,     80,     43,\n       0,      0,      0,      0,\n       0,      0,      0,     99,\n      10,      0,     75,     80,\n      75,     60,     50,     50,\n      50,     50,      4,     12,\n      39,      0,      6,     38,\n      24,     19,     42,     80,\n     108,     97,    110,    101,\n     116,    115,     32,     32,\n      80,     25,     26,     12,\n      85,     99,     81,      0,\n       0,      0,      0,      0,\n      56,      0,     81,      2,\n       0,     45,     20,     95,\n      30,     70,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n      57,     13,     80,     16,\n      26,     25,     85,     99,\n      81,      0,      0,      0,\n       0,      0,    112,      0,\n      81,      2,      0,     45,\n      20,     95,     30,     70,\n      99,     99,      0,      0,\n       0,      0,      0,     56,\n       0,     99,      1,      8,\n      80,     16,     26,     25,\n      85,     99,     81,      0,\n       0,      0,      0,      0,\n       0,      0,     81,      2,\n       0,     45,     20,     95,\n      30,     70,     99,     99,\n       0,      0,      0,      0,\n       0,     56,      0,     99,\n      33,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      4,      8,\n      35,      0,      0,      0,\n      49,     12,     67,     73,\n      82,     82,     85,     83,\n      32,     32,     32,     32,\n      29,     22,      0,     37,\n      99,      0,      0,      0,\n       2,      0,      0,     10,\n      56,      0,     98,      2,\n       0,     50,     21,      0,\n      37,     99,      0,      0,\n       0,      2,      0,      0,\n      10,     56,      0,     99,\n       2,      0,     98,     12,\n      71,     29,     99,      0,\n      32,      0,      2,      0,\n       0,     10,     42,      0,\n       0,      4,     75,     95,\n      33,     71,     26,     99,\n       0,     32,      0,      2,\n       0,      0,     10,     18,\n       0,      0,      2,      0,\n      98,     12,     71,     29,\n      99,      0,     32,      1,\n       2,      0,      0,     10,\n      82,      0,      0,      4,\n      75,     95,     33,     71,\n      26,     99,      0,     32,\n       0,      2,      0,      0,\n      10,     74,      0,      0,\n       2,      0,     67,     95,\n      95,     60,     50,     50,\n      50,     50,      4,      4,\n      35,      0,      0,      0,\n      98,     24,     69,     78,\n      84,     82,     73,     88,\n      32,     32,     32,     32,\n      94,     28,      0,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n      88,      0,     78,      0,\n       0,     28,     88,      0,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       0,    112,      2,     99,\n       1,      0,     99,     28,\n       0,     99,     99,     99,\n       0,      0,      0,      0,\n       0,      0,     40,      0,\n      77,      0,      0,     28,\n      88,      0,     99,     99,\n      99,     99,      0,      0,\n       0,      0,      0,     72,\n       2,     99,      1,      0,\n      94,     28,      0,     99,\n      99,     99,     99,      0,\n       0,      0,      0,      0,\n       0,      0,     75,      0,\n       0,     28,     88,      0,\n       0,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     24,      2,     99,\n       1,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      4,      5,\n      35,     35,      0,      0,\n      16,     24,     77,     65,\n      76,     32,     80,     79,\n      76,     89,     32,     32,\n      99,     16,     20,     20,\n       0,     75,      0,     86,\n      55,      0,     40,      0,\n      56,      4,     99,      4,\n       0,     65,     99,     21,\n      26,     99,     99,     99,\n       0,     43,     99,      0,\n       3,    113,      0,     94,\n       1,      0,     99,     25,\n      14,     24,     40,     83,\n      60,     99,     55,      0,\n       0,      0,     40,      4,\n      99,      0,      1,     70,\n      70,     50,     30,     99,\n      99,     99,      0,     43,\n      99,      0,      3,     56,\n       0,     92,      1,     37,\n      97,     10,     26,     20,\n      40,     99,      0,     86,\n      55,      0,     20,      0,\n      72,      4,     99,      2,\n      50,     50,     99,     16,\n      29,     99,     99,     35,\n       0,     43,     99,      0,\n       3,     57,      0,     92,\n       1,     21,      9,      4,\n      19,     62,     50,     50,\n      50,     50,      4,      3,\n      23,      0,      9,     50,\n      56,     24,     84,    101,\n     120,    116,    117,    114,\n     101,    115,     32,     54,\n      60,     45,      3,     35,\n      46,     91,     99,     91,\n      12,      0,      5,      0,\n      88,      4,     84,      2,\n       0,     67,     17,      7,\n      37,     99,     93,     28,\n       0,     31,      0,      7,\n       0,     80,      4,     99,\n       2,      0,     68,     64,\n      14,     50,     99,     78,\n       0,     73,      0,      0,\n       0,      0,     40,      8,\n      89,     18,     41,     55,\n      57,     35,     46,     99,\n      81,      0,      0,      0,\n       0,      4,      0,     48,\n      20,     92,     16,      0,\n      60,     45,      4,     34,\n      46,     89,     99,     89,\n      12,      0,      7,      0,\n      24,      4,     87,      2,\n      50,     61,     17,      7,\n      37,     99,     93,     28,\n       0,     31,      0,     11,\n       0,     32,      8,     99,\n       2,     50,     73,     67,\n      99,     99,     52,     49,\n      50,     50,      4,     14,\n      26,     32,     25,      0,\n      16,     24,     69,    116,\n     104,    101,    114,    105,\n      97,    108,     53,     97,\n      38,     11,      6,     21,\n      99,     82,     70,      0,\n      53,      0,      8,      0,\n      56,     12,     70,      8,\n       0,     39,     12,     14,\n      23,     99,     83,      0,\n       0,     60,      0,     14,\n       0,     56,      8,     68,\n       1,     65,     37,     13,\n      20,     25,     99,     83,\n      82,      0,     53,      0,\n       6,      0,     56,     12,\n      74,      2,      0,     38,\n      15,     15,     28,     99,\n      85,      0,      0,     53,\n       0,     13,      0,     56,\n       8,     68,      1,     51,\n      30,     17,      8,     30,\n      92,     80,     99,      0,\n      58,      0,     20,      0,\n      40,      0,     87,      0,\n       0,     58,      0,      0,\n      32,     99,     97,     95,\n       0,      0,      0,      0,\n       0,     56,      4,     99,\n       1,      0,      9,      4,\n      19,     62,     50,     50,\n      50,     50,     15,      7,\n      10,      0,      3,      0,\n      57,     36,     39,     65,\n     105,    114,    121,     39,\n      32,     32,     32,     32,\n      70,     27,     16,     51,\n      90,     99,     91,      0,\n       2,      0,      9,     10,\n      11,      0,     89,      4,\n       0,     70,     27,     16,\n      50,     90,     99,     91,\n       0,      2,      0,      4,\n      10,     11,      0,     73,\n       0,      0,     70,     27,\n      16,     47,     90,     99,\n      91,      0,      2,      0,\n       0,     10,    110,      0,\n      80,      0,      0,     64,\n      40,     23,     40,     99,\n      97,     94,      0,      2,\n       0,      0,     10,    119,\n       0,     99,      0,      0,\n      50,     26,      9,     40,\n      94,     99,     93,      0,\n      26,      0,      5,     10,\n     115,      0,     85,      0,\n       0,     65,     99,     99,\n      40,     99,     99,     99,\n       0,      2,      0,      0,\n      10,     44,      0,     99,\n       0,      0,     98,     98,\n      98,     98,     50,     50,\n      50,     50,     20,     14,\n      40,      0,     13,      0,\n      49,     24,     66,     79,\n      82,     79,     78,     32,\n      65,     32,     32,     32,\n      35,      0,      0,      0,\n      99,     99,     99,      0,\n      39,     60,      0,      6,\n       7,      3,     84,      0,\n       0,     32,     42,     71,\n      34,     99,     99,     99,\n       0,     51,     99,      0,\n       6,     59,      0,     99,\n       1,      0,     10,      0,\n       0,      0,     99,     99,\n      99,      0,     39,     99,\n       0,      6,     59,      0,\n      71,      0,      0,     35,\n      42,     71,     34,     99,\n      99,     99,      0,     51,\n      99,      0,      6,     59,\n       0,     99,      1,      0,\n      61,     99,     20,      0,\n      99,     98,     85,      0,\n      39,     99,      0,      6,\n      61,      0,     74,      0,\n       0,     37,     42,     71,\n      34,     99,     99,     99,\n       0,     51,     99,      0,\n       6,     59,      0,     99,\n       1,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      4,     15,\n       9,      0,     35,      0,\n      16,     24,     86,     65,\n      78,     71,     69,     76,\n      73,     83,     32,     49,\n      70,     27,     16,     31,\n      90,     99,     91,      0,\n       0,      0,     17,      0,\n     119,      0,     94,      4,\n       0,     70,     27,     16,\n      40,     90,     99,     91,\n       0,      0,      0,      0,\n       0,      8,      0,     74,\n       0,      0,     70,     27,\n      16,     39,     90,     99,\n      99,      0,      0,      0,\n       0,      0,    104,      0,\n      75,      0,      0,     64,\n      40,     23,     51,     99,\n      97,     94,      0,      0,\n       0,      0,      0,    112,\n       0,     99,      0,      0,\n      50,     26,      9,     36,\n      94,     99,     93,      0,\n      24,      0,      7,      0,\n     112,      0,     86,      0,\n       0,     65,     99,     99,\n      50,     99,     99,     99,\n       0,      0,      0,      0,\n       0,     40,      0,     99,\n       0,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      8,     14,\n      14,      0,      0,      0,\n      11,     24,     83,     84,\n      82,     73,     78,     71,\n      83,     32,     67,     32,\n      53,     64,     44,     54,\n      99,     92,     56,      0,\n      55,     25,      0,      3,\n      58,      8,     54,     28,\n       0,     53,     67,     38,\n      54,     86,     92,     74,\n       0,      0,      0,      0,\n       0,     58,      4,     84,\n       6,      0,     96,     19,\n      20,     54,     99,     92,\n      89,      0,      0,      0,\n       0,      0,     58,      8,\n      75,      2,      0,     50,\n      52,     35,     41,     99,\n      92,     91,      0,     51,\n      98,     60,      3,     58,\n       4,     99,      2,      0,\n      99,     71,     35,     51,\n      82,     92,     87,      0,\n      54,      0,      0,      0,\n      57,      0,     86,      2,\n       0,     52,     30,     25,\n      43,     99,     92,     90,\n       0,      0,      0,      0,\n       0,     58,      4,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     14,     15,\n      28,     46,     30,      0,\n      24,     12,     83,     84,\n      82,     73,     78,     71,\n      83,     32,     51,     32,\n      72,     76,     10,     32,\n      99,     92,      0,      0,\n       0,      0,      0,      0,\n      56,      0,     70,     16,\n       0,     76,     73,     10,\n      28,     99,     92,      0,\n       0,      0,      0,      0,\n       0,     56,      0,     66,\n       4,      0,     49,     74,\n      10,     32,     98,     98,\n      36,      0,     98,      0,\n       0,      0,     56,      0,\n      76,      4,      0,     51,\n      15,     10,     47,     99,\n      92,      0,      0,      0,\n       0,      0,      0,    104,\n       0,     92,      4,      0,\n      81,     13,      7,     25,\n      99,     92,     28,      0,\n       0,      0,      0,      0,\n       8,      0,     74,      4,\n       0,     48,     56,     10,\n      47,     98,     98,     36,\n       0,     98,      0,      0,\n       0,     56,      0,     92,\n       4,      0,     84,     95,\n      95,     60,     50,     50,\n      50,     50,      1,     15,\n      30,     81,      8,      0,\n      40,     12,     83,     84,\n      82,     73,     78,     71,\n      83,     32,     50,     32,\n      94,     31,     98,     20,\n      98,      1,     78,      0,\n      35,     10,      0,      0,\n      33,      4,     68,      2,\n      50,     46,     60,     40,\n      40,     87,     87,     93,\n       0,      0,      0,      0,\n       0,     56,      0,     79,\n       6,      0,     79,     68,\n      62,     40,     99,     99,\n      99,      0,     41,     87,\n      81,      5,     58,      4,\n      73,      2,     50,     48,\n      33,     40,     47,     99,\n      87,     89,      0,      0,\n       0,      0,      0,     80,\n       4,     96,      2,     50,\n      79,     68,     62,     40,\n      99,     99,     99,      0,\n      36,     98,     47,      5,\n      42,      4,     78,      2,\n       0,     56,     33,     40,\n      47,     99,     87,     89,\n       0,      0,      0,      0,\n       0,     80,      0,     99,\n       2,      0,     84,     95,\n      95,     60,     50,     50,\n      50,     50,      1,      7,\n      33,     35,     15,      0,\n      32,     24,     83,     84,\n      82,     73,     78,     71,\n      83,     32,     55,     32,\n      46,     25,     25,     36,\n      99,     96,     96,      0,\n      46,      0,     50,      0,\n      56,      0,     67,     10,\n       0,     46,     25,     25,\n      41,     99,     96,     96,\n       0,      0,      0,      0,\n       0,     56,      0,     67,\n       0,      0,     46,     25,\n      25,     35,     99,     96,\n      96,      0,      0,      0,\n       0,      0,     56,      0,\n      78,      2,      0,     46,\n      25,     25,     43,     99,\n      96,     96,      0,      0,\n       0,      0,      0,    114,\n       0,     99,     41,     32,\n      98,      0,      0,      0,\n      99,     99,     99,      0,\n       0,      0,      1,      0,\n       7,      0,     75,      4,\n       0,     41,     42,     71,\n      34,     99,     99,     99,\n       0,      0,      0,      0,\n       0,    115,      0,     99,\n       4,      0,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      1,     15,\n      35,      0,      0,      0,\n      32,     12,     70,     85,\n      76,     76,     32,     83,\n      84,     82,     73,     78,\n      46,     25,     25,     35,\n      99,     96,     96,      0,\n      46,      0,     50,      0,\n      56,      0,     67,     10,\n       0,     46,     25,     25,\n      41,     99,     96,     96,\n       0,      0,      0,      0,\n       0,     56,      0,     67,\n       0,     98,     46,     25,\n      25,     43,     99,     96,\n      96,      0,      0,      0,\n       0,      0,     56,      0,\n      78,      2,      0,     46,\n      25,     25,     43,     99,\n      96,     96,      0,      0,\n       0,      0,      0,    114,\n       0,     99,     25,     32,\n      60,     25,     25,     28,\n      99,     96,     90,      0,\n      27,     10,      5,      0,\n     112,      0,     80,      4,\n       0,     80,     25,     25,\n      48,     99,     96,     90,\n       0,     46,      0,     10,\n       0,     48,      0,     99,\n      49,      1,     99,     99,\n      99,     99,     50,     50,\n      50,     50,      1,      7,\n      35,     33,      8,      0,\n      39,     12,     83,     89,\n      78,     45,     79,     82,\n      67,     72,     32,     32,\n      49,     99,     28,     68,\n      98,     98,     91,      0,\n      39,     54,     50,      5,\n      60,      8,     82,      2,\n       0,     77,     36,     41,\n      71,     99,     98,     98,\n       0,     39,      0,      0,\n      15,     64,      8,     98,\n       2,      0,     77,     36,\n      41,     71,     99,     98,\n      98,      0,     39,      0,\n       0,     15,     56,      8,\n      99,      2,      0,     77,\n      76,     82,     71,     99,\n      98,     98,      0,     39,\n       0,      0,     15,     40,\n       8,     99,      2,      0,\n      62,     51,     29,     71,\n      82,     95,     96,      0,\n      27,      0,      7,      7,\n     112,      0,     86,      0,\n       0,     72,     76,     99,\n      71,     99,     88,     96,\n       0,     39,      0,     14,\n      15,    112,      0,     98,\n       0,      0,     84,     95,\n      95,     60,     50,     50,\n      50,     50,     21,     15,\n      37,      0,      5,      0,\n      56,     24,     66,     82,\n      65,     83,     83,     32,\n      32,     32,     49,     32,\n      60,     61,     19,     70,\n      99,     98,     97,      0,\n       0,      0,      0,      0,\n      57,      7,     83,      2,\n       0,     68,     20,     20,\n      70,     99,     95,     95,\n       0,      0,      0,      0,\n       0,     58,      7,     99,\n       2,      0,     68,     20,\n      20,     70,     99,     95,\n      95,      0,      0,      0,\n       0,      0,     58,      7,\n      97,      2,      0,     68,\n      20,     20,     70,     99,\n      96,     95,      0,      0,\n       0,      0,      0,     58,\n       7,     99,      2,      0,\n      60,     15,     15,     70,\n      99,     90,     80,      0,\n       0,      0,      0,      0,\n      58,      7,     89,      2,\n       0,     68,     20,     20,\n      70,     99,     95,     95,\n       0,      0,      0,      0,\n       0,     58,      7,     99,\n       2,      0,     94,     67,\n      95,     60,     50,     50,\n      50,     50,     21,     15,\n      34,     33,      0,      0,\n      56,     24,     66,     82,\n      65,     83,     83,     32,\n      54,     32,     66,     67,\n      42,     56,     20,     70,\n      99,      0,      0,      0,\n       0,      0,      0,      0,\n      63,     12,     99,     14,\n      21,     48,     12,     22,\n      50,     99,     61,     61,\n       0,      0,      0,      0,\n       0,     53,      0,     50,\n      12,      4,     66,     76,\n      22,     50,     99,     61,\n      61,      0,     63,      0,\n       0,      0,     61,     16,\n      74,      2,      0,     41,\n      12,     22,     50,     99,\n      61,     61,      0,      0,\n       0,      0,      0,     61,\n       4,     79,      2,      0,\n      99,     12,     22,     50,\n      85,      0,      0,      0,\n      68,      0,     96,      4,\n      58,     28,     50,      4,\n       5,     70,     24,     19,\n      55,     99,     86,     86,\n       0,      0,      0,      0,\n       0,     58,     16,     99,\n       2,      0,     86,     67,\n      95,     60,     52,     50,\n      50,     50,     17,     15,\n      34,     45,      5,      0,\n      32,     24,     66,     82,\n      32,     84,     82,     85,\n      77,     80,     69,     84,\n};\n\n\nconst uint8_t* const fm_patches_table[] FLASHMEM = {\n  syx_bank_0,\n  syx_bank_0 + 4096,\n  syx_bank_0 + 4096 * 2,\n};\n\nconst float lut_sine[] FLASHMEM = {\n   0.000000000e+00,  1.227153829e-02,  2.454122852e-02,  3.680722294e-02,\n   4.906767433e-02,  6.132073630e-02,  7.356456360e-02,  8.579731234e-02,\n   9.801714033e-02,  1.102222073e-01,  1.224106752e-01,  1.345807085e-01,\n   1.467304745e-01,  1.588581433e-01,  1.709618888e-01,  1.830398880e-01,\n   1.950903220e-01,  2.071113762e-01,  2.191012402e-01,  2.310581083e-01,\n   2.429801799e-01,  2.548656596e-01,  2.667127575e-01,  2.785196894e-01,\n   2.902846773e-01,  3.020059493e-01,  3.136817404e-01,  3.253102922e-01,\n   3.368898534e-01,  3.484186802e-01,  3.598950365e-01,  3.713171940e-01,\n   3.826834324e-01,  3.939920401e-01,  4.052413140e-01,  4.164295601e-01,\n   4.275550934e-01,  4.386162385e-01,  4.496113297e-01,  4.605387110e-01,\n   4.713967368e-01,  4.821837721e-01,  4.928981922e-01,  5.035383837e-01,\n   5.141027442e-01,  5.245896827e-01,  5.349976199e-01,  5.453249884e-01,\n   5.555702330e-01,  5.657318108e-01,  5.758081914e-01,  5.857978575e-01,\n   5.956993045e-01,  6.055110414e-01,  6.152315906e-01,  6.248594881e-01,\n   6.343932842e-01,  6.438315429e-01,  6.531728430e-01,  6.624157776e-01,\n   6.715589548e-01,  6.806009978e-01,  6.895405447e-01,  6.983762494e-01,\n   7.071067812e-01,  7.157308253e-01,  7.242470830e-01,  7.326542717e-01,\n   7.409511254e-01,  7.491363945e-01,  7.572088465e-01,  7.651672656e-01,\n   7.730104534e-01,  7.807372286e-01,  7.883464276e-01,  7.958369046e-01,\n   8.032075315e-01,  8.104571983e-01,  8.175848132e-01,  8.245893028e-01,\n   8.314696123e-01,  8.382247056e-01,  8.448535652e-01,  8.513551931e-01,\n   8.577286100e-01,  8.639728561e-01,  8.700869911e-01,  8.760700942e-01,\n   8.819212643e-01,  8.876396204e-01,  8.932243012e-01,  8.986744657e-01,\n   9.039892931e-01,  9.091679831e-01,  9.142097557e-01,  9.191138517e-01,\n   9.238795325e-01,  9.285060805e-01,  9.329927988e-01,  9.373390119e-01,\n   9.415440652e-01,  9.456073254e-01,  9.495281806e-01,  9.533060404e-01,\n   9.569403357e-01,  9.604305194e-01,  9.637760658e-01,  9.669764710e-01,\n   9.700312532e-01,  9.729399522e-01,  9.757021300e-01,  9.783173707e-01,\n   9.807852804e-01,  9.831054874e-01,  9.852776424e-01,  9.873014182e-01,\n   9.891765100e-01,  9.909026354e-01,  9.924795346e-01,  9.939069700e-01,\n   9.951847267e-01,  9.963126122e-01,  9.972904567e-01,  9.981181129e-01,\n   9.987954562e-01,  9.993223846e-01,  9.996988187e-01,  9.999247018e-01,\n   1.000000000e+00,  9.999247018e-01,  9.996988187e-01,  9.993223846e-01,\n   9.987954562e-01,  9.981181129e-01,  9.972904567e-01,  9.963126122e-01,\n   9.951847267e-01,  9.939069700e-01,  9.924795346e-01,  9.909026354e-01,\n   9.891765100e-01,  9.873014182e-01,  9.852776424e-01,  9.831054874e-01,\n   9.807852804e-01,  9.783173707e-01,  9.757021300e-01,  9.729399522e-01,\n   9.700312532e-01,  9.669764710e-01,  9.637760658e-01,  9.604305194e-01,\n   9.569403357e-01,  9.533060404e-01,  9.495281806e-01,  9.456073254e-01,\n   9.415440652e-01,  9.373390119e-01,  9.329927988e-01,  9.285060805e-01,\n   9.238795325e-01,  9.191138517e-01,  9.142097557e-01,  9.091679831e-01,\n   9.039892931e-01,  8.986744657e-01,  8.932243012e-01,  8.876396204e-01,\n   8.819212643e-01,  8.760700942e-01,  8.700869911e-01,  8.639728561e-01,\n   8.577286100e-01,  8.513551931e-01,  8.448535652e-01,  8.382247056e-01,\n   8.314696123e-01,  8.245893028e-01,  8.175848132e-01,  8.104571983e-01,\n   8.032075315e-01,  7.958369046e-01,  7.883464276e-01,  7.807372286e-01,\n   7.730104534e-01,  7.651672656e-01,  7.572088465e-01,  7.491363945e-01,\n   7.409511254e-01,  7.326542717e-01,  7.242470830e-01,  7.157308253e-01,\n   7.071067812e-01,  6.983762494e-01,  6.895405447e-01,  6.806009978e-01,\n   6.715589548e-01,  6.624157776e-01,  6.531728430e-01,  6.438315429e-01,\n   6.343932842e-01,  6.248594881e-01,  6.152315906e-01,  6.055110414e-01,\n   5.956993045e-01,  5.857978575e-01,  5.758081914e-01,  5.657318108e-01,\n   5.555702330e-01,  5.453249884e-01,  5.349976199e-01,  5.245896827e-01,\n   5.141027442e-01,  5.035383837e-01,  4.928981922e-01,  4.821837721e-01,\n   4.713967368e-01,  4.605387110e-01,  4.496113297e-01,  4.386162385e-01,\n   4.275550934e-01,  4.164295601e-01,  4.052413140e-01,  3.939920401e-01,\n   3.826834324e-01,  3.713171940e-01,  3.598950365e-01,  3.484186802e-01,\n   3.368898534e-01,  3.253102922e-01,  3.136817404e-01,  3.020059493e-01,\n   2.902846773e-01,  2.785196894e-01,  2.667127575e-01,  2.548656596e-01,\n   2.429801799e-01,  2.310581083e-01,  2.191012402e-01,  2.071113762e-01,\n   1.950903220e-01,  1.830398880e-01,  1.709618888e-01,  1.588581433e-01,\n   1.467304745e-01,  1.345807085e-01,  1.224106752e-01,  1.102222073e-01,\n   9.801714033e-02,  8.579731234e-02,  7.356456360e-02,  6.132073630e-02,\n   4.906767433e-02,  3.680722294e-02,  2.454122852e-02,  1.227153829e-02,\n   1.224646799e-16, -1.227153829e-02, -2.454122852e-02, -3.680722294e-02,\n  -4.906767433e-02, -6.132073630e-02, -7.356456360e-02, -8.579731234e-02,\n  -9.801714033e-02, -1.102222073e-01, -1.224106752e-01, -1.345807085e-01,\n  -1.467304745e-01, -1.588581433e-01, -1.709618888e-01, -1.830398880e-01,\n  -1.950903220e-01, -2.071113762e-01, -2.191012402e-01, -2.310581083e-01,\n  -2.429801799e-01, -2.548656596e-01, -2.667127575e-01, -2.785196894e-01,\n  -2.902846773e-01, -3.020059493e-01, -3.136817404e-01, -3.253102922e-01,\n  -3.368898534e-01, -3.484186802e-01, -3.598950365e-01, -3.713171940e-01,\n  -3.826834324e-01, -3.939920401e-01, -4.052413140e-01, -4.164295601e-01,\n  -4.275550934e-01, -4.386162385e-01, -4.496113297e-01, -4.605387110e-01,\n  -4.713967368e-01, -4.821837721e-01, -4.928981922e-01, -5.035383837e-01,\n  -5.141027442e-01, -5.245896827e-01, -5.349976199e-01, -5.453249884e-01,\n  -5.555702330e-01, -5.657318108e-01, -5.758081914e-01, -5.857978575e-01,\n  -5.956993045e-01, -6.055110414e-01, -6.152315906e-01, -6.248594881e-01,\n  -6.343932842e-01, -6.438315429e-01, -6.531728430e-01, -6.624157776e-01,\n  -6.715589548e-01, -6.806009978e-01, -6.895405447e-01, -6.983762494e-01,\n  -7.071067812e-01, -7.157308253e-01, -7.242470830e-01, -7.326542717e-01,\n  -7.409511254e-01, -7.491363945e-01, -7.572088465e-01, -7.651672656e-01,\n  -7.730104534e-01, -7.807372286e-01, -7.883464276e-01, -7.958369046e-01,\n  -8.032075315e-01, -8.104571983e-01, -8.175848132e-01, -8.245893028e-01,\n  -8.314696123e-01, -8.382247056e-01, -8.448535652e-01, -8.513551931e-01,\n  -8.577286100e-01, -8.639728561e-01, -8.700869911e-01, -8.760700942e-01,\n  -8.819212643e-01, -8.876396204e-01, -8.932243012e-01, -8.986744657e-01,\n  -9.039892931e-01, -9.091679831e-01, -9.142097557e-01, -9.191138517e-01,\n  -9.238795325e-01, -9.285060805e-01, -9.329927988e-01, -9.373390119e-01,\n  -9.415440652e-01, -9.456073254e-01, -9.495281806e-01, -9.533060404e-01,\n  -9.569403357e-01, -9.604305194e-01, -9.637760658e-01, -9.669764710e-01,\n  -9.700312532e-01, -9.729399522e-01, -9.757021300e-01, -9.783173707e-01,\n  -9.807852804e-01, -9.831054874e-01, -9.852776424e-01, -9.873014182e-01,\n  -9.891765100e-01, -9.909026354e-01, -9.924795346e-01, -9.939069700e-01,\n  -9.951847267e-01, -9.963126122e-01, -9.972904567e-01, -9.981181129e-01,\n  -9.987954562e-01, -9.993223846e-01, -9.996988187e-01, -9.999247018e-01,\n  -1.000000000e+00, -9.999247018e-01, -9.996988187e-01, -9.993223846e-01,\n  -9.987954562e-01, -9.981181129e-01, -9.972904567e-01, -9.963126122e-01,\n  -9.951847267e-01, -9.939069700e-01, -9.924795346e-01, -9.909026354e-01,\n  -9.891765100e-01, -9.873014182e-01, -9.852776424e-01, -9.831054874e-01,\n  -9.807852804e-01, -9.783173707e-01, -9.757021300e-01, -9.729399522e-01,\n  -9.700312532e-01, -9.669764710e-01, -9.637760658e-01, -9.604305194e-01,\n  -9.569403357e-01, -9.533060404e-01, -9.495281806e-01, -9.456073254e-01,\n  -9.415440652e-01, -9.373390119e-01, -9.329927988e-01, -9.285060805e-01,\n  -9.238795325e-01, -9.191138517e-01, -9.142097557e-01, -9.091679831e-01,\n  -9.039892931e-01, -8.986744657e-01, -8.932243012e-01, -8.876396204e-01,\n  -8.819212643e-01, -8.760700942e-01, -8.700869911e-01, -8.639728561e-01,\n  -8.577286100e-01, -8.513551931e-01, -8.448535652e-01, -8.382247056e-01,\n  -8.314696123e-01, -8.245893028e-01, -8.175848132e-01, -8.104571983e-01,\n  -8.032075315e-01, -7.958369046e-01, -7.883464276e-01, -7.807372286e-01,\n  -7.730104534e-01, -7.651672656e-01, -7.572088465e-01, -7.491363945e-01,\n  -7.409511254e-01, -7.326542717e-01, -7.242470830e-01, -7.157308253e-01,\n  -7.071067812e-01, -6.983762494e-01, -6.895405447e-01, -6.806009978e-01,\n  -6.715589548e-01, -6.624157776e-01, -6.531728430e-01, -6.438315429e-01,\n  -6.343932842e-01, -6.248594881e-01, -6.152315906e-01, -6.055110414e-01,\n  -5.956993045e-01, -5.857978575e-01, -5.758081914e-01, -5.657318108e-01,\n  -5.555702330e-01, -5.453249884e-01, -5.349976199e-01, -5.245896827e-01,\n  -5.141027442e-01, -5.035383837e-01, -4.928981922e-01, -4.821837721e-01,\n  -4.713967368e-01, -4.605387110e-01, -4.496113297e-01, -4.386162385e-01,\n  -4.275550934e-01, -4.164295601e-01, -4.052413140e-01, -3.939920401e-01,\n  -3.826834324e-01, -3.713171940e-01, -3.598950365e-01, -3.484186802e-01,\n  -3.368898534e-01, -3.253102922e-01, -3.136817404e-01, -3.020059493e-01,\n  -2.902846773e-01, -2.785196894e-01, -2.667127575e-01, -2.548656596e-01,\n  -2.429801799e-01, -2.310581083e-01, -2.191012402e-01, -2.071113762e-01,\n  -1.950903220e-01, -1.830398880e-01, -1.709618888e-01, -1.588581433e-01,\n  -1.467304745e-01, -1.345807085e-01, -1.224106752e-01, -1.102222073e-01,\n  -9.801714033e-02, -8.579731234e-02, -7.356456360e-02, -6.132073630e-02,\n  -4.906767433e-02, -3.680722294e-02, -2.454122852e-02, -1.227153829e-02,\n  -2.449293598e-16,  1.227153829e-02,  2.454122852e-02,  3.680722294e-02,\n   4.906767433e-02,  6.132073630e-02,  7.356456360e-02,  8.579731234e-02,\n   9.801714033e-02,  1.102222073e-01,  1.224106752e-01,  1.345807085e-01,\n   1.467304745e-01,  1.588581433e-01,  1.709618888e-01,  1.830398880e-01,\n   1.950903220e-01,  2.071113762e-01,  2.191012402e-01,  2.310581083e-01,\n   2.429801799e-01,  2.548656596e-01,  2.667127575e-01,  2.785196894e-01,\n   2.902846773e-01,  3.020059493e-01,  3.136817404e-01,  3.253102922e-01,\n   3.368898534e-01,  3.484186802e-01,  3.598950365e-01,  3.713171940e-01,\n   3.826834324e-01,  3.939920401e-01,  4.052413140e-01,  4.164295601e-01,\n   4.275550934e-01,  4.386162385e-01,  4.496113297e-01,  4.605387110e-01,\n   4.713967368e-01,  4.821837721e-01,  4.928981922e-01,  5.035383837e-01,\n   5.141027442e-01,  5.245896827e-01,  5.349976199e-01,  5.453249884e-01,\n   5.555702330e-01,  5.657318108e-01,  5.758081914e-01,  5.857978575e-01,\n   5.956993045e-01,  6.055110414e-01,  6.152315906e-01,  6.248594881e-01,\n   6.343932842e-01,  6.438315429e-01,  6.531728430e-01,  6.624157776e-01,\n   6.715589548e-01,  6.806009978e-01,  6.895405447e-01,  6.983762494e-01,\n   7.071067812e-01,  7.157308253e-01,  7.242470830e-01,  7.326542717e-01,\n   7.409511254e-01,  7.491363945e-01,  7.572088465e-01,  7.651672656e-01,\n   7.730104534e-01,  7.807372286e-01,  7.883464276e-01,  7.958369046e-01,\n   8.032075315e-01,  8.104571983e-01,  8.175848132e-01,  8.245893028e-01,\n   8.314696123e-01,  8.382247056e-01,  8.448535652e-01,  8.513551931e-01,\n   8.577286100e-01,  8.639728561e-01,  8.700869911e-01,  8.760700942e-01,\n   8.819212643e-01,  8.876396204e-01,  8.932243012e-01,  8.986744657e-01,\n   9.039892931e-01,  9.091679831e-01,  9.142097557e-01,  9.191138517e-01,\n   9.238795325e-01,  9.285060805e-01,  9.329927988e-01,  9.373390119e-01,\n   9.415440652e-01,  9.456073254e-01,  9.495281806e-01,  9.533060404e-01,\n   9.569403357e-01,  9.604305194e-01,  9.637760658e-01,  9.669764710e-01,\n   9.700312532e-01,  9.729399522e-01,  9.757021300e-01,  9.783173707e-01,\n   9.807852804e-01,  9.831054874e-01,  9.852776424e-01,  9.873014182e-01,\n   9.891765100e-01,  9.909026354e-01,  9.924795346e-01,  9.939069700e-01,\n   9.951847267e-01,  9.963126122e-01,  9.972904567e-01,  9.981181129e-01,\n   9.987954562e-01,  9.993223846e-01,  9.996988187e-01,  9.999247018e-01,\n   1.000000000e+00,\n};\nconst float lut_fm_frequency_quantizer[] FLASHMEM = {\n  -1.200000000e+01, -1.200000000e+01, -1.200000000e+01, -1.184000000e+01,\n  -1.184000000e+01, -1.184000000e+01, -1.111000000e+01, -1.038000000e+01,\n  -9.650000000e+00, -8.920000000e+00, -8.190000000e+00, -7.460000000e+00,\n  -6.730000000e+00, -6.000000000e+00, -6.000000000e+00, -6.000000000e+00,\n  -5.545511612e+00, -5.091023223e+00, -4.636534835e+00, -4.182046446e+00,\n  -4.182046446e+00, -4.182046446e+00, -3.659290641e+00, -3.136534835e+00,\n  -2.613779029e+00, -2.091023223e+00, -1.568267417e+00, -1.045511612e+00,\n  -5.227558058e-01,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   1.600000000e-01,  1.600000000e-01,  1.600000000e-01,  8.900000000e-01,\n   1.620000000e+00,  2.350000000e+00,  3.080000000e+00,  3.810000000e+00,\n   4.540000000e+00,  5.270000000e+00,  6.000000000e+00,  6.000000000e+00,\n   6.000000000e+00,  6.454488388e+00,  6.908976777e+00,  7.363465165e+00,\n   7.817953554e+00,  7.817953554e+00,  7.817953554e+00,  8.285529931e+00,\n   8.753106309e+00,  9.220682687e+00,  9.688259065e+00,  9.688259065e+00,\n   9.688259065e+00,  1.026619430e+01,  1.084412953e+01,  1.142206477e+01,\n   1.200000000e+01,  1.200000000e+01,  1.200000000e+01,  1.216000000e+01,\n   1.216000000e+01,  1.216000000e+01,  1.262977500e+01,  1.309955001e+01,\n   1.356932501e+01,  1.403910002e+01,  1.403910002e+01,  1.403910002e+01,\n   1.490761987e+01,  1.577613972e+01,  1.664465957e+01,  1.751317942e+01,\n   1.751317942e+01,  1.751317942e+01,  1.800000000e+01,  1.800000000e+01,\n   1.800000000e+01,  1.850977500e+01,  1.901955001e+01,  1.901955001e+01,\n   1.901955001e+01,  1.981795355e+01,  1.981795355e+01,  1.981795355e+01,\n   2.066386428e+01,  2.150977500e+01,  2.150977500e+01,  2.150977500e+01,\n   2.213233125e+01,  2.275488750e+01,  2.337744375e+01,  2.400000000e+01,\n   2.400000000e+01,  2.400000000e+01,  2.450977500e+01,  2.501955001e+01,\n   2.501955001e+01,  2.501955001e+01,  2.547403840e+01,  2.592852679e+01,\n   2.638301517e+01,  2.683750356e+01,  2.683750356e+01,  2.683750356e+01,\n   2.735032035e+01,  2.786313714e+01,  2.786313714e+01,  2.786313714e+01,\n   2.839735285e+01,  2.893156857e+01,  2.946578428e+01,  3.000000000e+01,\n   3.000000000e+01,  3.000000000e+01,  3.075000000e+01,  3.150000000e+01,\n   3.225000000e+01,  3.300000000e+01,  3.375000000e+01,  3.450000000e+01,\n   3.525000000e+01,  3.600000000e+01,  3.600000000e+01,  3.600000000e+01,\n   3.600000000e+01,  3.600000000e+01,\n};\nconst float lut_fold[] FLASHMEM = {\n  -9.980545825e-01, -9.970653772e-01, -9.960649692e-01, -9.950532582e-01,\n  -9.940301939e-01, -9.929957802e-01, -9.919500809e-01, -9.908932239e-01,\n  -9.898254054e-01, -9.887468930e-01, -9.876580288e-01, -9.865592310e-01,\n  -9.854509946e-01, -9.843338912e-01, -9.832085672e-01, -9.820757409e-01,\n  -9.809361977e-01, -9.797907840e-01, -9.786403995e-01, -9.774859869e-01,\n  -9.763285207e-01, -9.751689938e-01, -9.740084017e-01, -9.728477255e-01,\n  -9.716879129e-01, -9.705298570e-01, -9.693743743e-01, -9.682221804e-01,\n  -9.670738649e-01, -9.659298654e-01, -9.647904408e-01, -9.636556431e-01,\n  -9.625252914e-01, -9.613989436e-01, -9.602758714e-01, -9.591550347e-01,\n  -9.580350590e-01, -9.569142144e-01, -9.557903981e-01, -9.546611197e-01,\n  -9.535234911e-01, -9.523742208e-01, -9.512096130e-01, -9.500255727e-01,\n  -9.488176173e-01, -9.475808937e-01, -9.463102039e-01, -9.450000364e-01,\n  -9.436446065e-01, -9.422379038e-01, -9.407737471e-01, -9.392458479e-01,\n  -9.376478811e-01, -9.359735625e-01, -9.342167345e-01, -9.323714562e-01,\n  -9.304321011e-01, -9.283934575e-01, -9.262508342e-01, -9.240001674e-01,\n  -9.216381294e-01, -9.191622368e-01, -9.165709565e-01, -9.138638086e-01,\n  -9.110414630e-01, -9.081058297e-01, -9.050601387e-01, -9.019090092e-01,\n  -8.986585056e-01, -8.953161780e-01, -8.918910851e-01, -8.883937990e-01,\n  -8.848363883e-01, -8.812323792e-01, -8.775966932e-01, -8.739455595e-01,\n  -8.702964016e-01, -8.666676980e-01, -8.630788161e-01, -8.595498195e-01,\n  -8.561012493e-01, -8.527538811e-01, -8.495284571e-01, -8.464453973e-01,\n  -8.435244910e-01, -8.407845708e-01, -8.382431741e-01, -8.359161932e-01,\n  -8.338175206e-01, -8.319586927e-01, -8.303485360e-01, -8.289928229e-01,\n  -8.278939413e-01, -8.270505833e-01, -8.264574602e-01, -8.261050485e-01,\n  -8.259793727e-01, -8.260618323e-01, -8.263290765e-01, -8.267529332e-01,\n  -8.273003972e-01, -8.279336816e-01, -8.286103366e-01, -8.292834393e-01,\n  -8.299018559e-01, -8.304105799e-01, -8.307511441e-01, -8.308621097e-01,\n  -8.306796276e-01, -8.301380721e-01, -8.291707415e-01, -8.277106225e-01,\n  -8.256912103e-01, -8.230473793e-01, -8.197162939e-01, -8.156383519e-01,\n  -8.107581485e-01, -8.050254496e-01, -7.983961624e-01, -7.908332902e-01,\n  -7.823078566e-01, -7.727997861e-01, -7.622987256e-01, -7.508047928e-01,\n  -7.383292372e-01, -7.248949979e-01, -7.105371474e-01, -6.953032052e-01,\n  -6.792533125e-01, -6.624602549e-01, -6.450093250e-01, -6.269980173e-01,\n  -6.085355495e-01, -5.897422068e-01, -5.707485064e-01, -5.516941858e-01,\n  -5.327270153e-01, -5.140014423e-01, -4.956770752e-01, -4.779170191e-01,\n  -4.608860753e-01, -4.447488219e-01, -4.296675951e-01, -4.158003906e-01,\n  -4.032987090e-01, -3.923053718e-01, -3.829523325e-01, -3.753585132e-01,\n  -3.696276948e-01, -3.658464920e-01, -3.640824427e-01, -3.643822430e-01,\n  -3.667701571e-01, -3.712466318e-01, -3.777871433e-01, -3.863413015e-01,\n  -3.968322361e-01, -4.091562858e-01, -4.231830080e-01, -4.387555229e-01,\n  -4.556912047e-01, -4.737827239e-01, -4.927994449e-01, -5.124891750e-01,\n  -5.325802587e-01, -5.527840042e-01, -5.727974254e-01, -5.923062779e-01,\n  -6.109883621e-01, -6.285170609e-01, -6.445650789e-01, -6.588083399e-01,\n  -6.709300033e-01, -6.806245487e-01, -6.876018827e-01, -6.915914142e-01,\n  -6.923460464e-01, -6.896460314e-01, -6.833026329e-01, -6.731615438e-01,\n  -6.591060076e-01, -6.410595911e-01, -6.189885640e-01, -5.929038395e-01,\n  -5.628624373e-01, -5.289684349e-01, -4.913733765e-01, -4.502761195e-01,\n  -4.059220990e-01, -3.586020036e-01, -3.086498600e-01, -2.564405314e-01,\n  -2.023866445e-01, -1.469349657e-01, -9.056225673e-02, -3.377064458e-02,\n   2.291744737e-02,  7.896475831e-02,  1.338249802e-01,  1.869488164e-01,\n   2.377902398e-01,  2.858128778e-01,  3.304964479e-01,  3.713431643e-01,\n   4.078840357e-01,  4.396849726e-01,  4.663526243e-01,  4.875398649e-01,\n   5.029508548e-01,  5.123456023e-01,  5.155439593e-01,  5.124289894e-01,\n   5.029496521e-01,  4.871227568e-01,  4.650341465e-01,  4.368390827e-01,\n   4.027618100e-01,  3.630942908e-01,  3.181941105e-01,  2.684815644e-01,\n   2.144359470e-01,  1.565910778e-01,  9.553010345e-02,  3.187963220e-02,\n  -3.369674102e-02, -1.005054456e-01, -1.678304053e-01, -2.349408810e-01,\n  -3.010995956e-01, -3.655710438e-01, -4.276298873e-01, -4.865693337e-01,\n  -5.417093944e-01, -5.924049204e-01, -6.380533123e-01, -6.781018093e-01,\n  -7.120542597e-01, -7.394772881e-01, -7.600057749e-01, -7.733475770e-01,\n  -7.792874237e-01, -7.776899338e-01, -7.685017108e-01, -7.517524823e-01,\n  -7.275552655e-01, -6.961055475e-01, -6.576794884e-01, -6.126311602e-01,\n  -5.613888527e-01, -5.044504876e-01, -4.423781911e-01, -3.757920909e-01,\n  -3.053634092e-01, -2.318069348e-01, -1.558729654e-01, -7.833881626e-02,\n   0.000000000e+00,  7.833881626e-02,  1.558729654e-01,  2.318069348e-01,\n   3.053634092e-01,  3.757920909e-01,  4.423781911e-01,  5.044504876e-01,\n   5.613888527e-01,  6.126311602e-01,  6.576794884e-01,  6.961055475e-01,\n   7.275552655e-01,  7.517524823e-01,  7.685017108e-01,  7.776899338e-01,\n   7.792874237e-01,  7.733475770e-01,  7.600057749e-01,  7.394772881e-01,\n   7.120542597e-01,  6.781018093e-01,  6.380533123e-01,  5.924049204e-01,\n   5.417093944e-01,  4.865693337e-01,  4.276298873e-01,  3.655710438e-01,\n   3.010995956e-01,  2.349408810e-01,  1.678304053e-01,  1.005054456e-01,\n   3.369674102e-02, -3.187963220e-02, -9.553010345e-02, -1.565910778e-01,\n  -2.144359470e-01, -2.684815644e-01, -3.181941105e-01, -3.630942908e-01,\n  -4.027618100e-01, -4.368390827e-01, -4.650341465e-01, -4.871227568e-01,\n  -5.029496521e-01, -5.124289894e-01, -5.155439593e-01, -5.123456023e-01,\n  -5.029508548e-01, -4.875398649e-01, -4.663526243e-01, -4.396849726e-01,\n  -4.078840357e-01, -3.713431643e-01, -3.304964479e-01, -2.858128778e-01,\n  -2.377902398e-01, -1.869488164e-01, -1.338249802e-01, -7.896475831e-02,\n  -2.291744737e-02,  3.377064458e-02,  9.056225673e-02,  1.469349657e-01,\n   2.023866445e-01,  2.564405314e-01,  3.086498600e-01,  3.586020036e-01,\n   4.059220990e-01,  4.502761195e-01,  4.913733765e-01,  5.289684349e-01,\n   5.628624373e-01,  5.929038395e-01,  6.189885640e-01,  6.410595911e-01,\n   6.591060076e-01,  6.731615438e-01,  6.833026329e-01,  6.896460314e-01,\n   6.923460464e-01,  6.915914142e-01,  6.876018827e-01,  6.806245487e-01,\n   6.709300033e-01,  6.588083399e-01,  6.445650789e-01,  6.285170609e-01,\n   6.109883621e-01,  5.923062779e-01,  5.727974254e-01,  5.527840042e-01,\n   5.325802587e-01,  5.124891750e-01,  4.927994449e-01,  4.737827239e-01,\n   4.556912047e-01,  4.387555229e-01,  4.231830080e-01,  4.091562858e-01,\n   3.968322361e-01,  3.863413015e-01,  3.777871433e-01,  3.712466318e-01,\n   3.667701571e-01,  3.643822430e-01,  3.640824427e-01,  3.658464920e-01,\n   3.696276948e-01,  3.753585132e-01,  3.829523325e-01,  3.923053718e-01,\n   4.032987090e-01,  4.158003906e-01,  4.296675951e-01,  4.447488219e-01,\n   4.608860753e-01,  4.779170191e-01,  4.956770752e-01,  5.140014423e-01,\n   5.327270153e-01,  5.516941858e-01,  5.707485064e-01,  5.897422068e-01,\n   6.085355495e-01,  6.269980173e-01,  6.450093250e-01,  6.624602549e-01,\n   6.792533125e-01,  6.953032052e-01,  7.105371474e-01,  7.248949979e-01,\n   7.383292372e-01,  7.508047928e-01,  7.622987256e-01,  7.727997861e-01,\n   7.823078566e-01,  7.908332902e-01,  7.983961624e-01,  8.050254496e-01,\n   8.107581485e-01,  8.156383519e-01,  8.197162939e-01,  8.230473793e-01,\n   8.256912103e-01,  8.277106225e-01,  8.291707415e-01,  8.301380721e-01,\n   8.306796276e-01,  8.308621097e-01,  8.307511441e-01,  8.304105799e-01,\n   8.299018559e-01,  8.292834393e-01,  8.286103366e-01,  8.279336816e-01,\n   8.273003972e-01,  8.267529332e-01,  8.263290765e-01,  8.260618323e-01,\n   8.259793727e-01,  8.261050485e-01,  8.264574602e-01,  8.270505833e-01,\n   8.278939413e-01,  8.289928229e-01,  8.303485360e-01,  8.319586927e-01,\n   8.338175206e-01,  8.359161932e-01,  8.382431741e-01,  8.407845708e-01,\n   8.435244910e-01,  8.464453973e-01,  8.495284571e-01,  8.527538811e-01,\n   8.561012493e-01,  8.595498195e-01,  8.630788161e-01,  8.666676980e-01,\n   8.702964016e-01,  8.739455595e-01,  8.775966932e-01,  8.812323792e-01,\n   8.848363883e-01,  8.883937990e-01,  8.918910851e-01,  8.953161780e-01,\n   8.986585056e-01,  9.019090092e-01,  9.050601387e-01,  9.081058297e-01,\n   9.110414630e-01,  9.138638086e-01,  9.165709565e-01,  9.191622368e-01,\n   9.216381294e-01,  9.240001674e-01,  9.262508342e-01,  9.283934575e-01,\n   9.304321011e-01,  9.323714562e-01,  9.342167345e-01,  9.359735625e-01,\n   9.376478811e-01,  9.392458479e-01,  9.407737471e-01,  9.422379038e-01,\n   9.436446065e-01,  9.450000364e-01,  9.463102039e-01,  9.475808937e-01,\n   9.488176173e-01,  9.500255727e-01,  9.512096130e-01,  9.523742208e-01,\n   9.535234911e-01,  9.546611197e-01,  9.557903981e-01,  9.569142144e-01,\n   9.580350590e-01,  9.591550347e-01,  9.602758714e-01,  9.613989436e-01,\n   9.625252914e-01,  9.636556431e-01,  9.647904408e-01,  9.659298654e-01,\n   9.670738649e-01,  9.682221804e-01,  9.693743743e-01,  9.705298570e-01,\n   9.716879129e-01,  9.728477255e-01,  9.740084017e-01,  9.751689938e-01,\n   9.763285207e-01,  9.774859869e-01,  9.786403995e-01,  9.797907840e-01,\n   9.809361977e-01,  9.820757409e-01,  9.832085672e-01,  9.843338912e-01,\n   9.854509946e-01,  9.865592310e-01,  9.876580288e-01,  9.887468930e-01,\n   9.898254054e-01,  9.908932239e-01,  9.919500809e-01,  9.929957802e-01,\n   9.940301939e-01,  9.950532582e-01,  9.960649692e-01,  9.970653772e-01,\n   9.980545825e-01,  9.990327291e-01,  1.000000000e+00,  1.000000000e+00,\n};\nconst float lut_fold_2[] FLASHMEM = {\n   1.000000000e+00,  9.992967758e-01,  9.985815484e-01,  9.978540078e-01,\n   9.971138332e-01,  9.963606927e-01,  9.955942426e-01,  9.948141269e-01,\n   9.940199768e-01,  9.932114103e-01,  9.923880310e-01,  9.915494283e-01,\n   9.906951760e-01,  9.898248319e-01,  9.889379369e-01,  9.880340145e-01,\n   9.871125695e-01,  9.861730874e-01,  9.852150334e-01,  9.842378513e-01,\n   9.832409624e-01,  9.822237646e-01,  9.811856308e-01,  9.801259079e-01,\n   9.790439155e-01,  9.779389442e-01,  9.768102539e-01,  9.756570727e-01,\n   9.744785949e-01,  9.732739786e-01,  9.720423447e-01,  9.707827737e-01,\n   9.694943044e-01,  9.681759305e-01,  9.668265989e-01,  9.654452060e-01,\n   9.640305956e-01,  9.625815548e-01,  9.610968112e-01,  9.595750288e-01,\n   9.580148040e-01,  9.564146617e-01,  9.547730501e-01,  9.530883359e-01,\n   9.513587989e-01,  9.495826263e-01,  9.477579060e-01,  9.458826201e-01,\n   9.439546371e-01,  9.419717041e-01,  9.399314380e-01,  9.378313157e-01,\n   9.356686640e-01,  9.334406481e-01,  9.311442591e-01,  9.287763006e-01,\n   9.263333739e-01,  9.238118615e-01,  9.212079094e-01,  9.185174075e-01,\n   9.157359677e-01,  9.128589003e-01,  9.098811874e-01,  9.067974538e-01,\n   9.036019347e-01,  9.002884395e-01,  8.968503119e-01,  8.932803854e-01,\n   8.895709331e-01,  8.857136124e-01,  8.816994016e-01,  8.775185304e-01,\n   8.731603996e-01,  8.686134921e-01,  8.638652705e-01,  8.589020627e-01,\n   8.537089293e-01,  8.482695142e-01,  8.425658723e-01,  8.365782715e-01,\n   8.302849649e-01,  8.236619269e-01,  8.166825462e-01,  8.093172692e-01,\n   8.015331811e-01,  7.932935143e-01,  7.845570677e-01,  7.752775176e-01,\n   7.654025961e-01,  7.548731062e-01,  7.436217337e-01,  7.315716072e-01,\n   7.186345391e-01,  7.047088637e-01,  6.896767601e-01,  6.734009108e-01,\n   6.557202943e-01,  6.364448402e-01,  6.153485688e-01,  5.921606903e-01,\n   5.665539193e-01,  5.381289295e-01,  5.063933787e-01,  4.707331500e-01,\n   4.303722225e-01,  3.843155503e-01,  3.312659247e-01,  2.694998552e-01,\n   1.966767932e-01,  1.095358294e-01,  3.393987745e-03, -1.040028802e-01,\n  -1.920923242e-01, -2.656393469e-01, -3.279705091e-01, -3.814696578e-01,\n  -4.278897766e-01, -4.685487258e-01, -5.044563616e-01, -5.363995499e-01,\n  -5.650004958e-01, -5.676277376e-01, -5.456089430e-01, -5.216251172e-01,\n  -4.954009254e-01, -4.666070735e-01, -4.348464092e-01, -3.996354923e-01,\n  -3.603798149e-01, -3.163399611e-01, -2.665845916e-01, -2.099238522e-01,\n  -1.448129904e-01, -6.920937281e-02,  1.895794740e-02,  1.019348852e-01,\n   1.729075540e-01,  2.343052184e-01,  2.879430943e-01,  3.352048344e-01,\n   3.771635871e-01,  4.146644691e-01,  4.483820782e-01,  4.788614349e-01,\n   5.065476686e-01,  5.318078998e-01,  5.549476117e-01,  5.762230650e-01,\n   5.958508275e-01,  6.140151734e-01,  6.308738858e-01,  6.465628523e-01,\n   6.611997355e-01,  6.748869294e-01,  6.877139581e-01,  6.925931401e-01,\n   6.755415987e-01,  6.569329565e-01,  6.365437238e-01,  6.141054921e-01,\n   5.892930521e-01,  5.617085284e-01,  5.308598832e-01,  4.961313087e-01,\n   4.567416977e-01,  4.116851906e-01,  3.596440735e-01,  2.988577649e-01,\n   2.269196964e-01,  1.404511108e-01,  3.455499060e-02, -8.308691439e-02,\n  -1.798594632e-01, -2.595549970e-01, -3.263272740e-01, -3.830839556e-01,\n  -4.319212812e-01, -4.743886570e-01, -5.116560503e-01, -5.446234410e-01,\n  -5.739944533e-01, -6.003271365e-01, -6.109475507e-01, -5.895686806e-01,\n  -5.661619434e-01, -5.404244477e-01, -5.119898195e-01, -4.804106515e-01,\n  -4.451347882e-01, -4.054727657e-01, -3.605522997e-01, -3.092533873e-01,\n  -2.501136501e-01, -1.811866822e-01, -9.982372580e-02, -2.325458569e-03,\n   9.596728942e-02,  1.779431078e-01,  2.473476588e-01,  3.068667711e-01,\n   3.584720417e-01,  4.036434517e-01,  4.435136052e-01,  4.789639990e-01,\n   5.106909591e-01,  5.392518362e-01,  5.650980300e-01,  5.885990231e-01,\n   6.100601564e-01,  6.297359696e-01,  6.478403436e-01,  6.645543074e-01,\n   6.585194180e-01,  6.406121537e-01,  6.211278553e-01,  5.998486007e-01,\n   5.765143776e-01,  5.508124062e-01,  5.223630380e-01,  4.907008769e-01,\n   4.552491217e-01,  4.152841095e-01,  3.698853971e-01,  3.178639957e-01,\n   2.576567279e-01,  1.871664560e-01,  1.035128010e-01,  2.628828896e-03,\n  -9.918255595e-02, -1.835455764e-01, -2.545841775e-01, -3.152240342e-01,\n  -3.675927060e-01, -4.132744159e-01, -4.534730876e-01, -4.891200006e-01,\n  -5.209468346e-01, -5.495364245e-01, -5.753587781e-01, -5.987971175e-01,\n  -6.201670260e-01, -6.397307408e-01, -6.255537426e-01, -6.058657960e-01,\n  -5.844073505e-01, -5.609283358e-01, -5.351292603e-01, -5.066483683e-01,\n  -4.750445715e-01, -4.397744409e-01, -4.001606981e-01, -3.553483015e-01,\n  -3.042420289e-01, -2.454157756e-01, -1.769773894e-01, -9.636135435e-02,\n   0.000000000e+00,  9.636135435e-02,  1.769773894e-01,  2.454157756e-01,\n   3.042420289e-01,  3.553483015e-01,  4.001606981e-01,  4.397744409e-01,\n   4.750445715e-01,  5.066483683e-01,  5.351292603e-01,  5.609283358e-01,\n   5.844073505e-01,  6.058657960e-01,  6.255537426e-01,  6.397307408e-01,\n   6.201670260e-01,  5.987971175e-01,  5.753587781e-01,  5.495364245e-01,\n   5.209468346e-01,  4.891200006e-01,  4.534730876e-01,  4.132744159e-01,\n   3.675927060e-01,  3.152240342e-01,  2.545841775e-01,  1.835455764e-01,\n   9.918255595e-02, -2.628828896e-03, -1.035128010e-01, -1.871664560e-01,\n  -2.576567279e-01, -3.178639957e-01, -3.698853971e-01, -4.152841095e-01,\n  -4.552491217e-01, -4.907008769e-01, -5.223630380e-01, -5.508124062e-01,\n  -5.765143776e-01, -5.998486007e-01, -6.211278553e-01, -6.406121537e-01,\n  -6.585194180e-01, -6.645543074e-01, -6.478403436e-01, -6.297359696e-01,\n  -6.100601564e-01, -5.885990231e-01, -5.650980300e-01, -5.392518362e-01,\n  -5.106909591e-01, -4.789639990e-01, -4.435136052e-01, -4.036434517e-01,\n  -3.584720417e-01, -3.068667711e-01, -2.473476588e-01, -1.779431078e-01,\n  -9.596728942e-02,  2.325458569e-03,  9.982372580e-02,  1.811866822e-01,\n   2.501136501e-01,  3.092533873e-01,  3.605522997e-01,  4.054727657e-01,\n   4.451347882e-01,  4.804106515e-01,  5.119898195e-01,  5.404244477e-01,\n   5.661619434e-01,  5.895686806e-01,  6.109475507e-01,  6.003271365e-01,\n   5.739944533e-01,  5.446234410e-01,  5.116560503e-01,  4.743886570e-01,\n   4.319212812e-01,  3.830839556e-01,  3.263272740e-01,  2.595549970e-01,\n   1.798594632e-01,  8.308691439e-02, -3.455499060e-02, -1.404511108e-01,\n  -2.269196964e-01, -2.988577649e-01, -3.596440735e-01, -4.116851906e-01,\n  -4.567416977e-01, -4.961313087e-01, -5.308598832e-01, -5.617085284e-01,\n  -5.892930521e-01, -6.141054921e-01, -6.365437238e-01, -6.569329565e-01,\n  -6.755415987e-01, -6.925931401e-01, -6.877139581e-01, -6.748869294e-01,\n  -6.611997355e-01, -6.465628523e-01, -6.308738858e-01, -6.140151734e-01,\n  -5.958508275e-01, -5.762230650e-01, -5.549476117e-01, -5.318078998e-01,\n  -5.065476686e-01, -4.788614349e-01, -4.483820782e-01, -4.146644691e-01,\n  -3.771635871e-01, -3.352048344e-01, -2.879430943e-01, -2.343052184e-01,\n  -1.729075540e-01, -1.019348852e-01, -1.895794740e-02,  6.920937281e-02,\n   1.448129904e-01,  2.099238522e-01,  2.665845916e-01,  3.163399611e-01,\n   3.603798149e-01,  3.996354923e-01,  4.348464092e-01,  4.666070735e-01,\n   4.954009254e-01,  5.216251172e-01,  5.456089430e-01,  5.676277376e-01,\n   5.650004958e-01,  5.363995499e-01,  5.044563616e-01,  4.685487258e-01,\n   4.278897766e-01,  3.814696578e-01,  3.279705091e-01,  2.656393469e-01,\n   1.920923242e-01,  1.040028802e-01, -3.393987745e-03, -1.095358294e-01,\n  -1.966767932e-01, -2.694998552e-01, -3.312659247e-01, -3.843155503e-01,\n  -4.303722225e-01, -4.707331500e-01, -5.063933787e-01, -5.381289295e-01,\n  -5.665539193e-01, -5.921606903e-01, -6.153485688e-01, -6.364448402e-01,\n  -6.557202943e-01, -6.734009108e-01, -6.896767601e-01, -7.047088637e-01,\n  -7.186345391e-01, -7.315716072e-01, -7.436217337e-01, -7.548731062e-01,\n  -7.654025961e-01, -7.752775176e-01, -7.845570677e-01, -7.932935143e-01,\n  -8.015331811e-01, -8.093172692e-01, -8.166825462e-01, -8.236619269e-01,\n  -8.302849649e-01, -8.365782715e-01, -8.425658723e-01, -8.482695142e-01,\n  -8.537089293e-01, -8.589020627e-01, -8.638652705e-01, -8.686134921e-01,\n  -8.731603996e-01, -8.775185304e-01, -8.816994016e-01, -8.857136124e-01,\n  -8.895709331e-01, -8.932803854e-01, -8.968503119e-01, -9.002884395e-01,\n  -9.036019347e-01, -9.067974538e-01, -9.098811874e-01, -9.128589003e-01,\n  -9.157359677e-01, -9.185174075e-01, -9.212079094e-01, -9.238118615e-01,\n  -9.263333739e-01, -9.287763006e-01, -9.311442591e-01, -9.334406481e-01,\n  -9.356686640e-01, -9.378313157e-01, -9.399314380e-01, -9.419717041e-01,\n  -9.439546371e-01, -9.458826201e-01, -9.477579060e-01, -9.495826263e-01,\n  -9.513587989e-01, -9.530883359e-01, -9.547730501e-01, -9.564146617e-01,\n  -9.580148040e-01, -9.595750288e-01, -9.610968112e-01, -9.625815548e-01,\n  -9.640305956e-01, -9.654452060e-01, -9.668265989e-01, -9.681759305e-01,\n  -9.694943044e-01, -9.707827737e-01, -9.720423447e-01, -9.732739786e-01,\n  -9.744785949e-01, -9.756570727e-01, -9.768102539e-01, -9.779389442e-01,\n  -9.790439155e-01, -9.801259079e-01, -9.811856308e-01, -9.822237646e-01,\n  -9.832409624e-01, -9.842378513e-01, -9.852150334e-01, -9.861730874e-01,\n  -9.871125695e-01, -9.880340145e-01, -9.889379369e-01, -9.898248319e-01,\n  -9.906951760e-01, -9.915494283e-01, -9.923880310e-01, -9.932114103e-01,\n  -9.940199768e-01, -9.948141269e-01, -9.955942426e-01, -9.963606927e-01,\n  -9.971138332e-01, -9.978540078e-01, -9.985815484e-01, -9.992967758e-01,\n  -1.000000000e+00, -1.000691521e+00, -1.001371627e+00, -1.001371627e+00,\n};\nconst float lut_stiffness[] FLASHMEM = {\n  -6.250000000e-02, -5.859375000e-02, -5.468750000e-02, -5.078125000e-02,\n  -4.687500000e-02, -4.296875000e-02, -3.906250000e-02, -3.515625000e-02,\n  -3.125000000e-02, -2.734375000e-02, -2.343750000e-02, -1.953125000e-02,\n  -1.562500000e-02, -1.171875000e-02, -7.812500000e-03, -3.906250000e-03,\n   0.000000000e+00,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   1.009582073e-03,  2.416076364e-03,  4.002252878e-03,  5.791066350e-03,\n   7.808404022e-03,  1.008346028e-02,  1.264915914e-02,  1.554263074e-02,\n   1.880574864e-02,  2.248573583e-02,  2.663584813e-02,  3.131614488e-02,\n   3.659435812e-02,  4.254687278e-02,  4.925983210e-02,  5.683038428e-02,\n   6.536808837e-02,  7.499649981e-02,  8.585495846e-02,  9.810060511e-02,\n   1.119106556e-01,  1.274849653e-01,  1.450489216e-01,  1.648567056e-01,\n   1.871949702e-01,  2.123869891e-01,  2.407973346e-01,  2.728371538e-01,\n   3.089701187e-01,  3.497191360e-01,  3.956739150e-01,  4.474995013e-01,\n   5.059459012e-01,  5.718589358e-01,  6.461924814e-01,  7.300222738e-01,\n   8.245614757e-01,  9.311782340e-01,  1.000037649e+00,  1.005639154e+00,\n   1.048005353e+00,  1.183990632e+00,  1.457101344e+00,  2.000000000e+00,\n   2.000000000e+00,\n};\nconst float lut_svf_shift[] FLASHMEM = {\n   7.500000000e-01,  7.591880421e-01,  7.683455389e-01,  7.774424499e-01,\n   7.864497239e-01,  7.953397451e-01,  8.040867240e-01,  8.126670211e-01,\n   8.210593968e-01,  8.292451828e-01,  8.372083767e-01,  8.449356653e-01,\n   8.524163823e-01,  8.596424124e-01,  8.666080494e-01,  8.733098228e-01,\n   8.797462999e-01,  8.859178746e-01,  8.918265520e-01,  8.974757332e-01,\n   9.028700082e-01,  9.080149595e-01,  9.129169800e-01,  9.175831064e-01,\n   9.220208696e-01,  9.262381615e-01,  9.302431183e-01,  9.340440198e-01,\n   9.376492031e-01,  9.410669892e-01,  9.443056230e-01,  9.473732226e-01,\n   9.502777394e-01,  9.530269262e-01,  9.556283121e-01,  9.580891845e-01,\n   9.604165758e-01,  9.626172547e-01,  9.646977214e-01,  9.666642057e-01,\n   9.685226683e-01,  9.702788030e-01,  9.719380415e-01,  9.735055596e-01,\n   9.749862835e-01,  9.763848977e-01,  9.777058532e-01,  9.789533760e-01,\n   9.801314757e-01,  9.812439545e-01,  9.822944161e-01,  9.832862746e-01,\n   9.842227627e-01,  9.851069409e-01,  9.859417053e-01,  9.867297957e-01,\n   9.874738036e-01,  9.881761792e-01,  9.888392394e-01,  9.894651739e-01,\n   9.900560522e-01,  9.906138300e-01,  9.911403551e-01,  9.916373732e-01,\n   9.921065333e-01,  9.925493929e-01,  9.929674233e-01,  9.933620136e-01,\n   9.937344761e-01,  9.940860496e-01,  9.944179041e-01,  9.947311441e-01,\n   9.950268127e-01,  9.953058946e-01,  9.955693195e-01,  9.958179650e-01,\n   9.960526598e-01,  9.962741861e-01,  9.964832825e-01,  9.966806459e-01,\n   9.968669346e-01,  9.970427696e-01,  9.972087374e-01,  9.973653916e-01,\n   9.975132546e-01,  9.976528197e-01,  9.977845524e-01,  9.979088923e-01,\n   9.980262540e-01,  9.981370293e-01,  9.982415876e-01,  9.983402778e-01,\n   9.984334293e-01,  9.985213529e-01,  9.986043419e-01,  9.986826732e-01,\n   9.987566083e-01,  9.988263939e-01,  9.988922628e-01,  9.989544348e-01,\n   9.990131175e-01,  9.990685067e-01,  9.991207871e-01,  9.991701333e-01,\n   9.992167099e-01,  9.992606725e-01,  9.993021676e-01,  9.993413338e-01,\n   9.993783018e-01,  9.994131950e-01,  9.994461297e-01,  9.994772160e-01,\n   9.995065576e-01,  9.995342523e-01,  9.995603927e-01,  9.995850659e-01,\n   9.996083544e-01,  9.996303357e-01,  9.996510834e-01,  9.996706665e-01,\n   9.996891506e-01,  9.997065972e-01,  9.997230647e-01,  9.997386078e-01,\n   9.997532786e-01,  9.997671260e-01,  9.997801962e-01,  9.997925329e-01,\n   9.998041771e-01,  9.998151678e-01,  9.998255416e-01,  9.998353332e-01,\n   9.998445753e-01,  9.998532986e-01,  9.998615323e-01,  9.998693039e-01,\n   9.998766393e-01,  9.998835630e-01,  9.998900981e-01,  9.998962664e-01,\n   9.999020885e-01,  9.999075839e-01,  9.999127708e-01,  9.999176666e-01,\n   9.999222876e-01,  9.999266493e-01,  9.999307661e-01,  9.999346519e-01,\n   9.999383196e-01,  9.999417815e-01,  9.999450491e-01,  9.999481332e-01,\n   9.999510443e-01,  9.999537919e-01,  9.999563854e-01,  9.999588333e-01,\n   9.999611438e-01,  9.999633246e-01,  9.999653831e-01,  9.999673260e-01,\n   9.999691598e-01,  9.999708907e-01,  9.999725245e-01,  9.999740666e-01,\n   9.999755221e-01,  9.999768960e-01,  9.999781927e-01,  9.999794167e-01,\n   9.999805719e-01,  9.999816623e-01,  9.999826915e-01,  9.999836630e-01,\n   9.999845799e-01,  9.999854454e-01,  9.999862623e-01,  9.999870333e-01,\n   9.999877611e-01,  9.999884480e-01,  9.999890964e-01,  9.999897083e-01,\n   9.999902860e-01,  9.999908312e-01,  9.999913458e-01,  9.999918315e-01,\n   9.999922900e-01,  9.999927227e-01,  9.999931311e-01,  9.999935167e-01,\n   9.999938805e-01,  9.999942240e-01,  9.999945482e-01,  9.999948542e-01,\n   9.999951430e-01,  9.999954156e-01,  9.999956729e-01,  9.999959157e-01,\n   9.999961450e-01,  9.999963613e-01,  9.999965656e-01,  9.999967583e-01,\n   9.999969403e-01,  9.999971120e-01,  9.999972741e-01,  9.999974271e-01,\n   9.999975715e-01,  9.999977078e-01,  9.999978364e-01,  9.999979579e-01,\n   9.999980725e-01,  9.999981807e-01,  9.999982828e-01,  9.999983792e-01,\n   9.999984701e-01,  9.999985560e-01,  9.999986370e-01,  9.999987135e-01,\n   9.999987857e-01,  9.999988539e-01,  9.999989182e-01,  9.999989789e-01,\n   9.999990362e-01,  9.999990903e-01,  9.999991414e-01,  9.999991896e-01,\n   9.999992351e-01,  9.999992780e-01,  9.999993185e-01,  9.999993568e-01,\n   9.999993929e-01,  9.999994269e-01,  9.999994591e-01,  9.999994895e-01,\n   9.999995181e-01,  9.999995452e-01,  9.999995707e-01,  9.999995948e-01,\n   9.999996175e-01,  9.999996390e-01,  9.999996593e-01,  9.999996784e-01,\n   9.999996964e-01,  9.999997135e-01,  9.999997296e-01,  9.999997447e-01,\n   9.999997591e-01,  9.999997726e-01,  9.999997853e-01,  9.999997974e-01,\n   9.999998088e-01,  9.999998195e-01,  9.999998296e-01,  9.999998392e-01,\n   9.999998482e-01,  9.999998567e-01,  9.999998648e-01,  9.999998724e-01,\n   9.999998795e-01,\n};\nconst float lut_4x_downsampler_fir[] FLASHMEM = {\n   2.442415000e-02,  9.297315000e-02,  1.671293800e-01,  2.154733200e-01,\n};\n\n\nconst float* const lookup_table_table[] FLASHMEM = {\n  lut_sine,\n  lut_fm_frequency_quantizer,\n  lut_fold,\n  lut_fold_2,\n  lut_stiffness,\n  lut_svf_shift,\n  lut_4x_downsampler_fir,\n};\n\nconst int16_t lut_ws_inverse_tan[] FLASHMEM = {\n  -32767, -26872, -24921, -23661,\n  -22748, -22047, -21486, -21026,\n  -20640, -20310, -20025, -19775,\n  -19554, -19358, -19181, -19021,\n  -18875, -18742, -18620, -18507,\n  -18402, -18304, -18213, -18128,\n  -18047, -17971, -17900, -17832,\n  -17767, -17706, -17647, -17591,\n  -17537, -17485, -17435, -17387,\n  -17341, -17296, -17253, -17211,\n  -17170, -17130, -17092, -17054,\n  -17017, -16981, -16945, -16911,\n  -16877, -16843, -16810, -16778,\n  -16746, -16715, -16683, -16652,\n  -16622, -16592, -16561, -16531,\n  -16502, -16472, -16442, -16413,\n  -16384, -16354, -16325, -16295,\n  -16265, -16236, -16206, -16175,\n  -16145, -16115, -16084, -16052,\n  -16021, -15989, -15957, -15924,\n  -15890, -15856, -15822, -15786,\n  -15750, -15713, -15675, -15637,\n  -15597, -15556, -15514, -15471,\n  -15426, -15380, -15332, -15282,\n  -15230, -15176, -15120, -15061,\n  -15000, -14935, -14867, -14796,\n  -14720, -14639, -14554, -14463,\n  -14365, -14260, -14147, -14025,\n  -13892, -13746, -13586, -13409,\n  -13213, -12992, -12742, -12457,\n  -12127, -11741, -11281, -10720,\n  -10019,  -9106,  -7846,  -5895,\n       0,   5895,   7846,   9106,\n   10019,  10720,  11281,  11741,\n   12127,  12457,  12742,  12992,\n   13213,  13409,  13586,  13746,\n   13892,  14025,  14147,  14260,\n   14365,  14463,  14554,  14639,\n   14720,  14796,  14867,  14935,\n   15000,  15061,  15120,  15176,\n   15230,  15282,  15332,  15380,\n   15426,  15471,  15514,  15556,\n   15597,  15637,  15675,  15713,\n   15750,  15786,  15822,  15856,\n   15890,  15924,  15957,  15989,\n   16021,  16052,  16084,  16115,\n   16145,  16175,  16206,  16236,\n   16265,  16295,  16325,  16354,\n   16384,  16413,  16442,  16472,\n   16502,  16531,  16561,  16592,\n   16622,  16652,  16683,  16715,\n   16746,  16778,  16810,  16843,\n   16877,  16911,  16945,  16981,\n   17017,  17054,  17092,  17130,\n   17170,  17211,  17253,  17296,\n   17341,  17387,  17435,  17485,\n   17537,  17591,  17647,  17706,\n   17767,  17832,  17900,  17971,\n   18047,  18128,  18213,  18304,\n   18402,  18507,  18620,  18742,\n   18875,  19021,  19181,  19358,\n   19554,  19775,  20025,  20310,\n   20640,  21026,  21486,  22047,\n   22748,  23661,  24921,  26872,\n   32767,\n};\nconst int16_t lut_ws_inverse_sin[] FLASHMEM = {\n  -32767, -30921, -30153, -29561,\n  -29060, -28617, -28215, -27843,\n  -27496, -27169, -26858, -26561,\n  -26276, -26001, -25736, -25479,\n  -25229, -24986, -24748, -24517,\n  -24290, -24068, -23850, -23636,\n  -23425, -23218, -23014, -22813,\n  -22614, -22419, -22225, -22034,\n  -21845, -21657, -21472, -21288,\n  -21106, -20926, -20747, -20569,\n  -20393, -20218, -20043, -19870,\n  -19698, -19527, -19357, -19188,\n  -19019, -18851, -18684, -18517,\n  -18351, -18185, -18020, -17855,\n  -17691, -17527, -17363, -17199,\n  -17036, -16873, -16709, -16546,\n  -16384, -16221, -16058, -15894,\n  -15731, -15568, -15404, -15240,\n  -15076, -14912, -14747, -14582,\n  -14416, -14250, -14083, -13916,\n  -13748, -13579, -13410, -13240,\n  -13069, -12897, -12724, -12549,\n  -12374, -12198, -12020, -11841,\n  -11661, -11479, -11295, -11110,\n  -10922, -10733, -10542, -10348,\n  -10153,  -9954,  -9753,  -9549,\n   -9342,  -9131,  -8917,  -8699,\n   -8477,  -8250,  -8019,  -7781,\n   -7538,  -7288,  -7031,  -6766,\n   -6491,  -6206,  -5909,  -5598,\n   -5271,  -4924,  -4552,  -4150,\n   -3707,  -3206,  -2614,  -1846,\n       0,   1846,   2614,   3206,\n    3707,   4150,   4552,   4924,\n    5271,   5598,   5909,   6206,\n    6491,   6766,   7031,   7288,\n    7538,   7781,   8019,   8250,\n    8477,   8699,   8917,   9131,\n    9342,   9549,   9753,   9954,\n   10153,  10348,  10542,  10733,\n   10922,  11110,  11295,  11479,\n   11661,  11841,  12020,  12198,\n   12374,  12549,  12724,  12897,\n   13069,  13240,  13410,  13579,\n   13748,  13916,  14083,  14250,\n   14416,  14582,  14747,  14912,\n   15076,  15240,  15404,  15568,\n   15731,  15894,  16058,  16221,\n   16384,  16546,  16709,  16873,\n   17036,  17199,  17363,  17527,\n   17691,  17855,  18020,  18185,\n   18351,  18517,  18684,  18851,\n   19019,  19188,  19357,  19527,\n   19698,  19870,  20043,  20218,\n   20393,  20569,  20747,  20926,\n   21106,  21288,  21472,  21657,\n   21845,  22034,  22225,  22419,\n   22614,  22813,  23014,  23218,\n   23425,  23636,  23850,  24068,\n   24290,  24517,  24748,  24986,\n   25229,  25479,  25736,  26001,\n   26276,  26561,  26858,  27169,\n   27496,  27843,  28215,  28617,\n   29060,  29561,  30153,  30921,\n   32767,\n};\nconst int16_t lut_ws_linear[] FLASHMEM = {\n  -32767, -32511, -32255, -31999,\n  -31743, -31487, -31231, -30975,\n  -30719, -30463, -30207, -29951,\n  -29695, -29439, -29183, -28927,\n  -28671, -28415, -28159, -27903,\n  -27647, -27391, -27135, -26879,\n  -26623, -26367, -26111, -25855,\n  -25599, -25343, -25087, -24831,\n  -24575, -24319, -24063, -23807,\n  -23551, -23295, -23039, -22783,\n  -22527, -22271, -22015, -21759,\n  -21503, -21247, -20991, -20735,\n  -20479, -20223, -19967, -19711,\n  -19455, -19199, -18943, -18687,\n  -18431, -18175, -17919, -17663,\n  -17407, -17151, -16895, -16639,\n  -16384, -16128, -15872, -15616,\n  -15360, -15104, -14848, -14592,\n  -14336, -14080, -13824, -13568,\n  -13312, -13056, -12800, -12544,\n  -12288, -12032, -11776, -11520,\n  -11264, -11008, -10752, -10496,\n  -10240,  -9984,  -9728,  -9472,\n   -9216,  -8960,  -8704,  -8448,\n   -8192,  -7936,  -7680,  -7424,\n   -7168,  -6912,  -6656,  -6400,\n   -6144,  -5888,  -5632,  -5376,\n   -5120,  -4864,  -4608,  -4352,\n   -4096,  -3840,  -3584,  -3328,\n   -3072,  -2816,  -2560,  -2304,\n   -2048,  -1792,  -1536,  -1280,\n   -1024,   -768,   -512,   -256,\n       0,    256,    512,    768,\n    1024,   1280,   1536,   1792,\n    2048,   2304,   2560,   2816,\n    3072,   3328,   3584,   3840,\n    4096,   4352,   4608,   4864,\n    5120,   5376,   5632,   5888,\n    6144,   6400,   6656,   6912,\n    7168,   7424,   7680,   7936,\n    8192,   8448,   8704,   8960,\n    9216,   9472,   9728,   9984,\n   10240,  10496,  10752,  11008,\n   11264,  11520,  11776,  12032,\n   12288,  12544,  12800,  13056,\n   13312,  13568,  13824,  14080,\n   14336,  14592,  14848,  15104,\n   15360,  15616,  15872,  16128,\n   16384,  16639,  16895,  17151,\n   17407,  17663,  17919,  18175,\n   18431,  18687,  18943,  19199,\n   19455,  19711,  19967,  20223,\n   20479,  20735,  20991,  21247,\n   21503,  21759,  22015,  22271,\n   22527,  22783,  23039,  23295,\n   23551,  23807,  24063,  24319,\n   24575,  24831,  25087,  25343,\n   25599,  25855,  26111,  26367,\n   26623,  26879,  27135,  27391,\n   27647,  27903,  28159,  28415,\n   28671,  28927,  29183,  29439,\n   29695,  29951,  30207,  30463,\n   30719,  30975,  31231,  31487,\n   31743,  31999,  32255,  32511,\n   32767,\n};\nconst int16_t lut_ws_bump[] FLASHMEM = {\n       0,    -36,   -150,   -348,\n    -636,  -1017,  -1496,  -2074,\n   -2752,  -3528,  -4401,  -5366,\n   -6417,  -7548,  -8750, -10013,\n  -11327, -12679, -14056, -15444,\n  -16829, -18197, -19530, -20816,\n  -22039, -23185, -24239, -25190,\n  -26025, -26733, -27306, -27736,\n  -28018, -28214, -28391, -28550,\n  -28690, -28810, -28912, -28994,\n  -29056, -29099, -29122, -29125,\n  -29109, -29073, -29017, -28941,\n  -28846, -28732, -28599, -28446,\n  -28275, -28085, -27877, -27651,\n  -27407, -27145, -26867, -26572,\n  -26260, -25933, -25590, -25233,\n  -24861, -24475, -24075, -23663,\n  -23238, -22802, -22354, -21896,\n  -21428, -20951, -20465, -19971,\n  -19469, -18961, -18447, -17928,\n  -17404, -16877, -16346, -15813,\n  -15278, -14742, -14206, -13670,\n  -13136, -12603, -12073, -11547,\n  -11025, -10507,  -9995,  -9489,\n   -8990,  -8499,  -8015,  -7541,\n   -7076,  -6621,  -6178,  -5745,\n   -5324,  -4916,  -4521,  -4140,\n   -3773,  -3420,  -3082,  -2760,\n   -2454,  -2165,  -1892,  -1636,\n   -1398,  -1178,   -976,   -792,\n    -627,   -481,   -354,   -246,\n    -158,    -89,    -39,    -10,\n       0,     10,     39,     89,\n     158,    246,    354,    481,\n     627,    792,    976,   1178,\n    1398,   1636,   1892,   2165,\n    2454,   2760,   3082,   3420,\n    3773,   4140,   4521,   4916,\n    5324,   5745,   6178,   6621,\n    7076,   7541,   8015,   8499,\n    8990,   9489,   9995,  10507,\n   11025,  11547,  12073,  12603,\n   13136,  13670,  14206,  14742,\n   15278,  15813,  16346,  16877,\n   17404,  17928,  18447,  18961,\n   19469,  19971,  20465,  20951,\n   21428,  21896,  22354,  22802,\n   23238,  23663,  24075,  24475,\n   24861,  25233,  25590,  25933,\n   26260,  26572,  26867,  27145,\n   27407,  27651,  27877,  28085,\n   28275,  28446,  28599,  28732,\n   28846,  28941,  29017,  29073,\n   29109,  29125,  29122,  29099,\n   29056,  28994,  28912,  28810,\n   28690,  28550,  28391,  28214,\n   28018,  27736,  27306,  26733,\n   26025,  25190,  24239,  23185,\n   22039,  20816,  19530,  18197,\n   16829,  15444,  14056,  12679,\n   11327,  10013,   8750,   7548,\n    6417,   5366,   4401,   3528,\n    2752,   2074,   1496,   1017,\n     636,    348,    150,     36,\n       0,\n};\nconst int16_t lut_ws_double_bump[] FLASHMEM = {\n   32767,  32745,  32678,  32567,\n   32412,  32213,  31971,  31685,\n   31356,  30985,  30571,  30117,\n   29621,  29085,  28510,  27896,\n   27245,  26556,  25832,  25072,\n   24279,  23452,  22594,  21705,\n   20787,  19841,  18868,  17869,\n   16846,  15800,  14732,  13645,\n   12539,  11417,  10278,   9126,\n    7962,   6786,   5602,   4410,\n    3212,   2009,    804,   -402,\n   -1608,  -2811,  -4011,  -5205,\n   -6393,  -7571,  -8739,  -9896,\n  -11039, -12167, -13279, -14372,\n  -15446, -16499, -17530, -18537,\n  -19519, -20475, -21403, -22301,\n  -23170, -24007, -24811, -25582,\n  -26319, -27019, -27683, -28310,\n  -28898, -29447, -29956, -30424,\n  -30852, -31237, -31580, -31880,\n  -32137, -32351, -32521, -32646,\n  -32728, -32765, -32757, -32705,\n  -32609, -32469, -32285, -32057,\n  -31785, -31470, -31113, -30714,\n  -30273, -29791, -29268, -28706,\n  -28105, -27466, -26790, -26077,\n  -25329, -24547, -23731, -22884,\n  -22005, -21096, -20159, -19195,\n  -18204, -17189, -16151, -15090,\n  -14010, -12910, -11793, -10659,\n   -9512,  -8351,  -7179,  -5998,\n   -4808,  -3612,  -2410,  -1206,\n       0,   1206,   2410,   3612,\n    4808,   5998,   7179,   8351,\n    9512,  10659,  11793,  12910,\n   14010,  15090,  16151,  17189,\n   18204,  19195,  20159,  21096,\n   22005,  22884,  23731,  24547,\n   25329,  26077,  26790,  27466,\n   28105,  28706,  29268,  29791,\n   30273,  30714,  31113,  31470,\n   31785,  32057,  32285,  32469,\n   32609,  32705,  32757,  32765,\n   32728,  32646,  32521,  32351,\n   32137,  31880,  31580,  31237,\n   30852,  30424,  29956,  29447,\n   28898,  28310,  27683,  27019,\n   26319,  25582,  24811,  24007,\n   23170,  22301,  21403,  20475,\n   19519,  18537,  17530,  16499,\n   15446,  14372,  13279,  12167,\n   11039,   9896,   8739,   7571,\n    6393,   5205,   4011,   2811,\n    1608,    402,   -804,  -2009,\n   -3212,  -4410,  -5602,  -6786,\n   -7962,  -9126, -10278, -11417,\n  -12539, -13645, -14732, -15800,\n  -16846, -17869, -18868, -19841,\n  -20787, -21705, -22594, -23452,\n  -24279, -25072, -25832, -26556,\n  -27245, -27896, -28510, -29085,\n  -29621, -30117, -30571, -30985,\n  -31356, -31685, -31971, -32213,\n  -32412, -32567, -32678, -32745,\n  -32767,\n};\n\n\nconst int16_t* const lookup_table_i16_table[] FLASHMEM = {\n  lut_ws_inverse_tan,\n  lut_ws_inverse_sin,\n  lut_ws_linear,\n  lut_ws_bump,\n  lut_ws_double_bump,\n  lut_ws_double_bump,\n};\n\n// const int32_t* const lookup_table_i32_table[] FLASHMEM = {\n// };\n\nconst int8_t lut_lpc_excitation_pulse[] FLASHMEM = {\n       0,      0,      0,      0,\n       1,      1,      1,      2,\n       3,      3,      4,      5,\n       6,      7,      8,      9,\n      10,     12,     13,     15,\n      17,     19,     21,     23,\n      25,     28,     30,     33,\n      36,     38,     41,     44,\n      48,     51,     54,     57,\n      61,     64,     68,     71,\n      75,     78,     82,     85,\n      89,     92,     95,     99,\n     102,    105,    108,    110,\n     113,    115,    118,    120,\n     121,    123,    124,    125,\n     126,    127,    127,    127,\n     127,    126,    125,    124,\n     122,    121,    118,    116,\n     113,    110,    107,    104,\n     100,     96,     92,     87,\n      83,     78,     73,     68,\n      63,     58,     53,     47,\n      42,     37,     31,     26,\n      21,     16,     11,      6,\n       1,     -3,     -8,    -12,\n     -16,    -20,    -23,    -26,\n     -29,    -32,    -35,    -37,\n     -39,    -40,    -42,    -43,\n     -43,    -44,    -44,    -44,\n     -44,    -44,    -43,    -42,\n     -41,    -40,    -39,    -38,\n     -36,    -35,    -33,    -32,\n     -30,    -29,    -27,    -26,\n     -24,    -23,    -22,    -20,\n     -19,    -18,    -18,    -17,\n     -16,    -16,    -16,    -16,\n     -16,    -16,    -17,    -17,\n     -18,    -19,    -20,    -21,\n     -23,    -24,    -26,    -27,\n     -29,    -30,    -32,    -34,\n     -35,    -37,    -39,    -40,\n     -42,    -43,    -44,    -46,\n     -47,    -48,    -48,    -49,\n     -49,    -50,    -50,    -50,\n     -49,    -49,    -48,    -47,\n     -46,    -45,    -44,    -42,\n     -41,    -39,    -37,    -35,\n     -33,    -31,    -29,    -27,\n     -25,    -23,    -20,    -18,\n     -16,    -14,    -13,    -11,\n      -9,     -8,     -7,     -6,\n      -5,     -4,     -3,     -3,\n      -3,     -3,     -3,     -4,\n      -5,     -6,     -7,     -9,\n     -10,    -12,    -14,    -16,\n     -18,    -21,    -23,    -26,\n     -29,    -32,    -34,    -37,\n     -40,    -43,    -46,    -49,\n     -51,    -54,    -56,    -59,\n     -61,    -63,    -65,    -67,\n     -68,    -70,    -71,    -72,\n     -72,    -73,    -73,    -73,\n     -73,    -72,    -72,    -71,\n     -70,    -69,    -67,    -66,\n     -64,    -63,    -61,    -59,\n     -57,    -54,    -52,    -50,\n     -48,    -45,    -43,    -41,\n     -39,    -37,    -35,    -33,\n     -31,    -29,    -27,    -26,\n     -25,    -23,    -22,    -21,\n     -20,    -20,    -19,    -19,\n     -19,    -18,    -18,    -18,\n     -19,    -19,    -19,    -20,\n     -20,    -21,    -21,    -22,\n     -22,    -23,    -23,    -24,\n     -24,    -25,    -25,    -25,\n     -26,    -26,    -26,    -25,\n     -25,    -25,    -24,    -24,\n     -23,    -22,    -21,    -20,\n     -19,    -18,    -16,    -15,\n     -13,    -12,    -10,     -8,\n      -6,     -4,     -3,     -1,\n       1,      3,      5,      7,\n       8,     10,     12,     13,\n      15,     16,     17,     18,\n      19,     20,     21,     21,\n      22,     22,     22,     22,\n      22,     22,     22,     22,\n      21,     21,     20,     19,\n      19,     18,     17,     16,\n      15,     14,     14,     13,\n      12,     11,     10,     10,\n       9,      9,      8,      8,\n       8,      8,      8,      8,\n       8,      8,      8,      9,\n       9,     10,     11,     12,\n      13,     14,     15,     16,\n      17,     18,     19,     21,\n      22,     23,     24,     26,\n      27,     28,     29,     30,\n      31,     32,     33,     33,\n      34,     35,     35,     35,\n      36,     36,     36,     36,\n      35,     35,     35,     34,\n      34,     33,     33,     32,\n      31,     30,     30,     29,\n      28,     27,     26,     25,\n      25,     24,     23,     22,\n      22,     21,     20,     20,\n      19,     19,     19,     19,\n      19,     19,     19,     19,\n      19,     19,     20,     20,\n      21,     21,     22,     22,\n      23,     23,     24,     25,\n      25,     26,     27,     27,\n      28,     29,     29,     29,\n      30,     30,     30,     31,\n      31,     31,     31,     30,\n      30,     30,     29,     29,\n      28,     28,     27,     26,\n      26,     25,     24,     23,\n      22,     21,     20,     19,\n      18,     17,     16,     15,\n      15,     14,     13,     12,\n      12,     11,     10,     10,\n      10,      9,      9,      9,\n       9,      9,      9,      9,\n       9,     10,     10,     10,\n      11,     11,     12,     12,\n      12,     13,     13,     14,\n      14,     14,     15,     15,\n      15,     15,     15,     15,\n      15,     15,     15,     15,\n      14,     14,     14,     13,\n      12,     12,     11,     10,\n       9,      8,      8,      7,\n       6,      5,      4,      3,\n       2,      1,      0,     -1,\n      -2,     -3,     -4,     -4,\n      -5,     -6,     -6,     -7,\n      -7,     -8,     -8,     -8,\n      -9,     -9,     -9,     -9,\n      -9,     -9,     -9,     -9,\n      -8,     -8,     -8,     -7,\n      -7,     -7,     -6,     -6,\n      -5,     -5,     -5,     -4,\n      -4,     -4,     -3,     -3,\n      -3,     -2,     -2,     -2,\n      -2,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -1,     -1,     -1,\n      -1,     -1,     -1,      0,\n       0,      0,      0,      0,\n};\n\n\nconst int8_t* const lookup_table_i8_table[] FLASHMEM = {\n  lut_lpc_excitation_pulse,\n};\n\nconst int16_t wav_integrated_waves[] FLASHMEM = {\n  -20556, -20706, -20806, -20857,\n  -20857, -20806, -20706, -20556,\n  -20356, -20107, -19810, -19465,\n  -19073, -18635, -18152, -17626,\n  -17057, -16447, -15798, -15110,\n  -14386, -13627, -12835, -12013,\n  -11162, -10283,  -9380,  -8454,\n   -7508,  -6544,  -5564,  -4571,\n   -3567,  -2554,  -1535,   -512,\n     512,   1535,   2554,   3567,\n    4571,   5564,   6544,   7508,\n    8454,   9380,  10283,  11162,\n   12013,  12835,  13627,  14386,\n   15110,  15798,  16447,  17057,\n   17626,  18152,  18635,  19073,\n   19465,  19810,  20107,  20356,\n   20556,  20706,  20806,  20857,\n   20857,  20806,  20706,  20556,\n   20356,  20107,  19810,  19465,\n   19073,  18635,  18152,  17626,\n   17057,  16447,  15798,  15110,\n   14386,  13627,  12835,  12013,\n   11162,  10283,   9380,   8454,\n    7508,   6544,   5564,   4571,\n    3567,   2554,   1535,    512,\n    -512,  -1535,  -2554,  -3567,\n   -4571,  -5564,  -6544,  -7508,\n   -8454,  -9380, -10283, -11162,\n  -12013, -12835, -13627, -14386,\n  -15110, -15798, -16447, -17057,\n  -17626, -18152, -18635, -19073,\n  -19465, -19810, -20107, -20356,\n  -20556, -20706, -20806, -20857,\n   -9825, -10122, -10322, -10422,\n  -10422, -10322, -10122,  -9825,\n   -9433,  -8950,  -8381,  -7732,\n   -7007,  -6216,  -5364,  -4461,\n   -3515,  -2535,  -1531,   -512,\n     512,   1531,   2535,   3515,\n    4461,   5364,   6216,   7007,\n    7732,   8381,   8950,   9433,\n    9825,  10122,  10322,  10422,\n   10422,  10322,  10122,   9825,\n    9433,   8950,   8381,   7732,\n    7007,   6216,   5364,   4461,\n    3515,   2535,   1531,    512,\n    -512,  -1531,  -2535,  -3515,\n   -4461,  -5364,  -6216,  -7007,\n   -7732,  -8381,  -8950,  -9433,\n   -9825, -10122, -10322, -10422,\n  -10422, -10322, -10122,  -9825,\n   -9433,  -8950,  -8381,  -7732,\n   -7007,  -6216,  -5364,  -4461,\n   -3515,  -2535,  -1531,   -512,\n     512,   1531,   2535,   3515,\n    4461,   5364,   6216,   7007,\n    7732,   8381,   8950,   9433,\n    9825,  10122,  10322,  10422,\n   10422,  10322,  10122,   9825,\n    9433,   8950,   8381,   7732,\n    7007,   6216,   5364,   4461,\n    3515,   2535,   1531,    512,\n    -512,  -1531,  -2535,  -3515,\n   -4461,  -5364,  -6216,  -7007,\n   -7732,  -8381,  -8950,  -9433,\n   -9825, -10122, -10322, -10422,\n   -6056,  -6494,  -6791,  -6941,\n   -6941,  -6791,  -6494,  -6056,\n   -5487,  -4799,  -4008,  -3129,\n   -2183,  -1190,   -171,    852,\n    1856,   2820,   3724,   4546,\n    5270,   5880,   6363,   6708,\n    6908,   6958,   6857,   6609,\n    6217,   5690,   5041,   4282,\n    3431,   2505,   1525,    512,\n    -512,  -1525,  -2505,  -3431,\n   -4282,  -5041,  -5690,  -6217,\n   -6609,  -6857,  -6958,  -6908,\n   -6708,  -6363,  -5880,  -5270,\n   -4546,  -3724,  -2820,  -1856,\n    -852,    171,   1190,   2183,\n    3129,   4008,   4799,   5487,\n    6056,   6494,   6791,   6941,\n    6941,   6791,   6494,   6056,\n    5487,   4799,   4008,   3129,\n    2183,   1190,    171,   -852,\n   -1856,  -2820,  -3724,  -4546,\n   -5270,  -5880,  -6363,  -6708,\n   -6908,  -6958,  -6857,  -6609,\n   -6217,  -5690,  -5041,  -4282,\n   -3431,  -2505,  -1525,   -512,\n     512,   1525,   2505,   3431,\n    4282,   5041,   5690,   6217,\n    6609,   6857,   6958,   6908,\n    6708,   6363,   5880,   5270,\n    4546,   3724,   2820,   1856,\n     852,   -171,  -1190,  -2183,\n   -3129,  -4008,  -4799,  -5487,\n   -6056,  -6494,  -6791,  -6941,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -2732,  -3420,  -3902,  -4151,\n   -4151,  -3902,  -3420,  -2732,\n   -1881,   -916,    103,   1116,\n    2062,   2884,   3534,   3972,\n    4171,   4121,   3824,   3297,\n    2573,   1695,    715,   -308,\n   -1312,  -2238,  -3029,  -3639,\n   -4031,  -4181,  -4081,  -3736,\n   -3167,  -2408,  -1505,   -512,\n     512,   1505,   2408,   3167,\n    3736,   4081,   4181,   4031,\n    3639,   3029,   2238,   1312,\n     308,   -715,  -1695,  -2573,\n   -3297,  -3824,  -4121,  -4171,\n   -3972,  -3534,  -2884,  -2062,\n   -1116,   -103,    916,   1881,\n    2732,   3420,   3902,   4151,\n    4151,   3902,   3420,   2732,\n    1881,    916,   -103,  -1116,\n   -2062,  -2884,  -3534,  -3972,\n   -4171,  -4121,  -3824,  -3297,\n   -2573,  -1695,   -715,    308,\n    1312,   2238,   3029,   3639,\n    4031,   4181,   4081,   3736,\n    3167,   2408,   1505,    512,\n    -512,  -1505,  -2408,  -3167,\n   -3736,  -4081,  -4181,  -4031,\n   -3639,  -3029,  -2238,  -1312,\n    -308,    715,   1695,   2573,\n    3297,   3824,   4121,   4171,\n    3972,   3534,   2884,   2062,\n    1116,    103,   -916,  -1881,\n   -2732,  -3420,  -3902,  -4151,\n   -1794,  -2585,  -3154,  -3452,\n   -3452,  -3154,  -2585,  -1794,\n    -848,    171,   1176,   2079,\n    2803,   3285,   3485,   3385,\n    2993,   2343,   1492,    512,\n    -512,  -1492,  -2343,  -2993,\n   -3385,  -3485,  -3285,  -2803,\n   -2079,  -1176,   -171,    848,\n    1794,   2585,   3154,   3452,\n    3452,   3154,   2585,   1794,\n     848,   -171,  -1176,  -2079,\n   -2803,  -3285,  -3485,  -3385,\n   -2993,  -2343,  -1492,   -512,\n     512,   1492,   2343,   2993,\n    3385,   3485,   3285,   2803,\n    2079,   1176,    171,   -848,\n   -1794,  -2585,  -3154,  -3452,\n   -3452,  -3154,  -2585,  -1794,\n    -848,    171,   1176,   2079,\n    2803,   3285,   3485,   3385,\n    2993,   2343,   1492,    512,\n    -512,  -1492,  -2343,  -2993,\n   -3385,  -3485,  -3285,  -2803,\n   -2079,  -1176,   -171,    848,\n    1794,   2585,   3154,   3452,\n    3452,   3154,   2585,   1794,\n     848,   -171,  -1176,  -2079,\n   -2803,  -3285,  -3485,  -3385,\n   -2993,  -2343,  -1492,   -512,\n     512,   1492,   2343,   2993,\n    3385,   3485,   3285,   2803,\n    2079,   1176,    171,   -848,\n   -1794,  -2585,  -3154,  -3452,\n   -1078,  -1956,  -2606,  -2951,\n   -2951,  -2606,  -1956,  -1078,\n     -73,    939,   1843,   2530,\n    2922,   2972,   2675,   2065,\n    1214,    220,   -799,  -1724,\n   -2449,  -2886,  -2987,  -2738,\n   -2169,  -1347,   -367,    656,\n    1602,   2361,   2844,   2994,\n    2794,   2268,   1476,    512,\n    -512,  -1476,  -2268,  -2794,\n   -2994,  -2844,  -2361,  -1602,\n    -656,    367,   1347,   2169,\n    2738,   2987,   2886,   2449,\n    1724,    799,   -220,  -1214,\n   -2065,  -2675,  -2972,  -2922,\n   -2530,  -1843,   -939,     73,\n    1078,   1956,   2606,   2951,\n    2951,   2606,   1956,   1078,\n      73,   -939,  -1843,  -2530,\n   -2922,  -2972,  -2675,  -2065,\n   -1214,   -220,    799,   1724,\n    2449,   2886,   2987,   2738,\n    2169,   1347,    367,   -656,\n   -1602,  -2361,  -2844,  -2994,\n   -2794,  -2268,  -1476,   -512,\n     512,   1476,   2268,   2794,\n    2994,   2844,   2361,   1602,\n     656,   -367,  -1347,  -2169,\n   -2738,  -2987,  -2886,  -2449,\n   -1724,   -799,    220,   1214,\n    2065,   2675,   2972,   2922,\n    2530,   1843,    939,    -73,\n   -1078,  -1956,  -2606,  -2951,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -9825, -10122, -10322, -10422,\n  -10422, -10322, -10122,  -9825,\n   -9433,  -8950,  -8381,  -7732,\n   -7007,  -6216,  -5364,  -4461,\n   -3515,  -2535,  -1531,   -512,\n     512,   1531,   2535,   3515,\n    4461,   5364,   6216,   7007,\n    7732,   8381,   8950,   9433,\n    9825,  10122,  10322,  10422,\n   10422,  10322,  10122,   9825,\n    9433,   8950,   8381,   7732,\n    7007,   6216,   5364,   4461,\n    3515,   2535,   1531,    512,\n    -512,  -1531,  -2535,  -3515,\n   -4461,  -5364,  -6216,  -7007,\n   -7732,  -8381,  -8950,  -9433,\n   -9825, -10122, -10322, -10422,\n  -10422, -10322, -10122,  -9825,\n   -9433,  -8950,  -8381,  -7732,\n   -7007,  -6216,  -5364,  -4461,\n   -3515,  -2535,  -1531,   -512,\n     512,   1531,   2535,   3515,\n    4461,   5364,   6216,   7007,\n    7732,   8381,   8950,   9433,\n    9825,  10122,  10322,  10422,\n   10422,  10322,  10122,   9825,\n    9433,   8950,   8381,   7732,\n    7007,   6216,   5364,   4461,\n    3515,   2535,   1531,    512,\n    -512,  -1531,  -2535,  -3515,\n   -4461,  -5364,  -6216,  -7007,\n   -7732,  -8381,  -8950,  -9433,\n   -9825, -10122, -10322, -10422,\n   -6056,  -6494,  -6791,  -6941,\n   -6941,  -6791,  -6494,  -6056,\n   -5487,  -4799,  -4008,  -3129,\n   -2183,  -1190,   -171,    852,\n    1856,   2820,   3724,   4546,\n    5270,   5880,   6363,   6708,\n    6908,   6958,   6857,   6609,\n    6217,   5690,   5041,   4282,\n    3431,   2505,   1525,    512,\n    -512,  -1525,  -2505,  -3431,\n   -4282,  -5041,  -5690,  -6217,\n   -6609,  -6857,  -6958,  -6908,\n   -6708,  -6363,  -5880,  -5270,\n   -4546,  -3724,  -2820,  -1856,\n    -852,    171,   1190,   2183,\n    3129,   4008,   4799,   5487,\n    6056,   6494,   6791,   6941,\n    6941,   6791,   6494,   6056,\n    5487,   4799,   4008,   3129,\n    2183,   1190,    171,   -852,\n   -1856,  -2820,  -3724,  -4546,\n   -5270,  -5880,  -6363,  -6708,\n   -6908,  -6958,  -6857,  -6609,\n   -6217,  -5690,  -5041,  -4282,\n   -3431,  -2505,  -1525,   -512,\n     512,   1525,   2505,   3431,\n    4282,   5041,   5690,   6217,\n    6609,   6857,   6958,   6908,\n    6708,   6363,   5880,   5270,\n    4546,   3724,   2820,   1856,\n     852,   -171,  -1190,  -2183,\n   -3129,  -4008,  -4799,  -5487,\n   -6056,  -6494,  -6791,  -6941,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -5198,  -4999,  -4607,  -4038,\n   -3314,  -2462,  -1516,   -512,\n     512,   1516,   2462,   3314,\n    4038,   4607,   4999,   5198,\n    5198,   4999,   4607,   4038,\n    3314,   2462,   1516,    512,\n    -512,  -1516,  -2462,  -3314,\n   -4038,  -4607,  -4999,  -5198,\n   -1794,  -2585,  -3154,  -3452,\n   -3452,  -3154,  -2585,  -1794,\n    -848,    171,   1176,   2079,\n    2803,   3285,   3485,   3385,\n    2993,   2343,   1492,    512,\n    -512,  -1492,  -2343,  -2993,\n   -3385,  -3485,  -3285,  -2803,\n   -2079,  -1176,   -171,    848,\n    1794,   2585,   3154,   3452,\n    3452,   3154,   2585,   1794,\n     848,   -171,  -1176,  -2079,\n   -2803,  -3285,  -3485,  -3385,\n   -2993,  -2343,  -1492,   -512,\n     512,   1492,   2343,   2993,\n    3385,   3485,   3285,   2803,\n    2079,   1176,    171,   -848,\n   -1794,  -2585,  -3154,  -3452,\n   -3452,  -3154,  -2585,  -1794,\n    -848,    171,   1176,   2079,\n    2803,   3285,   3485,   3385,\n    2993,   2343,   1492,    512,\n    -512,  -1492,  -2343,  -2993,\n   -3385,  -3485,  -3285,  -2803,\n   -2079,  -1176,   -171,    848,\n    1794,   2585,   3154,   3452,\n    3452,   3154,   2585,   1794,\n     848,   -171,  -1176,  -2079,\n   -2803,  -3285,  -3485,  -3385,\n   -2993,  -2343,  -1492,   -512,\n     512,   1492,   2343,   2993,\n    3385,   3485,   3285,   2803,\n    2079,   1176,    171,   -848,\n   -1794,  -2585,  -3154,  -3452,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n   -2574,  -2182,  -1458,   -512,\n     512,   1458,   2182,   2574,\n    2574,   2182,   1458,    512,\n    -512,  -1458,  -2182,  -2574,\n     831,   -173,  -1119,  -1688,\n   -1688,  -1119,   -173,    831,\n    1556,   1755,   1363,    512,\n    -512,  -1363,  -1755,  -1556,\n    -831,    173,   1119,   1688,\n    1688,   1119,    173,   -831,\n   -1556,  -1755,  -1363,   -512,\n     512,   1363,   1755,   1556,\n     831,   -173,  -1119,  -1688,\n   -1688,  -1119,   -173,    831,\n    1556,   1755,   1363,    512,\n    -512,  -1363,  -1755,  -1556,\n    -831,    173,   1119,   1688,\n    1688,   1119,    173,   -831,\n   -1556,  -1755,  -1363,   -512,\n     512,   1363,   1755,   1556,\n     831,   -173,  -1119,  -1688,\n   -1688,  -1119,   -173,    831,\n    1556,   1755,   1363,    512,\n    -512,  -1363,  -1755,  -1556,\n    -831,    173,   1119,   1688,\n    1688,   1119,    173,   -831,\n   -1556,  -1755,  -1363,   -512,\n     512,   1363,   1755,   1556,\n     831,   -173,  -1119,  -1688,\n   -1688,  -1119,   -173,    831,\n    1556,   1755,   1363,    512,\n    -512,  -1363,  -1755,  -1556,\n    -831,    173,   1119,   1688,\n    1688,   1119,    173,   -831,\n   -1556,  -1755,  -1363,   -512,\n     512,   1363,   1755,   1556,\n     831,   -173,  -1119,  -1688,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n   -1236,   -512,    512,   1236,\n    1236,    512,   -512,  -1236,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n    -766,    180,    904,    512,\n    -512,   -904,   -180,    766,\n     766,   -180,   -904,   -512,\n     512,    904,    180,   -766,\n   -1114,  -2082,  -2836,  -3249,\n   -3249,  -2836,  -2082,  -1114,\n     -90,    834,   1535,   1940,\n    2042,   1888,   1567,   1179,\n     820,    551,    398,    344,\n     344,    340,    282,    135,\n    -106,   -417,   -757,  -1074,\n   -1320,  -1460,  -1479,  -1379,\n   -1175,   -892,   -555,   -188,\n     188,    555,    892,   1175,\n    1379,   1479,   1460,   1320,\n    1074,    757,    417,    106,\n    -135,   -282,   -340,   -344,\n    -344,   -398,   -551,   -820,\n   -1179,  -1567,  -1888,  -2042,\n   -1940,  -1535,   -834,     90,\n    1114,   2082,   2836,   3249,\n    3249,   2836,   2082,   1114,\n      90,   -834,  -1535,  -1940,\n   -2042,  -1888,  -1567,  -1179,\n    -820,   -551,   -398,   -344,\n    -344,   -340,   -282,   -135,\n     106,    417,    757,   1074,\n    1320,   1460,   1479,   1379,\n    1175,    892,    555,    188,\n    -188,   -555,   -892,  -1175,\n   -1379,  -1479,  -1460,  -1320,\n   -1074,   -757,   -417,   -106,\n     135,    282,    340,    344,\n     344,    398,    551,    820,\n    1179,   1567,   1888,   2042,\n    1940,   1535,    834,    -90,\n   -1114,  -2082,  -2836,  -3249,\n      -1,  -1025,  -1892,  -2388,\n   -2388,  -1892,  -1025,     -1,\n     939,   1592,   1848,   1708,\n    1273,    702,    158,   -239,\n    -444,   -481,   -427,   -369,\n    -369,   -444,   -565,   -668,\n    -686,   -575,   -329,     15,\n     392,    728,    961,   1053,\n     998,    811,    526,    182,\n    -182,   -526,   -811,   -998,\n   -1053,   -961,   -728,   -392,\n     -15,    329,    575,    686,\n     668,    565,    444,    369,\n     369,    427,    481,    444,\n     239,   -158,   -702,  -1273,\n   -1708,  -1848,  -1592,   -939,\n       1,   1025,   1892,   2388,\n    2388,   1892,   1025,      1,\n    -939,  -1592,  -1848,  -1708,\n   -1273,   -702,   -158,    239,\n     444,    481,    427,    369,\n     369,    444,    565,    668,\n     686,    575,    329,    -15,\n    -392,   -728,   -961,  -1053,\n    -998,   -811,   -526,   -182,\n     182,    526,    811,    998,\n    1053,    961,    728,    392,\n      15,   -329,   -575,   -686,\n    -668,   -565,   -444,   -369,\n    -369,   -427,   -481,   -444,\n    -239,    158,    702,   1273,\n    1708,   1848,   1592,    939,\n      -1,  -1025,  -1892,  -2388,\n     657,   -367,  -1338,  -1927,\n   -1927,  -1338,   -367,    657,\n    1404,   1662,   1411,    803,\n      89,   -487,   -779,   -780,\n    -589,   -351,   -182,   -118,\n    -118,   -100,      4,    206,\n     452,    648,    703,    573,\n     277,   -106,   -475,   -735,\n    -829,   -746,   -513,   -182,\n     182,    513,    746,    829,\n     735,    475,    106,   -277,\n    -573,   -703,   -648,   -452,\n    -206,     -4,    100,    118,\n     118,    182,    351,    589,\n     780,    779,    487,    -89,\n    -803,  -1411,  -1662,  -1404,\n    -657,    367,   1338,   1927,\n    1927,   1338,    367,   -657,\n   -1404,  -1662,  -1411,   -803,\n     -89,    487,    779,    780,\n     589,    351,    182,    118,\n     118,    100,     -4,   -206,\n    -452,   -648,   -703,   -573,\n    -277,    106,    475,    735,\n     829,    746,    513,    182,\n    -182,   -513,   -746,   -829,\n    -735,   -475,   -106,    277,\n     573,    703,    648,    452,\n     206,      4,   -100,   -118,\n    -118,   -182,   -351,   -589,\n    -780,   -779,   -487,     89,\n     803,   1411,   1662,   1404,\n     657,   -367,  -1338,  -1927,\n    1162,    425,   -599,  -1324,\n   -1324,   -599,    425,   1162,\n    1225,    644,   -191,   -796,\n    -890,   -532,    -18,    342,\n     416,    286,    128,     58,\n      58,     27,   -103,   -289,\n    -400,   -320,    -45,    298,\n     526,    513,    260,   -111,\n    -428,   -558,   -457,   -175,\n     175,    457,    558,    428,\n     111,   -260,   -513,   -526,\n    -298,     45,    320,    400,\n     289,    103,    -27,    -58,\n     -58,   -128,   -286,   -416,\n    -342,     18,    532,    890,\n     796,    191,   -644,  -1225,\n   -1162,   -425,    599,   1324,\n    1324,    599,   -425,  -1162,\n   -1225,   -644,    191,    796,\n     890,    532,     18,   -342,\n    -416,   -286,   -128,    -58,\n     -58,    -27,    103,    289,\n     400,    320,     45,   -298,\n    -526,   -513,   -260,    111,\n     428,    558,    457,    175,\n    -175,   -457,   -558,   -428,\n    -111,    260,    513,    526,\n     298,    -45,   -320,   -400,\n    -289,   -103,     27,     58,\n      58,    128,    286,    416,\n     342,    -18,   -532,   -890,\n    -796,   -191,    644,   1225,\n    1162,    425,   -599,  -1324,\n    1114,    856,   -168,  -1084,\n   -1084,   -168,    856,   1114,\n     444,   -511,   -936,   -564,\n     168,    609,    490,     63,\n    -245,   -258,   -119,    -38,\n     -38,      8,    158,    281,\n     197,    -99,   -380,   -390,\n     -86,    302,    473,    300,\n     -82,   -398,   -438,   -187,\n     187,    438,    398,     82,\n    -300,   -473,   -302,     86,\n     390,    380,     99,   -197,\n    -281,   -158,     -8,     38,\n      38,    119,    258,    245,\n     -63,   -490,   -609,   -168,\n     564,    936,    511,   -444,\n   -1114,   -856,    168,   1084,\n    1084,    168,   -856,  -1114,\n    -444,    511,    936,    564,\n    -168,   -609,   -490,    -63,\n     245,    258,    119,     38,\n      38,     -8,   -158,   -281,\n    -197,     99,    380,    390,\n      86,   -302,   -473,   -300,\n      82,    398,    438,    187,\n    -187,   -438,   -398,    -82,\n     300,    473,    302,    -86,\n    -390,   -380,    -99,    197,\n     281,    158,      8,    -38,\n     -38,   -119,   -258,   -245,\n      63,    490,    609,    168,\n    -564,   -936,   -511,    444,\n    1114,    856,   -168,  -1084,\n     -11,    791,    366,   -658,\n    -658,    366,    791,    -11,\n    -731,   -293,    514,    455,\n    -234,   -445,     -3,    304,\n     120,   -118,    -98,    -18,\n     -18,     45,    144,     38,\n    -200,   -176,    145,    287,\n       2,   -303,   -175,    201,\n     292,    -16,   -294,   -176,\n     176,    294,     16,   -292,\n    -201,    175,    303,     -2,\n    -287,   -145,    176,    200,\n     -38,   -144,    -45,     18,\n      18,     98,    118,   -120,\n    -304,      3,    445,    234,\n    -455,   -514,    293,    731,\n      11,   -791,   -366,    658,\n     658,   -366,   -791,     11,\n     731,    293,   -514,   -455,\n     234,    445,      3,   -304,\n    -120,    118,     98,     18,\n      18,    -45,   -144,    -38,\n     200,    176,   -145,   -287,\n      -2,    303,    175,   -201,\n    -292,     16,    294,    176,\n    -176,   -294,    -16,    292,\n     201,   -175,   -303,      2,\n     287,    145,   -176,   -200,\n      38,    144,     45,    -18,\n     -18,    -98,   -118,    120,\n     304,     -3,   -445,   -234,\n     455,    514,   -293,   -731,\n     -11,    791,    366,   -658,\n    -626,    225,    585,   -439,\n    -439,    585,    225,   -626,\n       0,    560,   -178,   -415,\n     269,    244,   -265,   -100,\n     188,     19,    -82,    -11,\n     -11,     61,     60,   -136,\n     -57,    202,     14,   -238,\n      45,    241,    -98,   -222,\n     135,    196,   -157,   -174,\n     174,    157,   -196,   -135,\n     222,     98,   -241,    -45,\n     238,    -14,   -202,     57,\n     136,    -60,    -61,     11,\n      11,     82,    -19,   -188,\n     100,    265,   -244,   -269,\n     415,    178,   -560,      0,\n     626,   -225,   -585,    439,\n     439,   -585,   -225,    626,\n       0,   -560,    178,    415,\n    -269,   -244,    265,    100,\n    -188,    -19,     82,     11,\n      11,    -61,    -60,    136,\n      57,   -202,    -14,    238,\n     -45,   -241,     98,    222,\n    -135,   -196,    157,    174,\n    -174,   -157,    196,    135,\n    -222,    -98,    241,     45,\n    -238,     14,    202,    -57,\n    -136,     60,     61,    -11,\n     -11,    -82,     19,    188,\n    -100,   -265,    244,    269,\n    -415,   -178,    560,      0,\n    -626,    225,    585,   -439,\n     462,   -562,    456,   -175,\n    -175,    456,   -562,    462,\n    -205,    -97,    325,   -403,\n     325,   -150,    -31,    145,\n    -162,    106,    -32,     -7,\n      -7,     56,    -93,     79,\n      -5,    -99,    180,   -189,\n     112,     21,   -149,    209,\n    -171,     51,     91,   -186,\n     186,    -91,    -51,    171,\n    -209,    149,    -21,   -112,\n     189,   -180,     99,      5,\n     -79,     93,    -56,      7,\n       7,     32,   -106,    162,\n    -145,     31,    150,   -325,\n     403,   -325,     97,    205,\n    -462,    562,   -456,    175,\n     175,   -456,    562,   -462,\n     205,     97,   -325,    403,\n    -325,    150,     31,   -145,\n     162,   -106,     32,      7,\n       7,    -56,     93,    -79,\n       5,     99,   -180,    189,\n    -112,    -21,    149,   -209,\n     171,    -51,    -91,    186,\n    -186,     91,     51,   -171,\n     209,   -149,     21,    112,\n    -189,    180,    -99,     -5,\n      79,    -93,     56,     -7,\n      -7,    -32,    106,   -162,\n     145,    -31,   -150,    325,\n    -403,    325,    -97,   -205,\n     462,   -562,    456,   -175,\n  -17260, -17514, -17685, -17770,\n  -17770, -17685, -17514, -17260,\n  -16924, -16508, -16016, -15451,\n  -14817, -14119, -13361, -12549,\n  -11688, -10785,  -9845,  -8875,\n   -7882,  -6872,  -5852,  -4828,\n   -3807,  -2795,  -1798,   -822,\n     127,   1044,   1923,   2762,\n    3555,   4300,   4992,   5630,\n    6212,   6736,   7201,   7608,\n    7956,   8246,   8480,   8658,\n    8784,   8861,   8890,   8876,\n    8822,   8733,   8612,   8464,\n    8294,   8105,   7904,   7694,\n    7479,   7265,   7056,   6855,\n    6666,   6493,   6339,   6206,\n    6097,   6013,   5957,   5928,\n    5928,   5957,   6013,   6097,\n    6206,   6339,   6493,   6666,\n    6855,   7056,   7265,   7479,\n    7694,   7904,   8105,   8294,\n    8464,   8612,   8733,   8822,\n    8876,   8890,   8861,   8784,\n    8658,   8480,   8246,   7956,\n    7608,   7201,   6736,   6212,\n    5630,   4992,   4300,   3555,\n    2762,   1923,   1044,    127,\n    -822,  -1798,  -2795,  -3807,\n   -4828,  -5852,  -6872,  -7882,\n   -8875,  -9845, -10785, -11688,\n  -12549, -13361, -14119, -14817,\n  -15451, -16016, -16508, -16924,\n  -17260, -17514, -17685, -17770,\n  -14591, -14946, -15185, -15306,\n  -15306, -15185, -14946, -14591,\n  -14127, -13558, -12894, -12144,\n  -11319, -10428,  -9486,  -8504,\n   -7495,  -6472,  -5448,  -4435,\n   -3445,  -2489,  -1577,   -717,\n      83,    817,   1479,   2067,\n    2579,   3014,   3374,   3662,\n    3880,   4034,   4130,   4174,\n    4174,   4137,   4073,   3989,\n    3893,   3794,   3698,   3613,\n    3545,   3500,   3480,   3490,\n    3532,   3607,   3716,   3856,\n    4025,   4222,   4442,   4680,\n    4931,   5190,   5450,   5706,\n    5952,   6182,   6390,   6572,\n    6723,   6839,   6918,   6958,\n    6958,   6918,   6839,   6723,\n    6572,   6390,   6182,   5952,\n    5706,   5450,   5190,   4931,\n    4680,   4442,   4222,   4025,\n    3856,   3716,   3607,   3532,\n    3490,   3480,   3500,   3545,\n    3613,   3698,   3794,   3893,\n    3989,   4073,   4137,   4174,\n    4174,   4130,   4034,   3880,\n    3662,   3374,   3014,   2579,\n    2067,   1479,    817,     83,\n    -717,  -1577,  -2489,  -3445,\n   -4435,  -5448,  -6472,  -7495,\n   -8504,  -9486, -10428, -11319,\n  -12144, -12894, -13558, -14127,\n  -14591, -14946, -15185, -15306,\n  -10925, -11467, -11839, -12029,\n  -12029, -11839, -11467, -10925,\n  -10234,  -9416,  -8500,  -7516,\n   -6496,  -5472,  -4474,  -3528,\n   -2657,  -1880,  -1209,   -652,\n    -210,    121,    350,    491,\n     559,    572,    551,    514,\n     480,    463,    476,    529,\n     628,    773,    963,   1191,\n    1450,   1729,   2016,   2299,\n    2565,   2805,   3009,   3172,\n    3288,   3359,   3386,   3374,\n    3329,   3262,   3182,   3098,\n    3023,   2963,   2927,   2921,\n    2947,   3006,   3096,   3211,\n    3347,   3494,   3644,   3787,\n    3915,   4018,   4091,   4129,\n    4129,   4091,   4018,   3915,\n    3787,   3644,   3494,   3347,\n    3211,   3096,   3006,   2947,\n    2921,   2927,   2963,   3023,\n    3098,   3182,   3262,   3329,\n    3374,   3386,   3359,   3288,\n    3172,   3009,   2805,   2565,\n    2299,   2016,   1729,   1450,\n    1191,    963,    773,    628,\n     529,    476,    463,    480,\n     514,    551,    572,    559,\n     491,    350,    121,   -210,\n    -652,  -1209,  -1880,  -2657,\n   -3528,  -4474,  -5472,  -6496,\n   -7516,  -8500,  -9416, -10234,\n  -10925, -11467, -11839, -12029,\n   -7628,  -8407,  -8966,  -9258,\n   -9258,  -8966,  -8407,  -7628,\n   -6693,  -5676,  -4652,  -3690,\n   -2847,  -2161,  -1649,  -1308,\n   -1115,  -1036,  -1027,  -1042,\n   -1042,   -996,   -885,   -704,\n    -464,   -182,    116,    403,\n     654,    851,    985,   1056,\n    1074,   1056,   1024,    999,\n     999,   1037,   1119,   1241,\n    1393,   1561,   1727,   1872,\n    1984,   2054,   2081,   2069,\n    2030,   1979,   1931,   1902,\n    1902,   1936,   2004,   2099,\n    2208,   2318,   2413,   2481,\n    2514,   2510,   2472,   2409,\n    2334,   2260,   2202,   2170,\n    2170,   2202,   2260,   2334,\n    2409,   2472,   2510,   2514,\n    2481,   2413,   2318,   2208,\n    2099,   2004,   1936,   1902,\n    1902,   1931,   1979,   2030,\n    2069,   2081,   2054,   1984,\n    1872,   1727,   1561,   1393,\n    1241,   1119,   1037,    999,\n     999,   1024,   1056,   1074,\n    1056,    985,    851,    654,\n     403,    116,   -182,   -464,\n    -704,   -885,   -996,  -1042,\n   -1042,  -1027,  -1036,  -1115,\n   -1308,  -1649,  -2161,  -2847,\n   -3690,  -4652,  -5676,  -6693,\n   -7628,  -8407,  -8966,  -9258,\n   -4585,  -5604,  -6428,  -6888,\n   -6888,  -6428,  -5604,  -4585,\n   -3561,  -2697,  -2092,  -1760,\n   -1644,  -1637,  -1631,  -1545,\n   -1351,  -1072,   -765,   -497,\n    -315,   -229,   -217,   -229,\n    -217,   -146,    -13,    161,\n     336,    472,    549,    567,\n     552,    537,    555,    621,\n     728,    852,    962,   1034,\n    1058,   1044,   1017,   1005,\n    1028,   1091,   1179,   1269,\n    1336,   1365,   1355,   1322,\n    1291,   1283,   1311,   1369,\n    1441,   1503,   1535,   1530,\n    1495,   1450,   1418,   1415,\n    1446,   1499,   1553,   1588,\n    1588,   1553,   1499,   1446,\n    1415,   1418,   1450,   1495,\n    1530,   1535,   1503,   1441,\n    1369,   1311,   1283,   1291,\n    1322,   1355,   1365,   1336,\n    1269,   1179,   1091,   1028,\n    1005,   1017,   1044,   1058,\n    1034,    962,    852,    728,\n     621,    555,    537,    552,\n     567,    549,    472,    336,\n     161,    -13,   -146,   -217,\n    -229,   -217,   -229,   -315,\n    -497,   -765,  -1072,  -1351,\n   -1545,  -1631,  -1637,  -1644,\n   -1760,  -2092,  -2697,  -3561,\n   -4585,  -5604,  -6428,  -6888,\n   -2258,  -3160,  -4184,  -4869,\n   -4869,  -4184,  -3160,  -2258,\n   -1761,  -1637,  -1639,  -1535,\n   -1273,   -974,   -783,   -735,\n    -739,   -682,   -530,   -353,\n    -239,   -215,   -221,   -182,\n     -75,     50,    127,    139,\n     130,    159,    241,    337,\n     392,    396,    384,    406,\n     473,    549,    590,    586,\n     573,    589,    645,    707,\n     737,    728,    711,    724,\n     770,    822,    843,    829,\n     810,    818,    858,    901,\n     915,    896,    873,    878,\n     913,    949,    955,    931,\n     905,    906,    937,    966,\n     966,    937,    906,    905,\n     931,    955,    949,    913,\n     878,    873,    896,    915,\n     901,    858,    818,    810,\n     829,    843,    822,    770,\n     724,    711,    728,    737,\n     707,    645,    589,    573,\n     586,    590,    549,    473,\n     406,    384,    396,    392,\n     337,    241,    159,    130,\n     139,    127,     50,    -75,\n    -182,   -221,   -215,   -239,\n    -353,   -530,   -682,   -739,\n    -735,   -783,   -974,  -1273,\n   -1535,  -1639,  -1637,  -1761,\n   -2258,  -3160,  -4184,  -4869,\n   -1529,  -1723,  -2622,  -3646,\n   -3646,  -2622,  -1723,  -1529,\n   -1503,  -1217,   -952,   -923,\n    -874,   -683,   -562,   -563,\n    -497,   -358,   -305,   -307,\n    -230,   -132,   -116,   -107,\n     -29,     35,     33,     55,\n     128,    163,    156,    191,\n     252,    264,    260,    303,\n     348,    345,    350,    396,\n     423,    413,    428,    471,\n     481,    470,    494,    529,\n     524,    518,    549,    571,\n     558,    560,    592,    600,\n     583,    594,    622,    616,\n     602,    621,    639,    623,\n     615,    638,    644,    623,\n     623,    644,    638,    615,\n     623,    639,    621,    602,\n     616,    622,    594,    583,\n     600,    592,    560,    558,\n     571,    549,    518,    524,\n     529,    494,    470,    481,\n     471,    428,    413,    423,\n     396,    350,    345,    348,\n     303,    260,    264,    252,\n     191,    156,    163,    128,\n      55,     33,     35,    -29,\n    -107,   -116,   -132,   -230,\n    -307,   -305,   -358,   -497,\n    -563,   -562,   -683,   -874,\n    -923,   -952,  -1217,  -1503,\n   -1529,  -1723,  -2622,  -3646,\n    -935,  -1169,  -1256,  -2280,\n   -2280,  -1256,  -1169,   -935,\n    -788,   -735,   -574,   -574,\n    -442,   -432,   -352,   -311,\n    -280,   -213,   -212,   -141,\n    -141,    -89,    -72,    -48,\n     -10,     -8,     39,     35,\n      74,     81,    102,    124,\n     127,    160,    155,    187,\n     187,    206,    219,    222,\n     246,    240,    266,    262,\n     279,    285,    289,    306,\n     300,    321,    314,    330,\n     330,    335,    345,    339,\n     356,    346,    361,    356,\n     362,    367,    361,    374,\n     362,    376,    367,    372,\n     372,    367,    376,    362,\n     374,    361,    367,    362,\n     356,    361,    346,    356,\n     339,    345,    335,    330,\n     330,    314,    321,    300,\n     306,    289,    285,    279,\n     262,    266,    240,    246,\n     222,    219,    206,    187,\n     187,    155,    160,    127,\n     124,    102,     81,     74,\n      35,     39,     -8,    -10,\n     -48,    -72,    -89,   -141,\n    -141,   -212,   -213,   -280,\n    -311,   -352,   -432,   -442,\n    -574,   -574,   -735,   -788,\n    -935,  -1169,  -1256,  -2280,\n  -11045, -11619, -12033, -12251,\n  -12251, -12033, -11619, -11045,\n  -10360,  -9620,  -8874,  -8167,\n   -7524,  -6953,  -6446,  -5978,\n   -5511,  -5006,  -4426,  -3745,\n   -2951,  -2051,  -1069,    -45,\n     972,   1930,   2781,   3489,\n    4034,   4415,   4651,   4776,\n    4835,   4877,   4947,   5080,\n    5294,   5589,   5945,   6326,\n    6688,   6978,   7152,   7174,\n    7025,   6704,   6231,   5640,\n    4979,   4299,   3648,   3066,\n    2575,   2181,   1873,   1623,\n    1394,   1145,    840,    453,\n     -26,   -589,  -1210,  -1847,\n   -2448,  -2959,  -3331,  -3528,\n   -3528,  -3331,  -2959,  -2448,\n   -1847,  -1210,   -589,    -26,\n     453,    840,   1145,   1394,\n    1623,   1873,   2181,   2575,\n    3066,   3648,   4299,   4979,\n    5640,   6231,   6704,   7025,\n    7174,   7152,   6978,   6688,\n    6326,   5945,   5589,   5294,\n    5080,   4947,   4877,   4835,\n    4776,   4651,   4415,   4034,\n    3489,   2781,   1930,    972,\n     -45,  -1069,  -2051,  -2951,\n   -3745,  -4426,  -5006,  -5511,\n   -5978,  -6446,  -6953,  -7524,\n   -8167,  -8874,  -9620, -10360,\n  -11045, -11619, -12033, -12251,\n   -6418,  -7272,  -8015,  -8452,\n   -8452,  -8015,  -7272,  -6418,\n   -5623,  -4956,  -4371,  -3750,\n   -2991,  -2066,  -1042,    -42,\n     822,   1507,   2045,   2514,\n    2967,   3399,   3741,   3903,\n    3841,   3587,   3241,   2917,\n    2675,   2481,   2225,   1790,\n    1126,    303,   -507,  -1106,\n   -1356,  -1252,   -916,   -536,\n    -270,   -177,   -199,   -208,\n     -90,    195,    590,    982,\n    1271,   1420,   1470,   1504,\n    1582,   1700,   1793,   1773,\n    1592,   1282,    941,    676,\n     544,    503,    437,    221,\n    -201,   -769,  -1318,  -1657,\n   -1657,  -1318,   -769,   -201,\n     221,    437,    503,    544,\n     676,    941,   1282,   1592,\n    1773,   1793,   1700,   1582,\n    1504,   1470,   1420,   1271,\n     982,    590,    195,    -90,\n    -208,   -199,   -177,   -270,\n    -536,   -916,  -1252,  -1356,\n   -1106,   -507,    303,   1126,\n    1790,   2225,   2481,   2675,\n    2917,   3241,   3587,   3841,\n    3903,   3741,   3399,   2967,\n    2514,   2045,   1507,    822,\n     -42,  -1042,  -2066,  -2991,\n   -3750,  -4371,  -4956,  -5623,\n   -6418,  -7272,  -8015,  -8452,\n   -3929,  -4693,  -5552,  -6153,\n   -6153,  -5552,  -4693,  -3929,\n   -3314,  -2646,  -1759,   -735,\n     194,    892,   1419,   1886,\n    2273,   2458,   2376,   2120,\n    1833,   1549,   1192,    728,\n     264,    -47,   -181,   -259,\n    -374,   -439,   -285,     99,\n     475,    567,    370,    187,\n     329,    784,   1216,   1301,\n    1029,    662,    432,    330,\n     193,    -50,   -289,   -377,\n    -311,   -216,   -171,   -114,\n      53,    312,    532,    624,\n     645,    710,    816,    827,\n     655,    398,    255,    272,\n     251,    -41,   -571,  -1004,\n   -1004,   -571,    -41,    251,\n     272,    255,    398,    655,\n     827,    816,    710,    645,\n     624,    532,    312,     53,\n    -114,   -171,   -216,   -311,\n    -377,   -289,    -50,    193,\n     330,    432,    662,   1029,\n    1301,   1216,    784,    329,\n     187,    370,    567,    475,\n      99,   -285,   -439,   -374,\n    -259,   -181,    -47,    264,\n     728,   1192,   1549,   1833,\n    2120,   2376,   2458,   2273,\n    1886,   1419,    892,    194,\n    -735,  -1759,  -2646,  -3314,\n   -3929,  -4693,  -5552,  -6153,\n   -2734,  -3386,  -4247,  -5001,\n   -5001,  -4247,  -3386,  -2734,\n   -1987,   -963,     27,    725,\n    1245,   1674,   1845,   1694,\n    1414,   1116,    717,    256,\n     -66,   -212,   -307,   -331,\n    -156,    131,    336,    499,\n     740,    913,    829,    670,\n     675,    602,    100,   -539,\n    -673,   -282,     23,    -23,\n     -51,    181,    425,    476,\n     487,    569,    559,    386,\n     218,    130,      0,   -174,\n    -229,   -158,   -109,    -70,\n      90,    295,    371,    380,\n     470,    515,    345,    153,\n     180,    178,   -215,   -723,\n    -723,   -215,    178,    180,\n     153,    345,    515,    470,\n     380,    371,    295,     90,\n     -70,   -109,   -158,   -229,\n    -174,      0,    130,    218,\n     386,    559,    569,    487,\n     476,    425,    181,    -51,\n     -23,     23,   -282,   -673,\n    -539,    100,    602,    675,\n     670,    829,    913,    740,\n     499,    336,    131,   -156,\n    -331,   -307,   -212,    -66,\n     256,    717,   1116,   1414,\n    1694,   1845,   1674,   1245,\n     725,     27,   -963,  -1987,\n   -2734,  -3386,  -4247,  -5001,\n   -1834,  -2524,  -3289,  -4139,\n   -4139,  -3289,  -2524,  -1834,\n    -810,    145,    757,   1236,\n    1450,   1282,   1003,    654,\n     203,   -102,   -228,   -288,\n    -162,    104,    302,    502,\n     676,    640,    531,    428,\n     178,    -31,    -50,   -144,\n    -155,    163,    233,   -103,\n      -6,    502,    538,    233,\n     156,     78,   -123,   -138,\n     -63,    -50,     80,    244,\n     278,    322,    344,    218,\n     107,     38,   -100,   -152,\n     -85,    -66,     22,    201,\n     243,    264,    358,    239,\n      78,    167,     -9,   -542,\n    -542,     -9,    167,     78,\n     239,    358,    264,    243,\n     201,     22,    -66,    -85,\n    -152,   -100,     38,    107,\n     218,    344,    322,    278,\n     244,     80,    -50,    -63,\n    -138,   -123,     78,    156,\n     233,    538,    502,     -6,\n    -103,    233,    163,   -155,\n    -144,    -50,    -31,    178,\n     428,    531,    640,    676,\n     502,    302,    104,   -162,\n    -288,   -228,   -102,    203,\n     654,   1003,   1282,   1450,\n    1236,    757,    145,   -810,\n   -1834,  -2524,  -3289,  -4139,\n   -1039,  -1925,  -2598,  -3496,\n   -3496,  -2598,  -1925,  -1039,\n     -15,    613,   1075,   1152,\n     902,    590,    150,   -129,\n    -234,   -216,     22,    235,\n     435,    558,    476,    373,\n     161,    -31,    -85,   -141,\n      -2,    142,    235,    418,\n     320,    302,    276,   -318,\n    -409,     33,    -16,     26,\n     239,    223,    291,    246,\n     106,     54,    -79,    -97,\n     -50,    -12,    131,    183,\n     217,    222,    104,     50,\n     -52,   -109,    -48,    -41,\n      95,    177,    176,    266,\n     107,     80,     97,   -417,\n    -417,     97,     80,    107,\n     266,    176,    177,     95,\n     -41,    -48,   -109,    -52,\n      50,    104,    222,    217,\n     183,    131,    -12,    -50,\n     -97,    -79,     54,    106,\n     246,    291,    223,    239,\n      26,    -16,     33,   -409,\n    -318,    276,    302,    320,\n     418,    235,    142,     -2,\n    -141,    -85,    -31,    161,\n     373,    476,    558,    435,\n     235,     22,   -216,   -234,\n    -129,    150,    590,    902,\n    1152,   1075,    613,    -15,\n   -1039,  -1925,  -2598,  -3496,\n    -383,  -1407,  -2047,  -2928,\n   -2928,  -2047,  -1407,   -383,\n     360,    841,    939,    690,\n     351,    -41,   -184,   -208,\n      10,    212,    407,    436,\n     338,    170,    -25,    -87,\n    -103,     54,    153,    299,\n     279,    232,     99,    -27,\n     -33,    -96,    181,   -109,\n     -39,    359,    106,     95,\n     -41,    -64,    -24,     28,\n     150,    158,    194,     88,\n      38,    -63,    -62,    -36,\n      39,    126,    144,    160,\n      60,     24,    -77,    -43,\n     -35,     66,    126,    146,\n     172,     18,    130,   -315,\n    -315,    130,     18,    172,\n     146,    126,     66,    -35,\n     -43,    -77,     24,     60,\n     160,    144,    126,     39,\n     -36,    -62,    -63,     38,\n      88,    194,    158,    150,\n      28,    -24,    -64,    -41,\n      95,    106,    359,    -39,\n    -109,    181,    -96,    -33,\n     -27,     99,    232,    279,\n     299,    153,     54,   -103,\n     -87,    -25,    170,    338,\n     436,    407,    212,     10,\n    -208,   -184,    -41,    351,\n     690,    939,    841,    360,\n    -383,  -1407,  -2047,  -2928,\n      22,  -1002,  -1731,  -2605,\n   -2605,  -1731,  -1002,     22,\n     583,    854,    626,    288,\n     -85,   -197,   -126,    117,\n     312,    393,    297,    117,\n     -46,   -103,    -24,    108,\n     240,    249,    195,     41,\n     -26,    -83,     36,     84,\n     242,    139,    237,   -185,\n    -252,     72,    -30,    161,\n     131,    176,     56,     12,\n     -67,    -24,     21,    111,\n     131,    115,     39,    -27,\n     -55,    -29,     44,     97,\n     131,     78,     32,    -52,\n     -32,    -31,     87,     81,\n     168,     20,    122,   -248,\n    -248,    122,     20,    168,\n      81,     87,    -31,    -32,\n     -52,     32,     78,    131,\n      97,     44,    -29,    -55,\n     -27,     39,    115,    131,\n     111,     21,    -24,    -67,\n      12,     56,    176,    131,\n     161,    -30,     72,   -252,\n    -185,    237,    139,    242,\n      84,     36,    -83,    -26,\n      41,    195,    249,    240,\n     108,    -24,   -103,    -46,\n     117,    297,    393,    312,\n     117,   -126,   -197,    -85,\n     288,    626,    854,    583,\n      22,  -1002,  -1731,  -2605,\n  -23288, -23584, -23805, -23935,\n  -23935, -23805, -23584, -23288,\n  -22923, -22499, -22019, -21489,\n  -20914, -20295, -19638, -18943,\n  -18215, -17455, -16665, -15849,\n  -15008, -14143, -13257, -12351,\n  -11427, -10487,  -9532,  -8564,\n   -7583,  -6593,  -5594,  -4587,\n   -3574,  -2556,  -1535,   -512,\n     512,   1535,   2556,   3574,\n    4587,   5594,   6593,   7583,\n    8564,   9532,  10487,  11427,\n   12351,  13257,  14143,  15008,\n   15849,  16665,  17455,  18215,\n   18943,  19638,  20295,  20914,\n   21489,  22019,  22499,  22923,\n   23288,  23584,  23805,  23935,\n   23935,  23805,  23584,  23288,\n   22923,  22499,  22019,  21489,\n   20914,  20295,  19638,  18943,\n   18215,  17455,  16665,  15849,\n   15008,  14143,  13257,  12351,\n   11427,  10487,   9532,   8564,\n    7583,   6593,   5594,   4587,\n    3574,   2556,   1535,    512,\n    -512,  -1535,  -2556,  -3574,\n   -4587,  -5594,  -6593,  -7583,\n   -8564,  -9532, -10487, -11427,\n  -12351, -13257, -14143, -15008,\n  -15849, -16665, -17455, -18215,\n  -18943, -19638, -20295, -20914,\n  -21489, -22019, -22499, -22923,\n  -23288, -23584, -23805, -23935,\n  -12795, -13401, -13864, -14157,\n  -14157, -13864, -13401, -12795,\n  -12083, -11279, -10406,  -9474,\n   -8502,  -7498,  -6481,  -5457,\n   -4444,  -3454,  -2508,  -1621,\n    -852,   -205,    360,    844,\n    1252,   1561,   1754,   1873,\n    1936,   1956,   1944,   1909,\n    1859,   1802,   1749,   1708,\n    1708,   1752,   1817,   1903,\n    2003,   2120,   2250,   2399,\n    2565,   2757,   2981,   3274,\n    3601,   3933,   4246,   4524,\n    4711,   4805,   4850,   4856,\n    4834,   4787,   4724,   4645,\n    4558,   4463,   4366,   4268,\n    4177,   4093,   4025,   3979,\n    3979,   4025,   4093,   4177,\n    4268,   4366,   4463,   4558,\n    4645,   4724,   4787,   4834,\n    4856,   4850,   4805,   4711,\n    4524,   4246,   3933,   3601,\n    3274,   2981,   2757,   2565,\n    2399,   2250,   2120,   2003,\n    1903,   1817,   1752,   1708,\n    1708,   1749,   1802,   1859,\n    1909,   1944,   1956,   1936,\n    1873,   1754,   1561,   1252,\n     844,    360,   -205,   -852,\n   -1621,  -2508,  -3454,  -4444,\n   -5457,  -6481,  -7498,  -8502,\n   -9474, -10406, -11279, -12083,\n  -12795, -13401, -13864, -14157,\n   -5039,  -5863,  -6517,  -6952,\n   -6952,  -6517,  -5863,  -5039,\n   -4112,  -3114,  -2090,  -1074,\n    -110,    729,   1387,   1860,\n    2169,   2322,   2340,   2276,\n    2119,   1909,   1721,   1615,\n    1547,   1529,   1563,   1633,\n    1721,   1834,   1986,   2117,\n    2144,   2117,   2038,   1920,\n    1730,   1485,   1218,    956,\n     722,    574,    447,    292,\n     138,     12,    -65,    -23,\n      72,    155,    146,     62,\n     -92,   -303,   -525,   -721,\n    -864,  -1011,  -1184,  -1285,\n   -1314,  -1312,  -1286,  -1245,\n   -1196,  -1144,  -1097,  -1062,\n   -1062,  -1097,  -1144,  -1196,\n   -1245,  -1286,  -1312,  -1314,\n   -1285,  -1184,  -1011,   -864,\n    -721,   -525,   -303,    -92,\n      62,    146,    155,     72,\n     -23,    -65,     12,    138,\n     292,    447,    574,    722,\n     956,   1218,   1485,   1730,\n    1920,   2038,   2117,   2144,\n    2117,   1986,   1834,   1721,\n    1633,   1563,   1529,   1547,\n    1615,   1721,   1909,   2119,\n    2276,   2340,   2322,   2169,\n    1860,   1387,    729,   -110,\n   -1074,  -2090,  -3114,  -4112,\n   -5039,  -5863,  -6517,  -6952,\n   -3914,  -4821,  -5558,  -6060,\n   -6060,  -5558,  -4821,  -3914,\n   -2925,  -1901,   -912,    -43,\n     608,   1045,   1288,   1369,\n    1333,   1213,   1085,   1029,\n    1026,   1088,   1203,   1393,\n    1585,   1746,   1821,   1844,\n    1773,   1634,   1500,   1355,\n    1186,   1085,   1019,    982,\n     979,   1012,   1035,   1032,\n     947,    867,    752,    575,\n     319,     28,   -214,   -284,\n    -250,   -194,   -175,   -182,\n    -183,   -185,   -264,   -373,\n    -469,   -584,   -740,   -854,\n    -959,  -1027,  -1029,  -1011,\n    -973,   -931,   -889,   -856,\n    -856,   -889,   -931,   -973,\n   -1011,  -1029,  -1027,   -959,\n    -854,   -740,   -584,   -469,\n    -373,   -264,   -185,   -183,\n    -182,   -175,   -194,   -250,\n    -284,   -214,     28,    319,\n     575,    752,    867,    947,\n    1032,   1035,   1012,    979,\n     982,   1019,   1085,   1186,\n    1355,   1500,   1634,   1773,\n    1844,   1821,   1746,   1585,\n    1393,   1203,   1088,   1026,\n    1029,   1085,   1213,   1333,\n    1369,   1288,   1045,    608,\n     -43,   -912,  -1901,  -2925,\n   -3914,  -4821,  -5558,  -6060,\n   -1705,  -2714,  -3572,  -4185,\n   -4185,  -3572,  -2714,  -1705,\n    -681,    255,    913,   1276,\n    1383,   1306,   1122,    959,\n     887,    904,    991,   1133,\n    1227,   1227,   1131,    980,\n     752,    532,    351,    234,\n     170,    121,    149,    120,\n      19,   -103,   -278,   -443,\n    -560,   -604,   -615,   -556,\n    -490,   -427,   -424,   -427,\n    -493,   -644,   -776,   -700,\n    -519,   -365,   -265,   -134,\n     -42,     -6,    -37,    -52,\n     -13,      5,     63,    169,\n     281,    380,    470,    502,\n     495,    470,    439,    411,\n     411,    439,    470,    495,\n     502,    470,    380,    281,\n     169,     63,      5,    -13,\n     -52,    -37,     -6,    -42,\n    -134,   -265,   -365,   -519,\n    -700,   -776,   -644,   -493,\n    -427,   -424,   -427,   -490,\n    -556,   -615,   -604,   -560,\n    -443,   -278,   -103,     19,\n     120,    149,    121,    170,\n     234,    351,    532,    752,\n     980,   1131,   1227,   1227,\n    1133,    991,    904,    887,\n     959,   1122,   1306,   1383,\n    1276,    913,    255,   -681,\n   -1705,  -2714,  -3572,  -4185,\n    -477,  -1501,  -2421,  -3111,\n   -3111,  -2421,  -1501,   -477,\n     430,   1008,   1213,   1156,\n     938,    752,    679,    710,\n     805,    857,    791,    633,\n     385,    139,    -39,   -115,\n    -132,   -119,   -148,   -220,\n    -339,   -491,   -529,   -515,\n    -461,   -359,   -296,   -261,\n    -264,   -278,   -262,   -188,\n     -96,     67,    182,    245,\n     283,    210,     87,    162,\n     298,    353,    387,    412,\n     341,    263,    154,     62,\n      71,     69,     59,     48,\n      -8,   -101,   -185,   -264,\n    -291,   -281,   -260,   -236,\n    -236,   -260,   -281,   -291,\n    -264,   -185,   -101,     -8,\n      48,     59,     69,     71,\n      62,    154,    263,    341,\n     412,    387,    353,    298,\n     162,     87,    210,    283,\n     245,    182,     67,    -96,\n    -188,   -262,   -278,   -264,\n    -261,   -296,   -359,   -461,\n    -515,   -529,   -491,   -339,\n    -220,   -148,   -119,   -132,\n    -115,    -39,    139,    385,\n     633,    791,    857,    805,\n     710,    679,    752,    938,\n    1156,   1213,   1008,    430,\n    -477,  -1501,  -2421,  -3111,\n    -198,  -1222,  -2181,  -2924,\n   -2924,  -2181,  -1222,   -198,\n     570,    930,    953,    787,\n     640,    624,    714,    838,\n     863,    762,    554,    341,\n     194,    126,    113,     99,\n       9,   -127,   -281,   -375,\n    -401,   -388,   -310,   -284,\n    -315,   -368,   -403,   -375,\n    -300,   -176,    -95,    -35,\n     -33,    -14,     40,    104,\n     214,    257,    177,    233,\n     277,    239,    255,    286,\n     293,    288,    198,    110,\n      58,     16,      5,      4,\n      -2,    -61,   -134,   -209,\n    -255,   -255,   -236,   -214,\n    -214,   -236,   -255,   -255,\n    -209,   -134,    -61,     -2,\n       4,      5,     16,     58,\n     110,    198,    288,    293,\n     286,    255,    239,    277,\n     233,    177,    257,    214,\n     104,     40,    -14,    -33,\n     -35,    -95,   -176,   -300,\n    -375,   -403,   -368,   -315,\n    -284,   -310,   -388,   -401,\n    -375,   -281,   -127,      9,\n      99,    113,    126,    194,\n     341,    554,    762,    863,\n     838,    714,    624,    640,\n     787,    953,    930,    570,\n    -198,  -1222,  -2181,  -2924,\n     391,   -571,  -1595,  -2428,\n   -2428,  -1595,   -571,    391,\n     866,    914,    704,    551,\n     548,    653,    689,    572,\n     336,    104,    -27,    -50,\n     -50,   -109,   -238,   -356,\n    -406,   -362,   -271,   -217,\n    -215,   -265,   -219,   -126,\n      -5,     94,    133,    127,\n     125,    156,    217,    263,\n     250,    206,    151,    129,\n     126,    124,    -36,    -31,\n     -63,   -129,   -134,   -138,\n    -140,   -173,   -216,   -238,\n    -164,   -101,    -46,    -30,\n     -26,    -24,     27,     94,\n     159,    179,    167,    147,\n     147,    167,    179,    159,\n      94,     27,    -24,    -26,\n     -30,    -46,   -101,   -164,\n    -238,   -216,   -173,   -140,\n    -138,   -134,   -129,    -63,\n     -31,    -36,    124,    126,\n     129,    151,    206,    250,\n     263,    217,    156,    125,\n     127,    133,     94,     -5,\n    -126,   -219,   -265,   -215,\n    -217,   -271,   -362,   -406,\n    -356,   -238,   -109,    -50,\n     -50,    -27,    104,    336,\n     572,    689,    653,    548,\n     551,    704,    914,    866,\n     391,   -571,  -1595,  -2428,\n  -11878, -12319, -12618, -12770,\n  -12770, -12618, -12319, -11878,\n  -11306, -10615,  -9822,  -8943,\n   -7997,  -7005,  -5987,  -4963,\n   -3953,  -2974,  -2044,  -1176,\n    -384,    325,    944,   1468,\n    1897,   2234,   2483,   2650,\n    2745,   2777,   2758,   2699,\n    2613,   2511,   2404,   2302,\n    2213,   2145,   2103,   2090,\n    2109,   2158,   2236,   2340,\n    2465,   2606,   2756,   2910,\n    3061,   3202,   3329,   3436,\n    3520,   3579,   3611,   3616,\n    3596,   3553,   3491,   3413,\n    3326,   3234,   3143,   3057,\n    2983,   2923,   2881,   2859,\n    2859,   2881,   2923,   2983,\n    3057,   3143,   3234,   3326,\n    3413,   3491,   3553,   3596,\n    3616,   3611,   3579,   3520,\n    3436,   3329,   3202,   3061,\n    2910,   2756,   2606,   2465,\n    2340,   2236,   2158,   2109,\n    2090,   2103,   2145,   2213,\n    2302,   2404,   2511,   2613,\n    2699,   2758,   2777,   2745,\n    2650,   2483,   2234,   1897,\n    1468,    944,    325,   -384,\n   -1176,  -2044,  -2974,  -3953,\n   -4963,  -5987,  -7005,  -7997,\n   -8943,  -9822, -10615, -11306,\n  -11878, -12319, -12618, -12770,\n  -14120, -14675, -15058, -15253,\n  -15253, -15058, -14675, -14120,\n  -13414, -12585, -11663, -10677,\n   -9658,  -8634,  -7628,  -6657,\n   -5734,  -4864,  -4049,  -3283,\n   -2560,  -1870,  -1203,   -552,\n      90,    725,   1349,   1957,\n    2538,   3077,   3558,   3966,\n    4283,   4498,   4602,   4591,\n    4470,   4247,   3938,   3566,\n    3155,   2735,   2334,   1982,\n    1703,   1518,   1441,   1480,\n    1634,   1896,   2252,   2681,\n    3161,   3667,   4171,   4651,\n    5087,   5462,   5767,   5998,\n    6157,   6252,   6292,   6294,\n    6271,   6238,   6209,   6192,\n    6192,   6209,   6238,   6271,\n    6294,   6292,   6252,   6157,\n    5998,   5767,   5462,   5087,\n    4651,   4171,   3667,   3161,\n    2681,   2252,   1896,   1634,\n    1480,   1441,   1518,   1703,\n    1982,   2334,   2735,   3155,\n    3566,   3938,   4247,   4470,\n    4591,   4602,   4498,   4283,\n    3966,   3558,   3077,   2538,\n    1957,   1349,    725,     90,\n    -552,  -1203,  -1870,  -2560,\n   -3283,  -4049,  -4864,  -5734,\n   -6657,  -7628,  -8634,  -9658,\n  -10677, -11663, -12585, -13414,\n  -14120, -14675, -15058, -15253,\n  -11898, -12626, -13145, -13414,\n  -13414, -13145, -12626, -11898,\n  -11013, -10029,  -9005,  -7992,\n   -7029,  -6138,  -5325,  -4583,\n   -3891,  -3226,  -2564,  -1888,\n   -1194,   -487,    210,    866,\n    1444,   1906,   2220,   2366,\n    2342,   2161,   1855,   1472,\n    1066,    695,    412,    258,\n     258,    417,    722,   1143,\n    1635,   2150,   2641,   3068,\n    3404,   3638,   3775,   3835,\n    3849,   3849,   3868,   3931,\n    4050,   4223,   4434,   4654,\n    4847,   4975,   5007,   4920,\n    4709,   4384,   3972,   3514,\n    3061,   2664,   2369,   2212,\n    2212,   2369,   2664,   3061,\n    3514,   3972,   4384,   4709,\n    4920,   5007,   4975,   4847,\n    4654,   4434,   4223,   4050,\n    3931,   3868,   3849,   3849,\n    3835,   3775,   3638,   3404,\n    3068,   2641,   2150,   1635,\n    1143,    722,    417,    258,\n     258,    412,    695,   1066,\n    1472,   1855,   2161,   2342,\n    2366,   2220,   1906,   1444,\n     866,    210,   -487,  -1194,\n   -1888,  -2564,  -3226,  -3891,\n   -4583,  -5325,  -6138,  -7029,\n   -7992,  -9005, -10029, -11013,\n  -11898, -12626, -13145, -13414,\n  -11438, -12308, -12954, -13299,\n  -13299, -12954, -12308, -11438,\n  -10442,  -9418,  -8447,  -7578,\n   -6828,  -6176,  -5582,  -4995,\n   -4375,  -3700,  -2976,  -2238,\n   -1536,   -929,   -462,   -161,\n     -16,     10,    -19,    -30,\n      44,    249,    595,   1058,\n    1581,   2086,   2495,   2741,\n    2792,   2652,   2365,   2004,\n    1657,   1409,   1324,   1433,\n    1729,   2168,   2686,   3209,\n    3672,   4032,   4278,   4427,\n    4517,   4598,   4711,   4879,\n    5098,   5334,   5534,   5638,\n    5591,   5366,   4965,   4432,\n    3838,   3275,   2837,   2596,\n    2596,   2837,   3275,   3838,\n    4432,   4965,   5366,   5591,\n    5638,   5534,   5334,   5098,\n    4879,   4711,   4598,   4517,\n    4427,   4278,   4032,   3672,\n    3209,   2686,   2168,   1729,\n    1433,   1324,   1409,   1657,\n    2004,   2365,   2652,   2792,\n    2741,   2495,   2086,   1581,\n    1058,    595,    249,     44,\n     -30,    -19,     10,    -16,\n    -161,   -462,   -929,  -1536,\n   -2238,  -2976,  -3700,  -4375,\n   -4995,  -5582,  -6176,  -6828,\n   -7578,  -8447,  -9418, -10442,\n  -11438, -12308, -12954, -13299,\n  -11893, -12837, -13568, -13969,\n  -13969, -13568, -12837, -11893,\n  -10869,  -9876,  -8975,  -8169,\n   -7410,  -6632,  -5779,  -4833,\n   -3831,  -2853,  -1998,  -1355,\n    -967,   -814,   -818,   -862,\n    -825,   -621,   -221,    336,\n     960,   1536,   1966,   2193,\n    2222,   2115,   1964,   1859,\n    1859,   1970,   2145,   2305,\n    2368,   2284,   2056,   1745,\n    1458,   1312,   1400,   1761,\n    2363,   3117,   3895,   4575,\n    5067,   5342,   5432,   5410,\n    5364,   5360,   5420,   5512,\n    5567,   5504,   5265,   4842,\n    4285,   3698,   3209,   2931,\n    2931,   3209,   3698,   4285,\n    4842,   5265,   5504,   5567,\n    5512,   5420,   5360,   5364,\n    5410,   5432,   5342,   5067,\n    4575,   3895,   3117,   2363,\n    1761,   1400,   1312,   1458,\n    1745,   2056,   2284,   2368,\n    2305,   2145,   1970,   1859,\n    1859,   1964,   2115,   2222,\n    2193,   1966,   1536,    960,\n     336,   -221,   -621,   -825,\n    -862,   -818,   -814,   -967,\n   -1355,  -1998,  -2853,  -3831,\n   -4833,  -5779,  -6632,  -7410,\n   -8169,  -8975,  -9876, -10869,\n  -11893, -12837, -13568, -13969,\n   -8150,  -9174, -10117, -10684,\n  -10684, -10117,  -9174,  -8150,\n   -7312,  -6790,  -6541,  -6401,\n   -6179,  -5756,  -5120,  -4347,\n   -3527,  -2714,  -1902,  -1065,\n    -206,    606,   1249,   1614,\n    1670,   1505,   1298,   1235,\n    1417,   1805,   2240,   2528,\n    2544,   2302,   1944,   1664,\n    1598,   1751,   1996,   2152,\n    2085,   1790,   1399,   1113,\n    1096,   1390,   1896,   2428,\n    2807,   2941,   2856,   2655,\n    2453,   2309,   2219,   2142,\n    2065,   2026,   2106,   2368,\n    2789,   3238,   3515,   3446,\n    2981,   2242,   1492,   1022,\n    1022,   1492,   2242,   2981,\n    3446,   3515,   3238,   2789,\n    2368,   2106,   2026,   2065,\n    2142,   2219,   2309,   2453,\n    2655,   2856,   2941,   2807,\n    2428,   1896,   1390,   1096,\n    1113,   1399,   1790,   2085,\n    2152,   1996,   1751,   1598,\n    1664,   1944,   2302,   2544,\n    2528,   2240,   1805,   1417,\n    1235,   1298,   1505,   1670,\n    1614,   1249,    606,   -206,\n   -1065,  -1902,  -2714,  -3527,\n   -4347,  -5120,  -5756,  -6179,\n   -6401,  -6541,  -6790,  -7312,\n   -8150,  -9174, -10117, -10684,\n   -5646,  -6670,  -7672,  -8291,\n   -8291,  -7672,  -6670,  -5646,\n   -4925,  -4659,  -4787,  -5094,\n   -5333,  -5344,  -5102,  -4686,\n   -4201,  -3699,  -3168,  -2564,\n   -1886,  -1217,   -702,   -478,\n    -584,   -911,  -1243,  -1354,\n   -1124,   -608,    -10,    424,\n     532,    325,    -25,   -283,\n    -283,    -20,    349,    598,\n     563,    243,   -197,   -502,\n    -465,    -28,    691,   1466,\n    2077,   2416,   2515,   2505,\n    2525,   2649,   2865,   3122,\n    3394,   3725,   4206,   4906,\n    5790,   6686,   7339,   7524,\n    7173,   6432,   5622,   5100,\n    5100,   5622,   6432,   7173,\n    7524,   7339,   6686,   5790,\n    4906,   4206,   3725,   3394,\n    3122,   2865,   2649,   2525,\n    2505,   2515,   2416,   2077,\n    1466,    691,    -28,   -465,\n    -502,   -197,    243,    563,\n     598,    349,    -20,   -283,\n    -283,    -25,    325,    532,\n     424,    -10,   -608,  -1124,\n   -1354,  -1243,   -911,   -584,\n    -478,   -702,  -1217,  -1886,\n   -2564,  -3168,  -3699,  -4201,\n   -4686,  -5102,  -5344,  -5333,\n   -5094,  -4787,  -4659,  -4925,\n   -5646,  -6670,  -7672,  -8291,\n   -1658,  -2370,  -3128,  -3616,\n   -3616,  -3128,  -2370,  -1658,\n   -1249,  -1211,  -1403,  -1564,\n   -1462,  -1015,   -322,    409,\n     986,   1340,   1538,   1724,\n    2005,   2376,   2717,   2872,\n    2762,   2448,   2113,   1955,\n    2069,   2366,   2613,   2548,\n    2029,   1128,    104,   -719,\n   -1117,  -1082,   -819,   -637,\n    -781,  -1305,  -2057,  -2764,\n   -3182,  -3218,  -2960,  -2607,\n   -2342,  -2229,  -2194,  -2091,\n   -1810,  -1356,   -852,   -456,\n    -254,   -189,    -90,    235,\n     868,   1712,   2519,   3016,\n    3050,   2678,   2150,   1780,\n    1780,   2150,   2678,   3050,\n    3016,   2519,   1712,    868,\n     235,    -90,   -189,   -254,\n    -456,   -852,  -1356,  -1810,\n   -2091,  -2194,  -2229,  -2342,\n   -2607,  -2960,  -3218,  -3182,\n   -2764,  -2057,  -1305,   -781,\n    -637,   -819,  -1082,  -1117,\n    -719,    104,   1128,   2029,\n    2548,   2613,   2366,   2069,\n    1955,   2113,   2448,   2762,\n    2872,   2717,   2376,   2005,\n    1724,   1538,   1340,    986,\n     409,   -322,  -1015,  -1462,\n   -1564,  -1403,  -1211,  -1249,\n   -1658,  -2370,  -3128,  -3616,\n  -11982, -12450, -12913, -13204,\n  -13204, -12913, -12450, -11982,\n  -11627, -11392, -11165, -10789,\n  -10154,  -9270,  -8261,  -7300,\n   -6514,  -5911,  -5386,  -4781,\n   -3990,  -3021,  -1997,  -1089,\n    -421,      5,    299,    624,\n    1094,   1709,   2352,   2860,\n    3119,   3132,   3019,   2949,\n    3042,   3305,   3626,   3846,\n    3854,   3656,   3374,   3175,\n    3182,   3398,   3709,   3953,\n    4017,   3900,   3720,   3640,\n    3776,   4125,   4570,   4942,\n    5123,   5109,   5011,   4992,\n    5163,   5521,   5945,   6269,\n    6373,   6254,   6028,   5856,\n    5856,   6028,   6254,   6373,\n    6269,   5945,   5521,   5163,\n    4992,   5011,   5109,   5123,\n    4942,   4570,   4125,   3776,\n    3640,   3720,   3900,   4017,\n    3953,   3709,   3398,   3182,\n    3175,   3374,   3656,   3854,\n    3846,   3626,   3305,   3042,\n    2949,   3019,   3132,   3119,\n    2860,   2352,   1709,   1094,\n     624,    299,      5,   -421,\n   -1089,  -1997,  -3021,  -3990,\n   -4781,  -5386,  -5911,  -6514,\n   -7300,  -8261,  -9270, -10154,\n  -10789, -11165, -11392, -11627,\n  -11982, -12450, -12913, -13204,\n   -7496,  -8520,  -9407,  -9925,\n   -9925,  -9407,  -8520,  -7496,\n   -6555,  -5823,  -5302,  -4905,\n   -4519,  -4076,  -3574,  -3062,\n   -2592,  -2178,  -1789,  -1375,\n    -913,   -433,    -10,    276,\n     394,    391,    375,    459,\n     698,   1052,   1404,   1617,\n    1614,   1420,   1154,    968,\n     968,   1158,   1438,   1665,\n    1725,   1600,   1372,   1181,\n    1149,   1318,   1634,   1984,\n    2259,   2411,   2464,   2496,\n    2575,   2726,   2918,   3093,\n    3211,   3278,   3338,   3430,\n    3545,   3605,   3491,   3109,\n    2456,   1652,    913,    470,\n     470,    913,   1652,   2456,\n    3109,   3491,   3605,   3545,\n    3430,   3338,   3278,   3211,\n    3093,   2918,   2726,   2575,\n    2496,   2464,   2411,   2259,\n    1984,   1634,   1318,   1149,\n    1181,   1372,   1600,   1725,\n    1665,   1438,   1158,    968,\n     968,   1154,   1420,   1614,\n    1617,   1404,   1052,    698,\n     459,    375,    391,    394,\n     276,    -10,   -433,   -913,\n   -1375,  -1789,  -2178,  -2592,\n   -3062,  -3574,  -4076,  -4519,\n   -4905,  -5302,  -5823,  -6555,\n   -7496,  -8520,  -9407,  -9925,\n   -9783, -10807, -11664, -12155,\n  -12155, -11664, -10807,  -9783,\n   -8783,  -7923,  -7218,  -6603,\n   -5992,  -5329,  -4612,  -3883,\n   -3188,  -2551,  -1957,  -1376,\n    -792,   -226,    271,    647,\n     888,   1033,   1164,   1358,\n    1645,   1980,   2263,   2390,\n    2313,   2071,   1784,   1592,\n    1592,   1788,   2093,   2373,\n    2518,   2495,   2358,   2216,\n    2174,   2278,   2502,   2767,\n    2991,   3130,   3196,   3235,\n    3291,   3377,   3469,   3527,\n    3528,   3483,   3429,   3399,\n    3379,   3304,   3080,   2634,\n    1974,   1210,    528,    125,\n     125,    528,   1210,   1974,\n    2634,   3080,   3304,   3379,\n    3399,   3429,   3483,   3528,\n    3527,   3469,   3377,   3291,\n    3235,   3196,   3130,   2991,\n    2767,   2502,   2278,   2174,\n    2216,   2358,   2495,   2518,\n    2373,   2093,   1788,   1592,\n    1592,   1784,   2071,   2313,\n    2390,   2263,   1980,   1645,\n    1358,   1164,   1033,    888,\n     647,    271,   -226,   -792,\n   -1376,  -1957,  -2551,  -3188,\n   -3883,  -4612,  -5329,  -5992,\n   -6603,  -7218,  -7923,  -8783,\n   -9783, -10807, -11664, -12155,\n   -9318, -10342, -11211, -11714,\n  -11714, -11211, -10342,  -9318,\n   -8336,  -7505,  -6818,  -6189,\n   -5518,  -4758,  -3933,  -3122,\n   -2402,  -1811,  -1325,   -886,\n    -446,      5,    433,    796,\n    1078,   1315,   1578,   1928,\n    2368,   2818,   3146,   3230,\n    3028,   2618,   2171,   1883,\n    1883,   2174,   2635,   3077,\n    3333,   3333,   3122,   2828,\n    2585,   2476,   2499,   2593,\n    2685,   2738,   2762,   2799,\n    2874,   2974,   3040,   3009,\n    2850,   2590,   2300,   2049,\n    1855,   1661,   1361,    863,\n     156,   -659,  -1387,  -1818,\n   -1818,  -1387,   -659,    156,\n     863,   1361,   1661,   1855,\n    2049,   2300,   2590,   2850,\n    3009,   3040,   2974,   2874,\n    2799,   2762,   2738,   2685,\n    2593,   2499,   2476,   2585,\n    2828,   3122,   3333,   3333,\n    3077,   2635,   2174,   1883,\n    1883,   2171,   2618,   3028,\n    3230,   3146,   2818,   2368,\n    1928,   1578,   1315,   1078,\n     796,    433,      5,   -446,\n    -886,  -1325,  -1811,  -2402,\n   -3122,  -3933,  -4758,  -5518,\n   -6189,  -6818,  -7505,  -8336,\n   -9318, -10342, -11211, -11714,\n   -8348,  -9330, -10117, -10557,\n  -10557, -10117,  -9330,  -8348,\n   -7324,  -6368,  -5525,  -4787,\n   -4122,  -3509,  -2947,  -2452,\n   -2031,  -1668,  -1323,   -951,\n    -527,    -61,    403,    810,\n    1128,   1364,   1555,   1748,\n    1966,   2188,   2362,   2431,\n    2374,   2222,   2055,   1965,\n    2015,   2206,   2479,   2747,\n    2932,   3004,   2990,   2947,\n    2929,   2957,   3010,   3040,\n    3009,   2909,   2770,   2644,\n    2571,   2559,   2580,   2582,\n    2523,   2380,   2157,   1864,\n    1498,   1031,    428,   -321,\n   -1176,  -2030,  -2729,  -3125,\n   -3125,  -2729,  -2030,  -1176,\n    -321,    428,   1031,   1498,\n    1864,   2157,   2380,   2523,\n    2582,   2580,   2559,   2571,\n    2644,   2770,   2909,   3009,\n    3040,   3010,   2957,   2929,\n    2947,   2990,   3004,   2932,\n    2747,   2479,   2206,   2015,\n    1965,   2055,   2222,   2374,\n    2431,   2362,   2188,   1966,\n    1748,   1555,   1364,   1128,\n     810,    403,    -61,   -527,\n    -951,  -1323,  -1668,  -2031,\n   -2452,  -2947,  -3509,  -4122,\n   -4787,  -5525,  -6368,  -7324,\n   -8348,  -9330, -10117, -10557,\n   -5699,  -6574,  -7222,  -7566,\n   -7566,  -7222,  -6574,  -5699,\n   -4697,  -3673,  -2724,  -1923,\n   -1313,   -903,   -672,   -577,\n    -566,   -587,   -597,   -571,\n    -501,   -396,   -270,   -144,\n     -31,     61,    134,    201,\n     275,    370,    493,    644,\n     816,    992,   1155,   1290,\n    1388,   1449,   1482,   1500,\n    1521,   1560,   1625,   1716,\n    1823,   1934,   2033,   2110,\n    2161,   2192,   2219,   2259,\n    2328,   2434,   2569,   2706,\n    2804,   2811,   2673,   2347,\n    1812,   1077,    184,   -792,\n   -1756,  -2601,  -3230,  -3565,\n   -3565,  -3230,  -2601,  -1756,\n    -792,    184,   1077,   1812,\n    2347,   2673,   2811,   2804,\n    2706,   2569,   2434,   2328,\n    2259,   2219,   2192,   2161,\n    2110,   2033,   1934,   1823,\n    1716,   1625,   1560,   1521,\n    1500,   1482,   1449,   1388,\n    1290,   1155,    992,    816,\n     644,    493,    370,    275,\n     201,    134,     61,    -31,\n    -144,   -270,   -396,   -501,\n    -571,   -597,   -587,   -566,\n    -577,   -672,   -903,  -1313,\n   -1923,  -2724,  -3673,  -4697,\n   -5699,  -6574,  -7222,  -7566,\n   -2245,  -3174,  -3879,  -4260,\n   -4260,  -3879,  -3174,  -2245,\n   -1221,   -236,    590,   1176,\n    1484,   1526,   1353,   1043,\n     686,    360,    125,      9,\n       9,     98,    236,    377,\n     487,    545,    548,    512,\n     459,    415,    396,    413,\n     459,    520,    577,    610,\n     610,    577,    520,    459,\n     413,    396,    415,    459,\n     512,    548,    545,    487,\n     377,    236,     98,      9,\n       9,    125,    360,    686,\n    1043,   1353,   1526,   1484,\n    1176,    590,   -236,  -1221,\n   -2245,  -3174,  -3879,  -4260,\n   -4260,  -3879,  -3174,  -2245,\n   -1221,   -236,    590,   1176,\n    1484,   1526,   1353,   1043,\n     686,    360,    125,      9,\n       9,     98,    236,    377,\n     487,    545,    548,    512,\n     459,    415,    396,    413,\n     459,    520,    577,    610,\n     610,    577,    520,    459,\n     413,    396,    415,    459,\n     512,    548,    545,    487,\n     377,    236,     98,      9,\n       9,    125,    360,    686,\n    1043,   1353,   1526,   1484,\n    1176,    590,   -236,  -1221,\n   -2245,  -3174,  -3879,  -4260,\n   -2455,  -3479,  -4342,  -4836,\n   -4836,  -4342,  -3479,  -2455,\n   -1484,   -723,   -233,     14,\n      98,    106,     99,    104,\n     124,    154,    186,    212,\n     212,    156,     16,   -209,\n    -475,   -692,   -747,   -545,\n     -56,    672,   1520,   2345,\n    3029,   3512,   3797,   3923,\n    3923,   3797,   3512,   3029,\n    2345,   1520,    672,    -56,\n    -545,   -747,   -692,   -475,\n    -209,     16,    156,    212,\n     212,    186,    154,    124,\n     104,     99,    106,     98,\n      14,   -233,   -723,  -1484,\n   -2455,  -3479,  -4342,  -4836,\n   -4836,  -4342,  -3479,  -2455,\n   -1484,   -723,   -233,     14,\n      98,    106,     99,    104,\n     124,    154,    186,    212,\n     212,    156,     16,   -209,\n    -475,   -692,   -747,   -545,\n     -56,    672,   1520,   2345,\n    3029,   3512,   3797,   3923,\n    3923,   3797,   3512,   3029,\n    2345,   1520,    672,    -56,\n    -545,   -747,   -692,   -475,\n    -209,     16,    156,    212,\n     212,    186,    154,    124,\n     104,     99,    106,     98,\n      14,   -233,   -723,  -1484,\n   -2455,  -3479,  -4342,  -4836,\n  -24465, -24934, -25303, -25650,\n  -25650, -25303, -24934, -24465,\n  -23963, -23391, -22788, -22130,\n  -21445, -20715, -19962, -19170,\n  -18359, -17515, -16655, -15767,\n  -14865, -13941, -13004, -12049,\n  -11085, -10106,  -9119,  -8121,\n   -7118,  -6106,  -5092,  -4071,\n   -3051,  -2027,  -1006,     17,\n    1035,   2051,   3060,   4066,\n    5062,   6051,   7028,   7997,\n    8951,   9893,  10819,  11729,\n   12621,  13494,  14346,  15176,\n   15981,  16762,  17514,  18238,\n   18929,  19588,  20209,  20793,\n   21335,  21833,  22282,  22680,\n   23019,  23296,  23499,  23620,\n   23620,  23499,  23296,  23019,\n   22680,  22282,  21833,  21335,\n   20793,  20209,  19588,  18929,\n   18238,  17514,  16762,  15981,\n   15176,  14346,  13494,  12621,\n   11729,  10819,   9893,   8951,\n    7997,   7028,   6051,   5062,\n    4066,   3060,   2051,   1035,\n      17,  -1006,  -2027,  -3051,\n   -4071,  -5092,  -6106,  -7118,\n   -8121,  -9119, -10106, -11085,\n  -12049, -13004, -13941, -14865,\n  -15767, -16655, -17515, -18359,\n  -19170, -19962, -20715, -21445,\n  -22130, -22788, -23391, -23963,\n  -24465, -24934, -25303, -25650,\n  -13219, -13414, -13578, -13708,\n  -13781, -13269, -12847, -12321,\n  -11825, -11266, -10725, -10139,\n   -9565,  -8958,  -8361,  -7738,\n   -7125,  -6491,  -5866,  -5225,\n   -4594,  -3950,  -3316,  -2673,\n   -2041,  -1401,   -773,   -141,\n     479,   1102,   1710,   2320,\n    2915,   3509,   4087,   4663,\n    5221,   5776,   6312,   6842,\n    7354,   7858,   8341,   8815,\n    9268,   9710,  10129,  10535,\n   10917,  11285,  11626,  11952,\n   12250,  12530,  12780,  13010,\n   13208,  13384,  13524,  13640,\n   13718,  13767,  13775,  13750,\n   13677,  13566,  13398,  13181,\n   12880,  12508,  12074,  11596,\n   11066,  10502,   9893,   9255,\n    8574,   7870,   7126,   6363,\n    5561,   4745,   3889,   3025,\n    2118,   1212,    256,   -681,\n   -1705,  -2536,  -2635,  -2789,\n   -2931,  -3110,  -3287,  -3492,\n   -3699,  -3930,  -4163,  -4416,\n   -4673,  -4947,  -5224,  -5515,\n   -5809,  -6116,  -6425,  -6743,\n   -7064,  -7391,  -7720,  -8055,\n   -8389,  -8727,  -9063,  -9400,\n   -9735, -10069, -10397, -10723,\n  -11042, -11355, -11659, -11955,\n  -12238, -12509, -12764, -13002,\n  -13219, -13414, -13578, -13708,\n  -23535, -24447, -25205, -26106,\n  -26106, -25205, -24447, -23535,\n  -22674, -21723, -20801, -19819,\n  -18859, -17855, -16869, -15851,\n  -14851, -13827, -12819, -11796,\n  -10789,  -9772,  -8772,  -7767,\n   -6779,  -5792,  -4822,  -3856,\n   -2909,  -1970,  -1051,   -143,\n     745,   1617,   2468,   3300,\n    4111,   4899,   5665,   6405,\n    7121,   7808,   8471,   9101,\n    9706,  10275,  10817,  11319,\n   11794,  12224,  12627,  12980,\n   13305,  13575,  13817,  13997,\n   14150,  14232,  14288,  14264,\n   14214,  14072,  13909,  13632,\n   13346,  12906,  12495,  11801,\n   11801,  12495,  12906,  13346,\n   13632,  13909,  14072,  14214,\n   14264,  14288,  14232,  14150,\n   13997,  13817,  13575,  13305,\n   12980,  12627,  12224,  11794,\n   11319,  10817,  10275,   9706,\n    9101,   8471,   7808,   7121,\n    6405,   5665,   4899,   4111,\n    3300,   2468,   1617,    745,\n    -143,  -1051,  -1970,  -2909,\n   -3856,  -4822,  -5792,  -6779,\n   -7767,  -8772,  -9772, -10789,\n  -11796, -12819, -13827, -14851,\n  -15851, -16869, -17855, -18859,\n  -19819, -20801, -21723, -22674,\n  -23535, -24447, -25205, -26106,\n  -14958, -15580, -16101, -16732,\n  -16732, -16101, -15580, -14958,\n  -14379, -13744, -13138, -12496,\n  -11879, -11236, -10616,  -9979,\n   -9365,  -8738,  -8134,  -7523,\n   -6935,  -6344,  -5777,  -5209,\n   -4666,  -4125,  -3612,  -3101,\n   -2619,  -2142,  -1696,  -1256,\n    -848,   -448,    -82,    275,\n     596,    908,   1180,   1444,\n    1664,   1877,   2041,   2203,\n    2305,   2416,   2449,   3279,\n    4303,   5226,   6153,   7019,\n    7868,   8665,   9436,  10157,\n   10846,  11486,  12088,  12640,\n   13149,  13606,  14014,  14367,\n   14664,  14900,  15069,  15165,\n   15165,  15069,  14900,  14664,\n   14367,  14014,  13606,  13149,\n   12640,  12088,  11486,  10846,\n   10157,   9436,   8665,   7868,\n    7019,   6153,   5226,   4303,\n    3279,   2449,   2416,   2305,\n    2203,   2041,   1877,   1664,\n    1444,   1180,    908,    596,\n     275,    -82,   -448,   -848,\n   -1256,  -1696,  -2142,  -2619,\n   -3101,  -3612,  -4125,  -4666,\n   -5209,  -5777,  -6344,  -6935,\n   -7523,  -8134,  -8738,  -9365,\n   -9979, -10616, -11236, -11879,\n  -12496, -13138, -13744, -14379,\n  -14958, -15580, -16101, -16732,\n  -12888, -13434, -13895, -14463,\n  -14463, -13895, -13434, -12888,\n  -12387, -11844, -11332, -10798,\n  -10288,  -9768,  -9269,  -8769,\n   -8288,  -7813,  -7355,  -6909,\n   -6479,  -6065,  -5667,  -5290,\n   -4927,  -4591,  -4265,  -3973,\n   -3688,  -3445,  -3201,  -3011,\n   -2809,  -2682,  -2510,  -2487,\n   -1964,   -940,    -68,    846,\n    1679,   2519,   3297,   4067,\n    4784,   5482,   6133,   6759,\n    7340,   7890,   8397,   8868,\n    9298,   9687,  10036,  10338,\n   10602,  10812,  10986,  11098,\n   11177,  11185,  11162,  11055,\n   10925,  10684,  10446,  10012,\n   10012,  10446,  10684,  10925,\n   11055,  11162,  11185,  11177,\n   11098,  10986,  10812,  10602,\n   10338,  10036,   9687,   9298,\n    8868,   8397,   7890,   7340,\n    6759,   6133,   5482,   4784,\n    4067,   3297,   2519,   1679,\n     846,    -68,   -940,  -1964,\n   -2487,  -2510,  -2682,  -2809,\n   -3011,  -3201,  -3445,  -3688,\n   -3973,  -4265,  -4591,  -4927,\n   -5290,  -5667,  -6065,  -6479,\n   -6909,  -7355,  -7813,  -8288,\n   -8769,  -9269,  -9768, -10288,\n  -10798, -11332, -11844, -12387,\n  -12888, -13434, -13895, -14463,\n  -13569, -13655, -13735, -13799,\n  -13825, -13236, -12767, -12209,\n  -11706, -11158, -10651, -10119,\n   -9623,  -9114,  -8639,  -8158,\n   -7711,  -7264,  -6849,  -6441,\n   -6065,  -5700,  -5367,  -5048,\n   -4762,  -4494,  -4258,  -4044,\n   -3861,  -3707,  -3576,  -3497,\n   -3340,  -2353,  -1381,   -428,\n     474,   1359,   2191,   3003,\n    3762,   4500,   5182,   5842,\n    6445,   7025,   7544,   8040,\n    8473,   8881,   9223,   9542,\n    9789,  10014,  10160,  10289,\n   10327,  10358,  10276,  10218,\n    9971,  10347,  11118,  11702,\n   12289,  12756,  13181,  13494,\n   13724,  13826,  13862,  13805,\n   13689,  13494,  13245,  12924,\n   12550,  12113,  11624,  11077,\n   10478,   9828,   9125,   8376,\n    7572,   6733,   5828,   4909,\n    3885,   3036,   2973,   2815,\n    2661,   2429,   2191,   1885,\n    1567,   1189,    797,    347,\n    -115,   -633,  -1164,  -1747,\n   -2341,  -2988,  -3643,  -4350,\n   -5061,  -5826,  -6591,  -7411,\n   -8224,  -9097,  -9953, -10881,\n  -11764, -12770, -13027, -12966,\n  -13018, -13031, -13094, -13144,\n  -13223, -13297, -13388, -13475,\n  -13569, -13655, -13735, -13799,\n  -13405, -13971, -14453, -15057,\n  -15057, -14453, -13971, -13405,\n  -12897, -12349, -11845, -11321,\n  -10835, -10340,  -9882,  -9423,\n   -9000,  -8582,  -8199,  -7827,\n   -7490,  -7168,  -6880,  -6612,\n   -6378,  -6168,  -5991,  -5843,\n   -5725,  -5627,  -4745,  -3721,\n   -2795,  -1862,   -998,   -141,\n     651,   1430,   2147,   2847,\n    3483,   4102,   4656,   5190,\n    5657,   6105,   6481,   6839,\n    7121,   7388,   7568,   7744,\n    7814,   7906,   7828,   8069,\n    8984,   9749,  10509,  11175,\n   11805,  12352,  12849,  13267,\n   13622,  13896,  14094,  14203,\n   14203,  14094,  13896,  13622,\n   13267,  12849,  12352,  11805,\n   11175,  10509,   9749,   8984,\n    8069,   7828,   7906,   7814,\n    7744,   7568,   7388,   7121,\n    6839,   6481,   6105,   5657,\n    5190,   4656,   4102,   3483,\n    2847,   2147,   1430,    651,\n    -141,   -998,  -1862,  -2795,\n   -3721,  -4745,  -5627,  -5725,\n   -5843,  -5991,  -6168,  -6378,\n   -6612,  -6880,  -7168,  -7490,\n   -7827,  -8199,  -8582,  -9000,\n   -9423,  -9882, -10340, -10835,\n  -11321, -11845, -12349, -12897,\n  -13405, -13971, -14453, -15057,\n  -12208, -12681, -13100, -13654,\n  -13654, -13100, -12681, -12208,\n  -11804, -11395, -11035, -10695,\n  -10392, -10128,  -9890,  -9710,\n   -9539,  -9455,  -9344,  -9400,\n   -8957,  -8016,  -7246,  -6454,\n   -5755,  -5075,  -4465,  -3894,\n   -3378,  -2918,  -2501,  -2156,\n   -1836,  -1616,  -1383,  -1330,\n    -791,    233,   1074,   1925,\n    2671,   3386,   4019,   4602,\n    5118,   5566,   5960,   6270,\n    6543,   6704,   6866,   6836,\n    7278,   8194,   8913,   9628,\n   10224,  10775,  11229,  11616,\n   11919,  12136,  12280,  12319,\n   12297,  12138,  11950,  11533,\n   11533,  11950,  12138,  12297,\n   12319,  12280,  12136,  11919,\n   11616,  11229,  10775,  10224,\n    9628,   8913,   8194,   7278,\n    6836,   6866,   6704,   6543,\n    6270,   5960,   5566,   5118,\n    4602,   4019,   3386,   2671,\n    1925,   1074,    233,   -791,\n   -1330,  -1383,  -1616,  -1836,\n   -2156,  -2501,  -2918,  -3378,\n   -3894,  -4465,  -5075,  -5755,\n   -6454,  -7246,  -8016,  -8957,\n   -9400,  -9344,  -9455,  -9539,\n   -9710,  -9890, -10128, -10392,\n  -10695, -11035, -11395, -11804,\n  -12208, -12681, -13100, -13654,\n  -20923, -21864, -22661, -23685,\n  -23685, -22661, -21864, -20923,\n  -20077, -19154, -18293, -17380,\n  -16516, -15613, -14751, -13861,\n  -13005, -12128, -11282, -10419,\n   -9586,  -8740,  -7921,  -7092,\n   -6290,  -5481,  -4696,  -3908,\n   -3143,  -2377,  -1633,   -890,\n    -170,    549,   1245,   1938,\n    2609,   3274,   3918,   4556,\n    5171,   5779,   6365,   6942,\n    7497,   8041,   8564,   9074,\n    9563,  10038,  10491,  10930,\n   11346,  11745,  12122,  12481,\n   12817,  13133,  13425,  13696,\n   13942,  14165,  14360,  14531,\n   14672,  14785,  14864,  14910,\n   14910,  14864,  14785,  14672,\n   14531,  14360,  14165,  13942,\n   13696,  13425,  13133,  12817,\n   12481,  12122,  11745,  11346,\n   10930,  10491,  10038,   9563,\n    9074,   8564,   8041,   7497,\n    6942,   6365,   5779,   5171,\n    4556,   3918,   3274,   2609,\n    1938,   1245,    549,   -170,\n    -890,  -1633,  -2377,  -3143,\n   -3908,  -4696,  -5481,  -6290,\n   -7092,  -7921,  -8740,  -9586,\n  -10419, -11282, -12128, -13005,\n  -13861, -14751, -15613, -16516,\n  -17380, -18293, -19154, -20077,\n  -20923, -21864, -22661, -23685,\n  -11488, -12034, -12560, -13357,\n  -13539, -12843, -12250, -11488,\n  -10751,  -9911,  -9081,  -8179,\n   -7283,  -6333,  -5390,  -4405,\n   -3428,  -2420,  -1423,   -402,\n     606,   1630,   2638,   3656,\n    4656,   5659,   6641,   7620,\n    8575,   9522,  10440,  11346,\n   12219,  13073,  13891,  14683,\n   15434,  16152,  16824,  17456,\n   18032,  18560,  19024,  19425,\n   19748,  19989,  20119,  20100,\n   19954,  19723,  19408,  19029,\n   18585,  18088,  17537,  16942,\n   16302,  15625,  14910,  14164,\n   13386,  12582,  11751,  10899,\n   10026,   9136,   8229,   7310,\n    6379,   5440,   4494,   3543,\n    2590,   1637,    687,   -258,\n   -1196,  -2124,  -3038,  -3937,\n   -4816,  -5674,  -6503,  -7303,\n   -8066,  -8789,  -9461, -10077,\n  -10620, -11064, -11371, -11596,\n  -11750, -11855, -11908, -11926,\n  -11906, -11861, -11786, -11695,\n  -11579, -11456, -11313, -11168,\n  -11009, -10854, -10689, -10533,\n  -10371, -10224, -10074,  -9945,\n   -9816,  -9713,  -9614,  -9547,\n   -9486,  -9465,  -9452,  -9486,\n   -9531,  -9632,  -9747,  -9928,\n  -10124, -10401, -10691, -11086,\n  -11488, -12034, -12560, -13357,\n  -15902, -16725, -17398, -18143,\n  -18143, -17398, -16725, -15902,\n  -15093, -14194, -13301, -12346,\n  -11397, -10404,  -9420,  -8404,\n   -7401,  -6377,  -5369,  -4349,\n   -3350,  -2348,  -1371,   -399,\n     543,   1472,   2364,   3234,\n    4061,   4857,   5600,   6301,\n    6936,   7514,   8006,   8414,\n    8674,   8796,   8824,   8776,\n    8660,   8489,   8266,   8000,\n    7693,   7353,   6980,   6582,\n    6159,   5718,   5259,   4789,\n    4307,   3821,   3329,   2839,\n    2351,   1870,   1400,    944,\n     506,     92,   -294,   -647,\n    -958,  -1221,  -1421,  -1547,\n   -1547,  -1421,  -1221,   -958,\n    -647,   -294,     92,    506,\n     944,   1400,   1870,   2351,\n    2839,   3329,   3821,   4307,\n    4789,   5259,   5718,   6159,\n    6582,   6980,   7353,   7693,\n    8000,   8266,   8489,   8660,\n    8776,   8824,   8796,   8674,\n    8414,   8006,   7514,   6936,\n    6301,   5600,   4857,   4061,\n    3234,   2364,   1472,    543,\n    -399,  -1371,  -2348,  -3350,\n   -4349,  -5369,  -6377,  -7401,\n   -8404,  -9420, -10404, -11397,\n  -12346, -13301, -14194, -15093,\n  -15902, -16725, -17398, -18143,\n  -12797, -13668, -14382, -15143,\n  -15143, -14382, -13668, -12797,\n  -11932, -10976, -10027,  -9022,\n   -8030,  -7006,  -6004,  -4989,\n   -4005,  -3026,  -2089,  -1176,\n    -320,    493,   1229,   1892,\n    2446,   2857,   3057,   3141,\n    3121,   3034,   2875,   2674,\n    2423,   2146,   1836,   1515,\n    1175,    838,    497,    172,\n    -141,   -423,   -674,   -873,\n   -1018,  -1078,  -1033,   -798,\n    -431,     24,    543,   1115,\n    1724,   2364,   3022,   3695,\n    4371,   5047,   5712,   6362,\n    6988,   7584,   8140,   8650,\n    9099,   9480,   9769,   9951,\n    9951,   9769,   9480,   9099,\n    8650,   8140,   7584,   6988,\n    6362,   5712,   5047,   4371,\n    3695,   3022,   2364,   1724,\n    1115,    543,     24,   -431,\n    -798,  -1033,  -1078,  -1018,\n    -873,   -674,   -423,   -141,\n     172,    497,    838,   1175,\n    1515,   1836,   2146,   2423,\n    2674,   2875,   3034,   3121,\n    3141,   3057,   2857,   2446,\n    1892,   1229,    493,   -320,\n   -1176,  -2089,  -3026,  -4005,\n   -4989,  -6004,  -7006,  -8030,\n   -9022, -10027, -10976, -11932,\n  -12797, -13668, -14382, -15143,\n  -11230, -12144, -12895, -13678,\n  -13678, -12895, -12144, -11230,\n  -10321,  -9326,  -8346,  -7322,\n   -6328,  -5323,  -4367,  -3429,\n   -2565,  -1753,  -1053,   -460,\n     -96,     63,     91,     32,\n    -105,   -290,   -520,   -770,\n   -1040,  -1306,  -1566,  -1798,\n   -1995,  -2134,  -2195,  -2148,\n   -1903,  -1453,   -903,   -266,\n     419,   1150,   1898,   2663,\n    3420,   4170,   4887,   5571,\n    6195,   6755,   7213,   7554,\n    7677,   7584,   7370,   7060,\n    6680,   6245,   5772,   5272,\n    4759,   4242,   3739,   3257,\n    2816,   2428,   2123,   1921,\n    1921,   2123,   2428,   2816,\n    3257,   3739,   4242,   4759,\n    5272,   5772,   6245,   6680,\n    7060,   7370,   7584,   7677,\n    7554,   7213,   6755,   6195,\n    5571,   4887,   4170,   3420,\n    2663,   1898,   1150,    419,\n    -266,   -903,  -1453,  -1903,\n   -2148,  -2195,  -2134,  -1995,\n   -1798,  -1566,  -1306,  -1040,\n    -770,   -520,   -290,   -105,\n      32,     91,     63,    -96,\n    -460,  -1053,  -1753,  -2565,\n   -3429,  -4367,  -5323,  -6328,\n   -7322,  -8346,  -9326, -10321,\n  -11230, -12144, -12895, -13678,\n  -10073, -10189, -10326, -10735,\n  -10783,  -9998,  -9240,  -8309,\n   -7385,  -6375,  -5388,  -4364,\n   -3385,  -2409,  -1506,   -648,\n      94,    733,   1141,   1296,\n    1292,   1190,   1001,    763,\n     480,    182,   -128,   -420,\n    -691,   -909,  -1060,  -1106,\n    -989,   -606,    -74,    562,\n    1260,   2008,   2778,   3560,\n    4332,   5084,   5793,   6446,\n    7015,   7476,   7776,   7805,\n    7632,   7344,   6960,   6515,\n    6020,   5500,   4964,   4435,\n    3922,   3453,   3038,   2715,\n    2514,   2553,   2807,   3169,\n    3617,   4115,   4651,   5200,\n    5752,   6285,   6789,   7239,\n    7623,   7904,   8062,   7989,\n    7660,   7192,   6618,   5970,\n    5266,   4527,   3768,   3006,\n    2256,   1536,    866,    271,\n    -221,   -531,   -582,   -493,\n    -306,    -57,    238,    553,\n     880,   1193,   1486,   1731,\n    1921,   2022,   2014,   1830,\n    1375,    729,    -25,   -876,\n   -1781,  -2739,  -3714,  -4711,\n   -5691,  -6661,  -7577,  -8445,\n   -9207,  -9851, -10231, -10426,\n  -10502, -10512, -10456, -10385,\n  -10278, -10198, -10107, -10085,\n  -10073, -10189, -10326, -10735,\n  -10338, -11294, -12084, -12896,\n  -12896, -12084, -11294, -10338,\n   -9390,  -8366,  -7371,  -6353,\n   -5391,  -4455,  -3611,  -2854,\n   -2259,  -1919,  -1817,  -1819,\n   -1930,  -2087,  -2299,  -2519,\n   -2753,  -2958,  -3137,  -3242,\n   -3262,  -3122,  -2723,  -2137,\n   -1462,   -707,     81,    899,\n    1710,   2513,   3270,   3978,\n    4593,   5102,   5410,   5442,\n    5301,   5056,   4727,   4351,\n    3936,   3514,   3092,   2701,\n    2350,   2083,   1915,   1959,\n    2255,   2683,   3199,   3773,\n    4380,   5002,   5616,   6208,\n    6752,   7232,   7611,   7861,\n    7861,   7611,   7232,   6752,\n    6208,   5616,   5002,   4380,\n    3773,   3199,   2683,   2255,\n    1959,   1915,   2083,   2350,\n    2701,   3092,   3514,   3936,\n    4351,   4727,   5056,   5301,\n    5442,   5410,   5102,   4593,\n    3978,   3270,   2513,   1710,\n     899,     81,   -707,  -1462,\n   -2137,  -2723,  -3122,  -3262,\n   -3242,  -3137,  -2958,  -2753,\n   -2519,  -2299,  -2087,  -1930,\n   -1819,  -1817,  -1919,  -2259,\n   -2854,  -3611,  -4455,  -5391,\n   -6353,  -7371,  -8366,  -9390,\n  -10338, -11294, -12084, -12896,\n   -8818,  -9842, -10709, -11586,\n  -11586, -10709,  -9842,  -8818,\n   -7842,  -6846,  -5978,  -5217,\n   -4811,  -4713,  -4771,  -4905,\n   -5077,  -5227,  -5313,  -5263,\n   -4911,  -4233,  -3444,  -2566,\n   -1690,   -828,    -67,    564,\n     859,    831,    660,    401,\n     115,   -159,   -360,   -433,\n    -197,    358,   1031,   1787,\n    2546,   3287,   3930,   4441,\n    4618,   4469,   4180,   3800,\n    3396,   3001,   2683,   2489,\n    2607,   3042,   3597,   4232,\n    4873,   5493,   6019,   6408,\n    6468,   6198,   5791,   5291,\n    4769,   4253,   3817,   3502,\n    3502,   3817,   4253,   4769,\n    5291,   5791,   6198,   6468,\n    6408,   6019,   5493,   4873,\n    4232,   3597,   3042,   2607,\n    2489,   2683,   3001,   3396,\n    3800,   4180,   4469,   4618,\n    4441,   3930,   3287,   2546,\n    1787,   1031,    358,   -197,\n    -433,   -360,   -159,    115,\n     401,    660,    831,    859,\n     564,    -67,   -828,  -1690,\n   -2566,  -3444,  -4233,  -4911,\n   -5263,  -5313,  -5227,  -5077,\n   -4905,  -4771,  -4713,  -4811,\n   -5217,  -5978,  -6846,  -7842,\n   -8818,  -9842, -10709, -11586,\n   -2052,  -2183,  -2314,  -2533,\n   -2664,  -2708,  -2665,  -2537,\n   -2327,  -2037,  -1673,  -1238,\n    -738,   -179,    432,   1088,\n    1782,   2505,   3249,   4006,\n    4768,   5525,   6269,   6992,\n    7686,   8342,   8953,   9512,\n   10012,  10447,  10812,  11101,\n   11312,  11439,  11482,  11439,\n   11307,  11089,  10783,  10393,\n    9920,   9368,   8741,   8043,\n    7280,   6459,   5585,   4667,\n    3711,   2725,   1718,    699,\n    -325,  -1345,  -2352,  -3337,\n   -4293,  -5212,  -6086,  -6907,\n   -7669,  -8367,  -8994,  -9546,\n  -10019, -10410, -10715, -10934,\n  -11065, -11109, -11066, -10938,\n  -10728, -10438, -10073,  -9638,\n   -9138,  -8579,  -7968,  -7312,\n   -6619,  -5896,  -5152,  -4394,\n   -3633,  -2876,  -2131,  -1408,\n    -715,    -59,    552,   1111,\n    1611,   2046,   2411,   2280,\n    2148,   2017,   1886,   1755,\n    1623,   1492,   1361,   1230,\n    1098,    967,    836,    705,\n     573,    442,    311,    180,\n      48,    -83,   -214,   -346,\n    -477,   -608,   -739,   -871,\n   -1002,  -1133,  -1264,  -1396,\n   -1527,  -1658,  -1789,  -1921,\n   -2052,  -2183,  -2314,  -2533,\n   -2730,  -2842,  -2953,  -2952,\n   -3064,  -3063,  -2952,  -2735,\n   -2415,  -2000,  -1498,   -917,\n    -269,    436,   1185,   1965,\n    2764,   3566,   4358,   5128,\n    5861,   6545,   7167,   7718,\n    8186,   8564,   8843,   9019,\n    9086,   9042,   8885,   8618,\n    8241,   7760,   7179,   6505,\n    5748,   4916,   4021,   3074,\n    2089,   1077,     53,   -970,\n   -1977,  -2956,  -3894,  -4777,\n   -5595,  -6336,  -6992,  -7553,\n   -8014,  -8369,  -8615,  -8748,\n   -8770,  -8681,  -8485,  -8185,\n   -7789,  -7303,  -6737,  -6102,\n   -5407,  -4666,  -3890,  -3095,\n   -2292,  -1497,   -722,     20,\n     714,   1350,   1916,   2402,\n    2798,   3098,   3294,   3383,\n    3361,   3228,   2982,   2627,\n    2166,   2055,   1944,   1832,\n    1721,   1610,   1499,   1387,\n    1276,   1165,   1053,    942,\n     831,    720,    608,    497,\n     386,    274,    163,     52,\n     -60,   -171,   -282,   -393,\n    -505,   -616,   -727,   -839,\n    -950,  -1061,  -1172,  -1284,\n   -1395,  -1506,  -1618,  -1729,\n   -1840,  -1951,  -2063,  -2174,\n   -2285,  -2397,  -2508,  -2619,\n   -2730,  -2842,  -2953,  -2952,\n   -3253,  -3312,  -3370,  -3571,\n   -3629,  -3547,  -3325,  -2971,\n   -2494,  -1904,  -1217,   -448,\n     385,   1263,   2164,   3070,\n    3958,   4808,   5600,   6317,\n    6940,   7457,   7853,   8119,\n    8249,   8237,   8084,   7791,\n    7363,   6808,   6137,   5363,\n    4501,   3570,   2587,   1574,\n     550,   -464,  -1446,  -2377,\n   -3239,  -4013,  -4684,  -5239,\n   -5667,  -5960,  -6114,  -6125,\n   -5995,  -5729,  -5333,  -4817,\n   -4193,  -3476,  -2684,  -1834,\n    -946,    -41,    861,   1739,\n    2572,   3341,   4028,   4618,\n    5095,   5449,   5670,   5753,\n    5695,   5494,   5155,   4684,\n    4089,   3382,   2577,   1690,\n     740,   -255,   -314,   -373,\n    -432,   -491,   -549,   -608,\n    -667,   -726,   -784,   -843,\n    -902,   -961,  -1019,  -1078,\n   -1137,  -1196,  -1255,  -1313,\n   -1372,  -1431,  -1490,  -1548,\n   -1607,  -1666,  -1725,  -1784,\n   -1842,  -1901,  -1960,  -2019,\n   -2077,  -2136,  -2195,  -2254,\n   -2312,  -2371,  -2430,  -2489,\n   -2548,  -2606,  -2665,  -2724,\n   -2783,  -2841,  -2900,  -2959,\n   -3018,  -3076,  -3135,  -3194,\n   -3253,  -3312,  -3370,  -3571,\n   -2499,  -2498,  -2496,  -2694,\n   -2693,  -2492,  -2099,  -1529,\n    -805,     47,    993,   1998,\n    3022,   4026,   4972,   5824,\n    6548,   7118,   7511,   7712,\n    7713,   7515,   7126,   6559,\n    5838,   4989,   4046,   3045,\n    2024,   1023,     80,   -769,\n   -1490,  -2057,  -2446,  -2644,\n   -2643,  -2442,  -2049,  -1479,\n    -755,     97,   1043,   2047,\n    3071,   4076,   5022,   5874,\n    6598,   7168,   7561,   7762,\n    7763,   7565,   7176,   6609,\n    5888,   5039,   4096,   3095,\n    2074,   1073,    130,   -719,\n   -1440,  -2007,  -2397,  -2594,\n   -2593,  -2591,  -2590,  -2588,\n   -2587,  -2585,  -2584,  -2582,\n   -2580,  -2579,  -2577,  -2576,\n   -2574,  -2573,  -2571,  -2570,\n   -2568,  -2566,  -2565,  -2563,\n   -2562,  -2560,  -2559,  -2557,\n   -2556,  -2554,  -2552,  -2551,\n   -2549,  -2548,  -2546,  -2545,\n   -2543,  -2541,  -2540,  -2538,\n   -2537,  -2535,  -2534,  -2532,\n   -2531,  -2529,  -2527,  -2526,\n   -2524,  -2523,  -2521,  -2520,\n   -2518,  -2517,  -2515,  -2513,\n   -2512,  -2510,  -2509,  -2507,\n   -2506,  -2504,  -2503,  -2501,\n   -2499,  -2498,  -2496,  -2694,\n   -1662,  -1690,  -1719,  -1990,\n   -2019,  -1806,  -1365,   -725,\n      75,    984,   1946,   2903,\n    3795,   4566,   5169,   5566,\n    5732,   5654,   5336,   4795,\n    4061,   3178,   2196,   1172,\n     166,   -764,  -1563,  -2185,\n   -2596,  -2771,  -2702,  -2395,\n   -1870,  -1161,   -311,    626,\n    1594,   2531,   3381,   4090,\n    4615,   4922,   4991,   4816,\n    4405,   3783,   2984,   2054,\n    1048,     24,   -958,  -1841,\n   -2575,  -3116,  -3434,  -3512,\n   -3346,  -2949,  -2346,  -1575,\n    -683,    274,    245,    216,\n     187,    158,    129,    100,\n      71,     43,     14,    -15,\n     -44,    -73,   -102,   -131,\n    -160,   -189,   -217,   -246,\n    -275,   -304,   -333,   -362,\n    -391,   -420,   -448,   -477,\n    -506,   -535,   -564,   -593,\n    -622,   -651,   -680,   -708,\n    -737,   -766,   -795,   -824,\n    -853,   -882,   -911,   -939,\n    -968,   -997,  -1026,  -1055,\n   -1084,  -1113,  -1142,  -1171,\n   -1199,  -1228,  -1257,  -1286,\n   -1315,  -1344,  -1373,  -1402,\n   -1430,  -1459,  -1488,  -1517,\n   -1546,  -1575,  -1604,  -1633,\n   -1662,  -1690,  -1719,  -1990,\n    -895,   -901,   -907,  -1302,\n   -1308,   -924,   -209,    726,\n    1739,   2674,   3389,   3773,\n    3767,   3372,   2646,   1700,\n     676,   -271,   -997,  -1392,\n   -1398,  -1014,   -299,    636,\n    1649,   2584,   3299,   3683,\n    3677,   3282,   2556,   1610,\n     586,   -361,  -1087,  -1482,\n   -1488,  -1104,   -389,    546,\n    1559,   2494,   3209,   3593,\n    3587,   3192,   2466,   1520,\n     496,   -451,   -457,   -462,\n    -468,   -473,   -479,   -485,\n    -490,   -496,   -502,   -507,\n    -513,   -518,   -524,   -530,\n    -535,   -541,   -547,   -552,\n    -558,   -563,   -569,   -575,\n    -580,   -586,   -592,   -597,\n    -603,   -608,   -614,   -620,\n    -625,   -631,   -637,   -642,\n    -648,   -653,   -659,   -665,\n    -670,   -676,   -682,   -687,\n    -693,   -698,   -704,   -710,\n    -715,   -721,   -727,   -732,\n    -738,   -743,   -749,   -755,\n    -760,   -766,   -772,   -777,\n    -783,   -788,   -794,   -800,\n    -805,   -811,   -817,   -822,\n    -828,   -833,   -839,   -845,\n    -850,   -856,   -862,   -867,\n    -873,   -878,   -884,   -890,\n    -895,   -901,   -907,  -1302,\n      39,     44,     50,   -665,\n    -659,     67,   1091,   1817,\n    1822,   1108,     95,   -620,\n    -614,    112,   1136,   1862,\n    1867,   1153,    140,   -575,\n    -569,    157,   1181,   1907,\n    1912,   1198,    185,   -530,\n    -524,    202,   1226,   1952,\n    1957,   1243,    230,   -485,\n    -479,   -473,   -468,   -462,\n    -456,   -451,   -445,   -440,\n    -434,   -428,   -423,   -417,\n    -411,   -406,   -400,   -395,\n    -389,   -383,   -378,   -372,\n    -366,   -361,   -355,   -350,\n    -344,   -338,   -333,   -327,\n    -321,   -316,   -310,   -305,\n    -299,   -293,   -288,   -282,\n    -276,   -271,   -265,   -260,\n    -254,   -248,   -243,   -237,\n    -231,   -226,   -220,   -214,\n    -209,   -203,   -198,   -192,\n    -186,   -181,   -175,   -169,\n    -164,   -158,   -153,   -147,\n    -141,   -136,   -130,   -124,\n    -119,   -113,   -108,   -102,\n     -96,    -91,    -85,    -79,\n     -74,    -68,    -63,    -57,\n     -51,    -46,    -40,    -34,\n     -29,    -23,    -18,    -12,\n      -6,     -1,      5,     11,\n      16,     22,     27,     33,\n      39,     44,     50,   -665,\n      96,     96,     96,   -928,\n    -928,     96,     96,   -928,\n    -928,     96,     96,   -928,\n    -928,     96,     96,   -928,\n    -928,     96,     96,   -928,\n    -928,     96,     96,   -928,\n    -928,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,     96,\n      96,     96,     96,   -928,\n   -3776,  -3851,  -3919,  -3983,\n   -4046,  -3936,  -3660,  -3229,\n   -2654,  -1952,  -1142,   -244,\n     719,   1724,   2748,   3767,\n    4757,   5696,   6564,   7341,\n    8011,   8561,   8978,   9255,\n    9387,   9373,   9214,   8915,\n    8484,   7931,   7270,   6515,\n    5683,   4792,   3861,   2910,\n    1959,   1027,    132,   -709,\n   -1480,  -2166,  -2757,  -3244,\n   -3618,  -3876,  -4017,  -4041,\n   -3952,  -3756,  -3461,  -3077,\n   -2617,  -2092,  -1518,   -910,\n    -283,    347,    966,   1559,\n    2112,   2612,   3050,   3417,\n    3703,   3906,   4020,   4046,\n    3983,   3835,   3606,   3302,\n    2930,   2501,   2023,   1508,\n     967,    410,   -150,   -702,\n   -1237,  -1744,  -2215,  -2642,\n   -3019,  -3341,  -3604,  -3807,\n   -3949,  -4031,  -4056,  -4027,\n   -3948,  -3825,  -3665,  -3474,\n   -3259,  -3029,  -2791,  -2551,\n   -2318,  -2097,  -1894,  -1714,\n   -1561,  -1439,  -1349,  -1293,\n   -1271,  -1282,  -1324,  -1397,\n   -1496,  -1618,  -1759,  -1915,\n   -2083,  -2257,  -2434,  -2610,\n   -2782,  -2946,  -3101,  -3244,\n   -3375,  -3494,  -3599,  -3693,\n   -3776,  -3851,  -3919,  -3983,\n   -2399,  -2422,  -2454,  -2492,\n   -2532,  -2327,  -1893,  -1256,\n    -453,    474,   1475,   2499,\n    3494,   4411,   5205,   5837,\n    6278,   6508,   6518,   6308,\n    5892,   5290,   4534,   3660,\n    2712,   1734,    772,   -129,\n    -929,  -1593,  -2094,  -2412,\n   -2538,  -2471,  -2220,  -1804,\n   -1246,   -580,    158,    930,\n    1696,   2416,   3055,   3582,\n    3972,   4208,   4279,   4185,\n    3931,   3531,   3007,   2385,\n    1696,    972,    247,   -445,\n   -1074,  -1613,  -2040,  -2340,\n   -2503,  -2528,  -2418,  -2184,\n   -1845,  -1420,   -935,   -417,\n     106,    607,   1060,   1443,\n    1738,   1932,   2016,   1989,\n    1853,   1618,   1295,    903,\n     460,    -12,   -491,   -955,\n   -1385,  -1762,  -2073,  -2308,\n   -2460,  -2528,  -2513,  -2423,\n   -2267,  -2058,  -1812,  -1542,\n   -1267,  -1001,   -759,   -554,\n    -394,   -288,   -239,   -247,\n    -311,   -425,   -582,   -774,\n    -989,  -1217,  -1448,  -1672,\n   -1880,  -2065,  -2222,  -2348,\n   -2441,  -2503,  -2537,  -2546,\n   -2536,  -2512,  -2481,  -2449,\n   -2419,  -2397,  -2386,  -2386,\n   -2399,  -2422,  -2454,  -2492,\n   -1722,  -1771,  -1810,  -1841,\n   -1870,  -1582,  -1009,   -207,\n     750,   1774,   2774,   3663,\n    4364,   4818,   4987,   4859,\n    4448,   3792,   2947,   1988,\n     995,     53,   -763,  -1387,\n   -1771,  -1891,  -1742,  -1345,\n    -741,     11,    843,   1678,\n    2444,   3073,   3513,   3726,\n    3697,   3431,   2953,   2305,\n    1545,    737,    -51,   -756,\n   -1320,  -1702,  -1875,  -1832,\n   -1585,  -1161,   -603,     34,\n     694,   1315,   1844,   2235,\n    2456,   2491,   2337,   2012,\n    1545,    978,    358,   -262,\n    -831,  -1306,  -1650,  -1841,\n   -1870,  -1742,  -1475,  -1098,\n    -650,   -174,    286,    690,\n    1001,   1195,   1257,   1183,\n     983,    676,    289,   -143,\n    -585,  -1001,  -1359,  -1633,\n   -1807,  -1873,  -1831,  -1694,\n   -1480,  -1213,   -921,   -633,\n    -376,   -172,    -39,     14,\n     -14,   -121,   -293,   -515,\n    -767,  -1027,  -1275,  -1494,\n   -1669,  -1791,  -1857,  -1868,\n   -1831,  -1757,  -1657,  -1546,\n   -1437,  -1343,  -1272,  -1230,\n   -1219,  -1239,  -1285,  -1350,\n   -1428,  -1510,  -1590,  -1661,\n   -1722,  -1771,  -1810,  -1841,\n   -1113,  -1158,  -1190,  -1213,\n   -1232,   -785,     31,   1052,\n    2076,   2904,   3378,   3410,\n    2997,   2222,   1234,    223,\n    -624,  -1150,  -1265,   -957,\n    -297,    580,   1500,   2283,\n    2778,   2894,   2611,   1987,\n    1144,    242,   -548,  -1084,\n   -1270,  -1083,   -569,    164,\n     969,   1686,   2178,   2353,\n    2180,   1696,    996,    215,\n    -502,  -1022,  -1255,  -1167,\n    -786,   -195,    486,   1121,\n    1587,   1796,   1712,   1353,\n     792,    137,   -490,   -973,\n   -1228,  -1217,   -953,   -497,\n      56,    594,   1013,   1232,\n    1213,    963,    532,      6,\n    -518,   -944,  -1197,  -1240,\n   -1076,   -745,   -321,    110,\n     461,    667,    690,    529,\n     219,   -180,   -591,   -941,\n   -1170,  -1243,  -1158,   -941,\n    -643,   -328,    -60,    110,\n     151,     59,   -145,   -420,\n    -713,   -973,  -1155,  -1235,\n   -1207,  -1088,   -910,   -715,\n    -544,   -431,   -395,   -441,\n    -555,   -714,   -887,  -1043,\n   -1159,  -1222,  -1229,  -1191,\n   -1124,  -1050,   -987,   -949,\n    -942,   -964,  -1007,  -1061,\n   -1113,  -1158,  -1190,  -1213,\n    -794,   -833,   -862,   -881,\n    -895,   -315,    651,   1669,\n    2393,   2582,   2175,   1314,\n     290,   -557,   -951,   -773,\n     -96,    840,   1712,   2227,\n    2213,   1680,    811,   -103,\n    -760,   -949,   -622,     99,\n     961,   1668,   1983,   1803,\n    1194,    362,   -414,   -881,\n    -895,   -465,    253,   1007,\n    1540,   1676,   1372,    735,\n     -19,   -642,   -933,   -807,\n    -321,    350,    974,   1339,\n    1325,    942,    321,   -328,\n    -795,   -932,   -707,   -210,\n     382,    865,   1077,    950,\n     531,    -36,   -563,   -881,\n    -895,   -614,   -146,    344,\n     687,    770,    569,    157,\n    -329,   -727,   -915,   -842,\n    -547,   -139,    236,    451,\n     437,    203,   -168,   -554,\n    -829,   -914,   -792,   -519,\n    -197,     63,    171,     96,\n    -132,   -435,   -713,   -881,\n    -895,   -764,   -544,   -319,\n    -166,   -136,   -233,   -422,\n    -638,   -813,   -898,   -877,\n    -772,   -629,   -503,   -437,\n    -451,   -535,   -658,   -779,\n    -864,   -896,   -878,   -829,\n    -775,   -740,   -735,   -757,\n    -794,   -833,   -862,   -881,\n    -781,   -770,   -766,   -773,\n    -785,   -142,    870,   1816,\n    2294,   2106,   1336,    312,\n    -537,   -862,   -541,    276,\n    1231,   1917,   2046,   1566,\n     687,   -223,   -784,   -774,\n    -212,    651,   1443,   1826,\n    1644,    978,    112,   -593,\n    -849,   -562,    131,    926,\n    1483,   1568,   1151,    411,\n    -340,   -791,   -766,   -291,\n     420,   1060,   1356,   1188,\n     631,    -77,   -641,   -835,\n    -590,    -26,    609,   1042,\n    1092,    743,    147,   -446,\n    -794,   -762,   -380,    177,\n     668,    884,    737,    295,\n    -254,   -682,   -821,   -626,\n    -194,    281,    595,    618,\n     345,   -105,   -543,   -793,\n    -763,   -480,    -77,    268,\n     410,    292,    -30,   -419,\n    -716,   -808,   -669,   -374,\n     -58,    144,    147,    -43,\n    -345,   -631,   -789,   -768,\n    -590,   -344,   -141,    -65,\n    -146,   -343,   -573,   -744,\n    -795,   -721,   -566,   -407,\n    -312,   -321,   -423,   -572,\n    -708,   -783,   -778,   -711,\n    -623,   -557,   -541,   -577,\n    -645,   -716,   -765,   -784,\n    -781,   -770,   -766,   -773,\n    -605,   -636,   -663,   -679,\n    -690,      3,   1027,   1845,\n    2034,   1501,    527,   -386,\n    -776,   -455,    393,   1318,\n    1839,   1690,    952,     10,\n    -654,   -710,   -145,    734,\n    1464,   1668,   1245,    419,\n    -385,   -759,   -525,    179,\n     977,   1453,   1363,    760,\n     -43,   -635,   -721,   -275,\n     459,   1092,   1297,    972,\n     291,   -396,   -741,   -581,\n     -16,    651,   1070,   1026,\n     549,   -113,   -621,   -725,\n    -388,    202,    730,    922,\n     684,    144,   -420,   -723,\n    -624,   -191,    340,    690,\n     679,    319,   -200,   -615,\n    -723,   -483,    -36,    379,\n     545,    381,    -22,   -457,\n    -706,   -655,   -347,     46,\n     315,    324,     72,   -306,\n    -618,   -715,   -563,   -255,\n      39,    166,     65,   -208,\n    -510,   -693,   -676,   -485,\n    -232,    -53,    -39,   -192,\n    -430,   -631,   -704,   -627,\n    -455,   -287,   -212,   -265,\n    -412,   -578,   -683,   -687,\n    -604,   -491,   -413,   -408,\n    -473,   -572,   -656,   -691,\n    -677,   -635,   -599,   -588,\n    -605,   -636,   -663,   -679,\n    -362,   -359,   -376,   -390,\n    -396,    561,   1286,    887,\n    -137,   -529,    173,   1084,\n    1078,    169,   -522,   -160,\n     786,   1141,    473,   -390,\n    -396,    439,   1072,    723,\n    -169,   -512,     97,    888,\n     881,     94,   -504,   -193,\n     622,    927,    352,   -390,\n    -396,    318,    858,    559,\n    -202,   -494,     22,    691,\n     685,     19,   -486,   -225,\n     458,    712,    230,   -390,\n    -396,    197,    643,    395,\n    -235,   -476,    -53,    494,\n     488,    -56,   -469,   -258,\n     294,    498,    109,   -390,\n    -396,     75,    429,    231,\n    -267,   -459,   -128,    298,\n     292,   -131,   -451,   -291,\n     130,    284,    -12,   -390,\n    -396,    -46,    215,     67,\n    -300,   -441,   -203,    101,\n      95,   -207,   -433,   -323,\n     -34,     70,   -134,   -390,\n    -396,   -167,      1,    -96,\n    -332,   -423,   -279,    -95,\n    -101,   -282,   -416,   -356,\n    -198,   -144,   -255,   -390,\n    -396,   -289,   -213,   -260,\n    -365,   -406,   -354,   -292,\n    -298,   -357,   -398,   -389,\n    -362,   -359,   -376,   -390,\n   -5054,  -5064,  -5079,  -5103,\n   -5185,  -5080,  -4798,  -4355,\n   -3766,  -3051,  -2229,  -1324,\n    -356,    651,   1675,   2694,\n    3689,   4639,   5528,   6341,\n    7065,   7689,   8206,   8611,\n    8901,   9076,   9138,   9091,\n    8942,   8700,   8372,   7971,\n    7507,   6992,   6440,   5861,\n    5269,   4673,   4086,   3516,\n    2971,   2460,   1988,   1559,\n    1177,    844,    559,    323,\n     133,    -13,   -119,   -189,\n    -227,   -240,   -230,   -205,\n    -169,   -127,    -82,    -40,\n      -3,     26,     44,     52,\n      46,     29,     -1,    -42,\n     -93,   -153,   -219,   -289,\n    -361,   -433,   -503,   -570,\n    -631,   -684,   -731,   -768,\n    -797,   -818,   -832,   -838,\n    -839,   -836,   -832,   -827,\n    -825,   -827,   -835,   -853,\n    -881,   -921,   -975,  -1044,\n   -1128,  -1229,  -1345,  -1478,\n   -1625,  -1786,  -1960,  -2144,\n   -2337,  -2537,  -2741,  -2947,\n   -3152,  -3354,  -3550,  -3739,\n   -3918,  -4086,  -4241,  -4383,\n   -4509,  -4621,  -4717,  -4798,\n   -4865,  -4919,  -4960,  -4991,\n   -5013,  -5028,  -5039,  -5046,\n   -5054,  -5064,  -5079,  -5103,\n   -1700,  -1736,  -1781,  -1830,\n   -1860,  -1471,   -740,    212,\n    1236,   2183,   2924,   3370,\n    3485,   3286,   2837,   2242,\n    1617,   1078,    716,    588,\n     705,   1037,   1514,   2044,\n    2525,   2868,   3005,   2904,\n    2572,   2051,   1412,    744,\n     136,   -334,   -611,   -674,\n    -532,   -225,    186,    628,\n    1029,   1330,   1490,   1498,\n    1364,   1124,    825,    524,\n     270,    104,     48,    102,\n     249,    456,    682,    883,\n    1021,   1072,   1022,    879,\n     662,    400,    129,   -117,\n    -311,   -435,   -482,   -458,\n    -381,   -272,   -156,    -57,\n       7,     28,      3,    -60,\n    -150,   -250,   -346,   -423,\n    -473,   -494,   -489,   -465,\n    -433,   -403,   -385,   -386,\n    -410,   -454,   -514,   -585,\n    -659,   -728,   -789,   -839,\n    -878,   -908,   -934,   -958,\n    -984,  -1014,  -1049,  -1086,\n   -1123,  -1156,  -1183,  -1203,\n   -1214,  -1220,  -1222,  -1226,\n   -1236,  -1254,  -1284,  -1325,\n   -1375,  -1430,  -1486,  -1538,\n   -1582,  -1615,  -1636,  -1647,\n   -1652,  -1655,  -1661,  -1676,\n   -1700,  -1736,  -1781,  -1830,\n   -1133,  -1152,  -1199,  -1256,\n   -1276,   -703,    256,   1280,\n    2054,   2371,   2199,   1675,\n    1052,    599,    502,    801,\n    1384,   2026,   2481,   2564,\n    2221,   1543,    729,     17,\n    -400,   -435,   -129,    368,\n     859,   1168,   1203,    979,\n     607,    247,     45,     85,\n     358,    771,   1182,   1453,\n    1498,   1306,    946,    534,\n     191,      3,     -3,    133,\n     328,    488,    543,    469,\n     295,     86,    -85,   -158,\n    -114,     27,    214,    382,\n     480,    486,    407,    278,\n     144,     43,     -8,    -11,\n      11,     30,     23,    -20,\n     -90,   -171,   -241,   -285,\n    -300,   -292,   -274,   -260,\n    -259,   -268,   -282,   -292,\n    -291,   -282,   -273,   -276,\n    -301,   -350,   -417,   -487,\n    -543,   -574,   -577,   -560,\n    -541,   -538,   -563,   -618,\n    -693,   -766,   -817,   -832,\n    -808,   -759,   -705,   -672,\n    -677,   -724,   -804,   -893,\n    -968,  -1009,  -1009,   -977,\n    -933,   -902,   -904,   -945,\n   -1020,  -1108,  -1187,  -1236,\n   -1246,  -1222,  -1182,  -1146,\n   -1133,  -1152,  -1199,  -1256,\n   -1365,  -1391,  -1419,  -1445,\n   -1468,  -1004,   -169,    855,\n    1862,   2670,   3154,   3270,\n    3054,   2602,   2041,   1494,\n    1050,    748,    582,    509,\n     473,    430,    361,    283,\n     237,    272,    429,    718,\n    1109,   1536,   1910,   2139,\n    2155,   1933,   1496,    920,\n     311,   -217,   -565,   -677,\n    -545,   -215,    230,    690,\n    1069,   1300,   1355,   1247,\n    1023,    747,    484,    279,\n     155,    105,    103,    115,\n     108,     70,      3,    -70,\n    -119,   -115,    -41,     96,\n     272,    445,    567,    600,\n     521,    337,     75,   -215,\n    -477,   -662,   -738,   -696,\n    -556,   -357,   -148,     22,\n     118,    124,     46,    -92,\n    -255,   -409,   -526,   -594,\n    -616,   -605,   -583,   -570,\n    -577,   -608,   -653,   -697,\n    -726,   -726,   -696,   -644,\n    -587,   -546,   -540,   -581,\n    -669,   -792,   -931,  -1059,\n   -1154,  -1200,  -1192,  -1139,\n   -1058,   -973,   -906,   -874,\n    -886,   -938,  -1019,  -1112,\n   -1201,  -1272,  -1318,  -1340,\n   -1345,  -1342,  -1341,  -1348,\n   -1365,  -1391,  -1419,  -1445,\n   -5683,  -5796,  -5904,  -6002,\n   -6095,  -5744,  -5033,  -4089,\n   -3065,  -2115,  -1370,   -921,\n    -805,  -1006,  -1456,  -2051,\n   -2665,  -3177,  -3480,  -3504,\n   -3222,  -2652,  -1854,   -917,\n      54,    954,   1695,   2216,\n    2492,   2537,   2397,   2143,\n    1858,   1628,   1522,   1589,\n    1847,   2284,   2863,   3521,\n    4191,   4800,   5289,   5618,\n    5767,   5745,   5583,   5328,\n    5036,   4766,   4566,   4471,\n    4496,   4637,   4868,   5153,\n    5445,   5697,   5868,   5929,\n    5866,   5684,   5400,   5045,\n    4659,   4280,   3944,   3676,\n    3490,   3385,   3348,   3356,\n    3378,   3382,   3341,   3233,\n    3046,   2782,   2450,   2070,\n    1668,   1271,    903,    584,\n     325,    129,    -12,   -112,\n    -190,   -268,   -366,   -500,\n    -680,   -908,  -1179,  -1480,\n   -1796,  -2108,  -2400,  -2656,\n   -2868,  -3032,  -3153,  -3238,\n   -3300,  -3354,  -3415,  -3495,\n   -3601,  -3736,  -3900,  -4084,\n   -4279,  -4474,  -4656,  -4816,\n   -4946,  -5046,  -5114,  -5159,\n   -5186,  -5206,  -5229,  -5263,\n   -5313,  -5383,  -5470,  -5573,\n   -5683,  -5796,  -5904,  -6002,\n   -1269,  -1284,  -1283,  -1281,\n   -1300,   -750,    180,   1204,\n    2042,   2511,   2572,   2322,\n    1933,   1580,   1363,   1285,\n    1267,   1195,    989,    643,\n     235,   -107,   -258,   -150,\n     194,    667,   1123,   1426,\n    1510,   1391,   1161,    938,\n     818,    833,    938,   1037,\n    1024,    835,    480,     45,\n    -339,   -548,   -505,   -219,\n     226,    699,   1066,   1242,\n    1208,   1015,    751,    505,\n     335,    246,    201,    146,\n      42,   -114,   -286,   -409,\n    -425,   -304,    -66,    227,\n     489,    643,    648,    513,\n     290,     53,   -129,   -223,\n    -232,   -198,   -174,   -200,\n    -286,   -409,   -520,   -568,\n    -524,   -389,   -203,    -24,\n      91,    107,     21,   -136,\n    -315,   -470,   -569,   -611,\n    -615,   -612,   -627,   -669,\n    -724,   -767,   -770,   -719,\n    -621,   -503,   -406,   -364,\n    -396,   -497,   -641,   -790,\n    -908,   -976,   -991,   -973,\n    -945,   -932,   -942,   -971,\n   -1003,  -1021,  -1012,   -977,\n    -930,   -892,   -883,   -914,\n    -981,  -1069,  -1157,  -1227,\n   -1269,  -1284,  -1283,  -1281,\n    -600,   -621,   -601,   -582,\n    -591,    433,   1242,   1029,\n     394,    386,   1048,   1414,\n     875,    -15,   -310,    132,\n     603,    575,    312,    352,\n     719,    956,    791,    444,\n     241,    203,    171,    138,\n     230,    418,    505,    430,\n     394,    532,    641,    440,\n      29,   -150,    106,    449,\n     426,    105,     -5,    327,\n     694,    583,     78,   -227,\n     -12,    362,    360,     -1,\n    -200,     63,    463,    496,\n     142,   -145,    -58,    191,\n     215,    -21,   -193,    -84,\n     149,    221,     94,    -34,\n     -31,     24,      4,    -76,\n    -116,    -97,    -83,    -92,\n     -69,     -7,      6,    -87,\n    -197,   -192,    -95,    -71,\n    -191,   -315,   -267,    -94,\n     -23,   -156,   -327,   -322,\n    -169,   -102,   -237,   -413,\n    -410,   -244,   -142,   -233,\n    -391,   -413,   -295,   -220,\n    -300,   -439,   -472,   -386,\n    -315,   -351,   -435,   -460,\n    -415,   -383,   -413,   -468,\n    -492,   -484,   -481,   -494,\n    -503,   -500,   -508,   -533,\n    -550,   -541,   -531,   -554,\n    -600,   -621,   -601,   -582,\n    -420,   -374,   -394,   -443,\n    -450,    574,    805,    203,\n     361,   1154,    994,     33,\n    -148,    412,    358,   -184,\n      25,    778,    839,    319,\n     274,    587,    382,   -129,\n    -100,    309,    376,    210,\n     337,    574,    465,    183,\n     111,    148,     87,     59,\n     174,    277,    305,    340,\n     322,    174,     69,    114,\n     108,    -12,     33,    266,\n     311,    118,     90,    256,\n     186,   -105,   -112,    159,\n     175,    -54,     -2,    282,\n     233,    -91,   -107,    141,\n      89,   -191,   -131,    176,\n     156,   -115,    -89,    147,\n      69,   -216,   -188,     56,\n      24,   -187,   -131,     84,\n      29,   -191,   -176,    -18,\n     -73,   -239,   -193,    -38,\n     -67,   -195,   -171,    -78,\n    -130,   -241,   -225,   -154,\n    -177,   -231,   -206,   -165,\n    -191,   -233,   -235,   -235,\n    -257,   -264,   -258,   -266,\n    -270,   -253,   -259,   -300,\n    -311,   -286,   -301,   -351,\n    -347,   -299,   -310,   -368,\n    -364,   -317,   -340,   -408,\n    -403,   -352,   -371,   -430,\n    -420,   -374,   -394,   -443,\n   -6257,  -6312,  -6374,  -6443,\n   -6550,  -5920,  -5032,  -4051,\n   -3036,  -2012,   -992,     16,\n    1008,   1982,   2934,   3864,\n    4770,   5650,   6504,   7328,\n    8117,   8863,   9534,  10022,\n   10293,  10480,  10618,  10704,\n   10711,  10559,  10240,   9794,\n    9192,   8502,   7783,   7057,\n    6334,   5619,   4917,   4232,\n    3571,   2952,   2445,   2095,\n    1802,   1532,   1276,   1032,\n     797,    571,    355,    150,\n     -39,   -198,   -295,   -332,\n    -343,   -337,   -303,   -210,\n     -60,     59,     79,     64,\n      37,      5,    -31,    -70,\n    -112,   -156,   -202,   -251,\n    -301,   -354,   -410,   -467,\n    -527,   -590,   -660,   -744,\n    -816,   -820,   -800,   -776,\n    -757,   -750,   -770,   -840,\n    -946,  -1066,  -1192,  -1321,\n   -1452,  -1584,  -1716,  -1850,\n   -1985,  -2123,  -2268,  -2433,\n   -2650,  -2888,  -3128,  -3365,\n   -3590,  -3804,  -4013,  -4217,\n   -4418,  -4615,  -4809,  -4997,\n   -5179,  -5350,  -5499,  -5619,\n   -5723,  -5818,  -5899,  -5946,\n   -5978,  -6005,  -6033,  -6063,\n   -6095,  -6130,  -6168,  -6210,\n   -6257,  -6312,  -6374,  -6443,\n   -2471,  -2554,  -2630,  -2678,\n   -2719,  -1835,   -832,    192,\n    1207,   2198,   3140,   3896,\n    3934,   3714,   3455,   3181,\n    2901,   2621,   2381,   2458,\n    2616,   2830,   3038,   3238,\n    3425,   3573,   3398,   3102,\n    2517,   1838,   1161,    501,\n    -120,   -522,   -707,   -724,\n    -349,    122,    601,   1066,\n    1438,   1567,   1662,   1714,\n    1528,   1291,   1053,    849,\n     871,    915,    939,    899,\n    1024,   1170,   1296,   1231,\n    1113,    988,    856,    694,\n     361,     20,   -200,   -318,\n    -421,   -508,   -550,   -511,\n    -319,   -160,   -134,   -121,\n    -112,   -107,   -108,   -144,\n    -281,   -300,   -305,   -311,\n    -320,   -339,   -388,   -426,\n    -477,   -546,   -617,   -688,\n    -758,   -827,   -894,   -929,\n    -991,  -1054,  -1117,  -1178,\n   -1237,  -1286,  -1345,  -1430,\n   -1461,  -1487,  -1512,  -1536,\n   -1559,  -1570,  -1514,  -1494,\n   -1516,  -1543,  -1573,  -1606,\n   -1649,  -1759,  -1883,  -1967,\n   -2022,  -2074,  -2123,  -2168,\n   -2177,  -2163,  -2153,  -2180,\n   -2224,  -2271,  -2320,  -2383,\n   -2471,  -2554,  -2630,  -2678,\n   -1639,  -1713,  -1777,  -1781,\n   -1808,   -857,    167,   1187,\n    2158,   2601,   2410,   2173,\n    1925,   1695,   1905,   2485,\n    2766,   2986,   3156,   2879,\n    2190,   1407,    636,    -76,\n    -364,   -417,   -146,    389,\n     933,   1123,   1230,   1007,\n     769,    600,    732,    898,\n    1356,   1806,   1984,   1844,\n    1666,   1254,    768,    452,\n     290,    150,    111,    266,\n     235,    202,    250,    277,\n      92,    111,    169,    231,\n     304,    563,    636,    677,\n     681,    599,    378,    274,\n     182,     94,      9,    -48,\n    -127,   -206,   -280,   -339,\n    -325,   -304,   -287,   -271,\n    -259,   -296,   -307,   -299,\n    -291,   -281,   -198,   -166,\n    -215,   -271,   -333,   -494,\n    -660,   -721,   -774,   -819,\n    -759,   -690,   -710,   -721,\n    -737,   -851,   -969,  -1001,\n   -1012,  -1012,   -924,   -835,\n    -794,   -812,   -861,   -991,\n   -1123,  -1238,  -1281,  -1302,\n   -1259,  -1215,  -1179,  -1208,\n   -1269,  -1364,  -1455,  -1541,\n   -1575,  -1559,  -1517,  -1477,\n   -1442,  -1430,  -1490,  -1563,\n   -1639,  -1713,  -1777,  -1781,\n   -1772,  -1783,  -1769,  -1762,\n   -1790,   -848,    173,   1197,\n    2198,   3138,   3592,   3912,\n    4091,   3492,   2638,   1829,\n    1442,   1099,    775,    470,\n     196,    -24,     64,    256,\n     463,    675,    904,   1442,\n    2037,   2572,   2766,   2623,\n    2378,   1809,   1218,    634,\n      70,   -453,   -739,   -538,\n    -117,    330,    773,   1193,\n    1377,   1469,   1518,   1354,\n    1077,    698,    542,    412,\n     288,    171,     61,    -37,\n    -149,   -188,   -152,   -106,\n     -50,    151,    415,    661,\n     759,    791,    733,    466,\n     176,   -114,   -395,   -660,\n    -843,   -756,   -636,   -459,\n    -267,    -84,      2,     13,\n       7,    -95,   -243,   -392,\n    -464,   -523,   -580,   -635,\n    -687,   -734,   -795,   -849,\n    -892,   -903,   -906,   -854,\n    -747,   -646,   -607,   -611,\n    -628,   -738,   -884,  -1032,\n   -1176,  -1314,  -1422,  -1390,\n   -1342,  -1290,  -1231,  -1165,\n   -1130,  -1146,  -1169,  -1228,\n   -1317,  -1404,  -1441,  -1472,\n   -1507,  -1542,  -1575,  -1607,\n   -1646,  -1681,  -1715,  -1747,\n   -1772,  -1783,  -1769,  -1762,\n   -5427,  -5514,  -5568,  -5621,\n   -5708,  -4878,  -3911,  -2896,\n   -1872,   -863,     97,    825,\n     582,    103,   -397,   -889,\n   -1362,  -1802,  -2147,  -1946,\n   -1281,   -507,    270,   1031,\n    1767,   2448,   2769,   2892,\n    2642,   2329,   2011,   1702,\n    1417,   1290,   1398,   1591,\n    2085,   2608,   3123,   3619,\n    4047,   4232,   4372,   4415,\n    4212,   3988,   3765,   3566,\n    3552,   3577,   3617,   3773,\n    4091,   4413,   4716,   4897,\n    4997,   5075,   5119,   4994,\n    4736,   4435,   4138,   3912,\n    3679,   3443,   3218,   3146,\n    3126,   3093,   2971,   2836,\n    2699,   2556,   2395,   2088,\n    1758,   1490,   1243,   1000,\n     761,    528,    321,    242,\n     150,     30,    -92,   -212,\n    -334,   -459,   -610,   -854,\n   -1070,  -1282,  -1493,  -1700,\n   -1904,  -2102,  -2263,  -2375,\n   -2484,  -2590,  -2695,  -2800,\n   -2904,  -3011,  -3144,  -3318,\n   -3493,  -3667,  -3838,  -4007,\n   -4171,  -4334,  -4452,  -4538,\n   -4615,  -4682,  -4737,  -4781,\n   -4817,  -4842,  -4914,  -4998,\n   -5082,  -5167,  -5251,  -5336,\n   -5427,  -5514,  -5568,  -5621,\n   -1380,  -1399,  -1418,  -1437,\n   -1459,   -493,    531,   1545,\n    2500,   2914,   3058,   2695,\n    2278,   1671,   1328,   1006,\n     776,    988,    866,    637,\n     409,    217,    307,    509,\n     707,    904,   1092,   1122,\n     927,   1013,   1122,    989,\n    1117,   1272,   1406,   1329,\n    1098,    576,     58,   -400,\n    -599,   -426,     -3,    430,\n     854,   1243,   1350,   1376,\n    1191,    815,    500,    374,\n     261,    172,    210,     52,\n    -130,   -250,   -221,   -158,\n      -3,    145,    289,    424,\n     427,    342,    261,     99,\n     -58,    -45,    -19,      4,\n     -26,   -132,   -363,   -513,\n    -589,   -645,   -543,   -365,\n    -185,    -12,    137,    140,\n      38,   -151,   -343,   -467,\n    -520,   -567,   -608,   -615,\n    -714,   -746,   -752,   -754,\n    -737,   -659,   -584,   -513,\n    -450,   -478,   -597,   -712,\n    -819,   -916,   -931,   -940,\n    -949,   -969,  -1019,  -1063,\n   -1099,  -1132,  -1160,  -1120,\n   -1060,  -1002,   -950,   -923,\n    -993,  -1072,  -1161,  -1247,\n   -1294,  -1323,  -1350,  -1374,\n   -1380,  -1399,  -1418,  -1437,\n    -649,   -707,   -760,   -745,\n    -756,    268,   1253,   1090,\n     876,   1158,   1393,   1354,\n     590,   -276,   -571,    112,\n     429,    649,    597,    852,\n    1314,   1071,    797,    522,\n     281,     58,    225,    433,\n     663,    846,    657,    556,\n     461,    514,    322,   -205,\n    -325,    125,    588,    659,\n     446,    434,    645,    825,\n     426,    -13,   -355,    -55,\n     318,    184,    -12,     43,\n     359,    502,    363,     17,\n     -78,     60,    135,    183,\n      39,     95,    204,    210,\n     139,     49,    -20,    -94,\n    -150,   -114,     13,     49,\n     -63,    -44,    -62,     48,\n      -5,   -221,   -313,   -217,\n     -38,    -22,   -156,   -267,\n    -111,      0,   -118,   -298,\n    -460,   -365,   -238,   -249,\n    -365,   -399,   -280,   -166,\n    -200,   -341,   -377,   -363,\n    -341,   -342,   -429,   -427,\n    -418,   -412,   -423,   -464,\n    -488,   -514,   -540,   -559,\n    -494,   -494,   -525,   -542,\n    -542,   -491,   -509,   -590,\n    -664,   -663,   -617,   -618,\n    -679,   -736,   -696,   -655,\n    -649,   -707,   -760,   -745,\n    -503,   -465,   -469,   -506,\n    -514,    510,    730,    529,\n    1093,   1415,    845,    -71,\n    -233,      5,     99,    -90,\n     355,   1062,   1099,    600,\n     446,    249,    -99,   -126,\n     177,    406,    538,    715,\n     636,    439,    198,      8,\n    -145,     -8,    285,    439,\n     321,    406,    549,    398,\n     -33,   -162,    123,    223,\n      56,    181,    546,    423,\n      49,     86,    239,    -84,\n    -263,     66,    382,    206,\n      16,    181,    317,      1,\n    -277,    -50,    182,     16,\n     -23,    234,    205,    -60,\n    -122,     15,    -38,   -192,\n    -148,     65,     92,    -57,\n     -94,      3,    -50,   -169,\n    -166,   -121,   -102,    -87,\n     -63,    -88,   -127,   -163,\n    -196,   -225,   -208,   -192,\n    -193,   -181,   -116,   -142,\n    -266,   -294,   -218,   -222,\n    -315,   -306,   -201,   -197,\n    -310,   -327,   -258,   -291,\n    -396,   -349,   -263,   -330,\n    -406,   -336,   -278,   -367,\n    -454,   -402,   -343,   -408,\n    -468,   -408,   -361,   -430,\n    -468,   -430,   -437,   -496,\n    -503,   -465,   -469,   -506,\n  -30208, -31232, -32256, -31264,\n  -30271, -29279, -28286, -27294,\n  -26301, -25309, -24316, -23324,\n  -22331, -21339, -20346, -19354,\n  -18361, -17369, -16376, -15384,\n  -14391, -13399, -12406, -11414,\n  -10421,  -9429,  -8436,  -7444,\n   -6451,  -5459,  -4466,  -3474,\n   -2481,  -1489,   -496,    496,\n    1489,   2481,   3474,   4466,\n    5459,   6451,   7444,   8436,\n    9429,  10421,  11414,  12406,\n   13399,  14391,  15384,  16376,\n   17369,  18361,  19354,  20346,\n   21339,  22331,  23324,  24316,\n   25309,  26301,  27294,  28286,\n   29279,  30271,  31264,  32256,\n   31232,  30208,  29184,  28160,\n   27136,  26112,  25088,  24064,\n   23040,  22016,  20992,  19968,\n   18944,  17920,  16896,  15872,\n   14848,  13824,  12800,  11776,\n   10752,   9728,   8704,   7680,\n    6656,   5632,   4608,   3584,\n    2560,   1536,    512,   -512,\n   -1536,  -2560,  -3584,  -4608,\n   -5632,  -6656,  -7680,  -8704,\n   -9728, -10752, -11776, -12800,\n  -13824, -14848, -15872, -16896,\n  -17920, -18944, -19968, -20992,\n  -22016, -23040, -24064, -25088,\n  -26112, -27136, -28160, -29184,\n  -30208, -31232, -32256, -31264,\n  -25689, -26412, -27136, -26112,\n  -25088, -24064, -23040, -22016,\n  -20992, -19968, -18944, -17920,\n  -16896, -15872, -14848, -13824,\n  -12800, -11776, -10752,  -9728,\n   -8704,  -7680,  -6656,  -5632,\n   -4608,  -3584,  -2560,  -1536,\n    -512,    512,   1536,   2560,\n    3584,   4608,   5632,   6656,\n    7680,   8704,   9728,  10752,\n   11776,  12800,  13824,  14848,\n   15872,  16896,  17920,  18944,\n   19968,  20992,  22016,  23040,\n   24064,  25088,  26112,  27136,\n   26412,  25689,  24965,  24241,\n   23518,  22794,  22071,  21347,\n   20623,  19900,  19176,  18452,\n   17729,  17005,  16282,  15558,\n   14834,  14111,  13387,  12663,\n   11940,  11216,  10493,   9769,\n    9045,   8322,   7598,   6874,\n    6151,   5427,   4704,   3980,\n    3256,   2533,   1809,   1085,\n     362,   -362,  -1085,  -1809,\n   -2533,  -3256,  -3980,  -4704,\n   -5427,  -6151,  -6874,  -7598,\n   -8322,  -9045,  -9769, -10493,\n  -11216, -11940, -12663, -13387,\n  -14111, -14834, -15558, -16282,\n  -17005, -17729, -18452, -19176,\n  -19900, -20623, -21347, -22071,\n  -22794, -23518, -24241, -24965,\n  -25689, -26412, -27136, -26112,\n  -21455, -21992, -22528, -21504,\n  -20480, -19456, -18432, -17408,\n  -16384, -15360, -14336, -13312,\n  -12288, -11264, -10240,  -9216,\n   -8192,  -7168,  -6144,  -5120,\n   -4096,  -3072,  -2048,  -1024,\n       0,   1024,   2048,   3072,\n    4096,   5120,   6144,   7168,\n    8192,   9216,  10240,  11264,\n   12288,  13312,  14336,  15360,\n   16384,  17408,  18432,  19456,\n   20480,  21504,  22528,  21992,\n   21455,  20919,  20382,  19846,\n   19310,  18773,  18237,  17701,\n   17164,  16628,  16091,  15555,\n   15019,  14482,  13946,  13410,\n   12873,  12337,  11800,  11264,\n   10728,  10191,   9655,   9118,\n    8582,   8046,   7509,   6973,\n    6437,   5900,   5364,   4827,\n    4291,   3755,   3218,   2682,\n    2146,   1609,   1073,    536,\n       0,   -536,  -1073,  -1609,\n   -2146,  -2682,  -3218,  -3755,\n   -4291,  -4827,  -5364,  -5900,\n   -6437,  -6973,  -7509,  -8046,\n   -8582,  -9118,  -9655, -10191,\n  -10728, -11264, -11800, -12337,\n  -12873, -13410, -13946, -14482,\n  -15019, -15555, -16091, -16628,\n  -17164, -17701, -18237, -18773,\n  -19310, -19846, -20382, -20919,\n  -21455, -21992, -22528, -21504,\n  -16185, -16540, -16896, -15872,\n  -14848, -13824, -12800, -11776,\n  -10752,  -9728,  -8704,  -7680,\n   -6656,  -5632,  -4608,  -3584,\n   -2560,  -1536,   -512,    512,\n    1536,   2560,   3584,   4608,\n    5632,   6656,   7680,   8704,\n    9728,  10752,  11776,  12800,\n   13824,  14848,  15872,  16896,\n   16540,  16185,  15829,  15473,\n   15117,  14762,  14406,  14050,\n   13695,  13339,  12983,  12628,\n   12272,  11916,  11560,  11205,\n   10849,  10493,  10138,   9782,\n    9426,   9070,   8715,   8359,\n    8003,   7648,   7292,   6936,\n    6581,   6225,   5869,   5513,\n    5158,   4802,   4446,   4091,\n    3735,   3379,   3023,   2668,\n    2312,   1956,   1601,   1245,\n     889,    534,    178,   -178,\n    -534,   -889,  -1245,  -1601,\n   -1956,  -2312,  -2668,  -3023,\n   -3379,  -3735,  -4091,  -4446,\n   -4802,  -5158,  -5513,  -5869,\n   -6225,  -6581,  -6936,  -7292,\n   -7648,  -8003,  -8359,  -8715,\n   -9070,  -9426,  -9782, -10138,\n  -10493, -10849, -11205, -11560,\n  -11916, -12272, -12628, -12983,\n  -13339, -13695, -14050, -14406,\n  -14762, -15117, -15473, -15829,\n  -16185, -16540, -16896, -15872,\n  -13277, -13550, -13824, -12800,\n  -11776, -10752,  -9728,  -8704,\n   -7680,  -6656,  -5632,  -4608,\n   -3584,  -2560,  -1536,   -512,\n     512,   1536,   2560,   3584,\n    4608,   5632,   6656,   7680,\n    8704,   9728,  10752,  11776,\n   12800,  13824,  13550,  13277,\n   13003,  12729,  12455,  12182,\n   11908,  11634,  11360,  11087,\n   10813,  10539,  10265,   9992,\n    9718,   9444,   9170,   8897,\n    8623,   8349,   8075,   7802,\n    7528,   7254,   6980,   6707,\n    6433,   6159,   5885,   5612,\n    5338,   5064,   4790,   4517,\n    4243,   3969,   3696,   3422,\n    3148,   2874,   2601,   2327,\n    2053,   1779,   1506,   1232,\n     958,    684,    411,    137,\n    -137,   -411,   -684,   -958,\n   -1232,  -1506,  -1779,  -2053,\n   -2327,  -2601,  -2874,  -3148,\n   -3422,  -3696,  -3969,  -4243,\n   -4517,  -4790,  -5064,  -5338,\n   -5612,  -5885,  -6159,  -6433,\n   -6707,  -6980,  -7254,  -7528,\n   -7802,  -8075,  -8349,  -8623,\n   -8897,  -9170,  -9444,  -9718,\n   -9992, -10265, -10539, -10813,\n  -11087, -11360, -11634, -11908,\n  -12182, -12455, -12729, -13003,\n  -13277, -13550, -13824, -12800,\n   -8390,  -8547,  -8704,  -7680,\n   -6656,  -5632,  -4608,  -3584,\n   -2560,  -1536,   -512,    512,\n    1536,   2560,   3584,   4608,\n    5632,   6656,   7680,   8704,\n    8547,   8390,   8234,   8077,\n    7920,   7763,   7606,   7449,\n    7293,   7136,   6979,   6822,\n    6665,   6508,   6352,   6195,\n    6038,   5881,   5724,   5567,\n    5411,   5254,   5097,   4940,\n    4783,   4626,   4470,   4313,\n    4156,   3999,   3842,   3685,\n    3529,   3372,   3215,   3058,\n    2901,   2745,   2588,   2431,\n    2274,   2117,   1960,   1804,\n    1647,   1490,   1333,   1176,\n    1019,    863,    706,    549,\n     392,    235,     78,    -78,\n    -235,   -392,   -549,   -706,\n    -863,  -1019,  -1176,  -1333,\n   -1490,  -1647,  -1804,  -1960,\n   -2117,  -2274,  -2431,  -2588,\n   -2745,  -2901,  -3058,  -3215,\n   -3372,  -3529,  -3685,  -3842,\n   -3999,  -4156,  -4313,  -4470,\n   -4626,  -4783,  -4940,  -5097,\n   -5254,  -5411,  -5567,  -5724,\n   -5881,  -6038,  -6195,  -6352,\n   -6508,  -6665,  -6822,  -6979,\n   -7136,  -7293,  -7449,  -7606,\n   -7763,  -7920,  -8077,  -8234,\n   -8390,  -8547,  -8704,  -7680,\n   -4453,  -4531,  -4608,  -3584,\n   -2560,  -1536,   -512,    512,\n    1536,   2560,   3584,   4608,\n    4531,   4453,   4376,   4298,\n    4221,   4143,   4066,   3988,\n    3911,   3834,   3756,   3679,\n    3601,   3524,   3446,   3369,\n    3291,   3214,   3137,   3059,\n    2982,   2904,   2827,   2749,\n    2672,   2594,   2517,   2440,\n    2362,   2285,   2207,   2130,\n    2052,   1975,   1897,   1820,\n    1743,   1665,   1588,   1510,\n    1433,   1355,   1278,   1200,\n    1123,   1046,    968,    891,\n     813,    736,    658,    581,\n     503,    426,    349,    271,\n     194,    116,     39,    -39,\n    -116,   -194,   -271,   -349,\n    -426,   -503,   -581,   -658,\n    -736,   -813,   -891,   -968,\n   -1046,  -1123,  -1200,  -1278,\n   -1355,  -1433,  -1510,  -1588,\n   -1665,  -1743,  -1820,  -1897,\n   -1975,  -2052,  -2130,  -2207,\n   -2285,  -2362,  -2440,  -2517,\n   -2594,  -2672,  -2749,  -2827,\n   -2904,  -2982,  -3059,  -3137,\n   -3214,  -3291,  -3369,  -3446,\n   -3524,  -3601,  -3679,  -3756,\n   -3834,  -3911,  -3988,  -4066,\n   -4143,  -4221,  -4298,  -4376,\n   -4453,  -4531,  -4608,  -3584,\n   -2477,  -2518,  -2560,  -1536,\n    -512,    512,   1536,   2560,\n    2518,   2477,   2435,   2393,\n    2352,   2310,   2269,   2227,\n    2185,   2144,   2102,   2060,\n    2019,   1977,   1936,   1894,\n    1852,   1811,   1769,   1727,\n    1686,   1644,   1603,   1561,\n    1519,   1478,   1436,   1394,\n    1353,   1311,   1270,   1228,\n    1186,   1145,   1103,   1061,\n    1020,    978,    937,    895,\n     853,    812,    770,    728,\n     687,    645,    604,    562,\n     520,    479,    437,    395,\n     354,    312,    271,    229,\n     187,    146,    104,     62,\n      21,    -21,    -62,   -104,\n    -146,   -187,   -229,   -271,\n    -312,   -354,   -395,   -437,\n    -479,   -520,   -562,   -604,\n    -645,   -687,   -728,   -770,\n    -812,   -853,   -895,   -937,\n    -978,  -1020,  -1061,  -1103,\n   -1145,  -1186,  -1228,  -1270,\n   -1311,  -1353,  -1394,  -1436,\n   -1478,  -1519,  -1561,  -1603,\n   -1644,  -1686,  -1727,  -1769,\n   -1811,  -1852,  -1894,  -1936,\n   -1977,  -2019,  -2060,  -2102,\n   -2144,  -2185,  -2227,  -2269,\n   -2310,  -2352,  -2393,  -2435,\n   -2477,  -2518,  -2560,  -1536,\n  -25205, -26158, -26912, -27331,\n  -27331, -26912, -26158, -25205,\n  -24192, -23221, -22326, -21487,\n  -20652, -19773, -18831, -17840,\n  -16836, -15849, -14893, -13957,\n  -13016, -12048, -11045, -10021,\n   -8998,  -7993,  -7013,  -6048,\n   -5082,  -4101,  -3104,  -2102,\n   -1113,   -150,    786,   1703,\n    2615,   3530,   4445,   5350,\n    6230,   7077,   7891,   8680,\n    9456,  10223,  10978,  11709,\n   12405,  13060,  13675,  14261,\n   14826,  15373,  15898,  16388,\n   16835,  17234,  17591,  17915,\n   18212,  18486,  18729,  18932,\n   19086,  19190,  19251,  19278,\n   19278,  19251,  19190,  19086,\n   18932,  18729,  18486,  18212,\n   17915,  17591,  17234,  16835,\n   16388,  15898,  15373,  14826,\n   14261,  13675,  13060,  12405,\n   11709,  10978,  10223,   9456,\n    8680,   7891,   7077,   6230,\n    5350,   4445,   3530,   2615,\n    1703,    786,   -150,  -1113,\n   -2102,  -3104,  -4101,  -5082,\n   -6048,  -7013,  -7993,  -8998,\n  -10021, -11045, -12048, -13016,\n  -13957, -14893, -15849, -16836,\n  -17840, -18831, -19773, -20652,\n  -21487, -22326, -23221, -24192,\n  -25205, -26158, -26912, -27331,\n  -22542, -23430, -23985, -24156,\n  -24156, -23985, -23430, -22542,\n  -21541, -20619, -19838, -19151,\n  -18470, -17715, -16848, -15889,\n  -14904, -13953, -13061, -12206,\n  -11341, -10424,  -9444,  -8420,\n   -7396,  -6411,  -5473,  -4564,\n   -3652,  -2712,  -1741,   -761,\n     193,   1100,   1955,   2777,\n    3589,   4406,   5224,   6024,\n    6781,   7481,   8128,   8736,\n    9324,   9898,  10454,  10977,\n   11450,  11868,  12239,  12574,\n   12886,  13178,  13446,  13681,\n   13876,  14032,  14156,  14258,\n   14345,  14418,  14476,  14516,\n   14539,  14550,  14553,  14554,\n   14554,  14553,  14550,  14539,\n   14516,  14476,  14418,  14345,\n   14258,  14156,  14032,  13876,\n   13681,  13446,  13178,  12886,\n   12574,  12239,  11868,  11450,\n   10977,  10454,   9898,   9324,\n    8736,   8128,   7481,   6781,\n    6024,   5224,   4406,   3589,\n    2777,   1955,   1100,    193,\n    -761,  -1741,  -2712,  -3652,\n   -4564,  -5473,  -6411,  -7396,\n   -8420,  -9444, -10424, -11341,\n  -12206, -13061, -13953, -14904,\n  -15889, -16848, -17715, -18470,\n  -19151, -19838, -20619, -21541,\n  -22542, -23430, -23985, -24156,\n  -18887, -19656, -19957, -19986,\n  -19986, -19957, -19656, -18887,\n  -17908, -17078, -16482, -16021,\n  -15568, -15012, -14277, -13380,\n  -12432, -11550, -10773, -10058,\n   -9327,  -8507,  -7567,  -6543,\n   -5521,  -4572,  -3714,  -2907,\n   -2094,  -1231,   -311,    626,\n    1516,   2319,   3033,   3693,\n    4337,   4989,   5643,   6267,\n    6827,   7305,   7714,   8075,\n    8412,   8735,   9037,   9303,\n    9522,   9693,   9827,   9936,\n   10031,  10115,  10185,  10239,\n   10276,  10300,  10315,  10325,\n   10332,  10338,  10341,  10342,\n   10343,  10343,  10343,  10343,\n   10343,  10343,  10343,  10343,\n   10342,  10341,  10338,  10332,\n   10325,  10315,  10300,  10276,\n   10239,  10185,  10115,  10031,\n    9936,   9827,   9693,   9522,\n    9303,   9037,   8735,   8412,\n    8075,   7714,   7305,   6827,\n    6267,   5643,   4989,   4337,\n    3693,   3033,   2319,   1516,\n     626,   -311,  -1231,  -2094,\n   -2907,  -3714,  -4572,  -5521,\n   -6543,  -7567,  -8507,  -9327,\n  -10058, -10773, -11550, -12432,\n  -13380, -14277, -15012, -15568,\n  -16021, -16482, -17078, -17908,\n  -18887, -19656, -19957, -19986,\n  -14425, -15003, -15092, -15092,\n  -15092, -15092, -15003, -14425,\n  -13489, -12816, -12470, -12262,\n  -12062, -11759, -11233, -10447,\n   -9568,  -8808,  -8219,  -7719,\n   -7198,  -6542,  -5679,  -4655,\n   -3634,  -2756,  -2035,  -1400,\n    -755,    -28,    800,   1657,\n    2431,   3059,   3558,   3983,\n    4388,   4803,   5221,   5602,\n    5907,   6131,   6294,   6421,\n    6532,   6634,   6723,   6792,\n    6839,   6867,   6885,   6897,\n    6906,   6912,   6917,   6920,\n    6921,   6922,   6922,   6922,\n    6922,   6922,   6922,   6922,\n    6922,   6922,   6922,   6922,\n    6922,   6922,   6922,   6922,\n    6922,   6922,   6922,   6922,\n    6922,   6922,   6922,   6921,\n    6920,   6917,   6912,   6906,\n    6897,   6885,   6867,   6839,\n    6792,   6723,   6634,   6532,\n    6421,   6294,   6131,   5907,\n    5602,   5221,   4803,   4388,\n    3983,   3558,   3059,   2431,\n    1657,    800,    -28,   -755,\n   -1400,  -2035,  -2756,  -3634,\n   -4655,  -5679,  -6542,  -7198,\n   -7719,  -8219,  -8808,  -9568,\n  -10447, -11233, -11759, -12062,\n  -12262, -12470, -12816, -13489,\n  -14425, -15003, -15092, -15092,\n   -9768, -10095, -10103, -10103,\n  -10103, -10103, -10095,  -9768,\n   -8913,  -8471,  -8354,  -8312,\n   -8273,  -8183,  -7913,  -7310,\n   -6555,  -5992,  -5652,  -5409,\n   -5143,  -4723,  -3997,  -2973,\n   -1953,  -1200,   -693,   -299,\n     107,    624,   1292,   2010,\n    2595,   2981,   3224,   3400,\n    3560,   3728,   3899,   4040,\n    4131,   4180,   4206,   4222,\n    4234,   4244,   4252,   4257,\n    4259,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4260,\n    4260,   4260,   4260,   4259,\n    4257,   4252,   4244,   4234,\n    4222,   4206,   4180,   4131,\n    4040,   3899,   3728,   3560,\n    3400,   3224,   2981,   2595,\n    2010,   1292,    624,    107,\n    -299,   -693,  -1200,  -1953,\n   -2973,  -3997,  -4723,  -5143,\n   -5409,  -5652,  -5992,  -6555,\n   -7310,  -7913,  -8183,  -8273,\n   -8312,  -8354,  -8471,  -8913,\n   -9768, -10095, -10103, -10103,\n   -5824,  -5928,  -5928,  -5928,\n   -5928,  -5928,  -5928,  -5824,\n   -5110,  -4920,  -4906,  -4904,\n   -4903,  -4895,  -4824,  -4468,\n   -3912,  -3602,  -3489,  -3432,\n   -3363,  -3190,  -2675,  -1651,\n    -637,    -82,    168,    320,\n     481,    742,   1178,   1681,\n    2016,   2161,   2218,   2249,\n    2274,   2301,   2330,   2349,\n    2357,   2360,   2360,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2361,   2361,   2361,\n    2361,   2360,   2360,   2357,\n    2349,   2330,   2301,   2274,\n    2249,   2218,   2161,   2016,\n    1681,   1178,    742,    481,\n     320,    168,    -82,   -637,\n   -1651,  -2675,  -3190,  -3363,\n   -3432,  -3489,  -3602,  -3912,\n   -4468,  -4824,  -4895,  -4903,\n   -4904,  -4906,  -4920,  -5110,\n   -5824,  -5928,  -5928,  -5928,\n   -3202,  -3212,  -3212,  -3212,\n   -3212,  -3212,  -3212,  -3202,\n   -2704,  -2669,  -2668,  -2668,\n   -2668,  -2668,  -2663,  -2540,\n   -2238,  -2144,  -2132,  -2128,\n   -2124,  -2095,  -1836,   -812,\n     194,    494,    555,    577,\n     603,    669,    855,   1102,\n    1211,   1232,   1235,   1236,\n    1237,   1237,   1238,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1239,   1239,   1239,\n    1239,   1238,   1237,   1237,\n    1236,   1235,   1232,   1211,\n    1102,    855,    669,    603,\n     577,    555,    494,    194,\n    -812,  -1836,  -2095,  -2124,\n   -2128,  -2132,  -2144,  -2238,\n   -2540,  -2663,  -2668,  -2668,\n   -2668,  -2668,  -2669,  -2704,\n   -3202,  -3212,  -3212,  -3212,\n   -1892,  -1892,  -1892,  -1892,\n   -1892,  -1892,  -1892,  -1892,\n   -1650,  -1649,  -1649,  -1649,\n   -1649,  -1649,  -1649,  -1634,\n   -1545,  -1536,  -1536,  -1536,\n   -1536,  -1535,  -1470,   -446,\n     541,    629,    633,    633,\n     634,    638,    672,    732,\n     743,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    744,\n     744,    744,    744,    743,\n     732,    672,    638,    634,\n     633,    633,    629,    541,\n    -446,  -1470,  -1535,  -1536,\n   -1536,  -1536,  -1536,  -1545,\n   -1634,  -1649,  -1649,  -1649,\n   -1649,  -1649,  -1649,  -1650,\n   -1892,  -1892,  -1892,  -1892,\n  -11705, -12211, -12571, -12800,\n  -12800, -12571, -12211, -11705,\n  -11057, -10270,  -9392,  -8442,\n   -7445,  -6425,  -5401,  -4380,\n   -3391,  -2459,  -1602,   -806,\n     -89,    544,   1088,   1548,\n    1915,   2207,   2433,   2592,\n    2676,   2714,   2726,   2710,\n    2656,   2581,   2500,   2412,\n    2308,   2200,   2096,   1996,\n    1902,   1823,   1750,   1694,\n    1664,   1665,   1686,   1729,\n    1814,   1920,   2043,   2185,\n    2350,   2520,   2695,   2879,\n    3067,   3238,   3405,   3574,\n    3736,   3877,   4005,   4119,\n    4217,   4286,   4336,   4364,\n    4364,   4336,   4286,   4217,\n    4119,   4005,   3877,   3736,\n    3574,   3405,   3238,   3067,\n    2879,   2695,   2520,   2350,\n    2185,   2043,   1920,   1814,\n    1729,   1686,   1665,   1664,\n    1694,   1750,   1823,   1902,\n    1996,   2096,   2200,   2308,\n    2412,   2500,   2581,   2656,\n    2710,   2726,   2714,   2676,\n    2592,   2433,   2207,   1915,\n    1548,   1088,    544,    -89,\n    -806,  -1602,  -2459,  -3391,\n   -4380,  -5401,  -6425,  -7445,\n   -8442,  -9392, -10270, -11057,\n  -11705, -12211, -12571, -12800,\n  -11513, -12026, -12383, -12626,\n  -12626, -12383, -12026, -11513,\n  -10829, -10015,  -9148,  -8205,\n   -7190,  -6166,  -5166,  -4159,\n   -3169,  -2238,  -1364,   -516,\n     277,   1003,   1671,   2293,\n    2855,   3353,   3803,   4205,\n    4543,   4836,   5080,   5269,\n    5396,   5472,   5491,   5437,\n    5336,   5181,   4957,   4697,\n    4402,   4079,   3738,   3402,\n    3074,   2755,   2461,   2199,\n    1964,   1741,   1552,   1387,\n    1225,   1070,    926,    786,\n     637,    487,    345,    192,\n      36,   -102,   -224,   -353,\n    -462,   -540,   -592,   -628,\n    -628,   -592,   -540,   -462,\n    -353,   -224,   -102,     36,\n     192,    345,    487,    637,\n     786,    926,   1070,   1225,\n    1387,   1552,   1741,   1964,\n    2199,   2461,   2755,   3074,\n    3402,   3738,   4079,   4402,\n    4697,   4957,   5181,   5336,\n    5437,   5491,   5472,   5396,\n    5269,   5080,   4836,   4543,\n    4205,   3803,   3353,   2855,\n    2293,   1671,   1003,    277,\n    -516,  -1364,  -2238,  -3169,\n   -4159,  -5166,  -6166,  -7190,\n   -8205,  -9148, -10015, -10829,\n  -11513, -12026, -12383, -12626,\n   -7753,  -8376,  -8825,  -9124,\n   -9124,  -8825,  -8376,  -7753,\n   -6945,  -5994,  -4994,  -3970,\n   -2946,  -1961,  -1056,   -240,\n     476,   1077,   1566,   1961,\n    2248,   2431,   2536,   2576,\n    2546,   2459,   2327,   2151,\n    1937,   1712,   1470,   1209,\n     942,    708,    503,    318,\n     171,     88,     79,    121,\n     216,    386,    613,    887,\n    1187,   1507,   1835,   2143,\n    2416,   2628,   2770,   2840,\n    2828,   2715,   2513,   2245,\n    1916,   1533,   1122,    703,\n     282,   -123,   -489,   -806,\n   -1079,  -1288,  -1426,  -1499,\n   -1499,  -1426,  -1288,  -1079,\n    -806,   -489,   -123,    282,\n     703,   1122,   1533,   1916,\n    2245,   2513,   2715,   2828,\n    2840,   2770,   2628,   2416,\n    2143,   1835,   1507,   1187,\n     887,    613,    386,    216,\n     121,     79,     88,    171,\n     318,    503,    708,    942,\n    1209,   1470,   1712,   1937,\n    2151,   2327,   2459,   2546,\n    2576,   2536,   2431,   2248,\n    1961,   1566,   1077,    476,\n    -240,  -1056,  -1961,  -2946,\n   -3970,  -4994,  -5994,  -6945,\n   -7753,  -8376,  -8825,  -9124,\n  -12891, -13248, -13449, -13716,\n  -13716, -13449, -13248, -12891,\n  -12367, -11747, -11092, -10321,\n   -9457,  -8546,  -7619,  -6626,\n   -5605,  -4601,  -3577,  -2562,\n   -1603,   -662,    227,   1052,\n    1794,   2489,   3125,   3661,\n    4102,   4508,   4849,   5019,\n    5171,   5305,   5327,   5253,\n    5173,   5083,   4894,   4679,\n    4474,   4247,   3974,   3716,\n    3488,   3245,   3017,   2817,\n    2649,   2520,   2392,   2306,\n    2251,   2198,   2181,   2189,\n    2205,   2242,   2310,   2363,\n    2421,   2508,   2598,   2650,\n    2678,   2752,   2802,   2784,\n    2784,   2802,   2752,   2678,\n    2650,   2598,   2508,   2421,\n    2363,   2310,   2242,   2205,\n    2189,   2181,   2198,   2251,\n    2306,   2392,   2520,   2649,\n    2817,   3017,   3245,   3488,\n    3716,   3974,   4247,   4474,\n    4679,   4894,   5083,   5173,\n    5253,   5327,   5305,   5171,\n    5019,   4849,   4508,   4102,\n    3661,   3125,   2489,   1794,\n    1052,    227,   -662,  -1603,\n   -2562,  -3577,  -4601,  -5605,\n   -6626,  -7619,  -8546,  -9457,\n  -10321, -11092, -11747, -12367,\n  -12891, -13248, -13449, -13716,\n   -7156,  -7842,  -8581,  -9416,\n   -9416,  -8581,  -7842,  -7156,\n   -6232,  -5208,  -4489,  -4058,\n   -3664,  -3378,  -3251,  -3293,\n   -3466,  -3628,  -3691,  -3617,\n   -3496,  -3309,  -2884,  -2204,\n   -1525,   -931,   -299,    348,\n     822,   1122,   1386,   1591,\n    1657,   1626,   1547,   1494,\n    1522,   1604,   1695,   1862,\n    2101,   2324,   2532,   2748,\n    2982,   3229,   3410,   3492,\n    3523,   3566,   3565,   3417,\n    3161,   2916,   2696,   2413,\n    2064,   1892,   1911,   1925,\n    1948,   2120,   2408,   2677,\n    2870,   3020,   3164,   3266,\n    3266,   3164,   3020,   2870,\n    2677,   2408,   2120,   1948,\n    1925,   1911,   1892,   2064,\n    2413,   2696,   2916,   3161,\n    3417,   3565,   3566,   3523,\n    3492,   3410,   3229,   2982,\n    2748,   2532,   2324,   2101,\n    1862,   1695,   1604,   1522,\n    1494,   1547,   1626,   1657,\n    1591,   1386,   1122,    822,\n     348,   -299,   -931,  -1525,\n   -2204,  -2884,  -3309,  -3496,\n   -3617,  -3691,  -3628,  -3466,\n   -3293,  -3251,  -3378,  -3664,\n   -4058,  -4489,  -5208,  -6232,\n   -7156,  -7842,  -8581,  -9416,\n   -8028,  -8537,  -9395, -10253,\n  -10253,  -9395,  -8537,  -8028,\n   -7592,  -7001,  -6338,  -5533,\n   -4512,  -3488,  -2736,  -2212,\n   -1727,  -1256,   -856,   -473,\n     -49,    372,    677,    778,\n     732,    756,    977,   1295,\n    1547,   1683,   1725,   1728,\n    1779,   1980,   2243,   2420,\n    2522,   2674,   2858,   2959,\n    3007,   3106,   3283,   3421,\n    3405,   3281,   3145,   2989,\n    2802,   2634,   2461,   2178,\n    1788,   1448,   1213,    985,\n     710,    512,    460,    443,\n     400,    417,    528,    638,\n     688,    723,    781,    831,\n     831,    781,    723,    688,\n     638,    528,    417,    400,\n     443,    460,    512,    710,\n     985,   1213,   1448,   1788,\n    2178,   2461,   2634,   2802,\n    2989,   3145,   3281,   3405,\n    3421,   3283,   3106,   3007,\n    2959,   2858,   2674,   2522,\n    2420,   2243,   1980,   1779,\n    1728,   1725,   1683,   1547,\n    1295,    977,    756,    732,\n     778,    677,    372,    -49,\n    -473,   -856,  -1256,  -1727,\n   -2212,  -2736,  -3488,  -4512,\n   -5533,  -6338,  -7001,  -7592,\n   -8028,  -8537,  -9395, -10253,\n  -12194, -12261, -12614, -13177,\n  -13177, -12614, -12261, -12194,\n  -11954, -11353, -10698, -10033,\n   -9318,  -8483,  -7689,  -6925,\n   -6123,  -5159,  -4135,  -3204,\n   -2494,  -1766,   -838,    129,\n     871,   1524,   2216,   2882,\n    3481,   4105,   4700,   5182,\n    5531,   5871,   6251,   6594,\n    6836,   6988,   7053,   7059,\n    7091,   7083,   6991,   6812,\n    6541,   6205,   5935,   5682,\n    5288,   4764,   4267,   3830,\n    3378,   2881,   2386,   1878,\n    1327,    832,    449,     57,\n    -374,   -754,  -1090,  -1384,\n   -1546,  -1633,  -1789,  -1959,\n   -1959,  -1789,  -1633,  -1546,\n   -1384,  -1090,   -754,   -374,\n      57,    449,    832,   1327,\n    1878,   2386,   2881,   3378,\n    3830,   4267,   4764,   5288,\n    5682,   5935,   6205,   6541,\n    6812,   6991,   7083,   7091,\n    7059,   7053,   6988,   6836,\n    6594,   6251,   5871,   5531,\n    5182,   4700,   4105,   3481,\n    2882,   2216,   1524,    871,\n     129,   -838,  -1766,  -2494,\n   -3204,  -4135,  -5159,  -6123,\n   -6925,  -7689,  -8483,  -9318,\n  -10033, -10698, -11353, -11954,\n  -12194, -12261, -12614, -13177,\n  -11519, -11750, -11930, -12347,\n  -12347, -11930, -11750, -11519,\n  -10983, -10334,  -9753,  -9002,\n   -8145,  -7265,  -6386,  -5433,\n   -4455,  -3460,  -2436,  -1460,\n    -544,    393,   1362,   2182,\n    2927,   3742,   4457,   5011,\n    5601,   6161,   6555,   6908,\n    7272,   7536,   7667,   7824,\n    7913,   7860,   7777,   7698,\n    7482,   7170,   6875,   6521,\n    6083,   5628,   5134,   4558,\n    3962,   3376,   2734,   2093,\n    1443,    774,     99,   -531,\n   -1110,  -1709,  -2306,  -2801,\n   -3272,  -3744,  -4104,  -4374,\n   -4667,  -4888,  -5007,  -5063,\n   -5063,  -5007,  -4888,  -4667,\n   -4374,  -4104,  -3744,  -3272,\n   -2801,  -2306,  -1709,  -1110,\n    -531,     99,    774,   1443,\n    2093,   2734,   3376,   3962,\n    4558,   5134,   5628,   6083,\n    6521,   6875,   7170,   7482,\n    7698,   7777,   7860,   7913,\n    7824,   7667,   7536,   7272,\n    6908,   6555,   6161,   5601,\n    5011,   4457,   3742,   2927,\n    2182,   1362,    393,   -544,\n   -1460,  -2436,  -3460,  -4455,\n   -5433,  -6386,  -7265,  -8145,\n   -9002,  -9753, -10334, -10983,\n  -11519, -11750, -11930, -12347,\n   -1683,  -2437,  -3315,  -4339,\n   -4339,  -3315,  -2437,  -1683,\n   -1014,   -241,    521,   1283,\n    1859,   2101,   1996,   1708,\n    1385,   1047,    613,    261,\n      39,     27,    131,    222,\n     231,    236,    215,    172,\n     149,     -6,   -243,   -433,\n    -495,   -556,   -716,   -867,\n    -859,   -648,   -424,   -227,\n    -124,    -24,    130,    269,\n     401,    553,    688,    750,\n     773,    835,    815,    809,\n     827,    736,    642,    596,\n     565,    455,    214,    -13,\n    -147,   -284,   -500,   -692,\n    -800,   -906,  -1060,  -1202,\n   -1202,  -1060,   -906,   -800,\n    -692,   -500,   -284,   -147,\n     -13,    214,    455,    565,\n     596,    642,    736,    827,\n     809,    815,    835,    773,\n     750,    688,    553,    401,\n     269,    130,    -24,   -124,\n    -227,   -424,   -648,   -859,\n    -867,   -716,   -556,   -495,\n    -433,   -243,     -6,    149,\n     172,    215,    236,    231,\n     222,    131,     27,     39,\n     261,    613,   1047,   1385,\n    1708,   1996,   2101,   1859,\n    1283,    521,   -241,  -1014,\n   -1683,  -2437,  -3315,  -4339,\n   -2160,  -2663,  -3352,  -4376,\n   -4376,  -3352,  -2663,  -2160,\n   -1750,  -1288,   -920,   -592,\n      32,    953,   1457,   1668,\n    1638,   1566,   1394,   1310,\n    1310,   1297,   1149,    905,\n     581,    273,    -83,   -348,\n    -487,   -501,   -527,   -503,\n    -418,   -317,   -310,   -334,\n    -223,     45,    285,    433,\n     497,    574,    637,    691,\n     758,    912,   1096,   1247,\n    1243,   1177,   1024,    927,\n     844,    675,    506,    382,\n     238,     13,   -294,   -533,\n    -666,   -765,   -891,   -953,\n    -960,  -1016,  -1179,  -1329,\n   -1329,  -1179,  -1016,   -960,\n    -953,   -891,   -765,   -666,\n    -533,   -294,     13,    238,\n     382,    506,    675,    844,\n     927,   1024,   1177,   1243,\n    1247,   1096,    912,    758,\n     691,    637,    574,    497,\n     433,    285,     45,   -223,\n    -334,   -310,   -317,   -418,\n    -503,   -527,   -501,   -487,\n    -348,    -83,    273,    581,\n     905,   1149,   1297,   1310,\n    1310,   1394,   1566,   1638,\n    1668,   1457,    953,     32,\n    -592,   -920,  -1288,  -1750,\n   -2160,  -2663,  -3352,  -4376,\n   -1003,  -1766,  -2700,  -3724,\n   -3724,  -2700,  -1766,  -1003,\n    -358,    332,    964,   1474,\n    1724,   1688,   1318,    797,\n     272,   -258,   -896,  -1514,\n   -1719,  -1289,   -802,   -398,\n    -109,    206,    523,    838,\n    1057,   1110,    991,    829,\n     675,    476,    191,    -64,\n    -138,    -10,    184,    350,\n     421,    487,    589,    679,\n     697,    640,    578,    520,\n     436,    252,    -21,   -248,\n    -388,   -410,   -377,   -319,\n    -292,   -290,   -267,   -236,\n    -171,   -143,   -156,   -144,\n    -136,   -176,   -323,   -456,\n    -456,   -323,   -176,   -136,\n    -144,   -156,   -143,   -171,\n    -236,   -267,   -290,   -292,\n    -319,   -377,   -410,   -388,\n    -248,    -21,    252,    436,\n     520,    578,    640,    697,\n     679,    589,    487,    421,\n     350,    184,    -10,   -138,\n     -64,    191,    476,    675,\n     829,    991,   1110,   1057,\n     838,    523,    206,   -109,\n    -398,   -802,  -1289,  -1719,\n   -1514,   -896,   -258,    272,\n     797,   1318,   1688,   1724,\n    1474,    964,    332,   -358,\n   -1003,  -1766,  -2700,  -3724,\n   -1955,  -2748,  -3711,  -4735,\n   -4735,  -3711,  -2748,  -1955,\n   -1262,   -537,    168,    915,\n    1660,   2186,   2318,   2129,\n    1867,   1690,   1423,   1031,\n     624,    366,    153,   -116,\n    -401,   -635,   -868,  -1189,\n   -1412,  -1245,   -983,   -697,\n    -426,   -228,   -117,    -14,\n     204,    473,    665,    718,\n     657,    569,    516,    526,\n     572,    666,    780,    849,\n     860,    767,    612,    468,\n     358,    200,    -18,   -202,\n    -343,   -455,   -521,   -552,\n    -524,   -454,   -353,   -211,\n     -57,     30,     -3,    -49,\n     -49,     -3,     30,    -57,\n    -211,   -353,   -454,   -524,\n    -552,   -521,   -455,   -343,\n    -202,    -18,    200,    358,\n     468,    612,    767,    860,\n     849,    780,    666,    572,\n     526,    516,    569,    657,\n     718,    665,    473,    204,\n     -14,   -117,   -228,   -426,\n    -697,   -983,  -1245,  -1412,\n   -1189,   -868,   -635,   -401,\n    -116,    153,    366,    624,\n    1031,   1423,   1690,   1867,\n    2129,   2318,   2186,   1660,\n     915,    168,   -537,  -1262,\n   -1955,  -2748,  -3711,  -4735,\n   -1483,  -2328,  -3352,  -4340,\n   -4340,  -3352,  -2328,  -1483,\n    -839,   -136,    651,   1428,\n    2030,   2312,   2217,   1860,\n    1429,   1030,    632,    295,\n     105,    121,    239,    317,\n     353,    488,    627,    635,\n     376,    -68,   -504,   -828,\n   -1049,  -1301,  -1688,  -2095,\n   -2239,  -1831,  -1196,   -644,\n    -200,    186,    587,    977,\n    1280,   1465,   1533,   1450,\n    1240,    952,    632,    375,\n     210,    117,     77,     38,\n     -19,    -67,    -62,    -27,\n      -8,    -67,   -164,   -244,\n    -277,   -301,   -396,   -512,\n    -512,   -396,   -301,   -277,\n    -244,   -164,    -67,     -8,\n     -27,    -62,    -67,    -19,\n      38,     77,    117,    210,\n     375,    632,    952,   1240,\n    1450,   1533,   1465,   1280,\n     977,    587,    186,   -200,\n    -644,  -1196,  -1831,  -2239,\n   -2095,  -1688,  -1301,  -1049,\n    -828,   -504,    -68,    376,\n     635,    627,    488,    353,\n     317,    239,    121,    105,\n     295,    632,   1030,   1429,\n    1860,   2217,   2312,   2030,\n    1428,    651,   -136,   -839,\n   -1483,  -2328,  -3352,  -4340,\n   -1307,  -2045,  -2957,  -3981,\n   -3981,  -2957,  -2045,  -1307,\n    -764,   -182,    446,   1073,\n    1592,   1872,   1811,   1511,\n    1099,    711,    355,     87,\n     -70,    -81,    -76,    -98,\n    -146,   -108,    -11,     52,\n      19,    -62,   -121,    -76,\n      43,    159,    115,    -44,\n    -195,   -259,   -259,   -287,\n    -348,   -361,   -371,   -422,\n    -527,   -373,    130,    607,\n     901,    996,    952,    923,\n     955,    991,    935,    728,\n     399,     50,   -200,   -318,\n    -347,   -408,   -501,   -520,\n    -449,   -383,   -404,   -450,\n    -450,   -404,   -383,   -449,\n    -520,   -501,   -408,   -347,\n    -318,   -200,     50,    399,\n     728,    935,    991,    955,\n     923,    952,    996,    901,\n     607,    130,   -373,   -527,\n    -422,   -371,   -361,   -348,\n    -287,   -259,   -259,   -195,\n     -44,    115,    159,     43,\n     -76,   -121,    -62,     19,\n      52,    -11,   -108,   -146,\n     -98,    -76,    -81,    -70,\n      87,    355,    711,   1099,\n    1511,   1811,   1872,   1592,\n    1073,    446,   -182,   -764,\n   -1307,  -2045,  -2957,  -3981,\n   -1435,  -2272,  -3217,  -4241,\n   -4241,  -3217,  -2272,  -1435,\n    -782,   -129,    552,   1232,\n    1754,   1965,   1787,   1398,\n     936,    484,     21,   -371,\n    -581,   -546,   -447,   -379,\n    -331,   -215,    -41,    111,\n     158,     99,      7,    -16,\n      38,     61,    -46,   -165,\n    -114,    163,    544,    861,\n    1061,   1264,   1503,   1658,\n    1607,   1385,   1131,    829,\n     414,    -80,   -613,  -1090,\n   -1517,  -1724,  -1481,  -1137,\n    -815,   -522,   -239,     33,\n     304,    477,    510,    435,\n     275,     49,   -200,   -361,\n    -361,   -200,     49,    275,\n     435,    510,    477,    304,\n      33,   -239,   -522,   -815,\n   -1137,  -1481,  -1724,  -1517,\n   -1090,   -613,    -80,    414,\n     829,   1131,   1385,   1607,\n    1658,   1503,   1264,   1061,\n     861,    544,    163,   -114,\n    -165,    -46,     61,     38,\n     -16,      7,     99,    158,\n     111,    -41,   -215,   -331,\n    -379,   -447,   -546,   -581,\n    -371,     21,    484,    936,\n    1398,   1787,   1965,   1754,\n    1232,    552,   -129,   -782,\n   -1435,  -2272,  -3217,  -4241,\n   -2191,  -3081,  -4105,  -5066,\n   -5066,  -4105,  -3081,  -2191,\n   -1420,   -674,    111,    939,\n    1686,   2110,   2117,   1897,\n    1599,   1224,    768,    362,\n     152,    128,    163,    176,\n     179,    222,    275,    285,\n     256,    203,    129,     79,\n      37,    -46,   -169,   -259,\n    -210,    -20,    233,    421,\n     504,    587,    718,    878,\n    1023,   1146,   1274,   1398,\n    1432,   1347,   1212,   1026,\n     734,    325,   -113,   -505,\n    -889,  -1217,  -1458,  -1630,\n   -1795,  -1840,  -1457,   -827,\n    -286,    -11,    -10,    -75,\n     -75,    -10,    -11,   -286,\n    -827,  -1457,  -1840,  -1795,\n   -1630,  -1458,  -1217,   -889,\n    -505,   -113,    325,    734,\n    1026,   1212,   1347,   1432,\n    1398,   1274,   1146,   1023,\n     878,    718,    587,    504,\n     421,    233,    -20,   -210,\n    -259,   -169,    -46,     37,\n      79,    129,    203,    256,\n     285,    275,    222,    179,\n     176,    163,    128,    152,\n     362,    768,   1224,   1599,\n    1897,   2117,   2110,   1686,\n     939,    111,   -674,  -1420,\n   -2191,  -3081,  -4105,  -5066,\n  -20598, -20751, -20852, -20913,\n  -20913, -20852, -20751, -20598,\n  -20397, -20146, -19847, -19499,\n  -19107, -18668, -18183, -17651,\n  -17081, -16469, -15819, -15130,\n  -14404, -13643, -12852, -12029,\n  -11174, -10295,  -9392,  -8464,\n   -7517,  -6552,  -5570,  -4577,\n   -3571,  -2557,  -1536,   -512,\n     512,   1536,   2557,   3571,\n    4577,   5570,   6552,   7517,\n    8464,   9392,  10295,  11174,\n   12029,  12852,  13643,  14404,\n   15130,  15819,  16469,  17081,\n   17651,  18183,  18668,  19107,\n   19499,  19847,  20146,  20397,\n   20598,  20751,  20852,  20913,\n   20913,  20852,  20751,  20598,\n   20397,  20146,  19847,  19499,\n   19107,  18668,  18183,  17651,\n   17081,  16469,  15819,  15130,\n   14404,  13643,  12852,  12029,\n   11174,  10295,   9392,   8464,\n    7517,   6552,   5570,   4577,\n    3571,   2557,   1536,    512,\n    -512,  -1536,  -2557,  -3571,\n   -4577,  -5570,  -6552,  -7517,\n   -8464,  -9392, -10295, -11174,\n  -12029, -12852, -13643, -14404,\n  -15130, -15819, -16469, -17081,\n  -17651, -18183, -18668, -19107,\n  -19499, -19847, -20146, -20397,\n  -20598, -20751, -20852, -20913,\n  -10108, -10547, -10853, -11035,\n  -11035, -10853, -10547, -10108,\n   -9554,  -8873,  -8091,  -7223,\n   -6289,  -5304,  -4289,  -3270,\n   -2261,  -1274,   -324,    564,\n    1369,   2077,   2683,   3175,\n    3539,   3780,   3899,   3898,\n    3775,   3536,   3192,   2756,\n    2243,   1667,   1044,    389,\n    -278,   -945,  -1587,  -2184,\n   -2714,  -3164,  -3524,  -3779,\n   -3919,  -3931,  -3819,  -3572,\n   -3196,  -2697,  -2079,  -1359,\n    -547,    343,   1297,   2295,\n    3315,   4339,   5345,   6314,\n    7230,   8076,   8839,   9496,\n   10042,  10460,  10738,  10877,\n   10877,  10738,  10460,  10042,\n    9496,   8839,   8076,   7230,\n    6314,   5345,   4339,   3315,\n    2295,   1297,    343,   -547,\n   -1359,  -2079,  -2697,  -3196,\n   -3572,  -3819,  -3931,  -3919,\n   -3779,  -3524,  -3164,  -2714,\n   -2184,  -1587,   -945,   -278,\n     389,   1044,   1667,   2243,\n    2756,   3192,   3536,   3775,\n    3898,   3899,   3780,   3539,\n    3175,   2683,   2077,   1369,\n     564,   -324,  -1274,  -2261,\n   -3270,  -4289,  -5304,  -6289,\n   -7223,  -8091,  -8873,  -9554,\n  -10108, -10547, -10853, -11035,\n  -17901, -18342, -18803, -19228,\n  -19228, -18803, -18342, -17901,\n  -17436, -16807, -16103, -15368,\n  -14576, -13653, -12677, -11766,\n  -10847,  -9864,  -8852,  -7914,\n   -7046,  -6187,  -5363,  -4604,\n   -3924,  -3270,  -2658,  -2141,\n   -1729,  -1316,   -893,   -564,\n    -341,   -167,     21,    189,\n     289,    342,    424,    557,\n     739,    993,   1345,   1737,\n    2141,   2603,   3154,   3801,\n    4514,   5292,   6129,   7038,\n    8004,   8994,  10018,  11020,\n   11963,  12861,  13752,  14589,\n   15337,  16041,  16670,  17218,\n   17648,  18012,  18331,  18573,\n   18573,  18331,  18012,  17648,\n   17218,  16670,  16041,  15337,\n   14589,  13752,  12861,  11963,\n   11020,  10018,   8994,   8004,\n    7038,   6129,   5292,   4514,\n    3801,   3154,   2603,   2141,\n    1737,   1345,    993,    739,\n     557,    424,    342,    289,\n     189,     21,   -167,   -341,\n    -564,   -893,  -1316,  -1729,\n   -2141,  -2658,  -3270,  -3924,\n   -4604,  -5363,  -6187,  -7046,\n   -7914,  -8852,  -9864, -10847,\n  -11766, -12677, -13653, -14576,\n  -15368, -16103, -16807, -17436,\n  -17901, -18342, -18803, -19228,\n  -10200, -11150, -12174, -12991,\n  -12991, -12174, -11150, -10200,\n   -9660,  -9444,  -9418,  -9382,\n   -9147,  -8662,  -8047,  -7405,\n   -6810,  -6198,  -5604,  -5052,\n   -4567,  -4162,  -3802,  -3460,\n   -3049,  -2455,  -1773,  -1132,\n    -642,   -353,   -146,     61,\n     414,    969,   1665,   2333,\n    2828,   3133,   3303,   3452,\n    3594,   3753,   3928,   4099,\n    4328,   4645,   5102,   5588,\n    5940,   6054,   5899,   5579,\n    5265,   5107,   5173,   5445,\n    5789,   6021,   6074,   5935,\n    5688,   5499,   5447,   5525,\n    5646,   5765,   5869,   5972,\n    5972,   5869,   5765,   5646,\n    5525,   5447,   5499,   5688,\n    5935,   6074,   6021,   5789,\n    5445,   5173,   5107,   5265,\n    5579,   5899,   6054,   5940,\n    5588,   5102,   4645,   4328,\n    4099,   3928,   3753,   3594,\n    3452,   3303,   3133,   2828,\n    2333,   1665,    969,    414,\n      61,   -146,   -353,   -642,\n   -1132,  -1773,  -2455,  -3049,\n   -3460,  -3802,  -4162,  -4567,\n   -5052,  -5604,  -6198,  -6810,\n   -7405,  -8047,  -8662,  -9147,\n   -9382,  -9418,  -9444,  -9660,\n  -10200, -11150, -12174, -12991,\n  -15200, -16184, -16972, -17454,\n  -17454, -16972, -16184, -15200,\n  -14223, -13348, -12651, -12132,\n  -11807, -11610, -11515, -11442,\n  -11333, -11125, -10771, -10226,\n   -9508,  -8637,  -7661,  -6642,\n   -5618,  -4630,  -3711,  -2895,\n   -2200,  -1626,  -1161,   -764,\n    -400,    -34,    377,    864,\n    1447,   2132,   2906,   3750,\n    4618,   5450,   6185,   6800,\n    7276,   7631,   7884,   8056,\n    8163,   8242,   8320,   8439,\n    8627,   8920,   9309,   9776,\n   10278,  10735,  11089,  11301,\n   11354,  11268,  11072,  10788,\n   10480,  10180,   9942,   9820,\n    9820,   9942,  10180,  10480,\n   10788,  11072,  11268,  11354,\n   11301,  11089,  10735,  10278,\n    9776,   9309,   8920,   8627,\n    8439,   8320,   8242,   8163,\n    8056,   7884,   7631,   7276,\n    6800,   6185,   5450,   4618,\n    3750,   2906,   2132,   1447,\n     864,    377,    -34,   -400,\n    -764,  -1161,  -1626,  -2200,\n   -2895,  -3711,  -4630,  -5618,\n   -6642,  -7661,  -8637,  -9508,\n  -10226, -10771, -11125, -11333,\n  -11442, -11515, -11610, -11807,\n  -12132, -12651, -13348, -14223,\n  -15200, -16184, -16972, -17454,\n   -7131,  -8003,  -9027,  -9971,\n   -9971,  -9027,  -8003,  -7131,\n   -6349,  -5525,  -4667,  -4002,\n   -3565,  -3119,  -2739,  -2513,\n   -2332,  -2056,  -1686,  -1265,\n    -807,   -245,    326,    786,\n    1296,   1841,   2262,   2516,\n    2564,   2518,   2473,   2332,\n    2117,   1960,   1826,   1646,\n    1503,   1512,   1588,   1716,\n    1917,   2093,   2207,   2209,\n    2047,   1910,   1873,   1803,\n    1673,   1586,   1523,   1483,\n    1486,   1497,   1537,   1601,\n    1650,   1707,   1723,   1715,\n    1707,   1568,   1361,   1044,\n     611,    312,    213,    167,\n     167,    213,    312,    611,\n    1044,   1361,   1568,   1707,\n    1715,   1723,   1707,   1650,\n    1601,   1537,   1497,   1486,\n    1483,   1523,   1586,   1673,\n    1803,   1873,   1910,   2047,\n    2209,   2207,   2093,   1917,\n    1716,   1588,   1512,   1503,\n    1646,   1826,   1960,   2117,\n    2332,   2473,   2518,   2564,\n    2516,   2262,   1841,   1296,\n     786,    326,   -245,   -807,\n   -1265,  -1686,  -2056,  -2332,\n   -2513,  -2739,  -3119,  -3565,\n   -4002,  -4667,  -5525,  -6349,\n   -7131,  -8003,  -9027,  -9971,\n   -9368,  -9777,  -9731, -10755,\n  -10755,  -9731,  -9777,  -9368,\n   -8645,  -8247,  -7761,  -6955,\n   -6090,  -5586,  -4752,  -3823,\n   -3293,  -2598,  -1795,  -1143,\n    -541,    215,    815,   1291,\n    1854,   2358,   2883,   3295,\n    3683,   4064,   4329,   4621,\n    4761,   4908,   5046,   5074,\n    5120,   5046,   4898,   4746,\n    4638,   4367,   4061,   3937,\n    3655,   3286,   3079,   2969,\n    2591,   2278,   2269,   1876,\n    1542,   1473,   1100,    728,\n     462,    100,   -262,   -537,\n    -753,  -1039,  -1244,  -1448,\n   -1680,  -1817,  -1897,  -1882,\n   -1882,  -1897,  -1817,  -1680,\n   -1448,  -1244,  -1039,   -753,\n    -537,   -262,    100,    462,\n     728,   1100,   1473,   1542,\n    1876,   2269,   2278,   2591,\n    2969,   3079,   3286,   3655,\n    3937,   4061,   4367,   4638,\n    4746,   4898,   5046,   5120,\n    5074,   5046,   4908,   4761,\n    4621,   4329,   4064,   3683,\n    3295,   2883,   2358,   1854,\n    1291,    815,    215,   -541,\n   -1143,  -1795,  -2598,  -3293,\n   -3823,  -4752,  -5586,  -6090,\n   -6955,  -7761,  -8247,  -8645,\n   -9368,  -9777,  -9731, -10755,\n   -4414,  -4670,  -4246,  -5270,\n   -5270,  -4246,  -4670,  -4414,\n   -3907,  -3762,  -3598,  -3200,\n   -2765,  -2558,  -2357,  -1914,\n   -1737,  -1558,  -1158,   -990,\n    -860,   -494,   -248,   -147,\n     211,    509,    593,    887,\n    1181,   1219,   1380,   1642,\n    1778,   1765,   1910,   2089,\n    2091,   1993,   2041,   2079,\n    1841,   1872,   1892,   1636,\n    1509,   1561,   1414,   1291,\n    1330,   1201,   1194,   1056,\n    1071,   1198,    919,    899,\n     861,    721,    660,    599,\n     451,    394,    287,    161,\n     175,     94,    111,     86,\n      86,    111,     94,    175,\n     161,    287,    394,    451,\n     599,    660,    721,    861,\n     899,    919,   1198,   1071,\n    1056,   1194,   1201,   1330,\n    1291,   1414,   1561,   1509,\n    1636,   1892,   1872,   1841,\n    2079,   2041,   1993,   2091,\n    2089,   1910,   1765,   1778,\n    1642,   1380,   1219,   1181,\n     887,    593,    509,    211,\n    -147,   -248,   -494,   -860,\n    -990,  -1158,  -1558,  -1737,\n   -1914,  -2357,  -2558,  -2765,\n   -3200,  -3598,  -3762,  -3907,\n   -4414,  -4670,  -4246,  -5270,\n  -19825, -20072, -20279, -20427,\n  -20427, -20279, -20072, -19825,\n  -19569, -19291, -19004, -18698,\n  -18373, -17994, -17552, -17029,\n  -16430, -15773, -15078, -14370,\n  -13675, -12982, -12278, -11541,\n  -10757,  -9915,  -9023,  -8084,\n   -7125,  -6151,  -5180,  -4232,\n   -3312,  -2394,  -1451,   -479,\n     523,   1540,   2564,   3585,\n    4583,   5544,   6456,   7317,\n    8147,   8973,   9808,  10658,\n   11512,  12356,  13166,  13925,\n   14619,  15244,  15807,  16330,\n   16820,  17290,  17745,  18195,\n   18623,  19003,  19311,  19539,\n   19694,  19786,  19831,  19844,\n   19844,  19831,  19786,  19694,\n   19539,  19311,  19003,  18623,\n   18195,  17745,  17290,  16820,\n   16330,  15807,  15244,  14619,\n   13925,  13166,  12356,  11512,\n   10658,   9808,   8973,   8147,\n    7317,   6456,   5544,   4583,\n    3585,   2564,   1540,    523,\n    -479,  -1451,  -2394,  -3312,\n   -4232,  -5180,  -6151,  -7125,\n   -8084,  -9023,  -9915, -10757,\n  -11541, -12278, -12982, -13675,\n  -14370, -15078, -15773, -16430,\n  -17029, -17552, -17994, -18373,\n  -18698, -19004, -19291, -19569,\n  -19825, -20072, -20279, -20427,\n  -10881, -11316, -11665, -11893,\n  -11893, -11665, -11316, -10881,\n  -10406,  -9886,  -9317,  -8655,\n   -7888,  -7006,  -6041,  -5025,\n   -4001,  -2993,  -2023,  -1079,\n    -143,    814,   1786,   2741,\n    3645,   4466,   5187,   5814,\n    6363,   6851,   7284,   7663,\n    7970,   8190,   8290,   8266,\n    8134,   7934,   7702,   7445,\n    7145,   6786,   6338,   5802,\n    5197,   4569,   3941,   3329,\n    2738,   2157,   1579,    976,\n     346,   -293,   -910,  -1469,\n   -1961,  -2393,  -2780,  -3137,\n   -3486,  -3821,  -4121,  -4356,\n   -4523,  -4619,  -4671,  -4692,\n   -4692,  -4671,  -4619,  -4523,\n   -4356,  -4121,  -3821,  -3486,\n   -3137,  -2780,  -2393,  -1961,\n   -1469,   -910,   -293,    346,\n     976,   1579,   2157,   2738,\n    3329,   3941,   4569,   5197,\n    5802,   6338,   6786,   7145,\n    7445,   7702,   7934,   8134,\n    8266,   8290,   8190,   7970,\n    7663,   7284,   6851,   6363,\n    5814,   5187,   4466,   3645,\n    2741,   1786,    814,   -143,\n   -1079,  -2023,  -2993,  -4001,\n   -5025,  -6041,  -7006,  -7888,\n   -8655,  -9317,  -9886, -10406,\n  -10881, -11316, -11665, -11893,\n  -19536, -19886, -20149, -20318,\n  -20318, -20149, -19886, -19536,\n  -19137, -18680, -18164, -17566,\n  -16878, -16098, -15244, -14343,\n  -13417, -12486, -11554, -10616,\n   -9657,  -8663,  -7649,  -6625,\n   -5622,  -4659,  -3750,  -2885,\n   -2053,  -1235,   -424,    371,\n    1133,   1849,   2511,   3116,\n    3676,   4207,   4730,   5248,\n    5754,   6241,   6685,   7083,\n    7443,   7791,   8148,   8520,\n    8901,   9285,   9655,  10003,\n   10323,  10612,  10895,  11181,\n   11476,  11779,  12074,  12332,\n   12548,  12722,  12867,  13004,\n   13132,  13251,  13347,  13403,\n   13403,  13347,  13251,  13132,\n   13004,  12867,  12722,  12548,\n   12332,  12074,  11779,  11476,\n   11181,  10895,  10612,  10323,\n   10003,   9655,   9285,   8901,\n    8520,   8148,   7791,   7443,\n    7083,   6685,   6241,   5754,\n    5248,   4730,   4207,   3676,\n    3116,   2511,   1849,   1133,\n     371,   -424,  -1235,  -2053,\n   -2885,  -3750,  -4659,  -5622,\n   -6625,  -7649,  -8663,  -9657,\n  -10616, -11554, -12486, -13417,\n  -14343, -15244, -16098, -16878,\n  -17566, -18164, -18680, -19137,\n  -19536, -19886, -20149, -20318,\n  -18344, -19191, -19841, -20219,\n  -20219, -19841, -19191, -18344,\n  -17385, -16364, -15340, -14354,\n  -13445, -12607, -11830, -11087,\n  -10365,  -9658,  -8965,  -8282,\n   -7598,  -6907,  -6215,  -5525,\n   -4842,  -4148,  -3435,  -2702,\n   -1976,  -1284,   -643,    -60,\n     465,    942,   1385,   1805,\n    2214,   2638,   3095,   3575,\n    4063,   4554,   5055,   5574,\n    6103,   6635,   7167,   7711,\n    8266,   8820,   9336,   9780,\n   10120,  10356,  10500,  10582,\n   10629,  10655,  10676,  10715,\n   10787,  10886,  10995,  11108,\n   11220,  11327,  11414,  11464,\n   11464,  11414,  11327,  11220,\n   11108,  10995,  10886,  10787,\n   10715,  10676,  10655,  10629,\n   10582,  10500,  10356,  10120,\n    9780,   9336,   8820,   8266,\n    7711,   7167,   6635,   6103,\n    5574,   5055,   4554,   4063,\n    3575,   3095,   2638,   2214,\n    1805,   1385,    942,    465,\n     -60,   -643,  -1284,  -1976,\n   -2702,  -3435,  -4148,  -4842,\n   -5525,  -6215,  -6907,  -7598,\n   -8282,  -8965,  -9658, -10365,\n  -11087, -11830, -12607, -13445,\n  -14354, -15340, -16364, -17385,\n  -18344, -19191, -19841, -20219,\n   -9058,  -9967, -10703, -11149,\n  -11149, -10703,  -9967,  -9058,\n   -8069,  -7045,  -6056,  -5162,\n   -4375,  -3664,  -3009,  -2411,\n   -1865,  -1356,   -875,   -415,\n      11,    390,    705,    955,\n    1167,   1394,   1655,   1938,\n    2213,   2443,   2593,   2631,\n    2557,   2403,   2217,   2034,\n    1870,   1752,   1686,   1656,\n    1652,   1671,   1725,   1808,\n    1898,   1988,   2087,   2209,\n    2354,   2519,   2674,   2777,\n    2786,   2684,   2489,   2235,\n    1959,   1703,   1502,   1368,\n    1270,   1180,   1091,   1038,\n    1033,   1055,   1072,   1077,\n    1077,   1072,   1055,   1033,\n    1038,   1091,   1180,   1270,\n    1368,   1502,   1703,   1959,\n    2235,   2489,   2684,   2786,\n    2777,   2674,   2519,   2354,\n    2209,   2087,   1988,   1898,\n    1808,   1725,   1671,   1652,\n    1656,   1686,   1752,   1870,\n    2034,   2217,   2403,   2557,\n    2631,   2593,   2443,   2213,\n    1938,   1655,   1394,   1167,\n     955,    705,    390,     11,\n    -415,   -875,  -1356,  -1865,\n   -2411,  -3009,  -3664,  -4375,\n   -5162,  -6056,  -7045,  -8069,\n   -9058,  -9967, -10703, -11149,\n   -4016,  -4483,  -5507,  -6477,\n   -6477,  -5507,  -4483,  -4016,\n   -3874,  -3602,  -3269,  -3158,\n   -3175,  -2979,  -2523,  -2053,\n   -1686,  -1282,   -778,   -301,\n      53,    294,    382,    227,\n     -96,   -318,   -262,     13,\n     364,    716,    943,    859,\n     421,   -119,   -443,   -462,\n    -287,    -21,    268,    501,\n     627,    731,    915,   1131,\n    1229,   1160,   1052,   1068,\n    1267,   1630,   2077,   2453,\n    2613,   2549,   2351,   2073,\n    1729,   1462,   1509,   1903,\n    2320,   2376,   2057,   1702,\n    1567,   1576,   1543,   1465,\n    1465,   1543,   1576,   1567,\n    1702,   2057,   2376,   2320,\n    1903,   1509,   1462,   1729,\n    2073,   2351,   2549,   2613,\n    2453,   2077,   1630,   1267,\n    1068,   1052,   1160,   1229,\n    1131,    915,    731,    627,\n     501,    268,    -21,   -287,\n    -462,   -443,   -119,    421,\n     859,    943,    716,    364,\n      13,   -262,   -318,    -96,\n     227,    382,    294,     53,\n    -301,   -778,  -1282,  -1686,\n   -2053,  -2523,  -2979,  -3175,\n   -3158,  -3269,  -3602,  -3874,\n   -4016,  -4483,  -5507,  -6477,\n   -6317,  -6712,  -7736,  -8749,\n   -8749,  -7736,  -6712,  -6317,\n   -6229,  -5932,  -5543,  -5412,\n   -5426,  -5175,  -4621,  -4083,\n   -3689,  -3239,  -2632,  -2037,\n   -1604,  -1313,  -1150,  -1191,\n   -1388,  -1502,  -1363,  -1008,\n    -556,    -78,    290,    333,\n       8,   -420,   -624,   -524,\n    -242,    120,    514,    859,\n    1101,   1323,   1632,   1983,\n    2208,   2250,   2251,   2378,\n    2681,   3121,   3610,   4025,\n    4265,   4322,   4242,   4050,\n    3780,   3605,   3743,   4190,\n    4618,   4689,   4414,   4100,\n    3969,   3968,   3950,   3901,\n    3901,   3950,   3968,   3969,\n    4100,   4414,   4689,   4618,\n    4190,   3743,   3605,   3780,\n    4050,   4242,   4322,   4265,\n    4025,   3610,   3121,   2681,\n    2378,   2251,   2250,   2208,\n    1983,   1632,   1323,   1101,\n     859,    514,    120,   -242,\n    -524,   -624,   -420,      8,\n     333,    290,    -78,   -556,\n   -1008,  -1363,  -1502,  -1388,\n   -1191,  -1150,  -1313,  -1604,\n   -2037,  -2632,  -3239,  -3689,\n   -4083,  -4621,  -5175,  -5426,\n   -5412,  -5543,  -5932,  -6229,\n   -6317,  -6712,  -7736,  -8749,\n  -19345, -19701, -20465, -21212,\n  -21212, -20465, -19701, -19345,\n  -19158, -18760, -18247, -17889,\n  -17619, -17145, -16438, -15715,\n  -15058, -14324, -13457, -12580,\n  -11793, -11054, -10335,  -9704,\n   -9167,  -8587,  -7836,  -6922,\n   -5928,  -4904,  -3941,  -3173,\n   -2617,  -2101,  -1443,   -617,\n     295,   1259,   2267,   3257,\n    4160,   5022,   5937,   6885,\n    7745,   8462,   9117,   9831,\n   10653,  11549,  12446,  13265,\n   13943,  14481,  14919,  15266,\n   15525,  15793,  16205,  16774,\n   17317,  17634,  17715,  17723,\n   17795,  17921,  18018,  18058,\n   18058,  18018,  17921,  17795,\n   17723,  17715,  17634,  17317,\n   16774,  16205,  15793,  15525,\n   15266,  14919,  14481,  13943,\n   13265,  12446,  11549,  10653,\n    9831,   9117,   8462,   7745,\n    6885,   5937,   5022,   4160,\n    3257,   2267,   1259,    295,\n    -617,  -1443,  -2101,  -2617,\n   -3173,  -3941,  -4904,  -5928,\n   -6922,  -7836,  -8587,  -9167,\n   -9704, -10335, -11054, -11793,\n  -12580, -13457, -14324, -15058,\n  -15715, -16438, -17145, -17619,\n  -17889, -18247, -18760, -19158,\n  -19345, -19701, -20465, -21212,\n  -10337, -11101, -11660, -11984,\n  -11984, -11660, -11101, -10337,\n   -9445,  -8463,  -7453,  -6429,\n   -5433,  -4469,  -3560,  -2700,\n   -1902,  -1159,   -483,    132,\n     668,   1119,   1476,   1725,\n    1852,   1841,   1698,   1442,\n    1097,    699,    272,   -160,\n    -576,   -961,  -1304,  -1591,\n   -1809,  -1953,  -2033,  -2036,\n   -1973,  -1851,  -1677,  -1449,\n   -1157,   -787,   -317,    254,\n     904,   1598,   2304,   2988,\n    3625,   4197,   4709,   5158,\n    5541,   5857,   6115,   6328,\n    6492,   6623,   6730,   6821,\n    6903,   6971,   7023,   7052,\n    7052,   7023,   6971,   6903,\n    6821,   6730,   6623,   6492,\n    6328,   6115,   5857,   5541,\n    5158,   4709,   4197,   3625,\n    2988,   2304,   1598,    904,\n     254,   -317,   -787,  -1157,\n   -1449,  -1677,  -1851,  -1973,\n   -2036,  -2033,  -1953,  -1809,\n   -1591,  -1304,   -961,   -576,\n    -160,    272,    699,   1097,\n    1442,   1698,   1841,   1852,\n    1725,   1476,   1119,    668,\n     132,   -483,  -1159,  -1902,\n   -2700,  -3560,  -4469,  -5433,\n   -6429,  -7453,  -8463,  -9445,\n  -10337, -11101, -11660, -11984,\n   -7356,  -8142,  -8738,  -9147,\n   -9147,  -8738,  -8142,  -7356,\n   -6493,  -5642,  -4760,  -3808,\n   -2841,  -1817,   -820,     24,\n     708,   1223,   1560,   1842,\n    2128,   2370,   2598,   2753,\n    2764,   2708,   2609,   2473,\n    2397,   2358,   2252,   2088,\n    1794,   1337,    809,    262,\n    -298,   -789,  -1254,  -1765,\n   -2292,  -2837,  -3366,  -3751,\n   -3953,  -3975,  -3763,  -3405,\n   -2965,  -2418,  -1799,  -1103,\n    -286,    599,   1471,   2299,\n    2994,   3533,   3988,   4364,\n    4676,   4985,   5225,   5347,\n    5384,   5318,   5198,   5143,\n    5143,   5198,   5318,   5384,\n    5347,   5225,   4985,   4676,\n    4364,   3988,   3533,   2994,\n    2299,   1471,    599,   -286,\n   -1103,  -1799,  -2418,  -2965,\n   -3405,  -3763,  -3975,  -3953,\n   -3751,  -3366,  -2837,  -2292,\n   -1765,  -1254,   -789,   -298,\n     262,    809,   1337,   1794,\n    2088,   2252,   2358,   2397,\n    2473,   2609,   2708,   2764,\n    2753,   2598,   2370,   2128,\n    1842,   1560,   1223,    708,\n      24,   -820,  -1817,  -2841,\n   -3808,  -4760,  -5642,  -6493,\n   -7356,  -8142,  -8738,  -9147,\n   -7261,  -8135,  -8813,  -9271,\n   -9271,  -8813,  -8135,  -7261,\n   -6313,  -5388,  -4450,  -3459,\n   -2474,  -1450,   -463,    395,\n    1136,   1760,   2253,   2728,\n    3233,   3713,   4177,   4563,\n    4779,   4897,   4948,   4939,\n    4953,   4986,   4963,   4906,\n    4757,   4476,   4154,   3801,\n    3404,   3017,   2589,   2017,\n    1313,    473,   -458,  -1316,\n   -2042,  -2607,  -2969,  -3195,\n   -3345,  -3368,  -3292,  -3121,\n   -2824,  -2456,  -2088,  -1744,\n   -1496,  -1333,  -1145,   -905,\n    -599,   -182,    233,    562,\n     824,    965,   1006,   1041,\n    1041,   1006,    965,    824,\n     562,    233,   -182,   -599,\n    -905,  -1145,  -1333,  -1496,\n   -1744,  -2088,  -2456,  -2824,\n   -3121,  -3292,  -3368,  -3345,\n   -3195,  -2969,  -2607,  -2042,\n   -1316,   -458,    473,   1313,\n    2017,   2589,   3017,   3404,\n    3801,   4154,   4476,   4757,\n    4906,   4963,   4986,   4953,\n    4939,   4948,   4897,   4779,\n    4563,   4177,   3713,   3233,\n    2728,   2253,   1760,   1136,\n     395,   -463,  -1450,  -2474,\n   -3459,  -4450,  -5388,  -6313,\n   -7261,  -8135,  -8813,  -9271,\n   -9051, -10030, -10829, -11318,\n  -11318, -10829, -10030,  -9051,\n   -8034,  -7037,  -6098,  -5215,\n   -4405,  -3660,  -2971,  -2315,\n   -1672,  -1028,   -357,    357,\n    1116,   1901,   2660,   3334,\n    3890,   4331,   4675,   4952,\n    5191,   5427,   5683,   5986,\n    6353,   6793,   7283,   7791,\n    8289,   8741,   9085,   9219,\n    9058,   8582,   7851,   6975,\n    6052,   5139,   4246,   3372,\n    2522,   1694,    878,     53,\n    -801,  -1701,  -2650,  -3653,\n   -4677,  -5629,  -6410,  -6921,\n   -7141,  -7124,  -6961,  -6737,\n   -6509,  -6313,  -6160,  -6072,\n   -6072,  -6160,  -6313,  -6509,\n   -6737,  -6961,  -7124,  -7141,\n   -6921,  -6410,  -5629,  -4677,\n   -3653,  -2650,  -1701,   -801,\n      53,    878,   1694,   2522,\n    3372,   4246,   5139,   6052,\n    6975,   7851,   8582,   9058,\n    9219,   9085,   8741,   8289,\n    7791,   7283,   6793,   6353,\n    5986,   5683,   5427,   5191,\n    4952,   4675,   4331,   3890,\n    3334,   2660,   1901,   1116,\n     357,   -357,  -1028,  -1672,\n   -2315,  -2971,  -3660,  -4405,\n   -5215,  -6098,  -7037,  -8034,\n   -9051, -10030, -10829, -11318,\n   -7729,  -8753,  -9617, -10144,\n  -10144,  -9617,  -8753,  -7729,\n   -6746,  -5902,  -5234,  -4703,\n   -4260,  -3845,  -3410,  -2917,\n   -2366,  -1755,  -1106,   -434,\n     226,    873,   1509,   2139,\n    2774,   3402,   3988,   4516,\n    4961,   5326,   5625,   5892,\n    6147,   6392,   6616,   6814,\n    6994,   7166,   7301,   7333,\n    7184,   6815,   6254,   5584,\n    4884,   4222,   3625,   3086,\n    2578,   2073,   1546,    955,\n     275,   -520,  -1441,  -2447,\n   -3460,  -4362,  -5062,  -5497,\n   -5677,  -5675,  -5584,  -5466,\n   -5360,  -5264,  -5193,  -5145,\n   -5145,  -5193,  -5264,  -5360,\n   -5466,  -5584,  -5675,  -5677,\n   -5497,  -5062,  -4362,  -3460,\n   -2447,  -1441,   -520,    275,\n     955,   1546,   2073,   2578,\n    3086,   3625,   4222,   4884,\n    5584,   6254,   6815,   7184,\n    7333,   7301,   7166,   6994,\n    6814,   6616,   6392,   6147,\n    5892,   5625,   5326,   4961,\n    4516,   3988,   3402,   2774,\n    2139,   1509,    873,    226,\n    -434,  -1106,  -1755,  -2366,\n   -2917,  -3410,  -3845,  -4260,\n   -4703,  -5234,  -5902,  -6746,\n   -7729,  -8753,  -9617, -10144,\n   -8206,  -9230, -10123, -10694,\n  -10694, -10123,  -9230,  -8206,\n   -7241,  -6436,  -5866,  -5474,\n   -5142,  -4767,  -4322,  -3788,\n   -3170,  -2517,  -1943,  -1503,\n   -1219,  -1049,   -931,   -770,\n    -476,    -30,    501,   1052,\n    1596,   2091,   2500,   2834,\n    3129,   3409,   3665,   3922,\n    4228,   4585,   4933,   5209,\n    5391,   5436,   5317,   5058,\n    4742,   4434,   4147,   3865,\n    3592,   3298,   2945,   2515,\n    2024,   1478,    873,    254,\n    -288,   -680,   -909,   -961,\n    -841,   -622,   -394,   -191,\n     -10,    159,    276,    334,\n     334,    276,    159,    -10,\n    -191,   -394,   -622,   -841,\n    -961,   -909,   -680,   -288,\n     254,    873,   1478,   2024,\n    2515,   2945,   3298,   3592,\n    3865,   4147,   4434,   4742,\n    5058,   5317,   5436,   5391,\n    5209,   4933,   4585,   4228,\n    3922,   3665,   3409,   3129,\n    2834,   2500,   2091,   1596,\n    1052,    501,    -30,   -476,\n    -770,   -931,  -1049,  -1219,\n   -1503,  -1943,  -2517,  -3170,\n   -3788,  -4322,  -4767,  -5142,\n   -5474,  -5866,  -6436,  -7241,\n   -8206,  -9230, -10123, -10694,\n   -6999,  -7755,  -8427,  -8923,\n   -8923,  -8427,  -7755,  -6999,\n   -6118,  -5094,  -4086,  -3121,\n   -2127,  -1104,   -204,    526,\n    1157,   1668,   1948,   1972,\n    1817,   1533,   1118,    654,\n     260,    -19,   -265,   -447,\n    -486,   -374,   -188,     82,\n     526,   1140,   1816,   2525,\n    3306,   4077,   4676,   5055,\n    5294,   5407,   5317,   5008,\n    4591,   4099,   3476,   2713,\n    1889,   1049,    164,   -707,\n   -1444,  -1984,  -2361,  -2588,\n   -2607,  -2466,  -2256,  -1999,\n   -1619,  -1139,   -659,   -216,\n     231,    658,    951,   1076,\n    1076,    951,    658,    231,\n    -216,   -659,  -1139,  -1619,\n   -1999,  -2256,  -2466,  -2607,\n   -2588,  -2361,  -1984,  -1444,\n    -707,    164,   1049,   1889,\n    2713,   3476,   4099,   4591,\n    5008,   5317,   5407,   5294,\n    5055,   4676,   4077,   3306,\n    2525,   1816,   1140,    526,\n      82,   -188,   -374,   -486,\n    -447,   -265,    -19,    260,\n     654,   1118,   1533,   1817,\n    1972,   1948,   1668,   1157,\n     526,   -204,  -1104,  -2127,\n   -3121,  -4086,  -5094,  -6118,\n   -6999,  -7755,  -8427,  -8923,\n   -2844,  -3638,  -4433,  -5141,\n   -5141,  -4433,  -3638,  -2844,\n   -2286,  -2185,  -2159,  -1939,\n   -1471,   -570,    454,   1130,\n    1448,   1363,    942,    666,\n     711,    995,   1454,   1747,\n    1597,   1157,    548,     19,\n     -43,    303,    769,   1194,\n    1308,   1049,    713,    495,\n     590,   1109,   1695,   1990,\n    1934,   1443,    671,     67,\n    -210,   -168,    117,    237,\n     -22,   -527,  -1178,  -1705,\n   -1751,  -1383,   -850,   -355,\n    -189,   -395,   -666,   -809,\n    -609,     54,    835,   1409,\n    1696,   1564,   1160,    893,\n     893,   1160,   1564,   1696,\n    1409,    835,     54,   -609,\n    -809,   -666,   -395,   -189,\n    -355,   -850,  -1383,  -1751,\n   -1705,  -1178,   -527,    -22,\n     237,    117,   -168,   -210,\n      67,    671,   1443,   1934,\n    1990,   1695,   1109,    590,\n     495,    713,   1049,   1308,\n    1194,    769,    303,    -43,\n      19,    548,   1157,   1597,\n    1747,   1454,    995,    711,\n     666,    942,   1363,   1448,\n    1130,    454,   -570,  -1471,\n   -1939,  -2159,  -2185,  -2286,\n   -2844,  -3638,  -4433,  -5141,\n   -3499,  -4234,  -4919,  -5676,\n   -5676,  -4919,  -4234,  -3499,\n   -2475,  -1776,  -1488,   -959,\n    -283,    199,    783,   1452,\n    1692,   1531,   1241,    699,\n     -19,   -516,   -798,  -1050,\n   -1165,  -1178,  -1340,  -1552,\n   -1559,  -1425,  -1161,   -577,\n     185,    797,   1288,   1711,\n    1874,   1855,   1947,   2103,\n    2167,   2218,   2222,   1990,\n    1571,   1144,    753,    432,\n     247,    176,    147,    106,\n      26,    -67,   -112,   -103,\n     -45,     77,    244,    379,\n     448,    492,    531,    546,\n     576,    659,    731,    740,\n     740,    731,    659,    576,\n     546,    531,    492,    448,\n     379,    244,     77,    -45,\n    -103,   -112,    -67,     26,\n     106,    147,    176,    247,\n     432,    753,   1144,   1571,\n    1990,   2222,   2218,   2167,\n    2103,   1947,   1855,   1874,\n    1711,   1288,    797,    185,\n    -577,  -1161,  -1425,  -1559,\n   -1552,  -1340,  -1178,  -1165,\n   -1050,   -798,   -516,    -19,\n     699,   1241,   1531,   1692,\n    1452,    783,    199,   -283,\n    -959,  -1488,  -1776,  -2475,\n   -3499,  -4234,  -4919,  -5676,\n   -4975,  -5929,  -6953,  -7814,\n   -7814,  -6953,  -5929,  -4975,\n   -4095,  -3498,  -3165,  -2801,\n   -2343,  -1748,   -927,   -112,\n     395,    584,    450,    -12,\n    -578,  -1043,  -1379,  -1546,\n   -1586,  -1698,  -1954,  -2271,\n   -2634,  -2948,  -2988,  -2659,\n   -2114,  -1492,   -828,   -194,\n     358,    871,   1396,   1929,\n    2462,   2997,   3446,   3673,\n    3624,   3342,   2905,   2395,\n    1885,   1466,   1177,    951,\n     760,    672,    671,    659,\n     687,    866,   1188,   1607,\n    2136,   2736,   3302,   3774,\n    4108,   4264,   4286,   4264,\n    4264,   4286,   4264,   4108,\n    3774,   3302,   2736,   2136,\n    1607,   1188,    866,    687,\n     659,    671,    672,    760,\n     951,   1177,   1466,   1885,\n    2395,   2905,   3342,   3624,\n    3673,   3446,   2997,   2462,\n    1929,   1396,    871,    358,\n    -194,   -828,  -1492,  -2114,\n   -2659,  -2988,  -2948,  -2634,\n   -2271,  -1954,  -1698,  -1586,\n   -1546,  -1379,  -1043,   -578,\n     -12,    450,    584,    395,\n    -112,   -927,  -1748,  -2343,\n   -2801,  -3165,  -3498,  -4095,\n   -4975,  -5929,  -6953,  -7814,\n   -6928,  -7860,  -8704,  -9384,\n   -9384,  -8704,  -7860,  -6928,\n   -5904,  -5106,  -4608,  -4076,\n   -3452,  -2844,  -2190,  -1562,\n   -1224,  -1218,  -1480,  -2002,\n   -2616,  -3085,  -3386,  -3549,\n   -3533,  -3452,  -3467,  -3486,\n   -3391,  -3193,  -2836,  -2175,\n   -1312,   -460,    348,   1088,\n    1612,   1978,   2362,   2729,\n    3004,   3255,   3424,   3353,\n    3132,   2921,   2677,   2440,\n    2383,   2450,   2502,   2616,\n    2798,   2901,   2971,   3153,\n    3379,   3584,   3866,   4166,\n    4329,   4425,   4553,   4635,\n    4687,   4827,   4956,   4976,\n    4976,   4956,   4827,   4687,\n    4635,   4553,   4425,   4329,\n    4166,   3866,   3584,   3379,\n    3153,   2971,   2901,   2798,\n    2616,   2502,   2450,   2383,\n    2440,   2677,   2921,   3132,\n    3353,   3424,   3255,   3004,\n    2729,   2362,   1978,   1612,\n    1088,    348,   -460,  -1312,\n   -2175,  -2836,  -3193,  -3391,\n   -3486,  -3467,  -3452,  -3533,\n   -3549,  -3386,  -3085,  -2616,\n   -2002,  -1480,  -1218,  -1224,\n   -1562,  -2190,  -2844,  -3452,\n   -4076,  -4608,  -5106,  -5904,\n   -6928,  -7860,  -8704,  -9384,\n  -16974, -17487, -18008, -18713,\n  -18713, -18008, -17487, -16974,\n  -16042, -15133, -14387, -13406,\n  -12486, -11909, -11228, -10449,\n  -10067,  -9866,  -9521,  -9345,\n   -9338,  -9127,  -8879,  -8780,\n   -8488,  -7965,  -7559,  -7106,\n   -6363,  -5571,  -4792,  -3797,\n   -2773,  -1907,   -960,     50,\n     849,   1600,   2486,   3281,\n    3952,   4678,   5332,   5869,\n    6481,   7088,   7518,   7957,\n    8497,   8957,   9359,   9825,\n   10269,  10667,  11118,  11588,\n   12039,  12540,  13063,  13524,\n   13951,  14353,  14672,  14945,\n   15225,  15455,  15590,  15649,\n   15649,  15590,  15455,  15225,\n   14945,  14672,  14353,  13951,\n   13524,  13063,  12540,  12039,\n   11588,  11118,  10667,  10269,\n    9825,   9359,   8957,   8497,\n    7957,   7518,   7088,   6481,\n    5869,   5332,   4678,   3952,\n    3281,   2486,   1600,    849,\n      50,   -960,  -1907,  -2773,\n   -3797,  -4792,  -5571,  -6363,\n   -7106,  -7559,  -7965,  -8488,\n   -8780,  -8879,  -9127,  -9338,\n   -9345,  -9521,  -9866, -10067,\n  -10449, -11228, -11909, -12486,\n  -13406, -14387, -15133, -16042,\n  -16974, -17487, -18008, -18713,\n  -14011, -14613, -15136, -15657,\n  -15657, -15136, -14613, -14011,\n  -13172, -12423, -11878, -11211,\n  -10454,  -9817,  -9210,  -8588,\n   -8172,  -7972,  -7850,  -7817,\n   -7880,  -7863,  -7734,  -7569,\n   -7307,  -6891,  -6456,  -5988,\n   -5364,  -4639,  -3897,  -2997,\n   -1973,  -1043,   -164,    744,\n    1491,   2053,   2645,   3209,\n    3628,   4073,   4584,   4979,\n    5296,   5667,   5992,   6248,\n    6603,   7042,   7464,   7948,\n    8491,   8953,   9374,   9835,\n   10235,  10536,  10889,  11248,\n   11476,  11698,  11981,  12136,\n   12182,  12314,  12400,  12336,\n   12336,  12400,  12314,  12182,\n   12136,  11981,  11698,  11476,\n   11248,  10889,  10536,  10235,\n    9835,   9374,   8953,   8491,\n    7948,   7464,   7042,   6603,\n    6248,   5992,   5667,   5296,\n    4979,   4584,   4073,   3628,\n    3209,   2645,   2053,   1491,\n     744,   -164,  -1043,  -1973,\n   -2997,  -3897,  -4639,  -5364,\n   -5988,  -6456,  -6891,  -7307,\n   -7569,  -7734,  -7863,  -7880,\n   -7817,  -7850,  -7972,  -8172,\n   -8588,  -9210,  -9817, -10454,\n  -11211, -11878, -12423, -13172,\n  -14011, -14613, -15136, -15657,\n  -17928, -18524, -19085, -19500,\n  -19500, -19085, -18524, -17928,\n  -17359, -16925, -16636, -16302,\n  -15809, -15174, -14445, -13676,\n  -12968, -12408, -11990, -11619,\n  -11197, -10706, -10120,  -9401,\n   -8619,  -7877,  -7183,  -6488,\n   -5787,  -5039,  -4187,  -3219,\n   -2195,  -1182,   -203,    726,\n    1573,   2351,   3147,   3977,\n    4790,   5583,   6365,   7080,\n    7685,   8235,   8766,   9280,\n    9800,  10358,  10922,  11453,\n   11934,  12372,  12789,  13180,\n   13559,  13954,  14351,  14698,\n   14992,  15255,  15465,  15614,\n   15738,  15860,  15938,  15964,\n   15964,  15938,  15860,  15738,\n   15614,  15465,  15255,  14992,\n   14698,  14351,  13954,  13559,\n   13180,  12789,  12372,  11934,\n   11453,  10922,  10358,   9800,\n    9280,   8766,   8235,   7685,\n    7080,   6365,   5583,   4790,\n    3977,   3147,   2351,   1573,\n     726,   -203,  -1182,  -2195,\n   -3219,  -4187,  -5039,  -5787,\n   -6488,  -7183,  -7877,  -8619,\n   -9401, -10120, -10706, -11197,\n  -11619, -11990, -12408, -12968,\n  -13676, -14445, -15174, -15809,\n  -16302, -16636, -16925, -17359,\n  -17928, -18524, -19085, -19500,\n  -19438, -19943, -20335, -20614,\n  -20614, -20335, -19943, -19438,\n  -18847, -18248, -17664, -17032,\n  -16358, -15675, -14985, -14302,\n  -13663, -13078, -12560, -12073,\n  -11570, -11033, -10445,  -9775,\n   -9040,  -8285,  -7516,  -6706,\n   -5865,  -4995,  -4071,  -3080,\n   -2056,  -1035,    -22,    966,\n    1890,   2764,   3623,   4465,\n    5266,   6042,   6801,   7504,\n    8139,   8741,   9313,   9859,\n   10398,  10947,  11492,  12010,\n   12497,  12955,  13393,  13805,\n   14184,  14556,  14907,  15205,\n   15471,  15724,  15928,  16083,\n   16223,  16333,  16398,  16430,\n   16430,  16398,  16333,  16223,\n   16083,  15928,  15724,  15471,\n   15205,  14907,  14556,  14184,\n   13805,  13393,  12955,  12497,\n   12010,  11492,  10947,  10398,\n    9859,   9313,   8741,   8139,\n    7504,   6801,   6042,   5266,\n    4465,   3623,   2764,   1890,\n     966,    -22,  -1035,  -2056,\n   -3080,  -4071,  -4995,  -5865,\n   -6706,  -7516,  -8285,  -9040,\n   -9775, -10445, -11033, -11570,\n  -12073, -12560, -13078, -13663,\n  -14302, -14985, -15675, -16358,\n  -17032, -17664, -18248, -18847,\n  -19438, -19943, -20335, -20614,\n  -19700, -20124, -20524, -20851,\n  -20851, -20524, -20124, -19700,\n  -19248, -18865, -18582, -18231,\n  -17721, -17077, -16326, -15483,\n  -14628, -13844, -13139, -12453,\n  -11728, -10929, -10037,  -9045,\n   -8021,  -7054,  -6156,  -5281,\n   -4421,  -3564,  -2645,  -1651,\n    -674,    240,   1136,   1993,\n    2753,   3471,   4225,   4990,\n    5728,   6461,   7173,   7802,\n    8352,   8868,   9379,   9902,\n   10436,  10966,  11475,  11934,\n   12325,  12680,  13038,  13382,\n   13710,  14048,  14371,  14634,\n   14848,  15035,  15177,  15283,\n   15394,  15519,  15615,  15660,\n   15660,  15615,  15519,  15394,\n   15283,  15177,  15035,  14848,\n   14634,  14371,  14048,  13710,\n   13382,  13038,  12680,  12325,\n   11934,  11475,  10966,  10436,\n    9902,   9379,   8868,   8352,\n    7802,   7173,   6461,   5728,\n    4990,   4225,   3471,   2753,\n    1993,   1136,    240,   -674,\n   -1651,  -2645,  -3564,  -4421,\n   -5281,  -6156,  -7054,  -8021,\n   -9045, -10037, -10929, -11728,\n  -12453, -13139, -13844, -14628,\n  -15483, -16326, -17077, -17721,\n  -18231, -18582, -18865, -19248,\n  -19700, -20124, -20524, -20851,\n   16913,  17897,  18905,  19929,\n   19097,  18274,  17466,  16667,\n   15875,  15100,  14333,  13573,\n   12822,  12087,  11360,  10641,\n    9938,   9243,   8556,   7885,\n    7222,   6575,   5936,   5305,\n    4691,   4084,   3493,   2911,\n    2344,   1786,   1243,    709,\n     191,   -319,   -814,  -1300,\n   -1770,  -2232,  -2678,  -3116,\n   -3538,  -3952,  -4350,  -4731,\n   -5105,  -5463,  -5812,  -6146,\n   -6463,  -6773,  -7066,  -7344,\n   -7613,  -7866,  -8103,  -8332,\n   -8545,  -8742,  -8931,  -9104,\n   -9261,  -9402,  -9535,  -9651,\n   -9752,  -9836,  -9905,  -9965,\n  -10010, -10038, -10050, -10046,\n  -10026,  -9999,  -9955,  -9894,\n   -9818,  -9726,  -9618,  -9494,\n   -9353,  -9197,  -9024,  -8836,\n   -8631,  -8418,  -8190,  -7945,\n   -7684,  -7407,  -7114,  -6797,\n   -6464,  -6114,  -5749,  -5368,\n   -4970,  -4557,  -4127,  -3682,\n   -3220,  -2742,  -2248,  -1730,\n   -1196,   -646,    -80,    502,\n    1100,   1723,   2361,   3016,\n    3686,   4373,   5083,   5810,\n    6553,   7312,   8095,   8894,\n    9709,  10548,  11404,  12275,\n   13163,  14074,  15002,  15945,\n   16913,  17897,  18905,  19929,\n   29437,  30461,  31485,  32509,\n   31501,  30493,  29485,  28477,\n   27469,  26461,  25453,  24445,\n   23436,  22428,  21420,  20412,\n   19404,  18396,  17388,  16380,\n   15372,  14364,  13356,  12348,\n   11340,  10332,   9324,   8316,\n    7307,   6299,   5291,   4283,\n    3275,   2267,   1259,    251,\n    -757,  -1765,  -2773,  -3781,\n   -4789,  -5797,  -6805,  -7813,\n   -8822,  -9830, -10838, -11846,\n  -12854, -13862, -14870, -15878,\n  -16886, -17894, -18902, -19910,\n  -20918, -21926, -22934, -23942,\n  -24951, -25959, -26967, -27975,\n  -28983, -29991, -30999, -32007,\n  -32003, -30979, -29955, -28931,\n  -27907, -26883, -25859, -24835,\n  -23811, -22787, -21763, -20739,\n  -19715, -18691, -17667, -16643,\n  -15619, -14595, -13571, -12547,\n  -11523, -10499,  -9475,  -8451,\n   -7427,  -6403,  -5379,  -4355,\n   -3331,  -2307,  -1283,   -259,\n     765,   1789,   2813,   3837,\n    4861,   5885,   6909,   7933,\n    8957,   9981,  11005,  12029,\n   13053,  14077,  15101,  16125,\n   17149,  18173,  19197,  20221,\n   21245,  22269,  23293,  24317,\n   25341,  26365,  27389,  28413,\n   29437,  30461,  31485,  32509,\n    9219,  10122,  11074,  12083,\n   11059,  10083,   9163,   8292,\n    7469,   6694,   5975,   5304,\n    4682,   4100,   3566,   3080,\n    2634,   2229,   1863,   1538,\n    1253,   1000,    779,    591,\n     434,    302,    194,    109,\n      49,      5,    -23,    -35,\n     -39,    -34,    -22,    -10,\n      10,     22,     34,     39,\n      35,     23,     -5,    -49,\n    -109,   -194,   -302,   -434,\n    -591,   -779,  -1000,  -1253,\n   -1538,  -1863,  -2229,  -2634,\n   -3080,  -3566,  -4100,  -4682,\n   -5304,  -5975,  -6694,  -7469,\n   -8292,  -9163, -10083, -11059,\n  -12083, -11074, -10122,  -9219,\n   -8363,  -7556,  -6805,  -6102,\n   -5447,  -4832,  -4266,  -3748,\n   -3270,  -2832,  -2434,  -2076,\n   -1759,  -1474,  -1221,  -1000,\n    -811,   -646,   -505,   -389,\n    -296,   -220,   -159,   -115,\n     -79,    -51,    -30,    -10,\n      10,     30,     51,     79,\n     115,    159,    220,    296,\n     389,    505,    646,    811,\n    1000,   1221,   1474,   1759,\n    2076,   2434,   2832,   3270,\n    3748,   4266,   4832,   5447,\n    6102,   6805,   7556,   8363,\n    9219,  10122,  11074,  12083,\n  -19411, -19801, -20191, -20580,\n  -20577, -20573, -20570, -20566,\n  -20563, -20559, -20556, -20552,\n  -20163, -19775, -19386, -18997,\n  -18608, -18219, -17830, -17442,\n  -16716, -15990, -15264, -14538,\n  -13812, -13086, -12360, -11634,\n  -10691,  -9748,  -8806,  -7863,\n   -6920,  -5977,  -5035,  -4092,\n   -3069,  -2046,  -1023,      0,\n    1023,   2046,   3069,   4092,\n    5035,   5977,   6920,   7863,\n    8806,   9748,  10691,  11634,\n   12360,  13086,  13812,  14538,\n   15264,  15990,  16716,  17442,\n   17830,  18219,  18608,  18997,\n   19386,  19775,  20163,  20552,\n   20556,  20559,  20563,  20566,\n   20570,  20573,  20577,  20580,\n   20191,  19801,  19411,  19021,\n   18631,  18241,  17852,  17462,\n   16735,  16008,  15281,  14554,\n   13827,  13100,  12373,  11646,\n   10702,   9758,   8815,   7871,\n    6927,   5983,   5040,   4096,\n    3072,   2048,   1024,      0,\n   -1024,  -2048,  -3072,  -4096,\n   -5040,  -5983,  -6927,  -7871,\n   -8815,  -9758, -10702, -11646,\n  -12373, -13100, -13827, -14554,\n  -15281, -16008, -16735, -17462,\n  -17852, -18241, -18631, -19021,\n  -19411, -19801, -20191, -20580,\n  -20556, -20705, -20805, -20857,\n  -20861, -20809, -20709, -20560,\n  -20364, -20119, -19817, -19476,\n  -19087, -18649, -18163, -17637,\n  -17071, -16464, -15818, -15131,\n  -14404, -13645, -12854, -12031,\n  -11176, -10296,  -9393,  -8465,\n   -7521,  -6554,  -5570,  -4578,\n   -3570,  -2554,  -1538,   -514,\n     510,   1534,   2550,   3566,\n    4574,   5566,   6550,   7517,\n    8461,   9389,  10292,  11172,\n   12027,  12850,  13641,  14400,\n   15127,  15814,  16460,  17067,\n   17633,  18159,  18645,  19083,\n   19472,  19813,  20115,  20360,\n   20556,  20705,  20805,  20857,\n   20861,  20809,  20709,  20560,\n   20364,  20119,  19817,  19476,\n   19087,  18649,  18163,  17637,\n   17071,  16464,  15818,  15131,\n   14404,  13645,  12854,  12031,\n   11176,  10296,   9393,   8465,\n    7521,   6554,   5570,   4578,\n    3570,   2554,   1538,    514,\n    -510,  -1534,  -2550,  -3566,\n   -4574,  -5566,  -6550,  -7517,\n   -8461,  -9389, -10292, -11172,\n  -12027, -12850, -13641, -14400,\n  -15127, -15814, -16460, -17067,\n  -17633, -18159, -18645, -19083,\n  -19472, -19813, -20115, -20360,\n  -20556, -20705, -20805, -20857,\n  -13901, -13905, -13909, -13913,\n  -13910, -13906, -13902, -13898,\n  -13894, -13882, -13854, -13818,\n  -13757, -13681, -13573, -13432,\n  -13260, -13047, -12786, -12477,\n  -12112, -11698, -11228, -10694,\n  -10104,  -9458,  -8755,  -7996,\n   -7189,  -6334,  -5439,  -4503,\n   -3535,  -2544,  -1536,   -512,\n     512,   1536,   2544,   3535,\n    4503,   5439,   6334,   7189,\n    7996,   8755,   9458,  10104,\n   10694,  11228,  11698,  12112,\n   12477,  12786,  13047,  13260,\n   13432,  13573,  13681,  13757,\n   13818,  13854,  13882,  13894,\n   13898,  13902,  13906,  13910,\n   13913,  13909,  13905,  13901,\n   13897,  13885,  13857,  13821,\n   13760,  13684,  13576,  13435,\n   13262,  13049,  12788,  12479,\n   12114,  11700,  11230,  10696,\n   10106,   9459,   8756,   7997,\n    7190,   6335,   5439,   4504,\n    3536,   2544,   1536,    512,\n    -512,  -1536,  -2544,  -3536,\n   -4504,  -5439,  -6335,  -7190,\n   -7997,  -8756,  -9459, -10106,\n  -10696, -11230, -11700, -12114,\n  -12479, -12788, -13049, -13262,\n  -13435, -13576, -13684, -13760,\n  -13821, -13857, -13885, -13897,\n  -13901, -13905, -13909, -13913,\n  -11131, -11135, -11139, -11143,\n  -11139, -11135, -11131, -11127,\n  -11123, -11119, -11115, -11111,\n  -11099, -11087, -11067, -11031,\n  -10979, -10903, -10794, -10654,\n  -10473, -10244,  -9959,  -9618,\n   -9213,  -8735,  -8185,  -7571,\n   -6884,  -6125,  -5302,  -4423,\n   -3495,  -2528,  -1528,   -512,\n     512,   1528,   2528,   3495,\n    4423,   5302,   6125,   6884,\n    7571,   8185,   8735,   9213,\n    9618,   9959,  10244,  10473,\n   10654,  10794,  10903,  10979,\n   11031,  11067,  11087,  11099,\n   11111,  11115,  11119,  11123,\n   11127,  11131,  11135,  11139,\n   11143,  11139,  11135,  11131,\n   11127,  11122,  11118,  11114,\n   11102,  11090,  11070,  11034,\n   10981,  10905,  10797,  10656,\n   10475,  10246,   9961,   9620,\n    9214,   8736,   8186,   7572,\n    6885,   6126,   5303,   4423,\n    3496,   2528,   1528,    512,\n    -512,  -1528,  -2528,  -3496,\n   -4423,  -5303,  -6126,  -6885,\n   -7572,  -8186,  -8736,  -9214,\n   -9620,  -9961, -10246, -10475,\n  -10656, -10797, -10905, -10981,\n  -11034, -11070, -11090, -11102,\n  -11114, -11118, -11122, -11127,\n  -11131, -11135, -11139, -11143,\n    2976,   2016,   1024,      0,\n   -1024,  -2016,  -2976,  -3903,\n   -4799,  -5662,  -6493,  -7292,\n   -8059,  -8794,  -9497, -10160,\n  -10790, -11388, -11955, -12489,\n  -12991, -13461, -13898, -14304,\n  -14677, -15019, -15328, -15605,\n  -15850, -16063, -16243, -16392,\n  -16508, -16593, -16645, -16665,\n  -16645, -16593, -16508, -16392,\n  -16243, -16063, -15850, -15605,\n  -15328, -15019, -14677, -14304,\n  -13898, -13461, -12991, -12489,\n  -11955, -11388, -10790, -10160,\n   -9497,  -8794,  -8059,  -7292,\n   -6493,  -5662,  -4799,  -3903,\n   -2976,  -2016,  -1024,      0,\n    1024,   2016,   2976,   3903,\n    4799,   5662,   6493,   7292,\n    8059,   8794,   9497,  10160,\n   10790,  11388,  11955,  12489,\n   12991,  13461,  13898,  14304,\n   14677,  15019,  15328,  15605,\n   15850,  16063,  16243,  16392,\n   16508,  16593,  16645,  16665,\n   16645,  16593,  16508,  16392,\n   16243,  16063,  15850,  15605,\n   15328,  15019,  14677,  14304,\n   13898,  13461,  12991,  12489,\n   11955,  11388,  10790,  10160,\n    9497,   8794,   8059,   7292,\n    6493,   5662,   4799,   3903,\n    2976,   2016,   1024,      0,\n    7102,   8045,   9029,  10053,\n    9222,   8406,   7614,   6847,\n    6096,   5368,   4665,   3978,\n    3315,   2676,   2061,   1471,\n     904,    362,   -157,   -651,\n   -1121,  -1568,  -1990,  -2387,\n   -2761,  -3103,  -3420,  -3714,\n   -3975,  -4212,  -4418,  -4599,\n   -4747,  -4872,  -4965,  -5033,\n   -5070,  -5074,  -5046,  -4994,\n   -4910,  -4794,  -4646,  -4465,\n   -4252,  -4008,  -3731,  -3422,\n   -3081,  -2707,  -2302,  -1864,\n   -1387,   -877,   -335,    248,\n     862,   1516,   2203,   2930,\n    3689,   4488,   5319,   6190,\n    7102,   8045,   9029,  10053,\n    9222,   8406,   7614,   6847,\n    6096,   5368,   4665,   3978,\n    3315,   2676,   2061,   1471,\n     904,    362,   -157,   -651,\n   -1121,  -1568,  -1990,  -2387,\n   -2761,  -3103,  -3420,  -3714,\n   -3975,  -4212,  -4418,  -4599,\n   -4747,  -4872,  -4965,  -5033,\n   -5070,  -5074,  -5046,  -4994,\n   -4910,  -4794,  -4646,  -4465,\n   -4252,  -4008,  -3731,  -3422,\n   -3081,  -2707,  -2302,  -1864,\n   -1387,   -877,   -335,    248,\n     862,   1516,   2203,   2930,\n    3689,   4488,   5319,   6190,\n    7102,   8045,   9029,  10053,\n   13051,  14075,  15099,  16123,\n   15131,  14138,  13146,  12154,\n   11161,  10169,   9176,   8184,\n    7192,   6199,   5207,   4215,\n    3222,   2230,   1238,    245,\n    -747,  -1740,  -2732,  -3724,\n   -4717,  -5709,  -6701,  -7694,\n   -8686,  -9679, -10671, -11663,\n  -12656, -13648, -14640, -15633,\n  -15621, -14597, -13573, -12549,\n  -11525, -10501,  -9477,  -8453,\n   -7429,  -6405,  -5381,  -4357,\n   -3333,  -2309,  -1285,   -261,\n     763,   1787,   2811,   3835,\n    4859,   5883,   6907,   7931,\n    8955,   9979,  11003,  12027,\n   13051,  14075,  15099,  16123,\n   15131,  14138,  13146,  12154,\n   11161,  10169,   9176,   8184,\n    7192,   6199,   5207,   4215,\n    3222,   2230,   1238,    245,\n    -747,  -1740,  -2732,  -3724,\n   -4717,  -5709,  -6701,  -7694,\n   -8686,  -9679, -10671, -11663,\n  -12656, -13648, -14640, -15633,\n  -15621, -14597, -13573, -12549,\n  -11525, -10501,  -9477,  -8453,\n   -7429,  -6405,  -5381,  -4357,\n   -3333,  -2309,  -1285,   -261,\n     763,   1787,   2811,   3835,\n    4859,   5883,   6907,   7931,\n    8955,   9979,  11003,  12027,\n   13051,  14075,  15099,  16123,\n    3484,   4267,   5155,   6139,\n    5115,   4196,   3381,   2662,\n    2040,   1514,   1076,    719,\n     442,    237,     89,     -3,\n     -47,    -59,    -47,    -18,\n      18,     47,     59,     47,\n       3,    -89,   -237,   -442,\n    -719,  -1076,  -1514,  -2040,\n   -2662,  -3381,  -4196,  -5115,\n   -6139,  -5155,  -4267,  -3484,\n   -2796,  -2206,  -1703,  -1281,\n    -940,   -670,   -457,   -300,\n    -184,   -107,    -55,    -18,\n      18,     55,    107,    184,\n     300,    457,    670,    940,\n    1281,   1703,   2206,   2796,\n    3484,   4267,   5155,   6139,\n    5115,   4196,   3381,   2662,\n    2040,   1514,   1076,    719,\n     442,    237,     89,     -3,\n     -47,    -59,    -47,    -18,\n      18,     47,     59,     47,\n       3,    -89,   -237,   -442,\n    -719,  -1076,  -1514,  -2040,\n   -2662,  -3381,  -4196,  -5115,\n   -6139,  -5155,  -4267,  -3484,\n   -2796,  -2206,  -1703,  -1281,\n    -940,   -670,   -457,   -300,\n    -184,   -107,    -55,    -18,\n      18,     55,    107,    184,\n     300,    457,    670,    940,\n    1281,   1703,   2206,   2796,\n    3484,   4267,   5155,   6139,\n   -9121,  -9511,  -9900, -10290,\n  -10287, -10283, -10280, -10276,\n   -9887,  -9498,  -9110,  -8721,\n   -7995,  -7269,  -6543,  -5817,\n   -4874,  -3931,  -2989,  -2046,\n   -1023,      0,   1023,   2046,\n    2989,   3931,   4874,   5817,\n    6543,   7269,   7995,   8721,\n    9110,   9498,   9887,  10276,\n   10280,  10283,  10287,  10290,\n    9900,   9511,   9121,   8731,\n    8004,   7277,   6550,   5823,\n    4879,   3935,   2992,   2048,\n    1024,      0,  -1024,  -2048,\n   -2992,  -3935,  -4879,  -5823,\n   -6550,  -7277,  -8004,  -8731,\n   -9121,  -9511,  -9900, -10290,\n  -10287, -10283, -10280, -10276,\n   -9887,  -9498,  -9110,  -8721,\n   -7995,  -7269,  -6543,  -5817,\n   -4874,  -3931,  -2989,  -2046,\n   -1023,      0,   1023,   2046,\n    2989,   3931,   4874,   5817,\n    6543,   7269,   7995,   8721,\n    9110,   9498,   9887,  10276,\n   10280,  10283,  10287,  10290,\n    9900,   9511,   9121,   8731,\n    8004,   7277,   6550,   5823,\n    4879,   3935,   2992,   2048,\n    1024,      0,  -1024,  -2048,\n   -2992,  -3935,  -4879,  -5823,\n   -6550,  -7277,  -8004,  -8731,\n   -9121,  -9511,  -9900, -10290,\n   -9829, -10130, -10327, -10427,\n  -10424, -10323, -10127,  -9826,\n   -9436,  -8951,  -8385,  -7738,\n   -7012,  -6221,  -5366,  -4462,\n   -3519,  -2535,  -1528,   -512,\n     512,   1528,   2535,   3519,\n    4462,   5366,   6221,   7012,\n    7738,   8385,   8951,   9436,\n    9826,  10127,  10323,  10424,\n   10427,  10327,  10130,   9829,\n    9439,   8953,   8387,   7740,\n    7013,   6222,   5367,   4463,\n    3520,   2536,   1528,    512,\n    -512,  -1528,  -2536,  -3520,\n   -4463,  -5367,  -6222,  -7013,\n   -7740,  -8387,  -8953,  -9439,\n   -9829, -10130, -10327, -10427,\n  -10424, -10323, -10127,  -9826,\n   -9436,  -8951,  -8385,  -7738,\n   -7012,  -6221,  -5366,  -4462,\n   -3519,  -2535,  -1528,   -512,\n     512,   1528,   2535,   3519,\n    4462,   5366,   6221,   7012,\n    7738,   8385,   8951,   9436,\n    9826,  10127,  10323,  10424,\n   10427,  10327,  10130,   9829,\n    9439,   8953,   8387,   7740,\n    7013,   6222,   5367,   4463,\n    3520,   2536,   1528,    512,\n    -512,  -1528,  -2536,  -3520,\n   -4463,  -5367,  -6222,  -7013,\n   -7740,  -8387,  -8953,  -9439,\n   -9829, -10130, -10327, -10427,\n   -6922,  -6950,  -6954,  -6958,\n   -6954,  -6950,  -6947,  -6919,\n   -6859,  -6750,  -6578,  -6317,\n   -5952,  -5482,  -4892,  -4189,\n   -3382,  -2487,  -1520,   -512,\n     512,   1520,   2487,   3382,\n    4189,   4892,   5482,   5952,\n    6317,   6578,   6750,   6859,\n    6919,   6947,   6950,   6954,\n    6958,   6954,   6950,   6922,\n    6861,   6753,   6580,   6319,\n    5953,   5484,   4893,   4190,\n    3383,   2488,   1520,    512,\n    -512,  -1520,  -2488,  -3383,\n   -4190,  -4893,  -5484,  -5953,\n   -6319,  -6580,  -6753,  -6861,\n   -6922,  -6950,  -6954,  -6958,\n   -6954,  -6950,  -6947,  -6919,\n   -6859,  -6750,  -6578,  -6317,\n   -5952,  -5482,  -4892,  -4189,\n   -3382,  -2487,  -1520,   -512,\n     512,   1520,   2487,   3382,\n    4189,   4892,   5482,   5952,\n    6317,   6578,   6750,   6859,\n    6919,   6947,   6950,   6954,\n    6958,   6954,   6950,   6922,\n    6861,   6753,   6580,   6319,\n    5953,   5484,   4893,   4190,\n    3383,   2488,   1520,    512,\n    -512,  -1520,  -2488,  -3383,\n   -4190,  -4893,  -5484,  -5953,\n   -6319,  -6580,  -6753,  -6861,\n   -6922,  -6950,  -6954,  -6958,\n   -5565,  -5569,  -5573,  -5577,\n   -5573,  -5569,  -5565,  -5561,\n   -5550,  -5530,  -5478,  -5369,\n   -5189,  -4904,  -4498,  -3948,\n   -3262,  -2439,  -1512,   -512,\n     512,   1512,   2439,   3262,\n    3948,   4498,   4904,   5189,\n    5369,   5478,   5530,   5550,\n    5561,   5565,   5569,   5573,\n    5577,   5573,   5569,   5565,\n    5552,   5532,   5480,   5371,\n    5191,   4905,   4500,   3950,\n    3263,   2440,   1512,    512,\n    -512,  -1512,  -2440,  -3263,\n   -3950,  -4500,  -4905,  -5191,\n   -5371,  -5480,  -5532,  -5552,\n   -5565,  -5569,  -5573,  -5577,\n   -5573,  -5569,  -5565,  -5561,\n   -5550,  -5530,  -5478,  -5369,\n   -5189,  -4904,  -4498,  -3948,\n   -3262,  -2439,  -1512,   -512,\n     512,   1512,   2439,   3262,\n    3948,   4498,   4904,   5189,\n    5369,   5478,   5530,   5550,\n    5561,   5565,   5569,   5573,\n    5577,   5573,   5569,   5565,\n    5552,   5532,   5480,   5371,\n    5191,   4905,   4500,   3950,\n    3263,   2440,   1512,    512,\n    -512,  -1512,  -2440,  -3263,\n   -3950,  -4500,  -4905,  -5191,\n   -5371,  -5480,  -5532,  -5552,\n   -5565,  -5569,  -5573,  -5577,\n    3044,   2181,   1253,    261,\n    -763,  -1723,  -2618,  -3449,\n   -4216,  -4919,  -5550,  -6116,\n   -6618,  -7056,  -7429,  -7738,\n   -7983,  -8164,  -8280,  -8333,\n   -8312,  -8228,  -8080,  -7867,\n   -7590,  -7248,  -6843,  -6373,\n   -5839,  -5240,  -4578,  -3843,\n   -3044,  -2181,  -1253,   -261,\n     763,   1723,   2618,   3449,\n    4216,   4919,   5550,   6116,\n    6618,   7056,   7429,   7738,\n    7983,   8164,   8280,   8333,\n    8312,   8228,   8080,   7867,\n    7590,   7248,   6843,   6373,\n    5839,   5240,   4578,   3843,\n    3044,   2181,   1253,    261,\n    -763,  -1723,  -2618,  -3449,\n   -4216,  -4919,  -5550,  -6116,\n   -6618,  -7056,  -7429,  -7738,\n   -7983,  -8164,  -8280,  -8333,\n   -8312,  -8228,  -8080,  -7867,\n   -7590,  -7248,  -6843,  -6373,\n   -5839,  -5240,  -4578,  -3843,\n   -3044,  -2181,  -1253,   -261,\n     763,   1723,   2618,   3449,\n    4216,   4919,   5550,   6116,\n    6618,   7056,   7429,   7738,\n    7983,   8164,   8280,   8333,\n    8312,   8228,   8080,   7867,\n    7590,   7248,   6843,   6373,\n    5839,   5240,   4578,   3843,\n    3044,   2181,   1253,    261,\n};\n\n\nconst int16_t* const wavetables_table[] FLASHMEM = {\n  wav_integrated_waves,\n};\n\n\n}  // namespace plaits\n"
  },
  {
    "path": "lib/plaits/resources.h",
    "content": "// Copyright 2016 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef PLAITS_RESOURCES_H_\n#define PLAITS_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace plaits {\n\ntypedef uint8_t ResourceId;\n\nextern const uint8_t* const fm_patches_table[];\n\nextern const float* const lookup_table_table[];\n\nextern const int16_t* const lookup_table_i16_table[];\n\nextern const int32_t* const lookup_table_i32_table[];\n\nextern const int8_t* const lookup_table_i8_table[];\n\nextern const int16_t* const wavetables_table[];\n\nextern const uint8_t syx_bank_0[];\nextern const uint8_t syx_bank_1[];\nextern const uint8_t syx_bank_2[];\nextern const float lut_sine[];\nextern const float lut_fm_frequency_quantizer[];\nextern const float lut_fold[];\nextern const float lut_fold_2[];\nextern const float lut_stiffness[];\nextern const float lut_svf_shift[];\nextern const float lut_4x_downsampler_fir[];\nextern const int16_t lut_ws_inverse_tan[];\nextern const int16_t lut_ws_inverse_sin[];\nextern const int16_t lut_ws_linear[];\nextern const int16_t lut_ws_bump[];\nextern const int16_t lut_ws_double_bump[];\nextern const int8_t lut_lpc_excitation_pulse[];\nextern const int16_t wav_integrated_waves[];\n#define SYX_BANK_0 0\n#define SYX_BANK_0_SIZE 4096\n#define SYX_BANK_1 1\n#define SYX_BANK_1_SIZE 4096\n#define SYX_BANK_2 2\n#define SYX_BANK_2_SIZE 4096\n#define LUT_SINE 0\n#define LUT_SINE_SIZE 641\n#define LUT_FM_FREQUENCY_QUANTIZER 1\n#define LUT_FM_FREQUENCY_QUANTIZER_SIZE 130\n#define LUT_FOLD 2\n#define LUT_FOLD_SIZE 516\n#define LUT_FOLD_2 3\n#define LUT_FOLD_2_SIZE 516\n#define LUT_STIFFNESS 4\n#define LUT_STIFFNESS_SIZE 65\n#define LUT_SVF_SHIFT 5\n#define LUT_SVF_SHIFT_SIZE 257\n#define LUT_4X_DOWNSAMPLER_FIR 6\n#define LUT_4X_DOWNSAMPLER_FIR_SIZE 4\n#define LUT_WS_INVERSE_TAN 0\n#define LUT_WS_INVERSE_TAN_SIZE 257\n#define LUT_WS_INVERSE_SIN 1\n#define LUT_WS_INVERSE_SIN_SIZE 257\n#define LUT_WS_LINEAR 2\n#define LUT_WS_LINEAR_SIZE 257\n#define LUT_WS_BUMP 3\n#define LUT_WS_BUMP_SIZE 257\n#define LUT_WS_DOUBLE_BUMP 4\n#define LUT_WS_DOUBLE_BUMP_SIZE 257\n#define LUT_WS_DOUBLE_BUMP_SENTINEL 5\n#define LUT_WS_DOUBLE_BUMP_SENTINEL_SIZE 257\n#define LUT_LPC_EXCITATION_PULSE 0\n#define LUT_LPC_EXCITATION_PULSE_SIZE 640\n#define WAV_INTEGRATED_WAVES 0\n#define WAV_INTEGRATED_WAVES_SIZE 25344\n\n}  // namespace plaits\n\n#endif  // PLAITS_RESOURCES_H_\n"
  },
  {
    "path": "lib/rings/dsp/dsp.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Utility DSP routines.\n\n#ifndef RINGS_DSP_DSP_H_\n#define RINGS_DSP_DSP_H_\n\n#include \"stmlib/stmlib.h\"\n\n// #define MIC_W\n#define BRYAN_CHORDS\n\nnamespace rings {\n  \nstatic const float kSampleRate = 48000.0f;\nconst float a3 = 440.0f / kSampleRate;\nconst size_t kMaxBlockSize = 24;\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_DSP_H_\n"
  },
  {
    "path": "lib/rings/dsp/fm_voice.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FM Voice.\n\n#include \"rings/dsp/fm_voice.h\"\n\n#include <cmath>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n\n#include \"rings/resources.h\"\n\nnamespace rings {\n\nusing namespace stmlib;\n\nvoid FMVoice::Init() {\n  set_frequency(220.0f / kSampleRate);\n  set_ratio(0.5f);\n  set_brightness(0.5f);\n  set_damping(0.5f);\n  set_position(0.5f);\n  set_feedback_amount(0.0f);\n  \n  previous_carrier_frequency_ = carrier_frequency_;\n  previous_modulator_frequency_ = carrier_frequency_;\n  previous_brightness_ = brightness_;\n  previous_damping_ = damping_;\n  previous_feedback_amount_ = feedback_amount_;\n  \n  amplitude_envelope_ = 0.0f;\n  brightness_envelope_ = 0.0f;\n  \n  carrier_phase_ = 0;\n  modulator_phase_ = 0;\n  gain_ = 0.0f;\n  fm_amount_ = 0.0f;\n  \n  follower_.Init(\n      8.0f / kSampleRate,\n      160.0f / kSampleRate,\n      1600.0f / kSampleRate);\n}\n\nvoid FMVoice::Process(const float* in, float* out, float* aux, size_t size) {\n  // Interpolate between the \"oscillator\" behaviour and the \"FMLPGed thing\"\n  // behaviour.\n  float envelope_amount = damping_ < 0.9f ? 1.0f : (1.0f - damping_) * 10.0f;\n  float amplitude_rt60 = 0.1f * SemitonesToRatio(damping_ * 96.0f) * kSampleRate;\n  float amplitude_decay = 1.0f - powf(0.001f, 1.0f / amplitude_rt60);\n\n  float brightness_rt60 = 0.1f * SemitonesToRatio(damping_ * 84.0f) * kSampleRate;\n  float brightness_decay = 1.0f - powf(0.001f, 1.0f / brightness_rt60);\n  \n  float ratio = Interpolate(lut_fm_frequency_quantizer, ratio_, 128.0f);\n  float modulator_frequency = carrier_frequency_ * SemitonesToRatio(ratio);\n  \n  if (modulator_frequency > 0.5f) {\n    modulator_frequency = 0.5f;\n  }\n  \n  float feedback = (feedback_amount_ - 0.5f) * 2.0f;\n  \n  ParameterInterpolator carrier_increment(\n      &previous_carrier_frequency_, carrier_frequency_, size);\n  ParameterInterpolator modulator_increment(\n      &previous_modulator_frequency_, modulator_frequency, size);\n  ParameterInterpolator brightness(\n      &previous_brightness_, brightness_, size);\n  ParameterInterpolator feedback_amount(\n      &previous_feedback_amount_, feedback, size);\n\n  uint32_t carrier_phase = carrier_phase_;\n  uint32_t modulator_phase = modulator_phase_;\n  float previous_sample = previous_sample_;\n  \n  while (size--) {\n    // Envelope follower and internal envelope.\n    float amplitude_envelope, brightness_envelope;\n    follower_.Process(\n        *in++,\n        &amplitude_envelope,\n        &brightness_envelope);\n    \n    brightness_envelope *= 2.0f * amplitude_envelope * (2.0f - amplitude_envelope);\n    \n    SLOPE(amplitude_envelope_, amplitude_envelope, 0.05f, amplitude_decay);\n    SLOPE(brightness_envelope_, brightness_envelope, 0.01f, brightness_decay);\n    \n    // Compute envelopes.\n    float brightness_value = brightness.Next();\n    brightness_value *= brightness_value;\n    float fm_amount_min = brightness_value < 0.5f\n        ? 0.0f\n        : brightness_value * 2.0f - 1.0f;\n    float fm_amount_max = brightness_value < 0.5f\n        ? 2.0f * brightness_value\n        : 1.0f;\n    float fm_envelope = 0.5f + envelope_amount * (brightness_envelope_ - 0.5f);\n    float fm_amount = (fm_amount_min + fm_amount_max * fm_envelope) * 2.0f;\n    SLEW(fm_amount_, fm_amount, 0.005f + fm_amount_max * 0.015f);\n\n    // FM synthesis in itself\n    float phase_feedback = feedback < 0.0f ? 0.5f * feedback * feedback : 0.0f;\n    modulator_phase += static_cast<uint32_t>(4294967296.0f * \\\n      modulator_increment.Next() * (1.0f + previous_sample * phase_feedback));\n    carrier_phase += static_cast<uint32_t>(4294967296.0f * \\\n        carrier_increment.Next());\n\n    float feedback = feedback_amount.Next();\n    float modulator_fb = feedback > 0.0f ? 0.25f * feedback * feedback : 0.0f;\n    float modulator = SineFm(modulator_phase, modulator_fb * previous_sample);\n    float carrier = SineFm(carrier_phase, fm_amount_ * modulator);\n    ONE_POLE(previous_sample, carrier, 0.1f);\n\n    // Compute amplitude envelope.\n    float gain = 1.0f + envelope_amount * (amplitude_envelope_ - 1.0f);\n    ONE_POLE(gain_, gain, 0.005f + 0.045f * fm_amount_);\n    \n    *out++ = (carrier + 0.5f * modulator) * gain_;\n    *aux++ = 0.5f * modulator * gain_;\n  }\n  carrier_phase_ = carrier_phase;\n  modulator_phase_ = modulator_phase;\n  previous_sample_ = previous_sample;\n}\n\n}  // namespace rings\n"
  },
  {
    "path": "lib/rings/dsp/fm_voice.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// FM Voice.\n\n#ifndef RINGS_DSP_FM_VOICE_H_\n#define RINGS_DSP_FM_VOICE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"rings/dsp/dsp.h\"\n#include \"rings/dsp/follower.h\"\n\n#include \"rings/resources.h\"\n\nnamespace rings {\n\nusing namespace stmlib;\n\nclass FMVoice {\n public:\n  FMVoice() { }\n  ~FMVoice() { }\n  \n  void Init();\n  void Process(\n      const float* in,\n      float* out,\n      float* aux,\n      size_t size);\n  \n  inline void set_frequency(float frequency) {\n    carrier_frequency_ = frequency;\n  }\n  \n  inline void set_ratio(float ratio) {\n    ratio_ = ratio;\n  }\n\n  inline void set_brightness(float brightness) {\n    brightness_ = brightness;\n  }\n  \n  inline void set_damping(float damping) {\n    damping_ = damping;\n  }\n  \n  inline void set_position(float position) {\n    position_ = position;\n  }\n  \n  inline void set_feedback_amount(float feedback_amount) {\n    feedback_amount_ = feedback_amount;\n  }\n  \n  inline void TriggerInternalEnvelope() {\n    amplitude_envelope_ = 1.0f;\n    brightness_envelope_ = 1.0f;\n  }\n  \n  inline float SineFm(uint32_t phase, float fm) const {\n    phase += (static_cast<uint32_t>((fm + 4.0f) * 536870912.0f)) << 3;\n    uint32_t integral = phase >> 20;\n    float fractional = static_cast<float>(phase << 12) / 4294967296.0f;\n    float a = lut_sine[integral];\n    float b = lut_sine[integral + 1];\n    return a + (b - a) * fractional;\n  }\n  \n private:\n  float carrier_frequency_;\n  float ratio_;\n  float brightness_;\n  float damping_;\n  float position_;\n  float feedback_amount_;\n  \n  float previous_carrier_frequency_;\n  float previous_modulator_frequency_;\n  float previous_brightness_;\n  float previous_damping_;\n  float previous_feedback_amount_;\n  \n  float amplitude_envelope_;\n  float brightness_envelope_;\n  float gain_;\n  float fm_amount_;\n  uint32_t carrier_phase_;\n  uint32_t modulator_phase_;\n  float previous_sample_;\n  \n  Follower follower_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FMVoice);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FM_VOICE_H_\n"
  },
  {
    "path": "lib/rings/dsp/follower.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Envelope / centroid follower for FM voice.\n\n#ifndef RINGS_DSP_FOLLOWER_H_\n#define RINGS_DSP_FOLLOWER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n\nnamespace rings {\n\nusing namespace stmlib;\n\nclass Follower {\n public:  \n  Follower() { }\n  ~Follower() { }\n  \n  void Init(float low, float low_mid, float mid_high) {\n    low_mid_filter_.Init();\n    mid_high_filter_.Init();\n    \n    low_mid_filter_.set_f_q<FREQUENCY_DIRTY>(low_mid, 0.5f);\n    mid_high_filter_.set_f_q<FREQUENCY_DIRTY>(mid_high, 0.5f);\n    attack_[0] = low_mid;\n    decay_[0] = Sqrt(low_mid * low);\n\n    attack_[1] = Sqrt(low_mid * mid_high);\n    decay_[1] = low_mid;\n\n    attack_[2] = Sqrt(mid_high * 0.5f);\n    decay_[2] = Sqrt(mid_high * low_mid);\n\n    std::fill(&detector_[0], &detector_[3], 0.0f);\n    \n    centroid_ = 0.0f;\n  }\n\n  void Process(\n      float sample,\n      float* envelope,\n      float* centroid) {\n    float bands[3] = { 0.0f, 0.0f, 0.0f };\n    \n    bands[2] = mid_high_filter_.Process<FILTER_MODE_HIGH_PASS>(sample);\n    bands[1] = low_mid_filter_.Process<FILTER_MODE_HIGH_PASS>(\n        mid_high_filter_.lp());\n    bands[0] = low_mid_filter_.lp();\n    \n    float weighted = 0.0f;\n    float total = 0.0f;\n    float frequency = 0.0f;\n    for (int32_t i = 0; i < 3; ++i) {\n      SLOPE(detector_[i], fabsf(bands[i]), attack_[i], decay_[i]);\n      weighted += detector_[i] * frequency;\n      total += detector_[i];\n      frequency += 0.5f;\n    }\n    \n    float error = weighted / (total + 0.001f) - centroid_;\n    float coefficient = error > 0.0f ? 0.05f : 0.001f;\n    centroid_ += error * coefficient;\n    \n    *envelope = total;\n    *centroid = centroid_;\n  }\n  \n private:\n  NaiveSvf low_mid_filter_;\n  NaiveSvf mid_high_filter_;\n  \n  float attack_[3];\n  float decay_[3];\n  float detector_[3];\n  \n  float centroid_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Follower);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FOLLOWER_H_\n"
  },
  {
    "path": "lib/rings/dsp/fx/chorus.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Chorus.\n\n#ifndef RINGS_DSP_FX_CHORUS_H_\n#define RINGS_DSP_FX_CHORUS_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"rings/dsp/fx/fx_engine.h\"\n#include \"rings/resources.h\"\n\nnamespace rings {\n\nclass Chorus {\n public:\n  Chorus() { }\n  ~Chorus() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    phase_1_ = 0;\n    phase_2_ = 0;\n  }\n  \n  void Process(float* left, float* right, size_t size) {\n    typedef E::Reserve<2047> Memory;\n    E::DelayLine<Memory, 0> line;\n    E::Context c;\n    \n    while (size--) {\n      engine_.Start(&c);\n      float dry_amount = 1.0f - amount_ * 0.5f;\n    \n      // Update LFO.\n      phase_1_ += 4.17e-06f;\n      if (phase_1_ >= 1.0f) {\n        phase_1_ -= 1.0f;\n      }\n      phase_2_ += 5.417e-06f;\n      if (phase_2_ >= 1.0f) {\n        phase_2_ -= 1.0f;\n      }\n      float sin_1 = stmlib::Interpolate(lut_sine, phase_1_, 4096.0f);\n      float cos_1 = stmlib::Interpolate(lut_sine, phase_1_ + 0.25f, 4096.0f);\n      float sin_2 = stmlib::Interpolate(lut_sine, phase_2_, 4096.0f);\n      float cos_2 = stmlib::Interpolate(lut_sine, phase_2_ + 0.25f, 4096.0f);\n    \n      float wet;\n    \n      // Sum L & R channel to send to chorus line.\n      c.Read(*left, 0.5f);\n      c.Read(*right, 0.5f);\n      c.Write(line, 0.0f);\n    \n      c.Interpolate(line, sin_1 * depth_ + 1200, 0.5f);\n      c.Interpolate(line, sin_2 * depth_ + 800, 0.5f);\n      c.Write(wet, 0.0f);\n      *left = wet * amount_ + *left * dry_amount;\n      \n      c.Interpolate(line, cos_1 * depth_ + 800 + cos_2 * 0, 0.5f);\n      c.Interpolate(line, cos_2 * depth_ + 1200, 0.5f);\n      c.Write(wet, 0.0f);\n      *right = wet * amount_ + *right * dry_amount;\n      left++;\n      right++;\n    }\n  }\n  \n  inline void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n  inline void set_depth(float depth) {\n    depth_ = depth * 384.0f;\n  }\n  \n private:\n  typedef FxEngine<2048, FORMAT_16_BIT> E;\n  E engine_;\n  \n  float amount_;\n  float depth_;\n  \n  float phase_1_;\n  float phase_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Chorus);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FX_CHORUS_H_"
  },
  {
    "path": "lib/rings/dsp/fx/ensemble.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Ensemble FX.\n\n#ifndef RINGS_DSP_FX_ENSEMBLE_H_\n#define RINGS_DSP_FX_ENSEMBLE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"rings/dsp/fx/fx_engine.h\"\n#include \"rings/resources.h\"\n\nnamespace rings {\n\nclass Ensemble {\n public:\n  Ensemble() { }\n  ~Ensemble() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    phase_1_ = 0;\n    phase_2_ = 0;\n  }\n  \n  void Process(float* left, float* right, size_t size) {\n    typedef E::Reserve<2047, E::Reserve<2047> > Memory;\n    E::DelayLine<Memory, 0> line_l;\n    E::DelayLine<Memory, 1> line_r;\n    E::Context c;\n    \n    while (size--) {\n      engine_.Start(&c);\n      float dry_amount = 1.0f - amount_ * 0.5f;\n    \n      // Update LFO.\n      phase_1_ += 1.57e-05f;\n      if (phase_1_ >= 1.0f) {\n        phase_1_ -= 1.0f;\n      }\n      phase_2_ += 1.37e-04f;\n      if (phase_2_ >= 1.0f) {\n        phase_2_ -= 1.0f;\n      }\n      int32_t phi_1 = (phase_1_ * 4096.0f);\n      float slow_0 = lut_sine[phi_1 & 4095];\n      float slow_120 = lut_sine[(phi_1 + 1365) & 4095];\n      float slow_240 = lut_sine[(phi_1 + 2730) & 4095];\n      int32_t phi_2 = (phase_2_ * 4096.0f);\n      float fast_0 = lut_sine[phi_2 & 4095];\n      float fast_120 = lut_sine[(phi_2 + 1365) & 4095];\n      float fast_240 = lut_sine[(phi_2 + 2730) & 4095];\n      \n      float a = depth_ * 1.0f;\n      float b = depth_ * 0.1f;\n      \n      float mod_1 = slow_0 * a + fast_0 * b;\n      float mod_2 = slow_120 * a + fast_120 * b;\n      float mod_3 = slow_240 * a + fast_240 * b;\n    \n      float wet = 0.0f;\n    \n      // Sum L & R channel to send to chorus line.\n      c.Read(*left, 1.0f);\n      c.Write(line_l, 0.0f);\n      c.Read(*right, 1.0f);\n      c.Write(line_r, 0.0f);\n    \n      c.Interpolate(line_l, mod_1 + 1024, 0.33f);\n      c.Interpolate(line_l, mod_2 + 1024, 0.33f);\n      c.Interpolate(line_r, mod_3 + 1024, 0.33f);\n      c.Write(wet, 0.0f);\n      *left = wet * amount_ + *left * dry_amount;\n      \n      c.Interpolate(line_r, mod_1 + 1024, 0.33f);\n      c.Interpolate(line_r, mod_2 + 1024, 0.33f);\n      c.Interpolate(line_l, mod_3 + 1024, 0.33f);\n      c.Write(wet, 0.0f);\n      *right = wet * amount_ + *right * dry_amount;\n      left++;\n      right++;\n    }\n  }\n  \n  inline void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n  inline void set_depth(float depth) {\n    depth_ = depth * 128.0f;\n  }\n  \n private:\n  typedef FxEngine<4096, FORMAT_16_BIT> E;\n  E engine_;\n  \n  float amount_;\n  float depth_;\n  \n  float phase_1_;\n  float phase_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Ensemble);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FX_ENSEMBLE_H_"
  },
  {
    "path": "lib/rings/dsp/fx/fx_engine.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Base class for building reverb.\n\n#ifndef RINGS_DSP_FX_FX_ENGINE_H_\n#define RINGS_DSP_FX_FX_ENGINE_H_\n\n#include <algorithm>\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/cosine_oscillator.h\"\n\nnamespace rings {\n\n#define TAIL , -1\n\nenum Format {\n  FORMAT_12_BIT,\n  FORMAT_16_BIT,\n  FORMAT_32_BIT\n};\n\nenum LFOIndex {\n  LFO_1,\n  LFO_2\n};\n\ntemplate<Format format>\nstruct DataType { };\n\ntemplate<>\nstruct DataType<FORMAT_12_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 4096.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 4096.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_16_BIT> {\n  typedef uint16_t T;\n  \n  static inline float Decompress(T value) {\n    return static_cast<float>(static_cast<int16_t>(value)) / 32768.0f;\n  }\n  \n  static inline T Compress(float value) {\n    return static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(value * 32768.0f)));\n  }\n};\n\ntemplate<>\nstruct DataType<FORMAT_32_BIT> {\n  typedef float T;\n  \n  static inline float Decompress(T value) {\n    return value;;\n  }\n  \n  static inline T Compress(float value) {\n    return value;\n  }\n};\n\ntemplate<\n    size_t size,\n    Format format = FORMAT_12_BIT>\nclass FxEngine {\n public:\n  typedef typename DataType<format>::T T;\n  FxEngine() { }\n  ~FxEngine() { }\n\n  void Init(T* buffer) {\n    buffer_ = buffer;\n    Clear();\n  }\n  \n  void Clear() {\n    std::fill(&buffer_[0], &buffer_[size], 0);\n    write_ptr_ = 0;\n  }\n\n  struct Empty { };\n  \n  template<int32_t l, typename T = Empty>\n  struct Reserve {\n    typedef T Tail;\n    enum {\n      length = l\n    };\n  };\n  \n  template<typename Memory, int32_t index>\n  struct DelayLine {\n    enum {\n      length = DelayLine<typename Memory::Tail, index - 1>::length,\n      base = DelayLine<Memory, index - 1>::base + DelayLine<Memory, index - 1>::length + 1\n    };\n  };\n\n  template<typename Memory>\n  struct DelayLine<Memory, 0> {\n    enum {\n      length = Memory::length,\n      base = 0\n    };\n  };\n\n  class Context {\n   friend class FxEngine;\n   public:\n    Context() { }\n    ~Context() { }\n    \n    inline void Load(float value) {\n      accumulator_ = value;\n    }\n\n    inline void Read(float value, float scale) {\n      accumulator_ += value * scale;\n    }\n\n    inline void Read(float value) {\n      accumulator_ += value;\n    }\n\n    inline void Write(float& value) {\n      value = accumulator_;\n    }\n\n    inline void Write(float& value, float scale) {\n      value = accumulator_;\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T w = DataType<format>::Compress(accumulator_);\n      if (offset == -1) {\n        buffer_[(write_ptr_ + D::base + D::length - 1) & MASK] = w;\n      } else {\n        buffer_[(write_ptr_ + D::base + offset) & MASK] = w;\n      }\n      accumulator_ *= scale;\n    }\n    \n    template<typename D>\n    inline void Write(D& d, float scale) {\n      Write(d, 0, scale);\n    }\n\n    template<typename D>\n    inline void WriteAllPass(D& d, int32_t offset, float scale) {\n      Write(d, offset, scale);\n      accumulator_ += previous_read_;\n    }\n    \n    template<typename D>\n    inline void WriteAllPass(D& d, float scale) {\n      WriteAllPass(d, 0, scale);\n    }\n    \n    template<typename D>\n    inline void Read(D& d, int32_t offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      T r;\n      if (offset == -1) {\n        r = buffer_[(write_ptr_ + D::base + D::length - 1) & MASK];\n      } else {\n        r = buffer_[(write_ptr_ + D::base + offset) & MASK];\n      }\n      float r_f = DataType<format>::Decompress(r);\n      previous_read_ = r_f;\n      accumulator_ += r_f * scale;\n    }\n    \n    template<typename D>\n    inline void Read(D& d, float scale) {\n      Read(d, 0, scale);\n    }\n    \n    inline void Lp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ = state;\n    }\n\n    inline void Hp(float& state, float coefficient) {\n      state += coefficient * (accumulator_ - state);\n      accumulator_ -= state;\n    }\n    \n    template<typename D>\n    inline void Interpolate(D& d, float offset, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n    template<typename D>\n    inline void Interpolate(\n        D& d, float offset, LFOIndex index, float amplitude, float scale) {\n      STATIC_ASSERT(D::base + D::length <= size, delay_memory_full);\n      offset += amplitude * lfo_value_[index];\n      MAKE_INTEGRAL_FRACTIONAL(offset);\n      float a = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base) & MASK]);\n      float b = DataType<format>::Decompress(\n          buffer_[(write_ptr_ + offset_integral + D::base + 1) & MASK]);\n      float x = a + (b - a) * offset_fractional;\n      previous_read_ = x;\n      accumulator_ += x * scale;\n    }\n    \n   private:\n    float accumulator_;\n    float previous_read_;\n    float lfo_value_[2];\n    T* buffer_;\n    int32_t write_ptr_;\n\n    DISALLOW_COPY_AND_ASSIGN(Context);\n  };\n  \n  inline void SetLFOFrequency(LFOIndex index, float frequency) {\n    lfo_[index].template Init<stmlib::COSINE_OSCILLATOR_APPROXIMATE>(frequency * 32.0f);\n  }\n  \n  inline void Start(Context* c) {\n    --write_ptr_;\n    if (write_ptr_ < 0) {\n      write_ptr_ += size;\n    }\n    c->accumulator_ = 0.0f;\n    c->previous_read_ = 0.0f;\n    c->buffer_ = buffer_;\n    c->write_ptr_ = write_ptr_;\n    if ((write_ptr_ & 31) == 0) {\n      c->lfo_value_[0] = lfo_[0].Next();\n      c->lfo_value_[1] = lfo_[1].Next();\n    } else {\n      c->lfo_value_[0] = lfo_[0].value();\n      c->lfo_value_[1] = lfo_[1].value();\n    }\n  }\n  \n private:\n  enum {\n    MASK = size - 1\n  };\n  \n  int32_t write_ptr_;\n  T* buffer_;\n  stmlib::CosineOscillator lfo_[2];\n  \n  DISALLOW_COPY_AND_ASSIGN(FxEngine);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FX_FX_ENGINE_H_\n"
  },
  {
    "path": "lib/rings/dsp/fx/reverb.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Reverb.\n\n#ifndef RINGS_DSP_FX_REVERB_H_\n#define RINGS_DSP_FX_REVERB_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"rings/dsp/fx/fx_engine.h\"\n\nnamespace rings {\n\nclass Reverb {\n public:\n  Reverb() { }\n  ~Reverb() { }\n  \n  void Init(uint16_t* buffer) {\n    engine_.Init(buffer);\n    engine_.SetLFOFrequency(LFO_1, 0.5f / 48000.0f);\n    engine_.SetLFOFrequency(LFO_2, 0.3f / 48000.0f);\n    lp_ = 0.7f;\n    diffusion_ = 0.625f;\n  }\n  \n  void Process(float* left, float* right, size_t size) {\n    // This is the Griesinger topology described in the Dattorro paper\n    // (4 AP diffusers on the input, then a loop of 2x 2AP+1Delay).\n    // Modulation is applied in the loop of the first diffuser AP for additional\n    // smearing; and to the two long delays for a slow shimmer/chorus effect.\n    typedef E::Reserve<150,\n      E::Reserve<214,\n      E::Reserve<319,\n      E::Reserve<527,\n      E::Reserve<2182,\n      E::Reserve<2690,\n      E::Reserve<4501,\n      E::Reserve<2525,\n      E::Reserve<2197,\n      E::Reserve<6312> > > > > > > > > > Memory;\n    E::DelayLine<Memory, 0> ap1;\n    E::DelayLine<Memory, 1> ap2;\n    E::DelayLine<Memory, 2> ap3;\n    E::DelayLine<Memory, 3> ap4;\n    E::DelayLine<Memory, 4> dap1a;\n    E::DelayLine<Memory, 5> dap1b;\n    E::DelayLine<Memory, 6> del1;\n    E::DelayLine<Memory, 7> dap2a;\n    E::DelayLine<Memory, 8> dap2b;\n    E::DelayLine<Memory, 9> del2;\n    E::Context c;\n\n    const float kap = diffusion_;\n    const float klp = lp_;\n    const float krt = reverb_time_;\n    const float amount = amount_;\n    const float gain = input_gain_;\n\n    float lp_1 = lp_decay_1_;\n    float lp_2 = lp_decay_2_;\n\n    while (size--) {\n      float wet;\n      float apout = 0.0f;\n      engine_.Start(&c);\n      \n      // Smear AP1 inside the loop.\n      //c.Interpolate(ap1, 10.0f, LFO_1, 80.0f, 1.0f);\n      //c.Write(ap1, 100, 0.0f);\n      \n      c.Read(*left + *right, gain);\n\n      // Diffuse through 4 allpasses.\n      c.Read(ap1 TAIL, kap);\n      c.WriteAllPass(ap1, -kap);\n      c.Read(ap2 TAIL, kap);\n      c.WriteAllPass(ap2, -kap);\n      c.Read(ap3 TAIL, kap);\n      c.WriteAllPass(ap3, -kap);\n      c.Read(ap4 TAIL, kap);\n      c.WriteAllPass(ap4, -kap);\n      c.Write(apout);\n      \n      // Main reverb loop.\n      c.Load(apout);\n      c.Interpolate(del2, 6261.0f, LFO_2, 50.0f, krt);\n      c.Lp(lp_1, klp);\n      c.Read(dap1a TAIL, -kap);\n      c.WriteAllPass(dap1a, kap);\n      c.Read(dap1b TAIL, kap);\n      c.WriteAllPass(dap1b, -kap);\n      c.Write(del1, 2.0f);\n      c.Write(wet, 0.0f);\n\n      *left += (wet - *left) * amount;\n\n      c.Load(apout);\n      c.Interpolate(del1, 4460.0f, LFO_1, 40.0f, krt);\n      c.Lp(lp_2, klp);\n      c.Read(dap2a TAIL, kap);\n      c.WriteAllPass(dap2a, -kap);\n      c.Read(dap2b TAIL, -kap);\n      c.WriteAllPass(dap2b, kap);\n      c.Write(del2, 2.0f);\n      c.Write(wet, 0.0f);\n\n      *right += (wet - *right) * amount;\n      \n      ++left;\n      ++right;\n    }\n    \n    lp_decay_1_ = lp_1;\n    lp_decay_2_ = lp_2;\n  }\n  \n  inline void set_amount(float amount) {\n    amount_ = amount;\n  }\n  \n  inline void set_input_gain(float input_gain) {\n    input_gain_ = input_gain;\n  }\n\n  inline void set_time(float reverb_time) {\n    reverb_time_ = reverb_time;\n  }\n  \n  inline void set_diffusion(float diffusion) {\n    diffusion_ = diffusion;\n  }\n  \n  inline void set_lp(float lp) {\n    lp_ = lp;\n  }\n  \n  inline void Clear() {\n    engine_.Clear();\n  }\n  \n private:\n  typedef FxEngine<32768, FORMAT_16_BIT> E;\n  E engine_;\n  \n  float amount_;\n  float input_gain_;\n  float reverb_time_;\n  float diffusion_;\n  float lp_;\n  \n  float lp_decay_1_;\n  float lp_decay_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Reverb);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_FX_REVERB_H_\n"
  },
  {
    "path": "lib/rings/dsp/limiter.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Limiter.\n\n#ifndef RINGS_DSP_LIMITER_H_\n#define RINGS_DSP_LIMITER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n\nnamespace rings {\n\nclass Limiter {\n public:\n  Limiter() { }\n  ~Limiter() { }\n\n  void Init() {\n    peak_ = 0.5f;\n  }\n\n  void Process(\n      float* l,\n      float* r,\n      size_t size,\n      float pre_gain) {\n    while (size--) {\n      float l_pre = *l * pre_gain;\n      float r_pre = *r * pre_gain;\n    \n      float l_peak = fabsf(l_pre);\n      float r_peak = fabsf(r_pre);\n      float s_peak = fabsf(r_pre - l_pre);\n\n      float peak = std::max(std::max(l_peak, r_peak), s_peak);\n      SLOPE(peak_, peak, 0.05f, 0.00002f);\n\n      // Clamp to 8Vpp, clipping softly towards 10Vpp\n      float gain = (peak_ <= 1.0f ? 1.0f : 1.0f / peak_);\n      *l++ = stmlib::SoftLimit(l_pre * gain * 0.8f);\n      *r++ = stmlib::SoftLimit(r_pre * gain * 0.8f);\n    }\n  }\n\n private:\n  float peak_;\n\n  DISALLOW_COPY_AND_ASSIGN(Limiter);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_LIMITER_H_\n"
  },
  {
    "path": "lib/rings/dsp/note_filter.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Low pass filter for getting stable pitch data.\n\n#ifndef RINGS_DSP_NOTE_FILTER_H_\n#define RINGS_DSP_NOTE_FILTER_H_\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/delay_line.h\"\n\nnamespace rings {\n\nclass NoteFilter {\n public:\n  enum {\n    N = 4  // Median filter order\n  };\n  NoteFilter() { }\n  ~NoteFilter() { }\n\n  void Init(\n      float sample_rate,\n      float time_constant_fast_edge,\n      float time_constant_steady_part,\n      float edge_recovery_time,\n      float edge_avoidance_delay) {\n    fast_coefficient_ = 1.0f / (time_constant_fast_edge * sample_rate);\n    slow_coefficient_ = 1.0f / (time_constant_steady_part * sample_rate);\n    lag_coefficient_ = 1.0f / (edge_recovery_time * sample_rate);\n  \n    delayed_stable_note_.Init();\n    delayed_stable_note_.set_delay(\n        std::min(size_t(15), size_t(edge_avoidance_delay * sample_rate)));\n  \n    stable_note_ = note_ = 69.0f;\n    coefficient_ = fast_coefficient_;\n    stable_coefficient_ = slow_coefficient_;\n    std::fill(&previous_values_[0], &previous_values_[N], note_);\n  }\n\n  inline float Process(float note, bool strum) {\n    // If there is a sharp change, follow it instantly.\n    if (fabsf(note - note_) > 0.4f || strum) {\n      stable_note_ = note_ = note;\n      coefficient_ = fast_coefficient_;\n      stable_coefficient_ = slow_coefficient_;\n      std::fill(&previous_values_[0], &previous_values_[N], note);\n    } else {\n      // Median filtering of the raw ADC value.\n      float sorted_values[N];\n      std::rotate(\n          &previous_values_[0],\n          &previous_values_[1],\n          &previous_values_[N]);\n      previous_values_[N - 1] = note;\n      std::copy(&previous_values_[0], &previous_values_[N], &sorted_values[0]);\n      std::sort(&sorted_values[0], &sorted_values[N]);\n      float median = 0.5f * (sorted_values[(N - 1) / 2] + sorted_values[N / 2]);\n    \n      // Adaptive lag processor.\n      note_ += coefficient_ * (median - note_);\n      stable_note_ += stable_coefficient_ * (note_ - stable_note_);\n\n      coefficient_ += lag_coefficient_ * (slow_coefficient_ - coefficient_);\n      stable_coefficient_ += lag_coefficient_ * \\\n          (lag_coefficient_ - stable_coefficient_);\n    \n      delayed_stable_note_.Write(stable_note_);\n    }\n    return note_;\n  }\n\n  inline float note() const {\n    return note_;\n  }\n\n  inline float stable_note() const {\n    return delayed_stable_note_.Read();\n  }\n\n private:\n  float previous_values_[N];\n  float note_;\n  float stable_note_;\n  stmlib::DelayLine<float, 16> delayed_stable_note_;\n\n  float coefficient_;\n  float stable_coefficient_;\n\n  float fast_coefficient_;\n  float slow_coefficient_;\n  float lag_coefficient_;\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_NOTE_FILTER_H_\n"
  },
  {
    "path": "lib/rings/dsp/onset_detector.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Onset detector.\n\n#ifndef RINGS_DSP_ONSET_DETECTOR_H_\n#define RINGS_DSP_ONSET_DETECTOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n\nnamespace rings {\n\nusing namespace std;\nusing namespace stmlib;\n\nclass ZScorer {\n public:\n  ZScorer() { }\n  ~ZScorer() { }\n  \n  void Init(float cutoff) {\n    coefficient_ = cutoff;\n    mean_ = 0.0f;\n    variance_ = 0.00f;\n  }\n  \n  inline float Normalize(float sample) {\n    return Update(sample) / Sqrt(variance_);\n  }\n  \n  inline bool Test(float sample, float threshold) {\n    float value = Update(sample);\n    return value > Sqrt(variance_) * threshold;\n  }\n\n  inline bool Test(float sample, float threshold, float absolute_threshold) {\n    float value = Update(sample);\n    return value > Sqrt(variance_) * threshold && value > absolute_threshold;\n  }\n\n private:\n  inline float Update(float sample) {\n    float centered = sample - mean_;\n    mean_ += coefficient_ * centered;\n    variance_ += coefficient_ * (centered * centered - variance_);\n    return centered;\n  }\n  \n  float coefficient_;\n  float mean_;\n  float variance_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ZScorer);\n};\n\nclass Compressor {\n public:  \n  Compressor() { }\n  ~Compressor() { }\n  \n  void Init(float attack, float decay, float max_gain) {\n    attack_ = attack;\n    decay_ = decay;\n    level_ = 0.0f;\n    skew_ = 1.0f / max_gain;\n  }\n  \n  void Process(const float* in, float* out, size_t size) {\n    float level = level_;\n    while (size--) {\n      SLOPE(level, fabsf(*in), attack_, decay_);\n      *out++ = *in++ / (skew_ + level);\n    }\n    level_ = level;\n  }\n \n private:\n  float attack_; \n  float decay_;\n  float level_;\n  float skew_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Compressor);\n};\n\nclass OnsetDetector {\n public:  \n  OnsetDetector() { }\n  ~OnsetDetector() { }\n  \n  void Init(\n      float low,\n      float low_mid,\n      float mid_high,\n      float decimated_sr,\n      float ioi_time) {\n    float ioi_f = 1.0f / (ioi_time * decimated_sr);\n    compressor_.Init(ioi_f * 10.0f, ioi_f * 0.05f, 40.0f);\n    \n    low_mid_filter_.Init();\n    mid_high_filter_.Init();\n    low_mid_filter_.set_f_q<FREQUENCY_DIRTY>(low_mid, 0.5f);\n    mid_high_filter_.set_f_q<FREQUENCY_DIRTY>(mid_high, 0.5f);\n\n    attack_[0] = low_mid;\n    decay_[0] = low * 0.25f;\n\n    attack_[1] = low_mid;\n    decay_[1] = low * 0.25f;\n\n    attack_[2] = low_mid;\n    decay_[2] = low * 0.25f;\n\n    fill(&envelope_[0], &envelope_[3], 0.0f);\n    fill(&energy_[0], &energy_[3], 0.0f);\n    \n    z_df_.Init(ioi_f * 0.05f);\n    \n    inhibit_time_ = static_cast<int32_t>(ioi_time * decimated_sr);\n    inhibit_decay_ = 1.0f / (ioi_time * decimated_sr);\n    \n    inhibit_threshold_ = 0.0f;\n    inhibit_counter_ = 0;\n    onset_df_ = 0.0f;\n  }\n  \n  bool Process(const float* samples, size_t size) {\n    // Automatic gain control.\n    compressor_.Process(samples, bands_[0], size);\n    \n    // Quick and dirty filter bank - split the signal in three bands.\n    mid_high_filter_.Split(bands_[0], bands_[1], bands_[2], size);\n    low_mid_filter_.Split(bands_[1], bands_[0], bands_[1], size);\n\n    // Compute low-pass energy and onset detection function\n    // (derivative of energy) in each band.\n    float onset_df = 0.0f;\n    float total_energy = 0.0f;\n    for (int32_t i = 0; i < 3; ++i) {\n      float* s = bands_[i];\n      float energy = 0.0f;\n      float envelope = envelope_[i];\n      size_t increment = 4 >> i;\n      for (size_t j = 0; j < size; j += increment) {\n        SLOPE(envelope, s[j] * s[j], attack_[i], decay_[i]);\n        energy += envelope;\n      }\n      energy = Sqrt(energy) * float(increment);\n      envelope_[i] = envelope;\n\n      float derivative = energy - energy_[i];\n      onset_df += derivative + fabsf(derivative);\n      energy_[i] = energy;\n      total_energy += energy;\n    }\n    \n    onset_df_ += 0.05f * (onset_df - onset_df_);\n    bool outlier_in_df = z_df_.Test(onset_df_, 1.0f, 0.01f);\n    bool exceeds_energy_threshold = total_energy >= inhibit_threshold_;\n    bool not_inhibited = !inhibit_counter_;\n    bool has_onset = outlier_in_df && exceeds_energy_threshold && not_inhibited;\n    \n    if (has_onset) {\n      inhibit_threshold_ = total_energy * 1.5f;\n      inhibit_counter_ = inhibit_time_;\n    } else {\n      inhibit_threshold_ -= inhibit_decay_ * inhibit_threshold_;\n      if (inhibit_counter_) {\n        --inhibit_counter_;\n      }\n    }\n    return has_onset;\n  }\n  \n private:\n  Compressor compressor_;\n  NaiveSvf low_mid_filter_;\n  NaiveSvf mid_high_filter_;\n  \n  float attack_[3];\n  float decay_[3];\n  float energy_[3];\n  float envelope_[3];\n  float onset_df_;\n  \n  float bands_[3][32];\n  \n  ZScorer z_df_;\n  \n  float inhibit_threshold_;\n  float inhibit_decay_;\n  int32_t inhibit_time_;\n  int32_t inhibit_counter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(OnsetDetector);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_ONSET_DETECTOR_H_\n"
  },
  {
    "path": "lib/rings/dsp/part.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Group of voices.\n\n//[eh2k] Reverb + RESONATOR_MODEL_STRING_AND_REVERB removed!\n\n#include \"rings/dsp/part.h\"\n\n#include \"stmlib/dsp/units.h\"\n\n#include \"rings/resources.h\"\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nnamespace rings {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid Part::Init() {\n  active_voice_ = 0;\n  \n  fill(&note_[0], &note_[kMaxPolyphony], 0.0f);\n  \n  bypass_ = false;\n  polyphony_ = 1;\n  model_ = RESONATOR_MODEL_MODAL;\n  dirty_ = true;\n  \n  for (int32_t i = 0; i < kMaxPolyphony; ++i) {\n    excitation_filter_[i].Init();\n    plucker_[i].Init();\n    dc_blocker_[i].Init(1.0f - 10.0f / kSampleRate);\n  }\n  \n  limiter_.Init();\n\n  note_filter_.Init(\n      kSampleRate / kMaxBlockSize,\n      0.001f,  // Lag time with a sharp edge on the V/Oct input or trigger.\n      0.010f,  // Lag time after the trigger has been received.\n      0.050f,  // Time to transition from reactive to filtered.\n      0.004f); // Prevent a sharp edge to partly leak on the previous voice.\n}\n\nvoid Part::ConfigureResonators() {\n  if (!dirty_) {\n    return;\n  }\n  \n  switch (model_) {\n    case RESONATOR_MODEL_MODAL:\n      {\n        int32_t resolution = 64 / polyphony_ - 4;\n        for (int32_t i = 0; i < polyphony_; ++i) {\n          resonator_[i].Init();\n          resonator_[i].set_resolution(resolution);\n        }\n      }\n      break;\n    \n    case RESONATOR_MODEL_SYMPATHETIC_STRING:\n    case RESONATOR_MODEL_STRING:\n    case RESONATOR_MODEL_SYMPATHETIC_STRING_QUANTIZED:\n      {\n        float lfo_frequencies[kNumStrings] = {\n          0.5f, 0.4f, 0.35f, 0.23f, 0.211f, 0.2f, 0.171f\n        };\n        for (int32_t i = 0; i < kNumStrings; ++i) {\n          bool has_dispersion = model_ == RESONATOR_MODEL_STRING;\n          string_[i].Init(has_dispersion);\n\n          float f_lfo = float(kMaxBlockSize) / float(kSampleRate);\n          f_lfo *= lfo_frequencies[i];\n          lfo_[i].Init<COSINE_OSCILLATOR_APPROXIMATE>(f_lfo);\n        }\n        for (int32_t i = 0; i < polyphony_; ++i) {\n          plucker_[i].Init();\n        }\n      }\n      break;\n    \n    case RESONATOR_MODEL_FM_VOICE:\n      {\n        for (int32_t i = 0; i < polyphony_; ++i) {\n          fm_voice_[i].Init();\n        }\n      }\n      break;\n    \n    default:\n      break;\n  }\n\n  if (active_voice_ >= polyphony_) {\n    active_voice_ = 0;\n  }\n  dirty_ = false;\n}\n\n#ifdef BRYAN_CHORDS\n\n// Chord table by Bryan Noll:\nconst float part_chords[][11][8] FLASHMEM = {\n  {\n    { -12.0f, -0.01f, 0.0f,  0.01f, 0.02f, 11.98f, 11.99f, 12.0f }, // OCT\n    { -12.0f, -5.0f,  0.0f,  6.99f, 7.0f,  11.99f, 12.0f,  19.0f }, // 5\n    { -12.0f, -5.0f,  0.0f,  5.0f,  7.0f,  11.99f, 12.0f,  17.0f }, // sus4\n    { -12.0f, -5.0f,  0.0f,  3.0f,  7.0f,   3.01f, 12.0f,  19.0f }, // m \n    { -12.0f, -5.0f,  0.0f,  3.0f,  7.0f,   3.01f, 10.0f,  19.0f }, // m7\n    { -12.0f, -5.0f,  0.0f,  3.0f, 14.0f,   3.01f, 10.0f,  19.0f }, // m9\n    { -12.0f, -5.0f,  0.0f,  3.0f,  7.0f,   3.01f, 10.0f,  17.0f }, // m11\n    { -12.0f, -5.0f,  0.0f,  2.0f,  7.0f,   9.0f,  16.0f,  19.0f }, // 69\n    { -12.0f, -5.0f,  0.0f,  4.0f,  7.0f,  11.0f,  14.0f,  19.0f }, // M9\n    { -12.0f, -5.0f,  0.0f,  4.0f,  7.0f,  11.0f,  10.99f, 19.0f }, // M7\n    { -12.0f, -5.0f,  0.0f,  4.0f,  7.0f,  11.99f, 12.0f,  19.0f } // M\n  },\n  { \n    { -12.0f, 0.0f,  0.01f, 12.0f }, // OCT\n    { -12.0f, 6.99f, 7.0f,  12.0f }, // 5\n    { -12.0f, 5.0f,  7.0f,  12.0f }, // sus4\n    { -12.0f, 3.0f, 11.99f, 12.0f }, // m \n    { -12.0f, 3.0f, 10.0f,  12.0f }, // m7\n    { -12.0f, 3.0f, 10.0f,  14.0f }, // m9\n    { -12.0f, 3.0f, 10.0f,  17.0f }, // m11\n    { -12.0f, 2.0f,  9.0f,  16.0f }, // 69\n    { -12.0f, 4.0f, 11.0f,  14.0f }, // M9\n    { -12.0f, 4.0f,  7.0f,  11.0f }, // M7\n    { -12.0f, 4.0f,  7.0f,  12.0f }, // M\n  },\n  {\n    { 0.0f, -12.0f },\n    { 0.0f, 2.0f },\n    { 0.0f, 3.0f },\n    { 0.0f, 4.0f },\n    { 0.0f, 5.0f },\n    { 0.0f, 7.0f },\n    { 0.0f, 9.0f },\n    { 0.0f, 10.0f },\n    { 0.0f, 11.0f },\n    { 0.0f, 12.0f },\n    { -12.0f, 12.0f }\n  },\n  {\n    { 0.0f, -12.0f },\n    { 0.0f, 2.0f },\n    { 0.0f, 3.0f },\n    { 0.0f, 4.0f },\n    { 0.0f, 5.0f },\n    { 0.0f, 7.0f },\n    { 0.0f, 9.0f },\n    { 0.0f, 10.0f },\n    { 0.0f, 11.0f },\n    { 0.0f, 12.0f },\n    { -12.0f, 12.0f }\n  }\n};\n\n#else\n\n// Original chord table\nconst float part_chords[kMaxPolyphony][11][8] FLASHMEM = {\n  {\n    { -12.0f, 0.0f, 0.01f, 0.02f, 0.03f, 11.98f, 11.99f, 12.0f },\n    { -12.0f, 0.0f, 3.0f,  3.01f, 7.0f,  9.99f,  10.0f,  19.0f },\n    { -12.0f, 0.0f, 3.0f,  3.01f, 7.0f,  11.99f, 12.0f,  19.0f },\n    { -12.0f, 0.0f, 3.0f,  3.01f, 7.0f,  13.99f, 14.0f,  19.0f },\n    { -12.0f, 0.0f, 3.0f,  3.01f, 7.0f,  16.99f, 17.0f,  19.0f },\n    { -12.0f, 0.0f, 6.98f, 6.99f, 7.0f,  12.00f, 18.99f, 19.0f },\n    { -12.0f, 0.0f, 3.99f, 4.0f,  7.0f,  16.99f, 17.0f,  19.0f },\n    { -12.0f, 0.0f, 3.99f, 4.0f,  7.0f,  13.99f, 14.0f,  19.0f },\n    { -12.0f, 0.0f, 3.99f, 4.0f,  7.0f,  11.99f, 12.0f,  19.0f },\n    { -12.0f, 0.0f, 3.99f, 4.0f,  7.0f,  10.99f, 11.0f,  19.0f },\n    { -12.0f, 0.0f, 4.99f, 5.0f,  7.0f,  11.99f, 12.0f,  17.0f }\n  },\n  { \n    { -12.0f, 0.0f, 0.01f, 12.0f },\n    { -12.0f, 3.0f, 7.0f,  10.0f },\n    { -12.0f, 3.0f, 7.0f,  12.0f },\n    { -12.0f, 3.0f, 7.0f,  14.0f },\n    { -12.0f, 3.0f, 7.0f,  17.0f },\n    { -12.0f, 7.0f, 12.0f, 19.0f },\n    { -12.0f, 4.0f, 7.0f,  17.0f },\n    { -12.0f, 4.0f, 7.0f,  14.0f },\n    { -12.0f, 4.0f, 7.0f,  12.0f },\n    { -12.0f, 4.0f, 7.0f,  11.0f },\n    { -12.0f, 5.0f, 7.0f,  12.0f },\n  },\n  {\n    { 0.0f, -12.0f },\n    { 0.0f, 0.01f },\n    { 0.0f, 2.0f },\n    { 0.0f, 3.0f },\n    { 0.0f, 4.0f },\n    { 0.0f, 5.0f },\n    { 0.0f, 7.0f },\n    { 0.0f, 10.0f },\n    { 0.0f, 11.0f },\n    { 0.0f, 12.0f },\n    { -12.0f, 12.0f }\n  },\n  {\n    { 0.0f, -12.0f },\n    { 0.0f, 0.01f },\n    { 0.0f, 2.0f },\n    { 0.0f, 3.0f },\n    { 0.0f, 4.0f },\n    { 0.0f, 5.0f },\n    { 0.0f, 7.0f },\n    { 0.0f, 10.0f },\n    { 0.0f, 11.0f },\n    { 0.0f, 12.0f },\n    { -12.0f, 12.0f }\n  }\n};\n\n#endif  // BRYAN_CHORDS\n\nvoid Part::ComputeSympatheticStringsNotes(\n    float tonic,\n    float note,\n    float parameter,\n    float* destination,\n    size_t num_strings) {\n  float notes[9] = {\n      tonic,\n      note - 12.0f,\n      note - 7.01955f,\n      note,\n      note + 7.01955f,\n      note + 12.0f,\n      note + 19.01955f,\n      note + 24.0f,\n      note + 24.0f };\n  const float detunings[4] = {\n      0.013f,\n      0.011f,\n      0.007f,\n      0.017f\n  };\n  \n  if (parameter >= 2.0f) {\n    // Quantized chords\n    int32_t chord_index = parameter - 2.0f;\n    const float* chord = part_chords[polyphony_ - 1][chord_index];\n    for (size_t i = 0; i < num_strings; ++i) {\n      destination[i] = chord[i] + note;\n    }\n    return;\n  }\n\n  size_t num_detuned_strings = (num_strings - 1) >> 1;\n  size_t first_detuned_string = num_strings - num_detuned_strings;\n  \n  for (size_t i = 0; i < first_detuned_string; ++i) {\n    float note = 3.0f;\n    if (i != 0) {\n      note = parameter * 7.0f;\n      parameter += (1.0f - parameter) * 0.2f;\n    }\n    \n    MAKE_INTEGRAL_FRACTIONAL(note);\n    note_fractional = Squash(note_fractional);\n\n    float a = notes[note_integral];\n    float b = notes[note_integral + 1];\n    \n    note = a + (b - a) * note_fractional;\n    destination[i] = note;\n    if (i + first_detuned_string < num_strings) {\n      destination[i + first_detuned_string] = destination[i] + detunings[i & 3];\n    }\n  }\n}\n\nvoid Part::RenderModalVoice(\n    int32_t voice,\n    const PerformanceState& performance_state,\n    const Patch& patch,\n    float frequency,\n    float filter_cutoff,\n    size_t size) {\n  // Internal exciter is a pulse, pre-filter.\n  if (performance_state.internal_exciter &&\n      voice == active_voice_ &&\n      performance_state.strum) {\n    resonator_input_[0] += 0.25f * SemitonesToRatio(\n        filter_cutoff * filter_cutoff * 24.0f) / filter_cutoff;\n  }\n  \n  // Process through filter.\n  excitation_filter_[voice].Process<FILTER_MODE_LOW_PASS>(\n      resonator_input_, resonator_input_, size);\n\n  Resonator& r = resonator_[voice];\n  r.set_frequency(frequency);\n  r.set_structure(patch.structure);\n  r.set_brightness(patch.brightness * patch.brightness);\n  r.set_position(patch.position);\n  r.set_damping(patch.damping);\n  r.Process(resonator_input_, out_buffer_, aux_buffer_, size);\n}\n\nvoid Part::RenderFMVoice(\n    int32_t voice,\n    const PerformanceState& performance_state,\n    const Patch& patch,\n    float frequency,\n    float filter_cutoff,\n    size_t size) {\n  FMVoice& v = fm_voice_[voice];\n  if (performance_state.internal_exciter &&\n      voice == active_voice_ &&\n      performance_state.strum) {\n    v.TriggerInternalEnvelope();\n  }\n\n  v.set_frequency(frequency);\n  v.set_ratio(patch.structure);\n  v.set_brightness(patch.brightness);\n  v.set_feedback_amount(patch.position);\n  v.set_position(/*patch.position*/ 0.0f);\n  v.set_damping(patch.damping);\n  v.Process(resonator_input_, out_buffer_, aux_buffer_, size);\n}\n\nvoid Part::RenderStringVoice(\n    int32_t voice,\n    const PerformanceState& performance_state,\n    const Patch& patch,\n    float frequency,\n    float filter_cutoff,\n    size_t size) {\n  // Compute number of strings and frequency.\n  int32_t num_strings = 1;\n  float frequencies[kNumStrings];\n\n  if (model_ == RESONATOR_MODEL_SYMPATHETIC_STRING ||\n      model_ == RESONATOR_MODEL_SYMPATHETIC_STRING_QUANTIZED) {\n    num_strings = 2 * kMaxPolyphony / polyphony_;\n    float parameter = model_ == RESONATOR_MODEL_SYMPATHETIC_STRING\n        ? patch.structure\n        : 2.0f + performance_state.chord;\n    ComputeSympatheticStringsNotes(\n        performance_state.tonic + performance_state.fm,\n        performance_state.tonic + note_[voice] + performance_state.fm,\n        parameter,\n        frequencies,\n        num_strings);\n    for (int32_t i = 0; i < num_strings; ++i) {\n      frequencies[i] = SemitonesToRatio(frequencies[i] - 69.0f) * a3;\n    }\n  } else {\n    frequencies[0] = frequency;\n  }\n\n  if (voice == active_voice_) {\n    const float gain = 1.0f / Sqrt(static_cast<float>(num_strings) * 2.0f);\n    for (size_t i = 0; i < size; ++i) {\n      resonator_input_[i] *= gain;\n    }\n  }\n\n  // Process external input.\n  excitation_filter_[voice].Process<FILTER_MODE_LOW_PASS>(\n      resonator_input_, resonator_input_, size);\n\n  // Add noise burst.\n  if (performance_state.internal_exciter) {\n    if (voice == active_voice_ && performance_state.strum) {\n      plucker_[voice].Trigger(frequency, filter_cutoff * 8.0f, patch.position);\n    }\n    plucker_[voice].Process(noise_burst_buffer_, size);\n    for (size_t i = 0; i < size; ++i) {\n      resonator_input_[i] += noise_burst_buffer_[i];\n    }\n  }\n  dc_blocker_[voice].Process(resonator_input_, size);\n  \n  fill(&out_buffer_[0], &out_buffer_[size], 0.0f);\n  fill(&aux_buffer_[0], &aux_buffer_[size], 0.0f);\n  \n  float structure = patch.structure;\n  float dispersion = structure < 0.24f\n      ? (structure - 0.24f) * 4.166f\n      : (structure > 0.26f ? (structure - 0.26f) * 1.35135f : 0.0f);\n  \n  for (int32_t string = 0; string < num_strings; ++string) {\n    int32_t i = voice + string * polyphony_;\n    String& s = string_[i];\n    float lfo_value = lfo_[i].Next();\n    \n    float brightness = patch.brightness;\n    float damping = patch.damping;\n    float position = patch.position;\n    float glide = 1.0f;\n    float string_index = static_cast<float>(string) / static_cast<float>(num_strings);\n    const float* input = resonator_input_;\n       \n    // When the internal exciter is used, string 0 is the main\n    // source, the other strings are vibrating by sympathetic resonance.\n    // When the internal exciter is not used, all strings are vibrating\n    // by sympathetic resonance.\n    if (string > 0 && performance_state.internal_exciter) {\n      brightness *= (2.0f - brightness);\n      brightness *= (2.0f - brightness);\n      damping = 0.7f + patch.damping * 0.27f;\n      float amount = (0.5f - fabsf(0.5f - patch.position)) * 0.9f;\n      position = patch.position + lfo_value * amount;\n      glide = SemitonesToRatio((brightness - 1.0f) * 36.0f);\n      input = sympathetic_resonator_input_;\n    }\n    \n    s.set_dispersion(dispersion);\n    s.set_frequency(frequencies[string], glide);\n    s.set_brightness(brightness);\n    s.set_position(position);\n    s.set_damping(damping + string_index * (0.95f - damping));\n    s.Process(input, out_buffer_, aux_buffer_, size);\n    \n    if (string == 0) {\n      // Was 0.1f, Ben Wilson -> 0.2f\n      float gain = 0.2f / static_cast<float>(num_strings);\n      for (size_t i = 0; i < size; ++i) {\n        float sum = out_buffer_[i] - aux_buffer_[i];\n        sympathetic_resonator_input_[i] = gain * sum;\n      }\n    }\n  }\n}\n\nconst int32_t kPingPattern[] = {\n  1, 0, 2, 1, 0, 2, 1, 0\n};\n\nvoid Part::Process(\n    const PerformanceState& performance_state,\n    const Patch& patch,\n    const float* in,\n    float* out,\n    float* aux,\n    size_t size) {\n\n  // Copy inputs to outputs when bypass mode is enabled.\n  if (bypass_) {\n    copy(&in[0], &in[size], &out[0]);\n    copy(&in[0], &in[size], &aux[0]);\n    return;\n  }\n  \n  ConfigureResonators();\n  \n  note_filter_.Process(\n      performance_state.note,\n      performance_state.strum);\n\n  if (performance_state.strum) {\n    note_[active_voice_] = note_filter_.stable_note();\n    if (polyphony_ > 1 && polyphony_ & 1) {\n      active_voice_ = kPingPattern[step_counter_ % 8];\n      step_counter_ = (step_counter_ + 1) % 8;\n    } else {\n      active_voice_ = (active_voice_ + 1) % polyphony_;\n    }\n  }\n  \n  note_[active_voice_] = note_filter_.note();\n  \n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n  for (int32_t voice = 0; voice < polyphony_; ++voice) {\n    // Compute MIDI note value, frequency, and cutoff frequency for excitation\n    // filter.\n    float cutoff = patch.brightness * (2.0f - patch.brightness);\n    float note = note_[voice] + performance_state.tonic + performance_state.fm;\n    float frequency = SemitonesToRatio(note - 69.0f) * a3;\n    float filter_cutoff_range = performance_state.internal_exciter\n      ? frequency * SemitonesToRatio((cutoff - 0.5f) * 96.0f)\n      : 0.4f * SemitonesToRatio((cutoff - 1.0f) * 108.0f);\n    float filter_cutoff = min(voice == active_voice_\n      ? filter_cutoff_range\n      : (10.0f / kSampleRate), 0.499f);\n    float filter_q = performance_state.internal_exciter ? 1.5f : 0.8f;\n\n    // Process input with excitation filter. Inactive voices receive silence.\n    excitation_filter_[voice].set_f_q<FREQUENCY_DIRTY>(filter_cutoff, filter_q);\n    if (voice == active_voice_) {\n      copy(&in[0], &in[size], &resonator_input_[0]);\n    } else {\n      fill(&resonator_input_[0], &resonator_input_[size], 0.0f);\n    }\n    \n    if (model_ == RESONATOR_MODEL_MODAL) {\n      RenderModalVoice(\n          voice, performance_state, patch, frequency, filter_cutoff, size);\n    } else if (model_ == RESONATOR_MODEL_FM_VOICE) {\n      RenderFMVoice(\n          voice, performance_state, patch, frequency, filter_cutoff, size);\n    } else {\n      RenderStringVoice(\n          voice, performance_state, patch, frequency, filter_cutoff, size);\n    }\n    \n    if (polyphony_ == 1) {\n      // Send the two sets of harmonics / pickups to individual outputs.\n      for (size_t i = 0; i < size; ++i) {\n        out[i] += out_buffer_[i];\n        aux[i] += aux_buffer_[i];\n      }\n    } else {\n      // Dispatch odd/even voices to individual outputs.\n      float* destination = voice & 1 ? aux : out;\n      for (size_t i = 0; i < size; ++i) {\n        destination[i] += out_buffer_[i] - aux_buffer_[i];\n      }\n    }\n  }\n    \n  // Apply limiter to string output.\n  limiter_.Process(out, aux, size, model_gains_[model_]);\n}\n\n/* static */\nfloat Part::model_gains_[] = {\n  1.4f,  // RESONATOR_MODEL_MODAL\n  1.0f,  // RESONATOR_MODEL_SYMPATHETIC_STRING\n  1.4f,  // RESONATOR_MODEL_STRING\n  0.7f,  // RESONATOR_MODEL_FM_VOICE,\n  1.0f,  // RESONATOR_MODEL_SYMPATHETIC_STRING_QUANTIZED\n};\n\n}  // namespace rings"
  },
  {
    "path": "lib/rings/dsp/part.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Group of voices.\n\n//[eh2k] Reverb + RESONATOR_MODEL_STRING_AND_REVERB removed!\n\n#ifndef RINGS_DSP_PART_H_\n#define RINGS_DSP_PART_H_\n\n#include <algorithm>\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/dsp/cosine_oscillator.h\"\n#include \"stmlib/dsp/delay_line.h\"\n\n#include \"rings/dsp/dsp.h\"\n#include \"rings/dsp/fm_voice.h\"\n#include \"rings/dsp/fx/reverb.h\"\n#include \"rings/dsp/limiter.h\"\n#include \"rings/dsp/note_filter.h\"\n#include \"rings/dsp/patch.h\"\n#include \"rings/dsp/performance_state.h\"\n#include \"rings/dsp/plucker.h\"\n#include \"rings/dsp/resonator.h\"\n#include \"rings/dsp/string.h\"\n\nnamespace rings {\n\nenum ResonatorModel {\n  RESONATOR_MODEL_MODAL,\n  RESONATOR_MODEL_SYMPATHETIC_STRING,\n  RESONATOR_MODEL_STRING,\n  \n  // Bonus!\n  RESONATOR_MODEL_FM_VOICE,\n  RESONATOR_MODEL_SYMPATHETIC_STRING_QUANTIZED,\n  RESONATOR_MODEL_LAST\n};\n\nconst int32_t kMaxPolyphony = 4;\nconst int32_t kNumStrings = kMaxPolyphony * 2;\n\nclass Part {\n public:\n  Part() { }\n  ~Part() { }\n  \n  void Init();\n  \n  void Process(\n      const PerformanceState& performance_state,\n      const Patch& patch,\n      const float* in,\n      float* out,\n      float* aux,\n      size_t size);\n\n  inline bool bypass() const { return bypass_; }\n  inline void set_bypass(bool bypass) { bypass_ = bypass; }\n\n  inline int32_t polyphony() const { return polyphony_; }\n  inline void set_polyphony(int32_t polyphony) {\n    int32_t old_polyphony = polyphony_;\n    polyphony_ = std::min(polyphony, kMaxPolyphony);\n    for (int32_t i = old_polyphony; i < polyphony_; ++i) {\n      note_[i] = note_[0] + i * 0.05f;\n    }\n    dirty_ = true;\n  }\n  \n  inline ResonatorModel model() const { return model_; }\n  inline void set_model(ResonatorModel model) {\n    if (model != model_) {\n      model_ = model;\n      dirty_ = true;\n    }\n  }\n\n private:\n  void ConfigureResonators();\n  void RenderModalVoice(\n      int32_t voice,\n      const PerformanceState& performance_state,\n      const Patch& patch,\n      float frequency,\n      float filter_cutoff,\n      size_t size);\n  void RenderStringVoice(\n      int32_t voice,\n      const PerformanceState& performance_state,\n      const Patch& patch,\n      float frequency,\n      float filter_cutoff,\n      size_t size);\n  void RenderFMVoice(\n      int32_t voice,\n      const PerformanceState& performance_state,\n      const Patch& patch,\n      float frequency,\n      float filter_cutoff,\n      size_t size);\n  \n\n  inline float Squash(float x) const {\n    if (x < 0.5f) {\n      x *= 2.0f;\n      x *= x;\n      x *= x;\n      x *= x;\n      x *= x;\n      x *= 0.5f;\n    } else {\n      x = 2.0f - 2.0f * x;\n      x *= x;\n      x *= x;\n      x *= x;\n      x *= x;\n      x = 1.0f - 0.5f * x;\n    }\n    return x;\n  }\n\n  void ComputeSympatheticStringsNotes(\n      float tonic,\n      float note,\n      float parameter,\n      float* destination,\n      size_t num_strings);\n  \n  bool bypass_;\n  bool dirty_;\n\n  ResonatorModel model_;\n\n  int32_t num_voices_;\n  int32_t active_voice_;\n  uint32_t step_counter_;\n  int32_t polyphony_;\n  \n  Resonator resonator_[kMaxPolyphony];\n  String string_[kNumStrings];\n  stmlib::CosineOscillator lfo_[kNumStrings];\n  FMVoice fm_voice_[kMaxPolyphony];\n  \n  stmlib::Svf excitation_filter_[kMaxPolyphony];\n  stmlib::DCBlocker dc_blocker_[kMaxPolyphony];\n  Plucker plucker_[kMaxPolyphony];\n\n  float note_[kMaxPolyphony];\n  NoteFilter note_filter_;\n  \n  float resonator_input_[kMaxBlockSize];\n  float sympathetic_resonator_input_[kMaxBlockSize];\n  float noise_burst_buffer_[kMaxBlockSize];\n  \n  float out_buffer_[kMaxBlockSize];\n  float aux_buffer_[kMaxBlockSize];\n  \n  Limiter limiter_;\n  \n  static float model_gains_[RESONATOR_MODEL_LAST];\n  \n  DISALLOW_COPY_AND_ASSIGN(Part);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_PART_H_\n"
  },
  {
    "path": "lib/rings/dsp/patch.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Patch parameters.\n\n#ifndef RINGS_DSP_PATCH_H_\n#define RINGS_DSP_PATCH_H_\n\nnamespace rings {\n\nstruct Patch {\n  float structure;\n  float brightness;\n  float damping;\n  float position;\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_PATCH_H_\n"
  },
  {
    "path": "lib/rings/dsp/performance_state.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Note triggering state.\n\n#ifndef RINGS_DSP_PERFORMANCE_STATE_H_\n#define RINGS_DSP_PERFORMANCE_STATE_H_\n\nnamespace rings {\n\nconst int32_t kNumChords = 11;\n\nstruct PerformanceState {\n  bool strum;\n  bool internal_exciter;\n  bool internal_strum;\n  bool internal_note;\n\n  float tonic;\n  float note;\n  float fm;\n  int32_t chord;\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_PERFORMANCE_STATE_H_\n"
  },
  {
    "path": "lib/rings/dsp/plucker.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Noise burst generator for Karplus-Strong synthesis.\n\n#ifndef RINGS_DSP_PLUCKER_H_\n#define RINGS_DSP_PLUCKER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/delay_line.h\"\n#include \"stmlib/utils/random.h\"\n\nnamespace rings {\n\nclass Plucker {\n public:\n  Plucker() { }\n  ~Plucker() { }\n  \n  void Init() {\n    svf_.Init();\n    comb_filter_.Init();\n    remaining_samples_ = 0;\n    comb_filter_period_ = 0.0f;\n  }\n  \n  void Trigger(float frequency, float cutoff, float position) {\n    float ratio = position * 0.9f + 0.05f;\n    float comb_period = 1.0f / frequency * ratio;\n    remaining_samples_ = static_cast<size_t>(comb_period);\n    while (comb_period >= 255.0f) {\n      comb_period *= 0.5f;\n    }\n    comb_filter_period_ = comb_period;\n    comb_filter_gain_ = (1.0f - position) * 0.8f;\n    svf_.set_f_q<FREQUENCY_DIRTY>(std::min(cutoff, 0.499f), 1.0f);\n  }\n  \n  void Process(float* out, size_t size) {\n    const float comb_gain = comb_filter_gain_;\n    const float comb_delay = comb_filter_period_;\n    for (size_t i = 0; i < size; ++i) {\n      float in = 0.0f;\n      if (remaining_samples_) {\n        in = 2.0f * Random::GetFloat() - 1.0f;\n        --remaining_samples_;\n      }\n      out[i] = in + comb_gain * comb_filter_.Read(comb_delay);\n      comb_filter_.Write(out[i]);\n    }\n    svf_.Process<FILTER_MODE_LOW_PASS>(out, out, size);\n  }\n\n private:\n  stmlib::Svf svf_;\n  stmlib::DelayLine<float, 256> comb_filter_;\n  size_t remaining_samples_;\n  float comb_filter_period_;\n  float comb_filter_gain_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Plucker);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_PLUCKER_H_\n"
  },
  {
    "path": "lib/rings/dsp/resonator.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resonator.\n\n#include \"rings/dsp/resonator.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/cosine_oscillator.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n\n#include \"rings/resources.h\"\n\nnamespace rings {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid Resonator::Init() {\n  for (int32_t i = 0; i < kMaxModes; ++i) {\n    f_[i].Init();\n  }\n\n  set_frequency(220.0f / kSampleRate);\n  set_structure(0.25f);\n  set_brightness(0.5f);\n  set_damping(0.3f);\n  set_position(0.999f);\n  previous_position_ = 0.0f;\n  set_resolution(kMaxModes);\n}\n\nint32_t Resonator::ComputeFilters() {\n  float stiffness = Interpolate(lut_stiffness, structure_, 256.0f);\n  float harmonic = frequency_;\n  float stretch_factor = 1.0f; \n  float q = 500.0f * Interpolate(\n      lut_4_decades,\n      damping_,\n      256.0f);\n  float brightness_attenuation = 1.0f - structure_;\n  // Reduces the range of brightness when structure is very low, to prevent\n  // clipping.\n  brightness_attenuation *= brightness_attenuation;\n  brightness_attenuation *= brightness_attenuation;\n  brightness_attenuation *= brightness_attenuation;\n  float brightness = brightness_ * (1.0f - 0.2f * brightness_attenuation);\n  float q_loss = brightness * (2.0f - brightness) * 0.85f + 0.15f;\n  float q_loss_damping_rate = structure_ * (2.0f - structure_) * 0.1f;\n  int32_t num_modes = 0;\n  for (int32_t i = 0; i < min(kMaxModes, resolution_); ++i) {\n    float partial_frequency = harmonic * stretch_factor;\n    if (partial_frequency >= 0.49f) {\n      partial_frequency = 0.49f;\n    } else {\n      num_modes = i + 1;\n    }\n    f_[i].set_f_q<FREQUENCY_FAST>(\n        partial_frequency,\n        1.0f + partial_frequency * q);\n    stretch_factor += stiffness;\n    if (stiffness < 0.0f) {\n      // Make sure that the partials do not fold back into negative frequencies.\n      stiffness *= 0.93f;\n    } else {\n      // This helps adding a few extra partials in the highest frequencies.\n      stiffness *= 0.98f;\n    }\n    // This prevents the highest partials from decaying too fast.\n    q_loss += q_loss_damping_rate * (1.0f - q_loss);\n    harmonic += frequency_;\n    q *= q_loss;\n  }\n  \n  return num_modes;\n}\n\nvoid Resonator::Process(const float* in, float* out, float* aux, size_t size) {\n  int32_t num_modes = ComputeFilters();\n  \n  ParameterInterpolator position(&previous_position_, position_, size);\n  while (size--) {\n    CosineOscillator amplitudes;\n    amplitudes.Init<COSINE_OSCILLATOR_APPROXIMATE>(position.Next());\n    \n    float input = *in++ * 0.125f;\n    float odd = 0.0f;\n    float even = 0.0f;\n    amplitudes.Start();\n    for (int32_t i = 0; i < num_modes;) {\n      odd += amplitudes.Next() * f_[i++].Process<FILTER_MODE_BAND_PASS>(input);\n      even += amplitudes.Next() * f_[i++].Process<FILTER_MODE_BAND_PASS>(input);\n    }\n    *out++ = odd;\n    *aux++ = even;\n  }\n}\n\n}  // namespace rings\n"
  },
  {
    "path": "lib/rings/dsp/resonator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resonator.\n\n#ifndef RINGS_DSP_RESONATOR_H_\n#define RINGS_DSP_RESONATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"rings/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/delay_line.h\"\n\nnamespace rings {\n\nconst int32_t kMaxModes = 64;\n\nclass Resonator {\n public:\n  Resonator() { }\n  ~Resonator() { }\n  \n  void Init();\n  void Process(\n      const float* in,\n      float* out,\n      float* aux,\n      size_t size);\n  \n  inline void set_frequency(float frequency) {\n    frequency_ = frequency;\n  }\n  \n  inline void set_structure(float structure) {\n    structure_ = structure;\n  }\n  \n  inline void set_brightness(float brightness) {\n    brightness_ = brightness;\n  }\n  \n  inline void set_damping(float damping) {\n    damping_ = damping;\n  }\n  \n  inline void set_position(float position) {\n    position_ = position;\n  }\n  \n  inline void set_resolution(int32_t resolution) {\n    resolution -= resolution & 1; // Must be even!\n    resolution_ = std::min(resolution, kMaxModes);\n  }\n  \n private:\n  int32_t ComputeFilters();\n  float frequency_;\n  float structure_;\n  float brightness_;\n  float position_;\n  float previous_position_;\n  float damping_;\n  \n  int32_t resolution_;\n  \n  stmlib::Svf f_[kMaxModes];\n  \n  DISALLOW_COPY_AND_ASSIGN(Resonator);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_RESONATOR_H_\n"
  },
  {
    "path": "lib/rings/dsp/string.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Comb filter / KS string.\n\n#include \"rings/dsp/string.h\"\n\n#include <cmath>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n#include \"stmlib/utils/random.h\"\n\n#include \"rings/resources.h\"\n\nnamespace rings {\n  \nusing namespace std;\nusing namespace stmlib;\n\nvoid String::Init(bool enable_dispersion) {\n  enable_dispersion_ = enable_dispersion;\n  \n  string_.Init();\n  stretch_.Init();\n  fir_damping_filter_.Init();\n  iir_damping_filter_.Init();\n  \n  set_frequency(220.0f / kSampleRate);\n  set_dispersion(0.25f);\n  set_brightness(0.5f);\n  set_damping(0.3f);\n  set_position(0.8f);\n  \n  delay_ = 1.0f / frequency_;\n  clamped_position_ = 0.0f;\n  previous_dispersion_ = 0.0f;\n  dispersion_noise_ = 0.0f;\n  curved_bridge_ = 0.0f;\n  previous_damping_compensation_ = 0.0f;\n  \n  out_sample_[0] = out_sample_[1] = 0.0f;\n  aux_sample_[0] = aux_sample_[1] = 0.0f;\n  \n  dc_blocker_.Init(1.0f - 20.0f / kSampleRate);\n}\n\ntemplate<bool enable_dispersion>\nvoid String::ProcessInternal(\n    const float* in,\n    float* out,\n    float* aux,\n    size_t size) {\n  float delay = 1.0f / frequency_;\n  CONSTRAIN(delay, 4.0f, kDelayLineSize - 4.0f);\n  \n  // If there is not enough delay time in the delay line, we play at the\n  // lowest possible note and we upsample on the fly with a shitty linear\n  // interpolator. We don't care because it's a corner case (f0 < 11.7Hz)\n  float src_ratio = delay * frequency_;\n  if (src_ratio >= 0.9999f) {\n    // When we are above 11.7 Hz, we make sure that the linear interpolator\n    // does not get in the way.\n    src_phase_ = 1.0f;\n    src_ratio = 1.0f;\n  }\n\n  float clamped_position = 0.5f - 0.98f * fabsf(position_ - 0.5f);\n  \n  // Linearly interpolate all comb-related CV parameters for each sample.\n  ParameterInterpolator delay_modulation(\n      &delay_, delay, size);\n  ParameterInterpolator position_modulation(\n      &clamped_position_, clamped_position, size);\n  ParameterInterpolator dispersion_modulation(\n      &previous_dispersion_, dispersion_, size);\n  \n  // For damping/absorption, the interpolation is done in the filter code.\n  float lf_damping = damping_ * (2.0f - damping_);\n  float rt60 = 0.07f * SemitonesToRatio(lf_damping * 96.0f) * kSampleRate;\n  float rt60_base_2_12 = max(-120.0f * delay / src_ratio / rt60, -127.0f);\n  float damping_coefficient = SemitonesToRatio(rt60_base_2_12);\n  float brightness = brightness_ * brightness_;\n  float noise_filter = SemitonesToRatio((brightness_ - 1.0f) * 48.0f);\n  float damping_cutoff = min(\n      24.0f + damping_ * damping_ * 48.0f + brightness_ * brightness_ * 24.0f,\n      84.0f);\n  float damping_f = min(frequency_ * SemitonesToRatio(damping_cutoff), 0.499f);\n  \n  // Crossfade to infinite decay.\n  if (damping_ >= 0.95f) {\n    float to_infinite = 20.0f * (damping_ - 0.95f);\n    damping_coefficient += to_infinite * (1.0f - damping_coefficient);\n    brightness += to_infinite * (1.0f - brightness);\n    damping_f += to_infinite * (0.4999f - damping_f);\n    damping_cutoff += to_infinite * (128.0f - damping_cutoff);\n  }\n  \n  fir_damping_filter_.Configure(damping_coefficient, brightness, size);\n  iir_damping_filter_.set_f_q<FREQUENCY_ACCURATE>(damping_f, 0.5f);\n  ParameterInterpolator damping_compensation_modulation(\n      &previous_damping_compensation_,\n      1.0f - Interpolate(lut_svf_shift, damping_cutoff, 1.0f),\n      size);\n  \n  while (size--) {\n    src_phase_ += src_ratio;\n    if (src_phase_ > 1.0f) {\n      src_phase_ -= 1.0f;\n      \n      float delay = delay_modulation.Next();\n      float comb_delay = delay * position_modulation.Next();\n    \n#ifndef MIC_W\n      delay *= damping_compensation_modulation.Next();  // IIR delay.\n#endif  // MIC_W\n      delay -= 1.0f; // FIR delay.\n    \n      float s = 0.0f;\n\n      if (enable_dispersion) {\n        float noise = 2.0f * Random::GetFloat() - 1.0f;\n        noise *= 1.0f / (0.2f + noise_filter);\n        dispersion_noise_ += noise_filter * (noise - dispersion_noise_);\n\n        float dispersion = dispersion_modulation.Next();\n        float stretch_point = dispersion <= 0.0f\n            ? 0.0f\n            : dispersion * (2.0f - dispersion) * 0.475f;\n        float noise_amount = dispersion > 0.75f\n            ? 4.0f * (dispersion - 0.75f)\n            : 0.0f;\n        float bridge_curving = dispersion < 0.0f\n            ? -dispersion\n            : 0.0f;\n        \n        noise_amount = noise_amount * noise_amount * 0.025f;\n        float ac_blocking_amount = bridge_curving;\n\n        bridge_curving = bridge_curving * bridge_curving * 0.01f;\n        float ap_gain = -0.618f * dispersion / (0.15f + fabsf(dispersion));\n        \n        float delay_fm = 1.0f;\n        delay_fm += dispersion_noise_ * noise_amount;\n        delay_fm -= curved_bridge_ * bridge_curving;\n        delay *= delay_fm;\n        \n        float ap_delay = delay * stretch_point;\n        float main_delay = delay - ap_delay;\n        if (ap_delay >= 4.0f && main_delay >= 4.0f) {\n          s = string_.ReadHermite(main_delay);\n          s = stretch_.Allpass(s, ap_delay, ap_gain);\n        } else {\n          s = string_.ReadHermite(delay);\n        }\n        float s_ac = s;\n        dc_blocker_.Process(&s_ac, 1);\n        s += ac_blocking_amount * (s_ac - s);\n        \n        float value = fabsf(s) - 0.025f;\n        float sign = s > 0.0f ? 1.0f : -1.5f;\n        curved_bridge_ = (fabsf(value) + value) * sign;\n      } else {\n        s = string_.ReadHermite(delay);\n      }\n    \n      s += *in;  // When f0 < 11.7 Hz, causes ugly bitcrushing on the input!\n      s = fir_damping_filter_.Process(s);\n#ifndef MIC_W\n      s = iir_damping_filter_.Process<FILTER_MODE_LOW_PASS>(s);\n#endif  // MIC_W\n      string_.Write(s);\n\n      out_sample_[1] = out_sample_[0];\n      aux_sample_[1] = aux_sample_[0];\n\n      out_sample_[0] = s;\n      aux_sample_[0] = string_.Read(comb_delay);\n    }\n    *out++ += Crossfade(out_sample_[1], out_sample_[0], src_phase_);\n    *aux++ += Crossfade(aux_sample_[1], aux_sample_[0], src_phase_);\n    in++;\n  }\n}\n\nvoid String::Process(const float* in, float* out, float* aux, size_t size) {\n  if (enable_dispersion_) {\n    ProcessInternal<true>(in, out, aux, size);\n  } else {\n    ProcessInternal<false>(in, out, aux, size);\n  }\n}\n\n}  // namespace rings\n"
  },
  {
    "path": "lib/rings/dsp/string.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Comb filter / KS string.\n\n#ifndef RINGS_DSP_STRING_H_\n#define RINGS_DSP_STRING_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/delay_line.h\"\n#include \"stmlib/dsp/filter.h\"\n\n#include \"rings/dsp/dsp.h\"\n\nnamespace rings {\n\nconst size_t kDelayLineSize = 2048;\n\nclass DampingFilter {\n public:\n  DampingFilter() { }\n  ~DampingFilter() { }\n  \n  void Init() {\n    x_ = 0.0f;\n    x__ = 0.0f;\n    brightness_ = 0.0f;\n    brightness_increment_ = 0.0f;\n    damping_ = 0.0f;\n    damping_increment_ = 0.0f;\n  }\n   \n  inline void Configure(float damping, float brightness, size_t size) {\n    if (!size) {\n      damping_ = damping;\n      brightness_ = brightness;\n      damping_increment_ = 0.0f;\n      brightness_increment_ = 0.0f;\n    } else {\n      float step = 1.0f / static_cast<float>(size);\n      damping_increment_ = (damping - damping_) * step;\n      brightness_increment_ = (brightness - brightness_) * step;\n    }\n  }\n   \n  inline float Process(float x) {\n    float h0 = (1.0f + brightness_) * 0.5f;\n    float h1 = (1.0f - brightness_) * 0.25f;\n    float y = damping_ * (h0 * x_ + h1 * (x + x__));\n    x__ = x_;\n    x_ = x;\n    brightness_ += brightness_increment_;\n    damping_ += damping_increment_;\n    return y;\n  }\n private:\n  float x_;\n  float x__;\n  float brightness_;\n  float brightness_increment_;\n  float damping_;\n  float damping_increment_;\n  \n  DISALLOW_COPY_AND_ASSIGN(DampingFilter);\n};\n\ntypedef stmlib::DelayLine<float, kDelayLineSize> StringDelayLine;\ntypedef stmlib::DelayLine<float, kDelayLineSize / 2> StiffnessDelayLine;\n\nclass String {\n public:\n  String() { }\n  ~String() { }\n  \n  void Init(bool enable_dispersion);\n  void Process(const float* in, float* out, float* aux, size_t size);\n  \n  inline void set_frequency(float frequency) {\n    frequency_ = frequency;\n  }\n\n  inline void set_frequency(float frequency, float coefficient) {\n    frequency_ += coefficient * (frequency - frequency_);\n  }\n\n  inline void set_dispersion(float dispersion) {\n    dispersion_ = dispersion;\n  }\n  \n  inline void set_brightness(float brightness) {\n    brightness_ = brightness;\n  }\n  \n  inline void set_damping(float damping) {\n    damping_ = damping;\n  }\n  \n  inline void set_position(float position) {\n    position_ = position;\n  }\n  \n  inline StringDelayLine* mutable_string() { return &string_; }\n  \n private:\n  template<bool enable_dispersion>\n  void ProcessInternal(const float* in, float* out, float* aux, size_t size);\n   \n  float frequency_;\n  float dispersion_;\n  float brightness_;\n  float damping_;\n  float position_;\n  \n  float delay_;\n  float clamped_position_;\n  float previous_dispersion_;\n  float previous_damping_compensation_;\n  \n  bool enable_dispersion_;\n  bool enable_iir_damping_;\n  float dispersion_noise_;\n  \n  // Very crappy linear interpolation upsampler used for low pitches that\n  // do not fit the delay line. Rarely used.\n  float src_phase_;\n  float out_sample_[2];\n  float aux_sample_[2];\n  \n  float curved_bridge_;\n  \n  StringDelayLine string_;\n  StiffnessDelayLine stretch_;\n  \n  DampingFilter fir_damping_filter_;\n  stmlib::Svf iir_damping_filter_;\n  stmlib::DCBlocker dc_blocker_;\n  \n  DISALLOW_COPY_AND_ASSIGN(String);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_STRING_H_\n"
  },
  {
    "path": "lib/rings/dsp/string_synth_envelope.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// AD envelope for the string synth.\n\n#ifndef ELEMENTS_DSP_STRING_SYNTH_ENVELOPE_H_\n#define ELEMENTS_DSP_STRING_SYNTH_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace rings {\n\nenum EnvelopeShape {\n  ENVELOPE_SHAPE_LINEAR,\n  ENVELOPE_SHAPE_QUARTIC\n};\n\nenum EnvelopeFlags {\n  ENVELOPE_FLAG_RISING_EDGE = 1,\n  ENVELOPE_FLAG_FALLING_EDGE = 2,\n  ENVELOPE_FLAG_GATE = 4\n};\n\nclass StringSynthEnvelope {\n public:\n  StringSynthEnvelope() { }\n  ~StringSynthEnvelope() { }\n  \n  void Init() {\n    set_ad(0.1f, 0.001f);\n    segment_ = num_segments_;\n    phase_ = 0.0f;\n    start_value_ = 0.0f;\n    value_ = 0.0f;\n  }\n\n  inline float Process(uint8_t flags) {\n    if (flags & ENVELOPE_FLAG_RISING_EDGE) {\n      start_value_ = segment_ == num_segments_ ? level_[0] : value_;\n      segment_ = 0;\n      phase_ = 0.0f;\n    } else if (flags & ENVELOPE_FLAG_FALLING_EDGE && sustain_point_) {\n      start_value_ = value_;\n      segment_ = sustain_point_;\n      phase_ = 0.0f;\n    } else if (phase_ >= 1.0f) {\n      start_value_ = level_[segment_ + 1];\n      ++segment_;\n      phase_ = 0.0f;\n    }\n  \n    bool done = segment_ == num_segments_;\n    bool sustained = sustain_point_ && segment_ == sustain_point_ &&\n        flags & ENVELOPE_FLAG_GATE;\n  \n    float phase_increment = 0.0f;\n    if (!sustained && !done) {\n      phase_increment = rate_[segment_];\n    }\n    float t = phase_;\n    if (shape_[segment_] == ENVELOPE_SHAPE_QUARTIC) {\n      t = 1.0f - t;\n      t *= t;\n      t *= t;\n      t = 1.0f - t;\n    }\n    \n    phase_ += phase_increment;\n    value_ = start_value_ + (level_[segment_ + 1] - start_value_) * t;\n    return value_;\n  }\n\n  inline void set_ad(float attack, float decay) {\n    num_segments_ = 2;\n    sustain_point_ = 0;\n\n    level_[0] = 0.0f;\n    level_[1] = 1.0f;\n    level_[2] = 0.0f;\n\n    rate_[0] = attack;\n    rate_[1] = decay;\n    \n    shape_[0] = ENVELOPE_SHAPE_LINEAR;\n    shape_[1] = ENVELOPE_SHAPE_QUARTIC;\n  }\n\n  inline void set_ar(float attack, float decay) {\n    num_segments_ = 2;\n    sustain_point_ = 1;\n\n    level_[0] = 0.0f;\n    level_[1] = 1.0f;\n    level_[2] = 0.0f;\n\n    rate_[0] = attack;\n    rate_[1] = decay;\n    \n    shape_[0] = ENVELOPE_SHAPE_LINEAR;\n    shape_[1] = ENVELOPE_SHAPE_LINEAR;\n  }\n  \n private:\n  float level_[4];\n  float rate_[4];\n  EnvelopeShape shape_[4];\n  \n  int16_t segment_;\n  float start_value_;\n  float value_;\n  float phase_;\n  \n  uint16_t num_segments_;\n  uint16_t sustain_point_;\n\n  DISALLOW_COPY_AND_ASSIGN(StringSynthEnvelope);\n};\n\n}  // namespace rings\n\n#endif  // ELEMENTS_DSP_STRING_SYNTH_ENVELOPE_H_\n"
  },
  {
    "path": "lib/rings/dsp/string_synth_oscillator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Polyblep oscillator used for string synth synthesis.\n\n#ifndef RINGS_DSP_STRING_SYNTH_OSCILLATOR_H_\n#define RINGS_DSP_STRING_SYNTH_OSCILLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/parameter_interpolator.h\"\n#include \"stmlib/dsp/units.h\"\n\nnamespace rings {\n\nusing namespace stmlib;\n\nenum OscillatorShape {\n  OSCILLATOR_SHAPE_BRIGHT_SQUARE,\n  OSCILLATOR_SHAPE_SQUARE,\n  OSCILLATOR_SHAPE_DARK_SQUARE,\n  OSCILLATOR_SHAPE_TRIANGLE,\n};\n\nclass StringSynthOscillator {\n public:\n  StringSynthOscillator() { }\n  ~StringSynthOscillator() { }\n\n  inline void Init() {\n    phase_ = 0.0f;\n    phase_increment_ = 0.01f;\n    filter_state_ = 0.0f;\n    high_ = false;\n\n    next_sample_ = 0.0f;\n    next_sample_saw_ = 0.0f;\n\n    gain_ = 0.0f;\n    gain_saw_ = 0.0f;\n  }\n  \n  template<OscillatorShape shape, bool interpolate_pitch>\n  inline void Render(\n      float target_increment,\n      float target_gain,\n      float target_gain_saw,\n      float* out,\n      size_t size) {\n    // Cut harmonics above 12kHz, and low-pass harmonics above 8kHz to clear\n    // highs\n    if (target_increment >= 0.17f) {\n      target_gain *= 1.0f - (target_increment - 0.17f) * 12.5f;\n      if (target_increment >= 0.25f) {\n        return;\n      }\n    }\n    float phase = phase_;\n    ParameterInterpolator phase_increment(\n        &phase_increment_,\n        target_increment,\n        size);\n    ParameterInterpolator gain(&gain_, target_gain, size);\n    ParameterInterpolator gain_saw(&gain_saw_, target_gain_saw, size);\n\n    float next_sample = next_sample_;\n    float next_sample_saw = next_sample_saw_;\n    float filter_state = filter_state_;\n    bool high = high_;\n\n    while (size--) {\n      float this_sample = next_sample;\n      float this_sample_saw = next_sample_saw;\n      next_sample = 0.0f;\n      next_sample_saw = 0.0f;\n\n      float increment = interpolate_pitch\n          ? phase_increment.Next()\n          : target_increment;\n      phase += increment;\n    \n      float sample = 0.0f;\n      const float pw = 0.5f;\n\n      if (!high && phase >= pw) {\n        float t = (phase - pw) / increment;\n        this_sample += ThisBlepSample(t);\n        next_sample += NextBlepSample(t);\n        high = true;\n      }\n      if (phase >= 1.0f) {\n        phase -= 1.0f;\n        float t = phase / increment;\n        float a = ThisBlepSample(t);\n        float b = NextBlepSample(t);\n        this_sample -= a;\n        next_sample -= b;\n        this_sample_saw -= a;\n        next_sample_saw -= b;\n        high = false;\n      }\n      \n      next_sample += phase < pw ? 0.0f : 1.0f;\n      next_sample_saw += phase;\n      \n      if (shape == OSCILLATOR_SHAPE_TRIANGLE) {\n        const float integrator_coefficient = increment * 0.125f;\n        this_sample = 64.0f * (this_sample - 0.5f);\n        filter_state += integrator_coefficient * (this_sample - filter_state);\n        sample = filter_state;\n      } else if (shape == OSCILLATOR_SHAPE_DARK_SQUARE) {\n        const float integrator_coefficient = increment * 2.0f;\n        this_sample = 4.0f * (this_sample - 0.5f);\n        filter_state += integrator_coefficient * (this_sample - filter_state);\n        sample = filter_state;\n      } else if (shape == OSCILLATOR_SHAPE_BRIGHT_SQUARE) {\n        const float integrator_coefficient = increment * 2.0f;\n        this_sample = 2.0f * this_sample - 1.0f;\n        filter_state += integrator_coefficient * (this_sample - filter_state);\n        sample = (this_sample - filter_state) * 0.5f;\n      } else {\n        this_sample = 2.0f * this_sample - 1.0f;\n        sample = this_sample;\n      }\n      this_sample_saw = 2.0f * this_sample_saw - 1.0f;\n      \n      *out++ += sample * gain.Next() + this_sample_saw * gain_saw.Next();\n    }\n    high_ = high;\n    phase_ = phase;\n    next_sample_ = next_sample;\n    next_sample_saw_ = next_sample_saw;\n    filter_state_ = filter_state;\n  }\n\n private:\n  static inline float ThisBlepSample(float t) {\n    return 0.5f * t * t;\n  }\n  static inline float NextBlepSample(float t) {\n    t = 1.0f - t;\n    return -0.5f * t * t;\n  }\n\n  bool high_;\n  float phase_;\n  float phase_increment_;\n  float next_sample_;\n  float next_sample_saw_;\n  float filter_state_;\n  float gain_;\n  float gain_saw_;\n\n  DISALLOW_COPY_AND_ASSIGN(StringSynthOscillator);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_STRING_SYNTH_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/rings/dsp/string_synth_part.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// String synth part.\n\n#include \"rings/dsp/string_synth_part.h\"\n\n#include \"rings/dsp/dsp.h\"\n\nnamespace rings {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid StringSynthPart::Init(uint16_t* reverb_buffer) {\n  active_group_ = 0;\n  acquisition_delay_ = 0;\n  \n  polyphony_ = 1;\n  fx_type_ = FX_ENSEMBLE;\n\n  for (int32_t i = 0; i < kStringSynthVoices; ++i) {\n    voice_[i].Init();\n  }\n  \n  for (int32_t i = 0; i < kMaxStringSynthPolyphony; ++i) {\n    group_[i].tonic = 0.0f;\n    group_[i].envelope.Init();\n  }\n  \n  for (int32_t i = 0; i < kNumFormants; ++i) {\n    formant_filter_[i].Init();\n  }\n  \n  limiter_.Init();\n  \n  reverb_.Init(reverb_buffer);\n  chorus_.Init(reverb_buffer);\n  ensemble_.Init(reverb_buffer);\n  \n  note_filter_.Init(\n      kSampleRate / kMaxBlockSize,\n      0.001f,  // Lag time with a sharp edge on the V/Oct input or trigger.\n      0.005f,  // Lag time after the trigger has been received.\n      0.050f,  // Time to transition from reactive to filtered.\n      0.004f); // Prevent a sharp edge to partly leak on the previous voice.\n}\n\nconst int32_t kRegistrationTableSize = 11;\nconst float registrations[kRegistrationTableSize][kNumHarmonics * 2] = {\n  { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },\n  { 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f },\n  { 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f },\n  { 1.0f, 0.1f, 0.0f, 0.0f, 1.0f, 0.0f },\n  { 1.0f, 0.5f, 1.0f, 0.0f, 1.0f, 0.0f },\n  { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f },\n  { 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f },\n  { 0.0f, 0.5f, 1.0f, 0.0f, 1.0f, 0.0f },\n  { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f },\n  { 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f },\n  { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },\n};\n\nvoid StringSynthPart::ComputeRegistration(\n    float gain,\n    float registration,\n    float* amplitudes) {\n  registration *= (kRegistrationTableSize - 1.001f);\n  MAKE_INTEGRAL_FRACTIONAL(registration);\n  float total = 0.0f;\n  for (int32_t i = 0; i < kNumHarmonics * 2; ++i) {\n    float a = registrations[registration_integral][i];\n    float b = registrations[registration_integral + 1][i];\n    amplitudes[i] = a + (b - a) * registration_fractional;\n    total += amplitudes[i];\n  }\n  for (int32_t i = 0; i < kNumHarmonics * 2; ++i) {\n    amplitudes[i] = gain * amplitudes[i] / total;\n  }\n}\n\n#ifdef BRYAN_CHORDS\n\n// Chord table by Bryan Noll:\n// - more compact, leaving room for a bass\n// - more frequent note changes between adjacent chords.\n// - dropped fifth.\nconst float chords[kMaxStringSynthPolyphony][kNumChords][kMaxChordSize] = {\n  {\n    { -12.0f, -0.01f,  0.0f,  0.01f,  0.02f, 11.99f, 12.0f, 24.0f }, // OCT\n    { -12.0f, -5.01f, -5.0f,  0.0f,   7.0f,  12.0f,  19.0f, 24.0f }, // 5\n    { -12.0f, -5.0f,   0.0f,  5.0f,   7.0f,  12.0f,  17.0f, 24.0f }, // sus4\n    { -12.0f, -5.0f,   0.0f,  0.01f,  3.0f,  12.0f,  19.0f, 24.0f }, // m\n    { -12.0f, -5.01f, -5.0f,  0.0f,   3.0f,  10.0f,  19.0f, 24.0f }, // m7\n    { -12.0f, -5.0f,   0.0f,  3.0f,  10.0f,  14.0f,  19.0f, 24.0f }, // m9\n    { -12.0f, -5.01f, -5.0f,  0.0f,   3.0f,  10.0f,  17.0f, 24.0f }, // m11\n    { -12.0f, -5.0f,   0.0f,  2.0f,   9.0f,  16.0f,  19.0f, 24.0f }, // 69\n    { -12.0f, -5.0f,   0.0f,  4.0f,  11.0f,  14.0f,  19.0f, 24.0f }, // M9\n    { -12.0f, -5.0f,   0.0f,  4.0f,   7.0f,  11.0f,  19.0f, 24.0f }, // M7\n    { -12.0f, -5.0f,   0.0f,  4.0f,   7.0f,  12.0f,  19.0f, 24.0f }, // M\n  },\n  {\n    { -12.0f, -0.01f,  0.0f,  0.01f, 12.0f,  12.01f }, // OCT\n    { -12.0f, -5.01f, -5.0f,  0.0f,   7.0f,  12.0f  }, // 5\n    { -12.0f, -5.0f,   0.0f,  5.0f,   7.0f,  12.0f  }, // sus4\n    { -12.0f, -5.0f,   0.0f,  0.01f,  3.0f,  12.0f  }, // m\n    { -12.0f, -5.01f, -5.0f,  0.0f,   3.0f,  10.0f  }, // m7\n    { -12.0f, -5.0f,   0.0f,  3.0f,  10.0f,  14.0f  }, // m9\n    { -12.0f, -5.0f,   0.0f,  3.0f,  10.0f,  17.0f  }, // m11\n    { -12.0f, -5.0f,   0.0f,  2.0f,   9.0f,  16.0f  }, // 69\n    { -12.0f, -5.0f,   0.0f,  4.0f,  11.0f,  14.0f  }, // M9\n    { -12.0f, -5.0f,   0.0f,  4.0f,   7.0f,  11.0f  }, // M7\n    { -12.0f, -5.0f,   0.0f,  4.0f,   7.0f,  12.0f  }, // M\n  },\n  {\n    { -12.0f, 0.0f,  0.01f, 12.0f }, // OCT\n    { -12.0f, 6.99f, 7.0f,  12.0f }, // 5\n    { -12.0f, 5.0f,  7.0f,  12.0f }, // sus4\n    { -12.0f, 3.0f, 11.99f, 12.0f }, // m\n    { -12.0f, 3.0f,  9.99f, 10.0f }, // m7\n    { -12.0f, 3.0f, 10.0f,  14.0f }, // m9\n    { -12.0f, 3.0f, 10.0f,  17.0f }, // m11\n    { -12.0f, 2.0f,  9.0f,  16.0f }, // 69\n    { -12.0f, 4.0f, 11.0f,  14.0f }, // M9\n    { -12.0f, 4.0f,  7.0f,  11.0f }, // M7\n    { -12.0f, 4.0f,  7.0f,  12.0f }, // M\n  },\n  {\n    { 0.0f,  0.01f, 12.0f }, // OCT\n    { 0.0f,  7.0f,  12.0f }, // 5\n    { 5.0f,  7.0f,  12.0f }, // sus4\n    { 0.0f,  3.0f,  12.0f }, // m\n    { 0.0f,  3.0f,  10.0f }, // m7\n    { 3.0f, 10.0f,  14.0f }, // m9\n    { 3.0f, 10.0f,  17.0f }, // m11\n    { 2.0f,  9.0f,  16.0f }, // 69\n    { 4.0f, 11.0f,  14.0f }, // M9\n    { 4.0f,  7.0f,  11.0f }, // M7\n    { 4.0f,  7.0f,  12.0f }, // M\n  }\n};\n\n#else\n\n// Original chord table:\n// - wider, occupies more room in the spectrum.\n// - minimum number of note changes between adjacent chords.\n// - consistant with the chord table used for the sympathetic strings model.\nconst float chords[kMaxStringSynthPolyphony][kNumChords][kMaxChordSize] = {\n  {\n    { -24.0f, -12.0f, 0.0f, 0.01f, 0.02f, 11.99f, 12.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 3.0f,  7.0f,  10.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 3.0f,  7.0f,  12.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 3.0f,  7.0f,  14.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 3.0f,  7.0f,  17.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 6.99f, 7.0f,  18.99f, 19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 4.0f,  7.0f,  17.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 4.0f,  7.0f,  14.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 4.0f,  7.0f,  12.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 4.0f,  7.0f,  11.0f,  19.0f, 24.0f },\n    { -24.0f, -12.0f, 0.0f, 5.0f,  7.0f,  12.0f,  17.0f, 24.0f },\n  },\n  {\n    { -24.0f, -12.0f, 0.0f, 0.01f, 12.0f, 12.01f },\n    { -24.0f, -12.0f, 0.0f, 3.00f, 7.0f,  10.0f },\n    { -24.0f, -12.0f, 0.0f, 3.00f, 7.0f,  12.0f },\n    { -24.0f, -12.0f, 0.0f, 3.00f, 7.0f,  14.0f },\n    { -24.0f, -12.0f, 0.0f, 3.00f, 7.0f,  17.0f },\n    { -24.0f, -12.0f, 0.0f, 6.99f, 12.0f, 19.0f },\n    { -24.0f, -12.0f, 0.0f, 4.00f, 7.0f,  17.0f },\n    { -24.0f, -12.0f, 0.0f, 4.00f, 7.0f,  14.0f },\n    { -24.0f, -12.0f, 0.0f, 4.00f, 7.0f,  12.0f },\n    { -24.0f, -12.0f, 0.0f, 4.00f, 7.0f,  11.0f },\n    { -24.0f, -12.0f, 0.0f, 5.00f, 7.0f, 12.0f },\n  },\n  {\n    { -12.0f, 0.0f, 0.01f, 12.0f },\n    { -12.0f, 3.0f, 7.0f,  10.0f },\n    { -12.0f, 3.0f, 7.0f,  12.0f },\n    { -12.0f, 3.0f, 7.0f,  14.0f },\n    { -12.0f, 3.0f, 7.0f,  17.0f },\n    { -12.0f, 7.0f, 12.0f, 19.0f },\n    { -12.0f, 4.0f, 7.0f,  17.0f },\n    { -12.0f, 4.0f, 7.0f,  14.0f },\n    { -12.0f, 4.0f, 7.0f,  12.0f },\n    { -12.0f, 4.0f, 7.0f,  11.0f },\n    { -12.0f, 5.0f, 7.0f, 12.0f },\n  },\n  {\n    { 0.0f, 0.01f, 12.0f },\n    { 0.0f, 3.0f,  10.0f },\n    { 0.0f, 3.0f,  7.0f },\n    { 0.0f, 3.0f,  14.0f },\n    { 0.0f, 3.0f,  17.0f },\n    { 0.0f, 7.0f,  19.0f },\n    { 0.0f, 4.0f,  17.0f },\n    { 0.0f, 4.0f,  14.0f },\n    { 0.0f, 4.0f,  7.0f },\n    { 0.0f, 4.0f,  11.0f },\n    { 0.0f, 5.0f,  7.0f },\n  }\n};\n\n#endif  // BRYAN_CHORDS\n\nvoid StringSynthPart::ProcessEnvelopes(\n    float shape,\n    uint8_t* flags,\n    float* values) {\n  float decay = shape;\n  float attack = 0.0f;\n  if (shape < 0.5f) {\n    attack = 0.0f;\n  } else {\n    attack = (shape - 0.5f) * 2.0f;\n  }\n  \n  // Convert the arbitrary values to actual units.\n  float period = kSampleRate / kMaxBlockSize;\n  float attack_time = SemitonesToRatio(attack * 96.0f) * 0.005f * period;\n  // float decay_time = SemitonesToRatio(decay * 96.0f) * 0.125f * period;\n  float decay_time = SemitonesToRatio(decay * 84.0f) * 0.180f * period;\n  float attack_rate = 1.0f / attack_time;\n  float decay_rate = 1.0f / decay_time;\n  \n  for (int32_t i = 0; i < polyphony_; ++i) {\n    float drone = shape < 0.98f ? 0.0f : (shape - 0.98f) * 55.0f;\n    if (drone >= 1.0f) drone = 1.0f;\n\n    group_[i].envelope.set_ad(attack_rate, decay_rate);\n    float value = group_[i].envelope.Process(flags[i]);\n    values[i] = value + (1.0f - value) * drone;\n  }\n}\n\nconst int32_t kFormantTableSize = 5;\nconst float formants[kFormantTableSize][kNumFormants] = {\n  { 700, 1100, 2400 },\n  { 500, 1300, 1700 },\n  { 400, 2000, 2500 },\n  { 600, 800, 2400 },\n  { 300, 900, 2200 },\n};\n\nvoid StringSynthPart::ProcessFormantFilter(\n    float vowel,\n    float shift,\n    float resonance,\n    float* out,\n    float* aux,\n    size_t size) {\n  for (size_t i = 0; i < size; ++i) {\n    filter_in_buffer_[i] = out[i] + aux[i];\n  }\n  fill(&out[0], &out[size], 0.0f);\n  fill(&aux[0], &aux[size], 0.0f);\n\n  vowel *= (kFormantTableSize - 1.001f);\n  MAKE_INTEGRAL_FRACTIONAL(vowel);\n  \n  for (int32_t i = 0; i < kNumFormants; ++i) {\n    float a = formants[vowel_integral][i];\n    float b = formants[vowel_integral + 1][i];\n    float f = a + (b - a) * vowel_fractional;\n    f *= shift;\n    formant_filter_[i].set_f_q<FREQUENCY_DIRTY>(f / kSampleRate, resonance);\n    formant_filter_[i].Process<FILTER_MODE_BAND_PASS>(\n        filter_in_buffer_,\n        filter_out_buffer_,\n        size);\n    const float pan = i * 0.3f + 0.2f;\n    for (size_t j = 0; j < size; ++j) {\n      out[j] += filter_out_buffer_[j] * pan * 0.5f;\n      aux[j] += filter_out_buffer_[j] * (1.0f - pan) * 0.5f;\n    }\n  }\n}\n\nstruct ChordNote {\n  float note;\n  float amplitude;\n};\n\nvoid StringSynthPart::Process(\n    const PerformanceState& performance_state,\n    const Patch& patch,\n    const float* in,\n    float* out,\n    float* aux,\n    size_t size) {\n  // Assign note to a voice.\n  uint8_t envelope_flags[kMaxStringSynthPolyphony];\n  \n  fill(&envelope_flags[0], &envelope_flags[polyphony_], 0);\n  note_filter_.Process(performance_state.note, performance_state.strum);\n  if (performance_state.strum) {\n    group_[active_group_].tonic = note_filter_.stable_note();\n    envelope_flags[active_group_] = ENVELOPE_FLAG_FALLING_EDGE;\n    active_group_ = (active_group_ + 1) % polyphony_;\n    envelope_flags[active_group_] = ENVELOPE_FLAG_RISING_EDGE;\n    acquisition_delay_ = 3;\n  }\n  if (acquisition_delay_) {\n    --acquisition_delay_;\n  } else {\n    group_[active_group_].tonic = note_filter_.note();\n    group_[active_group_].chord = performance_state.chord;\n    group_[active_group_].structure = patch.structure;\n    envelope_flags[active_group_] |= ENVELOPE_FLAG_GATE;\n  }\n\n  // Process envelopes.\n  float envelope_values[kMaxStringSynthPolyphony];\n  ProcessEnvelopes(patch.damping, envelope_flags, envelope_values);\n  \n  copy(&in[0], &in[size], &aux[0]);\n  copy(&in[0], &in[size], &out[0]);\n  int32_t chord_size = min(kStringSynthVoices / polyphony_, kMaxChordSize);\n  for (int32_t group = 0; group < polyphony_; ++group) {\n    ChordNote notes[kMaxChordSize];\n    float harmonics[kNumHarmonics * 2];\n    \n    ComputeRegistration(\n        envelope_values[group] * 0.25f,\n        patch.brightness,\n        harmonics);\n    \n    // Note enough polyphony for smooth transition between chords.\n    for (int32_t i = 0; i < chord_size; ++i) {\n      float n = chords[polyphony_ - 1][group_[group].chord][i];\n      notes[i].note = n;\n      notes[i].amplitude = n >= 0.0f && n <= 17.0f ? 1.0f : 0.7f;\n    }\n\n    for (int32_t chord_note = 0; chord_note < chord_size; ++chord_note) {\n      float note = 0.0f;\n      note += group_[group].tonic;\n      note += performance_state.tonic;\n      note += performance_state.fm;\n      note += notes[chord_note].note;\n      \n      float amplitudes[kNumHarmonics * 2];\n      for (int32_t i = 0; i < kNumHarmonics * 2; ++i) {\n        amplitudes[i] = notes[chord_note].amplitude * harmonics[i];\n      }\n      \n      // Fold truncated harmonics.\n      size_t num_harmonics = polyphony_ >= 2 && chord_note < 2\n          ? kNumHarmonics - 1\n          : kNumHarmonics;\n      for (int32_t i = num_harmonics; i < kNumHarmonics; ++i) {\n        amplitudes[2 * (num_harmonics - 1)] += amplitudes[2 * i];\n        amplitudes[2 * (num_harmonics - 1) + 1] += amplitudes[2 * i + 1];\n      }\n\n      float frequency = SemitonesToRatio(note - 69.0f) * a3;\n      voice_[group * chord_size + chord_note].Render(\n          frequency,\n          amplitudes,\n          num_harmonics,\n          (group + chord_note) & 1 ? out : aux,\n          size);\n    }\n  }\n  \n  if (clear_fx_) {\n    reverb_.Clear();\n    clear_fx_ = false;\n  }\n  \n  switch (fx_type_) {\n    case FX_FORMANT:\n    case FX_FORMANT_2:\n      ProcessFormantFilter(\n          patch.position,\n          fx_type_ == FX_FORMANT ? 1.0f : 1.1f,\n          fx_type_ == FX_FORMANT ? 25.0f : 10.0f,\n          out,\n          aux,\n          size);\n      break;\n\n    case FX_CHORUS:\n      chorus_.set_amount(patch.position);\n      chorus_.set_depth(0.15f + 0.5f * patch.position);\n      chorus_.Process(out, aux, size);\n      break;\n    \n    case FX_ENSEMBLE:\n      ensemble_.set_amount(patch.position * (2.0f - patch.position));\n      ensemble_.set_depth(0.2f + 0.8f * patch.position * patch.position);\n      ensemble_.Process(out, aux, size);\n      break;\n  \n    case FX_REVERB:\n    case FX_REVERB_2:\n      reverb_.set_amount(patch.position * 0.5f);\n      reverb_.set_diffusion(0.625f);\n      reverb_.set_time(fx_type_ == FX_REVERB\n        ? (0.5f + 0.49f * patch.position)\n        : (0.3f + 0.6f * patch.position));\n      reverb_.set_input_gain(0.2f);\n      reverb_.set_lp(fx_type_ == FX_REVERB ? 0.3f : 0.6f);\n      reverb_.Process(out, aux, size);\n      break;\n    \n    default:\n      break;\n  }\n\n  // Prevent main signal cancellation when EVEN gets summed with ODD through\n  // normalization.\n  for (size_t i = 0; i < size; ++i) {\n    aux[i] = -aux[i];\n  }\n  limiter_.Process(out, aux, size, 1.0f);\n}\n\n}  // namespace rings"
  },
  {
    "path": "lib/rings/dsp/string_synth_part.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Part for the string synth easter egg.\n\n#ifndef RINGS_DSP_STRING_SYNTH_PART_H_\n#define RINGS_DSP_STRING_SYNTH_PART_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/filter.h\"\n\n#include \"rings/dsp/dsp.h\"\n#include \"rings/dsp/fx/chorus.h\"\n#include \"rings/dsp/fx/ensemble.h\"\n#include \"rings/dsp/fx/reverb.h\"\n#include \"rings/dsp/limiter.h\"\n#include \"rings/dsp/note_filter.h\"\n#include \"rings/dsp/patch.h\"\n#include \"rings/dsp/performance_state.h\"\n#include \"rings/dsp/string_synth_envelope.h\"\n#include \"rings/dsp/string_synth_voice.h\"\n\nnamespace rings {\n\nconst int32_t kMaxStringSynthPolyphony = 4;\nconst int32_t kStringSynthVoices = 12;\nconst int32_t kMaxChordSize = 8;\nconst int32_t kNumHarmonics = 3;\nconst int32_t kNumFormants = 3;\n\nenum FxType {\n  FX_FORMANT,\n  FX_CHORUS,\n  FX_REVERB,\n  FX_FORMANT_2,\n  FX_ENSEMBLE,\n  FX_REVERB_2,\n  FX_LAST\n};\n\nstruct VoiceGroup {\n  float tonic;\n  StringSynthEnvelope envelope;\n  int32_t chord;\n  float structure;\n};\n\nclass StringSynthPart {\n public:\n  StringSynthPart() { }\n  ~StringSynthPart() { }\n  \n  void Init(uint16_t* reverb_buffer);\n  \n  void Process(\n      const PerformanceState& performance_state,\n      const Patch& patch,\n      const float* in,\n      float* out,\n      float* aux,\n      size_t size);\n\n  inline void set_polyphony(int32_t polyphony) {\n    int32_t old_polyphony = polyphony_;\n    polyphony_ = std::min(polyphony, kMaxStringSynthPolyphony);\n    for (int32_t i = old_polyphony; i < polyphony_; ++i) {\n      group_[i].tonic = group_[0].tonic + i * 0.01f;\n    }\n    if (active_group_ >= polyphony_) {\n      active_group_ = 0;\n    }\n  }\n  \n  inline void set_fx(FxType fx_type) {\n    if ((fx_type % 3) != (fx_type_ % 3)) {\n      clear_fx_ = true;\n    }\n    fx_type_ = fx_type;\n  }\n  \n private:\n  void ProcessEnvelopes(float shape, uint8_t* flags, float* values);\n  void ComputeRegistration(float gain, float registration, float* amplitudes);\n\n  void ProcessFormantFilter(float vowel, float shift, float resonance,\n                            float* out, float* aux, size_t size);\n  \n  StringSynthVoice<kNumHarmonics> voice_[kStringSynthVoices];\n  VoiceGroup group_[kMaxStringSynthPolyphony];\n  \n  stmlib::Svf formant_filter_[kNumFormants];\n  Ensemble ensemble_;\n  Reverb reverb_;\n  Chorus chorus_;\n  Limiter limiter_;\n\n  int32_t num_voices_;\n  int32_t active_group_;\n  uint32_t step_counter_;\n  int32_t polyphony_;\n  int32_t acquisition_delay_;\n  \n  FxType fx_type_;\n  \n  NoteFilter note_filter_;\n  \n  float filter_in_buffer_[kMaxBlockSize];\n  float filter_out_buffer_[kMaxBlockSize];\n  \n  bool clear_fx_;\n  \n  DISALLOW_COPY_AND_ASSIGN(StringSynthPart);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_STRING_SYNTH_VOICE_H_\n"
  },
  {
    "path": "lib/rings/dsp/string_synth_voice.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Voice for the string synth easter egg.\n\n#ifndef RINGS_DSP_STRING_SYNTH_VOICE_H_\n#define RINGS_DSP_STRING_SYNTH_VOICE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"rings/dsp/string_synth_oscillator.h\"\n\nnamespace rings {\n\ntemplate<size_t num_harmonics>\nclass StringSynthVoice {\n public:\n  StringSynthVoice() { }\n  ~StringSynthVoice() { }\n  \n  void Init() {\n    for (size_t i = 0; i < num_harmonics; ++i) {\n      oscillator_[i].Init();\n    }\n  }\n  \n  void Render(\n      float frequency,\n      const float* amplitudes,\n      size_t summed_harmonics,\n      float* out,\n      size_t size) {\n    oscillator_[0].template Render<OSCILLATOR_SHAPE_DARK_SQUARE, true>(\n        frequency, amplitudes[0], amplitudes[1], out, size);\n    amplitudes += 2;\n    \n    for (size_t i = 1; i < summed_harmonics; ++i) {\n      frequency *= 2.0f;\n      oscillator_[i].template Render<OSCILLATOR_SHAPE_BRIGHT_SQUARE, false>(\n          frequency, amplitudes[0], amplitudes[1], out, size);\n      amplitudes += 2;\n    }\n  }\n\n private:\n  StringSynthOscillator oscillator_[num_harmonics];\n  DISALLOW_COPY_AND_ASSIGN(StringSynthVoice);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_STRING_SYNTH_VOICE_H_\n"
  },
  {
    "path": "lib/rings/dsp/strummer.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Strumming logic.\n\n#ifndef RINGS_DSP_STRUMMER_H_\n#define RINGS_DSP_STRUMMER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"rings/dsp/onset_detector.h\"\n#include \"rings/dsp/part.h\"\n\nnamespace rings {\n\nclass Strummer {\n public:\n  Strummer() { }\n  ~Strummer() { }\n  \n  void Init(float ioi, float sr) {\n    onset_detector_.Init(\n        8.0f / kSampleRate,\n        160.0f / kSampleRate,\n        1600.0f / kSampleRate,\n        sr,\n        ioi);\n    inhibit_timer_ = static_cast<int32_t>(ioi * sr);\n    inhibit_counter_ = 0;\n    previous_note_ = 69.0f;\n  }\n  \n  void Process(\n      const float* in,\n      size_t size,\n      PerformanceState* performance_state) {\n    \n    bool has_onset = in && onset_detector_.Process(in, size);\n    bool note_changed = fabsf(performance_state->note - previous_note_) > 0.4f;\n\n    int32_t inhibit_timer = inhibit_timer_;\n    if (performance_state->internal_strum) {\n      bool has_external_note_cv = !performance_state->internal_note;\n      bool has_external_exciter = !performance_state->internal_exciter;\n      if (has_external_note_cv) {\n        performance_state->strum = note_changed;\n      } else if (has_external_exciter) {\n        performance_state->strum = has_onset;\n        // Use longer inhibit time for onset detector.\n        inhibit_timer *= 4;\n      } else {\n        // Nothing is connected. Should the module play itself in this case?\n        performance_state->strum = false;\n      }\n    }\n\n    if (inhibit_counter_) {\n      --inhibit_counter_;\n      performance_state->strum = false;\n    } else {\n      if (performance_state->strum) {\n        inhibit_counter_ = inhibit_timer;\n      }\n    }\n    previous_note_ = performance_state->note;\n  }\n\n private:\n  float previous_note_;\n  int32_t inhibit_counter_;\n  int32_t inhibit_timer_;\n  \n  OnsetDetector onset_detector_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Strummer);\n};\n\n}  // namespace rings\n\n#endif  // RINGS_DSP_STRUMMER_H_\n"
  },
  {
    "path": "lib/rings/resources.cc",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"rings/resources.h\"\n\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\n\nnamespace rings {\n\nconst float FLASHMEM lut_sine[] = {\n   0.000000000e+00,  1.533980186e-03,  3.067956763e-03,  4.601926120e-03,\n   6.135884649e-03,  7.669828740e-03,  9.203754782e-03,  1.073765917e-02,\n   1.227153829e-02,  1.380538853e-02,  1.533920628e-02,  1.687298795e-02,\n   1.840672991e-02,  1.994042855e-02,  2.147408028e-02,  2.300768147e-02,\n   2.454122852e-02,  2.607471783e-02,  2.760814578e-02,  2.914150876e-02,\n   3.067480318e-02,  3.220802541e-02,  3.374117185e-02,  3.527423890e-02,\n   3.680722294e-02,  3.834012037e-02,  3.987292759e-02,  4.140564098e-02,\n   4.293825693e-02,  4.447077185e-02,  4.600318213e-02,  4.753548416e-02,\n   4.906767433e-02,  5.059974904e-02,  5.213170468e-02,  5.366353765e-02,\n   5.519524435e-02,  5.672682117e-02,  5.825826450e-02,  5.978957075e-02,\n   6.132073630e-02,  6.285175756e-02,  6.438263093e-02,  6.591335280e-02,\n   6.744391956e-02,  6.897432763e-02,  7.050457339e-02,  7.203465325e-02,\n   7.356456360e-02,  7.509430085e-02,  7.662386139e-02,  7.815324163e-02,\n   7.968243797e-02,  8.121144681e-02,  8.274026455e-02,  8.426888759e-02,\n   8.579731234e-02,  8.732553521e-02,  8.885355258e-02,  9.038136088e-02,\n   9.190895650e-02,  9.343633585e-02,  9.496349533e-02,  9.649043136e-02,\n   9.801714033e-02,  9.954361866e-02,  1.010698628e-01,  1.025958690e-01,\n   1.041216339e-01,  1.056471537e-01,  1.071724250e-01,  1.086974440e-01,\n   1.102222073e-01,  1.117467112e-01,  1.132709522e-01,  1.147949266e-01,\n   1.163186309e-01,  1.178420615e-01,  1.193652148e-01,  1.208880872e-01,\n   1.224106752e-01,  1.239329751e-01,  1.254549834e-01,  1.269766965e-01,\n   1.284981108e-01,  1.300192227e-01,  1.315400287e-01,  1.330605252e-01,\n   1.345807085e-01,  1.361005752e-01,  1.376201216e-01,  1.391393442e-01,\n   1.406582393e-01,  1.421768035e-01,  1.436950332e-01,  1.452129247e-01,\n   1.467304745e-01,  1.482476790e-01,  1.497645347e-01,  1.512810380e-01,\n   1.527971853e-01,  1.543129730e-01,  1.558283977e-01,  1.573434556e-01,\n   1.588581433e-01,  1.603724572e-01,  1.618863938e-01,  1.633999494e-01,\n   1.649131205e-01,  1.664259035e-01,  1.679382950e-01,  1.694502912e-01,\n   1.709618888e-01,  1.724730840e-01,  1.739838734e-01,  1.754942534e-01,\n   1.770042204e-01,  1.785137709e-01,  1.800229014e-01,  1.815316083e-01,\n   1.830398880e-01,  1.845477369e-01,  1.860551517e-01,  1.875621286e-01,\n   1.890686641e-01,  1.905747548e-01,  1.920803970e-01,  1.935855873e-01,\n   1.950903220e-01,  1.965945977e-01,  1.980984107e-01,  1.996017576e-01,\n   2.011046348e-01,  2.026070388e-01,  2.041089661e-01,  2.056104131e-01,\n   2.071113762e-01,  2.086118520e-01,  2.101118369e-01,  2.116113274e-01,\n   2.131103199e-01,  2.146088110e-01,  2.161067971e-01,  2.176042746e-01,\n   2.191012402e-01,  2.205976901e-01,  2.220936210e-01,  2.235890292e-01,\n   2.250839114e-01,  2.265782638e-01,  2.280720832e-01,  2.295653658e-01,\n   2.310581083e-01,  2.325503070e-01,  2.340419586e-01,  2.355330594e-01,\n   2.370236060e-01,  2.385135948e-01,  2.400030224e-01,  2.414918853e-01,\n   2.429801799e-01,  2.444679027e-01,  2.459550503e-01,  2.474416192e-01,\n   2.489276057e-01,  2.504130066e-01,  2.518978182e-01,  2.533820370e-01,\n   2.548656596e-01,  2.563486825e-01,  2.578311022e-01,  2.593129151e-01,\n   2.607941179e-01,  2.622747070e-01,  2.637546790e-01,  2.652340303e-01,\n   2.667127575e-01,  2.681908571e-01,  2.696683256e-01,  2.711451595e-01,\n   2.726213554e-01,  2.740969099e-01,  2.755718193e-01,  2.770460803e-01,\n   2.785196894e-01,  2.799926431e-01,  2.814649379e-01,  2.829365705e-01,\n   2.844075372e-01,  2.858778347e-01,  2.873474595e-01,  2.888164082e-01,\n   2.902846773e-01,  2.917522632e-01,  2.932191627e-01,  2.946853722e-01,\n   2.961508882e-01,  2.976157074e-01,  2.990798263e-01,  3.005432414e-01,\n   3.020059493e-01,  3.034679466e-01,  3.049292297e-01,  3.063897954e-01,\n   3.078496400e-01,  3.093087603e-01,  3.107671527e-01,  3.122248139e-01,\n   3.136817404e-01,  3.151379288e-01,  3.165933756e-01,  3.180480774e-01,\n   3.195020308e-01,  3.209552324e-01,  3.224076788e-01,  3.238593665e-01,\n   3.253102922e-01,  3.267604523e-01,  3.282098436e-01,  3.296584625e-01,\n   3.311063058e-01,  3.325533699e-01,  3.339996514e-01,  3.354451471e-01,\n   3.368898534e-01,  3.383337670e-01,  3.397768844e-01,  3.412192023e-01,\n   3.426607173e-01,  3.441014260e-01,  3.455413250e-01,  3.469804108e-01,\n   3.484186802e-01,  3.498561298e-01,  3.512927561e-01,  3.527285558e-01,\n   3.541635254e-01,  3.555976617e-01,  3.570309612e-01,  3.584634206e-01,\n   3.598950365e-01,  3.613258056e-01,  3.627557244e-01,  3.641847896e-01,\n   3.656129978e-01,  3.670403457e-01,  3.684668300e-01,  3.698924471e-01,\n   3.713171940e-01,  3.727410670e-01,  3.741640630e-01,  3.755861785e-01,\n   3.770074102e-01,  3.784277548e-01,  3.798472089e-01,  3.812657692e-01,\n   3.826834324e-01,  3.841001950e-01,  3.855160538e-01,  3.869310055e-01,\n   3.883450467e-01,  3.897581741e-01,  3.911703843e-01,  3.925816741e-01,\n   3.939920401e-01,  3.954014789e-01,  3.968099874e-01,  3.982175622e-01,\n   3.996241998e-01,  4.010298972e-01,  4.024346509e-01,  4.038384576e-01,\n   4.052413140e-01,  4.066432169e-01,  4.080441629e-01,  4.094441487e-01,\n   4.108431711e-01,  4.122412267e-01,  4.136383122e-01,  4.150344245e-01,\n   4.164295601e-01,  4.178237158e-01,  4.192168884e-01,  4.206090744e-01,\n   4.220002708e-01,  4.233904741e-01,  4.247796812e-01,  4.261678887e-01,\n   4.275550934e-01,  4.289412921e-01,  4.303264813e-01,  4.317106580e-01,\n   4.330938189e-01,  4.344759606e-01,  4.358570799e-01,  4.372371737e-01,\n   4.386162385e-01,  4.399942713e-01,  4.413712687e-01,  4.427472276e-01,\n   4.441221446e-01,  4.454960165e-01,  4.468688402e-01,  4.482406123e-01,\n   4.496113297e-01,  4.509809890e-01,  4.523495872e-01,  4.537171210e-01,\n   4.550835871e-01,  4.564489824e-01,  4.578133036e-01,  4.591765475e-01,\n   4.605387110e-01,  4.618997907e-01,  4.632597836e-01,  4.646186863e-01,\n   4.659764958e-01,  4.673332087e-01,  4.686888220e-01,  4.700433325e-01,\n   4.713967368e-01,  4.727490320e-01,  4.741002147e-01,  4.754502817e-01,\n   4.767992301e-01,  4.781470564e-01,  4.794937577e-01,  4.808393306e-01,\n   4.821837721e-01,  4.835270789e-01,  4.848692480e-01,  4.862102761e-01,\n   4.875501601e-01,  4.888888969e-01,  4.902264833e-01,  4.915629161e-01,\n   4.928981922e-01,  4.942323085e-01,  4.955652618e-01,  4.968970490e-01,\n   4.982276670e-01,  4.995571125e-01,  5.008853826e-01,  5.022124740e-01,\n   5.035383837e-01,  5.048631085e-01,  5.061866453e-01,  5.075089911e-01,\n   5.088301425e-01,  5.101500967e-01,  5.114688504e-01,  5.127864006e-01,\n   5.141027442e-01,  5.154178780e-01,  5.167317990e-01,  5.180445041e-01,\n   5.193559902e-01,  5.206662541e-01,  5.219752929e-01,  5.232831035e-01,\n   5.245896827e-01,  5.258950275e-01,  5.271991348e-01,  5.285020015e-01,\n   5.298036247e-01,  5.311040012e-01,  5.324031279e-01,  5.337010018e-01,\n   5.349976199e-01,  5.362929791e-01,  5.375870763e-01,  5.388799085e-01,\n   5.401714727e-01,  5.414617659e-01,  5.427507849e-01,  5.440385267e-01,\n   5.453249884e-01,  5.466101669e-01,  5.478940592e-01,  5.491766622e-01,\n   5.504579729e-01,  5.517379884e-01,  5.530167056e-01,  5.542941215e-01,\n   5.555702330e-01,  5.568450373e-01,  5.581185312e-01,  5.593907119e-01,\n   5.606615762e-01,  5.619311212e-01,  5.631993440e-01,  5.644662415e-01,\n   5.657318108e-01,  5.669960488e-01,  5.682589527e-01,  5.695205193e-01,\n   5.707807459e-01,  5.720396293e-01,  5.732971667e-01,  5.745533550e-01,\n   5.758081914e-01,  5.770616729e-01,  5.783137964e-01,  5.795645591e-01,\n   5.808139581e-01,  5.820619903e-01,  5.833086529e-01,  5.845539430e-01,\n   5.857978575e-01,  5.870403935e-01,  5.882815482e-01,  5.895213186e-01,\n   5.907597019e-01,  5.919966950e-01,  5.932322950e-01,  5.944664992e-01,\n   5.956993045e-01,  5.969307081e-01,  5.981607070e-01,  5.993892984e-01,\n   6.006164794e-01,  6.018422471e-01,  6.030665985e-01,  6.042895309e-01,\n   6.055110414e-01,  6.067311270e-01,  6.079497850e-01,  6.091670123e-01,\n   6.103828063e-01,  6.115971639e-01,  6.128100824e-01,  6.140215589e-01,\n   6.152315906e-01,  6.164401745e-01,  6.176473079e-01,  6.188529880e-01,\n   6.200572118e-01,  6.212599765e-01,  6.224612794e-01,  6.236611175e-01,\n   6.248594881e-01,  6.260563884e-01,  6.272518155e-01,  6.284457666e-01,\n   6.296382389e-01,  6.308292296e-01,  6.320187359e-01,  6.332067551e-01,\n   6.343932842e-01,  6.355783205e-01,  6.367618612e-01,  6.379439036e-01,\n   6.391244449e-01,  6.403034822e-01,  6.414810128e-01,  6.426570340e-01,\n   6.438315429e-01,  6.450045368e-01,  6.461760130e-01,  6.473459686e-01,\n   6.485144010e-01,  6.496813074e-01,  6.508466850e-01,  6.520105311e-01,\n   6.531728430e-01,  6.543336178e-01,  6.554928530e-01,  6.566505457e-01,\n   6.578066933e-01,  6.589612930e-01,  6.601143421e-01,  6.612658378e-01,\n   6.624157776e-01,  6.635641586e-01,  6.647109782e-01,  6.658562337e-01,\n   6.669999223e-01,  6.681420414e-01,  6.692825883e-01,  6.704215604e-01,\n   6.715589548e-01,  6.726947691e-01,  6.738290004e-01,  6.749616461e-01,\n   6.760927036e-01,  6.772221701e-01,  6.783500431e-01,  6.794763199e-01,\n   6.806009978e-01,  6.817240742e-01,  6.828455464e-01,  6.839654118e-01,\n   6.850836678e-01,  6.862003117e-01,  6.873153409e-01,  6.884287528e-01,\n   6.895405447e-01,  6.906507141e-01,  6.917592584e-01,  6.928661748e-01,\n   6.939714609e-01,  6.950751140e-01,  6.961771315e-01,  6.972775108e-01,\n   6.983762494e-01,  6.994733446e-01,  7.005687939e-01,  7.016625947e-01,\n   7.027547445e-01,  7.038452405e-01,  7.049340804e-01,  7.060212614e-01,\n   7.071067812e-01,  7.081906370e-01,  7.092728264e-01,  7.103533469e-01,\n   7.114321957e-01,  7.125093706e-01,  7.135848688e-01,  7.146586879e-01,\n   7.157308253e-01,  7.168012785e-01,  7.178700451e-01,  7.189371224e-01,\n   7.200025080e-01,  7.210661993e-01,  7.221281939e-01,  7.231884893e-01,\n   7.242470830e-01,  7.253039724e-01,  7.263591551e-01,  7.274126286e-01,\n   7.284643904e-01,  7.295144381e-01,  7.305627692e-01,  7.316093812e-01,\n   7.326542717e-01,  7.336974381e-01,  7.347388781e-01,  7.357785892e-01,\n   7.368165689e-01,  7.378528148e-01,  7.388873245e-01,  7.399200955e-01,\n   7.409511254e-01,  7.419804117e-01,  7.430079521e-01,  7.440337442e-01,\n   7.450577854e-01,  7.460800735e-01,  7.471006060e-01,  7.481193805e-01,\n   7.491363945e-01,  7.501516458e-01,  7.511651319e-01,  7.521768504e-01,\n   7.531867990e-01,  7.541949753e-01,  7.552013769e-01,  7.562060014e-01,\n   7.572088465e-01,  7.582099098e-01,  7.592091890e-01,  7.602066817e-01,\n   7.612023855e-01,  7.621962981e-01,  7.631884173e-01,  7.641787405e-01,\n   7.651672656e-01,  7.661539902e-01,  7.671389119e-01,  7.681220285e-01,\n   7.691033376e-01,  7.700828370e-01,  7.710605243e-01,  7.720363972e-01,\n   7.730104534e-01,  7.739826906e-01,  7.749531066e-01,  7.759216990e-01,\n   7.768884657e-01,  7.778534042e-01,  7.788165124e-01,  7.797777879e-01,\n   7.807372286e-01,  7.816948321e-01,  7.826505962e-01,  7.836045186e-01,\n   7.845565972e-01,  7.855068296e-01,  7.864552136e-01,  7.874017470e-01,\n   7.883464276e-01,  7.892892532e-01,  7.902302214e-01,  7.911693302e-01,\n   7.921065773e-01,  7.930419605e-01,  7.939754776e-01,  7.949071263e-01,\n   7.958369046e-01,  7.967648102e-01,  7.976908409e-01,  7.986149946e-01,\n   7.995372691e-01,  8.004576622e-01,  8.013761717e-01,  8.022927955e-01,\n   8.032075315e-01,  8.041203774e-01,  8.050313311e-01,  8.059403906e-01,\n   8.068475535e-01,  8.077528179e-01,  8.086561816e-01,  8.095576424e-01,\n   8.104571983e-01,  8.113548470e-01,  8.122505866e-01,  8.131444148e-01,\n   8.140363297e-01,  8.149263291e-01,  8.158144108e-01,  8.167005729e-01,\n   8.175848132e-01,  8.184671296e-01,  8.193475201e-01,  8.202259826e-01,\n   8.211025150e-01,  8.219771153e-01,  8.228497814e-01,  8.237205112e-01,\n   8.245893028e-01,  8.254561540e-01,  8.263210628e-01,  8.271840273e-01,\n   8.280450453e-01,  8.289041148e-01,  8.297612338e-01,  8.306164003e-01,\n   8.314696123e-01,  8.323208678e-01,  8.331701647e-01,  8.340175011e-01,\n   8.348628750e-01,  8.357062844e-01,  8.365477272e-01,  8.373872016e-01,\n   8.382247056e-01,  8.390602371e-01,  8.398937942e-01,  8.407253750e-01,\n   8.415549774e-01,  8.423825996e-01,  8.432082396e-01,  8.440318955e-01,\n   8.448535652e-01,  8.456732470e-01,  8.464909388e-01,  8.473066387e-01,\n   8.481203448e-01,  8.489320552e-01,  8.497417680e-01,  8.505494813e-01,\n   8.513551931e-01,  8.521589016e-01,  8.529606049e-01,  8.537603011e-01,\n   8.545579884e-01,  8.553536647e-01,  8.561473284e-01,  8.569389774e-01,\n   8.577286100e-01,  8.585162243e-01,  8.593018184e-01,  8.600853904e-01,\n   8.608669386e-01,  8.616464611e-01,  8.624239561e-01,  8.631994217e-01,\n   8.639728561e-01,  8.647442575e-01,  8.655136241e-01,  8.662809540e-01,\n   8.670462455e-01,  8.678094968e-01,  8.685707060e-01,  8.693298713e-01,\n   8.700869911e-01,  8.708420635e-01,  8.715950867e-01,  8.723460589e-01,\n   8.730949784e-01,  8.738418435e-01,  8.745866523e-01,  8.753294031e-01,\n   8.760700942e-01,  8.768087238e-01,  8.775452902e-01,  8.782797917e-01,\n   8.790122264e-01,  8.797425928e-01,  8.804708891e-01,  8.811971135e-01,\n   8.819212643e-01,  8.826433400e-01,  8.833633387e-01,  8.840812587e-01,\n   8.847970984e-01,  8.855108561e-01,  8.862225301e-01,  8.869321188e-01,\n   8.876396204e-01,  8.883450333e-01,  8.890483559e-01,  8.897495864e-01,\n   8.904487232e-01,  8.911457648e-01,  8.918407094e-01,  8.925335554e-01,\n   8.932243012e-01,  8.939129451e-01,  8.945994856e-01,  8.952839210e-01,\n   8.959662498e-01,  8.966464702e-01,  8.973245807e-01,  8.980005797e-01,\n   8.986744657e-01,  8.993462370e-01,  9.000158920e-01,  9.006834292e-01,\n   9.013488470e-01,  9.020121439e-01,  9.026733182e-01,  9.033323685e-01,\n   9.039892931e-01,  9.046440906e-01,  9.052967593e-01,  9.059472978e-01,\n   9.065957045e-01,  9.072419779e-01,  9.078861165e-01,  9.085281187e-01,\n   9.091679831e-01,  9.098057081e-01,  9.104412923e-01,  9.110747341e-01,\n   9.117060320e-01,  9.123351846e-01,  9.129621904e-01,  9.135870479e-01,\n   9.142097557e-01,  9.148303122e-01,  9.154487161e-01,  9.160649658e-01,\n   9.166790599e-01,  9.172909970e-01,  9.179007756e-01,  9.185083943e-01,\n   9.191138517e-01,  9.197171463e-01,  9.203182767e-01,  9.209172415e-01,\n   9.215140393e-01,  9.221086687e-01,  9.227011283e-01,  9.232914167e-01,\n   9.238795325e-01,  9.244654743e-01,  9.250492408e-01,  9.256308305e-01,\n   9.262102421e-01,  9.267874743e-01,  9.273625257e-01,  9.279353948e-01,\n   9.285060805e-01,  9.290745813e-01,  9.296408958e-01,  9.302050229e-01,\n   9.307669611e-01,  9.313267091e-01,  9.318842656e-01,  9.324396293e-01,\n   9.329927988e-01,  9.335437730e-01,  9.340925504e-01,  9.346391298e-01,\n   9.351835099e-01,  9.357256895e-01,  9.362656672e-01,  9.368034417e-01,\n   9.373390119e-01,  9.378723764e-01,  9.384035341e-01,  9.389324835e-01,\n   9.394592236e-01,  9.399837530e-01,  9.405060706e-01,  9.410261751e-01,\n   9.415440652e-01,  9.420597398e-01,  9.425731976e-01,  9.430844375e-01,\n   9.435934582e-01,  9.441002585e-01,  9.446048373e-01,  9.451071933e-01,\n   9.456073254e-01,  9.461052324e-01,  9.466009131e-01,  9.470943664e-01,\n   9.475855910e-01,  9.480745859e-01,  9.485613499e-01,  9.490458819e-01,\n   9.495281806e-01,  9.500082450e-01,  9.504860739e-01,  9.509616663e-01,\n   9.514350210e-01,  9.519061368e-01,  9.523750127e-01,  9.528416476e-01,\n   9.533060404e-01,  9.537681899e-01,  9.542280951e-01,  9.546857549e-01,\n   9.551411683e-01,  9.555943341e-01,  9.560452513e-01,  9.564939189e-01,\n   9.569403357e-01,  9.573845008e-01,  9.578264130e-01,  9.582660714e-01,\n   9.587034749e-01,  9.591386225e-01,  9.595715131e-01,  9.600021457e-01,\n   9.604305194e-01,  9.608566331e-01,  9.612804858e-01,  9.617020765e-01,\n   9.621214043e-01,  9.625384680e-01,  9.629532669e-01,  9.633657998e-01,\n   9.637760658e-01,  9.641840640e-01,  9.645897933e-01,  9.649932529e-01,\n   9.653944417e-01,  9.657933589e-01,  9.661900034e-01,  9.665843745e-01,\n   9.669764710e-01,  9.673662922e-01,  9.677538371e-01,  9.681391047e-01,\n   9.685220943e-01,  9.689028048e-01,  9.692812354e-01,  9.696573851e-01,\n   9.700312532e-01,  9.704028387e-01,  9.707721407e-01,  9.711391584e-01,\n   9.715038910e-01,  9.718663375e-01,  9.722264971e-01,  9.725843689e-01,\n   9.729399522e-01,  9.732932461e-01,  9.736442497e-01,  9.739929622e-01,\n   9.743393828e-01,  9.746835107e-01,  9.750253451e-01,  9.753648851e-01,\n   9.757021300e-01,  9.760370790e-01,  9.763697313e-01,  9.767000861e-01,\n   9.770281427e-01,  9.773539001e-01,  9.776773578e-01,  9.779985149e-01,\n   9.783173707e-01,  9.786339244e-01,  9.789481753e-01,  9.792601226e-01,\n   9.795697657e-01,  9.798771037e-01,  9.801821360e-01,  9.804848618e-01,\n   9.807852804e-01,  9.810833912e-01,  9.813791933e-01,  9.816726862e-01,\n   9.819638691e-01,  9.822527414e-01,  9.825393023e-01,  9.828235512e-01,\n   9.831054874e-01,  9.833851103e-01,  9.836624192e-01,  9.839374134e-01,\n   9.842100924e-01,  9.844804554e-01,  9.847485018e-01,  9.850142310e-01,\n   9.852776424e-01,  9.855387353e-01,  9.857975092e-01,  9.860539633e-01,\n   9.863080972e-01,  9.865599103e-01,  9.868094018e-01,  9.870565713e-01,\n   9.873014182e-01,  9.875439418e-01,  9.877841416e-01,  9.880220171e-01,\n   9.882575677e-01,  9.884907929e-01,  9.887216920e-01,  9.889502645e-01,\n   9.891765100e-01,  9.894004278e-01,  9.896220175e-01,  9.898412785e-01,\n   9.900582103e-01,  9.902728124e-01,  9.904850843e-01,  9.906950254e-01,\n   9.909026354e-01,  9.911079137e-01,  9.913108598e-01,  9.915114733e-01,\n   9.917097537e-01,  9.919057004e-01,  9.920993131e-01,  9.922905913e-01,\n   9.924795346e-01,  9.926661424e-01,  9.928504145e-01,  9.930323502e-01,\n   9.932119492e-01,  9.933892111e-01,  9.935641355e-01,  9.937367219e-01,\n   9.939069700e-01,  9.940748793e-01,  9.942404495e-01,  9.944036801e-01,\n   9.945645707e-01,  9.947231211e-01,  9.948793308e-01,  9.950331994e-01,\n   9.951847267e-01,  9.953339121e-01,  9.954807555e-01,  9.956252564e-01,\n   9.957674145e-01,  9.959072294e-01,  9.960447009e-01,  9.961798286e-01,\n   9.963126122e-01,  9.964430514e-01,  9.965711458e-01,  9.966968952e-01,\n   9.968202993e-01,  9.969413578e-01,  9.970600703e-01,  9.971764367e-01,\n   9.972904567e-01,  9.974021299e-01,  9.975114561e-01,  9.976184351e-01,\n   9.977230666e-01,  9.978253504e-01,  9.979252862e-01,  9.980228738e-01,\n   9.981181129e-01,  9.982110034e-01,  9.983015449e-01,  9.983897374e-01,\n   9.984755806e-01,  9.985590742e-01,  9.986402182e-01,  9.987190122e-01,\n   9.987954562e-01,  9.988695499e-01,  9.989412932e-01,  9.990106859e-01,\n   9.990777278e-01,  9.991424187e-01,  9.992047586e-01,  9.992647473e-01,\n   9.993223846e-01,  9.993776704e-01,  9.994306046e-01,  9.994811870e-01,\n   9.995294175e-01,  9.995752960e-01,  9.996188225e-01,  9.996599967e-01,\n   9.996988187e-01,  9.997352883e-01,  9.997694054e-01,  9.998011699e-01,\n   9.998305818e-01,  9.998576410e-01,  9.998823475e-01,  9.999047011e-01,\n   9.999247018e-01,  9.999423497e-01,  9.999576446e-01,  9.999705864e-01,\n   9.999811753e-01,  9.999894111e-01,  9.999952938e-01,  9.999988235e-01,\n   1.000000000e+00,  9.999988235e-01,  9.999952938e-01,  9.999894111e-01,\n   9.999811753e-01,  9.999705864e-01,  9.999576446e-01,  9.999423497e-01,\n   9.999247018e-01,  9.999047011e-01,  9.998823475e-01,  9.998576410e-01,\n   9.998305818e-01,  9.998011699e-01,  9.997694054e-01,  9.997352883e-01,\n   9.996988187e-01,  9.996599967e-01,  9.996188225e-01,  9.995752960e-01,\n   9.995294175e-01,  9.994811870e-01,  9.994306046e-01,  9.993776704e-01,\n   9.993223846e-01,  9.992647473e-01,  9.992047586e-01,  9.991424187e-01,\n   9.990777278e-01,  9.990106859e-01,  9.989412932e-01,  9.988695499e-01,\n   9.987954562e-01,  9.987190122e-01,  9.986402182e-01,  9.985590742e-01,\n   9.984755806e-01,  9.983897374e-01,  9.983015449e-01,  9.982110034e-01,\n   9.981181129e-01,  9.980228738e-01,  9.979252862e-01,  9.978253504e-01,\n   9.977230666e-01,  9.976184351e-01,  9.975114561e-01,  9.974021299e-01,\n   9.972904567e-01,  9.971764367e-01,  9.970600703e-01,  9.969413578e-01,\n   9.968202993e-01,  9.966968952e-01,  9.965711458e-01,  9.964430514e-01,\n   9.963126122e-01,  9.961798286e-01,  9.960447009e-01,  9.959072294e-01,\n   9.957674145e-01,  9.956252564e-01,  9.954807555e-01,  9.953339121e-01,\n   9.951847267e-01,  9.950331994e-01,  9.948793308e-01,  9.947231211e-01,\n   9.945645707e-01,  9.944036801e-01,  9.942404495e-01,  9.940748793e-01,\n   9.939069700e-01,  9.937367219e-01,  9.935641355e-01,  9.933892111e-01,\n   9.932119492e-01,  9.930323502e-01,  9.928504145e-01,  9.926661424e-01,\n   9.924795346e-01,  9.922905913e-01,  9.920993131e-01,  9.919057004e-01,\n   9.917097537e-01,  9.915114733e-01,  9.913108598e-01,  9.911079137e-01,\n   9.909026354e-01,  9.906950254e-01,  9.904850843e-01,  9.902728124e-01,\n   9.900582103e-01,  9.898412785e-01,  9.896220175e-01,  9.894004278e-01,\n   9.891765100e-01,  9.889502645e-01,  9.887216920e-01,  9.884907929e-01,\n   9.882575677e-01,  9.880220171e-01,  9.877841416e-01,  9.875439418e-01,\n   9.873014182e-01,  9.870565713e-01,  9.868094018e-01,  9.865599103e-01,\n   9.863080972e-01,  9.860539633e-01,  9.857975092e-01,  9.855387353e-01,\n   9.852776424e-01,  9.850142310e-01,  9.847485018e-01,  9.844804554e-01,\n   9.842100924e-01,  9.839374134e-01,  9.836624192e-01,  9.833851103e-01,\n   9.831054874e-01,  9.828235512e-01,  9.825393023e-01,  9.822527414e-01,\n   9.819638691e-01,  9.816726862e-01,  9.813791933e-01,  9.810833912e-01,\n   9.807852804e-01,  9.804848618e-01,  9.801821360e-01,  9.798771037e-01,\n   9.795697657e-01,  9.792601226e-01,  9.789481753e-01,  9.786339244e-01,\n   9.783173707e-01,  9.779985149e-01,  9.776773578e-01,  9.773539001e-01,\n   9.770281427e-01,  9.767000861e-01,  9.763697313e-01,  9.760370790e-01,\n   9.757021300e-01,  9.753648851e-01,  9.750253451e-01,  9.746835107e-01,\n   9.743393828e-01,  9.739929622e-01,  9.736442497e-01,  9.732932461e-01,\n   9.729399522e-01,  9.725843689e-01,  9.722264971e-01,  9.718663375e-01,\n   9.715038910e-01,  9.711391584e-01,  9.707721407e-01,  9.704028387e-01,\n   9.700312532e-01,  9.696573851e-01,  9.692812354e-01,  9.689028048e-01,\n   9.685220943e-01,  9.681391047e-01,  9.677538371e-01,  9.673662922e-01,\n   9.669764710e-01,  9.665843745e-01,  9.661900034e-01,  9.657933589e-01,\n   9.653944417e-01,  9.649932529e-01,  9.645897933e-01,  9.641840640e-01,\n   9.637760658e-01,  9.633657998e-01,  9.629532669e-01,  9.625384680e-01,\n   9.621214043e-01,  9.617020765e-01,  9.612804858e-01,  9.608566331e-01,\n   9.604305194e-01,  9.600021457e-01,  9.595715131e-01,  9.591386225e-01,\n   9.587034749e-01,  9.582660714e-01,  9.578264130e-01,  9.573845008e-01,\n   9.569403357e-01,  9.564939189e-01,  9.560452513e-01,  9.555943341e-01,\n   9.551411683e-01,  9.546857549e-01,  9.542280951e-01,  9.537681899e-01,\n   9.533060404e-01,  9.528416476e-01,  9.523750127e-01,  9.519061368e-01,\n   9.514350210e-01,  9.509616663e-01,  9.504860739e-01,  9.500082450e-01,\n   9.495281806e-01,  9.490458819e-01,  9.485613499e-01,  9.480745859e-01,\n   9.475855910e-01,  9.470943664e-01,  9.466009131e-01,  9.461052324e-01,\n   9.456073254e-01,  9.451071933e-01,  9.446048373e-01,  9.441002585e-01,\n   9.435934582e-01,  9.430844375e-01,  9.425731976e-01,  9.420597398e-01,\n   9.415440652e-01,  9.410261751e-01,  9.405060706e-01,  9.399837530e-01,\n   9.394592236e-01,  9.389324835e-01,  9.384035341e-01,  9.378723764e-01,\n   9.373390119e-01,  9.368034417e-01,  9.362656672e-01,  9.357256895e-01,\n   9.351835099e-01,  9.346391298e-01,  9.340925504e-01,  9.335437730e-01,\n   9.329927988e-01,  9.324396293e-01,  9.318842656e-01,  9.313267091e-01,\n   9.307669611e-01,  9.302050229e-01,  9.296408958e-01,  9.290745813e-01,\n   9.285060805e-01,  9.279353948e-01,  9.273625257e-01,  9.267874743e-01,\n   9.262102421e-01,  9.256308305e-01,  9.250492408e-01,  9.244654743e-01,\n   9.238795325e-01,  9.232914167e-01,  9.227011283e-01,  9.221086687e-01,\n   9.215140393e-01,  9.209172415e-01,  9.203182767e-01,  9.197171463e-01,\n   9.191138517e-01,  9.185083943e-01,  9.179007756e-01,  9.172909970e-01,\n   9.166790599e-01,  9.160649658e-01,  9.154487161e-01,  9.148303122e-01,\n   9.142097557e-01,  9.135870479e-01,  9.129621904e-01,  9.123351846e-01,\n   9.117060320e-01,  9.110747341e-01,  9.104412923e-01,  9.098057081e-01,\n   9.091679831e-01,  9.085281187e-01,  9.078861165e-01,  9.072419779e-01,\n   9.065957045e-01,  9.059472978e-01,  9.052967593e-01,  9.046440906e-01,\n   9.039892931e-01,  9.033323685e-01,  9.026733182e-01,  9.020121439e-01,\n   9.013488470e-01,  9.006834292e-01,  9.000158920e-01,  8.993462370e-01,\n   8.986744657e-01,  8.980005797e-01,  8.973245807e-01,  8.966464702e-01,\n   8.959662498e-01,  8.952839210e-01,  8.945994856e-01,  8.939129451e-01,\n   8.932243012e-01,  8.925335554e-01,  8.918407094e-01,  8.911457648e-01,\n   8.904487232e-01,  8.897495864e-01,  8.890483559e-01,  8.883450333e-01,\n   8.876396204e-01,  8.869321188e-01,  8.862225301e-01,  8.855108561e-01,\n   8.847970984e-01,  8.840812587e-01,  8.833633387e-01,  8.826433400e-01,\n   8.819212643e-01,  8.811971135e-01,  8.804708891e-01,  8.797425928e-01,\n   8.790122264e-01,  8.782797917e-01,  8.775452902e-01,  8.768087238e-01,\n   8.760700942e-01,  8.753294031e-01,  8.745866523e-01,  8.738418435e-01,\n   8.730949784e-01,  8.723460589e-01,  8.715950867e-01,  8.708420635e-01,\n   8.700869911e-01,  8.693298713e-01,  8.685707060e-01,  8.678094968e-01,\n   8.670462455e-01,  8.662809540e-01,  8.655136241e-01,  8.647442575e-01,\n   8.639728561e-01,  8.631994217e-01,  8.624239561e-01,  8.616464611e-01,\n   8.608669386e-01,  8.600853904e-01,  8.593018184e-01,  8.585162243e-01,\n   8.577286100e-01,  8.569389774e-01,  8.561473284e-01,  8.553536647e-01,\n   8.545579884e-01,  8.537603011e-01,  8.529606049e-01,  8.521589016e-01,\n   8.513551931e-01,  8.505494813e-01,  8.497417680e-01,  8.489320552e-01,\n   8.481203448e-01,  8.473066387e-01,  8.464909388e-01,  8.456732470e-01,\n   8.448535652e-01,  8.440318955e-01,  8.432082396e-01,  8.423825996e-01,\n   8.415549774e-01,  8.407253750e-01,  8.398937942e-01,  8.390602371e-01,\n   8.382247056e-01,  8.373872016e-01,  8.365477272e-01,  8.357062844e-01,\n   8.348628750e-01,  8.340175011e-01,  8.331701647e-01,  8.323208678e-01,\n   8.314696123e-01,  8.306164003e-01,  8.297612338e-01,  8.289041148e-01,\n   8.280450453e-01,  8.271840273e-01,  8.263210628e-01,  8.254561540e-01,\n   8.245893028e-01,  8.237205112e-01,  8.228497814e-01,  8.219771153e-01,\n   8.211025150e-01,  8.202259826e-01,  8.193475201e-01,  8.184671296e-01,\n   8.175848132e-01,  8.167005729e-01,  8.158144108e-01,  8.149263291e-01,\n   8.140363297e-01,  8.131444148e-01,  8.122505866e-01,  8.113548470e-01,\n   8.104571983e-01,  8.095576424e-01,  8.086561816e-01,  8.077528179e-01,\n   8.068475535e-01,  8.059403906e-01,  8.050313311e-01,  8.041203774e-01,\n   8.032075315e-01,  8.022927955e-01,  8.013761717e-01,  8.004576622e-01,\n   7.995372691e-01,  7.986149946e-01,  7.976908409e-01,  7.967648102e-01,\n   7.958369046e-01,  7.949071263e-01,  7.939754776e-01,  7.930419605e-01,\n   7.921065773e-01,  7.911693302e-01,  7.902302214e-01,  7.892892532e-01,\n   7.883464276e-01,  7.874017470e-01,  7.864552136e-01,  7.855068296e-01,\n   7.845565972e-01,  7.836045186e-01,  7.826505962e-01,  7.816948321e-01,\n   7.807372286e-01,  7.797777879e-01,  7.788165124e-01,  7.778534042e-01,\n   7.768884657e-01,  7.759216990e-01,  7.749531066e-01,  7.739826906e-01,\n   7.730104534e-01,  7.720363972e-01,  7.710605243e-01,  7.700828370e-01,\n   7.691033376e-01,  7.681220285e-01,  7.671389119e-01,  7.661539902e-01,\n   7.651672656e-01,  7.641787405e-01,  7.631884173e-01,  7.621962981e-01,\n   7.612023855e-01,  7.602066817e-01,  7.592091890e-01,  7.582099098e-01,\n   7.572088465e-01,  7.562060014e-01,  7.552013769e-01,  7.541949753e-01,\n   7.531867990e-01,  7.521768504e-01,  7.511651319e-01,  7.501516458e-01,\n   7.491363945e-01,  7.481193805e-01,  7.471006060e-01,  7.460800735e-01,\n   7.450577854e-01,  7.440337442e-01,  7.430079521e-01,  7.419804117e-01,\n   7.409511254e-01,  7.399200955e-01,  7.388873245e-01,  7.378528148e-01,\n   7.368165689e-01,  7.357785892e-01,  7.347388781e-01,  7.336974381e-01,\n   7.326542717e-01,  7.316093812e-01,  7.305627692e-01,  7.295144381e-01,\n   7.284643904e-01,  7.274126286e-01,  7.263591551e-01,  7.253039724e-01,\n   7.242470830e-01,  7.231884893e-01,  7.221281939e-01,  7.210661993e-01,\n   7.200025080e-01,  7.189371224e-01,  7.178700451e-01,  7.168012785e-01,\n   7.157308253e-01,  7.146586879e-01,  7.135848688e-01,  7.125093706e-01,\n   7.114321957e-01,  7.103533469e-01,  7.092728264e-01,  7.081906370e-01,\n   7.071067812e-01,  7.060212614e-01,  7.049340804e-01,  7.038452405e-01,\n   7.027547445e-01,  7.016625947e-01,  7.005687939e-01,  6.994733446e-01,\n   6.983762494e-01,  6.972775108e-01,  6.961771315e-01,  6.950751140e-01,\n   6.939714609e-01,  6.928661748e-01,  6.917592584e-01,  6.906507141e-01,\n   6.895405447e-01,  6.884287528e-01,  6.873153409e-01,  6.862003117e-01,\n   6.850836678e-01,  6.839654118e-01,  6.828455464e-01,  6.817240742e-01,\n   6.806009978e-01,  6.794763199e-01,  6.783500431e-01,  6.772221701e-01,\n   6.760927036e-01,  6.749616461e-01,  6.738290004e-01,  6.726947691e-01,\n   6.715589548e-01,  6.704215604e-01,  6.692825883e-01,  6.681420414e-01,\n   6.669999223e-01,  6.658562337e-01,  6.647109782e-01,  6.635641586e-01,\n   6.624157776e-01,  6.612658378e-01,  6.601143421e-01,  6.589612930e-01,\n   6.578066933e-01,  6.566505457e-01,  6.554928530e-01,  6.543336178e-01,\n   6.531728430e-01,  6.520105311e-01,  6.508466850e-01,  6.496813074e-01,\n   6.485144010e-01,  6.473459686e-01,  6.461760130e-01,  6.450045368e-01,\n   6.438315429e-01,  6.426570340e-01,  6.414810128e-01,  6.403034822e-01,\n   6.391244449e-01,  6.379439036e-01,  6.367618612e-01,  6.355783205e-01,\n   6.343932842e-01,  6.332067551e-01,  6.320187359e-01,  6.308292296e-01,\n   6.296382389e-01,  6.284457666e-01,  6.272518155e-01,  6.260563884e-01,\n   6.248594881e-01,  6.236611175e-01,  6.224612794e-01,  6.212599765e-01,\n   6.200572118e-01,  6.188529880e-01,  6.176473079e-01,  6.164401745e-01,\n   6.152315906e-01,  6.140215589e-01,  6.128100824e-01,  6.115971639e-01,\n   6.103828063e-01,  6.091670123e-01,  6.079497850e-01,  6.067311270e-01,\n   6.055110414e-01,  6.042895309e-01,  6.030665985e-01,  6.018422471e-01,\n   6.006164794e-01,  5.993892984e-01,  5.981607070e-01,  5.969307081e-01,\n   5.956993045e-01,  5.944664992e-01,  5.932322950e-01,  5.919966950e-01,\n   5.907597019e-01,  5.895213186e-01,  5.882815482e-01,  5.870403935e-01,\n   5.857978575e-01,  5.845539430e-01,  5.833086529e-01,  5.820619903e-01,\n   5.808139581e-01,  5.795645591e-01,  5.783137964e-01,  5.770616729e-01,\n   5.758081914e-01,  5.745533550e-01,  5.732971667e-01,  5.720396293e-01,\n   5.707807459e-01,  5.695205193e-01,  5.682589527e-01,  5.669960488e-01,\n   5.657318108e-01,  5.644662415e-01,  5.631993440e-01,  5.619311212e-01,\n   5.606615762e-01,  5.593907119e-01,  5.581185312e-01,  5.568450373e-01,\n   5.555702330e-01,  5.542941215e-01,  5.530167056e-01,  5.517379884e-01,\n   5.504579729e-01,  5.491766622e-01,  5.478940592e-01,  5.466101669e-01,\n   5.453249884e-01,  5.440385267e-01,  5.427507849e-01,  5.414617659e-01,\n   5.401714727e-01,  5.388799085e-01,  5.375870763e-01,  5.362929791e-01,\n   5.349976199e-01,  5.337010018e-01,  5.324031279e-01,  5.311040012e-01,\n   5.298036247e-01,  5.285020015e-01,  5.271991348e-01,  5.258950275e-01,\n   5.245896827e-01,  5.232831035e-01,  5.219752929e-01,  5.206662541e-01,\n   5.193559902e-01,  5.180445041e-01,  5.167317990e-01,  5.154178780e-01,\n   5.141027442e-01,  5.127864006e-01,  5.114688504e-01,  5.101500967e-01,\n   5.088301425e-01,  5.075089911e-01,  5.061866453e-01,  5.048631085e-01,\n   5.035383837e-01,  5.022124740e-01,  5.008853826e-01,  4.995571125e-01,\n   4.982276670e-01,  4.968970490e-01,  4.955652618e-01,  4.942323085e-01,\n   4.928981922e-01,  4.915629161e-01,  4.902264833e-01,  4.888888969e-01,\n   4.875501601e-01,  4.862102761e-01,  4.848692480e-01,  4.835270789e-01,\n   4.821837721e-01,  4.808393306e-01,  4.794937577e-01,  4.781470564e-01,\n   4.767992301e-01,  4.754502817e-01,  4.741002147e-01,  4.727490320e-01,\n   4.713967368e-01,  4.700433325e-01,  4.686888220e-01,  4.673332087e-01,\n   4.659764958e-01,  4.646186863e-01,  4.632597836e-01,  4.618997907e-01,\n   4.605387110e-01,  4.591765475e-01,  4.578133036e-01,  4.564489824e-01,\n   4.550835871e-01,  4.537171210e-01,  4.523495872e-01,  4.509809890e-01,\n   4.496113297e-01,  4.482406123e-01,  4.468688402e-01,  4.454960165e-01,\n   4.441221446e-01,  4.427472276e-01,  4.413712687e-01,  4.399942713e-01,\n   4.386162385e-01,  4.372371737e-01,  4.358570799e-01,  4.344759606e-01,\n   4.330938189e-01,  4.317106580e-01,  4.303264813e-01,  4.289412921e-01,\n   4.275550934e-01,  4.261678887e-01,  4.247796812e-01,  4.233904741e-01,\n   4.220002708e-01,  4.206090744e-01,  4.192168884e-01,  4.178237158e-01,\n   4.164295601e-01,  4.150344245e-01,  4.136383122e-01,  4.122412267e-01,\n   4.108431711e-01,  4.094441487e-01,  4.080441629e-01,  4.066432169e-01,\n   4.052413140e-01,  4.038384576e-01,  4.024346509e-01,  4.010298972e-01,\n   3.996241998e-01,  3.982175622e-01,  3.968099874e-01,  3.954014789e-01,\n   3.939920401e-01,  3.925816741e-01,  3.911703843e-01,  3.897581741e-01,\n   3.883450467e-01,  3.869310055e-01,  3.855160538e-01,  3.841001950e-01,\n   3.826834324e-01,  3.812657692e-01,  3.798472089e-01,  3.784277548e-01,\n   3.770074102e-01,  3.755861785e-01,  3.741640630e-01,  3.727410670e-01,\n   3.713171940e-01,  3.698924471e-01,  3.684668300e-01,  3.670403457e-01,\n   3.656129978e-01,  3.641847896e-01,  3.627557244e-01,  3.613258056e-01,\n   3.598950365e-01,  3.584634206e-01,  3.570309612e-01,  3.555976617e-01,\n   3.541635254e-01,  3.527285558e-01,  3.512927561e-01,  3.498561298e-01,\n   3.484186802e-01,  3.469804108e-01,  3.455413250e-01,  3.441014260e-01,\n   3.426607173e-01,  3.412192023e-01,  3.397768844e-01,  3.383337670e-01,\n   3.368898534e-01,  3.354451471e-01,  3.339996514e-01,  3.325533699e-01,\n   3.311063058e-01,  3.296584625e-01,  3.282098436e-01,  3.267604523e-01,\n   3.253102922e-01,  3.238593665e-01,  3.224076788e-01,  3.209552324e-01,\n   3.195020308e-01,  3.180480774e-01,  3.165933756e-01,  3.151379288e-01,\n   3.136817404e-01,  3.122248139e-01,  3.107671527e-01,  3.093087603e-01,\n   3.078496400e-01,  3.063897954e-01,  3.049292297e-01,  3.034679466e-01,\n   3.020059493e-01,  3.005432414e-01,  2.990798263e-01,  2.976157074e-01,\n   2.961508882e-01,  2.946853722e-01,  2.932191627e-01,  2.917522632e-01,\n   2.902846773e-01,  2.888164082e-01,  2.873474595e-01,  2.858778347e-01,\n   2.844075372e-01,  2.829365705e-01,  2.814649379e-01,  2.799926431e-01,\n   2.785196894e-01,  2.770460803e-01,  2.755718193e-01,  2.740969099e-01,\n   2.726213554e-01,  2.711451595e-01,  2.696683256e-01,  2.681908571e-01,\n   2.667127575e-01,  2.652340303e-01,  2.637546790e-01,  2.622747070e-01,\n   2.607941179e-01,  2.593129151e-01,  2.578311022e-01,  2.563486825e-01,\n   2.548656596e-01,  2.533820370e-01,  2.518978182e-01,  2.504130066e-01,\n   2.489276057e-01,  2.474416192e-01,  2.459550503e-01,  2.444679027e-01,\n   2.429801799e-01,  2.414918853e-01,  2.400030224e-01,  2.385135948e-01,\n   2.370236060e-01,  2.355330594e-01,  2.340419586e-01,  2.325503070e-01,\n   2.310581083e-01,  2.295653658e-01,  2.280720832e-01,  2.265782638e-01,\n   2.250839114e-01,  2.235890292e-01,  2.220936210e-01,  2.205976901e-01,\n   2.191012402e-01,  2.176042746e-01,  2.161067971e-01,  2.146088110e-01,\n   2.131103199e-01,  2.116113274e-01,  2.101118369e-01,  2.086118520e-01,\n   2.071113762e-01,  2.056104131e-01,  2.041089661e-01,  2.026070388e-01,\n   2.011046348e-01,  1.996017576e-01,  1.980984107e-01,  1.965945977e-01,\n   1.950903220e-01,  1.935855873e-01,  1.920803970e-01,  1.905747548e-01,\n   1.890686641e-01,  1.875621286e-01,  1.860551517e-01,  1.845477369e-01,\n   1.830398880e-01,  1.815316083e-01,  1.800229014e-01,  1.785137709e-01,\n   1.770042204e-01,  1.754942534e-01,  1.739838734e-01,  1.724730840e-01,\n   1.709618888e-01,  1.694502912e-01,  1.679382950e-01,  1.664259035e-01,\n   1.649131205e-01,  1.633999494e-01,  1.618863938e-01,  1.603724572e-01,\n   1.588581433e-01,  1.573434556e-01,  1.558283977e-01,  1.543129730e-01,\n   1.527971853e-01,  1.512810380e-01,  1.497645347e-01,  1.482476790e-01,\n   1.467304745e-01,  1.452129247e-01,  1.436950332e-01,  1.421768035e-01,\n   1.406582393e-01,  1.391393442e-01,  1.376201216e-01,  1.361005752e-01,\n   1.345807085e-01,  1.330605252e-01,  1.315400287e-01,  1.300192227e-01,\n   1.284981108e-01,  1.269766965e-01,  1.254549834e-01,  1.239329751e-01,\n   1.224106752e-01,  1.208880872e-01,  1.193652148e-01,  1.178420615e-01,\n   1.163186309e-01,  1.147949266e-01,  1.132709522e-01,  1.117467112e-01,\n   1.102222073e-01,  1.086974440e-01,  1.071724250e-01,  1.056471537e-01,\n   1.041216339e-01,  1.025958690e-01,  1.010698628e-01,  9.954361866e-02,\n   9.801714033e-02,  9.649043136e-02,  9.496349533e-02,  9.343633585e-02,\n   9.190895650e-02,  9.038136088e-02,  8.885355258e-02,  8.732553521e-02,\n   8.579731234e-02,  8.426888759e-02,  8.274026455e-02,  8.121144681e-02,\n   7.968243797e-02,  7.815324163e-02,  7.662386139e-02,  7.509430085e-02,\n   7.356456360e-02,  7.203465325e-02,  7.050457339e-02,  6.897432763e-02,\n   6.744391956e-02,  6.591335280e-02,  6.438263093e-02,  6.285175756e-02,\n   6.132073630e-02,  5.978957075e-02,  5.825826450e-02,  5.672682117e-02,\n   5.519524435e-02,  5.366353765e-02,  5.213170468e-02,  5.059974904e-02,\n   4.906767433e-02,  4.753548416e-02,  4.600318213e-02,  4.447077185e-02,\n   4.293825693e-02,  4.140564098e-02,  3.987292759e-02,  3.834012037e-02,\n   3.680722294e-02,  3.527423890e-02,  3.374117185e-02,  3.220802541e-02,\n   3.067480318e-02,  2.914150876e-02,  2.760814578e-02,  2.607471783e-02,\n   2.454122852e-02,  2.300768147e-02,  2.147408028e-02,  1.994042855e-02,\n   1.840672991e-02,  1.687298795e-02,  1.533920628e-02,  1.380538853e-02,\n   1.227153829e-02,  1.073765917e-02,  9.203754782e-03,  7.669828740e-03,\n   6.135884649e-03,  4.601926120e-03,  3.067956763e-03,  1.533980186e-03,\n   1.224646799e-16, -1.533980186e-03, -3.067956763e-03, -4.601926120e-03,\n  -6.135884649e-03, -7.669828740e-03, -9.203754782e-03, -1.073765917e-02,\n  -1.227153829e-02, -1.380538853e-02, -1.533920628e-02, -1.687298795e-02,\n  -1.840672991e-02, -1.994042855e-02, -2.147408028e-02, -2.300768147e-02,\n  -2.454122852e-02, -2.607471783e-02, -2.760814578e-02, -2.914150876e-02,\n  -3.067480318e-02, -3.220802541e-02, -3.374117185e-02, -3.527423890e-02,\n  -3.680722294e-02, -3.834012037e-02, -3.987292759e-02, -4.140564098e-02,\n  -4.293825693e-02, -4.447077185e-02, -4.600318213e-02, -4.753548416e-02,\n  -4.906767433e-02, -5.059974904e-02, -5.213170468e-02, -5.366353765e-02,\n  -5.519524435e-02, -5.672682117e-02, -5.825826450e-02, -5.978957075e-02,\n  -6.132073630e-02, -6.285175756e-02, -6.438263093e-02, -6.591335280e-02,\n  -6.744391956e-02, -6.897432763e-02, -7.050457339e-02, -7.203465325e-02,\n  -7.356456360e-02, -7.509430085e-02, -7.662386139e-02, -7.815324163e-02,\n  -7.968243797e-02, -8.121144681e-02, -8.274026455e-02, -8.426888759e-02,\n  -8.579731234e-02, -8.732553521e-02, -8.885355258e-02, -9.038136088e-02,\n  -9.190895650e-02, -9.343633585e-02, -9.496349533e-02, -9.649043136e-02,\n  -9.801714033e-02, -9.954361866e-02, -1.010698628e-01, -1.025958690e-01,\n  -1.041216339e-01, -1.056471537e-01, -1.071724250e-01, -1.086974440e-01,\n  -1.102222073e-01, -1.117467112e-01, -1.132709522e-01, -1.147949266e-01,\n  -1.163186309e-01, -1.178420615e-01, -1.193652148e-01, -1.208880872e-01,\n  -1.224106752e-01, -1.239329751e-01, -1.254549834e-01, -1.269766965e-01,\n  -1.284981108e-01, -1.300192227e-01, -1.315400287e-01, -1.330605252e-01,\n  -1.345807085e-01, -1.361005752e-01, -1.376201216e-01, -1.391393442e-01,\n  -1.406582393e-01, -1.421768035e-01, -1.436950332e-01, -1.452129247e-01,\n  -1.467304745e-01, -1.482476790e-01, -1.497645347e-01, -1.512810380e-01,\n  -1.527971853e-01, -1.543129730e-01, -1.558283977e-01, -1.573434556e-01,\n  -1.588581433e-01, -1.603724572e-01, -1.618863938e-01, -1.633999494e-01,\n  -1.649131205e-01, -1.664259035e-01, -1.679382950e-01, -1.694502912e-01,\n  -1.709618888e-01, -1.724730840e-01, -1.739838734e-01, -1.754942534e-01,\n  -1.770042204e-01, -1.785137709e-01, -1.800229014e-01, -1.815316083e-01,\n  -1.830398880e-01, -1.845477369e-01, -1.860551517e-01, -1.875621286e-01,\n  -1.890686641e-01, -1.905747548e-01, -1.920803970e-01, -1.935855873e-01,\n  -1.950903220e-01, -1.965945977e-01, -1.980984107e-01, -1.996017576e-01,\n  -2.011046348e-01, -2.026070388e-01, -2.041089661e-01, -2.056104131e-01,\n  -2.071113762e-01, -2.086118520e-01, -2.101118369e-01, -2.116113274e-01,\n  -2.131103199e-01, -2.146088110e-01, -2.161067971e-01, -2.176042746e-01,\n  -2.191012402e-01, -2.205976901e-01, -2.220936210e-01, -2.235890292e-01,\n  -2.250839114e-01, -2.265782638e-01, -2.280720832e-01, -2.295653658e-01,\n  -2.310581083e-01, -2.325503070e-01, -2.340419586e-01, -2.355330594e-01,\n  -2.370236060e-01, -2.385135948e-01, -2.400030224e-01, -2.414918853e-01,\n  -2.429801799e-01, -2.444679027e-01, -2.459550503e-01, -2.474416192e-01,\n  -2.489276057e-01, -2.504130066e-01, -2.518978182e-01, -2.533820370e-01,\n  -2.548656596e-01, -2.563486825e-01, -2.578311022e-01, -2.593129151e-01,\n  -2.607941179e-01, -2.622747070e-01, -2.637546790e-01, -2.652340303e-01,\n  -2.667127575e-01, -2.681908571e-01, -2.696683256e-01, -2.711451595e-01,\n  -2.726213554e-01, -2.740969099e-01, -2.755718193e-01, -2.770460803e-01,\n  -2.785196894e-01, -2.799926431e-01, -2.814649379e-01, -2.829365705e-01,\n  -2.844075372e-01, -2.858778347e-01, -2.873474595e-01, -2.888164082e-01,\n  -2.902846773e-01, -2.917522632e-01, -2.932191627e-01, -2.946853722e-01,\n  -2.961508882e-01, -2.976157074e-01, -2.990798263e-01, -3.005432414e-01,\n  -3.020059493e-01, -3.034679466e-01, -3.049292297e-01, -3.063897954e-01,\n  -3.078496400e-01, -3.093087603e-01, -3.107671527e-01, -3.122248139e-01,\n  -3.136817404e-01, -3.151379288e-01, -3.165933756e-01, -3.180480774e-01,\n  -3.195020308e-01, -3.209552324e-01, -3.224076788e-01, -3.238593665e-01,\n  -3.253102922e-01, -3.267604523e-01, -3.282098436e-01, -3.296584625e-01,\n  -3.311063058e-01, -3.325533699e-01, -3.339996514e-01, -3.354451471e-01,\n  -3.368898534e-01, -3.383337670e-01, -3.397768844e-01, -3.412192023e-01,\n  -3.426607173e-01, -3.441014260e-01, -3.455413250e-01, -3.469804108e-01,\n  -3.484186802e-01, -3.498561298e-01, -3.512927561e-01, -3.527285558e-01,\n  -3.541635254e-01, -3.555976617e-01, -3.570309612e-01, -3.584634206e-01,\n  -3.598950365e-01, -3.613258056e-01, -3.627557244e-01, -3.641847896e-01,\n  -3.656129978e-01, -3.670403457e-01, -3.684668300e-01, -3.698924471e-01,\n  -3.713171940e-01, -3.727410670e-01, -3.741640630e-01, -3.755861785e-01,\n  -3.770074102e-01, -3.784277548e-01, -3.798472089e-01, -3.812657692e-01,\n  -3.826834324e-01, -3.841001950e-01, -3.855160538e-01, -3.869310055e-01,\n  -3.883450467e-01, -3.897581741e-01, -3.911703843e-01, -3.925816741e-01,\n  -3.939920401e-01, -3.954014789e-01, -3.968099874e-01, -3.982175622e-01,\n  -3.996241998e-01, -4.010298972e-01, -4.024346509e-01, -4.038384576e-01,\n  -4.052413140e-01, -4.066432169e-01, -4.080441629e-01, -4.094441487e-01,\n  -4.108431711e-01, -4.122412267e-01, -4.136383122e-01, -4.150344245e-01,\n  -4.164295601e-01, -4.178237158e-01, -4.192168884e-01, -4.206090744e-01,\n  -4.220002708e-01, -4.233904741e-01, -4.247796812e-01, -4.261678887e-01,\n  -4.275550934e-01, -4.289412921e-01, -4.303264813e-01, -4.317106580e-01,\n  -4.330938189e-01, -4.344759606e-01, -4.358570799e-01, -4.372371737e-01,\n  -4.386162385e-01, -4.399942713e-01, -4.413712687e-01, -4.427472276e-01,\n  -4.441221446e-01, -4.454960165e-01, -4.468688402e-01, -4.482406123e-01,\n  -4.496113297e-01, -4.509809890e-01, -4.523495872e-01, -4.537171210e-01,\n  -4.550835871e-01, -4.564489824e-01, -4.578133036e-01, -4.591765475e-01,\n  -4.605387110e-01, -4.618997907e-01, -4.632597836e-01, -4.646186863e-01,\n  -4.659764958e-01, -4.673332087e-01, -4.686888220e-01, -4.700433325e-01,\n  -4.713967368e-01, -4.727490320e-01, -4.741002147e-01, -4.754502817e-01,\n  -4.767992301e-01, -4.781470564e-01, -4.794937577e-01, -4.808393306e-01,\n  -4.821837721e-01, -4.835270789e-01, -4.848692480e-01, -4.862102761e-01,\n  -4.875501601e-01, -4.888888969e-01, -4.902264833e-01, -4.915629161e-01,\n  -4.928981922e-01, -4.942323085e-01, -4.955652618e-01, -4.968970490e-01,\n  -4.982276670e-01, -4.995571125e-01, -5.008853826e-01, -5.022124740e-01,\n  -5.035383837e-01, -5.048631085e-01, -5.061866453e-01, -5.075089911e-01,\n  -5.088301425e-01, -5.101500967e-01, -5.114688504e-01, -5.127864006e-01,\n  -5.141027442e-01, -5.154178780e-01, -5.167317990e-01, -5.180445041e-01,\n  -5.193559902e-01, -5.206662541e-01, -5.219752929e-01, -5.232831035e-01,\n  -5.245896827e-01, -5.258950275e-01, -5.271991348e-01, -5.285020015e-01,\n  -5.298036247e-01, -5.311040012e-01, -5.324031279e-01, -5.337010018e-01,\n  -5.349976199e-01, -5.362929791e-01, -5.375870763e-01, -5.388799085e-01,\n  -5.401714727e-01, -5.414617659e-01, -5.427507849e-01, -5.440385267e-01,\n  -5.453249884e-01, -5.466101669e-01, -5.478940592e-01, -5.491766622e-01,\n  -5.504579729e-01, -5.517379884e-01, -5.530167056e-01, -5.542941215e-01,\n  -5.555702330e-01, -5.568450373e-01, -5.581185312e-01, -5.593907119e-01,\n  -5.606615762e-01, -5.619311212e-01, -5.631993440e-01, -5.644662415e-01,\n  -5.657318108e-01, -5.669960488e-01, -5.682589527e-01, -5.695205193e-01,\n  -5.707807459e-01, -5.720396293e-01, -5.732971667e-01, -5.745533550e-01,\n  -5.758081914e-01, -5.770616729e-01, -5.783137964e-01, -5.795645591e-01,\n  -5.808139581e-01, -5.820619903e-01, -5.833086529e-01, -5.845539430e-01,\n  -5.857978575e-01, -5.870403935e-01, -5.882815482e-01, -5.895213186e-01,\n  -5.907597019e-01, -5.919966950e-01, -5.932322950e-01, -5.944664992e-01,\n  -5.956993045e-01, -5.969307081e-01, -5.981607070e-01, -5.993892984e-01,\n  -6.006164794e-01, -6.018422471e-01, -6.030665985e-01, -6.042895309e-01,\n  -6.055110414e-01, -6.067311270e-01, -6.079497850e-01, -6.091670123e-01,\n  -6.103828063e-01, -6.115971639e-01, -6.128100824e-01, -6.140215589e-01,\n  -6.152315906e-01, -6.164401745e-01, -6.176473079e-01, -6.188529880e-01,\n  -6.200572118e-01, -6.212599765e-01, -6.224612794e-01, -6.236611175e-01,\n  -6.248594881e-01, -6.260563884e-01, -6.272518155e-01, -6.284457666e-01,\n  -6.296382389e-01, -6.308292296e-01, -6.320187359e-01, -6.332067551e-01,\n  -6.343932842e-01, -6.355783205e-01, -6.367618612e-01, -6.379439036e-01,\n  -6.391244449e-01, -6.403034822e-01, -6.414810128e-01, -6.426570340e-01,\n  -6.438315429e-01, -6.450045368e-01, -6.461760130e-01, -6.473459686e-01,\n  -6.485144010e-01, -6.496813074e-01, -6.508466850e-01, -6.520105311e-01,\n  -6.531728430e-01, -6.543336178e-01, -6.554928530e-01, -6.566505457e-01,\n  -6.578066933e-01, -6.589612930e-01, -6.601143421e-01, -6.612658378e-01,\n  -6.624157776e-01, -6.635641586e-01, -6.647109782e-01, -6.658562337e-01,\n  -6.669999223e-01, -6.681420414e-01, -6.692825883e-01, -6.704215604e-01,\n  -6.715589548e-01, -6.726947691e-01, -6.738290004e-01, -6.749616461e-01,\n  -6.760927036e-01, -6.772221701e-01, -6.783500431e-01, -6.794763199e-01,\n  -6.806009978e-01, -6.817240742e-01, -6.828455464e-01, -6.839654118e-01,\n  -6.850836678e-01, -6.862003117e-01, -6.873153409e-01, -6.884287528e-01,\n  -6.895405447e-01, -6.906507141e-01, -6.917592584e-01, -6.928661748e-01,\n  -6.939714609e-01, -6.950751140e-01, -6.961771315e-01, -6.972775108e-01,\n  -6.983762494e-01, -6.994733446e-01, -7.005687939e-01, -7.016625947e-01,\n  -7.027547445e-01, -7.038452405e-01, -7.049340804e-01, -7.060212614e-01,\n  -7.071067812e-01, -7.081906370e-01, -7.092728264e-01, -7.103533469e-01,\n  -7.114321957e-01, -7.125093706e-01, -7.135848688e-01, -7.146586879e-01,\n  -7.157308253e-01, -7.168012785e-01, -7.178700451e-01, -7.189371224e-01,\n  -7.200025080e-01, -7.210661993e-01, -7.221281939e-01, -7.231884893e-01,\n  -7.242470830e-01, -7.253039724e-01, -7.263591551e-01, -7.274126286e-01,\n  -7.284643904e-01, -7.295144381e-01, -7.305627692e-01, -7.316093812e-01,\n  -7.326542717e-01, -7.336974381e-01, -7.347388781e-01, -7.357785892e-01,\n  -7.368165689e-01, -7.378528148e-01, -7.388873245e-01, -7.399200955e-01,\n  -7.409511254e-01, -7.419804117e-01, -7.430079521e-01, -7.440337442e-01,\n  -7.450577854e-01, -7.460800735e-01, -7.471006060e-01, -7.481193805e-01,\n  -7.491363945e-01, -7.501516458e-01, -7.511651319e-01, -7.521768504e-01,\n  -7.531867990e-01, -7.541949753e-01, -7.552013769e-01, -7.562060014e-01,\n  -7.572088465e-01, -7.582099098e-01, -7.592091890e-01, -7.602066817e-01,\n  -7.612023855e-01, -7.621962981e-01, -7.631884173e-01, -7.641787405e-01,\n  -7.651672656e-01, -7.661539902e-01, -7.671389119e-01, -7.681220285e-01,\n  -7.691033376e-01, -7.700828370e-01, -7.710605243e-01, -7.720363972e-01,\n  -7.730104534e-01, -7.739826906e-01, -7.749531066e-01, -7.759216990e-01,\n  -7.768884657e-01, -7.778534042e-01, -7.788165124e-01, -7.797777879e-01,\n  -7.807372286e-01, -7.816948321e-01, -7.826505962e-01, -7.836045186e-01,\n  -7.845565972e-01, -7.855068296e-01, -7.864552136e-01, -7.874017470e-01,\n  -7.883464276e-01, -7.892892532e-01, -7.902302214e-01, -7.911693302e-01,\n  -7.921065773e-01, -7.930419605e-01, -7.939754776e-01, -7.949071263e-01,\n  -7.958369046e-01, -7.967648102e-01, -7.976908409e-01, -7.986149946e-01,\n  -7.995372691e-01, -8.004576622e-01, -8.013761717e-01, -8.022927955e-01,\n  -8.032075315e-01, -8.041203774e-01, -8.050313311e-01, -8.059403906e-01,\n  -8.068475535e-01, -8.077528179e-01, -8.086561816e-01, -8.095576424e-01,\n  -8.104571983e-01, -8.113548470e-01, -8.122505866e-01, -8.131444148e-01,\n  -8.140363297e-01, -8.149263291e-01, -8.158144108e-01, -8.167005729e-01,\n  -8.175848132e-01, -8.184671296e-01, -8.193475201e-01, -8.202259826e-01,\n  -8.211025150e-01, -8.219771153e-01, -8.228497814e-01, -8.237205112e-01,\n  -8.245893028e-01, -8.254561540e-01, -8.263210628e-01, -8.271840273e-01,\n  -8.280450453e-01, -8.289041148e-01, -8.297612338e-01, -8.306164003e-01,\n  -8.314696123e-01, -8.323208678e-01, -8.331701647e-01, -8.340175011e-01,\n  -8.348628750e-01, -8.357062844e-01, -8.365477272e-01, -8.373872016e-01,\n  -8.382247056e-01, -8.390602371e-01, -8.398937942e-01, -8.407253750e-01,\n  -8.415549774e-01, -8.423825996e-01, -8.432082396e-01, -8.440318955e-01,\n  -8.448535652e-01, -8.456732470e-01, -8.464909388e-01, -8.473066387e-01,\n  -8.481203448e-01, -8.489320552e-01, -8.497417680e-01, -8.505494813e-01,\n  -8.513551931e-01, -8.521589016e-01, -8.529606049e-01, -8.537603011e-01,\n  -8.545579884e-01, -8.553536647e-01, -8.561473284e-01, -8.569389774e-01,\n  -8.577286100e-01, -8.585162243e-01, -8.593018184e-01, -8.600853904e-01,\n  -8.608669386e-01, -8.616464611e-01, -8.624239561e-01, -8.631994217e-01,\n  -8.639728561e-01, -8.647442575e-01, -8.655136241e-01, -8.662809540e-01,\n  -8.670462455e-01, -8.678094968e-01, -8.685707060e-01, -8.693298713e-01,\n  -8.700869911e-01, -8.708420635e-01, -8.715950867e-01, -8.723460589e-01,\n  -8.730949784e-01, -8.738418435e-01, -8.745866523e-01, -8.753294031e-01,\n  -8.760700942e-01, -8.768087238e-01, -8.775452902e-01, -8.782797917e-01,\n  -8.790122264e-01, -8.797425928e-01, -8.804708891e-01, -8.811971135e-01,\n  -8.819212643e-01, -8.826433400e-01, -8.833633387e-01, -8.840812587e-01,\n  -8.847970984e-01, -8.855108561e-01, -8.862225301e-01, -8.869321188e-01,\n  -8.876396204e-01, -8.883450333e-01, -8.890483559e-01, -8.897495864e-01,\n  -8.904487232e-01, -8.911457648e-01, -8.918407094e-01, -8.925335554e-01,\n  -8.932243012e-01, -8.939129451e-01, -8.945994856e-01, -8.952839210e-01,\n  -8.959662498e-01, -8.966464702e-01, -8.973245807e-01, -8.980005797e-01,\n  -8.986744657e-01, -8.993462370e-01, -9.000158920e-01, -9.006834292e-01,\n  -9.013488470e-01, -9.020121439e-01, -9.026733182e-01, -9.033323685e-01,\n  -9.039892931e-01, -9.046440906e-01, -9.052967593e-01, -9.059472978e-01,\n  -9.065957045e-01, -9.072419779e-01, -9.078861165e-01, -9.085281187e-01,\n  -9.091679831e-01, -9.098057081e-01, -9.104412923e-01, -9.110747341e-01,\n  -9.117060320e-01, -9.123351846e-01, -9.129621904e-01, -9.135870479e-01,\n  -9.142097557e-01, -9.148303122e-01, -9.154487161e-01, -9.160649658e-01,\n  -9.166790599e-01, -9.172909970e-01, -9.179007756e-01, -9.185083943e-01,\n  -9.191138517e-01, -9.197171463e-01, -9.203182767e-01, -9.209172415e-01,\n  -9.215140393e-01, -9.221086687e-01, -9.227011283e-01, -9.232914167e-01,\n  -9.238795325e-01, -9.244654743e-01, -9.250492408e-01, -9.256308305e-01,\n  -9.262102421e-01, -9.267874743e-01, -9.273625257e-01, -9.279353948e-01,\n  -9.285060805e-01, -9.290745813e-01, -9.296408958e-01, -9.302050229e-01,\n  -9.307669611e-01, -9.313267091e-01, -9.318842656e-01, -9.324396293e-01,\n  -9.329927988e-01, -9.335437730e-01, -9.340925504e-01, -9.346391298e-01,\n  -9.351835099e-01, -9.357256895e-01, -9.362656672e-01, -9.368034417e-01,\n  -9.373390119e-01, -9.378723764e-01, -9.384035341e-01, -9.389324835e-01,\n  -9.394592236e-01, -9.399837530e-01, -9.405060706e-01, -9.410261751e-01,\n  -9.415440652e-01, -9.420597398e-01, -9.425731976e-01, -9.430844375e-01,\n  -9.435934582e-01, -9.441002585e-01, -9.446048373e-01, -9.451071933e-01,\n  -9.456073254e-01, -9.461052324e-01, -9.466009131e-01, -9.470943664e-01,\n  -9.475855910e-01, -9.480745859e-01, -9.485613499e-01, -9.490458819e-01,\n  -9.495281806e-01, -9.500082450e-01, -9.504860739e-01, -9.509616663e-01,\n  -9.514350210e-01, -9.519061368e-01, -9.523750127e-01, -9.528416476e-01,\n  -9.533060404e-01, -9.537681899e-01, -9.542280951e-01, -9.546857549e-01,\n  -9.551411683e-01, -9.555943341e-01, -9.560452513e-01, -9.564939189e-01,\n  -9.569403357e-01, -9.573845008e-01, -9.578264130e-01, -9.582660714e-01,\n  -9.587034749e-01, -9.591386225e-01, -9.595715131e-01, -9.600021457e-01,\n  -9.604305194e-01, -9.608566331e-01, -9.612804858e-01, -9.617020765e-01,\n  -9.621214043e-01, -9.625384680e-01, -9.629532669e-01, -9.633657998e-01,\n  -9.637760658e-01, -9.641840640e-01, -9.645897933e-01, -9.649932529e-01,\n  -9.653944417e-01, -9.657933589e-01, -9.661900034e-01, -9.665843745e-01,\n  -9.669764710e-01, -9.673662922e-01, -9.677538371e-01, -9.681391047e-01,\n  -9.685220943e-01, -9.689028048e-01, -9.692812354e-01, -9.696573851e-01,\n  -9.700312532e-01, -9.704028387e-01, -9.707721407e-01, -9.711391584e-01,\n  -9.715038910e-01, -9.718663375e-01, -9.722264971e-01, -9.725843689e-01,\n  -9.729399522e-01, -9.732932461e-01, -9.736442497e-01, -9.739929622e-01,\n  -9.743393828e-01, -9.746835107e-01, -9.750253451e-01, -9.753648851e-01,\n  -9.757021300e-01, -9.760370790e-01, -9.763697313e-01, -9.767000861e-01,\n  -9.770281427e-01, -9.773539001e-01, -9.776773578e-01, -9.779985149e-01,\n  -9.783173707e-01, -9.786339244e-01, -9.789481753e-01, -9.792601226e-01,\n  -9.795697657e-01, -9.798771037e-01, -9.801821360e-01, -9.804848618e-01,\n  -9.807852804e-01, -9.810833912e-01, -9.813791933e-01, -9.816726862e-01,\n  -9.819638691e-01, -9.822527414e-01, -9.825393023e-01, -9.828235512e-01,\n  -9.831054874e-01, -9.833851103e-01, -9.836624192e-01, -9.839374134e-01,\n  -9.842100924e-01, -9.844804554e-01, -9.847485018e-01, -9.850142310e-01,\n  -9.852776424e-01, -9.855387353e-01, -9.857975092e-01, -9.860539633e-01,\n  -9.863080972e-01, -9.865599103e-01, -9.868094018e-01, -9.870565713e-01,\n  -9.873014182e-01, -9.875439418e-01, -9.877841416e-01, -9.880220171e-01,\n  -9.882575677e-01, -9.884907929e-01, -9.887216920e-01, -9.889502645e-01,\n  -9.891765100e-01, -9.894004278e-01, -9.896220175e-01, -9.898412785e-01,\n  -9.900582103e-01, -9.902728124e-01, -9.904850843e-01, -9.906950254e-01,\n  -9.909026354e-01, -9.911079137e-01, -9.913108598e-01, -9.915114733e-01,\n  -9.917097537e-01, -9.919057004e-01, -9.920993131e-01, -9.922905913e-01,\n  -9.924795346e-01, -9.926661424e-01, -9.928504145e-01, -9.930323502e-01,\n  -9.932119492e-01, -9.933892111e-01, -9.935641355e-01, -9.937367219e-01,\n  -9.939069700e-01, -9.940748793e-01, -9.942404495e-01, -9.944036801e-01,\n  -9.945645707e-01, -9.947231211e-01, -9.948793308e-01, -9.950331994e-01,\n  -9.951847267e-01, -9.953339121e-01, -9.954807555e-01, -9.956252564e-01,\n  -9.957674145e-01, -9.959072294e-01, -9.960447009e-01, -9.961798286e-01,\n  -9.963126122e-01, -9.964430514e-01, -9.965711458e-01, -9.966968952e-01,\n  -9.968202993e-01, -9.969413578e-01, -9.970600703e-01, -9.971764367e-01,\n  -9.972904567e-01, -9.974021299e-01, -9.975114561e-01, -9.976184351e-01,\n  -9.977230666e-01, -9.978253504e-01, -9.979252862e-01, -9.980228738e-01,\n  -9.981181129e-01, -9.982110034e-01, -9.983015449e-01, -9.983897374e-01,\n  -9.984755806e-01, -9.985590742e-01, -9.986402182e-01, -9.987190122e-01,\n  -9.987954562e-01, -9.988695499e-01, -9.989412932e-01, -9.990106859e-01,\n  -9.990777278e-01, -9.991424187e-01, -9.992047586e-01, -9.992647473e-01,\n  -9.993223846e-01, -9.993776704e-01, -9.994306046e-01, -9.994811870e-01,\n  -9.995294175e-01, -9.995752960e-01, -9.996188225e-01, -9.996599967e-01,\n  -9.996988187e-01, -9.997352883e-01, -9.997694054e-01, -9.998011699e-01,\n  -9.998305818e-01, -9.998576410e-01, -9.998823475e-01, -9.999047011e-01,\n  -9.999247018e-01, -9.999423497e-01, -9.999576446e-01, -9.999705864e-01,\n  -9.999811753e-01, -9.999894111e-01, -9.999952938e-01, -9.999988235e-01,\n  -1.000000000e+00, -9.999988235e-01, -9.999952938e-01, -9.999894111e-01,\n  -9.999811753e-01, -9.999705864e-01, -9.999576446e-01, -9.999423497e-01,\n  -9.999247018e-01, -9.999047011e-01, -9.998823475e-01, -9.998576410e-01,\n  -9.998305818e-01, -9.998011699e-01, -9.997694054e-01, -9.997352883e-01,\n  -9.996988187e-01, -9.996599967e-01, -9.996188225e-01, -9.995752960e-01,\n  -9.995294175e-01, -9.994811870e-01, -9.994306046e-01, -9.993776704e-01,\n  -9.993223846e-01, -9.992647473e-01, -9.992047586e-01, -9.991424187e-01,\n  -9.990777278e-01, -9.990106859e-01, -9.989412932e-01, -9.988695499e-01,\n  -9.987954562e-01, -9.987190122e-01, -9.986402182e-01, -9.985590742e-01,\n  -9.984755806e-01, -9.983897374e-01, -9.983015449e-01, -9.982110034e-01,\n  -9.981181129e-01, -9.980228738e-01, -9.979252862e-01, -9.978253504e-01,\n  -9.977230666e-01, -9.976184351e-01, -9.975114561e-01, -9.974021299e-01,\n  -9.972904567e-01, -9.971764367e-01, -9.970600703e-01, -9.969413578e-01,\n  -9.968202993e-01, -9.966968952e-01, -9.965711458e-01, -9.964430514e-01,\n  -9.963126122e-01, -9.961798286e-01, -9.960447009e-01, -9.959072294e-01,\n  -9.957674145e-01, -9.956252564e-01, -9.954807555e-01, -9.953339121e-01,\n  -9.951847267e-01, -9.950331994e-01, -9.948793308e-01, -9.947231211e-01,\n  -9.945645707e-01, -9.944036801e-01, -9.942404495e-01, -9.940748793e-01,\n  -9.939069700e-01, -9.937367219e-01, -9.935641355e-01, -9.933892111e-01,\n  -9.932119492e-01, -9.930323502e-01, -9.928504145e-01, -9.926661424e-01,\n  -9.924795346e-01, -9.922905913e-01, -9.920993131e-01, -9.919057004e-01,\n  -9.917097537e-01, -9.915114733e-01, -9.913108598e-01, -9.911079137e-01,\n  -9.909026354e-01, -9.906950254e-01, -9.904850843e-01, -9.902728124e-01,\n  -9.900582103e-01, -9.898412785e-01, -9.896220175e-01, -9.894004278e-01,\n  -9.891765100e-01, -9.889502645e-01, -9.887216920e-01, -9.884907929e-01,\n  -9.882575677e-01, -9.880220171e-01, -9.877841416e-01, -9.875439418e-01,\n  -9.873014182e-01, -9.870565713e-01, -9.868094018e-01, -9.865599103e-01,\n  -9.863080972e-01, -9.860539633e-01, -9.857975092e-01, -9.855387353e-01,\n  -9.852776424e-01, -9.850142310e-01, -9.847485018e-01, -9.844804554e-01,\n  -9.842100924e-01, -9.839374134e-01, -9.836624192e-01, -9.833851103e-01,\n  -9.831054874e-01, -9.828235512e-01, -9.825393023e-01, -9.822527414e-01,\n  -9.819638691e-01, -9.816726862e-01, -9.813791933e-01, -9.810833912e-01,\n  -9.807852804e-01, -9.804848618e-01, -9.801821360e-01, -9.798771037e-01,\n  -9.795697657e-01, -9.792601226e-01, -9.789481753e-01, -9.786339244e-01,\n  -9.783173707e-01, -9.779985149e-01, -9.776773578e-01, -9.773539001e-01,\n  -9.770281427e-01, -9.767000861e-01, -9.763697313e-01, -9.760370790e-01,\n  -9.757021300e-01, -9.753648851e-01, -9.750253451e-01, -9.746835107e-01,\n  -9.743393828e-01, -9.739929622e-01, -9.736442497e-01, -9.732932461e-01,\n  -9.729399522e-01, -9.725843689e-01, -9.722264971e-01, -9.718663375e-01,\n  -9.715038910e-01, -9.711391584e-01, -9.707721407e-01, -9.704028387e-01,\n  -9.700312532e-01, -9.696573851e-01, -9.692812354e-01, -9.689028048e-01,\n  -9.685220943e-01, -9.681391047e-01, -9.677538371e-01, -9.673662922e-01,\n  -9.669764710e-01, -9.665843745e-01, -9.661900034e-01, -9.657933589e-01,\n  -9.653944417e-01, -9.649932529e-01, -9.645897933e-01, -9.641840640e-01,\n  -9.637760658e-01, -9.633657998e-01, -9.629532669e-01, -9.625384680e-01,\n  -9.621214043e-01, -9.617020765e-01, -9.612804858e-01, -9.608566331e-01,\n  -9.604305194e-01, -9.600021457e-01, -9.595715131e-01, -9.591386225e-01,\n  -9.587034749e-01, -9.582660714e-01, -9.578264130e-01, -9.573845008e-01,\n  -9.569403357e-01, -9.564939189e-01, -9.560452513e-01, -9.555943341e-01,\n  -9.551411683e-01, -9.546857549e-01, -9.542280951e-01, -9.537681899e-01,\n  -9.533060404e-01, -9.528416476e-01, -9.523750127e-01, -9.519061368e-01,\n  -9.514350210e-01, -9.509616663e-01, -9.504860739e-01, -9.500082450e-01,\n  -9.495281806e-01, -9.490458819e-01, -9.485613499e-01, -9.480745859e-01,\n  -9.475855910e-01, -9.470943664e-01, -9.466009131e-01, -9.461052324e-01,\n  -9.456073254e-01, -9.451071933e-01, -9.446048373e-01, -9.441002585e-01,\n  -9.435934582e-01, -9.430844375e-01, -9.425731976e-01, -9.420597398e-01,\n  -9.415440652e-01, -9.410261751e-01, -9.405060706e-01, -9.399837530e-01,\n  -9.394592236e-01, -9.389324835e-01, -9.384035341e-01, -9.378723764e-01,\n  -9.373390119e-01, -9.368034417e-01, -9.362656672e-01, -9.357256895e-01,\n  -9.351835099e-01, -9.346391298e-01, -9.340925504e-01, -9.335437730e-01,\n  -9.329927988e-01, -9.324396293e-01, -9.318842656e-01, -9.313267091e-01,\n  -9.307669611e-01, -9.302050229e-01, -9.296408958e-01, -9.290745813e-01,\n  -9.285060805e-01, -9.279353948e-01, -9.273625257e-01, -9.267874743e-01,\n  -9.262102421e-01, -9.256308305e-01, -9.250492408e-01, -9.244654743e-01,\n  -9.238795325e-01, -9.232914167e-01, -9.227011283e-01, -9.221086687e-01,\n  -9.215140393e-01, -9.209172415e-01, -9.203182767e-01, -9.197171463e-01,\n  -9.191138517e-01, -9.185083943e-01, -9.179007756e-01, -9.172909970e-01,\n  -9.166790599e-01, -9.160649658e-01, -9.154487161e-01, -9.148303122e-01,\n  -9.142097557e-01, -9.135870479e-01, -9.129621904e-01, -9.123351846e-01,\n  -9.117060320e-01, -9.110747341e-01, -9.104412923e-01, -9.098057081e-01,\n  -9.091679831e-01, -9.085281187e-01, -9.078861165e-01, -9.072419779e-01,\n  -9.065957045e-01, -9.059472978e-01, -9.052967593e-01, -9.046440906e-01,\n  -9.039892931e-01, -9.033323685e-01, -9.026733182e-01, -9.020121439e-01,\n  -9.013488470e-01, -9.006834292e-01, -9.000158920e-01, -8.993462370e-01,\n  -8.986744657e-01, -8.980005797e-01, -8.973245807e-01, -8.966464702e-01,\n  -8.959662498e-01, -8.952839210e-01, -8.945994856e-01, -8.939129451e-01,\n  -8.932243012e-01, -8.925335554e-01, -8.918407094e-01, -8.911457648e-01,\n  -8.904487232e-01, -8.897495864e-01, -8.890483559e-01, -8.883450333e-01,\n  -8.876396204e-01, -8.869321188e-01, -8.862225301e-01, -8.855108561e-01,\n  -8.847970984e-01, -8.840812587e-01, -8.833633387e-01, -8.826433400e-01,\n  -8.819212643e-01, -8.811971135e-01, -8.804708891e-01, -8.797425928e-01,\n  -8.790122264e-01, -8.782797917e-01, -8.775452902e-01, -8.768087238e-01,\n  -8.760700942e-01, -8.753294031e-01, -8.745866523e-01, -8.738418435e-01,\n  -8.730949784e-01, -8.723460589e-01, -8.715950867e-01, -8.708420635e-01,\n  -8.700869911e-01, -8.693298713e-01, -8.685707060e-01, -8.678094968e-01,\n  -8.670462455e-01, -8.662809540e-01, -8.655136241e-01, -8.647442575e-01,\n  -8.639728561e-01, -8.631994217e-01, -8.624239561e-01, -8.616464611e-01,\n  -8.608669386e-01, -8.600853904e-01, -8.593018184e-01, -8.585162243e-01,\n  -8.577286100e-01, -8.569389774e-01, -8.561473284e-01, -8.553536647e-01,\n  -8.545579884e-01, -8.537603011e-01, -8.529606049e-01, -8.521589016e-01,\n  -8.513551931e-01, -8.505494813e-01, -8.497417680e-01, -8.489320552e-01,\n  -8.481203448e-01, -8.473066387e-01, -8.464909388e-01, -8.456732470e-01,\n  -8.448535652e-01, -8.440318955e-01, -8.432082396e-01, -8.423825996e-01,\n  -8.415549774e-01, -8.407253750e-01, -8.398937942e-01, -8.390602371e-01,\n  -8.382247056e-01, -8.373872016e-01, -8.365477272e-01, -8.357062844e-01,\n  -8.348628750e-01, -8.340175011e-01, -8.331701647e-01, -8.323208678e-01,\n  -8.314696123e-01, -8.306164003e-01, -8.297612338e-01, -8.289041148e-01,\n  -8.280450453e-01, -8.271840273e-01, -8.263210628e-01, -8.254561540e-01,\n  -8.245893028e-01, -8.237205112e-01, -8.228497814e-01, -8.219771153e-01,\n  -8.211025150e-01, -8.202259826e-01, -8.193475201e-01, -8.184671296e-01,\n  -8.175848132e-01, -8.167005729e-01, -8.158144108e-01, -8.149263291e-01,\n  -8.140363297e-01, -8.131444148e-01, -8.122505866e-01, -8.113548470e-01,\n  -8.104571983e-01, -8.095576424e-01, -8.086561816e-01, -8.077528179e-01,\n  -8.068475535e-01, -8.059403906e-01, -8.050313311e-01, -8.041203774e-01,\n  -8.032075315e-01, -8.022927955e-01, -8.013761717e-01, -8.004576622e-01,\n  -7.995372691e-01, -7.986149946e-01, -7.976908409e-01, -7.967648102e-01,\n  -7.958369046e-01, -7.949071263e-01, -7.939754776e-01, -7.930419605e-01,\n  -7.921065773e-01, -7.911693302e-01, -7.902302214e-01, -7.892892532e-01,\n  -7.883464276e-01, -7.874017470e-01, -7.864552136e-01, -7.855068296e-01,\n  -7.845565972e-01, -7.836045186e-01, -7.826505962e-01, -7.816948321e-01,\n  -7.807372286e-01, -7.797777879e-01, -7.788165124e-01, -7.778534042e-01,\n  -7.768884657e-01, -7.759216990e-01, -7.749531066e-01, -7.739826906e-01,\n  -7.730104534e-01, -7.720363972e-01, -7.710605243e-01, -7.700828370e-01,\n  -7.691033376e-01, -7.681220285e-01, -7.671389119e-01, -7.661539902e-01,\n  -7.651672656e-01, -7.641787405e-01, -7.631884173e-01, -7.621962981e-01,\n  -7.612023855e-01, -7.602066817e-01, -7.592091890e-01, -7.582099098e-01,\n  -7.572088465e-01, -7.562060014e-01, -7.552013769e-01, -7.541949753e-01,\n  -7.531867990e-01, -7.521768504e-01, -7.511651319e-01, -7.501516458e-01,\n  -7.491363945e-01, -7.481193805e-01, -7.471006060e-01, -7.460800735e-01,\n  -7.450577854e-01, -7.440337442e-01, -7.430079521e-01, -7.419804117e-01,\n  -7.409511254e-01, -7.399200955e-01, -7.388873245e-01, -7.378528148e-01,\n  -7.368165689e-01, -7.357785892e-01, -7.347388781e-01, -7.336974381e-01,\n  -7.326542717e-01, -7.316093812e-01, -7.305627692e-01, -7.295144381e-01,\n  -7.284643904e-01, -7.274126286e-01, -7.263591551e-01, -7.253039724e-01,\n  -7.242470830e-01, -7.231884893e-01, -7.221281939e-01, -7.210661993e-01,\n  -7.200025080e-01, -7.189371224e-01, -7.178700451e-01, -7.168012785e-01,\n  -7.157308253e-01, -7.146586879e-01, -7.135848688e-01, -7.125093706e-01,\n  -7.114321957e-01, -7.103533469e-01, -7.092728264e-01, -7.081906370e-01,\n  -7.071067812e-01, -7.060212614e-01, -7.049340804e-01, -7.038452405e-01,\n  -7.027547445e-01, -7.016625947e-01, -7.005687939e-01, -6.994733446e-01,\n  -6.983762494e-01, -6.972775108e-01, -6.961771315e-01, -6.950751140e-01,\n  -6.939714609e-01, -6.928661748e-01, -6.917592584e-01, -6.906507141e-01,\n  -6.895405447e-01, -6.884287528e-01, -6.873153409e-01, -6.862003117e-01,\n  -6.850836678e-01, -6.839654118e-01, -6.828455464e-01, -6.817240742e-01,\n  -6.806009978e-01, -6.794763199e-01, -6.783500431e-01, -6.772221701e-01,\n  -6.760927036e-01, -6.749616461e-01, -6.738290004e-01, -6.726947691e-01,\n  -6.715589548e-01, -6.704215604e-01, -6.692825883e-01, -6.681420414e-01,\n  -6.669999223e-01, -6.658562337e-01, -6.647109782e-01, -6.635641586e-01,\n  -6.624157776e-01, -6.612658378e-01, -6.601143421e-01, -6.589612930e-01,\n  -6.578066933e-01, -6.566505457e-01, -6.554928530e-01, -6.543336178e-01,\n  -6.531728430e-01, -6.520105311e-01, -6.508466850e-01, -6.496813074e-01,\n  -6.485144010e-01, -6.473459686e-01, -6.461760130e-01, -6.450045368e-01,\n  -6.438315429e-01, -6.426570340e-01, -6.414810128e-01, -6.403034822e-01,\n  -6.391244449e-01, -6.379439036e-01, -6.367618612e-01, -6.355783205e-01,\n  -6.343932842e-01, -6.332067551e-01, -6.320187359e-01, -6.308292296e-01,\n  -6.296382389e-01, -6.284457666e-01, -6.272518155e-01, -6.260563884e-01,\n  -6.248594881e-01, -6.236611175e-01, -6.224612794e-01, -6.212599765e-01,\n  -6.200572118e-01, -6.188529880e-01, -6.176473079e-01, -6.164401745e-01,\n  -6.152315906e-01, -6.140215589e-01, -6.128100824e-01, -6.115971639e-01,\n  -6.103828063e-01, -6.091670123e-01, -6.079497850e-01, -6.067311270e-01,\n  -6.055110414e-01, -6.042895309e-01, -6.030665985e-01, -6.018422471e-01,\n  -6.006164794e-01, -5.993892984e-01, -5.981607070e-01, -5.969307081e-01,\n  -5.956993045e-01, -5.944664992e-01, -5.932322950e-01, -5.919966950e-01,\n  -5.907597019e-01, -5.895213186e-01, -5.882815482e-01, -5.870403935e-01,\n  -5.857978575e-01, -5.845539430e-01, -5.833086529e-01, -5.820619903e-01,\n  -5.808139581e-01, -5.795645591e-01, -5.783137964e-01, -5.770616729e-01,\n  -5.758081914e-01, -5.745533550e-01, -5.732971667e-01, -5.720396293e-01,\n  -5.707807459e-01, -5.695205193e-01, -5.682589527e-01, -5.669960488e-01,\n  -5.657318108e-01, -5.644662415e-01, -5.631993440e-01, -5.619311212e-01,\n  -5.606615762e-01, -5.593907119e-01, -5.581185312e-01, -5.568450373e-01,\n  -5.555702330e-01, -5.542941215e-01, -5.530167056e-01, -5.517379884e-01,\n  -5.504579729e-01, -5.491766622e-01, -5.478940592e-01, -5.466101669e-01,\n  -5.453249884e-01, -5.440385267e-01, -5.427507849e-01, -5.414617659e-01,\n  -5.401714727e-01, -5.388799085e-01, -5.375870763e-01, -5.362929791e-01,\n  -5.349976199e-01, -5.337010018e-01, -5.324031279e-01, -5.311040012e-01,\n  -5.298036247e-01, -5.285020015e-01, -5.271991348e-01, -5.258950275e-01,\n  -5.245896827e-01, -5.232831035e-01, -5.219752929e-01, -5.206662541e-01,\n  -5.193559902e-01, -5.180445041e-01, -5.167317990e-01, -5.154178780e-01,\n  -5.141027442e-01, -5.127864006e-01, -5.114688504e-01, -5.101500967e-01,\n  -5.088301425e-01, -5.075089911e-01, -5.061866453e-01, -5.048631085e-01,\n  -5.035383837e-01, -5.022124740e-01, -5.008853826e-01, -4.995571125e-01,\n  -4.982276670e-01, -4.968970490e-01, -4.955652618e-01, -4.942323085e-01,\n  -4.928981922e-01, -4.915629161e-01, -4.902264833e-01, -4.888888969e-01,\n  -4.875501601e-01, -4.862102761e-01, -4.848692480e-01, -4.835270789e-01,\n  -4.821837721e-01, -4.808393306e-01, -4.794937577e-01, -4.781470564e-01,\n  -4.767992301e-01, -4.754502817e-01, -4.741002147e-01, -4.727490320e-01,\n  -4.713967368e-01, -4.700433325e-01, -4.686888220e-01, -4.673332087e-01,\n  -4.659764958e-01, -4.646186863e-01, -4.632597836e-01, -4.618997907e-01,\n  -4.605387110e-01, -4.591765475e-01, -4.578133036e-01, -4.564489824e-01,\n  -4.550835871e-01, -4.537171210e-01, -4.523495872e-01, -4.509809890e-01,\n  -4.496113297e-01, -4.482406123e-01, -4.468688402e-01, -4.454960165e-01,\n  -4.441221446e-01, -4.427472276e-01, -4.413712687e-01, -4.399942713e-01,\n  -4.386162385e-01, -4.372371737e-01, -4.358570799e-01, -4.344759606e-01,\n  -4.330938189e-01, -4.317106580e-01, -4.303264813e-01, -4.289412921e-01,\n  -4.275550934e-01, -4.261678887e-01, -4.247796812e-01, -4.233904741e-01,\n  -4.220002708e-01, -4.206090744e-01, -4.192168884e-01, -4.178237158e-01,\n  -4.164295601e-01, -4.150344245e-01, -4.136383122e-01, -4.122412267e-01,\n  -4.108431711e-01, -4.094441487e-01, -4.080441629e-01, -4.066432169e-01,\n  -4.052413140e-01, -4.038384576e-01, -4.024346509e-01, -4.010298972e-01,\n  -3.996241998e-01, -3.982175622e-01, -3.968099874e-01, -3.954014789e-01,\n  -3.939920401e-01, -3.925816741e-01, -3.911703843e-01, -3.897581741e-01,\n  -3.883450467e-01, -3.869310055e-01, -3.855160538e-01, -3.841001950e-01,\n  -3.826834324e-01, -3.812657692e-01, -3.798472089e-01, -3.784277548e-01,\n  -3.770074102e-01, -3.755861785e-01, -3.741640630e-01, -3.727410670e-01,\n  -3.713171940e-01, -3.698924471e-01, -3.684668300e-01, -3.670403457e-01,\n  -3.656129978e-01, -3.641847896e-01, -3.627557244e-01, -3.613258056e-01,\n  -3.598950365e-01, -3.584634206e-01, -3.570309612e-01, -3.555976617e-01,\n  -3.541635254e-01, -3.527285558e-01, -3.512927561e-01, -3.498561298e-01,\n  -3.484186802e-01, -3.469804108e-01, -3.455413250e-01, -3.441014260e-01,\n  -3.426607173e-01, -3.412192023e-01, -3.397768844e-01, -3.383337670e-01,\n  -3.368898534e-01, -3.354451471e-01, -3.339996514e-01, -3.325533699e-01,\n  -3.311063058e-01, -3.296584625e-01, -3.282098436e-01, -3.267604523e-01,\n  -3.253102922e-01, -3.238593665e-01, -3.224076788e-01, -3.209552324e-01,\n  -3.195020308e-01, -3.180480774e-01, -3.165933756e-01, -3.151379288e-01,\n  -3.136817404e-01, -3.122248139e-01, -3.107671527e-01, -3.093087603e-01,\n  -3.078496400e-01, -3.063897954e-01, -3.049292297e-01, -3.034679466e-01,\n  -3.020059493e-01, -3.005432414e-01, -2.990798263e-01, -2.976157074e-01,\n  -2.961508882e-01, -2.946853722e-01, -2.932191627e-01, -2.917522632e-01,\n  -2.902846773e-01, -2.888164082e-01, -2.873474595e-01, -2.858778347e-01,\n  -2.844075372e-01, -2.829365705e-01, -2.814649379e-01, -2.799926431e-01,\n  -2.785196894e-01, -2.770460803e-01, -2.755718193e-01, -2.740969099e-01,\n  -2.726213554e-01, -2.711451595e-01, -2.696683256e-01, -2.681908571e-01,\n  -2.667127575e-01, -2.652340303e-01, -2.637546790e-01, -2.622747070e-01,\n  -2.607941179e-01, -2.593129151e-01, -2.578311022e-01, -2.563486825e-01,\n  -2.548656596e-01, -2.533820370e-01, -2.518978182e-01, -2.504130066e-01,\n  -2.489276057e-01, -2.474416192e-01, -2.459550503e-01, -2.444679027e-01,\n  -2.429801799e-01, -2.414918853e-01, -2.400030224e-01, -2.385135948e-01,\n  -2.370236060e-01, -2.355330594e-01, -2.340419586e-01, -2.325503070e-01,\n  -2.310581083e-01, -2.295653658e-01, -2.280720832e-01, -2.265782638e-01,\n  -2.250839114e-01, -2.235890292e-01, -2.220936210e-01, -2.205976901e-01,\n  -2.191012402e-01, -2.176042746e-01, -2.161067971e-01, -2.146088110e-01,\n  -2.131103199e-01, -2.116113274e-01, -2.101118369e-01, -2.086118520e-01,\n  -2.071113762e-01, -2.056104131e-01, -2.041089661e-01, -2.026070388e-01,\n  -2.011046348e-01, -1.996017576e-01, -1.980984107e-01, -1.965945977e-01,\n  -1.950903220e-01, -1.935855873e-01, -1.920803970e-01, -1.905747548e-01,\n  -1.890686641e-01, -1.875621286e-01, -1.860551517e-01, -1.845477369e-01,\n  -1.830398880e-01, -1.815316083e-01, -1.800229014e-01, -1.785137709e-01,\n  -1.770042204e-01, -1.754942534e-01, -1.739838734e-01, -1.724730840e-01,\n  -1.709618888e-01, -1.694502912e-01, -1.679382950e-01, -1.664259035e-01,\n  -1.649131205e-01, -1.633999494e-01, -1.618863938e-01, -1.603724572e-01,\n  -1.588581433e-01, -1.573434556e-01, -1.558283977e-01, -1.543129730e-01,\n  -1.527971853e-01, -1.512810380e-01, -1.497645347e-01, -1.482476790e-01,\n  -1.467304745e-01, -1.452129247e-01, -1.436950332e-01, -1.421768035e-01,\n  -1.406582393e-01, -1.391393442e-01, -1.376201216e-01, -1.361005752e-01,\n  -1.345807085e-01, -1.330605252e-01, -1.315400287e-01, -1.300192227e-01,\n  -1.284981108e-01, -1.269766965e-01, -1.254549834e-01, -1.239329751e-01,\n  -1.224106752e-01, -1.208880872e-01, -1.193652148e-01, -1.178420615e-01,\n  -1.163186309e-01, -1.147949266e-01, -1.132709522e-01, -1.117467112e-01,\n  -1.102222073e-01, -1.086974440e-01, -1.071724250e-01, -1.056471537e-01,\n  -1.041216339e-01, -1.025958690e-01, -1.010698628e-01, -9.954361866e-02,\n  -9.801714033e-02, -9.649043136e-02, -9.496349533e-02, -9.343633585e-02,\n  -9.190895650e-02, -9.038136088e-02, -8.885355258e-02, -8.732553521e-02,\n  -8.579731234e-02, -8.426888759e-02, -8.274026455e-02, -8.121144681e-02,\n  -7.968243797e-02, -7.815324163e-02, -7.662386139e-02, -7.509430085e-02,\n  -7.356456360e-02, -7.203465325e-02, -7.050457339e-02, -6.897432763e-02,\n  -6.744391956e-02, -6.591335280e-02, -6.438263093e-02, -6.285175756e-02,\n  -6.132073630e-02, -5.978957075e-02, -5.825826450e-02, -5.672682117e-02,\n  -5.519524435e-02, -5.366353765e-02, -5.213170468e-02, -5.059974904e-02,\n  -4.906767433e-02, -4.753548416e-02, -4.600318213e-02, -4.447077185e-02,\n  -4.293825693e-02, -4.140564098e-02, -3.987292759e-02, -3.834012037e-02,\n  -3.680722294e-02, -3.527423890e-02, -3.374117185e-02, -3.220802541e-02,\n  -3.067480318e-02, -2.914150876e-02, -2.760814578e-02, -2.607471783e-02,\n  -2.454122852e-02, -2.300768147e-02, -2.147408028e-02, -1.994042855e-02,\n  -1.840672991e-02, -1.687298795e-02, -1.533920628e-02, -1.380538853e-02,\n  -1.227153829e-02, -1.073765917e-02, -9.203754782e-03, -7.669828740e-03,\n  -6.135884649e-03, -4.601926120e-03, -3.067956763e-03, -1.533980186e-03,\n  -2.449293598e-16,  1.533980186e-03,  3.067956763e-03,  4.601926120e-03,\n   6.135884649e-03,  7.669828740e-03,  9.203754782e-03,  1.073765917e-02,\n   1.227153829e-02,  1.380538853e-02,  1.533920628e-02,  1.687298795e-02,\n   1.840672991e-02,  1.994042855e-02,  2.147408028e-02,  2.300768147e-02,\n   2.454122852e-02,  2.607471783e-02,  2.760814578e-02,  2.914150876e-02,\n   3.067480318e-02,  3.220802541e-02,  3.374117185e-02,  3.527423890e-02,\n   3.680722294e-02,  3.834012037e-02,  3.987292759e-02,  4.140564098e-02,\n   4.293825693e-02,  4.447077185e-02,  4.600318213e-02,  4.753548416e-02,\n   4.906767433e-02,  5.059974904e-02,  5.213170468e-02,  5.366353765e-02,\n   5.519524435e-02,  5.672682117e-02,  5.825826450e-02,  5.978957075e-02,\n   6.132073630e-02,  6.285175756e-02,  6.438263093e-02,  6.591335280e-02,\n   6.744391956e-02,  6.897432763e-02,  7.050457339e-02,  7.203465325e-02,\n   7.356456360e-02,  7.509430085e-02,  7.662386139e-02,  7.815324163e-02,\n   7.968243797e-02,  8.121144681e-02,  8.274026455e-02,  8.426888759e-02,\n   8.579731234e-02,  8.732553521e-02,  8.885355258e-02,  9.038136088e-02,\n   9.190895650e-02,  9.343633585e-02,  9.496349533e-02,  9.649043136e-02,\n   9.801714033e-02,  9.954361866e-02,  1.010698628e-01,  1.025958690e-01,\n   1.041216339e-01,  1.056471537e-01,  1.071724250e-01,  1.086974440e-01,\n   1.102222073e-01,  1.117467112e-01,  1.132709522e-01,  1.147949266e-01,\n   1.163186309e-01,  1.178420615e-01,  1.193652148e-01,  1.208880872e-01,\n   1.224106752e-01,  1.239329751e-01,  1.254549834e-01,  1.269766965e-01,\n   1.284981108e-01,  1.300192227e-01,  1.315400287e-01,  1.330605252e-01,\n   1.345807085e-01,  1.361005752e-01,  1.376201216e-01,  1.391393442e-01,\n   1.406582393e-01,  1.421768035e-01,  1.436950332e-01,  1.452129247e-01,\n   1.467304745e-01,  1.482476790e-01,  1.497645347e-01,  1.512810380e-01,\n   1.527971853e-01,  1.543129730e-01,  1.558283977e-01,  1.573434556e-01,\n   1.588581433e-01,  1.603724572e-01,  1.618863938e-01,  1.633999494e-01,\n   1.649131205e-01,  1.664259035e-01,  1.679382950e-01,  1.694502912e-01,\n   1.709618888e-01,  1.724730840e-01,  1.739838734e-01,  1.754942534e-01,\n   1.770042204e-01,  1.785137709e-01,  1.800229014e-01,  1.815316083e-01,\n   1.830398880e-01,  1.845477369e-01,  1.860551517e-01,  1.875621286e-01,\n   1.890686641e-01,  1.905747548e-01,  1.920803970e-01,  1.935855873e-01,\n   1.950903220e-01,  1.965945977e-01,  1.980984107e-01,  1.996017576e-01,\n   2.011046348e-01,  2.026070388e-01,  2.041089661e-01,  2.056104131e-01,\n   2.071113762e-01,  2.086118520e-01,  2.101118369e-01,  2.116113274e-01,\n   2.131103199e-01,  2.146088110e-01,  2.161067971e-01,  2.176042746e-01,\n   2.191012402e-01,  2.205976901e-01,  2.220936210e-01,  2.235890292e-01,\n   2.250839114e-01,  2.265782638e-01,  2.280720832e-01,  2.295653658e-01,\n   2.310581083e-01,  2.325503070e-01,  2.340419586e-01,  2.355330594e-01,\n   2.370236060e-01,  2.385135948e-01,  2.400030224e-01,  2.414918853e-01,\n   2.429801799e-01,  2.444679027e-01,  2.459550503e-01,  2.474416192e-01,\n   2.489276057e-01,  2.504130066e-01,  2.518978182e-01,  2.533820370e-01,\n   2.548656596e-01,  2.563486825e-01,  2.578311022e-01,  2.593129151e-01,\n   2.607941179e-01,  2.622747070e-01,  2.637546790e-01,  2.652340303e-01,\n   2.667127575e-01,  2.681908571e-01,  2.696683256e-01,  2.711451595e-01,\n   2.726213554e-01,  2.740969099e-01,  2.755718193e-01,  2.770460803e-01,\n   2.785196894e-01,  2.799926431e-01,  2.814649379e-01,  2.829365705e-01,\n   2.844075372e-01,  2.858778347e-01,  2.873474595e-01,  2.888164082e-01,\n   2.902846773e-01,  2.917522632e-01,  2.932191627e-01,  2.946853722e-01,\n   2.961508882e-01,  2.976157074e-01,  2.990798263e-01,  3.005432414e-01,\n   3.020059493e-01,  3.034679466e-01,  3.049292297e-01,  3.063897954e-01,\n   3.078496400e-01,  3.093087603e-01,  3.107671527e-01,  3.122248139e-01,\n   3.136817404e-01,  3.151379288e-01,  3.165933756e-01,  3.180480774e-01,\n   3.195020308e-01,  3.209552324e-01,  3.224076788e-01,  3.238593665e-01,\n   3.253102922e-01,  3.267604523e-01,  3.282098436e-01,  3.296584625e-01,\n   3.311063058e-01,  3.325533699e-01,  3.339996514e-01,  3.354451471e-01,\n   3.368898534e-01,  3.383337670e-01,  3.397768844e-01,  3.412192023e-01,\n   3.426607173e-01,  3.441014260e-01,  3.455413250e-01,  3.469804108e-01,\n   3.484186802e-01,  3.498561298e-01,  3.512927561e-01,  3.527285558e-01,\n   3.541635254e-01,  3.555976617e-01,  3.570309612e-01,  3.584634206e-01,\n   3.598950365e-01,  3.613258056e-01,  3.627557244e-01,  3.641847896e-01,\n   3.656129978e-01,  3.670403457e-01,  3.684668300e-01,  3.698924471e-01,\n   3.713171940e-01,  3.727410670e-01,  3.741640630e-01,  3.755861785e-01,\n   3.770074102e-01,  3.784277548e-01,  3.798472089e-01,  3.812657692e-01,\n   3.826834324e-01,  3.841001950e-01,  3.855160538e-01,  3.869310055e-01,\n   3.883450467e-01,  3.897581741e-01,  3.911703843e-01,  3.925816741e-01,\n   3.939920401e-01,  3.954014789e-01,  3.968099874e-01,  3.982175622e-01,\n   3.996241998e-01,  4.010298972e-01,  4.024346509e-01,  4.038384576e-01,\n   4.052413140e-01,  4.066432169e-01,  4.080441629e-01,  4.094441487e-01,\n   4.108431711e-01,  4.122412267e-01,  4.136383122e-01,  4.150344245e-01,\n   4.164295601e-01,  4.178237158e-01,  4.192168884e-01,  4.206090744e-01,\n   4.220002708e-01,  4.233904741e-01,  4.247796812e-01,  4.261678887e-01,\n   4.275550934e-01,  4.289412921e-01,  4.303264813e-01,  4.317106580e-01,\n   4.330938189e-01,  4.344759606e-01,  4.358570799e-01,  4.372371737e-01,\n   4.386162385e-01,  4.399942713e-01,  4.413712687e-01,  4.427472276e-01,\n   4.441221446e-01,  4.454960165e-01,  4.468688402e-01,  4.482406123e-01,\n   4.496113297e-01,  4.509809890e-01,  4.523495872e-01,  4.537171210e-01,\n   4.550835871e-01,  4.564489824e-01,  4.578133036e-01,  4.591765475e-01,\n   4.605387110e-01,  4.618997907e-01,  4.632597836e-01,  4.646186863e-01,\n   4.659764958e-01,  4.673332087e-01,  4.686888220e-01,  4.700433325e-01,\n   4.713967368e-01,  4.727490320e-01,  4.741002147e-01,  4.754502817e-01,\n   4.767992301e-01,  4.781470564e-01,  4.794937577e-01,  4.808393306e-01,\n   4.821837721e-01,  4.835270789e-01,  4.848692480e-01,  4.862102761e-01,\n   4.875501601e-01,  4.888888969e-01,  4.902264833e-01,  4.915629161e-01,\n   4.928981922e-01,  4.942323085e-01,  4.955652618e-01,  4.968970490e-01,\n   4.982276670e-01,  4.995571125e-01,  5.008853826e-01,  5.022124740e-01,\n   5.035383837e-01,  5.048631085e-01,  5.061866453e-01,  5.075089911e-01,\n   5.088301425e-01,  5.101500967e-01,  5.114688504e-01,  5.127864006e-01,\n   5.141027442e-01,  5.154178780e-01,  5.167317990e-01,  5.180445041e-01,\n   5.193559902e-01,  5.206662541e-01,  5.219752929e-01,  5.232831035e-01,\n   5.245896827e-01,  5.258950275e-01,  5.271991348e-01,  5.285020015e-01,\n   5.298036247e-01,  5.311040012e-01,  5.324031279e-01,  5.337010018e-01,\n   5.349976199e-01,  5.362929791e-01,  5.375870763e-01,  5.388799085e-01,\n   5.401714727e-01,  5.414617659e-01,  5.427507849e-01,  5.440385267e-01,\n   5.453249884e-01,  5.466101669e-01,  5.478940592e-01,  5.491766622e-01,\n   5.504579729e-01,  5.517379884e-01,  5.530167056e-01,  5.542941215e-01,\n   5.555702330e-01,  5.568450373e-01,  5.581185312e-01,  5.593907119e-01,\n   5.606615762e-01,  5.619311212e-01,  5.631993440e-01,  5.644662415e-01,\n   5.657318108e-01,  5.669960488e-01,  5.682589527e-01,  5.695205193e-01,\n   5.707807459e-01,  5.720396293e-01,  5.732971667e-01,  5.745533550e-01,\n   5.758081914e-01,  5.770616729e-01,  5.783137964e-01,  5.795645591e-01,\n   5.808139581e-01,  5.820619903e-01,  5.833086529e-01,  5.845539430e-01,\n   5.857978575e-01,  5.870403935e-01,  5.882815482e-01,  5.895213186e-01,\n   5.907597019e-01,  5.919966950e-01,  5.932322950e-01,  5.944664992e-01,\n   5.956993045e-01,  5.969307081e-01,  5.981607070e-01,  5.993892984e-01,\n   6.006164794e-01,  6.018422471e-01,  6.030665985e-01,  6.042895309e-01,\n   6.055110414e-01,  6.067311270e-01,  6.079497850e-01,  6.091670123e-01,\n   6.103828063e-01,  6.115971639e-01,  6.128100824e-01,  6.140215589e-01,\n   6.152315906e-01,  6.164401745e-01,  6.176473079e-01,  6.188529880e-01,\n   6.200572118e-01,  6.212599765e-01,  6.224612794e-01,  6.236611175e-01,\n   6.248594881e-01,  6.260563884e-01,  6.272518155e-01,  6.284457666e-01,\n   6.296382389e-01,  6.308292296e-01,  6.320187359e-01,  6.332067551e-01,\n   6.343932842e-01,  6.355783205e-01,  6.367618612e-01,  6.379439036e-01,\n   6.391244449e-01,  6.403034822e-01,  6.414810128e-01,  6.426570340e-01,\n   6.438315429e-01,  6.450045368e-01,  6.461760130e-01,  6.473459686e-01,\n   6.485144010e-01,  6.496813074e-01,  6.508466850e-01,  6.520105311e-01,\n   6.531728430e-01,  6.543336178e-01,  6.554928530e-01,  6.566505457e-01,\n   6.578066933e-01,  6.589612930e-01,  6.601143421e-01,  6.612658378e-01,\n   6.624157776e-01,  6.635641586e-01,  6.647109782e-01,  6.658562337e-01,\n   6.669999223e-01,  6.681420414e-01,  6.692825883e-01,  6.704215604e-01,\n   6.715589548e-01,  6.726947691e-01,  6.738290004e-01,  6.749616461e-01,\n   6.760927036e-01,  6.772221701e-01,  6.783500431e-01,  6.794763199e-01,\n   6.806009978e-01,  6.817240742e-01,  6.828455464e-01,  6.839654118e-01,\n   6.850836678e-01,  6.862003117e-01,  6.873153409e-01,  6.884287528e-01,\n   6.895405447e-01,  6.906507141e-01,  6.917592584e-01,  6.928661748e-01,\n   6.939714609e-01,  6.950751140e-01,  6.961771315e-01,  6.972775108e-01,\n   6.983762494e-01,  6.994733446e-01,  7.005687939e-01,  7.016625947e-01,\n   7.027547445e-01,  7.038452405e-01,  7.049340804e-01,  7.060212614e-01,\n   7.071067812e-01,  7.081906370e-01,  7.092728264e-01,  7.103533469e-01,\n   7.114321957e-01,  7.125093706e-01,  7.135848688e-01,  7.146586879e-01,\n   7.157308253e-01,  7.168012785e-01,  7.178700451e-01,  7.189371224e-01,\n   7.200025080e-01,  7.210661993e-01,  7.221281939e-01,  7.231884893e-01,\n   7.242470830e-01,  7.253039724e-01,  7.263591551e-01,  7.274126286e-01,\n   7.284643904e-01,  7.295144381e-01,  7.305627692e-01,  7.316093812e-01,\n   7.326542717e-01,  7.336974381e-01,  7.347388781e-01,  7.357785892e-01,\n   7.368165689e-01,  7.378528148e-01,  7.388873245e-01,  7.399200955e-01,\n   7.409511254e-01,  7.419804117e-01,  7.430079521e-01,  7.440337442e-01,\n   7.450577854e-01,  7.460800735e-01,  7.471006060e-01,  7.481193805e-01,\n   7.491363945e-01,  7.501516458e-01,  7.511651319e-01,  7.521768504e-01,\n   7.531867990e-01,  7.541949753e-01,  7.552013769e-01,  7.562060014e-01,\n   7.572088465e-01,  7.582099098e-01,  7.592091890e-01,  7.602066817e-01,\n   7.612023855e-01,  7.621962981e-01,  7.631884173e-01,  7.641787405e-01,\n   7.651672656e-01,  7.661539902e-01,  7.671389119e-01,  7.681220285e-01,\n   7.691033376e-01,  7.700828370e-01,  7.710605243e-01,  7.720363972e-01,\n   7.730104534e-01,  7.739826906e-01,  7.749531066e-01,  7.759216990e-01,\n   7.768884657e-01,  7.778534042e-01,  7.788165124e-01,  7.797777879e-01,\n   7.807372286e-01,  7.816948321e-01,  7.826505962e-01,  7.836045186e-01,\n   7.845565972e-01,  7.855068296e-01,  7.864552136e-01,  7.874017470e-01,\n   7.883464276e-01,  7.892892532e-01,  7.902302214e-01,  7.911693302e-01,\n   7.921065773e-01,  7.930419605e-01,  7.939754776e-01,  7.949071263e-01,\n   7.958369046e-01,  7.967648102e-01,  7.976908409e-01,  7.986149946e-01,\n   7.995372691e-01,  8.004576622e-01,  8.013761717e-01,  8.022927955e-01,\n   8.032075315e-01,  8.041203774e-01,  8.050313311e-01,  8.059403906e-01,\n   8.068475535e-01,  8.077528179e-01,  8.086561816e-01,  8.095576424e-01,\n   8.104571983e-01,  8.113548470e-01,  8.122505866e-01,  8.131444148e-01,\n   8.140363297e-01,  8.149263291e-01,  8.158144108e-01,  8.167005729e-01,\n   8.175848132e-01,  8.184671296e-01,  8.193475201e-01,  8.202259826e-01,\n   8.211025150e-01,  8.219771153e-01,  8.228497814e-01,  8.237205112e-01,\n   8.245893028e-01,  8.254561540e-01,  8.263210628e-01,  8.271840273e-01,\n   8.280450453e-01,  8.289041148e-01,  8.297612338e-01,  8.306164003e-01,\n   8.314696123e-01,  8.323208678e-01,  8.331701647e-01,  8.340175011e-01,\n   8.348628750e-01,  8.357062844e-01,  8.365477272e-01,  8.373872016e-01,\n   8.382247056e-01,  8.390602371e-01,  8.398937942e-01,  8.407253750e-01,\n   8.415549774e-01,  8.423825996e-01,  8.432082396e-01,  8.440318955e-01,\n   8.448535652e-01,  8.456732470e-01,  8.464909388e-01,  8.473066387e-01,\n   8.481203448e-01,  8.489320552e-01,  8.497417680e-01,  8.505494813e-01,\n   8.513551931e-01,  8.521589016e-01,  8.529606049e-01,  8.537603011e-01,\n   8.545579884e-01,  8.553536647e-01,  8.561473284e-01,  8.569389774e-01,\n   8.577286100e-01,  8.585162243e-01,  8.593018184e-01,  8.600853904e-01,\n   8.608669386e-01,  8.616464611e-01,  8.624239561e-01,  8.631994217e-01,\n   8.639728561e-01,  8.647442575e-01,  8.655136241e-01,  8.662809540e-01,\n   8.670462455e-01,  8.678094968e-01,  8.685707060e-01,  8.693298713e-01,\n   8.700869911e-01,  8.708420635e-01,  8.715950867e-01,  8.723460589e-01,\n   8.730949784e-01,  8.738418435e-01,  8.745866523e-01,  8.753294031e-01,\n   8.760700942e-01,  8.768087238e-01,  8.775452902e-01,  8.782797917e-01,\n   8.790122264e-01,  8.797425928e-01,  8.804708891e-01,  8.811971135e-01,\n   8.819212643e-01,  8.826433400e-01,  8.833633387e-01,  8.840812587e-01,\n   8.847970984e-01,  8.855108561e-01,  8.862225301e-01,  8.869321188e-01,\n   8.876396204e-01,  8.883450333e-01,  8.890483559e-01,  8.897495864e-01,\n   8.904487232e-01,  8.911457648e-01,  8.918407094e-01,  8.925335554e-01,\n   8.932243012e-01,  8.939129451e-01,  8.945994856e-01,  8.952839210e-01,\n   8.959662498e-01,  8.966464702e-01,  8.973245807e-01,  8.980005797e-01,\n   8.986744657e-01,  8.993462370e-01,  9.000158920e-01,  9.006834292e-01,\n   9.013488470e-01,  9.020121439e-01,  9.026733182e-01,  9.033323685e-01,\n   9.039892931e-01,  9.046440906e-01,  9.052967593e-01,  9.059472978e-01,\n   9.065957045e-01,  9.072419779e-01,  9.078861165e-01,  9.085281187e-01,\n   9.091679831e-01,  9.098057081e-01,  9.104412923e-01,  9.110747341e-01,\n   9.117060320e-01,  9.123351846e-01,  9.129621904e-01,  9.135870479e-01,\n   9.142097557e-01,  9.148303122e-01,  9.154487161e-01,  9.160649658e-01,\n   9.166790599e-01,  9.172909970e-01,  9.179007756e-01,  9.185083943e-01,\n   9.191138517e-01,  9.197171463e-01,  9.203182767e-01,  9.209172415e-01,\n   9.215140393e-01,  9.221086687e-01,  9.227011283e-01,  9.232914167e-01,\n   9.238795325e-01,  9.244654743e-01,  9.250492408e-01,  9.256308305e-01,\n   9.262102421e-01,  9.267874743e-01,  9.273625257e-01,  9.279353948e-01,\n   9.285060805e-01,  9.290745813e-01,  9.296408958e-01,  9.302050229e-01,\n   9.307669611e-01,  9.313267091e-01,  9.318842656e-01,  9.324396293e-01,\n   9.329927988e-01,  9.335437730e-01,  9.340925504e-01,  9.346391298e-01,\n   9.351835099e-01,  9.357256895e-01,  9.362656672e-01,  9.368034417e-01,\n   9.373390119e-01,  9.378723764e-01,  9.384035341e-01,  9.389324835e-01,\n   9.394592236e-01,  9.399837530e-01,  9.405060706e-01,  9.410261751e-01,\n   9.415440652e-01,  9.420597398e-01,  9.425731976e-01,  9.430844375e-01,\n   9.435934582e-01,  9.441002585e-01,  9.446048373e-01,  9.451071933e-01,\n   9.456073254e-01,  9.461052324e-01,  9.466009131e-01,  9.470943664e-01,\n   9.475855910e-01,  9.480745859e-01,  9.485613499e-01,  9.490458819e-01,\n   9.495281806e-01,  9.500082450e-01,  9.504860739e-01,  9.509616663e-01,\n   9.514350210e-01,  9.519061368e-01,  9.523750127e-01,  9.528416476e-01,\n   9.533060404e-01,  9.537681899e-01,  9.542280951e-01,  9.546857549e-01,\n   9.551411683e-01,  9.555943341e-01,  9.560452513e-01,  9.564939189e-01,\n   9.569403357e-01,  9.573845008e-01,  9.578264130e-01,  9.582660714e-01,\n   9.587034749e-01,  9.591386225e-01,  9.595715131e-01,  9.600021457e-01,\n   9.604305194e-01,  9.608566331e-01,  9.612804858e-01,  9.617020765e-01,\n   9.621214043e-01,  9.625384680e-01,  9.629532669e-01,  9.633657998e-01,\n   9.637760658e-01,  9.641840640e-01,  9.645897933e-01,  9.649932529e-01,\n   9.653944417e-01,  9.657933589e-01,  9.661900034e-01,  9.665843745e-01,\n   9.669764710e-01,  9.673662922e-01,  9.677538371e-01,  9.681391047e-01,\n   9.685220943e-01,  9.689028048e-01,  9.692812354e-01,  9.696573851e-01,\n   9.700312532e-01,  9.704028387e-01,  9.707721407e-01,  9.711391584e-01,\n   9.715038910e-01,  9.718663375e-01,  9.722264971e-01,  9.725843689e-01,\n   9.729399522e-01,  9.732932461e-01,  9.736442497e-01,  9.739929622e-01,\n   9.743393828e-01,  9.746835107e-01,  9.750253451e-01,  9.753648851e-01,\n   9.757021300e-01,  9.760370790e-01,  9.763697313e-01,  9.767000861e-01,\n   9.770281427e-01,  9.773539001e-01,  9.776773578e-01,  9.779985149e-01,\n   9.783173707e-01,  9.786339244e-01,  9.789481753e-01,  9.792601226e-01,\n   9.795697657e-01,  9.798771037e-01,  9.801821360e-01,  9.804848618e-01,\n   9.807852804e-01,  9.810833912e-01,  9.813791933e-01,  9.816726862e-01,\n   9.819638691e-01,  9.822527414e-01,  9.825393023e-01,  9.828235512e-01,\n   9.831054874e-01,  9.833851103e-01,  9.836624192e-01,  9.839374134e-01,\n   9.842100924e-01,  9.844804554e-01,  9.847485018e-01,  9.850142310e-01,\n   9.852776424e-01,  9.855387353e-01,  9.857975092e-01,  9.860539633e-01,\n   9.863080972e-01,  9.865599103e-01,  9.868094018e-01,  9.870565713e-01,\n   9.873014182e-01,  9.875439418e-01,  9.877841416e-01,  9.880220171e-01,\n   9.882575677e-01,  9.884907929e-01,  9.887216920e-01,  9.889502645e-01,\n   9.891765100e-01,  9.894004278e-01,  9.896220175e-01,  9.898412785e-01,\n   9.900582103e-01,  9.902728124e-01,  9.904850843e-01,  9.906950254e-01,\n   9.909026354e-01,  9.911079137e-01,  9.913108598e-01,  9.915114733e-01,\n   9.917097537e-01,  9.919057004e-01,  9.920993131e-01,  9.922905913e-01,\n   9.924795346e-01,  9.926661424e-01,  9.928504145e-01,  9.930323502e-01,\n   9.932119492e-01,  9.933892111e-01,  9.935641355e-01,  9.937367219e-01,\n   9.939069700e-01,  9.940748793e-01,  9.942404495e-01,  9.944036801e-01,\n   9.945645707e-01,  9.947231211e-01,  9.948793308e-01,  9.950331994e-01,\n   9.951847267e-01,  9.953339121e-01,  9.954807555e-01,  9.956252564e-01,\n   9.957674145e-01,  9.959072294e-01,  9.960447009e-01,  9.961798286e-01,\n   9.963126122e-01,  9.964430514e-01,  9.965711458e-01,  9.966968952e-01,\n   9.968202993e-01,  9.969413578e-01,  9.970600703e-01,  9.971764367e-01,\n   9.972904567e-01,  9.974021299e-01,  9.975114561e-01,  9.976184351e-01,\n   9.977230666e-01,  9.978253504e-01,  9.979252862e-01,  9.980228738e-01,\n   9.981181129e-01,  9.982110034e-01,  9.983015449e-01,  9.983897374e-01,\n   9.984755806e-01,  9.985590742e-01,  9.986402182e-01,  9.987190122e-01,\n   9.987954562e-01,  9.988695499e-01,  9.989412932e-01,  9.990106859e-01,\n   9.990777278e-01,  9.991424187e-01,  9.992047586e-01,  9.992647473e-01,\n   9.993223846e-01,  9.993776704e-01,  9.994306046e-01,  9.994811870e-01,\n   9.995294175e-01,  9.995752960e-01,  9.996188225e-01,  9.996599967e-01,\n   9.996988187e-01,  9.997352883e-01,  9.997694054e-01,  9.998011699e-01,\n   9.998305818e-01,  9.998576410e-01,  9.998823475e-01,  9.999047011e-01,\n   9.999247018e-01,  9.999423497e-01,  9.999576446e-01,  9.999705864e-01,\n   9.999811753e-01,  9.999894111e-01,  9.999952938e-01,  9.999988235e-01,\n   1.000000000e+00,\n};\nconst float FLASHMEM lut_4_decades[] = {\n   1.000000000e+00,  1.036632928e+00,  1.074607828e+00,  1.113973860e+00,\n   1.154781985e+00,  1.197085030e+00,  1.240937761e+00,  1.286396945e+00,\n   1.333521432e+00,  1.382372227e+00,  1.433012570e+00,  1.485508017e+00,\n   1.539926526e+00,  1.596338544e+00,  1.654817100e+00,  1.715437896e+00,\n   1.778279410e+00,  1.843422992e+00,  1.910952975e+00,  1.980956779e+00,\n   2.053525026e+00,  2.128751662e+00,  2.206734069e+00,  2.287573200e+00,\n   2.371373706e+00,  2.458244069e+00,  2.548296748e+00,  2.641648320e+00,\n   2.738419634e+00,  2.838735965e+00,  2.942727176e+00,  3.050527890e+00,\n   3.162277660e+00,  3.278121151e+00,  3.398208329e+00,  3.522694651e+00,\n   3.651741273e+00,  3.785515249e+00,  3.924189758e+00,  4.067944321e+00,\n   4.216965034e+00,  4.371444813e+00,  4.531583638e+00,  4.697588817e+00,\n   4.869675252e+00,  5.048065717e+00,  5.232991147e+00,  5.424690937e+00,\n   5.623413252e+00,  5.829415347e+00,  6.042963902e+00,  6.264335367e+00,\n   6.493816316e+00,  6.731703824e+00,  6.978305849e+00,  7.233941627e+00,\n   7.498942093e+00,  7.773650302e+00,  8.058421878e+00,  8.353625470e+00,\n   8.659643234e+00,  8.976871324e+00,  9.305720409e+00,  9.646616199e+00,\n   1.000000000e+01,  1.036632928e+01,  1.074607828e+01,  1.113973860e+01,\n   1.154781985e+01,  1.197085030e+01,  1.240937761e+01,  1.286396945e+01,\n   1.333521432e+01,  1.382372227e+01,  1.433012570e+01,  1.485508017e+01,\n   1.539926526e+01,  1.596338544e+01,  1.654817100e+01,  1.715437896e+01,\n   1.778279410e+01,  1.843422992e+01,  1.910952975e+01,  1.980956779e+01,\n   2.053525026e+01,  2.128751662e+01,  2.206734069e+01,  2.287573200e+01,\n   2.371373706e+01,  2.458244069e+01,  2.548296748e+01,  2.641648320e+01,\n   2.738419634e+01,  2.838735965e+01,  2.942727176e+01,  3.050527890e+01,\n   3.162277660e+01,  3.278121151e+01,  3.398208329e+01,  3.522694651e+01,\n   3.651741273e+01,  3.785515249e+01,  3.924189758e+01,  4.067944321e+01,\n   4.216965034e+01,  4.371444813e+01,  4.531583638e+01,  4.697588817e+01,\n   4.869675252e+01,  5.048065717e+01,  5.232991147e+01,  5.424690937e+01,\n   5.623413252e+01,  5.829415347e+01,  6.042963902e+01,  6.264335367e+01,\n   6.493816316e+01,  6.731703824e+01,  6.978305849e+01,  7.233941627e+01,\n   7.498942093e+01,  7.773650302e+01,  8.058421878e+01,  8.353625470e+01,\n   8.659643234e+01,  8.976871324e+01,  9.305720409e+01,  9.646616199e+01,\n   1.000000000e+02,  1.036632928e+02,  1.074607828e+02,  1.113973860e+02,\n   1.154781985e+02,  1.197085030e+02,  1.240937761e+02,  1.286396945e+02,\n   1.333521432e+02,  1.382372227e+02,  1.433012570e+02,  1.485508017e+02,\n   1.539926526e+02,  1.596338544e+02,  1.654817100e+02,  1.715437896e+02,\n   1.778279410e+02,  1.843422992e+02,  1.910952975e+02,  1.980956779e+02,\n   2.053525026e+02,  2.128751662e+02,  2.206734069e+02,  2.287573200e+02,\n   2.371373706e+02,  2.458244069e+02,  2.548296748e+02,  2.641648320e+02,\n   2.738419634e+02,  2.838735965e+02,  2.942727176e+02,  3.050527890e+02,\n   3.162277660e+02,  3.278121151e+02,  3.398208329e+02,  3.522694651e+02,\n   3.651741273e+02,  3.785515249e+02,  3.924189758e+02,  4.067944321e+02,\n   4.216965034e+02,  4.371444813e+02,  4.531583638e+02,  4.697588817e+02,\n   4.869675252e+02,  5.048065717e+02,  5.232991147e+02,  5.424690937e+02,\n   5.623413252e+02,  5.829415347e+02,  6.042963902e+02,  6.264335367e+02,\n   6.493816316e+02,  6.731703824e+02,  6.978305849e+02,  7.233941627e+02,\n   7.498942093e+02,  7.773650302e+02,  8.058421878e+02,  8.353625470e+02,\n   8.659643234e+02,  8.976871324e+02,  9.305720409e+02,  9.646616199e+02,\n   1.000000000e+03,  1.036632928e+03,  1.074607828e+03,  1.113973860e+03,\n   1.154781985e+03,  1.197085030e+03,  1.240937761e+03,  1.286396945e+03,\n   1.333521432e+03,  1.382372227e+03,  1.433012570e+03,  1.485508017e+03,\n   1.539926526e+03,  1.596338544e+03,  1.654817100e+03,  1.715437896e+03,\n   1.778279410e+03,  1.843422992e+03,  1.910952975e+03,  1.980956779e+03,\n   2.053525026e+03,  2.128751662e+03,  2.206734069e+03,  2.287573200e+03,\n   2.371373706e+03,  2.458244069e+03,  2.548296748e+03,  2.641648320e+03,\n   2.738419634e+03,  2.838735965e+03,  2.942727176e+03,  3.050527890e+03,\n   3.162277660e+03,  3.278121151e+03,  3.398208329e+03,  3.522694651e+03,\n   3.651741273e+03,  3.785515249e+03,  3.924189758e+03,  4.067944321e+03,\n   4.216965034e+03,  4.371444813e+03,  4.531583638e+03,  4.697588817e+03,\n   4.869675252e+03,  5.048065717e+03,  5.232991147e+03,  5.424690937e+03,\n   5.623413252e+03,  5.829415347e+03,  6.042963902e+03,  6.264335367e+03,\n   6.493816316e+03,  6.731703824e+03,  6.978305849e+03,  7.233941627e+03,\n   7.498942093e+03,  7.773650302e+03,  8.058421878e+03,  8.353625470e+03,\n   8.659643234e+03,  8.976871324e+03,  9.305720409e+03,  9.646616199e+03,\n   1.000000000e+04,\n};\nconst float FLASHMEM lut_svf_shift[] = {\n   2.500000000e-01,  2.408119579e-01,  2.316544611e-01,  2.225575501e-01,\n   2.135502761e-01,  2.046602549e-01,  1.959132760e-01,  1.873329789e-01,\n   1.789406032e-01,  1.707548172e-01,  1.627916233e-01,  1.550643347e-01,\n   1.475836177e-01,  1.403575876e-01,  1.333919506e-01,  1.266901772e-01,\n   1.202537001e-01,  1.140821254e-01,  1.081734480e-01,  1.025242668e-01,\n   9.712999179e-02,  9.198504051e-02,  8.708302003e-02,  8.241689360e-02,\n   7.797913038e-02,  7.376183852e-02,  6.975688172e-02,  6.595598018e-02,\n   6.235079694e-02,  5.893301078e-02,  5.569437701e-02,  5.262677742e-02,\n   4.972226058e-02,  4.697307381e-02,  4.437168789e-02,  4.191081545e-02,\n   3.958342416e-02,  3.738274529e-02,  3.530227864e-02,  3.333579426e-02,\n   3.147733169e-02,  2.972119704e-02,  2.806195849e-02,  2.649444041e-02,\n   2.501371653e-02,  2.361510230e-02,  2.229414676e-02,  2.104662398e-02,\n   1.986852431e-02,  1.875604550e-02,  1.770558386e-02,  1.671372543e-02,\n   1.577723728e-02,  1.489305906e-02,  1.405829467e-02,  1.327020425e-02,\n   1.252619642e-02,  1.182382076e-02,  1.116076060e-02,  1.053482614e-02,\n   9.943947824e-03,  9.386169992e-03,  8.859644866e-03,  8.362626781e-03,\n   7.893466717e-03,  7.450607078e-03,  7.032576744e-03,  6.637986365e-03,\n   6.265523903e-03,  5.913950392e-03,  5.582095932e-03,  5.268855886e-03,\n   4.973187279e-03,  4.694105394e-03,  4.430680542e-03,  4.182035018e-03,\n   3.947340207e-03,  3.725813861e-03,  3.516717519e-03,  3.319354065e-03,\n   3.133065427e-03,  2.957230396e-03,  2.791262569e-03,  2.634608406e-03,\n   2.486745394e-03,  2.347180309e-03,  2.215447582e-03,  2.091107747e-03,\n   1.973745986e-03,  1.862970740e-03,  1.758412418e-03,  1.659722154e-03,\n   1.566570656e-03,  1.478647104e-03,  1.395658114e-03,  1.317326764e-03,\n   1.243391669e-03,  1.173606108e-03,  1.107737206e-03,  1.045565155e-03,\n   9.868824789e-04,  9.314933471e-04,  8.792129165e-04,  8.298667176e-04,\n   7.832900713e-04,  7.393275405e-04,  6.978324110e-04,  6.586662024e-04,\n   6.216982059e-04,  5.868050482e-04,  5.538702800e-04,  5.227839874e-04,\n   4.934424252e-04,  4.657476707e-04,  4.396072968e-04,  4.149340639e-04,\n   3.916456285e-04,  3.696642688e-04,  3.489166247e-04,  3.293334538e-04,\n   3.108493994e-04,  2.934027734e-04,  2.769353496e-04,  2.613921700e-04,\n   2.467213608e-04,  2.328739600e-04,  2.198037532e-04,  2.074671201e-04,\n   1.958228884e-04,  1.848321967e-04,  1.744583648e-04,  1.646667709e-04,\n   1.554247368e-04,  1.467014179e-04,  1.384677010e-04,  1.306961070e-04,\n   1.233606989e-04,  1.164369956e-04,  1.099018897e-04,  1.037335710e-04,\n   9.791145345e-05,  9.241610615e-05,  8.722918894e-05,  8.233339098e-05,\n   7.771237301e-05,  7.335071282e-05,  6.923385378e-05,  6.534805627e-05,\n   6.168035179e-05,  5.821849973e-05,  5.495094649e-05,  5.186678690e-05,\n   4.895572788e-05,  4.620805405e-05,  4.361459529e-05,  4.116669618e-05,\n   3.885618709e-05,  3.667535690e-05,  3.461692730e-05,  3.267402848e-05,\n   3.084017618e-05,  2.910925011e-05,  2.747547345e-05,  2.593339362e-05,\n   2.447786409e-05,  2.310402715e-05,  2.180729775e-05,  2.058334818e-05,\n   1.942809362e-05,  1.833767851e-05,  1.730846370e-05,  1.633701428e-05,\n   1.542008813e-05,  1.455462508e-05,  1.373773675e-05,  1.296669683e-05,\n   1.223893206e-05,  1.155201359e-05,  1.090364889e-05,  1.029167410e-05,\n   9.714046817e-06,  9.168839263e-06,  8.654231857e-06,  8.168507146e-06,\n   7.710044069e-06,  7.277312546e-06,  6.868868378e-06,  6.483348419e-06,\n   6.119466033e-06,  5.776006796e-06,  5.451824445e-06,  5.145837051e-06,\n   4.857023409e-06,  4.584419632e-06,  4.327115929e-06,  4.084253574e-06,\n   3.855022035e-06,  3.638656274e-06,  3.434434189e-06,  3.241674210e-06,\n   3.059733017e-06,  2.888003398e-06,  2.725912223e-06,  2.572918525e-06,\n   2.428511705e-06,  2.292209816e-06,  2.163557965e-06,  2.042126787e-06,\n   1.927511018e-06,  1.819328137e-06,  1.717217095e-06,  1.620837105e-06,\n   1.529866508e-06,  1.444001699e-06,  1.362956111e-06,  1.286459263e-06,\n   1.214255852e-06,  1.146104908e-06,  1.081778982e-06,  1.021063394e-06,\n   9.637555088e-07,  9.096640684e-07,  8.586085474e-07,  8.104185525e-07,\n   7.649332542e-07,  7.220008496e-07,  6.814780557e-07,  6.432296314e-07,\n   6.071279262e-07,  5.730524541e-07,  5.408894912e-07,  5.105316968e-07,\n   4.818777544e-07,  4.548320342e-07,  4.293042737e-07,  4.052092763e-07,\n   3.824666271e-07,  3.610004248e-07,  3.407390278e-07,  3.216148157e-07,\n   3.035639631e-07,  2.865262270e-07,  2.704447456e-07,  2.552658484e-07,\n   2.409388772e-07,  2.274160171e-07,  2.146521368e-07,  2.026046381e-07,\n   1.912333136e-07,  1.805002124e-07,  1.703695139e-07,  1.608074078e-07,\n   1.517819816e-07,  1.432631135e-07,  1.352223728e-07,  1.276329242e-07,\n   1.204694386e-07,\n};\nconst float FLASHMEM lut_stiffness[] = {\n  -6.250000000e-02, -6.152343750e-02, -6.054687500e-02, -5.957031250e-02,\n  -5.859375000e-02, -5.761718750e-02, -5.664062500e-02, -5.566406250e-02,\n  -5.468750000e-02, -5.371093750e-02, -5.273437500e-02, -5.175781250e-02,\n  -5.078125000e-02, -4.980468750e-02, -4.882812500e-02, -4.785156250e-02,\n  -4.687500000e-02, -4.589843750e-02, -4.492187500e-02, -4.394531250e-02,\n  -4.296875000e-02, -4.199218750e-02, -4.101562500e-02, -4.003906250e-02,\n  -3.906250000e-02, -3.808593750e-02, -3.710937500e-02, -3.613281250e-02,\n  -3.515625000e-02, -3.417968750e-02, -3.320312500e-02, -3.222656250e-02,\n  -3.125000000e-02, -3.027343750e-02, -2.929687500e-02, -2.832031250e-02,\n  -2.734375000e-02, -2.636718750e-02, -2.539062500e-02, -2.441406250e-02,\n  -2.343750000e-02, -2.246093750e-02, -2.148437500e-02, -2.050781250e-02,\n  -1.953125000e-02, -1.855468750e-02, -1.757812500e-02, -1.660156250e-02,\n  -1.562500000e-02, -1.464843750e-02, -1.367187500e-02, -1.269531250e-02,\n  -1.171875000e-02, -1.074218750e-02, -9.765625000e-03, -8.789062500e-03,\n  -7.812500000e-03, -6.835937500e-03, -5.859375000e-03, -4.882812500e-03,\n  -3.906250000e-03, -2.929687500e-03, -1.953125000e-03, -9.765625000e-04,\n   0.000000000e+00,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   0.000000000e+00,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   0.000000000e+00,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   0.000000000e+00,  6.029410294e-05,  3.672617230e-04,  6.835957809e-04,\n   1.009582073e-03,  1.345515115e-03,  1.691698412e-03,  2.048444725e-03,\n   2.416076364e-03,  2.794925468e-03,  3.185334315e-03,  3.587655624e-03,\n   4.002252878e-03,  4.429500650e-03,  4.869784943e-03,  5.323503537e-03,\n   5.791066350e-03,  6.272895808e-03,  6.769427226e-03,  7.281109202e-03,\n   7.808404022e-03,  8.351788076e-03,  8.911752293e-03,  9.488802580e-03,\n   1.008346028e-02,  1.069626264e-02,  1.132776331e-02,  1.197853283e-02,\n   1.264915914e-02,  1.334024813e-02,  1.405242417e-02,  1.478633069e-02,\n   1.554263074e-02,  1.632200761e-02,  1.712516545e-02,  1.795282987e-02,\n   1.880574864e-02,  1.968469234e-02,  2.059045506e-02,  2.152385512e-02,\n   2.248573583e-02,  2.347696619e-02,  2.449844176e-02,  2.555108540e-02,\n   2.663584813e-02,  2.775370999e-02,  2.890568094e-02,  3.009280173e-02,\n   3.131614488e-02,  3.257681565e-02,  3.387595299e-02,  3.521473064e-02,\n   3.659435812e-02,  3.801608189e-02,  3.948118641e-02,  4.099099536e-02,\n   4.254687278e-02,  4.415022437e-02,  4.580249868e-02,  4.750518848e-02,\n   4.925983210e-02,  5.106801479e-02,  5.293137017e-02,  5.485158172e-02,\n   5.683038428e-02,  5.886956562e-02,  6.097096806e-02,  6.313649016e-02,\n   6.536808837e-02,  6.766777886e-02,  7.003763933e-02,  7.247981084e-02,\n   7.499649981e-02,  7.758997998e-02,  8.026259446e-02,  8.301675786e-02,\n   8.585495846e-02,  8.877976048e-02,  9.179380636e-02,  9.489981918e-02,\n   9.810060511e-02,  1.013990559e-01,  1.047981517e-01,  1.083009634e-01,\n   1.119106556e-01,  1.156304895e-01,  1.194638260e-01,  1.234141283e-01,\n   1.274849653e-01,  1.316800149e-01,  1.360030671e-01,  1.404580277e-01,\n   1.450489216e-01,  1.497798965e-01,  1.546552266e-01,  1.596793166e-01,\n   1.648567056e-01,  1.701920711e-01,  1.756902336e-01,  1.813561603e-01,\n   1.871949702e-01,  1.932119385e-01,  1.994125013e-01,  2.058022605e-01,\n   2.123869891e-01,  2.191726361e-01,  2.261653322e-01,  2.333713949e-01,\n   2.407973346e-01,  2.484498605e-01,  2.563358863e-01,  2.644625367e-01,\n   2.728371538e-01,  2.814673039e-01,  2.903607839e-01,  2.995256288e-01,\n   3.089701187e-01,  3.187027863e-01,  3.287324247e-01,  3.390680953e-01,\n   3.497191360e-01,  3.606951697e-01,  3.720061128e-01,  3.836621843e-01,\n   3.956739150e-01,  4.080521572e-01,  4.208080940e-01,  4.339532500e-01,\n   4.474995013e-01,  4.614590865e-01,  4.758446177e-01,  4.906690914e-01,\n   5.059459012e-01,  5.216888491e-01,  5.379121581e-01,  5.546304856e-01,\n   5.718589358e-01,  5.896130741e-01,  6.079089407e-01,  6.267630651e-01,\n   6.461924814e-01,  6.662147434e-01,  6.868479405e-01,  7.081107139e-01,\n   7.300222738e-01,  7.526024164e-01,  7.758715422e-01,  7.998506739e-01,\n   8.245614757e-01,  8.500262730e-01,  8.762680723e-01,  9.033105820e-01,\n   9.311782340e-01,  9.598962059e-01,  9.894904431e-01,  1.000000745e+00,\n   1.000037649e+00,  1.000262504e+00,  1.000964607e+00,  1.002570034e+00,\n   1.005639154e+00,  1.010861180e+00,  1.019043988e+00,  1.031097087e+00,\n   1.048005353e+00,  1.070791059e+00,  1.100461817e+00,  1.137942574e+00,\n   1.183990632e+00,  1.239094135e+00,  1.303356514e+00,  1.376372085e+00,\n   1.457101344e+00,  1.543758274e+00,  1.633725943e+00,  1.723520185e+00,\n   1.808823654e+00,  1.884612937e+00,  1.945398753e+00,  2.000000000e+00,\n   2.000000000e+00,\n};\nconst float FLASHMEM lut_fm_frequency_quantizer[] = {\n  -1.200000000e+01, -1.200000000e+01, -1.200000000e+01, -1.184000000e+01,\n  -1.184000000e+01, -1.184000000e+01, -1.111000000e+01, -1.038000000e+01,\n  -9.650000000e+00, -8.920000000e+00, -8.190000000e+00, -7.460000000e+00,\n  -6.730000000e+00, -6.000000000e+00, -6.000000000e+00, -6.000000000e+00,\n  -5.545511612e+00, -5.091023223e+00, -4.636534835e+00, -4.182046446e+00,\n  -4.182046446e+00, -4.182046446e+00, -3.659290641e+00, -3.136534835e+00,\n  -2.613779029e+00, -2.091023223e+00, -1.568267417e+00, -1.045511612e+00,\n  -5.227558058e-01,  0.000000000e+00,  0.000000000e+00,  0.000000000e+00,\n   1.600000000e-01,  1.600000000e-01,  1.600000000e-01,  8.900000000e-01,\n   1.620000000e+00,  2.350000000e+00,  3.080000000e+00,  3.810000000e+00,\n   4.540000000e+00,  5.270000000e+00,  6.000000000e+00,  6.000000000e+00,\n   6.000000000e+00,  6.454488388e+00,  6.908976777e+00,  7.363465165e+00,\n   7.817953554e+00,  7.817953554e+00,  7.817953554e+00,  8.285529931e+00,\n   8.753106309e+00,  9.220682687e+00,  9.688259065e+00,  9.688259065e+00,\n   9.688259065e+00,  1.026619430e+01,  1.084412953e+01,  1.142206477e+01,\n   1.200000000e+01,  1.200000000e+01,  1.200000000e+01,  1.216000000e+01,\n   1.216000000e+01,  1.216000000e+01,  1.262977500e+01,  1.309955001e+01,\n   1.356932501e+01,  1.403910002e+01,  1.403910002e+01,  1.403910002e+01,\n   1.490761987e+01,  1.577613972e+01,  1.664465957e+01,  1.751317942e+01,\n   1.751317942e+01,  1.751317942e+01,  1.800000000e+01,  1.800000000e+01,\n   1.800000000e+01,  1.850977500e+01,  1.901955001e+01,  1.901955001e+01,\n   1.901955001e+01,  1.981795355e+01,  1.981795355e+01,  1.981795355e+01,\n   2.066386428e+01,  2.150977500e+01,  2.150977500e+01,  2.150977500e+01,\n   2.213233125e+01,  2.275488750e+01,  2.337744375e+01,  2.400000000e+01,\n   2.400000000e+01,  2.400000000e+01,  2.450977500e+01,  2.501955001e+01,\n   2.501955001e+01,  2.501955001e+01,  2.547403840e+01,  2.592852679e+01,\n   2.638301517e+01,  2.683750356e+01,  2.683750356e+01,  2.683750356e+01,\n   2.735032035e+01,  2.786313714e+01,  2.786313714e+01,  2.786313714e+01,\n   2.839735285e+01,  2.893156857e+01,  2.946578428e+01,  3.000000000e+01,\n   3.000000000e+01,  3.000000000e+01,  3.075000000e+01,  3.150000000e+01,\n   3.225000000e+01,  3.300000000e+01,  3.375000000e+01,  3.450000000e+01,\n   3.525000000e+01,  3.600000000e+01,  3.600000000e+01,  3.600000000e+01,\n   3.600000000e+01,\n};\n\n\nconst float* lookup_table_table[] = {\n  lut_sine,\n  lut_4_decades,\n  lut_svf_shift,\n  lut_stiffness,\n  lut_fm_frequency_quantizer,\n};\n\n\n}  // namespace rings\n"
  },
  {
    "path": "lib/rings/resources.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef RINGS_RESOURCES_H_\n#define RINGS_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace rings {\n\ntypedef uint8_t ResourceId;\n\nextern const int16_t* lookup_table_int16_table[];\n\nextern const uint32_t* lookup_table_uint32_table[];\n\nextern const float* lookup_table_table[];\n\nextern const float lut_sine[];\nextern const float lut_4_decades[];\nextern const float lut_svf_shift[];\nextern const float lut_stiffness[];\nextern const float lut_fm_frequency_quantizer[];\nconst int LUT_SINE = 0;\nconst int LUT_SINE_SIZE = 5121;\nconst int LUT_4_DECADES = 1;\nconst int LUT_4_DECADES_SIZE = 257;\nconst int LUT_SVF_SHIFT = 2;\nconst int LUT_SVF_SHIFT_SIZE = 257;\nconst int LUT_STIFFNESS = 3;\nconst int LUT_STIFFNESS_SIZE = 257;\nconst int LUT_FM_FREQUENCY_QUANTIZER = 4;\nconst int LUT_FM_FREQUENCY_QUANTIZER_SIZE = 129;\n\n}  // namespace rings\n\n#endif  // RINGS_RESOURCES_H_\n"
  },
  {
    "path": "lib/soundpipe/revsc.c",
    "content": "/*\n * RevSC\n *\n * This code has been extracted from the Csound opcode \"reverbsc\".\n * It has been modified to work as a Soundpipe module.\n *\n * Original Author(s): Sean Costello, Istvan Varga\n * Year: 1999, 2005\n * Location: Opcodes/reverbsc.c\n *\n */\n\n#include <math.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <string.h>\n#include \"revsc.h\"\n\n#define DEFAULT_SRATE   44100.0\n#define MIN_SRATE       5000.0\n#define MAX_SRATE       1000000.0\n#define MAX_PITCHMOD    20.0\n#define DELAYPOS_SHIFT  28\n#define DELAYPOS_SCALE  0x10000000\n#define DELAYPOS_MASK   0x0FFFFFFF\n\n#ifndef M_PI\n#define M_PI\t\t3.14159265358979323846\t/* pi */\n#endif\n\n/* reverbParams[n][0] = delay time (in seconds)                     */\n/* reverbParams[n][1] = random variation in delay time (in seconds) */\n/* reverbParams[n][2] = random variation frequency (in 1/sec)       */\n/* reverbParams[n][3] = random seed (0 - 32767)                     */\n\nstatic const SPFLOAT reverbParams[8][4] = {\n    { (2473.0 / DEFAULT_SRATE), 0.0010, 3.100,  1966.0 },\n    { (2767.0 / DEFAULT_SRATE), 0.0011, 3.500, 29491.0 },\n    { (3217.0 / DEFAULT_SRATE), 0.0017, 1.110, 22937.0 },\n    { (3557.0 / DEFAULT_SRATE), 0.0006, 3.973,  9830.0 },\n    { (3907.0 / DEFAULT_SRATE), 0.0010, 2.341, 20643.0 },\n    { (4127.0 / DEFAULT_SRATE), 0.0011, 1.897, 22937.0 },\n    { (2143.0 / DEFAULT_SRATE), 0.0017, 0.891, 29491.0 },\n    { (1933.0 / DEFAULT_SRATE), 0.0006, 3.221, 14417.0 }\n};\n\nstatic int delay_line_max_samples(SPFLOAT sr, SPFLOAT iPitchMod, int n);\nstatic int init_delay_line(sp_revsc *p, sp_revsc_dl *lp, int n);\nstatic int delay_line_bytes_alloc(SPFLOAT sr, SPFLOAT iPitchMod, int n);\nstatic const SPFLOAT outputGain  = 0.35;\nstatic const SPFLOAT jpScale     = 0.25;\n\nint sp_revsc_init(sp_data *sp, sp_revsc *p)\n{\n    p->iSampleRate = sp->sr;\n    p->sampleRate = sp->sr;\n    p->feedback = 0.97;\n    p->lpfreq = 10000;\n    p->iPitchMod = 1;\n    p->iSkipInit = 0;\n    p->dampFact = 1.0;\n    p->prv_LPFreq = 0.0;\n    p->initDone = 1;\n    int i, nBytes = 0;\n    for(i = 0; i < 8; i++){\n        nBytes += delay_line_bytes_alloc(sp->sr, 1, i);\n    }\n\n    if(sp->aux.size >= nBytes)\n    {\n        p->aux.ptr = sp->aux.ptr;\n        p->aux.size = nBytes;\n    }\n    else\n    {\n        return SP_NOT_OK;\n    }\n\n    nBytes = 0;\n    for (i = 0; i < 8; i++) {\n        p->delayLines[i].buf = (SPFLOAT*)((p->aux.ptr) + nBytes);\n        init_delay_line(p, &p->delayLines[i], i);\n        nBytes += delay_line_bytes_alloc(sp->sr, 1, i);\n    }\n\n    return SP_OK;\n}\n\nstatic int delay_line_max_samples(SPFLOAT sr, SPFLOAT iPitchMod, int n)\n{\n    SPFLOAT maxDel;\n\n    maxDel = reverbParams[n][0];\n    maxDel += (reverbParams[n][1] * (SPFLOAT) iPitchMod * 1.125);\n    return (int) (maxDel * sr + 16.5);\n}\n\nstatic int delay_line_bytes_alloc(SPFLOAT sr, SPFLOAT iPitchMod, int n)\n{\n    int nBytes = 0;\n\n    nBytes += (delay_line_max_samples(sr, iPitchMod, n) * (int) sizeof(SPFLOAT));\n    return nBytes;\n}\n\nstatic void next_random_lineseg(sp_revsc *p, sp_revsc_dl *lp, int n)\n{\n    SPFLOAT prvDel, nxtDel, phs_incVal;\n\n    /* update random seed */\n    if (lp->seedVal < 0)\n      lp->seedVal += 0x10000;\n    lp->seedVal = (lp->seedVal * 15625 + 1) & 0xFFFF;\n    if (lp->seedVal >= 0x8000)\n      lp->seedVal -= 0x10000;\n    /* length of next segment in samples */\n    lp->randLine_cnt = (int) ((p->sampleRate / reverbParams[n][2]) + 0.5);\n    prvDel = (SPFLOAT) lp->writePos;\n    prvDel -= ((SPFLOAT) lp->readPos\n               + ((SPFLOAT) lp->readPosFrac / (SPFLOAT) DELAYPOS_SCALE));\n    while (prvDel < 0.0)\n      prvDel += lp->bufferSize;\n    prvDel = prvDel / p->sampleRate;    /* previous delay time in seconds */\n    nxtDel = (SPFLOAT) lp->seedVal * reverbParams[n][1] / 32768.0;\n    /* next delay time in seconds */\n    nxtDel = reverbParams[n][0] + (nxtDel * (SPFLOAT) p->iPitchMod);\n    /* calculate phase increment per sample */\n    phs_incVal = (prvDel - nxtDel) / (SPFLOAT) lp->randLine_cnt;\n    phs_incVal = phs_incVal * p->sampleRate + 1.0;\n    lp->readPosFrac_inc = (int) (phs_incVal * DELAYPOS_SCALE + 0.5);\n}\n\nstatic int init_delay_line(sp_revsc *p, sp_revsc_dl *lp, int n)\n{\n    SPFLOAT readPos;\n    /* int     i; */\n\n    /* calculate length of delay line */\n    lp->bufferSize = delay_line_max_samples(p->sampleRate, 1, n);\n    lp->dummy = 0;\n    lp->writePos = 0;\n    /* set random seed */\n    lp->seedVal = (int) (reverbParams[n][3] + 0.5);\n    /* set initial delay time */\n    readPos = (SPFLOAT) lp->seedVal * reverbParams[n][1] / 32768;\n    readPos = reverbParams[n][0] + (readPos * (SPFLOAT) p->iPitchMod);\n    readPos = (SPFLOAT) lp->bufferSize - (readPos * p->sampleRate);\n    lp->readPos = (int) readPos;\n    readPos = (readPos - (SPFLOAT) lp->readPos) * (SPFLOAT) DELAYPOS_SCALE;\n    lp->readPosFrac = (int) (readPos + 0.5);\n    /* initialise first random line segment */\n    next_random_lineseg(p, lp, n);\n    /* clear delay line to zero */\n    lp->filterState = 0.0;\n    memset(lp->buf, 0, sizeof(SPFLOAT) * lp->bufferSize);\n    return SP_OK;\n}\n\n\nint sp_revsc_compute(sp_data *sp, sp_revsc *p, SPFLOAT *in1, SPFLOAT *in2, SPFLOAT *out1, SPFLOAT *out2)\n{\n    SPFLOAT ainL, ainR, aoutL, aoutR;\n    SPFLOAT vm1, v0, v1, v2, am1, a0, a1, a2, frac;\n    sp_revsc_dl *lp;\n    int readPos;\n    uint32_t n;\n    int bufferSize; /* Local copy */\n    SPFLOAT dampFact = p->dampFact;\n\n    if (p->initDone <= 0) return SP_NOT_OK;\n\n    /* calculate tone filter coefficient if frequency changed */\n\n    if (p->lpfreq != p->prv_LPFreq) {\n        p->prv_LPFreq = p->lpfreq;\n        dampFact = 2.0f - cosf(p->prv_LPFreq * (2 * M_PI) / p->sampleRate);\n        dampFact = p->dampFact = dampFact - sqrtf(dampFact * dampFact - 1.0f);\n    }\n\n    /* calculate \"resultant junction pressure\" and mix to input signals */\n\n    ainL = aoutL = aoutR = 0.0;\n    for (n = 0; n < 8; n++) {\n        ainL += p->delayLines[n].filterState;\n    }\n    ainL *= jpScale;\n    ainR = ainL + *in2;\n    ainL = ainL + *in1;\n\n    /* loop through all delay lines */\n\n    for (n = 0; n < 8; n++) {\n        lp = &p->delayLines[n];\n        bufferSize = lp->bufferSize;\n\n        /* send input signal and feedback to delay line */\n\n        lp->buf[lp->writePos] = (SPFLOAT) ((n & 1 ? ainR : ainL)\n                                 - lp->filterState);\n        if (++lp->writePos >= bufferSize) {\n            lp->writePos -= bufferSize;\n        }\n\n        /* read from delay line with cubic interpolation */\n\n        if (lp->readPosFrac >= DELAYPOS_SCALE) {\n            lp->readPos += (lp->readPosFrac >> DELAYPOS_SHIFT);\n            lp->readPosFrac &= DELAYPOS_MASK;\n        }\n        if (lp->readPos >= bufferSize)\n        lp->readPos -= bufferSize;\n        readPos = lp->readPos;\n        frac = (SPFLOAT) lp->readPosFrac * (1.0 / (SPFLOAT) DELAYPOS_SCALE);\n\n        /* calculate interpolation coefficients */\n\n        a2 = frac * frac; a2 -= 1.0; a2 *= (1.0 / 6.0);\n        a1 = frac; a1 += 1.0; a1 *= 0.5; am1 = a1 - 1.0;\n        a0 = 3.0 * a2; a1 -= a0; am1 -= a2; a0 -= frac;\n\n        /* read four samples for interpolation */\n\n        if (readPos > 0 && readPos < (bufferSize - 2)) {\n            vm1 = (SPFLOAT) (lp->buf[readPos - 1]);\n            v0  = (SPFLOAT) (lp->buf[readPos]);\n            v1  = (SPFLOAT) (lp->buf[readPos + 1]);\n            v2  = (SPFLOAT) (lp->buf[readPos + 2]);\n        }\n        else {\n\n        /* at buffer wrap-around, need to check index */\n\n        if (--readPos < 0) readPos += bufferSize;\n            vm1 = (SPFLOAT) lp->buf[readPos];\n        if (++readPos >= bufferSize) readPos -= bufferSize;\n            v0 = (SPFLOAT) lp->buf[readPos];\n        if (++readPos >= bufferSize) readPos -= bufferSize;\n            v1 = (SPFLOAT) lp->buf[readPos];\n        if (++readPos >= bufferSize) readPos -= bufferSize;\n            v2 = (SPFLOAT) lp->buf[readPos];\n        }\n        v0 = (am1 * vm1 + a0 * v0 + a1 * v1 + a2 * v2) * frac + v0;\n\n        /* update buffer read position */\n\n        lp->readPosFrac += lp->readPosFrac_inc;\n\n        /* apply feedback gain and lowpass filter */\n\n        v0 *= (SPFLOAT) p->feedback;\n        v0 = (lp->filterState - v0) * dampFact + v0;\n        lp->filterState = v0;\n\n        /* mix to output */\n\n        if (n & 1) {\n            aoutR += v0;\n        }else{\n            aoutL += v0;\n        }\n\n        /* start next random line segment if current one has reached endpoint */\n\n        if (--(lp->randLine_cnt) <= 0) {\n            next_random_lineseg(p, lp, n);\n        }\n    }\n    /* someday, use aoutR for multimono out */\n\n    *out1  = aoutL * outputGain;\n    *out2 = aoutR * outputGain;\n    return SP_OK;\n}\n"
  },
  {
    "path": "lib/soundpipe/revsc.h",
    "content": "#pragma once\n#include \"soundpipe.h\"\n\ntypedef struct {\n    int     writePos;\n    int     bufferSize;\n    int     readPos;\n    int     readPosFrac;\n    int     readPosFrac_inc;\n    int     dummy;\n    int     seedVal;\n    int     randLine_cnt;\n    SPFLOAT filterState;\n    SPFLOAT *buf;\n} sp_revsc_dl;\n\ntypedef struct  {\n    SPFLOAT feedback, lpfreq;\n    SPFLOAT iSampleRate, iPitchMod, iSkipInit;\n    SPFLOAT sampleRate;\n    SPFLOAT dampFact;\n    SPFLOAT prv_LPFreq;\n    int initDone;\n    sp_revsc_dl delayLines[8];\n    sp_auxdata aux;\n} sp_revsc;\n\nint sp_revsc_init(sp_data *sp, sp_revsc *p);\nint sp_revsc_compute(sp_data *sp, sp_revsc *p, SPFLOAT *in1, SPFLOAT *in2, SPFLOAT *out1, SPFLOAT *out2);\n"
  },
  {
    "path": "lib/soundpipe/soundpipe.c",
    "content": "#include \"soundpipe.h\"\n#include <stdlib.h>\n\nuint32_t sp_rand(sp_data *sp)\n{\n    uint32_t val = (1103515245 * sp->rand + 12345) % SP_RANDMAX;\n    sp->rand = val;\n    return val;\n}"
  },
  {
    "path": "lib/soundpipe/soundpipe.h",
    "content": "#pragma once\n\n#include <inttypes.h>\n#include <string.h>\n\ntypedef float SPFLOAT;\n#define SP_OK 1\n#define SP_NOT_OK 0\n#define SP_RANDMAX 2147483648\n\ntypedef struct sp_auxdata {\n    size_t size;\n    void *ptr;\n} sp_auxdata;\n\ntypedef struct { \n    SPFLOAT *out;\n    uint32_t sr;\n    uint32_t rand;\n    sp_auxdata aux;\n} sp_data; \n"
  },
  {
    "path": "lib/stmlib/.gitignore",
    "content": "# Precompiled python modules\n*.pyc\n\n# LaTeX compiled file\n*.pdf\n*.log\n*.aux\n\n# OS X crap\n.DS_Stor?\n"
  },
  {
    "path": "lib/stmlib/LICENSE",
    "content": "Except when noted otherwise, all code is copyright Emilie Gillet and is\nreleased under the MIT License with the following notice:\n\nCopyright 2012 Emilie Gillet.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n-------------------------------------------------------------------------------\n\nThe code in third_party/STM is from STMicroelectronics, and released with the\nfollowing notice:\n\nTHE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\nWITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.\nAS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,\nINDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE\nCONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING\nINFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\n\n-------------------------------------------------------------------------------\n\nThe code in programming/serial is from Ivan A-R, and released under the GPL with\nthe following notice:\n\nAuthor: Ivan A-R <ivan@tuxotronic.org>\nProject page: http://tuxotronic.org/wiki/projects/stm32loader\n\nThis file is part of stm32loader.\n\nstm32loader is free software; you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 3, or (at your option) any later\nversion.\n\nstm32loader is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\nfor more details.\n\nYou should have received a copy of the GNU General Public License\nalong with stm32loader; see the file COPYING3.  If not see\n<http://www.gnu.org/licenses/>."
  },
  {
    "path": "lib/stmlib/README.md",
    "content": "Mutable Instruments' project template, makefile, and libraries for STM32F\nprojects.\n\nSee LICENSE for licensing information.\n\nMore to come!"
  },
  {
    "path": "lib/stmlib/algorithms/note_stack.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Stack of currently pressed keys.\n//\n// Currently pressed keys are stored as a linked list. The linked list is used\n// as a LIFO stack to allow monosynth-like behaviour. An example of such\n// behaviour is:\n// player presses and holds C4-> C4 is played.\n// player presses and holds C5 (while holding C4) -> C5 is played.\n// player presses and holds G4 (while holding C4&C5)-> G4 is played.\n// player releases C5 -> G4 is played.\n// player releases G4 -> C4 is played.\n//\n// The nodes used in the linked list are pre-allocated from a pool of N\n// nodes, so the \"pointers\" (to the root element for example) are not actual\n// pointers, but indices of an element in the pool.\n//\n// Additionally, an array of pointers is stored to allow random access to the\n// n-th note, sorted by ascending order of pitch (for arpeggiation).\n\n#ifndef STMLIB_ALGORITHMS_NOTE_STACK_H_\n#define STMLIB_ALGORITHMS_NOTE_STACK_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n\nnamespace stmlib {\n\nenum NoteStackFlags {\n  NOTE_STACK_PRIORITY_LAST,\n  NOTE_STACK_PRIORITY_LOW,\n  NOTE_STACK_PRIORITY_HIGH,\n  NOTE_STACK_PRIORITY_FIRST,\n  NOTE_STACK_FREE_SLOT = 0xff\n};\n\nstruct NoteEntry {\n  uint8_t note;\n  uint8_t velocity;\n  uint8_t next_ptr;  // Base 1.\n};\n\ntemplate<uint8_t capacity>\nclass NoteStack {\n public: \n  NoteStack() { }\n  ~NoteStack() { }\n  \n  void Init() { Clear(); }\n\n  void NoteOn(uint8_t note, uint8_t velocity) {\n    // Remove the note from the list first (in case it is already here).\n    NoteOff(note);\n    // In case of saturation, remove the least recently played note from the\n    // stack.\n    if (size_ == capacity) {\n      uint8_t least_recent_note = 1;\n      for (uint8_t i = 1; i <= capacity; ++i) {\n        if (pool_[i].next_ptr == 0) {\n          least_recent_note = pool_[i].note;\n        }\n      }\n      NoteOff(least_recent_note);\n    }\n    // Now we are ready to insert the new note. Find a free slot to insert it.\n    uint8_t free_slot = 1;\n    for (uint8_t i = 1; i <= capacity; ++i) {\n      if (pool_[i].note == NOTE_STACK_FREE_SLOT) {\n        free_slot = i;\n        break;\n      }\n    }\n    pool_[free_slot].next_ptr = root_ptr_;\n    pool_[free_slot].note = note;\n    pool_[free_slot].velocity = velocity;\n    root_ptr_ = free_slot;\n    // The last step consists in inserting the note in the sorted list.\n    for (uint8_t i = 0; i < size_; ++i) {\n      if (pool_[sorted_ptr_[i]].note > note) {\n        for (uint8_t j = size_; j > i; --j) {\n          sorted_ptr_[j] = sorted_ptr_[j - 1];\n        }\n        sorted_ptr_[i] = free_slot;\n        free_slot = 0;\n        break;\n      }\n    }\n    if (free_slot) {\n      sorted_ptr_[size_] = free_slot;\n    }\n    ++size_;\n  }\n  \n  void NoteOff(uint8_t note) {\n    uint8_t current = root_ptr_;\n    uint8_t previous = 0;\n    while (current) {\n      if (pool_[current].note == note) {\n        break;\n      }\n      previous = current;\n      current = pool_[current].next_ptr;\n    }\n    if (current) {\n      if (previous) {\n       pool_[previous].next_ptr = pool_[current].next_ptr;\n      } else {\n        root_ptr_ = pool_[current].next_ptr;\n      }\n      for (uint8_t i = 0; i < size_; ++i) {\n        if (sorted_ptr_[i] == current) {\n          for (uint8_t j = i; j < size_ - 1; ++j) {\n            sorted_ptr_[j] = sorted_ptr_[j + 1];\n          }\n          break;\n        }\n      }\n      pool_[current].next_ptr = 0;\n      pool_[current].note = NOTE_STACK_FREE_SLOT;\n      pool_[current].velocity = 0;\n      --size_;\n    }\n  }\n  \n  void Clear() {\n    size_ = 0;\n    memset(pool_ + 1, 0, sizeof(NoteEntry) * capacity);\n    memset(sorted_ptr_ + 1, 0, capacity);\n    root_ptr_ = 0;\n    for (uint8_t i = 0; i <= capacity; ++i) {\n      pool_[i].note = NOTE_STACK_FREE_SLOT;\n    }\n  }\n\n  uint8_t size() const { return size_; }\n  uint8_t max_size() const { return capacity; }\n  const NoteEntry& most_recent_note() const { return pool_[root_ptr_]; }\n  const NoteEntry& least_recent_note() const {\n    uint8_t current = root_ptr_;\n    while (current && pool_[current].next_ptr) {\n      current = pool_[current].next_ptr;\n    }\n    return pool_[current];\n  }\n  const NoteEntry& played_note(uint8_t index) const {\n    uint8_t current = root_ptr_;\n    index = size_ - index - 1;\n    for (uint8_t i = 0; i < index; ++i) {\n      current = pool_[current].next_ptr;\n    }\n    return pool_[current];\n  }\n  const NoteEntry& sorted_note(uint8_t index) const {\n    return pool_[sorted_ptr_[index]];\n  }\n  const NoteEntry& note(uint8_t index) const { return pool_[index]; }\n  NoteEntry* mutable_note(uint8_t index) { return &pool_[index]; }\n  const NoteEntry& dummy() const { return pool_[0]; }\n  const NoteEntry& note_by_priority(NoteStackFlags priority, uint8_t index=0) {\n    if (size() <= index) {\n      return dummy();\n    }\n    switch (priority) {\n      case NOTE_STACK_PRIORITY_LAST:\n        return played_note(size() - 1 - index);\n      \n      case NOTE_STACK_PRIORITY_LOW:\n        return sorted_note(index);\n        \n      case NOTE_STACK_PRIORITY_HIGH:\n        return sorted_note(size() - 1 - index);\n\n      case NOTE_STACK_PRIORITY_FIRST:\n        return played_note(index);\n      \n      default:\n        return dummy();\n    }\n  }\n  \n private:\n  uint8_t size_;\n  NoteEntry pool_[capacity + 1];  // First element is a dummy node!\n  uint8_t root_ptr_;  // Base 1.\n  uint8_t sorted_ptr_[capacity + 1];  // Base 1.\n\n  DISALLOW_COPY_AND_ASSIGN(NoteStack);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_ALGORITHMS_NOTE_STACK_H_\n"
  },
  {
    "path": "lib/stmlib/algorithms/pattern_predictor.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Pattern predictor for synchronization to drum patterns or clocks with swing.\n\n#ifndef STMLIB_ALGORITHMS_PATTERN_PREDICTOR_H_\n#define STMLIB_ALGORITHMS_PATTERN_PREDICTOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n#include <cstdlib>\n\nnamespace stmlib {\n  \ntemplate<size_t history_size = 16, uint8_t max_candidate_period = 8>\nclass PatternPredictor {\n public: \n  PatternPredictor() { }\n\n  void Init() {\n    history_pointer_ = 0;\n    std::fill(&history_[0], &history_[history_size], 0);\n    std::fill(\n        &prediction_error_[0],\n        &prediction_error_[max_candidate_period + 1],\n        0);\n    std::fill(\n        &predicted_period_[0],\n        &predicted_period_[max_candidate_period + 1],\n        0);\n  }\n  \n  uint32_t Predict(int32_t value) {\n    history_[history_pointer_] = value;\n    int best_period = 0;\n    \n    for (int i = 0; i <= max_candidate_period; ++i) {\n      int32_t error = abs(predicted_period_[i] - value);\n      int32_t delta = error - prediction_error_[i];\n      \n      // Compute LP-ed prediction error.\n      if (delta > 0) {\n        prediction_error_[i] += delta >> 1;\n      } else {\n        prediction_error_[i] += delta >> 3;\n      }\n      \n      if (i == 0) {\n        predicted_period_[i] = (value + predicted_period_[i]) >> 1;\n      } else {\n        uint32_t t = history_pointer_ + 1 + history_size - i;\n        predicted_period_[i] = history_[t % history_size];\n      }\n      \n      if (prediction_error_[i] < prediction_error_[best_period]) {\n        best_period = i;\n      }\n    }\n\n    history_pointer_ = (history_pointer_ + 1) % history_size;\n    return static_cast<uint32_t>(predicted_period_[best_period]);\n  }\n\n\n private:\n  uint32_t history_[history_size];\n  int32_t prediction_error_[max_candidate_period + 1];\n  int32_t predicted_period_[max_candidate_period + 1];\n  uint32_t history_pointer_;\n\n  DISALLOW_COPY_AND_ASSIGN(PatternPredictor);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_ALGORITHMS_PATTERN_PREDICTOR_H_\n"
  },
  {
    "path": "lib/stmlib/algorithms/tiny_map.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A rather inefficient (lookup and insertion in O(n)) map. Useful for storing\n// very small mappings (say about 16 values).\n\n#ifndef STMLIB_ALGORITHMS_TINY_MAP_H_\n#define STMLIB_ALGORITHMS_TINY_MAP_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n\nnamespace stmlib {\n\ntemplate<\n    typename Key,\n    typename Value,\n    uint8_t capacity,\n    uint8_t EMPTY = 0xff>\nclass TinyMap {\n public:\n  struct Entry {\n    Key key;\n    Value value;\n  };\n  \n  TinyMap() { }\n  ~TinyMap() { }\n    \n  void Init() {\n    Clear();\n  }\n  \n  void Put(Key key, Value value) {\n    Entry* entry = Search(key);\n    if (entry == NULL) {\n      entry = SearchFreeSlot();\n    }\n    if (entry == NULL) {\n      entry = &map_[0];\n    }\n    entry->key = key;\n    entry->value = value;\n    // Speed up retrieval for next query, in the very common case that when\n    // element is inserted, the next query is for this same element.\n    if (value != EMPTY) {\n      recent_search_ = entry;\n    } else {\n      recent_delete_ = entry;\n    }\n  }\n  \n  const Entry* Find(uint8_t key) {\n    return Search(key);\n  }\n\n  void Clear() {\n    memset(map_, EMPTY, capacity * sizeof(Entry));\n    recent_search_ = recent_delete_ = &map_[0];\n  }\n\n private:\n  Entry* Search(Key key) {\n    if (recent_search_->key == key) {\n      return recent_search_;\n    }\n    for (uint8_t i = 0; i < capacity; ++i) {\n      if (map_[i].key == key) {\n        recent_search_ = &map_[i];\n        return recent_search_;\n      }\n    }\n    return NULL;\n  }\n  \n  Entry* SearchFreeSlot() {\n    if (recent_delete_->value == EMPTY) {\n      return recent_delete_;\n    }\n    for (uint8_t i = 0; i < capacity; ++i) {\n      if (map_[i].value == EMPTY) {\n        recent_delete_ = &map_[i];\n        return recent_delete_;\n      }\n    }\n    return NULL;\n  }\n   \n  Entry map_[capacity];\n  Entry* recent_search_;\n  Entry* recent_delete_;\n  DISALLOW_COPY_AND_ASSIGN(TinyMap);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_ALGORITHMS_TINY_MAP_H_\n"
  },
  {
    "path": "lib/stmlib/algorithms/voice_allocator.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Polyphonic voice allocator.\n\n#ifndef STMLIB_ALGORITHMS_VOICE_ALLOCATOR_H_\n#define STMLIB_ALGORITHMS_VOICE_ALLOCATOR_H_\n\n#include \"stmlib/stmlib.h\"\n#include <cstring>\n\nnamespace stmlib {\n\nenum VoiceAllocatorFlags {\n  NOT_ALLOCATED = 0xff,\n  ACTIVE_NOTE = 0x80\n};\n\nenum VoiceStealingMode {\n  VOICE_STEALING_MODE_LRU,\n  VOICE_STEALING_MODE_MRU\n};\n\ntemplate<uint8_t capacity>\nclass VoiceAllocator {\n public: \n  VoiceAllocator() { }\n\n  void Init() {\n    size_ = 0;\n    Clear();\n  }\n  \n  uint8_t NoteOn(uint8_t note) {\n    return NoteOn(note, VOICE_STEALING_MODE_LRU);\n  }\n\n  uint8_t NoteOn(uint8_t note, VoiceStealingMode voice_stealing_mode) {\n    if (size_ == 0) {\n      return NOT_ALLOCATED;\n    }\n\n    // First, check if there is a voice currently playing this note. In this\n    // case, this voice will be responsible for retriggering this note.\n    // Hint: if you're more into string instruments than keyboard instruments,\n    // you can safely comment those lines.\n    uint8_t voice = Find(note);\n\n    // Then, try to find the least recently touched, currently inactive voice.\n    if (voice == NOT_ALLOCATED) {\n      for (uint8_t i = 0; i < capacity; ++i) {\n        if (lru_[i] < size_ && !(pool_[lru_[i]] & ACTIVE_NOTE)) {\n          voice = lru_[i];\n        }\n      }\n    }\n    // If all voices are active, use the least or most recently played note\n    // (voice-stealing).\n    if (voice == NOT_ALLOCATED) {\n      for (uint8_t i = 0; i < capacity; ++i) {\n        uint8_t candidate = voice_stealing_mode == VOICE_STEALING_MODE_LRU\n            ? i\n            : capacity - 1 - i;\n        if (lru_[candidate] < size_) {\n          voice = lru_[candidate];\n        }\n      }\n    }\n    pool_[voice] = note | ACTIVE_NOTE;\n    Touch(voice);\n    return voice;\n  }\n\n  uint8_t NoteOff(uint8_t note) {\n    uint8_t voice = Find(note);\n    if (voice != NOT_ALLOCATED) {\n      pool_[voice] &= 0x7f;\n      Touch(voice);\n    }\n    return voice;\n  }\n\n  uint8_t Find(uint8_t note) const {\n    for (uint8_t i = 0; i < size_; ++i) {\n      if ((pool_[i] & 0x7f) == note) {\n        return i;\n      }\n    }\n    return NOT_ALLOCATED;\n  }\n\n  void Clear() {\n    memset(&pool_, 0, sizeof(pool_));\n    for (uint8_t i = 0; i < capacity; ++i) {\n      lru_[i] = capacity - i - 1;\n    }\n  }\n\n  inline void ClearNotes() {\n    for (uint8_t i = 0; i < capacity; ++i) {\n      pool_[i] &= 0x7f;\n    }\n  }\n\n  inline void set_size(uint8_t size) {\n    size_ = size;\n  }\n\n  inline uint8_t size() const { return size_; }\n\n private:\n  void Touch(uint8_t voice) {\n    int8_t source = capacity - 1;\n    int8_t destination = capacity - 1;\n    while (source >= 0) {\n      if (lru_[source] != voice) {\n        lru_[destination--] = lru_[source];\n      }\n      --source;\n    }\n    lru_[0] = voice;\n  }\n   \n  uint8_t pool_[capacity];\n  // Holds the indices of the voices sorted by most recent usage.\n  uint8_t lru_[capacity];\n  uint8_t size_;\n\n  DISALLOW_COPY_AND_ASSIGN(VoiceAllocator);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_ALGORITHMS_VOICE_ALLOCATOR_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/atan.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Fast arc-tangent routines.\n\n#include \"stmlib/dsp/atan.h\"\n\nnamespace stmlib {\n\n/* extern */\nconst uint16_t atan_lut[513] = {\n      0,    20,    40,    61,    81,   101,   122,   142, \n    162,   183,   203,   224,   244,   264,   285,   305, \n    326,   346,   366,   387,   407,   427,   448,   468, \n    489,   509,   529,   550,   570,   591,   611,   631, \n    652,   672,   693,   713,   733,   754,   774,   795, \n    815,   836,   856,   877,   897,   917,   938,   958, \n    979,   999,  1020,  1040,  1061,  1081,  1102,  1122, \n   1143,  1163,  1184,  1204,  1225,  1245,  1266,  1286, \n   1307,  1327,  1348,  1368,  1389,  1409,  1430,  1451, \n   1471,  1492,  1512,  1533,  1554,  1574,  1595,  1615, \n   1636,  1657,  1677,  1698,  1719,  1739,  1760,  1780, \n   1801,  1822,  1843,  1863,  1884,  1905,  1925,  1946, \n   1967,  1988,  2008,  2029,  2050,  2071,  2091,  2112, \n   2133,  2154,  2175,  2195,  2216,  2237,  2258,  2279, \n   2300,  2321,  2342,  2362,  2383,  2404,  2425,  2446, \n   2467,  2488,  2509,  2530,  2551,  2572,  2593,  2614, \n   2635,  2656,  2677,  2698,  2719,  2740,  2761,  2783, \n   2804,  2825,  2846,  2867,  2888,  2910,  2931,  2952, \n   2973,  2994,  3016,  3037,  3058,  3079,  3101,  3122, \n   3143,  3165,  3186,  3207,  3229,  3250,  3272,  3293, \n   3315,  3336,  3357,  3379,  3400,  3422,  3443,  3465, \n   3487,  3508,  3530,  3551,  3573,  3595,  3616,  3638, \n   3660,  3681,  3703,  3725,  3747,  3768,  3790,  3812, \n   3834,  3856,  3877,  3899,  3921,  3943,  3965,  3987, \n   4009,  4031,  4053,  4075,  4097,  4119,  4141,  4163, \n   4185,  4207,  4230,  4252,  4274,  4296,  4318,  4341, \n   4363,  4385,  4408,  4430,  4452,  4475,  4497,  4520, \n   4542,  4565,  4587,  4610,  4632,  4655,  4677,  4700, \n   4723,  4745,  4768,  4791,  4813,  4836,  4859,  4882, \n   4905,  4927,  4950,  4973,  4996,  5019,  5042,  5065, \n   5088,  5111,  5134,  5158,  5181,  5204,  5227,  5250, \n   5274,  5297,  5320,  5344,  5367,  5390,  5414,  5437, \n   5461,  5484,  5508,  5532,  5555,  5579,  5603,  5626, \n   5650,  5674,  5698,  5721,  5745,  5769,  5793,  5817, \n   5841,  5865,  5889,  5914,  5938,  5962,  5986,  6010, \n   6035,  6059,  6084,  6108,  6132,  6157,  6181,  6206, \n   6231,  6255,  6280,  6305,  6330,  6354,  6379,  6404, \n   6429,  6454,  6479,  6504,  6529,  6554,  6580,  6605, \n   6630,  6656,  6681,  6706,  6732,  6757,  6783,  6809, \n   6834,  6860,  6886,  6912,  6937,  6963,  6989,  7015, \n   7041,  7068,  7094,  7120,  7146,  7173,  7199,  7225, \n   7252,  7278,  7305,  7332,  7358,  7385,  7412,  7439, \n   7466,  7493,  7520,  7547,  7574,  7602,  7629,  7656, \n   7684,  7711,  7739,  7767,  7795,  7822,  7850,  7878, \n   7906,  7934,  7962,  7991,  8019,  8047,  8076,  8104, \n   8133,  8162,  8190,  8219,  8248,  8277,  8306,  8335, \n   8365,  8394,  8423,  8453,  8483,  8512,  8542,  8572, \n   8602,  8632,  8662,  8692,  8723,  8753,  8784,  8814, \n   8845,  8876,  8907,  8938,  8969,  9000,  9032,  9063, \n   9095,  9127,  9158,  9190,  9223,  9255,  9287,  9319, \n   9352,  9385,  9418,  9451,  9484,  9517,  9550,  9584, \n   9617,  9651,  9685,  9719,  9753,  9788,  9822,  9857, \n   9892,  9927,  9962,  9998, 10033, 10069, 10105, 10141, \n  10177, 10213, 10250, 10287, 10324, 10361, 10399, 10436, \n  10474, 10512, 10550, 10589, 10628, 10667, 10706, 10745, \n  10785, 10825, 10865, 10906, 10946, 10988, 11029, 11070, \n  11112, 11155, 11197, 11240, 11283, 11327, 11371, 11415, \n  11460, 11505, 11550, 11596, 11642, 11688, 11736, 11783, \n  11831, 11879, 11928, 11978, 12028, 12078, 12129, 12181, \n  12233, 12286, 12340, 12394, 12449, 12505, 12561, 12618, \n  12676, 12735, 12795, 12856, 12918, 12981, 13045, 13111, \n  13177, 13245, 13315, 13386, 13459, 13533, 13610, 13688, \n  13769, 13853, 13939, 14028, 14121, 14218, 14319, 14425, \n  14537, 14657, 14785, 14925, 15079, 15254, 15461, 15731, \n  16383,\n};\n\n// Generated with:\n// static void init_atan_lut() {\n//   for (size_t i = 0; i < 513; ++i) {\n//     atan_lut[i] = 65536.0 / (2 * M_PI) * asinf(i / 512.0f);\n//     printf(\"%5d, \", atan_lut[i]);\n//     if (i % 8 == 7) {\n//       printf(\"\\n\");\n//     }\n//   }\n//   printf(\"\\n\");\n// }\n\n}  // namespace stmlib\n"
  },
  {
    "path": "lib/stmlib/dsp/atan.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Fast arc-tangent routines.\n\n#ifndef STMLIB_DSP_ATAN_H_\n#define STMLIB_DSP_ATAN_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"stmlib/dsp/rsqrt.h\"\n\n#include <cmath>\n\nnamespace stmlib {\n\nstatic inline uint16_t fast_atan2(float y, float x) {\n  static const uint32_t sign_mask = 0x80000000;\n  static const float b = 0.596227f;\n  uint32_t ux_s = sign_mask & unsafe_bit_cast<uint32_t, float>(x);\n  uint32_t uy_s = sign_mask & unsafe_bit_cast<uint32_t, float>(y);\n  uint32_t offset = ((~ux_s & uy_s) >> 29 | ux_s >> 30) << 14;\n  float bxy_a = fabsf(b * x * y);\n  float num = bxy_a + y * y;\n  float atan_1q = num / (x * x + bxy_a + num);\n  uint32_t uatan_2q = (ux_s ^ uy_s) | unsafe_bit_cast<uint32_t, float>(atan_1q);\n  return unsafe_bit_cast<float, uint32_t>(uatan_2q) * 16384 + offset;\n} \n\nextern const uint16_t atan_lut[513];\n\nstatic inline uint16_t fast_atan2r(float y, float x, float* r) {\n  float squared_magnitude = x * x + y * y;\n  if (squared_magnitude == 0.0f) {\n    *r = 0.0f;\n    return 0.0f;\n  }\n  float rinv = fast_rsqrt_carmack(squared_magnitude);\n  *r = rinv * squared_magnitude;\n\n  static const uint32_t sign_mask = 0x80000000;\n  uint32_t ux_s = sign_mask & unsafe_bit_cast<uint32_t, float>(x);\n  uint32_t uy_s = sign_mask & unsafe_bit_cast<uint32_t, float>(y);\n  uint32_t quadrant = ((~ux_s & uy_s) >> 29 | ux_s >> 30);\n  uint16_t angle = 0;\n  x = fabsf(x);\n  y = fabsf(y);\n  if (y > x) {\n    angle = 16384 - atan_lut[static_cast<uint32_t>(x * rinv * 512.0f + 0.5f)];\n  } else {\n    angle = atan_lut[static_cast<uint32_t>(y * rinv * 512.0f + 0.5f)];\n  }\n  if (ux_s ^ uy_s) {\n    angle = -angle;\n  }\n  return angle + (quadrant << 14);\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_ATAN_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/atan_approximations.py",
    "content": "import numpy\nimport pylab\n\ndef dumb(f):\n  return f * numpy.pi\n\ndef pade(f):\n  return f * -0.90585 / (-0.28833 + f * f)\n\ndef poly3taylor(f):\n  fsq = f * f\n  r = 0.3333333 * numpy.pi ** 3\n  r *= fsq\n  r += numpy.pi\n  r *= f\n  return r\n\ndef poly3gradient(f, a=3.736e-01):\n  fsq = f * f\n  r = a * numpy.pi ** 3\n  r *= fsq\n  r += numpy.pi\n  r *= f\n  return r\n\n\ndef poly5mdsp(f, a=3.1755e-01, b=2.033e-01):\n  fsq = f * f\n  r = b * numpy.pi ** 5\n  r *= fsq\n  r += a * numpy.pi ** 3\n  r *= fsq\n  r += numpy.pi\n  r *= f\n  return r\n\n\ndef poly5gradient(f, a=3.260e-01, b=1.823e-01):\n  f = f * numpy.pi\n  fsq = f * f\n  r = b\n  r *= fsq\n  r += a\n  r *= fsq\n  r += 1.0\n  r *= f\n  return r\n\n\ndef poly11mdsp(f):\n  fsq = f * f\n  r = 9.5168091e-03 * numpy.pi ** 11\n  r *= fsq\n  r += 2.900525e-03 * numpy.pi ** 9\n  r *= fsq\n  r += 5.33740603e-02 * numpy.pi **7\n  r *= fsq\n  r += 1.333923995e-01 * numpy.pi **5\n  r *= fsq\n  r += 3.333314036e-01 * numpy.pi **3\n  r *= fsq\n  r += numpy.pi\n  r *= f\n  return r\n\n\ndef compute_filter_settings(cutoff, resonance):\n  g = numpy.tan(numpy.pi * cutoff) + resonance * 0\n  r = 1.0 / resonance + cutoff * 0\n  h = 1 / (1 + r * g + g * g)\n  return g, r, h\n\n\ndef evaluate(groundtruth_f, approximate_g):\n  approximate_f = numpy.arctan(approximate_g) / numpy.pi\n  return numpy.log2(approximate_f / groundtruth_f) * 1200.0\n\n  \nf = numpy.exp(numpy.linspace(numpy.log(16), numpy.log(10000), 1000.0))\nf /= 48000.0\ng, _, _ = compute_filter_settings(f, 0.5)\napproximations = [pade, poly3gradient, poly5mdsp, poly5gradient, poly11mdsp]\n#\n# a_ = numpy.linspace(3.259e-01, 3.261e-01, 100)\n# b_ = numpy.linspace(1.822e-01, 1.823e-01, 100)\n# error = numpy.zeros((100, 100))\n# best = 1e8\n# arg_best = None\n# for i, a in enumerate(a_):\n#   for j, b in enumerate(b_):\n#     error[i, j] = (evaluate(f, fast0(f, a, b)) ** 2).sum()\n#     if error[i, j] < best:\n#       best = error[i, j]\n#       arg_best = (a, b)\n#\n# print arg_best\n# pylab.plot(coefficient, error)\n# pylab.show()\n\npylab.figure(figsize=(15,10))\nfor i, a in enumerate(approximations):\n  n = len(approximations)\n  # pylab.subplot(n * 100 + 10 + i + 1)\n  pylab.plot(f * 48000, evaluate(f, a(f)))\n  pylab.xlabel('Hz')\n  pylab.ylabel('$\\delta$ cents')\n\npylab.legend(map(lambda x: x.__name__, approximations))\npylab.tight_layout()\n#pylab.savefig('plot.pdf')\npylab.show()\n"
  },
  {
    "path": "lib/stmlib/dsp/cosine_oscillator.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Cosine oscillator. Generates a cosine between 0.0 and 1.0 with minimal\n// CPU use.\n\n#ifndef STMLIB_DSP_COSINE_OSCILLATOR_H_\n#define STMLIB_DSP_COSINE_OSCILLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cmath>\n\nnamespace stmlib {\n\nenum CosineOscillatorMode {\n  COSINE_OSCILLATOR_APPROXIMATE,\n  COSINE_OSCILLATOR_EXACT\n};\n\nclass CosineOscillator {\n public:\n  CosineOscillator() { }\n  ~CosineOscillator() { }\n\n  template<CosineOscillatorMode mode>\n  inline void Init(float frequency) {\n    if (mode == COSINE_OSCILLATOR_APPROXIMATE) {\n      InitApproximate(frequency);\n    } else {\n      iir_coefficient_ = 2.0f * cosf(2.0f * float(M_PI) * frequency);\n      initial_amplitude_ = iir_coefficient_ * 0.25f;\n    }\n    Start();\n  }\n  \n  inline void InitApproximate(float frequency) {\n    float sign = 16.0f;\n    frequency -= 0.25f;\n    if (frequency < 0.0f) {\n      frequency = -frequency;\n    } else {\n      if (frequency > 0.5f) {\n        frequency -= 0.5f;\n      } else {\n        sign = -16.0f;\n      }\n    }\n    iir_coefficient_ = sign * frequency * (1.0f - 2.0f * frequency);\n    initial_amplitude_ = iir_coefficient_ * 0.25f;\n  }\n  \n  inline void Start() {\n    y1_ = initial_amplitude_;\n    y0_ = 0.5f;\n  }\n  \n  inline float value() const {\n    return y1_ + 0.5f;\n  }\n\n  inline float Next() {\n    float temp = y0_;\n    y0_ = iir_coefficient_ * y0_ - y1_;\n    y1_ = temp;\n    return temp + 0.5f;\n  }\n  \n private:\n  float y1_;\n  float y0_;\n  float iir_coefficient_;\n  float initial_amplitude_;\n\n  DISALLOW_COPY_AND_ASSIGN(CosineOscillator);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_COSINE_OSCILLATOR_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/delay_line.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Delay line.\n\n#ifndef STMLIB_DSP_DELAY_LINE_H_\n#define STMLIB_DSP_DELAY_LINE_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/dsp/dsp.h\"\n\n#include <algorithm>\n\nnamespace stmlib {\n\ntemplate<typename T, size_t max_delay>\nclass DelayLine {\n public:\n  DelayLine() { }\n  ~DelayLine() { }\n  \n  void Init() {\n    Reset();\n  }\n\n  void Reset() {\n    std::fill(&line_[0], &line_[max_delay], T(0));\n    delay_ = 1;\n    write_ptr_ = 0;\n  }\n  \n  inline void set_delay(size_t delay) {\n    delay_ = delay;\n  }\n\n  inline void Write(const T sample) {\n    line_[write_ptr_] = sample;\n    write_ptr_ = (write_ptr_ - 1 + max_delay) % max_delay;\n  }\n  \n  inline const T Allpass(const T sample, size_t delay, const T coefficient) {\n    T read = line_[(write_ptr_ + delay) % max_delay];\n    T write = sample + coefficient * read;\n    Write(write);\n    return -write * coefficient + read;\n  }\n\n  inline const T WriteRead(const T sample, float delay) {\n    Write(sample);\n    return Read(delay);\n  }\n  \n  inline const T Read() const {\n    return line_[(write_ptr_ + delay_) % max_delay];\n  }\n  \n  inline const T Read(size_t delay) const {\n    return line_[(write_ptr_ + delay) % max_delay];\n  }\n\n  inline const T Read(float delay) const {\n    MAKE_INTEGRAL_FRACTIONAL(delay)\n    const T a = line_[(write_ptr_ + delay_integral) % max_delay];\n    const T b = line_[(write_ptr_ + delay_integral + 1) % max_delay];\n    return a + (b - a) * delay_fractional;\n  }\n  \n  inline const T ReadHermite(float delay) const {\n    MAKE_INTEGRAL_FRACTIONAL(delay)\n    int32_t t = (write_ptr_ + delay_integral + max_delay);\n    const T xm1 = line_[(t - 1) % max_delay];\n    const T x0 = line_[(t) % max_delay];\n    const T x1 = line_[(t + 1) % max_delay];\n    const T x2 = line_[(t + 2) % max_delay];\n    const float c = (x1 - xm1) * 0.5f;\n    const float v = x0 - x1;\n    const float w = c + v;\n    const float a = w + v + (x2 - x0) * 0.5f;\n    const float b_neg = w + a;\n    const float f = delay_fractional;\n    return (((a * f) - b_neg) * f + c) * f + x0;\n  }\n\n private:\n  size_t write_ptr_;\n  size_t delay_;\n  T line_[max_delay];\n  \n  DISALLOW_COPY_AND_ASSIGN(DelayLine);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_DELAY_LINE_H_\n\n\n\n\n"
  },
  {
    "path": "lib/stmlib/dsp/dsp.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// DSP utility routines.\n\n#ifndef STMLIB_UTILS_DSP_DSP_H_\n#define STMLIB_UTILS_DSP_DSP_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cmath>\n#include <math.h>\n\nnamespace stmlib {\n\n#define MAKE_INTEGRAL_FRACTIONAL(x) \\\n  int32_t x ## _integral = static_cast<int32_t>(x); \\\n  float x ## _fractional = x - static_cast<float>(x ## _integral);\n\ninline float Interpolate(const float* table, float index, float size) {\n  index *= size;\n  MAKE_INTEGRAL_FRACTIONAL(index)\n  float a = table[index_integral];\n  float b = table[index_integral + 1];\n  return a + (b - a) * index_fractional;\n}\n\n\ninline float InterpolateHermite(const float* table, float index, float size) {\n  index *= size;\n  MAKE_INTEGRAL_FRACTIONAL(index)\n  const float xm1 = table[index_integral - 1];\n  const float x0 = table[index_integral + 0];\n  const float x1 = table[index_integral + 1];\n  const float x2 = table[index_integral + 2];\n  const float c = (x1 - xm1) * 0.5f;\n  const float v = x0 - x1;\n  const float w = c + v;\n  const float a = w + v + (x2 - x0) * 0.5f;\n  const float b_neg = w + a;\n  const float f = index_fractional;\n  return (((a * f) - b_neg) * f + c) * f + x0;\n}\n\ninline float InterpolateWrap(const float* table, float index, float size) {\n  index -= static_cast<float>(static_cast<int32_t>(index));\n  index *= size;\n  MAKE_INTEGRAL_FRACTIONAL(index)\n  float a = table[index_integral];\n  float b = table[index_integral + 1];\n  return a + (b - a) * index_fractional;\n}\n\ninline float SmoothStep(float value) {\n  return value * value * (3.0f - 2.0f * value);\n}\n\n#define ONE_POLE(out, in, coefficient) out += (coefficient) * ((in) - out);\n#define SLOPE(out, in, positive, negative) { \\\n  float error = (in) - out; \\\n  out += (error > 0 ? positive : negative) * error; \\\n}\n#define SLEW(out, in, delta) { \\\n  float error = (in) - out; \\\n  float d = (delta); \\\n  if (error > d) { \\\n    error = d; \\\n  } else if (error < -d) { \\\n    error = -d; \\\n  } \\\n  out += error; \\\n}\n\ninline float Crossfade(float a, float b, float fade) {\n  return a + (b - a) * fade;\n}\n\ninline float SoftLimit(float x) {\n  return x * (27.0f + x * x) / (27.0f + 9.0f * x * x);\n}\n\ninline float SoftClip(float x) {\n  if (x < -3.0f) {\n    return -1.0f;\n  } else if (x > 3.0f) {\n    return 1.0f;\n  } else {\n    return SoftLimit(x);\n  }\n}\n\n#ifdef TEST\n  inline int32_t Clip16(int32_t x) {\n    if (x < -32768) {\n      return -32768;\n    } else if (x > 32767) {\n      return 32767;\n    } else {\n      return x;\n    }\n  }\n  inline uint16_t ClipU16(int32_t x) {\n    if (x < 0) {\n      return 0;\n    } else if (x > 65535) {\n      return 65535;\n    } else {\n      return x;\n    }\n  }\n#else\n  inline int32_t Clip16(int32_t x) {\n    int32_t result;\n    __asm (\"ssat %0, %1, %2\" : \"=r\" (result) :  \"I\" (16), \"r\" (x) );\n    return result;\n  }\n  inline uint32_t ClipU16(int32_t x) {\n    uint32_t result;\n    __asm (\"usat %0, %1, %2\" : \"=r\" (result) :  \"I\" (16), \"r\" (x) );\n    return result;\n  }\n#endif\n  \n#ifdef TEST\n  inline float Sqrt(float x) {\n    return sqrtf(x);\n  }\n#else\n  inline float Sqrt(float x) {\n    float result;\n    __asm (\"vsqrt.f32 %0, %1\" : \"=w\" (result) : \"w\" (x) );\n    return result;\n  }\n#endif\n\ninline int16_t SoftConvert(float x) {\n  return Clip16(static_cast<int32_t>(SoftLimit(x * 0.5f) * 32768.0f));\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_UTILS_DSP_DSP_H_"
  },
  {
    "path": "lib/stmlib/dsp/filter.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Zero-delay-feedback filters (one pole and SVF).\n// Naive SVF.\n\n#ifndef STMLIB_DSP_FILTER_H_\n#define STMLIB_DSP_FILTER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cmath>\n#include <algorithm>\n\nnamespace stmlib {\n\nenum FilterMode {\n  FILTER_MODE_LOW_PASS,\n  FILTER_MODE_BAND_PASS,\n  FILTER_MODE_BAND_PASS_NORMALIZED,\n  FILTER_MODE_HIGH_PASS\n};\n\nenum FrequencyApproximation {\n  FREQUENCY_EXACT,\n  FREQUENCY_ACCURATE,\n  FREQUENCY_FAST,\n  FREQUENCY_DIRTY\n};\n\n#define M_PI_F float(M_PI)\n#define M_PI_POW_2 M_PI * M_PI\n#define M_PI_POW_3 M_PI_POW_2 * M_PI\n#define M_PI_POW_5 M_PI_POW_3 * M_PI_POW_2\n#define M_PI_POW_7 M_PI_POW_5 * M_PI_POW_2\n#define M_PI_POW_9 M_PI_POW_7 * M_PI_POW_2\n#define M_PI_POW_11 M_PI_POW_9 * M_PI_POW_2\n\nclass DCBlocker {\n public:\n  DCBlocker() { }\n  ~DCBlocker() { }\n  \n  void Init(float pole) {\n    x_ = 0.0f;\n    y_ = 0.0f;\n    pole_ = pole;\n  }\n  \n  inline void Process(float* in_out, size_t size) {\n    float x = x_;\n    float y = y_;\n    const float pole = pole_;\n    while (size--) {\n      float old_x = x;\n      x = *in_out;\n      *in_out++ = y = y * pole + x - old_x;\n    }\n    x_ = x;\n    y_ = y;\n  }\n  \n private:\n  float pole_;\n  float x_;\n  float y_;\n};\n\nclass OnePole {\n public:\n  OnePole() { }\n  ~OnePole() { }\n  \n  void Init() {\n    set_f<FREQUENCY_DIRTY>(0.01f);\n    Reset();\n  }\n  \n  void Reset() {\n    state_ = 0.0f;\n  }\n  \n  template<FrequencyApproximation approximation>\n  static inline float tan(float f) {\n    if (approximation == FREQUENCY_EXACT) {\n      // Clip coefficient to about 100.\n      f = f < 0.497f ? f : 0.497f;\n      return tanf(M_PI_F * f);\n    } else if (approximation == FREQUENCY_DIRTY) {\n      // Optimized for frequencies below 8kHz.\n      const float a = 3.736e-01f * M_PI_POW_3;\n      return f * (M_PI_F + a * f * f);\n    } else if (approximation == FREQUENCY_FAST) {\n      // The usual tangent approximation uses 3.1755e-01 and 2.033e-01, but\n      // the coefficients used here are optimized to minimize error for the\n      // 16Hz to 16kHz range, with a sample rate of 48kHz.\n      const float a = 3.260e-01f * M_PI_POW_3;\n      const float b = 1.823e-01f * M_PI_POW_5;\n      float f2 = f * f;\n      return f * (M_PI_F + f2 * (a + b * f2));\n    } else if (approximation == FREQUENCY_ACCURATE) {\n      // These coefficients don't need to be tweaked for the audio range.\n      const float a = 3.333314036e-01f * M_PI_POW_3;\n      const float b = 1.333923995e-01f * M_PI_POW_5;\n      const float c = 5.33740603e-02f * M_PI_POW_7;\n      const float d = 2.900525e-03f * M_PI_POW_9;\n      const float e = 9.5168091e-03f * M_PI_POW_11;\n      float f2 = f * f;\n      return f * (M_PI_F + f2 * (a + f2 * (b + f2 * (c + f2 * (d + f2 * e)))));\n    }\n  }\n  \n  // Set frequency and resonance from true units. Various approximations\n  // are available to avoid the cost of tanf.\n  template<FrequencyApproximation approximation>\n  inline void set_f(float f) {\n    g_ = tan<approximation>(f);\n    gi_ = 1.0f / (1.0f + g_);\n  }\n  \n  template<FilterMode mode>\n  inline float Process(float in) {\n    float lp;\n    lp = (g_ * in + state_) * gi_;\n    state_ = g_ * (in - lp) + lp;\n\n    if (mode == FILTER_MODE_LOW_PASS) {\n      return lp;\n    } else if (mode == FILTER_MODE_HIGH_PASS) {\n      return in - lp;\n    } else {\n      return 0.0f;\n    }\n  }\n  \n  template<FilterMode mode>\n  inline void Process(float* in_out, size_t size) {\n    while (size--) {\n      *in_out = Process<mode>(*in_out);\n      ++in_out;\n    }\n  }\n  \n private:\n  float g_;\n  float gi_;\n  float state_;\n  \n  DISALLOW_COPY_AND_ASSIGN(OnePole);\n};\n\n\n\nclass Svf {\n public:\n  Svf() { }\n  ~Svf() { }\n  \n  void Init() {\n    set_f_q<FREQUENCY_DIRTY>(0.01f, 100.0f);\n    Reset();\n  }\n  \n  void Reset() {\n    state_1_ = state_2_ = 0.0f;\n  }\n  \n  // Copy settings from another filter.\n  inline void set(const Svf& f) {\n    g_ = f.g();\n    r_ = f.r();\n    h_ = f.h();\n  }\n\n  // Set all parameters from LUT.\n  inline void set_g_r_h(float g, float r, float h) {\n    g_ = g;\n    r_ = r;\n    h_ = h;\n  }\n  \n  // Set frequency and resonance coefficients from LUT, adjust remaining\n  // parameter.\n  inline void set_g_r(float g, float r) {\n    g_ = g;\n    r_ = r;\n    h_ = 1.0f / (1.0f + r_ * g_ + g_ * g_);\n  }\n\n  // Set frequency from LUT, resonance in true units, adjust the rest.\n  inline void set_g_q(float g, float resonance) {\n    g_ = g;\n    r_ = 1.0f / resonance;\n    h_ = 1.0f / (1.0f + r_ * g_ + g_ * g_);\n  }\n\n  // Set frequency and resonance from true units. Various approximations\n  // are available to avoid the cost of tanf.\n  template<FrequencyApproximation approximation>\n  inline void set_f_q(float f, float resonance) {\n    g_ = OnePole::tan<approximation>(f);\n    r_ = 1.0f / resonance;\n    h_ = 1.0f / (1.0f + r_ * g_ + g_ * g_);\n  }\n  \n  template<FilterMode mode>\n  inline float Process(float in) {\n    float hp, bp, lp;\n    hp = (in - r_ * state_1_ - g_ * state_1_ - state_2_) * h_;\n    bp = g_ * hp + state_1_;\n    state_1_ = g_ * hp + bp;\n    lp = g_ * bp + state_2_;\n    state_2_ = g_ * bp + lp;\n    \n    if (mode == FILTER_MODE_LOW_PASS) {\n      return lp;\n    } else if (mode == FILTER_MODE_BAND_PASS) {\n      return bp;\n    } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n      return bp * r_;\n    } else if (mode == FILTER_MODE_HIGH_PASS) {\n      return hp;\n    }\n  }\n  \n  template<FilterMode mode_1, FilterMode mode_2>\n  inline void Process(float in, float* out_1, float* out_2) {\n    float hp, bp, lp;\n    hp = (in - r_ * state_1_ - g_ * state_1_ - state_2_) * h_;\n    bp = g_ * hp + state_1_;\n    state_1_ = g_ * hp + bp;\n    lp = g_ * bp + state_2_;\n    state_2_ = g_ * bp + lp;\n    \n    if (mode_1 == FILTER_MODE_LOW_PASS) {\n      *out_1 = lp;\n    } else if (mode_1 == FILTER_MODE_BAND_PASS) {\n      *out_1 = bp;\n    } else if (mode_1 == FILTER_MODE_BAND_PASS_NORMALIZED) {\n      *out_1 = bp * r_;\n    } else if (mode_1 == FILTER_MODE_HIGH_PASS) {\n      *out_1 = hp;\n    }\n\n    if (mode_2 == FILTER_MODE_LOW_PASS) {\n      *out_2 = lp;\n    } else if (mode_2 == FILTER_MODE_BAND_PASS) {\n      *out_2 = bp;\n    } else if (mode_2 == FILTER_MODE_BAND_PASS_NORMALIZED) {\n      *out_2 = bp * r_;\n    } else if (mode_2 == FILTER_MODE_HIGH_PASS) {\n      *out_2 = hp;\n    }\n  }\n  \n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    \n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n    \n      float value;\n      if (mode == FILTER_MODE_LOW_PASS) {\n        value = lp;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        value = bp;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        value = bp * r_;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        value = hp;\n      }\n      \n      *out = value;\n      ++out;\n      ++in;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  template<FilterMode mode>\n  inline void ProcessAdd(const float* in, float* out, size_t size, float gain) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    \n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n    \n      float value;\n      if (mode == FILTER_MODE_LOW_PASS) {\n        value = lp;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        value = bp;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        value = bp * r_;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        value = hp;\n      }\n      \n      *out += gain * value;\n      ++out;\n      ++in;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size, size_t stride) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    \n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n    \n      float value;\n      if (mode == FILTER_MODE_LOW_PASS) {\n        value = lp;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        value = bp;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        value = bp * r_;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        value = hp;\n      }\n      \n      *out = value;\n      out += stride;\n      in += stride;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  inline void ProcessMultimode(\n      const float* in,\n      float* out,\n      size_t size,\n      float mode) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    float hp_gain = mode < 0.5f ? -mode * 2.0f : -2.0f + mode * 2.0f;\n    float lp_gain = mode < 0.5f ? 1.0f - mode * 2.0f : 0.0f;\n    float bp_gain = mode < 0.5f ? 0.0f : mode * 2.0f - 1.0f;\n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n      *out = hp_gain * hp + bp_gain * bp + lp_gain * lp;\n      ++in;\n      ++out;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  inline void ProcessMultimodeLPtoHP(\n      const float* in,\n      float* out,\n      size_t size,\n      float mode) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    float hp_gain = std::min(-mode * 2.0f + 1.0f, 0.0f);\n    float bp_gain = 1.0f - 2.0f * fabsf(mode - 0.5f);\n    float lp_gain = std::max(1.0f - mode * 2.0f, 0.0f);\n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n      *out = hp_gain * hp + bp_gain * bp + lp_gain * lp;\n      ++in;\n      ++out;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  template<FilterMode mode>\n  inline void Process(\n      const float* in, float* out_1, float* out_2, size_t size,\n      float gain_1, float gain_2) {\n    float hp, bp, lp;\n    float state_1 = state_1_;\n    float state_2 = state_2_;\n    \n    while (size--) {\n      hp = (*in - r_ * state_1 - g_ * state_1 - state_2) * h_;\n      bp = g_ * hp + state_1;\n      state_1 = g_ * hp + bp;\n      lp = g_ * bp + state_2;\n      state_2 = g_ * bp + lp;\n    \n      float value;\n      if (mode == FILTER_MODE_LOW_PASS) {\n        value = lp;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        value = bp;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        value = bp * r_;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        value = hp;\n      }\n      \n      *out_1 += value * gain_1;\n      *out_2 += value * gain_2;\n      ++out_1;\n      ++out_2;\n      ++in;\n    }\n    state_1_ = state_1;\n    state_2_ = state_2;\n  }\n  \n  inline float g() const { return g_; }\n  inline float r() const { return r_; }\n  inline float h() const { return h_; }\n  \n private:\n  float g_;\n  float r_;\n  float h_;\n\n  float state_1_;\n  float state_2_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Svf);\n};\n\n\n\n// Naive Chamberlin SVF.\nclass NaiveSvf {\n public:\n  NaiveSvf() { }\n  ~NaiveSvf() { }\n  \n  void Init() {\n    set_f_q<FREQUENCY_DIRTY>(0.01f, 100.0f);\n    Reset();\n  }\n  \n  void Reset() {\n    lp_ = bp_ = 0.0f;\n  }\n  \n  // Set frequency and resonance from true units. Various approximations\n  // are available to avoid the cost of sinf.\n  template<FrequencyApproximation approximation>\n  inline void set_f_q(float f, float resonance) {\n    if (approximation == FREQUENCY_EXACT) {\n      f = f < 0.497f ? f : 0.497f;\n      f_ = 2.0f * sinf(M_PI_F * f);\n    } else {\n      f = f < 0.158f ? f : 0.158f;\n      f_ = 2.0f * M_PI_F * f;\n    }\n    damp_ = 1.0f / resonance;\n  }\n  \n  template<FilterMode mode>\n  inline float Process(float in) {\n    float hp, notch, bp_normalized;\n    bp_normalized = bp_ * damp_;\n    notch = in - bp_normalized;\n    lp_ += f_ * bp_;\n    hp = notch - lp_;\n    bp_ += f_ * hp;\n    \n    if (mode == FILTER_MODE_LOW_PASS) {\n      return lp_;\n    } else if (mode == FILTER_MODE_BAND_PASS) {\n      return bp_;\n    } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n      return bp_normalized;\n    } else if (mode == FILTER_MODE_HIGH_PASS) {\n      return hp;\n    }\n  }\n  \n  inline float lp() const { return lp_; }\n  inline float bp() const { return bp_; }\n  \n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size) {\n    float hp, notch, bp_normalized;\n    float lp = lp_;\n    float bp = bp_;\n    while (size--) {\n      bp_normalized = bp * damp_;\n      notch = *in++ - bp_normalized;\n      lp += f_ * bp;\n      hp = notch - lp;\n      bp += f_ * hp;\n      \n      if (mode == FILTER_MODE_LOW_PASS) {\n        *out++ = lp;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        *out++ = bp;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        *out++ = bp_normalized;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        *out++ = hp;\n      }\n    }\n    lp_ = lp;\n    bp_ = bp;\n  }\n  \n  inline void Split(const float* in, float* low, float* high, size_t size) {\n    float hp, notch, bp_normalized;\n    float lp = lp_;\n    float bp = bp_;\n    while (size--) {\n      bp_normalized = bp * damp_;\n      notch = *in++ - bp_normalized;\n      lp += f_ * bp;\n      hp = notch - lp;\n      bp += f_ * hp;\n      *low++ = lp;\n      *high++ = hp;\n    }\n    lp_ = lp;\n    bp_ = bp;\n  }\n\n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size, size_t decimate) {\n    float hp, notch, bp_normalized;\n    float lp = lp_;\n    float bp = bp_;\n    size_t n = decimate - 1;\n    while (size--) {\n      bp_normalized = bp * damp_;\n      notch = *in++ - bp_normalized;\n      lp += f_ * bp;\n      hp = notch - lp;\n      bp += f_ * hp;\n      \n      ++n;\n      if (n == decimate) {\n        if (mode == FILTER_MODE_LOW_PASS) {\n          *out++ = lp;\n        } else if (mode == FILTER_MODE_BAND_PASS) {\n          *out++ = bp;\n        } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n          *out++ = bp_normalized;\n        } else if (mode == FILTER_MODE_HIGH_PASS) {\n          *out++ = hp;\n        }\n        n = 0;\n      }\n    }\n    lp_ = lp;\n    bp_ = bp;\n  }\n  \n private:\n  float f_;\n  float damp_;\n  float lp_;\n  float bp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(NaiveSvf);\n};\n\n\n\n// Modified Chamberlin SVF (Duane K. Wise) \n// http://www.dafx.ca/proceedings/papers/p_053.pdf\nclass ModifiedSvf {\n public:\n  ModifiedSvf() { }\n  ~ModifiedSvf() { }\n  \n  void Init() {\n    Reset();\n  }\n  \n  void Reset() {\n    lp_ = bp_ = 0.0f;\n  }\n  \n  inline void set_f_fq(float f, float fq) {\n    f_ = f;\n    fq_ = fq;\n    x_ = 0.0f;\n  }\n  \n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size) {\n    float lp = lp_;\n    float bp = bp_;\n    float x = x_;\n    const float fq = fq_;\n    const float f = f_;\n    while (size--) {\n      lp += f * bp;\n      bp += -fq * bp -f * lp + *in;\n      if (mode == FILTER_MODE_BAND_PASS ||\n          mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        bp += x;\n      }\n      x = *in++;\n      \n      if (mode == FILTER_MODE_LOW_PASS) {\n        *out++ = lp * f;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        *out++ = bp * f;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        *out++ = bp * fq;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        *out++ = x - lp * f - bp * fq;\n      }\n    }\n    lp_ = lp;\n    bp_ = bp;\n    x_ = x;\n  }\n  \n private:\n  float f_;\n  float fq_;\n  float x_;\n  float lp_;\n  float bp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(ModifiedSvf);\n};\n\n\n\n// Two passes of modified Chamberlin SVF with the same coefficients -\n// to implement Linkwitz–Riley (Butterworth squared) crossover filters.\nclass CrossoverSvf {\n public:\n  CrossoverSvf() { }\n  ~CrossoverSvf() { }\n  \n  void Init() {\n    Reset();\n  }\n  \n  void Reset() {\n    lp_[0] = bp_[0] = lp_[1] = bp_[1] = 0.0f;\n    x_[0] = 0.0f;\n    x_[1] = 0.0f;\n  }\n  \n  inline void set_f_fq(float f, float fq) {\n    f_ = f;\n    fq_ = fq;\n  }\n  \n  template<FilterMode mode>\n  inline void Process(const float* in, float* out, size_t size) {\n    float lp_1 = lp_[0];\n    float bp_1 = bp_[0];\n    float lp_2 = lp_[1];\n    float bp_2 = bp_[1];\n    float x_1 = x_[0];\n    float x_2 = x_[1];\n    const float fq = fq_;\n    const float f = f_;\n    while (size--) {\n      lp_1 += f * bp_1;\n      bp_1 += -fq * bp_1 -f * lp_1 + *in;\n      if (mode == FILTER_MODE_BAND_PASS ||\n          mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        bp_1 += x_1;\n      }\n      x_1 = *in++;\n      \n      float y;\n      if (mode == FILTER_MODE_LOW_PASS) {\n        y = lp_1 * f;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        y = bp_1 * f;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        y = bp_1 * fq;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        y = x_1 - lp_1 * f - bp_1 * fq;\n      }\n      \n      lp_2 += f * bp_2;\n      bp_2 += -fq * bp_2 -f * lp_2 + y;\n      if (mode == FILTER_MODE_BAND_PASS ||\n          mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        bp_2 += x_2;\n      }\n      x_2 = y;\n      \n      if (mode == FILTER_MODE_LOW_PASS) {\n        *out++ = lp_2 * f;\n      } else if (mode == FILTER_MODE_BAND_PASS) {\n        *out++ = bp_2 * f;\n      } else if (mode == FILTER_MODE_BAND_PASS_NORMALIZED) {\n        *out++ = bp_2 * fq;\n      } else if (mode == FILTER_MODE_HIGH_PASS) {\n        *out++ = x_2 - lp_2 * f - bp_2 * fq;\n      }\n    }\n    lp_[0] = lp_1;\n    bp_[0] = bp_1;\n    lp_[1] = lp_2;\n    bp_[1] = bp_2;\n    x_[0] = x_1;\n    x_[1] = x_2;\n  }\n  \n private:\n  float f_;\n  float fq_;\n  float x_[2];\n  float lp_[2];\n  float bp_[2];\n  \n  DISALLOW_COPY_AND_ASSIGN(CrossoverSvf);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_FILTER_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/hysteresis_filter.h",
    "content": "// Copyright 2019 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Threshold type filter that filters out slow jumps of a value.\n\n#ifndef STMLIB_DSP_HYSTERESIS_FILTER_H_\n#define STMLIB_DSP_HYSTERESIS_FILTER_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nclass HysteresisFilter {\n public:\n  HysteresisFilter() { }\n  ~HysteresisFilter() { }\n\n  void Init(float threshold) {\n    value_ = 0.0f;\n    threshold_ = threshold;\n  }\n  \n  inline float Process(float value) {\n    return Process(value, threshold_);\n  }\n\n  inline float Process(float value, float threshold) {\n    if (threshold == 0.0f) {\n      value_ = value;\n    } else {\n      float error = value - value_;\n      if (error > threshold) {\n        value_ = value - threshold;\n      } else if (error < -threshold) {\n        value_ = value + threshold;\n      }\n    }\n    \n    return value_;\n  }\n\n  inline float value() const { return value_; }\n\n private:\n  float value_;\n  float threshold_;\n  \n  DISALLOW_COPY_AND_ASSIGN(HysteresisFilter);\n};\n\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_HYSTERESIS_FILTER_H_\n\n"
  },
  {
    "path": "lib/stmlib/dsp/hysteresis_quantizer.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Quantize a float in [0, 1] to an integer in [0, num_steps[. Apply hysteresis\n// to prevent jumps near the decision boundary.\n\n#ifndef STMLIB_DSP_HYSTERESIS_QUANTIZER_H_\n#define STMLIB_DSP_HYSTERESIS_QUANTIZER_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nclass HysteresisQuantizer {\n public:\n  HysteresisQuantizer() { }\n  ~HysteresisQuantizer() { }\n\n  void Init() {\n    quantized_value_ = 0;\n  }\n\n  inline int Process(float value, int num_steps) {\n    return Process(value, num_steps, 0.25f);\n  }\n\n  inline int Process(float value, int num_steps, float hysteresis) {\n    return Process(0, value, num_steps, hysteresis);\n  }\n\n  inline int Process(int base, float value, int num_steps, float hysteresis) {\n    value *= static_cast<float>(num_steps - 1);\n    value += static_cast<float>(base);\n    float hysteresis_feedback = value > static_cast<float>(quantized_value_)\n        ? -hysteresis\n        : hysteresis;\n    int q = static_cast<int>(value + hysteresis_feedback + 0.5f);\n    CONSTRAIN(q, 0, num_steps - 1);\n    quantized_value_ = q;\n    return q;\n  }\n\n  template<typename T>\n  const T& Lookup(const T* array, float value, int num_steps) {\n    return array[Process(value, num_steps)];\n  }\n\n private:\n  int quantized_value_;\n  \n  DISALLOW_COPY_AND_ASSIGN(HysteresisQuantizer);\n};\n\n\n// Note: currently refactoring this aspect of all Mutable Instruments modules.\n// The codebase will progressively use only this class, at which point the other\n// version will be deprecated\n\nclass HysteresisQuantizer2 {\n public:\n  HysteresisQuantizer2() { }\n  ~HysteresisQuantizer2() { }\n\n  void Init(int num_steps, float hysteresis, bool symmetric) {\n    num_steps_ = num_steps;\n    hysteresis_ = hysteresis;\n\n    scale_ = static_cast<float>(symmetric ? num_steps - 1 : num_steps);\n    offset_ = symmetric ? 0.0f : -0.5f;\n\n    quantized_value_ = 0;\n  }\n\n  inline int Process(float value) {\n    return Process(0, value);\n  }\n\n  inline int Process(int base, float value) {\n    value *= scale_;\n    value += offset_;\n    value += static_cast<float>(base);\n\n    float hysteresis_sign = value > static_cast<float>(quantized_value_)\n        ? -1.0f\n        : +1.0f;\n    int q = static_cast<int>(value + hysteresis_sign * hysteresis_ + 0.5f);\n    CONSTRAIN(q, 0, num_steps_ - 1);\n    quantized_value_ = q;\n    return q;\n  }\n\n  template<typename T>\n  const T& Lookup(const T* array, float value) {\n    return array[Process(value)];\n  }\n  \n  inline int num_steps() const {\n    return num_steps_;\n  }\n  \n  inline int quantized_value() const {\n    return quantized_value_;\n  }\n\n private:\n  int num_steps_;\n  float hysteresis_;\n  \n  float scale_;\n  float offset_;\n\n  int quantized_value_;\n  \n  DISALLOW_COPY_AND_ASSIGN(HysteresisQuantizer2);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_HYSTERESIS_QUANTIZER_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/limiter.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Limiter.\n\n#ifndef STMLIB_DSP_LIMITER_H_\n#define STMLIB_DSP_LIMITER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\n#include \"stmlib/dsp/dsp.h\"\n#include \"stmlib/dsp/filter.h\"\n\nnamespace stmlib {\n\nclass Limiter {\n public:\n  Limiter() { }\n  ~Limiter() { }\n\n  void Init() {\n    peak_ = 0.5f;\n  }\n\n  void Process(float pre_gain, float* in_out, size_t size) {\n    while (size--) {\n      float s = *in_out * pre_gain;\n      SLOPE(peak_, fabsf(s), 0.05f, 0.00002f);\n      float gain = (peak_ <= 1.0f ? 1.0f : 1.0f / peak_);\n      *in_out++ = s * gain * 0.8f;\n    }\n  }\n\n private:\n  float peak_;\n\n  DISALLOW_COPY_AND_ASSIGN(Limiter);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_LIMITER_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/parameter_interpolator.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Linear interpolation of parameters in rendering loops.\n\n#ifndef STMLIB_DSP_PARAMETER_INTERPOLATOR_H_\n#define STMLIB_DSP_PARAMETER_INTERPOLATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nclass ParameterInterpolator {\n public:\n  ParameterInterpolator() { }\n  ParameterInterpolator(float* state, float new_value, size_t size) {\n    Init(state, new_value, size);\n  }\n\n  ParameterInterpolator(float* state, float new_value, float step) {\n    state_ = state;\n    value_ = *state;\n    increment_ = (new_value - *state) * step;\n  }\n\n  ~ParameterInterpolator() {\n    *state_ = value_;\n  }\n  \n  inline void Init(float* state, float new_value, size_t size) {\n    state_ = state;\n    value_ = *state;\n    increment_ = (new_value - *state) / static_cast<float>(size);\n  }\n\n  inline float Next() {\n    value_ += increment_;\n    return value_;\n  }\n\n  inline float subsample(float t) {\n    return value_ + increment_ * t;\n  }\n  \n private:\n  float* state_;\n  float value_;\n  float increment_;\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_PARAMETER_INTERPOLATOR_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/polyblep.h",
    "content": "// Copyright 2017 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Polynomial approximation of band-limited step for band-limited waveform\n// synthesis.\n\n#ifndef STMLIB_DSP_POLYBLEP_H_\n#define STMLIB_DSP_POLYBLEP_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\ninline float ThisBlepSample(float t) {\n  return 0.5f * t * t;\n}\n\ninline float NextBlepSample(float t) {\n  t = 1.0f - t;\n  return -0.5f * t * t;\n}\n\ninline float NextIntegratedBlepSample(float t) {\n  const float t1 = 0.5f * t;\n  const float t2 = t1 * t1;\n  const float t4 = t2 * t2;\n  return 0.1875f - t1 + 1.5f * t2 - t4;\n}\n\ninline float ThisIntegratedBlepSample(float t) {\n  return NextIntegratedBlepSample(1.0f - t);\n}\n  \n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_POLYBLEP_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/rsqrt.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Fast reciprocal of square-root routines.\n\n#ifndef STMLIB_DSP_RSQRT_H_\n#define STMLIB_DSP_RSQRT_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\ntemplate<typename To, typename From>\nstruct unsafe_bit_cast_t {\n  union {\n    From from;\n    To to;\n  };\n};\n\ntemplate<typename To, typename From>\nTo unsafe_bit_cast(From from) {\n    unsafe_bit_cast_t<To, From> u;\n    u.from = from;\n    return u.to;\n}\n\n\nstatic inline float fast_rsqrt_carmack(float x) {\n  uint32_t i;\n  float x2, y;\n  const float threehalfs = 1.5f;\n  y = x;\n  i = unsafe_bit_cast<uint32_t, float>(y);\n  i = 0x5f3759df - (i >> 1);\n  y = unsafe_bit_cast<float, uint32_t>(i);\n  x2 = x * 0.5f;\n  y = y * (threehalfs - (x2 * y * y));\n\treturn y;\n}\n\nstatic inline float fast_rsqrt_accurate(float fp0) {\n  float _min = 1.0e-38;\n  float _1p5 = 1.5;\n  float fp1, fp2, fp3;\n\n  uint32_t q = unsafe_bit_cast<uint32_t, float>(fp0);\n  fp2 = unsafe_bit_cast<float, uint32_t>(0x5F3997BB - ((q >> 1) & 0x3FFFFFFF));\n  fp1 = _1p5 * fp0 - fp0;\n  fp3 = fp2 * fp2;\n  if (fp0 < _min) {\n    return fp0 > 0 ? fp2 : 1000.0f;\n  }\n  fp3 = _1p5 - fp1 * fp3;\n  fp2 = fp2 * fp3;\n  fp3 = fp2 * fp2;\n  fp3 = _1p5 - fp1 * fp3;\n  fp2 = fp2 * fp3;\n  fp3 = fp2 * fp2;\n  fp3 = _1p5 - fp1 * fp3;\n  return fp2 * fp3;\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_RSQRT_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/sample_rate_converter.h",
    "content": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Sample rate converter.\n\n#ifndef STMLIB_DSP_SAMPLE_RATE_CONVERTER_H_\n#define STMLIB_DSP_SAMPLE_RATE_CONVERTER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <algorithm>\n\nnamespace stmlib {\n\nenum SampleRateConversionDirection {\n  SRC_UP,\n  SRC_DOWN\n};\n\ntemplate <SampleRateConversionDirection direction, int32_t ratio, int32_t length>\nstruct SRC_FIR { };\n\ntemplate<int32_t N>\nstruct FilterState {\n public:\n  enum {\n    n = N\n  };\n  inline void Push(float value) {\n    tail.Push(head);\n    head = value;\n  }\n\n  template<int32_t i> inline float Read() const {\n    return i == 0 ? head : tail.template Read<i - 1>();\n  }\n\n  inline void Load(const float* x_state) {\n    head = x_state[0];\n    tail.Load(x_state + 1);\n  }\n\n  inline void Save(float* x_state) {\n    x_state[0] = head;\n    tail.Save(x_state + 1);\n  }\n\n private:  \n  float head;\n  FilterState<N-1> tail;\n};\n\ntemplate<>\nclass FilterState<1> {\n public:\n  enum {\n    n = 1\n  };\n  inline void Push(float value) {\n    head = value;\n  }\n\n  template<int32_t i> inline float Read() const {\n    return head;\n  }\n\n  inline void Load(const float* x_state) {\n    head = x_state[0];\n  }\n\n  inline void Save(float* x_state) {\n    x_state[0] = head;\n  }\n private:\n  float head;\n};\n\ntemplate<int32_t N, int32_t x_stride, int32_t h_stride, int32_t mirror = 0, int32_t i = 0, int32_t h_offset = 0>\nstruct Accumulator {\n  enum {\n    h_index = mirror != 0 && h_offset + i * h_stride >= mirror / 2 ?\n        mirror - 1 - i * h_stride - h_offset : h_offset + i * h_stride\n  };\n  \n  template<typename IR>\n  inline float operator()(const float* x, const IR& h) const {\n    Accumulator<N - 1, x_stride, h_stride, mirror, i + 1, h_offset> a;\n    return x[i * x_stride] * h.template Read<h_index>() + a(x, h);\n  }\n  \n  template<int32_t NN, typename IR>\n  inline float operator()(const FilterState<NN>& x, const IR& h) const {\n    Accumulator<N - 1, x_stride, h_stride, mirror, i + 1, h_offset> a;\n    return x.template Read<i * x_stride>() * h.template Read<h_index>() + a(x, h);\n  }\n};\n\ntemplate<int32_t x_stride, int32_t h_stride, int32_t mirror, int32_t i, int32_t h_offset>\nstruct Accumulator<0, x_stride, h_stride, mirror, i, h_offset> {\n  template<typename IR>\n  inline float operator()(const float* x, const IR& h) const {\n    return 0.0f;\n  }\n\n  template<int32_t NN, typename IR>\n  inline float operator()(const FilterState<NN>& x, const IR& h) const {\n    return 0.0f;\n  }\n};\n\ntemplate<int32_t K, int32_t mirror = 0, int32_t remaining = K>\nstruct PolyphaseStage {\n  template<typename T, typename IR>\n  inline void operator()(float* &y, const T& x, const IR& h) const {\n    Accumulator<T::n, 1, K, mirror, 0, K - remaining> a;\n    *y++ = a(x, h);\n    PolyphaseStage<K, mirror, remaining - 1> p;\n    p(y, x, h);\n  }\n};\n\ntemplate<int32_t K, int32_t mirror>\nstruct PolyphaseStage<K, mirror, 0> {\n  template<typename T, typename IR>\n  inline void operator()(float* &y, const T& x, const IR& h) const { }\n};\n\ntemplate<\n    SampleRateConversionDirection direction,\n    int32_t ratio,\n    int32_t filter_size>\nclass SampleRateConverter { };\n\ntemplate<int32_t filter_size>\nclass SampleRateConverter<SRC_UP, 1, filter_size> {\n public:\n  SampleRateConverter() { }\n  ~SampleRateConverter() { }\n  \n  inline void Init() { }\n  inline int32_t delay() const { return 0; }\n  inline void Process(const float* in, float* out, size_t input_size) {\n    std::copy(&in[0], &in[input_size], &out[0]);\n  }\n private:\n  DISALLOW_COPY_AND_ASSIGN(SampleRateConverter);\n};\n\ntemplate<int32_t filter_size>\nclass SampleRateConverter<SRC_DOWN, 1, filter_size> {\n public:\n  SampleRateConverter() { }\n  ~SampleRateConverter() { }\n  \n  inline void Init() { }\n  inline int32_t delay() const { return 0; }\n  inline void Process(const float* in, float* out, size_t input_size) {\n    std::copy(&in[0], &in[input_size], &out[0]);\n  }\n private:\n  DISALLOW_COPY_AND_ASSIGN(SampleRateConverter);\n};\n\ntemplate<int32_t ratio, int32_t filter_size>\nclass SampleRateConverter<SRC_UP, ratio, filter_size> {\n private:\n  enum {\n    N = filter_size / ratio,\n    K = ratio\n  };\n \n public:\n  SampleRateConverter() { }\n  ~SampleRateConverter() { }\n\n  inline void Init() {\n    std::fill(&x_[0], &x_[N], 0);\n  };\n\n  inline int32_t delay() const { return filter_size / ratio / 2; }\n\n  inline void Process(const float* in, float* out, size_t input_size) {\n    SRC_FIR<SRC_UP, ratio, filter_size> ir;\n    FilterState<N> x;\n    x.Load(x_);\n    while (input_size--) {\n      x.Push(*in++);\n      PolyphaseStage<K, filter_size> polyphase_stage;\n      polyphase_stage(out, x, ir);\n    }\n    x.Save(x_);\n  }\n  \n private:\n  float x_[N];\n\n  DISALLOW_COPY_AND_ASSIGN(SampleRateConverter);\n};\n\ntemplate<int32_t ratio, int32_t filter_size>\nclass SampleRateConverter<SRC_DOWN, ratio, filter_size> {\n private:\n  enum {\n    N = filter_size,\n    K = ratio\n  };\n \n public:\n  SampleRateConverter() { }\n  ~SampleRateConverter() { }\n\n  inline void Init() {\n    std::fill(&x_[0], &x_[2 * N], 0);\n    x_ptr_ = &x_[N - 1];\n  };\n\n  inline int32_t delay() const { return filter_size / 2; }\n\n  inline void Process(const float* in, float* out, size_t input_size) {\n    // When downsampling, the number of input samples must be a multiple\n    // of the downsampling ratio.\n    if ((input_size % ratio) != 0) {\n      return;\n    }\n\n    SRC_FIR<SRC_DOWN, ratio, filter_size> ir;\n    if (input_size >= 8 * filter_size) {\n      std::copy(&in[0], &in[N], &x_[N - 1]);\n      \n      // Generate the samples which require access to the history buffer.\n      for (int32_t i = 0; i < N; i += ratio) {\n        Accumulator<N, -1, 1, filter_size> accumulator;\n        *out++ = accumulator(&x_[N - 1 + i], ir);\n        in += ratio;\n        input_size -= ratio;\n      }\n        \n      // From now on, all the samples we need to access are located inside\n      // the input buffer passed as an argument, and since the filter\n      // is small, we can unroll the summation loop.\n      if ((input_size / ratio) & 1) {\n        while (input_size) {\n          Accumulator<N, -1, 1, filter_size> accumulator;\n          *out++ = accumulator(in, ir);\n          input_size -= ratio;\n          in += ratio;\n        }\n      } else {\n        while (input_size) {\n          Accumulator<N, -1, 1, filter_size> accumulator;\n          *out++ = accumulator(in, ir);\n          *out++ = accumulator(in + ratio, ir);\n          input_size -= 2 * ratio;\n          in += 2 * ratio;\n        }\n      }\n\n      // Copy last input samples to history buffer.\n      std::copy(&in[-N + 1], &in[0], &x_[0]);\n    } else {\n      // Variant which uses a circular buffer to store history.\n      while (input_size) {\n        for (int32_t i = 0; i < ratio; ++i) {\n          x_ptr_[0] = x_ptr_[N] = *in++;\n          --x_ptr_;\n          if (x_ptr_ < x_) {\n            x_ptr_ += N;\n          }\n        }\n        input_size -= ratio;\n\n        Accumulator<N, 1, 1, filter_size> accumulator;\n        *out++ = accumulator(&x_ptr_[1], ir);\n      }\n    }\n  }\n \n private:\n  float x_[2 * N];\n  float* x_ptr_;\n\n  DISALLOW_COPY_AND_ASSIGN(SampleRateConverter);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_SAMPLE_RATE_CONVERTER_H_\n"
  },
  {
    "path": "lib/stmlib/dsp/units.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Conversion from semitones to frequency ratio.\n\n#include \"stmlib/dsp/units.h\"\n\nnamespace stmlib {\n\n/* extern */\nconst float lut_pitch_ratio_high[] = {\n   6.151958251e-04,  6.517772725e-04,  6.905339660e-04,  7.315952524e-04,\n   7.750981699e-04,  8.211879055e-04,  8.700182794e-04,  9.217522585e-04,\n   9.765625000e-04,  1.034631928e-03,  1.096154344e-03,  1.161335073e-03,\n   1.230391650e-03,  1.303554545e-03,  1.381067932e-03,  1.463190505e-03,\n   1.550196340e-03,  1.642375811e-03,  1.740036559e-03,  1.843504517e-03,\n   1.953125000e-03,  2.069263856e-03,  2.192308688e-03,  2.322670146e-03,\n   2.460783301e-03,  2.607109090e-03,  2.762135864e-03,  2.926381010e-03,\n   3.100392680e-03,  3.284751622e-03,  3.480073118e-03,  3.687009034e-03,\n   3.906250000e-03,  4.138527712e-03,  4.384617376e-03,  4.645340293e-03,\n   4.921566601e-03,  5.214218180e-03,  5.524271728e-03,  5.852762019e-03,\n   6.200785359e-03,  6.569503244e-03,  6.960146235e-03,  7.374018068e-03,\n   7.812500000e-03,  8.277055425e-03,  8.769234752e-03,  9.290680586e-03,\n   9.843133202e-03,  1.042843636e-02,  1.104854346e-02,  1.170552404e-02,\n   1.240157072e-02,  1.313900649e-02,  1.392029247e-02,  1.474803614e-02,\n   1.562500000e-02,  1.655411085e-02,  1.753846950e-02,  1.858136117e-02,\n   1.968626640e-02,  2.085687272e-02,  2.209708691e-02,  2.341104808e-02,\n   2.480314144e-02,  2.627801298e-02,  2.784058494e-02,  2.949607227e-02,\n   3.125000000e-02,  3.310822170e-02,  3.507693901e-02,  3.716272234e-02,\n   3.937253281e-02,  4.171374544e-02,  4.419417382e-02,  4.682209615e-02,\n   4.960628287e-02,  5.255602595e-02,  5.568116988e-02,  5.899214454e-02,\n   6.250000000e-02,  6.621644340e-02,  7.015387802e-02,  7.432544469e-02,\n   7.874506562e-02,  8.342749089e-02,  8.838834765e-02,  9.364419230e-02,\n   9.921256575e-02,  1.051120519e-01,  1.113623398e-01,  1.179842891e-01,\n   1.250000000e-01,  1.324328868e-01,  1.403077560e-01,  1.486508894e-01,\n   1.574901312e-01,  1.668549818e-01,  1.767766953e-01,  1.872883846e-01,\n   1.984251315e-01,  2.102241038e-01,  2.227246795e-01,  2.359685782e-01,\n   2.500000000e-01,  2.648657736e-01,  2.806155121e-01,  2.973017788e-01,\n   3.149802625e-01,  3.337099635e-01,  3.535533906e-01,  3.745767692e-01,\n   3.968502630e-01,  4.204482076e-01,  4.454493591e-01,  4.719371563e-01,\n   5.000000000e-01,  5.297315472e-01,  5.612310242e-01,  5.946035575e-01,\n   6.299605249e-01,  6.674199271e-01,  7.071067812e-01,  7.491535384e-01,\n   7.937005260e-01,  8.408964153e-01,  8.908987181e-01,  9.438743127e-01,\n   1.000000000e+00,  1.059463094e+00,  1.122462048e+00,  1.189207115e+00,\n   1.259921050e+00,  1.334839854e+00,  1.414213562e+00,  1.498307077e+00,\n   1.587401052e+00,  1.681792831e+00,  1.781797436e+00,  1.887748625e+00,\n   2.000000000e+00,  2.118926189e+00,  2.244924097e+00,  2.378414230e+00,\n   2.519842100e+00,  2.669679708e+00,  2.828427125e+00,  2.996614154e+00,\n   3.174802104e+00,  3.363585661e+00,  3.563594873e+00,  3.775497251e+00,\n   4.000000000e+00,  4.237852377e+00,  4.489848193e+00,  4.756828460e+00,\n   5.039684200e+00,  5.339359417e+00,  5.656854249e+00,  5.993228308e+00,\n   6.349604208e+00,  6.727171322e+00,  7.127189745e+00,  7.550994501e+00,\n   8.000000000e+00,  8.475704755e+00,  8.979696386e+00,  9.513656920e+00,\n   1.007936840e+01,  1.067871883e+01,  1.131370850e+01,  1.198645662e+01,\n   1.269920842e+01,  1.345434264e+01,  1.425437949e+01,  1.510198900e+01,\n   1.600000000e+01,  1.695140951e+01,  1.795939277e+01,  1.902731384e+01,\n   2.015873680e+01,  2.135743767e+01,  2.262741700e+01,  2.397291323e+01,\n   2.539841683e+01,  2.690868529e+01,  2.850875898e+01,  3.020397801e+01,\n   3.200000000e+01,  3.390281902e+01,  3.591878555e+01,  3.805462768e+01,\n   4.031747360e+01,  4.271487533e+01,  4.525483400e+01,  4.794582646e+01,\n   5.079683366e+01,  5.381737058e+01,  5.701751796e+01,  6.040795601e+01,\n   6.400000000e+01,  6.780563804e+01,  7.183757109e+01,  7.610925536e+01,\n   8.063494719e+01,  8.542975067e+01,  9.050966799e+01,  9.589165292e+01,\n   1.015936673e+02,  1.076347412e+02,  1.140350359e+02,  1.208159120e+02,\n   1.280000000e+02,  1.356112761e+02,  1.436751422e+02,  1.522185107e+02,\n   1.612698944e+02,  1.708595013e+02,  1.810193360e+02,  1.917833058e+02,\n   2.031873347e+02,  2.152694823e+02,  2.280700718e+02,  2.416318240e+02,\n   2.560000000e+02,  2.712225522e+02,  2.873502844e+02,  3.044370214e+02,\n   3.225397888e+02,  3.417190027e+02,  3.620386720e+02,  3.835666117e+02,\n   4.063746693e+02,  4.305389646e+02,  4.561401437e+02,  4.832636481e+02,\n   5.120000000e+02,  5.424451043e+02,  5.747005687e+02,  6.088740429e+02,\n   6.450795775e+02,  6.834380053e+02,  7.240773439e+02,  7.671332234e+02,\n   8.127493386e+02,  8.610779292e+02,  9.122802874e+02,  9.665272962e+02,\n   1.024000000e+03,  1.084890209e+03,  1.149401137e+03,  1.217748086e+03,\n   1.290159155e+03,  1.366876011e+03,  1.448154688e+03,  1.534266447e+03,\n};\n\n/* extern */\nconst float lut_pitch_ratio_low[] = {\n   1.000000000e+00,  1.000225659e+00,  1.000451370e+00,  1.000677131e+00,\n   1.000902943e+00,  1.001128806e+00,  1.001354720e+00,  1.001580685e+00,\n   1.001806701e+00,  1.002032768e+00,  1.002258886e+00,  1.002485055e+00,\n   1.002711275e+00,  1.002937546e+00,  1.003163868e+00,  1.003390242e+00,\n   1.003616666e+00,  1.003843141e+00,  1.004069668e+00,  1.004296246e+00,\n   1.004522874e+00,  1.004749554e+00,  1.004976285e+00,  1.005203068e+00,\n   1.005429901e+00,  1.005656786e+00,  1.005883722e+00,  1.006110709e+00,\n   1.006337747e+00,  1.006564836e+00,  1.006791977e+00,  1.007019169e+00,\n   1.007246412e+00,  1.007473707e+00,  1.007701053e+00,  1.007928450e+00,\n   1.008155898e+00,  1.008383398e+00,  1.008610949e+00,  1.008838551e+00,\n   1.009066205e+00,  1.009293910e+00,  1.009521667e+00,  1.009749475e+00,\n   1.009977334e+00,  1.010205245e+00,  1.010433207e+00,  1.010661221e+00,\n   1.010889286e+00,  1.011117403e+00,  1.011345571e+00,  1.011573790e+00,\n   1.011802061e+00,  1.012030384e+00,  1.012258758e+00,  1.012487183e+00,\n   1.012715661e+00,  1.012944189e+00,  1.013172770e+00,  1.013401401e+00,\n   1.013630085e+00,  1.013858820e+00,  1.014087607e+00,  1.014316445e+00,\n   1.014545335e+00,  1.014774277e+00,  1.015003270e+00,  1.015232315e+00,\n   1.015461411e+00,  1.015690560e+00,  1.015919760e+00,  1.016149011e+00,\n   1.016378315e+00,  1.016607670e+00,  1.016837077e+00,  1.017066536e+00,\n   1.017296046e+00,  1.017525609e+00,  1.017755223e+00,  1.017984889e+00,\n   1.018214607e+00,  1.018444376e+00,  1.018674198e+00,  1.018904071e+00,\n   1.019133996e+00,  1.019363973e+00,  1.019594002e+00,  1.019824083e+00,\n   1.020054216e+00,  1.020284401e+00,  1.020514637e+00,  1.020744926e+00,\n   1.020975266e+00,  1.021205659e+00,  1.021436104e+00,  1.021666600e+00,\n   1.021897149e+00,  1.022127749e+00,  1.022358402e+00,  1.022589107e+00,\n   1.022819863e+00,  1.023050672e+00,  1.023281533e+00,  1.023512446e+00,\n   1.023743411e+00,  1.023974428e+00,  1.024205498e+00,  1.024436619e+00,\n   1.024667793e+00,  1.024899019e+00,  1.025130297e+00,  1.025361627e+00,\n   1.025593009e+00,  1.025824444e+00,  1.026055931e+00,  1.026287470e+00,\n   1.026519061e+00,  1.026750705e+00,  1.026982401e+00,  1.027214149e+00,\n   1.027445949e+00,  1.027677802e+00,  1.027909707e+00,  1.028141664e+00,\n   1.028373674e+00,  1.028605736e+00,  1.028837851e+00,  1.029070017e+00,\n   1.029302237e+00,  1.029534508e+00,  1.029766832e+00,  1.029999209e+00,\n   1.030231638e+00,  1.030464119e+00,  1.030696653e+00,  1.030929239e+00,\n   1.031161878e+00,  1.031394569e+00,  1.031627313e+00,  1.031860109e+00,\n   1.032092958e+00,  1.032325859e+00,  1.032558813e+00,  1.032791820e+00,\n   1.033024879e+00,  1.033257991e+00,  1.033491155e+00,  1.033724372e+00,\n   1.033957641e+00,  1.034190964e+00,  1.034424338e+00,  1.034657766e+00,\n   1.034891246e+00,  1.035124779e+00,  1.035358364e+00,  1.035592003e+00,\n   1.035825694e+00,  1.036059437e+00,  1.036293234e+00,  1.036527083e+00,\n   1.036760985e+00,  1.036994940e+00,  1.037228947e+00,  1.037463008e+00,\n   1.037697121e+00,  1.037931287e+00,  1.038165506e+00,  1.038399777e+00,\n   1.038634102e+00,  1.038868479e+00,  1.039102910e+00,  1.039337393e+00,\n   1.039571929e+00,  1.039806518e+00,  1.040041160e+00,  1.040275855e+00,\n   1.040510603e+00,  1.040745404e+00,  1.040980258e+00,  1.041215165e+00,\n   1.041450125e+00,  1.041685138e+00,  1.041920204e+00,  1.042155323e+00,\n   1.042390495e+00,  1.042625720e+00,  1.042860998e+00,  1.043096329e+00,\n   1.043331714e+00,  1.043567151e+00,  1.043802642e+00,  1.044038185e+00,\n   1.044273782e+00,  1.044509433e+00,  1.044745136e+00,  1.044980892e+00,\n   1.045216702e+00,  1.045452565e+00,  1.045688481e+00,  1.045924450e+00,\n   1.046160473e+00,  1.046396549e+00,  1.046632678e+00,  1.046868860e+00,\n   1.047105096e+00,  1.047341385e+00,  1.047577727e+00,  1.047814123e+00,\n   1.048050572e+00,  1.048287074e+00,  1.048523630e+00,  1.048760239e+00,\n   1.048996902e+00,  1.049233618e+00,  1.049470387e+00,  1.049707210e+00,\n   1.049944086e+00,  1.050181015e+00,  1.050417999e+00,  1.050655035e+00,\n   1.050892125e+00,  1.051129269e+00,  1.051366466e+00,  1.051603717e+00,\n   1.051841021e+00,  1.052078378e+00,  1.052315790e+00,  1.052553255e+00,\n   1.052790773e+00,  1.053028345e+00,  1.053265971e+00,  1.053503650e+00,\n   1.053741383e+00,  1.053979169e+00,  1.054217010e+00,  1.054454903e+00,\n   1.054692851e+00,  1.054930852e+00,  1.055168907e+00,  1.055407016e+00,\n   1.055645178e+00,  1.055883395e+00,  1.056121664e+00,  1.056359988e+00,\n   1.056598366e+00,  1.056836797e+00,  1.057075282e+00,  1.057313821e+00,\n   1.057552413e+00,  1.057791060e+00,  1.058029760e+00,  1.058268515e+00,\n   1.058507323e+00,  1.058746185e+00,  1.058985101e+00,  1.059224071e+00,\n};\n\n// Original python code\n//\n// TABLE_SIZE = 256\n//\n// ratio = numpy.arange(0, TABLE_SIZE) - 128\n// ratio = 2 ** (ratio / 12.0)\n// semitone = 2 ** (numpy.arange(0, TABLE_SIZE) / 256.0 / 12.0)\n//\n// lookup_tables.append(('pitch_ratio_high', ratio))\n// lookup_tables.append(('pitch_ratio_low', semitone))\n\n}  // namespace stmlib\n"
  },
  {
    "path": "lib/stmlib/dsp/units.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Conversion from semitones to frequency ratio.\n\n#ifndef STMLIB_DSP_UNITS_H_\n#define STMLIB_DSP_UNITS_H_\n\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/dsp/dsp.h\"\n\nnamespace stmlib {\n\n// https://pichenettes.github.io/mutable-instruments-documentation/tech_notes/exponential_conversion_in_digital_oscillators/\n\n// Computes 2^x by using a polynomial approximation of 2^frac(x) and directly\n// incrementing the exponent of the IEEE 754 representation of the result\n// by int(x). Depending on the use case, the order of the polynomial\n// approximation can be chosen.\ntemplate<int order>\ninline float Pow2Fast(float x) {\n  union {\n    float f;\n    int32_t w;\n  } r;\n\n\n  if (order == 1) {\n    r.w = float(1 << 23) * (127.0f + x);\n    return r.f;\n  }\n\n  int32_t x_integral = static_cast<int32_t>(x);\n  if (x < 0.0f) {\n    --x_integral;\n  }\n  x -= static_cast<float>(x_integral);\n\n  if (order == 1) {\n    r.f = 1.0f + x;\n  } else if (order == 2) {\n    r.f = 1.0f + x * (0.6565f + x * 0.3435f);\n  } else if (order == 3) {\n    r.f = 1.0f + x * (0.6958f + x * (0.2251f + x * 0.0791f));\n  }\n  r.w += x_integral << 23;\n  return r.f;\n}\n\n#ifdef SemitonesToRatioFast\n\ninline float SemitonesToRatio(float semitones){\n  return Pow2Fast<1>(semitones / 12.f);\n}\n\n#else \n\nextern const float lut_pitch_ratio_high[257];\nextern const float lut_pitch_ratio_low[257];\n\ninline float SemitonesToRatio(float semitones) {\n  float pitch = semitones + 128.0f;\n  MAKE_INTEGRAL_FRACTIONAL(pitch)\n\n  return lut_pitch_ratio_high[pitch_integral] * \\\n      lut_pitch_ratio_low[static_cast<int32_t>(pitch_fractional * 256.0f)];\n}\n\n#endif\n\ninline float SemitonesToRatioSafe(float semitones) {\n  float scale = 1.0f;\n  while (semitones > 120.0f) {\n    semitones -= 120.0f;\n    scale *= 1024.0f;\n  }\n  while (semitones < -120.0f) {\n    semitones += 120.0f;\n    scale *= 1.0f / 1024.0f;\n  }\n  return scale * SemitonesToRatio(semitones);\n}\n\n\ninline float Exp2Safe(float value) {\n  return SemitonesToRatioSafe(value * 12.0f);\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_DSP_UNITS_H_\n"
  },
  {
    "path": "lib/stmlib/makefile.inc",
    "content": "# Copyright 2012 Emilie Gillet.\n#\n# Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n# \n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# \n# See http://creativecommons.org/licenses/MIT/ for more information.\n\n# ------------------------------------------------------------------------------\n# Files and directories\n# ------------------------------------------------------------------------------\n\nTOOLCHAIN_PATH ?= /usr/local/arm/\n\nPGM_INTERFACE ?= stlink-v2\n# PGM_INTERFACE ?= ftdi/olimex-arm-jtag-swd\n# PGM_INTERFACE ?= ftdi/olimex-arm-usb-ocd-h\n\nifeq ($(PGM_INTERFACE),ftdi/olimex-arm-jtag-swd)\nOPENOCD_INTERFACE_SCRIPT ?= interface/ftdi/olimex-arm-usb-ocd-h.cfg -f interface/ftdi/olimex-arm-jtag-swd.cfg\nelse\nOPENOCD_INTERFACE_SCRIPT ?= interface/$(PGM_INTERFACE).cfg\nendif\n\nOPENOCD_SCRIPT_PATH ?= /opt/local/share/openocd/scripts/\n\nPGM_SERIAL_PORT ?= /dev/ftdi-usbserial\nPGM_SERIAL_BAUD_RATE ?= 115200\nPGM_SERIAL_VERIFY ?= -v\n\n# --- You should not have to modify these --------------------------------------\n\nTOOLCHAIN_BIN  = $(TOOLCHAIN_PATH)bin/\nSTM32_PATH     = stmlib/third_party/STM\n\n# --- Do not modify anything below this point ----------------------------------\n\nBUILD_ROOT     = build/\nBUILD_DIR      = $(BUILD_ROOT)$(TARGET)/\n\nCC             = $(TOOLCHAIN_BIN)arm-none-eabi-gcc\nCXX            = $(TOOLCHAIN_BIN)arm-none-eabi-g++\nAS             = $(TOOLCHAIN_BIN)arm-none-eabi-as\nOBJCOPY        = $(TOOLCHAIN_BIN)arm-none-eabi-objcopy\nDB             = $(TOOLCHAIN_BIN)arm-none-eabi-gdb\nOBJDUMP        = $(TOOLCHAIN_BIN)arm-none-eabi-objdump\nAR             = $(TOOLCHAIN_BIN)arm-none-eabi-ar\nSIZE           = $(TOOLCHAIN_BIN)arm-none-eabi-size\nNM             = $(TOOLCHAIN_BIN)arm-none-eabi-nm\nREMOVE         = rm -f\nCAT            = cat\nFORMAT_SIZE    = | figlet | cowsay -n -f moose\nFORMAT_RAMSIZE = | figlet | cowsay -n -f small\n\nSTM32LOADER_PATH = stmlib/programming/serial/\nOPENOCD_SCRIPTS_PATH = stmlib/programming/jtag/\n\n# ------------------------------------------------------------------------------\n# Files and directories for the user code\n# ------------------------------------------------------------------------------\n\nVPATH          = $(PACKAGES)\n\nCC_FILES       = $(notdir $(wildcard $(patsubst %,%/*.cc,$(PACKAGES))))\nC_FILES        = $(notdir $(wildcard $(patsubst %,%/*.c,$(PACKAGES))))\nAS_FILES       = $(notdir $(wildcard $(patsubst %,%/*.s,$(PACKAGES))))\n\nTARGET_BIN     = $(BUILD_DIR)$(TARGET).bin\nTARGET_ELF     = $(BUILD_DIR)$(TARGET).elf\nTARGET_HEX     = $(BUILD_DIR)$(TARGET).hex\nCOMBO_HEX      = $(BUILD_DIR)$(TARGET)_bootloader_combo.hex\nCOMBO_BIN      = $(BUILD_DIR)$(TARGET)_bootloader_combo.bin\nBOOTLOADER_HEX = $(BUILD_ROOT)$(BOOTLOADER)/$(BOOTLOADER).hex\nTARGET_SIZE    = $(BUILD_DIR)$(TARGET).size\nTARGETS        = $(BUILD_DIR)$(TARGET).*\nDEP_FILE       = $(BUILD_DIR)depends.mk\n\n# ------------------------------------------------------------------------------\n# Platform specific flags\n# ------------------------------------------------------------------------------\n\nifeq ($(FAMILY),f4xx)\n\nMODEL_DEFINE = STM32F40_41xxx -DSTM32F4XX -DARM_MATH_CM4 -D__FPU_PRESENT\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32f4xx.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32f4xx_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32F4xx_StdPeriph_Driver\nARCHFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb-interwork -funroll-loops\nARCH_DEFINE = GCC_ARMCM4\nOPENOCD_TARGET = f4x\n\nelse ifeq ($(FAMILY),f37x)\n\nMODEL_DEFINE = STM32F37X -DARM_MATH_CM4 -D__FPU_PRESENT\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32f37x.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32f373x_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32F37x_StdPeriph_Driver\nARCHFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb-interwork -funroll-loops --specs=nano.specs\nARCH_DEFINE = GCC_ARMCM4\nOPENOCD_TARGET = f3x\n\nelse ifeq ($(FAMILY),f0xx)\n\nMODEL_DEFINE = STM32F0XX\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32f0xx.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32f0xx_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32F0xx_StdPeriph_Driver\nARCHFLAGS = -mcpu=cortex-m0 -mthumb -mthumb-interwork -funroll-loops\nARCH_DEFINE = GCC_ARMCM0\nOPENOCD_TARGET = f0x\n\nelse ifeq ($(FAMILY),f7xx)\n\nMODEL_DEFINE = STM32F7XX -DSTM32F765xx -DARM_MATH_CM7 -D__FPU_PRESENT\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32f765xx.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32f7xx_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32F7xx_HAL_Driver\nARCHFLAGS = -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb-interwork -funroll-loops\nARCH_DEFINE = GCC_ARMCM7\nOPENOCD_TARGET = f7x\n\nelse ifeq ($(FAMILY),h7xx)\n\nMODEL_DEFINE = STM32H7XX -DSTM32H743xx -DARM_MATH_CM7 -D__FPU_PRESENT\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32h743xx.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32h7xx_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32H7xx_HAL_Driver\nARCHFLAGS = -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb-interwork -funroll-loops\nARCH_DEFINE = GCC_ARMCM7\nOPENOCD_TARGET = h7x_dual_bank\n\nelse ifeq ($(FAMILY),g4xx)\n\nMODEL_DEFINE = STM32G4XX -DSTM32G473xx -DARM_MATH_CM7 -D__FPU_PRESENT\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32g473xx.o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32g4xx_flash$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32G4xx_HAL_Driver\nARCHFLAGS = -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb-interwork -funroll-loops\nARCH_DEFINE = GCC_ARMCM7\nOPENOCD_TARGET = g4x\n\nelse\n\nifeq ($(DENSITY),hd)\nMODEL_DEFINE = STM32F10X_HD -DSTM32F10X\nelse ifeq ($(DENSITY),md)\nMODEL_DEFINE = STM32F10X_MD -DSTM32F10X\nelse\nMODEL_DEFINE = STM32F10X_CL -DSTM32F10X\nendif\n\nSTARTUP_OBJ   = $(BUILD_DIR)startup_stm32f10x_$(DENSITY).o\nLINKER_SCRIPT = stmlib/linker_scripts/stm32f10x_flash_$(DENSITY)$(LD_SUFFIX).ld\nFW_STDDRIVER_DIR = $(STM32_PATH)/STM32F10x_StdPeriph_Driver\nARCHFLAGS = -mcpu=cortex-m3 -mthumb -fno-unroll-loops\nARCH_DEFINE = GCC_ARMCM3\nOPENOCD_TARGET = f1x\n\nendif\n\nifeq ($(APPLICATION),TRUE)\nAPPLICATION_DEFINE = -DAPPLICATION\nLD_SUFFIX = _application\nBASE_ADDRESS = 0x08004000\nelse ifeq ($(APPLICATION_SMALL),TRUE)\nAPPLICATION_DEFINE = -DAPPLICATION\nLD_SUFFIX = _application_small\nBASE_ADDRESS = 0x08001000\nelse ifeq ($(APPLICATION_LARGE),TRUE)\nAPPLICATION_DEFINE = -DAPPLICATION\nLD_SUFFIX = _application_large\nBASE_ADDRESS = 0x08008000\nelse\nAPPLICATION_DEFINE = -DNO_APPLICATION\nLD_SUFFIX =\nBASE_ADDRESS = 0x08000000\nendif\n\nOPENOCD_TARGET_SCRIPT ?= target/stm32$(OPENOCD_TARGET).cfg\n\n# ------------------------------------------------------------------------------\n# Flags for gcc/binutils\n# ------------------------------------------------------------------------------\n\nINCFLAGS = \\\n\t\t\t-I. \\\n\t\t\t-D$(ARCH_DEFINE) \\\n\t\t\t-D$(MODEL_DEFINE) \\\n\t\t\t$(APPLICATION_DEFINE) \\\n\t\t\t$(PROJECT_CONFIGURATION) \\\n\t\t\t-DF_CPU=$(F_CPU) \\\n\t\t\t-DF_CRYSTAL=$(F_CRYSTAL) \\\n\t\t\t-DHSE_VALUE=$(F_CRYSTAL) \\\n\t\t\t-DUSE_STDPERIPH_DRIVER \\\n\t\t\t-D$(SYSCLOCK)=$(F_CPU)\n\nCCFLAGS = \\\n\t\t\t-g -O2 -Wall -Werror -Wno-unused-local-typedefs -Wno-strict-aliasing \\\n\t\t\t-fasm \\\n\t\t\t-finline \\\n\t\t\t-finline-functions-called-once \\\n\t\t\t-fdata-sections \\\n\t\t\t-ffunction-sections \\\n\t\t\t-fshort-enums \\\n\t\t\t-fno-move-loop-invariants \\\n\t\t\t-fno-unwind-tables \\\n\t\t\t$(INCFLAGS) \\\n\t\t\t$(ARCHFLAGS)\n\nCPPFLAGS = -fno-exceptions -fno-rtti\n\nASFLAGS = $(ARCHFLAGS)\n\nLDFLAGS = \\\n\t\t\t-Wl,-Map=$(BUILD_DIR)$(TARGET).map \\\n\t\t\t-Wl,--gc-sections \\\n\t\t\t-T $(LINKER_SCRIPT) \\\n\t\t\t$(ARCHFLAGS) \\\n\t\t\t$(INCFLAGS) \\\n\t\t\t-L$(STM32_PATH)\n\n\n# ------------------------------------------------------------------------------\n# Files and directories for the system firmware\n# ------------------------------------------------------------------------------\n\nFW_BUILD_DIR = $(BUILD_ROOT)stm_firmware/\nFW_CORE_DIR = $(STM32_PATH)/CMSIS/CM3_$(FAMILY)\nFW_STARTUP_DIR = $(FW_CORE_DIR)/startup/gcc\n\nFW_STDDRIVER_SRCDIR = $(FW_STDDRIVER_DIR)/src\nFW_STDDRIVER_INCDIR = $(FW_STDDRIVER_DIR)/inc\n\nFW_USB_DIR = $(STM32_PATH)/STM32_USB-FS-Device_Driver\nFW_USB_SRCDIR = $(FW_USB_DIR)/src\nFW_USB_INCDIR = $(FW_USB_DIR)/inc\n\nINCFLAGS += -I$(STM32_PATH) -I$(FW_CORE_DIR) -I$(FW_STARTUP_DIR) -I$(FW_STDDRIVER_INCDIR)\nVPATH += $(FW_CORE_DIR) $(FW_STARTUP_DIR) $(FW_STDDRIVER_SRCDIR) $(STM32_PATH) $(FW_BUILD_DIR)\n\nCORE_C_FILES = $(notdir $(wildcard $(patsubst %,%/*.c,$(FW_CORE_DIR))))\nDRIVERS_C_FILES = $(notdir $(wildcard $(patsubst %,%/*.c,$(FW_STDDRIVER_SRCDIR))))\nUSB_C_FILES = $(notdir $(wildcard $(patsubst %,%/*.c,$(FW_USB_SRCDIR))))\n\nC_FILES += $(CORE_C_FILES)\nC_FILES += $(DRIVERS_C_FILES)\n\nifeq ($(USB),enabled)\nINCFLAGS += -I$(FW_USB_INCDIR)\nVPATH += $(FW_USB_SRCDIR)\nC_FILES += $(USB_C_FILES)\nendif\n\n\n# ------------------------------------------------------------------------------\n# Source compiling and dependency analysis\n# ------------------------------------------------------------------------------\n\n$(BUILD_DIR)%.o: %.s\n\t$(CC) -c -x assembler-with-cpp $(ASFLAGS) $< -o $@\n\n$(BUILD_DIR)%.o: %.c\n\t$(CC) -c $(CCFLAGS) -std=c99 $< -o $@\n\n$(BUILD_DIR)%.o: %.cc\n\t$(CXX) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@\n\n$(BUILD_DIR)%.d: %.s\n\t$(CC) -c -x assembler-with-cpp -MM $(ASFLAGS) $< -MF $@ -MT $(@:.d=.o)\n\n$(BUILD_DIR)%.d: %.c\n\t$(CC) -MM $(CCFLAGS) $< -MF $@ -MT $(@:.d=.o)\n\n$(BUILD_DIR)%.d: %.cc\n\t$(CXX) -MM $(CCFLAGS) $(CPPFLAGS) $< -MF $@ -MT $(@:.d=.o)\n\n\n# ------------------------------------------------------------------------------\n# Object file conversion\n# ------------------------------------------------------------------------------\n\n$(BUILD_DIR)%.hex: $(BUILD_DIR)%.elf\n\t$(OBJCOPY) -O ihex $< $@\n\n$(BUILD_DIR)%.bin: $(BUILD_DIR)%.elf\n\t$(OBJCOPY) -O binary $< $@\n\n$(BUILD_DIR)%.lss: $(BUILD_DIR)%.elf\n\t$(OBJDUMP) -d -h -S $< > $@\n\n$(BUILD_DIR)%.sym: $(BUILD_DIR)%.elf\n\t$(NM) -n $< > $@\n\n\n# ------------------------------------------------------------------------------\n# What to build\n# ------------------------------------------------------------------------------\n\nOBJ_FILES      = $(CC_FILES:.cc=.o) $(C_FILES:.c=.o) $(AS_FILES:.s=.o)\nOBJS           = $(patsubst %,$(BUILD_DIR)%,$(OBJ_FILES)) $(STARTUP_OBJ)\nDEPS           = $(OBJS:.o=.d)\n\nall: $(BUILD_DIR) $(TARGET_HEX)\n\n\n# ------------------------------------------------------------------------------\n# Resources\n# ------------------------------------------------------------------------------\n\nRESOURCE_COMPILER = stmlib/tools/resources_compiler.py\n\nresources: $(TARGET)/resources.cc\n\n$(TARGET)/resources.cc: $(wildcard $(RESOURCES)/*.py)\n\t\tpython $(RESOURCE_COMPILER) $(RESOURCES)/resources.py\n\n\n# ------------------------------------------------------------------------------\n# Main rules\n# ------------------------------------------------------------------------------\n\n$(BUILD_DIR):\n\tmkdir -p $(BUILD_DIR)\n\n$(TARGET_ELF): $(OBJS)\n\t$(CC) $(LDFLAGS) -o $(TARGET_ELF) $(OBJS)\n\n$(DEP_FILE): $(BUILD_DIR) $(DEPS)\n\tcat $(DEPS) > $(DEP_FILE)\n\nbin: $(TARGET_BIN)\n\nhex: $(TARGET_HEX)\n\nclean:\n\t$(REMOVE) $(OBJS) $(TARGETS) $(DEP_FILE) $(DEPS)\n\ndepends: $(DEPS)\n\tcat $(DEPS) > $(DEP_FILE)\n\n$(TARGET_SIZE): $(TARGET_ELF)\n\t$(SIZE) $(TARGET_ELF) > $(TARGET_SIZE)\n\n$(BUILD_DIR)$(TARGET).top_symbols: $(TARGET_ELF)\n\t$(NM) $(TARGET_ELF) --size-sort -C -f bsd -r > $@\n\nsize: $(TARGET_SIZE)\n\tcat $(TARGET_SIZE) | awk '{ print $$1+$$2 }' | tail -n1 $(FORMAT_SIZE)\n\nramsize: $(TARGET_SIZE)\n\tcat $(TARGET_SIZE) | awk '{ print $$2+$$3 }' | tail -n1 $(FORMAT_RAMSIZE)\n\ndisassemble: build/$(TARGET)/$(TARGET).lss build/$(TARGET)/$(TARGET).top_symbols\n\n.PHONY: all bin clean depends resources\n\ninclude $(DEP_FILE)\n\n\n# ------------------------------------------------------------------------------\n# Bootloader merging\n# ------------------------------------------------------------------------------\n\n$(COMBO_BIN): $(TARGET_HEX) $(BOOTLOADER_HEX)\n\tcat\t$(TARGET_HEX) $(BOOTLOADER_HEX) | \\\n\t\t\tawk -f stmlib/programming/merge_hex.awk > $(COMBO_HEX)\n\t$(OBJCOPY) -I ihex -O binary $(COMBO_HEX) $(COMBO_BIN)\n\n\n# ------------------------------------------------------------------------------\n# Firmware flashing\n# ------------------------------------------------------------------------------\n\nBASE_JTAG_CMD = $(OPENOCD_BIN_PATH)openocd \\\n\t\t\t-s $(OPENOCD_SCRIPT_PATH) \\\n\t\t\t-f $(OPENOCD_INTERFACE_SCRIPT) \\\n\t\t\t-f $(OPENOCD_TARGET_SCRIPT) \\\n\t\t\t-c \"init\" -c \"halt\" -c \"sleep 200\"\n\nPOSTLUDE = -c \"sleep 200\" -c \"reset run\" -c \"shutdown\"\n\nupload: $(UPLOAD_COMMAND)\n\nimage_serial:\n\tpython $(STM32LOADER_PATH)stm32loader.py \\\n\t\t-p $(PGM_SERIAL_PORT) \\\n\t\t-b $(PGM_SERIAL_BAUD_RATE) \\\n\t\t-r -l 131072 image.bin\n\nupload_serial: $(TARGET_BIN)\n\tpython $(STM32LOADER_PATH)stm32loader.py \\\n\t\t-p $(PGM_SERIAL_PORT) \\\n\t\t-b $(PGM_SERIAL_BAUD_RATE) \\\n\t\t-e $(PGM_SERIAL_VERIFY) \\\n\t\t-a $(BASE_ADDRESS) \\\n\t\t-w $(TARGET_BIN)\n\nupload_serial_no_erase: $(TARGET_BIN)\n\tpython $(STM32LOADER_PATH)stm32loader.py \\\n\t\t-p $(PGM_SERIAL_PORT) \\\n\t\t-b $(PGM_SERIAL_BAUD_RATE) $(PGM_SERIAL_VERIFY)\\\n\t\t-a $(BASE_ADDRESS) \\\n\t\t-w $(TARGET_BIN)\n\nupload_combo_serial: $(COMBO_BIN)\n\tpython $(STM32LOADER_PATH)stm32loader.py \\\n\t\t-p $(PGM_SERIAL_PORT) \\\n\t\t-b $(PGM_SERIAL_BAUD_RATE) \\\n\t\t-e $(PGM_SERIAL_VERIFY) \\\n\t\t-w $(COMBO_BIN)\n\nupload_combo_serial_no_erase: $(COMBO_BIN)\n\tpython $(STM32LOADER_PATH)stm32loader.py \\\n\t\t-p $(PGM_SERIAL_PORT) \\\n\t\t-b $(PGM_SERIAL_BAUD_RATE) $(PGM_SERIAL_VERIFY)\\\n\t\t-w $(COMBO_BIN)\n\nimage_jtag:\n\t$(BASE_JTAG_CMD) \\\n\t\t-c \"dump_image image.bin 0x08000000 131072\" \\\n\t\t$(POSTLUDE)\n\nimage_jtag_256k:\n\t$(BASE_JTAG_CMD) \\\n\t\t-c \"dump_image image.bin 0x08000000 262144\" \\\n\t\t$(POSTLUDE)\n\nimage_jtag_1M:\n\t$(BASE_JTAG_CMD) \\\n\t\t-c \"dump_image image.bin 0x08000000 1048576\" \\\n\t\t$(POSTLUDE)\n\ndebug_server: $(TARGET_BIN)\n\t$(OPENOCD_BIN_PATH)openocd \\\n\t\t-s $(OPENOCD_SCRIPT_PATH) \\\n\t\t-f $(OPENOCD_INTERFACE_SCRIPT) \\\n\t\t-f $(OPENOCD_TARGET_SCRIPT) \\\n\t\t-c \"init;reset;halt\" \\\n\ndebug_client:\n\t$(DB) --eval-command=\"target remote localhost:3333\" $(TARGET_ELF)\n\nerase_jtag:\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-f $(OPENOCD_SCRIPTS_PATH)erase_$(FAMILY).cfg \\\n\t\t\t\t$(POSTLUDE)\n\nupload_jtag: $(TARGET_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-f $(OPENOCD_SCRIPTS_PATH)erase_$(FAMILY).cfg \\\n\t\t\t\t-c \"flash write_image erase $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_combo_jtag: $(COMBO_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-f $(OPENOCD_SCRIPTS_PATH)erase_$(FAMILY).cfg \\\n\t\t\t\t-c \"flash write_image erase $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_jtag_no_erase: $(TARGET_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash write_image erase $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_combo_jtag_no_erase: $(COMBO_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash write_image erase $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_jtag_erase_first: $(TARGET_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash erase_address 0x08000000 32768\" \\\n\t\t\t\t-c \"reset halt\" \\\n\t\t\t\t-c \"flash write_image erase $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_combo_jtag_erase_first: $(COMBO_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash erase_address 0x08000000 32768\" \\\n\t\t\t\t-c \"reset halt\" \\\n\t\t\t\t-c \"flash write_image erase $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_jtag_erase_first_sector: $(TARGET_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash erase_address 0x08000000 0x20000\" \\\n\t\t\t\t-c \"reset halt\" \\\n\t\t\t\t-c \"flash write_image erase $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(TARGET_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\nupload_combo_jtag_erase_first_sector: $(COMBO_BIN)\n\t$(BASE_JTAG_CMD) \\\n\t\t\t\t-c \"flash erase_address 0x08000000 0x20000\" \\\n\t\t\t\t-c \"reset halt\" \\\n\t\t\t\t-c \"flash write_image erase $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t-c \"verify_image $(COMBO_BIN) 0x08000000\" \\\n\t\t\t\t$(POSTLUDE)\n\n# Phony target for killing the system FTDI driver on OS X.\nkill_ftdi:\n\tsudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver\n\nreload_ftdi:\n\tsudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver\n\n.PHONY: upload\n\n.PHONY: image_serial\n.PHONY: upload_serial upload_serial_no_erase\n.PHONY: upload_combo_serial upload_combo_serial_no_erase\n\n.PHONY: image_jtag image_jtag_1M\n.PHONY: erase_jtag\n.PHONY: upload_jtag upload_jtag_no_erase upload_jtag_erase_first\n.PHONY: upload_combo_jtag upload_combo_jtag_no_erase upload_combo_jtag_erase_first\n\n.PHONY: kill_ftdi reload_ftdi\n.PHONY: debug_client debug_server\n"
  },
  {
    "path": "lib/stmlib/midi/midi.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Decoding of MIDI messages.\n\n#ifndef STMLIB_MIDI_H_\n#define STMLIB_MIDI_H_\n\nnamespace stmlib_midi {\n\nconst uint8_t kCCModulationWheelMsb = 0x01;\nconst uint8_t kCCBreathController = 0x02;\nconst uint8_t kCCFootPedalMsb = 0x04;\nconst uint8_t kCCPortamentoTimeMsb = 0x05;\nconst uint8_t kCCDataEntryMsb = 0x06;\nconst uint8_t kCCVolume = 0x07;\nconst uint8_t kCCBankLsb = 0x20;\nconst uint8_t kCCDataEntryLsb = 0x26;\nconst uint8_t kCCHoldPedal = 0x40;\nconst uint8_t kCCHarmonicIntensity = 0x47;\nconst uint8_t kCCRelease = 0x48;\nconst uint8_t kCCAttack = 0x49;\nconst uint8_t kCCBrightness = 0x4a;\nconst uint8_t kCCDataIncrement = 0x60;\nconst uint8_t kCCDataDecrement = 0x61;\nconst uint8_t kCCNrpnLsb = 0x62;\nconst uint8_t kCCNrpnMsb = 0x63;\nconst uint8_t kCCOmniModeOff = 0x7c;\nconst uint8_t kCCOmniModeOn = 0x7d;\nconst uint8_t kCCMonoModeOn = 0x7e;\nconst uint8_t kCCPolyModeOn = 0x7f;\n\ntemplate<typename Handler>\nclass MidiStreamParser {\n public:\n  MidiStreamParser() {\n    running_status_ = 0;\n    data_size_ = 0;\n    expected_data_size_ = 0;\n  }\n  void PushByte(uint8_t byte) {\n    // Active sensing messages are filtered at the source, the hard way...\n    if (byte == 0xfe) {\n      return;\n    }\n    Handler::RawByte(byte);\n    // Realtime messages are immediately passed-through, and do not modify the\n    // state of the parser.\n    if (byte >= 0xf8) {\n      MessageReceived(byte);\n    } else {\n      if (byte >= 0x80) {\n        uint8_t hi = byte & 0xf0;\n        uint8_t lo = byte & 0x0f;\n        data_size_ = 0;\n        expected_data_size_ = 1;\n        switch (hi) {\n          case 0x80:\n          case 0x90:\n          case 0xa0:\n          case 0xb0:\n            expected_data_size_ = 2;\n            break;\n          case 0xc0:\n          case 0xd0:\n            break;  // default data size of 1.\n          case 0xe0:\n            expected_data_size_ = 2;\n            break;\n          case 0xf0:\n            if (lo > 0 && lo < 3) {\n              expected_data_size_ = 2;\n            } else if (lo >= 4) {\n              expected_data_size_ = 0;\n            }\n            break;\n        }\n        if (byte == 0xf7) {\n          if (running_status_ == 0xf0) {\n            Handler::SysExEnd();\n          }\n          running_status_ = 0;\n        } else if (byte == 0xf0) {\n          running_status_ = 0xf0;\n          Handler::SysExStart();\n        } else {\n          running_status_ = byte;\n        }\n      } else {\n        data_[data_size_++] = byte;\n      }\n      if (data_size_ >= expected_data_size_) {\n        MessageReceived(running_status_);\n        data_size_ = 0;\n        if (running_status_ > 0xf0) {\n          expected_data_size_ = 0;\n          running_status_ = 0;\n        }\n      }\n    }\n  }\n\n private:\n  void MessageReceived(uint8_t status) {\n    if (!status) {\n      Handler::BozoByte(data_[0]);\n    }\n\n    uint8_t hi = status & 0xf0;\n    uint8_t lo = status & 0x0f;\n\n    // If this is a channel-specific message, check first that the receiver is\n    // tuned to this channel.\n    if (hi != 0xf0 && !Handler::CheckChannel(lo)) {\n      Handler::RawMidiData(status, data_, data_size_, 0);\n      return;\n    }\n    if (status != 0xf0 && status != 0xf7) {\n      Handler::RawMidiData(status, data_, data_size_, 1);\n    }\n    switch (hi) {\n      case 0x80:\n        Handler::NoteOff(lo, data_[0], data_[1]);\n        break;\n\n      case 0x90:\n        if (data_[1]) {\n          Handler::NoteOn(lo, data_[0], data_[1]);\n        } else {\n          Handler::NoteOff(lo, data_[0], 0);\n        }\n        break;\n\n      case 0xa0:\n        Handler::Aftertouch(lo, data_[0], data_[1]);\n        break;\n\n      case 0xb0:\n        Handler::ControlChange(lo, data_[0], data_[1]);\n        break;\n\n      case 0xc0:\n        Handler::ProgramChange(lo, data_[0]);\n        break;\n\n      case 0xd0:\n        Handler::Aftertouch(lo, data_[0]);\n        break;\n\n      case 0xe0:\n        Handler::PitchBend(lo, (static_cast<uint16_t>(data_[1]) << 7) + data_[0]);\n        break;\n\n      case 0xf0:\n        switch(lo) {\n          case 0x0:\n            Handler::SysExByte(data_[0]);\n            break;\n          case 0x1:\n          case 0x2:\n          case 0x3:\n          case 0x4:\n          case 0x5:\n          case 0x6:\n            // TODO(pichenettes): implement this if it makes sense.\n            break;\n          case 0x8:\n            Handler::Clock();\n            break;\n          case 0x9:\n            break;\n          case 0xa:\n            Handler::Start();\n            break;\n          case 0xb:\n            Handler::Continue();\n            break;\n          case 0xc:\n            Handler::Stop();\n            break;\n          case 0xf:\n            Handler::Reset();\n            break;\n        }\n        break;\n    }\n  }\n \n  uint8_t running_status_;\n  uint8_t data_[3];\n  uint8_t data_size_;  // Number of non-status byte received.\n  uint8_t expected_data_size_;  // Expected number of non-status bytes.\n\n  DISALLOW_COPY_AND_ASSIGN(MidiStreamParser);\n};\n\n}  // namespace stmlib_midi\n\n#endif // STMLIB_MIDI_H_"
  },
  {
    "path": "lib/stmlib/stmlib.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n\n#ifndef STMLIB_STMLIB_H_\n#define STMLIB_STMLIB_H_\n\n#include <inttypes.h>\n#include <stddef.h>\n#include <cmath>\n\n#ifndef NULL\n#define NULL 0\n#endif\n\n#ifndef M_PI\n#define M_PI (3.14159265358979323846)\n#endif\n\n#define DISALLOW_COPY_AND_ASSIGN(TypeName) \\\n  TypeName(const TypeName&);               \\\n  void operator=(const TypeName&)\n\n#define CLIP(x) if (x < -32767) x = -32767; if (x > 32767) x = 32767;\n\n#define CONSTRAIN(var, min, max) \\\n  if (var < (min)) { \\\n    var = (min); \\\n  } else if (var > (max)) { \\\n    var = (max); \\\n  }\n\n\n#define JOIN(lhs, rhs)    JOIN_1(lhs, rhs)\n#define JOIN_1(lhs, rhs)  JOIN_2(lhs, rhs)\n#define JOIN_2(lhs, rhs)  lhs##rhs\n\n#define STATIC_ASSERT(expression, message)\\\n  static_assert(expression, #message)\n\n#ifndef TEST\n#define IN_RAM __attribute__ ((section (\".ramtext\")))\n#else\n#define IN_RAM\n#endif  // TEST\n\n#define UNROLL2(x) x; x;\n#define UNROLL4(x) x; x; x; x;\n#define UNROLL8(x) x; x; x; x; x; x; x; x;\n\ntemplate<bool b>\ninline void StaticAssertImplementation() {\n\tchar static_assert_size_mismatch[b] = { 0 };\n}\n \nnamespace stmlib {\n\ntypedef union {\n  uint16_t value;\n  uint8_t bytes[2];\n} Word;\n\ntypedef union {\n  uint32_t value;\n  uint16_t words[2];\n  uint8_t bytes[4];\n} LongWord;\n\n\ntemplate<uint32_t a, uint32_t b, uint32_t c, uint32_t d>\nstruct FourCC {\n  static const uint32_t value = (((((d << 8) | c) << 8) | b) << 8) | a;\n};\n\n}  // namespace stmlib\n\n#endif   // STMLIB_STMLIB_H_\n"
  },
  {
    "path": "lib/stmlib/utils/buffer_allocator.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Stream buffer for serialization.\n\n#ifndef STMLIB_UTILS_BUFFER_ALLOCATOR_H_\n#define STMLIB_UTILS_BUFFER_ALLOCATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nclass BufferAllocator {\n public:\n  BufferAllocator() { }\n  ~BufferAllocator() { }\n  \n  BufferAllocator(void* buffer, size_t size) {\n    Init(buffer, size);\n  }\n  \n  inline void Init(void* buffer, size_t size) {\n    buffer_ = static_cast<uint8_t*>(buffer);\n    size_ = size;\n    Free();\n  }\n  \n  template<typename T>\n  inline T* Allocate(size_t size) {\n    size_t size_bytes = sizeof(T) * size;\n    if (size_bytes <= free_) {\n      T* start = static_cast<T*>(static_cast<void*>(next_));\n      next_ += size_bytes;\n      free_ -= size_bytes;\n      return start;\n    } else {\n      return NULL;\n    }\n  }\n  \n  inline void Free() {\n    next_ = buffer_;\n    free_ = size_;\n  }\n  \n  inline size_t free() const { return free_; }\n\n private:\n  uint8_t* next_;\n  uint8_t* buffer_;\n  size_t free_;\n  size_t size_;\n\n  DISALLOW_COPY_AND_ASSIGN(BufferAllocator);\n};\n\n}  // namespace stmlib\n\n#endif   // STMLIB_UTILS_STREAM_BUFFER_H_\n"
  },
  {
    "path": "lib/stmlib/utils/crc32.h",
    "content": "/*-\n *  COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or\n *  code or tables extracted from it, as desired without restriction.\n *\n *  First, the polynomial itself and its table of feedback terms.  The\n *  polynomial is\n *  X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0\n *\n *  Note that we take it \"backwards\" and put the highest-order term in\n *  the lowest-order bit.  The X^32 term is \"implied\"; the LSB is the\n *  X^31 term, etc.  The X^0 term (usually shown as \"+1\") results in\n *  the MSB being 1\n *\n *  Note that the usual hardware shift register implementation, which\n *  is what we're using (we're merely optimizing it by doing eight-bit\n *  chunks at a time) shifts bits into the lowest-order term.  In our\n *  implementation, that means shifting towards the right.  Why do we\n *  do it this way?  Because the calculated CRC must be transmitted in\n *  order from highest-order term to lowest-order term.  UARTs transmit\n *  characters in order from LSB to MSB.  By storing the CRC this way\n *  we hand it to the UART in the order low-byte to high-byte; the UART\n *  sends each low-bit to hight-bit; and the result is transmission bit\n *  by bit from highest- to lowest-order term without requiring any bit\n *  shuffling on our part.  Reception works similarly\n *\n *  The feedback terms table consists of 256, 32-bit entries.  Notes\n *\n *      The table can be generated at runtime if desired; code to do so\n *      is shown later.  It might not be obvious, but the feedback\n *      terms simply represent the results of eight shift/xor opera\n *      tions for all combinations of data and CRC register values\n *\n *      The values must be right-shifted by eight bits by the \"updcrc\n *      logic; the shift must be unsigned (bring in zeroes).  On some\n *      hardware you could probably optimize the shift in assembler by\n *      using byte-swap instructions\n *      polynomial $edb88320\n *\n *\n * CRC32 code derived from work by Gary S. Brown.\n */\n\n#include <stdint.h>\n#include <stddef.h>\n\nstatic uint32_t crc32_tab[] = {\n\t0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,\n\t0xe963a535, 0x9e6495a3,\t0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,\n\t0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,\n\t0xf3b97148, 0x84be41de,\t0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,\n\t0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,\t0x14015c4f, 0x63066cd9,\n\t0xfa0f3d63, 0x8d080df5,\t0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,\n\t0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,\t0x35b5a8fa, 0x42b2986c,\n\t0xdbbbc9d6, 0xacbcf940,\t0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,\n\t0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,\n\t0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,\n\t0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,\t0x76dc4190, 0x01db7106,\n\t0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,\n\t0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,\n\t0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,\n\t0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,\n\t0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,\n\t0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,\n\t0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,\n\t0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,\n\t0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,\n\t0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,\n\t0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,\n\t0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,\n\t0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,\n\t0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,\n\t0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,\n\t0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,\n\t0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,\n\t0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,\n\t0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,\n\t0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,\n\t0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,\n\t0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,\n\t0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,\n\t0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,\n\t0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,\n\t0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,\n\t0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,\n\t0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,\n\t0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,\n\t0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,\n\t0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,\n\t0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d\n};\n\nuint32_t crc32(uint32_t crc, const void *buf, size_t size) {\n\tconst uint8_t *p;\n\n\tp = static_cast<const uint8_t*>(buf);\n\tcrc = crc ^ ~0U;\n\n\twhile (size--)\n\t\tcrc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);\n\n\treturn crc ^ ~0U;\n}\n"
  },
  {
    "path": "lib/stmlib/utils/dsp.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// A set of basic operands, especially useful for fixed-point arithmetic, with\n// fast ASM implementations.\n\n#ifndef STMLIB_UTILS_DSP_H_\n#define STMLIB_UTILS_DSP_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\ninline int16_t Interpolate824(const int16_t* table, uint32_t phase)\n  __attribute__((always_inline));\n\ninline uint16_t Interpolate824(const uint16_t* table, uint32_t phase)\n  __attribute__((always_inline));\n\ninline int16_t Interpolate824(const uint8_t* table, uint32_t phase)\n  __attribute__((always_inline));\n\ninline uint16_t Interpolate88(const uint16_t* table, uint16_t index)\n  __attribute__((always_inline));\n\ninline int16_t Interpolate88(const int16_t* table, uint16_t index)\n  __attribute__((always_inline));\n\ninline int16_t Interpolate1022(const int16_t* table, uint32_t phase)\n  __attribute__((always_inline));\n\ninline int16_t Interpolate115(const int16_t* table, uint32_t phase)\n  __attribute__((always_inline));\n\ninline int16_t Crossfade(\n    const int16_t* table_a,\n    const int16_t* table_b,\n    uint32_t phase,\n    uint16_t balance)\n  __attribute__((always_inline));\n\ninline int16_t Crossfade(\n    const uint8_t* table_a,\n    const uint8_t* table_b,\n    uint32_t phase,\n    uint16_t balance)\n  __attribute__((always_inline));\n\ninline int16_t Crossfade1022(\n    const uint8_t* table_a,\n    const uint8_t* table_b,\n    uint32_t phase,\n    uint16_t balance)\n  __attribute__((always_inline));\n\ninline int16_t Crossfade115(\n    const uint8_t* table_a,\n    const uint8_t* table_b,\n    uint16_t phase,\n    uint16_t balance)\n  __attribute__((always_inline));\n\ninline int16_t Mix(int16_t a, int16_t b, uint16_t balance) {\n  return (a * (65535 - balance) + b * balance) >> 16;\n}\n\ninline uint16_t Mix(uint16_t a, uint16_t b, uint16_t balance) {\n  return (a * (65535 - balance) + b * balance) >> 16;\n}\n\ninline int16_t Interpolate824(const int16_t* table, uint32_t phase) {\n  int32_t a = table[phase >> 24];\n  int32_t b = table[(phase >> 24) + 1];\n  return a + ((b - a) * static_cast<int32_t>((phase >> 8) & 0xffff) >> 16);\n}\n\ninline uint16_t Interpolate824(const uint16_t* table, uint32_t phase) {\n  uint32_t a = table[phase >> 24];\n  uint32_t b = table[(phase >> 24) + 1];\n  return a + ((b - a) * static_cast<uint32_t>((phase >> 8) & 0xffff) >> 16);\n}\n\ninline int16_t Interpolate824(const uint8_t* table, uint32_t phase) {\n  int32_t a = table[phase >> 24];\n  int32_t b = table[(phase >> 24) + 1];\n  return (a << 8) + \\\n      ((b - a) * static_cast<int32_t>(phase & 0xffffff) >> 16) - 32768;\n}\n\ninline uint16_t Interpolate88(const uint16_t* table, uint16_t index) {\n  int32_t a = table[index >> 8];\n  int32_t b = table[(index >> 8) + 1];\n  return a + ((b - a) * static_cast<int32_t>(index & 0xff) >> 8);\n}\n\ninline int16_t Interpolate88(const int16_t* table, uint16_t index) {\n  int32_t a = table[index >> 8];\n  int32_t b = table[(index >> 8) + 1];\n  return a + ((b - a) * static_cast<int32_t>(index & 0xff) >> 8);\n}\n\ninline int16_t Interpolate1022(const int16_t* table, uint32_t phase) {\n  int32_t a = table[phase >> 22];\n  int32_t b = table[(phase >> 22) + 1];\n  return a + ((b - a) * static_cast<int32_t>((phase >> 6) & 0xffff) >> 16);\n}\n\ninline int16_t Interpolate115(const int16_t* table, uint16_t phase) {\n  int32_t a = table[phase >> 5];\n  int32_t b = table[(phase >> 5) + 1];\n  return a + ((b - a) * static_cast<int32_t>(phase & 0x1f) >> 5);\n}\n\ninline int16_t Crossfade(\n    const int16_t* table_a,\n    const int16_t* table_b,\n    uint32_t phase,\n    uint16_t balance) {\n  int32_t a = Interpolate824(table_a, phase);\n  int32_t b = Interpolate824(table_b, phase);\n  return a + ((b - a) * static_cast<int32_t>(balance) >> 16);\n}\n\ninline int16_t Crossfade(\n    const uint8_t* table_a,\n    const uint8_t* table_b,\n    uint32_t phase,\n    uint16_t balance) {\n  int32_t a = Interpolate824(table_a, phase);\n  int32_t b = Interpolate824(table_b, phase);\n  return a + ((b - a) * static_cast<int32_t>(balance) >> 16);\n}\n\ninline int16_t Crossfade1022(\n    const int16_t* table_a,\n    const int16_t* table_b,\n    uint32_t phase,\n    uint16_t balance) {\n  int32_t a = Interpolate1022(table_a, phase);\n  int32_t b = Interpolate1022(table_b, phase);\n  return a + ((b - a) * static_cast<int32_t>(balance) >> 16);\n}\n\ninline int16_t Crossfade115(\n    const int16_t* table_a,\n    const int16_t* table_b,\n    uint16_t phase,\n    uint16_t balance) {\n  int32_t a = Interpolate115(table_a, phase);\n  int32_t b = Interpolate115(table_b, phase);\n  return a + ((b - a) * static_cast<int32_t>(balance) >> 16);\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_UTILS_DSP_H_"
  },
  {
    "path": "lib/stmlib/utils/gate_flags.h",
    "content": "// Copyright 2017 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Gate bits are pre-processed to tag edges. A typical gate sequence is:\n//\n//           ------------\n//           \n// ----------            ----------\n//                                 \n// 00000000003111111111114000000000\n//  ^        ^   ^       ^\n//  |        |   |       |\n//  |        |   |      GATE_FLAG_FALLING\n//  |        |   |\n//  |        |  GATE_FLAG_HIGH\n//  |        |\n//  |       GATE_FLAG_HIGH | GATE_FLAG_RISING\n//  |\n// GATE_FLAG_LOW\n\n#ifndef STMLIB_UTILS_GATE_FLAGS_H_\n#define STMLIB_UTILS_GATE_FLAGS_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nenum GateFlagsBits {\n  GATE_FLAG_LOW = 0,\n  GATE_FLAG_HIGH = 1,\n  GATE_FLAG_RISING = 2,\n  GATE_FLAG_FALLING = 4,\n};\n\ntypedef uint8_t GateFlags;\n\ninline GateFlags ExtractGateFlags(GateFlags previous, bool current) {\n  previous &= GATE_FLAG_HIGH;\n  if (current) {\n    return previous ? GATE_FLAG_HIGH : (GATE_FLAG_RISING | GATE_FLAG_HIGH);\n  } else {\n    return previous ? GATE_FLAG_FALLING : GATE_FLAG_LOW;\n  }\n}\n\n}  // namespace stmlib\n\n#endif  // STMLIB_UTILS_GATE_FLAGS_H_\n"
  },
  {
    "path": "lib/stmlib/utils/murmurhash3.h",
    "content": "//-----------------------------------------------------------------------------\n// MurmurHash3 was written by Austin Appleby, and is placed in the public\n// domain. The author hereby disclaims copyright to this source code.\n//-----------------------------------------------------------------------------\n\nuint32_t rotl32 ( uint32_t x, int8_t r )\n{\n  return (x << r) | (x >> (32 - r));\n}\n\nuint32_t fmix32 ( uint32_t h )\n{\n  h ^= h >> 16;\n  h *= 0x85ebca6b;\n  h ^= h >> 13;\n  h *= 0xc2b2ae35;\n  h ^= h >> 16;\n\n  return h;\n}\n\nvoid MurmurHash3_x86_32 ( const void * key, int len,\n                          uint32_t seed, void * out )\n{\n  const uint8_t * data = (const uint8_t*)key;\n  const int nblocks = len / 4;\n\n  uint32_t h1 = seed;\n\n  const uint32_t c1 = 0xcc9e2d51;\n  const uint32_t c2 = 0x1b873593;\n\n  //----------\n  // body\n\n  const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);\n\n  for(int i = -nblocks; i; i++)\n  {\n    uint32_t k1 = blocks[i];\n\n    k1 *= c1;\n    k1 = rotl32(k1,15);\n    k1 *= c2;\n    \n    h1 ^= k1;\n    h1 = rotl32(h1,13); \n    h1 = h1*5+0xe6546b64;\n  }\n\n  //----------\n  // tail\n\n  const uint8_t * tail = (const uint8_t*)(data + nblocks*4);\n\n  uint32_t k1 = 0;\n\n  switch(len & 3)\n  {\n  case 3: k1 ^= tail[2] << 16;\n  case 2: k1 ^= tail[1] << 8;\n  case 1: k1 ^= tail[0];\n          k1 *= c1; k1 = rotl32(k1,15); k1 *= c2; h1 ^= k1;\n  };\n\n  //----------\n  // finalization\n\n  h1 ^= len;\n\n  h1 = fmix32(h1);\n\n  *(uint32_t*)out = h1;\n}\n"
  },
  {
    "path": "lib/stmlib/utils/random.cc",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Random number generator.\n\n#include \"stmlib/utils/random.h\"\n\nnamespace stmlib {\n\n/* static */\nuint32_t Random::rng_state_ = 0x21;\n\n}  // namespace stmlib\n"
  },
  {
    "path": "lib/stmlib/utils/random.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Fast 16-bit pseudo random number generator.\n\n#ifndef STMLIB_UTILS_RANDOM_H_\n#define STMLIB_UTILS_RANDOM_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace stmlib {\n\nclass Random {\n public:\n  static inline uint32_t state() { return rng_state_; }\n\n  static inline void Seed(uint32_t seed) {\n    rng_state_ = seed;\n  }\n\n  static inline uint32_t GetWord() {\n    rng_state_ = rng_state_ * 1664525L + 1013904223L;\n    return state();\n  }\n  \n  static inline int16_t GetSample() {\n    return static_cast<int16_t>(GetWord() >> 16);\n  }\n\n  static inline float GetFloat() {\n    return static_cast<float>(GetWord()) / 4294967296.0f;\n  }\n\n private:\n  static uint32_t rng_state_;\n\n  DISALLOW_COPY_AND_ASSIGN(Random);\n};\n\n}  // namespace stmlib\n\n#endif  // STMLIB_UTILS_RANDOM_H_\n"
  },
  {
    "path": "lib/stmlib/utils/ring_buffer.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Basic ringbuffer template\n\n#ifndef STMLIB_UTILS_RING_BUFFER_H_\n#define STMLIB_UTILS_RING_BUFFER_H_\n\n#include \"stmlib/stmlib.h\"\n#include <algorithm>\n\nnamespace stmlib {\n\ntemplate<typename T, size_t size>\nclass RingBuffer {\n public:\n  RingBuffer() { }\n  \n  inline void Init() {\n    read_ptr_ = write_ptr_ = 0;\n  }\n  \n  inline size_t capacity() const { return size; }\n  \n  inline size_t writable() const {\n    return (read_ptr_ - write_ptr_ - 1) % size;\n  }\n  \n  inline size_t readable() const {\n    return (write_ptr_ - read_ptr_) % size;\n  }\n  \n  inline void Write(T v) {\n    while (!writable());\n    Overwrite(v);\n  }\n  \n  inline void Overwrite(T v) {\n    size_t w = write_ptr_;\n    buffer_[w] = v;\n    write_ptr_ = (w + 1) % size;\n  }\n\n  inline T* OverwritePtr(size_t n) {\n    size_t w = write_ptr_;\n    T* v = &buffer_[w];\n\n    if((w + n) <= size)\n    {\n      write_ptr_ = (w + n) % size;\n      return v;\n    }\n\n    return nullptr;\n  }\n\n  inline T Read() {\n    while (!readable());\n    return ImmediateRead();\n  }\n  \n  inline T ImmediateRead() {\n    size_t r = read_ptr_;\n    T result = buffer_[r];\n    read_ptr_ = (r + 1) % size;\n    return result;\n  }\n  \n  inline const T* ImmediateReadPtr(size_t n) {\n    size_t r = read_ptr_;\n    const T* result = &buffer_[r];\n    \n    if((r + n) <= size)\n    {\n      read_ptr_ = (r + n) % size;\n      return result;\n    }\n    return nullptr;\n  }\n \n  inline void Flush() {\n    write_ptr_ = read_ptr_;\n  }\n  \n  inline void Swallow(size_t n) {\n    // Read enough samples to make it possible to read 1 sample.\n    if (writable() >= n) {\n      return;\n    }\n    read_ptr_ = (write_ptr_ + 1 + n) % size;\n  }\n  \n  inline void ImmediateRead(T* destination, size_t num_elements) {\n    size_t r = read_ptr_;\n    size_t read = num_elements;\n\n    if (r + read > size) {\n      read = size - r;\n    }\n    std::copy(&buffer_[r], &buffer_[r + read], destination);\n    if (read != num_elements) {\n      std::copy(&buffer_[0], &buffer_[num_elements - read], destination + read);\n    }\n    read_ptr_ = (r + num_elements) % size;\n  }\n\n  inline void Overwrite(const T* source, size_t num_elements) {\n    size_t w = write_ptr_;\n    size_t written = num_elements;\n\n    if (w + written > size) {\n      written = size - w;\n    }\n    std::copy(source, source + written, &buffer_[w]);\n    if (written != num_elements) {\n      std::copy(source + written, source + num_elements, &buffer_[0]);\n    }\n    \n    write_ptr_ = (w + num_elements) % size;\n  }\n  \n private:\n  T buffer_[size];\n  volatile size_t read_ptr_;\n  volatile size_t write_ptr_;\n\n  DISALLOW_COPY_AND_ASSIGN(RingBuffer);\n};\n\ntemplate<typename T>\nclass RingBuffer<T, 0> {\n public:\n  RingBuffer() { }\n  \n  inline void Init() { }\n  inline size_t capacity() const { return 0; }\n  inline size_t writable() const { return 0; }\n  inline size_t readable() const { return 0; }\n  inline void Write(T v) { }\n  inline void Overwrite(T v) { }\n  inline T Read() { return T(0); }\n  inline T ImmediateRead() { return T(0); }\n  inline void Flush() { }\n  inline void ImmediateRead(T* destination, size_t num_elements) { }\n  inline void Overwrite(const T* source, size_t num_elements) { }\n\n private:\n  DISALLOW_COPY_AND_ASSIGN(RingBuffer);\n};\n\n}  // namespace stmlib\n\n#endif   // STMLIB_UTILS_RING_BUFFER_H_\n"
  },
  {
    "path": "lib/stmlib/utils/stream_buffer.h",
    "content": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Stream buffer for serialization.\n\n#ifndef STMLIB_UTILS_STREAM_BUFFER_H_\n#define STMLIB_UTILS_STREAM_BUFFER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstring>\n#include <algorithm>\n\nnamespace stmlib {\n\ntemplate<size_t buffer_size>\nclass StreamBuffer {\n public:\n  StreamBuffer() { Clear(); }\n  \n  void Clear() {\n    ptr_ = 0;\n    std::fill(&buffer_[0], &buffer_[buffer_size], 0);\n  }\n  \n  inline size_t position() const {\n    return ptr_;\n  }\n\n  inline const uint8_t* bytes() const {\n    return buffer_;\n  }\n\n  inline uint8_t* mutable_bytes() {\n    return buffer_;\n  }\n\n  void Write(const void* data, size_t size) {\n    if (ptr_ + size > buffer_size) {\n      return;\n    }\n    memcpy(&buffer_[ptr_], data, size);\n    ptr_ += size;\n  }\n  \n  template<typename T>\n  void Write(const T& value) {\n    Write(&value, sizeof(T));\n  }\n\n  template<typename T>\n  void Read(T* value) {\n    if (ptr_ + sizeof(T) > buffer_size) {\n      return;\n    }\n    memcpy((void*)value, &buffer_[ptr_], sizeof(T));\n    ptr_ += sizeof(T);\n  }\n  \n  inline void Seek(size_t position) {\n    ptr_ = position;\n  }\n  \n  inline void Rewind() { Seek(0); }\n\n private:\n  uint8_t buffer_[buffer_size];\n  size_t ptr_;\n\n  DISALLOW_COPY_AND_ASSIGN(StreamBuffer);\n};\n\n}  // namespace stmlib\n\n#endif   // STMLIB_UTILS_STREAM_BUFFER_H_\n"
  },
  {
    "path": "lib/streams/audio_cv_meter.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Discriminate an ADC signal into audio or CV ; and provide RMS stats.\n\n#ifndef STREAMS_AUDIO_CV_METER_H_\n#define STREAMS_AUDIO_CV_METER_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace streams {\n\nclass AudioCvMeter {\n public:\n  AudioCvMeter() { }\n  ~AudioCvMeter() { }\n  \n  void Init() {\n    peak_ = 0;\n    \n    zero_crossing_interval_ = 0;\n    average_zero_crossing_interval_ = 0;\n\n    previous_sample_ = 0;\n    cv_ = false;\n  }\n  \n  void Process(int32_t sample) {\n    if ((sample >> 1) * previous_sample_ < 0 ||\n        zero_crossing_interval_ >= 4096) {\n      int32_t error = zero_crossing_interval_ - average_zero_crossing_interval_;\n      average_zero_crossing_interval_ += error >> 3;\n      zero_crossing_interval_ = 0;\n    } else {\n      ++zero_crossing_interval_;\n    }\n    \n    if (cv_ && average_zero_crossing_interval_ < 200) {\n      cv_ = false;\n    } else if (!cv_ && average_zero_crossing_interval_ > 400) {\n      cv_ = true;\n    }\n    \n    previous_sample_ = sample;\n    \n    if (sample < 0) {\n      sample = -sample;\n    }\n    int32_t error = sample - peak_;\n    int32_t coefficient = 33;  // 250ms at 1kHz\n    if (error > 0) {\n      coefficient = 809;  // 10ms at 1kHz\n    }\n    peak_ += error * coefficient >> 15;\n  }\n  \n  inline bool cv() const { return cv_; }\n  inline int32_t peak() const { return peak_; }\n\n private:\n  bool cv_;\n  int32_t peak_;\n  int32_t zero_crossing_interval_;\n  int32_t average_zero_crossing_interval_;\n  int32_t previous_sample_;\n  \n  DISALLOW_COPY_AND_ASSIGN(AudioCvMeter);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_AUDIO_CV_METER_H_\n"
  },
  {
    "path": "lib/streams/compressor.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Compressor.\n\n#include \"streams/compressor.h\"\n\n// #include <cmath>\n\n#include \"stmlib/utils/dsp.h\"\n\nnamespace streams {\n\nusing namespace stmlib;\n\n// 256 LSB <=> 1.55dB\nconst int32_t kGainConstant = 1 / (1.55 / 6.0 * 65536.0 / 256.0) * 65536;\n\nvoid Compressor::Init() {\n  detector_ = 0;\n}\n\n/* static */\nint32_t Compressor::Log2(int32_t value) {\n  if (value <= 0) {\n    value = 1;\n  }\n  int32_t log_value = 0;\n  while (value >= 512) {\n    value >>= 1;\n    log_value += 65536;\n  }\n  while (value < 256) {\n    value <<= 1;\n    log_value -= 65536;\n  }\n  // Value is between 256 and 512, we can use the LUT.\n  return log_value + lut_log2[value - 256];\n}\n\n/* static */\nint32_t Compressor::Exp2(int32_t value) {\n  int32_t num_shifts = 0;\n  while (value >= 65536) {\n    ++num_shifts;\n    value -= 65536;\n  }\n  while (value < 0) {\n    --num_shifts;\n    value += 65536;\n  }\n  \n  // Value is between 0 and 65535, we can use the LUT.\n  int32_t a = lut_exp2[value >> 8];\n  int32_t b = lut_exp2[(value >> 8) + 1];\n  int32_t mantissa = a + ((b - a) * (value & 0xff) >> 8);\n  return num_shifts >= 0 ? mantissa << num_shifts : mantissa >> -num_shifts;\n}\n\n/* static */\nint32_t Compressor::Compress(\n    int32_t squared_level,\n    int32_t threshold,\n    int32_t ratio,\n    bool soft_knee) {\n  int32_t level = (Log2(squared_level) >> 1) - 15 * 65536;  // 15-bit peak\n  int32_t position = level - threshold;\n  \n  if (position < 0) {\n    return 0;\n  }\n  \n  int32_t attenuation = position - (position * ratio >> 8);\n  if (attenuation < 65535 && soft_knee) {\n    int32_t a = lut_soft_knee[attenuation >> 8];\n    int32_t b = lut_soft_knee[(attenuation >> 8) + 1];\n    int32_t soft_knee = a + ((b - a) * (attenuation & 0xff) >> 8);\n    attenuation += \\\n        (soft_knee - attenuation) * ((65535 - attenuation) >> 1) >> 15;\n  }\n  return -attenuation;\n}\n\nvoid Compressor::Process(\n    int16_t audio,\n    int16_t excite,\n    uint16_t* gain,\n    uint16_t* frequency) {\n  int32_t energy;\n  int64_t error;\n  \n  // Detect the RMS level on the EXCITE input.\n  energy = excite;\n  energy *= energy;\n  error = energy - sidechain_signal_detector_;\n  if (error > 0) {\n    sidechain_signal_detector_ += error;\n  } else {\n    // Decay time: 5s.\n    sidechain_signal_detector_ += error * 14174 >> 31;\n  }\n  \n  // If there is no signal on the \"excite\" input, disable sidechain and\n  // compress by metering input.\n  if (sidechain_signal_detector_ < (1024 * 1024)) {\n    energy = audio;\n    energy *= energy;\n  }\n  \n  // Detect the RMS level on the EXCITE or AUDIO input - whichever active.\n  error = energy - detector_;\n  if (error > 0) {\n    if (attack_coefficient_ == -1) {\n      detector_ += error;\n    } else {\n      detector_ += error * attack_coefficient_ >> 31;\n    }\n  } else {\n    detector_ += error * decay_coefficient_ >> 31;\n  }\n  \n  int32_t g = Compress(detector_, threshold_, ratio_, soft_knee_);\n  gain_reduction_ = g >> 3;\n  g = kUnityGain + ((g + makeup_gain_) * kGainConstant >> 16);\n  if (g > 65535) {\n    g = 65535;\n  }\n  \n  *gain = g;\n  // float ogain = powf(10.0f, 1.55f / 20.0f * (g - kUnityGain) / 256.0f);\n  // printf(\"%f %f\\n\", gain_reduction_ / 32768.0 * 24, 20 * logf(ogain) / logf(10.0f));\n  *frequency = 65535;\n}\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/compressor.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Compressor.\n\n#ifndef STREAMS_COMPRESSOR_H_\n#define STREAMS_COMPRESSOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include <cstdio>\n\n#include \"streams/gain.h\"\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nclass Compressor {\n public:\n  Compressor() { }\n  ~Compressor() { }\n  \n  void Init();\n  \n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency);\n  \n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    uint16_t attack_time;\n    uint16_t decay_time;\n    uint16_t amount;\n    uint16_t threshold;\n    \n    if (globals) {\n      attack_time = globals[0] * (128 + 128 + 99) >> 16;  // 1ms to 500ms\n      decay_time = 128 + 99 + (globals[2] >> 8);  // 50ms to 5000ms\n      threshold = globals[1];\n      amount = globals[3];\n    } else {\n      attack_time = !alternate ? 1 : 40;  // 0.2ms or 2ms;\n      decay_time = !alternate ? 279 : 236;  // 150ms or 70ms;\n      threshold = parameters[0];\n      amount = parameters[1];\n    }\n    \n    attack_coefficient_ = lut_lp_coefficients[attack_time];\n    decay_coefficient_ = lut_lp_coefficients[decay_time];\n    soft_knee_ = alternate;\n    threshold_ = (-1280 + 5 * (threshold >> 8)) << 8;\n    \n    if (amount < 32768) {\n      // Compression with no makeup gain.\n      ratio_ = lut_compressor_ratio[(32767 - amount) >> 7];\n      makeup_gain_ = 0;\n    } else {\n      // Adaptive compression with makeup gain.\n      amount -= 32768;\n\n      int32_t max_gain, knee_gain;\n      max_gain = kMaxExponentialGain;\n      makeup_gain_ = amount * (max_gain >> 8) >> 7;\n      knee_gain = threshold_+ makeup_gain_;\n      if (knee_gain >= 0) {\n        makeup_gain_ = -threshold_;\n        knee_gain = 0;\n      }\n      \n      if (knee_gain > -4096) {\n        // So intense! Brickwall limiter mode. In this case, we use an\n        // instant attack to tame transients as soon as they appear.\n        ratio_ = 0;  \n        attack_coefficient_ = -1;\n      } else {\n        ratio_ = knee_gain / (threshold_ >> 8);\n      }\n    }\n  }\n  \n  inline int32_t gain_reduction() const { return gain_reduction_; }\n  \n private:\n  static int32_t Log2(int32_t value);\n  static int32_t Exp2(int32_t value);\n  static int32_t Compress(\n      int32_t squared_level,\n      int32_t threshold,\n      int32_t ratio,\n      bool soft_knee);\n\n  int32_t ratio_; // Reciprocal of the ratio, 8:8\n  int32_t threshold_;\n  int32_t makeup_gain_;\n\n  bool soft_knee_;\n\n  int64_t attack_coefficient_;\n  int64_t decay_coefficient_;\n  int64_t detector_;\n  int64_t sidechain_signal_detector_;\n  int32_t gain_reduction_;\n\n  DISALLOW_COPY_AND_ASSIGN(Compressor);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_COMPRESSOR_H_\n"
  },
  {
    "path": "lib/streams/envelope.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple AD envelope - adapted from Peaks' multistage envelope.\n\n#include \"streams/envelope.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"streams/resources.h\"\n\n#include \"streams/gain.h\"\n\n#include <algorithm>\n\nnamespace streams {\n\nusing namespace std;\nusing namespace stmlib;\n\nvoid Envelope::Init() {\n  fill(&shape_[0], &shape_[kMaxNumSegments], ENV_SHAPE_LINEAR);\n  set_ad(0, 8192);\n  segment_ = num_segments_;\n  phase_ = 0;\n  phase_increment_ = 0;\n  start_value_ = 0;\n  value_ = 0;\n  rate_modulation_ = 0;\n  gate_level_ = 0;\n  gate_ = false;\n  hard_reset_ = false;\n  attack_ = 0;\n  decay_ = 0;\n}\n\nvoid Envelope::Process(\n    int16_t audio,\n    int16_t excite,\n    uint16_t* gain,\n    uint16_t* frequency) {\n  // Smooth frequency amount parameters.\n  frequency_amount_ += (target_frequency_amount_ - frequency_amount_) >> 8;\n  frequency_offset_ += (target_frequency_offset_ - frequency_offset_) >> 8;\n\n  bool trigger = false;\n  bool release = false;\n  if (gate_ == false) {\n    if (excite > kSchmittTriggerThreshold) {\n      trigger = true;\n      gate_ = true;\n      set_hard_reset(false);\n    }\n  } else {\n    if (excite < (kSchmittTriggerThreshold >> 1)) {\n      gate_ = false;\n      release = false;\n    } else {\n      // Track the level of the signal while the GATE is held.\n      gate_level_ += (excite - gate_level_) >> 8;\n    }\n  }\n  if (trigger) {\n    start_value_ = (segment_ == num_segments_ || hard_reset_)\n        ? level_[0]\n        : value_;\n    segment_ = 0;\n    phase_ = 0;\n  } else if (release && sustain_point_) {\n    start_value_ = value_;\n    segment_ = sustain_point_;\n    phase_ = 0;\n  } else if (phase_ < phase_increment_) {\n    start_value_ = level_[segment_ + 1];\n    ++segment_;\n    phase_ = 0;\n  }\n  \n  bool done = segment_ == num_segments_;\n  bool sustained = sustain_point_ && segment_ == sustain_point_ && gate_;\n  uint32_t increment = sustained || done ? 0 : lut_env_increments[time_[segment_] >> 8];\n\n  // Modulates the envelope rate by the actual excitation pulse.\n  rate_modulation_ += (static_cast<int32_t>(excite > kSchmittTriggerThreshold ? excite : 0) - rate_modulation_) >> 12;\n  increment += static_cast<int32_t>(increment >> 7) * (rate_modulation_ >> 7);\n  \n  phase_increment_ = increment;\n  \n  int32_t a = start_value_;\n  int32_t b = level_[segment_ + 1];\n  uint16_t t = Interpolate824(\n      lookup_table_table[LUT_ENV_LINEAR + shape_[segment_]], phase_);\n  value_ = a + ((b - a) * (t >> 1) >> 15);\n  phase_ += phase_increment_;\n  \n  // Applies a variable amount of distortion, depending on the level.\n  int32_t compressed = 32767 - ((32767 - value_) * (32767 - value_) >> 15);\n  compressed = 32767 - ((32767 - compressed) * (32767 - compressed) >> 15);\n  int32_t scaled = value_ + ((compressed - value_) * gate_level_ >> 15);\n  scaled = scaled * (28672 + (gate_level_ >> 3)) >> 15;\n  *gain = scaled * kAboveUnityGain >> 15;\n  *frequency = frequency_offset_ + (scaled * frequency_amount_ >> 15);\n}\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/envelope.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Simple AD envelope - adapted from Peaks' multistage envelope.\n\n#ifndef STREAMS_ENVELOPE_H_\n#define STREAMS_ENVELOPE_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"streams/meta_parameters.h\"\n\nnamespace streams {\n\nenum EnvelopeShape {\n  ENV_SHAPE_LINEAR,\n  ENV_SHAPE_EXPONENTIAL,\n  ENV_SHAPE_QUARTIC\n};\n\nconst uint16_t kMaxNumSegments = 8;\n\nclass Envelope {\n public:\n  Envelope() { }\n  ~Envelope() { }\n  \n  void Init();\n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency);\n\n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    uint16_t a, d;\n    if (globals) {\n      a = globals[0];\n      d = globals[2];\n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    } else {\n      ComputeAttackDecay(parameters[0], &a, &d);\n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    }\n\n    if (a != attack_ || d != decay_ || alternate != alternate_) {\n      attack_ = a;\n      decay_ = d;\n      alternate_ = alternate;\n      if (alternate_) {\n        set_ar(a, d);\n      } else {\n        set_ad(a, d);\n      }\n      set_hard_reset(true);\n    }\n  }\n  \n  inline void set_time(uint16_t segment, uint16_t time) {\n    time_[segment] = time;\n  }\n  \n  inline void set_level(uint16_t segment, int16_t level) {\n    level_[segment] = level;\n  }\n  \n  inline void set_num_segments(uint16_t num_segments) {\n    num_segments_ = num_segments;\n  }\n  \n  inline void set_sustain_point(uint16_t sustain_point) {\n    sustain_point_ = sustain_point;\n  }\n  \n  inline void set_ad(uint16_t attack, uint16_t decay) {\n    num_segments_ = 2;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_EXPONENTIAL;\n  }\n  \n  inline void set_adr(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 3;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n  }\n  \n  inline void set_ar(uint16_t attack, uint16_t decay) {\n    num_segments_ = 2;\n    sustain_point_ = 1;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n  }\n  \n  inline void set_adsar(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 4;\n    sustain_point_ = 2;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 32767;\n    level_[4] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = attack;\n    time_[3] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    shape_[3] = ENV_SHAPE_LINEAR;\n  }\n  \n  inline void set_adar(\n      uint16_t attack,\n      uint16_t decay,\n      uint16_t sustain,\n      uint16_t release) {\n    num_segments_ = 4;\n    sustain_point_ = 0;\n\n    level_[0] = 0;\n    level_[1] = 32767;\n    level_[2] = sustain;\n    level_[3] = 32767;\n    level_[4] = 0;\n\n    time_[0] = attack;\n    time_[1] = decay;\n    time_[2] = attack;\n    time_[3] = release;\n    \n    shape_[0] = ENV_SHAPE_LINEAR;\n    shape_[1] = ENV_SHAPE_LINEAR;\n    shape_[2] = ENV_SHAPE_LINEAR;\n    shape_[3] = ENV_SHAPE_LINEAR;\n  }\n\n  inline void set_hard_reset(bool hard_reset) {\n    hard_reset_ = hard_reset;\n  }\n  \n private:\n  bool gate_;\n   \n  int16_t level_[kMaxNumSegments];\n  uint16_t time_[kMaxNumSegments];\n  EnvelopeShape shape_[kMaxNumSegments];\n  \n  int16_t segment_;\n  int16_t start_value_;\n  int16_t value_;\n\n  uint32_t phase_;\n  uint32_t phase_increment_;\n  \n  uint16_t num_segments_;\n  uint16_t sustain_point_;\n\n  int32_t target_frequency_amount_;\n  int32_t target_frequency_offset_;\n  int32_t frequency_amount_;\n  int32_t frequency_offset_;\n  \n  uint16_t attack_;\n  uint16_t decay_;\n  \n  bool alternate_;\n  bool hard_reset_;\n  \n  int32_t rate_modulation_;\n  int32_t gate_level_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Envelope);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_ENVELOPE_H_\n"
  },
  {
    "path": "lib/streams/filter_controller.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Plain filter.\n\n#ifndef STREAMS_FILTER_CONTROLLER_H_\n#define STREAMS_FILTER_CONTROLLER_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace streams {\n\nclass FilterController {\n public:\n  FilterController() { }\n  ~FilterController() { }\n  \n  void Init() {\n    frequency_offset_ = 0;\n    frequency_amount_ = 0;\n  }\n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency) {\n    // Smooth frequency amount parameters.\n    frequency_amount_ += (target_frequency_amount_ - frequency_amount_) >> 8;\n    frequency_offset_ += (target_frequency_offset_ - frequency_offset_) >> 8;\n    \n    int32_t f;\n    f = frequency_offset_ + (excite * frequency_amount_ >> 14);\n    if (f < 0) {\n      f = 0;\n    } else if (f > 65535) {\n      f = 65535;\n    }\n    *gain = 0;\n    *frequency = f;\n  }\n\n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    int32_t amount = parameters[1];\n    amount -= 32768;\n    amount = amount * amount >> 15;\n    target_frequency_amount_ = parameters[1] < 32768 ? -amount : amount;\n    target_frequency_offset_ = parameters[0];\n  }\n\n private:\n  int32_t target_frequency_amount_;\n  int32_t target_frequency_offset_;\n  int32_t frequency_amount_;\n  int32_t frequency_offset_;\n  \n  DISALLOW_COPY_AND_ASSIGN(FilterController);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_ENVELOPE_H_\n"
  },
  {
    "path": "lib/streams/follower.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Follower.\n\n#include \"streams/follower.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"streams/gain.h\"\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nusing namespace stmlib;\n\nvoid Follower::Init() {\n  analysis_low_.Init();\n  analysis_low_.set_frequency(45 << 7);\n  analysis_low_.set_resonance(0);\n  analysis_medium_.Init();\n  analysis_medium_.set_frequency(86 << 7);\n  analysis_medium_.set_resonance(0);\n  \n  for (uint8_t i = 0; i < 3; ++i) {\n    energy_[i][0] = energy_[i][1] = 0;\n    follower_[i] = 0;\n    follower_lp_[i] = 0;\n    spectrum_[i] = 0;\n  }\n  centroid_ = 0;\n}\n\nvoid Follower::Process(\n    int16_t audio,\n    int16_t excite,\n    uint16_t* gain,\n    uint16_t* frequency) {\n  // Smooth frequency amount parameters.\n  frequency_amount_ += (target_frequency_amount_ - frequency_amount_) >> 8;\n  frequency_offset_ += (target_frequency_offset_ - frequency_offset_) >> 8;\n\n  analysis_low_.Process(excite);\n  analysis_medium_.Process(analysis_low_.hp());\n  \n  int32_t channel[3];\n  channel[0] = analysis_low_.lp();\n  channel[1] = analysis_medium_.lp();\n  channel[2] = analysis_medium_.hp();\n\n  int32_t envelope = 0;\n  int32_t centroid_numerator = 0;\n  int32_t centroid_denominator = 0;\n  for (int32_t i = 0; i < 3; ++i) {\n    int32_t energy = channel[i];\n    energy *= energy;\n    \n    // Ride an ascending peak.\n    if (energy_[i][0] < energy_[i][1] && energy_[i][1] < energy &&\n        energy > follower_[i]) {\n      follower_[i] = energy;\n    }\n    // Otherwise, hold and snap on local maxima.\n    if (energy_[i][0] <= energy_[i][1] && energy_[i][1] >= energy) {\n      follower_[i] = energy_[i][1];\n    }\n    energy_[i][0] = energy_[i][1];\n    energy_[i][1] = energy;\n    \n    // Then let a low-pass filter smooth things out.\n    int64_t error = follower_[i] - follower_lp_[i];\n    if (error > 0) {\n      follower_lp_[i] += error * attack_coefficient_[i] >> 31;\n    } else {\n      follower_lp_[i] += error * decay_coefficient_[i] >> 31;\n    }\n    envelope += follower_lp_[i] >> 13;\n\n    // Integrate more slowly for spectrum estimation.\n    if (only_filter_) {\n      error = follower_lp_[i] - spectrum_[i];\n      spectrum_[i] += error >> 6;\n    } else {\n      error = follower_[i] - spectrum_[i];\n      spectrum_[i] += error >> 10;\n    }\n    centroid_numerator += i * (spectrum_[i] >> 1) >> 16;\n    centroid_denominator += spectrum_[i] >> 16;\n  }\n  \n  if (envelope > 65535) {\n    envelope = 65535;\n  } else if (envelope < 0) {\n    envelope = 0;\n  }\n  \n  uint16_t gain_mod = Interpolate824(lut_square_root, envelope << 16) >> 1;\n  int32_t centroid = (centroid_numerator << 15) / (centroid_denominator + 1);\n  if (gain_mod > 4096) {\n    centroid_ = centroid;\n  } else if (gain_mod > 2048) {\n    centroid_ += (centroid - centroid_) >> 8;\n  }\n\n  *gain = gain_mod * kUnityGain >> 15;\n  *frequency = frequency_offset_ + (centroid_ * frequency_amount_ >> 15);\n  \n  if (only_filter_) {\n    *gain = *frequency;\n    *frequency = 65535;\n  }\n}\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/follower.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Follower.\n\n#ifndef STREAMS_FOLLOWER_H_\n#define STREAMS_FOLLOWER_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"streams/meta_parameters.h\"\n#include \"streams/resources.h\"\n#include \"streams/svf.h\"\n\nnamespace streams {\n\nconst uint16_t kNumBands = 3;\n\nclass Follower {\n public:\n  Follower() { }\n  ~Follower() { }\n  \n  void Init();\n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency);\n\n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    uint16_t attack_time;\n    uint16_t decay_time;\n    \n    if (globals) {\n      // Attack: 1ms to 100ms\n      attack_time = globals[0] >> 8;\n      \n      // Decay: 10ms to 1000ms\n      decay_time = 128 + (globals[2] >> 8);\n      \n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    } else {\n      uint16_t shape = parameters[0];\n      if (shape < 32768) {\n        // attack: 1ms to 2ms.\n        attack_time = (shape * 39 >> 15);\n        // decay: 10ms to 100ms.\n        decay_time = 128 + (shape * 128 >> 15);\n      } else {\n        shape -= 32768;\n        // attack: 2ms to 20ms.\n        attack_time = 39 + (shape * 128 >> 15);\n        // decay: 100ms to 200ms.\n        decay_time = 128 + 128 + (shape * 39 >> 15);\n      }\n      \n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    }\n    \n    // Slow down the attack detection on low frequencies.\n    attack_coefficient_[0] = lut_lp_coefficients[attack_time + 39];\n    attack_coefficient_[1] = lut_lp_coefficients[attack_time + 19];\n    attack_coefficient_[2] = lut_lp_coefficients[attack_time + 0];\n    \n    // Slow down the decay detection on high frequencies as there is more noise.\n    decay_coefficient_[0] = lut_lp_coefficients[decay_time + 39];\n    decay_coefficient_[1] = lut_lp_coefficients[decay_time + 19];\n    decay_coefficient_[2] = lut_lp_coefficients[decay_time + 99];\n    \n    only_filter_ = alternate;\n  }\n\n private:\n  Svf analysis_low_;\n  Svf analysis_medium_;\n  int32_t energy_[kNumBands][2];\n  int64_t follower_[kNumBands];\n\n  int64_t attack_coefficient_[kNumBands];\n  int64_t decay_coefficient_[kNumBands];\n  int64_t follower_lp_[kNumBands];\n\n  int32_t spectrum_[kNumBands];\n\n  int32_t centroid_;\n  \n  int32_t frequency_offset_;\n  int32_t frequency_amount_;\n  int32_t target_frequency_offset_;\n  int32_t target_frequency_amount_;\n  \n  int32_t naive_;\n  \n  bool only_filter_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Follower);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_FOLLOWER_H_\n"
  },
  {
    "path": "lib/streams/gain.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Value to output on the DAC to get unitary gain.\n\n#ifndef STREAMS_GAIN_H_\n#define STREAMS_GAIN_H_\n\nnamespace streams {\n\n// The DAC sends up to 2.5V through 25k = 0.1mA over the range of the DAC.\n// The offness compensation resistor sends -10V through 10M = 0.001mA.\n// Assuming the op-amp offset is negligible, the two balance for a DAC code of\n// 65536 / 100.0\n  \nconst int32_t kDefaultOffset = 655;\n\n// DAC code giving a unitary gain.\nconst int32_t kUnityGain = 32767;\n\n// Slightly above unitary gain.\nconst int32_t kAboveUnityGain = 32896;\n\n// Maximum gain in dB in lin mode with a DAC code of 65535 (6 dB).\nconst int32_t kMaxLinearGain = 65536;\n// Maximum gain in dB in lin mode with a DAC code of 65535 (18 dB).\nconst int32_t kMaxExponentialGain = 218453;\n\nconst uint16_t kSchmittTriggerThreshold = 32768 * 5 * 2 / 3 / 8;\n\n}  // namespace streams\n\n#endif  // STREAMS_GAIN_H_"
  },
  {
    "path": "lib/streams/lorenz_generator.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Lorenz system.\n\n#include \"streams/lorenz_generator.h\"\n\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nusing namespace stmlib;\n\nconst int64_t sigma = 10.0 * (1 << 24);\nconst int64_t rho = 28.0 * (1 << 24);\nconst int64_t beta = 8.0 / 3.0 * (1 << 24);\n\nvoid LorenzGenerator::Init() {\n  x_ = 0.1 * (1 << 24);\n  y_ = 0;\n  z_ = 0;\n  vcf_amount_ = 0;\n  vca_amount_ = 0;\n}\n\nvoid LorenzGenerator::Process(\n    int16_t audio,\n    int16_t excite,\n    uint16_t* gain,\n    uint16_t* frequency) {\n  vcf_amount_ += (target_vcf_amount_ - vcf_amount_) >> 8;\n  vca_amount_ += (target_vca_amount_ - vca_amount_) >> 8;\n  int32_t rate = rate_ + (excite >> 8);\n  CONSTRAIN(rate, 0, 256);\n  int64_t dt = static_cast<int64_t>(lut_lorenz_rate[rate]);\n  \n  int32_t x = x_ + (dt * ((sigma * (y_ - x_)) >> 24) >> 24);\n  int32_t y = y_ + (dt * ((x_ * (rho - z_) >> 24) - y_) >> 24);\n  int32_t z = z_ + (dt * ((x_ * int64_t(y_) >> 24) - (beta * z_ >> 24)) >> 24);\n  \n  x_ = x;\n  y_ = y;\n  z_ = z;\n  \n  int32_t z_scaled = z >> 14;\n  int32_t x_scaled = (x >> 14) + 32768;\n  \n  if (index_) {\n    // On channel 2, z and y are inverted to get more variety!\n    z = z_scaled;\n    z_scaled = x_scaled;\n    x_scaled = z;\n  }\n  \n  *gain = z_scaled * vca_amount_ >> 15;\n  *frequency = 65535 + ((x_scaled - 65535) * vcf_amount_ >> 15);\n}\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/lorenz_generator.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Lorenz system.\n\n#ifndef STREAMS_LORENZ_GENERATOR_H_\n#define STREAMS_LORENZ_GENERATOR_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"streams/meta_parameters.h\"\n\nnamespace streams {\n\nclass LorenzGenerator {\n public:\n  LorenzGenerator() { }\n  ~LorenzGenerator() { }\n  \n  void Init();\n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency);\n  \n  void set_index(uint8_t index) {\n    index_ = index;\n  }\n  \n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    rate_ = parameters[0] >> 8;\n    int32_t vcf_amount = 65535 - parameters[1];\n    int32_t vca_amount = parameters[1];\n    if (vcf_amount >= 32767) vcf_amount = 32767;\n    if (vca_amount >= 32767) vca_amount = 32767;\n    target_vcf_amount_ = vcf_amount;\n    target_vca_amount_ = vca_amount;\n  }\n\n\n private:\n  int32_t x_, y_, z_;\n  int32_t rate_;\n  int32_t vcf_amount_;\n  int32_t vca_amount_;\n  int32_t target_vcf_amount_;\n  int32_t target_vca_amount_;\n  \n  uint8_t index_;\n  \n  DISALLOW_COPY_AND_ASSIGN(LorenzGenerator);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_LORENZ_GENERATOR_H_\n"
  },
  {
    "path": "lib/streams/meta_parameters.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Control of several parameters from one single knob.\n\n#ifndef STREAMS_META_PARAMETERS_H_\n#define STREAMS_META_PARAMETERS_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace streams {\n\ninline void ComputeAmountOffset(\n    int32_t value,\n    int32_t* amount,\n    int32_t* offset) {\n  if (value < 32768) {\n    value = 32767 - value;\n    value = value * value >> 15;\n    *amount = (32767 - value) << 1;\n    *offset = 0;\n  } else {\n    *amount = 65535 - ((value - 32768) << 1);\n    *offset = (value - 32768) << 1;\n  }\n}\n\ninline void ComputeAttackDecay(int32_t shape, uint16_t* a, uint16_t* d) {\n  if (shape < 32768) {\n    *a = 0;\n    *d = 13 * (shape >> 3) + 12288;\n  } else if (shape < 49152) {\n    *a = (shape - 32768) << 1;\n    *d = 65535 - ((shape - 32768) >> 1) * 3;\n  } else {\n    *a = 32768 - ((shape - 49152) >> 2) * 5;\n    *d = 65535 - ((shape - 32768) >> 1) * 3;\n  }\n}\n\n}  // namespace streams\n\n#endif  // STREAMS_META_PARAMETERS_H_\n"
  },
  {
    "path": "lib/streams/resources.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nstatic const char str_dummy[] = \"dummy\";\n\n\nconst char* string_table[] = {\n  str_dummy,\n};\n\nconst int16_t wav_gompertz[] = {\n       0,     12,     24,     36,\n      48,     60,     72,     84,\n      96,    108,    120,    132,\n     144,    156,    168,    179,\n     191,    203,    215,    227,\n     238,    250,    262,    274,\n     286,    298,    310,    323,\n     335,    348,    360,    373,\n     386,    399,    412,    426,\n     439,    453,    467,    481,\n     496,    511,    526,    542,\n     558,    574,    591,    608,\n     625,    643,    662,    681,\n     700,    720,    741,    762,\n     784,    807,    830,    854,\n     878,    903,    930,    956,\n     984,   1013,   1042,   1072,\n    1104,   1136,   1169,   1203,\n    1238,   1275,   1312,   1350,\n    1390,   1430,   1472,   1515,\n    1559,   1605,   1651,   1699,\n    1749,   1799,   1851,   1904,\n    1959,   2015,   2072,   2131,\n    2191,   2252,   2315,   2380,\n    2446,   2513,   2582,   2652,\n    2724,   2798,   2873,   2949,\n    3027,   3106,   3187,   3270,\n    3354,   3439,   3526,   3615,\n    3705,   3796,   3889,   3984,\n    4080,   4177,   4276,   4377,\n    4479,   4582,   4686,   4793,\n    4900,   5009,   5119,   5231,\n    5344,   5458,   5574,   5690,\n    5808,   5928,   6048,   6170,\n    6293,   6417,   6542,   6668,\n    6796,   6924,   7053,   7184,\n    7315,   7448,   7581,   7715,\n    7850,   7986,   8123,   8261,\n    8399,   8538,   8678,   8819,\n    8960,   9102,   9244,   9387,\n    9531,   9675,   9820,   9965,\n   10110,  10256,  10403,  10550,\n   10697,  10844,  10992,  11140,\n   11288,  11436,  11585,  11734,\n   11882,  12031,  12181,  12330,\n   12479,  12628,  12777,  12926,\n   13075,  13224,  13373,  13522,\n   13670,  13819,  13967,  14115,\n   14263,  14410,  14558,  14705,\n   14851,  14997,  15143,  15289,\n   15434,  15579,  15723,  15867,\n   16011,  16154,  16296,  16438,\n   16580,  16721,  16861,  17001,\n   17141,  17280,  17418,  17555,\n   17692,  17829,  17964,  18099,\n   18234,  18367,  18500,  18633,\n   18764,  18895,  19026,  19155,\n   19284,  19412,  19539,  19666,\n   19792,  19917,  20041,  20165,\n   20287,  20409,  20530,  20651,\n   20770,  20889,  21007,  21124,\n   21241,  21356,  21471,  21585,\n   21698,  21810,  21922,  22032,\n   22142,  22251,  22359,  22466,\n   22573,  22679,  22783,  22887,\n   22991,  23093,  23195,  23295,\n   23395,  23494,  23592,  23690,\n   23786,  23882,  23977,  24071,\n   24165,  24257,  24349,  24440,\n   24530,  24619,  24708,  24795,\n   24882,  24969,  25054,  25139,\n   25222,  25305,  25388,  25469,\n   25550,  25630,  25709,  25788,\n   25865,  25942,  26019,  26094,\n   26169,  26243,  26316,  26389,\n   26461,  26532,  26603,  26672,\n   26741,  26810,  26878,  26945,\n   27011,  27077,  27142,  27206,\n   27270,  27333,  27395,  27457,\n   27518,  27579,  27639,  27698,\n   27756,  27814,  27872,  27929,\n   27985,  28041,  28096,  28150,\n   28204,  28257,  28310,  28362,\n   28414,  28465,  28515,  28565,\n   28614,  28663,  28712,  28759,\n   28807,  28853,  28900,  28945,\n   28991,  29035,  29080,  29123,\n   29167,  29209,  29252,  29294,\n   29335,  29376,  29416,  29456,\n   29496,  29535,  29574,  29612,\n   29650,  29687,  29724,  29760,\n   29796,  29832,  29867,  29902,\n   29937,  29971,  30005,  30038,\n   30071,  30103,  30136,  30167,\n   30199,  30230,  30261,  30291,\n   30321,  30351,  30380,  30409,\n   30438,  30466,  30494,  30521,\n   30549,  30576,  30602,  30629,\n   30655,  30681,  30706,  30731,\n   30756,  30781,  30805,  30829,\n   30853,  30876,  30899,  30922,\n   30945,  30967,  30989,  31011,\n   31032,  31054,  31075,  31096,\n   31116,  31136,  31156,  31176,\n   31196,  31215,  31234,  31253,\n   31272,  31290,  31308,  31326,\n   31344,  31362,  31379,  31396,\n   31413,  31430,  31446,  31463,\n   31479,  31495,  31510,  31526,\n   31541,  31556,  31571,  31586,\n   31601,  31615,  31630,  31644,\n   31658,  31671,  31685,  31698,\n   31712,  31725,  31738,  31750,\n   31763,  31775,  31788,  31800,\n   31812,  31824,  31836,  31847,\n   31859,  31870,  31881,  31892,\n   31903,  31914,  31924,  31935,\n   31945,  31955,  31966,  31976,\n   31985,  31995,  32005,  32014,\n   32024,  32033,  32042,  32051,\n   32060,  32069,  32078,  32086,\n   32095,  32103,  32111,  32120,\n   32128,  32136,  32144,  32151,\n   32159,  32167,  32174,  32182,\n   32189,  32196,  32203,  32210,\n   32217,  32224,  32231,  32238,\n   32244,  32251,  32257,  32264,\n   32270,  32276,  32282,  32288,\n   32294,  32300,  32306,  32312,\n   32318,  32323,  32329,  32334,\n   32340,  32345,  32350,  32356,\n   32361,  32366,  32371,  32376,\n   32381,  32386,  32390,  32395,\n   32400,  32404,  32409,  32413,\n   32418,  32422,  32427,  32431,\n   32435,  32439,  32443,  32447,\n   32451,  32455,  32459,  32463,\n   32467,  32471,  32475,  32478,\n   32482,  32485,  32489,  32492,\n   32496,  32499,  32503,  32506,\n   32509,  32513,  32516,  32519,\n   32522,  32525,  32528,  32531,\n   32534,  32537,  32540,  32543,\n   32546,  32548,  32551,  32554,\n   32557,  32559,  32562,  32564,\n   32567,  32569,  32572,  32574,\n   32577,  32579,  32582,  32584,\n   32586,  32588,  32591,  32593,\n   32595,  32597,  32599,  32602,\n   32604,  32606,  32608,  32610,\n   32612,  32614,  32616,  32618,\n   32619,  32621,  32623,  32625,\n   32627,  32628,  32630,  32632,\n   32634,  32635,  32637,  32639,\n   32640,  32642,  32643,  32645,\n   32647,  32648,  32650,  32651,\n   32652,  32654,  32655,  32657,\n   32658,  32660,  32661,  32662,\n   32664,  32665,  32666,  32667,\n   32669,  32670,  32671,  32672,\n   32674,  32675,  32676,  32677,\n   32678,  32679,  32680,  32682,\n   32683,  32684,  32685,  32686,\n   32687,  32688,  32689,  32690,\n   32691,  32692,  32693,  32694,\n   32695,  32695,  32696,  32697,\n   32698,  32699,  32700,  32701,\n   32702,  32702,  32703,  32704,\n   32705,  32706,  32706,  32707,\n   32708,  32709,  32709,  32710,\n   32711,  32712,  32712,  32713,\n   32714,  32714,  32715,  32716,\n   32716,  32717,  32718,  32718,\n   32719,  32719,  32720,  32721,\n   32721,  32722,  32722,  32723,\n   32723,  32724,  32725,  32725,\n   32726,  32726,  32727,  32727,\n   32728,  32728,  32729,  32729,\n   32730,  32730,  32731,  32731,\n   32731,  32732,  32732,  32733,\n   32733,  32734,  32734,  32735,\n   32735,  32735,  32736,  32736,\n   32737,  32737,  32737,  32738,\n   32738,  32738,  32739,  32739,\n   32739,  32740,  32740,  32741,\n   32741,  32741,  32742,  32742,\n   32742,  32742,  32743,  32743,\n   32743,  32744,  32744,  32744,\n   32745,  32745,  32745,  32745,\n   32746,  32746,  32746,  32747,\n   32747,  32747,  32747,  32748,\n   32748,  32748,  32748,  32749,\n   32749,  32749,  32749,  32749,\n   32750,  32750,  32750,  32750,\n   32751,  32751,  32751,  32751,\n   32751,  32752,  32752,  32752,\n   32752,  32752,  32753,  32753,\n   32753,  32753,  32753,  32753,\n   32754,  32754,  32754,  32754,\n   32754,  32754,  32755,  32755,\n   32755,  32755,  32755,  32755,\n   32756,  32756,  32756,  32756,\n   32756,  32756,  32756,  32757,\n   32757,  32757,  32757,  32757,\n   32757,  32757,  32757,  32758,\n   32758,  32758,  32758,  32758,\n   32758,  32758,  32758,  32758,\n   32759,  32759,  32759,  32759,\n   32759,  32759,  32759,  32759,\n   32759,  32760,  32760,  32760,\n   32760,  32760,  32760,  32760,\n   32760,  32760,  32760,  32760,\n   32761,  32761,  32761,  32761,\n   32761,  32761,  32761,  32761,\n   32761,  32761,  32761,  32761,\n   32761,  32762,  32762,  32762,\n   32762,  32762,  32762,  32762,\n   32762,  32762,  32762,  32762,\n   32762,  32762,  32762,  32762,\n   32763,  32763,  32763,  32763,\n   32763,  32763,  32763,  32763,\n   32763,  32763,  32763,  32763,\n   32763,  32763,  32763,  32763,\n   32763,  32763,  32763,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32764,  32764,  32764,\n   32764,  32764,  32764,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32765,  32765,  32765,  32765,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32766,  32766,  32766,  32766,\n   32767,\n};\nconst int16_t wav_db[] = {\n  -32768, -32768, -24576, -19783,\n  -16384, -13746, -11591,  -9770,\n   -8192,  -6799,  -5554,  -4428,\n   -3399,  -2453,  -1578,   -762,\n       0,    716,   1392,   2031,\n    2637,   3213,   3763,   4289,\n    4792,   5274,   5738,   6184,\n    6613,   7028,   7429,   7816,\n    8192,   8555,   8908,   9251,\n    9584,   9907,  10223,  10530,\n   10829,  11121,  11405,  11683,\n   11955,  12221,  12481,  12735,\n   12984,  13227,  13466,  13700,\n   13930,  14155,  14376,  14592,\n   14805,  15015,  15220,  15422,\n   15621,  15816,  16008,  16197,\n   16384,  16567,  16747,  16925,\n   17100,  17273,  17443,  17610,\n   17776,  17939,  18099,  18258,\n   18415,  18569,  18722,  18872,\n   19021,  19168,  19313,  19456,\n   19597,  19737,  19875,  20012,\n   20147,  20281,  20413,  20543,\n   20673,  20800,  20927,  21052,\n   21176,  21298,  21419,  21539,\n   21658,  21776,  21892,  22007,\n   22122,  22235,  22347,  22458,\n   22568,  22676,  22784,  22891,\n   22997,  23102,  23207,  23310,\n   23412,  23514,  23614,  23714,\n   23813,  23911,  24008,  24105,\n   24200,  24295,  24389,  24483,\n   24576,  24667,  24759,  24849,\n   24939,  25028,  25117,  25205,\n   25292,  25379,  25465,  25550,\n   25635,  25719,  25802,  25885,\n   25968,  26049,  26131,  26211,\n   26291,  26371,  26450,  26529,\n   26607,  26684,  26761,  26838,\n   26914,  26989,  27064,  27139,\n   27213,  27286,  27360,  27432,\n   27505,  27576,  27648,  27719,\n   27789,  27860,  27929,  27999,\n   28067,  28136,  28204,  28272,\n   28339,  28406,  28473,  28539,\n   28605,  28670,  28735,  28800,\n   28865,  28929,  28992,  29056,\n   29119,  29181,  29244,  29306,\n   29368,  29429,  29490,  29551,\n   29611,  29671,  29731,  29791,\n   29850,  29909,  29968,  30026,\n   30084,  30142,  30199,  30257,\n   30314,  30370,  30427,  30483,\n   30539,  30594,  30650,  30705,\n   30760,  30814,  30868,  30923,\n   30976,  31030,  31083,  31136,\n   31189,  31242,  31294,  31347,\n   31399,  31450,  31502,  31553,\n   31604,  31655,  31706,  31756,\n   31806,  31856,  31906,  31955,\n   32005,  32054,  32103,  32152,\n   32200,  32248,  32297,  32345,\n   32392,  32440,  32487,  32534,\n   32581,  32628,  32675,  32721,\n   32721,\n};\n\n\nconst int16_t* waveforms_table[] = {\n  wav_gompertz,\n  wav_db,\n};\n\nconst uint16_t lut_env_linear[] = {\n       0,    257,    514,    771,\n    1028,   1285,   1542,   1799,\n    2056,   2313,   2570,   2827,\n    3084,   3341,   3598,   3855,\n    4112,   4369,   4626,   4883,\n    5140,   5397,   5654,   5911,\n    6168,   6425,   6682,   6939,\n    7196,   7453,   7710,   7967,\n    8224,   8481,   8738,   8995,\n    9252,   9509,   9766,  10023,\n   10280,  10537,  10794,  11051,\n   11308,  11565,  11822,  12079,\n   12336,  12593,  12850,  13107,\n   13364,  13621,  13878,  14135,\n   14392,  14649,  14906,  15163,\n   15420,  15677,  15934,  16191,\n   16448,  16705,  16962,  17219,\n   17476,  17733,  17990,  18247,\n   18504,  18761,  19018,  19275,\n   19532,  19789,  20046,  20303,\n   20560,  20817,  21074,  21331,\n   21588,  21845,  22102,  22359,\n   22616,  22873,  23130,  23387,\n   23644,  23901,  24158,  24415,\n   24672,  24929,  25186,  25443,\n   25700,  25957,  26214,  26471,\n   26728,  26985,  27242,  27499,\n   27756,  28013,  28270,  28527,\n   28784,  29041,  29298,  29555,\n   29812,  30069,  30326,  30583,\n   30840,  31097,  31354,  31611,\n   31868,  32125,  32382,  32639,\n   32896,  33153,  33410,  33667,\n   33924,  34181,  34438,  34695,\n   34952,  35209,  35466,  35723,\n   35980,  36237,  36494,  36751,\n   37008,  37265,  37522,  37779,\n   38036,  38293,  38550,  38807,\n   39064,  39321,  39578,  39835,\n   40092,  40349,  40606,  40863,\n   41120,  41377,  41634,  41891,\n   42148,  42405,  42662,  42919,\n   43176,  43433,  43690,  43947,\n   44204,  44461,  44718,  44975,\n   45232,  45489,  45746,  46003,\n   46260,  46517,  46774,  47031,\n   47288,  47545,  47802,  48059,\n   48316,  48573,  48830,  49087,\n   49344,  49601,  49858,  50115,\n   50372,  50629,  50886,  51143,\n   51400,  51657,  51914,  52171,\n   52428,  52685,  52942,  53199,\n   53456,  53713,  53970,  54227,\n   54484,  54741,  54998,  55255,\n   55512,  55769,  56026,  56283,\n   56540,  56797,  57054,  57311,\n   57568,  57825,  58082,  58339,\n   58596,  58853,  59110,  59367,\n   59624,  59881,  60138,  60395,\n   60652,  60909,  61166,  61423,\n   61680,  61937,  62194,  62451,\n   62708,  62965,  63222,  63479,\n   63736,  63993,  64250,  64507,\n   64764,  65021,  65278,  65535,\n   65535,\n};\nconst uint16_t lut_env_expo[] = {\n       0,   1035,   2054,   3057,\n    4045,   5018,   5975,   6918,\n    7846,   8760,   9659,  10545,\n   11416,  12275,  13120,  13952,\n   14771,  15577,  16371,  17152,\n   17921,  18679,  19425,  20159,\n   20881,  21593,  22294,  22983,\n   23662,  24331,  24989,  25637,\n   26274,  26902,  27520,  28129,\n   28728,  29318,  29899,  30471,\n   31034,  31588,  32133,  32670,\n   33199,  33720,  34232,  34737,\n   35233,  35722,  36204,  36678,\n   37145,  37604,  38056,  38502,\n   38940,  39371,  39796,  40215,\n   40626,  41032,  41431,  41824,\n   42211,  42592,  42967,  43336,\n   43699,  44057,  44409,  44756,\n   45097,  45434,  45764,  46090,\n   46411,  46727,  47037,  47344,\n   47645,  47941,  48233,  48521,\n   48804,  49083,  49357,  49627,\n   49893,  50155,  50412,  50666,\n   50916,  51162,  51404,  51642,\n   51877,  52108,  52335,  52559,\n   52780,  52997,  53210,  53421,\n   53628,  53831,  54032,  54230,\n   54424,  54616,  54804,  54990,\n   55173,  55353,  55530,  55704,\n   55876,  56045,  56211,  56375,\n   56536,  56695,  56851,  57005,\n   57157,  57306,  57453,  57597,\n   57740,  57880,  58018,  58153,\n   58287,  58419,  58548,  58676,\n   58801,  58925,  59047,  59167,\n   59285,  59401,  59515,  59628,\n   59739,  59848,  59955,  60061,\n   60165,  60267,  60368,  60468,\n   60566,  60662,  60757,  60850,\n   60942,  61032,  61121,  61209,\n   61295,  61380,  61464,  61546,\n   61628,  61707,  61786,  61863,\n   61939,  62014,  62088,  62161,\n   62233,  62303,  62372,  62441,\n   62508,  62574,  62639,  62703,\n   62767,  62829,  62890,  62950,\n   63010,  63068,  63125,  63182,\n   63238,  63293,  63347,  63400,\n   63452,  63504,  63554,  63604,\n   63654,  63702,  63750,  63797,\n   63843,  63888,  63933,  63977,\n   64021,  64063,  64105,  64147,\n   64188,  64228,  64267,  64306,\n   64344,  64382,  64419,  64456,\n   64492,  64527,  64562,  64596,\n   64630,  64664,  64696,  64729,\n   64760,  64792,  64822,  64853,\n   64883,  64912,  64941,  64969,\n   64997,  65025,  65052,  65079,\n   65105,  65131,  65157,  65182,\n   65206,  65231,  65255,  65278,\n   65302,  65324,  65347,  65369,\n   65391,  65412,  65434,  65454,\n   65475,  65495,  65515,  65535,\n   65535,\n};\nconst uint16_t lut_env_quartic[] = {\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      1,      1,\n       2,      3,      4,      5,\n       6,      8,      9,     11,\n      14,     16,     19,     22,\n      25,     29,     33,     37,\n      42,     48,     53,     59,\n      66,     73,     81,     89,\n      98,    107,    117,    128,\n     139,    151,    164,    177,\n     191,    206,    222,    238,\n     256,    274,    293,    313,\n     334,    355,    378,    402,\n     427,    453,    480,    508,\n     537,    567,    599,    631,\n     665,    700,    737,    775,\n     814,    854,    896,    939,\n     984,   1030,   1077,   1127,\n    1177,   1230,   1283,   1339,\n    1396,   1455,   1515,   1577,\n    1641,   1707,   1775,   1844,\n    1916,   1989,   2064,   2141,\n    2220,   2302,   2385,   2470,\n    2557,   2647,   2739,   2833,\n    2929,   3027,   3128,   3231,\n    3336,   3444,   3554,   3667,\n    3782,   3899,   4019,   4142,\n    4267,   4395,   4525,   4658,\n    4794,   4933,   5074,   5218,\n    5365,   5515,   5668,   5824,\n    5983,   6144,   6309,   6477,\n    6648,   6822,   6999,   7179,\n    7363,   7550,   7740,   7933,\n    8130,   8330,   8534,   8741,\n    8951,   9165,   9383,   9604,\n    9829,  10057,  10289,  10525,\n   10765,  11008,  11255,  11507,\n   11761,  12020,  12283,  12550,\n   12821,  13096,  13375,  13658,\n   13945,  14237,  14532,  14832,\n   15137,  15445,  15758,  16076,\n   16397,  16724,  17054,  17390,\n   17730,  18074,  18423,  18777,\n   19136,  19499,  19868,  20241,\n   20618,  21001,  21389,  21781,\n   22179,  22582,  22990,  23403,\n   23821,  24244,  24672,  25106,\n   25545,  25990,  26440,  26895,\n   27355,  27821,  28293,  28770,\n   29253,  29742,  30236,  30735,\n   31241,  31752,  32270,  32793,\n   33321,  33856,  34397,  34944,\n   35497,  36056,  36621,  37192,\n   37769,  38353,  38943,  39539,\n   40142,  40751,  41366,  41988,\n   42617,  43251,  43893,  44541,\n   45196,  45857,  46526,  47201,\n   47882,  48571,  49267,  49969,\n   50678,  51395,  52118,  52849,\n   53587,  54332,  55084,  55843,\n   56610,  57384,  58165,  58954,\n   59750,  60553,  61364,  62183,\n   63010,  63843,  64685,  65535,\n   65535,\n};\nconst uint16_t lut_square_root[] = {\n       0,   4095,   5792,   7094,\n    8191,   9158,  10032,  10836,\n   11585,  12287,  12952,  13584,\n   14188,  14768,  15325,  15863,\n   16383,  16887,  17377,  17853,\n   18317,  18769,  19211,  19643,\n   20065,  20479,  20885,  21283,\n   21673,  22057,  22434,  22805,\n   23170,  23529,  23883,  24231,\n   24575,  24914,  25249,  25579,\n   25904,  26226,  26544,  26858,\n   27169,  27476,  27779,  28080,\n   28377,  28671,  28962,  29250,\n   29536,  29818,  30098,  30376,\n   30651,  30923,  31193,  31461,\n   31726,  31990,  32251,  32510,\n   32767,  33022,  33275,  33526,\n   33775,  34023,  34269,  34512,\n   34755,  34995,  35234,  35471,\n   35707,  35941,  36174,  36405,\n   36635,  36863,  37090,  37315,\n   37539,  37762,  37984,  38204,\n   38423,  38640,  38857,  39072,\n   39286,  39499,  39711,  39922,\n   40131,  40340,  40547,  40754,\n   40959,  41163,  41366,  41569,\n   41770,  41970,  42170,  42368,\n   42566,  42762,  42958,  43153,\n   43347,  43540,  43732,  43924,\n   44114,  44304,  44493,  44681,\n   44868,  45055,  45241,  45426,\n   45610,  45793,  45976,  46158,\n   46340,  46520,  46700,  46880,\n   47058,  47236,  47413,  47590,\n   47766,  47941,  48116,  48290,\n   48463,  48636,  48808,  48980,\n   49151,  49321,  49491,  49660,\n   49829,  49997,  50164,  50331,\n   50498,  50663,  50829,  50994,\n   51158,  51321,  51485,  51647,\n   51809,  51971,  52132,  52293,\n   52453,  52613,  52772,  52931,\n   53089,  53247,  53404,  53561,\n   53717,  53873,  54029,  54184,\n   54338,  54492,  54646,  54799,\n   54952,  55105,  55257,  55408,\n   55559,  55710,  55861,  56011,\n   56160,  56309,  56458,  56606,\n   56754,  56902,  57049,  57196,\n   57343,  57489,  57634,  57780,\n   57925,  58069,  58214,  58358,\n   58501,  58644,  58787,  58930,\n   59072,  59214,  59355,  59496,\n   59637,  59778,  59918,  60058,\n   60197,  60336,  60475,  60614,\n   60752,  60890,  61028,  61165,\n   61302,  61439,  61575,  61711,\n   61847,  61982,  62117,  62252,\n   62387,  62521,  62655,  62789,\n   62922,  63056,  63189,  63321,\n   63453,  63586,  63717,  63849,\n   63980,  64111,  64242,  64372,\n   64502,  64632,  64762,  64891,\n   65020,  65149,  65278,  65406,\n   65406,\n};\nconst uint16_t lut_svf_cutoff[] = {\n      54,     57,     60,     64,\n      68,     72,     76,     81,\n      85,     91,     96,    102,\n     108,    114,    121,    128,\n     136,    144,    153,    162,\n     171,    182,    192,    204,\n     216,    229,    243,    257,\n     272,    289,    306,    324,\n     343,    364,    385,    408,\n     433,    458,    486,    515,\n     545,    578,    612,    648,\n     687,    728,    771,    817,\n     866,    917,    972,   1030,\n    1091,   1156,   1225,   1297,\n    1375,   1456,   1543,   1635,\n    1732,   1835,   1944,   2060,\n    2182,   2312,   2449,   2595,\n    2749,   2912,   3085,   3269,\n    3463,   3669,   3887,   4118,\n    4362,   4621,   4895,   5186,\n    5494,   5819,   6165,   6530,\n    6917,   7327,   7760,   8219,\n    8705,   9220,   9764,  10340,\n   10949,  11593,  12275,  12995,\n   13757,  14562,  15412,  16309,\n   17257,  18256,  19310,  20421,\n   21591,  22822,  24116,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,  25078,  25078,  25078,\n   25078,\n};\nconst uint16_t lut_svf_damp[] = {\n   65534,  49166,  46069,  43993,\n   42386,  41058,  39917,  38910,\n   38007,  37184,  36427,  35726,\n   35070,  34454,  33873,  33322,\n   32798,  32299,  31820,  31361,\n   30920,  30496,  30086,  29690,\n   29306,  28935,  28574,  28224,\n   27883,  27551,  27228,  26912,\n   26605,  26304,  26010,  25723,\n   25441,  25166,  24896,  24631,\n   24371,  24116,  23866,  23620,\n   23379,  23141,  22908,  22678,\n   22452,  22229,  22010,  21794,\n   21581,  21371,  21164,  20960,\n   20759,  20560,  20365,  20171,\n   19980,  19791,  19605,  19421,\n   19239,  19059,  18882,  18706,\n   18532,  18360,  18190,  18022,\n   17856,  17691,  17528,  17367,\n   17207,  17049,  16892,  16737,\n   16583,  16431,  16280,  16131,\n   15982,  15836,  15690,  15546,\n   15403,  15261,  15120,  14981,\n   14843,  14705,  14569,  14434,\n   14300,  14167,  14036,  13905,\n   13775,  13646,  13518,  13391,\n   13265,  13140,  13015,  12892,\n   12769,  12648,  12527,  12407,\n   12287,  12169,  12051,  11934,\n   11818,  11703,  11588,  11474,\n   11361,  11249,  11137,  11026,\n   10915,  10805,  10696,  10588,\n   10480,  10373,  10266,  10160,\n   10055,   9950,   9846,   9742,\n    9639,   9537,   9435,   9333,\n    9233,   9132,   9033,   8933,\n    8835,   8737,   8639,   8542,\n    8445,   8349,   8253,   8158,\n    8063,   7969,   7875,   7782,\n    7689,   7596,   7504,   7413,\n    7321,   7231,   7140,   7050,\n    6961,   6872,   6783,   6695,\n    6607,   6519,   6432,   6346,\n    6259,   6173,   6088,   6003,\n    5918,   5833,   5749,   5665,\n    5582,   5499,   5416,   5334,\n    5251,   5170,   5088,   5007,\n    4926,   4846,   4766,   4686,\n    4607,   4527,   4449,   4370,\n    4292,   4214,   4136,   4059,\n    3982,   3905,   3828,   3752,\n    3676,   3601,   3525,   3450,\n    3375,   3301,   3226,   3152,\n    3078,   3005,   2932,   2859,\n    2786,   2713,   2641,   2569,\n    2497,   2426,   2355,   2284,\n    2213,   2142,   2072,   2002,\n    1932,   1862,   1793,   1724,\n    1655,   1586,   1518,   1449,\n    1381,   1313,   1246,   1178,\n    1111,   1044,    977,    911,\n     844,    778,    712,    647,\n     581,    516,    450,    385,\n     321,    256,    192,    127,\n      63,\n};\nconst uint16_t lut_2164_gain[] = {\n   32767,  31340,  29975,  28670,\n   27421,  26227,  25085,  23993,\n   22948,  21948,  20993,  20078,\n   19204,  18368,  17568,  16803,\n   16071,  15371,  14702,  14062,\n   13449,  12864,  12303,  11768,\n   11255,  10765,  10296,   9848,\n    9419,   9009,   8617,   8241,\n    7882,   7539,   7211,   6897,\n    6596,   6309,   6034,   5772,\n    5520,   5280,   5050,   4830,\n    4620,   4418,   4226,   4042,\n    3866,   3698,   3537,   3383,\n    3235,   3094,   2960,   2831,\n    2707,   2589,   2477,   2369,\n    2266,   2167,   2073,   1982,\n    1896,   1813,   1734,   1659,\n    1587,   1517,   1451,   1388,\n    1328,   1270,   1215,   1162,\n    1111,   1063,   1016,    972,\n     930,    889,    850,    813,\n     778,    744,    712,    681,\n     651,    623,    595,    569,\n     545,    521,    498,    477,\n     456,    436,    417,    399,\n     381,    365,    349,    334,\n     319,    305,    292,    279,\n     267,    255,    244,    233,\n     223,    214,    204,    195,\n     187,    179,    171,    163,\n     156,    149,    143,    137,\n     131,    125,    119,    114,\n     109,    104,    100,     96,\n      91,     87,     84,     80,\n      76,     73,     70,     67,\n      64,     61,     58,     56,\n      53,     51,     49,     47,\n      45,     43,     41,     39,\n      37,     36,     34,     32,\n      31,     30,     28,     27,\n      26,     25,     24,     23,\n      22,     21,     20,     19,\n      18,     17,     16,     16,\n      15,     14,     14,     13,\n      12,     12,     11,     11,\n      10,     10,      9,      9,\n       9,      8,      8,      7,\n       7,      7,      6,      6,\n       6,      6,      5,      5,\n       5,      5,      4,      4,\n       4,      4,      4,      3,\n       3,      3,      3,      3,\n       3,      2,      2,      2,\n       2,      2,      2,      2,\n       2,      2,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      1,      1,\n       1,      1,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,      0,      0,      0,\n       0,\n};\nconst uint16_t lut_compressor_ratio[] = {\n     256,    255,    255,    255,\n     254,    253,    252,    251,\n     250,    248,    246,    245,\n     243,    241,    238,    236,\n     234,    231,    228,    226,\n     223,    220,    217,    214,\n     211,    208,    205,    202,\n     198,    195,    192,    189,\n     186,    183,    179,    176,\n     173,    170,    167,    164,\n     161,    158,    155,    152,\n     149,    146,    144,    141,\n     138,    136,    133,    131,\n     128,    126,    123,    121,\n     119,    116,    114,    112,\n     110,    108,    106,    104,\n     102,    100,     98,     96,\n      95,     93,     91,     89,\n      88,     86,     85,     83,\n      82,     80,     79,     77,\n      76,     75,     73,     72,\n      71,     70,     69,     67,\n      66,     65,     64,     63,\n      62,     61,     60,     59,\n      58,     57,     56,     55,\n      54,     54,     53,     52,\n      51,     50,     50,     49,\n      48,     47,     47,     46,\n      45,     45,     44,     43,\n      43,     42,     41,     41,\n      40,     40,     39,     39,\n      38,     38,     37,     37,\n      36,     36,     35,     35,\n      34,     34,     33,     33,\n      32,     32,     32,     31,\n      31,     30,     30,     30,\n      29,     29,     29,     28,\n      28,     28,     27,     27,\n      27,     26,     26,     26,\n      25,     25,     25,     24,\n      24,     24,     24,     23,\n      23,     23,     23,     22,\n      22,     22,     22,     21,\n      21,     21,     21,     20,\n      20,     20,     20,     20,\n      19,     19,     19,     19,\n      19,     18,     18,     18,\n      18,     18,     18,     17,\n      17,     17,     17,     17,\n      16,     16,     16,     16,\n      16,     16,     16,     15,\n      15,     15,     15,     15,\n      15,     15,     14,     14,\n      14,     14,     14,     14,\n      14,     14,     13,     13,\n      13,     13,     13,     13,\n      13,     13,     12,     12,\n      12,     12,     12,     12,\n      12,     12,     12,     12,\n      11,     11,     11,     11,\n      11,     11,     11,     11,\n      11,     11,     11,     10,\n      10,     10,     10,     10,\n      10,     10,     10,     10,\n      10,\n};\nconst uint16_t lut_soft_knee[] = {\n       0,      0,      0,      0,\n       0,      0,      0,      1,\n       1,      2,      3,      5,\n       6,      8,     10,     13,\n      15,     19,     22,     26,\n      31,     36,     41,     47,\n      53,     61,     68,     76,\n      85,     95,    105,    116,\n     127,    140,    153,    167,\n     182,    197,    214,    231,\n     249,    269,    289,    310,\n     332,    355,    380,    405,\n     431,    459,    488,    518,\n     549,    581,    615,    649,\n     685,    723,    762,    802,\n     843,    886,    930,    976,\n    1023,   1072,   1123,   1174,\n    1228,   1283,   1339,   1398,\n    1457,   1519,   1582,   1647,\n    1714,   1783,   1853,   1925,\n    1999,   2075,   2153,   2233,\n    2315,   2398,   2484,   2572,\n    2661,   2753,   2847,   2943,\n    3041,   3141,   3244,   3349,\n    3455,   3565,   3676,   3790,\n    3906,   4024,   4145,   4268,\n    4393,   4521,   4652,   4785,\n    4920,   5058,   5199,   5342,\n    5487,   5636,   5787,   5940,\n    6097,   6256,   6417,   6582,\n    6749,   6920,   7093,   7268,\n    7447,   7629,   7813,   8001,\n    8191,   8385,   8581,   8781,\n    8984,   9189,   9398,   9610,\n    9825,  10044,  10265,  10490,\n   10718,  10949,  11184,  11422,\n   11663,  11908,  12156,  12408,\n   12663,  12921,  13183,  13448,\n   13717,  13990,  14266,  14546,\n   14829,  15116,  15407,  15701,\n   15999,  16301,  16607,  16916,\n   17229,  17547,  17868,  18192,\n   18521,  18854,  19191,  19531,\n   19876,  20225,  20577,  20934,\n   21295,  21660,  22029,  22403,\n   22780,  23162,  23548,  23939,\n   24333,  24732,  25135,  25543,\n   25955,  26371,  26792,  27217,\n   27647,  28081,  28520,  28963,\n   29411,  29864,  30321,  30783,\n   31249,  31720,  32196,  32676,\n   33162,  33652,  34147,  34646,\n   35151,  35660,  36175,  36694,\n   37218,  37747,  38282,  38821,\n   39365,  39914,  40469,  41028,\n   41593,  42162,  42737,  43317,\n   43903,  44493,  45089,  45691,\n   46297,  46909,  47526,  48149,\n   48777,  49410,  50049,  50694,\n   51343,  51999,  52660,  53326,\n   53999,  54676,  55360,  56049,\n   56744,  57444,  58151,  58863,\n   59581,  60304,  61034,  61769,\n   62510,  63257,  64010,  64770,\n   65535,\n};\n\n\nconst uint16_t* lookup_table_table[] = {\n  lut_env_linear,\n  lut_env_expo,\n  lut_env_quartic,\n  lut_square_root,\n  lut_svf_cutoff,\n  lut_svf_damp,\n  lut_2164_gain,\n  lut_compressor_ratio,\n  lut_soft_knee,\n};\n\nconst uint32_t lut_env_increments[] = {\n  276301411, 231949934, 196150997, 166999666,\n  143068141, 123273939, 106787653, 92967541,\n  81312526, 71428035, 63000899, 55780710,\n  49565850, 44192924, 39528695, 35463892,\n  31908401, 28787528, 26039050, 23610894,\n  21459288, 19547282, 17843559, 16321476,\n  14958281, 13734481, 12633316, 11640330,\n  10743016, 9930523, 9193410, 8523437,\n  7913397, 7356972, 6848604, 6383397,\n  5957029, 5565672, 5205932, 4874792,\n  4569569, 4287864, 4027536, 3786669,\n  3563542, 3356609, 3164482, 2985906,\n  2819752, 2664995, 2520711, 2386061,\n  2260283, 2142684, 2032635, 1929561,\n  1832939, 1742290, 1657176, 1577196,\n  1501984, 1431202, 1364541, 1301717,\n  1242466, 1186549, 1133742, 1083841,\n  1036655, 992009, 949741, 909701,\n  871748, 835755, 801600, 769172,\n  738367, 709089, 681248, 654760,\n  629547, 605536, 582659, 560852,\n  540056, 520215, 501277, 483193,\n  465917, 449406, 433620, 418521,\n  404074, 390245, 377002, 364316,\n  352160, 340506, 329331, 318610,\n  308322, 298445, 288962, 279851,\n  271097, 262683, 254593, 246811,\n  239325, 232121, 225185, 218507,\n  212074, 205876, 199903, 194146,\n  188594, 183239, 178072, 173087,\n  168275, 163628, 159142, 154807,\n  150620, 146573, 142661, 138879,\n  135221, 131683, 128260, 124947,\n  121741, 118636, 115630, 112719,\n  109899, 107166, 104518, 101951,\n   99463,  97050,  94709,  92439,\n   90236,  88099,  86025,  84011,\n   82056,  80157,  78313,  76521,\n   74781,  73090,  71446,  69848,\n   68295,  66785,  65316,  63887,\n   62497,  61145,  59829,  58549,\n   57302,  56089,  54907,  53756,\n   52636,  51544,  50480,  49444,\n   48434,  47450,  46491,  45556,\n   44644,  43755,  42888,  42043,\n   41218,  40413,  39628,  38862,\n   38114,  37384,  36671,  35976,\n   35296,  34633,  33985,  33353,\n   32735,  32131,  31541,  30965,\n   30401,  29851,  29313,  28786,\n   28272,  27769,  27277,  26796,\n   26326,  25866,  25416,  24975,\n   24545,  24123,  23710,  23307,\n   22911,  22524,  22146,  21775,\n   21412,  21056,  20708,  20367,\n   20033,  19705,  19385,  19071,\n   18763,  18461,  18166,  17876,\n   17592,  17314,  17041,  16774,\n   16512,  16254,  16002,  15755,\n   15513,  15275,  15041,  14812,\n   14588,  14368,  14151,  13939,\n   13731,  13527,  13326,  13130,\n   12936,  12747,  12561,  12378,\n   12198,  12022,  11849,  11679,\n   11512,\n};\nconst uint32_t lut_lp_coefficients[] = {\n  590672516, 319034455, 133800766, 67976239,\n  63327094, 62214607, 61121376, 60047077,\n  58991393, 57954009, 56934619, 55932918,\n  54948609, 53981397, 53030993, 52097114,\n  51179478, 50277811, 49391841, 48521302,\n  47665932, 46825472, 45999668, 45188271,\n  44391035, 43607717, 42838081, 42081892,\n  41338919, 40608937, 39891723, 39187058,\n  38494727, 37814517, 37146221, 36489633,\n  35844551, 35210779, 34588120, 33976383,\n  33375380, 32784926, 32204838, 31634936,\n  31075046, 30524993, 29984607, 29453721,\n  28932170, 28419793, 27916429, 27421923,\n  26936121, 26458872, 25990026, 25529439,\n  25076965, 24632464, 24195797, 23766828,\n  23345422, 22931447, 22524774, 22125276,\n  21732827, 21347304, 20968586, 20596554,\n  20231092, 19872084, 19519417, 19172981,\n  18832666, 18498365, 18169974, 17847387,\n  17530504, 17219225, 16913451, 16613085,\n  16318033, 16028202, 15743500, 15463836,\n  15189122, 14919272, 14654199, 14393820,\n  14138052, 13886814, 13640026, 13397610,\n  13159489, 12925588, 12695832, 12470147,\n  12248464, 12030709, 11816816, 11606715,\n  11400339, 11197623, 10998503, 10802914,\n  10610795, 10422085, 10236722, 10054649,\n  9875806, 9700137, 9527587, 9358098,\n  9191619, 9028094, 8867473, 8709704,\n  8554736, 8402520, 8253007, 8106150,\n  7961901, 7820214, 7681044, 7544346,\n  7410077, 7278193, 7148653, 7021415,\n  6896437, 6773681, 6653106, 6534675,\n  6418348, 6304089, 6191861, 6081629,\n  5973356, 5867008, 5762550, 5659950,\n  5559175, 5460191, 5362968, 5267474,\n  5173678, 5081550, 4991061, 4902182,\n  4814883, 4729137, 4644917, 4562195,\n  4480945, 4401140, 4322755, 4245764,\n  4170144, 4095869, 4022916, 3951261,\n  3880881, 3811754, 3743857, 3677168,\n  3611666, 3547330, 3484139, 3422073,\n  3361112, 3301236, 3242425, 3184662,\n  3127927, 3072202, 3017468, 2963710,\n  2910908, 2859047, 2808109, 2758078,\n  2708937, 2660672, 2613266, 2566704,\n  2520972, 2476054, 2431935, 2388602,\n  2346041, 2304238, 2263180, 2222853,\n  2183243, 2144340, 2106129, 2068599,\n  2031737, 1995532, 1959971, 1925044,\n  1890740, 1857046, 1823952, 1791448,\n  1759523, 1728167, 1697369, 1667120,\n  1637410, 1608229, 1579568, 1551417,\n  1523768, 1496612, 1469939, 1443741,\n  1418011, 1392739, 1367917, 1343537,\n  1319591, 1296073, 1272973, 1250285,\n  1228001, 1206114, 1184617, 1163504,\n  1142766, 1122398, 1102393, 1082744,\n  1063446, 1044491, 1025874, 1007589,\n  989630, 971991, 954666, 937650,\n  920937, 904521, 888399, 872564,\n  857011, 841735, 826731, 811995,\n  797521, 783305, 769343, 755630,\n  742160, 728931, 715938, 703176,\n  690642, 678331, 666240, 654364,\n  642699, 631243, 619991, 608939,\n  598084, 587423, 576952, 566667,\n  556566, 546644, 536900, 527329,\n  517929, 508696, 499628, 490722,\n  481974, 473383, 464944, 456656,\n  448515, 440520, 432667, 424954,\n  417379, 409938, 402631, 395453,\n  388404, 381480, 374679, 368000,\n  361440, 354997, 348668, 342453,\n  336348, 330352, 324463, 318678,\n  312997, 307418, 301937, 296555,\n  291268, 286076, 280976, 275967,\n  271047, 266215, 261469, 256808,\n  252230, 247733, 243317, 238979,\n  234719, 230535, 226425, 222388,\n  218424, 214530, 210705, 206949,\n  203260, 199636, 196077, 192582,\n  189148, 185776, 182465, 179212,\n  176017, 172879, 169797, 166770,\n  163797, 160877, 158009, 155192,\n  152425, 149708, 147039, 144417,\n  141843, 139314, 136830, 134391,\n  131995, 129642, 127331, 125061,\n  122831, 120641, 118491, 116378,\n  114304, 112266, 110264, 108299,\n  106368, 104472, 102609, 100780,\n   98983,  97218,  95485,  93783,\n   92111,  90469,  88856,  87272,\n   85716,  84188,  82687,  81213,\n   79765,  78343,  76946,  75574,\n   74227,  72904,  71604,  70328,\n   69074,  67842,  66633,  65445,\n   64278,  63132,  62007,  60901,\n   59815,  58749,  57702,  56673,\n   55663,  54670,  53696,  52738,\n   51798,  50875,  49968,  49077,\n   48202,  47343,  46498,  45669,\n   44855,  44056,  43270,  42499,\n   41741,  40997,  40266,  39548,\n   38843,  38151,  37470,  36802,\n   36146,  35502,  34869,  34247,\n   33637,  33037,  32448,  31870,\n   31301,  30743,  30195,  29657,\n   29128,  28609,  28099,  27598,\n   27106,  26623,  26148,  25682,\n   25224,  24774,  24332,  23899,\n   23473,  23054,  22643,  22239,\n   21843,  21454,  21071,  20695,\n   20326,  19964,  19608,  19258,\n   18915,  18578,  18247,  17921,\n   17602,  17288,  16980,  16677,\n   16380,  16088,  15801,  15519,\n   15243,  14971,  14704,  14442,\n   14184,  13931,  13683,  13439,\n   13199,  12964,  12733,  12506,\n   12283,  12064,  11849,  11638,\n   11430,  11226,  11026,  10830,\n   10637,  10447,  10261,  10078,\n    9898,   9722,   9548,   9378,\n    9211,   9047,   8885,   8727,\n    8571,   8418,   8268,   8121,\n    7976,   7834,   7694,   7557,\n    7422,   7290,   7160,   7032,\n    6907,   6784,   6663,   6544,\n    6427,   6313,   6200,   6090,\n    5981,   5875,   5770,   5667,\n    5566,   5467,   5369,   5273,\n    5179,   5087,   4996,   4907,\n    4820,   4734,   4649,   4567,\n    4485,   4405,   4327,   4249,\n    4174,   4099,   4026,   3954,\n    3884,   3815,   3747,   3680,\n    3614,   3550,   3486,   3424,\n    3363,   3303,   3244,   3187,\n    3130,   3074,   3019,   2965,\n    2912,   2860,   2809,   2759,\n    2710,   2662,   2614,   2568,\n    2522,   2477,   2433,   2389,\n    2347,   2305,   2264,   2224,\n    2184,   2145,   2107,   2069,\n    2032,   1996,   1960,   1925,\n    1891,   1857,   1824,   1792,\n    1760,   1728,   1698,   1667,\n    1638,   1608,   1580,   1551,\n    1524,   1497,   1470,   1444,\n    1418,   1393,   1368,   1343,\n    1319,   1296,   1273,   1250,\n    1228,   1206,   1184,   1163,\n    1143,   1122,   1102,   1083,\n    1063,   1044,   1026,   1007,\n     989,    972,    954,    937,\n     921,    904,    888,    872,\n     857,    841,    826,    812,\n     797,    783,    769,    755,\n     742,    729,    716,    703,\n};\nconst uint32_t lut_exp2[] = {\n   65536,  65713,  65891,  66070,\n   66249,  66429,  66609,  66789,\n   66971,  67152,  67334,  67517,\n   67700,  67883,  68067,  68252,\n   68437,  68623,  68809,  68995,\n   69182,  69370,  69558,  69747,\n   69936,  70125,  70315,  70506,\n   70697,  70889,  71081,  71274,\n   71467,  71661,  71855,  72050,\n   72245,  72441,  72638,  72834,\n   73032,  73230,  73429,  73628,\n   73827,  74027,  74228,  74429,\n   74631,  74833,  75036,  75240,\n   75444,  75648,  75853,  76059,\n   76265,  76472,  76679,  76887,\n   77096,  77305,  77514,  77725,\n   77935,  78147,  78359,  78571,\n   78784,  78998,  79212,  79427,\n   79642,  79858,  80074,  80292,\n   80509,  80727,  80946,  81166,\n   81386,  81607,  81828,  82050,\n   82272,  82495,  82719,  82943,\n   83168,  83394,  83620,  83846,\n   84074,  84302,  84530,  84759,\n   84989,  85220,  85451,  85682,\n   85915,  86148,  86381,  86615,\n   86850,  87086,  87322,  87559,\n   87796,  88034,  88273,  88512,\n   88752,  88993,  89234,  89476,\n   89718,  89962,  90206,  90450,\n   90695,  90941,  91188,  91435,\n   91683,  91932,  92181,  92431,\n   92681,  92933,  93185,  93437,\n   93691,  93945,  94199,  94455,\n   94711,  94968,  95225,  95483,\n   95742,  96002,  96262,  96523,\n   96785,  97047,  97310,  97574,\n   97839,  98104,  98370,  98637,\n   98904,  99172,  99441,  99711,\n   99981, 100252, 100524, 100797,\n  101070, 101344, 101619, 101894,\n  102170, 102447, 102725, 103004,\n  103283, 103563, 103844, 104125,\n  104408, 104691, 104975, 105259,\n  105545, 105831, 106118, 106405,\n  106694, 106983, 107273, 107564,\n  107856, 108148, 108441, 108735,\n  109030, 109326, 109622, 109919,\n  110217, 110516, 110816, 111116,\n  111418, 111720, 112023, 112326,\n  112631, 112936, 113243, 113550,\n  113857, 114166, 114476, 114786,\n  115097, 115409, 115722, 116036,\n  116351, 116666, 116982, 117300,\n  117618, 117936, 118256, 118577,\n  118898, 119221, 119544, 119868,\n  120193, 120519, 120846, 121173,\n  121502, 121831, 122162, 122493,\n  122825, 123158, 123492, 123827,\n  124162, 124499, 124837, 125175,\n  125514, 125855, 126196, 126538,\n  126881, 127225, 127570, 127916,\n  128263, 128611, 128959, 129309,\n  129660, 130011, 130364, 130717,\n  131072,\n};\nconst uint32_t lut_log2[] = {\n  524288, 524656, 525023, 525389,\n  525753, 526116, 526478, 526838,\n  527197, 527554, 527910, 528265,\n  528619, 528971, 529322, 529671,\n  530019, 530366, 530712, 531057,\n  531400, 531742, 532082, 532422,\n  532760, 533097, 533433, 533768,\n  534101, 534434, 534765, 535095,\n  535424, 535751, 536078, 536403,\n  536728, 537051, 537373, 537694,\n  538014, 538333, 538651, 538968,\n  539283, 539598, 539912, 540224,\n  540536, 540846, 541156, 541464,\n  541772, 542078, 542384, 542688,\n  542992, 543294, 543596, 543896,\n  544196, 544495, 544793, 545089,\n  545385, 545680, 545974, 546268,\n  546560, 546851, 547142, 547431,\n  547720, 548008, 548295, 548581,\n  548866, 549150, 549434, 549717,\n  549998, 550279, 550560, 550839,\n  551117, 551395, 551672, 551948,\n  552223, 552498, 552771, 553044,\n  553316, 553588, 553858, 554128,\n  554397, 554665, 554932, 555199,\n  555465, 555730, 555995, 556259,\n  556522, 556784, 557045, 557306,\n  557566, 557826, 558084, 558342,\n  558600, 558856, 559112, 559367,\n  559622, 559876, 560129, 560381,\n  560633, 560884, 561135, 561384,\n  561634, 561882, 562130, 562377,\n  562624, 562870, 563115, 563359,\n  563603, 563847, 564089, 564332,\n  564573, 564814, 565054, 565294,\n  565533, 565771, 566009, 566247,\n  566483, 566719, 566955, 567190,\n  567424, 567658, 567891, 568124,\n  568356, 568587, 568818, 569048,\n  569278, 569507, 569736, 569964,\n  570192, 570419, 570645, 570871,\n  571096, 571321, 571545, 571769,\n  571992, 572215, 572437, 572659,\n  572880, 573101, 573321, 573541,\n  573760, 573978, 574197, 574414,\n  574631, 574848, 575064, 575280,\n  575495, 575709, 575923, 576137,\n  576350, 576563, 576775, 576987,\n  577198, 577409, 577619, 577829,\n  578039, 578248, 578456, 578664,\n  578872, 579079, 579286, 579492,\n  579698, 579903, 580108, 580312,\n  580516, 580720, 580923, 581125,\n  581328, 581530, 581731, 581932,\n  582132, 582332, 582532, 582731,\n  582930, 583129, 583327, 583524,\n  583721, 583918, 584115, 584311,\n  584506, 584701, 584896, 585090,\n  585284, 585478, 585671, 585864,\n  586056, 586248, 586440, 586631,\n  586822, 587012, 587202, 587392,\n  587581, 587770, 587959, 588147,\n  588335, 588522, 588709, 588896,\n  589082, 589268, 589453, 589639,\n  589824,\n};\nconst uint32_t lut_lorenz_rate[] = {\n       3,      3,      3,      4,\n       4,      4,      4,      4,\n       5,      5,      5,      5,\n       6,      6,      6,      7,\n       7,      7,      8,      8,\n       8,      9,      9,     10,\n      10,     11,     11,     12,\n      12,     13,     13,     14,\n      15,     15,     16,     17,\n      18,     18,     19,     20,\n      21,     22,     23,     24,\n      25,     27,     28,     29,\n      30,     32,     33,     35,\n      36,     38,     40,     42,\n      44,     46,     48,     50,\n      52,     55,     57,     60,\n      63,     66,     69,     72,\n      75,     78,     82,     86,\n      90,     94,     98,    103,\n     107,    112,    118,    123,\n     129,    135,    141,    147,\n     154,    161,    168,    176,\n     184,    193,    201,    211,\n     220,    230,    241,    252,\n     263,    275,    288,    301,\n     315,    329,    344,    360,\n     377,    394,    412,    431,\n     451,    471,    493,    515,\n     539,    563,    589,    616,\n     644,    674,    705,    737,\n     770,    806,    843,    881,\n     921,    963,   1007,   1054,\n    1102,   1152,   1205,   1260,\n    1317,   1378,   1441,   1506,\n    1575,   1647,   1722,   1801,\n    1883,   1970,   2060,   2154,\n    2252,   2355,   2463,   2575,\n    2693,   2816,   2945,   3079,\n    3220,   3367,   3521,   3682,\n    3850,   4026,   4210,   4402,\n    4603,   4814,   5034,   5264,\n    5504,   5756,   6019,   6294,\n    6581,   6882,   7196,   7525,\n    7869,   8229,   8605,   8998,\n    9409,   9839,  10288,  10758,\n   11250,  11764,  12302,  12864,\n   13451,  14066,  14709,  15381,\n   16083,  16818,  17587,  18390,\n   19230,  20109,  21028,  21989,\n   22993,  24044,  25142,  26291,\n   27492,  28748,  30062,  31435,\n   32872,  34374,  35944,  37586,\n   39304,  41099,  42977,  44941,\n   46994,  49141,  51386,  53734,\n   56189,  58756,  61441,  64248,\n   67184,  70253,  73463,  76819,\n   80329,  83999,  87837,  91850,\n   96047, 100435, 105024, 109822,\n  114840, 120087, 125573, 131310,\n  137310, 143583, 150144, 157003,\n  164177, 171678, 179521, 187723,\n  196300, 205269, 214647, 224454,\n  234709, 245433, 256646, 268372,\n  280634, 293455, 306863, 320883,\n  335544,\n};\n\n\nconst uint32_t* lookup_table_32_table[] = {\n  lut_env_increments,\n  lut_lp_coefficients,\n  lut_exp2,\n  lut_log2,\n  lut_lorenz_rate,\n};\n\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/resources.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Resources definitions.\n//\n// Automatically generated with:\n// make resources\n\n\n#ifndef STREAMS_RESOURCES_H_\n#define STREAMS_RESOURCES_H_\n\n\n#include \"stmlib/stmlib.h\"\n\n\n\nnamespace streams {\n\ntypedef uint8_t ResourceId;\n\nextern const char* string_table[];\n\nextern const int16_t* waveforms_table[];\n\nextern const uint16_t* lookup_table_table[];\n\nextern const uint32_t* lookup_table_32_table[];\n\nextern const int16_t wav_gompertz[];\nextern const int16_t wav_db[];\nextern const uint16_t lut_env_linear[];\nextern const uint16_t lut_env_expo[];\nextern const uint16_t lut_env_quartic[];\nextern const uint16_t lut_square_root[];\nextern const uint16_t lut_svf_cutoff[];\nextern const uint16_t lut_svf_damp[];\nextern const uint16_t lut_2164_gain[];\nextern const uint16_t lut_compressor_ratio[];\nextern const uint16_t lut_soft_knee[];\nextern const uint32_t lut_env_increments[];\nextern const uint32_t lut_lp_coefficients[];\nextern const uint32_t lut_exp2[];\nextern const uint32_t lut_log2[];\nextern const uint32_t lut_lorenz_rate[];\n#define STR_DUMMY 0  // dummy\n#define WAV_GOMPERTZ 0\n#define WAV_GOMPERTZ_SIZE 1025\n#define WAV_DB 1\n#define WAV_DB_SIZE 257\n#define LUT_ENV_LINEAR 0\n#define LUT_ENV_LINEAR_SIZE 257\n#define LUT_ENV_EXPO 1\n#define LUT_ENV_EXPO_SIZE 257\n#define LUT_ENV_QUARTIC 2\n#define LUT_ENV_QUARTIC_SIZE 257\n#define LUT_SQUARE_ROOT 3\n#define LUT_SQUARE_ROOT_SIZE 257\n#define LUT_SVF_CUTOFF 4\n#define LUT_SVF_CUTOFF_SIZE 257\n#define LUT_SVF_DAMP 5\n#define LUT_SVF_DAMP_SIZE 257\n#define LUT_2164_GAIN 6\n#define LUT_2164_GAIN_SIZE 257\n#define LUT_COMPRESSOR_RATIO 7\n#define LUT_COMPRESSOR_RATIO_SIZE 257\n#define LUT_SOFT_KNEE 8\n#define LUT_SOFT_KNEE_SIZE 257\n#define LUT_ENV_INCREMENTS 0\n#define LUT_ENV_INCREMENTS_SIZE 257\n#define LUT_LP_COEFFICIENTS 1\n#define LUT_LP_COEFFICIENTS_SIZE 640\n#define LUT_EXP2 2\n#define LUT_EXP2_SIZE 257\n#define LUT_LOG2 3\n#define LUT_LOG2_SIZE 257\n#define LUT_LORENZ_RATE 4\n#define LUT_LORENZ_RATE_SIZE 257\n\n}  // namespace streams\n\n#endif  // STREAMS_RESOURCES_H_\n"
  },
  {
    "path": "lib/streams/svf.cc",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SVF used for modeling the bridged T-networks.\n\n#include \"streams/svf.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nusing namespace stmlib;\n\nvoid Svf::Init() {\n  lp_ = 0;\n  bp_ = 0;\n  frequency_ = 33 << 7;\n  resonance_ = 16384;\n  dirty_ = true;\n}\n\nvoid Svf::Process(int32_t in) {\n  if (dirty_) {\n    f_ = Interpolate824(lut_svf_cutoff, frequency_ << 17);\n    damp_ = Interpolate824(lut_svf_damp, resonance_ << 17);\n    dirty_ = false;\n  }\n  int32_t f = f_;\n  int32_t damp = damp_;\n  int32_t notch = in - (bp_ * damp >> 15);\n  lp_ += f * bp_ >> 15;\n  CLIP(lp_)\n  hp_ = notch - lp_;\n  bp_ += f * hp_ >> 15;\n  CLIP(bp_)\n  CLIP(hp_)\n}\n\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/svf.h",
    "content": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// SVF used for the envelope follower filter bank.\n\n#ifndef STREAMS_SVF_H_\n#define STREAMS_SVF_H_\n\n#include \"stmlib/stmlib.h\"\n\nnamespace streams {\n\nclass Svf {\n public:\n  Svf() { }\n  ~Svf() { }\n  \n  void Init();\n  \n  void set_frequency(int16_t frequency) {\n    dirty_ = dirty_ || (frequency_ != frequency);\n    frequency_ = frequency;\n  }\n  \n  void set_resonance(int16_t resonance) {\n    resonance_ = resonance;\n    dirty_ = true;\n  }\n  \n  void Process(int32_t sample);\n  inline int32_t lp() const { return lp_; }\n  inline int32_t bp() const { return bp_; }\n  inline int32_t hp() const { return hp_; }\n  \n private:\n  bool dirty_;\n  \n  int16_t frequency_;\n  int16_t resonance_;\n  \n  int32_t f_;\n  int32_t damp_;\n\n  int32_t lp_;\n  int32_t bp_;\n  int32_t hp_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Svf);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_SVF_H_\n"
  },
  {
    "path": "lib/streams/vactrol.cc",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Vactrol.\n\n#include \"streams/vactrol.h\"\n\n#include \"stmlib/utils/dsp.h\"\n\n#include \"streams/gain.h\"\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nusing namespace stmlib;\n\nvoid Vactrol::Init() {\n  state_[0] = 0;\n  state_[1] = 0;\n  state_[2] = 0;\n  state_[3] = 0;\n  \n  excite_ = 0;\n}\n\nvoid Vactrol::Process(\n    int16_t audio,\n    int16_t excite,\n    uint16_t* gain,\n    uint16_t* frequency) {\n  // Smooth frequency amount parameters.\n  frequency_amount_ += (target_frequency_amount_ - frequency_amount_) >> 8;\n  frequency_offset_ += (target_frequency_offset_ - frequency_offset_) >> 8;\n\n  int32_t input;\n  int32_t error;\n  int64_t coefficient = 0;\n\n  if (excite < 0) {\n    excite = 0;\n  }\n  \n  // Simple plucked mode.\n  if (plucked_) {\n    if (gate_ == false) {\n      if (excite > kSchmittTriggerThreshold) {\n        gate_ = true;\n        state_[0] = 32767 << 16;\n        state_[1] = 32767 << 16;\n      }\n    } else {\n      if (excite < (kSchmittTriggerThreshold >> 1)) {\n        gate_ = false;\n      }\n    }\n    \n    // Filter the excitation pulses.\n    state_[0] -= static_cast<int64_t>(\n        state_[0]) * fast_decay_coefficient_ >> 31;\n    state_[1] -= static_cast<int64_t>(\n        state_[1]) * decay_coefficient_ >> 31;\n    \n    // VCF envelope.\n    error = state_[0] - state_[2];\n    coefficient = error > 0\n        ? fast_attack_coefficient_ : fast_decay_coefficient_;\n    state_[2] += static_cast<int64_t>(error) * coefficient >> 31;\n    \n    // VCA envelope.\n    error = state_[1] - state_[3];\n    coefficient = error > 0 ? fast_attack_coefficient_ : decay_coefficient_;\n    // Increase the duration of the tail\n    int64_t strength = error > 0 ? error : -error;\n    coefficient = (coefficient >> 1) + (coefficient * strength >> 31);\n    state_[3] += static_cast<int64_t>(error) * coefficient >> 31;\n\n    uint16_t vcf_amount = state_[2] >> 16;\n    uint16_t vca_mount = Interpolate1022(wav_gompertz, (state_[3] >> 2) * 3);\n    \n    *gain = kAboveUnityGain * vca_mount >> 15;\n    *frequency = frequency_offset_ + \\\n         (frequency_amount_ * vcf_amount >> 15);\n\n    return;\n  }\n  \n  // Low-pass filter the negative edges to prevent fast pulse to immediately\n  // decay before the vactrol has started reacting. This allows the EXCITE\n  // input to be used for both controlling the vactrol or just plucking it\n  // from a trigger.\n  error = excite - excite_;\n  coefficient = error > 0 ? (1 << 30) : (decay_coefficient_ << 1);\n  excite_ += static_cast<int64_t>(error) * coefficient >> 31;\n  excite = excite_;\n  \n  input = frequency_offset_;\n  input += frequency_amount_ >> 1;\n  input = (65535 + input) >> 1;\n  input *= excite;\n  \n  state_[3] += static_cast<int64_t>(input - state_[3]) * 67976239 >> 31;\n  \n  error = input - state_[0];\n  coefficient = 0;\n  if (error > 0) {\n    if (state_[1] > 0) {\n      coefficient = attack_coefficient_;\n      // Increase attack time when the photocell has been desensitized.\n      coefficient += coefficient * (255 - (state_[2] >> 23)) >> 6;\n    } else {\n      coefficient = fast_attack_coefficient_;\n    }\n  } else {\n    if (state_[1] < 0) {\n      coefficient = decay_coefficient_;\n    } else {\n      coefficient = fast_decay_coefficient_;\n    }\n  }\n  // First order.\n  state_[0] += static_cast<int64_t>(error) * coefficient >> 31;\n  \n  // Second order.\n  state_[1] += static_cast<int64_t>(error - state_[1]) * coefficient >> 31;\n  \n  // Memory effect.\n  int32_t sensitivity = state_[0];\n  if (sensitivity > (1 << 28)) {\n    sensitivity = 1 << 31;\n  } else {\n    sensitivity <<= 3;\n  }\n  error = sensitivity - state_[2];\n  if (error > 0) {\n    // Get into the \"sensitized\" state in 1s.\n    state_[2] += static_cast<int64_t>(error) * 138132 >> 31;\n  } else {\n    // Get out of the \"sensitized\" state in 60s.\n    state_[2] += static_cast<int64_t>(error) * 1151 >> 31;\n  }\n  \n  // Apply non-linearity.\n  int32_t index = state_[0] >> 1;\n  \n  // A little hack to add overshoot...\n  index += (state_[3] >> 15) * (state_[1] >> 15) >> 1;\n  if (index < 0) {\n    index = 0;\n  } else if (index >= (1 << 30)) {\n    index = (1 << 30) - 1;\n  }\n  uint16_t amplitude = index < 536870912\n      ? Interpolate1022(wav_gompertz, static_cast<uint32_t>(index) << 3)\n      : 32767;\n  uint16_t cutoff = index >> 14;\n  if (cutoff >= 32767) cutoff = 32767;\n  cutoff = cutoff * cutoff >> 15;\n  *gain = kAboveUnityGain * amplitude >> 15;\n  *frequency = frequency_offset_ + \\\n       (frequency_amount_ * cutoff >> 15);\n}\n\n}  // namespace streams\n"
  },
  {
    "path": "lib/streams/vactrol.h",
    "content": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n// \n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n// -----------------------------------------------------------------------------\n//\n// Vactrol.\n\n#ifndef STREAMS_VACTROL_H_\n#define STREAMS_VACTROL_H_\n\n#include \"stmlib/stmlib.h\"\n\n#include \"streams/meta_parameters.h\"\n#include \"streams/resources.h\"\n\nnamespace streams {\n\nclass Vactrol {\n public:\n  Vactrol() { }\n  ~Vactrol() { }\n  \n  void Init();\n  void Process(\n      int16_t audio,\n      int16_t excite,\n      uint16_t* gain,\n      uint16_t* frequency);\n\n  void Configure(bool alternate, int32_t* parameters, int32_t* globals) {\n    uint16_t attack_time;\n    uint16_t decay_time;\n    \n    if (globals) {\n      // Attack: 10ms to 1000ms\n      attack_time = 128 + (globals[0] >> 8);\n      // Decay: 10ms to 5000ms\n      decay_time = 128 + (globals[2] * 355 >> 16);\n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    } else {\n      uint16_t shape = parameters[0];\n      ComputeAmountOffset(\n          parameters[1],\n          &target_frequency_amount_,\n          &target_frequency_offset_);\n    \n      if (shape < 32768) {\n        // attack: 10ms\n        attack_time = 128;\n        // decay: 50ms to 2000ms\n        decay_time = 227 + (shape * 196 >> 15);\n      } else if (shape < 49512) {\n        shape -= 32768;\n        // attack: 10ms to 500ms.\n        attack_time = 128 + (shape * 227 >> 15);\n        // decay: 2000ms to 1000ms.\n        decay_time = 423 - (89 * shape >> 15);\n      } else {\n        shape -= 49512;\n        // attack: 500ms to 50ms.\n        attack_time = 355 - (shape >> 7);\n        // decay: 1000ms to 100ms.\n        decay_time = 384 - (128 * shape >> 15);\n      }\n    }\n    \n    attack_coefficient_ = lut_lp_coefficients[attack_time];\n    fast_attack_coefficient_ = lut_lp_coefficients[attack_time - 128];\n    decay_coefficient_ = lut_lp_coefficients[decay_time];\n    fast_decay_coefficient_ = lut_lp_coefficients[decay_time - 128];\n    \n    plucked_ = alternate;\n    if (alternate) {\n      fast_attack_coefficient_ <<= 4;\n    } else {\n      decay_coefficient_ >>= 1;\n    }\n    \n    int32_t ringing_tail = 8192;\n    int32_t headroom = 65535 - target_frequency_offset_;\n    if (ringing_tail > headroom) {\n      ringing_tail = headroom;\n    }\n    if (ringing_tail > target_frequency_amount_) {\n      ringing_tail = target_frequency_amount_;\n    }\n    \n    target_frequency_offset_ += ringing_tail;\n    target_frequency_amount_ -= ringing_tail;\n  }\n\n\n private:\n  int32_t target_frequency_amount_;\n  int32_t target_frequency_offset_;\n  int32_t frequency_amount_;\n  int32_t frequency_offset_;\n  \n  int32_t attack_coefficient_;\n  int32_t decay_coefficient_;\n  int32_t fast_attack_coefficient_;\n  int32_t fast_decay_coefficient_;\n  \n  int32_t state_[4];\n  int32_t excite_;\n  \n  bool gate_;\n  bool plucked_;\n  \n  DISALLOW_COPY_AND_ASSIGN(Vactrol);\n};\n\n}  // namespace streams\n\n#endif  // STREAMS_VACTROL_H_\n"
  },
  {
    "path": "lib/xz_lzma2/xz.h",
    "content": "/*\n * XZ decompressor\n *\n * Authors: Lasse Collin <lasse.collin@tukaani.org>\n *          Igor Pavlov <https://7-zip.org/>\n *\n * This file has been put into the public domain.\n * You can do whatever you want with this file.\n */\n\n#ifndef XZ_H\n#define XZ_H\n\n#ifdef __KERNEL__\n#\tinclude <linux/stddef.h>\n#\tinclude <linux/types.h>\n#else\n#\tinclude <stddef.h>\n#\tinclude <stdint.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * enum xz_mode - Operation mode\n *\n * @XZ_SINGLE:              Single-call mode. This uses less RAM than\n *                          multi-call modes, because the LZMA2\n *                          dictionary doesn't need to be allocated as\n *                          part of the decoder state. All required data\n *                          structures are allocated at initialization,\n *                          so xz_dec_run() cannot return XZ_MEM_ERROR.\n * @XZ_PREALLOC:            Multi-call mode with preallocated LZMA2\n *                          dictionary buffer. All data structures are\n *                          allocated at initialization, so xz_dec_run()\n *                          cannot return XZ_MEM_ERROR.\n * @XZ_DYNALLOC:            Multi-call mode. The LZMA2 dictionary is\n *                          allocated once the required size has been\n *                          parsed from the stream headers. If the\n *                          allocation fails, xz_dec_run() will return\n *                          XZ_MEM_ERROR.\n *\n * It is possible to enable support only for a subset of the above\n * modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC,\n * or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled\n * with support for all operation modes, but the preboot code may\n * be built with fewer features to minimize code size.\n */\nenum xz_mode {\n\tXZ_SINGLE,\n\tXZ_PREALLOC,\n\tXZ_DYNALLOC\n};\n\n/**\n * enum xz_ret - Return codes\n * @XZ_OK:                  Everything is OK so far. More input or more\n *                          output space is required to continue. This\n *                          return code is possible only in multi-call mode\n *                          (XZ_PREALLOC or XZ_DYNALLOC).\n * @XZ_STREAM_END:          Operation finished successfully.\n * @XZ_UNSUPPORTED_CHECK:   Integrity check type is not supported. Decoding\n *                          is still possible in multi-call mode by simply\n *                          calling xz_dec_run() again.\n *                          Note that this return value is used only if\n *                          XZ_DEC_ANY_CHECK was defined at build time,\n *                          which is not used in the kernel. Unsupported\n *                          check types return XZ_OPTIONS_ERROR if\n *                          XZ_DEC_ANY_CHECK was not defined at build time.\n * @XZ_MEM_ERROR:           Allocating memory failed. This return code is\n *                          possible only if the decoder was initialized\n *                          with XZ_DYNALLOC. The amount of memory that was\n *                          tried to be allocated was no more than the\n *                          dict_max argument given to xz_dec_init().\n * @XZ_MEMLIMIT_ERROR:      A bigger LZMA2 dictionary would be needed than\n *                          allowed by the dict_max argument given to\n *                          xz_dec_init(). This return value is possible\n *                          only in multi-call mode (XZ_PREALLOC or\n *                          XZ_DYNALLOC); the single-call mode (XZ_SINGLE)\n *                          ignores the dict_max argument.\n * @XZ_FORMAT_ERROR:        File format was not recognized (wrong magic\n *                          bytes).\n * @XZ_OPTIONS_ERROR:       This implementation doesn't support the requested\n *                          compression options. In the decoder this means\n *                          that the header CRC32 matches, but the header\n *                          itself specifies something that we don't support.\n * @XZ_DATA_ERROR:          Compressed data is corrupt.\n * @XZ_BUF_ERROR:           Cannot make any progress. Details are slightly\n *                          different between multi-call and single-call\n *                          mode; more information below.\n *\n * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls\n * to XZ code cannot consume any input and cannot produce any new output.\n * This happens when there is no new input available, or the output buffer\n * is full while at least one output byte is still pending. Assuming your\n * code is not buggy, you can get this error only when decoding a compressed\n * stream that is truncated or otherwise corrupt.\n *\n * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer\n * is too small or the compressed input is corrupt in a way that makes the\n * decoder produce more output than the caller expected. When it is\n * (relatively) clear that the compressed input is truncated, XZ_DATA_ERROR\n * is used instead of XZ_BUF_ERROR.\n */\nenum xz_ret {\n\tXZ_OK,\n\tXZ_STREAM_END,\n\tXZ_UNSUPPORTED_CHECK,\n\tXZ_MEM_ERROR,\n\tXZ_MEMLIMIT_ERROR,\n\tXZ_FORMAT_ERROR,\n\tXZ_OPTIONS_ERROR,\n\tXZ_DATA_ERROR,\n\tXZ_BUF_ERROR\n};\n\n/**\n * struct xz_buf - Passing input and output buffers to XZ code\n * @in:         Beginning of the input buffer. This may be NULL if and only\n *              if in_pos is equal to in_size.\n * @in_pos:     Current position in the input buffer. This must not exceed\n *              in_size.\n * @in_size:    Size of the input buffer\n * @out:        Beginning of the output buffer. This may be NULL if and only\n *              if out_pos is equal to out_size.\n * @out_pos:    Current position in the output buffer. This must not exceed\n *              out_size.\n * @out_size:   Size of the output buffer\n *\n * Only the contents of the output buffer from out[out_pos] onward, and\n * the variables in_pos and out_pos are modified by the XZ code.\n */\nstruct xz_buf {\n\tconst uint8_t *in;\n\tsize_t in_pos;\n\tsize_t in_size;\n\n\tuint8_t *out;\n\tsize_t out_pos;\n\tsize_t out_size;\n};\n\n/**\n * struct xz_dec - Opaque type to hold the XZ decoder state\n */\nstruct xz_dec;\n\n/*\n * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used\n * before calling xz_dec_lzma2_run().\n */\nstruct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,\n\t\t\t\t\t\t   uint32_t dict_max);\n\n/*\n * Decode the LZMA2 properties (one byte) and reset the decoder. Return\n * XZ_OK on success, XZ_MEMLIMIT_ERROR if the preallocated dictionary is not\n * big enough, and XZ_OPTIONS_ERROR if props indicates something that this\n * decoder doesn't support.\n */\nenum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s,\n\t\t\t\t\t uint8_t props);\n\n/* Decode raw LZMA2 stream from b->in to b->out. */\nenum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,\n\t\t\t\t       struct xz_buf *b);\n\n/* Free the memory allocated for the LZMA2 decoder. */\nvoid xz_dec_lzma2_end(struct xz_dec_lzma2 *s);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "lib/xz_lzma2/xz_config.h",
    "content": "/*\n * Private includes and definitions for userspace use of XZ Embedded\n *\n * Author: Lasse Collin <lasse.collin@tukaani.org>\n *\n * This file has been put into the public domain.\n * You can do whatever you want with this file.\n */\n\n#ifndef XZ_CONFIG_H\n#define XZ_CONFIG_H\n\n/* Uncomment to enable CRC64 support. */\n/* #define XZ_USE_CRC64 */\n\n/* Uncomment as needed to enable BCJ filter decoders. */\n/* #define XZ_DEC_X86 */\n/* #define XZ_DEC_POWERPC */\n/* #define XZ_DEC_IA64 */\n/* #define XZ_DEC_ARM */\n/* #define XZ_DEC_ARMTHUMB */\n/* #define XZ_DEC_SPARC */\n\n/*\n * MSVC doesn't support modern C but XZ Embedded is mostly C89\n * so these are enough.\n */\n#ifdef _MSC_VER\ntypedef unsigned char bool;\n#\tdefine true 1\n#\tdefine false 0\n#\tdefine inline __inline\n#else\n#\tinclude <stdbool.h>\n#endif\n\n#include <stdlib.h>\n#include <string.h>\n\n#include \"xz.h\"\n\nvoid* xz_malloc(size_t s);\nvoid xz_free(void* p);\n\n#define kmalloc(size, flags) xz_malloc(size)\n#define kfree(ptr) xz_free(ptr)\n#define vmalloc(size) xz_malloc(size)\n#define vfree(ptr) xz_free(ptr)\n\n#define memeq(a, b, size) (memcmp(a, b, size) == 0)\n#define memzero(buf, size) memset(buf, 0, size)\n\n#ifndef min\n#\tdefine min(x, y) ((x) < (y) ? (x) : (y))\n#endif\n#define min_t(type, x, y) min(x, y)\n\n/*\n * Some functions have been marked with __always_inline to keep the\n * performance reasonable even when the compiler is optimizing for\n * small code size. You may be able to save a few bytes by #defining\n * __always_inline to plain inline, but don't complain if the code\n * becomes slow.\n *\n * NOTE: System headers on GNU/Linux may #define this macro already,\n * so if you want to change it, you need to #undef it first.\n */\n#ifndef __always_inline\n#\tifdef __GNUC__\n#\t\tdefine __always_inline \\\n\t\t\tinline __attribute__((__always_inline__))\n#\telse\n#\t\tdefine __always_inline inline\n#\tendif\n#endif\n\n/* Inline functions to access unaligned unsigned 32-bit integers */\n#ifndef get_unaligned_le32\nstatic inline uint32_t get_unaligned_le32(const uint8_t *buf)\n{\n\treturn (uint32_t)buf[0]\n\t\t\t| ((uint32_t)buf[1] << 8)\n\t\t\t| ((uint32_t)buf[2] << 16)\n\t\t\t| ((uint32_t)buf[3] << 24);\n}\n#endif\n\n#ifndef get_unaligned_be32\nstatic inline uint32_t get_unaligned_be32(const uint8_t *buf)\n{\n\treturn (uint32_t)(buf[0] << 24)\n\t\t\t| ((uint32_t)buf[1] << 16)\n\t\t\t| ((uint32_t)buf[2] << 8)\n\t\t\t| (uint32_t)buf[3];\n}\n#endif\n\n#ifndef put_unaligned_le32\nstatic inline void put_unaligned_le32(uint32_t val, uint8_t *buf)\n{\n\tbuf[0] = (uint8_t)val;\n\tbuf[1] = (uint8_t)(val >> 8);\n\tbuf[2] = (uint8_t)(val >> 16);\n\tbuf[3] = (uint8_t)(val >> 24);\n}\n#endif\n\n#ifndef put_unaligned_be32\nstatic inline void put_unaligned_be32(uint32_t val, uint8_t *buf)\n{\n\tbuf[0] = (uint8_t)(val >> 24);\n\tbuf[1] = (uint8_t)(val >> 16);\n\tbuf[2] = (uint8_t)(val >> 8);\n\tbuf[3] = (uint8_t)val;\n}\n#endif\n\n/*\n * Use get_unaligned_le32() also for aligned access for simplicity. On\n * little endian systems, #define get_le32(ptr) (*(const uint32_t *)(ptr))\n * could save a few bytes in code size.\n */\n#ifndef get_le32\n#\tdefine get_le32 get_unaligned_le32\n#endif\n\n#endif\n"
  },
  {
    "path": "lib/xz_lzma2/xz_dec_lzma2.c",
    "content": "/*\n * LZMA2 decoder\n *\n * Authors: Lasse Collin <lasse.collin@tukaani.org>\n *          Igor Pavlov <https://7-zip.org/>\n *\n * This file has been put into the public domain.\n * You can do whatever you want with this file.\n */\n\n#include \"xz_private.h\"\n#include \"xz_lzma2.h\"\n\n/*\n * Range decoder initialization eats the first five bytes of each LZMA chunk.\n */\n#define RC_INIT_BYTES 5\n\n/*\n * Minimum number of usable input buffer to safely decode one LZMA symbol.\n * The worst case is that we decode 22 bits using probabilities and 26\n * direct bits. This may decode at maximum of 20 bytes of input. However,\n * lzma_main() does an extra normalization before returning, thus we\n * need to put 21 here.\n */\n#define LZMA_IN_REQUIRED 21\n\n/*\n * Dictionary (history buffer)\n *\n * These are always true:\n *    start <= pos <= full <= end\n *    pos <= limit <= end\n *\n * In multi-call mode, also these are true:\n *    end == size\n *    size <= size_max\n *    allocated <= size\n *\n * Most of these variables are size_t to support single-call mode,\n * in which the dictionary variables address the actual output\n * buffer directly.\n */\nstruct dictionary {\n\t/* Beginning of the history buffer */\n\tuint8_t *buf;\n\n\t/* Old position in buf (before decoding more data) */\n\tsize_t start;\n\n\t/* Position in buf */\n\tsize_t pos;\n\n\t/*\n\t * How full dictionary is. This is used to detect corrupt input that\n\t * would read beyond the beginning of the uncompressed stream.\n\t */\n\tsize_t full;\n\n\t/* Write limit; we don't write to buf[limit] or later bytes. */\n\tsize_t limit;\n\n\t/*\n\t * End of the dictionary buffer. In multi-call mode, this is\n\t * the same as the dictionary size. In single-call mode, this\n\t * indicates the size of the output buffer.\n\t */\n\tsize_t end;\n\n\t/*\n\t * Size of the dictionary as specified in Block Header. This is used\n\t * together with \"full\" to detect corrupt input that would make us\n\t * read beyond the beginning of the uncompressed stream.\n\t */\n\tuint32_t size;\n\n\t/*\n\t * Maximum allowed dictionary size in multi-call mode.\n\t * This is ignored in single-call mode.\n\t */\n\tuint32_t size_max;\n\n\t/*\n\t * Amount of memory currently allocated for the dictionary.\n\t * This is used only with XZ_DYNALLOC. (With XZ_PREALLOC,\n\t * size_max is always the same as the allocated size.)\n\t */\n\tuint32_t allocated;\n\n\t/* Operation mode */\n\tenum xz_mode mode;\n};\n\n/* Range decoder */\nstruct rc_dec {\n\tuint32_t range;\n\tuint32_t code;\n\n\t/*\n\t * Number of initializing bytes remaining to be read\n\t * by rc_read_init().\n\t */\n\tuint32_t init_bytes_left;\n\n\t/*\n\t * Buffer from which we read our input. It can be either\n\t * temp.buf or the caller-provided input buffer.\n\t */\n\tconst uint8_t *in;\n\tsize_t in_pos;\n\tsize_t in_limit;\n};\n\n/* Probabilities for a length decoder. */\nstruct lzma_len_dec {\n\t/* Probability of match length being at least 10 */\n\tuint16_t choice;\n\n\t/* Probability of match length being at least 18 */\n\tuint16_t choice2;\n\n\t/* Probabilities for match lengths 2-9 */\n\tuint16_t low[POS_STATES_MAX][LEN_LOW_SYMBOLS];\n\n\t/* Probabilities for match lengths 10-17 */\n\tuint16_t mid[POS_STATES_MAX][LEN_MID_SYMBOLS];\n\n\t/* Probabilities for match lengths 18-273 */\n\tuint16_t high[LEN_HIGH_SYMBOLS];\n};\n\nstruct lzma_dec {\n\t/* Distances of latest four matches */\n\tuint32_t rep0;\n\tuint32_t rep1;\n\tuint32_t rep2;\n\tuint32_t rep3;\n\n\t/* Types of the most recently seen LZMA symbols */\n\tenum lzma_state state;\n\n\t/*\n\t * Length of a match. This is updated so that dict_repeat can\n\t * be called again to finish repeating the whole match.\n\t */\n\tuint32_t len;\n\n\t/*\n\t * LZMA properties or related bit masks (number of literal\n\t * context bits, a mask dervied from the number of literal\n\t * position bits, and a mask dervied from the number\n\t * position bits)\n\t */\n\tuint32_t lc;\n\tuint32_t literal_pos_mask; /* (1 << lp) - 1 */\n\tuint32_t pos_mask;         /* (1 << pb) - 1 */\n\n\t/* If 1, it's a match. Otherwise it's a single 8-bit literal. */\n\tuint16_t is_match[STATES][POS_STATES_MAX];\n\n\t/* If 1, it's a repeated match. The distance is one of rep0 .. rep3. */\n\tuint16_t is_rep[STATES];\n\n\t/*\n\t * If 0, distance of a repeated match is rep0.\n\t * Otherwise check is_rep1.\n\t */\n\tuint16_t is_rep0[STATES];\n\n\t/*\n\t * If 0, distance of a repeated match is rep1.\n\t * Otherwise check is_rep2.\n\t */\n\tuint16_t is_rep1[STATES];\n\n\t/* If 0, distance of a repeated match is rep2. Otherwise it is rep3. */\n\tuint16_t is_rep2[STATES];\n\n\t/*\n\t * If 1, the repeated match has length of one byte. Otherwise\n\t * the length is decoded from rep_len_decoder.\n\t */\n\tuint16_t is_rep0_long[STATES][POS_STATES_MAX];\n\n\t/*\n\t * Probability tree for the highest two bits of the match\n\t * distance. There is a separate probability tree for match\n\t * lengths of 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].\n\t */\n\tuint16_t dist_slot[DIST_STATES][DIST_SLOTS];\n\n\t/*\n\t * Probility trees for additional bits for match distance\n\t * when the distance is in the range [4, 127].\n\t */\n\tuint16_t dist_special[FULL_DISTANCES - DIST_MODEL_END];\n\n\t/*\n\t * Probability tree for the lowest four bits of a match\n\t * distance that is equal to or greater than 128.\n\t */\n\tuint16_t dist_align[ALIGN_SIZE];\n\n\t/* Length of a normal match */\n\tstruct lzma_len_dec match_len_dec;\n\n\t/* Length of a repeated match */\n\tstruct lzma_len_dec rep_len_dec;\n\n\t/* Probabilities of literals */\n\tuint16_t literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];\n};\n\nstruct lzma2_dec {\n\t/* Position in xz_dec_lzma2_run(). */\n\tenum lzma2_seq {\n\t\tSEQ_CONTROL,\n\t\tSEQ_UNCOMPRESSED_1,\n\t\tSEQ_UNCOMPRESSED_2,\n\t\tSEQ_COMPRESSED_0,\n\t\tSEQ_COMPRESSED_1,\n\t\tSEQ_PROPERTIES,\n\t\tSEQ_LZMA_PREPARE,\n\t\tSEQ_LZMA_RUN,\n\t\tSEQ_COPY\n\t} sequence;\n\n\t/* Next position after decoding the compressed size of the chunk. */\n\tenum lzma2_seq next_sequence;\n\n\t/* Uncompressed size of LZMA chunk (2 MiB at maximum) */\n\tuint32_t uncompressed;\n\n\t/*\n\t * Compressed size of LZMA chunk or compressed/uncompressed\n\t * size of uncompressed chunk (64 KiB at maximum)\n\t */\n\tuint32_t compressed;\n\n\t/*\n\t * True if dictionary reset is needed. This is false before\n\t * the first chunk (LZMA or uncompressed).\n\t */\n\tbool need_dict_reset;\n\n\t/*\n\t * True if new LZMA properties are needed. This is false\n\t * before the first LZMA chunk.\n\t */\n\tbool need_props;\n};\n\nstruct xz_dec_lzma2 {\n\t/*\n\t * The order below is important on x86 to reduce code size and\n\t * it shouldn't hurt on other platforms. Everything up to and\n\t * including lzma.pos_mask are in the first 128 bytes on x86-32,\n\t * which allows using smaller instructions to access those\n\t * variables. On x86-64, fewer variables fit into the first 128\n\t * bytes, but this is still the best order without sacrificing\n\t * the readability by splitting the structures.\n\t */\n\tstruct rc_dec rc;\n\tstruct dictionary dict;\n\tstruct lzma2_dec lzma2;\n\tstruct lzma_dec lzma;\n\n\t/*\n\t * Temporary buffer which holds small number of input bytes between\n\t * decoder calls. See lzma2_lzma() for details.\n\t */\n\tstruct {\n\t\tuint32_t size;\n\t\tuint8_t buf[3 * LZMA_IN_REQUIRED];\n\t} temp;\n};\n\n/**************\n * Dictionary *\n **************/\n\n/*\n * Reset the dictionary state. When in single-call mode, set up the beginning\n * of the dictionary to point to the actual output buffer.\n */\nstatic void dict_reset(struct dictionary *dict, struct xz_buf *b)\n{\n\tif (DEC_IS_SINGLE(dict->mode)) {\n\t\tdict->buf = b->out + b->out_pos;\n\t\tdict->end = b->out_size - b->out_pos;\n\t}\n\n\tdict->start = 0;\n\tdict->pos = 0;\n\tdict->limit = 0;\n\tdict->full = 0;\n}\n\n/* Set dictionary write limit */\nstatic void dict_limit(struct dictionary *dict, size_t out_max)\n{\n\tif (dict->end - dict->pos <= out_max)\n\t\tdict->limit = dict->end;\n\telse\n\t\tdict->limit = dict->pos + out_max;\n}\n\n/* Return true if at least one byte can be written into the dictionary. */\nstatic inline bool dict_has_space(const struct dictionary *dict)\n{\n\treturn dict->pos < dict->limit;\n}\n\n/*\n * Get a byte from the dictionary at the given distance. The distance is\n * assumed to valid, or as a special case, zero when the dictionary is\n * still empty. This special case is needed for single-call decoding to\n * avoid writing a '\\0' to the end of the destination buffer.\n */\nstatic inline uint32_t dict_get(const struct dictionary *dict, uint32_t dist)\n{\n\tsize_t offset = dict->pos - dist - 1;\n\n\tif (dist >= dict->pos)\n\t\toffset += dict->end;\n\n\treturn dict->full > 0 ? dict->buf[offset] : 0;\n}\n\n/*\n * Put one byte into the dictionary. It is assumed that there is space for it.\n */\nstatic inline void dict_put(struct dictionary *dict, uint8_t byte)\n{\n\tdict->buf[dict->pos++] = byte;\n\n\tif (dict->full < dict->pos)\n\t\tdict->full = dict->pos;\n}\n\n/*\n * Repeat given number of bytes from the given distance. If the distance is\n * invalid, false is returned. On success, true is returned and *len is\n * updated to indicate how many bytes were left to be repeated.\n */\nstatic bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t dist)\n{\n\tsize_t back;\n\tuint32_t left;\n\n\tif (dist >= dict->full || dist >= dict->size)\n\t\treturn false;\n\n\tleft = min_t(size_t, dict->limit - dict->pos, *len);\n\t*len -= left;\n\n\tback = dict->pos - dist - 1;\n\tif (dist >= dict->pos)\n\t\tback += dict->end;\n\n\tdo {\n\t\tdict->buf[dict->pos++] = dict->buf[back++];\n\t\tif (back == dict->end)\n\t\t\tback = 0;\n\t} while (--left > 0);\n\n\tif (dict->full < dict->pos)\n\t\tdict->full = dict->pos;\n\n\treturn true;\n}\n\n/* Copy uncompressed data as is from input to dictionary and output buffers. */\nstatic void dict_uncompressed(struct dictionary *dict, struct xz_buf *b,\n\t\t\t      uint32_t *left)\n{\n\tsize_t copy_size;\n\n\twhile (*left > 0 && b->in_pos < b->in_size\n\t\t\t&& b->out_pos < b->out_size) {\n\t\tcopy_size = min(b->in_size - b->in_pos,\n\t\t\t\tb->out_size - b->out_pos);\n\t\tif (copy_size > dict->end - dict->pos)\n\t\t\tcopy_size = dict->end - dict->pos;\n\t\tif (copy_size > *left)\n\t\t\tcopy_size = *left;\n\n\t\t*left -= copy_size;\n\n\t\t/*\n\t\t * If doing in-place decompression in single-call mode and the\n\t\t * uncompressed size of the file is larger than the caller\n\t\t * thought (i.e. it is invalid input!), the buffers below may\n\t\t * overlap and cause undefined behavior with memcpy().\n\t\t * With valid inputs memcpy() would be fine here.\n\t\t */\n\t\tmemmove(dict->buf + dict->pos, b->in + b->in_pos, copy_size);\n\t\tdict->pos += copy_size;\n\n\t\tif (dict->full < dict->pos)\n\t\t\tdict->full = dict->pos;\n\n\t\tif (DEC_IS_MULTI(dict->mode)) {\n\t\t\tif (dict->pos == dict->end)\n\t\t\t\tdict->pos = 0;\n\n\t\t\t/*\n\t\t\t * Like above but for multi-call mode: use memmove()\n\t\t\t * to avoid undefined behavior with invalid input.\n\t\t\t */\n\t\t\tmemmove(b->out + b->out_pos, b->in + b->in_pos,\n\t\t\t\t\tcopy_size);\n\t\t}\n\n\t\tdict->start = dict->pos;\n\n\t\tb->out_pos += copy_size;\n\t\tb->in_pos += copy_size;\n\t}\n}\n\n/*\n * Flush pending data from dictionary to b->out. It is assumed that there is\n * enough space in b->out. This is guaranteed because caller uses dict_limit()\n * before decoding data into the dictionary.\n */\nstatic uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)\n{\n\tsize_t copy_size = dict->pos - dict->start;\n\n\tif (DEC_IS_MULTI(dict->mode)) {\n\t\tif (dict->pos == dict->end)\n\t\t\tdict->pos = 0;\n\n\t\t/*\n\t\t * These buffers cannot overlap even if doing in-place\n\t\t * decompression because in multi-call mode dict->buf\n\t\t * has been allocated by us in this file; it's not\n\t\t * provided by the caller like in single-call mode.\n\t\t */\n\t\tmemcpy(b->out + b->out_pos, dict->buf + dict->start,\n\t\t\t\tcopy_size);\n\t}\n\n\tdict->start = dict->pos;\n\tb->out_pos += copy_size;\n\treturn copy_size;\n}\n\n/*****************\n * Range decoder *\n *****************/\n\n/* Reset the range decoder. */\nstatic void rc_reset(struct rc_dec *rc)\n{\n\trc->range = (uint32_t)-1;\n\trc->code = 0;\n\trc->init_bytes_left = RC_INIT_BYTES;\n}\n\n/*\n * Read the first five initial bytes into rc->code if they haven't been\n * read already. (Yes, the first byte gets completely ignored.)\n */\nstatic bool rc_read_init(struct rc_dec *rc, struct xz_buf *b)\n{\n\twhile (rc->init_bytes_left > 0) {\n\t\tif (b->in_pos == b->in_size)\n\t\t\treturn false;\n\n\t\trc->code = (rc->code << 8) + b->in[b->in_pos++];\n\t\t--rc->init_bytes_left;\n\t}\n\n\treturn true;\n}\n\n/* Return true if there may not be enough input for the next decoding loop. */\nstatic inline bool rc_limit_exceeded(const struct rc_dec *rc)\n{\n\treturn rc->in_pos > rc->in_limit;\n}\n\n/*\n * Return true if it is possible (from point of view of range decoder) that\n * we have reached the end of the LZMA chunk.\n */\nstatic inline bool rc_is_finished(const struct rc_dec *rc)\n{\n\treturn rc->code == 0;\n}\n\n/* Read the next input byte if needed. */\nstatic __always_inline void rc_normalize(struct rc_dec *rc)\n{\n\tif (rc->range < RC_TOP_VALUE) {\n\t\trc->range <<= RC_SHIFT_BITS;\n\t\trc->code = (rc->code << RC_SHIFT_BITS) + rc->in[rc->in_pos++];\n\t}\n}\n\n/*\n * Decode one bit. In some versions, this function has been splitted in three\n * functions so that the compiler is supposed to be able to more easily avoid\n * an extra branch. In this particular version of the LZMA decoder, this\n * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3\n * on x86). Using a non-splitted version results in nicer looking code too.\n *\n * NOTE: This must return an int. Do not make it return a bool or the speed\n * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,\n * and it generates 10-20 % faster code than GCC 3.x from this file anyway.)\n */\nstatic __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)\n{\n\tuint32_t bound;\n\tint bit;\n\n\trc_normalize(rc);\n\tbound = (rc->range >> RC_BIT_MODEL_TOTAL_BITS) * *prob;\n\tif (rc->code < bound) {\n\t\trc->range = bound;\n\t\t*prob += (RC_BIT_MODEL_TOTAL - *prob) >> RC_MOVE_BITS;\n\t\tbit = 0;\n\t} else {\n\t\trc->range -= bound;\n\t\trc->code -= bound;\n\t\t*prob -= *prob >> RC_MOVE_BITS;\n\t\tbit = 1;\n\t}\n\n\treturn bit;\n}\n\n/* Decode a bittree starting from the most significant bit. */\nstatic __always_inline uint32_t rc_bittree(struct rc_dec *rc,\n\t\t\t\t\t   uint16_t *probs, uint32_t limit)\n{\n\tuint32_t symbol = 1;\n\n\tdo {\n\t\tif (rc_bit(rc, &probs[symbol]))\n\t\t\tsymbol = (symbol << 1) + 1;\n\t\telse\n\t\t\tsymbol <<= 1;\n\t} while (symbol < limit);\n\n\treturn symbol;\n}\n\n/* Decode a bittree starting from the least significant bit. */\nstatic __always_inline void rc_bittree_reverse(struct rc_dec *rc,\n\t\t\t\t\t       uint16_t *probs,\n\t\t\t\t\t       uint32_t *dest, uint32_t limit)\n{\n\tuint32_t symbol = 1;\n\tuint32_t i = 0;\n\n\tdo {\n\t\tif (rc_bit(rc, &probs[symbol])) {\n\t\t\tsymbol = (symbol << 1) + 1;\n\t\t\t*dest += 1 << i;\n\t\t} else {\n\t\t\tsymbol <<= 1;\n\t\t}\n\t} while (++i < limit);\n}\n\n/* Decode direct bits (fixed fifty-fifty probability) */\nstatic inline void rc_direct(struct rc_dec *rc, uint32_t *dest, uint32_t limit)\n{\n\tuint32_t mask;\n\n\tdo {\n\t\trc_normalize(rc);\n\t\trc->range >>= 1;\n\t\trc->code -= rc->range;\n\t\tmask = (uint32_t)0 - (rc->code >> 31);\n\t\trc->code += rc->range & mask;\n\t\t*dest = (*dest << 1) + (mask + 1);\n\t} while (--limit > 0);\n}\n\n/********\n * LZMA *\n ********/\n\n/* Get pointer to literal coder probability array. */\nstatic uint16_t *lzma_literal_probs(struct xz_dec_lzma2 *s)\n{\n\tuint32_t prev_byte = dict_get(&s->dict, 0);\n\tuint32_t low = prev_byte >> (8 - s->lzma.lc);\n\tuint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc;\n\treturn s->lzma.literal[low + high];\n}\n\n/* Decode a literal (one 8-bit byte) */\nstatic void lzma_literal(struct xz_dec_lzma2 *s)\n{\n\tuint16_t *probs;\n\tuint32_t symbol;\n\tuint32_t match_byte;\n\tuint32_t match_bit;\n\tuint32_t offset;\n\tuint32_t i;\n\n\tprobs = lzma_literal_probs(s);\n\n\tif (lzma_state_is_literal(s->lzma.state)) {\n\t\tsymbol = rc_bittree(&s->rc, probs, 0x100);\n\t} else {\n\t\tsymbol = 1;\n\t\tmatch_byte = dict_get(&s->dict, s->lzma.rep0) << 1;\n\t\toffset = 0x100;\n\n\t\tdo {\n\t\t\tmatch_bit = match_byte & offset;\n\t\t\tmatch_byte <<= 1;\n\t\t\ti = offset + match_bit + symbol;\n\n\t\t\tif (rc_bit(&s->rc, &probs[i])) {\n\t\t\t\tsymbol = (symbol << 1) + 1;\n\t\t\t\toffset &= match_bit;\n\t\t\t} else {\n\t\t\t\tsymbol <<= 1;\n\t\t\t\toffset &= ~match_bit;\n\t\t\t}\n\t\t} while (symbol < 0x100);\n\t}\n\n\tdict_put(&s->dict, (uint8_t)symbol);\n\tlzma_state_literal(&s->lzma.state);\n}\n\n/* Decode the length of the match into s->lzma.len. */\nstatic void lzma_len(struct xz_dec_lzma2 *s, struct lzma_len_dec *l,\n\t\t     uint32_t pos_state)\n{\n\tuint16_t *probs;\n\tuint32_t limit;\n\n\tif (!rc_bit(&s->rc, &l->choice)) {\n\t\tprobs = l->low[pos_state];\n\t\tlimit = LEN_LOW_SYMBOLS;\n\t\ts->lzma.len = MATCH_LEN_MIN;\n\t} else {\n\t\tif (!rc_bit(&s->rc, &l->choice2)) {\n\t\t\tprobs = l->mid[pos_state];\n\t\t\tlimit = LEN_MID_SYMBOLS;\n\t\t\ts->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS;\n\t\t} else {\n\t\t\tprobs = l->high;\n\t\t\tlimit = LEN_HIGH_SYMBOLS;\n\t\t\ts->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS\n\t\t\t\t\t+ LEN_MID_SYMBOLS;\n\t\t}\n\t}\n\n\ts->lzma.len += rc_bittree(&s->rc, probs, limit) - limit;\n}\n\n/* Decode a match. The distance will be stored in s->lzma.rep0. */\nstatic void lzma_match(struct xz_dec_lzma2 *s, uint32_t pos_state)\n{\n\tuint16_t *probs;\n\tuint32_t dist_slot;\n\tuint32_t limit;\n\n\tlzma_state_match(&s->lzma.state);\n\n\ts->lzma.rep3 = s->lzma.rep2;\n\ts->lzma.rep2 = s->lzma.rep1;\n\ts->lzma.rep1 = s->lzma.rep0;\n\n\tlzma_len(s, &s->lzma.match_len_dec, pos_state);\n\n\tprobs = s->lzma.dist_slot[lzma_get_dist_state(s->lzma.len)];\n\tdist_slot = rc_bittree(&s->rc, probs, DIST_SLOTS) - DIST_SLOTS;\n\n\tif (dist_slot < DIST_MODEL_START) {\n\t\ts->lzma.rep0 = dist_slot;\n\t} else {\n\t\tlimit = (dist_slot >> 1) - 1;\n\t\ts->lzma.rep0 = 2 + (dist_slot & 1);\n\n\t\tif (dist_slot < DIST_MODEL_END) {\n\t\t\ts->lzma.rep0 <<= limit;\n\t\t\tprobs = s->lzma.dist_special + s->lzma.rep0\n\t\t\t\t\t- dist_slot - 1;\n\t\t\trc_bittree_reverse(&s->rc, probs,\n\t\t\t\t\t&s->lzma.rep0, limit);\n\t\t} else {\n\t\t\trc_direct(&s->rc, &s->lzma.rep0, limit - ALIGN_BITS);\n\t\t\ts->lzma.rep0 <<= ALIGN_BITS;\n\t\t\trc_bittree_reverse(&s->rc, s->lzma.dist_align,\n\t\t\t\t\t&s->lzma.rep0, ALIGN_BITS);\n\t\t}\n\t}\n}\n\n/*\n * Decode a repeated match. The distance is one of the four most recently\n * seen matches. The distance will be stored in s->lzma.rep0.\n */\nstatic void lzma_rep_match(struct xz_dec_lzma2 *s, uint32_t pos_state)\n{\n\tuint32_t tmp;\n\n\tif (!rc_bit(&s->rc, &s->lzma.is_rep0[s->lzma.state])) {\n\t\tif (!rc_bit(&s->rc, &s->lzma.is_rep0_long[\n\t\t\t\ts->lzma.state][pos_state])) {\n\t\t\tlzma_state_short_rep(&s->lzma.state);\n\t\t\ts->lzma.len = 1;\n\t\t\treturn;\n\t\t}\n\t} else {\n\t\tif (!rc_bit(&s->rc, &s->lzma.is_rep1[s->lzma.state])) {\n\t\t\ttmp = s->lzma.rep1;\n\t\t} else {\n\t\t\tif (!rc_bit(&s->rc, &s->lzma.is_rep2[s->lzma.state])) {\n\t\t\t\ttmp = s->lzma.rep2;\n\t\t\t} else {\n\t\t\t\ttmp = s->lzma.rep3;\n\t\t\t\ts->lzma.rep3 = s->lzma.rep2;\n\t\t\t}\n\n\t\t\ts->lzma.rep2 = s->lzma.rep1;\n\t\t}\n\n\t\ts->lzma.rep1 = s->lzma.rep0;\n\t\ts->lzma.rep0 = tmp;\n\t}\n\n\tlzma_state_long_rep(&s->lzma.state);\n\tlzma_len(s, &s->lzma.rep_len_dec, pos_state);\n}\n\n/* LZMA decoder core */\nstatic bool lzma_main(struct xz_dec_lzma2 *s)\n{\n\tuint32_t pos_state;\n\n\t/*\n\t * If the dictionary was reached during the previous call, try to\n\t * finish the possibly pending repeat in the dictionary.\n\t */\n\tif (dict_has_space(&s->dict) && s->lzma.len > 0)\n\t\tdict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0);\n\n\t/*\n\t * Decode more LZMA symbols. One iteration may consume up to\n\t * LZMA_IN_REQUIRED - 1 bytes.\n\t */\n\twhile (dict_has_space(&s->dict) && !rc_limit_exceeded(&s->rc)) {\n\t\tpos_state = s->dict.pos & s->lzma.pos_mask;\n\n\t\tif (!rc_bit(&s->rc, &s->lzma.is_match[\n\t\t\t\ts->lzma.state][pos_state])) {\n\t\t\tlzma_literal(s);\n\t\t} else {\n\t\t\tif (rc_bit(&s->rc, &s->lzma.is_rep[s->lzma.state]))\n\t\t\t\tlzma_rep_match(s, pos_state);\n\t\t\telse\n\t\t\t\tlzma_match(s, pos_state);\n\n\t\t\tif (!dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\t/*\n\t * Having the range decoder always normalized when we are outside\n\t * this function makes it easier to correctly handle end of the chunk.\n\t */\n\trc_normalize(&s->rc);\n\n\treturn true;\n}\n\n/*\n * Reset the LZMA decoder and range decoder state. Dictionary is nore reset\n * here, because LZMA state may be reset without resetting the dictionary.\n */\nstatic void lzma_reset(struct xz_dec_lzma2 *s)\n{\n\tuint16_t *probs;\n\tsize_t i;\n\n\ts->lzma.state = STATE_LIT_LIT;\n\ts->lzma.rep0 = 0;\n\ts->lzma.rep1 = 0;\n\ts->lzma.rep2 = 0;\n\ts->lzma.rep3 = 0;\n\n\t/*\n\t * All probabilities are initialized to the same value. This hack\n\t * makes the code smaller by avoiding a separate loop for each\n\t * probability array.\n\t *\n\t * This could be optimized so that only that part of literal\n\t * probabilities that are actually required. In the common case\n\t * we would write 12 KiB less.\n\t */\n\tprobs = s->lzma.is_match[0];\n\tfor (i = 0; i < PROBS_TOTAL; ++i)\n\t\tprobs[i] = RC_BIT_MODEL_TOTAL / 2;\n\n\trc_reset(&s->rc);\n}\n\n/*\n * Decode and validate LZMA properties (lc/lp/pb) and calculate the bit masks\n * from the decoded lp and pb values. On success, the LZMA decoder state is\n * reset and true is returned.\n */\nstatic bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)\n{\n\tif (props > (4 * 5 + 4) * 9 + 8)\n\t\treturn false;\n\n\ts->lzma.pos_mask = 0;\n\twhile (props >= 9 * 5) {\n\t\tprops -= 9 * 5;\n\t\t++s->lzma.pos_mask;\n\t}\n\n\ts->lzma.pos_mask = (1 << s->lzma.pos_mask) - 1;\n\n\ts->lzma.literal_pos_mask = 0;\n\twhile (props >= 9) {\n\t\tprops -= 9;\n\t\t++s->lzma.literal_pos_mask;\n\t}\n\n\ts->lzma.lc = props;\n\n\tif (s->lzma.lc + s->lzma.literal_pos_mask > 4)\n\t\treturn false;\n\n\ts->lzma.literal_pos_mask = (1 << s->lzma.literal_pos_mask) - 1;\n\n\tlzma_reset(s);\n\n\treturn true;\n}\n\n/*********\n * LZMA2 *\n *********/\n\n/*\n * The LZMA decoder assumes that if the input limit (s->rc.in_limit) hasn't\n * been exceeded, it is safe to read up to LZMA_IN_REQUIRED bytes. This\n * wrapper function takes care of making the LZMA decoder's assumption safe.\n *\n * As long as there is plenty of input left to be decoded in the current LZMA\n * chunk, we decode directly from the caller-supplied input buffer until\n * there's LZMA_IN_REQUIRED bytes left. Those remaining bytes are copied into\n * s->temp.buf, which (hopefully) gets filled on the next call to this\n * function. We decode a few bytes from the temporary buffer so that we can\n * continue decoding from the caller-supplied input buffer again.\n */\nstatic bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)\n{\n\tsize_t in_avail;\n\tuint32_t tmp;\n\n\tin_avail = b->in_size - b->in_pos;\n\tif (s->temp.size > 0 || s->lzma2.compressed == 0) {\n\t\ttmp = 2 * LZMA_IN_REQUIRED - s->temp.size;\n\t\tif (tmp > s->lzma2.compressed - s->temp.size)\n\t\t\ttmp = s->lzma2.compressed - s->temp.size;\n\t\tif (tmp > in_avail)\n\t\t\ttmp = in_avail;\n\n\t\tmemcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp);\n\n\t\tif (s->temp.size + tmp == s->lzma2.compressed) {\n\t\t\tmemzero(s->temp.buf + s->temp.size + tmp,\n\t\t\t\t\tsizeof(s->temp.buf)\n\t\t\t\t\t\t- s->temp.size - tmp);\n\t\t\ts->rc.in_limit = s->temp.size + tmp;\n\t\t} else if (s->temp.size + tmp < LZMA_IN_REQUIRED) {\n\t\t\ts->temp.size += tmp;\n\t\t\tb->in_pos += tmp;\n\t\t\treturn true;\n\t\t} else {\n\t\t\ts->rc.in_limit = s->temp.size + tmp - LZMA_IN_REQUIRED;\n\t\t}\n\n\t\ts->rc.in = s->temp.buf;\n\t\ts->rc.in_pos = 0;\n\n\t\tif (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp)\n\t\t\treturn false;\n\n\t\ts->lzma2.compressed -= s->rc.in_pos;\n\n\t\tif (s->rc.in_pos < s->temp.size) {\n\t\t\ts->temp.size -= s->rc.in_pos;\n\t\t\tmemmove(s->temp.buf, s->temp.buf + s->rc.in_pos,\n\t\t\t\t\ts->temp.size);\n\t\t\treturn true;\n\t\t}\n\n\t\tb->in_pos += s->rc.in_pos - s->temp.size;\n\t\ts->temp.size = 0;\n\t}\n\n\tin_avail = b->in_size - b->in_pos;\n\tif (in_avail >= LZMA_IN_REQUIRED) {\n\t\ts->rc.in = b->in;\n\t\ts->rc.in_pos = b->in_pos;\n\n\t\tif (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED)\n\t\t\ts->rc.in_limit = b->in_pos + s->lzma2.compressed;\n\t\telse\n\t\t\ts->rc.in_limit = b->in_size - LZMA_IN_REQUIRED;\n\n\t\tif (!lzma_main(s))\n\t\t\treturn false;\n\n\t\tin_avail = s->rc.in_pos - b->in_pos;\n\t\tif (in_avail > s->lzma2.compressed)\n\t\t\treturn false;\n\n\t\ts->lzma2.compressed -= in_avail;\n\t\tb->in_pos = s->rc.in_pos;\n\t}\n\n\tin_avail = b->in_size - b->in_pos;\n\tif (in_avail < LZMA_IN_REQUIRED) {\n\t\tif (in_avail > s->lzma2.compressed)\n\t\t\tin_avail = s->lzma2.compressed;\n\n\t\tmemcpy(s->temp.buf, b->in + b->in_pos, in_avail);\n\t\ts->temp.size = in_avail;\n\t\tb->in_pos += in_avail;\n\t}\n\n\treturn true;\n}\n\n/*\n * Take care of the LZMA2 control layer, and forward the job of actual LZMA\n * decoding or copying of uncompressed chunks to other functions.\n */\nenum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,\n\t\t\t\t       struct xz_buf *b)\n{\n\tuint32_t tmp;\n\n\twhile (b->in_pos < b->in_size || s->lzma2.sequence == SEQ_LZMA_RUN) {\n\t\tswitch (s->lzma2.sequence) {\n\t\tcase SEQ_CONTROL:\n\t\t\t/*\n\t\t\t * LZMA2 control byte\n\t\t\t *\n\t\t\t * Exact values:\n\t\t\t *   0x00   End marker\n\t\t\t *   0x01   Dictionary reset followed by\n\t\t\t *          an uncompressed chunk\n\t\t\t *   0x02   Uncompressed chunk (no dictionary reset)\n\t\t\t *\n\t\t\t * Highest three bits (s->control & 0xE0):\n\t\t\t *   0xE0   Dictionary reset, new properties and state\n\t\t\t *          reset, followed by LZMA compressed chunk\n\t\t\t *   0xC0   New properties and state reset, followed\n\t\t\t *          by LZMA compressed chunk (no dictionary\n\t\t\t *          reset)\n\t\t\t *   0xA0   State reset using old properties,\n\t\t\t *          followed by LZMA compressed chunk (no\n\t\t\t *          dictionary reset)\n\t\t\t *   0x80   LZMA chunk (no dictionary or state reset)\n\t\t\t *\n\t\t\t * For LZMA compressed chunks, the lowest five bits\n\t\t\t * (s->control & 1F) are the highest bits of the\n\t\t\t * uncompressed size (bits 16-20).\n\t\t\t *\n\t\t\t * A new LZMA2 stream must begin with a dictionary\n\t\t\t * reset. The first LZMA chunk must set new\n\t\t\t * properties and reset the LZMA state.\n\t\t\t *\n\t\t\t * Values that don't match anything described above\n\t\t\t * are invalid and we return XZ_DATA_ERROR.\n\t\t\t */\n\t\t\ttmp = b->in[b->in_pos++];\n\n\t\t\tif (tmp == 0x00)\n\t\t\t\treturn XZ_STREAM_END;\n\n\t\t\tif (tmp >= 0xE0 || tmp == 0x01) {\n\t\t\t\ts->lzma2.need_props = true;\n\t\t\t\ts->lzma2.need_dict_reset = false;\n\t\t\t\tdict_reset(&s->dict, b);\n\t\t\t} else if (s->lzma2.need_dict_reset) {\n\t\t\t\treturn XZ_DATA_ERROR;\n\t\t\t}\n\n\t\t\tif (tmp >= 0x80) {\n\t\t\t\ts->lzma2.uncompressed = (tmp & 0x1F) << 16;\n\t\t\t\ts->lzma2.sequence = SEQ_UNCOMPRESSED_1;\n\n\t\t\t\tif (tmp >= 0xC0) {\n\t\t\t\t\t/*\n\t\t\t\t\t * When there are new properties,\n\t\t\t\t\t * state reset is done at\n\t\t\t\t\t * SEQ_PROPERTIES.\n\t\t\t\t\t */\n\t\t\t\t\ts->lzma2.need_props = false;\n\t\t\t\t\ts->lzma2.next_sequence\n\t\t\t\t\t\t\t= SEQ_PROPERTIES;\n\n\t\t\t\t} else if (s->lzma2.need_props) {\n\t\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\t\t} else {\n\t\t\t\t\ts->lzma2.next_sequence\n\t\t\t\t\t\t\t= SEQ_LZMA_PREPARE;\n\t\t\t\t\tif (tmp >= 0xA0)\n\t\t\t\t\t\tlzma_reset(s);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (tmp > 0x02)\n\t\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\t\ts->lzma2.sequence = SEQ_COMPRESSED_0;\n\t\t\t\ts->lzma2.next_sequence = SEQ_COPY;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase SEQ_UNCOMPRESSED_1:\n\t\t\ts->lzma2.uncompressed\n\t\t\t\t\t+= (uint32_t)b->in[b->in_pos++] << 8;\n\t\t\ts->lzma2.sequence = SEQ_UNCOMPRESSED_2;\n\t\t\tbreak;\n\n\t\tcase SEQ_UNCOMPRESSED_2:\n\t\t\ts->lzma2.uncompressed\n\t\t\t\t\t+= (uint32_t)b->in[b->in_pos++] + 1;\n\t\t\ts->lzma2.sequence = SEQ_COMPRESSED_0;\n\t\t\tbreak;\n\n\t\tcase SEQ_COMPRESSED_0:\n\t\t\ts->lzma2.compressed\n\t\t\t\t\t= (uint32_t)b->in[b->in_pos++] << 8;\n\t\t\ts->lzma2.sequence = SEQ_COMPRESSED_1;\n\t\t\tbreak;\n\n\t\tcase SEQ_COMPRESSED_1:\n\t\t\ts->lzma2.compressed\n\t\t\t\t\t+= (uint32_t)b->in[b->in_pos++] + 1;\n\t\t\ts->lzma2.sequence = s->lzma2.next_sequence;\n\t\t\tbreak;\n\n\t\tcase SEQ_PROPERTIES:\n\t\t\tif (!lzma_props(s, b->in[b->in_pos++]))\n\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\ts->lzma2.sequence = SEQ_LZMA_PREPARE;\n\n\t\t/* Fall through */\n\n\t\tcase SEQ_LZMA_PREPARE:\n\t\t\tif (s->lzma2.compressed < RC_INIT_BYTES)\n\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\tif (!rc_read_init(&s->rc, b))\n\t\t\t\treturn XZ_OK;\n\n\t\t\ts->lzma2.compressed -= RC_INIT_BYTES;\n\t\t\ts->lzma2.sequence = SEQ_LZMA_RUN;\n\n\t\t/* Fall through */\n\n\t\tcase SEQ_LZMA_RUN:\n\t\t\t/*\n\t\t\t * Set dictionary limit to indicate how much we want\n\t\t\t * to be encoded at maximum. Decode new data into the\n\t\t\t * dictionary. Flush the new data from dictionary to\n\t\t\t * b->out. Check if we finished decoding this chunk.\n\t\t\t * In case the dictionary got full but we didn't fill\n\t\t\t * the output buffer yet, we may run this loop\n\t\t\t * multiple times without changing s->lzma2.sequence.\n\t\t\t */\n\t\t\tdict_limit(&s->dict, min_t(size_t,\n\t\t\t\t\tb->out_size - b->out_pos,\n\t\t\t\t\ts->lzma2.uncompressed));\n\t\t\tif (!lzma2_lzma(s, b))\n\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\ts->lzma2.uncompressed -= dict_flush(&s->dict, b);\n\n\t\t\tif (s->lzma2.uncompressed == 0) {\n\t\t\t\tif (s->lzma2.compressed > 0 || s->lzma.len > 0\n\t\t\t\t\t\t|| !rc_is_finished(&s->rc))\n\t\t\t\t\treturn XZ_DATA_ERROR;\n\n\t\t\t\trc_reset(&s->rc);\n\t\t\t\ts->lzma2.sequence = SEQ_CONTROL;\n\n\t\t\t} else if (b->out_pos == b->out_size\n\t\t\t\t\t|| (b->in_pos == b->in_size\n\t\t\t\t\t\t&& s->temp.size\n\t\t\t\t\t\t< s->lzma2.compressed)) {\n\t\t\t\treturn XZ_OK;\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase SEQ_COPY:\n\t\t\tdict_uncompressed(&s->dict, b, &s->lzma2.compressed);\n\t\t\tif (s->lzma2.compressed > 0)\n\t\t\t\treturn XZ_OK;\n\n\t\t\ts->lzma2.sequence = SEQ_CONTROL;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn XZ_OK;\n}\n\nstruct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,\n\t\t\t\t\t\t   uint32_t dict_max)\n{\n\tstruct xz_dec_lzma2 *s = kmalloc(sizeof(*s), GFP_KERNEL);\n\tif (s == NULL)\n\t\treturn NULL;\n\n\ts->dict.mode = mode;\n\ts->dict.size_max = dict_max;\n\n\tif (DEC_IS_PREALLOC(mode)) {\n\t\ts->dict.buf = vmalloc(dict_max);\n\t\tif (s->dict.buf == NULL) {\n\t\t\tkfree(s);\n\t\t\treturn NULL;\n\t\t}\n\t} else if (DEC_IS_DYNALLOC(mode)) {\n\t\ts->dict.buf = NULL;\n\t\ts->dict.allocated = 0;\n\t}\n\n\treturn s;\n}\n\nenum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props)\n{\n\t/* This limits dictionary size to 3 GiB to keep parsing simpler. */\n\tif (props > 39)\n\t\treturn XZ_OPTIONS_ERROR;\n\n\ts->dict.size = 2 + (props & 1);\n\ts->dict.size <<= (props >> 1) + 11;\n\n\tif (DEC_IS_MULTI(s->dict.mode)) {\n\t\tif (s->dict.size > s->dict.size_max)\n\t\t\treturn XZ_MEMLIMIT_ERROR;\n\n\t\ts->dict.end = s->dict.size;\n\n\t\tif (DEC_IS_DYNALLOC(s->dict.mode)) {\n\t\t\tif (s->dict.allocated < s->dict.size) {\n\t\t\t\ts->dict.allocated = s->dict.size;\n\t\t\t\tvfree(s->dict.buf);\n\t\t\t\ts->dict.buf = vmalloc(s->dict.size);\n\t\t\t\tif (s->dict.buf == NULL) {\n\t\t\t\t\ts->dict.allocated = 0;\n\t\t\t\t\treturn XZ_MEM_ERROR;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ts->lzma.len = 0;\n\n\ts->lzma2.sequence = SEQ_CONTROL;\n\ts->lzma2.need_dict_reset = true;\n\n\ts->temp.size = 0;\n\n\treturn XZ_OK;\n}\n\nvoid xz_dec_lzma2_end(struct xz_dec_lzma2 *s)\n{\n\tif (DEC_IS_MULTI(s->dict.mode))\n\t\tvfree(s->dict.buf);\n\n\tkfree(s);\n}\n"
  },
  {
    "path": "lib/xz_lzma2/xz_lzma2.h",
    "content": "/*\n * LZMA2 definitions\n *\n * Authors: Lasse Collin <lasse.collin@tukaani.org>\n *          Igor Pavlov <https://7-zip.org/>\n *\n * This file has been put into the public domain.\n * You can do whatever you want with this file.\n */\n\n#ifndef XZ_LZMA2_H\n#define XZ_LZMA2_H\n\n/* Range coder constants */\n#define RC_SHIFT_BITS 8\n#define RC_TOP_BITS 24\n#define RC_TOP_VALUE (1 << RC_TOP_BITS)\n#define RC_BIT_MODEL_TOTAL_BITS 11\n#define RC_BIT_MODEL_TOTAL (1 << RC_BIT_MODEL_TOTAL_BITS)\n#define RC_MOVE_BITS 5\n\n/*\n * Maximum number of position states. A position state is the lowest pb\n * number of bits of the current uncompressed offset. In some places there\n * are different sets of probabilities for different position states.\n */\n#define POS_STATES_MAX (1 << 4)\n\n/*\n * This enum is used to track which LZMA symbols have occurred most recently\n * and in which order. This information is used to predict the next symbol.\n *\n * Symbols:\n *  - Literal: One 8-bit byte\n *  - Match: Repeat a chunk of data at some distance\n *  - Long repeat: Multi-byte match at a recently seen distance\n *  - Short repeat: One-byte repeat at a recently seen distance\n *\n * The symbol names are in from STATE_oldest_older_previous. REP means\n * either short or long repeated match, and NONLIT means any non-literal.\n */\nenum lzma_state {\n\tSTATE_LIT_LIT,\n\tSTATE_MATCH_LIT_LIT,\n\tSTATE_REP_LIT_LIT,\n\tSTATE_SHORTREP_LIT_LIT,\n\tSTATE_MATCH_LIT,\n\tSTATE_REP_LIT,\n\tSTATE_SHORTREP_LIT,\n\tSTATE_LIT_MATCH,\n\tSTATE_LIT_LONGREP,\n\tSTATE_LIT_SHORTREP,\n\tSTATE_NONLIT_MATCH,\n\tSTATE_NONLIT_REP\n};\n\n/* Total number of states */\n#define STATES 12\n\n/* The lowest 7 states indicate that the previous state was a literal. */\n#define LIT_STATES 7\n\n/* Indicate that the latest symbol was a literal. */\nstatic inline void lzma_state_literal(enum lzma_state *state)\n{\n\tif (*state <= STATE_SHORTREP_LIT_LIT)\n\t\t*state = STATE_LIT_LIT;\n\telse if (*state <= STATE_LIT_SHORTREP)\n\t\t*state -= 3;\n\telse\n\t\t*state -= 6;\n}\n\n/* Indicate that the latest symbol was a match. */\nstatic inline void lzma_state_match(enum lzma_state *state)\n{\n\t*state = *state < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH;\n}\n\n/* Indicate that the latest state was a long repeated match. */\nstatic inline void lzma_state_long_rep(enum lzma_state *state)\n{\n\t*state = *state < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP;\n}\n\n/* Indicate that the latest symbol was a short match. */\nstatic inline void lzma_state_short_rep(enum lzma_state *state)\n{\n\t*state = *state < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP;\n}\n\n/* Test if the previous symbol was a literal. */\nstatic inline bool lzma_state_is_literal(enum lzma_state state)\n{\n\treturn state < LIT_STATES;\n}\n\n/* Each literal coder is divided in three sections:\n *   - 0x001-0x0FF: Without match byte\n *   - 0x101-0x1FF: With match byte; match bit is 0\n *   - 0x201-0x2FF: With match byte; match bit is 1\n *\n * Match byte is used when the previous LZMA symbol was something else than\n * a literal (that is, it was some kind of match).\n */\n#define LITERAL_CODER_SIZE 0x300\n\n/* Maximum number of literal coders */\n#define LITERAL_CODERS_MAX (1 << 4)\n\n/* Minimum length of a match is two bytes. */\n#define MATCH_LEN_MIN 2\n\n/* Match length is encoded with 4, 5, or 10 bits.\n *\n * Length   Bits\n *  2-9      4 = Choice=0 + 3 bits\n * 10-17     5 = Choice=1 + Choice2=0 + 3 bits\n * 18-273   10 = Choice=1 + Choice2=1 + 8 bits\n */\n#define LEN_LOW_BITS 3\n#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)\n#define LEN_MID_BITS 3\n#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)\n#define LEN_HIGH_BITS 8\n#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)\n#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)\n\n/*\n * Maximum length of a match is 273 which is a result of the encoding\n * described above.\n */\n#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)\n\n/*\n * Different sets of probabilities are used for match distances that have\n * very short match length: Lengths of 2, 3, and 4 bytes have a separate\n * set of probabilities for each length. The matches with longer length\n * use a shared set of probabilities.\n */\n#define DIST_STATES 4\n\n/*\n * Get the index of the appropriate probability array for decoding\n * the distance slot.\n */\nstatic inline uint32_t lzma_get_dist_state(uint32_t len)\n{\n\treturn len < DIST_STATES + MATCH_LEN_MIN\n\t\t\t? len - MATCH_LEN_MIN : DIST_STATES - 1;\n}\n\n/*\n * The highest two bits of a 32-bit match distance are encoded using six bits.\n * This six-bit value is called a distance slot. This way encoding a 32-bit\n * value takes 6-36 bits, larger values taking more bits.\n */\n#define DIST_SLOT_BITS 6\n#define DIST_SLOTS (1 << DIST_SLOT_BITS)\n\n/* Match distances up to 127 are fully encoded using probabilities. Since\n * the highest two bits (distance slot) are always encoded using six bits,\n * the distances 0-3 don't need any additional bits to encode, since the\n * distance slot itself is the same as the actual distance. DIST_MODEL_START\n * indicates the first distance slot where at least one additional bit is\n * needed.\n */\n#define DIST_MODEL_START 4\n\n/*\n * Match distances greater than 127 are encoded in three pieces:\n *   - distance slot: the highest two bits\n *   - direct bits: 2-26 bits below the highest two bits\n *   - alignment bits: four lowest bits\n *\n * Direct bits don't use any probabilities.\n *\n * The distance slot value of 14 is for distances 128-191.\n */\n#define DIST_MODEL_END 14\n\n/* Distance slots that indicate a distance <= 127. */\n#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)\n#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)\n\n/*\n * For match distances greater than 127, only the highest two bits and the\n * lowest four bits (alignment) is encoded using probabilities.\n */\n#define ALIGN_BITS 4\n#define ALIGN_SIZE (1 << ALIGN_BITS)\n#define ALIGN_MASK (ALIGN_SIZE - 1)\n\n/* Total number of all probability variables */\n#define PROBS_TOTAL (1846 + LITERAL_CODERS_MAX * LITERAL_CODER_SIZE)\n\n/*\n * LZMA remembers the four most recent match distances. Reusing these\n * distances tends to take less space than re-encoding the actual\n * distance value.\n */\n#define REPS 4\n\n#endif\n"
  },
  {
    "path": "lib/xz_lzma2/xz_private.h",
    "content": "/*\n * Private includes and definitions\n *\n * Author: Lasse Collin <lasse.collin@tukaani.org>\n *\n * This file has been put into the public domain.\n * You can do whatever you want with this file.\n */\n\n#ifndef XZ_PRIVATE_H\n#define XZ_PRIVATE_H\n\n#include \"xz_config.h\"\n\n\n/* If no specific decoding mode is requested, enable support for all modes. */\n#if !defined(XZ_DEC_SINGLE) && !defined(XZ_DEC_PREALLOC) \\\n\t\t&& !defined(XZ_DEC_DYNALLOC)\n#\tdefine XZ_DEC_SINGLE\n#\tdefine XZ_DEC_PREALLOC\n#\tdefine XZ_DEC_DYNALLOC\n#endif\n\n/*\n * The DEC_IS_foo(mode) macros are used in \"if\" statements. If only some\n * of the supported modes are enabled, these macros will evaluate to true or\n * false at compile time and thus allow the compiler to omit unneeded code.\n */\n#ifdef XZ_DEC_SINGLE\n#\tdefine DEC_IS_SINGLE(mode) ((mode) == XZ_SINGLE)\n#else\n#\tdefine DEC_IS_SINGLE(mode) (false)\n#endif\n\n#ifdef XZ_DEC_PREALLOC\n#\tdefine DEC_IS_PREALLOC(mode) ((mode) == XZ_PREALLOC)\n#else\n#\tdefine DEC_IS_PREALLOC(mode) (false)\n#endif\n\n#ifdef XZ_DEC_DYNALLOC\n#\tdefine DEC_IS_DYNALLOC(mode) ((mode) == XZ_DYNALLOC)\n#else\n#\tdefine DEC_IS_DYNALLOC(mode) (false)\n#endif\n\n#if !defined(XZ_DEC_SINGLE)\n#\tdefine DEC_IS_MULTI(mode) (true)\n#elif defined(XZ_DEC_PREALLOC) || defined(XZ_DEC_DYNALLOC)\n#\tdefine DEC_IS_MULTI(mode) ((mode) != XZ_SINGLE)\n#else\n#\tdefine DEC_IS_MULTI(mode) (false)\n#endif\n\n/*\n * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used\n * before calling xz_dec_lzma2_run().\n */\nstruct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode,\n\t\t\t\t\t\t   uint32_t dict_max);\n\n/*\n * Decode the LZMA2 properties (one byte) and reset the decoder. Return\n * XZ_OK on success, XZ_MEMLIMIT_ERROR if the preallocated dictionary is not\n * big enough, and XZ_OPTIONS_ERROR if props indicates something that this\n * decoder doesn't support.\n */\nenum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s,\n\t\t\t\t\t uint8_t props);\n\n/* Decode raw LZMA2 stream from b->in to b->out. */\nenum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,\n\t\t\t\t       struct xz_buf *b);\n\n/* Free the memory allocated for the LZMA2 decoder. */\nvoid xz_dec_lzma2_end(struct xz_dec_lzma2 *s);\n\n\n#endif\n"
  },
  {
    "path": "src/CV/EnvFollower.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// ENGINE_NAME:CV/EnvFollower;CV/Vactrol\n\n#include \"../squares-and-circles-api.h\"\n#include \"../../lib/streams/follower.h\"\n#include \"../../lib/streams/vactrol.h\"\n#include \"../../lib/streams/audio_cv_meter.h\"\n\nstreams::Follower _follower;\nstreams::Vactrol _vactrol;\nstreams::AudioCvMeter _meter;\n\nint32_t attack_ = 0;\nint32_t decay_ = 0;\nint32_t mode_ = 0;\nfloat scale = 0.5f;\nfloat offset = 0;\nint16_t* out_cv = nullptr;\n\nstruct\n{\n    int8_t scope[128] = {};\n    int i = 0;\n\n    void draw(int x0, int y)\n    {\n        for (int x = x0; x < 127; x++)\n        {\n            if (x % 3 == 0)\n                gfx::setPixel(x, y);\n            gfx::drawLine(x, y - scope[(i + x) % 128], x + 1, y - scope[(1 + i + x) % 128]);\n        }\n    }\n\n    void push(int y)\n    {\n        scope[i++ % 128] = y;\n        if (i > 127)\n            i = 0;\n    }\n} _scope;\n\nconst char *mode_names[] = {\n    \"Follower\",\n    \"Vactrol\",\n    \"\"};\n\nvoid engine::setup()\n{\n    if (!strcmp(engine::name(), \"CV/Vactrol\"))\n        mode_ = 1;\n\n    engine::addParam(\"Attack\", &attack_, 0, UINT16_MAX);\n    engine::addParam(\"AttVer\", &scale, -1, 1);\n    engine::addParam(\"Decay\", &decay_, 0, INT16_MAX);\n    engine::addParam(\"Offset\", &offset, -1, 1);\n\n    out_cv = engine::outputBuffer_i16(OUT_CV);\n\n    decay_ = INT16_MAX / 2;\n    engine::setMode(ENGINE_MODE_COMPACT);\n\n    _meter.Init();\n    _follower.Init();\n    _vactrol.Init();\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n\n    uint16_t gain;\n    uint16_t freq;\n\n    int32_t paramters[3] = {};\n    int32_t globals[3] = {};\n    globals[0] = attack_;\n    globals[2] = decay_;\n    paramters[1] = 0;\n\n    if (mode_ == 0)\n    {\n        _follower.Configure(false, paramters, globals);\n        for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            _follower.Process(0, inputL[i] * INT16_MAX, &gain, &freq);\n            out_cv[i] = gain >> 1; //_follower.process(inputL[i]) * 10.f;\n        }\n    }\n    else\n    {\n        _vactrol.Configure(false, paramters, globals);\n        for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            _vactrol.Process(0, inputL[i] * INT16_MAX, &gain, &freq);\n            out_cv[i] = gain >> 1; //_follower.process(inputL[i]) * 10.f;\n        }\n    }\n\n    _meter.Process(inputL[0] * INT16_MAX);\n\n    if ((engine::t() % 50) == 0)\n    {\n        int8_t v = out_cv[0] >> 9;\n        CONSTRAIN(v, 0, 14);\n        _scope.push(v);\n    }\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        out_cv[i] *= scale;\n        out_cv[i] += (offset * PITCH_PER_OCTAVE * 5);\n    }\n}\n\nvoid engine::draw()\n{\n    _scope.draw(64, 58);\n    gfx::drawRect(64, 44, 64, 15);\n    gfx::drawRect(0, 44, 63, 15);\n    gfx::fillRect(2, 46, (_meter.peak() >> 8), 11);\n}\n\n#include \"../../lib/streams/svf.cc\"\n#include \"../../lib/streams/follower.cc\"\n#include \"../../lib/streams/vactrol.cc\"\n#include \"../../lib/streams/resources.cc\""
  },
  {
    "path": "src/CV/EnvGen.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// ENGINE_NAME:CV/EnvGen_AD;CV/EnvGen_ADSR\n// build_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n\n#define private public\n#include \"lib/peaks/modulations/multistage_envelope.h\"\n#include \"lib/stmlib/utils/dsp.h\"\n#include <algorithm>\n\n#ifndef PEAKS_RESOURCES_H_\n#include \"lib/peaks/modulations/multistage_envelope.cc\"\n#include \"lib/peaks/resources.cc\"\n#endif\n\npeaks::MultistageEnvelope _processor;\n\nint32_t _attack = 0;\nint32_t _decay = UINT16_MAX / 2;\nint32_t _sustain = UINT16_MAX / 2;\nint32_t _release = UINT16_MAX / 2;\nfloat scale = 1.0f;\nfloat offset = 0;\nfloat scale2 = 0;\nfloat offset2 = 0;\nint32_t output = 0;\nint16_t* out_cv = nullptr;\n\nvoid engine::setup()\n{\n    _processor.Init();\n\n    if (!strcmp(engine::name(), \"CV/EnvGen_ADSR\"))\n    {\n        engine::addParam(\"Attack\", &_attack, 0, UINT16_MAX);\n        engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n        engine::addParam(\"Sustain\", &_sustain, 0, UINT16_MAX);\n        engine::addParam(\"Release\", &_release, 0, UINT16_MAX);\n        engine::addParam(\"@Scale\\n%+.1f\", &scale, -1, 1);\n        engine::addParam(\"@Offset\\n%+.1fV\", &offset, -5, 5);\n    }\n    else\n    {\n        engine::addParam(\"Attack\", &_attack, 0, UINT16_MAX);\n        engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n        engine::addParam(\"@Scale\\n%+.1f\", &scale, -2, 2);\n        engine::addParam(\"@Offset\\n%+.1fV\", &offset, -5, 5);\n        // AD - Mode\n        _sustain = -1;\n        _release = -1;\n    }\n\n    out_cv = engine::outputBuffer_i16(OUT_CV);\n    engine::setMode(ENGINE_MODE_COMPACT);\n}\n\nvoid engine::process()\n{\n    peaks::GateFlags flags[FRAME_BUFFER_SIZE];\n    uint16_t params[4];\n    scale2 = scale;\n    offset2 = offset;\n\n    params[0] = _attack;\n    params[1] = _decay;\n    if (_sustain >= 0)\n    {\n        params[2] = _sustain;\n        params[3] = _release;\n        _processor.Configure(params, peaks::CONTROL_MODE_FULL);\n    }\n    else\n    {\n        // AD - Mode\n        _processor.Configure(params, peaks::CONTROL_MODE_HALF);\n    }\n\n    if (engine::trig())\n    {\n        flags[0] = peaks::GATE_FLAG_RISING;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else if (engine::gate())\n    {\n        std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else\n    {\n        flags[0] = flags[0] == peaks::GATE_FLAG_HIGH ? peaks::GATE_FLAG_FALLING : peaks::GATE_FLAG_LOW;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n    }\n\n    _processor.Process(flags, out_cv, FRAME_BUFFER_SIZE);\n\n    output = out_cv[0];\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        out_cv[i] *= scale / 4.f;\n        out_cv[i] += (offset * PITCH_PER_OCTAVE);\n    }\n}\n\nvoid draw_envelope(int base_line = 58, int height = 16)\n{\n    float sum_time = 0;\n    for (size_t segment = 0; segment < _processor.num_segments_; segment++)\n        sum_time += _processor.time_[segment];\n\n    float x = 0;\n    for (size_t segment = 0; segment < _processor.segment_; segment++)\n        x += _processor.time_[segment];\n\n    x += (float)_processor.phase_ / UINT32_MAX * _processor.time_[_processor.segment_];\n    x *= (128.f / sum_time);\n\n    int last_y = 0;\n    for (int i = 0; i < 127; i++)\n    {\n        int segment = 0;\n        uint32_t phase = 0;\n        float j = sum_time * (i + 1) / 128.f;\n        for (segment = 0; segment < _processor.num_segments_; segment++)\n        {\n            if (j <= _processor.time_[segment])\n            {\n                phase = j / _processor.time_[segment] * UINT32_MAX;\n                break;\n            }\n\n            j -= _processor.time_[segment];\n        }\n\n        int32_t start = _processor.level_[segment];\n        int32_t end = _processor.level_[segment + 1];\n\n        const uint16_t *lutt[] = {peaks::lut_env_linear, peaks::lut_env_expo, peaks::lut_env_quartic};\n        uint16_t t = stmlib::Interpolate824(lutt[_processor.shape_[segment]], phase);\n\n        int16_t y = start + ((end - start) * (t >> 1) >> 15);\n        y = ceil((float)y / INT16_MAX * height);\n        int16_t y2 = ceil(1 + (float)output / INT16_MAX * height);\n\n        gfx::drawLine(x, base_line, x, base_line - height);\n        gfx::drawLine(i, base_line - last_y, i + 1, base_line - y);\n\n        last_y = y;\n    }\n}\n\nvoid engine::draw()\n{\n    if (_processor.num_segments_ <= 2)\n    {\n        int gnd = 58;\n        if (scale2 < 0)\n            gnd -= 16;\n\n        CONSTRAIN(scale2, -1, 1);\n\n        draw_envelope(gnd, 16 * scale2);\n        for (int i = 0; i < 127; i += 2)\n            gfx::setPixel(i, gnd);\n    }\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    for (int i = 0; i < 127; i += 2)\n        gfx::setPixel(i, 32);\n\n    draw_envelope(32 - (offset2 / 5 * 32), 32 * scale2);\n}"
  },
  {
    "path": "src/CV/LFO.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/peaks/modulations/lfo.h\"\n\n#include \"lib/peaks/modulations/lfo.cc\"\n#include \"lib/peaks/resources.cc\"\n#include \"lib/stmlib/utils/random.cc\"\n\npeaks::Lfo _processor;\n\nint32_t shape = peaks::LFO_SHAPE_SINE;\nint32_t rate = -INT16_MIN;\nint32_t waveform = -INT16_MIN;\nfloat scale = 0.5f;\nfloat offset = 0;\nint16_t* out_cv = nullptr;\n\nconst char *shape_names[] = {\"SIN\", \"TRI\", \"SQR\", \"STEPS\", \"NOISE\"};\n\nvoid engine::setup()\n{\n    _processor.Init();\n    _processor.set_level(UINT16_MAX);\n    _processor.set_rate(rate);\n    _processor.set_parameter((waveform - 32768));\n    _processor.set_reset_phase(-INT16_MIN - 32768);\n\n    engine::addParam(\"Freq.\", &rate, 0, UINT16_MAX);\n    engine::addParam(\"Shape\", &shape, 0, peaks::LFO_SHAPE_LAST - 1, shape_names);\n    engine::addParam(\"AttVer\", &scale, -0.5f, 0.5f);\n    engine::addParam(\"Wavefrm\", &waveform, 0, UINT16_MAX);\n    engine::addParam(\"Offset\", &offset, -1, 1);\n\n    out_cv = engine::outputBuffer_i16(OUT_CV);\n\n    engine::setMode(ENGINE_MODE_COMPACT);\n}\n\nvoid engine::process()\n{\n    peaks::GateFlags flags[FRAME_BUFFER_SIZE];\n\n    _processor.set_shape((peaks::LfoShape)shape);\n    _processor.set_rate(rate);\n    _processor.set_parameter((waveform - 32768));\n\n    if (engine::trig())\n    {\n        flags[0] = peaks::GATE_FLAG_RISING;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else if (engine::gate())\n    {\n        std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else\n    {\n        flags[0] = flags[0] == peaks::GATE_FLAG_HIGH ? peaks::GATE_FLAG_FALLING : peaks::GATE_FLAG_LOW;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n    }\n\n    _processor.Process(flags, out_cv, FRAME_BUFFER_SIZE);\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        out_cv[i] >>= 1;\n        out_cv[i] *= scale;\n        out_cv[i] += (offset * PITCH_PER_OCTAVE * 5);\n    }\n}\n\nvoid engine::draw()\n{\n    gfx::drawWaveform(out_cv, 64);\n}"
  },
  {
    "path": "src/CV/V_OCT.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include <algorithm>\n\n#define ONE_POLE(out, in, coefficient) out += (coefficient) * ((in) - out);\n\nfloat note = 0;\nint32_t tune = 0;\nint32_t cv0 = 0;\nint16_t cv_ = 0;\nfloat glide = 0;\nint16_t* out_cv = nullptr;\n\nvoid engine::setup()\n{\n    engine::addParam(V_OCT, &note);\n    engine::addParam(\"@Fine\", &tune, INT8_MIN, INT8_MAX);\n    engine::addParam(\"Slew\", &glide, 0, 0.5f);\n\n    out_cv = engine::outputBuffer_i16(OUT_VOCT);\n\n    engine::setMode(ENGINE_MODE_COMPACT);\n}\n\nvoid engine::process()\n{\n    cv0 = engine::cv_i32() // note is added internal\n          + (PITCH_PER_OCTAVE * 2) + (tune << 2);\n\n    ONE_POLE(cv_, cv0, powf(1 - glide, 10));\n\n    std::fill_n(out_cv, FRAME_BUFFER_SIZE, cv_);\n}\n\nvoid engine::draw()\n{\n    char tmp[64];\n    sprintf(tmp, \"INT: %d\", cv0);\n    gfx::drawString(2, 46, tmp, 0);\n    sprintf(tmp, \"OUT: %.3fV\", ((float)cv_ / PITCH_PER_OCTAVE));\n    gfx::drawString(2, 52, tmp, 0);\n    gfx::drawWaveform(out_cv, 64);\n}\n"
  },
  {
    "path": "src/DRUMS/808ish-BD.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/peaks/drums/bass_drum.h\"\n\npeaks::BassDrum _processor;\n\nint32_t _freq = UINT16_MAX / 2;\nint32_t _punch = UINT16_MAX / 2;\nint32_t _tone = UINT16_MAX / 2;\nint32_t _decay = UINT16_MAX / 2;\nint16_t* _out = engine::outputBuffer_i16(OUT_AUDIO);\n\nvoid engine::setup()\n{\n    _processor.Init();\n\n    engine::addParam(\"Pitch\", &_freq, 0, UINT16_MAX);\n    engine::addParam(\"Punch\", &_punch, 0, UINT16_MAX);\n    engine::addParam(\"Tone\", &_tone, 0, UINT16_MAX);\n    engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n}\n\nvoid engine::process()\n{\n    peaks::GateFlags flags[FRAME_BUFFER_SIZE];\n\n    _processor.set_frequency(_freq - 32768);\n    _processor.set_punch(_punch);\n    _processor.set_tone(_tone);\n    _processor.set_decay(_decay);\n\n    if (engine::trig())\n    {\n        flags[0] = peaks::GATE_FLAG_RISING;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else if (engine::gate())\n    {\n        std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else\n    {\n        flags[0] = flags[0] == peaks::GATE_FLAG_HIGH ? peaks::GATE_FLAG_FALLING : peaks::GATE_FLAG_LOW;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n    }\n\n    _processor.Process(flags, _out, FRAME_BUFFER_SIZE);\n}\n\n#include \"lib/peaks/drums/bass_drum.cc\"\n#include \"lib/peaks/resources.cc\"\n"
  },
  {
    "path": "src/DRUMS/808ish-HiHat.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16 -ffast-math\n\n#include \"../squares-and-circles-api.h\"\n#define private public\n#include \"lib/peaks/drums/high_hat.h\"\n#include \"lib/braids/envelope.h\"\n\npeaks::HighHat _oh;\npeaks::HighHat _ch;\nbraids::Envelope _ohEnv;\nbraids::Envelope _chEnv;\n\nfloat _pitch = 0.5f;\nfloat _levelCH = 0.75f;\nfloat _decayCH = 0;\nfloat _decayOH = 0.5f;\n\nint16_t buffer[FRAME_BUFFER_SIZE];\npeaks::GateFlags flags[FRAME_BUFFER_SIZE];\nfloat* _out = engine::outputBuffer_f32(OUT_AUDIO);\n\nvoid engine::setup()\n{\n    _oh.Init();\n    _ch.Init();\n\n    uint16_t decay = UINT16_MAX;\n    _oh.Configure(&decay, peaks::CONTROL_MODE_FULL);\n    _ch.Configure(&decay, peaks::CONTROL_MODE_FULL);\n\n    _ohEnv.Init(); //TODO: Use _ch.vca_envelope_ instead -  only 4 steps ???!\n    _chEnv.Init();\n\n    std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n\n    engine::addParam(\".\", &_pitch);\n    engine::addParam(\"CH-Lev\", &_levelCH);\n    engine::addParam(\"CH-Dec\", &_decayCH);\n    engine::addParam(\"OH-Dec\", &_decayOH);\n}\n\nvoid engine::process()\n{\n    bool oh_mute = false;\n\n    if (engine::trig() && !engine::accent())\n    {\n        _chEnv.Trigger(braids::ENV_SEGMENT_ATTACK);\n        _ch.vca_envelope_.Trigger(_levelCH * 32768 * 15);\n        oh_mute = true;\n    }\n\n    _ch.Process(flags, buffer, FRAME_BUFFER_SIZE);\n\n    _chEnv.Update(0, 32 + _decayCH * 95);\n    auto ch_ad = (float)_chEnv.Render() / UINT16_MAX;\n\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        _out[i] = (float)buffer[i] / INT16_MAX * ch_ad;\n\n    if (engine::accent())\n    {\n        _ohEnv.Trigger(braids::ENV_SEGMENT_ATTACK);\n        _oh.vca_envelope_.Trigger(32768 * 15);\n    }\n\n    _oh.Process(flags, buffer, FRAME_BUFFER_SIZE);\n\n    _ohEnv.Update(0, oh_mute ? 0 : (32 + _decayOH * 95));\n    auto oh_ad = (float)_ohEnv.Render() / UINT16_MAX;\n\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        _out[i] += (float)buffer[i] / INT16_MAX * oh_ad;\n}\n\n#include \"lib/peaks/drums/high_hat.cc\"\n#include \"lib/peaks/resources.cc\"\n#include \"lib/braids/resources.cc\""
  },
  {
    "path": "src/DRUMS/808ish-SD.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16 -ffast-math\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/peaks/drums/snare_drum.h\"\n\npeaks::SnareDrum _processor;\n\nint32_t _freq = UINT16_MAX / 2;\nint32_t _snappy = UINT16_MAX / 2;\nint32_t _tone = UINT16_MAX / 2;\nint32_t _decay = UINT16_MAX / 2;\n\npeaks::GateFlags flags[FRAME_BUFFER_SIZE];\nint16_t* _out = engine::outputBuffer_i16(OUT_AUDIO);\n\nvoid engine::setup()\n{\n    _processor.Init();\n    std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n\n    engine::addParam(\"Pitch\", &_freq, 0, UINT16_MAX);\n    engine::addParam(\"Snappy\", &_snappy, 0, UINT16_MAX);\n    engine::addParam(\"Tone\", &_tone, 0, UINT16_MAX);\n    engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n}\n\nvoid engine::process()\n{\n    _processor.set_frequency(_freq - 32768);\n    _processor.set_tone(_tone);\n    _processor.set_snappy(_snappy);\n    _processor.set_decay(_decay);\n\n    if (engine::trig())\n    {\n        flags[0] = peaks::GATE_FLAG_RISING;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else if (engine::gate())\n    {\n        std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else\n    {\n        flags[0] = flags[0] == peaks::GATE_FLAG_HIGH ? peaks::GATE_FLAG_FALLING : peaks::GATE_FLAG_LOW;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n    }\n\n    _processor.Process(flags, _out, FRAME_BUFFER_SIZE);\n}\n\n#include \"lib/peaks/drums/snare_drum.cc\"\n#include \"lib/stmlib/utils/random.cc\"\n#include \"lib/peaks/resources.cc\"\n"
  },
  {
    "path": "src/DRUMS/Claps.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/drumsynth/drumsynth.h\"\n#include \"lib/drumsynth/drumsynth_claps.h\"\n#include \"lib/misc/noise.hxx\"\n\nstatic constexpr size_t n = 8;\n\nDrumSynth _inst = nullptr;\n\nfloat pitch = 1.f;\nfloat stereo = 0.5f;\nfloat stretch = 1.f;\n\nDrumModel inst[32] = {};\nconst uint8_t *packed_drumKit = drum_synth_claps;\nconst size_t inst_count = 10; // packed_drumKit[0];\nint32_t inst_selection = 0;\n\nDrumModel _cur_inst = {};\nWhiteNoise r;\n\nuint32_t seed = 0;\nstd::pair<uint32_t, float> seeds[7] = {\n    {0x6d17ceb4, 1.f},\n    {0x73623629, 1.f},\n    {0x23cb4e73, 0.5f},\n    {0x73C23C29, 0.5f},\n    {0x42D1EC10, 1.3f},\n    {0x5EFF9F17, 1.3f},\n    {0x082087A1, 1.3f},\n};\n\nvoid load_instrument(uint8_t num);\n\nint sprint_inst_name(char *tmp, int inst_selection)\n{\n    if (inst_selection < 2)\n        return sprintf(tmp, \">%s\", inst[inst_selection].name);\n    else if (inst_selection < inst_count)\n        return sprintf(tmp, \">Clap%03X\", inst_selection);\n    else if ((inst_selection - inst_count) < (int)LEN_OF(seeds))\n        return sprintf(tmp, \">%X\", seeds[inst_selection - inst_count].first);\n    else\n        return sprintf(tmp, \">%X\", (unsigned int)seed);\n}\n\nchar inst_name_buff[256] = {};\nconst char *inst_names[inst_count + LEN_OF(seeds)] = {};\n\nvoid engine::setup()\n{\n    // unpack\n    const uint8_t *p = packed_drumKit;\n    p += 4;\n    for (size_t i = 0; i < packed_drumKit[0]; i++)\n    {\n        inst[i].name = reinterpret_cast<const char *>(p);\n        p += 12;\n\n        inst[i].n = *reinterpret_cast<const size_t *>(p);\n        p += sizeof(inst[i].n);\n\n        PartArgs *part = new PartArgs[inst[i].n]{};\n        inst[i].part = part;\n\n        for (int j = 0; j < inst[i].n; j++)\n        {\n            part->flags = *reinterpret_cast<const PartFlags *>(p);\n            p += sizeof(part->flags);\n\n            part->osc = *reinterpret_cast<const OscArgs *>(p);\n            p += sizeof(part->osc);\n\n            part->osc_pitch.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->osc_pitch.n);\n            part->osc_pitch.xy = reinterpret_cast<const EnvXY *>(p);\n            p += sizeof(EnvXY) * 16;\n\n            part->osc_amp.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->osc_amp.n);\n            part->osc_amp.xy = reinterpret_cast<const EnvXY *>(p);\n            p += sizeof(EnvXY) * 16;\n\n            part->vca.n = *reinterpret_cast<const int32_t *>(p);\n            p += sizeof(part->vca.n);\n            part->vca.xy = reinterpret_cast<const EnvXY *>(p);\n            p += sizeof(EnvXY) * 16;\n\n            part->bq1 = *reinterpret_cast<const BiquadArgs *>(p);\n            p += sizeof(BiquadArgs);\n\n            part->bq2 = *reinterpret_cast<const BiquadArgs *>(p);\n            p += sizeof(BiquadArgs);\n\n            part->ws.n = *reinterpret_cast<const uint32_t *>(p);\n            p += sizeof(part->ws.n);\n            part->ws.xy = reinterpret_cast<const WS_XY *>(p);\n            p += sizeof(WS_XY) * 8;\n\n            part->level = *reinterpret_cast<const float *>(p);\n            p += sizeof(part->level);\n            part++;\n        }\n    }\n\n    engine::addParam(\"Color\", &pitch, 0.5f, 1.5f);\n\n    char *tmp = inst_name_buff;\n    for (int i = 0; i < (inst_count + LEN_OF(seeds)); i++)\n    {\n        inst_names[i] = tmp;\n        tmp += sprint_inst_name(tmp, i) + 1;\n    }\n    engine::addParam(\"Clap\", &inst_selection, 0, (inst_count + LEN_OF(seeds)) - 1, inst_names);\n    engine::addParam(\"Decay\", &stretch, 0.1f, 2.0f);\n    engine::addParam(\"Stereo\", &stereo);\n    // param[0].init(\"Crispy\", &crispy, crispy, -1.1f, 1.1f);\n    // param[1].init(\"Decay\", &decay, decay, 0, 2.f);\n    //  TODO: BitCrusher + Filter + Distortion\n    load_instrument(inst_selection);\n}\n\nvoid free_instrument()\n{\n    for (size_t i = 0; i < inst_count; i++)\n        if (_cur_inst.part == inst[i].part)\n            _cur_inst.part = nullptr;\n\n    if (_cur_inst.part != nullptr)\n        ::free((void *)_cur_inst.part);\n}\n\nvoid engine_free()\n{\n    free_instrument();\n    drum_synth_deinit(_inst, ::free);\n}\n\nvoid load_instrument(uint8_t num)\n{\n    int n = num - inst_count;\n    if (n >= 0 && n < (int)LEN_OF(seeds))\n        r.seed = seed = seeds[n].first;\n    else\n        seed = r.seed;\n\n    free_instrument();\n\n    if (inst_selection < inst_count)\n        _cur_inst = inst[num];\n    else\n    {\n        seed = r.seed;\n\n        float a = 1.f;\n        for (auto &it : seeds)\n            if (it.first == seed)\n                a = it.second;\n\n        auto partArgs = (PartArgs *)::malloc(_cur_inst.n * sizeof(PartArgs));\n        for (size_t i = 0; i < _cur_inst.n; i++)\n        {\n            size_t n = inst_count;\n            DrumModel in = inst[r.next() % n];\n            partArgs[i] = in.part[r.next() % in.n];\n\n            in = inst[r.next() % n];\n            auto &amp = in.part[r.next() % in.n].osc_amp;\n            if (amp.n > 0)\n                partArgs[i].osc_amp = amp;\n\n            in = inst[r.next() % n];\n            partArgs[i].osc_pitch = in.part[r.next() % in.n].osc_pitch;\n\n            in = inst[r.next() % n];\n            auto &vca = in.part[r.next() % in.n].vca;\n            if (vca.n > 0)\n                partArgs[i].vca = vca;\n\n            in = inst[r.next() % n];\n            partArgs[i].bq1 = in.part[r.next() % in.n].bq1;\n\n            in = inst[r.next() % n];\n            partArgs[i].bq2 = in.part[r.next() % in.n].bq2;\n            partArgs[i].level *= a;\n        }\n\n        _cur_inst.part = partArgs;\n    }\n\n    drum_synth_deinit(_inst, ::free);\n    _inst = drum_synth_init(&_cur_inst, ::malloc);\n}\n\nuint32_t _t = UINT32_MAX;\nint32_t last_inst_selection = -1;\n\nvoid engine::process()\n{\n    auto buffer = engine::outputBuffer<0>();\n    auto bufferAux = engine::outputBuffer<1>();\n    memset(buffer, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    memset(bufferAux, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    float tmpL[FRAME_BUFFER_SIZE];\n    float tmpR[FRAME_BUFFER_SIZE];\n\n    if (engine::trig())\n    {\n        if (last_inst_selection != inst_selection)\n        {\n            last_inst_selection = inst_selection;\n            load_instrument(inst_selection);\n        }\n\n        _t = 0;\n\n        drum_synth_reset(_inst);\n    }\n\n    if (_t < UINT32_MAX)\n    {\n        DrumParams params = {_t, 0, stretch, stereo, 1.f, 1.f};\n\n        float f = pitch; // powf(2.f, (frame.qz_voltage(this->io, 0)));\n        float a = stereo;\n        float b = 1.f - a;\n\n        for (size_t k = 0; k < _cur_inst.n; k++)\n        {\n            {\n                drum_synth_process_frame(_inst, k, f, &params, tmpL, tmpR, FRAME_BUFFER_SIZE);\n                for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n                {\n                    buffer[i] += tmpL[i];\n                    bufferAux[i] += tmpR[i];\n                }\n            }\n            // bufferAux[i] += p._vca.value() * p._amp.value() * 0.99f;\n        }\n\n        _t += FRAME_BUFFER_SIZE;\n    }\n}\n\n#include \"lib/drumsynth/drumsynth.cpp\"\n#include \"lib/misc/Biquad.cpp\"\n#include \"lib/plaits/resources.cc\"\n"
  },
  {
    "path": "src/DRUMS/Djembe.cpp",
    "content": "\n#include \"../squares-and-circles-api.h\"\n\n#include \"faust/ui.hxx\"\n#include \"faust/djembe.dsp.h\"\n\nstatic float *_trig = nullptr;\n\nvoid UIGlue::addButton(const char *ui, const char *label, float *zone)\n{\n    if (_trig == nullptr)\n        _trig = zone;\n}\n\nvoid UIGlue::addNumEntry(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n}\n\nvoid UIGlue::addCheckButton(const char *ui, const char *label, float *zone)\n{\n    addHorizontalSlider(ui, label, zone, 0, 0, 1, 1);\n}\n\nvoid UIGlue::addVerticalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n    addHorizontalSlider(ui, label, zone, init, min, max, step);\n}\n\nvoid UIGlue::addHorizontalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n    if (zone)\n    {\n        *zone = init;\n        engine::addParam(label, zone, min, max);\n    }\n}\n\nstatic FAUSTCLASS dsp;\n\nvoid engine::setup()\n{\n    initmydsp(&dsp, SAMPLE_RATE);\n\n    UIGlue ui;\n    buildUserInterfacemydsp(&dsp, &ui);\n}\n\nvoid engine::process()\n{\n    if (_trig != nullptr)\n        *_trig = engine::trig();\n    auto outputL = engine::outputBuffer<0>();\n    float *outputs[] = {outputL, nullptr};\n    computemydsp(&dsp, FRAME_BUFFER_SIZE, nullptr, &outputs[0]);\n}"
  },
  {
    "path": "src/DRUMS/DrumSynth.cpp",
    "content": "// Copyright (C)2024 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// xuild_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16\n// ENGINE_NAME: DRUMS/@!RC8\n\n#include \"../../lib/drumsynth/drumsynth.h\"\n#include \"../squares-and-circles-api.h\"\n\n// General MIDI Percussion Key Map:\n// MIDI Key   Drum Sound             MIDI Key    Drum Sound\n// --------   ----------            ----------   ----------\n//    35     Acoustic Bass Drum        59      Ride Cymbal 2\n//    36     Bass Drum 1               60      Hi Bongo\n//    37     Side Stick                61      Low Bongo\n//    38     Acoustic Snare            62      Mute Hi Conga\n//    39     Hand Clap                 63      Open Hi Conga\n//    40     Electric Snare            64      Low Conga\n//    41     Low Floor Tom             65      High Timbale\n//    42     Closed Hi-Hat             66      Low Timbale\n//    43     High Floor Tom            67      High Agogo\n//    44     Pedal Hi-Hat              68      Low Agogo\n//    45     Low Tom                   69      Cabasa\n//    46     Open Hi-Hat               70      Maracas\n//    47     Low-Mid Tom               71      Short Whistle\n//    48     Hi-Mid Tom                72      Long Whistle\n//    49     Crash Cymbal 1            73      Short Guiro\n//    50     High Tom                  74      Long Guiro\n//    51     Ride Cymbal 1             75      Claves\n//    52     Chinese Cymbal            76      Hi Wood Block\n//    53     Ride Bell                 77      Low Wood Block\n//    54     Tambourine                78      Mute Cuica\n//    55     Splash Cymbal             79      Open Cuica\n//    56     Cowbell                   80      Mute Triangle\n//    57     Crash Cymbal 2            81      Open Triangle\n//    58     Vibraslap\n\nstatic std::pair<uint8_t, uint8_t> midi_key_map[] = {\n    {35, -1}, // BD0\n    {36, -1}, // BD1\n    {37, -1}, // RM\n    {38, -1}, // SD0\n    {39, -1}, // CP\n    {40, -1}, // SD1\n    {41, -1}, // LT\n    {42, -1}, // HH - Closed\n    {43, -1}, // LT2\n    {44, -1}, // HH - Pedal\n    {45, -1}, // MT\n    {46, -1}, // HH - Open\n    {47, -1}, // MT2\n    {48, -1}, // HT\n    {49, -1}, // CR - Crash\n    {50, -1}, // HT2\n    {51, -1}, // RD - Ride\n    {52, -1}, // CY - Chinese\n    {53, -1}, // RD2 - Ride Bell\n    {54, -1}, // TMB\n    {55, -1}, // CR2 - Crash Edge\n    {56, -1}, // CB\n    {57, -1}, // CR3 - Crash Bow\n    {58, -1}, // VS - Vibraslap\n    {59, -1},  // RD3 - Ride Edge\n    {0, -1},   // FREE\n    {0, -1},   // FREE\n    {0, -1},   // FREE\n    {0, -1},   // FREE\n    {0, -1},   // FREE\n    {0, -1},   // FREE\n    {0xFF, 0}, // END\n};\n\nuint8_t& midi_key_entry(uint8_t midi_note)\n{\n    if(midi_note >= 35 && midi_note <= 59)\n    {\n        return midi_key_map[midi_note - 35].second;\n    }\n    for (size_t i = (60-35); i < LEN_OF(midi_key_map); i++)\n    {\n        if (midi_key_map[i].first == 0)\n        {\n            midi_key_map[i].first = midi_note;\n            return midi_key_map[i].second;\n        }\n    }\n    return midi_key_map[LEN_OF(midi_key_map) - 2].second; // invalid\n}\n\nvoid map_as_multiple(uint8_t a, uint8_t b)\n{\n    uint8_t* aa = &midi_key_entry(a);\n    uint8_t* bb = &midi_key_entry(b);\n\n    if (*bb == 0xFF)\n        *bb = *aa;\n    if (*aa == 0xFF)\n        *aa = *bb;\n}\n\nbool is_maped_as_multiple(uint8_t a, uint8_t b)\n{\n    uint8_t aa = midi_key_entry(a);\n    uint8_t bb = midi_key_entry(b);\n\n    return aa == bb;\n}\n\nstatic constexpr size_t n = 8;\n\nfloat pitch = 1.f;\nfloat stereo = 0.5f;\nfloat stretch = 1.f;\n\nDrumModel _instModel[16] = {};\nDrumSynth _inst[16] = {};\n\nsize_t inst_count = 0;\nint32_t inst_selection = 0;\n\nuint32_t _t[16] = {};\n\nconst char *inst_names[16] = {};\n\nchar __debug[128];\n\nconstexpr int MAX_T = UINT16_MAX * 4;\nint32_t _open_hihat = -1;\n\nvoid engine::setup()\n{\n    const uint8_t *drumkit = __data;\n    // unpack\n    inst_count = drum_synth_load_models(drumkit, _instModel, ::malloc);\n    if (inst_count > 0)\n    {\n        for (int i = 0; i < inst_count; i++)\n        {\n            inst_names[i] = _instModel[i].name;\n            midi_key_entry(_instModel[i].midi_note) = i;\n\n            _t[i] = MAX_T;\n            _inst[i] = drum_synth_init(&_instModel[i], ::malloc);\n        }\n\n        map_as_multiple(35, 36); // BD\n        map_as_multiple(38, 40); // SD\n        map_as_multiple(42, 44); // Closed HH\n        map_as_multiple(41, 43); // LT\n        map_as_multiple(45, 47); // MT\n        map_as_multiple(48, 50); // HT\n        map_as_multiple(51, 59); // RD\n        map_as_multiple(49, 55); // CR\n\n        map_as_multiple(49, 51); // CR/RD\n\n        _open_hihat = midi_key_entry(46);\n\n        engine::addParam(\"Pitch\", &pitch, 0.5f, 1.5f);\n        engine::addParam(MULTI_TRIGS, &inst_selection, 0, inst_count - 1, inst_names);\n        engine::addParam(\"Decay\", &stretch, 0.1f, 2.0f);\n        engine::addParam(\"Stereo\", &stereo);\n    }\n\n    engine::setMultiTrigMidiKeyMap(midi_key_map);\n}\n\nvoid engine::release()\n{\n    for (int i = 0; i < inst_count; i++)\n    {\n        ::free(_inst[i]);\n    }\n}\n\nvoid engine::process()\n{\n    auto buffer = engine::outputBuffer<0>();\n    auto bufferAux = engine::outputBuffer<1>();\n    memset(buffer, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    memset(bufferAux, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    float tmpL[FRAME_BUFFER_SIZE];\n    float tmpR[FRAME_BUFFER_SIZE];\n\n    for (int i = 0; i < inst_count; i++)\n    {\n        if (engine::trig() & (1 << i))\n        {\n            _t[i] = 0;\n            drum_synth_reset(_inst[i]);\n            if(_open_hihat != -1 && _instModel[i].midi_note == 42 || _instModel[i].midi_note == 44) // closed hihat\n            {\n                _t[_open_hihat] = MAX_T; // mute open hihat\n            }\n        }\n\n        if (_t[i] < MAX_T)\n        {\n            DrumParams params = {_t[i], 0, stretch, stereo, 0, 0};\n            \n            if(i == _open_hihat) \n            {\n                params.decay = 0.1f + stretch + (-stretch * ((float)engine::getMidiCC(4) / 127.f));\n            }\n\n            float f = pitch * powf(2.f, engine::cv());\n            float a = stereo;\n            float b = 1.f - a;\n\n            params.levelL = engine::mixLevelL(i) * engine::trigLevel(i);\n            params.levelR = engine::mixLevelR(i) * engine::trigLevel(i);\n\n            drum_synth_process_frame(_inst[i], -1, f, &params, buffer, bufferAux, FRAME_BUFFER_SIZE);\n\n            _t[i] += FRAME_BUFFER_SIZE;\n        }\n    }\n}\n\nvoid engine::draw()\n{\n}\n\n#include \"../../lib/drumsynth/drumsynth.cpp\"\n#include \"../../lib/misc/Biquad.cpp\"\n#include \"../../lib/plaits/resources.cc\"\n"
  },
  {
    "path": "src/DRUMS/FM-Drum.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/peaks/drums/fm_drum.h\"\n#include \"lib/peaks/drums/fm_drum.cc\"\n#include \"lib/peaks/resources.cc\"\n#include \"lib/stmlib/utils/random.cc\"\n\nstatic peaks::FmDrum _processor;\n\nstatic int32_t _freq = UINT16_MAX / 2;\nstatic int32_t _punch = UINT16_MAX / 2;\nstatic int32_t _tone = UINT16_MAX / 2;\nstatic int32_t _decay = UINT16_MAX / 2;\n\npeaks::GateFlags flags[FRAME_BUFFER_SIZE];\nint16_t* _out = engine::outputBuffer_i16(OUT_AUDIO);\n\nvoid engine::setup()\n{\n    _processor.Init();\n    std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n\n    engine::addParam(\"Freq.\", &_freq, 0, UINT16_MAX);\n    engine::addParam(\"Noise\", &_punch, 0, UINT16_MAX);\n    engine::addParam(\"FM\", &_tone, 0, UINT16_MAX);\n    engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n}\n\nvoid engine::process()\n{\n    int32_t freq = (_freq) + (engine::cv_i32() / PITCH_PER_OCTAVE * INT16_MAX / 3); // CV or Midi Pitch ?!\n    freq += (-2 * INT16_MAX / 3);\n    CONSTRAIN(freq, 0, UINT16_MAX); // BUG: lower values?\n\n    _processor.set_frequency(freq);\n    _processor.set_fm_amount(((uint16_t)(_tone) >> 2) * 3);\n    _processor.set_decay(_decay);\n    _processor.set_noise(_punch);\n\n    if (engine::trig())\n    {\n        flags[0] = peaks::GATE_FLAG_RISING;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else if (engine::gate())\n    {\n        std::fill(&flags[0], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_HIGH);\n    }\n    else\n    {\n        flags[0] = flags[0] == peaks::GATE_FLAG_HIGH ? peaks::GATE_FLAG_FALLING : peaks::GATE_FLAG_LOW;\n        std::fill(&flags[1], &flags[FRAME_BUFFER_SIZE], peaks::GATE_FLAG_LOW);\n    }\n\n    _processor.Process(flags, _out, FRAME_BUFFER_SIZE);\n}"
  },
  {
    "path": "src/DRUMS/RZ-1.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n#include <stdio.h>\n\n// Casio RZ-1 sample ROMs\n// HN613256P CM5/CM6 = 256kbit (32KB each) Mask ROMs\n// Format: signed 8-bit, mono, 20,000 Hz\n//\n// ROM A (CM5): Toms 1~3, Kick, Snare, Rimshot, Closed Hi-Hat, Open Hi-Hat, Metronome Click\n// ROM B (CM6): Clap, Ride, Cowbell, Crash\n//\n// Sample offsets (from R-Massive's RZ-1 ROM Hacking article):\n// ROM A:\n//   Tom 1   :     0 - 3791  (3791)\n//   Tom 2   :  3791 - 7635  (3844)\n//   Tom 3   :  7635 - 11722 (4087)\n//   Kick    : 11722 - 13349 (1627)\n//   Snare   : 13349 - 16573 (3224)\n//   Rimshot : 16573 - 17876 (1303)\n//   CH      : 17876 - 19099 (1223)\n//   OH      : 19099 - 31108 (12009)\n//   Click   : 31108 - 31615 ( 507)\n// ROM B:\n//   Clap    :     0 - 2511  (2511)\n//   Ride    :  2511 - 16446 (13935)\n//   Cowbell : 16446 - 18397 (1951)\n//   Crash   : 18397 - 32768 (14371)\n\nstatic std::pair<uint8_t, uint8_t> midi_key_map[] = {\n    {41, 0},   // TOM1 (low)\n    {43, 0},\n    {45, 1},   // TOM2 (mid)\n    {47, 1},\n    {48, 2},   // TOM3 (high)\n    {50, 2},\n    {35, 3},   // BD\n    {36, 3},\n    {38, 4},   // SD\n    {40, 4},\n    {37, 5},   // RIM\n    {42, 6},   // CH - Closed\n    {44, 6},   // CH - Pedal\n    {46, 7},   // OH - Open\n    {33, 8},   // CLK - Metronome Click\n    {39, 9},   // CP - Clap\n    {51, 10},  // RD - Ride\n    {53, 10},  // RD - Ride Bell\n    {59, 10},  // RD - Ride Edge\n    {56, 11},  // CB - Cowbell\n    {49, 12},  // CR - Crash\n    {55, 12},\n    {57, 12},\n    {0xFF, 0}, // END\n};\n\nstatic float _pitch = 0.5f;\nstatic float _start = 0.f;\nstatic float _end = 1.f;\nstatic float _amp = 1.f;\n\nint32_t _select = 0;\nconst char *sample_names[13] = {};\nsample *sample_ptr[LEN_OF(sample_names)] = {};\n#define SETUP_SAMPLE(name, ptr)                                                                                        \\\n    sample_names[_select] = name;                                                                                      \\\n    sample_ptr[_select] = ptr;                                                                                         \\\n    ++_select\n\nvoid engine::setup()\n{\n    auto ROM_A_bin = machine::fs_read(\"RZ1_ROMA\");\n    auto ROM_B_bin = machine::fs_read(\"RZ1_ROMB\");\n\n    if (ROM_A_bin == nullptr || ROM_B_bin == nullptr)\n        return;\n\n    auto TOM1 = &ROM_A_bin[0];\n    auto TOM2 = &ROM_A_bin[3791];\n    auto TOM3 = &ROM_A_bin[7635];\n    auto BD   = &ROM_A_bin[11722];\n    auto SD   = &ROM_A_bin[13349];\n    auto RM   = &ROM_A_bin[16573];\n    auto CH   = &ROM_A_bin[17876];\n    auto OH   = &ROM_A_bin[19099];\n    auto CLK  = &ROM_A_bin[31108];\n\n    auto CP   = &ROM_B_bin[0];\n    auto RD   = &ROM_B_bin[2511];\n    auto CB   = &ROM_B_bin[16446];\n    auto CR   = &ROM_B_bin[18397];\n\n    SETUP_SAMPLE(\"BD\",  sample_s8(BD,   1627,  20000, 0)); // 3\n    SETUP_SAMPLE(\"SD\",  sample_s8(SD,   3224,  20000, 0)); // 4\n    \n    SETUP_SAMPLE(\"CP\",  sample_s8(CP,   2511,  20000, 0)); // 9\n    SETUP_SAMPLE(\"RM\",  sample_s8(RM,   1303,  20000, 0)); // 5\n    \n    SETUP_SAMPLE(\"CB\",  sample_s8(CB,   1951,  20000, 0)); // 11\n    SETUP_SAMPLE(\"CLK\", sample_s8(CLK,  507,   20000, 0)); // 8\n\n    SETUP_SAMPLE(\"TM1\",  sample_s8(TOM1, 3791,  20000, 0)); // 0\n    SETUP_SAMPLE(\"TM2\",  sample_s8(TOM2, 3844,  20000, 0)); // 1\n    SETUP_SAMPLE(\"TM3\",  sample_s8(TOM3, 4087,  20000, 0)); // 2\n\n    SETUP_SAMPLE(\"CH\",  sample_s8(CH,   1223,  20000, 0)); // 6\n    SETUP_SAMPLE(\"OH\",  sample_s8(OH,   12009, 20000, 0)); // 7\n\n    SETUP_SAMPLE(\"RD\",  sample_s8(RD,   13935, 20000, 0)); // 10\n    SETUP_SAMPLE(\"CR\",  sample_s8(CR,   14371, 20000, 0)); // 12\n\n    engine::addParam(\"Pitch\", &_pitch);\n    engine::addParam(MULTI_TRIGS, &_select, 0, _select - 1, sample_names); // . = hidden\n    _select = 0;\n\n    engine::addParam(\"Start\", &_start);\n    engine::addParam(\"End\", &_end);\n\n    engine::setMultiTrigMidiKeyMap(midi_key_map);\n}\n\nvoid engine::process()\n{\n    if (sample_ptr[0] == nullptr)\n        return;\n\n    auto outputL = engine::outputBuffer<0>();\n    memset(outputL, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    auto outputR = engine::outputBuffer<1>();\n    memset(outputR, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n\n    for (uint32_t i = 0; i < LEN_OF(sample_ptr) && sample_ptr[i] != nullptr; i++)\n    {\n        if (engine::trig() & (1 << i))\n        {\n            if (i == 6) // CH\n            {\n                if (!(engine::trig() & (1 << (i + 1)))) // OH\n                {\n                    sample_set_pos(sample_ptr[i], _start, 0.7f * engine::trigLevel(i), 0.2f);\n                    sample_set_pos(sample_ptr[i + 1], _start, 0, 1.0f);\n                }\n            }\n            else if (i == 7) // OH\n            {\n                sample_set_pos(sample_ptr[i], _start, engine::trigLevel(i),\n                                    1.f - (float)engine::getMidiCC(4) / 127.f);\n            }\n            else\n            {\n                sample_set_pos(sample_ptr[i], _start, engine::trigLevel(i), 1.f);\n            }\n        }\n        float tmp[FRAME_BUFFER_SIZE] = {};\n\n        float v_oct = (-2.f + _pitch * 4) + engine::cv();\n\n        sample_process(sample_ptr[i], _start, _end, 1.f, v_oct, tmp);\n        float levelL = engine::mixLevelL(i);\n        float levelR = engine::mixLevelR(i);\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            outputL[i] += tmp[i] * levelL;\n            outputR[i] += tmp[i] * levelR;\n        }\n    }\n}\n\nvoid engine::draw()\n{\n    if (sample_ptr[0] == nullptr)\n        gfx::drawString(20, 20, \"ROMS NOT FOUND\\n \\n   RZ1_ROMA\\n   RZ1_ROMB\");\n    else\n        gfx::drawWaveform(sample_ptr[_select]);\n}\n"
  },
  {
    "path": "src/DRUMS/TR707.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n#include <stdio.h>\n\n// #include \"eproms/tr707/IC34_TR707_SNDROM.h\"\n// #include \"eproms/tr707/IC35_TR707_SNDROM.h\"\n\nstatic std::pair<uint8_t, uint8_t> midi_key_map[] = {\n    {35, 0},   // BD0\n    {36, 1},   // BD1\n    {38, 2},   // SD0\n    {40, 3},   // SD1\n    {39, 4},   // CP\n    {54, 5},   // TMB\n    {37, 6},   // RM\n    {56, 7},   // CB\n    {41, 8},   // LT\n    {43, 8},   // LT\n    {45, 9},   // MT\n    {47, 9},   // MT\n    {48, 10},  // HT\n    {50, 10},  // HT\n    {42, 11},  // HH - Closed\n    {44, 11},  // HH - Pedal\n    {46, 12},  // HH - Open\n    {51, 13},  // RD - Ride\n    {59, 13},  // RD - Ride Edge\n    {53, 13},  // RD - Ride Bell\n    {49, 14},  // CR - Crash\n    {55, 14},  // CR - Crash Edge\n    {57, 14},  // CR - Crash Bow\n    {0xFF, 0}, // END\n};\n\nstatic float _pitch = 0.5f;\nstatic float _start = 0.f;\nstatic float _end = 1.f;\nstatic float _amp = 1.f;\n\nint32_t _select = 0;\nconst char *sample_names[15] = {};\nsample *sample_ptr[LEN_OF(sample_names)] = {};\n#define SETUP_SAMPLE(name, ptr)                                                                                        \\\n    sample_names[_select] = name;                                                                                      \\\n    sample_ptr[_select] = ptr;                                                                                         \\\n    ++_select\n\nvoid engine::setup()\n{\n    auto IC34_TR707_SNDROM_bin = machine::fs_read(\"707_IC34\");\n    auto IC35_TR707_SNDROM_bin = machine::fs_read(\"707_IC35\");\n    auto IC19_Crash = machine::fs_read(\"707_IC19\");\n    auto IC22_Ride = machine::fs_read(\"707_IC22\");\n\n    if (IC34_TR707_SNDROM_bin == nullptr || IC35_TR707_SNDROM_bin == nullptr)\n        return;\n\n    auto BD0 = &IC34_TR707_SNDROM_bin[0x0000];\n    auto BD1 = &IC34_TR707_SNDROM_bin[0x0001];\n    auto SD0 = &IC34_TR707_SNDROM_bin[0x2000];\n    auto SD1 = &IC34_TR707_SNDROM_bin[0x2001];\n    auto RM = &IC35_TR707_SNDROM_bin[0x4000];\n    auto CB = &IC35_TR707_SNDROM_bin[0x4001];\n    auto CP = &IC35_TR707_SNDROM_bin[0x6000];\n    auto TMB = &IC35_TR707_SNDROM_bin[0x6001];\n    auto LT = &IC34_TR707_SNDROM_bin[0x4000];\n    auto MT = &IC34_TR707_SNDROM_bin[0x6000];\n    auto HT = &IC35_TR707_SNDROM_bin[0x0000];\n    auto HH = &IC35_TR707_SNDROM_bin[0x2000];\n\n    SETUP_SAMPLE(\"BD0\", sample_u8(BD0, 0x1000, 25000, 1)); // 0\n    SETUP_SAMPLE(\"BD1\", sample_u8(BD1, 0x1000, 25000, 1)); // 1\n    SETUP_SAMPLE(\"SD0\", sample_u8(SD0, 0x1000, 25000, 1)); // 2\n    SETUP_SAMPLE(\"SD1\", sample_u8(SD1, 0x1000, 25000, 1)); // 3\n\n    SETUP_SAMPLE(\"CP\", sample_u8(CP, 0x1000, 25000, 1));   // 4\n    SETUP_SAMPLE(\"TMB\", sample_u8(TMB, 0x1000, 25000, 1)); // 5\n    SETUP_SAMPLE(\"RM\", sample_u8(RM, 0x1000, 25000, 1));   // 6\n    SETUP_SAMPLE(\"CB\", sample_u8(CB, 0x1000, 25000, 1));   // 7\n\n    SETUP_SAMPLE(\"LT\", sample_u8(LT, 0x1000, 12500, 0)); // 8\n    SETUP_SAMPLE(\"MT\", sample_u8(MT, 0x1000, 12500, 0)); // 9\n    SETUP_SAMPLE(\"HT\", sample_u8(HT, 0x1000, 12500, 0)); // 10\n    SETUP_SAMPLE(\"CH\", sample_u8(HH, 0x1000, 25000, 0)); // 11\n    SETUP_SAMPLE(\"OH\", sample_u8(HH, 0x1000, 25000, 0)); // 12\n\n    if (IC22_Ride != nullptr)\n    {\n        SETUP_SAMPLE(\"RD\", sample_u8(IC22_Ride, 0x8000, 25000, 0)); // 14\n    }\n    if (IC19_Crash != nullptr)\n    {\n        SETUP_SAMPLE(\"CR\", sample_u8(IC19_Crash, 0x8000, 25000, 0)); // 13\n    }\n\n    engine::addParam(\"Pitch\", &_pitch);\n    engine::addParam(MULTI_TRIGS, &_select, 0, _select - 1, sample_names); // . = hidden\n    _select = 0;\n\n    engine::addParam(\"Start\", &_start);\n    engine::addParam(\"End\", &_end);\n\n    engine::setMultiTrigMidiKeyMap(midi_key_map);\n}\n\nvoid engine::process()\n{\n    if (sample_ptr[0] == nullptr)\n        return;\n\n    auto outputL = engine::outputBuffer<0>();\n    memset(outputL, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    auto outputR = engine::outputBuffer<1>();\n    memset(outputR, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n\n    for (uint32_t i = 0; i < LEN_OF(sample_ptr) && sample_ptr[i] != nullptr; i++)\n    {\n        if (engine::trig() & (1 << i))\n        {\n            if (i == 11) // CH\n            {\n                if (!(engine::trig() & (1 << (i + 1)))) // OH\n                {\n                    sample_set_pos(sample_ptr[i], _start, 0.7f * engine::trigLevel(i), 0.2f);\n                    sample_set_pos(sample_ptr[i + 1], _start, 0, 1.0f);\n                }\n            }\n            else if (i == 12) // OH\n            {\n                sample_set_pos(sample_ptr[i], _start, engine::trigLevel(i),\n                                    1.f - (float)engine::getMidiCC(4) / 127.f);\n            }\n            else\n            {\n                sample_set_pos(sample_ptr[i], _start, engine::trigLevel(i), 1.f);\n            }\n        }\n        float tmp[FRAME_BUFFER_SIZE] = {};\n\n        float v_oct = (-2.f + _pitch * 4) + engine::cv();\n\n        sample_process(sample_ptr[i], _start, _end, 1.f, v_oct, tmp);\n        float levelL = engine::mixLevelL(i);\n        float levelR = engine::mixLevelR(i);\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            outputL[i] += tmp[i] * levelL;\n            outputR[i] += tmp[i] * levelR;\n        }\n    }\n}\n\nvoid engine::draw()\n{\n    if (sample_ptr[0] == nullptr)\n        gfx::drawString(20, 20, \"ROMS NOT FOUND\\n \\n   707_IC34\\n   707_IC35\");\n    else\n        gfx::drawWaveform(sample_ptr[_select]);\n}\n"
  },
  {
    "path": "src/DRUMS/TR909-HiHat.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n\nstatic float _ch_vol = 1.f;\nstatic float _ch_dec = 0.2f;\nstatic float _oh_vol = 1.f;\nstatic float _oh_dec = 0.5f;\nstatic float _rd_vol = 1.f;\nstatic float _rd_dec = 0.5f;\n\nint32_t _select;\nconst char *sample_names[] = {\"CH\", \"OH\", \"RD\"};\n// void *_samples[3] = {};\nsample *_ch = nullptr;\nsample *_oh = nullptr;\nsample *_rd = nullptr;\n\nstatic std::pair<uint8_t, uint8_t> midi_key_map[] = {\n    {42, 0}, // HH - Closed\n    {44, 0}, // HH - Pedal\n    {46, 1}, // HH - Open\n    {51, 2}, // RD - Ride\n    {59, 2}, // RD - Ride Edge\n    {53, 2}, // RD - Ride Bell\n    // {49, 3},  // CR - Crash\n    // {55, 3},  // CR - Crash Edge\n    // {57, 3},  // CR - Crash Bow\n    {0xFF, 0}, // END\n};\n\nfloat *_outputL = nullptr;\nfloat *_outputR = nullptr;\n\nvoid engine::setup()\n{\n    const uint8_t *HiHats_bin = machine::fs_read(\"909_HIGH\");\n    const uint8_t *Ride_bin = machine::fs_read(\"909_RIDE\");\n\n    if (HiHats_bin == nullptr || Ride_bin == nullptr)\n        return;\n\n    const int ch_start = 24576;\n    _ch = sample_u8(HiHats_bin + ch_start, 32768 - ch_start, 32000, 0);\n    _oh = sample_u8(HiHats_bin, 24576, 32000, 0);\n    _rd = sample_u8(Ride_bin, 32768, 32000, 0);\n\n    engine::addParam(\"CH-Lev\", &_ch_vol);\n    engine::addParam(\"CH-Dec\", &_ch_dec);\n    engine::addParam(\"OH-Lev\", &_oh_vol);\n    engine::addParam(\"OH-Dec\", &_oh_dec);\n    engine::addParam(\"RD-Lev\", &_rd_vol);\n    engine::addParam(\"RD-Dec\", &_rd_dec);\n\n    _outputL = engine::outputBuffer_f32(OUT_AUDIO_L);\n    _outputR = engine::outputBuffer_f32(OUT_AUDIO_R);\n    engine::setupMultiTrigs(3, sample_names, midi_key_map);\n}\n\nvoid engine::process()\n{\n    if (_oh == nullptr)\n        return;\n\n    if (engine::trig() & (1 << 1)) // OH\n    {\n        sample_set_pos(_oh, 0, _oh_vol, _oh_dec);\n    }\n    else if (engine::trig() & (1 << 0)) // CH\n    {\n        sample_set_pos(_ch, 0, _ch_vol, _ch_dec);\n        sample_set_pos(_oh, 0, 0, _oh_dec);\n    }\n\n    if (engine::trig() & (1 << 2)) // RD\n    {\n        sample_set_pos(_rd, 0, _rd_vol, _rd_dec);\n    }\n\n    memset(_outputL, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    memset(_outputR, 0, sizeof(float) * FRAME_BUFFER_SIZE);\n    sample *_samples[] = {_ch, _oh, _rd};\n    for (size_t i = 0; i < LEN_OF(_samples) && _samples[i] != nullptr; i++)\n    {\n        float tmp[FRAME_BUFFER_SIZE] = {};\n        sample_process(_samples[i], 0, 1, 1.f, engine::cv(), tmp);\n        float levelL = engine::mixLevelL(i);\n        float levelR = engine::mixLevelR(i);\n        for (size_t j = 0; j < FRAME_BUFFER_SIZE; j++)\n        {\n            _outputL[j] += tmp[j] * levelL;\n            _outputR[j] += tmp[j] * levelR;\n        }\n    }\n}\n\nvoid engine::draw()\n{\n    if (_oh == nullptr)\n        gfx::drawString(20, 20, \"ROMS NOT FOUND\\n \\n   909_HIGH\");\n}\n"
  },
  {
    "path": "src/FILTER/MoogLadder.cpp",
    "content": "// Copyright (C)2025 - E.Heidt\n//\n// Author: eh2k@gmx.de\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n\n#define tanh fast_tanh\n#define protected public\n\n#include \"MoogLadders/src/ImprovedModel.h\"\n#include \"plaits/dsp/envelope.h\"\n#include \"stmlib/dsp/units.cc\"\n#include <algorithm>\n\nusing namespace stmlib;\nusing namespace plaits;\n\nconst float a0 = (440.0f / 8.0f) / SAMPLE_RATE;\n\ninline float NoteToFrequency(float midi_note)\n{\n    midi_note -= 9.0f;\n    CONSTRAIN(midi_note, -128.0f, 127.0f);\n    return a0 * 0.25f * SemitonesToRatio(midi_note);\n}\n\nfloat _cutoff = 0.5f;\nfloat _resonance = 0.5f;\nfloat _envMod = 0.5f;\nfloat _envDecay = 0.5f;\n\nDecayEnvelope decay_envelope_;\nImprovedMoog filter0(SAMPLE_RATE * 2);\n\nvoid engine::setup()\n{\n    decay_envelope_.Init();\n\n    engine::addParam(\"Cutoff\", &_cutoff);\n    engine::addParam(\"Res.\", &_resonance);\n    engine::addParam(\"EnvMod\", &_envMod);\n    engine::addParam(\"Decay\", &_envDecay);\n}\n\nfloat tmp[FRAME_BUFFER_SIZE * 2] = {};\nfloat last_input = 0.f;\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    if (engine::trig())\n        decay_envelope_.Trigger();\n\n    const float short_decay = (200.0f * FRAME_BUFFER_SIZE) / SAMPLE_RATE * SemitonesToRatio(-96.0f * _envDecay);\n\n    decay_envelope_.Process(short_decay);\n    float cutoff = _cutoff + _envMod * decay_envelope_.value();\n    CONSTRAIN(cutoff, 0.f, 1.f);\n\n    const float f0 = NoteToFrequency(DEFAULT_NOTE + (engine::cv() * 12));\n    cutoff = f0 * SemitonesToRatio((cutoff - 0.2f) * 120.0f);\n\n    filter0.SetCutoff(cutoff * SAMPLE_RATE / 2);\n    filter0.SetResonance(_resonance);\n\n    if (filter0.sampleRate > SAMPLE_RATE)\n    {\n\n        for (int i = 0; i < (FRAME_BUFFER_SIZE * 2); i += 2)\n        {\n            float input = inputL[i / 2] + inputR[i / 2];\n            tmp[i] = (last_input + input) * 0.5f;\n            tmp[i + 1] = input;\n            last_input = input;\n        }\n\n        filter0.Process(tmp, FRAME_BUFFER_SIZE * 2);\n\n        for (int i = 0; i < FRAME_BUFFER_SIZE * 2; i += 2)\n        {\n            outputL[i / 2] = (tmp[i] + tmp[i + 1]) / 2;\n        }\n    }\n    else\n    {\n        std::copy_n(inputL, FRAME_BUFFER_SIZE, outputL);\n        filter0.Process(outputL, FRAME_BUFFER_SIZE);\n    }\n\n    std::copy_n(outputL, FRAME_BUFFER_SIZE, outputR);\n}\n"
  },
  {
    "path": "src/FILTER/SVF.cpp",
    "content": "// Copyright (C)2025 - E.Heidt\n//\n// Author: eh2k@gmx.de\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// https://www.earlevel.com/main/2003/03/02/the-digital-state-variable-filter/\n\n#include \"../squares-and-circles-api.h\"\n#include <array>\n#include <cmath>\n#include <algorithm>\n#include \"stmlib/dsp/units.h\"\n\ninline float clamp(float x, float a, float b)\n{\n    return fmax(a, fmin(x, b));\n}\n\n// https://www.musicdsp.org/en/latest/Filters/142-state-variable-filter-chamberlin-version.html\nstruct SVFilter\n{\n    float lastLp = 0, lastHp = 0, lastBp = 0;\n    inline void process(float input, float kf, float kq)\n    {\n        auto lp = lastLp + kf * lastBp;\n        auto hp = input - lp - kq * lastBp;\n        auto bp = lastBp + kf * hp;\n        lastLp = lp;\n        lastHp = hp;\n        lastBp = bp;\n    }\n};\n\nclass Filter\n{\n    SVFilter f[2];\n    float kf = 0.1f, kq = .3f;\n\n  public:\n    void set_f_q(float f, float q)\n    {\n        kq = q;\n        kf = stmlib::Pow2Fast<1>(std::min(0.f, f));\n        // kf = std::pow(2.f, std::min(0.f, f));\n    }\n\n    inline auto process(float input)\n    {\n        // 2x oversampling\n\n        f[0].process(input, kf, kq);\n        f[1].process(f[0].lastLp, kf, kq);\n\n        f[0].process(input, kf, kq);\n        f[1].process(f[0].lastLp, kf, kq);\n\n        return f[1].lastLp;\n    }\n};\n\nfloat venv = 0, fenv = 0;\nfloat att = 0, aenv = 0;\n\nfloat _cutoff = 0.28f;\nfloat _resonance = 0.6f;\nfloat _envmod = 0.3f;\nfloat _decay = 0.f;\nfloat _overdrive = 0.f;\n\nFilter flt[2] = {};\n\nfloat *audio_out[2] = {nullptr, nullptr};\nfloat *audio_in[2] = {nullptr, nullptr};\n\nvoid engine::setup()\n{\n    audio_out[0] = engine::outputBuffer_f32(OUT_AUDIO_L);\n    audio_out[1] = engine::outputBuffer_f32(OUT_AUDIO_R);\n\n    engine::addParam(\"Cutoff\", &_cutoff);\n    engine::addParam(\"Reso\", &_resonance);\n    engine::addParam(\"EnvMod\", &_envmod);\n    engine::addParam(\"Decay\", &_decay);\n    engine::addParam(\"Overdrive\", &_overdrive);\n}\n\nvoid engine::process()\n{\n    audio_in[0] = engine::inputBuffer<0>();\n    audio_in[1] = engine::inputBuffer<1>();\n\n    if (engine::trig())\n    {\n        fenv = 1;\n        att = 0;\n        aenv = engine::accent() ? 1.f : 0.f;\n    }\n\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        att = std::min(att + 2000.f / SAMPLE_RATE, 1.f);\n\n        if (engine::gate() || !engine::hasTrig())\n            venv = 1;\n        \n        venv *= .995f;\n        fenv *= std::exp(-(1.f - _decay) * .004f);\n\n        for (int ch = 0; ch < 2; ++ch)\n        {\n            float v = audio_in[ch][i];\n\n            flt[ch].set_f_q(_cutoff * 5.f - 5.f + fenv * _envmod * 5.f + aenv * .4f,\n                            1.f - _resonance * .8f - aenv * .1f);\n\n            v = flt[ch].process(v);\n            v *= venv * att * (aenv + 1.f) * .5f;\n\n            if (_overdrive > 0)\n                v = tanhf(v * (1 + _overdrive * 8.f));\n\n            audio_out[ch][i] = v;\n        }\n\n        aenv *= .999f;\n    }\n}"
  },
  {
    "path": "src/FILTER/TeeBee.cpp",
    "content": "// Copyright (C)2025 - E.Heidt\n//\n// Author: eh2k@gmx.de\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// Adapted from: rosic_Open303.cpp/rosic_Open303.h f\n// See also: https://www.timstinchcombe.co.uk/index.php?pge=diode2\n\n#include \"../squares-and-circles-api.h\"\n#undef SAMPLE_RATE\n#define REAL_T_IS_DOUBLE\n\n#include \"open303/src/rosic_BiquadFilter.cpp\"\n#include \"open303/src/rosic_DecayEnvelope.cpp\"\n#include \"open303/src/rosic_EllipticQuarterBandFilter.cpp\"\n#include \"open303/src/rosic_LeakyIntegrator.cpp\"\n#include \"open303/src/rosic_OnePoleFilter.cpp\"\n#include \"open303/src/rosic_TeeBeeFilter.cpp\"\n\nusing namespace rosic;\n\n#ifdef REAL_T_IS_DOUBLE\nstatic_assert(sizeof(real_t) == sizeof(double), \"real_t is double\");\n#else\nstatic_assert(sizeof(real_t) == sizeof(float), \"real_t is float\");\n#endif\n\nstruct TB303_filter\n{\n    rosic::TeeBeeFilter filter;\n    rosic::LeakyIntegrator rc1;\n    rosic::LeakyIntegrator rc2;\n    rosic::DecayEnvelope mainEnv;\n    rosic::EllipticQuarterBandFilter antiAliasFilter;\n\n    rosic::OnePoleFilter highpass1, highpass2, allpass;\n    rosic::BiquadFilter notch;\n\n    real_t envScaler = 0;\n    real_t envOffset = 0;\n    int32_t oversampling = 1;\n\n    void init(int32_t _oversampling = 1)\n    {\n        oversampling = _oversampling;\n        highpass1.setSampleRate(SAMPLE_RATE * oversampling);\n        highpass2.setSampleRate(SAMPLE_RATE);\n        filter.setSampleRate(SAMPLE_RATE * oversampling);\n        allpass.setSampleRate(SAMPLE_RATE);\n        notch.setSampleRate(SAMPLE_RATE);\n\n        mainEnv.setSampleRate(SAMPLE_RATE);\n        rc1.setSampleRate(SAMPLE_RATE);\n        rc2.setSampleRate(SAMPLE_RATE);\n\n        filter.setMode(rosic::TeeBeeFilter::TB_303);\n        filter.setFeedbackHighpassCutoff(150.0);\n\n        highpass1.setMode(OnePoleFilter::HIGHPASS);\n        highpass2.setMode(OnePoleFilter::HIGHPASS);\n        allpass.setMode(OnePoleFilter::ALLPASS);\n        notch.setMode(BiquadFilter::BANDREJECT);\n\n        // tweakables:\n        highpass1.setCutoff(44.486);\n        highpass2.setCutoff(24.167);\n        allpass.setCutoff(14.008);\n        notch.setFrequency(7.5164);\n        notch.setBandwidth(4.7);\n\n        rc1.setTimeConstant(0.0);\n        rc2.setTimeConstant(30.0);\n\n        highpass1.reset();\n        highpass2.reset();\n        filter.reset();\n        notch.reset();\n        antiAliasFilter.reset();\n    }\n\n    void calculateEnvModScalerAndOffset(real_t cutoff, real_t envMod) // Open303::calculateEnvModScalerAndOffset()\n    {\n        // define some constants that arise from the measurements:\n        const real_t c0 = 3.138152786059267e+002; // lowest nominal cutoff\n        const real_t c1 = 2.394411986817546e+003; // highest nominal cutoff\n        const real_t oF = 0.048292930943553;      // factor in line equation for offset\n        const real_t oC = 0.294391201442418;      // constant in line equation for offset\n        const real_t sLoF = 3.773996325111173;    // factor in line eq. for scaler at low cutoff\n        const real_t sLoC = 0.736965594166206;    // constant in line eq. for scaler at low cutoff\n        const real_t sHiF = 4.194548788411135;    // factor in line eq. for scaler at high cutoff\n        const real_t sHiC = 0.864344900642434;    // constant in line eq. for scaler at high cutoff\n\n        // do the calculation of the scaler and offset:\n        real_t e = envMod; // linToLin(envMod, 0.0, 100.0, 0.0, 1.0);\n        real_t c = cutoff; // expToLin(cutoff, c0, c1, 0.0, 1.0);\n        real_t sLo = sLoF * e + sLoC;\n        real_t sHi = sHiF * e + sHiC;\n        envScaler = (1 - c) * sLo + c * sHi;\n        envOffset = oF * c + oC;\n    }\n\n    void process(bool trig, float _cutoff, float _q, float _envMod, float _accent, float _decay,\n                 const float *intput_frame, float *output_frame)\n    {\n        mainEnv.setDecayTimeConstant(rosic::linToExp(_decay, 0.0, 1.0, 200.0, 2000.0));\n\n        if (trig)\n            mainEnv.trigger();\n\n        calculateEnvModScalerAndOffset(_cutoff, _envMod);\n\n        float cutoff = rosic::linToExp(_cutoff, 0.0, 1.0, 313.0, 2394.0);\n        float q = 1.f + _q * 99.f;\n        filter.setResonance(q, false);\n        filter.setDrive(8.f);\n\n        real_t n2 =\n            1.f; // LeakyIntegrator::getNormalizer(mainEnv.getDecayTimeConstant(), rc2.getTimeConstant(), SAMPLE_RATE);\n        real_t n1 =\n            1.f; // LeakyIntegrator::getNormalizer(mainEnv.getDecayTimeConstant(), rc1.getTimeConstant(), SAMPLE_RATE);\n\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; ++i)\n        {\n            real_t mainEnvOut = mainEnv.getSample();\n            real_t tmp1 = n1 * rc1.getSample(mainEnvOut);\n            real_t tmp2 = 0.0;\n            if (_accent > 0.0)\n                tmp2 = mainEnvOut;\n\n            tmp2 = n2 * rc2.getSample(tmp2);\n            tmp1 = envScaler * (tmp1 - envOffset); // seems not to work yet\n            tmp2 = _accent * tmp2;\n\n            real_t instCutoff = cutoff * powf(2.0f, tmp1 + tmp2);\n\n            filter.setCutoff(instCutoff);\n\n            real_t tmp = intput_frame[i];\n\n            for (int i = 1; i <= oversampling; i++)\n            {\n                tmp = highpass1.getSample(tmp);\n                tmp = filter.getSample(tmp);\n                //tmp = antiAliasFilter.getSample(tmp);\n            }\n            tmp = allpass.getSample(tmp);\n            tmp = highpass2.getSample(tmp);\n            tmp = notch.getSample(tmp);\n\n            output_frame[i] = tmp * 3.f;\n        }\n    }\n} _left, _right;\n\nfloat _cutoff = 0.5f;\nfloat _q = 0.5f;\nfloat _envMod = 0.5f;\nfloat _decay = 0.5f;\nfloat _accent = 1.0f;\nint32_t _oversampling = 1;\n\nvoid engine::setup()\n{\n    _left.init();\n    _right.init();\n\n    engine::addParam(\"Cutoff\", &_cutoff);\n    engine::addParam(\"Res\", &_q);\n    engine::addParam(\"EnvMode\", &_envMod);\n    engine::addParam(\"Decay\", &_decay);\n    engine::addParam(\"Accent\", &_accent);\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    _left.process(engine::trig(), _cutoff, _q, _envMod, _accent, _decay, inputL, outputL);\n    _right.process(engine::trig(), _cutoff, _q, _envMod, _accent, _decay, inputR, outputR);\n}"
  },
  {
    "path": "src/FX/Delay.cpp",
    "content": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/delay_line.h\"\n#include <stdio.h>\n\n#define clamp(value, min, max)             \\\n    (value > max ? max : value < min ? min \\\n                                     : value)\n\nint32_t time_steps = 16;\nfloat raw = 1.f;\nfloat time = 0.5f;\nfloat color = 0.5f;\nfloat level = 0.5f;\nfloat pan = 0.5f;\n\nconstexpr static int delay_len = 48000; // 1s\n\nstmlib::DelayLine<uint16_t, delay_len> delay_mem0;\nstmlib::DelayLine<uint16_t, delay_len> delay_mem1;\nstmlib::OnePole filterLP0;\nstmlib::OnePole filterLP1;\nstmlib::OnePole filterHP0;\nstmlib::OnePole filterHP1;\n\ninline const float DelayRead(stmlib::DelayLine<uint16_t, delay_len> *line_, float delay)\n{\n    return static_cast<float>(static_cast<int16_t>(line_->Read(delay))) / 32768.0f;\n}\n\ninline void DelayWrite(stmlib::DelayLine<uint16_t, delay_len> *line_, const float sample)\n{\n    line_->Write(static_cast<uint16_t>(\n        stmlib::Clip16(static_cast<int32_t>(sample * 32768.0f))));\n}\n\nchar time_info[64] = \"Time\";\n\nvoid engine::setup()\n{\n    delay_mem0.Init();\n    delay_mem1.Init();\n    filterLP0.Init();\n    filterLP1.Init();\n    filterHP0.Init();\n    filterHP1.Init();\n\n    engine::addParam(\"D/W\", &raw);\n    engine::addParam(time_info, &time_steps, 1, 128);\n    engine::addParam(\"Feedb\", &level);\n    engine::addParam(\"Color\", &color);\n    engine::addParam(\"Pan\", &pan);\n}\n\nfloat delay = 0;\nfloat t_32 = 0;\n\n\nvoid calc_t_step32()\n{\n    uint32_t clk_bpm = engine_sync::clk_bpm();// / 100;\n    if (clk_bpm > 0)\n    {\n        uint32_t bpm = clk_bpm;\n        auto t_per_beat = 6000.f / bpm; // * machine::SAMPLE_RATE\n        t_32 = t_per_beat / 32;\n    }\n    else\n    {\n        t_32 = 1.f / 128.f;\n    }\n}\n\nvoid sync_params()\n{\n    calc_t_step32();\n    time = time_steps * t_32;\n\n    float colorFreq = powf(100.f, 2.f * color - 1.f);\n    float lowpassFreq = clamp(20000.f * colorFreq, 20.f, 20000.f) / SAMPLE_RATE;\n    float highpassFreq = clamp(20.f * colorFreq, 20.f, 20000.f) / SAMPLE_RATE;\n\n    filterLP0.set_f<stmlib::FREQUENCY_DIRTY>(lowpassFreq);\n    filterLP1.set_f<stmlib::FREQUENCY_DIRTY>(lowpassFreq);\n    filterHP0.set_f<stmlib::FREQUENCY_DIRTY>(highpassFreq);\n    filterHP1.set_f<stmlib::FREQUENCY_DIRTY>(highpassFreq);\n}\n\nvoid engine::process()\n{\n    sync_params();\n\n    int n = time / t_32;\n    float d = n * t_32 * SAMPLE_RATE;\n\n    if (fabsf(d - delay) > SAMPLE_RATE / 10)\n        delay = d;\n    else\n        ONE_POLE(delay, d, 0.01f);\n\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        float readL = DelayRead(&delay_mem0, (int)delay);\n        float readR = DelayRead(&delay_mem1, (int)delay);\n\n        auto inL = inputL[i];\n        auto inR = inputR[i];\n\n        inL = filterLP0.Process<stmlib::FILTER_MODE_LOW_PASS>(inL);\n        inL = filterHP0.Process<stmlib::FILTER_MODE_HIGH_PASS>(inL);\n        inR = filterLP1.Process<stmlib::FILTER_MODE_LOW_PASS>(inR);\n        inR = filterHP1.Process<stmlib::FILTER_MODE_HIGH_PASS>(inR);\n\n        DelayWrite(&delay_mem0, (readR + inL * (0 + pan) * 2) * level);\n        DelayWrite(&delay_mem1, (readL + inR * (1 - pan) * 2) * level);\n\n        outputL[i] = readL + inputL[i];\n        outputR[i] = readR + inputR[i];\n\n        outputL[i] = raw * outputL[i] + (1 - raw) * inputL[i];\n        outputR[i] = raw * outputR[i] + (1 - raw) * inputR[i];\n    }\n}\n\nvoid engine::draw()\n{\n    if (engine_sync::clk_bpm() > 0)\n    {\n        sprintf(time_info, \">t=%d\", time_steps);\n    }\n    else\n        sprintf(time_info, \">T:%d ms\", (int)(time * 1000));\n}"
  },
  {
    "path": "src/FX/JU60_chorus.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n//\n// Credits to Andy Harman and JP Cimalando for Juno 60 chorus research, and Émilie Gillet for stmlib.\n// https://github.com/pendragon-andyh/Juno60/blob/master/Chorus/README.md\n// https://github.com/pendragon-andyh/Juno60/issues/2\n// https://github.com/jpcima/rc-effect-playground/issues/2#issuecomment-541340615\n// https://github.com/jpcima/string-machine/tree/master/sources/bbd\n\n#include \"../squares-and-circles-api.h\"\n#ifdef ONE_POLE\n#undef ONE_POLE\n#endif\n\n#include <string.h>\n\n#include \"bbd/bbd_line.h\"\n\n#include \"stmlib/dsp/filter.h\"\n#include \"stmlib/dsp/delay_line.h\"\n#include \"stmlib/dsp/dsp.h\"\n\n#include \"bbd/bbd_line.cc\"\n#include \"bbd/bbd_filter.cc\"\n\nstruct Juno60_Chorus\n{\n    static constexpr size_t delay_size = (1 + SAMPLE_RATE * 0.0054); // max delay time\n    stmlib::DelayLine<float, delay_size> delay_;\n    stmlib::Svf pre_lpf, post_lpf_l, post_lpf_r;\n\n    float phase_ = 0;\n\n    float lfo_tri(float phase_inc_)\n    {\n        float t = -1.0f + (2.0f * phase_);\n\n        phase_ += phase_inc_;\n        if (phase_ > 1.0f)\n            phase_ -= 1.0f;\n\n        return fabsf(t);\n    }\n\n    struct Mode\n    {\n        float freq;\n        float dry;\n        float minDelayL;\n        float maxDelayL;\n        float minDelayR;\n        float maxDelayR;\n        bool stereo;\n    };\n\n    const Mode modes_[4] = {\n        {0.513, 1.0, 0.00154, 0.00515, 0.00151, 0.0054, true},   // Off\n        {0.513, 0.44, 0.00154, 0.00515, 0.00151, 0.0054, true},  // Mode I\n        {0.863, 0.44, 0.00154, 0.00515, 0.00151, 0.0054, true},  // Mode II\n        {9.75, 0.44, 0.00322, 0.00356, 0.00328, 0.00365, false}, // Mode I+II\n    };\n\n    Mode mode_ = modes_[1];\n\n    float lmin, la;\n    float rmin, ra;\n\n    void setMode(const Mode &mode)\n    {\n        mode_ = mode;\n        lmin = mode_.minDelayL * SAMPLE_RATE;\n        la = (mode_.maxDelayL - mode_.minDelayL) * SAMPLE_RATE;\n        rmin = mode_.minDelayR * SAMPLE_RATE;\n        ra = (mode_.maxDelayR - mode_.minDelayR) * SAMPLE_RATE;\n    }\n\n    Juno60_Chorus()\n    {\n        delay_.Init();\n        pre_lpf.Init();\n        post_lpf_l.Init();\n        post_lpf_r.Init();\n        pre_lpf.set_f_q<stmlib::FREQUENCY_ACCURATE>(7237.f / SAMPLE_RATE, 1.f);\n        post_lpf_l.set_f_q<stmlib::FREQUENCY_ACCURATE>(10644.f / SAMPLE_RATE, 1.f);\n        post_lpf_r.set_f_q<stmlib::FREQUENCY_ACCURATE>(10644.f / SAMPLE_RATE, 1.f);\n    }\n\n    void process(float *inOut, float *outR, uint32_t len)\n    {\n        float wet = 1.f - mode_.dry;\n        float f = mode_.freq / SAMPLE_RATE;\n        while (len-- > 0)\n        {\n            float lfo_val = lfo_tri(f);\n\n            *inOut = *outR = *inOut * mode_.dry;\n\n            delay_.Write(pre_lpf.Process<stmlib::FILTER_MODE_LOW_PASS>(stmlib::SoftLimit(*inOut)));\n\n            auto l = delay_.Read(lmin + la * lfo_val);\n            *inOut++ += post_lpf_l.Process<stmlib::FILTER_MODE_LOW_PASS>(l * wet);\n\n            auto r = delay_.Read(rmin + ra * (mode_.stereo ? (1.f - lfo_val) : lfo_val));\n            *outR++ += post_lpf_r.Process<stmlib::FILTER_MODE_LOW_PASS>(r * wet);\n        }\n    }\n};\n\nstruct Juno60_Chorus_BBD\n{\n    // https://github.com/jpcima/bbd-delay-experimental\n    // Not sure if the emulation of the correct MN3009 BBD chips ?\n    // But it sounds better than the naive emulation ;-)\n    // For details - see also https://github.com/jpcima/bbd-delay-experimental/issues/1\n\n    static constexpr int bbd_stages = 185; // the TCA-350-Y IC\n    BBD_Line _delayL;\n    BBD_Line _delayR;\n    BBD_Filter_Coef fin;\n    BBD_Filter_Coef fout;\n\n    struct Mode\n    {\n        float freq;\n        float dry;\n        float minDelayL;\n        float maxDelayL;\n        float minDelayR;\n        float maxDelayR;\n        bool stereo;\n    };\n\n    // https://github.com/pendragon-andyh/Juno60/blob/master/Chorus/README.md\n    const Mode modes_[4] = {\n        {0.513, 1.0, 0.00154, 0.00515, 0.00151, 0.0054, true},   // Off\n        {0.513, 0.44, 0.00154, 0.00515, 0.00151, 0.0054, true},  // Mode I\n        {0.863, 0.44, 0.00154, 0.00515, 0.00151, 0.0054, true},  // Mode II\n        {9.75, 0.44, 0.00322, 0.00356, 0.00328, 0.00365, false}, // Mode I+II\n    };\n\n    Mode mode_ = modes_[1];\n\n    float minL, maxL, minR, maxR;\n\n    void setMode(const Mode &mode)\n    {\n        mode_ = mode;\n        minL = BBD_Line::hz_rate_for_delay(mode_.minDelayL, bbd_stages) / SAMPLE_RATE;\n        maxL = BBD_Line::hz_rate_for_delay(mode_.maxDelayL, bbd_stages) / SAMPLE_RATE;\n        minR = BBD_Line::hz_rate_for_delay(mode_.minDelayR, bbd_stages) / SAMPLE_RATE;\n        maxR = BBD_Line::hz_rate_for_delay(mode_.maxDelayR, bbd_stages) / SAMPLE_RATE;\n    }\n\n    Juno60_Chorus_BBD()\n    {\n        const unsigned interp_size = 128;\n        fin = BBD::compute_filter(SAMPLE_RATE, interp_size, bbd_fin_j60);\n        fout = BBD::compute_filter(SAMPLE_RATE, interp_size, bbd_fout_j60);\n\n        _delayL.setup(bbd_stages, fin, fout);\n        _delayR.setup(bbd_stages, fin, fout);\n        _delayL.clear();\n        _delayR.clear();\n    }\n\n    float phase_ = 0;\n\n    void lfo_tri(float phase_inc_, float *out)\n    {\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            float t = -1.0f + (2.0f * phase_);\n            *out++ = fabsf(t);\n\n            phase_ += phase_inc_;\n            if (phase_ > 1.0f)\n                phase_ -= 1.0f;\n        }\n    }\n\n    void process(float *inOut, float *outR, uint32_t len)\n    {\n        float wet = 1.f - mode_.dry;\n        float f = mode_.freq / SAMPLE_RATE;\n        \n        float dry[FRAME_BUFFER_SIZE];\n        float clockL[FRAME_BUFFER_SIZE];\n        float clockR[FRAME_BUFFER_SIZE];\n\n        memcpy(dry, inOut, len * sizeof(float));\n\n        lfo_tri(f, clockL);\n\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            dry[i] = stmlib::SoftLimit(dry[i]);\n\n            auto lfo = clockL[i];\n            clockL[i] = minL + lfo * (maxL - minL);\n            clockR[i] = minR + (mode_.stereo ? (1.f - lfo) : lfo) * (maxR - minR);\n        }\n\n        _delayL.process(FRAME_BUFFER_SIZE, dry, inOut, clockL);\n        _delayR.process(FRAME_BUFFER_SIZE, dry, outR, clockR);\n\n        for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        {\n            inOut[i] = inOut[i] * wet + dry[i] * mode_.dry;\n            outR[i] = outR[i] * wet + dry[i] * mode_.dry;\n        }\n    }\n};\n\nstatic Juno60_Chorus_BBD _chorus = {};\n\nstatic int32_t mode = 1;\nstatic const char *modes[] = {\n    \"Off\", \"Mode I\", \"Mode II\", \"Mode I+II\"};\nstatic float raw = 1.f;\n\nvoid engine::setup()\n{\n    engine::addParam(\"Amount\", &raw);\n    engine::addParam(\">Modes\", &mode, 0, 3, modes);\n}\n\nvoid set(float *target, const float *src, float amp)\n{\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        target[i] = src[i] * amp;\n}\n\nvoid mix(float *target, const float *src, float amp)\n{\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        target[i] += src[i] * amp;\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    set(outputL, inputL, raw);\n    set(outputR, inputR, raw);\n\n    _chorus.setMode(_chorus.modes_[mode]);\n    _chorus.process(outputL, outputR, FRAME_BUFFER_SIZE);\n\n    mix(outputL, inputL, 1.f - raw);\n    mix(outputR, inputR, 1.f - raw);\n}"
  },
  {
    "path": "src/FX/Rev-Dattorro.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n\n#include \"faust/ui.hxx\"\n#include \"faust/rev_dattorro.dsp.h\"\n\nvoid UIGlue::addButton(const char *ui, const char *label, float *zone)\n{\n    engine::addParam(\"TRIG\", zone);\n}\n\nvoid UIGlue::addNumEntry(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n}\n\nvoid UIGlue::addCheckButton(const char *ui, const char *label, float *zone)\n{\n    addHorizontalSlider(ui, label, zone, 0, 0, 1, 1);\n}\n\nvoid UIGlue::addVerticalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n    addHorizontalSlider(ui, label, zone, init, min, max, step);\n}\n\nvoid UIGlue::addHorizontalSlider(const char *ui, const char *label, float *zone, float init, float min, float max, float step)\n{\n    if (zone)\n    {\n        *zone = init;\n        engine::addParam(label, zone, min, max);\n    }\n}\n\nstatic FAUSTCLASS dsp;\n\nvoid engine::setup()\n{\n    initmydsp(&dsp, SAMPLE_RATE);\n\n    UIGlue ui;\n    buildUserInterfacemydsp(&dsp, &ui);\n}\n\nvoid engine::process()\n{\n    float *tmp[4];\n    tmp[0] = engine::inputBuffer<0>();\n    tmp[1] = engine::inputBuffer<1>();\n    tmp[2] = engine::outputBuffer<0>();\n    tmp[3] = engine::outputBuffer<1>();\n    computemydsp(&dsp, FRAME_BUFFER_SIZE, &tmp[0], &tmp[2]);\n}"
  },
  {
    "path": "src/FX/Reverb.cpp",
    "content": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"clouds/dsp/fx/reverb.h\"\n\nfloat raw = 1.f;\nfloat reverb_amount = 0.75f;\nfloat feedback = 0.5f;\nfloat gain = 1.f;\n\nuint16_t buffer[16384] = {};\nclouds::Reverb fx_;\n\nvoid engine::setup()\n{\n    fx_.Init(buffer);\n\n    engine::addParam(\"D/W\", &raw);\n    engine::addParam(\"Reverb\", &reverb_amount);\n    engine::addParam(\"Damp\", &feedback);\n    engine::addParam(\"Gain\", &gain);\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    fx_.set_amount(reverb_amount * 0.54f);\n    fx_.set_diffusion(0.7f);\n    fx_.set_time(0.35f + 0.63f * reverb_amount);\n    fx_.set_input_gain(gain * 0.1f); // 0.1f);\n    fx_.set_lp(0.6f + 0.37f * feedback);\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        outputL[i] = inputL[i];\n        outputR[i] = inputR[i];\n    }\n\n    fx_.Process(outputL, outputR, FRAME_BUFFER_SIZE);\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; ++i)\n    {\n        outputL[i] = raw * outputL[i] + (1 - raw) * inputL[i];\n        outputR[i] = raw * outputR[i] + (1 - raw) * inputR[i];\n    }\n}\n"
  },
  {
    "path": "src/FX/ReverbSC.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n\n#include \"soundpipe/revsc.c\"\n\nstatic sp_data sp_data_ = {};\nstatic sp_revsc sp_revsc_ = {};\nstatic uint8_t mem[107440]; // sp_revsc_.aux.size\n\nstatic float raw = 1.f;\n\nvoid engine::setup()\n{\n    sp_data_.sr = SAMPLE_RATE;\n    sp_data_.aux.ptr = &mem[0];\n    sp_data_.aux.size = sizeof(mem);\n    sp_revsc_init(&sp_data_, &sp_revsc_);\n\n    sp_revsc_.feedback = 0.97f;\n    sp_revsc_.lpfreq = 10000;\n\n    engine::addParam(\"D/W\", &raw);\n    engine::addParam(\"Feedback\", &sp_revsc_.feedback);\n    engine::addParam(\"LpFreq\", &sp_revsc_.lpfreq, 0, (SAMPLE_RATE / 2));\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; ++i)\n    {\n        sp_revsc_compute(&sp_data_, &sp_revsc_, &inputL[i], &inputR[i], &outputL[i], &outputR[i]);\n        outputL[i] = raw * outputL[i] + (1 - raw) * inputL[i];\n        outputR[i] = raw * outputR[i] + (1 - raw) * inputR[i];\n    }\n}"
  },
  {
    "path": "src/GND/FFT.cpp",
    "content": "// Copyright (C)2024 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"../lib/stmlib/utils/ring_buffer.h\"\n\nextern \"C\"\n{\n#include \"../lib/fft/fft4g.h\"\n#include \"../lib/fft/fft4g.c\"\n}\n\n#include <algorithm>\n#include <math.h>\n\nstatic float apmlitude = 1.f;\nstatic int32_t band = 0;\nstatic const char *sbands[3] = {\" 16\", \" 32\", \" 64\"};\n\nstruct Complex\n{\n    float re;\n    float im;\n};\n\nconst size_t N = 1024;\nstmlib::RingBuffer<Complex, N> spectrum;\nfloat w[N * 2];\nconstexpr int sq_n = 32; // sqrt(N);\nint ip[4 + sq_n];        // new int[(int)ceil(4.0 + sqrt((real_t)N))];\nfloat magnitudes[N / 2] = {};\nfloat window[N];\nint count = 0;\n\nvoid engine::setup()\n{\n    apmlitude = 1.f;\n    engine::addParam(\"_Scale\", &apmlitude, 0.f, 2.f);\n    engine::addParam(\"_Bands\", &band, 0, 2, sbands);\n    engine::setMode(ENGINE_MODE_COMPACT);\n    ip[0] = 0; // indicate that re-initialization is necesarry\n    spectrum.Init();\n\n    for (int n = 0; n < N; n++)\n        window[n] = 0.5f * (1.f - cosf((2.f * M_PI * n) / N));\n}\n\nvoid set(float *target, const float *src, float amp, float offset)\n{\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        target[i] = src[i] * amp + offset;\n}\n\nvoid engine::process()\n{\n    const float m_offset = log10f(N);\n\n    auto inputL = engine::inputBuffer<0>();\n    auto inputR = engine::inputBuffer<1>();\n    auto outputL = engine::outputBuffer<0>();\n    auto outputR = engine::outputBuffer<1>();\n    set(outputL, inputL, apmlitude, 0);\n    set(outputR, inputR, apmlitude, 0);\n\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i += 2)\n    {\n        if (spectrum.readable() == (N / 2))\n        {\n            float *buff = const_cast<float *>(&spectrum.ImmediateReadPtr(0)->re);\n            rdft(N, 1, buff, ip, w);\n\n            // for some reason, this routine returns the second half of the spectrum (the complex conjugate\n            // values of the desired first half), so we need to take the complex conjugates:\n            for (int n = 3; n < N; n += 2) // start at n=3 (imaginary part of the first bin after DC)\n                buff[n] = -buff[n];\n\n            magnitudes[0] = buff[0];\n\n            for (int k = 1; k < N / 2; k++)\n            {\n                float re = buff[2 * k];\n                float im = buff[2 * k + 1];\n                magnitudes[k] += sqrtf(re * re + im * im);\n                // auto db =  sqrtf(re * re + im * im);\n                // auto db =  20 * log10f(db);\n                // auto db = logf(re * re + im * im);\n                // magnitudes[k] = db;\n            }\n            count++;\n            spectrum.Flush();\n        }\n        else\n        {\n            float h = (float)window[spectrum.readable() * 2];\n            float h2 = (float)window[spectrum.readable() * 2 + 1];\n            Complex v = {\n                outputL[i] * h / sq_n,\n                outputL[i + 1] * h2 / sq_n,\n            };\n            spectrum.Overwrite(v);\n        }\n    }\n}\n\nfloat fft_read(int s, int e)\n{\n    float sum = 0;\n    while (s <= e)\n        sum += magnitudes[s++];\n\n    return (sum / count);\n}\n\nfloat level2[64];\nfloat level[64];\n\nvoid draw_spectrum(int yy, int hh)\n{\n    float logN2 = logf(N / 2);\n\n    int bands = 16;\n    if (band == 1)\n        bands = 32;\n    else if (band == 2)\n        bands = 64;\n\n    int to = int(expf(logN2 * 0 / bands));\n    for (int b = 0; b < bands; b++)\n    {\n        int fr = to;\n        to = int(expf(logN2 * (b + 1) / bands));\n\n        if (level2[b] > 0)\n            level2[b] -= 0.1f;\n        else\n            level2[b] = 0;\n\n        level[b] = 10.f / hh + log10f(fft_read(fr, to));\n        level2[b] = std::max(level[b], level2[b]);\n    }\n\n    int w = (128 / bands);\n    for (size_t i = 0; i < bands; i++)\n    {\n        auto y = level[i] * hh;\n        gfx::fillRect(i * w, yy - y, w - 1, y);\n\n        y = level2[i] * hh;\n        gfx::fillRect(i * w, yy - 1 - y, w - 1, 1);\n    }\n\n    // uint32_t ylim = 58;\n    // for (uint32_t i = 0; i < 128; i++)\n    // {\n    //     auto y = 40 + -(magnitudes[i] / 2);\n    //     gfx::drawLine(i, 58, i, y);\n    // };\n\n    for (uint32_t i = 0; i < (N / 2); i++)\n        magnitudes[i] = 0;\n    count = 0;\n}\n\nvoid engine::draw()\n{\n    draw_spectrum(60, 32);\n}\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    draw_spectrum(64, 48);\n}"
  },
  {
    "path": "src/GND/Scope.cpp",
    "content": "// Copyright (C)2024 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include <utility>\n\nfloat apmlitude = 1.f;\nint32_t x_scale = 32;\nfloat offset = 0.f;\nfloat input = 0.f;\nfloat output = 0.f;\n\nfloat *inputL = nullptr;\nfloat *inputR = nullptr;\nfloat *outputL = nullptr;\nfloat *outputR = nullptr;\n\nfloat scope[FRAME_BUFFER_SIZE] = {};\n\nvoid engine::setup()\n{\n    apmlitude = 1.f;\n    engine::addParam(\"_Y-Scale\", &apmlitude, 0.f, 2.f);\n    engine::addParam(\"_Offset\", &offset, -1.f, 1.f);\n    engine::addParam(\"_X-Scale\", &x_scale, 0, 63);\n    engine::setMode(ENGINE_MODE_COMPACT);\n\n}\n\nvoid set(float *target, const float *src, float amp, float offset)\n{\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n        target[i] = src[i] * amp + offset;\n}\n\nvoid engine::process()\n{\n    inputL = engine::inputBuffer<0>();\n    inputR = engine::inputBuffer<1>();\n    outputL = engine::outputBuffer<0>();\n    outputR = engine::outputBuffer<1>();\n\n    input = (inputL[0] + inputR[0]) / 2.f;\n    set(outputL, inputL, apmlitude, offset);\n    set(outputR, inputR, apmlitude, offset);\n    output = (outputL[0] + outputR[0]) / 2.f;\n\n    for (size_t j = 0; j < FRAME_BUFFER_SIZE; j++)\n        scope[j] = (outputL[j] + outputR[j]) / 2.f;\n}\n\nvoid engine::draw()\n{\n    gfx::drawScope(38, scope, x_scale);\n\n    char tmp[64];\n    sprintf(tmp, \"IN:%+1.2fV\", input * 5);\n    gfx::drawString(0, 54, tmp, 0);\n    sprintf(tmp, \"OUT:%+1.2fV\", output * 5);\n    gfx::drawString(64, 54, tmp, 0);\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    gfx::drawScope(32, scope, x_scale);\n}\n"
  },
  {
    "path": "src/M-OSC/Waveforms.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// xuild_flags: -fno-inline -mfloat-abi=soft -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n\n#include \"stmlib/stmlib.h\"\n\n#define private public\n#include \"braids/macro_oscillator.h\"\n#include \"braids/envelope.h\"\n#include \"braids/settings.h\"\n\n#include \"braids/vco_jitter_source.h\"\n#include \"braids/quantizer.h\"\n\n#define SemitonesToRatioFast\n#include \"lib/plaits/dsp/chords/chord_bank.cc\"\n\nplaits::ChordBank chords_;\nint32_t chords_mem[(plaits::kChordNumChords * plaits::kChordNumNotes) + plaits::kChordNumChords + plaits::kChordNumNotes];\n\nbraids::MacroOscillator osc1;\nbraids::MacroOscillator osc2;\nbraids::Envelope envelope;\nbraids::VcoJitterSource jitter_source;\nbraids::Quantizer quantizer;\n\nconstexpr int32_t DEFAULT_PITCH = PITCH_PER_OCTAVE * 6;\n\nnamespace braids\n{\n    uint8_t ex_chord[7] = {};\n    extern const uint8_t diatonic_chords[8][6];\n    extern const uint8_t *custom_chord;\n\n    void Quantizer::Init()\n    {\n    }\n\n    bool Quantizer::enabled()\n    {\n        return engine::qz_enabled();\n    }\n\n    int32_t Quantizer::Process(int32_t pitch, int32_t root, int8_t *note)\n    {\n        pitch -= root + DEFAULT_PITCH;\n        auto ret = engine::qz_process(pitch, note);\n        ret += root + DEFAULT_PITCH;\n        return ret;\n    }\n\n    int16_t Quantizer::Lookup(uint8_t index)\n    {\n        return engine::qz_lookup(index) + DEFAULT_PITCH;\n    }\n}\nuint8_t sync_samples[FRAME_BUFFER_SIZE] = {};\n\nint32_t _pitch = 0;\nint32_t _shape = 0;\nint32_t _timbre = UINT16_MAX / 2;\nint32_t _color = UINT16_MAX / 2;\nint32_t _stereo = 0;\nint32_t _decay = UINT16_MAX / 2;\n\nauto _out_l = engine::outputBuffer_i16(OUT_AUDIO_L);\nauto _out_r = engine::outputBuffer_i16(OUT_AUDIO_R);\n\nint32_t last_color = -1;\nint32_t last_shape = -1;\nint32_t last_qz = -1;\n\nvoid engine::setup()\n{\n    stmlib::BufferAllocator allocator;\n    allocator.Init(chords_mem, sizeof(chords_mem));\n    chords_.Init(&allocator);\n    chords_.chord_index_quantizer_.hysteresis_ = 0; // input => output\n    chords_.Reset();\n\n    braids::settings.Init();\n    osc1.Init();\n    osc2.Init();\n    jitter_source.Init();\n    envelope.Init();\n    quantizer.Init();\n\n    // std::fill(&sync_samples[0], &sync_samples[FRAME_BUFFER_SIZE], 0);\n\n    // settings.SetValue(SETTING_AD_VCA, true);\n    braids::settings.SetValue(braids::SETTING_SAMPLE_RATE, 5);\n    braids::settings.SetValue(braids::SETTING_PITCH_RANGE, braids::PITCH_RANGE_EXTERNAL);\n\n    engine::addParam(V_OCT, &_pitch, -4 * PITCH_PER_OCTAVE, 4 * PITCH_PER_OCTAVE); // is added internal to engine::cv\n    engine::addParam(\"Shape\", &_shape, braids::MACRO_OSC_SHAPE_CSAW, braids::MACRO_OSC_SHAPE_LAST - 1, (const char **)braids::settings.metadata(braids::Setting::SETTING_OSCILLATOR_SHAPE).strings);\n    engine::addParam(\"Timbre\", &_timbre, 0, UINT16_MAX);\n    engine::addParam(\"Color\", &_color, 0, UINT16_MAX);\n    engine::addParam(\"Decay\", &_decay, 0, UINT16_MAX);\n    engine::addParam(\"Stereo\", &_stereo, 0, UINT16_MAX);\n}\n\nchar color_vals[64];\n\nvoid engine::process()\n{\n    if (last_shape != _shape || last_qz != engine::qz())\n    {\n        last_qz = engine::qz();\n        last_shape = _shape;\n        engine::draw();\n    }\n\n    envelope.Update(0, _decay / 512);\n\n    if (engine::trig())\n    {\n        osc1.Strike();\n        osc2.Strike();\n        envelope.Trigger(braids::ENV_SEGMENT_ATTACK);\n    }\n\n    if (engine::gate())\n    {\n        // Not working witch Attack > 0\n        // envelope.Trigger(braids::ENV_SEGMENT_DECAY);\n    }\n\n    uint32_t ad_value = envelope.Render();\n\n    int32_t pitch = engine::cv_i32();\n    pitch += DEFAULT_PITCH;\n\n    // if (!settings.meta_modulation())\n    // {\n    //     pitch += settings.adc_to_fm(adc_3);\n    // }\n\n    pitch += jitter_source.Render(braids::settings.vco_drift());\n    pitch += ad_value * braids::settings.GetValue(braids::SETTING_AD_FM) >> 7;\n\n    CONSTRAIN(pitch, 0, 16383);\n\n    if (braids::settings.vco_flatten())\n        pitch = stmlib::Interpolate88(braids::lut_vco_detune, pitch << 2);\n\n    uint32_t gain = _decay < UINT16_MAX ? ad_value : UINT16_MAX;\n\n    if (!engine::hasTrig())\n        gain = _decay; // No Trigger patched - use Decay as VCA...\n\n    if ((engine::t() % 12) != 0)\n        osc1.set_shape((braids::MacroOscillatorShape)_shape);\n    else if ((engine::t() % 12) != 6)\n        osc2.set_shape((braids::MacroOscillatorShape)_shape);\n\n    osc1.set_parameters(_timbre >> 1, _color >> 1);\n\n    if (_shape >= 48 && _shape < (48 + 5) && engine::qz() > 0)\n    {\n        if (engine::qz() == 1)\n        {\n            if (last_color != _color)\n            {\n                last_color = _color;\n                chords_.set_chord((float)_color / (plaits::kChordNumChords - 1));\n                // chords_.Sort();\n                memset(braids::ex_chord, 0, sizeof(braids::ex_chord));\n                for (int i = 0; i < chords_.num_notes(); i++)\n                {\n                    braids::ex_chord[i] = log2f(chords_.ratio(i)) * 12;\n                }\n\n                braids::custom_chord = braids::ex_chord;\n            }\n        }\n        else\n        {\n            osc1.set_parameters(_timbre >> 1, _color << 12);\n            braids::custom_chord = nullptr;\n        }\n    }\n\n    osc1.set_pitch(pitch);\n\n    osc1.Render(sync_samples, _out_l, FRAME_BUFFER_SIZE);\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        _out_l[i] = (gain * _out_l[i]) / UINT16_MAX;\n\n    if (_stereo > 0) // Stereo\n    {\n        const int32_t f = _stereo >> 8;\n        int32_t stereo = (f * f * f) / (255 * 255);\n\n        int32_t timbre = _timbre + stereo;\n        if (timbre > UINT16_MAX)\n            timbre = _timbre - stereo;\n\n        int32_t color = _color + stereo;\n        if (color > UINT16_MAX)\n            color = _color - stereo;\n\n        osc2.set_parameters(osc1.parameter_[0], osc1.parameter_[1]);\n        osc2.set_pitch(pitch + stereo);\n\n        osc2.Render(sync_samples, _out_r, FRAME_BUFFER_SIZE);\n\n        for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n            _out_r[i] = (gain * _out_r[i]) / UINT16_MAX;\n    }\n    else\n    {\n        memcpy(_out_r, _out_l, FRAME_BUFFER_SIZE * sizeof(int16_t));\n    }\n}\n\nvoid engine::draw()\n{\n    if (_shape >= 48 && _shape < (48 + 5) && engine::qz() > 0)\n    {\n        if (engine::qz() == 1)\n        {\n            engine::addParam(\".\", &_color, 0, plaits::kChordNumChords - 1, (const char **)plaits::chord_names);\n        }\n        else\n        {\n            char *p = color_vals;\n            p += sprintf(p, \"Chord-%d\\t1\", _color + 1);\n            for (int i = 1; i < LEN_OF(braids::diatonic_chords[_color]); i++)\n            {\n                if (braids::diatonic_chords[_color][i] != 0)\n                {\n                    p += sprintf(p, \"+%d\", 1 + braids::diatonic_chords[_color][i]);\n                }\n            }\n\n            engine::addParam(\"Color\", &_color, 0, 7);\n            engine::setParamName(&_color, color_vals);\n        }\n    }\n    else\n    {\n        engine::addParam(\"Color\", &_color, 0, UINT16_MAX);\n    }\n\n    if (!engine::hasTrig())\n    {\n        engine::setParamName(&_decay, \"Level\");\n    }\n    else if (_decay < UINT16_MAX)\n    {\n        engine::setParamName(&_decay, \"Decay\");\n    }\n    else\n    {\n        engine::setParamName(&_decay, \"VCA-off\");\n    }\n}\n\n#include \"braids/analog_oscillator.cc\"\n#define kHighestNote kHighestNote2\n#define kPitchTableStart kPitchTableStart2\n#define kOctave kOctave2\n#include \"braids/digital_oscillator.cc\"\n#include \"braids/settings.cc\"\n#include \"braids/macro_oscillator.cc\"\n#include \"braids/resources.cc\"\n#include \"stmlib/utils/random.cc\"\n\n#define chords chords2\n#define mini_wave_line mini_wave_line2\n#include \"braids/chords_stack.cc\"\n"
  },
  {
    "path": "src/MIDI/Clock.cpp",
    "content": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=soft -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n#include <algorithm>\n\nstatic int32_t bpm = 120;\nstatic int32_t ppqn = 0;\nstatic const char *ppqn_names[]{\n    \"4ppqn\", \"8ppqn\", \"24ppqn\"};\nstatic int32_t offset = 0;\nstatic int32_t impulse = 1;\nstatic int count_down = 0;\nstatic uint32_t next = UINT32_MAX;\nstatic uint32_t last_t = 0;\nint16_t* out_clk;\nint16_t* out_reset;\n\nvoid engine::setup()\n{\n    // 24, 8 or 4 ppqn\n    bpm = 120; // machine::midi_bpm() / 100;\n    engine::addParam(\"@BPM\\n%d\", &bpm, 60, 250);\n    engine::addParam(\"@MODE\\n%s\", &ppqn, 0, 2, ppqn_names);\n    engine::addParam(\"@Impulse\\n%dms\", &impulse, 1, 5);\n    engine::addParam(\"@Offset\\n%dms\", &offset, 0, 127);\n\n    out_clk = engine::outputBuffer_i16(OUT_TRIG \"CLK\");\n    out_reset = engine::outputBuffer_i16(OUT_TRIG \"RST\");\n}\n\nuint8_t last_clk = 0;\nuint8_t clk_change(uint8_t clk)\n{\n    if (last_clk != clk)\n    {\n        last_clk = clk;\n        return last_clk;\n    }\n    else\n        return 0;\n}\n\nvoid engine::process()\n{\n    bpm = engine_sync::clk_bpm() / 100;\n    uint8_t clk = clk_change(engine_sync::ppn());\n\n    if (clk)\n        last_t = engine::t();\n\n    uint32_t div = ppqn == 0 ? 6 : (ppqn == 1 ? 3 : 1);\n\n    if ((clk % div) == 1 || (ppqn > 1 && clk))\n    {\n        next = engine::t() + (offset * 2);\n    }\n\n    if (engine::t() == next)\n    {\n        next = UINT32_MAX;\n        count_down = (impulse * 2);\n    }\n\n    int16_t a = count_down-- > 0 ? (5 * PITCH_PER_OCTAVE) : 0;\n    std::fill_n(out_clk, FRAME_BUFFER_SIZE, a);\n    std::fill_n(out_reset, FRAME_BUFFER_SIZE, clk == engine_sync::CLOCK_RESET ? (5 * PITCH_PER_OCTAVE) : 0);\n}\n\nvoid engine::draw()\n{\n}\n"
  },
  {
    "path": "src/MIDI/Monitor.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n#include \"../lib/stmlib/algorithms/voice_allocator.h\"\n\nstatic uint8_t voice[4] = {};\nstatic uint8_t velocity[4] = {};\nstatic stmlib::VoiceAllocator<LEN_OF(voice)> allocator = {};\nstatic int16_t pitch = 0;\nstatic uint8_t cc[128] = {};\n\nvoid engine::setup()\n{\n    allocator.Init();\n    allocator.set_size(LEN_OF(voice));\n    engine::setMode(ENGINE_MODE_MIDI_IN);\n    for (auto &c : cc)\n        c = 0xFF;\n}\n\nvoid engine::process()\n{\n}\n\nvoid engine::draw()\n{\n    gfx::drawString(1, 12, \"VOICE KEY VEL\", 0);\n    gfx::drawString(66, 12, \"CONTROL\", 0);\n\n    for (int x = 0; x < 128; x += 3)\n        gfx::setPixel(x, 18);\n\n    char tmp[30];\n    for (size_t i = 0; i < LEN_OF(voice); i++)\n    {\n        sprintf(tmp, \"#%ld\", i);\n        gfx::drawString(2, 20 + i * 6, tmp, 0);\n        sprintf(tmp, \"%4d\", voice[i]);\n        gfx::drawString(27, 20 + i * 6, tmp, 0);\n        sprintf(tmp, \"%4d\", velocity[i]);\n        gfx::drawString(46, 20 + i * 6, tmp, 0);\n    }\n\n    for (int y = 12; y < 60; y += 3)\n        gfx::setPixel(64, y);\n\n    int bpm = engine_sync::clk_bpm();\n    int bpm2 = ((bpm % 100) / 10);\n    sprintf(tmp, \"clock: %3d.%d\", bpm / 100, bpm2);\n    gfx::drawString(66, 20, tmp, 0);\n\n    sprintf(tmp, \"pitch: %4d\", pitch);\n    gfx::drawString(66, 26, tmp, 0);\n\n    int y = 32;\n    for (int i = 0; i < 128; i++)\n    {\n        if (cc[i] < 0xFF)\n        {\n            sprintf(tmp, \"cc-%d: %4d\", i, cc[i]);\n            gfx::drawString(66, y, tmp, 0);\n            y += 6;\n        }\n    }\n}\n\nvoid engine::onMidiNote(uint8_t key, uint8_t vel) // NoteOff: velocity == 0\n{\n    if (vel > 0)\n    {\n        auto ni = allocator.NoteOn(key);\n        voice[ni] = key;\n        velocity[ni] = vel;\n    }\n    else\n    {\n        auto ni = allocator.NoteOff(key);\n        voice[ni] = 0;\n    }\n}\n\nvoid engine::onMidiPitchbend(int16_t value)\n{\n    pitch = value;\n}\n\nvoid engine::onMidiCC(uint8_t ccc, uint8_t value)\n{\n    cc[ccc % 128] = value;\n}\n\nvoid engine::onMidiSysex(uint8_t byte)\n{\n}\n\nvoid engine::onMidiRTM(uint8_t code)\n{\n}"
  },
  {
    "path": "src/MIDI/VAx6.cpp",
    "content": "// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n\n// #include \"../lib/plaits/dsp/engine/virtual_analog_engine.h\"\n// no virtual functions hack \n\n#define PLAITS_DSP_ENGINE_VIRTUAL_ANALOG_ENGINE_H_\n\n#include \"plaits/dsp/engine/engine.h\"\n#include \"plaits/dsp/oscillator/variable_saw_oscillator.h\"\n#include \"plaits/dsp/oscillator/variable_shape_oscillator.h\"\n\n#define VA_VARIANT 2\n\nnamespace plaits\n{\n    class VirtualAnalogEngine\n    {\n    public:\n        VirtualAnalogEngine() {}\n        ~VirtualAnalogEngine() {}\n\n        void Init(stmlib::BufferAllocator *allocator);\n        void Reset();\n        void LoadUserData(const uint8_t *user_data) {}\n        void Render(const EngineParameters &parameters,\n                    float *out,\n                    float *aux,\n                    size_t size,\n                    bool *already_enveloped);\n\n    private:\n        float ComputeDetuning(float detune) const;\n\n        VariableShapeOscillator primary_;\n        VariableShapeOscillator auxiliary_;\n\n        VariableShapeOscillator sync_;\n        VariableSawOscillator variable_saw_;\n\n        float auxiliary_amount_;\n        float xmod_amount_;\n        float *temp_buffer_;\n\n        DISALLOW_COPY_AND_ASSIGN(VirtualAnalogEngine);\n    };\n\n} // namespace plaits\n\n#include \"../lib/plaits/dsp/envelope.h\"\n#include \"../lib/stmlib/algorithms/voice_allocator.h\"\n#include \"../lib/stmlib/utils/random.h\"\n\n#include \"stmlib/dsp/units.cc\"\n#include \"stmlib/utils/random.cc\"\n#include \"../lib/plaits/dsp/engine/virtual_analog_engine.cc\"\n\nplaits::VirtualAnalogEngine voice[6] = {};\n\nuint8_t buffer[LEN_OF(voice) * plaits::kMaxBlockSize * sizeof(float)] = {};\nplaits::EngineParameters parameters[LEN_OF(voice)] = {};\nplaits::LPGEnvelope lpg[LEN_OF(voice)] = {};\nbool enveloped[LEN_OF(voice)] = {};\n\nstmlib::VoiceAllocator<LEN_OF(voice)> allocator;\n\nfloat timbre = 0.5f;\nfloat morph = 0.5f;\nfloat harmonics = 0.5f;\nfloat pitch = 0;\nfloat pitch_bend = 0;\n\nfloat decay = 0.5f;\nfloat hf = 1.f;\nfloat pan[LEN_OF(voice)] = {};\nfloat stereo = 0.5f;\n\nfloat voiceBuff[FRAME_BUFFER_SIZE] = {};\nfloat dummy[FRAME_BUFFER_SIZE] = {};\n\nvoid engine::setup()\n{\n    allocator.Init();\n    allocator.set_size(LEN_OF(voice));\n    engine::addParam(V_OCT, &pitch);\n    engine::addParam(\"Harmo\", &harmonics);\n    engine::addParam(\"Timbre\", &timbre);\n    engine::addParam(\"Morph\", &morph);\n    engine::addParam(\"Decay\", &decay);\n    engine::addParam(\"Stereo\", &stereo);\n    engine::setMode(ENGINE_MODE_MIDI_IN);\n    stmlib::BufferAllocator buffAllocator;\n    buffAllocator.Init(buffer, sizeof(buffer));\n\n    for (size_t i = 0; i < LEN_OF(voice); i++)\n    {\n        lpg[i].Init();\n        voice[i].Init(&buffAllocator);\n    }\n}\n\nvoid engine::process()\n{\n    auto polyBuffL = engine::outputBuffer<0>();\n    auto polyBuffR = engine::outputBuffer<1>();\n\n    std::fill_n(polyBuffL, FRAME_BUFFER_SIZE, 0);\n    std::fill_n(polyBuffR, FRAME_BUFFER_SIZE, 0);\n\n    const float short_decay = (200.0f * FRAME_BUFFER_SIZE) / SAMPLE_RATE *\n                              stmlib::SemitonesToRatio(-96.0f * decay);\n\n    const float decay_tail = (20.0f * FRAME_BUFFER_SIZE) / SAMPLE_RATE *\n                                 stmlib::SemitonesToRatio(-72.0f * decay + 12.0f * hf) -\n                             short_decay;\n\n    for (size_t i = 0; i < LEN_OF(voice); i++)\n    {\n        auto p = parameters[i];\n        p.note += (pitch * 12.f) + pitch_bend;\n        p.timbre = timbre;\n        p.morph = morph;\n        p.harmonics = harmonics;\n\n        voice[i].Render(p, voiceBuff, dummy, FRAME_BUFFER_SIZE, &enveloped[i]);\n\n        lpg[i].ProcessPing(0.5f, short_decay, decay_tail, hf);\n\n        float l = cosf(pan[i] * M_PI / 2);\n        float r = sinf(pan[i] * M_PI / 2);\n\n        for (int s = 0; s < FRAME_BUFFER_SIZE; s++)\n        {\n            polyBuffL[s] += (voiceBuff[s] * lpg[i].gain()) * l;\n            polyBuffR[s] += (voiceBuff[s] * lpg[i].gain()) * r;\n        }\n\n        parameters[i].trigger = plaits::TriggerState::TRIGGER_LOW;\n    }\n}\n\nvoid engine::draw()\n{\n}\n\nvoid engine::onMidiNote(uint8_t key, uint8_t velocity) // NoteOff: velocity == 0\n{\n    if (velocity > 0)\n    {\n        auto ni = allocator.NoteOn(key);\n        parameters[ni].trigger = plaits::TriggerState::TRIGGER_RISING_EDGE;\n        parameters[ni].note = key;\n        parameters[ni].accent = velocity > 100;\n\n        pan[ni] = 0.5f + stereo * (stmlib::Random::GetFloat() - 0.5f);\n\n        lpg[ni].Trigger();\n    }\n    else\n    {\n        allocator.NoteOff(key);\n    }\n}\n\nvoid engine::onMidiPitchbend(int16_t pitch)\n{\n    pitch_bend = ((float)pitch / 8192) * 12;\n}\n\nvoid engine::onMidiCC(uint8_t ccc, uint8_t value)\n{\n    // nothing implemented..\n}\n\nvoid engine::onMidiSysex(uint8_t byte)\n{\n}\n\nvoid engine::onMidiRTM(uint8_t code)\n{\n}"
  },
  {
    "path": "src/NOISE/808_squares.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"misc/nes_noise.hxx\"\n#include \"stmlib/dsp/filter.h\"\n\nclass SquareOscillator\n{\npublic:\n    inline void reset()\n    {\n        phase_ = 0.5f;\n    }\n\n    inline void freq(float freq)\n    {\n        phase_inc_ = freq / SAMPLE_RATE;\n    }\n\n    inline void duty(float duty)\n    {\n        pw_ = duty;\n    }\n\n    // float fm = 2.f;\n    // float fm_amp = 0.05f;\n    // float fm_phase = 0.5f;\n\n    inline void process(float &out2)\n    {\n        float out = phase_ < pw_ ? 1.f : -1.f;\n\n        // float fm_ = stmlib::Interpolate(plaits::lut_sine, fm_phase, 1024.0f) * fm_amp;\n        // fm_phase += phase_inc_ / fm;\n        // if (fm_phase > 1.0f)\n        //     fm_phase -= 1.00f;\n\n        phase_ += phase_inc_; // * (1.f + fm_);\n        if (phase_ > 1.0f)\n            phase_ -= 1.00f;\n\n        out2 += out;\n    }\n\nprivate:\n    float phase_ = 0.5f;\n    float phase_inc_ = 0;\n    float pw_ = 0.5f;\n};\n\nSquareOscillator _osc[6] = {};\nstmlib::DCBlocker _dc_blocker;\nfloat f = 1.f;\nfloat f0 = 540;\nfloat f1 = 800;\nfloat gain = 1.f;\nfloat duty = 0.5f;\nint32_t n = 6;\n\nvoid update_oscillators()\n{\n    // 119, 176, 214, 303, 363, 666\n    // 205.3, 369.6, 404.4, 522.7, 359.4–1149.9, and 254.3–627.2 Hz\n    constexpr float _808[] = {540, 800, 205.3f, 369.6f, 404.4f, 522.7f};\n\n    _osc[0].freq(f0 * f);\n    _osc[1].freq(f1 * f);\n    for (size_t i = 2; i < 6; i++)\n        _osc[i].freq(_808[i] * f);\n}\n\nvoid engine::setup()\n{\n    _dc_blocker.Init(0.999f);\n\n    engine::addParam(\"Level\", &gain);\n    engine::addParam(\"@N\", &n, 2, 6);\n    engine::addParam(\"F0\", &f0, 254.3f, 627.2f);\n    engine::addParam(\"F1\", &f1, 359.4f, 1149.9f);\n    update_oscillators();\n}\n\nvoid engine::process()\n{\n    float cv = engine::cv();\n    auto buffer = engine::outputBuffer<0>();\n\n    f = powf(2.f, cv);\n    update_oscillators();\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        buffer[i] = 0;\n        for (size_t j = 0; j < n; j++)\n        {\n            _osc[j].process(buffer[i]);\n        }\n        buffer[i] *= gain / n;\n    }\n\n    _dc_blocker.Process(&buffer[0], FRAME_BUFFER_SIZE);\n}\n"
  },
  {
    "path": "src/NOISE/NES.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"misc/nes_noise.hxx\"\n#include \"stmlib/dsp/filter.h\"\n\nstatic NESNoise _nes_noise;\nstatic stmlib::DCBlocker _dc_blocker;\nstatic const int32_t max_level = 15;\nstatic int32_t gain = max_level;\nstatic int32_t period_index = _nes_noise.period_index;\nstatic int32_t mode_bit = _nes_noise.mode_bit;\n\nvoid engine::setup()\n{\n    engine::addParam(\"@Level\", &gain, 0, max_level);\n    engine::addParam(\"@Period\", &period_index, 0, 15);\n    engine::addParam(\"@ModeBit\", &mode_bit, 0, 1);\n\n    _nes_noise.init(1);\n    _dc_blocker.Init(0.999f);\n}\n\nvoid engine::process()\n{\n    _nes_noise.period_index = period_index;\n    _nes_noise.mode_bit = mode_bit;\n    \n    auto buffer = engine::outputBuffer<0>();\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        buffer[i] = _nes_noise.generateSample(1.f / max_level) * gain;\n    }\n\n    _dc_blocker.Process(&buffer[0], FRAME_BUFFER_SIZE);\n}\n\nvoid engine::draw()\n{\n    gfx::drawRect(75, 37, 47, 14);\n\n    for (size_t bit = 0; bit < 15; bit++)\n    {\n        if ((_nes_noise.shift_reg & (1 << bit)) != 0)\n            gfx::fillRect(76 + (bit * 3), 38, 3, 12);\n    }\n}"
  },
  {
    "path": "src/NOISE/WhitePink.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// ENGINE_NAME:NOISE/WhitePink\n\n#include \"../squares-and-circles-api.h\"\n#include \"misc/noise.hxx\"\n\nconst char *modes[3] = {\">White\", \">Pink\", \">Brown\"};\nPinkNoise<> pinkL;\nPinkNoise<> pinkR;\nBrownNoise brownL;\nBrownNoise brownR;\nfloat gain = 1.f;\nint32_t mode = 0;\nfloat stereo = 0.f;\n\nvoid engine::setup()\n{\n    engine::addParam(\"Level\", &gain);\n    engine::addParam(\"@Mode\", &mode, 0, LEN_OF(modes) - 1, modes);\n    engine::addParam(\"Stereo\", &stereo);\n\n    brownL.init();\n    brownR.init();\n}\nvoid engine::process()\n{\n    auto bufferL = engine::outputBuffer<0>();\n    auto bufferR = engine::outputBuffer<1>();\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        switch (mode)\n        {\n        case 0:\n            bufferL[i] = pinkL.white.nextf(-1.f, 1.f) * gain;\n            bufferR[i] = pinkR.white.nextf(-1.f, 1.f) * gain;\n            break;\n        case 1:\n            bufferL[i] = pinkL.nextf(-1.f, 1.f) * gain;\n            bufferR[i] = pinkR.nextf(-1.f, 1.f) * gain;\n            break;\n        case 2:\n            bufferL[i] = brownL.nextf(-1.f, 1.f) * gain;\n            bufferR[i] = brownR.nextf(-1.f, 1.f) * gain;\n            break;\n        }\n\n        float tmp = (bufferL[i] + bufferR[i]) / 2.f * (1 - stereo);\n\n        bufferL[i] = bufferL[i] * stereo + tmp;\n        bufferR[i] = bufferR[i] * stereo + tmp;\n    }\n}"
  },
  {
    "path": "src/SEQ/303-Patterns.cpp",
    "content": "\n// Copyright (C)2021 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// xbuild_flags: -fno-inline -mfloat-abi=hard -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n#include \"../lib/stmlib/utils/dsp.h\"\n#include \"../lib/misc/noise.hxx\"\n#include \"../lib/misc/patterns_303.h\"\n#include <algorithm>\n\nuint8_t seq_pos = UINT8_MAX;\n\nint32_t pattern_select = 2;\nint32_t pattern_shift = 0;\nint32_t pattern_len = 16;\nint32_t gate_len = 3; // https://www.firstpr.com.au/rwi/dfish/303-slide.html\n\nint16_t *out_gate;\nint16_t *out_voct;\nint16_t *out_accent;\nint16_t *out_slide;\n\n// https://xbm.jazzychad.net/\nconst uint8_t xmb_note_6x8[8] = {0xc8, 0xd8, 0xe8, 0xd8, 0xe8, 0xce, 0xcf, 0xc6};\nconst uint8_t xmb_rest_6x8[8] = {0xd6, 0xde, 0xd0, 0xd6, 0xde, 0xd0, 0xd0, 0xd0};\n\nconst uint8_t xmb_arrow_up_5x6[6] = {0xe4, 0xee, 0xff, 0xe4, 0xe4, 0xe4};\nconst uint8_t xmb_arrow_dn_5x6[6] = {0xe4, 0xe4, 0xe4, 0xf5, 0xee, 0xe4};\nconst uint8_t xmb_circle_7x7[7] = {0x9c, 0xa2, 0xc1, 0xc1, 0xc1, 0xa2, 0x9c};\nconst uint8_t xmb_filled_circle_7x7[7] = {0x80, 0x88, 0x9c, 0xbe, 0x9c, 0x88, 0x80};\n\nuint8_t pattern[16];\n\nint32_t last_val[4] = {-1, -1, -1, -1};\n\ninline int32_t note_to_voct(uint8_t note)\n{\n    int32_t tmp = ((int32_t)(note & NOTE_MASK) - C4);\n    tmp *= (PITCH_PER_OCTAVE / 12);\n    return tmp;\n}\n\ninline uint8_t voct_to_note(int32_t voct)\n{\n    return C4 + voct / (PITCH_PER_OCTAVE / 12);\n}\n\ninline uint8_t &pattern_at(int pos)\n{\n    pos %= pattern_len;\n    pos += 16 - engine::getParamValueModulated_i32(&pattern_shift);\n    return pattern[pos % LEN_OF(pattern)];\n}\n\nvoid engine::setup()\n{\n    engine::addParam(\"#PAT\", &pattern_select, 0, LEN_OF(x0xb0x_patterns) - 1);\n    engine::addParam(\"#SHFT\", &pattern_shift, -16, 16);\n    engine::addParam(\"#LEN\", &pattern_len, 0, 16);\n    engine::addParam(\"#GATE\", &gate_len, 1, 6);\n\n    out_gate = engine::outputBuffer_i16(OUT_GATE);\n    out_accent = engine::outputBuffer_i16(OUT_ACCENT);\n    out_slide = engine::outputBuffer_i16(\"SLIDE\");\n    out_voct = engine::outputBuffer_i16(OUT_VOCT);\n}\n\nuint32_t phase_;\nuint32_t phase_inc = 0;\n\nuint32_t t_ = 0;\nuint32_t gate_until_t = 0;\nint32_t last_pattern_select = -1;\nuint8_t curr_note, prev_note = 0;\n\nint16_t _gate = 0;\nint16_t _acc = 0;\nint16_t _slide = 0;\nint32_t _voct = 0.f;\n\nvoid engine::process()\n{\n    if(pattern_len == 0)\n    {\n        std::fill_n(out_gate, FRAME_BUFFER_SIZE, 0);\n        std::fill_n(out_voct, FRAME_BUFFER_SIZE, 0);\n        std::fill_n(out_accent, FRAME_BUFFER_SIZE, 0);\n        std::fill_n(out_slide, FRAME_BUFFER_SIZE, 0);\n        return;\n    }\n\n    if (pattern_shift < 0)\n        pattern_shift += 16;\n    else if (pattern_shift >= 16)\n        pattern_shift -= 16;\n\n    if (pattern_select != last_pattern_select)\n    {\n        last_pattern_select = pattern_select;\n        memcpy(pattern, x0xb0x_patterns[pattern_select], sizeof(pattern));\n        size_t l = 0;\n        for (l = 0; l < LEN_OF(pattern); l++)\n            if (pattern[l] == 0xff)\n                break;\n\n        for (size_t i = l; i < LEN_OF(pattern); i++)\n            pattern[i] = pattern[i - l];\n    }\n\n    if (engine_sync::stepChanged())\n    {\n        seq_pos = engine_sync::step() % pattern_len;\n\n        prev_note = curr_note;\n        curr_note = pattern_at(seq_pos);\n\n        phase_ = UINT32_MAX;\n\n        float n = 1 + (engine::t() - t_);\n        gate_until_t = n * (float)gate_len / 6;\n        t_ = engine::t();\n    }\n\n    if (prev_note & SLIDE)\n    {\n        auto cv = engine::qz_process(note_to_voct(curr_note));\n        float delta = (cv - _voct);\n        CONSTRAIN(delta, -PITCH_PER_OCTAVE, PITCH_PER_OCTAVE);\n        _voct += delta / 100;\n\n        _slide = 5 * PITCH_PER_OCTAVE;\n    }\n    else\n    {\n        _slide = 0;\n        _voct = engine::qz_process(note_to_voct(curr_note));\n    }\n\n    if (((curr_note & NOTE_MASK) && gate_until_t > 0) || (curr_note & SLIDE))\n        _gate = 5 * PITCH_PER_OCTAVE;\n    else\n        _gate = 0;\n\n    if (curr_note & ACCENT)\n        _acc = 5 * PITCH_PER_OCTAVE;\n    else\n        _acc = 0;\n\n    if (gate_until_t > 0)\n        --gate_until_t;\n\n    auto voct = engine::cv_i32() + _voct + (2 * PITCH_PER_OCTAVE);\n\n    std::fill_n(out_gate, FRAME_BUFFER_SIZE, _gate);\n    std::fill_n(out_voct, FRAME_BUFFER_SIZE, voct);\n    std::fill_n(out_accent, FRAME_BUFFER_SIZE, _acc);\n    std::fill_n(out_slide, FRAME_BUFFER_SIZE, (curr_note & SLIDE) ? (5 * PITCH_PER_OCTAVE) : 0);\n}\n\nchar tmp[16];\nvoid engine::draw()\n{\n    uint8_t cur_pos = engine_sync::ppn() ? seq_pos : -1;\n\n    auto len_mod = engine::getParamValueModulated_i32(&pattern_len);\n    for (int i = 0, r = 0; r < 4 && i < len_mod; r++)\n    {\n        for (int k = 0; k < 8 && i < len_mod; k++)\n        {\n            int x = 24 + (k * 10) + (k < 1 ? 1 : 1);\n            int y = 0 + 13 + (r * 10) + (len_mod <= 8 ? 5 : 0);\n\n            int r = 4;\n            if (pattern_at((len_mod + i - 1) % len_mod) & SLIDE)\n                gfx::drawCircle(x + r, y + r, r);\n            else if (pattern_at(i) & NOTE_MASK)\n            {\n                gfx::drawCircle(x + r, y + r, r);\n                if (i != cur_pos)\n                    gfx::fillCircle(x + r, y + r, r);\n            }\n            else\n                gfx::fillRect(x + 1, y + r - 1, r + r - 1, 3);\n\n            if (i == cur_pos)\n            {\n                gfx::drawCircle(x + r, y + r, r - 1);\n            }\n\n            i++;\n        }\n    }\n\n    int y = 35 + 8;\n\n    gfx::drawPiano(24, y, (float)_voct / PITCH_PER_OCTAVE);\n\n    y -= 1;\n\n    if (curr_note == 0)\n        gfx::drawXbm(62 + 10, y - 1, 6, 8, xmb_rest_6x8);\n    else\n        gfx::drawXbm(62 + 10, y - 1, 6, 8, xmb_note_6x8);\n\n    if (curr_note & SLIDE)\n        gfx::drawString(62 + 16, y, \"-S\");\n\n    if (curr_note & ACCENT)\n        gfx::drawString(62 + 16, y, \"  -A\");\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    engine::draw();\n}"
  },
  {
    "path": "src/SEQ/EuclidArp.cpp",
    "content": "\n// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n#include \"lib/misc/euclidean.h\"\n#include \"lib/misc/patterns_303.h\"\n\n#include <algorithm>\n#include <math.h>\n\n#include \"lib/plaits/dsp/engine2/arpeggiator.h\"\n#define private public\n#define SemitonesToRatioFast\n#include \"lib/plaits/dsp/chords/chord_bank.cc\"\n#include \"lib/stmlib/utils/random.cc\"\n\n#include \"lib/stmlib/utils/dsp.h\"\n\n#ifndef PEAKS_RESOURCES_H_\n#include \"lib/peaks/resources.cc\"\n#endif\n\n// This app is copiled with soft-fpu - for running on teensy3.2 & teensy 4.x\n\n/*\nhttps://www.nullhardware.com/blog/fixed-point-sine-and-cosine-for-embedded-systems/\n\nImplements the 5-order polynomial approximation to sin(x).\n@param i   angle (with 2^15 units/circle)\n@return    16 bit fixed point Sine value (4.12) (ie: +4096 = +1 & -4096 = -1)\n\nThe result is accurate to within +- 1 count. ie: +/-2.44e-4.\n*/\n\nint16_t fpsin(int16_t i)\n{\n    /* Convert (signed) input to a value between 0 and 8192. (8192 is pi/2, which is the region of the curve fit). */\n    /* ------------------------------------------------------------------- */\n    i <<= 1;\n    uint8_t c = i < 0; // set carry for output pos/neg\n\n    if (i == (i | 0x4000)) // flip input value to corresponding value in range [0..8192)\n        i = (1 << 15) - i;\n    i = (i & 0x7FFF) >> 1;\n    /* ------------------------------------------------------------------- */\n\n    /* The following section implements the formula:\n     = y * 2^-n * ( A1 - 2^(q-p)* y * 2^-n * y * 2^-n * [B1 - 2^-r * y * 2^-n * C1 * y]) * 2^(a-q)\n    Where the constants are defined as follows:\n    */\n    uint32_t A1 = 3370945099UL, B1 = 2746362156UL, C1 = 292421UL;\n    uint32_t n = 13, p = 32, q = 31, r = 3, a = 12;\n\n    uint32_t y = (C1 * ((uint32_t)i)) >> n;\n    y = B1 - (((uint32_t)i * y) >> r);\n    y = (uint32_t)i * (y >> n);\n    y = (uint32_t)i * (y >> n);\n    y = A1 - (y >> (p - q));\n    y = (uint32_t)i * (y >> n);\n    y = (y + (1UL << (q - a - 1))) >> (q - a); // Rounding\n\n    return c ? -y : y;\n}\n\n// Cos(x) = sin(x + pi/2)\ninline int16_t fpcos(int16_t i)\n{\n    return fpsin((int16_t)(((uint16_t)(i)) + 8192U));\n}\n\n// https://xbm.jazzychad.net/\nconst uint8_t xmb_note_6x8[8] = {0xc8, 0xd8, 0xe8, 0xd8, 0xe8, 0xce, 0xcf, 0xc6};\nconst uint8_t xmb_rest_6x8[8] = {0xd6, 0xde, 0xd0, 0xd6, 0xde, 0xd0, 0xd0, 0xd0};\n\nconst uint8_t xmb_arrow_up_5x6[6] = {0xe4, 0xee, 0xff, 0xe4, 0xe4, 0xe4};\nconst uint8_t xmb_arrow_dn_5x6[6] = {0xe4, 0xe4, 0xe4, 0xf5, 0xee, 0xe4};\nconst uint8_t xmb_circle_7x7[7] = {0x9c, 0xa2, 0xc1, 0xc1, 0xc1, 0xa2, 0x9c};\nconst uint8_t xmb_filled_circle_7x7[7] = {0x9c, 0xa2, 0xdd, 0xdd, 0xdd, 0xa2, 0x9c};\nconst uint8_t xbm_play_11x11[] = {0x03, 0xf8, 0x0d, 0xf8, 0x31, 0xf8, 0xc1, 0xf8, 0x01, 0xfb, 0x01,\n                                  0xfc, 0x01, 0xfb, 0xc1, 0xf8, 0x31, 0xf8, 0x0d, 0xf8, 0x03, 0xf8};\nconst uint8_t xbm_stop_7x11[] = {0x80, 0xf7, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xf7, 0x80};\n\nint32_t len = 16;\nint32_t pulses = 4;\nint32_t rotate = 0;\nint32_t swing = 128;\n\nint16_t *out_gate;\nint16_t *out_cv;\n\nint32_t seq_pos = UINT8_MAX;\nbool playing = true;\nbool pre_start = false;\n\nvoid draw_eclid_cyrcle(int x, int y, uint8_t pattern[64], int _len, int rot, bool current_gate)\n{\n    auto pattern2 = pattern;\n\n    int xx = x;\n    int yy = y;\n\n    if (_len > 0 && (fpsin((INT16_MAX / (_len))) / 194) > 6)\n    {\n        gfx::drawCircle(xx + 3, 31 + 3, 21);\n\n        for (int i = 0; i < _len; i++)\n        {\n            int a = (INT16_MAX / (_len)) * i;\n\n            if (MOD(i, 2) == 1)\n                a += (-128 + swing) * (INT16_MAX / _len) / 6;\n\n            int x = fpsin(a) / 194;\n            int y = -fpcos(a) / 194;\n            x += xx;\n            y += yy;\n\n            gfx::clearCircle(x + 3, y + 3, 3);\n        }\n    }\n\n    for (int i = 0; i < _len; i++)\n    {\n        int a = (INT16_MAX / (_len)) * i;\n\n        if (MOD(i, 2) == 1)\n            a += (-128 + swing) * (INT16_MAX / _len) / 6;\n\n        int dx = fpsin(a);\n        int dy = -fpcos(a);\n\n        int x = xx + dx / 194;\n        int y = yy + dy / 194;\n\n        if (pattern[i] || pattern2[i])\n            gfx::fillRect(x + 2, y + 2, 3, 3); // gfx::drawXbm(x, y, 7, 7, xmb_filled_circle_7x7);\n\n        if (i == rot)\n            gfx::drawRect(x, y, 7, 7);\n        else\n            gfx::drawCircle(x + 3, y + 3, 3); //\n\n        bool cursor = i == MOD(seq_pos, _len);\n\n        if (cursor && !pre_start)\n            gfx::drawRect(x + 1, y + 1, 5, 5);\n    }\n\n    if (playing && pre_start && MOD(millis(), 300) > 150)\n    {\n    }\n    else\n    {\n        int x = xx - 2;\n        int y = 40 - 7;\n        if (current_gate) // pattern[seq_pos % _len] && (engine::clock() % 6) < 3\n        {\n            if (x < 64)\n                gfx::fillRect(x - 3, y - 7, 17, 17);\n            else\n                gfx::fillCircle(x + 5, y + 1, 8);\n        }\n        else\n        {\n            if (x < 64)\n                gfx::drawRect(x - 2, y - 7, 16, 16);\n            else\n                gfx::drawCircle(x + 5, y + 1, 8);\n        }\n    }\n}\n\nfloat arp_root = 0;\nint32_t mode = 0;\n\nint32_t chord = 0;\nplaits::Arpeggiator arpeggiator_;\nplaits::ChordBank chords_;\nint32_t\n    chords_mem[(plaits::kChordNumChords * plaits::kChordNumNotes) + plaits::kChordNumChords + plaits::kChordNumNotes];\n\nint32_t octaves = 1;\nint32_t _slide = 0;\n\nconst char *smodes[] = {\n    \"UP\",\n    \"DOWN\",\n    \"CYCLE\",\n    \"RAND\",\n};\n\nconst char *soctaves[] = {\n    \"1-OCT\",\n    \"2-OCT\",\n    \"3-OCT\",\n    \"4-OCT\",\n};\n\nconst char *slides[] = {\n    \"OFF\", \"ON\", \"RND25\", \"RND50\", \"RND75\",\n};\n\nvoid engine::setup()\n{\n    arpeggiator_.Init();\n    stmlib::BufferAllocator allocator;\n    allocator.Init(chords_mem, sizeof(chords_mem));\n    chords_.Init(&allocator);\n    chords_.chord_index_quantizer_.hysteresis_ = 0; // input => output\n    chords_.Reset();\n\n    engine::addParam(\"#LEN\", &len, 0, 20);\n    engine::addParam(V_OCT, &arp_root); // arp_root ist automatically added to engine::cv()\n    engine::addParam(\"#HIT\", &pulses, 0, 16);\n    engine::addParam(\"Mode\", &mode, 0, LEN_OF(smodes) - 1, smodes);\n    engine::addParam(\"#ROT\", &rotate, 0, 32);\n    engine::addParam(\"CHRD\", &chord, 0, plaits::kChordNumChords - 1, (const char **)plaits::chord_names);\n    engine::addParam(\"RNGE\", &octaves, 0, LEN_OF(soctaves) - 1, soctaves);\n    engine::addParam(\"SLIDE\", &_slide, 0, LEN_OF(slides) - 1, slides);\n\n    out_gate = engine::outputBuffer_i16(OUT_TRIG);\n    out_cv = engine::outputBuffer_i16(OUT_VOCT);\n}\n\nuint8_t pattern[64] = {};\nuint8_t patternCV[64] = {};\nuint8_t patternSlide[64] = {};\nint8_t scope[64] = {};\nint scope_pos = 0;\n\nint32_t gate_until_t = 0;\nstatic int32_t key = 1;\n\nint32_t _len = len;     // for mod vizualization\nint32_t _swing = swing; // for mod vizualization\n\nchar debug[128] = {};\n\nstatic int32_t _last_len = -1;\nstatic auto _last_pulses = pulses;\nstatic auto _last_rotate = rotate;\nstatic auto _last_mode = mode;\nstatic auto _last_octaves = octaves;\nstatic auto _last_chord = chord;\nstatic auto _last_slide = _slide;\nstatic uint32_t _slide_phase = UINT32_MAX;\nstatic uint32_t _slide_phase_inc = 0;\n\nfloat _last_cv = 0;\nfloat _cv = 0;\nfloat _cv_out = 0;\n\nvoid update_seq_pattern()\n{\n    _swing = swing;\n\n    if ((mode == plaits::ArpeggiatorMode::ARPEGGIATOR_MODE_RANDOM | _slide > 1) && engine_sync::stepChanged() &&\n        MOD(engine_sync::step(), len) == 0)\n        _last_mode = -1; // randomize!!!\n\n    if (_last_len != len || _last_pulses != pulses || _last_rotate != rotate || _last_mode != mode ||\n        _last_octaves != octaves || _last_chord != chord || _last_slide != _slide)\n    {\n        _last_len = len;\n        _last_pulses = pulses;\n        _last_rotate = rotate;\n        _last_mode = mode;\n        _last_octaves = octaves;\n        _last_chord = chord;\n        _last_slide = _slide;\n        pre_start = false;\n        _len = len;\n\n        make_pattern(pattern, len, pulses, rotate);\n\n        if (len == 16 && pulses == 16 && mode == plaits::ArpeggiatorMode::ARPEGGIATOR_MODE_RANDOM && chord == 0 &&\n            octaves == 0)\n        {\n            // Easter EGG ;-)\n            for (int i = 0; i < len; i++)\n            {\n                patternCV[(i + rotate) % 64] = DEFAULT_NOTE + ((da_funk[i] & NOTE_MASK) - C4) + 12;\n                patternSlide[(i + rotate) % 64] = (da_funk[i] & SLIDE);\n            }\n        }\n        else\n        {\n\n            arpeggiator_.set_mode((plaits::ArpeggiatorMode)(mode % plaits::ARPEGGIATOR_MODE_LAST));\n            arpeggiator_.set_range(1 + octaves);\n\n            chords_.set_chord((float)chord / (plaits::kChordNumChords - 1));\n            chords_.Sort();\n\n            bool first = true;\n            for (int i = 0; i < 64; i++)\n            {\n                patternSlide[(i + rotate) % 64] = 0;\n\n                if (pattern[(i + rotate) % 64])\n                {\n                    if (first)\n                    {\n                        first = false;\n                        arpeggiator_.Reset();\n                    }\n                    else\n                        arpeggiator_.Clock(chords_.num_notes());\n\n                    if (_slide == 2 && (rand() % 100) < 25)\n                        patternSlide[(i + rotate) % 64] = true;\n                    else if (_slide == 3 && (rand() % 100) < 50)\n                        patternSlide[(i + rotate) % 64] = true;\n                    else if (_slide == 4 && (rand() % 100) > 25)\n                        patternSlide[(i + rotate) % 64] = true;\n                }\n\n                const float octave = float(1 << arpeggiator_.octave());\n                const float ratio = chords_.sorted_ratio(arpeggiator_.note()) * octave;\n\n                patternCV[(i + rotate) % 64] = DEFAULT_NOTE + log2f(ratio) * 12;\n            }\n        }\n\n        for (int i = len; i < 64; i++)\n        {\n            pattern[i] = pattern[i - len];\n            patternCV[i] = patternCV[i - len];\n        }\n    }\n\n    if (len > 0 && engine_sync::stepChanged())\n    {\n        seq_pos = MOD(engine_sync::step(), len);\n\n        bool trig = pattern[seq_pos];\n\n        _cv = (float)(patternCV[seq_pos] - DEFAULT_NOTE) / 12;\n        _last_cv = (float)(patternCV[MOD(len + seq_pos - 1, len)] - DEFAULT_NOTE) / 12;\n\n        if (trig)\n        {\n            uint32_t n = (engine_sync::samples_per_step() / FRAME_BUFFER_SIZE) / 2;\n\n            // if (n > 50)\n            //     n = 0;\n\n            if (_slide == 1 || patternSlide[seq_pos])\n            {\n                // int m = n * 3;\n                // for (int i = seq_pos; !pattern[(i + 1) % _len]; i++)\n                //     m += n * 2;\n\n                _slide_phase = 0;\n                _slide_phase_inc = UINT32_MAX / n;\n                gate_until_t = INT32_MAX;\n            }\n            else\n            {\n                gate_until_t = n; // 10ms trigger\n            }\n            key++;\n        }\n    }\n}\n\nvoid engine::process()\n{\n    if (!playing)\n    {\n        gate_until_t = 0;\n        seq_pos = len - 1;\n        pre_start = true;\n        return;\n    }\n\n    update_seq_pattern();\n\n    int32_t trig = 0;\n\n    if (gate_until_t > 0)\n    {\n        --gate_until_t;\n        trig = 5 * PITCH_PER_OCTAVE; // 5V\n    }\n\n    if (_slide_phase < (UINT32_MAX - _slide_phase_inc))\n    {\n        float e = stmlib::Interpolate824(peaks::lut_env_expo, _slide_phase);\n        _slide_phase += _slide_phase_inc;\n        _cv_out = _last_cv + ((_cv - _last_cv) * (e / UINT16_MAX));\n    }\n    else\n    {\n        _cv_out = _cv;\n    }\n\n    _cv_out = (float)engine::qz_process(engine::cv_i32() + _cv_out * PITCH_PER_OCTAVE, nullptr) / PITCH_PER_OCTAVE;\n\n    if (engine::t() % 20 == 0)\n    {\n        scope[scope_pos++] = (engine::cv() + _cv_out) * 12;\n        if (scope_pos >= LEN_OF(scope))\n            scope_pos -= LEN_OF(scope);\n    }\n\n    std::fill_n(out_cv, FRAME_BUFFER_SIZE, _cv_out * PITCH_PER_OCTAVE);\n    std::fill_n(out_gate, FRAME_BUFFER_SIZE, trig);\n}\n\nvoid engine::draw()\n{\n    draw_eclid_cyrcle(36, 31, pattern, _last_len, _last_rotate, gate_until_t > 0);\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    draw_eclid_cyrcle(36 - 4, 31, pattern, _last_len, _last_rotate, gate_until_t > 0);\n\n    char tmp[64];\n    for (int i = 0; i < _last_len; i++)\n    {\n        sprintf(tmp, \"%d\", (int)((float)patternCV[i] + engine::cv() * 12));\n        gfx::drawString(64 + 15 * (i % 4) + 3, 12 + 10 * (i / 4) + 1, tmp, 0);\n        if (i == seq_pos)\n            gfx::drawRect(64 + 15 * (i % 4), 10 + 10 * (i / 4), 15, 10);\n    }\n\n    for (int i = 0; i < (LEN_OF(scope) - 1); i++)\n    {\n        int a = -(scope[(scope_pos + i) % LEN_OF(scope)] >> 3);\n        int b = -(scope[(scope_pos + i + 1) % LEN_OF(scope)] >> 3);\n        gfx::drawLine(64 + i, 32 + 24 + a, 64 + i + 1, 32 + 24 + b);\n    }\n}"
  },
  {
    "path": "src/SEQ/EuclidRythm.cpp",
    "content": "\n// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../lib/misc/euclidean.h\"\n#include \"../squares-and-circles-api.h\"\n#include <algorithm>\n#include <math.h>\n\n// build_flags: -fno-inline -mfloat-abi=soft -mfpu=fpv5-d16\n\n// This app is copiled with soft-fpu - for running on teensy3.2 & teensy 4.x\n\n/*\nhttps://www.nullhardware.com/blog/fixed-point-sine-and-cosine-for-embedded-systems/\n\nImplements the 5-order polynomial approximation to sin(x).\n@param i   angle (with 2^15 units/circle)\n@return    16 bit fixed point Sine value (4.12) (ie: +4096 = +1 & -4096 = -1)\n\nThe result is accurate to within +- 1 count. ie: +/-2.44e-4.\n*/\n\nint16_t fpsin(int16_t i)\n{\n    /* Convert (signed) input to a value between 0 and 8192. (8192 is pi/2, which is the region of the curve fit). */\n    /* ------------------------------------------------------------------- */\n    i <<= 1;\n    uint8_t c = i < 0; // set carry for output pos/neg\n\n    if (i == (i | 0x4000)) // flip input value to corresponding value in range [0..8192)\n        i = (1 << 15) - i;\n    i = (i & 0x7FFF) >> 1;\n    /* ------------------------------------------------------------------- */\n\n    /* The following section implements the formula:\n     = y * 2^-n * ( A1 - 2^(q-p)* y * 2^-n * y * 2^-n * [B1 - 2^-r * y * 2^-n * C1 * y]) * 2^(a-q)\n    Where the constants are defined as follows:\n    */\n    uint32_t A1 = 3370945099UL, B1 = 2746362156UL, C1 = 292421UL;\n    uint32_t n = 13, p = 32, q = 31, r = 3, a = 12;\n\n    uint32_t y = (C1 * ((uint32_t)i)) >> n;\n    y = B1 - (((uint32_t)i * y) >> r);\n    y = (uint32_t)i * (y >> n);\n    y = (uint32_t)i * (y >> n);\n    y = A1 - (y >> (p - q));\n    y = (uint32_t)i * (y >> n);\n    y = (y + (1UL << (q - a - 1))) >> (q - a); // Rounding\n\n    return c ? -y : y;\n}\n\n// Cos(x) = sin(x + pi/2)\ninline int16_t fpcos(int16_t i)\n{\n    return fpsin((int16_t)(((uint16_t)(i)) + 8192U));\n}\n\n// https://xbm.jazzychad.net/\nconst uint8_t xmb_note_6x8[8] = {0xc8, 0xd8, 0xe8, 0xd8, 0xe8, 0xce, 0xcf, 0xc6};\nconst uint8_t xmb_rest_6x8[8] = {0xd6, 0xde, 0xd0, 0xd6, 0xde, 0xd0, 0xd0, 0xd0};\n\nconst uint8_t xmb_arrow_up_5x6[6] = {0xe4, 0xee, 0xff, 0xe4, 0xe4, 0xe4};\nconst uint8_t xmb_arrow_dn_5x6[6] = {0xe4, 0xe4, 0xe4, 0xf5, 0xee, 0xe4};\nconst uint8_t xmb_circle_7x7[7] = {0x9c, 0xa2, 0xc1, 0xc1, 0xc1, 0xa2, 0x9c};\nconst uint8_t xmb_filled_circle_7x7[7] = {0x9c, 0xa2, 0xdd, 0xdd, 0xdd, 0xa2, 0x9c};\nconst uint8_t xbm_play_11x11[] = {0x03, 0xf8, 0x0d, 0xf8, 0x31, 0xf8, 0xc1, 0xf8, 0x01, 0xfb, 0x01,\n                                  0xfc, 0x01, 0xfb, 0xc1, 0xf8, 0x31, 0xf8, 0x0d, 0xf8, 0x03, 0xf8};\nconst uint8_t xbm_stop_7x11[] = {0x80, 0xf7, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xf7, 0x80};\n\nbool playing = true;\nbool pre_start = false;\nuint8_t seq_pos = UINT8_MAX;\nint32_t swing = 128;\n\nvoid draw_eclid_cyrcle(int x, int y, uint8_t pattern[64], int _len, int rot)\n{\n    auto pattern2 = pattern;\n\n    int xx = x;\n    int yy = y;\n\n    if (_len > 0 && (fpsin((INT16_MAX / (_len))) / 194) > 6)\n    {\n        gfx::drawCircle(xx + 3, 31 + 3, 21);\n\n        for (int i = 0; i < _len; i++)\n        {\n            int a = (INT16_MAX / (_len)) * i;\n\n            if (MOD(i, 2) == 1)\n                a += (-128 + swing) * (INT16_MAX / _len) / 6;\n\n            int x = fpsin(a) / 194;\n            int y = -fpcos(a) / 194;\n            x += xx;\n            y += yy;\n\n            gfx::clearCircle(x + 3, y + 3, 3);\n        }\n    }\n\n    for (int i = 0; i < _len; i++)\n    {\n        int a = (INT16_MAX / (_len)) * i;\n\n        if (MOD(i, 2) == 1)\n            a += (-128 + swing) * (INT16_MAX / _len) / 6;\n\n        int dx = fpsin(a);\n        int dy = -fpcos(a);\n\n        int x = xx + dx / 194;\n        int y = yy + dy / 194;\n\n        if (pattern[i] || pattern2[i])\n            gfx::fillRect(x + 2, y + 2, 3, 3); // gfx::drawXbm(x, y, 7, 7, xmb_filled_circle_7x7);\n\n        if (i == rot)\n            gfx::drawRect(x, y, 7, 7);\n        else\n            gfx::drawCircle(x + 3, y + 3, 3); //\n\n        bool cursor = i == MOD(seq_pos, _len);\n\n        if (cursor && !pre_start)\n            gfx::drawRect(x + 1, y + 1, 5, 5);\n    }\n\n    if (playing && pre_start && MOD(millis(), 300) > 150)\n    {\n    }\n    else\n    {\n        int x = xx - 2;\n        int y = 40 - 7;\n        if (_len > 0 && pattern[seq_pos % _len])\n        {\n            if (x < 64)\n                gfx::fillRect(x - 3, y - 7, 17, 17);\n            else\n                gfx::fillCircle(x + 5, y + 1, 8);\n        }\n        else\n        {\n            if (x < 64)\n                gfx::drawRect(x - 2, y - 7, 16, 16);\n            else\n                gfx::drawCircle(x + 5, y + 1, 8);\n        }\n    }\n}\n\nint32_t len = 16;\nint32_t pulses = 4;\nint32_t rotate = 0;\n\nint32_t lenB = 16;\nint32_t pulsesB = 4;\nint32_t rotateB = 0;\n\nint16_t *out_trig0;\nint16_t *out_trig1;\nint16_t *out_trig_or;\nint16_t *out_trig_and;\n\nvoid engine::setup()\n{\n    engine::addParam(\"#LEN\", &len, 0, 20);\n    engine::addParam(\"#LEN\", &lenB, 0, 20);\n    engine::addParam(\"#HIT\", &pulses, 0, 16);\n    engine::addParam(\"#HIT\", &pulsesB, 0, 16);\n    engine::addParam(\"#ROT\", &rotate, 0, 32);\n    engine::addParam(\"#ROT\", &rotateB, 0, 32);\n\n    out_trig0 = engine::outputBuffer_i16(OUT_TRIG \"1\");\n    out_trig1 = engine::outputBuffer_i16(OUT_TRIG \"2\");\n    out_trig_or = engine::outputBuffer_i16(OUT_TRIG \"S-OR\");\n    out_trig_and = engine::outputBuffer_i16(OUT_TRIG \"S-AND\");\n}\n\nuint8_t pattern[64] = {};\nuint8_t pattern2[64] = {};\n\nuint8_t gate_until_t = 0;\nuint8_t gate_until2_t = 0;\nuint8_t next_clock = 1;\n\nint hit1 = 0;\nint hit2 = 0;\n\nchar debug[128] = {};\n\nstatic int32_t _last_len = -1;\nstatic auto _last_pulses = pulses;\nstatic auto _last_rotate = rotate;\n\nstatic int32_t _last_lenB = -1;\nstatic auto _last_pulsesB = pulsesB;\nstatic auto _last_rotateB = rotateB;\n\nvoid update_seq_pattern()\n{\n    if (_last_len != len || _last_pulses != pulses || _last_rotate != rotate || _last_lenB != lenB ||\n        _last_pulsesB != pulsesB || _last_rotateB != rotateB)\n    {\n        _last_len = len;\n        _last_pulses = pulses;\n        _last_rotate = rotate;\n\n        _last_lenB = lenB;\n        _last_pulsesB = pulsesB;\n        _last_rotateB = rotateB;\n\n        pre_start = false;\n\n        make_pattern(pattern, len, pulses, rotate);\n        make_pattern(pattern2, lenB, pulsesB, rotateB);\n    }\n\n    if (engine_sync::stepChanged())\n    {\n        seq_pos = engine_sync::step();\n\n        bool trig = len > 0 ? pattern[seq_pos % len] : false;\n\n        if (trig)\n        {\n            hit1 = 64;\n            gate_until_t += 2; // 10ms trigger\n        }\n\n        bool trig2 = lenB > 0 ? pattern2[seq_pos % lenB] : false;\n        if (trig2)\n        {\n            hit2 = 64;\n            gate_until2_t += 2;\n        }\n    }\n}\n\nvoid engine::process()\n{\n    if (!playing)\n    {\n        gate_until_t = gate_until2_t = 0;\n        seq_pos = len - 1;\n        next_clock = 1;\n        pre_start = true;\n        return;\n    }\n\n    update_seq_pattern();\n\n    int32_t trig = 0;\n\n    if (gate_until_t > 0)\n    {\n        --gate_until_t;\n        trig = 5 * PITCH_PER_OCTAVE; // 5V\n    }\n\n    std::fill_n(out_trig0, FRAME_BUFFER_SIZE, trig);\n\n    trig = 0;\n    if (gate_until2_t > 0)\n    {\n        --gate_until2_t;\n        trig = 5 * PITCH_PER_OCTAVE; // 5V\n    }\n\n    std::fill_n(out_trig1, FRAME_BUFFER_SIZE, trig);\n\n    for (size_t i = 0; i < FRAME_BUFFER_SIZE; i++)\n    {\n        out_trig_or[i] = std::max(out_trig0[i], out_trig1[i]);\n        out_trig_and[i] = std::min(out_trig0[i], out_trig1[i]);\n    }\n}\n\nvoid engine::draw()\n{\n    char tmp[16];\n    sprintf(tmp, \"%02d\", engine_sync::step());\n    gfx::drawStringCenter(64, 12, tmp, 0);\n    draw_eclid_cyrcle(36, 31, pattern, _last_len, _last_rotate);\n    draw_eclid_cyrcle(36 + 49, 31, pattern2, _last_lenB, _last_rotateB);\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n    draw_eclid_cyrcle(36 - 4, 31, pattern, _last_len, _last_rotate);\n    draw_eclid_cyrcle(36 + 49 + 4, 31, pattern2, _last_lenB, _last_rotateB);\n}"
  },
  {
    "path": "src/SEQ/TuringMachine.cpp",
    "content": "// Copyright (C)2024 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// build_flags: -fno-inline -mfloat-abi=soft -mfpu=fpv5-d16\n\n#include \"../squares-and-circles-api.h\"\n#include <algorithm>\n\nstatic int32_t _turing_prob = 50;\nstatic int32_t _turing_length = 8;\nstatic uint8_t _turing_byte = 0;\nstatic int32_t _turing_shift_reg = 0x8000;\n\nstatic int32_t _pulse1 = 0;\nstatic int32_t _pulse2 = 15;\n\nint16_t *out_cv1;\nint16_t *out_cv2;\n\nstruct\n{\n    int32_t _shift_reg = 0;\n    int32_t _rng_seed = 20071204;\n} _reset_state;\n\nuint32_t _rng_state;\ninline void Seed(uint32_t seed)\n{\n    _rng_state = seed;\n}\n\ninline uint32_t Rand()\n{\n    _rng_state = _rng_state * 1664525L + 1013904223L;\n    return _rng_state;\n}\n\nconst char *pulse_modes[21] = {};\n\nint32_t note_from_scale(uint8_t bits)\n{\n    // origin:\n    // https://github.com/Chysn/O_C-HemisphereSuite/blob/893deeb27ecacddad638ff9180f244a411623e35/software/o_c_REV/enigma/EnigmaOutput.h#L104\n\n    uint8_t mask = 0;\n    for (uint8_t s = 0; s < bits; s++)\n        mask |= (0x01 << s);\n    int note_shift = bits == 7 ? 0 : 64; // Note types under 7-bit start at Middle C\n    int note_number = (_turing_byte & mask) + note_shift;\n    CONSTRAIN(note_number, 0, 127);\n    return engine::qz_lookup(note_number);\n}\n\nint32_t output(uint32_t mode, const char **name)\n{\n#define _OR(b) (((_turing_byte & b) != 0) ? INT16_MAX : 0);\n#define _AND(b) (((_turing_byte & b) == b) ? INT16_MAX : 0);\n    switch (mode)\n    {\n    case 0:\n    {\n        *name = \"Pulse:1\";\n        return _OR(0b10000000);\n    }\n    case 1:\n    {\n        *name = \"P:1+2\";\n        return _OR(0b11000000);\n    }\n    case 2:\n    {\n        *name = \"P:1&2\";\n        return _AND(0b11000000);\n    }\n    case 3:\n    {\n        *name = \"Pulse:2\";\n        return _OR(0b01000000);\n    }\n    case 4:\n    {\n        *name = \"P:2+4\";\n        return _OR(0b01010000);\n    }\n    case 5:\n    {\n        *name = \"P:2&4\";\n        return _AND(0b01010000);\n    }\n    case 6:\n    {\n        *name = \"Pulse:3\";\n        return _AND(0b00100000);\n    }\n    case 7:\n    {\n        *name = \"Pulse:4\";\n        return _AND(0b00010000);\n    }\n    case 8:\n    {\n        *name = \"Pulse:5\";\n        return _AND(0b00001000);\n    }\n    case 9:\n    {\n        *name = \"P:4+7\";\n        return _OR(0b00010010);\n    }\n    case 10:\n    {\n        *name = \"P:4&7\";\n        return _AND(0b00010010);\n    }\n    case 11:\n    {\n        *name = \"Pulse:6\";\n        return _AND(0b00000100);\n    }\n    case 12:\n    {\n        *name = \"P:+1247\";\n        return _OR(0b11010010);\n    }\n    case 13:\n    {\n        *name = \"P:&1247\";\n        return _AND(0b11010010);\n    }\n    case 14:\n    {\n        *name = \"Pulse:7\";\n        return _AND(0b00000010);\n    }\n    case 15:\n    {\n        *name = \"CV_5V\";\n        return (int32_t)_turing_byte * (5 * PITCH_PER_OCTAVE / 255);\n    }\n    case 16:\n    {\n        *name = \"NOTE-7\";\n        return note_from_scale(7);\n    }\n    case 17:\n    {\n        *name = \"NOTE-6\";\n        return note_from_scale(6);\n    }\n    case 18:\n    {\n        *name = \"NOTE-5\";\n        return note_from_scale(5);\n    }\n    case 19:\n    {\n        *name = \"NOTE-4\";\n        return note_from_scale(4);\n    }\n    case 20:\n    {\n        *name = \"NOTE-3\";\n        return note_from_scale(3);\n    }\n    case LEN_OF(pulse_modes):\n    {\n        break;\n    }\n    }\n\n    return 0;\n}\n\nvoid engine::setup()\n{\n    Seed(reinterpret_cast<uint32_t>(&_turing_shift_reg));\n\n    for (int i = 0; i < LEN_OF(pulse_modes); i++)\n        output(i, &pulse_modes[i]);\n\n    engine::addParam(\"@Prob\\n%d%%\", &_turing_prob, 0, 100);\n    engine::addParam(\"@Length\\n%d\", &_turing_length, 0, 16);\n    engine::addParam(\"@Out1\\n%s\", &_pulse1, 0, LEN_OF(pulse_modes) - 1, pulse_modes);\n    engine::addParam(\"@Out2\\n%s\", &_pulse2, 0, LEN_OF(pulse_modes) - 1, pulse_modes);\n\n    out_cv1 = engine::outputBuffer_i16(\"Out1\");\n    out_cv2 = engine::outputBuffer_i16(\"Out2\");\n\n    engine::setPatchStateEx(&_reset_state, sizeof(_reset_state));\n\n    engine::setMode(ENGINE_MODE_COMPACT);\n}\n\nstatic int32_t trig_pulse1 = 0;\nstatic int32_t trig_pulse2 = 0;\nstatic int32_t cv1 = 0;\nstatic int32_t cv2 = 0;\n\nstatic int32_t _last_prob = -1; // do not save on first run...\nstatic int32_t _last_steps = -1;\nstatic bool _inited = false;\n\nvoid engine::process()\n{\n    if (_last_prob != _turing_prob || _last_steps != _turing_length)\n    {\n        if (_inited)\n        {\n            // save state on change (skip first time)\n            _reset_state._rng_seed = _rng_state;\n            _reset_state._shift_reg = _turing_shift_reg;\n        }\n        else\n            _inited = true;\n\n        _last_prob = _turing_prob;\n        _last_steps = _turing_length;\n    }\n\n    if (_turing_length > 0 && engine_sync::stepChanged())\n    {\n        if (engine_sync::stepReset()) // Second Trig!\n        {\n            _rng_state = _reset_state._rng_seed;\n            _turing_shift_reg = _reset_state._shift_reg;\n        }\n\n        bool next_bit = (_turing_shift_reg & (0x8000 >> (_turing_length - 1))) ? 1 : 0;\n\n        _turing_shift_reg = _turing_shift_reg >> 1;\n\n        if ((Rand() % 100) < _turing_prob)\n            next_bit = 1 - next_bit;\n\n        if (next_bit)\n            _turing_shift_reg |= 0x8000;\n\n        _turing_byte = (_turing_shift_reg >> 8) & static_cast<uint32_t>(0xFF);\n\n        const char *dummy;\n        cv1 = output(_pulse1, &dummy);\n        cv2 = output(_pulse2, &dummy);\n\n        if (cv1 == INT16_MAX)\n        {\n            cv1 = 5 * PITCH_PER_OCTAVE;\n            trig_pulse1 = engine_sync::samples_per_step() / 2;\n        }\n        else\n            cv1 += engine::cv_i32();\n\n        if (cv2 == INT16_MAX)\n        {\n            cv2 = 5 * PITCH_PER_OCTAVE;\n            trig_pulse2 = engine_sync::samples_per_step() / 2;\n        }\n        else\n            cv2 += engine::cv_i32();\n    }\n\n    if (trig_pulse1 > 0)\n    {\n        trig_pulse1 -= FRAME_BUFFER_SIZE;\n\n        if (trig_pulse1 <= 0)\n            cv1 = 0;\n    }\n\n    if (trig_pulse2 > 0)\n    {\n        trig_pulse2 -= FRAME_BUFFER_SIZE;\n\n        if (trig_pulse2 <= 0)\n            cv2 = 0;\n    }\n\n    std::fill_n(out_cv1, FRAME_BUFFER_SIZE, cv1);\n    std::fill_n(out_cv2, FRAME_BUFFER_SIZE, cv2);\n}\n\nvoid engine::draw()\n{\n    gfx::drawCircle(2 + 42, 2 + 28, 2);\n    if (cv1 > 0)\n        gfx::fillCircle(2 + 42, 2 + 28, 2);\n    gfx::drawCircle(2 + 42 + 64, 2 + 28, 2);\n    if (cv2 > 0)\n        gfx::fillCircle(2 + 42 + 64, 2 + 28, 2);\n\n    for (size_t bit = 0; bit < 8; bit++)\n    {\n        if ((_turing_byte & (0x80 >> bit)) != 0)\n            gfx::fillRect(2 + bit * 16, 46, 12, 12);\n        else\n            gfx::drawRect(2 + bit * 16, 46, 12, 12);\n    }\n}\n\nvoid engine::screensaver()\n{\n    gfx::clearRect(0, 0, 128, 64);\n\n    for (size_t bit = 0; bit < 8; bit++)\n    {\n        if ((_turing_byte & (0x80 >> bit)) != 0)\n            gfx::fillRect(2 + bit * 16, 32, 12, 12);\n        else\n            gfx::drawRect(2 + bit * 16, 32, 12, 12);\n    }\n}"
  },
  {
    "path": "src/SPEECH/LPC.cpp",
    "content": "\n#include \"../squares-and-circles-api.h\"\n#include \"stmlib/stmlib.h\"\n#include \"stmlib/dsp/units.h\"\n\n#define private public\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.h\"\n#include \"plaits/dsp/speech/lpc_speech_synth_words.h\"\n\n#include \"plaits/dsp/speech/lpc_speech_synth_controller.cc\"\n#include \"plaits/dsp/speech/lpc_speech_synth_words.cc\"\n#include \"plaits/dsp/speech/lpc_speech_synth_phonemes.cc\"\n#include \"plaits/dsp/speech/lpc_speech_synth.cc\"\n\n#include \"stmlib/dsp/units.cc\"\n#include \"stmlib/utils/random.cc\"\n\n// from #include \"plaits/resources.cc\"\nnamespace plaits\n{\nconst int8_t lut_lpc_excitation_pulse[] FLASHMEM = {\n       0,      0,      0,      0,\n       1,      1,      1,      2,\n       3,      3,      4,      5,\n       6,      7,      8,      9,\n      10,     12,     13,     15,\n      17,     19,     21,     23,\n      25,     28,     30,     33,\n      36,     38,     41,     44,\n      48,     51,     54,     57,\n      61,     64,     68,     71,\n      75,     78,     82,     85,\n      89,     92,     95,     99,\n     102,    105,    108,    110,\n     113,    115,    118,    120,\n     121,    123,    124,    125,\n     126,    127,    127,    127,\n     127,    126,    125,    124,\n     122,    121,    118,    116,\n     113,    110,    107,    104,\n     100,     96,     92,     87,\n      83,     78,     73,     68,\n      63,     58,     53,     47,\n      42,     37,     31,     26,\n      21,     16,     11,      6,\n       1,     -3,     -8,    -12,\n     -16,    -20,    -23,    -26,\n     -29,    -32,    -35,    -37,\n     -39,    -40,    -42,    -43,\n     -43,    -44,    -44,    -44,\n     -44,    -44,    -43,    -42,\n     -41,    -40,    -39,    -38,\n     -36,    -35,    -33,    -32,\n     -30,    -29,    -27,    -26,\n     -24,    -23,    -22,    -20,\n     -19,    -18,    -18,    -17,\n     -16,    -16,    -16,    -16,\n     -16,    -16,    -17,    -17,\n     -18,    -19,    -20,    -21,\n     -23,    -24,    -26,    -27,\n     -29,    -30,    -32,    -34,\n     -35,    -37,    -39,    -40,\n     -42,    -43,    -44,    -46,\n     -47,    -48,    -48,    -49,\n     -49,    -50,    -50,    -50,\n     -49,    -49,    -48,    -47,\n     -46,    -45,    -44,    -42,\n     -41,    -39,    -37,    -35,\n     -33,    -31,    -29,    -27,\n     -25,    -23,    -20,    -18,\n     -16,    -14,    -13,    -11,\n      -9,     -8,     -7,     -6,\n      -5,     -4,     -3,     -3,\n      -3,     -3,     -3,     -4,\n      -5,     -6,     -7,     -9,\n     -10,    -12,    -14,    -16,\n     -18,    -21,    -23,    -26,\n     -29,    -32,    -34,    -37,\n     -40,    -43,    -46,    -49,\n     -51,    -54,    -56,    -59,\n     -61,    -63,    -65,    -67,\n     -68,    -70,    -71,    -72,\n     -72,    -73,    -73,    -73,\n     -73,    -72,    -72,    -71,\n     -70,    -69,    -67,    -66,\n     -64,    -63,    -61,    -59,\n     -57,    -54,    -52,    -50,\n     -48,    -45,    -43,    -41,\n     -39,    -37,    -35,    -33,\n     -31,    -29,    -27,    -26,\n     -25,    -23,    -22,    -21,\n     -20,    -20,    -19,    -19,\n     -19,    -18,    -18,    -18,\n     -19,    -19,    -19,    -20,\n     -20,    -21,    -21,    -22,\n     -22,    -23,    -23,    -24,\n     -24,    -25,    -25,    -25,\n     -26,    -26,    -26,    -25,\n     -25,    -25,    -24,    -24,\n     -23,    -22,    -21,    -20,\n     -19,    -18,    -16,    -15,\n     -13,    -12,    -10,     -8,\n      -6,     -4,     -3,     -1,\n       1,      3,      5,      7,\n       8,     10,     12,     13,\n      15,     16,     17,     18,\n      19,     20,     21,     21,\n      22,     22,     22,     22,\n      22,     22,     22,     22,\n      21,     21,     20,     19,\n      19,     18,     17,     16,\n      15,     14,     14,     13,\n      12,     11,     10,     10,\n       9,      9,      8,      8,\n       8,      8,      8,      8,\n       8,      8,      8,      9,\n       9,     10,     11,     12,\n      13,     14,     15,     16,\n      17,     18,     19,     21,\n      22,     23,     24,     26,\n      27,     28,     29,     30,\n      31,     32,     33,     33,\n      34,     35,     35,     35,\n      36,     36,     36,     36,\n      35,     35,     35,     34,\n      34,     33,     33,     32,\n      31,     30,     30,     29,\n      28,     27,     26,     25,\n      25,     24,     23,     22,\n      22,     21,     20,     20,\n      19,     19,     19,     19,\n      19,     19,     19,     19,\n      19,     19,     20,     20,\n      21,     21,     22,     22,\n      23,     23,     24,     25,\n      25,     26,     27,     27,\n      28,     29,     29,     29,\n      30,     30,     30,     31,\n      31,     31,     31,     30,\n      30,     30,     29,     29,\n      28,     28,     27,     26,\n      26,     25,     24,     23,\n      22,     21,     20,     19,\n      18,     17,     16,     15,\n      15,     14,     13,     12,\n      12,     11,     10,     10,\n      10,      9,      9,      9,\n       9,      9,      9,      9,\n       9,     10,     10,     10,\n      11,     11,     12,     12,\n      12,     13,     13,     14,\n      14,     14,     15,     15,\n      15,     15,     15,     15,\n      15,     15,     15,     15,\n      14,     14,     14,     13,\n      12,     12,     11,     10,\n       9,      8,      8,      7,\n       6,      5,      4,      3,\n       2,      1,      0,     -1,\n      -2,     -3,     -4,     -4,\n      -5,     -6,     -6,     -7,\n      -7,     -8,     -8,     -8,\n      -9,     -9,     -9,     -9,\n      -9,     -9,     -9,     -9,\n      -8,     -8,     -8,     -7,\n      -7,     -7,     -6,     -6,\n      -5,     -5,     -5,     -4,\n      -4,     -4,     -3,     -3,\n      -3,     -2,     -2,     -2,\n      -2,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -1,     -1,\n      -1,     -1,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -2,     -2,     -2,\n      -2,     -1,     -1,     -1,\n      -1,     -1,     -1,      0,\n       0,      0,      0,      0,\n};\n}\n\nconst float a0 = (440.0f / 8.0f) / 48000.0f;\n\ninline float NoteToFrequency(float midi_note)\n{\n    midi_note -= 9.0f;\n    CONSTRAIN(midi_note, -128.0f, 127.0f);\n    return a0 * 0.25f * stmlib::SemitonesToRatio(midi_note);\n}\n\nstatic float _pitch = 0.f;\nstatic int32_t _word = 0;\nstatic float _speed = 0.3f;\nstatic float _formant_shift = 0.5f;\nstatic float _prosody = 0.5f;\nstatic float _out_aux_mix = 0.0f;\n\nstruct\n{\n    uint8_t bank;\n    float addr;\n} _words[92];\n\nstatic plaits::LPCSpeechSynthController lpc_speech_synth_controller_;\nstatic plaits::LPCSpeechSynthWordBank lpc_speech_synth_word_bank_;\n\nstatic uint8_t buffer[16384] = {};\nstatic stmlib::BufferAllocator allocator;\n\nvoid engine::setup()\n{\n    allocator.Init(buffer, 16384);\n\n    lpc_speech_synth_word_bank_.Init(plaits::word_banks_,\n                                     LPC_SPEECH_SYNTH_NUM_WORD_BANKS,\n                                     &allocator);\n    int j = 0;\n    for (uint8_t i = 0; i < LPC_SPEECH_SYNTH_NUM_WORD_BANKS; i++)\n    {\n        lpc_speech_synth_word_bank_.Load(i);\n\n        for (int l = 0; l < lpc_speech_synth_word_bank_.num_words_; l++)\n            _words[j++] = {i, 1.f / lpc_speech_synth_word_bank_.num_words_ * l};\n    }\n\n    lpc_speech_synth_controller_.Init(&lpc_speech_synth_word_bank_);\n\n    engine::addParam(V_OCT, &_pitch);\n    engine::addParam(\"Word\", &_word, 0, LEN_OF(_words) - 1);\n    engine::addParam(\"Speed\", &_speed);\n    engine::addParam(\"Form.Shift\", &_formant_shift);\n    engine::addParam(\"Prosody\", &_prosody);\n    engine::addParam(\"AuxMix\", &_out_aux_mix);\n}\n\nvoid engine::process()\n{\n    auto note = (float)DEFAULT_NOTE;\n\n    note += engine::cv() * 12;\n\n    const float f0 = NoteToFrequency(note);\n\n    auto _out = engine::outputBuffer<0>();\n    auto _aux = engine::outputBuffer<1>();\n\n    lpc_speech_synth_controller_.Render(false,\n                                        engine::trig(),\n                                        _words[_word].bank, // Bank\n                                        f0,\n                                        _prosody,\n                                        _speed,             // Speed\n                                        _words[_word].addr, // Word\n                                        _formant_shift,\n                                        1.0f,\n                                        _aux,\n                                        _out,\n                                        FRAME_BUFFER_SIZE);\n\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        _out[i] = stmlib::Crossfade(_out[i], _aux[i], _out_aux_mix);\n}"
  },
  {
    "path": "src/SPEECH/SAM.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n\n#include <string.h>\n#include <stdio.h>\n#include <algorithm>\n#include <inttypes.h>\n\nextern \"C\"\n{\n#include \"SAM/sam.c\"\n#include \"SAM/render.c\"\n#include \"SAM/reciter.c\"\n}\n\n// static const char *_words[2];\nstatic const char *_words[] = {\n    \"ELECTRO\",\n    \"TECHNO\",\n    \"MODULAR\",\n    \"SYNTHESIZER\",\n    \"OSCILLATOR\",\n    \"EURORACK\",\n    \"RND_0-9\",\n};\n\nstatic char _phenoms[LEN_OF(_words)][256];\n\nstatic void init_phenoms()\n{\n  for (size_t i = 0; i < LEN_OF(_words); i++)\n  {\n    // char input[256] = {};\n    // int i = 0;\n    // auto text = _words[_word];\n    // for (; text[i] != 0; i++)\n    //   input[i] = (int)text[i]; // toupper\n    // input[i] = '[';\n    size_t len = strlen(_words[i]);\n    memcpy(_phenoms[i], _words[i], len);\n    _phenoms[i][len] = '[';\n    _phenoms[i][len + 1] = 0;\n    // auto len = snprintf(_phenoms[i], 256, \"%s[\", _words[i]);\n    TextToPhonemes((unsigned char *)_phenoms[i]);\n  }\n}\n\nstatic int32_t _word = 0;\nstatic float _speed = 0.75f;\nstatic float _mouth = 0.5f;\nstatic float _pitch = 0.5f;\nstatic float _throat = 0.5f;\n\nstatic uint8_t _buffer[48000];\nstatic size_t _buffer_len = 0;\nstatic uint32_t _buffer_pos = 0;\n\nvoid say()\n{\n  if (_word == LEN_OF(_phenoms) - 1)\n  {\n    sprintf(_phenoms[_word], \"%d[]\", rand() % 10);\n    TextToPhonemes((unsigned char *)_phenoms[_word]);\n  }\n\n  SAM_write_buffer = [](int pos, char value)\n  {\n    if (pos < (int)LEN_OF(_buffer))\n    {\n      _buffer_len = pos + 1;\n      _buffer[pos] = value;\n    }\n  };\n\n  SetSpeed((1.f - _speed) * 255);\n  SetMouth(_mouth * 255);\n  SetPitch(_pitch * 255);\n  SetThroat(_throat * 255);\n\n  SetInput(_phenoms[_word]);\n  SAMMain();\n  _buffer_pos = 0;\n}\n\nvoid engine::setup()\n{\n  // param_init(\"PTICH\", &_pitch);\n  engine::addParam(\"Speed\", &_speed);\n  engine::addParam(\"@Words\", &_word, 0, LEN_OF(_words) - 1, _words);\n  engine::addParam(\"Mouth\", &_mouth);\n  engine::addParam(\"Throat\", &_throat);\n\n  init_phenoms();\n}\n\nvoid engine::process()\n{\n  auto outputL = engine::outputBuffer<0>();\n\n  if (engine::trig())\n  {\n    say();\n  }\n\n  if (_buffer_pos + 12 < _buffer_len)\n  {\n    for (int j = 0; j < 24; j += 2)\n    {\n      float sample = ((float)_buffer[_buffer_pos] - 127) / 128;\n      outputL[j] = outputL[j + 1] = sample;\n      ++_buffer_pos;\n    }\n  }\n  else\n    std::fill_n(outputL, FRAME_BUFFER_SIZE, 0);\n}"
  },
  {
    "path": "src/SYNTH/DxFM.cpp",
    "content": "/*\n * Copyright (C)2023 - E.Heidt\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// ENGINE_NAME:SYNTH/DxFM;SYNTH/DxFM_BNK1-3\n\n#include \"../squares-and-circles-api.h\"\n#include \"stmlib/utils/ring_buffer.h\"\n\n#include \"msfa/controllers.h\"\n#include \"msfa/dx7note.h\"\n#include \"msfa/lfo.h\"\n#include \"msfa/synth.h\"\n#include \"msfa/fm_core.h\"\n\n#include \"msfa/synth.h\"\n#include \"msfa/exp2.h\"\n#include \"msfa/sin.h\"\n#include \"msfa/freqlut.h\"\n#include \"msfa/porta.h\"\n#include \"msfa/patch.h\"\n\n#include <unistd.h>\n#include <limits.h>\n#include \"plaits/resources.h\"\n\nstruct dxfm\n{\n    int note = 0;\n    int key_down = 0;\n    Lfo lfo;\n    FmCore fm_core;\n    Dx7Note dx7_note;\n    stmlib::RingBuffer<int32_t, N * 3> buffer;\n};\n\nstatic dxfm voices[2] = {};\nstatic Controllers controllers = {};\n\nstatic float _pitch = 0;\nstatic int32_t _prog = 0;\nstatic char _progName[16] = {};\nstatic int32_t _progSelect = 0;\nstatic float _hold = 0;\nstatic float _rate = 0;\n\nstatic float _stereolize = 0;\n\nstatic dxfm *active_voice = nullptr;\nstatic dxfm *other_voice = nullptr;\n\nconst uint8_t *fm_patches_table[4] = {};\n\nstatic char patch[128] = { // MARIMBA\n    0x00, 0x3f, 0x37, 0x00, 0x4e, 0x4e, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00,\n    0x38, 0x08, 0x63, 0x08, 0x0d, 0x63, 0x4b, 0x00, 0x08, 0x52, 0x30, 0x00,\n    0x00, 0x36, 0x00, 0x2e, 0x00, 0x38, 0x08, 0x5d, 0x00, 0x32, 0x63, 0x4b,\n    0x00, 0x52, 0x52, 0x30, 0x00, 0x00, 0x36, 0x00, 0x2e, 0x00, 0x38, 0x08,\n    0x55, 0x0a, 0x00, 0x5f, 0x21, 0x31, 0x29, 0x63, 0x5c, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x3b, 0x04, 0x63, 0x00, 0x00, 0x63, 0x48, 0x00, 0x00,\n    0x52, 0x30, 0x00, 0x00, 0x36, 0x00, 0x2e, 0x00, 0x38, 0x08, 0x60, 0x06,\n    0x00, 0x5f, 0x28, 0x31, 0x37, 0x63, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x3b, 0x00, 0x5f, 0x00, 0x00, 0x5e, 0x43, 0x5f, 0x3c, 0x32, 0x32,\n    0x32, 0x32, 0x06, 0x08, 0x23, 0x00, 0x00, 0x00, 0x31, 0x18, 0x4d, 0x41,\n    0x52, 0x49, 0x4d, 0x42, 0x41, 0x20, 0x20, 0x20};\n\nstatic uint8_t data[156] = {};\n\n#define OP_ENV_RATE(op, i) data[op * 21 + i]\n#define OP_ENV_LEVEL(op, i) data[op * 21 + 4 + i]\n#define OP_kbd_lev_scl_brk_pt(op) data[op * 21 + 8]\n#define OP_kbd_lev_scl_lft_depth(op) data[op * 21 + 9]\n#define OP_kbd_lev_scl_rht_depth(op) data[op * 21 + 10]\n#define OP_kbd_lev_scl_lft_curve(op) data[op * 21 + 11]\n#define OP_kbd_lev_scl_rht_curve(op) data[op * 21 + 12]\n#define OP_kbd_rate_scaling(op) data[op * 21 + 13]\n#define OP_amp_mod_sensitivity(op) data[op * 21 + 14]\n#define OP_key_vel_sensitivity(op) data[op * 21 + 15]\n#define OP_output_level(op) data[op * 21 + 16]\n#define OP_osc_mode(op) data[op * 21 + 17]\n#define OP_osc_freq_coarse(op) data[op * 21 + 18]\n#define OP_osc_freq_fine(op) data[op * 21 + 19]\n#define OP_osc_detune(op) data[op * 21 + 20]\n#define PE_rate(i) data[6 * 21 + i]\n#define PE_level(i) data[6 * 21 + 4 + i]\n#define ALGORITHM() data[6 * 21 + 8]\n#define FEEDBACK() data[6 * 21 + 9]\n#define OSC_SYNC() data[6 * 21 + 10]\n#define LFO_RATE() data[(6 * 21 + 11)]\n#define LFO_DELAY() data[6 * 21 + 12]\n#define LFO_PITCH_MOD_DEPTH() data[6 * 21 + 13]\n#define LFO_AMP_MOD_DEPTH() data[6 * 21 + 14]\n#define LFO_SYNC() data[6 * 21 + 15]\n#define LFO_WAVEFORM() data[6 * 21 + 16]\n#define PITCH_MOD_SENSITIVITY() data[6 * 21 + 17]\n#define TRANSPOSE() data[6 * 21 + 18]\n#define NAME() ((const char *)&data[6 * 21 + 19])\n\nstatic void initControllers()\n{\n    controllers.values_[kControllerPitch] = 0x2000;\n    controllers.values_[kControllerPitchRange] = 0;\n    controllers.values_[kControllerPitchStep] = 0;\n\n    controllers.modwheel_cc = 0;\n    controllers.foot_cc = 0;\n    controllers.breath_cc = 0;\n    controllers.aftertouch_cc = 0;\n    controllers.refresh();\n}\n\nstatic uint8_t loadDXPatch(uint8_t prog)\n{\n    uint8_t load = prog;\n    const uint8_t *sysexData = fm_patches_table[prog / 32];\n    prog = prog % 32;\n\n    if (sysexData)\n    {\n        bool invalid = false;\n        for (int i = 0; i < sizeof(patch); i++)\n            invalid |= sysexData[i + prog * 128] & 0x80;\n\n        if (!invalid)\n        {\n            memcpy(patch, (const char *)sysexData + (prog * 128), sizeof(patch));\n            UnpackPatch(patch, (char *)data);\n\n            char *name = _progName;\n            memset(_progName, 0, sizeof(_progName));\n            for (int i = 0; i < 10; i++)\n            {\n                *name = NAME()[i];\n                if (*name >= ' ' && *name <= '~')\n                {\n                    if (i == 0 || *name != ' ' || *(name - 1) != *name)\n                        name++;\n                }\n                else\n                {\n                    *name = 0;\n                    break;\n                }\n            }\n            return load;\n        }\n    }\n\n    return 0;\n}\n\nstatic void applyRate(float rate)\n{\n    for (int op = 0; op < 6; op++)\n    {\n        auto opData = &patch[op * 17];\n        for (int j = 1; j < 4; j++)\n        {\n            auto v = min(opData[j] & 0x7f, 99);\n            OP_ENV_RATE(op, j) = min((int)(v * -rate), 99);\n        }\n\n        // for (int j = 1; j < 4; j++)\n        // {\n        //     auto v = min(opData[j + 4] & 0x7f, 99);\n        //     if (_rate < 0)\n        //         OP_ENV_LEVEL(op, j) = v - (99 - v) * -_rate;\n        //     else\n        //         OP_ENV_LEVEL(op, j) = v - v * -_rate;\n        // }\n    }\n}\n\nvoid engine::setup()\n{\n    UnpackPatch(patch, (char *)data);\n\n    uint8_t nprogs = 0;\n\n    if (!strcmp(engine::name(), \"SYNTH/DxFM_BNK1-3\"))\n    {\n        if (fm_patches_table[nprogs / 32] = plaits::fm_patches_table[0])\n            nprogs += 32;\n        if (fm_patches_table[nprogs / 32] = plaits::fm_patches_table[1])\n            nprogs += 32;\n        if (fm_patches_table[nprogs / 32] = plaits::fm_patches_table[2])\n            nprogs += 32;\n    }\n    else\n    {\n        if (fm_patches_table[nprogs / 32] = machine::fs_read(\"DXFMSYX0\"))\n            nprogs += 32;\n    }\n\n    if (nprogs > 96)\n        _progSelect = 96;\n\n    for (size_t prog = 0; prog < nprogs; prog++)\n    {\n        const uint8_t *sysexData = fm_patches_table[prog / 32];\n    }\n\n    engine::addParam(V_OCT, &_pitch);\n\n    if (nprogs == 0)\n    {\n        nprogs = 1;\n    }\n\n    snprintf(_progName, 12, NAME());\n    engine::addParam(_progName, &_progSelect, 0, nprogs - 1);\n\n    _rate = -1.0f;\n    engine::addParam(\"Rate\", &_rate, -1.5f, -0.5f);\n\n    _hold = 0;\n    engine::addParam(\"Hold\", &_hold, 0, SAMPLE_RATE / FRAME_BUFFER_SIZE);\n    engine::addParam(\"Stereo\", &_stereolize);\n\n    Exp2::init();\n    Tanh::init();\n    Sin::init();\n\n    Freqlut::init(SAMPLE_RATE);\n    Lfo::init(SAMPLE_RATE);\n    PitchEnv::init(SAMPLE_RATE);\n    Env::init_sr(SAMPLE_RATE);\n    Porta::init_sr(SAMPLE_RATE);\n\n    initControllers();\n    controllers.masterTune = 0;\n    controllers.opSwitch = 0x3f; // all operators\n    active_voice = &voices[0];\n    other_voice = &voices[1];\n\n    for (auto &voice : voices)\n        voice.buffer.Init();\n\n    loadDXPatch(0); // If patch available, select first\n}\n\nstatic uint8_t _trig = 0;\n\nvoid engine::process()\n{\n    applyRate(_rate); // * ((float)rand() / INT32_MAX * 0.1f));\n\n    int velo = 127;\n\n    if (engine::trig())\n    {\n        _trig |= 1;\n    }\n    else if (engine::gate())\n    {\n        // keep key down\n    }\n    else\n    {\n        for (auto &voice : voices)\n            if (voice.key_down > 1)\n                --voice.key_down;\n    }\n\n    if (voices[0].buffer.readable() < N)\n    {\n        // see midinote_to_logfreq\n        float note = (2.f + engine::cv()) * 12.f + DEFAULT_NOTE;\n\n        if (_progSelect != _prog)\n        {\n            _prog = loadDXPatch(_progSelect);\n\n            for (auto &voice : voices)\n            {\n                voice.dx7_note.keyup();\n                voice.lfo.reset(&LFO_RATE());\n                voice.dx7_note.update(data, voice.note, velo);\n            }\n        }\n\n        for (auto &voice : voices)\n        {\n            if ((_trig & 1) && &voice == other_voice)\n            {\n                voice.key_down = 2 + _hold;\n                voice.note = note;\n                voice.lfo.keydown();\n                voice.dx7_note.keyup();\n\n                float r = _rate + 1.5f; // 0..1\n                if (r < 0.5f)\n                    velo = 64 + 64 * (r * 2);\n\n                voice.dx7_note.init(data, voice.note, velo);\n\n                if (OSC_SYNC())\n                    voice.dx7_note.oscSync();\n\n                _trig = 0;\n\n                // if (other_voice && active_voice->key_down)\n                // {\n                //     voice.dx7_note.transferSignal(active_voice->dx7_note);\n                //     voice.dx7_note.transferState(active_voice->dx7_note);\n                // }\n\n                std::swap(active_voice, other_voice);\n            }\n            else if (voice.key_down == 1)\n            {\n                voice.key_down = 0;\n                voice.dx7_note.keyup();\n            }\n\n            int32_t lfovalue = voice.lfo.getsample();\n            int32_t lfodelay = voice.lfo.getdelay();\n\n            auto p = voice.buffer.OverwritePtr(N);\n            memset(p, 0, sizeof(int32_t) * N);\n\n            float diff_note = (note - voice.note) / 12.f;\n            controllers.masterTune = diff_note * (1 << 24);\n            voice.dx7_note.compute(p, &voice.fm_core, lfovalue, lfodelay, &controllers);\n        }\n\n        _trig = 0;\n    }\n\n    auto bufferL = engine::outputBuffer<0>();\n    auto bufferR = engine::outputBuffer<1>();\n\n    int v = 0;\n    float stereo = (1.f - _stereolize);\n    for (auto &voice : voices)\n    {\n        auto p = voice.buffer.ImmediateReadPtr(FRAME_BUFFER_SIZE);\n\n        if (v++ % 2 == 0)\n        {\n            for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n            {\n                float s = (float)*p++ / INT32_MAX * 8;\n                bufferL[i] = s * stereo;\n                bufferR[i] = s;\n            }\n        }\n        else\n        {\n            for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n            {\n                float s = (float)*p++ / INT32_MAX * 8;\n                bufferL[i] += s;\n                bufferR[i] += s * stereo;\n            }\n        }\n    }\n}\n\nvoid engine::draw()\n{\n    if (fm_patches_table[0] == nullptr)\n    {\n        gfx::clearRect(4, 16, 120, 38);\n        gfx::drawRect(4, 16, 120, 38);\n        gfx::drawRect(5, 17, 118, 36);\n        gfx::drawStringCenter(64, 26, \"NO DXFM.SYX FOUND!\", 1);\n        gfx::drawString(10, 38, \"Please load a syx file\", 0);\n        gfx::drawString(10, 38 + 7, \" with the Webflasher! \", 0);\n    }\n}\n\n#include \"msfa/sin.cc\"\n#include \"msfa/pitchenv.cc\"\n#include \"msfa/fm_op_kernel.cc\"\n#include \"msfa/fm_core.cc\"\n#include \"msfa/lfo.cc\"\n#include \"msfa/dx7note.cc\"\n#include \"msfa/freqlut.cc\"\n#include \"msfa/patch.cc\"\n#include \"msfa/porta.cc\"\n#include \"msfa/env.cc\"\n#include \"msfa/exp2.cc\"\n#include \"plaits/resources.cc\""
  },
  {
    "path": "src/SYNTH/Open303.cpp",
    "content": "// Copyright (C)2022 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n#include \"../squares-and-circles-api.h\"\n\n#undef SAMPLE_RATE\n#define protected public\n\n#include \"open303/src/rosic_AnalogEnvelope.cpp\"\n#include \"open303/src/rosic_EllipticQuarterBandFilter.cpp\"\n#include \"open303/src/rosic_DecayEnvelope.cpp\"\n#include \"open303/src/rosic_LeakyIntegrator.cpp\"\n#include \"open303/src/wavetable_gen/rosic_MipMappedWaveTable.cpp\"\n#include \"open303/src/wavetable_gen/rosic_FourierTransformerRadix2.cpp\"\n#include \"open303/src/wavetable_gen/rosic_Complex.cpp\"\n#include \"open303/src/rosic_RealFunctions.cpp\"\n#include \"open303/src/rosic_Open303.cpp\"\n#include \"open303/src/rosic_FunctionTemplates.cpp\"\n#include \"open303/src/GlobalFunctions.cpp\"\n#include \"open303/src/rosic_BlendOscillator.cpp\"\n#include \"open303/src/rosic_BiquadFilter.cpp\"\n#include \"open303/src/rosic_NumberManipulations.cpp\"\n#include \"open303/src/rosic_OnePoleFilter.cpp\"\n#include \"open303/src/rosic_MidiNoteEvent.cpp\"\n#include \"open303/src/rosic_TeeBeeFilter.cpp\"\n\n#include \"stmlib/stmlib.h\"\n#include \"open303/src/rosic_Open303.h\"\n#include \"open303/src/wavetable_gen/rosic_MipMappedWaveTable.h\"\n\n// static __attribute__((aligned(32))) uint8_t open303_mem[sizeof(rosic::Open303)];\nstatic rosic::WaveTable square_wave;\nstatic rosic::Open303 open303(&square_wave, &square_wave);\n\nstatic float _pitch = -1;\nstatic float _acc = 1.0f;\nstatic float _cutoff = 0.25f;\nstatic float _res = 0.33f;\nstatic float _env = 0.25f;\nstatic float _dec = 0.5f;\nstatic float _note;\nstatic uint8_t _waveform = 1;\nstatic bool _gate;\n\nvoid engine::setup()\n{\n    engine::addParam(V_OCT, &_pitch); // pitch is summed with CV and quantized\n    engine::addParam(\"Acc\", &_acc);\n    engine::addParam(\"Cutoff\", &_cutoff);\n    engine::addParam(\"Reso\", &_res);\n    engine::addParam(\"EnvMod\", &_env);\n    engine::addParam(\"Dec\", &_dec);\n\n    // param[6].init(\"WAVEFORM\", &_waveform, _waveform, 0, 1);\n    // param[6].print_value = [&](char *val)\n    // {\n    //     sprintf(val, _waveform ? \"SQR\" : \"SAW\");\n    // };\n\n    // square_wave = (uint8_t *)malloc(sizeof(rosic::WaveTable));\n    rosic::MipMappedWaveTable tmp;\n    tmp.fillWithSquare303();\n    tmp.generateMipMap(square_wave);\n    // open303.oscillator.setWaveTables(_square, _square);\n\n    open303.setSampleRate(SAMPLE_RATE, 1);\n    open303.setWaveform(_waveform);\n    open303.setTuning(open303.tuning);\n    open303.setAmpSustain(0);\n    open303.setAccentAttack(open303.accentAttack);\n    open303.setPitchBend(0);\n    open303.setSlideTime(open303.slideTime);\n    open303.setVolume(-12);\n    open303.filter.setMode(rosic::TeeBeeFilter::TB_303);\n}\n\nvoid engine::process()\n{\n    open303.setWaveform(_waveform);\n    open303.setAccent(1.f + _acc * 99.f);\n    open303.setCutoff(rosic::linToExp(_cutoff, 0.0, 1.0, 314.0, 2394.0));\n    open303.setResonance(1.f + _res * 99.f);\n    open303.setEnvMod(1.f + _env * 99.f);\n    open303.setDecay(rosic::linToExp(_dec, 0.0, 1.0, 200.0, 2000.0));\n    if (_acc > 0)\n        open303.setAccentDecay(rosic::linToExp(_dec, 0.0, 1.0, 200.0, 2000.0));\n\n    _note = (float)DEFAULT_NOTE + 24 + engine::cv() * 12;\n    CONSTRAIN(_note, 0, 128);\n\n    _gate |= engine::gate();\n\n    if (engine::trig() > 0)\n        open303.triggerNote(_note, _acc > 0);\n    else if (!engine::gate())\n    {\n        open303.releaseNote(_note);\n        _gate = false;\n    }\n    else\n        open303.oscFreq = rosic::pitchToFreq(_note, open303.tuning);\n\n    auto buffer = engine::outputBuffer<0>();\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        buffer[i] = open303.getSample();\n}\n\nvoid engine::screensaver()\n{\n    static uint32_t _r = 0;\n    static const uint8_t _screenSaver[] = {\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, //>\n        0x00, 0x80, 0x0f, 0xe0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0x00,\n        0x00, 0x30, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00,\n        0x00, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x00,\n        0x80, 0x01, 0x06, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0x0f, 0xe0, 0x01, 0x03,\n        0x60, 0x00, 0x0f, 0xe0, 0x01, 0x06, 0x30, 0x80, 0x1f, 0xf0, 0x03, 0x0c,\n        0x10, 0x80, 0x1f, 0xf0, 0x03, 0x08, 0x18, 0x80, 0x1f, 0xf0, 0x03, 0x18,\n        0x08, 0x80, 0x1f, 0xf0, 0x03, 0x10, 0x08, 0x80, 0x1f, 0xf0, 0x03, 0x30,\n        0x04, 0x80, 0x1f, 0xf0, 0x03, 0x20, 0x04, 0x80, 0x1f, 0xf0, 0x03, 0x20,\n        0x04, 0x80, 0x1f, 0xf0, 0x03, 0x60, 0x06, 0x00, 0x0f, 0xe0, 0x01, 0x40,\n        0x02, 0x00, 0x0f, 0xe0, 0x01, 0x40, 0x02, 0x00, 0x06, 0xc0, 0x00, 0x40,\n        0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40,\n        0xe2, 0x07, 0x00, 0x00, 0xe0, 0x47, 0xc2, 0x03, 0x00, 0x00, 0xc0, 0x43,\n        0x82, 0x01, 0x00, 0x00, 0x80, 0x41, 0x82, 0x01, 0x00, 0x00, 0x80, 0x41,\n        0x86, 0x01, 0x00, 0x00, 0xc0, 0x60, 0x04, 0x03, 0x00, 0x00, 0xc0, 0x60,\n        0x04, 0x07, 0x00, 0x00, 0xc0, 0x20, 0x0c, 0x06, 0x00, 0x00, 0x60, 0x20,\n        0x08, 0x0e, 0x00, 0x00, 0x70, 0x30, 0x08, 0x1c, 0x00, 0x00, 0x30, 0x10,\n        0x18, 0x38, 0x00, 0x00, 0x1c, 0x18, 0x10, 0x70, 0x00, 0x00, 0x0e, 0x08,\n        0x20, 0xe0, 0x00, 0x00, 0x0f, 0x0c, 0x60, 0xc0, 0x03, 0xc0, 0x03, 0x06,\n        0xc0, 0x00, 0x0f, 0xf0, 0x00, 0x02, 0x80, 0x01, 0xfc, 0x3f, 0x00, 0x01,\n        0x00, 0x03, 0xe0, 0x07, 0xc0, 0x00, 0x00, 0x06, 0x00, 0x00, 0x60, 0x00,\n        0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x1c, 0x00,\n        0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x0f, 0xf0, 0x01, 0x00,\n        0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, //>\n        0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00,\n        0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x7c, 0x00,\n        0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x80, 0x07, 0x06, 0xc0, 0xe0, 0x01,\n        0xc0, 0x03, 0x0f, 0xe0, 0x81, 0x03, 0xe0, 0x81, 0x1f, 0xf0, 0x83, 0x07,\n        0xf0, 0x80, 0x1f, 0xf0, 0x03, 0x0f, 0x78, 0xc0, 0x3f, 0xf8, 0x07, 0x1e,\n        0x38, 0xc0, 0x3f, 0xf8, 0x07, 0x1c, 0x3c, 0xc0, 0x3f, 0xf8, 0x07, 0x3c,\n        0x1c, 0xc0, 0x3f, 0xf8, 0x07, 0x38, 0x1c, 0xc0, 0x3f, 0xf8, 0x07, 0x78,\n        0x0e, 0xc0, 0x3f, 0xf8, 0x07, 0x70, 0x0e, 0xc0, 0x3f, 0xf8, 0x07, 0x70,\n        0x0e, 0xc0, 0x1f, 0xf0, 0x07, 0xf0, 0x0f, 0x80, 0x1f, 0xf0, 0x03, 0xe0,\n        0x07, 0x80, 0x0f, 0xe0, 0x03, 0xe0, 0x07, 0x00, 0x0f, 0xe0, 0x01, 0xe0,\n        0x07, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe7, 0x07, 0x00, 0x00, 0xe0, 0xe7,\n        0xf7, 0x07, 0x00, 0x00, 0xe0, 0xef, 0xe7, 0x07, 0x00, 0x00, 0xe0, 0xe7,\n        0xc7, 0x03, 0x00, 0x00, 0xc0, 0xe3, 0xc7, 0x03, 0x00, 0x00, 0xc0, 0xe3,\n        0xcf, 0x03, 0x00, 0x00, 0xe0, 0xf1, 0x8e, 0x07, 0x00, 0x00, 0xe0, 0xf1,\n        0x8e, 0x0f, 0x00, 0x00, 0xe0, 0x71, 0x1e, 0x0f, 0x00, 0x00, 0xf0, 0x70,\n        0x1c, 0x1f, 0x00, 0x00, 0xf8, 0x78, 0x1c, 0x3e, 0x00, 0x00, 0x7c, 0x38,\n        0x3c, 0x7c, 0x00, 0x00, 0x3e, 0x3c, 0x38, 0xf8, 0x00, 0x00, 0x1f, 0x1c,\n        0x70, 0xf0, 0x03, 0xc0, 0x1f, 0x1e, 0xf0, 0xe0, 0x0f, 0xf0, 0x0f, 0x0f,\n        0xe0, 0xc1, 0xff, 0xff, 0x03, 0x07, 0xc0, 0x03, 0xff, 0xff, 0xc0, 0x03,\n        0x80, 0x07, 0xfc, 0x3f, 0xe0, 0x01, 0x00, 0x0f, 0xe0, 0x07, 0xf0, 0x00,\n        0x00, 0x3e, 0x00, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00,\n        0x00, 0xf0, 0x0f, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00,\n        0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00};\n\n    gfx::clearRect(0, 0, 128, 64);\n\n    for (int i = 23; i > 0; i--)\n    {\n        if ((_r & (1 << i)))\n            gfx::drawCircle(64, 32, 26 + powf(i, 1.3f));\n    }\n\n    if (_gate)\n    {\n        _r |= 1;\n        gfx::drawXbm(40, 8, 48, 48, &_screenSaver[sizeof(_screenSaver) / 2]);\n    }\n    else\n        gfx::drawXbm(40, 8, 48, 48, &_screenSaver[0]);\n\n    _r <<= 1;\n}"
  },
  {
    "path": "src/SYNTH/Resonator.cpp",
    "content": "#include \"../squares-and-circles-api.h\"\n\n#include \"stmlib/dsp/units.cc\"\n#include \"stmlib/utils/random.cc\"\n\n#include \"rings/resources.cc\"\n#include \"rings/dsp/string.cc\"\n#include \"rings/dsp/resonator.cc\"\n#include \"rings/dsp/fm_voice.cc\"\n#include \"rings/dsp/part.cc\"\n#include \"rings/dsp/string_synth_part.cc\"\n\n#include \"rings/dsp/strummer.h\"\n\nstatic int32_t _model = rings::ResonatorModel::RESONATOR_MODEL_MODAL;\nstatic const char* _models[] = {\n    \"Modal\\tmono\",\n    \"Sympath.\\tmono\",\n    \"String\\tmono\",\n    \"FM\\tmono\",\n    \"StrQuant.\\tmono\",\n\n    \"Modal\\tduo\",\n    \"Sympath.\\tduo\",\n    \"String\\tduo\",\n    \"FM\\tduo\",\n    \"StrQuant\\tduo\",\n\n    \"Modal\\tquadro\",\n    \"Sympath.\\tquadro\",\n    \"String\\tquadro\",\n    \"FM\\tquadro\",\n    \"StrQuant.\\tquadro\",\n};\n\nstatic rings::Strummer strummer = {};\n\nstatic rings::Part part;\nstatic rings::Patch patch = {};\nstatic rings::PerformanceState performance_state = {};\n\nstatic float _pitch = 0;\n\nvoid engine::setup()\n{\n    patch.structure = 0.5f;\n    patch.brightness = 0.5f;\n    patch.damping = 0.5f;\n    patch.position = 0.5f;\n    strummer.Init(0.01f, SAMPLE_RATE / FRAME_BUFFER_SIZE);\n\n    part.Init();\n    part.set_model(rings::ResonatorModel::RESONATOR_MODEL_MODAL);\n    part.set_polyphony(3);\n\n    engine::addParam(V_OCT, &_pitch); // pitch is summed with CV and quantized\n    engine::addParam(\"@Model\", &_model, 0, LEN_OF(_models) - 1, (const char**)_models);\n\n    engine::addParam(\"Struc.\", &patch.structure);\n    engine::addParam(\"Brighn.\", &patch.brightness);\n    engine::addParam(\"Damping\", &patch.damping);\n    engine::addParam(\"Pos\", &patch.position);\n}\n\nvoid engine::process()\n{\n    auto inputL = engine::inputBuffer<0>();\n    auto bufferOut = engine::outputBuffer<0>();\n    auto bufferAux = engine::outputBuffer<1>();\n\n    part.set_model((rings::ResonatorModel)(_model % 5));\n\n    int32_t polyphony = 1;\n    if (_model < 5)\n        polyphony = 1;\n    else if (_model < 10)\n        polyphony = 2;\n    else\n        polyphony = 4;\n\n    if (polyphony != part.polyphony())\n        part.set_polyphony(polyphony);\n\n    performance_state.strum = engine::trig() > 0;\n    performance_state.internal_strum = false;\n    performance_state.internal_note = true;\n    performance_state.internal_exciter = true;\n    performance_state.tonic = 0.2f;\n    performance_state.chord = 0;\n    performance_state.note = DEFAULT_NOTE;\n\n    performance_state.note += engine::cv() * 12;\n\n    strummer.Process(inputL, FRAME_BUFFER_SIZE, &performance_state);\n    part.Process(performance_state, patch, inputL, bufferOut, bufferAux, FRAME_BUFFER_SIZE);\n}"
  },
  {
    "path": "src/SYNTH/plaits.cpp",
    "content": "// Copyright (C)2022 - E.Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n// ENGINE_NAME: M-OSC/Virt.Analog\n// ENGINE_NAME: M-OSC/Waveshaping\n// ENGINE_NAME: M-OSC/2-OP-FM\n// ENGINE_NAME: M-OSC/Grain\n// ENGINE_NAME: M-OSC/Harmonic\n// ENGINE_NAME: M-OSC/Wavetable\n// ENGINE_NAME: M-OSC/Chord\n// ENGINE_NAME: DRUMS/Analog BD\n// ENGINE_NAME: DRUMS/Analog SD\n// ENGINE_NAME: DRUMS/Analog HH2\n// ENGINE_NAME: DRUMS/Analog HH\n// ENGINE_NAME: DRUMS/909ish-BD\n// ENGINE_NAME: DRUMS/909ish-SD\n// ENGINE_NAME: SYNTH/ClassicVAVCF\n\n#include \"../squares-and-circles-api.h\"\n\n#define private public // ;-)\n#include \"plaits/dsp/voice.h\"\n#include \"stmlib/dsp/dsp.h\"\n\nusing namespace machine;\n\nplaits::Modulations modulations;\nplaits::Voice voice;\nplaits::Patch patch;\n\nfloat bufferOut[FRAME_BUFFER_SIZE];\nfloat bufferAux[FRAME_BUFFER_SIZE];\nfloat out_aux_mix = 0.5f;\nfloat _pitch = 0;\nfloat _v_oct = 0;\nfloat _base_pitch = DEFAULT_NOTE;\n\nstruct\n{\n    int engine;\n    int output; // output=0 -> out, output=1 -> aux, output=3 -> stereo\n} _mode = {};\n\nuint8_t *_buffer = nullptr;\nplaits::Engine *_plaitsEngine = nullptr;\n\nconstexpr int WAVETABLE_ENGINE = 5;\nconstexpr int CHORD_ENGINE = 6;\nconstexpr int CLASSIC_VAVCF_ENGINE = 16;\n\nvoid engine_free()\n{\n    free(_plaitsEngine);\n    free(_buffer);\n}\n\ntemplate <class T>\nvoid alloc_engine(size_t mem = 48)\n{\n    _plaitsEngine = new (malloc(sizeof(T))) T();\n    _buffer = (uint8_t *)malloc(mem * sizeof(float));\n\n    stmlib::BufferAllocator allocator;\n    allocator.Init(_buffer, mem * sizeof(float));\n    _plaitsEngine->Init(&allocator);\n}\n\nfloat harmonics, timbre, morph;\n\nbool is_drum()\n{\n    return _mode.engine == 13 || _mode.engine == 14 || _mode.engine == 15;\n}\n\nvoid init_params(float hh, float tt, float mm, const plaits::PostProcessingSettings &settings)\n{\n    patch.harmonics = harmonics = hh;\n    patch.timbre = timbre = tt;\n    patch.morph = morph = mm;\n    if (_plaitsEngine)\n        _plaitsEngine->post_processing_settings = settings;\n}\n\nvoid engine::setup()\n{\n    const char *name = engine::name();\n\n    while (*name++ != '/')\n        ;\n\n    if (!strcmp(name, \"Virt.Analog\"))\n        _mode = {0, 0};\n    else if (!strcmp(name, \"Waveshaping\"))\n        _mode = {1, 0};\n    else if (!strcmp(name, \"2-OP-FM\"))\n        _mode = {2, 0};\n    else if (!strcmp(name, \"Grain\"))\n        _mode = {3, 2};\n    else if (!strcmp(name, \"Harmonic\"))\n        _mode = {4, 2};\n    else if (!strcmp(name, \"Wavetable\"))\n        _mode = {5, 2};\n    else if (!strcmp(name, \"Chord\"))\n        _mode = {6, 0};\n    else if (!strcmp(name, \"Analog BD\"))\n        _mode = {13, 0};\n    else if (!strcmp(name, \"Analog SD\"))\n        _mode = {14, 0};\n    else if (!strcmp(name, \"Analog HH2\"))\n        _mode = {15, 1};\n    else if (!strcmp(name, \"Analog HH\"))\n        _mode = {15, 0};\n    else if (!strcmp(name, \"909ish-BD\"))\n        _mode = {13, 1};\n    else if (!strcmp(name, \"909ish-SD\"))\n        _mode = {14, 1};\n    else if (!strcmp(name, \"ClassicVAVCF\"))\n        _mode = {16, 2};\n    else\n        _mode = {0, 0};\n\n    voice.Init();\n    patch.engine = 0;\n    memset(&patch, 0, sizeof(patch));\n    patch.note = DEFAULT_NOTE + _pitch * 12.f;\n\n    modulations.timbre_patched = true;\n    patch.timbre_modulation_amount = 0;\n\n    modulations.frequency_patched = true;\n    patch.frequency_modulation_amount = 0;\n\n    modulations.morph_patched = true;\n    patch.morph_modulation_amount = 0;\n\n    memset(&modulations, 0, sizeof(modulations));\n\n    patch.lpg_colour = 0.5;\n    patch.decay = 0.5;\n    modulations.trigger_patched = true; // trigger;\n    // modulations.level_patched = true;\n    // modulations.level = 1;\n\n    switch (_mode.engine)\n    {\n    case 0:\n        alloc_engine<plaits::VirtualAnalogEngine>();\n        init_params(0.5f, 0.5f, 0.5f, {0.8f, 0.8f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Detune\", &harmonics);\n        engine::addParam(\"Square\", &timbre);\n        engine::addParam(\"CSAW\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n        break;\n    case 1:\n        alloc_engine<plaits::WaveshapingEngine>();\n        init_params(0.8f, 0.8f, 0.75f, {0.7f, 0.6f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Waveform\", &harmonics);\n        engine::addParam(\"Fold\", &timbre);\n        engine::addParam(\"Asym\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n        break;\n    case 2:\n        alloc_engine<plaits::FMEngine>();\n        init_params(0.8f, 0.8f, 0.75f, {0.6f, 0.6f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Ratio\", &harmonics);\n        engine::addParam(\"Mod\", &timbre);\n        engine::addParam(\"Feedb.\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n        break;\n    case 3:\n        alloc_engine<plaits::GrainEngine>();\n        init_params(0.8f, 0.8f, 0.75f, {0.7f, 0.6f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Ratio\", &harmonics);\n        engine::addParam(\"Frm/Fq.\", &timbre);\n        engine::addParam(\"Width\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        engine::addParam(\"PD-Mix\", &out_aux_mix, out_aux_mix);\n        break;\n    case 4:\n        alloc_engine<plaits::AdditiveEngine>();\n        init_params(0.8f, 0.8f, 0.75f, {0.8f, 0.8f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Bump\", &harmonics);\n        engine::addParam(\"Peak\", &timbre);\n        engine::addParam(\"Shape\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n        break;\n    case WAVETABLE_ENGINE:\n        alloc_engine<plaits::WavetableEngine>(64 * sizeof(const int16_t *));\n        init_params(0.f, 0.8f, 0.75f, {0.6f, 0.6f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Bank\", &harmonics, 0.f, 0.5f);\n        engine::addParam(\"Row\", &timbre);\n        engine::addParam(\"Column\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n        _plaitsEngine->LoadUserData(nullptr);\n        break;\n    case CHORD_ENGINE:\n    {\n        alloc_engine<plaits::ChordEngine>(plaits::kChordNumChords * plaits::kChordNumNotes + plaits::kChordNumChords + plaits::kChordNumNotes);\n        init_params(0.5f, 0.5f, 0.5f, {0.8f, 0.8f, false});\n        engine::addParam(V_OCT, &_v_oct);\n\n        int32_t *pchord = (int32_t *)&static_cast<plaits::ChordEngine *>(_plaitsEngine)->chords_.chord_index_quantizer_.quantized_value_;\n        *pchord = 8;\n        engine::addParam(\"Chord\", pchord, 0,\n                         static_cast<plaits::ChordEngine *>(_plaitsEngine)->chords_.chord_index_quantizer_.num_steps() - 1,\n                         (const char **)plaits::chord_names);\n\n        engine::addParam(\"Inv.\", &timbre);\n        engine::addParam(\"Shape\", &morph);\n        engine::addParam(\"Decay\", &patch.decay);\n        if (_mode.output == 2)\n            engine::addParam(\"AuxMix\", &out_aux_mix, out_aux_mix);\n        else\n            engine::addParam(\"Color\", &patch.lpg_colour);\n    }\n    break;\n    // case 15: // speech_engine_\n    //     alloc_engine<plaits::SpeechEngine>(false, 0.8f, 0.8f);\n    //     break;\n    // case 8: // swarm_engine_\n    //     alloc_engine<plaits::SwarmEngine>(false, -3.0f, 1.0f);\n    //     break;\n    // case 9: // noise_engine_\n    //     alloc_engine<plaits::NoiseEngine>(false, -1.0f, -1.0f);\n    //     break;\n    // case 10: // particle_engine_\n    //     alloc_engine<plaits::ParticleEngine>(false, -2.0f, 1.0f);\n    //     break;\n    // case 11: // string_engine_\n    //     alloc_engine<plaits::StringEngine>(true, -1.0f, 0.8f);\n    //     break;\n    // case 12: // modal_engine_\n    //     alloc_engine<plaits::ModalEngine>(true, -0.5f, 0.8f);\n    //     break;\n    case 13:\n        _base_pitch += -24.f;\n        alloc_engine<plaits::BassDrumEngine>();\n        init_params(0.8f, 0.5f, 0.5f, {0.8f, 0.8f, true});\n        engine::addParam(\"Pitch\", &_pitch, -1.f, 1.f);\n        engine::addParam(_mode.output == 0 ? \"Drive\" : \"Punch\", &harmonics);\n        engine::addParam(\"Tone\", &timbre);\n        engine::addParam(\"Decay\", &morph);\n        break;\n    case 14:\n        alloc_engine<plaits::SnareDrumEngine>();\n        init_params(0.5f, 0.5f, 0.5f, {0.8f, 0.8f, true});\n        engine::addParam(\"Pitch\", &_pitch, -1.f, 1.f);\n        engine::addParam(\"Snappy\", &harmonics);\n        engine::addParam(\"Tone\", &timbre);\n        engine::addParam(\"Decay\", &morph);\n        break;\n    case 15:\n        alloc_engine<plaits::HiHatEngine>();\n        init_params(0.5f, 0.9f, 0.6f, {0.8f, 0.8f, true});\n        engine::addParam(\"Pitch\", &_pitch, -1.f, 1.f);\n        engine::addParam(\"Noise\", &harmonics);\n        engine::addParam(\"Tone\", &timbre);\n        engine::addParam(\"Decay\", &morph);\n        break;\n    // engines 2\n    case CLASSIC_VAVCF_ENGINE:\n        alloc_engine<plaits::VirtualAnalogVCFEngine>();\n        init_params(0.5f, 0.5f, 0.5f, {1.f, 1.f, false});\n        engine::addParam(V_OCT, &_v_oct);\n        engine::addParam(\"Morph\", &morph);\n        engine::addParam(\"Cutoff\", &timbre);\n        engine::addParam(\"Harsh\", &harmonics);\n        out_aux_mix = 0;\n        modulations.timbre_patched = false;\n        patch.timbre_modulation_amount = 0;\n        engine::addParam(\"EnvMod\", &patch.timbre_modulation_amount, -1.f, 1.f);\n        patch.decay = 0.5f;\n        engine::addParam(\"Decay\", &patch.decay, 0.f, 0.99f);\n        break;\n#if 0 // TODO....\n        case 17:\n            alloc_engine<plaits::PhaseDistortionEngine>(plaits::kMaxBlockSize * 4);\n            _plaitsEngine->post_processing_settings = {0.7f, 0.7f, false};\n            break;\n        case 18:\n        case 19:\n        case 20:\n            alloc_engine<plaits::SixOpEngine>(\n                plaits::kMaxBlockSize * 4 + plaits::kMaxBlockSize * plaits::kNumSixOpVoices + sizeof(plaits::fm::Patch) * 96 / sizeof(float));\n            init_params(\"\", 0.0f, \"Mod\", 0.5f, \"Env\", 0.5f, {1.f, 1.f, false});\n            param[1].init_presets(\"Preset\", &static_cast<plaits::SixOpEngine *>(_plaitsEngine)->patch_index, 0, 0, 95);\n            param[1].print_value = [&](char *name)\n            {\n                auto i = static_cast<plaits::SixOpEngine *>(_plaitsEngine)->patch_index;\n                sprintf(name, \">%.10s\", static_cast<plaits::SixOpEngine *>(_plaitsEngine)->patches_[i].name);\n            };\n            _plaitsEngine->LoadUserData(plaits::fm_patches_table[0]);\n            modulations.morph_patched = false;\n            param[5].init(\"EnvMod\", &patch.morph_modulation_amount, 0.0f, -1.f, 1.f);\n\n            modulations.timbre_patched = false;\n            param[4].init(\"ModMod\", &patch.timbre_modulation_amount, 0.0f, -1.f, 1.f);\n            break;\n            case 21:\n                alloc_engine<plaits::WaveTerrainEngine>(plaits::kMaxBlockSize * 4);\n                _plaitsEngine->post_processing_settings = {0.7f, 0.7f, false};\n                patch.engine = (engine - 16);\n                break;\n            case 22:\n                alloc_engine<plaits::StringEngine>(16 + 3 * (1024 + 265));\n                _plaitsEngine->post_processing_settings = {0.8f, 0.8f, false};\n                patch.engine = (engine - 16);\n                break;\n            case 23:\n                alloc_engine<plaits::ChiptuneEngine>(plaits::kChordNumChords * plaits::kChordNumNotes + plaits::kChordNumChords + plaits::kChordNumNotes);\n                _plaitsEngine->post_processing_settings = {0.5f, 0.5f, false};\n                patch.engine = (engine - 16);\n                break;\n#endif\n    }\n\n    if (_mode.engine >= 16)\n        patch.engine = (_mode.engine - 16);\n\n    _plaitsEngine->Reset();\n}\n\nvoid engine::process()\n{\n    float a = bufferOut[0] / 256.f;\n    ONE_POLE(patch.harmonics, harmonics + a, 0.1f);\n    ONE_POLE(patch.timbre, timbre + a, 0.1f);\n    ONE_POLE(patch.morph, morph + a, 0.1f);\n\n    modulations.level_patched = false;\n    modulations.level = 1.f;\n\n    patch.note = _base_pitch + (_pitch + engine::cv()) * 12;\n\n    float last_decay = patch.decay;\n    float last_morph = patch.morph;\n    // if (!frame.trigger && frame.gate)\n    // {\n    //     if (is_drum())\n    //         patch.morph = 1;\n    //     else\n    //         patch.decay = 1;\n\n    //     modulations.level = 1.f;\n    //     // modulations.level_patched = true;\n    // }\n    modulations.engine = patch.engine;\n    modulations.trigger = engine::trig() ? 1 : 0;\n\n    if (!is_drum())\n        modulations.trigger_patched = patch.decay < 1.f;\n\n    if (!engine::hasTrig())\n    {\n        modulations.trigger_patched = false;\n        modulations.level_patched = true;\n        modulations.level = patch.decay;\n        patch.decay = 0.001f;\n    }\n    else\n    {\n        modulations.trigger_patched = true;\n    }\n\n    modulations.note = 0;\n    voice.Render(_plaitsEngine, patch, modulations, bufferOut, bufferAux, FRAME_BUFFER_SIZE);\n\n    patch.decay = last_decay;\n    patch.morph = last_morph;\n\n    switch (_mode.output)\n    {\n    case 0:\n        std::copy_n(bufferOut, FRAME_BUFFER_SIZE, engine::outputBuffer<0>());\n        std::copy_n(bufferOut, FRAME_BUFFER_SIZE, engine::outputBuffer<1>());\n        break;\n    case 1:\n        std::copy_n(bufferAux, FRAME_BUFFER_SIZE, engine::outputBuffer<0>());\n        std::copy_n(bufferAux, FRAME_BUFFER_SIZE, engine::outputBuffer<1>());\n        break;\n    case 2:\n        for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n            bufferOut[i] = stmlib::Crossfade(bufferOut[i], bufferAux[i], out_aux_mix);\n        std::copy_n(bufferOut, FRAME_BUFFER_SIZE, engine::outputBuffer<0>());\n        std::copy_n(bufferOut, FRAME_BUFFER_SIZE, engine::outputBuffer<1>());\n        break;\n    case 3:\n        std::copy_n(bufferOut, FRAME_BUFFER_SIZE, engine::outputBuffer<0>());\n        std::copy_n(bufferAux, FRAME_BUFFER_SIZE, engine::outputBuffer<1>());\n        break;\n    }\n}\n\nvoid engine::draw()\n{\n    engine::setParamName(&patch.decay, engine::hasTrig() ? \"Decay\" : \"Level\");\n}\n\n#include \"stmlib/utils/random.cc\"\n#include \"lib/stmlib/dsp/units.cc\"\n\n//${SCRIPT_PATH}/main.cc $(find lib/plaits/ -type f -name \"*.cc\")\n\n#include \"lib/plaits/resources.cc\"\n// lib/plaits/dsp/speech/sam_speech_synth.cc\n// lib/plaits/dsp/speech/lpc_speech_synth_controller.cc\n// lib/plaits/dsp/speech/lpc_speech_synth_words.cc\n// lib/plaits/dsp/speech/lpc_speech_synth_phonemes.cc\n// lib/plaits/dsp/speech/naive_speech_synth.cc\n// lib/plaits/dsp/speech/lpc_speech_synth.cc\n#include \"lib/plaits/dsp/engine/string_engine.cc\"\n#include \"lib/plaits/dsp/engine/swarm_engine.cc\"\n#include \"lib/plaits/dsp/engine/chord_engine.cc\"\n#include \"lib/plaits/dsp/engine/waveshaping_engine.cc\"\n#include \"lib/plaits/dsp/engine/modal_engine.cc\"\n#include \"lib/plaits/dsp/engine/fm_engine.cc\"\n#include \"lib/plaits/dsp/engine/snare_drum_engine.cc\"\n// #include \"lib/plaits/dsp/engine/speech_engine.cc\"\n#include \"lib/plaits/dsp/engine/grain_engine.cc\"\n#include \"lib/plaits/dsp/engine/virtual_analog_engine.cc\"\n#include \"lib/plaits/dsp/engine/wavetable_engine.cc\"\n#include \"lib/plaits/dsp/engine/additive_engine.cc\"\n#include \"lib/plaits/dsp/engine/noise_engine.cc\"\n#include \"lib/plaits/dsp/engine/hi_hat_engine.cc\"\n#include \"lib/plaits/dsp/engine/particle_engine.cc\"\n#include \"lib/plaits/dsp/engine/bass_drum_engine.cc\"\n// lib/plaits/dsp/engine2/chiptune_engine.cc\n// lib/plaits/dsp/engine2/six_op_engine.cc\n// lib/plaits/dsp/engine2/wave_terrain_engine.cc\n// lib/plaits/dsp/engine2/string_machine_engine.cc\n// lib/plaits/dsp/engine2/phase_distortion_engine.cc\n#include \"lib/plaits/dsp/engine2/virtual_analog_vcf_engine.cc\"\n#include \"lib/plaits/dsp/chords/chord_bank.cc\"\n#include \"lib/plaits/dsp/physical_modelling/string_voice.cc\"\n#include \"lib/plaits/dsp/physical_modelling/string.cc\"\n#include \"lib/plaits/dsp/physical_modelling/modal_voice.cc\"\n#include \"lib/plaits/dsp/physical_modelling/resonator.cc\"\n#include \"lib/plaits/dsp/fm/algorithms.cc\"\n#include \"lib/plaits/dsp/fm/dx_units.cc\"\n#include \"lib/plaits/dsp/voice.cc\"\n"
  },
  {
    "path": "src/build.sh",
    "content": "#!/usr/bin/bash\n\nset -e #-eo pipefail\nSCRIPT_PATH=\"$(realpath $(dirname $0))\"\ncd ${SCRIPT_PATH}/..\n\n\n[[ -d .venv ]] || python3 -m venv .venv\n\n[[ -f .venv/bin/activate ]] && source .venv/bin/activate\n[[ -f .venv/Scripts/activate ]] && source .venv/Scripts/activate\n\npip install -r src/requirements.txt\n\nif [[ ! -d ./.build/xpack-arm-none-eabi-gcc-10.3.1-2.1 ]] ; then\n    mkdir -p ./.build\n    cd ./.build\n    if which winver; then\n        [[ -f ./xpack-arm-none-eabi-gcc-10.3.1-2.1-win32-x64.zip ]] || curl -fLO https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.3.1-2.1/xpack-arm-none-eabi-gcc-10.3.1-2.1-win32-x64.zip\n        unzip xpack-arm-none-eabi-gcc-10.3.1-2.1-win32-x64.zip -d .\n    else\n        [[ -f ./xpack-arm-none-eabi-gcc-10.3.1-2.1-linux-x64.tar.gz ]] || curl -fLO https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.3.1-2.1/xpack-arm-none-eabi-gcc-10.3.1-2.1-linux-x64.tar.gz\n        cat xpack-arm-none-eabi-gcc-10.3.1-2.1-linux-x64.tar.gz  | tar xvz -C . > /dev/null\n    fi \n    cd -\nfi\n\nexport GCC_PATH=$(realpath ./.build/xpack-arm-none-eabi-gcc-10.3.1-2.1/bin/)\nexport PATH=\"${PATH}:${GCC_PATH}\"\n\nif [[ ! -d ./.build/udynlink ]]; then\n    git clone https://github.com/eh2k/udynlink.git ./.build/udynlink/\nfi\n\nmkmodule=$(realpath ./.build/udynlink/scripts/mkmodule)\n\nif ! which arm-none-eabi-gcc; then\n    echo arm-none-eabi-gcc not found!\n    exit 1\nfi\n\nif [[ \"$1\" == \"--rebuild\" ]]; then\n    find \"${SCRIPT_PATH}/../app/\" -type f -name \"*.bin\" -print0 -exec touch {} +\n    rm -f ${SCRIPT_PATH}/apps.txt\nfi\n\nfor f in $(find \"${SCRIPT_PATH}\" -mindepth 2 -maxdepth 2 -type f -name '*.cpp'); do\n\nX=\"${f%.*}\"\nif [ -f $oo ] && [ \"$(date -R -r ${X/src/app}.bin)\" = \"$(date -R -r $f)\" ]; then\n    continue\nfi\n\n#-fno-rtti\nNAME=\"$(grep \"ENGINE_NAME:\" $f | cut -d':' -f2 | sed 's/^ *//g')\"\nNAME=${NAME//$'\\n'/';'} #replace \\n with ''\nNAME=${NAME:-\"$(realpath --relative-to=${SCRIPT_PATH} $X)\"}\n\necho ----- \"$NAME\" -----\n\nBUILD_FLAGS=$(grep \"build_flags:\" $X.cpp | cut -d':' -f2- | xargs)\nBUILD_FLAGS=${BUILD_FLAGS:-\"-mfloat-abi=hard -mfpu=fpv5-d16 -ffast-math\"}\n\necho \"BUILD_FLAGS:$BUILD_FLAGS\"\n\nSRC_FILES=$(grep \"src_files\" $X.cpp  | cut -d':' -f2 | xargs)\nfind \"$(dirname $X.cpp)\" -type f -name '*.o' -delete\n#--no-opt \\\n#-felide-constructors -fno-rtti -std=gnu++14 -Wno-error=narrowing -fno-threadsafe-statics\n$mkmodule $(realpath $X.cpp --relative-base=.) \\\n    --no-opt \\\n    --build_flags=\"-fsingle-precision-constant -DNDEBUG -pedantic -fno-exceptions $BUILD_FLAGS -I. -I./lib/ \" \\\n    --public-symbols=\"setup,process,draw,screensaver,__ui_event_handler,__midi_event_handler\" \\\n    --name=\"$NAME\" $SRC_FILES> $X.log\nsed -i \"s|$(realpath .)|.|\" $X.log\ntouch -d \"$(date -R -r $X.cpp)\" $X.bin\n\nmkdir -p $(dirname \"${X/src/app}\")\nmv \"$X.bin\" \"${X/src/app}.bin\"\nmv \"$X.elf\" \"${X/src/app}.elf\"\nmv \"$X.log\" \"${X/src/app}.log\"\nX=\"${X/src/app}\"\n\n#cat $X.log | arm-none-eabi-c++filt -t > ${X}2.log\n\narm-none-eabi-objdump -Dztr --source $X.elf | arm-none-eabi-c++filt -t > $X.elf.txt\n#arm-none-eabi-nm -l -t d -S -C --size-sort --synthetic --special-syms --with-symbol-versions --reverse-sort ./$X.elf > $X.log\npython -m elf_size_analyze -t arm-none-eabi- $(realpath $X.elf --relative-base=.) -F -R --no-color >> $X.log\n${SCRIPT_PATH}/dump.py \"$(realpath $X.bin --relative-base=.)\" | tee -a $X.log\n#rm $X.elf\n\nif [[ \"$1\" == \"--rebuild\" ]]; then\n    ${SCRIPT_PATH}/dump.py \"$(realpath $X.bin --relative-base=.)\" >> ${SCRIPT_PATH}/../app/apps.txt\nfi\n\ngrep \"__aeabi_\" $X.log && exit 1\n\n\n#xxd -i $X.bin > ./$X.bin.h\n#sed -i \"s/unsigned char/const uint8_t/g\" ./$X.bin.h\n#sed -i \"s/\\[\\]/\\[\\] FLASHMEM __attribute__((aligned(32)))/g\" ./$X.bin.h\n\n# arm-none-eabi-gcc -fPIE -msingle-pic-base -mcpu=cortex-m4 -mthumb -Wl,--unresolved-symbols=ignore-in-object-files -fdump-lang-class -I. -I../lib/ $X.cpp\n# arm-none-eabi-objdump --disassemble-all --no-addresses ./$X.elf > $X.s\n# arm-none-eabi-objdump --disassemble-all ./$X.elf > $X.adr.s\n#/home/master/git/udynlink/tests/xpack-qemu-arm-7.2.5-1/bin/qemu-system-gnuarmeclipse -board STM32F429I-Discovery -image $X.elf -nographic\n\ndone\n\ncd ${SCRIPT_PATH}\npwd\nfind . -type f -name '*.o' -delete\ncd ../app/\nfind . -type f -name '*.bin' -exec stat --printf=\"%-20n\\t%6s\\n\" -- {} \\;\ndu -ch */*.bin | grep total\n#find . -type f -name '*.bin' -delete\n\nfind . -type f -name '*.bin' | cut -c 3- | sort | jq -R -s -c 'split(\"\\n\")[:-1] | {apps: .} ' | jq > index.json\n\nif [[ \"$1\" == \"--upload\" || \"$2\" == \"--upload\" ]]; then\n    python ../app/upload.py\nfi\n"
  },
  {
    "path": "src/dump.py",
    "content": "#!/usr/bin/env python3\n\nimport sys, zlib, hashlib\n\ndef md5sum(data):\n    h  = hashlib.md5()\n    h.update(data)\n    return h.hexdigest()\n\nf = open(sys.argv[1], \"rb\")\ndata = f.read()\nf.close()\n#print(data[0:4]) # sign\nl = int.from_bytes(data[4:6], byteorder='little')#num_lot\nr = int.from_bytes(data[6:8], byteorder='little'); #num_rels\na = int.from_bytes(data[8:12], byteorder='little'); #symt_size\nb = int.from_bytes(data[12:16], byteorder='little'); #code_size\nc = int.from_bytes(data[16:20], byteorder='little'); #data_size\nd = int.from_bytes(data[20:24], byteorder='little'); #bss_size\n\nh = 24 + (r * 8) + a\nprint(\"---------------------------------------------\")\nprint(\"FILE_NAME\", f.name)\nprint(\"RAM_SIZE\", (l * 4) + c + d)\nprint(\"BIN_SIZE\", h + b + c)\nprint(\"FILE_LEN\", len(data))\n\ncrc32sum = zlib.crc32(data[0:-1])\nprint(\"CRC32 %x\" % crc32sum)\nprint(\"MD5 %s\" % md5sum(data))\n"
  },
  {
    "path": "src/squares-and-circles-api.h",
    "content": "\n// Copyright (C)2023 - E.Heidt\n//\n// Author: E.Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n// See http://creativecommons.org/licenses/MIT/ for more information.\n//\n\n////////////////////////////////////////////////////////////////////////////////\n// Work in Progress: API will have breaking changes !!!!\n////////////////////////////////////////////////////////////////////////////////\n\n#pragma once\n\n#include <math.h>\n#include <stddef.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <string.h>\n#include <utility>\n\n#define V_OCT \"V_OCT\"\n#define V_QTZ \"V_QTZ\"\n#define SEQ_SWING \"$SWING\"\n#define MULTI_TRIGS \">TRIGS\"\n\n#define OUT_CV \"CV\"\n#define OUT_VOCT \"VOCT\"\n#define OUT_TRIG \"TRIG\"\n#define OUT_GATE \"GATE\"\n#define OUT_ACCENT \"ACCENT\"\n#define OUT_AUDIO \"AUDIO\"\n#define OUT_AUDIO_L \"AUDIO_L\"\n#define OUT_AUDIO_R \"AUDIO_R\"\n\nconstexpr uint32_t ENGINE_MODE_COMPACT = 1 << 5;\nconstexpr uint32_t ENGINE_MODE_MIDI_IN = 1 << 7;\n\n#ifndef EXTERN_C\n#define EXTERN_C extern \"C\"\n#endif\n\n#ifndef FLASHMEM\n#define FLASHMEM\n#endif\n\n#ifndef M_PI_2\n#define M_PI_2 1.57079632679489661923\n#endif\n\n#ifndef MOD\n#define MOD(x, y) ((y > 0 ? (x % y) : 0))\n#endif\n\n#ifndef CONSTRAIN\n#define CONSTRAIN(var, min, max)                                                                                       \\\n    if (var < (min))                                                                                                   \\\n    {                                                                                                                  \\\n        var = (min);                                                                                                   \\\n    }                                                                                                                  \\\n    else if (var > (max))                                                                                              \\\n    {                                                                                                                  \\\n        var = (max);                                                                                                   \\\n    }\n\n#endif\n\n#ifndef MACHINE_INTERNAL\n\n#define LEN_OF(x) (sizeof(x) / sizeof(x[0]))\n\n#ifdef __cplusplus\n#ifdef __GNUC__\n/* poision memory functions */\n// #   pragma GCC poison _ZSt17__throw_bad_allocv\n// #   pragma GCC poison new delete\n// #   pragma GCC poison malloc new\n// #   pragma GCC poison virtual\n#endif\n\nEXTERN_C uint32_t micros();\nEXTERN_C uint32_t millis();\nEXTERN_C uint32_t crc32(uint32_t crc, const void *buf, size_t size);\n\ninline float linToExp(float in, float inMin, float inMax, float outMin, float outMax)\n{\n    float tmp = (in - inMin) / (inMax - inMin);\n    return outMin * expf(tmp * (logf(outMax / outMin)));\n}\n\n#endif\n\n#ifndef DEFAULT_NOTE\n#define DEFAULT_NOTE 60\n#endif\n#ifndef SAMPLE_RATE\n#define SAMPLE_RATE 48000\n#endif\n#ifndef FRAME_BUFFER_SIZE\n#define FRAME_BUFFER_SIZE 24\n#endif\n#ifndef PITCH_PER_OCTAVE\n#define PITCH_PER_OCTAVE (12 << 7)\n#endif\n\n#ifndef engine\n\nEXTERN_C\n{\n    extern const char *__name;\n    extern const uint8_t *__data;\n    extern uint32_t *__t;\n    extern uint8_t *__clock;\n    extern uint8_t *__step;\n    extern uint32_t *__step_changed;\n    extern uint32_t *__samples_per_step;\n    extern uint32_t *__trig;\n    extern uint32_t *__gate;\n    extern uint32_t *__accent;\n    extern int32_t *__cv;\n\n    extern float *__output_l_fp;\n    extern float *__output_r_fp;\n\n    extern uint8_t *__trig_level;\n    extern uint8_t *__midi_cc;\n    extern uint8_t *__mixer_level;\n    extern uint8_t *__mixer_pan;\n    extern uint32_t *__multi_trigs_mask;\n\n    extern float **__audio_in_l_fpp;\n    extern float **__audio_in_r_fpp;\n\n    extern uint8_t *__display_buffer_u8_p;\n    extern uint32_t *__engine_props;\n\n    extern float *__adc_voltage_f_p;\n    extern uint32_t __adc_count;\n    extern float *__dac_voltage_fp_p;\n    extern uint32_t __dac_count;\n    extern uint32_t *__digital_inputs_u32_p;\n    extern uint32_t *__bpm;\n\n    struct UI_EVENT_t\n    {\n        uint16_t type;\n        uint16_t control;\n        int16_t value;\n        uint16_t mask;\n        bool handled;\n    };\n\n    extern UI_EVENT_t *__ui_event;\n\n    typedef bool (*uiHandler)(uint16_t type, uint16_t control, int16_t value, uint16_t mask);\n\n#ifndef NO_UI_EVENT_HANDLER\n\n    uiHandler __ui_event_handler_ptr = nullptr;\n    /* EXPORT */\n    void __ui_event_handler()\n    {\n        if (__ui_event_handler_ptr)\n            __ui_event->handled =\n                __ui_event_handler_ptr(__ui_event->type, __ui_event->control, __ui_event->value, __ui_event->mask);\n    }\n\n#endif\n\n    struct MIDI_EVENT_t\n    {\n        uint8_t type;\n        uint8_t key;\n        int16_t value;\n    };\n\n    extern MIDI_EVENT_t *__midi_event;\n\n#ifndef NO_MIDI_EVENT_HANDLER\n\n    void (*__midi_event_handler_ptr)() = nullptr;\n    /* EXPORT */\n    void __midi_event_handler()\n    {\n        if (__midi_event_handler_ptr)\n            __midi_event_handler_ptr();\n    }\n#endif\n\n    extern uint8_t *__io_tr;\n    extern uint8_t *__io_qz;\n}\n\nnamespace engine\n{\n    inline const char *name()\n    {\n        return __name;\n    }\n\n    inline uint32_t t()\n    {\n        return *__t;\n    }\n\n    inline uint32_t trig()\n    {\n        return *__trig;\n    }\n\n    inline bool hasTrig()\n    {\n        return *__io_tr;\n    }\n\n    inline uint8_t qz()\n    {\n        return *__io_qz;\n    }\n\n    inline uint32_t gate()\n    {\n        return *__gate;\n    }\n    inline uint32_t accent()\n    {\n        return *__accent;\n    }\n    inline float cv()\n    {\n        return (float)*__cv / PITCH_PER_OCTAVE;\n    }\n    inline int32_t cv_i32()\n    {\n        return *__cv;\n    }\n\n    template <int channel>\n    inline float *outputBuffer();\n\n    template <>\n    inline float *outputBuffer<0>()\n    {\n        return __output_l_fp;\n    }\n\n    template <>\n    inline float *outputBuffer<1>()\n    {\n        return __output_r_fp;\n    }\n\n    template <int channel>\n    inline float *inputBuffer();\n\n    template <>\n    inline float *inputBuffer<0>()\n    {\n        return *__audio_in_l_fpp;\n    }\n\n    template <>\n    inline float *inputBuffer<1>()\n    {\n        return *__audio_in_r_fpp;\n    }\n\n    inline float trigLevel(int ch)\n    {\n        return ((4.f / UINT16_MAX) * __trig_level[ch] * __trig_level[ch]);\n    }\n    inline float mixLevel(int ch)\n    {\n        return ((4.f / UINT16_MAX) * __mixer_level[ch]) * __mixer_level[ch];\n    } // exp range 0 - 4\n    inline float mixLevelL(int ch)\n    {\n        return cosf((float)__mixer_pan[ch] / 255.f * (float)M_PI_2) * mixLevel(ch);\n    }\n    inline float mixLevelR(int ch)\n    {\n        return sinf((float)__mixer_pan[ch] / 255.f * (float)M_PI_2) * mixLevel(ch);\n    }\n\n    EXTERN_C void setup();\n    EXTERN_C void process();\n    EXTERN_C void draw();\n    EXTERN_C void screensaver();\n    EXTERN_C void release();\n    /////\n\n    inline void setUIHandler(uiHandler handler)\n    {\n        __ui_event_handler_ptr = nullptr;\n        __ui_event_handler();\n        __ui_event_handler_ptr = handler;\n    }\n\n    constexpr uint8_t MIDI_RTM_STOP = 252;\n    constexpr uint8_t MIDI_RTM_START = 250;\n    constexpr uint8_t MIDI_RTM_CONTINUE = 251;\n\n    void __attribute__((weak)) onMidiNote(uint8_t key, uint8_t velocity); // NoteOff: velocity == 0\n    void __attribute__((weak)) onMidiPitchbend(int16_t pitch);\n    void __attribute__((weak)) onMidiCC(uint8_t ccc, uint8_t value);\n    void __attribute__((weak)) onMidiSysex(uint8_t byte);\n    void __attribute__((weak)) onMidiRTM(uint8_t code);\n\n    EXTERN_C void setupMultiTrigs(size_t count, const char **names, const std::pair<uint8_t, uint8_t> *keyMap);\n    EXTERN_C void setMultiTrigMidiKeyMap(const std::pair<uint8_t, uint8_t> *keyMap);\n\n    inline uint8_t getMidiCC(uint8_t ccc)\n    {\n        return __midi_cc[ccc];\n    }\n\n    // 1V == 1.f, 5V = 5.f\n    EXTERN_C float *outputBuffer_f32(const char *name);\n\n    // 1V == PITCH_PER_OCTAVE, 5V == 5 * PITCH_PER_OCTAVE\n    EXTERN_C int16_t *outputBuffer_i16(const char *name);\n\n    // 1V == 1.f, 5V = 5.f\n    EXTERN_C float *inputBuffer_f32(const char *name);\n\n    // 1V == PITCH_PER_OCTAVE, 5V == 5 * PITCH_PER_OCTAVE\n    EXTERN_C int16_t *inputBuffer_i16(const char *name);\n\n    EXTERN_C void addParam_f32(const char *name, float *value, float min = 0.f, float max = 1.f); // min...max\n    EXTERN_C void addParam_i32(const char *name, int32_t *value, int32_t min, int32_t max,\n                               const char **valueMap); // 0...max\n\n    inline void addParam(const char *name, int32_t *value, int32_t min, int32_t max,\n                         const char **valueMap = nullptr) // 0...max\n    {\n        addParam_i32(name, value, min, max, &valueMap[0]);\n    }\n\n    inline void addParam(const char *name, float *value, float min = 0.f, float max = 1.f) // 0...max\n    {\n        addParam_f32(name, value, min, max);\n    }\n\n    EXTERN_C void setPatchStateEx(void *ptr, size_t size);\n\n    inline void setMode(uint32_t mode) // 1: compact_mode, 2: sample_view\n    {\n        *__engine_props |= mode;\n        if (mode & ENGINE_MODE_MIDI_IN)\n        {\n            __midi_event_handler_ptr = []()\n            {\n                switch (__midi_event->type)\n                {\n                case 0:\n                    onMidiNote(__midi_event->key, __midi_event->value);\n                    return;\n                case 1:\n                    onMidiPitchbend(__midi_event->value);\n                    return;\n                case 2:\n                    onMidiCC(__midi_event->key, __midi_event->value);\n                    return;\n                case 3:\n                    onMidiSysex(__midi_event->key);\n                    return;\n                case 4:\n                    engine::onMidiRTM(__midi_event->key);\n                    return;\n                }\n            };\n        }\n    }\n\n    constexpr uint32_t PARAM_SELECTED = 0x1;\n    constexpr uint32_t PARAM_MODULATION = 0x2;\n\n    EXTERN_C float getParamValueModulated_f32(const void *valuePtr);\n    EXTERN_C int32_t getParamValueModulated_i32(const void *valuePtr);\n\n    EXTERN_C uint32_t getParamFlags(const void *valuePtr);\n    EXTERN_C void selectParam(const void *val);\n    inline uint32_t isParamModulated(const void *valuePtr)\n    {\n        return getParamFlags(valuePtr) & PARAM_MODULATION;\n    }\n    inline uint32_t isParamSelected(const void *valuePtr)\n    {\n        return getParamFlags(valuePtr) & PARAM_SELECTED;\n    }\n\n    EXTERN_C void setParamName(const void *valuePtr, const char *name);\n\n    EXTERN_C bool qz_enabled();\n    EXTERN_C const char *qz_name();\n    EXTERN_C int32_t qz_process(int32_t pitch, int8_t *note = nullptr);\n    EXTERN_C int16_t qz_lookup(int8_t note); // 0-127 note-values\n} // namespace engine\n\nenum EventType : uint16_t\n{\n    EVENT_NONE,\n    EVENT_BUTTON_UP = 2,\n    EVENT_BUTTON_HOLD,\n    EVENT_ENCODER,\n};\n\nconstexpr uint16_t BUTTON_L = (1 << 0);\nconstexpr uint16_t BUTTON_R = (1 << 1);\nconstexpr uint16_t ENCODER_L = (1 << 8);\nconstexpr uint16_t ENCODER_R = (1 << 9);\n\nnamespace engine_sync\n{\n    constexpr uint8_t CLOCK_RESET = 97;\n\n    inline uint8_t ppn()\n    {\n        return *__clock;\n    }\n    inline uint32_t samples_per_step()\n    {\n        return *__samples_per_step;\n    }\n    inline uint32_t clk_bpm() // BPM x 100\n    {\n        return *__bpm;\n    }\n\n    inline void clk_bpm(uint32_t bpm)\n    {\n        *__bpm = bpm;\n    }\n\n    inline uint8_t step()\n    {\n        return *__step;\n    }\n    inline bool stepChanged()\n    {\n        return *__step_changed != 0;\n    }\n    inline bool stepReset()\n    {\n        return *__step_changed > 1;\n    }\n} // namespace engine_sync\n\nnamespace machine\n{\n    EXTERN_C const uint8_t *fs_read(const char *blobName, size_t *blobSize = nullptr);\n\n    inline uint32_t raw_digital_inputs()\n    {\n        return *__digital_inputs_u32_p;\n    }\n\n    inline float *raw_adc_voltage(uint32_t index)\n    {\n        if (index < __adc_count)\n            return &__adc_voltage_f_p[index];\n        else\n            return nullptr;\n    }\n\n    inline float *raw_dac_buffer(uint32_t index)\n    {\n        if (index < __dac_count)\n            return &__dac_voltage_fp_p[index];\n        else\n            return nullptr;\n    }\n} // namespace machine\n#else\nusing namespace ui;\nusing namespace UI;\n#endif\n\n#ifndef GFX_API\nnamespace gfx\n{\n    EXTERN_C void drawCircle(int x, int y, int r);\n    EXTERN_C void fillCircle(int x, int y, int r);\n    EXTERN_C void clearCircle(int x, int y, int r);\n    EXTERN_C void drawRect(int x, int y, int w, int h);\n    EXTERN_C void fillRect(int x, int y, int w, int h);\n    EXTERN_C void clearRect(int x, int y, int w, int h);\n    EXTERN_C void invertRect(int x, int y, int w, int h);\n    EXTERN_C void drawString(int x, int y, const char *s, uint8_t font = 1);\n    EXTERN_C void drawStringEx(int x, int y, uint8_t font, const char *fmt, ...);\n    EXTERN_C void drawStringCenter(int x, int y, const char *s, uint8_t font = 1);\n    EXTERN_C void drawLine(int x1, int y1, int x2, int y2);\n    EXTERN_C void setPixel(int x, int y);\n    EXTERN_C void drawXbm(int x, int y, int width, int height, const uint8_t *xbm);\n    EXTERN_C void drawWaveform(void *wavefrom, int x = 0, int y = -1);\n    EXTERN_C void message(const char *msg);\n    EXTERN_C void drawPiano(int x, int y, float note);\n    EXTERN_C void drawMessageBox(const char *title, const char *message);\n\n    EXTERN_C void drawScope(int y, float *inputFrame, int x_scale = 32 /* 0 - 63*/, int y_scale = 63 /* 0 - 63*/);\n\n    inline uint8_t *displayBuffer()\n    {\n        return __display_buffer_u8_p;\n    }\n} // namespace gfx\n#endif\n\n#ifndef SERIAL_API\nnamespace machine\n{\n    EXTERN_C void serial_write(void const *buffer, uint32_t bufsiz);\n    EXTERN_C uint32_t serial_read(void *buffer, uint32_t length);\n    EXTERN_C uint32_t serial_available();\n\n    EXTERN_C void get_device_id(uint8_t *mac);\n\n    EXTERN_C float cpu_load_percent();\n\n    EXTERN_C uint8_t *engine_malloc(uint32_t size);\n    EXTERN_C void engine_start(uint32_t args);\n    EXTERN_C void engine_stop(uint32_t result);\n} // namespace machine\n#endif\n\n#endif // MACHINE_INTERNAL\n\nstruct sample;\nstruct sample_info\n{\n    const char *name;\n    uint32_t len;\n    uint16_t sample_rate;\n    uint8_t channels;\n    const char *labels[32];\n    float label_pos[32];\n    uint8_t label_num;\n};\n\nEXTERN_C sample *sample_s8(const uint8_t *data, int len, int sample_rate, int addr_shift);\nEXTERN_C sample *sample_u8(const uint8_t *data, int len, int sample_rate, int addr_shift);\nEXTERN_C sample *sample_Am6070(const uint8_t *data, int len, int sample_rate, int amp_mul);\nEXTERN_C sample *sample_wav(const uint8_t *data, int len);\nEXTERN_C sample *sample_wav_from_file(const char *filepath, sample *dispose_reuse_mem = nullptr);\nEXTERN_C void sample_dispose(sample *smpl);\nEXTERN_C void sample_set_pos(sample *smpl, float pos, float amplitude, float decay);\nEXTERN_C void sample_process(sample *smpl, float start, float end, float speed, float cv, float *outputL_frame,\n                             float *outputR_frame = nullptr);\nEXTERN_C bool sample_get_info(sample *smpl, sample_info *info);\n\n// fatfs api -- ff.h\n\nenum FRESULT : int\n{\n    FR_OK = 0,\n    FR_DISK_ERR = 1,\n    FR_INT_ERR = 2,\n    FR_NO_FILE = 4,\n    FR_INVALID_OBJECT = 9,\n    FR_NOT_ENOUGH_CORE = 17, /* NOT ENOUGH RAM */\n    FR_TOO_MANY_OPEN_FILES = 18,\n    FR_INVALID_PARAMETER = 19,\n};\n\nstruct FIL_IMPL;\n\ntypedef struct\n{\n    FIL_IMPL *impl;\n} FIL;\n\ntypedef unsigned int UINT;  /* int must be 16-bit or 32-bit */\ntypedef unsigned char BYTE; /* char must be 8-bit */\ntypedef uint16_t WORD;      /* 16-bit unsigned integer */\ntypedef uint32_t DWORD;     /* 32-bit unsigned integer */\ntypedef uint64_t QWORD;     /* 64-bit unsigned integer */\ntypedef WORD WCHAR;         /* UTF-16 character type */\ntypedef DWORD FSIZE_t;\n\n#define FA_READ 0x01\n#define FA_WRITE 0x02\n#define FA_OPEN_EXISTING 0x00\n#define FA_CREATE_NEW 0x04\n#define FA_CREATE_ALWAYS 0x08\n#define FA_OPEN_ALWAYS 0x10\n#define FA_OPEN_APPEND 0x30\n\nEXTERN_C FRESULT f_open(FIL *fp, const char *name, uint32_t mode);\nEXTERN_C FRESULT f_read(FIL *fp, void *p, UINT size, UINT *bytes_read);\nEXTERN_C FSIZE_t f_tell(FIL *fp);\nEXTERN_C FSIZE_t f_size(FIL *fp);\n// EXTERN_C FRESULT f_truncate(FIL *fp);\n// EXTERN_C FRESULT f_lseek(FIL *fp, FSIZE_t ofs);\nEXTERN_C FRESULT f_close(FIL *fp);\nEXTERN_C FRESULT f_write(FIL *fp, const void *buff, UINT btw, UINT *bw);\n\nstruct DIR_IMPL;\n\ntypedef struct\n{\n    DIR_IMPL *impl;\n} DIR;\n\n#define AM_DIR 0x10 /* Directory */\n\ntypedef struct\n{\n    FSIZE_t fsize;\n    BYTE fattrib;\n    char fname[256 + 1]; /* Object name */\n} FILINFO;\n\nEXTERN_C FRESULT f_opendir(DIR *dp,         /* [OUT] Pointer to the directory object structure */\n                           const char *path /* [IN] Directory name */\n);\n\nEXTERN_C FRESULT f_closedir(DIR *dp /* [IN] Pointer to the directory object */\n);\n\nEXTERN_C FRESULT f_findnext(DIR *dp,     /* [IN] Poninter to the directory object */\n                            FILINFO *fno /* [OUT] Pointer to the file information structure */\n);\n\nEXTERN_C const char *stristr(const char *str1, const char *str2);"
  },
  {
    "path": "src/test.cxx",
    "content": "\n#include <algorithm>\n#include <cstring>\n#include <fstream>\n#include <inttypes.h>\n#include <iostream>\n#include <map>\n#include <vector>\n\n#include \"../lib/misc/noise.hxx\"\n#include \"../lib/plaits/dsp/oscillator/oscillator.h\"\n#include \"../lib/plaits/resources.h\"\n\n#define ASSERT_EQ(val1, val2)                                                                                          \\\n    if (((val1) != (val2)))                                                                                            \\\n    {                                                                                                                  \\\n        std::cout << \"ASSERT FAILED: \" << __FILE__ << \":\" << __LINE__ << \": \" << #val1 << \" != \" << val2 << std::endl; \\\n        exit(1);                                                                                                       \\\n    }                                                                                                                  \\\n    else                                                                                                               \\\n        std::cout << \"ASSERT OK: \" << __FILE__ << \":\" << __LINE__ << \": \" << #val1 << \" == \" << val2 << std::endl;\n\n#define ASSERT_NEQ(val1, val2)                                                                                         \\\n    if (((val1) == (val2)))                                                                                            \\\n    {                                                                                                                  \\\n        std::cout << \"ASSERT FAILED: \" << __FILE__ << \":\" << __LINE__ << \": \" << #val1 << \" != \" << val2 << std::endl; \\\n        exit(1);                                                                                                       \\\n    }                                                                                                                  \\\n    else                                                                                                               \\\n        std::cout << \"ASSERT OK: \" << __FILE__ << \":\" << __LINE__ << \": \" << #val1 << \" == \" << val2 << std::endl;\n\nvoid write_wav(const std::vector<int16_t> &buffer, int nchannels, const std::string &fileName)\n{\n    typedef struct WAV_HEADER\n    {\n        /* RIFF Chunk Descriptor */\n        uint8_t RIFF[4] = {'R', 'I', 'F', 'F'}; // RIFF Header Magic header\n        uint32_t ChunkSize;                     // RIFF Chunk Size\n        uint8_t WAVE[4] = {'W', 'A', 'V', 'E'}; // WAVE Header\n        /* \"fmt\" sub-chunk */\n        uint8_t fmt[4] = {'f', 'm', 't', ' '}; // FMT header\n        uint32_t Subchunk1Size = 16;           // Size of the fmt chunk\n        uint16_t AudioFormat = 1;              // Audio format 1=PCM,6=mulaw,7=alaw,     257=IBM\n                                               // Mu-Law, 258=IBM A-Law, 259=ADPCM\n        uint16_t NumOfChan = 1;                // Number of channels 1=Mono 2=Sterio\n        uint32_t SamplesPerSec = 48000;        // Sampling Frequency in Hz\n        uint32_t bytesPerSec = 48000 * 2;      // bytes per second\n        uint16_t blockAlign = 2;               // 2=16-bit mono, 4=16-bit stereo\n        uint16_t bitsPerSample = 16;           // Number of bits per sample\n        /* \"data\" sub-chunk */\n        uint8_t Subchunk2ID[4] = {'d', 'a', 't', 'a'}; // \"data\"  string\n        uint32_t Subchunk2Size;                        // Sampled data length\n    } wav_hdr;\n\n    static_assert(sizeof(wav_hdr) == 44, \"\");\n\n    auto fsize = buffer.size() * sizeof(int16_t);\n    std::string in_name = \"test.bin\"; // raw pcm data without wave header\n\n    wav_hdr wav;\n    wav.NumOfChan = nchannels;\n    wav.blockAlign *= nchannels;\n    wav.ChunkSize = -1; //fsize + sizeof(wav_hdr) - 8;\n    wav.Subchunk2Size = -1; //fsize;\n\n    std::ofstream out(fileName, std::ios::binary);\n    out.write(reinterpret_cast<const char *>(&wav), sizeof(wav));\n    out.write(reinterpret_cast<const char *>(&buffer[0]), fsize);\n}\n\nint nchannels = 1;\nstd::vector<int16_t> buffer;\n\n#define clock scclock\n\nextern void (*__midi_event_handler_ptr)();\nextern void (*__ui_event_handler_ptr)();\n\nvoid __ui_event_handler()\n{\n}\n\n#define NO_UI_EVENT_HANDLER\n#define NO_MIDI_EVENT_HANDLER\n#include \"squares-and-circles-api.h\"\n\nUI_EVENT_t *__ui_event = nullptr;\nMIDI_EVENT_t *__midi_event = nullptr;\n\nuint8_t *__clock = new uint8_t[1];\nuint8_t *__step = new uint8_t[1];\nuint32_t *__step_changed = new uint32_t[1];\n\nfloat *__audio_in_l_fp = new float[FRAME_BUFFER_SIZE];\nfloat *__audio_in_r_fp = new float[FRAME_BUFFER_SIZE];\nfloat **__audio_in_l_fpp = &__audio_in_l_fp;\nfloat **__audio_in_r_fpp = &__audio_in_r_fp;\n\nuint32_t *__engine_props = new uint32_t[1];\nuint32_t *__trig = new uint32_t[1];\nuint32_t *__gate = new uint32_t[1];\nuint32_t *__accent = new uint32_t[1];\nint32_t *__cv = new int32_t[1];\nuint32_t *__t = new uint32_t[1]{0};\nuint32_t *__samples_per_step = new uint32_t[1]{3000 / 2}; // 120BPM\n\nint32_t *_paramP = nullptr;\nint32_t _paramMax = 0;\n\nEXTERN_C\n{\n    void addParam_f32(const char *name, float *value, float min = 0.f, float max = 1.f) // min...max\n    {\n    }\n    void addParam_i32(const char *name, int32_t *value, int32_t min, int32_t max, const char **valueMap) // 0...max\n    {\n        if (_paramP == nullptr)\n        {\n            _paramP = value;\n            _paramMax = max;\n        }\n    }\n    void setParamName(const void *valuePtr, const char *name)\n    {\n    }\n    void drawRect(int x, int y, int w, int h)\n    {\n    }\n    void drawLine(int x0, int y0, int x1, int y1)\n    {\n    }\n    void drawString(int x, int y, const char *text, uint8_t font)\n    {\n    }\n    void fillRect(int x, int y, int w, int h)\n    {\n    }\n    void drawCircle(int x, int y, int r)\n    {\n    }\n    void drawXbm(int x, int y, int width, int height, const uint8_t *xbm)\n    {\n    }\n    void clearRect(int x, int y, int w, int h)\n    {\n    }\n\n    uint32_t getParamFlags(const void *valuePtr)\n    {\n        return 0;\n    }\n\n    bool qz_enabled()\n    {\n        return true;\n    }\n    int16_t qz_lookup(int8_t note)\n    {\n        // return ((int32_t)note - 64) << 7;\n        return ((int32_t)note - DEFAULT_NOTE) * (PITCH_PER_OCTAVE / 12);\n    }\n\n    int32_t qz_process(int32_t pitch, int8_t *note)\n    {\n        return pitch;\n    }\n\n    void drawWaveform(void *wavefrom, int x = 0, int y = -1)\n    {\n    }\n\n    // 1V == PITCH_PER_OCTAVE, 5V == 5 * PITCH_PER_OCTAVE\n\n    float *__output_f32[6] = {};\n    int16_t *__output_i16[6] = {};\n\n    float *outputBuffer_f32(const char *name)\n    {\n        for (auto &o : __output_f32)\n        {\n            if (o == nullptr)\n            {\n                o = new float[FRAME_BUFFER_SIZE];\n                return o;\n            }\n        }\n    }\n\n    int _oi = -1;\n    int16_t *outputBuffer_i16(const char *name)\n    {\n        for (auto &o : __output_i16)\n        {\n            if (o == nullptr)\n            {\n                o = new int16_t[FRAME_BUFFER_SIZE];\n                return o;\n            }\n        }\n    }\n}\n\n#define ENGINE_MODE_CV_OUT 1\n\nvoid write_frame()\n{\n    if (__output_i16[0] != nullptr)\n    {\n        for (int k = 0; k < FRAME_BUFFER_SIZE; k++)\n        {\n            auto v = (float)(__output_i16[0][k]) / (5 * PITCH_PER_OCTAVE);\n            buffer.push_back(v * INT16_MAX);\n\n            if (__output_i16[1] != nullptr)\n            {\n                nchannels = 2;\n                v = (float)(__output_i16[1][k]) / (5 * PITCH_PER_OCTAVE);\n                buffer.push_back(v * INT16_MAX);\n            }\n        }\n    }\n    else\n    {\n        for (int k = 0; k < FRAME_BUFFER_SIZE; k++)\n        {\n            auto v = (__output_f32[0][k] * INT16_MAX);\n            CONSTRAIN(v, INT16_MIN, INT16_MAX);\n            buffer.push_back(v);\n\n            if (__output_f32[1] != nullptr)\n            {\n                nchannels = 2;\n                v = (__output_f32[1][k] * INT16_MAX);\n                CONSTRAIN(v, INT16_MIN, INT16_MAX);\n                buffer.push_back(v);\n            }\n        }\n    }\n}\n\n#include \"extern/eproms/lm2/CLAP.BIN.h\"\n#include \"../machine/src/base/sample.hxx\"\n\nint main()\n{\n    std::ofstream out(\"LM2-CLAP.bin\", std::ios::binary);\n\n    sample s(SAMPLE_FORMAT_AM6070, \"\", CLAP_BIN, sizeof(CLAP_BIN), 48000, 1);\n\n    for(size_t i = 0; i < sizeof(CLAP_BIN); i++)\n    {\n        auto f = s.get_i16(i);\n        out.write(reinterpret_cast<const char *>(&f), sizeof(f));\n    }\n\n    return 0;\n\n    engine::setup();\n\n    // engine::process();\n\n    WhiteNoise noise;\n    plaits::Oscillator osc;\n    osc.Init();\n    float phase_inc_ = 440.f / 2 / SAMPLE_RATE;\n\n    __cv[0] = 0; //-PITCH_PER_OCTAVE * 2;\n    // if (_paramP)\n    //     _paramP[0]--;\n\n    for (size_t i = 0; i < SAMPLE_RATE * 10; i += FRAME_BUFFER_SIZE)\n    {\n        __step_changed[0] = (i % 24000) == FRAME_BUFFER_SIZE ? 1 : 0;\n\n        for (size_t j = 0; j < FRAME_BUFFER_SIZE; j++)\n        {\n            __audio_in_l_fp[j] = noise.nextf(-1, 1);\n            __audio_in_r_fp[j] = noise.nextf(-1, 1);\n        }\n\n        osc.Render<plaits::OSCILLATOR_SHAPE_SAW>(phase_inc_, 0.5f, __audio_in_l_fp, FRAME_BUFFER_SIZE);\n        memcpy(__audio_in_r_fp, __audio_in_l_fp, sizeof(float) * FRAME_BUFFER_SIZE);\n\n        __trig[0] = (i % (SAMPLE_RATE / 2)) == 0;\n        __gate[0] = (i % (SAMPLE_RATE / 2)) < SAMPLE_RATE / 3;\n\n        // if (((i / SAMPLE_RATE) % 2) == 1)\n        //     __cv[0] = PITCH_PER_OCTAVE;\n        // else\n        //     __cv[0] = 0;\n\n        // if (i % (SAMPLE_RATE) == 0)\n        // {\n        //     if (_paramP)\n        //     {\n        //         _paramP[0]++;\n        //         if (_paramP[0] > _paramMax)\n        //             break;\n        //     }\n\n        //     __cv[0] = -PITCH_PER_OCTAVE * 2;\n        // }\n\n        engine::process();\n\n        __t[0]++;\n\n        if (__step_changed[0])\n        {\n            __step[0]++;\n            __step[0] %= 96;\n        }\n\n        write_frame();\n    }\n    for (int i = 0; i < FRAME_BUFFER_SIZE; i++)\n        printf(\"%x \", buffer[i]);\n    printf(\"\\n\");\n    write_wav(buffer, nchannels, \"test.wav\");\n    return 0;\n}"
  },
  {
    "path": "src/test.sh",
    "content": "\ncd $(dirname $0)/..\nset -ex\n\n\nexport GCC_PATH=$(realpath .)/.build/gcc_mingw64/bin/\nexport PATH=\"${PATH}:${GCC_PATH}\"\n\nCOVERAGE=\"\" #\"-coverage\"\n\ng++ -pg -g -m64 -O0 -coverage -I. -I./lib/ -I./extern/ -fpermissive -DTEST src/test.cxx src/SYNTH/DT303.cpp -o test.exe\n./test.exe\n#rm test.exe;\n\nif [[ $COVERAGE != \"\" ]]; then\n    [ -d .build/lcov-1.16/ ] || curl -L https://github.com/linux-test-project/lcov/releases/download/v1.16/lcov-1.16.tar.gz | tar xvz -C .build/\n    .build/lcov-1.16/bin/lcov --directory . --capture --output-file coverage.info\n    .build/lcov-1.16/bin/genhtml --demangle-cpp --dark-mode -o .test coverage.info\nfi\nrm *.gcda *.gcno gmon.out coverage.info"
  },
  {
    "path": "test/test_midi.sh",
    "content": "\nset -e\n\nint=$(amidi -l | tail -n -1 | cut -d' ' -f 3)\namidi -p $int -S \"F34D\"  # set CH 1,2,3,4\n\nRANDOM=1\nI=0\nN=52\nwhile true; do\n    for i in $(seq 0 100); do \n        PROG1=$((1 + $RANDOM % $N))\n        PROG2=$((1 + $RANDOM % $N))\n        PROG3=$((1 + $RANDOM % $N))\n        PROG4=$((1 + $RANDOM % $N))\n        #if [[ $PROG == \"x35\" || $PROG == \"33\" || $PROG == \"39\" || $PROG == \"40\" || $PROG == \"x41\" ]]; then continue; fi\n        \n        echo \"$I: $C -> $PROG1, $PROG2, $PROG3, $PROG4\"\n        amidi -p $int -S \"$(printf \"C%x%02x\" 0 $PROG1)\"\n        amidi -p $int -S \"$(printf \"C%x%02x\" 1 $PROG2)\"\n        amidi -p $int -S \"$(printf \"C%x%02x\" 2 $PROG3)\"\n        amidi -p $int -S \"$(printf \"C%x%02x\" 3 $PROG4)\"\n        \n        I=$(($I + 1))\n        #sleep 0.001\n    done\n    amidi -p $int -S \"F372\" #NEXT (press L)\ndone"
  }
]