Numeric kernel of atools: FFT, STFT codec and phase reconstruction, compiled to WASM for direct browser use
| File | Role |
|---|---|
| engine.mbt | ABI version and host-memory handshake |
| plan.mbt | Cached FFT tables |
| session.mbt | Fixed FFT workspace pool |
| pair.mbt | Two real transforms in one complex transform |
| fft.mbt | Complex FFT and one-sided real inverse |
| arena.mbt | Variable-size job memory |
| pghi.mbt | PGHI phase initialization |
| rtisi.mbt | RTISI-LA phase reconstruction |
| stub.mbt | Image metadata strip codec |
| Storage | Lifetime | Rule |
|---|---|---|
| Plan | Process, per window size | Read-only and cached |
| Slot | One transform session | Pool of six; always release |
| Arena | One PGHI, RTISI, or stub job | Owns one double and one byte segment |
moon build --release --deny-warn --target wasm
moon test --release --deny-warn --target wasm
moon bench --release --deny-warn --target wasm
moon check --deny-warn --target js
moon check --deny-warn --target native
moon fmt --checkfn forward(s : Int) -> Unitfn job_b(h : Int) -> FixedArray[Byte]fn job_d(h : Int) -> FixedArray[Double]fn job_open(dwords : Int, bytes : Int) -> Intfn pair_forward(s : Int) -> Unitfn pair_half_of(s : Int) -> Intfn pair_inverse(s : Int) -> Unitfn pair_off_of(s : Int, which : Int) -> Intfn pghi_off(h : Int, which : Int) -> Intfn pghi_open(frames : Int, bins : Int, win : Int, hop : Int, gamma : Double, tol_hi : Double, tol_lo : Double) -> Intfn pghi_run(h : Int) -> Intfn plan_cos_of(i : Int) -> FixedArray[Double]fn plan_hann_of(i : Int) -> FixedArray[Double]fn plan_rev_of(i : Int) -> FixedArray[Int]fn plan_sin_of(i : Int) -> FixedArray[Double]fn probe_check(h : Int, want_d : Int, want_b : Int) -> Intfn probe_stamp(h : Int) -> Intfn real_ifft(s : Int, bins : Int) -> Intfn rtisi_close(h : Int) -> Unitfn rtisi_finish(h : Int) -> Unitfn rtisi_levels(h : Int, which : Int) -> Intfn rtisi_off(h : Int, which : Int) -> Intfn rtisi_open(frames : Int, bins : Int, win : Int, hop : Int, samples : Int, iters : Int, has_warm : Int, has_band : Int, budget : Double) -> Intfn rtisi_run(h : Int, from : Int, to : Int) -> Intfn slot_mem_of(s : Int) -> FixedArray[Double]fn stub_decode(h : Int, n : Int) -> Intfn stub_decode_words(n : Int) -> Intfn stub_fits(w : Int) -> Intfn stub_luma(h : Int, w : Int, sr : Int, win : Int, exact : Int) -> Intfn stub_luma_bytes(w : Int) -> Intfn stub_paint(h : Int, w : Int, sr : Int, win : Int, exact : Int) -> Intfn stub_paint_bytes(w : Int) -> IntInstall
Download zipNumeric kernel of atools: FFT, STFT codec and phase reconstruction, compiled to WASM for direct browser use