RTA for Digitakt
An octave-band real-time analyzer for the original Digitakt (Mk1), OS 1.53, as an elekloader mod. It shows the frequency balance of the main outputs or of the inputs as a popup over any page.
USE AT YOUR OWN RISK. This modifies your instrument's firmware. Back up your projects and sounds, and keep a stock OS 1.53 file for recovery.
Use
| Keys | What they do |
|---|---|
| FUNC + DOWN, tap | Opens the analyzer; it stays open |
| FUNC + DOWN, hold | Shows the analyzer until you let go, for a quick check |
| FUNC + DOWN or NO | Closes it |
| LEFT / RIGHT | While it is open: choose the source |
- Sources:
OUT L,OUT R,OUT L+R(the main outputs, after effects, master compressor and level) andIN L,IN R,IN L+R. - 10 bars, one per octave, from 31 Hz to 16 kHz.
- The scale runs from 0 dB (a full-scale sine) down to −60 dB, with a dotted line every 12 dB.
- Bars rise at once and fall at 20 dB/s. A peak mark holds for 1.5 s.
CPU nnin the title is the analysis' share of the UI's time.- On busy projects (many Sophie or STRING tracks) it can reach the top.
- The audio is never affected; only the UI and the bars slow down.
- While the analyzer is closed it costs nothing.
How it works
- Events only. It patches no firmware bytes: it uses only elekloader core's events (render entry and exit, keys, UI tick, draw). It can be installed with Sophie, STRING, digihealth and other mods.
- Tap (
tap.c):- At render exit, the audio interrupt copies the block just computed into an 8 KB ring, as mono int16. The block comes from the DMA buffer that feeds the outputs, or from the one filled by the inputs.
- The copy takes 32 samples per block and runs only while the analyzer is open.
- Analysis (
rta.c), in the UI task:- High bands, 500 Hz – 16 kHz: a 1024-point FFT at 48 kHz.
- Low bands, 31 – 250 Hz: a 512-point FFT of a 3 kHz stream, made by a CIC decimator.
- Both use a Hann window, fixed-point maths and no EMAC.
- Each band is the sum of its bins' power.
- At most one FFT per UI tick, so the work per tick stays bounded.
- UI (
ui.c): keys, the popup, bars and peaks.
The design and its history are in SPEC.md.
Build (developers)
You need the ColdFire cross toolchain, Python 3 (standard library only),
elekloader and your own stock OS 1.53 .syx.
make test # host tests: FFT against a reference DFT, band levels, noise, ballistics
make cross-check # compile for the Digitakt's ColdFire
From the elekloader checkout:
STOCK=/path/to/Digitakt_OS1.53.syx
python3 -m elekloader.sdk.build mods/core --stock $STOCK
python3 -m elekloader.sdk.build /path/to/digirta --stock $STOCK
python3 -m elekloader.patch --stock $STOCK \
--mod mods/core/out/core-2.1.elemod \
--mod /path/to/digirta/out/digirta-0.3.0.elemod \
--out Digitakt_OS1.53_RTA.syx --version R003
python3 scripts/gen_tables.py > rta_tables.inc regenerates the window,
twiddle and band tables.
All addresses are for Digitakt Mk1 OS 1.53 only.
License
MIT, see LICENSE. Independent of, and not endorsed by, Elektron; it contains no Elektron firmware.
