# Third-party notices ## JieLi AC79 AIoT SDK — `apps/demo/demo_hello` The following files in this directory originate from the JieLi AC79 AIoT SDK (`fw-AC79_AIoT_SDK-release-AC79NN_SDK_V1.2.0`), specifically its `apps/demo/demo_hello/` example project: - `firmware/app/app_main.c` - `firmware/board/wl82/board.c` - `firmware/board/wl82/Makefile` - `firmware/board/wl82/AC791N_DEMO_DEMO_HELLO.cbp` That SDK is licensed under the **Apache License, Version 2.0**. A verbatim copy of the license is included in this directory as [`LICENSE-APACHE-2.0.txt`](LICENSE-APACHE-2.0.txt) (copied unmodified from the SDK's own top-level `LICENSE` file). The SDK's own product folders (`wifi_camera`, `scan_box`, etc.) are themselves all forks of its `apps/demo/*` examples in exactly this way — forking and modifying `demo_hello` here follows the same, license-permitted pattern. **Modified for this project**, per Apache License 2.0 §4(b) ("You must cause any modified files to carry prominent notices stating that You changed the files"): - `app_main.c`: the startup `printf` string was changed from `"hello demo run %s"` to `"keysmith firmware run %s"`, and the compiled source file's own path (as referenced by the build) was moved from `apps/demo/demo_hello/` to this repo's `firmware/app/`. - `board.c`: unmodified in content; relocated as above (forked as part of the whole `board/wl82/` directory). - `Makefile`: `c_SRC_FILES` was repointed from `apps/demo/demo_hello/app_main.c` / `apps/demo/demo_hello/board/wl82/board.c` to `apps/demo/keysmith/app/app_main.c` / `apps/demo/keysmith/board/wl82/board.c`, matching where `firmware/build.sh` places this fork inside the external SDK tree at build time. See `firmware/BUILD.md` for why. No other build logic was changed. - `AC791N_DEMO_DEMO_HELLO.cbp`: unmodified (forked verbatim; it's an unused Code::Blocks IDE project file — see `firmware/BUILD.md`'s review notes). Each modified source/Makefile file above carries a short header comment pointing back to this notice; this file is the authoritative statement of origin, license, and what changed. ## JieLi AC79 AIoT SDK — BT probe tables `firmware/ram-lvgl/bt_config.c` contains `wl_rfd_ram_lut` and the radio detection thresholds copied from the same SDK's `apps/common/net/wifi_conf.c` (Apache License 2.0, © Zhuhai Jieli Technology), and configuration values read from its `apps/demo/demo_ble` build. The GATT table layout in `firmware/ram-lvgl/ble.c` follows the SDK's `le_trans_data.h`. The BT probe links the SDK's binary libraries (`btstack.a`, `btctrler.a`, `wl_rf_common.a`, `lib_ccm_aes.a`, `crypto_toolbox_Osize.a`, members of `system.a`/`cpu.a`) at build time; they are not in this repository. ## Dexed / MSFA — the DX7 engine `firmware/core/engine/fm/fm_msfa.[ch]`, `firmware/core/engine/fm/fm_tables.[ch]` (generated by `tools/fm_tables.c`) and `firmware/core/tests/fm_tables_gen.h` are a C port of the DX7 core in Dexed's `Source/msfa` directory (https://github.com/asb2m10/dexed, commit `2e182b3`, 2026-03-15): `env.cc`, `pitchenv.cc`, `lfo.cc`, `fm_core.cc`, `fm_op_kernel.cc`, `dx7note.cc`, `sin.cc`, `exp2.cc`, `freqlut.cc`, `porta.cpp`. Those files are licensed under the **Apache License, Version 2.0** ([`LICENSE-APACHE-2.0.txt`](LICENSE-APACHE-2.0.txt)): - Copyright 2012 Google Inc. (music-synthesizer-for-android) - Copyright 2016-2025 Pascal Gauthier (Dexed) - Copyright 2019 Jean Pierre Cimalando (`porta.cpp`) Dexed as a whole is GPL-3.0; nothing outside `Source/msfa`'s Apache-licensed files is used (not `EngineMkI`, `EngineOpl`, `tuning.cc` or the plugin's voice handling; `engine_fm.c` is keysmith's own). **Changed in the port** (Apache License 2.0 §4(b)): translated from C++ to C; standard tuning only, no MPE or MTS-ESP; pitch bend in integers; out-of-range patch bytes clamped where Dexed would index past a table; the lookup tables are generated at build time instead of at start-up; amplitude modulation caches its `exp()` values per block. Each ported file says so in its header. ## Plaits / stmlib — the Mutable-family engine (`pl`) `firmware/core/engine/pl/` (roadmap §21) is a C transcription of MIT-licensed code by Emilie Gillet from two pinned upstreams: - `pl_stmlib.[ch]` and `pl_pitch_tables.h` ← **stmlib** (https://github.com/pichenettes/stmlib, commit `e3bd7c9`): `Random`, `ParameterInterpolator`, `Svf`, `SemitonesToRatio`, polyblep, and the pitch LUTs. - `pl_noise.[ch]` ← **eurorack/Plaits** (https://github.com/pichenettes/eurorack, commit `08460a6`): `NoiseEngine` and `ClockedNoise`. Full MIT text and per-file attribution are in [`core/engine/pl/NOTICE`](core/engine/pl/NOTICE). **Changed in the port:** C++ → C; templates (`Svf::Process`, `set_f_q`) flattened to named functions. The stmlib `Sqrt` is `sqrtf` under `-DTEST` and the port keeps `sqrtf`; that is RT-safe because the xip build links libm into the hot/SRAM group - the same reason the juno/moog engines may call `expf`/`powf`/`tanf` - and `check_xip` confirms the real-time graph never reaches flash. FMA contraction is disabled in the port (`#pragma clang fp contract(off)` placed before every include, so it also covers the inlined header helpers) and in the reference generator (`tools/plaits_ref/gen.sh`, `-ffp-contract=off`) so the two round identically; `tests/test_pl_noise.c` and `tests/test_pl_string.c` assert bit-for-bit equality against the committed golden. ## cz-1 — the Casio CZ engine (`cz`) `firmware/core/engine/engine_cz.c` and `firmware/core/engine/cz/cz_pd.[ch]` (roadmap §24) are **keysmith's own** single-precision-float code. They implement the *behaviour* of two publicly documented things; no third-party source file is copied, translated or vendored, so no copyleft attaches to the firmware: - **The Casio CZ tone layout and playback behaviour** — the eight phase-distortion waveforms, three eight-step rate/level envelopes per line with explicit sustain and end points (the uPD933's separate DCO/DCW/DCA domains), the logarithmic DCA amplitude law, ring and noise modulation, vibrato, key-follow and per-envelope velocity sensitivity. These come from the **Casio CZ-1 System Exclusive specification** and owner's manual (public format/behaviour documents, not code) — the same tone the `cz-tone` patch format in `core/engine/ks_patch.c` reads and writes byte-for-byte. Facts and formats (byte offsets, parameter meaning) are not copyrightable expression. - **Design references (credit only, no code copied):** - **Keith Adler's pdsynth** (https://github.com/keithadler/pdsynth, GPL-2.0-or-later) — consulted for the *architecture* of a phase-distortion instrument (the eight-waveform set, three envelopes per line, the bend-ceiling idea that stops high notes folding, the 2-to-4-line model, ring/noise mod) and read to confirm the Casio dump framing (nibble-encoded, low nibble first: a fact of the Casio format). None of its source is used; the DSP here is written from the Casio behaviour, and pdsynth's GPL-2.0 code is deliberately kept out of the tree (the reason cz-1 is a re-implementation, not a port). - **Devin Acker's MAME uPD933 device model** (the rate law `(8|(r&7))<<(r>>3)`, the level shifts, the transfer-function and window cases and the DCA table exponent are reimplemented from it as formulas, not copied) (https://github.com/mamedev/mame/blob/master/src/devices/sound/upd933.cpp, BSD-3-Clause) and Kerem Kilic's fixed-point adaptation in **melodee** (`cz_native.c`, BSD-3 DSP under a GPL-3 wrapper) — read to understand the chip's phase-function, envelope-rate and log-amplitude behaviour and the native 144-byte tone. **No code from either is copied**; melodee's GPL engine wrapper (`eng_cz.c`) is not used, and its fixed-point internals were re-derived as float. This is the documented-behaviour basis, explicitly *not* bit-exact to a real CZ-1. If a future milestone vendors an actual third-party CZ DSP file, the applicable licence text and a §4(b)-style change notice must be added here first. ## qf_math — bounded Viroid control exponential `core/engine/va/va_dsp.c` cherry-picks the degree-five polynomial and round-to-nearest exponent split from `qf_pow2` in [qf_math](https://github.com/deftio/qf_math), commit `293bf6806d2c74acf6198ad05d6d7e00f232e79c` (BSD-2-Clause). Adapted for Oscuro: restricted to [-24,24], libm fallback outside that domain, and direct exponent adjustment within its guaranteed normal-result range. The polynomial is algebraically translated from `P(f)` on [-0.5,0.5] to `sqrt(2)*P(f-0.5)` on [0,1], then its constant and highest coefficient are normalized to give endpoints 1 and 2. A floor split replaces the upstream mantissa-offset split. All coefficients are positive, so rounded Horner operations remain monotone; this avoids upstream's tiny negative-residual and half-integer boundary reversals. Only modulated filter cutoff and polyphonic LFO key follow use it. ```text Copyright (c) 2002, M. A. Chatterjee Copyright (c) 2023, M. A. Chatterjee All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` ## LVGL — the display library The firmware's user interface is drawn with **LVGL** (https://github.com/lvgl/lvgl), version 9.6.0 and, in some builds, 8.3.11, fetched at build time and not stored in this repository. LVGL is licensed under the **MIT License**: ```text MIT licence Copyright (c) 2025 LVGL Kft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ## DejaVu Sans — UI fonts The bitmap UI fonts compiled into the firmware (generated by `firmware/ram-lvgl/make_fonts.py` with `lv_font_conv`) are rendered from **DejaVu Sans** (Bitstream Vera Sans glyphs © Bitstream, Inc.; DejaVu changes public domain), under the Bitstream Vera / DejaVu license, which permits use, copying, embedding and redistribution provided the copyright notice and license text accompany the font. The glyph data is embedded as bitmaps; the font files are not shipped. The license text is at https://dejavu-fonts.github.io/License.html. ## C library and compiler runtime (JieLi SDK toolchain) The images link a few members of the SDK's prebuilt `libc.a` and `libm.a` (newlib: `memcpy`, `memset`, `str*`, `ctype`, `setjmp` and the math functions) and of `libcompiler_rt.a` (LLVM compiler-rt: software floating-point and 64-bit division helpers). newlib's C and math library code is under BSD-style and similar permissive licenses (see newlib's `COPYING.NEWLIB`); compiler-rt is under the LLVM project's license (Apache License 2.0 with LLVM exceptions, formerly the MIT/UIUC licenses). None of these is copyleft. They come with the SDK and are not in this repository. ## Felucca BSP — FM-1 TRS MIDI receiver `firmware/board/fm1/fm1_midi.c` adapts the UART1/PH8 setup from [`chip/fm1_uart.h`](https://github.com/luchak/felucca-bsp/blob/4bd6d0bc07c43d28925514f05503b3337425b4d9/chip/fm1_uart.h), commit `4bd6d0bc07c43d28925514f05503b3337425b4d9`, copyright 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments, under MPL-2.0. The file retains its SPDX and copyright notices. Oscuro adds runtime enable, receive-event gating, bounded DMA-ring reads, overrun reporting and GPIO interrupt protection. Oscuro's existing MIDI parser and router handle messages. The MPL-covered source and modifications remain available under MPL-2.0; [the licence text](LICENSE-MPL-2.0.txt) is included here. No GPL-only Felucca application source was copied. ## fm1-base / Melodee — USB MIDI host `firmware/ram-lvgl/usbhost.c`, `usbhost.h`, `usbhost_desc.h` and `tests/usbhost_test.c` are ported from [fm1-base](https://github.com/charlesvestal/fm1-base) (`bsp/chip/usb_host.c`, `usb_host_desc.h`, the host routines of `bsp/chip/fm1_usb.h`, `bsp/tests/usb_host_test.c`; commit `8820d6f`), itself Melodee's USB host relicensed MPL-2.0 with its authors' permission. Copyright 2026 Kerem Kilic (Ellic Studio) and Adrien Tibi (Recursive Field Instruments); the host routines of `fm1_usb.h` copyright 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments; under MPL-2.0. The files retain their SPDX and copyright notices. Oscuro polls the host from the main loop instead of a timer interrupt, debounces an unplug by time and samples, sends caller-supplied packets and reaches the registers as `usbdev.c` does. The MPL-covered source and modifications remain available under MPL-2.0; [the licence text](LICENSE-MPL-2.0.txt) is included here. No GPL-only Melodee source was copied.