[
  {
    "path": ".github/workflows/build.yml",
    "content": "name: build\n\non: [push, pull_request]\n\njobs:\n  linux:\n    strategy:\n      matrix:\n        target: [linux-arm64, linux-armhf, linux-riscv64, linux-x86_64]\n    runs-on: ubuntu-20.04\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - uses: distrho/dpf-cmake-action@v1\n        with:\n          dpf_path: ./modules/dpf\n          lto: true\n          pawpaw: true\n          target: ${{ matrix.target }}\n\n  macos:\n    env:\n      WELCOME_TXT: ${{ github.workspace }}/utils/macos-installer-welcome.txt\n    strategy:\n      matrix:\n        target: [macos-universal-10.15]\n    runs-on: macos-13\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - uses: distrho/dpf-cmake-action@v1\n        with:\n          dpf_path: ./modules/dpf\n          lto: true\n          pawpaw: true\n          target: ${{ matrix.target }}\n\n  windows:\n    strategy:\n      matrix:\n        target: [win64]\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - uses: distrho/dpf-cmake-action@v1\n        with:\n          dpf_path: ./modules/dpf\n          pawpaw: true\n          target: ${{ matrix.target }}\n      - uses: actions/upload-artifact@v4\n        with:\n          name: ${{ env.ARTIFACT_BASENAME }}-installer\n          path: |\n            *-installer.exe\n      - uses: softprops/action-gh-release@v1\n        if: startsWith(github.ref, 'refs/tags/')\n        with:\n          tag_name: ${{ github.ref_name }}\n          name: ${{ github.ref_name }}\n          draft: false\n          prerelease: false\n          files: |\n            *-installer.exe\n\n  wasm:\n    strategy:\n      matrix:\n        target: [standalone, mod]\n    runs-on: ubuntu-22.04\n    env:\n      EMSCRIPTEN_VERSION: 3.1.27\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - name: Set up cache\n        id: cache\n        uses: actions/cache@v4\n        with:\n          path: |\n            ~/emsdk\n          key: emsdk-v1\n      - name: Set up dependencies\n        run: |\n          sudo apt-get update -qq\n          sudo apt-get install -yqq brotli\n          mkdir bin\n          [ -d ~/emsdk ] || git clone https://github.com/emscripten-core/emsdk.git ~/emsdk\n          cd ~/emsdk && ./emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}\n      - name: Build simd-optimized\n        env:\n          AR: emar\n          CC: emcc\n          CXX: em++\n          NM: emnm\n          RANLIB: emranlib\n          STRIP: emstrip\n          PKG_CONFIG: false\n          CFLAGS: -O3 -ffast-math -fdata-sections -ffunction-sections -fno-strict-aliasing -flto -msse -msse2 -msse3 -msimd128\n          CXXFLAGS: -O3 -ffast-math -fdata-sections -ffunction-sections -fno-strict-aliasing -flto -msse -msse2 -msse3 -msimd128 -DPUGL_WASM_NO_KEYBOARD_INPUT -DPUGL_WASM_NO_MOUSEWHEEL_INPUT\n          LDFLAGS: -O3 -fdata-sections -ffunction-sections -fno-strict-aliasing -flto -Wl,--gc-sections -sAGGRESSIVE_VARIABLE_ELIMINATION=1 -Werror=lto-type-mismatch\n        run: |\n          source ~/emsdk/emsdk_env.sh\n          make -C src/standalone features\n          make -C src/standalone NOOPT=true MOD_BUILD=${{ matrix.target == 'mod' }} -j $(nproc)\n          mv build/bin/*.* bin/\n      - name: Cleanup\n        run: |\n          rm -rf build modules/dpf/build\n      - name: Build non-optimized\n        env:\n          AR: emar\n          CC: emcc\n          CXX: em++\n          NM: emnm\n          RANLIB: emranlib\n          STRIP: emstrip\n          PKG_CONFIG: false\n          CFLAGS: -O3 -ffast-math -fdata-sections -ffunction-sections -fno-strict-aliasing -flto\n          CXXFLAGS: -O3 -ffast-math -fdata-sections -ffunction-sections -fno-strict-aliasing -flto -DPUGL_WASM_NO_KEYBOARD_INPUT -DPUGL_WASM_NO_MOUSEWHEEL_INPUT\n          LDFLAGS: -O3 -fdata-sections -ffunction-sections -fno-strict-aliasing -flto -Wl,--gc-sections -sAGGRESSIVE_VARIABLE_ELIMINATION=1 -Werror=lto-type-mismatch\n        run: |\n          source ~/emsdk/emsdk_env.sh\n          make -C src/standalone features\n          make -C src/standalone NOOPT=true NOSIMD=true MOD_BUILD=${{ matrix.target == 'mod' }} -j $(nproc)\n          mv build/bin/*.* bin/\n      - name: Pack binaries\n        run: |\n          cd bin\n          brotli -k -q 11 *.*\n          zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}.zip $(ls *.*)\n      - uses: actions/upload-artifact@v4\n        with:\n          name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}\n          path: |\n            *.zip\n\n  pluginval:\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - uses: distrho/dpf-cmake-action@v1\n        with:\n          dpf_path: ./modules/dpf\n          target: pluginval\n\n  source:\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n      - uses: distrho/dpf-cmake-action@v1\n        with:\n          dpf_path: ./modules/dpf\n          target: source\n"
  },
  {
    "path": ".gitignore",
    "content": "*~\n*.exe\n*.kdev4\n*.json\n.DS_Store\n.cache\n/build/\n/resources/\n!/files/*.json\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"dpf\"]\n\tpath = modules/dpf\n\turl = https://github.com/DISTRHO/DPF.git\n[submodule \"rtneural\"]\n\tpath = modules/rtneural\n\turl = https://github.com/jatinchowdhury18/RTNeural.git\n[submodule \"modules/FFTConvolver\"]\n\tpath = modules/FFTConvolver\n\turl = https://github.com/falkTX/FFTConvolver.git\n[submodule \"modules/r8brain\"]\n\tpath = modules/r8brain\n\turl = https://github.com/avaneev/r8brain-free-src.git\n[submodule \"modules/dpf\"]\n\tpath = modules/dpf\n\turl = https://github.com/DISTRHO/DPF.git\n[submodule \"modules/rtneural\"]\n\tpath = modules/rtneural\n\turl = https://github.com/jatinchowdhury18/RTNeural.git\n[submodule \"modules/dr_libs\"]\n\tpath = modules/dr_libs\n\turl = https://github.com/mackron/dr_libs.git\n[submodule \"modules/dpf-widgets\"]\n\tpath = modules/dpf-widgets\n\turl = https://github.com/DISTRHO/DPF-Widgets.git\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.15)\nproject(AIDA-X VERSION 1.1.0)\n\nset(CMAKE_POLICY_DEFAULT_CMP0063 NEW)\nset(CMAKE_POLICY_DEFAULT_CMP0069 NEW)\n\nset(CMAKE_C_STANDARD 11)\nset(CMAKE_CXX_STANDARD 17)\n\nset(CMAKE_C_VISIBILITY_PRESET hidden)\nset(CMAKE_CXX_VISIBILITY_PRESET hidden)\nset(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)\n\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -DDISTRHO_NAMESPACE=AidaDISTRHO -DDGL_NAMESPACE=AidaDGL\")\n\n# if(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(amd64|AMD64|i.86|x64|X64|x86|x86_64|X86)$\")\n#   set(PREFER_RTNEURAL_XSIMD TRUE)\n# else()\nset(PREFER_RTNEURAL_XSIMD FALSE)\n# endif()\nset(RTNEURAL_XSIMD ${PREFER_RTNEURAL_XSIMD} CACHE BOOL \"Use RTNeural with this backend\")\nmessage(\"RTNEURAL_XSIMD in ${CMAKE_PROJECT_NAME} = ${RTNEURAL_XSIMD}, using processor type ${CMAKE_SYSTEM_PROCESSOR} and system name ${CMAKE_SYSTEM_NAME}\")\n\nadd_subdirectory(modules/dpf)\nadd_subdirectory(modules/rtneural)\n\nfind_package(Threads REQUIRED)\nset_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)\n\ndpf_add_plugin(AIDA-X\n  TARGETS au clap lv2 vst2 vst3\n  #NO_SHARED_RESOURCES\n  UI_TYPE opengl\n  USE_FILE_BROWSER\n  FILES_DSP\n    Files.cpp\n    modules/FFTConvolver/AudioFFT.cpp\n    modules/FFTConvolver/FFTConvolver.cpp\n    modules/FFTConvolver/TwoStageFFTConvolver.cpp\n    modules/FFTConvolver/Utilities.cpp\n    modules/r8brain/pffft.cpp\n    modules/r8brain/r8bbase.cpp\n    src/aidadsp-plugin.cpp\n    src/Biquad.cpp\n    src/3rd-party.cpp\n  FILES_UI\n    Graphics.cpp\n    src/aidadsp-ui.cpp)\n\ndpf_add_plugin(AIDA-X-Standalone\n  TARGETS jack\n  #NO_SHARED_RESOURCES\n  UI_TYPE opengl\n  USE_FILE_BROWSER\n  FILES_DSP\n    Files.cpp\n    modules/FFTConvolver/AudioFFT.cpp\n    modules/FFTConvolver/FFTConvolver.cpp\n    modules/FFTConvolver/TwoStageFFTConvolver.cpp\n    modules/FFTConvolver/Utilities.cpp\n    modules/r8brain/pffft.cpp\n    modules/r8brain/r8bbase.cpp\n    src/aidadsp-plugin.cpp\n    src/Biquad.cpp\n    src/3rd-party.cpp\n  FILES_UI\n    Graphics.cpp\n    modules/dpf-widgets/opengl/Blendish.cpp\n    src/aidadsp-ui.cpp)\n\ntarget_compile_definitions(dgl-opengl PUBLIC\n  DGL_NAMESPACE=AidaDGL\n  DGL_WINDOWS_ICON_ID=401\n  NVG_FONT_TEXTURE_FLAGS=NVG_IMAGE_NEAREST\n)\n\ntarget_include_directories(AIDA-X PUBLIC\n  src\n  src/plugin\n  modules/dr_libs\n  modules/FFTConvolver\n  modules/r8brain\n  modules/rtneural\n  ${CMAKE_BINARY_DIR}\n)\n\ntarget_include_directories(AIDA-X-Standalone PUBLIC\n  src\n  src/standalone\n  modules/dpf-widgets/opengl\n  modules/dr_libs\n  modules/FFTConvolver\n  modules/r8brain\n  modules/rtneural\n  ${CMAKE_BINARY_DIR}\n)\n\n# needed for enabling SSE in pffft\nif(CMAKE_SYSTEM_PROCESSOR MATCHES \"^(i.86|x86|X86)$\")\n  target_compile_definitions(AIDA-X PUBLIC i386)\n  target_compile_definitions(AIDA-X-Standalone PUBLIC i386)\nendif()\n\n# needed for emscripten\nif(EMSCRIPTEN)\n  target_compile_definitions(RTNeural PUBLIC EIGEN_DONT_VECTORIZE=1)\nendif()\n\n# needed for RISC-V\nif(CMAKE_SYSTEM_PROCESSOR MATCHES \"riscv64\")\n  set(CMAKE_OPTIONAL_LIBATOMIC \"-latomic\")\nendif()\n\ntarget_link_libraries(AIDA-X PUBLIC RTNeural ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_OPTIONAL_LIBATOMIC})\ntarget_link_libraries(AIDA-X-Standalone PUBLIC RTNeural ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_OPTIONAL_LIBATOMIC})\n\n# convert data into code\nadd_custom_command(\n  PRE_BUILD\n  COMMAND ${CMAKE_SOURCE_DIR}/modules/dpf/utils/res2c.py Files ${CMAKE_SOURCE_DIR}/files ${CMAKE_BINARY_DIR}\n  MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/files\n  OUTPUT Files.cpp\n  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}\n)\n\nadd_custom_command(\n  PRE_BUILD\n  COMMAND ${CMAKE_SOURCE_DIR}/modules/dpf/utils/res2c.py Graphics ${CMAKE_SOURCE_DIR}/graphics/png ${CMAKE_BINARY_DIR}\n  MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/graphics\n  OUTPUT Graphics.cpp\n  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}\n)\n\n# set up extra standalone details\nset_target_properties(AIDA-X-Standalone-jack PROPERTIES OUTPUT_NAME \"AIDA-X\")\n\nif(APPLE)\nset_target_properties(AIDA-X-Standalone-jack PROPERTIES\n  MACOSX_BUNDLE TRUE\n  MACOSX_BUNDLE_INFO_PLIST \"${CMAKE_SOURCE_DIR}/utils/Info.plist\"\n)\nadd_custom_command(\n  POST_BUILD\n  COMMAND cmake -E copy \"${CMAKE_SOURCE_DIR}/utils/ax.icns\" \"${CMAKE_BINARY_DIR}/bin/AIDA-X.app/Contents/Resources/ax.icns\"\n  DEPENDS AIDA-X-Standalone-jack\n  OUTPUT \"${CMAKE_BINARY_DIR}/bin/AIDA-X.app/Contents/Resources/ax.icns\"\n)\nadd_custom_target(AIDA-X-App ALL\n  DEPENDS \"${CMAKE_BINARY_DIR}/bin/AIDA-X.app/Contents/Resources/ax.icns\"\n)\nelseif(WIN32)\ntarget_sources(AIDA-X-Standalone-jack PUBLIC utils/ax.rc)\nendif()\n\n# set up windows installer\nif(WIN32 AND MINGW)\nadd_custom_command(\n  POST_BUILD\n  COMMAND utils/windows-installer.sh \"${CMAKE_BINARY_DIR}\" \"${CMAKE_PROJECT_VERSION}\"\n  DEPENDS AIDA-X-clap AIDA-X-lv2 AIDA-X-lv2-ui AIDA-X-vst2 AIDA-X-vst3 AIDA-X-Standalone-jack\n  OUTPUT \"${CMAKE_SOURCE_DIR}/utils/inno/AIDA-X-${CMAKE_PROJECT_VERSION}-win64-installer.exe\"\n  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\n)\nadd_custom_target(AIDA-X-Installer ALL\n  DEPENDS \"${CMAKE_SOURCE_DIR}/utils/inno/AIDA-X-${CMAKE_PROJECT_VERSION}-win64-installer.exe\"\n)\nendif()\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n"
  },
  {
    "path": "README.md",
    "content": "# AIDA-X\n\n![screenshot](docs/Screenshot.png \"Screenshot\")\n\nAIDA-X is an Amp Model Player, allowing it to load models of AI trained music gear, which you can then play through! 🎸\n\nIts main intended use is to provide high fidelity simulations of amplifiers.  \nHowever, it is also possible to run entire signal chains consisting of any combination of amp, cab, dist, drive, fuzz, boost and eq.\n\nThis repository contains the source code for the [DPF-based](https://github.com/DISTRHO/DPF) plugin variant, see [aidadsp-lv2](https://github.com/AidaDSP/aidadsp-lv2) for the LV2 headless version of the same engine optimized to run on embedded systems such as [MOD Dwarf](https://mod.audio/dwarf/), RPi, Portenta-X8, Aida DSP OS and so on.\n\nFor ease of use, this plugin also contains a cabinet simulator via impulse response files, which runs after the Amp Model.\n\nCLAP, LV2, VST2 and VST3 plugin formats are supported, plus a standalone.\n\n### Installation ###\n\n[Click here to access the latest stable release](https://github.com/AidaDSP/AIDA-X/releases/latest).\n\nInstallers are provided for both macOS and Windows, plus regular binary tarballs for Linux.\n\nDo note **these builds are not signed**, so expect warnings saying they are from an \"untrusted developer\".  \nThis is particularly striking on macOS, where the plugin installer can only be opened with mouse right-click and the standalone app must be opened via right-click twice.\n\nSo-called \"nightly builds\" are available through [GitHub actions](https://github.com/AidaDSP/AIDA-X/actions/workflows/build.yml).\n\nAlternatively an experimental online version is available at [mod.audio/aida-x-online](https://mod.audio/aida-x-online/).  \nThere is no audio input, instead a pre-selected list of guitar audio loops is used.  \nThis online version is otherwise fully functional and identical to the desktop version you can install and run on your machine.\n\n### User Manual ###\n\n#### Loading files ####\n\nAIDA-X comes built-in with a single Amp Model and Cabinet IR.  \nClick on the related filename to open a file browser and load a different file.  \nThe little icon on the left side allows to turn on/off the Amp Model and Cabinet IR.  \nBoth wav and flac audio formats are supported for IR files.\n\n<img height=\"91\" alt=\"image\" src=\"https://raw.githubusercontent.com/AidaDSP/AIDA-X/main/docs/Screenshot-files.png\">\n\nA quick model pack can be downloaded from [our Google Drive folder](https://drive.google.com/drive/folders/18MwNhuo9fjK8hlne6SAdhpGtL4bWsVz-).\n\nCheck out the [MOD Forum's Neural Modelling section](https://forum.mod.audio/c/neural/62) for an online place for discussion, sharing and all things related to Amp Models.\n\n#### Meters ####\n\nThe AIDA-X UI contains input and output meters, for ease of monitoring the sound.  \nThese are peak meters calculated at a maximum of 60 FPS.\n\nBoth meters will change colors to indicate when sound is clipping.  \nWhen -3dB is reached the meters turn yellow, and on 0dB they turn red.  \nThe meters will change back to the previous color once the audio signal falls below -3dB of their tripping point (so -6dB for yellow, -3dB for red).\n\n#### Controls ####\n\nIn AIDA-X knobs will move slowly when holding down the Ctrl key.  \nHolding down the Shift key or double-clicking a knob will reset it to its default value.  \nPlease note not all hosts and formats support sending these modifier keys to plugins.\n\nFrom left to right:\n\n1. **Bypass and Input Level**\n\n<img height=\"112\" alt=\"image\" src=\"https://raw.githubusercontent.com/AidaDSP/AIDA-X/main/docs/Screenshot-params-1.png\">\n\nOn/Off bypass switch, lets the audio pass-through when off.  \nIntegrates with the host provided bypass controls where possible.\n\nInput Level attenuates / emphasizes the input signal before sending it to the Amp Model.\n\n2. **EQ tone controls (part 1)**\n\n<img height=\"112\" alt=\"image\" src=\"https://raw.githubusercontent.com/AidaDSP/AIDA-X/main/docs/Screenshot-params-2.png\">\n\nPre/Post switch changes the position of the tone controls, either running before or after the Amp Model.\n\nBandpass/Peak switch changes the MID control to Bandpass so that BASS and TREBLE will be excluded. Default setting for MID control is Peaking or Parametric EQ with adjustable Frequency and Q.\n\n3. **EQ tone controls (part 2)**\n\n<img height=\"112\" alt=\"image\" src=\"https://raw.githubusercontent.com/AidaDSP/AIDA-X/main/docs/Screenshot-params-3.png\">\n\nExtra EQ related controls.  \nDepth is a Peaking or Parametric EQ to boost the low end.  \nPresence is an High Shelf EQ to boost the high end.\n\n4. **Output Level**\n\n<img height=\"112\" alt=\"image\" src=\"https://raw.githubusercontent.com/AidaDSP/AIDA-X/main/docs/Screenshot-params-4.png\">\n\nFor a final gain compensation, does not apply to the bypassed signal.\n\n#### Using the Standalone ####\n\nWhen first run the AIDA-X standalone will not make any sound, requiring you to click \"Enable Input\" (which can trigger OS-level permission requests).  \nThis is to avoid unintended audio feedback loops when someone simply wants to check out the GUI or AIDA-X was started by accident.\n\nAfter enabling audio input, an option for setting the audio buffer-size will be shown.  \nReducing buffer-size will reduce latency but at cost of more CPU.  \nThe optimal value depends on the running system, slower machines cannot do small buffer-sizes without audio crackles.\n\nNOTE: The AIDA-X standalone will connect to your system-defined default audio device, for now there is no option to change to another input/output audio device.\n\n### Technical Details ###\n\nBehind the scenes AIDA-X uses [RTNeural](https://github.com/jatinchowdhury18/RTNeural), which does the heavy lifting for us.\n\nThe plugin format support together with the custom GUI is made with [DPF](https://github.com/DISTRHO/DPF), which allows a single codebase to export for many audio plugins at once (amongst other nice features).\n\nImpulse Response handling is done with the help of a custom fork of [FFTConvolver](https://github.com/falkTX/FFTConvolver.git), together with [r8brain-free-src](https://github.com/avaneev/r8brain-free-src.git) for runtime audio file resampling.\n\n#### Generate json models ####\n\nThis implies neural network training. Please follow:\n\n- [AIDA-X Model Trainer.ipynb](https://colab.research.google.com/github/AidaDSP/Automated-GuitarAmpModelling/blob/aidadsp_devel/AIDA_X_Model_Trainer.ipynb)\n\n### Building ###\n\nRequires cmake and OpenGL related developer packages.  \nFor building just do the usual cmake steps, like:\n\n```sh\ngit clone --recursive https://github.com/AidaDSP/AIDA-X.git && cd AIDA-X\nmkdir build && cd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build .\n```\n\nBinaries will be placed in `./build/bin`\n\n### License ###\n\nAIDA-X is licensed under `GPL-3.0-or-later`, see [LICENSE](LICENSE) for more details.\n"
  },
  {
    "path": "files/tw40_california_clean_deerinkstudios.json",
    "content": "{\n    \"in_shape\": [\n        null,\n        null,\n        1\n    ],\n    \"layers\": [\n        {\n            \"type\": \"lstm\",\n            \"activation\": \"\",\n            \"shape\": [\n                null,\n                null,\n                12\n            ],\n            \"weights\": [\n                [\n                    [\n                        -0.05898863077163696,\n                        0.05630207061767578,\n                        -0.010886353440582752,\n                        -0.039077065885066986,\n                        -0.019576767459511757,\n                        -0.0004906050162389874,\n                        0.04394367337226868,\n                        0.03217808157205582,\n                        0.060107968747615814,\n                        -0.031073851510882378,\n                        0.04744714871048927,\n                        0.026116250082850456,\n                        -0.06898219138383865,\n                        0.06051252782344818,\n                        0.02031611278653145,\n                        0.11878474056720734,\n                        0.011209400370717049,\n                        -0.08722781389951706,\n                        0.007508902810513973,\n                        0.011899957433342934,\n                        0.03165968507528305,\n                        0.07981367409229279,\n                        -0.07961057871580124,\n                        -0.02836543507874012,\n                        0.018126191571354866,\n                        0.7547421455383301,\n                        0.07785286754369736,\n                        -0.020921235904097557,\n                        0.1739613264799118,\n                        -0.02892882190644741,\n                        -0.7612541913986206,\n                        0.09544289857149124,\n                        0.08657906949520111,\n                        -0.40953391790390015,\n                        0.124151811003685,\n                        -0.3797035217285156,\n                        -0.03348651900887489,\n                        0.07236623764038086,\n                        -0.005588929634541273,\n                        -0.0446324497461319,\n                        -0.005948406644165516,\n                        0.0423315204679966,\n                        0.047528576105833054,\n                        0.04987810179591179,\n                        0.10823322832584381,\n                        0.0001607980375410989,\n                        -0.003037703689187765,\n                        0.01228737086057663\n                    ]\n                ],\n                [\n                    [\n                        -0.0793188139796257,\n                        -0.027052419260144234,\n                        0.011680861003696918,\n                        -0.2333230823278427,\n                        -0.08691032975912094,\n                        0.14434385299682617,\n                        -0.07432237267494202,\n                        -0.04311472177505493,\n                        0.06548870354890823,\n                        0.016066614538431168,\n                        0.047346122562885284,\n                        -0.013638966716825962,\n                        -0.13298997282981873,\n                        -0.07051331549882889,\n                        0.040480293333530426,\n                        0.08481722325086594,\n                        -0.03788358345627785,\n                        -0.14510013163089752,\n                        -0.10443750023841858,\n                        -0.007397918030619621,\n                        0.07510305196046829,\n                        -0.051527902483940125,\n                        0.04347001761198044,\n                        -0.035575464367866516,\n                        0.582352340221405,\n                        -0.21963149309158325,\n                        0.2954903841018677,\n                        0.3476758599281311,\n                        -0.010178825818002224,\n                        0.03154237940907478,\n                        -0.34173208475112915,\n                        -0.2786389887332916,\n                        -0.22743123769760132,\n                        0.08011166006326675,\n                        -0.1396312266588211,\n                        -0.16942813992500305,\n                        -0.06949443370103836,\n                        -0.001238407101482153,\n                        0.009098434820771217,\n                        -0.056939154863357544,\n                        -0.09114541113376617,\n                        0.019834449514746666,\n                        0.0036337850615382195,\n                        -0.014950613491237164,\n                        0.11897773295640945,\n                        0.0292977187782526,\n                        0.08119626343250275,\n                        -0.001555515918880701\n                    ],\n                    [\n                        -0.01946432888507843,\n                        -0.0024405408184975386,\n                        0.01934758760035038,\n                        0.1564074158668518,\n                        0.01041491236537695,\n                        -0.17440558969974518,\n                        0.0013255159137770534,\n                        -0.0023403207305818796,\n                        -0.007628831081092358,\n                        0.015593714080750942,\n                        0.016117053106427193,\n                        -0.007150133140385151,\n                        0.029352407902479172,\n                        -0.024870214983820915,\n                        -0.020173879340291023,\n                        0.07293161004781723,\n                        0.024351397529244423,\n                        -0.029371222481131554,\n                        0.014667266979813576,\n                        0.03998351842164993,\n                        0.027778437361121178,\n                        0.0250936821103096,\n                        0.0016887228703126311,\n                        0.026270687580108643,\n                        -0.020929506048560143,\n                        0.010087084025144577,\n                        -1.0725936889648438,\n                        -0.2610797882080078,\n                        -0.28118789196014404,\n                        -0.4455985128879547,\n                        -0.32627326250076294,\n                        -0.3223588764667511,\n                        0.06710755825042725,\n                        -0.10433804243803024,\n                        -0.027460815384984016,\n                        0.37806135416030884,\n                        0.009884815663099289,\n                        -0.010380225256085396,\n                        0.02426254004240036,\n                        0.05168253555893898,\n                        0.022874798625707626,\n                        -0.09369008243083954,\n                        0.012187192216515541,\n                        0.005151587538421154,\n                        -0.0038799906615167856,\n                        0.014318480156362057,\n                        -0.02248925156891346,\n                        -0.007768344599753618\n                    ],\n                    [\n                        -0.05902744457125664,\n                        0.06631449609994888,\n                        0.02067490667104721,\n                        -0.08170861750841141,\n                        -0.025264248251914978,\n                        0.13590015470981598,\n                        0.02331666462123394,\n                        0.026017362251877785,\n                        -0.022931350395083427,\n                        0.07141393423080444,\n                        0.04379406198859215,\n                        0.019504817202687263,\n                        -0.11317358165979385,\n                        0.07406723499298096,\n                        0.0624559260904789,\n                        -0.038679514080286026,\n                        -0.061875250190496445,\n                        0.0689534842967987,\n                        0.009195485152304173,\n                        -0.022969039157032967,\n                        -0.0570397675037384,\n                        0.04113313555717468,\n                        0.06875573843717575,\n                        0.024644523859024048,\n                        -0.2295060157775879,\n                        0.27110546827316284,\n                        0.018232593312859535,\n                        0.5630152225494385,\n                        -0.22019940614700317,\n                        0.6189771890640259,\n                        0.33046549558639526,\n                        -0.8189554810523987,\n                        -0.5247683525085449,\n                        -0.22545236349105835,\n                        -0.02480812929570675,\n                        -0.470574289560318,\n                        -0.06392114609479904,\n                        0.09076843410730362,\n                        0.030104968696832657,\n                        -0.07646241039037704,\n                        -0.03874566778540611,\n                        0.09235645085573196,\n                        0.045778218656778336,\n                        0.04847464710474014,\n                        -0.04494231939315796,\n                        0.05028892681002617,\n                        0.0922214463353157,\n                        0.01661495491862297\n                    ],\n                    [\n                        0.07328817248344421,\n                        -0.07174578309059143,\n                        0.07740603387355804,\n                        0.02678251825273037,\n                        0.011816843412816525,\n                        0.20387794077396393,\n                        -0.0346391536295414,\n                        0.07074512541294098,\n                        -0.10770377516746521,\n                        -0.08828005194664001,\n                        0.10177630186080933,\n                        0.10082787275314331,\n                        0.12903061509132385,\n                        -0.05503969267010689,\n                        0.18648675084114075,\n                        0.08111457526683807,\n                        0.21206027269363403,\n                        0.1678239107131958,\n                        0.1300879567861557,\n                        0.5315591096878052,\n                        -0.1236419677734375,\n                        -0.02909103035926819,\n                        0.1643085777759552,\n                        0.0259122084826231,\n                        -0.4954370856285095,\n                        0.06318090111017227,\n                        -0.2829713523387909,\n                        0.5429378747940063,\n                        0.4678765833377838,\n                        -0.06334687024354935,\n                        0.12588852643966675,\n                        0.601213812828064,\n                        -0.10658931732177734,\n                        0.13190427422523499,\n                        0.1304778754711151,\n                        0.0454736165702343,\n                        0.09923042356967926,\n                        -0.10203798115253448,\n                        0.10309150069952011,\n                        0.048486076295375824,\n                        0.001033567707054317,\n                        0.171586275100708,\n                        -0.01670539565384388,\n                        0.20085583627223969,\n                        -0.07271116226911545,\n                        0.006735347677022219,\n                        0.1897522211074829,\n                        0.11765561252832413\n                    ],\n                    [\n                        0.018419595435261726,\n                        -0.043496645987033844,\n                        -0.008100518956780434,\n                        0.07445574551820755,\n                        0.037217795848846436,\n                        -0.06303669512271881,\n                        -0.018344124779105186,\n                        0.04578922688961029,\n                        0.014917578548192978,\n                        -0.028367457911372185,\n                        -0.016907760873436928,\n                        -0.0061192624270915985,\n                        0.018878880888223648,\n                        0.004543134942650795,\n                        0.013081389479339123,\n                        -0.11758122593164444,\n                        0.045714862644672394,\n                        -0.008235564455389977,\n                        -0.05555355176329613,\n                        0.05147086828947067,\n                        0.030494917184114456,\n                        -0.06598185002803802,\n                        -0.0854995921254158,\n                        -0.010118167847394943,\n                        0.157124325633049,\n                        -0.03968239948153496,\n                        -0.05862973630428314,\n                        -0.089189313352108,\n                        0.2614654302597046,\n                        0.03867584839463234,\n                        0.2264309972524643,\n                        0.4591827094554901,\n                        0.2972766160964966,\n                        0.1757863610982895,\n                        -0.17842495441436768,\n                        -0.22381404042243958,\n                        0.04616567865014076,\n                        -0.05058153718709946,\n                        -0.0035381054040044546,\n                        0.027564695104956627,\n                        0.05486015975475311,\n                        -0.0349450558423996,\n                        0.0034176663029938936,\n                        0.07733222097158432,\n                        0.026142962276935577,\n                        0.02607606165111065,\n                        0.00742773711681366,\n                        -0.002533257007598877\n                    ],\n                    [\n                        -0.03604131191968918,\n                        0.05865994468331337,\n                        -0.10791130363941193,\n                        -0.15994617342948914,\n                        0.024152694270014763,\n                        0.12165537476539612,\n                        -0.046060651540756226,\n                        0.11544187366962433,\n                        0.1978446990251541,\n                        0.09827839583158493,\n                        -0.1853754222393036,\n                        -0.017721299082040787,\n                        -0.19055341184139252,\n                        0.03692357987165451,\n                        -0.11515706032514572,\n                        -0.2141268104314804,\n                        -0.1855292022228241,\n                        0.16081029176712036,\n                        -0.09767714887857437,\n                        -0.470858633518219,\n                        0.11756254732608795,\n                        0.06059033051133156,\n                        -0.30719947814941406,\n                        -0.03635033965110779,\n                        -0.25452885031700134,\n                        -0.08724755048751831,\n                        -0.3256053626537323,\n                        -0.033323220908641815,\n                        0.14931534230709076,\n                        0.6180065870285034,\n                        0.19153554737567902,\n                        0.48976007103919983,\n                        -0.2513343393802643,\n                        0.04459722712635994,\n                        0.19219614565372467,\n                        -0.05924699828028679,\n                        -0.04287481680512428,\n                        0.08530718833208084,\n                        -0.11028828471899033,\n                        -0.11299681663513184,\n                        0.05438674986362457,\n                        0.08714635670185089,\n                        -0.01920047588646412,\n                        -0.09835448116064072,\n                        0.18006393313407898,\n                        0.08711525052785873,\n                        -0.17238208651542664,\n                        -0.013066350482404232\n                    ],\n                    [\n                        0.09592802077531815,\n                        -0.00570167601108551,\n                        0.045773644000291824,\n                        0.17280510067939758,\n                        0.06746100634336472,\n                        -0.09060688316822052,\n                        -0.027767762541770935,\n                        0.016517754644155502,\n                        0.02240608073771,\n                        0.022745603695511818,\n                        -0.09105997532606125,\n                        0.027903253212571144,\n                        0.13367636501789093,\n                        0.02321668714284897,\n                        -0.06273628771305084,\n                        -0.05357843264937401,\n                        -0.0029779274482280016,\n                        0.18671727180480957,\n                        0.03510785847902298,\n                        -0.11223504692316055,\n                        0.0670999139547348,\n                        0.04043671488761902,\n                        -0.04564659669995308,\n                        0.06574060022830963,\n                        -0.5037927627563477,\n                        0.5054494738578796,\n                        0.1835131198167801,\n                        0.04914127290248871,\n                        0.2114180326461792,\n                        -0.20771749317646027,\n                        0.22908803820610046,\n                        0.05944269523024559,\n                        -0.15441961586475372,\n                        0.28815770149230957,\n                        -0.5639021992683411,\n                        -0.6280796527862549,\n                        0.0816679522395134,\n                        0.002979764249175787,\n                        0.04486352950334549,\n                        0.048631928861141205,\n                        0.044666554778814316,\n                        0.000286087510176003,\n                        -0.020040467381477356,\n                        -0.029722100123763084,\n                        -0.016842948272824287,\n                        -0.034353673458099365,\n                        -0.07932363450527191,\n                        0.03030124120414257\n                    ],\n                    [\n                        -0.10204287618398666,\n                        -0.008088729344308376,\n                        -0.0118712792173028,\n                        0.11562184989452362,\n                        0.01014383789151907,\n                        -0.12020894140005112,\n                        0.03467831015586853,\n                        0.05984649434685707,\n                        -0.012706486508250237,\n                        0.106559157371521,\n                        0.049972981214523315,\n                        0.02596456930041313,\n                        -0.07615009695291519,\n                        0.01075754500925541,\n                        0.025195598602294922,\n                        -0.17616118490695953,\n                        -0.040839504450559616,\n                        0.13021773099899292,\n                        -0.061818771064281464,\n                        -0.02353087067604065,\n                        0.016990380361676216,\n                        0.07330319285392761,\n                        -0.04886794090270996,\n                        0.05784911289811134,\n                        -0.03556215390563011,\n                        0.23685325682163239,\n                        0.6407221555709839,\n                        -0.10358147323131561,\n                        0.06774327903985977,\n                        -0.07717033475637436,\n                        -0.2544534504413605,\n                        0.3824143409729004,\n                        0.3117104172706604,\n                        -0.1995951384305954,\n                        -0.31277909874916077,\n                        0.2690069079399109,\n                        -0.017686299979686737,\n                        -0.028017546981573105,\n                        0.0028745420277118683,\n                        -0.038207218050956726,\n                        0.07780726999044418,\n                        -0.06684273481369019,\n                        0.07587195187807083,\n                        0.0013493584701791406,\n                        -0.011993312276899815,\n                        0.12963871657848358,\n                        0.045552849769592285,\n                        0.026788676157593727\n                    ],\n                    [\n                        -0.019033119082450867,\n                        0.041453465819358826,\n                        0.022784564644098282,\n                        0.04424155503511429,\n                        0.018716298043727875,\n                        -0.08443690836429596,\n                        -0.05151226744055748,\n                        0.03541351109743118,\n                        0.03333032503724098,\n                        -0.0023380497004836798,\n                        0.03580097109079361,\n                        -0.005257689859718084,\n                        -0.04381934180855751,\n                        0.0720822885632515,\n                        -0.030158666893839836,\n                        -0.03026004694402218,\n                        -0.0022760212887078524,\n                        -0.12203273922204971,\n                        -0.061329446732997894,\n                        0.009529082104563713,\n                        0.07395824044942856,\n                        -0.0008013831102289259,\n                        0.031227584928274155,\n                        0.0305965393781662,\n                        0.4512558877468109,\n                        -0.264207124710083,\n                        0.00037807560875080526,\n                        -0.15876039862632751,\n                        0.014644665643572807,\n                        -0.13844947516918182,\n                        0.2868516147136688,\n                        -0.4342450201511383,\n                        0.266605019569397,\n                        0.17747153341770172,\n                        0.3647651970386505,\n                        -0.3260992765426636,\n                        -0.009145485237240791,\n                        0.03071029670536518,\n                        0.025670047849416733,\n                        0.01071944274008274,\n                        0.03943467512726784,\n                        -0.03764193877577782,\n                        -0.0038499715737998486,\n                        0.06749791651964188,\n                        0.040306102484464645,\n                        0.023346811532974243,\n                        0.03968048095703125,\n                        -0.0023260382004082203\n                    ],\n                    [\n                        0.028820373117923737,\n                        -0.15549825131893158,\n                        -0.08275093883275986,\n                        0.04465259611606598,\n                        0.02295120805501938,\n                        -0.15962737798690796,\n                        -0.024931281805038452,\n                        0.00044077725033275783,\n                        -0.0665397122502327,\n                        -0.07732965052127838,\n                        -0.11310312896966934,\n                        -0.08153320848941803,\n                        0.03469299525022507,\n                        -0.08560243993997574,\n                        -0.0015893862582743168,\n                        -0.04210369661450386,\n                        0.07477640360593796,\n                        -0.12379424273967743,\n                        0.013534878380596638,\n                        0.22499969601631165,\n                        -0.04302450641989708,\n                        -0.18596956133842468,\n                        -0.09137720614671707,\n                        -0.05108800530433655,\n                        0.019652029499411583,\n                        0.4670862853527069,\n                        0.3024439811706543,\n                        -0.29388704895973206,\n                        -0.08350888639688492,\n                        -0.05714863911271095,\n                        -0.3629418611526489,\n                        -0.11729609966278076,\n                        -0.29326140880584717,\n                        0.12060926109552383,\n                        -0.12440314888954163,\n                        -0.2895152270793915,\n                        0.010647282935678959,\n                        -0.16823212802410126,\n                        -0.09827838838100433,\n                        0.003767287125810981,\n                        -0.0004781878087669611,\n                        -0.0917012020945549,\n                        -0.07186886668205261,\n                        0.09979111701250076,\n                        -0.08722002059221268,\n                        -0.13202591240406036,\n                        -0.11409639567136765,\n                        -0.08364791423082352\n                    ],\n                    [\n                        0.022941015660762787,\n                        0.09413576871156693,\n                        -0.032670021057128906,\n                        -0.12206535786390305,\n                        0.015534382313489914,\n                        0.20875439047813416,\n                        0.07650471478700638,\n                        0.0768689289689064,\n                        -0.00029186217579990625,\n                        -0.07806680351495743,\n                        0.03906555101275444,\n                        0.0053060841746628284,\n                        -0.03437412902712822,\n                        0.13308505713939667,\n                        0.033671144396066666,\n                        0.052591513842344284,\n                        0.014981459826231003,\n                        -0.024816740304231644,\n                        0.08277340233325958,\n                        0.07681667059659958,\n                        -0.05792652815580368,\n                        0.0626036524772644,\n                        0.04077454283833504,\n                        -0.05051802098751068,\n                        0.07286728173494339,\n                        -0.3154820203781128,\n                        0.35106348991394043,\n                        0.4169175624847412,\n                        -0.0008731710840947926,\n                        0.5395818948745728,\n                        -0.2062831073999405,\n                        -0.059440720826387405,\n                        0.02677965722978115,\n                        -0.2571689486503601,\n                        0.21911874413490295,\n                        -0.06484010815620422,\n                        -0.00917773600667715,\n                        0.08583217859268188,\n                        -0.03520501032471657,\n                        0.038707755506038666,\n                        0.005562137812376022,\n                        0.11912722140550613,\n                        -0.010728304274380207,\n                        0.12060315907001495,\n                        0.002989076543599367,\n                        -0.031573984771966934,\n                        0.04331955686211586,\n                        -0.00040015747072175145\n                    ],\n                    [\n                        -0.0834246426820755,\n                        0.040134117007255554,\n                        0.004651371389627457,\n                        0.014184198342263699,\n                        -0.057501357048749924,\n                        0.03173866495490074,\n                        0.0052817403338849545,\n                        -0.05222273990511894,\n                        -0.08152566105127335,\n                        -0.013926135376095772,\n                        0.03573121875524521,\n                        -0.002214024541899562,\n                        -0.06242382898926735,\n                        -0.003464262466877699,\n                        0.005072957836091518,\n                        0.10622959583997726,\n                        -0.03439037874341011,\n                        0.0339057557284832,\n                        -0.0015704019460827112,\n                        0.044501323252916336,\n                        -0.0993126854300499,\n                        -0.023647038266062737,\n                        0.12393776327371597,\n                        0.0002001540269702673,\n                        0.1582208126783371,\n                        -0.2932649254798889,\n                        0.7291964292526245,\n                        -0.022980421781539917,\n                        -0.5515120029449463,\n                        -0.18896536529064178,\n                        0.02416442520916462,\n                        -0.09977369010448456,\n                        -0.2666739821434021,\n                        0.07306834310293198,\n                        0.4306437373161316,\n                        0.3310043215751648,\n                        -0.07436531037092209,\n                        0.01633746735751629,\n                        0.005489571485668421,\n                        -0.03308270871639252,\n                        -0.053092338144779205,\n                        0.05220922455191612,\n                        -0.01324423961341381,\n                        -0.08853582292795181,\n                        -0.09445607662200928,\n                        -0.057199910283088684,\n                        0.03926706314086914,\n                        -0.018768925219774246\n                    ]\n                ],\n                [\n                    0.41986119747161865,\n                    0.6914668083190918,\n                    1.219938039779663,\n                    0.4047103524208069,\n                    0.191206693649292,\n                    0.3505482077598572,\n                    0.31509122252464294,\n                    1.021235466003418,\n                    0.24655281007289886,\n                    0.3424639403820038,\n                    0.5017417669296265,\n                    0.8069003820419312,\n                    0.4996081590652466,\n                    0.47252997756004333,\n                    0.020340830087661743,\n                    0.9144073724746704,\n                    0.17965619266033173,\n                    0.5910162925720215,\n                    0.6207900643348694,\n                    0.13599640130996704,\n                    0.745627760887146,\n                    0.7058007717132568,\n                    0.43212586641311646,\n                    0.42299389839172363,\n                    0.17080341279506683,\n                    0.012113343924283981,\n                    0.07701905071735382,\n                    0.07245365530252457,\n                    -0.11601302027702332,\n                    -0.08694203943014145,\n                    -0.00744415819644928,\n                    -0.12086378037929535,\n                    -0.04483747482299805,\n                    -0.17769338190555573,\n                    0.004657164216041565,\n                    -0.03556704893708229,\n                    0.45678144693374634,\n                    0.8241495490074158,\n                    1.2722725868225098,\n                    0.5486082434654236,\n                    0.40375155210494995,\n                    0.5388411283493042,\n                    0.9025862812995911,\n                    0.8596727848052979,\n                    0.5709847211837769,\n                    0.6245560646057129,\n                    0.6815146207809448,\n                    0.8776478171348572\n                ]\n            ]\n        },\n        {\n            \"type\": \"dense\",\n            \"activation\": \"\",\n            \"shape\": [\n                null,\n                null,\n                1\n            ],\n            \"weights\": [\n                [\n                    [\n                        -0.17564375698566437\n                    ],\n                    [\n                        0.0927455946803093\n                    ],\n                    [\n                        0.8920843601226807\n                    ],\n                    [\n                        -0.17358806729316711\n                    ],\n                    [\n                        0.33243975043296814\n                    ],\n                    [\n                        -0.17394134402275085\n                    ],\n                    [\n                        -0.3798992931842804\n                    ],\n                    [\n                        0.6587021946907043\n                    ],\n                    [\n                        -0.15090827643871307\n                    ],\n                    [\n                        -0.25001922249794006\n                    ],\n                    [\n                        -0.47294777631759644\n                    ],\n                    [\n                        -0.0821617990732193\n                    ]\n                ],\n                [\n                    0.007024657446891069\n                ]\n            ]\n        }\n    ],\n    \"input_batch\": [\n        5.0101938541047275e-05,\n        4.403779894346371e-05,\n        4.544026523944922e-06,\n        9.248426067642868e-05,\n        4.985023770132102e-05,\n        7.639748218934983e-05,\n        1.1646422535704914e-05,\n        3.2673600799171254e-05,\n        5.8096007705898955e-05,\n        4.980198718840256e-05,\n        5.2941046305932105e-05,\n        -3.758729508263059e-05,\n        7.047803228488192e-05,\n        3.131894118268974e-05,\n        6.36052354821004e-05,\n        4.4816846639150754e-05,\n        5.765173409599811e-05,\n        3.968120654462837e-05,\n        4.71033199573867e-05,\n        8.451977191725746e-05,\n        0.0001424822403350845,\n        3.704024129547179e-05,\n        0.0001210898844874464,\n        0.00014178166748024523,\n        9.428690827917308e-05,\n        0.00014591205399483442,\n        0.00010281158029101789,\n        0.00016942362708505243,\n        0.00011270843242527917,\n        0.00011328673281241208,\n        0.00011392868327675387,\n        5.2565188525477424e-05,\n        9.425842290511355e-05,\n        7.820327300578356e-05,\n        8.022751717362553e-05,\n        6.0538655816344544e-05,\n        9.873679664451629e-05,\n        0.0001416476006852463,\n        9.619435877539217e-05,\n        7.445488881785423e-05,\n        0.00011605871259234846,\n        0.00018042308511212468,\n        0.00013096204202156514,\n        0.0001700874709058553,\n        0.00016448793758172542,\n        0.00024075245892163366,\n        0.00022809975780546665,\n        0.00024332260363735259,\n        0.00023278541630133986,\n        0.00022443183115683496,\n        0.00022916491434443742,\n        0.00016848949599079788,\n        0.00025641487445682287,\n        0.0002431055618217215,\n        0.000288907322101295,\n        0.0003061012248508632,\n        0.0003011912340298295,\n        0.00030754233011975884,\n        0.00022170018928591162,\n        0.00026731088291853666,\n        0.0002826956333592534,\n        0.00019951521244365722,\n        0.0002817841013893485,\n        0.00026845725369639695,\n        0.0002037945669144392,\n        0.00030353700276464224,\n        0.00030615832656621933,\n        0.0002867323055397719,\n        0.0002425622078590095,\n        0.0002883427659980953,\n        0.0002600216830614954,\n        0.0002188907819800079,\n        0.00024650470004417,\n        0.0002512931532692164,\n        0.000254186918027699,\n        0.00022818270372226834,\n        0.00027404967113398015,\n        0.00021974097762722522,\n        0.00029713238473050296,\n        0.0002555273240432143,\n        0.0002663782215677202,\n        0.00029488716972991824,\n        0.00023231731029227376,\n        0.0002977869880851358,\n        0.0002604062610771507,\n        0.00023708176740910858,\n        0.0002682078629732132,\n        0.00021997562726028264,\n        0.00022771171643398702,\n        0.00021164549980312586,\n        0.0002625693450681865,\n        0.00022531893046107143,\n        0.0001949950965354219,\n        0.0002361397200729698,\n        0.0002313496224815026,\n        0.0002763973316177726,\n        0.00027595064602792263,\n        0.0002292304125148803,\n        0.00019568574498407543,\n        0.0002719945914577693,\n        0.0002953834773506969,\n        0.00029228863422758877,\n        0.0002472852938808501,\n        0.00027586991200223565,\n        0.0001787705987226218,\n        0.00028375661349855363,\n        0.0002461085969116539,\n        0.0002366666158195585,\n        0.0003060567833017558,\n        0.0002626242348924279,\n        0.00024621342890895903,\n        0.00017589166236575693,\n        0.00023634493118152022,\n        0.00014270588872022927,\n        0.00019889409304596484,\n        0.0001796072319848463,\n        0.00013938546180725098,\n        0.00014609868230763823,\n        0.00018390522745903581,\n        0.00020493616466410458,\n        0.0002398874785285443,\n        0.00015178012836258858,\n        0.00026407212135381997,\n        0.00022558194177690893,\n        0.00023954511561896652,\n        0.00023563984723296016,\n        0.0002502354618627578,\n        0.0003012792731169611,\n        0.00021346159337554127,\n        0.00025436942814849317,\n        0.00020121410489082336,\n        0.00027777490322478116,\n        0.00024064291210379452,\n        0.00020409125136211514,\n        0.00014294141146820039,\n        0.00019741513824556023,\n        0.00020836123439949006,\n        0.00016266907914541662,\n        0.00020177822443656623,\n        0.00019953955779783428,\n        0.00014071808254811913,\n        0.00013372440298553556,\n        0.00014817823830526322,\n        0.00020477091311477125,\n        0.00014493876369670033,\n        0.00016002432676032186,\n        0.0001447411923436448,\n        0.0002142848097719252,\n        0.00018128221563529223,\n        0.00014992784417700022,\n        0.00020936323562636971,\n        0.00015343764971476048,\n        0.00013012567069381475,\n        0.00013577440404333174,\n        0.00021580980683211237,\n        0.00016054976731538773,\n        0.00014444990665651858,\n        0.00023047771537676454,\n        0.000192012419574894,\n        0.00016742575098760426,\n        0.00018978732987307012,\n        0.00020434909674804658,\n        0.0002806541451718658,\n        0.00020444605615921319,\n        0.00023443831014446914,\n        0.00015422598517034203,\n        0.0002187114441767335,\n        0.00020403938833624125,\n        0.0001782214967533946,\n        0.0002823632094077766,\n        0.0002046406880253926,\n        0.00022435504070017487,\n        0.0001798514131223783,\n        0.0001230514608323574,\n        0.0002421946992399171,\n        0.0002204798220191151,\n        0.000150456209667027,\n        0.00014558348630089313,\n        0.0001839520555222407,\n        0.00016227364540100098,\n        0.0001327666686847806,\n        0.00015385387814603746,\n        0.00012633617734536529,\n        0.00013612904876936227,\n        0.00010652266792021692,\n        0.00015899859135970473,\n        0.00018005781748797745,\n        0.0001249489578185603,\n        8.432273170910776e-05,\n        0.00013108851271681488,\n        0.0001192673880723305,\n        0.00013042418868280947,\n        0.00013643960119225085,\n        0.0001628628233447671,\n        4.0094480937113985e-05,\n        0.0001606491714483127,\n        6.099397796788253e-05,\n        7.02177276252769e-05,\n        0.00011950225598411635,\n        7.527409616159275e-05,\n        0.00012104406050639227,\n        1.4836364243819844e-05,\n        6.834090163465589e-05,\n        7.153691694838926e-05,\n        0.0001395656872773543,\n        0.00010320101137040183,\n        0.00011996673129033297,\n        0.00010800284508150071,\n        7.8606914030388e-05,\n        7.913471199572086e-05,\n        7.558231300208718e-05,\n        5.1476403314154595e-05,\n        5.895913272979669e-05,\n        8.000171510502696e-05,\n        0.00014351910795085132,\n        3.293247573310509e-05,\n        0.00011742417700588703,\n        8.95703342393972e-05,\n        5.024818892707117e-05,\n        0.00011877338693011552,\n        0.00011695581633830443,\n        0.00017003488028421998,\n        0.00012164528016000986,\n        0.00012799487740267068,\n        0.00015952278045006096,\n        0.00016870796389412135,\n        0.0001531044254079461,\n        0.0001536767085781321,\n        0.00015085568884387612,\n        0.00011622095917118713,\n        0.00017930027388501912,\n        0.00020399517961777747,\n        0.00011335371527820826,\n        0.00015964219346642494,\n        0.0001338738074991852,\n        0.00017098878743126988,\n        0.00018934920080937445,\n        0.00019825861090794206,\n        0.00014456741337198764,\n        0.000195481872651726,\n        0.00026851618895307183,\n        0.00018217846809420735,\n        0.0001967430580407381,\n        0.00021027110051363707,\n        0.0001603123382665217,\n        0.00022397101565729827,\n        0.00021187907259445637,\n        0.000197894565644674,\n        0.00018310082668904215,\n        0.00019277137471362948,\n        0.00015628816618118435,\n        0.00010380471940152347,\n        0.00022309772612061352,\n        0.00011939991236431524,\n        0.00010427137021906674,\n        0.00019752935622818768,\n        0.00020908433361910284,\n        0.0001819486788008362,\n        0.0001486243272665888,\n        0.00023305143986362964,\n        0.0001733141834847629,\n        0.00015237739717122167,\n        0.00023448248975910246,\n        0.00017824563838075846,\n        0.0002231832913821563,\n        0.00020025897538289428,\n        0.00020835931354667991,\n        0.00023872994643170387,\n        0.00025488462415523827,\n        0.0002194218395743519,\n        0.00024150525860022753,\n        0.00030578169389627874,\n        0.0002237766602775082,\n        0.0002519320114515722,\n        0.00027712268638424575,\n        0.00028303242288529873,\n        0.00029813885339535773,\n        0.00022227360750548542,\n        0.00021932536037638783,\n        0.00024773928453214467,\n        0.00025334776728414,\n        0.00026969806640408933,\n        0.00024086238408926874,\n        0.00025847487268038094,\n        0.00019199939561076462,\n        0.0002583474852144718,\n        0.00020943218260072172,\n        0.0002373833121964708,\n        0.0002599552972242236,\n        0.00018605840159580112,\n        0.00022549324785359204,\n        0.0002034428616752848,\n        0.0002442196710035205,\n        0.00026792960125021636,\n        0.00024906182079575956,\n        0.00022711491328664124,\n        0.00021450409258250147,\n        0.00018729630392044783,\n        0.00025219289818778634,\n        0.0001744886249070987,\n        0.00021881613065488636,\n        0.00019233683997299522,\n        0.00020480829698499292,\n        0.00021892644872423261,\n        0.00021004329028073698,\n        0.0001898693444672972,\n        0.00023100322869140655,\n        0.0002326121466467157,\n        0.00016635694191791117,\n        0.0002412485337117687,\n        0.00016569686704315245,\n        0.00029528469895012677,\n        0.0002640126331243664,\n        0.00020420238433871418,\n        0.00016842552577145398,\n        0.0001656562671996653,\n        0.0002484059368725866,\n        0.00021648714027833194,\n        0.0002171923260902986,\n        0.00020246578787919134,\n        0.00017159251729026437,\n        0.00023806955141481012,\n        0.00022084145166445524,\n        0.00016079540364444256,\n        0.00021026558533776551,\n        0.00021713404566980898,\n        0.00021620096231345087,\n        0.00020960865367669612,\n        0.00022510532289743423,\n        0.00022361872834153473,\n        0.00024133575789164752,\n        0.00023942212283145636,\n        0.00019706327293533832,\n        0.0001726079935906455,\n        0.00021408619068097323,\n        0.00022614779300056398,\n        0.00012959781452082098,\n        0.00016803738253656775,\n        0.0001556210918352008,\n        0.00013788578507956117,\n        0.00017137137183453888,\n        0.000154380890307948,\n        0.00021415487572085112,\n        0.00013137160567566752,\n        0.00012865055759903044,\n        0.00016355796833522618,\n        9.940739255398512e-05,\n        0.00016161739767994732,\n        0.00012046897609252483,\n        9.262892854167148e-05,\n        0.0001275939284823835,\n        8.924127178033814e-05,\n        0.0001387675292789936,\n        5.445045462693088e-05,\n        0.00011760900088120252,\n        0.00012624745431821793,\n        0.00010170593304792419,\n        0.00017045678396243602,\n        0.0001602496486157179,\n        0.0001509588328190148,\n        9.836388926487416e-05,\n        0.00013200752437114716,\n        0.0001054109598044306,\n        0.00014495996583718807,\n        0.0001494072494097054,\n        0.00012001164577668533,\n        0.00019853209960274398,\n        0.00016130224685184658,\n        0.00015702220844104886,\n        0.00018803621060214937,\n        0.00013624025450553745,\n        0.0002140622236765921,\n        0.00016302027506753802,\n        0.00013717958063352853,\n        0.00013580647646449506,\n        0.0001563861733302474,\n        0.00011504402937134728,\n        0.00014298525638878345,\n        0.0002274178114021197,\n        0.00018302613170817494,\n        0.0001956017076736316,\n        0.000219493915210478,\n        0.0002205864730058238,\n        0.00022015735157765448,\n        0.00026601957506500185,\n        0.0002276552258990705,\n        0.0002375786571064964,\n        0.00021090437076054513,\n        0.00017923861742019653,\n        0.0002276781015098095,\n        0.00020262367615941912,\n        0.00019324975437484682,\n        0.0001828729291446507,\n        0.00017218061839230359,\n        0.00019482111383695155,\n        0.0001476633915444836,\n        0.00019010991672985256,\n        0.00017204243340529501,\n        0.00011131490464322269,\n        7.062713848426938e-05,\n        9.788328316062689e-05,\n        0.00018091619131155312,\n        0.00013720348943024874,\n        0.00017357316392008215,\n        0.00015304404951166362,\n        0.00013334801769815385,\n        0.00020478616352193058,\n        0.0001865327067207545,\n        0.00022128180717118084,\n        0.00018456812540534884,\n        0.0001418754254700616,\n        0.00024463312001898885,\n        0.00018214297597296536,\n        0.00020776806923095137,\n        0.0002539594715926796,\n        0.00017428987484890968,\n        0.00016992217570077628,\n        0.0001857826573541388,\n        0.00025193457258865237,\n        0.00014873742475174367,\n        0.0001893722073873505,\n        0.00022087972320150584,\n        0.00017370203568134457,\n        0.000227023585466668,\n        0.0002178074500989169,\n        0.0002326824323972687,\n        0.00022441986948251724,\n        0.00021063192980363965,\n        0.0002804055984597653,\n        0.0003045604971703142,\n        0.00023863697424530983,\n        0.0002501190174371004,\n        0.00018408638425171375,\n        0.00026309251552447677,\n        0.00026102966512553394,\n        0.0002858798543456942,\n        0.00027813800261355937,\n        0.00020923510601278394,\n        0.0002202023460995406,\n        0.00024124365882016718,\n        0.0002470032777637243,\n        0.0002127685147570446,\n        0.00021132227266207337,\n        0.00017354196461383253,\n        0.00019272114150226116,\n        0.00015062947932165116,\n        0.00016955258615780622,\n        0.00018685507529880852,\n        0.00012941235036123544,\n        0.00013726254110224545,\n        0.00015281100058928132,\n        5.4084768635220826e-05,\n        0.00017340084013994783,\n        0.00014980314881540835,\n        0.00016090278222691268,\n        0.0001716682454571128,\n        0.00012725427222903818,\n        0.0001743997709127143,\n        0.00014571058272849768,\n        0.00020036475325468928,\n        0.00013165529526304454,\n        0.00018469801580067724,\n        0.00018590343825053424,\n        8.225956844398752e-05,\n        0.00014930561883375049,\n        0.0001756897836457938,\n        0.00022372760577127337,\n        0.0002310918498551473,\n        0.00016597886860836297,\n        0.00016891793347895145,\n        0.00019984194659627974,\n        0.00022110031568445265,\n        0.00016740208957344294,\n        0.00021020835265517235,\n        0.0001628933969186619,\n        0.00015784915012773126,\n        0.000149566272739321,\n        0.0001576487993588671,\n        0.00014289618411567062,\n        0.00012962077744305134,\n        0.0002723340876400471,\n        0.00024719181237742305,\n        0.00018180065671913326,\n        0.00019951829744968563,\n        0.00015458368579857051,\n        0.0001483652158640325,\n        0.0001808662636904046,\n        0.00016124149260576814,\n        0.00017509795725345612,\n        0.0001298697607126087,\n        0.00015708396676927805,\n        0.00013553089229390025,\n        0.0001451959542464465,\n        0.0001589746680110693,\n        0.00016557083290535957,\n        0.00013667959137819707,\n        0.00014402286615222692,\n        0.00016275985399261117,\n        9.139136091107503e-05,\n        9.928435611072928e-05,\n        7.222394197015092e-05,\n        9.777015657164156e-05,\n        0.00013230073091108352,\n        0.00011437909415690228,\n        0.00012415256060194224,\n        0.00014493789058178663,\n        0.00011888086010003462,\n        0.00011165155592607334,\n        0.0001824290957301855,\n        0.00017658283468335867,\n        0.00011146574252052233,\n        0.00016241274715866894,\n        0.00013791336095891893,\n        0.000161350064445287,\n        0.0001524286053609103,\n        0.00012829716433770955,\n        0.00018596510926727206,\n        0.00017105479491874576,\n        0.00017878273501992226,\n        0.0001457852340536192,\n        0.0001626552257221192,\n        0.00011239712330279872,\n        0.00010886874224524945,\n        0.00010928671690635383,\n        7.903680671006441e-05,\n        9.309862070949748e-05,\n        0.00010272152576362714,\n        8.46753318910487e-05,\n        7.362389442278072e-05,\n        6.433997623389587e-05,\n        1.276913008041447e-05,\n        6.759226380381733e-05,\n        8.018787048058584e-05,\n        4.9018057325156406e-05,\n        1.5798891581653152e-06,\n        6.793105421820655e-05,\n        6.70782828819938e-05,\n        0.0001171545300167054,\n        0.00011496900697238743,\n        0.00010263211152050644,\n        0.00013411995314527303,\n        6.335209036478773e-05,\n        8.605173206888139e-05,\n        9.633397712605074e-05,\n        6.265985575737432e-05,\n        5.516051169252023e-05,\n        7.084458047756925e-05,\n        7.516171172028407e-05,\n        8.139017154462636e-05,\n        0.00011020732927136123,\n        4.1380171751370654e-05,\n        5.203152250032872e-05,\n        0.00011992471263511106,\n        7.288024789886549e-05,\n        7.875238952692598e-05,\n        7.191769691416994e-05,\n        8.977774996310472e-05,\n        8.191572123905644e-05,\n        0.00012751358735840768,\n        0.00011723882926162332,\n        0.00010644645954016596,\n        9.663249511504546e-05,\n        4.9097929149866104e-05,\n        8.251699182437733e-05,\n        0.00012472116213757545,\n        5.588880958384834e-05,\n        0.00011265109060332179,\n        0.00014560150157194585,\n        5.109360790811479e-05,\n        0.000100315737654455,\n        0.00014832041051704437,\n        8.930546755436808e-05,\n        8.777967741480097e-05,\n        0.00014271735562942922,\n        8.775402238825336e-05,\n        0.00014654637197963893,\n        0.00015828313189558685,\n        0.00013957802730146796,\n        0.00012115546269342303,\n        0.00011128078040201217,\n        0.00014765448577236384,\n        0.00016093661542981863,\n        0.00017144379671663046,\n        0.00017461695824749768,\n        0.00017035844211932272,\n        0.00020873088215012103,\n        0.0001359315647277981,\n        0.00018385433941148221,\n        0.0001890218409243971,\n        0.00013862861669622362,\n        0.00023724508355371654,\n        0.00015641783829778433,\n        0.0002660032478161156,\n        0.00014417496277019382,\n        0.00017580983694642782,\n        0.0001474751770729199,\n        0.00013184438284952193,\n        0.00023569496988784522,\n        0.00015754299238324165,\n        0.00021947863569948822,\n        0.0001820502511691302,\n        0.0001658030814724043,\n        0.00017093162750825286,\n        0.000150395164382644,\n        0.00015946500934660435,\n        0.0001583811390446499,\n        0.00010021219350164756,\n        0.0001597660593688488,\n        0.00015984215133357793,\n        0.00018719870422501117,\n        0.00011653214460238814,\n        0.00015787062875460833,\n        0.00017843629757408053,\n        0.00017056663637049496,\n        0.0001779660815373063,\n        0.00011307920794934034,\n        0.00012674738536588848,\n        0.00011875583732035011,\n        0.00015361266559921205,\n        0.00010695485980249941,\n        0.00012691746815107763,\n        0.00016545770631637424,\n        0.00011581632134038955,\n        0.00014513189671561122,\n        9.674923057900742e-05,\n        6.64358158246614e-05,\n        0.0001344147021882236,\n        0.00018255192844662815,\n        0.0001773674739524722,\n        0.00011683491902658716,\n        0.00020387255062814802,\n        0.00011757289030356333,\n        0.0001461268257116899,\n        0.00018324324628338218,\n        0.00010388410737505183,\n        0.00012326067371759564,\n        0.00017189193749800324,\n        0.00017864664550870657,\n        0.00015546506620012224,\n        0.00021142614423297346,\n        0.0001537357602501288,\n        0.00010399759048596025,\n        0.00017992823268286884,\n        0.00014984435983933508,\n        0.00016064585361164063,\n        0.0002311853604624048,\n        0.00016496775788255036,\n        0.00018420573906041682,\n        0.00018937865388579667,\n        0.00021671652211807668,\n        0.0001445879170205444,\n        0.00017053852207027376,\n        0.00019959289056714624,\n        8.129849447868764e-05,\n        0.00017052383918780833,\n        0.000152151842485182,\n        0.00018873506633099169,\n        0.00017185078468173742,\n        0.00021746341371908784,\n        0.00020256060815881938,\n        0.00013805186608806252,\n        0.00016674476501066238,\n        0.00012687145499512553,\n        0.00017002856475301087,\n        0.00015130493557080626,\n        0.0001226231106556952,\n        0.00018480929429642856,\n        0.00015462674491573125,\n        0.00019752034859266132,\n        0.00020151080389041454,\n        0.0001980285014724359,\n        0.0002519659174140543,\n        0.0001822395424824208,\n        0.00024147919612005353,\n        0.00019280545529909432,\n        0.00024154418497346342,\n        0.00022940074268262833,\n        0.00024385655706282705,\n        0.0002823022659868002,\n        0.00024647469399496913,\n        0.0001738431747071445,\n        0.00021722016390413046,\n        0.0001932860177475959,\n        0.00020725425565615296,\n        0.0002218047739006579,\n        0.0001878336479421705,\n        0.0002463726559653878,\n        0.00019141947268508375,\n        0.0002361011429456994,\n        0.00022407584765460342,\n        0.00020556770323310047,\n        0.00019086332758888602,\n        0.00026861895457841456,\n        0.00018211585120297968,\n        0.000251770339673385,\n        0.00023665055050514638,\n        0.00024214450968429446,\n        0.00021909127826802433,\n        0.000177142777829431,\n        0.0002841038512997329,\n        0.0001870028645498678,\n        0.0002223742485512048,\n        0.00020680559100583196,\n        0.00016742057050578296,\n        0.0002209613157901913,\n        0.00015070401423145086,\n        0.0001861285709310323,\n        0.000166572819580324,\n        0.00011972558422712609,\n        0.00022302176512312144,\n        0.00014095324149820954,\n        0.0001751356030581519,\n        0.0001340474555036053,\n        0.00017890660092234612,\n        0.0001404174545314163,\n        0.00020287588995415717,\n        0.0001957249187398702,\n        0.000106518404209055,\n        0.0002014843630604446,\n        0.0001952952443389222,\n        0.00018511626694817096,\n        0.00018599853501655161,\n        0.0001986696879612282,\n        0.000198017674847506,\n        0.0002436206123093143,\n        0.0002361528022447601,\n        0.00016603199765086174,\n        0.00020965210569556803,\n        0.0002325291425222531,\n        0.0002121067518601194,\n        0.0003041249583475292,\n        0.000265853333985433,\n        0.00023426805273629725,\n        0.00017758848844096065,\n        0.0002338362392038107,\n        0.000255142105743289,\n        0.00020055736240465194,\n        0.00022805180924478918,\n        0.00023587472969666123,\n        0.0001896944741019979,\n        0.0002401877864031121,\n        0.00022286058811005205,\n        0.00022850444656796753,\n        0.0001882169599412009,\n        0.00027430220507085323,\n        0.0002096147945849225,\n        0.00010613289487082511,\n        0.00019613912445493042,\n        0.00018635521701071411,\n        0.00017573886725585908,\n        0.00016793202667031437,\n        0.00017934921197593212,\n        0.00014112889766693115,\n        0.00013797728752251714,\n        0.00017669517546892166,\n        0.00019692390924319625,\n        0.0001760780723998323,\n        0.00018092128448188305,\n        0.00020441837841644883,\n        0.0001297954295296222,\n        0.0001073053790605627,\n        0.00018152635311707854,\n        8.764181984588504e-05,\n        0.0001491323346272111,\n        0.00018489423382561654,\n        0.00016539139323867857,\n        0.0001316009002039209,\n        0.00016969152784440666,\n        0.0001791845861589536,\n        0.00017845231923274696,\n        0.00020811447757296264,\n        0.00013871437113266438,\n        0.00018591790285427123,\n        0.00016760811558924615,\n        0.00018054542306344956,\n        0.00020515687356237322,\n        0.0001507002452854067,\n        0.00019048764079343528,\n        0.00016016679001040757,\n        0.00015816453378647566,\n        0.0001868279796326533,\n        0.00019012879056390375,\n        0.00024069695791695267,\n        0.00020608479098882526,\n        0.00021038566774223,\n        0.0002482520358171314,\n        0.0002145075413864106,\n        0.0002302073553437367,\n        0.00023202259035315365,\n        0.00028091255808249116,\n        0.00026208919007331133,\n        0.0002721283526625484,\n        0.0001766591885825619,\n        0.00020649511134251952,\n        0.00026548648020252585,\n        0.00016691253404133022,\n        0.0001378948800265789,\n        0.00013951527944300324,\n        0.00014890958846081048,\n        0.00013812094402965158,\n        0.0001748547947499901,\n        0.0001903634110931307,\n        0.0001563732512295246,\n        4.3592899601208046e-05,\n        0.00010497760376892984,\n        0.000113520713057369,\n        0.0001246767642442137,\n        0.00014131255738902837,\n        0.00010327769996365532,\n        7.318930875044316e-05,\n        0.00018881224968936294,\n        0.00016583809338044375,\n        0.000128636893350631,\n        0.00018436201207805425,\n        0.00015533129044342786,\n        0.00017118718824349344,\n        0.0001470042043365538,\n        0.000224979521590285,\n        0.00017698376905173063,\n        0.0002249876706628129,\n        0.00018456633551977575,\n        0.00018978463776875287,\n        0.00017650346853770316,\n        0.00017717425362206995,\n        0.00015399328549392521,\n        0.00018327920406591147,\n        0.00019052703282795846,\n        9.203343506669626e-05,\n        0.00017020152881741524,\n        0.0001698680134722963,\n        0.0002670681569725275,\n        0.0001808615488698706,\n        0.00022156150953378528,\n        0.00018454868404660374,\n        0.00026376714231446385,\n        0.0002289155381731689,\n        0.0002083430445054546,\n        0.0003274292394053191,\n        0.00022681959671899676,\n        0.000276285718427971,\n        0.00023354806762654334,\n        0.00024976025451906025,\n        0.00022053337306715548,\n        0.0002603032917249948,\n        0.0002475018263794482,\n        0.00028767972253262997,\n        0.00032327481312677264,\n        0.00028340501012280583,\n        0.0002830300072673708,\n        0.0002696019655559212,\n        0.00019946218526456505,\n        0.0002784183307085186,\n        0.00033004049328155816,\n        0.00024462290457449853,\n        0.00024976316490210593,\n        0.00022591800370719284,\n        0.00027470572968013585,\n        0.0002414839545963332,\n        0.0002612242824397981,\n        0.00022679209359921515,\n        0.0002739105839282274,\n        0.00024144518829416484,\n        0.0002556169347371906,\n        0.00022808068024460226,\n        0.0001845427614171058,\n        0.00017992033099289984,\n        0.0001992565084947273,\n        0.00023769012477714568,\n        0.00014847733837086707,\n        0.00014920865942258388,\n        0.00020900646632071584,\n        0.0002534097875468433,\n        0.00016757677076384425,\n        0.00026579140103422105,\n        0.00023428478743880987,\n        0.00015714095206931233,\n        0.00018257275223731995,\n        0.00017565645975992084,\n        0.0002161152078770101,\n        0.00021864329755771905,\n        0.00021429556363727897,\n        0.00024334312183782458,\n        0.0001740320003591478,\n        0.00021161317999940366,\n        0.0001889533450594172,\n        0.00015714482287876308,\n        0.00021014326193835586,\n        0.00017122663848567754,\n        0.0001613452477613464,\n        0.00022261902631726116,\n        0.00023037531354930252,\n        0.00015120369789656252,\n        0.00019942244398407638,\n        0.0001597629307070747,\n        0.00022577399795409292,\n        0.0001752456446411088,\n        0.0001874005829449743,\n        0.0002063519204966724,\n        0.00015051153604872525,\n        0.00023651542142033577,\n        0.00018763169646263123,\n        0.00020596983085852116,\n        0.00017012310854624957,\n        0.00019006528600584716,\n        0.00022946677927393466,\n        0.0001858053874457255,\n        0.0002531774516683072,\n        0.0002588710922282189,\n        0.00022454457939602435,\n        0.0002454221830703318,\n        0.0001585773570695892,\n        0.0002315961173735559,\n        0.0001559033989906311,\n        0.00017768006364349276,\n        0.00013432448031380773,\n        0.00019835770945064723,\n        0.00021294690668582916,\n        0.00014023738913238049,\n        0.00024602952180430293,\n        0.00015879416605457664,\n        0.00016949565906543285,\n        0.00018789534806273878,\n        0.0001612060732441023,\n        0.00020528625464066863,\n        0.00017340901831630617,\n        0.00015052803792059422,\n        0.00018847084720619023,\n        0.00023488793522119522,\n        0.0002792860905174166,\n        0.00020732975099235773,\n        0.00020810218120459467,\n        0.00012743512343149632,\n        0.00025169612490572035,\n        0.00015349057503044605,\n        0.0002581487933639437,\n        0.00023596760001964867,\n        0.00020069931633770466,\n        0.0002159304276574403,\n        0.0002175965637434274,\n        0.0002561924047768116,\n        0.00017000931256916374,\n        0.00022882687335368246,\n        0.00022937104222364724,\n        0.0002041166735580191,\n        0.00020754564320668578,\n        0.00017434493929613382,\n        0.00020170226343907416,\n        0.00021693900635000318,\n        0.0001993981859413907,\n        0.00025593582540750504,\n        0.00017214554827660322,\n        0.00019266809977125376,\n        0.00018636534514371306,\n        0.0002359378559049219,\n        0.00019099735072813928,\n        0.00021653302246704698,\n        0.0002428185980534181,\n        0.00022754012024961412,\n        0.00022859637101646513,\n        0.00014130253111943603,\n        0.00014284285134635866,\n        0.00021845557785127312,\n        0.00015114930283743888,\n        0.00023234578839037567,\n        0.00016521885117981583,\n        0.00014886866847518831,\n        0.00018437489052303135,\n        0.0001050702267093584,\n        0.00020338158356025815,\n        0.00016059349582064897,\n        0.00015494858962483704,\n        0.000150795400259085,\n        0.00016436366422567517,\n        0.00012312633043620735,\n        0.0001694580860203132,\n        0.00016490013513248414,\n        0.00012352452904451638,\n        0.00018422064022161067,\n        0.00019858764426317066,\n        0.0001580675452714786,\n        0.00014243680925574154,\n        0.00015467895718757063,\n        0.00019170198356732726,\n        0.00019867157971020788,\n        0.00018229804118163884,\n        0.00017652536917012185,\n        0.00023268985387403518,\n        0.00022686818556394428,\n        0.00022635138884652406,\n        0.000235515515669249,\n        0.00017618274432606995,\n        0.00018426832684781402,\n        0.00018068884673994035,\n        0.00023224586038850248,\n        0.00024681867216713727,\n        0.00018519864534027874,\n        0.00022472270939033478,\n        0.0002380557416472584,\n        0.00020921342365909368,\n        0.0002741241187322885,\n        0.00020049103477504104,\n        0.00025702459970489144,\n        0.0002664471394382417,\n        0.00018089589138980955,\n        0.0001956779888132587,\n        0.00021076801931485534,\n        0.0002414622576907277,\n        0.00022958706540521234,\n        0.0002000384556595236,\n        0.00020332435087766498,\n        0.00015470580547116697,\n        0.00019962260557804257,\n        0.00016526917170267552,\n        0.00016550259897485375,\n        0.00016753918316680938,\n        0.0002077696699416265,\n        0.000144634599564597,\n        0.00017657205171417445,\n        0.00018593033018987626,\n        0.00016246398445218801,\n        0.0002579265565145761,\n        0.00014972455392125994,\n        0.00023856604821048677,\n        0.0001580814569024369,\n        0.0002269403194077313,\n        0.00020666008640546352,\n        0.0001486260152887553,\n        0.0001626370067242533,\n        0.00013776830746792257,\n        0.00010923994705080986,\n        9.503457113169134e-05,\n        0.00014990803902037442,\n        0.0002034244389506057,\n        0.0001208396497531794,\n        0.00014472015027422458,\n        0.0001442449720343575,\n        0.00010949662828352302,\n        0.00013493873120751232,\n        0.00011639261356322095,\n        0.00016710023919586092,\n        0.00013790967932436615,\n        0.00019741560390684754,\n        0.0001159840467153117,\n        0.0001868606050265953,\n        0.00020715626305900514,\n        0.00018673315935302526,\n        0.0001713481906335801,\n        0.00015087889914866537,\n        0.00018835871014744043,\n        0.0001602328848093748,\n        0.0001571303728269413,\n        0.0001854717411333695,\n        0.0001745257613947615,\n        0.00018047190678771585,\n        0.00014584539167117327,\n        0.00013916284660808742,\n        8.36536637507379e-05,\n        7.22703553037718e-05,\n        0.00011009180889232084,\n        0.00011989915947197005,\n        5.92320466239471e-05,\n        0.00012155638250987977,\n        0.00011874181655002758,\n        7.855358853703365e-05,\n        0.00014257810835260898,\n        0.0001003565703285858,\n        0.00015738459478598088,\n        0.00010229388863081113,\n        0.00020083505660295486,\n        0.00013293557276483625,\n        0.0001100100707844831,\n        0.00015911064110696316,\n        0.00012104359484510496,\n        0.00020822188525926322,\n        0.00015311547031160444,\n        0.00015463627642020583,\n        0.00014429670409299433,\n        0.00011762764188461006,\n        0.00016071209392976016,\n        0.0001543635007692501,\n        0.0001656051172176376,\n        0.00010012719576479867,\n        0.00014567424659617245,\n        0.00011654105765046552,\n        0.00012461708683986217,\n        0.00017486800788901746,\n        0.00010856660082936287,\n        6.770322943339124e-05,\n        0.0001211354392580688,\n        0.00016014438006095588,\n        8.84743858478032e-05,\n        0.00013640470569953322,\n        0.00010646563896443695,\n        0.00011851751332869753,\n        0.00014922409900464118,\n        8.327909745275974e-05,\n        0.00011630177323240787,\n        0.00018970992823597044,\n        0.0001533892791485414,\n        0.00011477850785013288,\n        0.00012174729636171833,\n        0.0001222537539433688,\n        0.00011721485498128459,\n        0.00012102090113330632,\n        0.00020378765475470573,\n        0.00015658035408705473,\n        0.00013316801050677896,\n        0.00015588881797157228,\n        0.0001309171930188313,\n        0.00014295098662842065,\n        0.00018585543148219585,\n        0.00015759063535369933,\n        7.853157876525074e-05,\n        0.00012208515545353293,\n        7.332357199629769e-05,\n        7.621881377417594e-05,\n        0.00017296393343713135,\n        1.9830067685688846e-05,\n        7.707212353125215e-05,\n        8.632407843833789e-05,\n        7.380003080470487e-05,\n        7.886223465902731e-05,\n        -3.1839859730098397e-05,\n        6.720296369167045e-05,\n        5.070456609246321e-05,\n        5.338149276212789e-05,\n        7.94897732703248e-06,\n        2.8760430723195896e-05,\n        7.577457290608436e-05,\n        4.765588073496474e-06,\n        2.5434403596591437e-06,\n        6.869828212074935e-05,\n        4.968333087163046e-05,\n        3.440056389081292e-05,\n        2.2445910872193053e-05,\n        3.095658394158818e-05,\n        6.838730041636154e-05,\n        5.3218456741888076e-05,\n        1.9200118913431652e-05,\n        1.291562170990801e-06,\n        3.919336450053379e-05,\n        6.2322255871549714e-06,\n        2.5849771191133186e-05,\n        3.2490854209754616e-05,\n        2.8501222914201207e-05,\n        6.0518941609188914e-05,\n        0.00011245357745792717,\n        5.643976328428835e-05,\n        2.1169154933886603e-05,\n        3.7234211049508303e-05,\n        -1.1678712326101959e-05,\n        1.4710378309246153e-05,\n        -7.420149631798267e-05,\n        -5.8643629017751664e-05,\n        3.229663343518041e-05,\n        7.66441662563011e-05,\n        3.413917511352338e-05,\n        2.183568722102791e-05,\n        1.788310328265652e-05,\n        7.923392786324257e-07,\n        4.1333511035190895e-05,\n        4.857934982283041e-05,\n        1.6542703633604106e-06,\n        1.5605923181283288e-05,\n        4.665390952141024e-05,\n        -8.765100574237294e-06,\n        1.1601491678447928e-05,\n        1.2209725355205592e-05,\n        -2.4953582396847196e-05,\n        2.785380502245971e-06,\n        -1.7194461179315113e-05,\n        -5.230470924288966e-05,\n        -9.124099597102031e-05,\n        -0.00012820845586247742,\n        1.142481323768152e-05,\n        -1.3033409231866244e-05,\n        -2.7104904802399687e-05,\n        -2.4479273633915e-05,\n        -3.941666000173427e-05,\n        -7.100648508640006e-05,\n        -6.661478983005509e-05,\n        3.1967101676855236e-05,\n        1.8843546058633365e-05,\n        -1.6147499991348013e-05,\n        -2.4667733669048175e-06,\n        8.3182376329205e-06,\n        2.79522173514124e-05,\n        -2.731599670369178e-05,\n        -3.016005393874366e-05,\n        1.7436650523450226e-05,\n        3.369000069142203e-06,\n        2.3708053049631417e-05,\n        1.87788755283691e-05,\n        1.4674438716610894e-05,\n        7.124887633835897e-05,\n        -2.1697982447221875e-05,\n        2.2885034923092462e-05,\n        4.6746023144805804e-05,\n        -2.3852402591728605e-05,\n        7.633184577571228e-05,\n        3.3670941775199026e-05,\n        0.000149568120832555,\n        2.4400676920777187e-05,\n        7.078918861225247e-05,\n        7.831962284399197e-05,\n        7.892258872743696e-05,\n        9.114661952480674e-05,\n        -3.116813786618877e-06,\n        4.453689689398743e-05,\n        1.6746462279115804e-05,\n        4.637018355424516e-05,\n        9.18326186365448e-05,\n        9.781587141333148e-05,\n        5.792998126707971e-05,\n        5.5328826420009136e-05,\n        6.291755562415347e-05,\n        6.038548599462956e-05,\n        2.3181231881608255e-05,\n        0.00011313678987789899,\n        5.7289540563942865e-05,\n        7.177134102676064e-05,\n        2.904301800299436e-05,\n        6.103250780142844e-05,\n        4.6057575673330575e-05,\n        2.9951304895803332e-05,\n        5.9779245930258185e-05,\n        9.109327947953716e-05,\n        5.417918146122247e-05,\n        3.116277582648763e-07,\n        7.64986762078479e-05,\n        3.149279336867039e-06,\n        4.3919109884882346e-05,\n        4.3379048292990774e-05,\n        2.7005209631170146e-05,\n        -8.72527471074136e-06,\n        5.673787745763548e-05,\n        3.820218626060523e-05,\n        -2.157838207494933e-05,\n        -1.5994611430869554e-06,\n        5.593219611910172e-05,\n        -1.627360143174883e-05,\n        -1.152634467871394e-05,\n        5.130356294102967e-05,\n        2.617076097521931e-05,\n        9.07893045223318e-05,\n        4.686194733949378e-05,\n        5.732389399781823e-05,\n        6.0470218159025535e-05,\n        8.666257781442255e-05,\n        5.472991688293405e-05,\n        8.995542157208547e-05,\n        0.00012546460493467748,\n        4.381201870273799e-05,\n        0.0001529282017145306,\n        6.871863297419623e-05,\n        3.755396755877882e-05,\n        0.00016725344175938517,\n        0.00011826843547169119,\n        0.00013133791799191386,\n        8.905610593501478e-05,\n        0.00012635302846319973,\n        6.280278466874734e-05,\n        -3.352686462676502e-06,\n        4.635675941244699e-05,\n        5.6358858273597434e-05,\n        4.348870425019413e-05,\n        4.587909279507585e-05,\n        8.209121733671054e-05,\n        7.25257268641144e-05,\n        2.4749751901254058e-05,\n        0.00012193706061225384,\n        7.979994552442804e-05,\n        9.934445552062243e-05,\n        2.4250975911854766e-05,\n        6.496873538708314e-06,\n        0.0001094289036700502,\n        3.655820546555333e-05,\n        0.00011452286707935855,\n        4.9039397708838806e-05,\n        0.00014571180508937687,\n        0.00011891079338965937,\n        0.00012119585881009698,\n        0.00015074419206939638,\n        7.844993524486199e-05,\n        0.00014637941785622388,\n        0.00012593006249517202,\n        6.154872971819714e-05,\n        9.127794328378513e-05,\n        6.375370139721781e-05,\n        0.0001050843857228756,\n        0.0001302266027778387,\n        8.06683165137656e-05,\n        8.968741894932464e-05,\n        4.485501267481595e-05,\n        6.896600098116323e-05,\n        6.211862637428567e-05,\n        6.091714385547675e-05,\n        5.345867612049915e-05,\n        7.695025851717219e-05,\n        0.00020121020497754216,\n        0.0001301180454902351,\n        0.00013223179848864675,\n        6.354666402330622e-05,\n        0.00010287641634931788,\n        0.00010967603884637356,\n        0.00011003424151567742,\n        0.00011488956079119816,\n        0.00012400330160744488,\n        0.00019644909480120987,\n        7.875560550019145e-05,\n        0.00018426004680804908,\n        5.3617772209690884e-05,\n        6.906892667757347e-05,\n        8.164013706846163e-05,\n        0.00013182975817471743,\n        0.00017231817764695734,\n        0.00015325527056120336,\n        0.0001170575778814964,\n        0.00014302061754278839,\n        0.00011129482300020754,\n        0.00012765680730808526,\n        0.00011281748447800055,\n        0.00010731614747783169,\n        9.655891335569322e-05,\n        2.2262898710323498e-05,\n        8.918560342863202e-05,\n        7.526282570324838e-05,\n        0.00013014582509640604,\n        4.108843859285116e-05,\n        0.0001279372227145359,\n        5.744678492192179e-05,\n        5.528723340830766e-05,\n        0.0001238203258253634,\n        0.00011561477731447667,\n        6.899643631186336e-05,\n        6.398856930900365e-05,\n        5.510697519639507e-05,\n        0.00011850481678266078,\n        9.125000360654667e-05,\n        7.331559754675254e-05,\n        8.499545219819993e-05,\n        0.00010925504466285929,\n        0.00013922508514951915,\n        8.26726172817871e-05,\n        0.00014233318506740034,\n        0.0001457337784813717,\n        0.00017268731608055532,\n        0.00015727175923530012,\n        8.225609781220555e-05,\n        0.00013135657354723662,\n        0.0001456333411624655,\n        9.541587496642023e-05,\n        7.61026531108655e-05,\n        0.00013693029177375138,\n        9.126942313741893e-05,\n        9.095457789953798e-05,\n        0.0001897472102427855,\n        9.280349331675097e-05,\n        9.741505346028134e-05,\n        7.45086872484535e-05,\n        0.00017618371930439025,\n        9.529374074190855e-05,\n        0.00010867897799471393,\n        7.375396671704948e-05,\n        0.0001248603075509891,\n        9.442838199902326e-05,\n        0.0001087113341782242,\n        0.00012030835205223411,\n        6.087525252951309e-05,\n        7.814315176801756e-05,\n        0.00012701813830062747,\n        0.00011556440585991368,\n        7.481100328732282e-05,\n        0.00010536393529037014,\n        9.515158308204263e-05,\n        0.00014458579244092107,\n        0.00013021517952438444,\n        0.00013178281369619071,\n        0.00011419350630603731,\n        0.00010027489042840898,\n        9.344077261630446e-05,\n        0.0001256875111721456,\n        0.00011064374120905995,\n        7.849745452404022e-05,\n        5.7166889746440575e-05,\n        0.00012893548409920186,\n        2.6174691811320372e-05,\n        8.505788719048724e-05,\n        1.2412742762535345e-05,\n        0.00013493459846358746,\n        5.86108690185938e-05,\n        9.847595356404781e-05,\n        5.3859945182921365e-05,\n        4.054792952956632e-05,\n        0.00016295794921461493,\n        6.381994171533734e-05,\n        9.444561146665365e-05,\n        9.649261482991278e-05,\n        0.00017808015400078148,\n        7.47212689020671e-05,\n        8.0180361692328e-05,\n        0.00013345603656489402,\n        0.00010919557098532096,\n        5.3183845011517406e-05,\n        9.067499922821298e-05,\n        0.0001078731584129855,\n        9.366654558107257e-05,\n        7.096108311088756e-05,\n        0.00010967921116389334,\n        6.744864367647097e-05,\n        0.00012160180631326512,\n        9.713754843687639e-05,\n        9.7215837740805e-05,\n        0.00011860207450808957,\n        0.00011651846580207348,\n        5.4238917073234916e-05,\n        7.003801147220656e-05,\n        0.00011519282998051494,\n        7.602838741149753e-05,\n        0.00010038630716735497,\n        4.649035327020101e-05,\n        7.949368591653183e-05,\n        0.000103760976344347,\n        0.0001455548481317237,\n        0.00012077882274752483,\n        8.13945516711101e-05,\n        0.00011029225424863398,\n        5.768255141447298e-05,\n        0.00012202061770949513,\n        0.00013359091826714575,\n        0.00012368574971333146,\n        0.00013605502317659557,\n        0.00010843922791536897,\n        0.0001533018657937646,\n        0.00016189145389944315,\n        8.930162584874779e-05,\n        1.2455460819182917e-05,\n        0.0001289711071876809,\n        8.198604336939752e-05,\n        9.676874469732866e-05,\n        8.371754665859044e-05,\n        9.118320303969085e-05,\n        0.00011646165512502193,\n        0.00019205515854991972,\n        0.0001321520539931953,\n        0.00012305148993618786,\n        0.0001335566194029525,\n        0.00015250542492140085,\n        0.00018999546591658145,\n        0.00017243540787603706,\n        0.0001968193391803652,\n        0.00015412647917401046,\n        0.00019978587806690484,\n        0.00014115979138296098,\n        0.00020162704458925873,\n        0.00015959111624397337,\n        0.0002568989875726402,\n        0.00020231353119015694,\n        0.00022463855566456914,\n        0.00018050754442811012,\n        0.00022483956126961857,\n        0.0002487155725248158,\n        0.00020832169684581459,\n        0.00022950638958718628,\n        0.00017008226132020354,\n        0.00019610649906098843,\n        0.0002377716009505093,\n        0.00019732306827791035,\n        0.00016835321730468422,\n        0.0002710152475629002,\n        0.0001853644789662212,\n        0.00021623133216053247,\n        0.00018910046492237598,\n        0.00015718468057457358,\n        0.0001797434379113838,\n        0.0002385102561675012,\n        0.0002052869094768539,\n        0.00019589165458455682,\n        0.0001924530661199242,\n        0.0002637553552631289,\n        0.00014902561088092625,\n        0.00018405845912639052,\n        0.0002433031622786075,\n        0.00023324275389313698,\n        0.00021867133909836411,\n        0.00012146839435445145,\n        0.00022450796677730978,\n        0.00016823138867039233,\n        0.00019723585864994675,\n        0.0001434702571714297,\n        0.00019471086852718145,\n        0.00020523580315057188,\n        0.00012761475227307528,\n        0.00017004003166221082,\n        0.00013996323104947805,\n        9.285881242249161e-05,\n        0.00016306780162267387,\n        0.00020322926866356283,\n        0.00012253777822479606,\n        0.00017142282740678638,\n        0.00020486899302341044,\n        0.0001315720728598535,\n        0.00020842305093538016,\n        0.00021739708608947694,\n        0.00014387181727215648,\n        0.0002518438268452883,\n        0.00019725426682271063,\n        0.00018878512491937727,\n        0.00028597991331480443,\n        0.00018245774845127016,\n        0.0002452530025038868,\n        0.00022691178310196847,\n        0.00024702231166884303,\n        0.00025753123918548226,\n        0.00024890797794796526,\n        0.0002329348644707352,\n        0.00014036188076715916,\n        0.00021789735183119774,\n        0.00018902042938861996,\n        0.00023070804309099913,\n        0.0002044731954811141,\n        0.00022676259686704725,\n        0.00015859039558563381,\n        0.00016307223995681852,\n        0.0002323266671737656,\n        0.0001464868983021006,\n        0.00015397308743558824,\n        0.0001329150254605338,\n        0.0001245545718120411,\n        0.00011809173156507313,\n        0.00016579018847551197,\n        0.00011515372898429632,\n        0.0001134221165557392,\n        0.00011865876149386168,\n        0.00012103269546059892,\n        0.00020670954836532474,\n        0.0001763450854923576,\n        0.00018393418577034026,\n        0.00019049769616685808,\n        0.00018195956363342702,\n        0.00020196757395751774,\n        0.0002314592566108331,\n        0.00014029548037797213,\n        0.00016921413771342486,\n        0.00011142507719341666,\n        0.0001736873236950487,\n        0.00016798758588265628,\n        0.00016135862097144127,\n        0.00023011487792246044,\n        0.00019850055105052888,\n        0.00022223546693567187,\n        0.00015040214930195361,\n        0.00010878892499022186,\n        0.00012032399536110461,\n        0.0001683360169408843,\n        0.00010194521019002423,\n        0.00010922731598839164,\n        0.00011315647134324536,\n        0.00014906079741194844,\n        0.00011425020056776702,\n        0.00013688816397916526,\n        0.00011956247908528894,\n        0.00012710549344774336,\n        0.0001373078121105209,\n        9.616550232749432e-05,\n        0.00012374474317766726,\n        0.0001387390511808917,\n        0.00011034560884581879,\n        0.00015106640057638288,\n        0.00013321336882654577,\n        0.00013068532280158252,\n        0.0001238830154761672,\n        3.5043267416767776e-05,\n        5.793091986561194e-05,\n        6.0078134993091226e-05,\n        6.866654439363629e-05,\n        6.455856055254117e-05,\n        0.00010673276119632646,\n        8.42478548293002e-05,\n        1.6442976630060002e-05,\n        4.1696763219079e-05,\n        8.906947186915204e-05,\n        1.3742722330789547e-05,\n        2.585628863016609e-05,\n        9.801858686842024e-05,\n        4.721842196886428e-05,\n        7.442108471877873e-05,\n        7.457483297912404e-05,\n        9.555238648317754e-05,\n        8.735814481042325e-05,\n        4.24247446062509e-05,\n        0.000122399753308855,\n        0.00011844033724628389,\n        0.0001572426117490977,\n        0.00011257569713052362,\n        7.014763104962185e-05,\n        0.00012215014430694282,\n        0.0001584010460646823,\n        0.00018916426051873714,\n        0.00017135980306193233,\n        0.00013852526899427176,\n        7.918728078948334e-05,\n        0.0001197226665681228,\n        0.00010744211613200605,\n        7.324712350964546e-05,\n        8.564758900320157e-05,\n        4.234168955008499e-05,\n        6.541723269037902e-05,\n        8.11352365417406e-05,\n        9.741204848978668e-05,\n        0.00012837149552069604,\n        5.916685040574521e-05,\n        0.00011911414185306057,\n        5.4193147661862895e-05,\n        6.892716919537634e-05,\n        8.128494664561003e-05,\n        2.0830222638323903e-05,\n        0.00014178630954120308,\n        8.861280366545543e-05,\n        4.672710201703012e-05,\n        9.323891572421417e-05,\n        2.742482138273772e-05,\n        5.996344771119766e-05,\n        8.693029667483643e-05,\n        7.704898598603904e-05,\n        8.991822687676176e-05,\n        6.603085057577118e-05,\n        6.350229523377493e-05,\n        3.858771378872916e-05,\n        4.123266626265831e-05,\n        5.6468150432920083e-05,\n        6.485519406851381e-05,\n        4.279454878997058e-05,\n        5.1373579481150955e-05,\n        -1.752183720782341e-06,\n        8.047432493185624e-05,\n        4.529457874014042e-05,\n        5.4101670684758574e-05,\n        4.8517296818317845e-05,\n        5.5148761020973325e-05,\n        2.7456646421342157e-05,\n        5.347358819562942e-05,\n        3.0464523661066778e-05,\n        2.2438673568103695e-06,\n        3.751219264813699e-05,\n        -4.494745735428296e-05,\n        2.306158421561122e-05,\n        -5.8287008869228885e-05,\n        1.3581654457084369e-05,\n        -3.08772359858267e-05,\n        1.5110084859770723e-05,\n        -1.0787006431201007e-05,\n        2.1157900846446864e-05,\n        5.348011472960934e-05,\n        3.7935187719995156e-05,\n        2.0466923160711303e-05,\n        6.225203833309934e-05,\n        9.277283970732242e-05,\n        6.079854938434437e-05,\n        9.751512698130682e-05,\n        2.6876215997617692e-05,\n        9.284458428737707e-06,\n        1.4647762327513192e-05,\n        7.447756070178002e-05,\n        2.8633645342779346e-05,\n        6.307338480837643e-05,\n        3.7913461710559204e-05,\n        4.38135139120277e-05,\n        6.18484482401982e-05,\n        2.1671923605026677e-05,\n        1.0909147931670304e-05,\n        1.6268875697278418e-05,\n        7.281460420927033e-05,\n        5.170536314835772e-05,\n        1.0396292054792866e-05,\n        8.995398820843548e-05,\n        5.2242168749216944e-05,\n        6.82954050716944e-05,\n        4.648181493394077e-05,\n        6.125943036749959e-05,\n        6.804704025853425e-05,\n        5.942756979493424e-05,\n        6.0699356254190207e-05,\n        8.76798658282496e-05,\n        5.2374602091731504e-05,\n        3.1183077226160094e-05,\n        5.9810543461935595e-05,\n        2.886314359784592e-05,\n        3.404498056625016e-05,\n        -1.2656863873417024e-05,\n        4.358298610895872e-05,\n        6.213270535226911e-05,\n        9.455774852540344e-05,\n        6.680599472019821e-05,\n        7.816795550752431e-05,\n        1.0456997188157402e-05,\n        7.519539940403774e-05,\n        5.961086935712956e-05,\n        -3.226831540814601e-05,\n        3.354670752742095e-06,\n        5.450614116853103e-05,\n        4.9223381211049855e-05,\n        1.7955559087567963e-05,\n        5.4605807235930115e-05,\n        5.4098505643196404e-05,\n        4.023033761768602e-05,\n        2.215719359810464e-05,\n        9.28173030843027e-05,\n        0.00015499348228331655,\n        4.6104432840365916e-05,\n        0.00012530320964287966,\n        8.409294241573662e-05,\n        3.256810668972321e-05,\n        9.745951683726162e-05,\n        6.591817509615794e-05,\n        0.00011156374239362776,\n        9.757445513969287e-05,\n        8.59956126078032e-05,\n        9.320703247794881e-05,\n        9.859423153102398e-05,\n        0.00010753430251497775,\n        0.00013936149480286986,\n        7.975575135787949e-05,\n        3.723126428667456e-05,\n        1.822783815441653e-05,\n        4.8221758333966136e-05,\n        5.972970757284202e-05,\n        7.025437662377954e-05,\n        4.1985807911260054e-05,\n        2.4789927920210175e-05,\n        3.8668593333568424e-05,\n        7.144214760046452e-05,\n        -1.515378517069621e-05,\n        2.302770189999137e-05,\n        1.6745356333558448e-05,\n        -1.3252620192361064e-05,\n        4.240800626575947e-05,\n        -1.8665501556824893e-05,\n        5.098159454064444e-05,\n        2.3964561478351243e-05,\n        -2.822734359142487e-06,\n        -1.746703674143646e-06,\n        -3.870249565807171e-05,\n        5.543033330468461e-05,\n        2.7892732759937644e-05,\n        -2.3805607270332985e-05,\n        4.860860281041823e-05,\n        2.374733412580099e-05,\n        2.8904134524054825e-05,\n        2.164657780667767e-05,\n        0.00010403835767647251,\n        -3.240879232180305e-05,\n        -2.122329897247255e-05,\n        5.879290620214306e-05,\n        -6.94171103532426e-05,\n        2.450728743497166e-06,\n        -2.0547740859910846e-05,\n        -4.7947261919034645e-05,\n        -2.908467422457761e-06,\n        -2.3726577637717128e-05,\n        -4.6132518036756665e-05,\n        -6.041858796379529e-06,\n        3.152146291540703e-06,\n        2.8988670237595215e-05,\n        2.217280416516587e-05,\n        2.8112652216805145e-05,\n        3.869443025905639e-05,\n        5.2203064115019515e-05,\n        3.5179502447135746e-05,\n        8.188709034584463e-05,\n        7.977792847668752e-05,\n        4.2749445128720254e-05,\n        8.097398676909506e-05,\n        1.679307024460286e-05,\n        3.2182819268200547e-05,\n        3.3163316402351484e-05,\n        6.733725604135543e-05,\n        9.327723819296807e-05,\n        2.9106633519404568e-05,\n        0.00013346063497010618,\n        5.2479088481049985e-05,\n        -4.735008133138763e-06,\n        7.016575546003878e-05,\n        2.353181116632186e-05,\n        1.0135411685041618e-05,\n        4.919524508295581e-05,\n        5.374041575123556e-05,\n        -5.4724863730371e-05,\n        2.7568528821575455e-05,\n        4.530970909399912e-05,\n        3.774389551836066e-05,\n        6.061164094717242e-05,\n        6.158279575174674e-05,\n        7.433988685079385e-06,\n        -1.990521195693873e-05,\n        2.9341463232412934e-05,\n        3.4808814234565943e-05,\n        4.64995810034452e-06,\n        2.9221844670246355e-05,\n        6.358244718285277e-05,\n        2.3115742351365043e-06,\n        4.3275733332848176e-05,\n        1.8054804968414828e-05,\n        2.340992614335846e-05,\n        3.170751369907521e-05,\n        5.519051046576351e-05,\n        5.8217097830493e-05,\n        4.876027014688589e-05,\n        5.5848577176220715e-06,\n        5.7759880291996524e-05,\n        0.00010933863086393103,\n        6.747653242200613e-05,\n        5.359334681998007e-05,\n        4.436160816112533e-05,\n        8.796763722784817e-05,\n        8.821785013424233e-05,\n        8.614394027972594e-05,\n        6.441769073717296e-05,\n        0.0001208048197440803,\n        6.091539398767054e-05,\n        2.5414919946342707e-05,\n        8.32774821901694e-05,\n        4.181683107162826e-05,\n        4.4740740122506395e-05,\n        0.00013610116729978472,\n        3.773530261241831e-05,\n        1.1782149158534594e-05,\n        6.941542233107612e-05,\n        5.1134633395122364e-05,\n        3.5660174035001546e-05,\n        1.3693090295419097e-05,\n        6.725201819790527e-05,\n        -4.0055406316241715e-06,\n        9.557703015161678e-05,\n        0.0001208203611895442,\n        2.6282887120032683e-05,\n        3.256034688092768e-05,\n        1.711609547783155e-05,\n        4.930283466819674e-05,\n        0.00011454468040028587,\n        7.575432391604409e-05,\n        6.756508082617074e-05,\n        7.217214442789555e-05,\n        7.522669329773635e-05,\n        8.574062667321414e-05,\n        6.209783168742433e-05,\n        9.31785543798469e-05,\n        2.851428507710807e-05,\n        8.498917304677889e-05,\n        6.892898090882227e-05,\n        0.00010146456770598888,\n        8.60299842315726e-05,\n        0.00012519684969447553,\n        0.00015536129649262875,\n        0.00011812423326773569,\n        0.00015940795128699392,\n        0.00010724562162067741,\n        0.00012290573795326054,\n        0.00011104950681328773,\n        0.0001684881717665121,\n        0.00014443055260926485,\n        0.00013645444414578378,\n        0.00013328521163202822,\n        0.0001038122209138237,\n        0.00013218296226114035,\n        0.0001110778030124493,\n        0.000147046463098377,\n        0.0001582770055392757,\n        0.00015830794291105121,\n        0.00011396566696930677,\n        0.00012513197725638747,\n        0.00012696220073848963,\n        0.0001769426598912105,\n        0.00010263206786476076,\n        7.32744883862324e-05,\n        0.00020168026094324887,\n        9.978418529499322e-05,\n        0.0001859798067016527,\n        0.00012544608034659177,\n        0.00013890302216168493,\n        0.00016850435349624604,\n        0.000148879480548203,\n        0.0001944977993844077,\n        0.00010005088552134112,\n        8.713241550140083e-05,\n        0.00011552446812856942,\n        0.00017953742644749582,\n        7.803674816386774e-05,\n        0.00014175070100463927,\n        0.00010450484114699066,\n        0.00010301829024683684,\n        0.00014103752619121224,\n        0.00010112236486747861,\n        0.00012060368317179382,\n        0.00015461324073839933,\n        0.00013807430514134467,\n        0.00012311595492064953,\n        0.00010499521158635616,\n        0.0001208840258186683,\n        0.00010234020737698302,\n        0.00010799469600897282,\n        0.00010632928751874715,\n        8.612583769718185e-05,\n        0.00012578796304296702,\n        0.00013627232692670077,\n        0.00011450315651018173,\n        4.052920485264622e-05,\n        9.769511962076649e-05,\n        6.220376963028684e-05,\n        6.119922909419984e-05,\n        3.3480304409749806e-05,\n        7.19032614142634e-05,\n        0.00011203820031369105,\n        5.196129495743662e-05,\n        0.00010347496572649106,\n        9.826343739405274e-05,\n        0.0001307761122006923,\n        0.00016443265485577285,\n        0.00011411631567170843,\n        0.00016729765047784895,\n        0.00011677962902467698,\n        0.00013270995987113565,\n        9.504550689598545e-05,\n        0.00018135433492716402,\n        0.00011847034329548478,\n        0.0001311184896621853,\n        0.00012711067392956465,\n        0.00011888478184118867,\n        0.00013065461826045066,\n        0.00011179975990671664,\n        0.0001428887917427346,\n        8.017042273422703e-05,\n        0.00012678380880970508,\n        0.00012581818737089634,\n        0.00014453052426688373,\n        0.00012130850518587977,\n        0.00015238542982842773,\n        0.00011783345689764246,\n        0.00017339401529170573,\n        0.0002089968475047499,\n        0.00016915133164729923,\n        0.0001439531333744526,\n        0.00020421750377863646,\n        0.00014345903764478862,\n        0.00020955751824658364,\n        0.00017069626483134925,\n        0.00017542566638439894,\n        0.0002229131932836026,\n        0.00018278163042850792,\n        0.0001921285584103316,\n        0.00018821169214788824,\n        0.00016839912859722972,\n        0.00016292103100568056,\n        0.00022147178242448717,\n        0.00014143725275062025,\n        0.000199384186998941,\n        0.00021442769502755255,\n        0.00016915574087761343,\n        0.00015721225645393133,\n        0.00013104190293233842,\n        0.00014982670836616307,\n        0.0001477177138440311,\n        0.00016631800099276006,\n        0.00018839330004993826,\n        0.00015390967018902302,\n        0.00020094646606594324,\n        0.00019479465845506638,\n        0.00020127558673266321,\n        0.0001520659716334194,\n        0.0001639810361666605,\n        0.00013495967141352594,\n        0.0001446153619326651,\n        0.00013077168841846287,\n        0.00013243600551504642,\n        0.00023130123736336827,\n        0.0002043636195594445,\n        0.00020564252918120474,\n        0.00021316332276910543,\n        0.0001940908987307921,\n        0.0001544270053273067,\n        0.00020762975327670574,\n        0.00019846927898470312,\n        0.00012178256292827427,\n        0.00019702588906511664,\n        0.00017992105858866125,\n        0.00012545018398668617,\n        0.000130380445625633,\n        0.0001746736088534817,\n        0.00021532084792852402,\n        0.0001249962078873068,\n        0.000193557032616809,\n        0.00012043288006680086,\n        0.00011451818863861263,\n        0.00017950471374206245,\n        0.00010482710786163807,\n        0.00017443863907828927,\n        7.161137909861282e-05,\n        0.00011285165965091437,\n        0.00015794728824403137,\n        0.0001227496686624363,\n        0.00014568700862582773,\n        7.766284397803247e-05,\n        6.36094919173047e-05,\n        0.00011007972352672368,\n        0.00012117072765249759,\n        9.694158507045358e-05,\n        0.00015999867173377424,\n        0.0001395876897731796,\n        0.00011646596976788715,\n        0.0001484710955992341,\n        0.00024301285156980157,\n        0.0001299869763897732,\n        0.0001349812955595553,\n        0.00014891361934132874,\n        0.00017157143156509846,\n        0.00016791238158475608,\n        0.00012355919170659035,\n        0.00015716874622739851,\n        0.00015068144421093166,\n        0.00018675212049856782,\n        0.00012013097148155794,\n        0.0001757641730364412,\n        0.0001835916773416102,\n        0.00025161384837701917,\n        0.000232734702876769,\n        0.0002409541339147836,\n        0.00020635488908737898,\n        0.0002216287248302251,\n        0.0002854446938727051,\n        0.00014655764971394092,\n        0.00021672493312507868,\n        0.00019612467440310866,\n        0.00025082958745770156,\n        0.00020277610747143626,\n        0.0001407704985467717,\n        0.0002136297698598355,\n        0.00014270804240368307,\n        0.00018846198508981615,\n        0.00022102735238149762,\n        0.00023299035092350096,\n        0.00022755525424145162,\n        0.0001974876649910584,\n        0.00022587775310967118,\n        0.00029095966601744294,\n        0.0002381627564318478,\n        0.00022256602824199945,\n        0.00020180930732749403,\n        0.00018224197265226394\n    ],\n    \"output_batch\": [\n        0.006117488723248243,\n        -0.058738838881254196,\n        -0.1281415820121765,\n        -0.15612387657165527,\n        -0.13103656470775604,\n        -0.06836206465959549,\n        0.005228493362665176,\n        0.0673174262046814,\n        0.10798989236354828,\n        0.12919028103351593,\n        0.13827741146087646,\n        0.14108841121196747,\n        0.1385117918252945,\n        0.12686245143413544,\n        0.10202401131391525,\n        0.06339991092681885,\n        0.016126178205013275,\n        -0.030548177659511566,\n        -0.06717745959758759,\n        -0.08788016438484192,\n        -0.09185957163572311,\n        -0.08273245394229889,\n        -0.06630709767341614,\n        -0.04870564863085747,\n        -0.0342642217874527,\n        -0.024683121591806412,\n        -0.019510798156261444,\n        -0.016909586265683174,\n        -0.015084993094205856,\n        -0.012828676030039787,\n        -0.009954793378710747,\n        -0.006965883541852236,\n        -0.004450287204235792,\n        -0.0028491313569247723,\n        -0.0020983568392693996,\n        -0.0018318123184144497,\n        -0.0015854579396545887,\n        -0.001119240652769804,\n        -0.00047290604561567307,\n        0.00019198330119252205,\n        0.0006259153597056866,\n        0.0006274222396314144,\n        0.00016608880832791328,\n        -0.00047346996143460274,\n        -0.0010499213822185993,\n        -0.0013150186277925968,\n        -0.0012478516437113285,\n        -0.0008667749352753162,\n        -0.0003280448727309704,\n        0.00020753731951117516,\n        0.0006185034289956093,\n        0.0008347914554178715,\n        0.0009576906450092793,\n        0.000968102365732193,\n        0.0009841741994023323,\n        0.0010300814174115658,\n        0.0011066901497542858,\n        0.0011912882328033447,\n        0.001202255953103304,\n        0.001177546102553606,\n        0.001049309503287077,\n        0.0008211513049900532,\n        0.0006568110547959805,\n        0.0005250382237136364,\n        0.0004601702094078064,\n        0.0005321796052157879,\n        0.0005960864946246147,\n        0.0006165946833789349,\n        0.0005850843153893948,\n        0.000539674423635006,\n        0.0004279869608581066,\n        0.0002930625341832638,\n        0.00020434381440281868,\n        0.0001498316414654255,\n        0.000138887669891119,\n        0.00016527529805898666,\n        0.0002483283169567585,\n        0.00030314456671476364,\n        0.00037724897265434265,\n        0.0003729932941496372,\n        0.00034649530425667763,\n        0.00030896021053195,\n        0.00023811263963580132,\n        0.00022329669445753098,\n        0.00019305991008877754,\n        0.00018313853070139885,\n        0.00021359883248806,\n        0.00022873422130942345,\n        0.00026638153940439224,\n        0.00029932986944913864,\n        0.00034522684291005135,\n        0.0003488399088382721,\n        0.00035065552219748497,\n        0.0003817095421254635,\n        0.0003856983967125416,\n        0.0003785709850490093,\n        0.0003340686671435833,\n        0.00027031218633055687,\n        0.00023354357108473778,\n        0.00025222310796380043,\n        0.00024217786267399788,\n        0.00020507583394646645,\n        0.00017120176926255226,\n        0.00020365184172987938,\n        0.0002307887189090252,\n        0.00033105863258242607,\n        0.00035801855847239494,\n        0.00035496195778250694,\n        0.0003676293417811394,\n        0.0003457055427134037,\n        0.00035058893263339996,\n        0.00036678044125437737,\n        0.0004289252683520317,\n        0.0004085320979356766,\n        0.000393744558095932,\n        0.00033073732629418373,\n        0.00026221713051199913,\n        0.00024934811517596245,\n        0.0002864920534193516,\n        0.0003265249542891979,\n        0.00035280222073197365,\n        0.00031616678461432457,\n        0.0003266502171754837,\n        0.0002604583278298378,\n        0.0001820889301598072,\n        0.00010271463543176651,\n        5.309423431754112e-05,\n        4.891538992524147e-05,\n        3.7217047065496445e-05,\n        0.00011297129094600677,\n        0.00019176863133907318,\n        0.0003090393729507923,\n        0.00036193057894706726,\n        0.0003872294910252094,\n        0.0004055495373904705,\n        0.0004638298414647579,\n        0.0004848325625061989,\n        0.00045250868424773216,\n        0.00043638236820697784,\n        0.0004073772579431534,\n        0.00036226073279976845,\n        0.0003445991314947605,\n        0.0003315126523375511,\n        0.0003027734346687794,\n        0.0002072458155453205,\n        0.00014327000826597214,\n        0.00010796450078487396,\n        0.00013098353520035744,\n        0.00013265060260891914,\n        0.00013979850336909294,\n        0.00018316181376576424,\n        0.0001779557205736637,\n        0.00017164787277579308,\n        0.0001777024008333683,\n        0.00020263390615582466,\n        0.0001752707175910473,\n        0.00017778296023607254,\n        0.0002475758083164692,\n        0.0002823295071721077,\n        0.0003101024776697159,\n        0.0003412286750972271,\n        0.00033937254920601845,\n        0.0003168550319969654,\n        0.00022298842668533325,\n        0.00018504029139876366,\n        0.00016210274770855904,\n        0.0002219141460955143,\n        0.00025934353470802307,\n        0.0002709687687456608,\n        0.0003109760582447052,\n        0.0002838145010173321,\n        0.0003010709770023823,\n        0.000327554065734148,\n        0.00035961298272013664,\n        0.0004284358583390713,\n        0.00039250869303941727,\n        0.00029634684324264526,\n        0.00024248845875263214,\n        0.00024391058832406998,\n        0.00024531083181500435,\n        0.000250356737524271,\n        0.00027448078617453575,\n        0.0002724486403167248,\n        0.0002659400925040245,\n        0.0002366011030972004,\n        0.0002287980169057846,\n        0.00020647887140512466,\n        0.0001613190397620201,\n        0.00014678016304969788,\n        0.00018461700528860092,\n        0.0001916135661303997,\n        0.0001756739802658558,\n        0.00014331890270113945,\n        0.00012289034202694893,\n        8.269166573882103e-05,\n        0.00016029318794608116,\n        0.00017797481268644333,\n        0.00021317368373274803,\n        0.00024378951638936996,\n        0.0002138749696314335,\n        0.0002021673135459423,\n        0.00015808595344424248,\n        0.00019377749413251877,\n        0.00022438261657953262,\n        0.0002478053793311119,\n        0.0002056439407169819,\n        0.00017178850248456,\n        0.00014480715617537498,\n        0.00012812577188014984,\n        0.00012987712398171425,\n        0.00012341607362031937,\n        9.679002687335014e-05,\n        8.033914491534233e-05,\n        8.325325325131416e-05,\n        0.00011849822476506233,\n        0.00012081163004040718,\n        0.00021613109856843948,\n        0.00027829548344016075,\n        0.00029779644683003426,\n        0.0003074090927839279,\n        0.00024336529895663261,\n        0.0001644599251449108,\n        6.637768819928169e-05,\n        3.8221944123506546e-05,\n        7.557449862360954e-05,\n        0.00012519815936684608,\n        0.000157033558934927,\n        0.00017855921760201454,\n        0.00018670829012989998,\n        0.00018038833513855934,\n        0.00021078111603856087,\n        0.00022973539307713509,\n        0.00021587638184428215,\n        0.00027228938415646553,\n        0.0003182669170200825,\n        0.00036121485754847527,\n        0.00036008981987833977,\n        0.0003201528452336788,\n        0.000253965612500906,\n        0.00024219369515776634,\n        0.0002497970126569271,\n        0.00019921455532312393,\n        0.00019233813509345055,\n        0.00020368443801999092,\n        0.00019258959218859673,\n        0.00021276669576764107,\n        0.00020138313993811607,\n        0.00019115163013339043,\n        0.0002078642137348652,\n        0.00026038940995931625,\n        0.00030647171661257744,\n        0.0003384239971637726,\n        0.00040029827505350113,\n        0.00034509459510445595,\n        0.0002971729263663292,\n        0.00029969867318868637,\n        0.0002752314321696758,\n        0.00023777270689606667,\n        0.00022156676277518272,\n        0.00025963829830288887,\n        0.00023245112970471382,\n        0.00019081169739365578,\n        0.00017204927280545235,\n        0.00010024989023804665,\n        7.72988423705101e-05,\n        7.616216316819191e-05,\n        0.0001272275112569332,\n        0.00021283095702528954,\n        0.0002877437509596348,\n        0.00032117823138833046,\n        0.00035065924748778343,\n        0.0003690090961754322,\n        0.00031482381746172905,\n        0.00029908400028944016,\n        0.0003009443171322346,\n        0.00030004093423485756,\n        0.00030491268262267113,\n        0.0002925707958638668,\n        0.0003253924660384655,\n        0.00037617189809679985,\n        0.0003947657532989979,\n        0.0003877761773765087,\n        0.0003591664135456085,\n        0.00036164047196507454,\n        0.0003591654822230339,\n        0.00040675094351172447,\n        0.000397559255361557,\n        0.00037887832149863243,\n        0.0003363075666129589,\n        0.00025680894032120705,\n        0.00023884978145360947,\n        0.00023050233721733093,\n        0.0002519371919333935,\n        0.0002640313468873501,\n        0.0002526952885091305,\n        0.000245578121393919,\n        0.00025531696155667305,\n        0.0002641337923705578,\n        0.00028877099975943565,\n        0.00024448009207844734,\n        0.00023549655452370644,\n        0.00022350065410137177,\n        0.00024575134739279747,\n        0.000288309995085001,\n        0.0003257244825363159,\n        0.000350345391780138,\n        0.000376096460968256,\n        0.00035772984847426414,\n        0.0002929326146841049,\n        0.00027485471218824387,\n        0.00021640630438923836,\n        0.00023171911016106606,\n        0.00020251749083399773,\n        0.00017870450392365456,\n        0.00020692450925707817,\n        0.00027209939435124397,\n        0.0003415006212890148,\n        0.0003186971880495548,\n        0.0002768435515463352,\n        0.0002519632689654827,\n        0.0002635386772453785,\n        0.0003346479497849941,\n        0.00036677392199635506,\n        0.0003536432050168514,\n        0.00035644182935357094,\n        0.0003237570635974407,\n        0.0002695675939321518,\n        0.00022239936515688896,\n        0.0002101506106555462,\n        0.0002189124934375286,\n        0.00024656346067786217,\n        0.00026577943935990334,\n        0.00026315217837691307,\n        0.00026363180950284004,\n        0.00028118956834077835,\n        0.00027266889810562134,\n        0.00022382987663149834,\n        0.0002468614839017391,\n        0.00028131622821092606,\n        0.0003155232407152653,\n        0.0003567934036254883,\n        0.00036059413105249405,\n        0.0003651771694421768,\n        0.00030892202630639076,\n        0.0002810535952448845,\n        0.00027215154841542244,\n        0.00021619955077767372,\n        0.0001877858303487301,\n        0.00012461887672543526,\n        8.199317380785942e-05,\n        9.84417274594307e-05,\n        0.00011948356404900551,\n        0.00017966190353035927,\n        0.00019461195915937424,\n        0.00024646520614624023,\n        0.00025940826162695885,\n        0.00023000501096248627,\n        0.00021863961592316628,\n        0.00017914501950144768,\n        0.00014680856838822365,\n        0.00012443633750081062,\n        0.00014846771955490112,\n        0.00014792336151003838,\n        0.00014806212857365608,\n        0.00012601353228092194,\n        0.00010518170893192291,\n        0.00015567662194371223,\n        0.000197588000446558,\n        0.000261909794062376,\n        0.00033299950882792473,\n        0.0003423597663640976,\n        0.0003485078923404217,\n        0.0002750842832028866,\n        0.00020082108676433563,\n        0.0001672813668847084,\n        0.00017633801326155663,\n        0.00018828781321644783,\n        0.00023730797693133354,\n        0.00030221976339817047,\n        0.0003024186007678509,\n        0.00031080376356840134,\n        0.0003256578929722309,\n        0.00031905947253108025,\n        0.00028806133195757866,\n        0.0002493518404662609,\n        0.00017035240307450294,\n        0.00012010568752884865,\n        9.615113958716393e-05,\n        0.00011284882202744484,\n        0.00018802518025040627,\n        0.00024546636268496513,\n        0.0003016269765794277,\n        0.0003566448576748371,\n        0.00040574977174401283,\n        0.00044871214777231216,\n        0.0004418059252202511,\n        0.0004372452385723591,\n        0.0003897971473634243,\n        0.00031485920771956444,\n        0.0002591474913060665,\n        0.00024077342823147774,\n        0.00023090234026312828,\n        0.0001602405682206154,\n        0.00012788502499461174,\n        0.0001196940429508686,\n        0.00014713546261191368,\n        0.00021173059940338135,\n        0.00021167146041989326,\n        0.00018075155094265938,\n        0.00010592909529805183,\n        4.5011285692453384e-05,\n        7.016537711024284e-05,\n        6.721634417772293e-05,\n        0.00011405302211642265,\n        0.0001923958770930767,\n        0.00023616431280970573,\n        0.0003101383335888386,\n        0.00038520572707057,\n        0.0004353984259068966,\n        0.00038386089727282524,\n        0.0003675655461847782,\n        0.0003600330092012882,\n        0.00032900506630539894,\n        0.00033834250643849373,\n        0.0003300062380731106,\n        0.00032040011137723923,\n        0.000297612976282835,\n        0.00027014268562197685,\n        0.00026748934760689735,\n        0.00023907842114567757,\n        0.00018071336671710014,\n        0.00017937785014510155,\n        0.0001905723474919796,\n        0.00026008905842900276,\n        0.0002839467488229275,\n        0.000287648756057024,\n        0.00028232065960764885,\n        0.0002864752896130085,\n        0.00035455962643027306,\n        0.00042977510020136833,\n        0.00045610032975673676,\n        0.00041887955740094185,\n        0.00036982912570238113,\n        0.00031671347096562386,\n        0.00030304910615086555,\n        0.0002889721654355526,\n        0.00030404841527342796,\n        0.0003165598027408123,\n        0.0002931184135377407,\n        0.0002894247882068157,\n        0.00028757378458976746,\n        0.0002398020587861538,\n        0.0002577626146376133,\n        0.0002137860283255577,\n        0.00016463873907923698,\n        0.00013222591951489449,\n        0.00010972050949931145,\n        0.0001400313340127468,\n        0.0001454758457839489,\n        0.00015641236677765846,\n        0.00011083018034696579,\n        0.00010743178427219391,\n        0.00010616378858685493,\n        9.4603281468153e-05,\n        0.00017448188737034798,\n        0.0002495250664651394,\n        0.0002993945963680744,\n        0.00030740536749362946,\n        0.00028981128707528114,\n        0.0003165537491440773,\n        0.0003574392758309841,\n        0.0003584134392440319,\n        0.0002918899990618229,\n        0.0002447133883833885,\n        0.00018625147640705109,\n        0.0001761200837790966,\n        0.0002060295082628727,\n        0.0002609463408589363,\n        0.0003055776469409466,\n        0.00033580465242266655,\n        0.00039160018786787987,\n        0.00035428861156105995,\n        0.00028988439589738846,\n        0.0002829250879585743,\n        0.0002731899730861187,\n        0.00025889649987220764,\n        0.00022310903295874596,\n        0.0001407582312822342,\n        7.924763485789299e-05,\n        5.514686927199364e-05,\n        0.00012663844972848892,\n        0.00022978940978646278,\n        0.0003411979414522648,\n        0.00041191745549440384,\n        0.000415007583796978,\n        0.00035248463973402977,\n        0.0002802531234920025,\n        0.00021569663658738136,\n        0.00013968674466013908,\n        0.00012214574962854385,\n        0.00012249452993273735,\n        0.00014655431732535362,\n        0.00016626762226223946,\n        0.00016026850789785385,\n        0.00017339782789349556,\n        0.00020874524489045143,\n        0.00023272400721907616,\n        0.000251042190939188,\n        0.0002653556875884533,\n        0.00020977621898055077,\n        0.00011325674131512642,\n        7.98194669187069e-05,\n        5.934014916419983e-05,\n        8.192146196961403e-05,\n        0.00011666025966405869,\n        0.00015981914475560188,\n        0.00023485999554395676,\n        0.00027352431789040565,\n        0.0003001587465405464,\n        0.00030553480610251427,\n        0.0003219321370124817,\n        0.00030771829187870026,\n        0.00029687443748116493,\n        0.00027750013396143913,\n        0.0002396153286099434,\n        0.000221956055611372,\n        0.00021852226927876472,\n        0.00022202404215931892,\n        0.00024396460503339767,\n        0.00027191732078790665,\n        0.0002726190723478794,\n        0.0002783951349556446,\n        0.00022788578644394875,\n        0.00013120146468281746,\n        4.4504646211862564e-05,\n        3.767898306250572e-05,\n        3.569992259144783e-05,\n        5.3184106945991516e-05,\n        5.324883386492729e-05,\n        5.3110066801309586e-05,\n        7.593631744384766e-05,\n        6.6359993070364e-05,\n        8.328258991241455e-05,\n        8.658552542328835e-05,\n        6.123911589384079e-05,\n        5.457410588860512e-05,\n        8.607236668467522e-05,\n        0.00014207931235432625,\n        0.00021532690152525902,\n        0.0002958965487778187,\n        0.00032735010609030724,\n        0.00035990728065371513,\n        0.0003717406652867794,\n        0.0002900380641222,\n        0.00019753212109208107,\n        0.00011619133874773979,\n        7.356470450758934e-05,\n        5.4809730499982834e-05,\n        7.636845111846924e-05,\n        9.010313078761101e-05,\n        0.00010787276551127434,\n        0.00013257144019007683,\n        0.00014589028432965279,\n        0.00017733080312609673,\n        0.0001886053942143917,\n        0.00014122715219855309,\n        0.00014467677101492882,\n        0.000164759811013937,\n        0.00015983497723937035,\n        0.0002219569869339466,\n        0.00027693621814250946,\n        0.00025289226323366165,\n        0.0002178712747991085,\n        0.0001936717890202999,\n        0.000131234060972929,\n        0.00012003490701317787,\n        0.00011690100654959679,\n        0.0001200786791741848,\n        0.00014437735080718994,\n        0.0001838519237935543,\n        0.00022668065503239632,\n        0.00022914865985512733,\n        0.00020226836204528809,\n        0.00017310911789536476,\n        0.00016591371968388557,\n        0.00020043225958943367,\n        0.00021268660202622414,\n        0.0002635074779391289,\n        0.0002809888683259487,\n        0.0002488926984369755,\n        0.00025336770340800285,\n        0.00020214123651385307,\n        0.00022935541346669197,\n        0.00021078484132885933,\n        0.0002662045881152153,\n        0.0003130761906504631,\n        0.00033507682383060455,\n        0.00035272492095828056,\n        0.0002714376896619797,\n        0.00023598922416567802,\n        0.00020867353305220604,\n        0.00022767623886466026,\n        0.00027770455926656723,\n        0.00030443770810961723,\n        0.0003010123036801815,\n        0.00025615375488996506,\n        0.000179970171302557,\n        0.0001640445552766323,\n        0.00015950622037053108,\n        0.00018519675359129906,\n        0.00020099198445677757,\n        0.0002662227489054203,\n        0.00030861422419548035,\n        0.0002938825637102127,\n        0.0002459338866174221,\n        0.00016659032553434372,\n        0.00013402430340647697,\n        0.00012251315638422966,\n        0.00013829628005623817,\n        0.00013695983216166496,\n        0.00017264718189835548,\n        0.00022743595764040947,\n        0.0002492298372089863,\n        0.0002891598269343376,\n        0.0002919095568358898,\n        0.0002808677963912487,\n        0.0002801339142024517,\n        0.00023818295449018478,\n        0.00015713274478912354,\n        8.750660344958305e-05,\n        0.00012562843039631844,\n        0.00014352751895785332,\n        0.00019902409985661507,\n        0.00023384997621178627,\n        0.0001885681413114071,\n        0.00016244454309344292,\n        0.00015970086678862572,\n        0.00015742843970656395,\n        0.0001714988611638546,\n        0.0002436167560517788,\n        0.0002898699603974819,\n        0.0003278232179582119,\n        0.0003786538727581501,\n        0.0003378894180059433,\n        0.00026300549507141113,\n        0.0002049645408987999,\n        0.00013192510232329369,\n        0.00014408165588974953,\n        0.0002047307789325714,\n        0.0002770940773189068,\n        0.00028802594169974327,\n        0.000297334510833025,\n        0.00027855997905135155,\n        0.0001950436271727085,\n        0.00019976915791630745,\n        0.00019879546016454697,\n        0.00022819219157099724,\n        0.00025569135323166847,\n        0.00030934251844882965,\n        0.0003340160474181175,\n        0.00032164203003048897,\n        0.0003201509825885296,\n        0.00026789167895913124,\n        0.00021313177421689034,\n        0.00013221846893429756,\n        7.547298446297646e-05,\n        0.00010479195043444633,\n        0.00015005748718976974,\n        0.00023877248167991638,\n        0.0003081369213759899,\n        0.000340836588293314,\n        0.0003500902093946934,\n        0.00028066663071513176,\n        0.00023692520335316658,\n        0.0001644347794353962,\n        0.0001392182894051075,\n        0.00012149009853601456,\n        0.00013967650011181831,\n        0.0001939353533089161,\n        0.0002406863495707512,\n        0.00028952211141586304,\n        0.0003817169927060604,\n        0.0004224521107971668,\n        0.0004242849536240101,\n        0.00039230985566973686,\n        0.00033955229446291924,\n        0.0003403909504413605,\n        0.00033206725493073463,\n        0.0003697792999446392,\n        0.00038215192034840584,\n        0.00036210939288139343,\n        0.00031727971509099007,\n        0.0002818615175783634,\n        0.00018323538824915886,\n        0.0001552659086883068,\n        0.00013984134420752525,\n        0.00016167247667908669,\n        0.00020130909979343414,\n        0.0002464917488396168,\n        0.000327876303344965,\n        0.0003053196705877781,\n        0.0002999715507030487,\n        0.0002834717743098736,\n        0.0002699284814298153,\n        0.0003032130189239979,\n        0.0003011194057762623,\n        0.00033021625131368637,\n        0.0003355862572789192,\n        0.0003194129094481468,\n        0.0003437246195971966,\n        0.0002923132851719856,\n        0.00027348799630999565,\n        0.000245529692620039,\n        0.000250921119004488,\n        0.00022527994588017464,\n        0.000220500398427248,\n        0.0001843324862420559,\n        0.00012686243280768394,\n        0.00015779538080096245,\n        0.00016701733693480492,\n        0.00016519520431756973,\n        0.00017238641157746315,\n        0.00019303476437926292,\n        0.0002130628563463688,\n        0.0002441774122416973,\n        0.0002490431070327759,\n        0.00023371540009975433,\n        0.0002702358178794384,\n        0.00029877619817852974,\n        0.0002911756746470928,\n        0.00030683353543281555,\n        0.0002787257544696331,\n        0.0002712761051952839,\n        0.00029471050947904587,\n        0.00036898674443364143,\n        0.00039784377440810204,\n        0.00035023363307118416,\n        0.00031468598172068596,\n        0.00029080966487526894,\n        0.0002779434435069561,\n        0.0003276299685239792,\n        0.0003631790168583393,\n        0.00038682157173752785,\n        0.00037250854074954987,\n        0.00037414347752928734,\n        0.00030269846320152283,\n        0.00022081704810261726,\n        0.00023684510961174965,\n        0.00023079942911863327,\n        0.0002128775231540203,\n        0.00020618131384253502,\n        0.00022755982354283333,\n        0.000250199344009161,\n        0.00028958776965737343,\n        0.0003271312452852726,\n        0.0003184503875672817,\n        0.0002607889473438263,\n        0.00020759785547852516,\n        0.00017843814566731453,\n        0.00013880571350455284,\n        0.00014139385893940926,\n        0.0001862221397459507,\n        0.0001585688441991806,\n        0.00017162365838885307,\n        0.0001844358630478382,\n        0.00018730061128735542,\n        0.00021310662850737572,\n        0.00028851209208369255,\n        0.00034256279468536377,\n        0.0003462168388068676,\n        0.00031181657686829567,\n        0.00021924683824181557,\n        0.00017266767099499702,\n        0.00013129087164998055,\n        0.0001250668428838253,\n        0.0001495499163866043,\n        0.00016885297372937202,\n        0.00023580854758620262,\n        0.0002819313667714596,\n        0.0003196890465915203,\n        0.00034497445449233055,\n        0.00033419113606214523,\n        0.00031909486278891563,\n        0.00027465401217341423,\n        0.0002600676380097866,\n        0.0002763778902590275,\n        0.0002672695554792881,\n        0.000262474175542593,\n        0.00024279160425066948,\n        0.00022824713960289955,\n        0.0001937365159392357,\n        0.00019149621948599815,\n        0.00019703712314367294,\n        0.00027959607541561127,\n        0.0003685583360493183,\n        0.00036237621679902077,\n        0.0003556879237294197,\n        0.00036566564813256264,\n        0.0003771199844777584,\n        0.0003742682747542858,\n        0.0003819870762526989,\n        0.0003785151056945324,\n        0.0003544664941728115,\n        0.0003112903796136379,\n        0.00032716477289795876,\n        0.00028921011835336685,\n        0.0001918482594192028,\n        7.585948333144188e-05,\n        -2.2286083549261093e-05,\n        -4.075607284903526e-05,\n        5.599763244390488e-05,\n        0.00011694291606545448,\n        0.00014849146828055382,\n        0.00019083218649029732,\n        0.00017785746604204178,\n        0.0001547234132885933,\n        0.00011655734851956367,\n        0.00012178905308246613,\n        0.0001028883270919323,\n        0.00013994751498103142,\n        0.00017904071137309074,\n        0.0002489602193236351,\n        0.00031243590638041496,\n        0.0003561703488230705,\n        0.0003611012361943722,\n        0.00035903556272387505,\n        0.00033844588324427605,\n        0.00029229698702692986,\n        0.00033312710002064705,\n        0.00035834964364767075,\n        0.0003873654641211033,\n        0.00032937293872237206,\n        0.0003088745288550854,\n        0.0002766372635960579,\n        0.00027531804516911507,\n        0.00021646125242114067,\n        0.00015051988884806633,\n        0.00014404905959963799,\n        8.489703759551048e-05,\n        0.00011179642751812935,\n        0.0001576840877532959,\n        0.00024245260283350945,\n        0.00030875438824296,\n        0.0003710719756782055,\n        0.0003849058412015438,\n        0.0003937440924346447,\n        0.0003968416713178158,\n        0.0003826241008937359,\n        0.0004006144590675831,\n        0.0004237755201756954,\n        0.0004113423638045788,\n        0.0004146541468799114,\n        0.00036399951204657555,\n        0.000244304072111845,\n        0.00019937613978981972,\n        0.00022381963208317757,\n        0.00031697237864136696,\n        0.00037924526259303093,\n        0.0004225093871355057,\n        0.00041029229760169983,\n        0.0003941240720450878,\n        0.0003368980251252651,\n        0.00029691681265830994,\n        0.00026380736380815506,\n        0.0002483460120856762,\n        0.0002641049213707447,\n        0.0002851528115570545,\n        0.00028963154181838036,\n        0.0002394421026110649,\n        0.00024040229618549347,\n        0.00029012979939579964,\n        0.00032650819048285484,\n        0.0002979366108775139,\n        0.0003224019892513752,\n        0.0002954341471195221,\n        0.00023909704759716988,\n        0.00022275419905781746,\n        0.00019430043175816536,\n        0.00016705086454749107,\n        0.0001279781572520733,\n        0.00011528516188263893,\n        0.00016432302072644234,\n        0.0002247183583676815,\n        0.0003358679823577404,\n        0.0004019034095108509,\n        0.000406517181545496,\n        0.0003867810592055321,\n        0.000304665882140398,\n        0.00023771915584802628,\n        0.00023383740335702896,\n        0.0002454356290400028,\n        0.00025192927569150925,\n        0.0003185444511473179,\n        0.0003442256711423397,\n        0.0003577279858291149,\n        0.0002884841524064541,\n        0.00022312672808766365,\n        0.0001819930039346218,\n        0.00015107495710253716,\n        0.00020170118659734726,\n        0.0002227267250418663,\n        0.00026008253917098045,\n        0.0002749902196228504,\n        0.00029462529346346855,\n        0.0003011864610016346,\n        0.0002605072222650051,\n        0.00025576725602149963,\n        0.00024288753047585487,\n        0.00023076264187693596,\n        0.0002590199001133442,\n        0.00026398198679089546,\n        0.00031269481405615807,\n        0.00028772978112101555,\n        0.00027038389816880226,\n        0.00023789750412106514,\n        0.00025933049619197845,\n        0.0002854294143617153,\n        0.0002997186966240406,\n        0.0003886907361447811,\n        0.0004015606828033924,\n        0.00040783919394016266,\n        0.000378213357180357,\n        0.00028887810185551643,\n        0.0002018292434513569,\n        0.0001038750633597374,\n        5.4623931646347046e-05,\n        8.633453398942947e-05,\n        0.00015403563156723976,\n        0.00021677231416106224,\n        0.0002282499335706234,\n        0.0002640639431774616,\n        0.0002763955853879452,\n        0.0003318977542221546,\n        0.00027047423645853996,\n        0.00024518324062228203,\n        0.00019308924674987793,\n        0.00017747236415743828,\n        0.00024214014410972595,\n        0.00033411895856261253,\n        0.00041520828381180763,\n        0.0004039560444653034,\n        0.00039528636261820793,\n        0.00033931294456124306,\n        0.0002631554380059242,\n        0.00022267969325184822,\n        0.00021327100694179535,\n        0.0002563479356467724,\n        0.0003011873923242092,\n        0.0003169314004480839,\n        0.0003366325981914997,\n        0.0002976497635245323,\n        0.00029495591297745705,\n        0.0002911030314862728,\n        0.00029192864894866943,\n        0.0002457904629409313,\n        0.00022320635616779327,\n        0.00021781353279948235,\n        0.00021247891709208488,\n        0.00022797612473368645,\n        0.00023060990497469902,\n        0.00027040811255574226,\n        0.0003169216215610504,\n        0.00027422141283750534,\n        0.0002609998919069767,\n        0.00021963473409414291,\n        0.00023495592176914215,\n        0.0003065844066441059,\n        0.00033725379034876823,\n        0.0003889952786266804,\n        0.00034187035635113716,\n        0.0002666502259671688,\n        0.0001996997743844986,\n        0.00016668858006596565,\n        0.00014728866517543793,\n        0.0001794765703380108,\n        0.00019803224131464958,\n        0.000193803571164608,\n        0.00021828478202223778,\n        0.00021741958335042,\n        0.00018931599333882332,\n        0.0001838267780840397,\n        0.0002063359133899212,\n        0.00023318221792578697,\n        0.00022900477051734924,\n        0.00020518293604254723,\n        0.00019718799740076065,\n        0.0002279370091855526,\n        0.00024219276383519173,\n        0.00025407643988728523,\n        0.00026949821040034294,\n        0.0002619386650621891,\n        0.0002766312099993229,\n        0.0002817893400788307,\n        0.0002871183678507805,\n        0.0002682572230696678,\n        0.00023813778534531593,\n        0.000283293891698122,\n        0.0003476296551525593,\n        0.00038607092574238777,\n        0.0004220246337354183,\n        0.00037217652425169945,\n        0.0003375341184437275,\n        0.0002818317152559757,\n        0.00020416686311364174,\n        0.00019847648218274117,\n        0.0002275756560266018,\n        0.00026265811175107956,\n        0.0002729366533458233,\n        0.00027844496071338654,\n        0.00030985521152615547,\n        0.0003327284939587116,\n        0.00037465430796146393,\n        0.0003608139231801033,\n        0.00032712100073695183,\n        0.0002851579338312149,\n        0.00025896960869431496,\n        0.00021365517750382423,\n        0.00022451067343354225,\n        0.0002446267753839493,\n        0.00024461233988404274,\n        0.0002635642886161804,\n        0.00019588228315114975,\n        0.00019101938232779503,\n        0.00014847097918391228,\n        0.00016603199765086174,\n        0.00016528042033314705,\n        0.00015667220577597618,\n        0.00019041262567043304,\n        0.0002223108895123005,\n        0.0002497648820281029,\n        0.00027903029695153236,\n        0.00032286113128066063,\n        0.00034680450335144997,\n        0.0003138650208711624,\n        0.0003318297676742077,\n        0.00035567767918109894,\n        0.0003454643301665783,\n        0.000314964447170496,\n        0.00022973259910941124,\n        0.00014514336362481117,\n        4.854938015341759e-05,\n        2.6323366910219193e-05,\n        2.028467133641243e-05,\n        0.0001132800243794918,\n        0.00020052632316946983,\n        0.00023887353017926216,\n        0.000244783703237772,\n        0.00023085111752152443,\n        0.00022673280909657478,\n        0.0001975400373339653,\n        0.0001867399550974369,\n        0.00021085655316710472,\n        0.00024072220548987389,\n        0.00028637703508138657,\n        0.00032206764444708824,\n        0.0003582579083740711,\n        0.000359369907528162,\n        0.000349205918610096,\n        0.0003280411474406719,\n        0.0002718893811106682,\n        0.00019532302394509315,\n        0.00019715866073966026,\n        0.00021272478625178337,\n        0.00022492511197924614,\n        0.0002635754644870758,\n        0.00023515569046139717,\n        0.00019788555800914764,\n        0.00010306853801012039,\n        5.952548235654831e-05,\n        -1.4074612408876419e-05,\n        -3.1074974685907364e-05,\n        2.7523376047611237e-05,\n        7.594423368573189e-05,\n        0.00015554716810584068,\n        0.00017181551083922386,\n        0.00020030001178383827,\n        0.00023890798911452293,\n        0.0002768603153526783,\n        0.0003266078419983387,\n        0.00033196108415722847,\n        0.000315024983137846,\n        0.00027056876569986343,\n        0.00027904147282242775,\n        0.00027534225955605507,\n        0.0002790880389511585,\n        0.00028641941025853157,\n        0.00024178018793463707,\n        0.00021143397316336632,\n        0.00022987136617302895,\n        0.00023402879014611244,\n        0.00018086377531290054,\n        0.0001711808145046234,\n        0.00015436066314578056,\n        0.00016090739518404007,\n        0.00017678039148449898,\n        0.00015422655269503593,\n        0.00016305549070239067,\n        0.00018044235184788704,\n        0.0001448444090783596,\n        0.00011561950668692589,\n        0.0001348075456917286,\n        0.0001702229492366314,\n        0.00019451649859547615,\n        0.0002023349516093731,\n        0.00021733995527029037,\n        0.00018100161105394363,\n        0.00017226627096533775,\n        0.00021739536896348,\n        0.000258010346442461,\n        0.00028972839936614037,\n        0.00029421737417578697,\n        0.00023989425972104073,\n        0.00016995565965771675,\n        0.00017773499712347984,\n        0.00018576113507151604,\n        0.0002174866385757923,\n        0.0002713301219046116,\n        0.00022456934675574303,\n        0.00025211088359355927,\n        0.0002775336615741253,\n        0.00027545588091015816,\n        0.00025715725496411324,\n        0.00019153067842125893,\n        0.00019523734226822853,\n        0.00015008263289928436,\n        9.209150448441505e-05,\n        3.436673432588577e-05,\n        3.3865682780742645e-05,\n        6.663473322987556e-05,\n        6.080279126763344e-05,\n        7.715309038758278e-05,\n        0.00011168187484145164,\n        9.258976206183434e-05,\n        5.920184776186943e-05,\n        4.169391468167305e-05,\n        5.281670019030571e-05,\n        8.204067125916481e-05,\n        8.743861690163612e-05,\n        8.406816050410271e-05,\n        9.70284454524517e-05,\n        0.0001331842504441738,\n        0.0001342720352113247,\n        0.00013996148481965065,\n        0.00013986369594931602,\n        0.0001390744000673294,\n        0.00015744613483548164,\n        0.00018122605979442596,\n        0.000160114374011755,\n        0.00014702416956424713,\n        0.00015578651800751686,\n        0.0001277378760278225,\n        0.00010162265971302986,\n        3.2979995012283325e-05,\n        2.081599086523056e-05,\n        6.687687709927559e-05,\n        0.00010781129822134972,\n        0.0001299097202718258,\n        0.00018862774595618248,\n        0.0002599037252366543,\n        0.00028535444289445877,\n        0.0002507367171347141,\n        0.00012700119987130165,\n        -4.370370879769325e-05,\n        -0.0001482493244111538,\n        -0.00016206735745072365,\n        -0.00012612855061888695,\n        -9.786803275346756e-06,\n        0.00011398782953619957,\n        0.00019255606457591057,\n        0.00024329358711838722,\n        0.00023014051839709282,\n        0.00018190545961260796,\n        0.00013587577268481255,\n        0.00011090375483036041,\n        0.0001498148776590824,\n        0.00011236965656280518,\n        6.524240598082542e-05,\n        5.230167880654335e-05,\n        6.1029102653265e-05,\n        6.658630445599556e-05,\n        6.063748151063919e-05,\n        4.096422344446182e-05,\n        -5.857739597558975e-05,\n        -0.00015794718638062477,\n        -0.0001710415817797184,\n        -0.00011174893006682396,\n        -1.7866957932710648e-05,\n        4.383223131299019e-05,\n        9.737489745020866e-05,\n        0.00013394467532634735,\n        0.0001123347319662571,\n        8.858507499098778e-05,\n        7.756194099783897e-05,\n        0.00010023964568972588,\n        0.00016465596854686737,\n        0.00017546769231557846,\n        0.00021211104467511177,\n        0.00021090684458613396,\n        0.00013884343206882477,\n        0.00011145789176225662,\n        4.834728315472603e-05,\n        5.69676049053669e-05,\n        2.3134052753448486e-05,\n        8.371053263545036e-05,\n        0.00015113316476345062,\n        0.00018195388838648796,\n        0.00016983365640044212,\n        9.761331602931023e-05,\n        8.3134975284338e-05,\n        7.057376205921173e-05,\n        9.518908336758614e-05,\n        0.0001407354138791561,\n        0.00017743883654475212,\n        0.00020451471209526062,\n        0.0002498519606888294,\n        0.0002817348577082157,\n        0.00026275357231497765,\n        0.00018383609130978584,\n        0.00012157158926129341,\n        1.5061814337968826e-05,\n        -2.9224436730146408e-05,\n        -2.3333821445703506e-05,\n        5.689961835741997e-05,\n        0.0001317639835178852,\n        0.0001792539842426777,\n        0.0002055610530078411,\n        0.00019594235345721245,\n        0.0001444532535970211,\n        0.00010429415851831436,\n        0.00013847416266798973,\n        0.00013070600107312202,\n        0.00014723744243383408,\n        0.00013695890083909035,\n        0.00010682409629225731,\n        7.835635915398598e-05,\n        0.0001014326699078083,\n        0.00010341871529817581,\n        9.322119876742363e-05,\n        0.00012100208550691605,\n        0.0001546642743051052,\n        0.0001184297725558281,\n        9.703589603304863e-05,\n        0.00010130321606993675,\n        7.37067312002182e-05,\n        7.623573765158653e-05,\n        5.4875388741493225e-05,\n        6.565265357494354e-05,\n        8.54278914630413e-05,\n        0.00010060984641313553,\n        7.581012323498726e-05,\n        6.2593724578619e-05,\n        5.3137075155973434e-05,\n        2.213660627603531e-05,\n        8.743628859519958e-05,\n        0.0001141098327934742,\n        0.000165675301104784,\n        0.00026680203154683113,\n        0.00026654312387108803,\n        0.00024798186495900154,\n        0.0002161567099392414,\n        0.00022768555209040642,\n        0.00021741772070527077,\n        0.00020926585420966148,\n        0.00023819832131266594,\n        0.00022964691743254662,\n        0.00018731970340013504,\n        0.00015986664220690727,\n        0.00017620157450437546,\n        0.0002027084119617939,\n        0.00022420799359679222,\n        0.00027610547840595245,\n        0.00023088743910193443,\n        0.00015174131840467453,\n        3.0607450753450394e-05,\n        -4.529673606157303e-05,\n        -4.255445674061775e-05,\n        -7.553119212388992e-05,\n        -3.2765790820121765e-05,\n        3.3802352845668793e-06,\n        0.00011687865480780602,\n        0.00018985522910952568,\n        0.00024297786876559258,\n        0.00027239928022027016,\n        0.0002314983867108822,\n        0.00021120114251971245,\n        0.00014903955161571503,\n        7.743388414382935e-05,\n        7.725832983851433e-05,\n        0.00010032067075371742,\n        0.00016714492812752724,\n        0.00023172656074166298,\n        0.00026289839297533035,\n        0.0003105183131992817,\n        0.0003330036997795105,\n        0.000349454116076231,\n        0.00031292857602238655,\n        0.00023759296163916588,\n        0.00014958297833800316,\n        9.061815217137337e-05,\n        9.137438610196114e-05,\n        4.9244146794080734e-05,\n        6.362935528159142e-05,\n        9.391224011778831e-05,\n        0.00015845755115151405,\n        0.00016704155132174492,\n        0.00011310959234833717,\n        4.153931513428688e-05,\n        4.999805241823196e-06,\n        5.003577098250389e-05,\n        9.165983647108078e-05,\n        0.0002441219985485077,\n        0.0003134249709546566,\n        0.00037798937410116196,\n        0.0003784266300499439,\n        0.00031761033460497856,\n        0.00021614087745547295,\n        0.00011860346421599388,\n        9.410874918103218e-05,\n        0.00017137965187430382,\n        0.0002535567618906498,\n        0.00030966801568865776,\n        0.0002847411669790745,\n        0.00020349444821476936,\n        0.00010883389040827751,\n        3.302609547972679e-05,\n        7.014255970716476e-05,\n        0.00012776348739862442,\n        0.00021413667127490044,\n        0.0002439063973724842,\n        0.00031236791983246803,\n        0.00029969075694680214,\n        0.00027042534202337265,\n        0.00023691868409514427,\n        0.00014901626855134964,\n        4.839198663830757e-05,\n        5.6438148021698e-06,\n        1.304037868976593e-05,\n        6.716838106513023e-05,\n        8.63480381667614e-05,\n        0.00010145129635930061,\n        0.0001345365308225155,\n        0.00017325859516859055,\n        0.00020046764984726906,\n        0.00018547335639595985,\n        0.0002054697833955288,\n        0.0002019745297729969,\n        0.00019070599228143692,\n        0.00016156258061528206,\n        0.00012638093903660774,\n        0.0001559220254421234,\n        0.00017759529873728752,\n        0.00016316678375005722,\n        0.0001648915931582451,\n        0.00021112244576215744,\n        0.0002289903350174427,\n        0.00026563694700598717,\n        0.0003341664560139179,\n        0.00031609460711479187,\n        0.00031436653807759285,\n        0.0002985256724059582,\n        0.00029379548504948616,\n        0.0001923120580613613,\n        0.0001153736375272274,\n        6.069336086511612e-05,\n        7.29123130440712e-05,\n        8.313078433275223e-05,\n        0.00011742906644940376,\n        0.00015486916527152061,\n        0.00016475003212690353,\n        0.00019737053662538528,\n        0.00022791745141148567,\n        0.00020961370319128036,\n        0.00016907276585698128,\n        0.00016628997400403023,\n        0.00016421126201748848,\n        0.00017979741096496582,\n        0.0001659211702644825,\n        0.00015278952196240425,\n        0.00014280574396252632,\n        0.00014486536383628845,\n        0.00015432434156537056,\n        0.00016975775361061096,\n        0.00015753693878650665,\n        0.00014148885384202003,\n        0.00015301303938031197,\n        0.00021384889259934425,\n        0.00021517043933272362,\n        0.00026118895038962364,\n        0.00025643641129136086,\n        0.00029027415439486504,\n        0.00023266393691301346,\n        0.0001995624043047428,\n        0.00015601003542542458,\n        0.00013958802446722984,\n        0.0001702415756881237,\n        0.00010565435513854027,\n        7.552886381745338e-05,\n        5.746167153120041e-05,\n        7.463386282324791e-05,\n        3.928551450371742e-05,\n        6.301281973719597e-05,\n        0.00012629898265004158,\n        0.000151053536683321,\n        0.0001492854207754135,\n        0.000180752482265234,\n        0.00020456314086914062,\n        0.00020919321104884148,\n        0.00021577486768364906,\n        0.0002531660720705986,\n        0.00026199640706181526,\n        0.00028633465990424156,\n        0.00026262691244482994,\n        0.000225873664021492,\n        0.000191511120647192,\n        0.00015032337978482246,\n        0.00010162685066461563,\n        0.00010314537212252617,\n        0.00012671248987317085,\n        0.00011392449960112572,\n        0.00012107100337743759,\n        0.0001187487505376339,\n        0.00016146572306752205,\n        0.00020353635773062706,\n        0.0002280161716043949,\n        0.00020734919235110283,\n        0.0001791524700820446,\n        0.0001854696311056614,\n        0.00016519427299499512,\n        0.00016846135258674622,\n        0.0001360359601676464,\n        8.883466944098473e-05,\n        7.652537897229195e-05,\n        9.478768333792686e-05,\n        0.0001673228107392788,\n        0.00022582337260246277,\n        0.000231926329433918,\n        0.00022293208166956902,\n        0.0002657179720699787,\n        0.00022155093029141426,\n        0.00017569540068507195,\n        0.00014821067452430725,\n        0.0001711682416498661,\n        0.00023174891248345375,\n        0.00030165398493409157,\n        0.0002897125668823719,\n        0.0002620466984808445,\n        0.0002245851792395115,\n        0.00016821781173348427,\n        0.00010076863691210747,\n        2.2388994693756104e-05,\n        -1.4523975551128387e-06,\n        1.3187061995267868e-05,\n        0.00010538846254348755,\n        0.00018142769113183022,\n        0.00027927709743380547,\n        0.00030904216691851616,\n        0.00034361518919467926,\n        0.0003059585578739643,\n        0.0002962164580821991,\n        0.00029360456392169,\n        0.0003351042978465557,\n        0.0003566727973520756,\n        0.0003242422826588154,\n        0.00029618898406624794,\n        0.0002486878074705601,\n        0.0002470514737069607,\n        0.00026508932933211327,\n        0.00025655655190348625,\n        0.00026322295889258385,\n        0.0003271265886723995,\n        0.0003204359672963619,\n        0.00033833086490631104,\n        0.00033296411857008934,\n        0.0003120605833828449,\n        0.00029746489599347115,\n        0.0002769692800939083,\n        0.00021290825679898262,\n        0.00017542438581585884,\n        0.00018440186977386475,\n        0.00024387706071138382,\n        0.00023960229009389877,\n        0.00027403514832258224,\n        0.00029807304963469505,\n        0.00025921780616045,\n        0.00020518479868769646,\n        0.00015771342441439629,\n        0.00022245105355978012,\n        0.0002489476464688778,\n        0.00028447387740015984,\n        0.00028173578903079033,\n        0.0003051203675568104,\n        0.0003085625357925892,\n        0.00027816975489258766,\n        0.00029928237199783325,\n        0.0003014770336449146,\n        0.00028519192710518837,\n        0.00029392587020993233,\n        0.00026800530031323433,\n        0.00018767593428492546,\n        0.00017691822722554207,\n        0.00019575795158743858,\n        0.00018866406753659248,\n        0.00023009907454252243,\n        0.0002300799824297428,\n        0.0001753498800098896,\n        0.00017860019579529762,\n        0.00013621384277939796,\n        0.00012479117140173912,\n        0.000178568996489048,\n        0.00017997389659285545,\n        0.00024558836594223976,\n        0.00029040640220046043,\n        0.00032847700640559196,\n        0.000343893188983202,\n        0.00033819442614912987,\n        0.00033064326271414757,\n        0.0003138761967420578,\n        0.0003670877777040005,\n        0.00037326104938983917,\n        0.0003719078376889229,\n        0.0003392323851585388,\n        0.0003342796117067337,\n        0.0003264634869992733,\n        0.000360873993486166,\n        0.0004042452201247215,\n        0.00034971674904227257,\n        0.0002930988557636738,\n        0.00022819079458713531,\n        0.00017952313646674156,\n        0.0001545012928545475,\n        0.00016796449199318886,\n        0.00016340753063559532,\n        0.00018983520567417145,\n        0.00022928370162844658,\n        0.00025301985442638397,\n        0.0002694418653845787,\n        0.0002105659805238247,\n        0.00015351874753832817,\n        0.00011963117867708206,\n        0.00010542990639805794,\n        0.00011414103209972382,\n        0.0001238565891981125,\n        9.106146171689034e-05,\n        0.00011501414701342583,\n        0.00013694027438759804,\n        0.00020913966000080109,\n        0.000258502084761858,\n        0.0003012167289853096,\n        0.0003716382198035717,\n        0.0004040221683681011,\n        0.0004402841441333294,\n        0.000427949707955122,\n        0.0003999895416200161,\n        0.00035862671211361885,\n        0.0002855672501027584,\n        0.0001509874127805233,\n        7.543712854385376e-05,\n        7.677869871258736e-05,\n        0.0001526237465441227,\n        0.00023382948711514473,\n        0.00032507069408893585,\n        0.0003636181354522705,\n        0.0003501330502331257,\n        0.00028381170704960823,\n        0.00017208745703101158,\n        9.22931358218193e-05,\n        4.112115129828453e-05,\n        1.3905111700296402e-05,\n        5.056383088231087e-05,\n        9.528500959277153e-05,\n        0.00015150289982557297,\n        0.00020101526752114296,\n        0.00020978273823857307,\n        0.0002419627271592617,\n        0.0002461732365190983,\n        0.00022353790700435638,\n        0.00019102077931165695,\n        0.0001927628181874752,\n        0.00020117266103625298,\n        0.00021960120648145676,\n        0.000277714803814888,\n        0.00030631618574261665,\n        0.00022712722420692444,\n        0.00013849744573235512,\n        7.198471575975418e-05,\n        -1.406809315085411e-05,\n        -2.6617664843797684e-05,\n        9.086448699235916e-06,\n        7.743854075670242e-05,\n        0.000129790510982275,\n        0.00014479504898190498,\n        0.00017145881429314613,\n        0.00013765553012490273,\n        9.869085624814034e-05,\n        5.357107147574425e-05,\n        5.812849849462509e-05,\n        0.000138754490762949,\n        0.0002109571360051632,\n        0.00023970939218997955,\n        0.00022135023027658463,\n        0.00020222598686814308,\n        0.00020548654720187187,\n        0.0002628243528306484,\n        0.0002875928767025471,\n        0.0002705981023609638,\n        0.00025475025177001953,\n        0.00022886833176016808,\n        0.000245469156652689,\n        0.0002762111835181713,\n        0.0003025517798960209,\n        0.0003158366307616234,\n        0.0002758321352303028,\n        0.0002625896595418453,\n        0.0001906324177980423,\n        0.0001246272586286068,\n        5.270726978778839e-05,\n        -3.5550910979509354e-05,\n        -3.460375592112541e-05,\n        -5.489308387041092e-05,\n        -2.9378104954957962e-05,\n        7.577100768685341e-05,\n        0.00015419861301779747,\n        0.00023452145978808403,\n        0.0002620532177388668,\n        0.00022154813632369041,\n        0.0001671970821917057,\n        0.00011886144056916237,\n        0.00011383136734366417,\n        0.00013208715245127678,\n        0.00016524968668818474,\n        0.00018385006114840508,\n        0.00016969302669167519,\n        0.00012985896319150925,\n        0.00011178012937307358,\n        0.00010174792259931564,\n        0.0001563369296491146,\n        0.00016761897131800652,\n        0.0001722988672554493,\n        0.00016183918341994286,\n        0.00014650309458374977,\n        0.00011655641719698906,\n        0.00010578753426671028,\n        8.245417848229408e-05,\n        6.450433284044266e-05,\n        8.095428347587585e-05,\n        6.855465471744537e-05,\n        0.00011232495307922363,\n        0.00011029280722141266,\n        0.00015149591490626335,\n        0.00014847004786133766,\n        0.00016254140064120293,\n        0.00014853384345769882,\n        0.0001464514061808586,\n        0.0001356257125735283,\n        9.34540294110775e-05,\n        4.6440865844488144e-05,\n        2.4877022951841354e-05,\n        -1.3229437172412872e-06,\n        -4.7758687287569046e-05,\n        -5.089445039629936e-05,\n        -5.4558273404836655e-05,\n        -5.959533154964447e-06,\n        7.240613922476768e-05,\n        0.00015345215797424316,\n        0.00016846461221575737,\n        0.00019718753173947334,\n        0.00021845055744051933,\n        0.0002607232891023159,\n        0.00030378764495253563,\n        0.0003002793528139591,\n        0.00027243467047810555,\n        0.00022125756368041039,\n        0.0001616128720343113,\n        6.840471178293228e-05,\n        -2.173241227865219e-06,\n        2.2238586097955704e-05,\n        4.3301377445459366e-05,\n        8.83941538631916e-05,\n        0.00011535687372088432,\n        0.0001323535107076168,\n        0.00012109382078051567,\n        8.667493239045143e-05,\n        5.958741530776024e-05,\n        6.117206066846848e-05,\n        6.582681089639664e-05,\n        9.86163504421711e-05,\n        0.0001602238044142723,\n        0.0001880698837339878,\n        0.00020194659009575844,\n        0.0001825764775276184,\n        0.00018913066014647484,\n        0.00017694570124149323,\n        0.0001620701514184475,\n        0.0001372150145471096,\n        0.00014517223462462425,\n        0.00014140596613287926,\n        0.0001706499606370926,\n        0.0001375884748995304,\n        4.6755652874708176e-05,\n        1.0082963854074478e-05,\n        7.309485226869583e-06,\n        7.065478712320328e-06,\n        3.296090289950371e-05,\n        0.00012152409180998802,\n        0.00020712241530418396,\n        0.0002572922967374325,\n        0.00025916658341884613,\n        0.00023860810324549675,\n        0.00016631325706839561,\n        2.3422762751579285e-05,\n        -1.1031515896320343e-05,\n        -1.9991304725408554e-05,\n        6.495509296655655e-06,\n        8.939579129219055e-05,\n        0.00012145563960075378,\n        0.0001463429071009159,\n        0.0001414748840034008,\n        0.0001507471315562725,\n        0.00019629066810011864,\n        0.00025558890774846077,\n        0.00030065374448895454,\n        0.0003155064769089222,\n        0.0002620159648358822,\n        0.0002019316889345646,\n        0.00016356399282813072,\n        0.0001506744883954525,\n        0.00012953532859683037,\n        0.00011104950681328773,\n        0.00010513467714190483,\n        0.0001408425159752369,\n        0.0002090982161462307,\n        0.0002634478732943535,\n        0.00023100711405277252,\n        0.0002005724236369133,\n        0.00013263477012515068,\n        4.640407860279083e-05,\n        6.7730434238910675e-06,\n        -3.765663132071495e-05,\n        -3.244727849960327e-06,\n        2.5771092623472214e-05,\n        5.987705662846565e-05,\n        0.0001016366295516491,\n        0.00011254986748099327,\n        0.00013354932889342308,\n        8.022459223866463e-05,\n        1.3608019798994064e-05,\n        2.5506597012281418e-05,\n        3.808038309216499e-05,\n        7.180916145443916e-05,\n        0.00010392209514975548,\n        0.00014688726514577866,\n        9.37306322157383e-05,\n        8.814269676804543e-05,\n        0.00011589424684643745,\n        6.434740498661995e-05,\n        8.365605026483536e-05,\n        9.124958887696266e-05,\n        0.0001054098829627037,\n        0.0001556803472340107,\n        0.00018108682706952095,\n        0.00019090576097369194,\n        0.00020478153601288795,\n        0.0001800484023988247,\n        0.00013007549569010735,\n        5.800928920507431e-05,\n        8.908100426197052e-07,\n        -3.0924100428819656e-05,\n        -4.240265116095543e-05,\n        -5.138572305440903e-05,\n        -3.09087336063385e-05,\n        -2.1975021809339523e-05,\n        -1.570163294672966e-05,\n        3.669457510113716e-05,\n        7.17570073902607e-05,\n        0.00013736216351389885,\n        0.0001916126348078251,\n        0.00023083621636033058,\n        0.0002415231429040432,\n        0.00021488219499588013,\n        0.00025562429800629616,\n        0.00024127261713147163,\n        0.00023026205599308014,\n        0.0002570603974163532,\n        0.00020722439512610435,\n        0.0001329672522842884,\n        7.87428580224514e-05,\n        3.666942939162254e-05,\n        2.3222528398036957e-06,\n        8.523324504494667e-05,\n        0.0001612883061170578,\n        0.00019069435074925423,\n        0.00019067572429776192,\n        0.00015659211203455925,\n        9.598303586244583e-05,\n        5.7320110499858856e-05,\n        5.55478036403656e-05,\n        2.9482413083314896e-05,\n        -1.5770550817251205e-05,\n        -2.081179991364479e-05,\n        1.0740477591753006e-05,\n        3.668246790766716e-05,\n        0.00011412287130951881,\n        0.00016557471826672554,\n        0.000193700660020113,\n        0.00018514646217226982,\n        0.00014917878434062004,\n        9.474670514464378e-05,\n        5.217967554926872e-05,\n        3.644777461886406e-05,\n        8.570076897740364e-05,\n        0.0001343325711786747,\n        0.00012511806562542915,\n        0.00011508539319038391,\n        0.00011813035234808922,\n        0.00014221016317605972,\n        0.00014082295820116997,\n        0.00012812437489628792,\n        0.00011718831956386566,\n        0.00014647142961621284,\n        0.00014473404735326767,\n        0.00015646358951926231,\n        0.00020285090431571007,\n        0.0001972573809325695,\n        0.00018517067655920982,\n        0.0001963842660188675,\n        0.00014576222747564316,\n        0.00014395778998732567,\n        0.00020130537450313568,\n        0.00021965289488434792,\n        0.00020183902233839035,\n        0.00016048038378357887,\n        0.00013667577877640724,\n        7.563363760709763e-05,\n        8.555548265576363e-05,\n        8.500507101416588e-05,\n        5.2824150770902634e-05,\n        8.250819519162178e-05,\n        0.00012071477249264717,\n        0.00014682533219456673,\n        0.00013559451326727867,\n        5.725910887122154e-05,\n        8.986331522464752e-06,\n        2.4620909243822098e-05,\n        8.512148633599281e-05,\n        0.00015564868226647377,\n        0.00019079027697443962,\n        0.00020783627405762672,\n        0.00016619544476270676,\n        0.00015689292922616005,\n        0.00013269344344735146,\n        0.000135831069201231,\n        0.0001435200683772564,\n        0.0001834477297961712,\n        0.00021957000717520714,\n        0.00021636812016367912,\n        0.00022275280207395554,\n        0.000184724573045969,\n        0.0001582913100719452,\n        0.0001229965128004551,\n        0.0001118839718401432,\n        8.59568826854229e-05,\n        9.529897943139076e-05,\n        0.00014976086094975471,\n        0.000221294816583395,\n        0.00030599115416407585,\n        0.0003387243486940861,\n        0.00034284405410289764,\n        0.0003044973127543926,\n        0.0002508987672626972,\n        0.00020281504839658737,\n        0.00020607560873031616,\n        0.00022176047787070274,\n        0.00023603811860084534,\n        0.00018454110249876976,\n        0.00014711031690239906,\n        0.00017768330872058868,\n        0.00013378867879509926,\n        0.00015912065282464027,\n        0.00016039330512285233,\n        0.0001970822922885418,\n        0.00024004420265555382,\n        0.0002415054477751255,\n        0.00023567257449030876,\n        0.00017239851877093315,\n        0.0001506749540567398,\n        0.0001681479625403881,\n        0.00019460218027234077,\n        0.0001580272801220417,\n        0.0001921486109495163,\n        0.00021939445286989212,\n        0.00026227347552776337,\n        0.00030716462060809135,\n        0.00029493076726794243,\n        0.00027258601039648056,\n        0.00023766746744513512,\n        0.00017625140026211739,\n        0.00012747012078762054,\n        0.00010791560634970665,\n        0.0001232624053955078,\n        0.00013249646872282028,\n        0.00014351354911923409,\n        0.0001481776125729084,\n        0.00014928961172699928,\n        0.00017964467406272888,\n        0.00020508607849478722,\n        0.00021828897297382355,\n        0.00022049015387892723,\n        0.0002674665302038193,\n        0.00025959359481930733,\n        0.00022502383217215538,\n        0.00016812700778245926,\n        0.00014067860320210457,\n        0.00013113534078001976,\n        0.00010947789996862411,\n        0.00015297671779990196,\n        0.00019029900431632996,\n        0.0002174084074795246,\n        0.0002080085687339306,\n        0.00013910094276070595,\n        9.908853098750114e-05,\n        4.07705083489418e-05,\n        2.76835635304451e-05,\n        2.8508249670267105e-05,\n        8.857110515236855e-05,\n        0.00010713795199990273,\n        0.00016029877588152885,\n        0.00022803014144301414,\n        0.0002957717515528202,\n        0.0003540259785950184,\n        0.00037232832983136177,\n        0.0003734552301466465,\n        0.0003199302591383457,\n        0.0002938029356300831,\n        0.0002528461627662182,\n        0.00021676020696759224,\n        0.00017777597531676292,\n        0.00017364369705319405,\n        0.00016172369942069054,\n        0.00018073851242661476,\n        0.00018162047490477562,\n        0.00014212774112820625,\n        0.00011818064376711845,\n        0.00014514802023768425,\n        0.00013899477198719978,\n        0.00017128465697169304,\n        0.0001687011681497097,\n        0.00018266262486577034,\n        0.00022355886176228523,\n        0.00024063466116786003,\n        0.0002787122502923012,\n        0.0003154659643769264,\n        0.00033456506207585335,\n        0.00034004030749201775,\n        0.0003440207801759243,\n        0.00028424058109521866,\n        0.0002738623879849911,\n        0.00026674894616007805,\n        0.00024896906688809395,\n        0.00025945575907826424,\n        0.00027621397748589516,\n        0.0002949223853647709,\n        0.00027795974165201187,\n        0.00024254154413938522,\n        0.00020584231242537498,\n        0.00017205718904733658,\n        0.0001995679922401905,\n        0.00022977637127041817,\n        0.00025580497458577156,\n        0.00024502212181687355,\n        0.00023384159430861473,\n        0.00019245175644755363,\n        0.000154965091496706,\n        0.00012126797810196877,\n        0.00012110499665141106,\n        0.00018449174240231514,\n        0.00022226013243198395,\n        0.00027826614677906036,\n        0.00034218328073620796,\n        0.00037358934059739113,\n        0.0003536120057106018,\n        0.000315861776471138,\n        0.00021863309666514397,\n        9.954487904906273e-05,\n        8.503859862685204e-05,\n        0.00010430300608277321,\n        0.00015860004350543022,\n        0.0002684900537133217,\n        0.0003843465819954872,\n        0.0004415134899318218,\n        0.0003933827392756939,\n        0.0003703618422150612,\n        0.0002987566404044628,\n        0.0002523777075111866,\n        0.0002369196154177189,\n        0.00016940711066126823,\n        0.00015349918976426125,\n        0.00010609813034534454,\n        0.00013597076758742332,\n        0.00018791435286402702,\n        0.00020110653713345528,\n        0.00022172462195158005,\n        0.00021210266277194023,\n        0.00022209109738469124,\n        0.0002445601858198643,\n        0.00022357190027832985,\n        0.0001662224531173706,\n        0.00014500319957733154,\n        0.00012130523100495338,\n        0.00012596789747476578,\n        0.00017370982095599174,\n        0.00022943178191781044,\n        0.00017912639304995537,\n        0.00015453854575753212,\n        0.0001469026319682598,\n        0.00014174776151776314,\n        0.0001279669813811779,\n        0.00012001348659396172,\n        0.0001733819954097271,\n        0.00023750215768814087,\n        0.0003113723360002041,\n        0.0003347122110426426,\n        0.00037763314321637154,\n        0.0003783097490668297,\n        0.00036067282781004906,\n        0.00029251305386424065,\n        0.00023890100419521332,\n        0.00020155776292085648,\n        0.0002052956260740757,\n        0.00022455165162682533,\n        0.00016171718016266823,\n        0.0001743081957101822,\n        0.00017896806821227074,\n        0.00021600164473056793,\n        0.00023706024512648582,\n        0.00028277700766921043,\n        0.0003978353925049305,\n        0.00044687045738101006,\n        0.00048297178000211716,\n        0.0004619746468961239,\n        0.00038757501170039177,\n        0.0002992721274495125,\n        0.00023231422528624535,\n        0.00022279517725110054,\n        0.00023630307987332344,\n        0.00019343337044119835,\n        0.00015638535842299461,\n        0.0001361384056508541,\n        0.00013652117922902107\n    ],\n    \"metadata\": {\n        \"name\": \"tw40_california_clean_deerinkstudios\",\n        \"samplerate\": \"48000\",\n        \"source\": \"original\",\n        \"style\": \"clean\",\n        \"based\": \"Egnater Tweaker 40\",\n        \"author\": \"deer ink studios\",\n        \"dataset\": \"custom\",\n        \"license\": \"CC BY-NC-ND 4.0\",\n        \"esr\": 0.17783235013484955\n    }\n}"
  },
  {
    "path": "src/3rd-party.cpp",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#define DR_FLAC_IMPLEMENTATION\n#include \"dr_flac.h\"\n\n#define DR_WAV_IMPLEMENTATION\n#include \"dr_wav.h\"\n"
  },
  {
    "path": "src/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\n#include <math.h>\n#include \"Biquad.h\"\n\nBiquad::Biquad() {\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 = 0.0;\n    z1 = z2 = 0.0;\n}\n\nBiquad::Biquad(int type, double Fc, double Q, double peakGainDB) {\n    setBiquad(type, Fc, Q, peakGainDB);\n    z1 = z2 = 0.0;\n}\n\nBiquad::~Biquad() {\n}\n\nvoid Biquad::setType(int type) {\n    this->type = type;\n    calcBiquad();\n}\n\nvoid Biquad::setQ(double Q) {\n    this->Q = Q;\n    calcBiquad();\n}\n\nvoid Biquad::setFc(double Fc) {\n    this->Fc = Fc;\n    calcBiquad();\n}\n\nvoid Biquad::setPeakGain(double peakGainDB) {\n    this->peakGain = peakGainDB;\n    calcBiquad();\n}\n\nvoid Biquad::setBiquad(int type, double Fc, double Q, double peakGainDB) {\n    this->type = type;\n    this->Q = Q;\n    this->Fc = Fc;\n    setPeakGain(peakGainDB);\n}\n\nvoid Biquad::calcBiquad(void) {\n    double norm;\n    double V = pow(10, fabs(peakGain) / 20.0);\n    double K = tan(M_PI * Fc);\n    switch (this->type) {\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 >= 0) {    // 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 {    // 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 >= 0) {    // boost\n                norm = 1 / (1 + sqrt(2) * K + K * K);\n                a0 = (1 + sqrt(2*V) * K + V * K * K) * norm;\n                a1 = 2 * (V * K * K - 1) * norm;\n                a2 = (1 - sqrt(2*V) * K + V * K * K) * norm;\n                b1 = 2 * (K * K - 1) * norm;\n                b2 = (1 - sqrt(2) * K + K * K) * norm;\n            }\n            else {    // cut\n                norm = 1 / (1 + sqrt(2*V) * K + V * K * K);\n                a0 = (1 + sqrt(2) * K + K * K) * norm;\n                a1 = 2 * (K * K - 1) * norm;\n                a2 = (1 - sqrt(2) * K + K * K) * norm;\n                b1 = 2 * (V * K * K - 1) * norm;\n                b2 = (1 - sqrt(2*V) * K + V * K * K) * norm;\n            }\n            break;\n        case bq_type_highshelf:\n            if (peakGain >= 0) {    // boost\n                norm = 1 / (1 + sqrt(2) * K + K * K);\n                a0 = (V + sqrt(2*V) * K + K * K) * norm;\n                a1 = 2 * (K * K - V) * norm;\n                a2 = (V - sqrt(2*V) * K + K * K) * norm;\n                b1 = 2 * (K * K - 1) * norm;\n                b2 = (1 - sqrt(2) * K + K * K) * norm;\n            }\n            else {    // cut\n                norm = 1 / (V + sqrt(2*V) * K + K * K);\n                a0 = (1 + sqrt(2) * K + K * K) * norm;\n                a1 = 2 * (K * K - 1) * norm;\n                a2 = (1 - sqrt(2) * K + K * K) * norm;\n                b1 = 2 * (K * K - V) * norm;\n                b2 = (V - sqrt(2*V) * K + K * K) * norm;\n            }\n            break;\n    }\n\n    return;\n}\n"
  },
  {
    "path": "src/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/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\n#ifndef Biquad_h\n#define Biquad_h\n\nenum {\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 {\npublic:\n    Biquad();\n    Biquad(int type, double Fc, double Q, double peakGainDB);\n    ~Biquad();\n    void setType(int type);\n    void setQ(double Q);\n    void setFc(double Fc);\n    void setPeakGain(double peakGainDB);\n    void setBiquad(int type, double Fc, double Q, double peakGainDB);\n    float process(float in);\n\nprotected:\n    void calcBiquad(void);\n\n    int type;\n    double a0, a1, a2, b1, b2;\n    double Fc, Q, peakGain;\n    double z1, z2;\n};\n\ninline float Biquad::process(float in) {\n    double out = in * a0 + z1;\n    z1 = in * a1 + z2 - b1 * out;\n    z2 = in * a2 - b2 * out;\n    return out;\n}\n\n#endif // Biquad_h\n"
  },
  {
    "path": "src/DistrhoPluginCommon.hpp",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2022-2023 Massimo Pennazio <maxipenna@libero.it>\n * Copyright (C) 2023-2024 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#pragma once\n\n#include \"DistrhoDetails.hpp\"\n\nstatic constexpr const char* const kVersionString = \"v1.1.0\";\nstatic constexpr const uint32_t kVersionNumber = d_version(1, 1, 0);\n\n#define DISTRHO_PLUGIN_BRAND   \"AIDA DSP\"\n#define DISTRHO_PLUGIN_NAME    \"AIDA-X\"\n#define DISTRHO_PLUGIN_URI     \"http://aidadsp.cc/plugins/aidadsp-bundle/rt-neural-loader\"\n#define DISTRHO_PLUGIN_CLAP_ID \"cc.aidadsp.rt-neural-loader\"\n\n#define DISTRHO_PLUGIN_HAS_UI          1\n#define DISTRHO_PLUGIN_IS_RT_SAFE      1\n#define DISTRHO_PLUGIN_WANT_PROGRAMS   0\n#define DISTRHO_PLUGIN_WANT_STATE      1\n#define DISTRHO_UI_FILE_BROWSER        1\n#define DISTRHO_UI_USE_NANOVG          1\n\n#define DISTRHO_PLUGIN_EXTRA_IO        { 2, 2 },\n\n#define DISTRHO_PLUGIN_CLAP_FEATURES   \"audio-effect\", \"multi-effects\", \"mono\"\n#define DISTRHO_PLUGIN_LV2_CATEGORY    \"lv2:SimulatorPlugin\"\n#define DISTRHO_PLUGIN_VST3_CATEGORIES \"Fx|Dynamics|Mono\"\n\n#define DISTRHO_PLUGIN_BRAND_ID Aida\n#define DISTRHO_PLUGIN_UNIQUE_ID aida\n\n// needed because AIDA-X predates DPF support for VST3 brand uid\n#define DPF_VST3_DONT_USE_BRAND_ID 1\n\n#if DISTRHO_PLUGIN_VARIANT_STANDALONE && DISTRHO_PLUGIN_NUM_INPUTS == 0\n# define AIDAX_WITH_AUDIOFILE 1\n#else\n# define AIDAX_WITH_AUDIOFILE 0\n#endif\n\n#if DISTRHO_PLUGIN_VARIANT_STANDALONE && DISTRHO_PLUGIN_NUM_INPUTS != 0\n# define AIDAX_WITH_STANDALONE_CONTROLS 1\n#else\n# define AIDAX_WITH_STANDALONE_CONTROLS 0\n#endif\n\n// known and defined in advance\nstatic constexpr const uint kPedalWidth = 900;\nstatic constexpr const uint kPedalHeight = 318;\n#ifndef MOD_BUILD\nstatic constexpr const uint kPedalMargin = 20;\nstatic constexpr const uint kPedalMarginTop = 40;\n#else\nstatic constexpr const uint kPedalMargin = 0;\nstatic constexpr const uint kPedalMarginTop = 0;\n#endif\n\n#define DISTRHO_UI_DEFAULT_WIDTH  (kPedalWidth + kPedalMargin * 2)\n#define DISTRHO_UI_DEFAULT_HEIGHT (kPedalHeight + kPedalMargin + kPedalMarginTop)\n\nstatic constexpr const char* const kDefaultModelName = \"tw40_california_clean.json\";\nstatic constexpr const char* const kDefaultCabinetName = \"V30-P2-audix-i5.wav\";\n\nstatic constexpr const float kMinimumMeterDb = -60.f;\n\nenum Parameters {\n    kParameterINLPF,\n    kParameterINLEVEL,\n    kParameterNETBYPASS,\n    kParameterEQBYPASS,\n    kParameterEQPOS,\n    kParameterBASSGAIN,\n    kParameterBASSFREQ,\n    kParameterMIDGAIN,\n    kParameterMIDFREQ,\n    kParameterMIDQ,\n    kParameterMTYPE,\n    kParameterTREBLEGAIN,\n    kParameterTREBLEFREQ,\n    kParameterDEPTH,\n    kParameterPRESENCE,\n    kParameterOUTLEVEL,\n    kParameterCABSIMBYPASS,\n    kParameterGLOBALBYPASS,\n    kParameterPARAM1,\n    kParameterPARAM2,\n    kParameterDCBLOCKER,\n    kParameterModelInputSize,\n    kParameterMeterIn,\n    kParameterMeterOut,\n    kParameterCount\n};\n\nenum States {\n    kStateModelFile,\n    kStateImpulseFile,\n   #if AIDAX_WITH_AUDIOFILE\n    kStateAudioFile,\n   #endif\n    kStateCount\n};\n\nenum EqPos {\n    kEqPost,\n    kEqPre\n};\n\nenum MidEqType {\n    kMidEqPeak,\n    kMidEqBandpass\n};\n\nstatic ParameterEnumerationValue kEQPOS[2] = {\n    { kEqPost, \"POST\" },\n    { kEqPre, \"PRE\" }\n};\n\nstatic ParameterEnumerationValue kMTYPE[2] = {\n    { kMidEqPeak, \"PEAK\" },\n    { kMidEqBandpass, \"BANDPASS\" }\n};\n\nstatic ParameterEnumerationValue kBYPASS[2] = {\n    { 0.f, \"ON\" },\n    { 1.f, \"OFF\" }\n};\n\nstatic ParameterEnumerationValue kModelInSize[4] = {\n    { 0.f, \"ERROR\" },\n    { 1.f, \"SNAPSHOT\" },\n    { 2.f, \"WITH 1 PARAM\" },\n    { 3.f, \"WITH 2 PARAMS\" }\n};\n\nstatic const Parameter kParameters[] = {\n    { kParameterIsAutomatable, \"ANTIALIASING\", \"ANTIALIASING\", \"%\", 66.216f, 0.f, 100.f, },\n    { kParameterIsAutomatable, \"INPUT\", \"PREGAIN\", \"dB\", 0.f, -12.f, 12.f, },\n    { kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger, \"NETBYPASS\", \"NETBYPASS\", \"\", 0.f, 0.f, 1.f, },\n    { kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger, \"EQBYPASS\", \"EQBYPASS\", \"\", 0.f, 0.f, 1.f, },\n    { kParameterIsAutomatable|kParameterIsInteger, \"EQPOS\", \"EQPOS\", \"\", 0.f, 0.f, 1.f, ARRAY_SIZE(kEQPOS), kEQPOS },\n    { kParameterIsAutomatable, \"BASS\", \"BASS\", \"dB\", 0.f, -8.f, 8.f, },\n    { kParameterIsAutomatable, \"BFREQ\", \"BFREQ\", \"Hz\", 305.f, 75.f, 600.f, },\n    { kParameterIsAutomatable, \"MID\", \"MID\", \"dB\", 0.f, -8.f, 8.f, },\n    { kParameterIsAutomatable, \"MFREQ\", \"MFREQ\", \"Hz\", 750.f, 150.f, 5000.f, },\n    { kParameterIsAutomatable, \"MIDQ\", \"MIDQ\", \"\", 0.707f, 0.2f, 5.f, },\n    { kParameterIsAutomatable|kParameterIsInteger, \"MTYPE\", \"MTYPE\", \"\", 0.f, 0.f, 1.f, ARRAY_SIZE(kMTYPE), kMTYPE },\n    { kParameterIsAutomatable, \"TREBLE\", \"TREBLE\", \"dB\", 0.f, -8.f, 8.f, },\n    { kParameterIsAutomatable, \"TFREQ\", \"TFREQ\", \"Hz\", 2000.f, 1000.f, 4000.f, },\n    { kParameterIsAutomatable, \"DEPTH\", \"DEPTH\", \"dB\", 0.f, -8.f, 8.f, },\n    { kParameterIsAutomatable, \"PRESENCE\", \"PRESENCE\", \"dB\", 0.f, -8.f, 8.f, },\n    { kParameterIsAutomatable, \"OUTPUT\", \"MASTER\", \"dB\", 0.f, -15.f, 15.f, },\n    { kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger, \"CABSIMBYPASS\", \"CABSIMBYPASS\", \"\", 0.f, 0.f, 1.f, },\n    { kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger, \"Bypass\", \"dpf_bypass\", \"\", 0.f, 0.f, 1.f, ARRAY_SIZE(kBYPASS), kBYPASS },\n    { kParameterIsAutomatable, \"PARAM1\", \"PARAM1\", \"\", 0.f, 0.f, 1.f, },\n    { kParameterIsAutomatable, \"PARAM2\", \"PARAM2\", \"\", 0.f, 0.f, 1.f, },\n    { kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger, \"DCBLOCKER\", \"DCBLOCKER\", \"\", 1.f, 0.f, 1.f, },\n    { kParameterIsOutput, \"Model Input Size\", \"ModelInSize\", \"\", 0.f, 0.f, 3.f, ARRAY_SIZE(kModelInSize), kModelInSize },\n    { kParameterIsOutput, \"Meter In\", \"MeterIn\", \"dB\", 0.f, 0.f, 2.f, },\n    { kParameterIsOutput, \"Meter Out\", \"MeterOut\", \"dB\", 0.f, 0.f, 2.f, },\n};\n\nstatic constexpr const uint kNumParameters = ARRAY_SIZE(kParameters);\n\nstatic_assert(kNumParameters == kParameterCount, \"Matched num params\");\n"
  },
  {
    "path": "src/Semaphore.hpp",
    "content": "/*\n * DISTRHO Plugin Framework (DPF)\n * Copyright (C) 2012-2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: ISC\n */\n\n#ifndef DISTRHO_SEMAPHORE_HPP_INCLUDED\n#define DISTRHO_SEMAPHORE_HPP_INCLUDED\n\n#include \"extra/String.hpp\"\n\n#if defined(DISTRHO_OS_MAC)\n# include <mach/mach.h>\n# include <mach/semaphore.h>\n#elif defined(DISTRHO_OS_WINDOWS)\n# ifndef NOMINMAX\n#  define NOMINMAX\n# endif\n# include <winsock2.h>\n# include <windows.h>\n#else\n# include <semaphore.h>\n# include <sys/time.h>\n#endif\n\nSTART_NAMESPACE_DISTRHO\n\n// --------------------------------------------------------------------------------------------------------------------\n\nclass Semaphore\n{\npublic:\n    Semaphore(const int initialValue = 0)\n    {\n       #if defined(DISTRHO_OS_MAC)\n        DISTRHO_SAFE_ASSERT_RETURN(semaphore_create(mach_task_self(),\n                                                    &sem,\n                                                    SYNC_POLICY_FIFO,\n                                                    initialValue) == KERN_SUCCESS,);\n       #elif defined(DISTRHO_OS_WINDOWS)\n        handle = ::CreateSemaphoreA(nullptr, initialValue, std::max(initialValue, 1), nullptr);\n        DISTRHO_SAFE_ASSERT_RETURN(handle != INVALID_HANDLE_VALUE,);\n       #else\n        ::sem_init(&sem, 0, initialValue);\n       #endif\n    }\n\n    ~Semaphore()\n    {\n       #if defined(DISTRHO_OS_MAC)\n        ::semaphore_destroy(mach_task_self(), sem);\n       #elif defined(DISTRHO_OS_WINDOWS)\n        ::CloseHandle(handle);\n       #else\n        ::sem_destroy(&sem);\n       #endif\n    }\n\n    void post()\n    {\n       #if defined(DISTRHO_OS_MAC)\n        ::semaphore_signal(sem);\n       #elif defined(DISTRHO_OS_WINDOWS)\n        ::ReleaseSemaphore(handle, 1, nullptr);\n       #else\n        ::sem_post(&sem);\n       #endif\n    }\n\n    bool wait()\n    {\n       #if defined(DISTRHO_OS_MAC)\n        return ::semaphore_wait(sem) == KERN_SUCCESS;\n       #elif defined(DISTRHO_OS_WINDOWS)\n        return ::WaitForSingleObject(handle, INFINITE) == WAIT_OBJECT_0;\n       #else\n        return ::sem_wait(&sem) == 0;\n       #endif\n    }\n\n    bool timedWait(const uint numSecs)\n    {\n       #if defined(DISTRHO_OS_MAC)\n        const struct mach_timespec time = { numSecs, 0 };\n        return ::semaphore_timedwait(sem, time) == KERN_SUCCESS;\n       #elif defined(DISTRHO_OS_WINDOWS)\n        return ::WaitForSingleObject(handle, numSecs * 1000) == WAIT_OBJECT_0;\n       #else\n        struct timespec timeout;\n        ::clock_gettime(CLOCK_REALTIME, &timeout);\n        timeout.tv_sec += numSecs;\n        return ::sem_timedwait(&sem, &timeout) == 0;\n       #endif\n    }\n\nprivate:\n   #if defined(DISTRHO_OS_MAC)\n    ::semaphore_t sem;\n   #elif defined(DISTRHO_OS_WINDOWS)\n    ::HANDLE handle;\n   #else\n    ::sem_t sem;\n   #endif\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n\nEND_NAMESPACE_DISTRHO\n\n#endif // DISTRHO_SEMAPHORE_HPP_INCLUDED\n"
  },
  {
    "path": "src/TwoStageThreadedConvolver.hpp",
    "content": "/*\n * 2-Stage Threaded Convolver\n * Copyright (C) 2022-2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: ISC\n */\n\n#pragma once\n\n#ifndef DISTRHO_OS_WASM\n# include \"Semaphore.hpp\"\n# include \"extra/ScopedPointer.hpp\"\n# include \"extra/Thread.hpp\"\n#endif\n\n#include \"TwoStageFFTConvolver.h\"\n\nSTART_NAMESPACE_DISTRHO\n\n// --------------------------------------------------------------------------------------------------------------------\n\n#ifndef DISTRHO_OS_WASM\nclass TwoStageThreadedConvolver : public fftconvolver::TwoStageFFTConvolver,\n                                  private Thread\n{\n    static constexpr const size_t kHeadBlockSize = 128;\n    static constexpr const size_t kTailBlockSize = 1024;\n\n    ScopedPointer<fftconvolver::FFTConvolver> nonThreadedConvolver;\n    Semaphore semBgProcStart;\n    Semaphore semBgProcFinished;\n\npublic:\n    TwoStageThreadedConvolver()\n        : fftconvolver::TwoStageFFTConvolver(),\n          Thread(\"TwoStageThreadedConvolver\"),\n          semBgProcStart(1),\n          semBgProcFinished(0)\n    {\n    }\n\n    ~TwoStageThreadedConvolver() override\n    {\n        if (nonThreadedConvolver != nullptr)\n        {\n            nonThreadedConvolver = nullptr;\n            return;\n        }\n\n        signalThreadShouldExit();\n        semBgProcStart.post();\n        stopThread(5000);\n    }\n\n    bool init(const fftconvolver::Sample* const ir, const size_t irLen)\n    {\n        if (fftconvolver::TwoStageFFTConvolver::init(kHeadBlockSize, kTailBlockSize, ir, irLen))\n        {\n            startThread(true);\n            return true;\n        }\n\n        ScopedPointer<fftconvolver::FFTConvolver> conv(new fftconvolver::FFTConvolver);\n\n        if (conv->init(kHeadBlockSize, ir, irLen))\n        {\n            nonThreadedConvolver = conv.release();\n            return true;\n        }\n\n        return false;\n    }\n\n    void process(const fftconvolver::Sample* const input, fftconvolver::Sample* const output, const size_t len)\n    {\n        if (nonThreadedConvolver != nullptr)\n            nonThreadedConvolver->process(input, output, len);\n        else\n            fftconvolver::TwoStageFFTConvolver::process(input, output, len);\n    }\n\nprotected:\n    void startBackgroundProcessing() override\n    {\n        semBgProcStart.post();\n    }\n\n    void waitForBackgroundProcessing() override\n    {\n        if (isThreadRunning() && !shouldThreadExit())\n            semBgProcFinished.wait();\n    }\n\n    void run() override\n    {\n        while (!shouldThreadExit())\n        {\n            semBgProcStart.wait();\n\n            if (shouldThreadExit())\n                break;\n\n            doBackgroundProcessing();\n            semBgProcFinished.post();\n        }\n    }\n\n    DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(TwoStageThreadedConvolver)\n};\n#else\nclass TwoStageThreadedConvolver : public fftconvolver::FFTConvolver\n{\n    static constexpr const size_t kHeadBlockSize = 128;\n\npublic:\n    TwoStageThreadedConvolver()\n        : fftconvolver::FFTConvolver() {}\n\n    bool init(const fftconvolver::Sample* const ir, const size_t irLen)\n    {\n        return fftconvolver::FFTConvolver::init(kHeadBlockSize, ir, irLen);\n    }\n};\n#endif\n\n// --------------------------------------------------------------------------------------------------------------------\n\nEND_NAMESPACE_DISTRHO\n"
  },
  {
    "path": "src/Widgets.hpp",
    "content": "/*\n * AIDA-X Widgets\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#pragma once\n\n#include \"EventHandlers.hpp\"\n#include \"ImageWidgets.hpp\"\n#include \"NanoVG.hpp\"\n\n#include \"DistrhoPluginInfo.h\"\n\nSTART_NAMESPACE_DISTRHO\n\nstatic constexpr const uint kSubWidgetsFontSize = 14;\nstatic constexpr const uint kSubWidgetsFullHeight = 90;\nstatic constexpr const uint kSubWidgetsPadding = 8;\n\nstatic inline constexpr\nfloat normalizedLevelMeterValue(const float db)\n{\n\treturn (\n        db < -70.f ? 0.f :\n        db < -60.f ? (db + 70.f) * 0.25f :\n        db < -50.f ? (db + 60.f) * 0.50f +  2.5f :\n        db < -40.f ? (db + 50.f) * 0.75f +  7.5f :\n        db < -30.f ? (db + 40.f) * 1.50f + 15.0f :\n        db < -20.f ? (db + 30.f) * 2.00f + 30.0f :\n        db <   0.f ? (db + 20.f) * 2.50f + 50.0f :\n        100.f\n    ) / 100.f;\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n// good old knob with tick markers, rotating image and on-actived value display, follows modgui style\n\nclass AidaKnob : public NanoSubWidget,\n                 public KnobEventHandler\n{\n    NanoTopLevelWidget* const parent;\n    const NanoImage& knobImage;\n    const NanoImage& scaleImage;\n    const char* label;\n    const char* unit;\n\npublic:\n    static constexpr const uint kScaleSize = 80;\n    static constexpr const uint kKnobSize = 55;\n    static constexpr const uint kKnobMargin = (kScaleSize - kKnobSize) / 2;\n\n    AidaKnob(NanoTopLevelWidget* const p, KnobEventHandler::Callback* const cb,\n             const NanoImage& knobImg, const NanoImage& scaleImg, const Parameters paramId)\n        : NanoSubWidget(p),\n          KnobEventHandler(this),\n          parent(p),\n          knobImage(knobImg),\n          scaleImage(scaleImg)\n    {\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kScaleSize * scaleFactor, kSubWidgetsFullHeight * scaleFactor);\n\n        const Parameter& param(kParameters[paramId]);\n        setId(paramId);\n        setRange(param.ranges.min, param.ranges.max);\n        setDefault(param.ranges.def);\n        setValue(param.ranges.def, false);\n        setCallback(cb);\n        label = param.name;\n        unit = param.unit;\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double scaleSize = kScaleSize * scaleFactor;\n        const double knobSize = kKnobSize * scaleFactor;\n        const double knobHalfSize = knobSize / 2;\n        const double knobMargin = kKnobMargin * scaleFactor;\n        const double wfontSize = kSubWidgetsFontSize * scaleFactor;\n\n        beginPath();\n        rect(0, 0, scaleSize, scaleSize);\n        fillPaint(imagePattern(0, 0, scaleSize, scaleSize, 0.f, scaleImage, 1.f));\n        fill();\n\n        fillColor(Color(1.f, 1.f, 1.f));\n        fontSize(wfontSize);\n        textAlign(ALIGN_CENTER | ALIGN_BASELINE);\n        text(width/2, height, label, nullptr);\n\n        const Paint knobImgPat = imagePattern(-knobHalfSize, -knobHalfSize, knobSize, knobSize, 0.f, knobImage, 1.f);\n\n        save();\n        translate(knobMargin + knobHalfSize, knobMargin + knobHalfSize);\n        rotate(degToRad(270.f * (getNormalizedValue() - 0.5f)));\n\n        beginPath();\n        rect(-knobHalfSize, -knobHalfSize, knobSize, knobSize);\n        fillPaint(knobImgPat);\n        fill();\n\n        restore();\n\n        if (getState() & kKnobStateDragging)\n        {\n            const double padding = 4 * scaleFactor;\n            beginPath();\n            roundedRect(padding, 0,\n                        scaleSize - padding,\n                        wfontSize + padding * 2,\n                        2 * scaleFactor);\n            fillColor(Color(0,0,0,0.5f));\n            fill();\n\n            char textBuf[24];\n            std::snprintf(textBuf, sizeof(textBuf)-1, \"%.2f %s\", getValue(), unit);\n            textBuf[sizeof(textBuf)-1] = '\\0';\n\n            fillColor(Color(1.f, 1.f, 1.f));\n            textAlign(ALIGN_CENTER | ALIGN_TOP);\n            text(width/2, padding, textBuf, nullptr);\n        }\n    }\n\n    bool onMouse(const MouseEvent& event) override\n    {\n        return KnobEventHandler::mouseEvent(event);\n    }\n\n    bool onMotion(const MotionEvent& event) override\n    {\n        return KnobEventHandler::motionEvent(event);\n    }\n\n    bool onScroll(const ScrollEvent& event) override\n    {\n        return KnobEventHandler::scrollEvent(event);\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// vertical switch with labels on top and bottom, follows modgui style\n\nclass AidaPluginSwitch : public NanoSubWidget,\n                         public ButtonEventHandler\n{\n    NanoTopLevelWidget* const parent;\n    const ParameterEnumerationValues& enumValues;\n    const bool isInverted;\n\npublic:\n    static constexpr const uint kSwitchWidth = 25;\n    static constexpr const uint kSwitchHeight = 60;\n    static constexpr const uint kSwitchRadius = kSwitchWidth / 2;\n    static constexpr const uint kFullWidth = kSwitchWidth + kSubWidgetsPadding * 2;\n\n    AidaPluginSwitch(NanoTopLevelWidget* const p, ButtonEventHandler::Callback* const cb, const Parameters paramId)\n        : NanoSubWidget(p),\n          ButtonEventHandler(this),\n          parent(p),\n          enumValues(kParameters[paramId].enumValues),\n          isInverted(paramId == kParameterGLOBALBYPASS)\n    {\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kFullWidth * scaleFactor, kSubWidgetsFullHeight * scaleFactor);\n\n        const Parameter& param(kParameters[paramId]);\n        setId(paramId);\n        setCheckable(true);\n        setChecked(isInverted ? param.ranges.def < 0.5f : param.ranges.def > 0.5f, false);\n        setCallback(cb);\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double switchWidth = kSwitchWidth * scaleFactor;\n        const double switchHeight = kSwitchHeight * scaleFactor;\n        const double switchPadding = kSubWidgetsPadding * scaleFactor;\n        const double switchRadius = kSwitchRadius * scaleFactor;\n\n        const bool checked = isInverted ? !isChecked() : isChecked();\n\n        beginPath();\n        rect(0, 0, width, height);\n\n        fontSize(kSubWidgetsFontSize * scaleFactor);\n        fillColor(Color(1.f, 1.f, 1.f));\n\n        textAlign(ALIGN_CENTER | ALIGN_TOP);\n        text(width/2, 0, enumValues.values[0].label, nullptr);\n\n        textAlign(ALIGN_CENTER | ALIGN_BASELINE);\n        text(width/2, height, enumValues.values[1].label, nullptr);\n\n        beginPath();\n        roundedRect(switchPadding, height/2 - switchHeight/2, switchWidth, switchHeight, switchRadius);\n        fillColor(checked ? Color(84, 84, 84) : Color(129, 247, 0));\n        fill();\n\n        beginPath();\n        circle(width / 2,\n               checked ? height/2 + switchHeight/2 - switchWidth/2\n                       : height/2 - switchHeight/2 + switchWidth/2,\n               10 * scaleFactor);\n        fillColor(checked ? Color(218, 214, 203) : Color(24, 112, 4));\n        fill();\n    }\n\n    bool onMouse(const MouseEvent& event) override\n    {\n        return ButtonEventHandler::mouseEvent(event);\n    }\n\n    bool onMotion(const MotionEvent& event) override\n    {\n        return ButtonEventHandler::motionEvent(event);\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// simple vertical meter\n\nclass AidaMeter : public NanoSubWidget\n{\n    NanoTopLevelWidget* const parent;\n    Application& app;\n    const String label;\n\n    bool clipping = false;\n    bool nearClipping = false;\n\n    float value = 0.f;\n    float valueDb = kMinimumMeterDb;\n    float valueDb2 = kMinimumMeterDb; // average filter\n\npublic:\n    static constexpr const uint kMeterWidth = 150;\n    static constexpr const uint kMeterHeight = kSubWidgetsFontSize + kSubWidgetsPadding / 2;\n    static constexpr const uint kMeterRadius = kSubWidgetsPadding / 2;\n\n    AidaMeter(NanoTopLevelWidget* const p, const char* const lbl)\n        : NanoSubWidget(p),\n          parent(p),\n          app(parent->getApp()),\n          label(lbl)\n    {\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kMeterWidth * scaleFactor, kMeterHeight * scaleFactor);\n    }\n\n    void setValue(const float v)\n    {\n        if (d_isEqual(value, v))\n            return;\n\n        value = v;\n        valueDb = 20.f * std::log10(v);\n\n        repaint();\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double meterRadius = kMeterRadius * scaleFactor;\n        const double meterPadding = kSubWidgetsPadding * scaleFactor;\n        const double wfontSize = kSubWidgetsFontSize * scaleFactor;\n\n        const float filteredDb = valueDb2 = (valueDb + valueDb2) / 2.f;\n\n        fontSize(wfontSize);\n\n        beginPath();\n        roundedRect(0, 0, width, height, meterRadius);\n        fillColor(Color(0x38,0x37,0x5c));\n        fill();\n\n        char valuestr[32] = {};\n\n        if (filteredDb > kMinimumMeterDb)\n            std::snprintf(valuestr, sizeof(valuestr)-1, \"%.1f dB\", valueDb);\n        else\n            std::strncpy(valuestr, \"-inf dB\", sizeof(valuestr)-1);\n\n        Color activeColor;\n\n        if (valueDb > 0.f || (filteredDb > (clipping ? -3.f : 0.f)))\n        {\n            clipping = nearClipping = true;\n            activeColor = Color(0xf4,0x4d,0x50); // #F44D50\n        }\n        else if (filteredDb > (nearClipping ? -6.f : -3.f))\n        {\n            nearClipping = true;\n            activeColor = Color(0xf4,0xf1,0x4d); // #F4F14D\n        }\n        else\n        {\n            clipping = nearClipping = false;\n            activeColor = Color(0xa4,0xf4,0x4d); // #A4F44D\n        }\n\n        // draw text using active color\n        fillColor(activeColor);\n\n        textAlign(ALIGN_LEFT|ALIGN_MIDDLE);\n        text(meterPadding, height/2, label, nullptr);\n\n        textAlign(ALIGN_RIGHT|ALIGN_MIDDLE);\n        text(width - meterPadding, height/2, valuestr, nullptr);\n\n        if (valueDb > kMinimumMeterDb)\n        {\n            const float vnormal = normalizedLevelMeterValue(filteredDb);\n\n            // draw active background\n            beginPath();\n            roundedRect(scaleFactor, scaleFactor,\n                        vnormal * (width - scaleFactor * 2),\n                        height - scaleFactor * 2,\n                        meterRadius);\n            fill();\n\n            // draw text on top of active color using background color\n            fillColor(Color(0x38,0x37,0x5c));\n\n            save();\n            scissor(0, 0, vnormal * width, height);\n\n            textAlign(ALIGN_LEFT|ALIGN_MIDDLE);\n            text(meterPadding, height/2, label, nullptr);\n\n            textAlign(ALIGN_RIGHT|ALIGN_MIDDLE);\n            text(width - meterPadding, height/2, valuestr, nullptr);\n\n            restore();\n        }\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// simple vertical splitter\n\nclass AidaSplitter : public NanoSubWidget\n{\n    NanoTopLevelWidget* const parent;\n\npublic:\n    static constexpr const uint kLineWidth = 4;\n    static constexpr const uint kLineHeight = 80;\n\n    AidaSplitter(NanoTopLevelWidget* const p)\n        : NanoSubWidget(p),\n          parent(p)\n    {\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kLineWidth * scaleFactor, kSubWidgetsFullHeight * scaleFactor);\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double lineHeight = kLineHeight * scaleFactor;\n\n        beginPath();\n        moveTo(width/2, height/2 - lineHeight/2);\n        lineTo(width/2, height/2 + lineHeight/2);\n        lineCap(ROUND);\n        strokeColor(Color(97, 97, 97, 0.484f));\n        strokeWidth(width);\n        stroke();\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// simple push button\n\nclass AidaPushButton : public NanoSubWidget,\n                       public ButtonEventHandler\n{\n    NanoTopLevelWidget* const parent;\n    String label;\n\npublic:\n    static constexpr const uint kButtonWidth = 140;\n    static constexpr const uint kButtonHeight = 25;\n    static constexpr const uint kButtonRadius = 4;\n\n    AidaPushButton(NanoTopLevelWidget* const p)\n        : NanoSubWidget(p),\n          ButtonEventHandler(this),\n          parent(p)\n    {\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kButtonWidth * scaleFactor, kButtonHeight * scaleFactor);\n    }\n\n    void setLabel(const char* const lbl)\n    {\n        label = lbl;\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double buttonRadius = kButtonRadius * scaleFactor;\n\n        beginPath();\n        roundedRect(0, 0, width, height, buttonRadius);\n\n        switch (getState())\n        {\n        case kButtonStateDefault:\n            fillColor(Color(0x15,0x14,0x13));\n            strokeColor(Color(0x15,0x14,0x13,0.8f));\n            break;\n        case kButtonStateHover:\n            fillColor(Color(0x15,0x14,0x13,0.8f));\n            strokeColor(Color(0x15,0x14,0x13,0.8f));\n            break;\n        case kButtonStateActive:\n        case kButtonStateActiveHover:\n            fillColor(Color(0x15,0x14,0x13,0.4f));\n            strokeColor(Color(0x15,0x14,0x13,0.4f));\n            break;\n        }\n\n        fill();\n        stroke();\n\n        if (label.isEmpty())\n            return;\n\n        fillColor(Color(1.f, 1.f, 1.f));\n        fontSize(16 * scaleFactor);\n        textAlign(ALIGN_CENTER | ALIGN_MIDDLE);\n        text(width/2, height/2, label, nullptr);\n    }\n\n    bool onMouse(const MouseEvent& event) override\n    {\n        return ButtonEventHandler::mouseEvent(event);\n    }\n\n    bool onMotion(const MotionEvent& event) override\n    {\n        return ButtonEventHandler::motionEvent(event);\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// filelist selector\n\nclass AidaFileList : public NanoSubWidget,\n                     public ButtonEventHandler::Callback\n{\n    static constexpr const uint kCommonRadius = 10;\n    static constexpr const uint kSingleHeight = 24;\n    static constexpr const uint kInitialWidth = 100;\n\n    struct AidaFileButton : NanoSubWidget,\n                            ButtonEventHandler\n    {\n        NanoTopLevelWidget* const parent;\n        String label;\n\n        enum Position {\n            Top,\n            Middle,\n            Bottom\n        } position;\n\n        AidaFileButton(NanoTopLevelWidget* const p, const Position pos)\n            : NanoSubWidget(p),\n              ButtonEventHandler(this),\n              parent(p),\n              position(pos)\n        {\n            const double scaleFactor = p->getScaleFactor();\n            setSize(kInitialWidth * scaleFactor, kSingleHeight * scaleFactor);\n        }\n\n        void onNanoDisplay() override\n        {\n            if (label.isEmpty())\n                return;\n\n            const uint width = getWidth();\n            const uint height = getHeight();\n\n            const double scaleFactor = parent->getScaleFactor();\n            const double wfontSize = kSubWidgetsFontSize * scaleFactor;\n            const double margin = kSubWidgetsPadding * scaleFactor;\n            const double radius = kCommonRadius * scaleFactor;\n\n            uint state = getState();\n            if (isChecked())\n                state |= kButtonStateActive;\n\n            switch (state)\n            {\n            case kButtonStateDefault:\n                fillColor(Color(0x74,0x92,0x32));\n                break;\n            case kButtonStateHover:\n                fillColor(Color(0x56,0x73,0x28));\n                break;\n            case kButtonStateActive:\n                fillColor(Color(0x15,0x2c,0x0d));\n                break;\n            case kButtonStateActiveHover:\n                Color c(0x56,0x73,0x28);\n                c.interpolate(Color(0x15,0x2c,0x0d), 0.5f);\n                fillColor(c);\n                break;\n            }\n\n            switch (position)\n            {\n            case Middle:\n                beginPath();\n                rect(0, 0, width, height);\n                fill();\n                break;\n            case Top:\n            case Bottom:\n                beginPath();\n                roundedRect(0, 0, width, height, radius);\n                fill();\n                beginPath();\n                if (position == Top)\n                    rect(0, height/2, width, height);\n                else\n                    rect(0, 0, width, height/2);\n                fill();\n                break;\n            }\n\n            fillColor(Color(1.f, 1.f, 1.f));\n            fontSize(wfontSize);\n            textAlign(ALIGN_LEFT | ALIGN_MIDDLE);\n            text(margin, height / 2, label, nullptr);\n        }\n\n        bool onMouse(const MouseEvent& event) override\n        {\n            return ButtonEventHandler::mouseEvent(event);\n        }\n\n        bool onMotion(const MotionEvent& event) override\n        {\n            return ButtonEventHandler::motionEvent(event);\n        }\n    };\n\npublic:\n    NanoTopLevelWidget* const parent;\n    ScopedPointer<AidaFileButton> buttons[3];\n    ButtonEventHandler::Callback* const callback;\n\n    AidaFileList(NanoTopLevelWidget* const p, ButtonEventHandler::Callback* const cb, const uint buttonStartId)\n        : NanoSubWidget(p),\n          parent(p),\n          callback(cb)\n    {\n        buttons[0] = new AidaFileButton(p, AidaFileButton::Top);\n        buttons[0]->setCallback(this);\n        buttons[0]->setId(buttonStartId);\n\n        buttons[1] = new AidaFileButton(p, AidaFileButton::Middle);\n        buttons[1]->setCallback(this);\n        buttons[1]->setId(buttonStartId + 1);\n\n        buttons[2] = new AidaFileButton(p, AidaFileButton::Bottom);\n        buttons[2]->setCallback(this);\n        buttons[2]->setId(buttonStartId + 2);\n\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kInitialWidth * scaleFactor, kSingleHeight * 3 * scaleFactor);\n    }\n\n    void setFilename(const int id, const char* const filename, const bool setAsActive = false)\n    {\n        DISTRHO_SAFE_ASSERT_RETURN(id >= 0 && id < 3,);\n\n        if (const char* const bname = std::strrchr(filename, DISTRHO_OS_SEP))\n            buttons[id]->label = bname + 1;\n        else\n            buttons[id]->label = filename;\n\n        if (setAsActive)\n            buttons[id]->setChecked(true, false);\n\n        buttons[id]->repaint();\n    }\n\nprotected:\n    void onNanoDisplay() override\n    {\n        beginPath();\n        roundedRect(0, 0, getWidth(), getHeight(), kCommonRadius * parent->getScaleFactor());\n        fillColor(Color(0.f, 0.f, 0.f));\n        fill();\n    }\n\n    void buttonClicked(SubWidget* const widget, const int button) override\n    {\n        if (button != kMouseButtonLeft)\n            return;\n\n        /**/ if (buttons[0] == widget)\n        {\n            buttons[1]->setChecked(false, false);\n            buttons[2]->setChecked(false, false);\n            buttons[0]->setChecked(true, true);\n        }\n        else if (buttons[1] == widget)\n        {\n            buttons[0]->setChecked(false, false);\n            buttons[2]->setChecked(false, false);\n            buttons[1]->setChecked(true, true);\n        }\n        else if (buttons[2] == widget)\n        {\n            buttons[0]->setChecked(false, false);\n            buttons[1]->setChecked(false, false);\n            buttons[2]->setChecked(true, true);\n        }\n\n        callback->buttonClicked(widget, button);\n    }\n\n    void onPositionChanged(const PositionChangedEvent& event) override\n    {\n        NanoSubWidget::onPositionChanged(event);\n\n        const double scaleFactor = parent->getScaleFactor();\n        const double widgetX = event.pos.getX();\n        const double widgetY = event.pos.getY();\n        const double singleHeight = kSingleHeight * scaleFactor;\n\n        buttons[0]->setAbsolutePos(widgetX, widgetY);\n        buttons[1]->setAbsolutePos(widgetX, widgetY + singleHeight);\n        buttons[2]->setAbsolutePos(widgetX, widgetY + singleHeight * 2);\n    }\n\n    void onResize(const ResizeEvent& event) override\n    {\n        NanoSubWidget::onResize(event);\n\n        const uint width = event.size.getWidth();\n        buttons[0]->setWidth(width);\n        buttons[1]->setWidth(width);\n        buttons[2]->setWidth(width);\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// switch and filename as button combo\n\nclass AidaFilenameButton : public NanoSubWidget\n{\n    static constexpr const uint kCommonHeight = 32;\n    static constexpr const uint kCommonRadius = 10;\n    static constexpr const uint kIconSize     = 20;\n    static constexpr const uint kInitialWidth = 100;\n\n    struct AidaFileSwitch : NanoSubWidget,\n                            ButtonEventHandler\n    {\n        NanoTopLevelWidget* const parent;\n        const NanoImage& imageOff;\n        const NanoImage& imageOn;\n\n        AidaFileSwitch(NanoTopLevelWidget* const p, const NanoImage& imgOff, const NanoImage& imgOn)\n            : NanoSubWidget(p),\n              ButtonEventHandler(this),\n              parent(p),\n              imageOff(imgOff),\n              imageOn(imgOn)\n        {\n            const double scaleFactor = p->getScaleFactor();\n            setSize((kCommonHeight + kSubWidgetsPadding) * scaleFactor, kCommonHeight * scaleFactor);\n\n            setCheckable(true);\n            setChecked(true, false);\n        }\n\n        bool isHover() const noexcept\n        {\n            return getState() & kButtonStateHover;\n        }\n\n        void onNanoDisplay() override\n        {\n            const uint width = getWidth();\n            const uint height = getHeight();\n\n            const double scaleFactor = parent->getScaleFactor();\n            const double iconSize = kIconSize * scaleFactor;\n            const double switchRadius = kCommonRadius * scaleFactor;\n\n            uint state = getState();\n            if (isChecked())\n                state |= kButtonStateActive;\n\n            switch (state)\n            {\n            case kButtonStateDefault:\n                fillColor(Color(0x74,0x92,0x32));\n                break;\n            case kButtonStateHover:\n                fillColor(Color(0x74,0x92,0x32));\n                break;\n            case kButtonStateActive:\n                fillColor(Color(0x15,0x2c,0x0d));\n                break;\n            case kButtonStateActiveHover:\n                fillColor(Color(0x15,0x2c,0x0d));\n                break;\n            }\n\n            beginPath();\n            roundedRect(0, 0, width, height, switchRadius);\n            fill();\n\n            beginPath();\n            rect(height/2, 0, width-height/2, height);\n            fill();\n\n            save();\n            translate(width/2 - iconSize/2, height/2 - iconSize/2);\n            beginPath();\n            rect(0, 0, iconSize, iconSize);\n            fillPaint(imagePattern(0, 0, iconSize, iconSize, 0.f, isChecked() ? imageOn : imageOff, 1.f));\n            fill();\n            restore();\n        }\n\n        bool onMouse(const MouseEvent& event) override\n        {\n            return ButtonEventHandler::mouseEvent(event);\n        }\n\n        bool onMotion(const MotionEvent& event) override\n        {\n            return ButtonEventHandler::motionEvent(event);\n        }\n    };\n\n    struct AidaFileButton : NanoSubWidget,\n                            ButtonEventHandler\n    {\n        NanoTopLevelWidget* const parent;\n\n        struct {\n            String enable;\n            String disable;\n            String load;\n        } labels;\n\n        String filename;\n        AidaFileSwitch* hoverButton = nullptr;\n\n        AidaFileButton(NanoTopLevelWidget* const p, const String& label)\n            : NanoSubWidget(p),\n              ButtonEventHandler(this),\n              parent(p)\n        {\n            const double scaleFactor = p->getScaleFactor();\n            setSize(kInitialWidth * scaleFactor, kCommonHeight * scaleFactor);\n\n            labels.enable = \"Click to enable \" + label;\n            labels.disable = \"Click to disable \" + label;\n            labels.load = \"Load \" + label + \"...\";\n        }\n\n        void onNanoDisplay() override\n        {\n            const uint width = getWidth();\n            const uint height = getHeight();\n\n            const double scaleFactor = parent->getScaleFactor();\n            const double buttonMargin = (kCommonHeight + kSubWidgetsPadding * 2) * scaleFactor;\n            const double buttonRadius = kCommonRadius * scaleFactor;\n\n            beginPath();\n            roundedRect(0, 0, width, height, buttonRadius);\n\n            switch (getState())\n            {\n            case kButtonStateDefault:\n                fillColor(Color(0x56,0x73,0x28));\n                break;\n            case kButtonStateHover:\n                fillColor(Color(0x74,0x92,0x32));\n                break;\n            case kButtonStateActive:\n                fillColor(Color(0x15,0x2c,0x0d));\n                break;\n            case kButtonStateActiveHover:\n                fillColor(Color(0x15,0x2c,0x0d));\n                break;\n            }\n\n            fill();\n\n            fillColor(Color(1.f, 1.f, 1.f));\n            fontSize(16 * scaleFactor);\n            textAlign(ALIGN_LEFT | ALIGN_MIDDLE);\n            save();\n            scissor(buttonMargin, 0, width - buttonMargin, height/2 + 16 * scaleFactor / 2);\n            textBox(buttonMargin, height/2, width - buttonMargin,\n                    hoverButton->isHover() ? hoverButton->isChecked() ? labels.disable : labels.enable\n                                           : getState() & kButtonStateHover ? labels.load : filename,\n                    nullptr);\n            restore();\n        }\n\n        bool onMouse(const MouseEvent& event) override\n        {\n            return ButtonEventHandler::mouseEvent(event);\n        }\n\n        bool onMotion(const MotionEvent& event) override\n        {\n            return ButtonEventHandler::motionEvent(event);\n        }\n    };\n\n    ScopedPointer<AidaFileButton> button;\n    ScopedPointer<AidaFileSwitch> toggle;\n\npublic:\n    AidaFilenameButton(NanoTopLevelWidget* const p, ButtonEventHandler::Callback* const cb,\n                       const uint switchId,\n                       const uint buttonId,\n                       const char* const buttonLabel,\n                       const NanoImage& imgOff,\n                       const NanoImage& imgOn)\n        : NanoSubWidget(p)\n    {\n        button = new AidaFileButton(p, String(buttonLabel));\n        button->setCallback(cb);\n        button->setId(buttonId);\n\n        toggle = new AidaFileSwitch(p, imgOff, imgOn);\n        toggle->setCallback(cb);\n        toggle->setId(switchId);\n\n        button->hoverButton = toggle;\n\n        const double scaleFactor = p->getScaleFactor();\n        setSize(kInitialWidth * scaleFactor, kCommonHeight * scaleFactor);\n    }\n\n    void setChecked(const bool checked)\n    {\n        toggle->setChecked(checked, false);\n    }\n\n    void setFilename(const char* const fname)\n    {\n        if (const char* const bname = std::strrchr(fname, DISTRHO_OS_SEP))\n            button->filename = bname + 1;\n        else\n            button->filename = fname;\n        button->repaint();\n    }\n\nprotected:\n    void onNanoDisplay() override {}\n\n    void onPositionChanged(const PositionChangedEvent& event) override\n    {\n        NanoSubWidget::onPositionChanged(event);\n\n        const double widgetX = event.pos.getX();\n        const double widgetY = event.pos.getY();\n        toggle->setAbsolutePos(widgetX, widgetY);\n        button->setAbsolutePos(widgetX, widgetY);\n    }\n\n    void onResize(const ResizeEvent& event) override\n    {\n        NanoSubWidget::onResize(event);\n\n        button->setWidth(event.size.getWidth());\n    }\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n\nEND_NAMESPACE_DISTRHO\n"
  },
  {
    "path": "src/aidadsp-plugin.cpp",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2022-2023 Massimo Pennazio <maxipenna@libero.it>\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#include \"DistrhoPlugin.hpp\"\n\n#include \"Biquad.h\"\n#include \"Files.hpp\"\n\n#include \"model_variant.hpp\"\n#include \"extra/ScopedDenormalDisable.hpp\"\n#include \"extra/Sleep.hpp\"\n#include \"extra/ValueSmoother.hpp\"\n\n#include <atomic>\n#include <strstream>\n\n#include \"dr_flac.h\"\n#include \"dr_wav.h\"\n// -Wunused-variable\n#include \"CDSPResampler.h\"\n\n// must be last\n#include \"TwoStageThreadedConvolver.hpp\"\n\nSTART_NAMESPACE_DISTRHO\n\n// --------------------------------------------------------------------------------------------------------------------\n\n/* Define a constexpr for converting a gain in dB to a coefficient */\nstatic constexpr float DB_CO(const float g) { return g > -90.f ? std::pow(10.f, g * 0.05f) : 0.f; }\n\n/* Define a macro to re-maps a number from one range to another  */\nstatic constexpr float MAP(const float x, const float in_min, const float in_max, const float out_min, const float out_max)\n{\n    return ((x - in_min) * (out_max - out_min) / (in_max - in_min)) + out_min;\n}\n\n/* Defines for tone controls */\nstatic constexpr const float COMMON_Q = 0.707f;\nstatic constexpr const float DEPTH_FREQ = 75.f;\nstatic constexpr const float PRESENCE_FREQ = 900.f;\n\n/* Defines for antialiasing filter */\nstatic constexpr const float INLPF_MAX_CO = 0.99f * 0.5f; /* coeff * ((samplerate / 2) / samplerate) */\nstatic constexpr const float INLPF_MIN_CO = 0.25f * 0.5f; /* coeff * ((samplerate / 2) / samplerate) */\n\n/* Gain compensation for cabinet IR (-12dB) */\nstatic constexpr const float kCabinetMaxGain = 0.251f;\n\n// --------------------------------------------------------------------------------------------------------------------\n\nstruct AidaToneControl {\n    Biquad dc_blocker { bq_type_highpass, 0.5f, COMMON_Q, 0.0f };\n    Biquad in_lpf { bq_type_lowpass, 0.5f, COMMON_Q, 0.0f };\n    Biquad bass { bq_type_lowshelf, 0.5f, COMMON_Q, 0.0f };\n    Biquad mid { bq_type_peak, 0.5f, COMMON_Q, 0.0f };\n    Biquad treble { bq_type_highshelf, 0.5f, COMMON_Q, 0.0f };\n    Biquad depth { bq_type_peak, 0.5f, COMMON_Q, 0.0f };\n    Biquad presence { bq_type_highshelf, 0.5f, COMMON_Q, 0.0f };\n    ExponentialValueSmoother inlevel;\n    ExponentialValueSmoother outlevel;\n    bool net_bypass = false;\n    bool eq_bypass = false;\n    EqPos eq_pos = kEqPost;\n    MidEqType mid_type = kMidEqPeak;\n\n    AidaToneControl()\n    {\n        inlevel.setTimeConstant(1);\n        outlevel.setTimeConstant(1);\n    }\n\n    void setSampleRate(const float parameters[kNumParameters], const double sampleRate)\n    {\n        dc_blocker.setFc(35.0f / sampleRate);\n\n        in_lpf.setFc(MAP(parameters[kParameterINLPF], 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO));\n\n        bass.setBiquad(bq_type_lowshelf,\n                       parameters[kParameterBASSFREQ] / sampleRate, COMMON_Q, parameters[kParameterBASSGAIN]);\n\n        mid.setBiquad(mid_type == kMidEqBandpass ? bq_type_bandpass : bq_type_peak,\n                      parameters[kParameterMIDFREQ] / sampleRate,\n                      parameters[kParameterMIDQ],\n                      parameters[kParameterMIDGAIN]);\n\n        treble.setBiquad(bq_type_highshelf,\n                         parameters[kParameterTREBLEFREQ] / sampleRate, COMMON_Q, parameters[kParameterTREBLEGAIN]);\n\n        depth.setBiquad(bq_type_peak,\n                        DEPTH_FREQ / sampleRate, COMMON_Q, parameters[kParameterDEPTH]);\n\n        presence.setBiquad(bq_type_highshelf,\n                           PRESENCE_FREQ / sampleRate, COMMON_Q, parameters[kParameterPRESENCE]);\n\n        inlevel.setSampleRate(sampleRate);\n        inlevel.setTargetValue(DB_CO(parameters[kParameterINLEVEL]));\n\n        outlevel.setSampleRate(sampleRate);\n        outlevel.setTargetValue(DB_CO(parameters[kParameterOUTLEVEL]));\n    }\n};\n\n#if AIDAX_WITH_AUDIOFILE\nstruct AudioFile {\n    float* buffer;\n    drwav_uint64 currentFrame;\n    drwav_uint64 numFrames;\n    bool resampled;\n\n    AudioFile(float* const buffer_, const drwav_uint64 numFrames_, const bool resampled_) noexcept\n        : buffer(buffer_),\n          currentFrame(0),\n          numFrames(numFrames_),\n          resampled(resampled_) {}\n\n    ~AudioFile() noexcept\n    {\n        if (resampled)\n            delete[] buffer;\n        else\n            drwav_free(buffer, nullptr);\n    }\n};\n#endif\n\nstruct DynamicModel {\n    ModelVariantType variant;\n    bool input_skip; /* Means the model has been trained with first input element skipped to the output */\n    float input_gain;\n    float output_gain;\n};\n\n// --------------------------------------------------------------------------------------------------------------------\n// Apply a gain ramp to a buffer\n\nstatic void applyGainRamp(ExponentialValueSmoother& smoother, float* const out, const uint32_t numSamples)\n{\n    for (uint32_t i=0; i<numSamples; ++i)\n        out[i] *= smoother.next();\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n// Apply filter\n\nstatic void applyBiquadFilter(Biquad& filter, float* const out, const float* const in, const uint32_t numSamples)\n{\n    for (uint32_t i=0; i<numSamples; ++i)\n        out[i] = filter.process(in[i]);\n}\n\nstatic void applyBiquadFilter(Biquad& filter, float* const out, const uint32_t numSamples)\n{\n    for (uint32_t i=0; i<numSamples; ++i)\n        out[i] = filter.process(out[i]);\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n// Apply biquad cascade filters\n\nstatic void applyToneControls(AidaToneControl& aida, float* const out, uint32_t numSamples)\n{\n    if (aida.mid_type == kMidEqBandpass)\n    {\n        applyBiquadFilter(aida.mid, out, numSamples);\n    }\n    else\n    {\n        applyBiquadFilter(aida.depth, out, numSamples);\n        applyBiquadFilter(aida.bass, out, numSamples);\n        applyBiquadFilter(aida.mid, out, numSamples);\n        applyBiquadFilter(aida.treble, out, numSamples);\n        applyBiquadFilter(aida.presence, out, numSamples);\n    }\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n// This function carries model calculations\n\nvoid applyModel(DynamicModel* model, float* const out, uint32_t numSamples,\n                LinearValueSmoother& param1, LinearValueSmoother& param2)\n{\n    const bool input_skip = model->input_skip;\n    const float input_gain = model->input_gain;\n    const float output_gain = model->output_gain;\n\n    std::visit(\n        [&out, numSamples, input_skip, input_gain, output_gain, &param1, &param2] (auto&& custom_model)\n        {\n            using ModelType = std::decay_t<decltype (custom_model)>;\n\n            if (d_isNotEqual(input_gain, 1.f))\n            {\n                for (uint32_t i=0; i<numSamples; ++i)\n                    out[i] *= input_gain;\n            }\n\n            if constexpr (ModelType::input_size == 1)\n            {\n                if (input_skip)\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                        out[i] += custom_model.forward(out + i);\n                }\n                else\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                        out[i] = custom_model.forward(out + i) * output_gain;\n                }\n            }\n            else if constexpr (ModelType::input_size == 2)\n            {\n                float inArray1 alignas(RTNEURAL_DEFAULT_ALIGNMENT)[2];\n\n                if (input_skip)\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                    {\n                        inArray1[0] = out[i];\n                        inArray1[1] = param1.next();\n                        out[i] += custom_model.forward(inArray1);\n                    }\n                }\n                else\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                    {\n                        inArray1[0] = out[i];\n                        inArray1[1] = param1.next();\n                        out[i] = custom_model.forward(inArray1) * output_gain;\n                    }\n                }\n            }\n            else if constexpr (ModelType::input_size == 3)\n            {\n                float inArray2 alignas(RTNEURAL_DEFAULT_ALIGNMENT)[3];\n\n                if (input_skip)\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                    {\n                        inArray2[0] = out[i];\n                        inArray2[1] = param1.next();\n                        inArray2[2] = param2.next();\n                        out[i] += custom_model.forward(inArray2);\n                    }\n                }\n                else\n                {\n                    for (uint32_t i=0; i<numSamples; ++i)\n                    {\n                        inArray2[0] = out[i];\n                        inArray2[1] = param1.next();\n                        inArray2[2] = param2.next();\n                        out[i] = custom_model.forward(inArray2) * output_gain;\n                    }\n                }\n            }\n\n            if (input_skip && d_isNotEqual(output_gain, 1.f))\n            {\n                for (uint32_t i=0; i<numSamples; ++i)\n                    out[i] *= output_gain;\n            }\n        },\n        model->variant\n    );\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n\nclass AidaDSPLoaderPlugin : public Plugin\n{\n    AidaToneControl aida;\n    DynamicModel* model = nullptr;\n    TwoStageThreadedConvolver* cabsim = nullptr;\n    std::atomic<bool> activeModel { false };\n    std::atomic<bool> activeConvolver { false };\n    String cabsimFilename;\n    ExponentialValueSmoother cabsimGain;\n    float* cabsimInplaceBuffer = nullptr;\n    ExponentialValueSmoother bypassGain;\n    float* bypassInplaceBuffer = nullptr;\n    float parameters[kNumParameters];\n    LinearValueSmoother param1;\n    LinearValueSmoother param2;\n    bool enabledLPF = true;\n    bool enabledDC = true;\n    bool isStereoAU = false;\n    bool paramFirstRun = true;\n    std::atomic<bool> resetMeters { true };\n    float tmpMeterIn, tmpMeterOut;\n    uint32_t tmpMeterFrames, meterMaxFrameCount;\n   #if AIDAX_WITH_AUDIOFILE\n    AudioFile* audiofile = nullptr;\n    std::atomic<bool> activeAudiofile { false };\n   #endif\n\npublic:\n    AidaDSPLoaderPlugin()\n        : Plugin(kNumParameters, 0, kStateCount) // parameters, programs, states\n    {\n        // Initialize parameters to their defaults\n        for (uint i=0; i<kNumParameters; ++i)\n            parameters[i] = kParameters[i].ranges.def;\n\n        bypassGain.setTimeConstant(0.25f);\n        bypassGain.setTargetValue(1.f);\n\n        cabsimGain.setTimeConstant(0.1f);\n        cabsimGain.setTargetValue(kCabinetMaxGain);\n\n        param1.setTimeConstant(0.1f);\n        param1.setTargetValue(parameters[kParameterPARAM1]);\n\n        param2.setTimeConstant(0.1f);\n        param2.setTargetValue(parameters[kParameterPARAM2]);\n\n        // initialize\n        bufferSizeChanged(getBufferSize());\n        sampleRateChanged(getSampleRate());\n\n        // load default model\n        loadDefaultModel();\n    }\n\n    ~AidaDSPLoaderPlugin()\n    {\n        delete model;\n        delete cabsim;\n       #if AIDAX_WITH_AUDIOFILE\n        delete audiofile;\n       #endif\n        delete[] bypassInplaceBuffer;\n        delete[] cabsimInplaceBuffer;\n    }\n\nprotected:\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Information */\n\n   /**\n      Get the plugin label.\n      A plugin label follows the same rules as Parameter::symbol, with the exception that it can start with numbers.\n    */\n    const char* getLabel() const override\n    {\n        return \"AIDA_X\";\n    }\n\n   /**\n      Get an extensive comment/description about the plugin.\n    */\n    const char* getDescription() const override\n    {\n        return \"Simple loader for neural models using RTNeural inference engine.\";\n    }\n\n   /**\n      Get the plugin author/maker.\n    */\n    const char* getMaker() const override\n    {\n        return DISTRHO_PLUGIN_BRAND;\n    }\n\n   /**\n      Get the plugin homepage.\n    */\n    const char* getHomePage() const override\n    {\n        return \"https://aidadsp.github.io/\";\n    }\n\n   /**\n      Get the plugin license name (a single line of text).\n      For commercial plugins this should return some short copyright information.\n    */\n    const char* getLicense() const override\n    {\n        return \"GPL-3.0-or-later\";\n    }\n\n   /**\n      Get the plugin version, in hexadecimal.\n    */\n    uint32_t getVersion() const override\n    {\n        return kVersionNumber;\n    }\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Init */\n\n   /**\n      Initialize the audio port @a index.@n\n      This function will be called once, shortly after the plugin is created.\n    */\n    void initAudioPort(const bool input, const uint32_t index, AudioPort& port) override\n    {\n        // treat meter audio ports as mono\n        port.groupId = kPortGroupMono;\n\n        // everything else is as default\n        Plugin::initAudioPort(input, index, port);\n    }\n\n   /**\n      Initialize the parameter @a index.\n      This function will be called once, shortly after the plugin is created.\n    */\n    void initParameter(const uint32_t index, Parameter& parameter) override\n    {\n        parameter = kParameters[index];\n\n        switch (index)\n        {\n        case kParameterINLPF:\n            {\n                static ParameterEnumerationValue values[1] = {\n                    { 0.f, \"Off\" }\n                };\n                parameter.enumValues.values = values;\n                parameter.enumValues.deleteLater = false;\n            }\n            break;\n        case kParameterGLOBALBYPASS:\n            parameter.designation = kParameterDesignationBypass;\n            {\n                static ParameterEnumerationValue values[2] = {\n                    { 0, \"PROCESSING\" },\n                    { 1, \"BYPASSED\" }\n                };\n                parameter.enumValues.values = values;\n                parameter.enumValues.deleteLater = false;\n            }\n            break;\n        }\n    }\n\n   /**\n      Initialize the state @a index.@n\n      This function will be called once, shortly after the plugin is created.@n\n    */\n    void initState(const uint32_t index, State& state) override\n    {\n        switch (static_cast<States>(index))\n        {\n        case kStateModelFile:\n            state.hints = kStateIsFilenamePath;\n            state.key = \"json\";\n            state.defaultValue = \"default\";\n            state.label = \"Neural Model\";\n            state.description = \"\";\n           #ifdef __MOD_DEVICES__\n            state.fileTypes = \"aidadspmodel\";\n           #endif\n            break;\n        case kStateImpulseFile:\n            state.hints = kStateIsFilenamePath;\n            state.key = \"cabinet\";\n            state.defaultValue = \"default\";\n            state.label = \"Cabinet Impulse Response\";\n            state.description = \"\";\n           #ifdef __MOD_DEVICES__\n            state.fileTypes = \"cabsim\";\n           #endif\n            break;\n       #if AIDAX_WITH_AUDIOFILE\n        case kStateAudioFile:\n            state.hints = kStateIsFilenamePath;\n            state.key = \"audiofile\";\n            state.defaultValue = \"\";\n            state.label = \"Audio Loop File\";\n            state.description = \"\";\n           #ifdef __MOD_DEVICES__\n            state.fileTypes = \"audioloop\";\n           #endif\n            break;\n       #endif\n        case kStateCount:\n            break;\n        }\n    }\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Internal data */\n\n   /**\n      Get the current value of a parameter.\n    */\n    float getParameterValue(const uint32_t index) const override\n    {\n        return parameters[index];\n    }\n\n   /**\n      Change a parameter value.\n    */\n    void setParameterValue(const uint32_t index, const float value) override\n    {\n        parameters[index] = value;\n\n        const double sampleRate = getSampleRate();\n\n        switch (static_cast<Parameters>(index))\n        {\n        case kParameterINLPF:\n            aida.in_lpf.setFc(MAP(value, 0.0f, 100.0f, INLPF_MAX_CO, INLPF_MIN_CO));\n            enabledLPF = d_isNotZero(value);\n            break;\n        case kParameterINLEVEL:\n            aida.inlevel.setTargetValue(DB_CO(value));\n            break;\n        case kParameterNETBYPASS:\n            aida.net_bypass = value > 0.5f;\n            break;\n        case kParameterEQBYPASS:\n            aida.eq_bypass = value > 0.5f;\n            break;\n        case kParameterEQPOS:\n            aida.eq_pos = value > 0.5f ? kEqPre : kEqPost;\n            break;\n        case kParameterBASSGAIN:\n            aida.bass.setPeakGain(value);\n            break;\n        case kParameterBASSFREQ:\n            aida.bass.setFc(value / sampleRate);\n            break;\n        case kParameterMIDGAIN:\n            aida.mid.setPeakGain(value);\n            break;\n        case kParameterMIDFREQ:\n            aida.mid.setFc(value / sampleRate);\n            break;\n        case kParameterMIDQ:\n            aida.mid.setQ(value);\n            break;\n        case kParameterMTYPE:\n            aida.mid_type = value > 0.5f ? kMidEqBandpass : kMidEqPeak;\n            break;\n        case kParameterTREBLEGAIN:\n            aida.treble.setPeakGain(value);\n            break;\n        case kParameterTREBLEFREQ:\n            aida.treble.setFc(value / sampleRate);\n            break;\n        case kParameterDEPTH:\n            aida.depth.setPeakGain(value);\n            break;\n        case kParameterPRESENCE:\n            aida.presence.setPeakGain(value);\n            break;\n        case kParameterOUTLEVEL:\n            aida.outlevel.setTargetValue(DB_CO(value));\n            break;\n        case kParameterCABSIMBYPASS:\n            cabsimGain.setTargetValue(value > 0.5f ? 0.f : kCabinetMaxGain);\n            break;\n        case kParameterGLOBALBYPASS:\n            bypassGain.setTargetValue(value > 0.5f ? 0.f : 1.f);\n            break;\n        case kParameterPARAM1:\n            param1.setTargetValue(value);\n            break;\n        case kParameterPARAM2:\n            param2.setTargetValue(value);\n            break;\n        case kParameterDCBLOCKER:\n            enabledDC = value > 0.5f;\n            break;\n        case kParameterModelInputSize:\n        case kParameterMeterIn:\n        case kParameterMeterOut:\n        case kParameterCount:\n            break;\n        }\n    }\n\n    void setState(const char* const key, const char* const value) override\n    {\n        if (std::strcmp(key, \"reset-meters\") == 0)\n        {\n            resetMeters.store(true);\n            return;\n        }\n\n        const bool isDefault = value == nullptr || value[0] == '\\0' || std::strcmp(value, \"default\") == 0;\n\n        if (std::strcmp(key, \"json\") == 0)\n            return isDefault ? loadDefaultModel() : loadModelFromFile(value);\n        if (std::strcmp(key, \"cabinet\") == 0)\n            return isDefault ? loadDefaultCabinet() : loadCabinetFromFile(value);\n       #if AIDAX_WITH_AUDIOFILE\n        if (std::strcmp(key, \"audiofile\") == 0)\n            return loadAudioFile(value);\n       #endif\n    }\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Model loader */\n\n    void loadDefaultModel()\n    {\n        using namespace Files;\n\n        try {\n            std::istrstream jsonStream(static_cast<const char*>(static_cast<const void*>(tw40_california_clean_deerinkstudiosData)),\n                                       tw40_california_clean_deerinkstudiosDataSize);\n            loadModelFromStream(jsonStream);\n        }\n        catch (const std::exception& e) {\n            d_stderr2(\"Unable to load json, error: %s\", e.what());\n        };\n    }\n\n    void loadModelFromFile(const char* const filename)\n    {\n        try {\n            std::ifstream jsonStream(filename, std::ifstream::binary);\n            loadModelFromStream(jsonStream);\n        }\n        catch (const std::exception& e) {\n            d_stderr2(\"Unable to load json file: %s\\nError: %s\", filename, e.what());\n        };\n    }\n\n    void loadModelFromStream(std::istream& jsonStream)\n    {\n        int input_size;\n        int input_skip;\n        float input_gain;\n        float output_gain;\n        nlohmann::json model_json;\n\n        try {\n            jsonStream >> model_json;\n\n            /* Understand which model type to load */\n            input_size = model_json[\"in_shape\"].back().get<int>();\n            if (input_size > MAX_INPUT_SIZE) {\n                throw std::invalid_argument(\"Value for input_size not supported\");\n            }\n\n            if (model_json[\"in_skip\"].is_number()) {\n                input_skip = model_json[\"in_skip\"].get<int>();\n                if (input_skip > 1)\n                    throw std::invalid_argument(\"Values for in_skip > 1 are not supported\");\n            }\n            else {\n                input_skip = 0;\n            }\n\n            if (model_json[\"in_gain\"].is_number()) {\n                input_gain = DB_CO(model_json[\"in_gain\"].get<float>());\n            }\n            else {\n                input_gain = 1.0f;\n            }\n\n            if (model_json[\"out_gain\"].is_number()) {\n                output_gain = DB_CO(model_json[\"out_gain\"].get<float>());\n            }\n            else {\n                output_gain = 1.0f;\n            }\n        }\n        catch (const std::exception& e) {\n            d_stderr2(\"Unable to load json, error: %s\", e.what());\n            return;\n        }\n\n        std::unique_ptr<DynamicModel> newmodel = std::make_unique<DynamicModel>();\n\n        try {\n            if (! custom_model_creator (model_json, newmodel->variant))\n                throw std::runtime_error (\"Unable to identify a known model architecture!\");\n\n            std::visit (\n                [&model_json] (auto&& custom_model)\n                {\n                    using ModelType = std::decay_t<decltype (custom_model)>;\n                    if constexpr (! std::is_same_v<ModelType, NullModel>)\n                    {\n                        custom_model.parseJson (model_json, true);\n                        custom_model.reset();\n                    }\n                },\n                newmodel->variant);\n        }\n        catch (const std::exception& e) {\n            d_stderr2(\"Error loading model: %s\", e.what());\n            return;\n        }\n\n        param1.clearToTargetValue();\n        param2.clearToTargetValue();\n        paramFirstRun = true;\n\n        // save extra info\n        newmodel->input_skip = input_skip != 0;\n        newmodel->input_gain = input_gain;\n        newmodel->output_gain = output_gain;\n\n        // Pre-buffer to avoid \"clicks\" during initialization\n        float out[2048] = {};\n        applyModel(newmodel.get(), out, ARRAY_SIZE(out), param1, param2);\n\n        // swap active model\n        DynamicModel* const oldmodel = model;\n        model = newmodel.release();\n\n        // if processing, wait for process cycle to complete\n        while (oldmodel != nullptr && activeModel.load())\n            d_msleep(1);\n\n        // report model in dim\n        parameters[kParameterModelInputSize] = input_size;\n\n        delete oldmodel;\n    }\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Cabinet loader */\n\n    void loadDefaultCabinet()\n    {\n        using namespace Files;\n\n        uint channels;\n        uint sampleRate;\n        drwav_uint64 numFrames;\n        float* const ir = drwav_open_memory_and_read_pcm_frames_f32(V30_P2_audix_i5_deerinkstudiosData,\n                                                                    V30_P2_audix_i5_deerinkstudiosDataSize,\n                                                                    &channels,\n                                                                    &sampleRate,\n                                                                    &numFrames,\n                                                                    nullptr);\n        DISTRHO_SAFE_ASSERT_RETURN(ir != nullptr,);\n        DISTRHO_SAFE_ASSERT_RETURN(channels == 1,);\n\n        loadCabinet(channels, sampleRate, numFrames, ir);\n    }\n\n    void loadCabinetFromFile(const char* const filename)\n    {\n        uint channels;\n        uint sampleRate;\n        drwav_uint64 numFrames;\n        const size_t valuelen = std::strlen(filename);\n\n        float* ir;\n        if (::strncasecmp(filename + std::max(0, static_cast<int>(valuelen) - 5), \".flac\", 5) == 0)\n            ir = drflac_open_file_and_read_pcm_frames_f32(filename, &channels, &sampleRate, &numFrames, nullptr);\n        else\n            ir = drwav_open_file_and_read_pcm_frames_f32(filename, &channels, &sampleRate, &numFrames, nullptr);\n        DISTRHO_SAFE_ASSERT_RETURN(ir != nullptr,);\n\n        loadCabinet(channels, sampleRate, numFrames, ir);\n\n        cabsimFilename = filename;\n    }\n\n    void loadCabinet(const uint channels, const uint sampleRate, drwav_uint64 numFrames, float* const ir)\n    {\n        if (channels > 1)\n        {\n            for (drwav_uint64 i=0, j=0; j<numFrames; ++i, j+=channels)\n                ir[i] = ir[j];\n            numFrames /= channels;\n        }\n\n        d_stdout(\"Loading cabinet with %u channels, %u Hz sample rate and %lu frames\",\n                 channels, sampleRate, (ulong)numFrames);\n\n        const double hostSampleRate = getSampleRate();\n        float* irBuf = ir;\n\n        if (sampleRate != hostSampleRate)\n        {\n            r8b::CDSPResampler16IR resampler(sampleRate, hostSampleRate, numFrames);\n            const int numResampledFrames = resampler.getMaxOutLen(0);\n            DISTRHO_SAFE_ASSERT_RETURN(numResampledFrames > 0,);\n\n            d_stdout(\"Resampling to %f Hz sample rate and %d frames\",\n                     hostSampleRate, numResampledFrames);\n\n            float* const irBufResampled = new float[numResampledFrames];\n            resampler.oneshot(ir, numFrames, irBufResampled, numResampledFrames);\n            irBuf = irBufResampled;\n\n            numFrames = numResampledFrames;\n        }\n\n        TwoStageThreadedConvolver* const newConvolver = new TwoStageThreadedConvolver();\n        newConvolver->init(irBuf, numFrames);\n\n        if (irBuf != ir)\n            delete[] irBuf;\n\n        drwav_free(ir, nullptr);\n\n        // swap active cabsim\n        TwoStageThreadedConvolver* const oldcabsim = cabsim;\n        cabsim = newConvolver;\n\n        // if processing, wait for process cycle to complete\n        while (oldcabsim != nullptr && activeConvolver.load())\n            d_msleep(1);\n\n        delete oldcabsim;\n    }\n\n   #if AIDAX_WITH_AUDIOFILE\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Audio file loader */\n\npublic:\n    void loadAudioFile(const char* const filename)\n    {\n        d_stdout(\"Loading filename %s\", filename);\n\n        uint channels;\n        uint sampleRate;\n        drwav_uint64 numFrames;\n        float* data;\n        if (::strncasecmp(filename + std::max(0, static_cast<int>(std::strlen(filename)) - 5), \".flac\", 5) == 0)\n            data = drflac_open_file_and_read_pcm_frames_f32(filename, &channels, &sampleRate, &numFrames, nullptr);\n        else\n            data = drwav_open_file_and_read_pcm_frames_f32(filename, &channels, &sampleRate, &numFrames, nullptr);\n        DISTRHO_SAFE_ASSERT_RETURN(data != nullptr,);\n\n        // use left channel if not mono\n        if (channels > 1)\n        {\n            for (drwav_uint64 i=0, j=0; j<numFrames; ++i, j+=channels)\n                data[i] = data[j];\n            numFrames /= channels;\n        }\n\n        const double hostSampleRate = getSampleRate();\n\n        float* dataResampled;\n        if (sampleRate != hostSampleRate)\n        {\n            r8b::CDSPResampler24 resampler(sampleRate, hostSampleRate, numFrames);\n            const int numResampledFrames = resampler.getMaxOutLen(0);\n            DISTRHO_SAFE_ASSERT_RETURN(numResampledFrames > 0,);\n\n            dataResampled = new float[numResampledFrames];\n            resampler.oneshot(data, numFrames, dataResampled, numResampledFrames);\n\n            numFrames = numResampledFrames;\n        }\n        else\n        {\n            dataResampled = data;\n        }\n\n        if (dataResampled != data)\n            drwav_free(data, nullptr);\n\n        // swap active cabsim\n        AudioFile* const newaudiofile = new AudioFile(dataResampled, numFrames, dataResampled != data);\n        AudioFile* const oldaudiofile = audiofile;\n        audiofile = newaudiofile;\n\n        // if processing, wait for process cycle to complete\n        while (oldaudiofile != nullptr && activeAudiofile.load())\n            d_msleep(1);\n\n        delete oldaudiofile;\n    }\n\nprotected:\n   #endif\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Process */\n\n   /**\n      Activate this plugin.\n    */\n    void activate() override\n    {\n        aida.inlevel.clearToTargetValue();\n        aida.outlevel.clearToTargetValue();\n        bypassGain.clearToTargetValue();\n        cabsimGain.clearToTargetValue();\n        resetMeters.store(true);\n\n        if (model != nullptr)\n        {\n            // Pre-buffer to avoid \"clicks\" during initialization\n            float out[2048] = {};\n\n            activeModel.store(true);\n\n            std::visit (\n                [] (auto&& custom_model)\n                {\n                    using ModelType = std::decay_t<decltype (custom_model)>;\n                    if constexpr (! std::is_same_v<ModelType, NullModel>)\n                    {\n                        custom_model.reset();\n                    }\n                },\n                model->variant);\n\n            param1.clearToTargetValue();\n            param2.clearToTargetValue();\n            paramFirstRun = true;\n\n            applyModel(model, out, ARRAY_SIZE(out), param1, param2);\n\n            activeModel.store(false);\n        }\n    }\n\n   /**\n      Run/process function for plugins without MIDI input.\n    */\n    void run(const float** inputs, float** outputs, uint32_t numSamples) override\n    {\n       #if DISTRHO_PLUGIN_NUM_INPUTS != 0\n        const float* const in = inputs[0];\n       #endif\n        /* */ float* const out = outputs[0];\n\n        // optimize for non-denormal usage\n        const ScopedDenormalDisable sdd;\n        for (uint32_t i = 0; i < numSamples; ++i)\n        {\n           #if DISTRHO_PLUGIN_NUM_INPUTS != 0\n            if (!std::isfinite(in[i]))\n                __builtin_unreachable();\n           #endif\n            if (!std::isfinite(out[i]))\n                __builtin_unreachable();\n        }\n\n       #if AIDAX_WITH_AUDIOFILE\n        if (audiofile != nullptr)\n        {\n            activeAudiofile.store(true);\n            const uint32_t numPartialSamples = std::min((uint32_t)(audiofile->numFrames - audiofile->currentFrame), numSamples);\n            std::memcpy(bypassInplaceBuffer, audiofile->buffer + audiofile->currentFrame, sizeof(float) * numPartialSamples);\n\n            if (numSamples != numPartialSamples)\n            {\n                const uint32_t extraSamples = numSamples - numPartialSamples;\n                std::memcpy(bypassInplaceBuffer, audiofile->buffer, sizeof(float) * extraSamples);\n                audiofile->currentFrame = extraSamples;\n            }\n            else\n            {\n                audiofile->currentFrame += numSamples;\n            }\n            activeAudiofile.store(false);\n        }\n        else\n       #endif\n        {\n           #if DISTRHO_PLUGIN_NUM_INPUTS != 0\n            // Copy input for bypass buffer\n            std::memcpy(bypassInplaceBuffer, in, sizeof(float)*numSamples);\n           #else\n            std::memset(bypassInplaceBuffer, 0, sizeof(float)*numSamples);\n           #endif\n        }\n\n        // peak meters\n        float meterIn, meterOut;\n\n        if (resetMeters.exchange(false))\n        {\n            meterIn = meterOut = tmpMeterIn = tmpMeterOut = DB_CO(kMinimumMeterDb);\n            tmpMeterFrames = 0;\n        }\n        else\n        {\n            meterIn = tmpMeterIn;\n            meterOut = tmpMeterOut;\n            tmpMeterFrames += numSamples;\n        }\n\n        for (uint32_t i = 0; i < numSamples; ++i)\n            meterIn = std::max(meterIn, std::abs(bypassInplaceBuffer[i]));\n\n       #ifdef MOD_BUILD\n        // Special handling for MOD web version: stop further audio processing on bypass\n        if (bypassGain.peek() < 0.001f)\n        {\n            bypassGain.clearToTargetValue();\n            goto the_end;\n        }\n       #endif\n\n        // High frequencies roll-off (lowpass)\n        if (enabledLPF)\n            applyBiquadFilter(aida.in_lpf, out, bypassInplaceBuffer, numSamples);\n        else\n            std::memcpy(out, bypassInplaceBuffer, sizeof(float)*numSamples);\n\n        // Pre-gain\n        applyGainRamp(aida.inlevel, out, numSamples);\n\n        // Equalizer section\n        if (!aida.eq_bypass && aida.eq_pos == kEqPre)\n            applyToneControls(aida, out, numSamples);\n\n        if (!aida.net_bypass && model != nullptr)\n        {\n            activeModel.store(true);\n\n            if (paramFirstRun)\n            {\n                paramFirstRun = false;\n                param1.clearToTargetValue();\n                param2.clearToTargetValue();\n            }\n\n            applyModel(model, out, numSamples, param1, param2);\n            activeModel.store(false);\n        }\n\n        // DC blocker filter (highpass)\n        if (enabledDC)\n            applyBiquadFilter(aida.dc_blocker, out, numSamples);\n\n        // Cabinet convolution\n        if (cabsim != nullptr)\n        {\n            std::memcpy(cabsimInplaceBuffer, out, sizeof(float)*numSamples);\n\n            activeConvolver.store(true);\n            cabsim->process(cabsimInplaceBuffer, out, numSamples);\n            activeConvolver.store(false);\n\n            // cabsim smooth bypass and -12dB compensation\n            for (uint32_t i = 0; i < numSamples; ++i)\n            {\n                const float b = cabsimGain.next();\n                out[i] = out[i] * b + cabsimInplaceBuffer[i] * ((kCabinetMaxGain - b) / kCabinetMaxGain);\n            }\n        }\n\n        // Equalizer section\n        if (!aida.eq_bypass && aida.eq_pos == kEqPost)\n            applyToneControls(aida, out, numSamples);\n\n        // Output volume\n        applyGainRamp(aida.outlevel, out, numSamples);\n\n        // Bypass and output meter\n        for (uint32_t i = 0; i < numSamples; ++i)\n        {\n           #ifndef MOD_BUILD\n            const float b = bypassGain.next();\n            out[i] = out[i] * b + bypassInplaceBuffer[i] * (1.f - b);\n           #else\n            out[i] *= bypassGain.next();\n           #endif\n            meterOut = std::max(meterOut, std::abs(out[i]));\n        }\n\n#ifdef MOD_BUILD\nthe_end:\n#endif\n        if (tmpMeterFrames >= meterMaxFrameCount)\n        {\n            parameters[kParameterMeterIn] = tmpMeterIn = meterIn;\n            parameters[kParameterMeterOut] = tmpMeterOut = meterOut;\n            tmpMeterFrames -= meterMaxFrameCount;\n        }\n        else\n        {\n            tmpMeterIn = meterIn;\n            tmpMeterOut = meterOut;\n        }\n\n        if (isStereoAU || DISTRHO_PLUGIN_NUM_OUTPUTS == 2)\n            std::memcpy(outputs[1], out, sizeof(float)*numSamples);\n    }\n\n    void bufferSizeChanged(const uint newBufferSize) override\n    {\n        delete[] bypassInplaceBuffer;\n        delete[] cabsimInplaceBuffer;\n        bypassInplaceBuffer = new float[newBufferSize];\n        cabsimInplaceBuffer = new float[newBufferSize];\n    }\n\n   /**\n      Optional callback to inform the plugin about a sample rate change.@n\n      This function will only be called when the plugin is deactivated.\n    */\n    void sampleRateChanged(const double newSampleRate) override\n    {\n        aida.setSampleRate(parameters, newSampleRate);\n\n        bypassGain.setSampleRate(newSampleRate);\n        cabsimGain.setSampleRate(newSampleRate);\n        param1.setSampleRate(newSampleRate);\n        param2.setSampleRate(newSampleRate);\n        paramFirstRun = true;\n\n        meterMaxFrameCount = newSampleRate * 0.016666; // max 60fps\n\n        // reload cabsim file\n        if (char* const filename = cabsimFilename.getAndReleaseBuffer())\n        {\n            setState(\"cabinet\", filename);\n            std::free(filename);\n        }\n        else\n        {\n            loadDefaultCabinet();\n        }\n    }\n\n    void ioChanged(const uint16_t numInputs, const uint16_t numOutputs) override\n    {\n        isStereoAU = numInputs == 2 && numOutputs == 2;\n    }\n\n    // ----------------------------------------------------------------------------------------------------------------\n\n   /**\n      Set our plugin class as non-copyable and add a leak detector just in case.\n    */\n    DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaDSPLoaderPlugin)\n};\n\n/* --------------------------------------------------------------------------------------------------------------------\n * Global instance for wasm. */\n\n#ifdef DISTRHO_OS_WASM\nstatic AidaDSPLoaderPlugin* gPlugin = nullptr;\n#endif\n\n/* --------------------------------------------------------------------------------------------------------------------\n * Plugin entry point, called by DPF to create a new plugin instance. */\n\nPlugin* createPlugin()\n{\n    AidaDSPLoaderPlugin* const plugin = new AidaDSPLoaderPlugin();\n   #ifdef DISTRHO_OS_WASM\n    gPlugin = plugin;\n   #endif\n    return plugin;\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n\nEND_NAMESPACE_DISTRHO\n\n// --------------------------------------------------------------------------------------------------------------------\n\n#ifdef DISTRHO_OS_WASM\n#include <emscripten.h>\nextern \"C\" EMSCRIPTEN_KEEPALIVE\nvoid load_file(const char* const filename)\n{\n    DISTRHO_SAFE_ASSERT_RETURN(gPlugin != nullptr,);\n    gPlugin->loadAudioFile(filename);\n}\n#endif\n"
  },
  {
    "path": "src/aidadsp-ui.cpp",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#include \"DistrhoUI.hpp\"\n#include \"DistrhoPluginCommon.hpp\"\n#include \"DistrhoPluginUtils.hpp\"\n#include \"DistrhoStandaloneUtils.hpp\"\n\n#include \"Graphics.hpp\"\n#include \"Layout.hpp\"\n#include \"Widgets.hpp\"\n\n#if AIDAX_WITH_STANDALONE_CONTROLS\n# include \"Blendish.hpp\"\n#endif\n\nSTART_NAMESPACE_DISTRHO\n\n// --------------------------------------------------------------------------------------------------------------------\n\nenum ButtonIds {\n    kButtonLoadModel = 1001,\n    kButtonLoadCabinet,\n   #if AIDAX_WITH_STANDALONE_CONTROLS\n    kButtonEnableMicInput,\n   #endif\n};\n\nenum EnableInputState {\n    kEnableInputUnsupported,\n    kEnableInputSupported,\n    kEnableInputEnabled,\n    kEnableInputJACK\n};\n\nclass AidaDSPLoaderUI : public UI,\n                        public ButtonEventHandler::Callback,\n                        public KnobEventHandler::Callback\n                     #if AIDAX_WITH_STANDALONE_CONTROLS\n                      , public BlendishComboBox::Callback\n                      , public BlendishToolButton::Callback\n                     #endif\n{\n    float parameters[kNumParameters];\n\n    struct {\n        NanoImage aida;\n        NanoImage ax;\n        NanoImage background;\n        NanoImage knob;\n        NanoImage scale;\n    } images;\n\n    struct {\n        NanoImage amp;\n        NanoImage ampOn;\n        NanoImage cab;\n        NanoImage cabOn;\n    } icons;\n\n    struct {\n        ScopedPointer<AidaKnob> inlevel;\n        ScopedPointer<AidaKnob> bass;\n        ScopedPointer<AidaKnob> middle;\n        ScopedPointer<AidaKnob> treble;\n        ScopedPointer<AidaKnob> depth;\n        ScopedPointer<AidaKnob> presence;\n        ScopedPointer<AidaKnob> outlevel;\n    } knobs;\n\n    struct {\n        ScopedPointer<AidaPluginSwitch> bypass;\n        ScopedPointer<AidaPluginSwitch> eqpos;\n        ScopedPointer<AidaPluginSwitch> midtype;\n    } switches;\n\n    struct {\n        ScopedPointer<AidaSplitter> s1, s2, s3;\n    } splitters;\n    \n    struct {\n        ScopedPointer<AidaFilenameButton> model;\n        ScopedPointer<AidaFilenameButton> cabsim;\n    } loaders;\n\n    struct {\n        ScopedPointer<AidaMeter> in;\n        ScopedPointer<AidaMeter> out;\n        bool resetOnNextIdle = false;\n    } meters;\n\n   #if AIDAX_WITH_STANDALONE_CONTROLS\n    EnableInputState enableInputState = kEnableInputUnsupported;\n    ScopedPointer<BlendishSubWidgetSharedContext> blendishParent;\n    ScopedPointer<BlendishToolButton> enableInputButton;\n    ScopedPointer<BlendishComboBox> bufferSizeComboBox;\n   #endif\n\n    HorizontalLayout subwidgetsLayout;\n\n    enum {\n        kFileLoaderNull,\n        kFileLoaderModel,\n        kFileLoaderImpulse,\n    } fileLoaderMode = kFileLoaderNull;\n\n   #ifndef MOD_BUILD\n    String aboutLabel;\n   #endif\n    String lastDirModel;\n    String lastDirCabinet;\n\npublic:\n    /* constructor */\n    AidaDSPLoaderUI()\n        : UI(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT)\n    {\n        // Initialize parameters to their defaults\n        for (uint i=0; i<kNumParameters; ++i)\n            parameters[i] = kParameters[i].ranges.def;\n\n        // Load resources\n        using namespace Graphics;\n        images.aida = createImageFromMemory(aidaData, aidaDataSize, IMAGE_GENERATE_MIPMAPS);\n        images.ax = createImageFromMemory(axData, axDataSize, IMAGE_GENERATE_MIPMAPS);\n       #ifdef DGL_USE_GLES\n        images.background = createImageFromMemory(background_p2Data, background_p2DataSize, IMAGE_REPEAT_X|IMAGE_REPEAT_Y);\n       #else\n        images.background = createImageFromMemory(backgroundData, backgroundDataSize, IMAGE_REPEAT_X|IMAGE_REPEAT_Y);\n       #endif\n        images.knob = createImageFromMemory(knobData, knobDataSize, IMAGE_GENERATE_MIPMAPS);\n        images.scale = createImageFromMemory(scaleData, scaleDataSize, IMAGE_GENERATE_MIPMAPS);\n\n        icons.amp = createImageFromMemory(ax_ampData, ax_ampDataSize, IMAGE_GENERATE_MIPMAPS);\n        icons.ampOn = createImageFromMemory(ax_amp_onData, ax_amp_onDataSize, IMAGE_GENERATE_MIPMAPS);\n        icons.cab = createImageFromMemory(ax_cabData, ax_cabDataSize, IMAGE_GENERATE_MIPMAPS);\n        icons.cabOn = createImageFromMemory(ax_cab_onData, ax_cab_onDataSize, IMAGE_GENERATE_MIPMAPS);\n\n        // fontFaceId(createFontFromMemory(\"conthrax\", conthrax_sbData, conthrax_sbDataSize, false));\n        loadSharedResources();\n\n        // Create subwidgets\n        knobs.inlevel = new AidaKnob(this, this, images.knob, images.scale, kParameterINLEVEL);\n        knobs.bass = new AidaKnob(this, this, images.knob, images.scale, kParameterBASSGAIN);\n        knobs.middle = new AidaKnob(this, this, images.knob, images.scale, kParameterMIDGAIN);\n        knobs.treble = new AidaKnob(this, this, images.knob, images.scale, kParameterTREBLEGAIN);\n        knobs.depth = new AidaKnob(this, this, images.knob, images.scale, kParameterDEPTH);\n        knobs.presence = new AidaKnob(this, this, images.knob, images.scale, kParameterPRESENCE);\n        knobs.outlevel = new AidaKnob(this, this, images.knob, images.scale, kParameterOUTLEVEL);\n\n        switches.bypass = new AidaPluginSwitch(this, this, kParameterGLOBALBYPASS);\n        switches.eqpos = new AidaPluginSwitch(this, this, kParameterEQPOS);\n        switches.midtype = new AidaPluginSwitch(this, this, kParameterMTYPE);\n\n        splitters.s1 = new AidaSplitter(this);\n        splitters.s2 = new AidaSplitter(this);\n        splitters.s3 = new AidaSplitter(this);\n\n        loaders.model = new AidaFilenameButton(this, this, kParameterNETBYPASS, kButtonLoadModel, \"model\", icons.amp, icons.ampOn);\n        loaders.model->setFilename(kDefaultModelName);\n\n        loaders.cabsim = new AidaFilenameButton(this, this, kParameterCABSIMBYPASS, kButtonLoadCabinet, \"cabinet IR\", icons.cab, icons.cabOn);\n        loaders.cabsim->setFilename(kDefaultCabinetName);\n\n        meters.in = new AidaMeter(this, \"INPUT\");\n        meters.out = new AidaMeter(this, \"OUTPUT\");\n\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        if (isUsingNativeAudio())\n        {\n            if (supportsAudioInput())\n            {\n                blendishParent = new BlendishSubWidgetSharedContext(this);\n                blendishParent->setSize(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT);\n\n                enableInputButton = new BlendishToolButton(blendishParent);\n                enableInputButton->setCallback(this);\n                enableInputButton->setId(kButtonEnableMicInput);\n                enableInputButton->setLabel(\"Enable Audio Input\");\n                enableInputState = kEnableInputSupported;\n\n                if (supportsBufferSizeChanges())\n                {\n                    bufferSizeComboBox = new BlendishComboBox(blendishParent);\n                    bufferSizeComboBox->setCallback(this);\n                    bufferSizeComboBox->setDefaultLabel(\"Buffer Size: \" + String(getBufferSize()));\n                    bufferSizeComboBox->addMenuItem(\"64\");\n                    bufferSizeComboBox->addMenuItem(\"128\");\n                    bufferSizeComboBox->addMenuItem(\"256\");\n                    bufferSizeComboBox->addMenuItem(\"512\");\n                    bufferSizeComboBox->addMenuItem(\"1024\");\n\n                    // todo advanced settings page\n                    bufferSizeComboBox->hide();\n                }\n            }\n        }\n        else\n        {\n            enableInputState = kEnableInputJACK;\n        }\n       #endif\n\n        // Setup subwidgets layout\n        subwidgetsLayout.widgets.push_back({ switches.bypass, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.inlevel, Fixed });\n        subwidgetsLayout.widgets.push_back({ splitters.s1, Fixed });\n        subwidgetsLayout.widgets.push_back({ switches.eqpos, Fixed });\n        subwidgetsLayout.widgets.push_back({ switches.midtype, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.bass, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.middle, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.treble, Fixed });\n        subwidgetsLayout.widgets.push_back({ splitters.s2, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.depth, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.presence, Fixed });\n        subwidgetsLayout.widgets.push_back({ splitters.s3, Fixed });\n        subwidgetsLayout.widgets.push_back({ knobs.outlevel, Fixed });\n\n        repositionWidgets();\n\n        // give event priority to knob dragging\n        knobs.inlevel->toFront();\n        knobs.bass->toFront();\n        knobs.middle->toFront();\n        knobs.treble->toFront();\n        knobs.depth->toFront();\n        knobs.presence->toFront();\n        knobs.outlevel->toFront();\n\n        // adjust size\n        const double scaleFactor = getScaleFactor();\n        setGeometryConstraints(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor,\n                               DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor);\n\n        if (scaleFactor != 1.0)\n            setSize(DISTRHO_UI_DEFAULT_WIDTH*scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT*scaleFactor);\n\n     #ifndef MOD_BUILD\n        aboutLabel = \"AIDA-X \";\n       #ifndef DISTRHO_OS_WASM\n        aboutLabel += getPluginFormatName();\n        aboutLabel += \" \";\n       #endif\n        aboutLabel += kVersionString;\n       #ifdef NOSIMD\n        aboutLabel += \" (no simd)\";\n       #endif\n     #endif\n    }\n\nprotected:\n   /* -----------------------------------------------------------------------------------------------------------------\n    * DSP/Plugin Callbacks */\n\n   /**\n      A parameter has changed on the plugin side.\n      This is called by the host to inform the UI about parameter changes.\n    */\n    void parameterChanged(const uint32_t index, const float value) override\n    {\n        parameters[index] = value;\n\n        switch (static_cast<Parameters>(index))\n        {\n        case kParameterINLPF:\n            // TODO\n            break;\n        case kParameterINLEVEL:\n            knobs.inlevel->setValue(value, false);\n            break;\n        case kParameterNETBYPASS:\n            loaders.model->setChecked(value < 0.5f);\n            break;\n        case kParameterEQBYPASS:\n            // TODO\n            break;\n        case kParameterEQPOS:\n            switches.eqpos->setChecked(value > 0.5f, false);\n            break;\n        case kParameterBASSGAIN:\n            knobs.bass->setValue(value, false);\n            break;\n        case kParameterMIDGAIN:\n            knobs.middle->setValue(value, false);\n            break;\n        case kParameterMTYPE:\n            switches.midtype->setChecked(value > 0.5f, false);\n            break;\n        case kParameterTREBLEGAIN:\n            knobs.treble->setValue(value, false);\n            break;\n        case kParameterDEPTH:\n            knobs.depth->setValue(value, false);\n            break;\n        case kParameterPRESENCE:\n            knobs.presence->setValue(value, false);\n            break;\n        case kParameterOUTLEVEL:\n            knobs.outlevel->setValue(value, false);\n            break;\n        case kParameterCABSIMBYPASS:\n            loaders.cabsim->setChecked(value < 0.5f);\n            break;\n        case kParameterGLOBALBYPASS:\n            switches.bypass->setChecked(value < 0.5f, false);\n            break;\n        case kParameterModelInputSize:\n            // TODO\n            break;\n        case kParameterMeterIn:\n            meters.in->setValue(value);\n            meters.resetOnNextIdle = true;\n            break;\n        case kParameterMeterOut:\n            meters.out->setValue(value);\n            meters.resetOnNextIdle = true;\n            break;\n        case kParameterBASSFREQ:\n        case kParameterMIDFREQ:\n        case kParameterMIDQ:\n        case kParameterTREBLEFREQ:\n        case kParameterPARAM1:\n        case kParameterPARAM2:\n        case kParameterDCBLOCKER:\n        case kParameterCount:\n            break;\n        }\n    }\n\n    void stateChanged(const char* const key, const char* const value) override\n    {\n        const bool isDefault = value == nullptr || value[0] == '\\0' || std::strcmp(value, \"default\") == 0;\n\n        if (std::strcmp(key, \"json\") == 0)\n            return loaders.model->setFilename(isDefault ? kDefaultModelName : value);\n        if (std::strcmp(key, \"cabinet\") == 0)\n            return loaders.cabsim->setFilename(isDefault ? kDefaultCabinetName : value);\n    }\n\n   /* -----------------------------------------------------------------------------------------------------------------\n    * Widget Callbacks */\n\n    void onNanoDisplay() override\n    {\n        const uint width = getWidth();\n        const uint height = getHeight();\n        const double scaleFactor = getScaleFactor();\n\n        const double cornerRadius = 12 * scaleFactor;\n        const double marginHead = 12 * scaleFactor;\n        const double widthPedal = kPedalWidth * scaleFactor;\n        const double heightPedal = kPedalHeight * scaleFactor;\n        const double widthHead = widthPedal - marginHead * 2;\n        const double heightHead = 177 * scaleFactor;\n        const double marginHorizontal = kPedalMargin * scaleFactor + (getWidth() - DISTRHO_UI_DEFAULT_WIDTH * scaleFactor) / 2;\n        const double marginVertical = kPedalMarginTop * scaleFactor;\n\n        const Size<uint> headBgSize(images.background.getSize() / 2 * scaleFactor);\n\n       #ifndef MOD_BUILD\n        // outer bounds gradient\n        beginPath();\n        rect(0, 0, width, height);\n        fillPaint(linearGradient(0, 0, 0, height,\n                                 Color(0xcd, 0xff, 0x05).minus(50).invert(),\n                                 Color(0x8b, 0xf7, 0x00).minus(50).invert()));\n        fill();\n\n        // outer bounds inner shadow matching host color, if provided\n        Color bgColor;\n        if (const uint hostBgColor = getBackgroundColor())\n        {\n            const int red   = (hostBgColor >> 24) & 0xff;\n            const int green = (hostBgColor >> 16) & 0xff;\n            const int blue  = (hostBgColor >>  8) & 0xff;\n            bgColor = Color(red, green, blue);\n        }\n        else\n        {\n            bgColor = Color(0,0,0);\n        }\n\n        fillPaint(boxGradient(scaleFactor, scaleFactor, width-scaleFactor*2, height-scaleFactor*2,\n                              cornerRadius/2, cornerRadius/4, bgColor.withAlpha(0.f), bgColor));\n        fill();\n\n        // outer bounds pattern\n        fillPaint(imagePattern(0,\n                               0,\n                               headBgSize.getWidth(),\n                               headBgSize.getHeight(),\n                               0.f, images.background, 1.f));\n        fill();\n\n        // box shadow\n        beginPath();\n        rect(marginHorizontal/2, marginVertical/2, marginHorizontal+widthPedal, marginVertical+heightPedal);\n        fillPaint(boxGradient(marginHorizontal, marginVertical, widthPedal, heightPedal, cornerRadius, cornerRadius, Color(0,0,0,1.f), Color(0,0,0,0.f)));\n        fill();\n       #endif\n\n        // .rt-neural .grid\n        beginPath();\n        roundedRect(marginHorizontal, marginVertical, widthPedal, heightPedal, cornerRadius);\n        fillPaint(linearGradient(marginHorizontal, 0,\n                                 marginHorizontal + widthPedal * 0.52f, 0,\n                                 Color(28, 23, 12),\n                                 Color(42, 34, 15)));\n        fill();\n\n        fillPaint(linearGradient(marginHorizontal + widthPedal * 0.50f, 0,\n                                 marginHorizontal + widthPedal, 0,\n                                 Color(42, 34, 15),\n                                 Color(19, 19, 19)));\n        fill();\n\n        // extra\n        strokeColor(Color(150, 150, 150, 0.25f));\n        stroke();\n\n        // .rt-neural .background_head\n        beginPath();\n        roundedRect(marginHorizontal + marginHead,\n                    marginVertical + marginHead,\n                    widthHead,\n                    heightHead,\n                    cornerRadius);\n        fillPaint(linearGradient(marginHorizontal + marginHead,\n                                 marginVertical + marginHead,\n                                 marginHorizontal + marginHead,\n                                 marginVertical + heightHead,\n                                 Color(0x8b, 0xf7, 0x00),\n                                 Color(0xcd, 0xff, 0x05)));\n        fill();\n\n        fillPaint(imagePattern(marginHorizontal + marginHead,\n                               marginVertical + marginHead,\n                               headBgSize.getWidth(),\n                               headBgSize.getHeight(),\n                               0.f, images.background, 1.f));\n        fill();\n\n        fillPaint(boxGradient(marginHorizontal + marginHead,\n                              marginVertical + marginHead,\n                              widthHead,\n                              heightHead,\n                              cornerRadius,\n                              12 * scaleFactor,\n                              Color(0, 0, 0, 0.f), Color(0, 0, 0)));\n        fill();\n\n        // .rt-neural .brand\n        const Size<uint> aidaLogoSize(111 * scaleFactor, 25 * scaleFactor);\n\n        save();\n        translate(marginHorizontal + marginHead * 2, marginVertical + headBgSize.getHeight());\n        beginPath();\n        rect(0, 0, aidaLogoSize.getWidth(), aidaLogoSize.getHeight());\n        fillPaint(imagePattern(0, 0, aidaLogoSize.getWidth(), aidaLogoSize.getHeight(), 0.f, images.aida, 1.f));\n        fill();\n        restore();\n\n        // .rt-neural .plate\n        const Size<uint> axLogoSize(100 * scaleFactor * 1548 / 727,\n                                    100 * scaleFactor);\n\n        save();\n        translate(marginHorizontal + widthPedal/2 - axLogoSize.getWidth()/2, marginVertical + marginHead + headBgSize.getHeight() / 6);\n        beginPath();\n        rect(0, 0, axLogoSize.getWidth(), axLogoSize.getHeight());\n        fillPaint(imagePattern(0, 0, axLogoSize.getWidth(), axLogoSize.getHeight(), 0.f, images.ax, 1.f));\n        fill();\n        restore();\n\n        fillColor(Color(0x0c, 0x2f, 0x03, 0.686f));\n        fontSize(24 * scaleFactor);\n        textAlign(ALIGN_CENTER | ALIGN_BASELINE);\n        text(marginHorizontal + widthPedal/2, marginVertical + heightHead - marginHead, \"AI CRAFTED TONE\", nullptr);\n\n       #ifndef MOD_BUILD\n        fillColor(Color(1.f,1.f,1.f));\n        fontSize((kSubWidgetsFontSize + 2) * scaleFactor);\n        textAlign(ALIGN_RIGHT | ALIGN_MIDDLE);\n        text(marginHorizontal + widthPedal - 10 * scaleFactor, marginVertical/2, aboutLabel, nullptr);\n       #endif\n\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        textAlign(ALIGN_CENTER | ALIGN_MIDDLE);\n\n        const double micx = getWidth() / 2;\n        switch (enableInputState)\n        {\n        case kEnableInputUnsupported:\n            text(micx, marginVertical/2, \"Audio Input unsupported\", nullptr);\n            break;\n        case kEnableInputSupported:\n            // text(micx, marginVertical/2, \"Please enable Input...\", nullptr);\n            break;\n        case kEnableInputEnabled:\n            if (bufferSizeComboBox == nullptr)\n                text(micx, marginVertical/2, \"Audio Input enabled\", nullptr);\n            break;\n        case kEnableInputJACK:\n            // text(micx, marginVertical/2, \"Audio Input always enabled (using JACK)\", nullptr);\n            break;\n        }\n       #endif\n    }\n\n    void onResize(const ResizeEvent& event) override\n    {\n        UI::onResize(event);\n        repositionWidgets();\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        if (blendishParent != nullptr)\n            blendishParent->setSize(event.size);\n       #endif\n    }\n\n    void repositionWidgets()\n    {\n        const double scaleFactor = getScaleFactor();\n        const double widthPedal = kPedalWidth * scaleFactor;\n        const double heightPedal = kPedalHeight * scaleFactor;\n        const double marginHorizontal = kPedalMargin * scaleFactor + (getWidth() - DISTRHO_UI_DEFAULT_WIDTH * scaleFactor) / 2;\n        const double marginTop = kPedalMarginTop * scaleFactor;\n        const double heightHead = 177 * scaleFactor;\n        const double margin = 15 * scaleFactor;\n\n        const uint unusedSpace = widthPedal\n                               - (AidaKnob::kScaleSize * scaleFactor * 7)\n                               - (AidaPluginSwitch::kFullWidth  * scaleFactor * 3)\n                               - (AidaSplitter::kLineWidth * scaleFactor * 3);\n        const uint padding = unusedSpace / 14;\n        const uint maxHeight = subwidgetsLayout.setAbsolutePos(marginHorizontal + margin,\n                                                               marginTop + heightPedal - margin - kSubWidgetsFullHeight * scaleFactor,\n                                                               padding);\n        subwidgetsLayout.setSize(maxHeight, 0);\n\n        const double loadersX = marginHorizontal + widthPedal * 2 / 3;\n        const double loadersY = marginTop + heightPedal - heightHead;\n\n        loaders.model->setAbsolutePos(loadersX, loadersY - margin / 2 - loaders.cabsim->getHeight());\n        loaders.model->setWidth(widthPedal / 3 - margin * 2);\n\n        loaders.cabsim->setAbsolutePos(loadersX, loadersY);\n        loaders.cabsim->setWidth(widthPedal / 3 - margin * 2);\n\n       #ifndef MOD_BUILD\n        const double metersX = marginHorizontal + margin / 2;\n        const double metersY = marginTop / 2 - meters.in->getHeight() / 2;\n\n        meters.in->setAbsolutePos(metersX, metersY);\n        meters.out->setAbsolutePos(metersX + meters.in->getWidth() + margin / 2, metersY);\n       #else\n        const double metersX = marginHorizontal + margin * 3 / 2;\n        const double metersY = margin * 3 / 2;\n\n        meters.in->setAbsolutePos(metersX, metersY);\n        meters.out->setAbsolutePos(metersX, metersY + meters.in->getHeight() + margin / 4);\n       #endif\n\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        if (blendishParent != nullptr)\n        {\n            enableInputButton->setAbsolutePos(getWidth() / 2 - enableInputButton->getWidth()/2,\n                                              marginTop/2 - enableInputButton->getHeight()/2);\n            bufferSizeComboBox->setAbsolutePos(getWidth() / 2 - bufferSizeComboBox->getWidth()/2,\n                                               marginTop/2 - bufferSizeComboBox->getHeight()/2);\n        }\n       #endif\n    }\n\n    void buttonClicked(SubWidget* const widget, int) override\n    {\n        const uint id = widget->getId();\n\n        switch (id)\n        {\n        case kParameterEQPOS:\n        case kParameterMTYPE:\n            editParameter(id, true);\n            setParameterValue(id, static_cast<AidaPluginSwitch*>(widget)->isChecked() ? 1.f : 0.f);\n            editParameter(id, false);\n            break;\n        case kParameterCABSIMBYPASS:\n        case kParameterNETBYPASS:\n        case kParameterGLOBALBYPASS:\n            editParameter(id, true);\n            setParameterValue(id, static_cast<AidaPluginSwitch*>(widget)->isChecked() ? 0.f : 1.f);\n            editParameter(id, false);\n            break;\n        case kButtonLoadModel:\n            fileLoaderMode = kFileLoaderModel;\n            requestStateFile(\"json\", lastDirModel, \"Open AidaDSP model json\");\n            break;\n        case kButtonLoadCabinet:\n            fileLoaderMode = kFileLoaderImpulse;\n            requestStateFile(\"cabinet\", lastDirCabinet, \"Open Cabinet Simulator IR\");\n            break;\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        case kButtonEnableMicInput:\n            if (supportsAudioInput() && !isAudioInputEnabled())\n                requestAudioInput();\n            break;\n       #endif\n        }\n    }\n\n    void requestStateFile(const char* const stateKey, const String& lastDir, const char* const title)\n    {\n       #ifndef DISTRHO_OS_WASM\n        if (UI::requestStateFile(stateKey))\n            return;\n        d_stdout(\"File through host failed, doing it manually\");\n       #endif\n\n        DISTRHO_NAMESPACE::FileBrowserOptions opts;\n        opts.title = title;\n\n        if (lastDir.isNotEmpty())\n            opts.startDir = lastDir;\n\n        if (!openFileBrowser(opts))\n        {\n            d_stdout(\"Failed to open a file dialog!\");\n        }\n    }\n\n    void knobDragStarted(SubWidget* const widget) override\n    {\n        editParameter(widget->getId(), true);\n    }\n\n    void knobDragFinished(SubWidget* const widget) override\n    {\n        editParameter(widget->getId(), false);\n    }\n\n    void knobValueChanged(SubWidget* const widget, float value) override\n    {\n        setParameterValue(widget->getId(), value);\n    }\n\n    void knobDoubleClicked(SubWidget* const widget) override\n    {\n        static_cast<AidaKnob*>(widget)->setValue(kParameters[widget->getId()].ranges.def, true);\n    }\n\n   #if AIDAX_WITH_STANDALONE_CONTROLS\n    void blendishComboBoxIndexChanged(BlendishComboBox* const comboBox, int) override\n    {\n        const String label(comboBox->getCurrentLabel());\n        comboBox->setCurrentIndex(-1, false);\n\n        if (requestBufferSizeChange(std::atoi(label)))\n            bufferSizeComboBox->setDefaultLabel(\"Buffer Size: \" + label);\n\n        blendishParent->repaint();\n    }\n\n    void blendishToolButtonClicked(BlendishToolButton* const widget, int button) override\n    {\n        if (button != kMouseButtonLeft)\n            return;\n\n        if (widget->getId() == kButtonEnableMicInput)\n            if (supportsAudioInput() && !isAudioInputEnabled())\n                requestAudioInput();\n    }\n   #endif\n\n    void uiIdle() override\n    {\n        if (meters.resetOnNextIdle)\n        {\n            meters.resetOnNextIdle = false;\n            setState(\"reset-meters\", \"\");\n        }\n\n       #if AIDAX_WITH_STANDALONE_CONTROLS\n        if (enableInputButton != nullptr)\n        {\n            const EnableInputState newInputState = isAudioInputEnabled() ? kEnableInputEnabled : kEnableInputSupported;\n\n            if (enableInputState != newInputState)\n            {\n                enableInputState = newInputState;\n                repaint();\n\n                if (enableInputState == kEnableInputEnabled)\n                {\n                    enableInputButton->hide();\n\n                    // todo advanced settings page\n                    if (bufferSizeComboBox != nullptr)\n                        bufferSizeComboBox->show();\n                }\n            }\n        }\n       #endif\n    }\n\n   /**\n      Window file selected function, called when a path is selected by the user, as triggered by openFileBrowser().\n      This function is for plugin UIs to be able to override Window::onFileSelected(const char*).\n\n      This action happens after the user confirms the action, so the file browser dialog will be closed at this point.\n      The default implementation does nothing.\n    */\n    void uiFileBrowserSelected(const char* const filename) override\n    {\n        if (filename == nullptr)\n            return;\n\n        switch (fileLoaderMode)\n        {\n        case kFileLoaderNull:\n            break;\n        case kFileLoaderModel:\n            // notify DSP\n            setState(\"json\", filename);\n\n            // update UI\n            loaders.model->setFilename(filename);\n\n            // save dirname for next time\n            if (const char* const lastsep = std::strrchr(filename, DISTRHO_OS_SEP))\n            {\n                lastDirModel = filename;\n                lastDirModel.truncate(lastsep - filename);\n            }\n            break;\n        case kFileLoaderImpulse:\n            // notify DSP\n            setState(\"cabinet\", filename);\n\n            // update UI\n            loaders.cabsim->setFilename(filename);\n\n            // save dirname for next time\n            if (const char* const lastsep = std::strrchr(filename, DISTRHO_OS_SEP))\n            {\n                lastDirCabinet = filename;\n                lastDirCabinet.truncate(lastsep - filename);\n            }\n            break;\n        }\n\n        fileLoaderMode = kFileLoaderNull;\n    }\n\n    // ----------------------------------------------------------------------------------------------------------------\n\n   /**\n      Set our UI class as non-copyable and add a leak detector just in case.\n    */\n    DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AidaDSPLoaderUI)\n};\n\n/* --------------------------------------------------------------------------------------------------------------------\n * UI entry point, called by DPF to create a new UI instance. */\n\nUI* createUI()\n{\n    return new AidaDSPLoaderUI();\n}\n\n// --------------------------------------------------------------------------------------------------------------------\n\nEND_NAMESPACE_DISTRHO\n"
  },
  {
    "path": "src/model_variant.hpp",
    "content": "#include <variant>\n#include <RTNeural/RTNeural.h>\n\n#define MAX_INPUT_SIZE 3\nstruct NullModel { static constexpr int input_size = 0; static constexpr int output_size = 0; };\nusing ModelType_GRU_8_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_GRU_8_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_GRU_8_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_GRU_12_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_GRU_12_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_GRU_12_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_GRU_16_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_GRU_16_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_GRU_16_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_GRU_20_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_GRU_20_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_GRU_20_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_GRU_24_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_GRU_24_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_GRU_24_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_GRU_32_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_GRU_32_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_GRU_32_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_GRU_40_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_GRU_40_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_GRU_40_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_GRU_64_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_GRU_64_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_GRU_64_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_GRU_80_1 = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelType_GRU_80_2 = RTNeural::ModelT<float, 2, 1, RTNeural::GRULayerT<float, 2, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelType_GRU_80_3 = RTNeural::ModelT<float, 3, 1, RTNeural::GRULayerT<float, 3, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelType_LSTM_8_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_LSTM_8_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_LSTM_8_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 8>, RTNeural::DenseT<float, 8, 1>>;\nusing ModelType_LSTM_12_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_LSTM_12_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_LSTM_12_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 12>, RTNeural::DenseT<float, 12, 1>>;\nusing ModelType_LSTM_16_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_LSTM_16_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_LSTM_16_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 16>, RTNeural::DenseT<float, 16, 1>>;\nusing ModelType_LSTM_20_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_LSTM_20_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_LSTM_20_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 20>, RTNeural::DenseT<float, 20, 1>>;\nusing ModelType_LSTM_24_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_LSTM_24_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_LSTM_24_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 24>, RTNeural::DenseT<float, 24, 1>>;\nusing ModelType_LSTM_32_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_LSTM_32_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_LSTM_32_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 32>, RTNeural::DenseT<float, 32, 1>>;\nusing ModelType_LSTM_40_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_LSTM_40_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_LSTM_40_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 40>, RTNeural::DenseT<float, 40, 1>>;\nusing ModelType_LSTM_64_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_LSTM_64_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_LSTM_64_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 64>, RTNeural::DenseT<float, 64, 1>>;\nusing ModelType_LSTM_80_1 = RTNeural::ModelT<float, 1, 1, RTNeural::LSTMLayerT<float, 1, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelType_LSTM_80_2 = RTNeural::ModelT<float, 2, 1, RTNeural::LSTMLayerT<float, 2, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelType_LSTM_80_3 = RTNeural::ModelT<float, 3, 1, RTNeural::LSTMLayerT<float, 3, 80>, RTNeural::DenseT<float, 80, 1>>;\nusing ModelVariantType = std::variant<NullModel,ModelType_GRU_8_1,ModelType_GRU_8_2,ModelType_GRU_8_3,ModelType_GRU_12_1,ModelType_GRU_12_2,ModelType_GRU_12_3,ModelType_GRU_16_1,ModelType_GRU_16_2,ModelType_GRU_16_3,ModelType_GRU_20_1,ModelType_GRU_20_2,ModelType_GRU_20_3,ModelType_GRU_24_1,ModelType_GRU_24_2,ModelType_GRU_24_3,ModelType_GRU_32_1,ModelType_GRU_32_2,ModelType_GRU_32_3,ModelType_GRU_40_1,ModelType_GRU_40_2,ModelType_GRU_40_3,ModelType_GRU_64_1,ModelType_GRU_64_2,ModelType_GRU_64_3,ModelType_GRU_80_1,ModelType_GRU_80_2,ModelType_GRU_80_3,ModelType_LSTM_8_1,ModelType_LSTM_8_2,ModelType_LSTM_8_3,ModelType_LSTM_12_1,ModelType_LSTM_12_2,ModelType_LSTM_12_3,ModelType_LSTM_16_1,ModelType_LSTM_16_2,ModelType_LSTM_16_3,ModelType_LSTM_20_1,ModelType_LSTM_20_2,ModelType_LSTM_20_3,ModelType_LSTM_24_1,ModelType_LSTM_24_2,ModelType_LSTM_24_3,ModelType_LSTM_32_1,ModelType_LSTM_32_2,ModelType_LSTM_32_3,ModelType_LSTM_40_1,ModelType_LSTM_40_2,ModelType_LSTM_40_3,ModelType_LSTM_64_1,ModelType_LSTM_64_2,ModelType_LSTM_64_3,ModelType_LSTM_80_1,ModelType_LSTM_80_2,ModelType_LSTM_80_3>;\n\ninline bool is_model_type_ModelType_GRU_8_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_8_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_8_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_12_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_12_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_12_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_16_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_16_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_16_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_20_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_20_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_20_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_24_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_24_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_24_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_32_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_32_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_32_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_40_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_40_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_40_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_64_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_64_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_64_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_80_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_80_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_GRU_80_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"gru\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_8_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_8_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_8_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 8;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_12_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_12_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_12_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 12;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_16_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_16_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_16_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 16;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_20_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_20_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_20_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 20;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_24_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_24_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_24_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 24;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_32_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_32_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_32_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 32;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_40_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_40_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_40_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 40;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_64_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_64_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_64_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 64;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_80_1 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 1;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_80_2 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 2;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool is_model_type_ModelType_LSTM_80_3 (const nlohmann::json& model_json) {\n    const auto json_layers = model_json.at (\"layers\");\n    const auto rnn_layer_type = json_layers.at (0).at (\"type\").get<std::string>();\n    const auto is_layer_type_correct = rnn_layer_type == \"lstm\";\n    const auto hidden_size = json_layers.at (0).at (\"shape\").back().get<int>();\n    const auto is_hidden_size_correct = hidden_size == 80;\n    const auto input_size = model_json.at (\"in_shape\").back().get<int>();\n    const auto is_input_size_correct = input_size == 3;\n    return is_layer_type_correct && is_hidden_size_correct && is_input_size_correct;\n}\n\ninline bool custom_model_creator (const nlohmann::json& model_json, ModelVariantType& model) {\n    if (is_model_type_ModelType_GRU_8_1 (model_json)) {\n        model.emplace<ModelType_GRU_8_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_8_2 (model_json)) {\n        model.emplace<ModelType_GRU_8_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_8_3 (model_json)) {\n        model.emplace<ModelType_GRU_8_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_12_1 (model_json)) {\n        model.emplace<ModelType_GRU_12_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_12_2 (model_json)) {\n        model.emplace<ModelType_GRU_12_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_12_3 (model_json)) {\n        model.emplace<ModelType_GRU_12_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_16_1 (model_json)) {\n        model.emplace<ModelType_GRU_16_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_16_2 (model_json)) {\n        model.emplace<ModelType_GRU_16_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_16_3 (model_json)) {\n        model.emplace<ModelType_GRU_16_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_20_1 (model_json)) {\n        model.emplace<ModelType_GRU_20_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_20_2 (model_json)) {\n        model.emplace<ModelType_GRU_20_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_20_3 (model_json)) {\n        model.emplace<ModelType_GRU_20_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_24_1 (model_json)) {\n        model.emplace<ModelType_GRU_24_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_24_2 (model_json)) {\n        model.emplace<ModelType_GRU_24_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_24_3 (model_json)) {\n        model.emplace<ModelType_GRU_24_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_32_1 (model_json)) {\n        model.emplace<ModelType_GRU_32_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_32_2 (model_json)) {\n        model.emplace<ModelType_GRU_32_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_32_3 (model_json)) {\n        model.emplace<ModelType_GRU_32_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_40_1 (model_json)) {\n        model.emplace<ModelType_GRU_40_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_40_2 (model_json)) {\n        model.emplace<ModelType_GRU_40_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_40_3 (model_json)) {\n        model.emplace<ModelType_GRU_40_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_64_1 (model_json)) {\n        model.emplace<ModelType_GRU_64_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_64_2 (model_json)) {\n        model.emplace<ModelType_GRU_64_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_64_3 (model_json)) {\n        model.emplace<ModelType_GRU_64_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_80_1 (model_json)) {\n        model.emplace<ModelType_GRU_80_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_80_2 (model_json)) {\n        model.emplace<ModelType_GRU_80_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_GRU_80_3 (model_json)) {\n        model.emplace<ModelType_GRU_80_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_8_1 (model_json)) {\n        model.emplace<ModelType_LSTM_8_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_8_2 (model_json)) {\n        model.emplace<ModelType_LSTM_8_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_8_3 (model_json)) {\n        model.emplace<ModelType_LSTM_8_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_12_1 (model_json)) {\n        model.emplace<ModelType_LSTM_12_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_12_2 (model_json)) {\n        model.emplace<ModelType_LSTM_12_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_12_3 (model_json)) {\n        model.emplace<ModelType_LSTM_12_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_16_1 (model_json)) {\n        model.emplace<ModelType_LSTM_16_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_16_2 (model_json)) {\n        model.emplace<ModelType_LSTM_16_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_16_3 (model_json)) {\n        model.emplace<ModelType_LSTM_16_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_20_1 (model_json)) {\n        model.emplace<ModelType_LSTM_20_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_20_2 (model_json)) {\n        model.emplace<ModelType_LSTM_20_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_20_3 (model_json)) {\n        model.emplace<ModelType_LSTM_20_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_24_1 (model_json)) {\n        model.emplace<ModelType_LSTM_24_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_24_2 (model_json)) {\n        model.emplace<ModelType_LSTM_24_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_24_3 (model_json)) {\n        model.emplace<ModelType_LSTM_24_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_32_1 (model_json)) {\n        model.emplace<ModelType_LSTM_32_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_32_2 (model_json)) {\n        model.emplace<ModelType_LSTM_32_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_32_3 (model_json)) {\n        model.emplace<ModelType_LSTM_32_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_40_1 (model_json)) {\n        model.emplace<ModelType_LSTM_40_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_40_2 (model_json)) {\n        model.emplace<ModelType_LSTM_40_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_40_3 (model_json)) {\n        model.emplace<ModelType_LSTM_40_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_64_1 (model_json)) {\n        model.emplace<ModelType_LSTM_64_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_64_2 (model_json)) {\n        model.emplace<ModelType_LSTM_64_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_64_3 (model_json)) {\n        model.emplace<ModelType_LSTM_64_3>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_80_1 (model_json)) {\n        model.emplace<ModelType_LSTM_80_1>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_80_2 (model_json)) {\n        model.emplace<ModelType_LSTM_80_2>();\n        return true;\n    }\n    else if (is_model_type_ModelType_LSTM_80_3 (model_json)) {\n        model.emplace<ModelType_LSTM_80_3>();\n        return true;\n    }\n    model.emplace<NullModel>();\n    return false;\n}\n"
  },
  {
    "path": "src/plugin/DistrhoPluginInfo.h",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2022-2023 Massimo Pennazio <maxipenna@libero.it>\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#pragma once\n\n#define DISTRHO_PLUGIN_NUM_INPUTS      1\n#define DISTRHO_PLUGIN_NUM_OUTPUTS     1\n#define DISTRHO_UI_USER_RESIZABLE      0\n\n#define DISTRHO_PLUGIN_VARIANT_PLUGIN     1\n#define DISTRHO_PLUGIN_VARIANT_STANDALONE 0\n\n#include \"../DistrhoPluginCommon.hpp\"\n"
  },
  {
    "path": "src/standalone/DistrhoPluginInfo.h",
    "content": "/*\n * AIDA-X DPF plugin\n * Copyright (C) 2022-2023 Massimo Pennazio <maxipenna@libero.it>\n * Copyright (C) 2023 Filipe Coelho <falktx@falktx.com>\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\n#pragma once\n\n// no audio inputs on web version\n#ifdef DISTRHO_OS_WASM\n# define DISTRHO_PLUGIN_NUM_INPUTS     0\n#else\n# define DISTRHO_PLUGIN_NUM_INPUTS     1\n#endif\n\n#define DISTRHO_PLUGIN_NUM_OUTPUTS     2\n#define DISTRHO_UI_USER_RESIZABLE      0\n\n#define DISTRHO_PLUGIN_VARIANT_PLUGIN     0\n#define DISTRHO_PLUGIN_VARIANT_STANDALONE 1\n\n#include \"../DistrhoPluginCommon.hpp\"\n"
  },
  {
    "path": "src/standalone/Files.cpp",
    "content": "#include \"../../build/Files.cpp\"\n"
  },
  {
    "path": "src/standalone/Graphics.cpp",
    "content": "#include \"../../build/Graphics.cpp\"\n"
  },
  {
    "path": "src/standalone/Makefile",
    "content": "#!/usr/bin/make -f\n# Makefile for AIDA-X #\n# ------------------- #\n# Created by falkTX\n#\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Project name, used for binaries\n\nNAME = AIDA-X\n\nifeq ($(NOSIMD),true)\nNAME = AIDA-X-NOSIMD\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Do some magic (part 1)\n\nexport DGL_NAMESPACE = AidaDGL\nexport NVG_FONT_TEXTURE_FLAGS = NVG_IMAGE_NEAREST\nexport WASM_EXCEPTIONS = true\nexport WINDOWS_ICON_ID = 401\nexport CXXFLAGS += -DPUGL_WASM_NO_KEYBOARD_INPUT -DPUGL_WASM_NO_MOUSEWHEEL_INPUT\ninclude ../../modules/dpf/Makefile.base.mk\n\nifeq ($(NOSIMD),true)\nifneq (,$(findstring -msse,$(CXXFLAGS)))\n$(error NOSIMD build requested but -msse compiler flag is present in CXXFLAGS)\nendif\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Files to build\n\nFILES_DSP = \\\n\taidadsp-plugin.cpp \\\n\t3rd-party.cpp \\\n\tAudioFFT.cpp \\\n\tBiquad.cpp \\\n\tFFTConvolver.cpp \\\n\tFiles.cpp \\\n\tTwoStageFFTConvolver.cpp \\\n\tUtilities.cpp \\\n\tpffft.cpp \\\n\tr8bbase.cpp\n\nFILES_UI  = \\\n\taidadsp-ui.cpp \\\n\tGraphics.cpp \\\n\tBlendish.cpp\n\nifeq ($(WINDOWS),true)\nFILES_UI += ax.rc\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Do some magic (part 2)\n\nifeq ($(WASM),true)\nAPP_EXT = .js\nEXTRA_DEPENDENCIES = ../../resources/.stamp_downloaded\nendif\n\nDPF_PATH = ../../modules/dpf\nDPF_BUILD_DIR = ../../build\nDPF_TARGET_DIR = ../../build/bin\ninclude ../../modules/dpf/Makefile.plugins.mk\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Tweak build flags\n\nBUILD_CXX_FLAGS += -std=gnu++17\n\n# BUILD_CXX_FLAGS += -DBLENDISH_NEW_TLW\nBUILD_CXX_FLAGS += -DRTNEURAL_DEFAULT_ALIGNMENT=16\n\nBUILD_CXX_FLAGS += -I..\nBUILD_CXX_FLAGS += -I../../build\nBUILD_CXX_FLAGS += -I../../modules/dpf-widgets/opengl\nBUILD_CXX_FLAGS += -I../../modules/FFTConvolver\nBUILD_CXX_FLAGS += -I../../modules/dr_libs\nBUILD_CXX_FLAGS += -I../../modules/r8brain\nBUILD_CXX_FLAGS += -I../../modules/rtneural\n# BUILD_CXX_FLAGS += -I../../modules/rtneural/RTNeural\n\nBUILD_CXX_FLAGS += -DRTNEURAL_USE_EIGEN=1\nBUILD_CXX_FLAGS += -I../../modules/rtneural/modules/Eigen\n\n# BUILD_CXX_FLAGS += -DRTNEURAL_USE_XSIMD=1\n# BUILD_CXX_FLAGS += -I../../modules/rtneural/modules/xsimd/include\n\nifeq ($(CPU_I386),true)\n# needed for enabling SSE in pffft\nBUILD_CXX_FLAGS += -Di386\nendif\n\nifeq ($(MOD_BUILD),true)\nBUILD_CXX_FLAGS += -DMOD_BUILD\nendif\n\nifeq ($(NOSIMD),true)\nBUILD_CXX_FLAGS += -DNOSIMD -DPFFFT_SIMD_DISABLE\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Extra rules for generating needed files\n\n$(BUILD_DIR)/Files.cpp.o: $(BUILD_DIR)/Files.cpp\n\n$(BUILD_DIR)/Files.cpp: $(BUILD_DIR)/Files.hpp\n\n$(BUILD_DIR)/Graphics.cpp.o: $(BUILD_DIR)/Graphics.cpp\n\n$(BUILD_DIR)/Graphics.cpp: $(BUILD_DIR)/Graphics.hpp\n\n$(BUILD_DIR)/aidadsp-plugin.cpp.o: $(BUILD_DIR)/Files.hpp\n\n$(BUILD_DIR)/aidadsp-ui.cpp.o: $(BUILD_DIR)/Graphics.hpp\n\n$(BUILD_DIR)/Files.hpp: $(wildcard ../../files/*.*)\n\t-@mkdir -p $(BUILD_DIR)\n\t$(DPF_PATH)/utils/res2c.py Files ../../files $(BUILD_DIR)\n\n$(BUILD_DIR)/Graphics.hpp: $(wildcard ../../graphics/png/*.*)\n\t-@mkdir -p $(BUILD_DIR)\n\t$(DPF_PATH)/utils/res2c.py Graphics ../../graphics/png $(BUILD_DIR)\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Extra rules for macOS app bundle\n\n$(TARGET_DIR)/AIDA-X.app/Contents/Info.plist: ../../utils/Info.plist $(TARGET_DIR)/AIDA-X.app/Contents/Resources/ax.icns\n\t-@mkdir -p $(shell dirname $@)\n\tcp $< $@\n\n$(TARGET_DIR)/AIDA-X.app/Contents/Resources/ax.icns: ../../utils/ax.icns\n\t-@mkdir -p $(shell dirname $@)\n\tcp $< $@\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Extra rules for emscripten\n\nifeq ($(WASM),true)\n\nBUILD_CXX_FLAGS += -DEIGEN_DONT_VECTORIZE=1\n\nLINK_FLAGS += -O3\nLINK_FLAGS += -sALLOW_MEMORY_GROWTH\nLINK_FLAGS += -sINITIAL_MEMORY=64Mb\nLINK_FLAGS += -sLZ4=1\nLINK_FLAGS += --preload-file=../../resources@/resources\nLINK_FLAGS += --use-preload-cache\nLINK_FLAGS += --use-preload-plugins\n\nWASM_RESOURCES = $(TARGET_DIR)/AIDA-X.html\n\n$(TARGET_DIR)/AIDA-X.html: ../../utils/ax.html\n\t-@mkdir -p $(shell dirname $@)\n\tcp $< $@\n\n../../resources/.stamp_downloaded:\n\tmkdir -p ../../resources && \\\n\twget aida.kx.studio/resources.tar.xz -O ../../resources/resources.tar.xz && \\\n\ttar -xvf ../../resources/resources.tar.xz -C ../../resources/ && \\\n\trm ../../resources/resources.tar.xz\n\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Extra rules for Windows\n\nifeq ($(WINDOWS),true)\n\nWINDRES ?= $(subst gcc,windres,$(CC))\n\n$(BUILD_DIR)/ax.rc.o: ax.rc ../../utils/ax.ico\n\t-@mkdir -p \"$(shell dirname $(BUILD_DIR)/$<)\"\n\t@echo \"Compiling ax.rc\"\n\t$(SILENT)$(WINDRES) $< -O coff -o $@\n\nendif\n\n# ---------------------------------------------------------------------------------------------------------------------\n# Standalone build only\n\nall: jack $(WASM_RESOURCES)\n\n# ---------------------------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "utils/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>AIDA-X</string>\n\t<key>CFBundleIconFile</key>\n\t<string>ax.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>cc.aidadsp.rt-neural-loader</string>\n\t<key>NSHighResolutionCapable</key>\n\t<true/>\n\t<key>NSRequiresAquaSystemAppearance</key>\n\t<false/>\n\t<key>NSMicrophoneUsageDescription</key>\n\t<string>AIDA-X requires microphone permissions for audio input.</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "utils/ax-mod.html",
    "content": "<!doctype html>\n<html lang=\"en-us\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n</head>\n<body>\n  <select id=\"audiofilelist\" onchange=\"loadFile(); return false;\">\n    <option disabled selected value> -- select a recording to begin playing -- </option>\n    <option class=\"audiofileoption\" value=\"1\">Bram Fast 01</option>\n    <option class=\"audiofileoption\" value=\"2\">Bram Fast 02</option>\n    <option class=\"audiofileoption\" value=\"3\">Bram Mid 01</option>\n    <option class=\"audiofileoption\" value=\"4\">Bram Mid 02</option>\n    <option class=\"audiofileoption\" value=\"5\">Bram Mid 03</option>\n    <option class=\"audiofileoption\" value=\"6\">Bram Riff 01</option>\n    <option class=\"audiofileoption\" value=\"7\">Bram Rock 01</option>\n    <option class=\"audiofileoption\" value=\"8\">Bram Tap 01</option>\n    <option class=\"audiofileoption\" value=\"9\">Gian Funky Rock 01</option>\n    <option class=\"audiofileoption\" value=\"10\">Gian Funky Rock 02</option>\n    <option class=\"audiofileoption\" value=\"11\">Gian Funky</option>\n    <option class=\"audiofileoption\" value=\"12\">Gian Heavy Rock</option>\n    <option class=\"audiofileoption\" value=\"13\">Gian Heavy</option>\n    <option class=\"audiofileoption\" value=\"14\">Gian Rock 01</option>\n    <option class=\"audiofileoption\" value=\"15\">Gian Rock 02</option>\n    <option class=\"audiofileoption\" value=\"16\">James Amsterdam Chorus</option>\n    <option class=\"audiofileoption\" value=\"17\">James Amsterdam Verse</option>\n    <option class=\"audiofileoption\" value=\"18\">Jesse Alt Rock</option>\n    <option class=\"audiofileoption\" value=\"19\">Jesse Calm Chords</option>\n    <option class=\"audiofileoption\" value=\"20\">Jesse Calm Lead</option>\n    <option class=\"audiofileoption\" value=\"21\">Jesse Descending Chords</option>\n    <option class=\"audiofileoption\" value=\"22\">Jesse Dramatic Chords</option>\n    <option class=\"audiofileoption\" value=\"23\">Jesse Happy Groove Riff</option>\n    <option class=\"audiofileoption\" value=\"24\">Jesse Happy Rock</option>\n    <option class=\"audiofileoption\" value=\"25\">Jesse Heavy Groove Riff</option>\n    <option class=\"audiofileoption\" value=\"26\">Jesse Optimistic Funky</option>\n    <option class=\"audiofileoption\" value=\"27\">Jesse Slow Heavy</option>\n  </select>\n\n  <figure style=\"overflow:visible;\" id=\"spinner\">\n    <div class=\"spinner\"></div>\n    <center style=\"margin-top:0.5em\"><strong>AIDA-X</strong></center>\n  </figure>\n  <div class=\"emscripten\" id=\"error\"></div>\n  <div class=\"emscripten\" id=\"status\">Downloading...</div>\n  <div class=\"emscripten\">\n    <progress value=\"0\" max=\"100\" id=\"progress\" hidden=\"1\"></progress>\n  </div>\n  <div id=\"canvas_wrapper\">\n    <input type=\"file\" id=\"canvas_file_open\">\n    <canvas class=\"emscripten\" id=\"canvas\" oncontextmenu=\"event.preventDefault()\" tabindex=\"-1\"></canvas>\n  </div>\n  <style>\n    canvas {\n      padding: 0;\n      margin: 0;\n      width: 900px;\n      height: 318px;\n    }\n    #canvas_file_open {\n      display: none;\n    }\n    #canvas_wrapper {\n      --device-pixel-ratio: 1;\n      display: none;\n      image-rendering: pixelated;\n      image-rendering: crisp-edges;\n      transform-origin: 0 0 0;\n      transform: scale(calc(1 / var(--device-pixel-ratio)));\n      width: 900px;\n      height: 318px;\n      box-shadow: 2px 8px 7px rgba(0,0,0,0.2), 4px 16px 7px rgba(0,0,0,0.2), 6px 24px 7px rgba(0,0,0,0.2), 8px 32px 7px rgba(0,0,0,0.2), 10px 40px 7px rgba(0,0,0,0.2), 5px 20px 50px rgba(0,0,0,0.9), 4px 12px 30px rgba(0,0,0,0.5);\n      border-radius: 13px;\n    }\n    #error {\n      background: rgba(0,0,0,0.75);\n      display: none;\n      position: fixed;\n      padding: 0.5em;\n      left: 0;\n      right: 0;\n      width: 100%;\n      z-index: 2;\n    }\n    .emscripten {\n      display: block;\n      margin-left: auto;\n      margin-right: auto;\n      padding-right: 0;\n      text-align: center;\n    }\n    .spinner {\n      height: 50px;\n      width: 50px;\n      margin: 0px auto;\n      margin-top: 100px;\n      -webkit-animation: rotation .8s linear infinite;\n      -moz-animation: rotation .8s linear infinite;\n      -o-animation: rotation .8s linear infinite;\n      animation: rotation 0.8s linear infinite;\n      border-left: 10px solid rgb(0,150,240);\n      border-right: 10px solid rgb(0,150,240);\n      border-bottom: 10px solid rgb(0,150,240);\n      border-top: 10px solid rgb(100,0,200);\n      border-radius: 100%;\n      background-color: rgb(200,100,250);\n    }\n    @-webkit-keyframes rotation {\n      from {-webkit-transform: rotate(0deg);}\n      to {-webkit-transform: rotate(360deg);}\n    }\n    @-moz-keyframes rotation {\n      from {-moz-transform: rotate(0deg);}\n      to {-moz-transform: rotate(360deg);}\n    }\n    @-o-keyframes rotation {\n      from {-o-transform: rotate(0deg);}\n      to {-o-transform: rotate(360deg);}\n    }\n    @keyframes rotation {\n      from {transform: rotate(0deg);}\n      to {transform: rotate(360deg);}\n    }\n  </style>\n  <script type=\"text/javascript\">\n    'use strict';\n\n    var ready = false;\n    var opts = document.getElementById('audiofilelist');\n    function loadFile() {\n      if (!ready) {\n        return;\n      }\n      var filename = \"/resources/1. Direct Guitar \" + opts.selectedOptions[0].textContent + \".wav\";\n      Module.ccall('load_file', null, ['string'], [filename]);\n    }\n\n    var wasmErrors = [];\n    var errorElement = document.getElementById('error');\n    var statusElement = document.getElementById('status');\n    var progressElement = document.getElementById('progress');\n    var spinnerElement = document.getElementById('spinner');\n    if (typeof(WebAssembly) === \"undefined\") {\n      wasmErrors.push('WebAssembly unsupported');\n    } else {\n      if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) {\n        wasmErrors.push('Importable/Exportable mutable globals unsupported');\n      }\n    }\n    if (wasmErrors.length !== 0) {\n      errorElement.innerHTML = 'Cannot start AIDA-X:<br>' + wasmErrors.join('<br>') + '<br><br>Perhaps try a different browser?';\n      errorElement.style.display = 'block';\n      statusElement.style.display = 'none';\n      progressElement.style.display = 'none';\n      spinnerElement.style.display = 'none';\n    } else {\n      var canvasWrapper = document.getElementById('canvas_wrapper');\n      var simdSupported = WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));\n      var Module = {\n        locateFile: function(p,_) { return 'https://aida.mod.audio/' + (simdSupported ? p : p.replace(\"AIDA-X.\",\"AIDA-X-NOSIMD.\")); },\n        preRun: [],\n        postRun: function() {\n          ready = true;\n          statusElement.style.display = 'none';\n          progressElement.style.display = 'none';\n          spinnerElement.style.display = 'none';\n          canvasWrapper.style.display = 'block';\n          window.dispatchEvent(new Event('resize'));\n\n          if (opts.selectedIndex > 0) {\n            loadFile();\n          }\n        },\n        canvas: (function() {\n          var canvas = document.getElementById('canvas');\n          // As a default initial behavior, pop up an alert when webgl context is lost. To make your\n          // application robust, you may want to override this behavior before shipping!\n          // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2\n          canvas.addEventListener(\"webglcontextlost\", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);\n          return canvas;\n        })(),\n        setStatus: function(text) {\n          if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };\n          if (text === Module.setStatus.last.text) return;\n          var m = text.match(/([^(]+)\\((\\d+(\\.\\d+)?)\\/(\\d+)\\)/);\n          var now = Date.now();\n          if (m && now - Module.setStatus.last.time < 30) return; // if this is a progress update, skip it if too soon\n          Module.setStatus.last.time = now;\n          Module.setStatus.last.text = text;\n          if (m) {\n            text = m[1];\n            progressElement.value = parseInt(m[2])*100;\n            progressElement.max = parseInt(m[4])*100;\n            progressElement.hidden = false;\n            spinnerElement.hidden = false;\n          } else {\n            progressElement.value = null;\n            progressElement.max = null;\n            progressElement.hidden = true;\n            if (!text) spinnerElement.hidden = true;\n          }\n          statusElement.innerHTML = text;\n        },\n        totalDependencies: 0,\n        monitorRunDependencies: function(left) {\n          this.totalDependencies = Math.max(this.totalDependencies, left);\n          Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');\n        }\n      };\n      Module.setStatus('Downloading...');\n      window.onerror = function(err) {\n        errorElement.innerHTML = 'Exception thrown:<br>' + err\n        errorElement.style.display = 'block';\n        spinnerElement.style.display = 'none';\n        Module.setStatus = function(text) {\n          if (text) console.error('[post-exception status] ' + text);\n        };\n      };\n      var jsModuleName;\n      if (simdSupported) {\n        jsModuleName = \"https://aida.mod.audio/AIDA-X.js\";\n      } else {\n        jsModuleName = \"https://aida.mod.audio/AIDA-X-NOSIMD.js\";\n      }\n      var jsModuleScript = document.createElement('script');\n      jsModuleScript.setAttribute('async', true);\n      jsModuleScript.setAttribute('src', jsModuleName);\n      jsModuleScript.setAttribute('type','text/javascript');\n      document.head.appendChild(jsModuleScript);\n    }\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "utils/ax.html",
    "content": "<!doctype html>\n<html lang=\"en-us\">\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n    <meta name=\"description\" content=\"AIDA-X\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0\" user-scalable=\"no\">\n    <title>AIDA-X</title>\n    <style>\n      html {\n        background: url(\"/background-p2.png\"), linear-gradient(rgb(100, 50, 255), rgb(166, 58, 255));\n        background-size: 256px auto;\n        border: 2px solid black;\n        box-shadow: inset black 0px 0px 1px 1px;\n        color: #eee;\n        height: 100vh;\n        overflow: hidden;\n      }\n      body, canvas {\n        padding: 0;\n        margin: 0;\n      }\n\n      #canvas_file_open {\n        display: none;\n      }\n\n      #canvas_wrapper {\n        --device-pixel-ratio: 1;\n        display: none;\n        image-rendering: pixelated;\n        image-rendering: crisp-edges;\n        position: fixed;\n        transform-origin: 0 0 0;\n        transform: scale(calc(1 / var(--device-pixel-ratio)));\n        width: 100vw;\n        height: 100vh;\n      }\n\n      #error {\n        background: rgba(0,0,0,0.75);\n        display: none;\n        position: fixed;\n        padding: 0.5em;\n        left: 0;\n        right: 0;\n        width: 100%;\n        z-index: 2;\n      }\n\n      .emscripten {\n        display: block;\n        margin-left: auto;\n        margin-right: auto;\n        padding-right: 0;\n        text-align: center;\n      }\n\n      .spinner {\n        height: 50px;\n        width: 50px;\n        margin: 0px auto;\n        margin-top: 100px;\n        -webkit-animation: rotation .8s linear infinite;\n        -moz-animation: rotation .8s linear infinite;\n        -o-animation: rotation .8s linear infinite;\n        animation: rotation 0.8s linear infinite;\n        border-left: 10px solid rgb(0,150,240);\n        border-right: 10px solid rgb(0,150,240);\n        border-bottom: 10px solid rgb(0,150,240);\n        border-top: 10px solid rgb(100,0,200);\n        border-radius: 100%;\n        background-color: rgb(200,100,250);\n      }\n      @-webkit-keyframes rotation {\n        from {-webkit-transform: rotate(0deg);}\n        to {-webkit-transform: rotate(360deg);}\n      }\n      @-moz-keyframes rotation {\n        from {-moz-transform: rotate(0deg);}\n        to {-moz-transform: rotate(360deg);}\n      }\n      @-o-keyframes rotation {\n        from {-o-transform: rotate(0deg);}\n        to {-o-transform: rotate(360deg);}\n      }\n      @keyframes rotation {\n        from {transform: rotate(0deg);}\n        to {transform: rotate(360deg);}\n      }\n\n      #audiofilelist {\n        display: none;\n        position: absolute;\n        top: 7px;\n        left: calc(50vw - 100px);\n        z-index: 2;\n      }\n    </style>\n  </head>\n  <body>\n    <figure style=\"overflow:visible;\" id=\"spinner\">\n      <div class=\"spinner\"></div>\n      <center style=\"margin-top:0.5em\"><strong>AIDA-X</strong></center>\n    </figure>\n    <div class=\"emscripten\" id=\"error\"></div>\n    <div class=\"emscripten\" id=\"status\">Downloading...</div>\n    <div class=\"emscripten\">\n      <progress value=\"0\" max=\"100\" id=\"progress\" hidden=1></progress>\n    </div>\n    <div id=\"canvas_wrapper\">\n      <input type=\"file\" id=\"canvas_file_open\" ></input>\n      <canvas class=\"emscripten\" id=\"canvas\" oncontextmenu=\"event.preventDefault()\" tabindex=-1></canvas>\n    </div>\n    <select id=\"audiofilelist\" onchange=\"loadFile(); return false;\">\n      <option disabled selected value> -- select a recording to begin playing -- </option>\n      <option class=\"audiofileoption\" value=\"1\">Bram Fast 01</option>\n      <option class=\"audiofileoption\" value=\"2\">Bram Fast 02</option>\n      <option class=\"audiofileoption\" value=\"3\">Bram Mid 01</option>\n      <option class=\"audiofileoption\" value=\"4\">Bram Mid 02</option>\n      <option class=\"audiofileoption\" value=\"5\">Bram Mid 03</option>\n      <option class=\"audiofileoption\" value=\"6\">Bram Riff 01</option>\n      <option class=\"audiofileoption\" value=\"7\">Bram Rock 01</option>\n      <option class=\"audiofileoption\" value=\"8\">Bram Tap 01</option>\n      <option class=\"audiofileoption\" value=\"9\">Gian Funky Rock 01</option>\n      <option class=\"audiofileoption\" value=\"10\">Gian Funky Rock 02</option>\n      <option class=\"audiofileoption\" value=\"11\">Gian Funky</option>\n      <option class=\"audiofileoption\" value=\"12\">Gian Heavy Rock</option>\n      <option class=\"audiofileoption\" value=\"13\">Gian Heavy</option>\n      <option class=\"audiofileoption\" value=\"14\">Gian Rock 01</option>\n      <option class=\"audiofileoption\" value=\"15\">Gian Rock 02</option>\n      <option class=\"audiofileoption\" value=\"16\">James Amsterdam Chorus</option>\n      <option class=\"audiofileoption\" value=\"17\">James Amsterdam Verse</option>\n      <option class=\"audiofileoption\" value=\"18\">Jesse Alt Rock</option>\n      <option class=\"audiofileoption\" value=\"19\">Jesse Calm Chords</option>\n      <option class=\"audiofileoption\" value=\"20\">Jesse Calm Lead</option>\n      <option class=\"audiofileoption\" value=\"21\">Jesse Descending Chords</option>\n      <option class=\"audiofileoption\" value=\"22\">Jesse Dramatic Chords</option>\n      <option class=\"audiofileoption\" value=\"23\">Jesse Happy Groove Riff</option>\n      <option class=\"audiofileoption\" value=\"24\">Jesse Happy Rock</option>\n      <option class=\"audiofileoption\" value=\"25\">Jesse Heavy Groove Riff</option>\n      <option class=\"audiofileoption\" value=\"26\">Jesse Optimistic Funky</option>\n      <option class=\"audiofileoption\" value=\"27\">Jesse Slow Heavy</option>\n    </select>\n\n    <script type='text/javascript'>\n      'use strict';\n\n      var wasmErrors = [];\n      var errorElement = document.getElementById('error');\n      var statusElement = document.getElementById('status');\n      var progressElement = document.getElementById('progress');\n      var spinnerElement = document.getElementById('spinner');\n      var filelistElement = document.getElementById('audiofilelist');\n      var ready = false;\n\n      function loadFile() {\n        if (!ready) {\n          return;\n        }\n        var filename = \"/resources/1. Direct Guitar \" + filelistElement.selectedOptions[0].textContent + \".wav\";\n        Module.ccall('load_file', null, ['string'], [filename]);\n      }\n\n      if (typeof(WebAssembly) === \"undefined\") {\n        wasmErrors.push('WebAssembly unsupported');\n      } else {\n        if (!WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1]))) {\n          wasmErrors.push('Importable/Exportable mutable globals unsupported');\n        }\n      }\n\n      if (wasmErrors.length !== 0) {\n        errorElement.innerHTML = 'Cannot start AIDA-X:<br>' + wasmErrors.join('<br>') + '<br><br>Perhaps try a different browser?';\n        errorElement.style.display = 'block';\n        statusElement.style.display = 'none';\n        progressElement.style.display = 'none';\n        spinnerElement.style.display = 'none';\n      } else {\n        var canvasWrapper = document.getElementById('canvas_wrapper');\n        var simdSupported = WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));\n        var Module = {\n          locateFile: function(p,_) { return simdSupported ? p : p.replace(\"AIDA-X.\",\"AIDA-X-NOSIMD.\"); },\n          preRun: [],\n          postRun: function() {\n            ready = true;\n            statusElement.style.display = 'none';\n            progressElement.style.display = 'none';\n            spinnerElement.style.display = 'none';\n            canvasWrapper.style.display = 'block';\n            filelistElement.style.display = 'block';\n            window.dispatchEvent(new Event('resize'));\n\n            if (filelistElement.selectedIndex > 0) {\n              loadFile();\n            }\n          },\n          canvas: (function() {\n            var canvas = document.getElementById('canvas');\n\n            // As a default initial behavior, pop up an alert when webgl context is lost. To make your\n            // application robust, you may want to override this behavior before shipping!\n            // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2\n            canvas.addEventListener(\"webglcontextlost\", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);\n\n            return canvas;\n          })(),\n          setStatus: function(text) {\n            if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };\n            if (text === Module.setStatus.last.text) return;\n            var m = text.match(/([^(]+)\\((\\d+(\\.\\d+)?)\\/(\\d+)\\)/);\n            var now = Date.now();\n            if (m && now - Module.setStatus.last.time < 30) return; // if this is a progress update, skip it if too soon\n            Module.setStatus.last.time = now;\n            Module.setStatus.last.text = text;\n            if (m) {\n              text = m[1];\n              progressElement.value = parseInt(m[2])*100;\n              progressElement.max = parseInt(m[4])*100;\n              progressElement.hidden = false;\n              spinnerElement.hidden = false;\n            } else {\n              progressElement.value = null;\n              progressElement.max = null;\n              progressElement.hidden = true;\n              if (!text) spinnerElement.hidden = true;\n            }\n            statusElement.innerHTML = text;\n          },\n          totalDependencies: 0,\n          monitorRunDependencies: function(left) {\n            this.totalDependencies = Math.max(this.totalDependencies, left);\n            Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');\n          }\n        };\n        Module.setStatus('Downloading...');\n        window.onerror = function(err) {\n          errorElement.innerHTML = 'Exception thrown:<br>' + err\n          errorElement.style.display = 'block';\n          spinnerElement.style.display = 'none';\n          Module.setStatus = function(text) {\n            if (text) console.error('[post-exception status] ' + text);\n          };\n        };\n\n        var jsModuleName;\n        if (simdSupported) {\n          jsModuleName = \"AIDA-X.js\";\n        } else {\n          jsModuleName = \"AIDA-X-NOSIMD.js\";\n        }\n        var jsModuleScript = document.createElement('script');\n        jsModuleScript.setAttribute('async', true);\n        jsModuleScript.setAttribute('src', jsModuleName);\n        jsModuleScript.setAttribute('type','text/javascript');\n        document.head.appendChild(jsModuleScript);\n      }\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "utils/ax.rc",
    "content": "id ICON \"../../utils/ax.ico\"\n401 ICON \"../../utils/ax.ico\"\n"
  },
  {
    "path": "utils/inno/win64.iss",
    "content": "[Setup]\nArchitecturesInstallIn64BitMode=x64\nAppName=AIDA-X\nAppPublisher=AIDA DSP\nAppPublisherURL=https://github.com/AidaDSP/aida-x/\nAppSupportURL=https://github.com/AidaDSP/aida-x/issues/\nAppUpdatesURL=https://github.com/AidaDSP/aida-x/releases/\nAppVerName=AIDA-X @VERSION@\nAppVersion=@VERSION@\nDefaultDirName={commonpf64}\\AIDA-X\nDisableDirPage=yes\nDisableProgramGroupPage=yes\n; DisableReadyPage=true\n; DisableWelcomePage=no\nInfoBeforeFile=@UTILSDIR@\\windows-installer-welcome.rtf\nOutputBaseFilename=AIDA-X-@VERSION@-win64-installer\nOutputDir=.\nSetupIconFile=@UTILSDIR@\\ax.ico\nUsePreviousAppDir=no\nVersionInfoCompany=AIDA DSP\nVersionInfoCopyright=AIDA DSP\nVersionInfoDescription=AIDA-X Installer\nVersionInfoProductName=AIDA-X\nVersionInfoProductVersion=@VERSION@\nVersionInfoVersion=@VERSION@\n; WizardImageFile=WizModernImage.bmp\n; WizardImageStretch=false\n; WizardSmallImageFile=WizSmall.bmp\n\n[Types]\nName: \"normal\"; Description: \"Full installation\";\nName: \"custom\"; Description: \"Custom installation\"; Flags: iscustom;\n\n[Components]\nName: standalone; Description: \"Standalone\"; Types: normal;\nName: clap; Description: \"CLAP plugin\"; Types: normal;\nName: lv2; Description: \"LV2 plugin\"; Types: normal;\nName: vst2; Description: \"VST2 plugin\"; Types: normal;\nName: vst3; Description: \"VST3 plugin\"; Types: normal;\n\n[Files]\nSource: \"@BINDIR@/AIDA-X.exe\"; DestDir: \"{app}\"; Components: standalone; Flags: ignoreversion;\nSource: \"@BINDIR@/AIDA-X.clap\"; DestDir: \"{commoncf64}\\CLAP\"; Components: clap; Flags: ignoreversion;\nSource: \"@BINDIR@/AIDA-X.lv2/*.*\"; DestDir: \"{commoncf64}\\LV2\\AIDA-X.lv2\"; Components: lv2; Flags: ignoreversion recursesubdirs;\nSource: \"@BINDIR@/AIDA-X-vst2.dll\"; DestDir: \"{code:GetVST2Dir}\"; Components: vst2; Flags: ignoreversion;\nSource: \"@BINDIR@/AIDA-X.vst3\"; DestDir: \"{commoncf64}\\VST3\"; Components: vst3; Flags: ignoreversion recursesubdirs;\n\n[Icons]\nName: \"{commonprograms}\\AIDA-X\"; Filename: \"{app}\\AIDA-X.exe\"; Components: standalone; Comment: \"AIDA-X Standalone\";\nName: \"{commondesktop}\\AIDA-X\"; Filename: \"{app}\\AIDA-X.exe\"; Components: standalone; Tasks: desktopicon;\n\n[Tasks]\nName: desktopicon; Description: \"{cm:CreateDesktopIcon}\"; GroupDescription: \"{cm:AdditionalIcons}\"\n\n; based on https://www.kvraudio.com/forum/viewtopic.php?t=501615\n[Code]\nvar\n  VST2DirPage: TInputDirWizardPage;\n  TypesComboOnChangePrev: TNotifyEvent;\n\nprocedure ComponentsListCheckChanges;\nbegin\n  WizardForm.NextButton.Enabled := (WizardSelectedComponents(False) <> '');\nend;\n\nprocedure ComponentsListClickCheck(Sender: TObject);\nbegin\n  ComponentsListCheckChanges;\nend;\n\nprocedure TypesComboOnChange(Sender: TObject);\nbegin\n  TypesComboOnChangePrev(Sender);\n  ComponentsListCheckChanges;\nend;\n\nprocedure InitializeWizard;\nbegin\n\n  WizardForm.ComponentsList.OnClickCheck := @ComponentsListClickCheck;\n  TypesComboOnChangePrev := WizardForm.TypesCombo.OnChange;\n  WizardForm.TypesCombo.OnChange := @TypesComboOnChange;\n\n  VST2DirPage := CreateInputDirPage(wpSelectComponents,\n  'Confirm VST2 Plugin Directory', '',\n  'Select the folder in which setup should install the VST2 Plugin, then click Next.',\n  False, '');\n\n  VST2DirPage.Add('VST2 Plugin Directory');\n  VST2DirPage.Values[0] := ExpandConstant('{reg:HKLM\\SOFTWARE\\VST,VSTPluginsPath|{commonpf64}\\VSTPlugins}');\nend;\n\nprocedure CurPageChanged(CurPageID: Integer);\nbegin\n  if CurPageID = VST2DirPage.ID then\n  begin\n    VST2DirPage.Buttons[0].Enabled := WizardIsComponentSelected('vst2');\n    VST2DirPage.PromptLabels[0].Enabled := VST2DirPage.Buttons[0].Enabled;\n    VST2DirPage.Edits[0].Enabled := VST2DirPage.Buttons[0].Enabled;\n  end;\n\n  if CurPageID = wpSelectComponents then\n  begin\n    ComponentsListCheckChanges;\n  end;\nend;\n\nfunction ShouldSkipPage(PageID: Integer): Boolean;\nbegin\n  if PageID = VST2DirPage.ID then\n  begin\n    If (not WizardIsComponentSelected('vst2'))then\n      begin\n        Result := True\n      end;\n  end;\nend;\n\nfunction GetVST2Dir(Param: string): string;\nbegin\n    Result := VST2DirPage.Values[0];\nend;\n"
  },
  {
    "path": "utils/macos-installer-welcome.txt",
    "content": "AIDA-X is an Amp Model Player, allowing it to load models of AI trained music gear, which you can then play through!\n\nIts main intended use is to provide high fidelity simulations of amplifiers.  \nHowever, it is also possible to run entire signal chains consisting of any combination of amp, cab, dist, drive, fuzz, boost and eq.\n\nThis installer contains the AudioUnit, CLAP, LV2, VST2 and VST3 plugin formats.\n"
  },
  {
    "path": "utils/windows-installer.sh",
    "content": "#!/bin/bash\n\nset -e\n\ncd $(dirname ${0})\n\n# ---------------------------------------------------------------------------------------------------------------------\n\nBUILDDIR=\"${1}\"\nVERSION=\"${2}\"\n\nif [ -z \"${BUILDDIR}\" ] || [ -z \"${VERSION}\" ]; then\n    echo \"usage: ${0} <BUILDDIR> <VERSION>\"\n    exit 1\nfi\n\nif [ ! -d \"${BUILDDIR}\" ]; then\n    echo \"BUILDDIR does not exist\"\n    exit 1\nfi\n\n# ---------------------------------------------------------------------------------------------------------------------\n\nmkdir -p \"${BUILDDIR}/innosetup-6.0.5\"\n\ndlfile=\"${BUILDDIR}/innosetup-6.0.5.exe\"\npkgdir=\"$(realpath ${BUILDDIR}/innosetup-6.0.5)\"\ndrivec=\"${pkgdir}/drive_c\"\niscc=\"${drivec}/InnoSetup/ISCC.exe\"\n\nexport WINEARCH=win64\nexport WINEDLLOVERRIDES=\"mscoree,mshtml=\"\nexport WINEPREFIX=\"${pkgdir}\"\n\n# ---------------------------------------------------------------------------------------------------------------------\n# download and install innosetup\n\nif [ ! -f \"${dlfile}\" ]; then\n    # FIXME proper dl version\n    curl -L https://jrsoftware.org/download.php/is.exe?site=2 -o \"${dlfile}\"\nfi\n\nif [ ! -d \"${drivec}\" ]; then\n    xvfb-run wineboot -u\nfi\n\nif [ ! -f \"${drivec}/InnoSetup/ISCC.exe\" ]; then\n    xvfb-run wine \"${dlfile}\" /allusers /dir=C:\\\\InnoSetup /nocancel /norestart /verysilent\nfi\n\n# ---------------------------------------------------------------------------------------------------------------------\n# create innosetup installer\n\nls -al \"${BUILDDIR}/bin\"\n\nsed \\\n    -e \"s|@VERSION@|${VERSION}|g\" \\\n    -e \"s|@BINDIR@|Z:${BUILDDIR}/bin|g\" \\\n    -e \"s|@UTILSDIR@|Z:${PWD}|g\" \\\n    inno/win64.iss > \"${BUILDDIR}/win64.iss\"\n\nxvfb-run wine \"${iscc}\" \"Z:${BUILDDIR}/win64.iss\"\n\n# ---------------------------------------------------------------------------------------------------------------------\n"
  }
]