What is this? / これは何か?
A real-time additive synthesis engine implemented on FPGA (A project to port the implementation from the Terasic C5G to the Terasic DE10-nano and Cyclone V SoC in 2020), running 10,240 independent sinusoidal oscillators simultaneously with:
- 1-sample output latency (~20 µs at 48 kHz)
- 0.001 Hz frequency resolution per bin
- Constant compute load — silence and a full orchestral scene require identical processing (~10 billion ops/sec)
FPGA(2020年にTerasic C5Gへの実装からTerasic DE10-nano, Cyclone V SoCへの移植プロジェクト)上に実装されたリアルタイム加算合成エンジン。10,240本の独立正弦波オシレータを同時駆動し、1サンプル遅延・ビンあたり0.001Hz分解能・常時一定の演算負荷(秒間約100億演算)を実現する。
The Core Insight / 核心的な洞察
By controlling only the bin parameters (frequency, amplitude, phase) of an iDFT engine, every known synthesis paradigm becomes a special case.
iDFTエンジンのビンパラメータ(周波数・振幅・位相)の与え方だけで、あらゆる既知の合成パラダイムを包含できる——FM・加算・ポリゴナル・スペクトルフラクタルがすべて同一ハードウェアの特殊ケースとなる。
| Synthesis Method | Bin Frequency | Bin Amplitude |
|---|---|---|
| FM Synthesis | ωc ± nωm | Jₙ(β) |
| Polygonal + Bessel | (kN+1)ω₀ − nωm | cₖ(N)·Jₙ(kNβ) |
| Geometric / Fractal | f₀·rᵏ | r^(−αk) |
| Cantor Spectrum | Cantor set positions | Cantor measure |
| 1/fᵅ Noise | Log-spaced | fₖ^(−α/2) |
| Shepard Tone | f₀·2ᵏ | Bell envelope |
| Physical Model | Mode frequencies | Modal amplitudes |
The FM Connection / FMとの接続
The Chowning FM equation:
sin(ωct + β·sin ωmt) = Σ Jₙ(β)·sin[(ωc + nωm)t]
means FM sideband amplitudes are Bessel function values Jₙ(β). In this engine, those amplitudes are set directly — FM becomes one special case of a far more general spectral control system.
ChowningのFM方程式は、FM側波帯振幅がベッセル関数値Jₙ(β)であることを意味する。本エンジンではその振幅を直接設定できるため、FMはより汎用的なスペクトル制御系の特殊ケースとなる。
Hardware / ハードウェア
| Item | Spec |
|---|---|
| Board | Terasic DE10-nano (Cyclone V SoC 5CSEBA6U23I7) |
| FPGA Fabric | 110k LEs, 112 DSP blocks |
| ARM HPS | Dual Cortex-A9 @ 800 MHz |
| Sample Rate | 48 kHz |
| Bin Count | 10,240 (2,048 bins × 5 parallel modules) |
| Clock | 100 MHz per module |
| Output | 24-bit DAC via I²S |
| Control I/F | Gigabit Ethernet (UDP), AXI bridge ARM↔FPGA |
The physical layer was first verified on a Terasic C5G board in autumn 2020 as an 80-voice polyphonic additive synthesizer (128 bins, MIDI-CC controlled from MAX8). That prototype validated the core compute architecture. Detailed account in Build Log #2.
物理層は2020年秋、Terasic C5Gボード上に80音ポリフォニック128ビン加算合成シンセサイザー(MAX8からMIDI-CC制御)として実装済み。本アーキテクチャの計算基盤の実現可能性を実証している。詳細は Build Log #2 にて。
Why 11th-order Maclaurin? / なぜ11次マクローリン展開か?
Most FPGA sine generators use ROM lookup tables or CORDIC. This engine uses direct 11th-order Maclaurin expansion via Horner's method:
sin(x) ≈ x − x³/3! + x⁵/5! − x⁷/7! + x⁹/9! − x¹¹/11! Error ≈ |x|¹³/13! ≈ 1.3×10⁻⁷ (≈ 23-bit precision)
Four reasons / 4つの理由:
- Verifiability — Coefficients are 1/n!, a mathematical necessity. No black boxes. / 係数は1/n!という数学的必然。誰でも検証・移植できる。
- Pipeline-natural — Horner's method maps perfectly to a fixed-latency DSP pipeline, one result per clock. / Horner法は固定レイテンシDSPパイプラインに完璧に対応し、毎クロック1演算が得られる。
- No memory contention — 2,048 bins share one pipeline; no BRAM port conflicts. / 2,048ビンが単一パイプラインを時分割し、ROMベースのBRAMポート競合を完全回避。
- Phase precision preserved — Phase feeds the polynomial directly; no table-indexing quantization loss. / 位相を多項式に直接入力するためテーブルインデックス量子化損失がない。
Full mathematical derivation and pipeline diagram in Build Log #1. 完全な数式導出とパイプライン図は Build Log #1 にて。
3-Layer Architecture / 3層アーキテクチャ
┌─────────────────────────────────────────────────┐ │ LAYER 01: PC (Abstraction / 抽象層) │ │ - High-level sound design language │ │ - Open Prompt: LLM-collaborative bin generation│ │ - Musical scene description, sequencer, UI │ └────────────────────┬────────────────────────────┘ │ GbE · UDP stream ┌────────────────────▼────────────────────────────┐ │ LAYER 02: ARM HPS (Middle / ミドル層) │ │ - Abstract → 10,240 bin expansion │ │ - Note events, polyphony management │ │ - Per-bin envelope / LFO @ 1 kHz │ │ - AXI bridge DMA to FPGA │ └────────────────────┬────────────────────────────┘ │ AXI bridge · GB/s on-chip ┌────────────────────▼────────────────────────────┐ │ LAYER 03: FPGA (Physical / 物理層) │ │ - 5 × 2,048-bin Maclaurin pipeline modules │ │ - 32-bit+ phase accumulators (NCO) │ │ - 10,240-bin adder tree → 48 kHz/24-bit DAC │ └─────────────────────────────────────────────────┘
100 MHz × 5 modules × ~20 ops/bin ≈ 10,000,000,000 ops/sec This number does not change whether output is silence or a full scene. 出力が無音でも壮大な音楽シーンでも、この数値は変わらない。
iDFT / SDFT Duality — Toward Robotic Sensing / iDFT・SDFT二重性とロボティクス応用
An iDFT bin and an SDFT (Sliding DFT) bin share nearly identical hardware:
iDFT: yk[n] = Ak · e^j(ωkn + φk) (synthesis output) SDFT: Xk[n] = e^j2πk/N · (Xk[n-1] + x[n] − x[n-N]) (analysis input)
A mixed iDFT/SDFT bin pool enables:
- Active sensing — emit a selective-frequency impulse via iDFT, analyze the piezo response via SDFT
- Vibration analysis at 0.001 Hz resolution for material recognition
- High-resolution robotic tactile sensors (fingertip / sole) as a near-term application
iDFT/SDFT混在ビン構成により、能動センシング(iDFTで選択周波数インパルスを出力し、SDFTでピエゾ素子の応答を解析)、0.001Hz分解能の振動解析による素材認識、高分解能ロボット触覚センサへの応用が見えてくる。
This creates a direct bridge from audio synthesis to state-of-the-art robotics research — and a natural cross-disciplinary collaboration point for STEAM education contexts.
これは音響合成と最先端ロボット研究の直接的な接続点となり、STEAM教育における学際的コラボレーションの架け橋になる。
Open Prompt — Beyond Open Source / オープンプロンプト:オープンソースを超えて
This project introduces Open Prompt as a knowledge-sharing paradigm for the LLM era:
LLM時代の知識共有の新しいパラダイムとしてオープンプロンプトを提唱する:
| Open Source | Open Prompt | |
|---|---|---|
| What is distributed / 配布物 | Source code / ソースコード | Architecture + mathematics / アーキテクチャ+数理記述 |
| Reproduction / 再構成 | Fork and modify / フォークして改変 | Regenerate with LLM / LLMと共に再生成 |
| Ownership / 所有権 | Derivative of original / 元コードの派生物 | Each implementer owns a genuine original / 各実装者が真のオリジナルを所有 |
| Commercial use / 商用利用 | License-governed / ライセンスに従う | Structurally free / 構造的に自由 |
The 11th-order Maclaurin coefficients are 1/n! — a mathematical necessity, not a creative choice. Anyone who understands the architecture can regenerate their own implementation with any capable LLM.
11次マクローリンの係数は1/n!——創造的選択ではなく数学的必然。アーキテクチャを理解した者は誰でもLLMで自分の実装を再生成できる。
Code is ephemeral; the knowledge architecture is the commons. コードは一時的生成物、知識こそが共有財産。
The full Open Prompt declaration will appear in Build Log #4. オープンプロンプト宣言の全文は Build Log #4 にて。
Current Status / 現在のステータス
- ✅ 2020 — C5G prototype: 2,048-bin × 5 modules, 80-voice poly, MIDI-CC control, public demo recorded 2020.11.18
- 🔄 In Progress — DE10-nano port, ARM HPS integration, 10,240-bin scale verification
- 📋 Next — GbE UDP protocol, PC abstraction layer, fractal bin generators
- 🎯 Goal — Open Prompt release, STEAM curriculum design, NIME / ICMC paper submission
Follow the Build Logs for ongoing progress. / 進捗は Build Logs にて随時更新。
License / ライセンス
Open Prompt — distributed as architectural knowledge, not as source code. The mathematical descriptions, design rationale, and architectural documentation are in the public domain. Individual implementations regenerated from this architecture are the sole property of each implementer.
オープンプロンプト — ソースコードではなくアーキテクチャ知識として配布。数理的記述・設計根拠・アーキテクチャ文書はパブリックドメイン。本アーキテクチャから再生成された各実装は、それぞれの実装者の単独所有物となる。
Built with FPGA, mathematics, and the conviction that knowledge shared is knowledge multiplied. FPGAと数学、そして「共有された知識は増殖する」という確信のもとに。
Tsuneo.Ohnaka