nfunc

v0.3.5

A bench for auditing and staging a FLAC music library: a spectral quality scanner, a sampler, a mirror-tree builder and a video normaliser.

What it is

A desktop app for Apple and Linux. It listens above 16 kHz to tell real lossless audio from a lossy file dressed as FLAC, and sorts a library into five verdicts: lossless, uncertain, probably lossy, lossy and unknown. It cuts short preview clips of your tracks, and can publish them with Nostr.

The stack

Tauri 2 desktop binary, React 19, TypeScript, Tailwind v3. The frontend is Vite.

Scanning runs in Rust commands that shell out to ffmpeg and ffprobe, in parallel through rayon. Both need to be installed.

How the scan decides

For each file under the folder you choose:

ffprobe verifies the stream is really FLAC and reads its sample rate. Then ffmpeg -af highpass=f=16000,volumedetect measures the peak sample, in dBFS, in the high band.

Genuine lossless 44.1 kHz audio keeps measurable energy above 16 kHz — a peak typically between −10 and −45 dBFS. Lossy codecs cut everything above their bandwidth limit, so that peak is close to silence: well below −65 dBFS.

VerdictMeaning
LOSSLESSFLAC with a peak above 16 kHz of −35 dB or more, or a codec that is lossless by nature (ALAC, PCM, APE…)
UNCERTAINFLAC between the two thresholds — check by hand; quiet or ambient lossless can land here
PROBABLY-LOSSYFLAC with a peak above 16 kHz of −65 dB or less — likely a lossy source re-encoded as FLAC
LOSSYa codec that is lossy by design (MP3, AAC, Opus…) — honest about it
UNKNOWNffprobe or ffmpeg failed, or the codec is not recognised

It does not go by file size or compression ratio: those cannot tell real lossless from a re-encode.

The verdict is a heuristic, not proof. Drone, sub-bass and near-silent ambient tracks have nothing above 16 kHz even when they are fully lossless, and will read as probably lossy. Check a suspect track by listening, by its metadata, or in a spectrum viewer.

Get it

Version 0.3.5. Every release, and the source: GitHub.

Features

Quality scan
Every track in the library gets a verdict, and the window restores the last scan when you open it again.
Sampler
Cuts a short preview clip — about ten seconds — of each track, one release at a time or in a batch, and finds and prunes clips whose track has gone.
Mirror tree
Builds a second library tree alongside the first, and prunes what no longer belongs in it. On Linux the copy asks for administrator rights.
Video census and normalise
Classifies the older videos in a library and converts them to H.264/AAC mp4 that starts playing at once.
Released filter kind:31237
Narrows the library to the tracks whose release ndisc has already published.
how

It reads the list ndisc exports at ~/.local/share/ndisc-suite/published.json. That file is ndisc’s; ntree only reads it.

Clip-coverage bars
Each track row shows how much of the track its clip covers, with totals per album and artist.
Keys
Ctrl R scans again, Ctrl F goes to search, Esc clears the filter and the search. Double-click a track to open its folder.
What it remembers
The last scan, your theme and panel layout, the scan folder, where clips go and your relays.
where

Scan reports are cached as JSON in the app’s data directory — ~/.local/share/uk.fizx.audioflacqualitycheck/last_scan.json on Linux — not beside the program. The directory keeps the app’s first name on purpose, so earlier scans survive the renames.

Theme, the set of published clips and the panel flags are browser storage keys (afqc-tauri.theme, afqc-tauri.published, afqc-tauri.leftCollapsed, afqc-tauri.rightCollapsed). The scan folder, clip destination and relay list are in the app’s config store.

Nostr

Your key
Sign in with a key you have, or make one. It is kept in the operating system’s own store, never in browser storage.
  • Linux — the Secret Service (libsecret)
  • macOS — the Keychain
Publish clips kind:1063
The clip is uploaded to a file host, then announced on a relay as a file event that any client can play.
Feed kind:1063kind:7
A live list of published clips, which you can react to.
How Nostr does it

A clip is uploaded over HTTP (NIP-96), with the request signed by your key (NIP-98). The address that comes back goes into a file event of kind 1063 (NIP-94), sent to a relay. These are Nostr standards, so the clips are not tied to this suite.

One limit today: a published clip does not yet point back at the release it came from, so nothing on the network connects the two.

Event kinds

NIPs in play

  • NIP-94 file metadata — the clip event
  • NIP-96 uploading the clip over HTTP
  • NIP-98 signing the upload request
  • NIP-25 reactions in the feed

Still to come