Expand description
AUDIO_HAXOR — Tauri v2 desktop app for audio plugin management.
This crate provides the Rust backend for scanning audio plugins (VST2/VST3/AU/CLAP), audio samples, DAW project files, and presets. It includes KVR Audio version checking, scan history with diffing, and export to JSON/TOML/CSV/TSV/PDF.
§Modules
scanner— Plugin filesystem scanner with architecture detectionscanner_skip_dirs— Shared directory-name blocklist for recursive scansaudio_extensions— Canonical audio sample extension list (scanner, walker, App Info)audio_scanner— Audio sample discovery and metadata extractiondaw_scanner— DAW project scanner (14+ formats)preset_scanner— Plugin preset discoveryaudio_engine— Spawns theaudio-engineAudioEngine (JUCE: devices, playback, VST3/AU scan) via stdin/stdout JSONkvr— KVR Audio scraper and version checkerhistory— Scan history persistence, diffing, and preferencescontent_hash— SHA-256 file hashing for byte-identical duplicate detection
Modules§
- app_
i18n - App UI strings for i18n: seeded into SQLite (
app_i18ntable) fromi18n/app_i18n_en.json(toasts, menus, tray, HTMLdata-i18n*, dialogs). Localescs,da,de,es,es-419,sv,fr,nl,pt,pt-BR,it,el,pl,ru,zh,ja,ko,fi,nb,tr,hu,ro,uk,vi,id,hiadd rows with the same keys. - audio_
engine - AudioEngine subprocess: the main app spawns the
audio-engineJUCE binary (audio-engine/CMake target), sends JSON lines on stdin, reads one JSON line per request. Keeps one child process alive (stdin loop in the AudioEngine) so stream state and IPC stay cheap. On app quit,shutdown_audio_engine_childruns from TauriRunEvent::Exit/ExitRequestedand fromlibc::atexitso the AudioEngine is always terminated with the host.AUDIO_HAXOR_PARENT_PIDis set at spawn so the AudioEngine can exit if the host disappears without cleanup (e.g. macOS force quit / SIGKILL). - audio_
extensions - Canonical audio sample extensions for the library scanner, unified walker, file watcher, and Settings → App Info. Keep in one place so UI labels match indexing.
- audio_
scanner - Audio sample file scanner with metadata extraction.
- bpm
- BPM estimation via onset-strength autocorrelation.
- bulk_
stat - Bulk directory enumeration + metadata fetch in a single syscall.
- content_
hash - Byte-level duplicate detection: SHA-256 over file contents.
- daw_
scanner - DAW project file scanner supporting 14+ DAW formats.
- db
- SQLite database layer for scalable storage of audio samples, analysis caches, and scan metadata. Replaces JSON file persistence for data that can grow to millions of rows.
- file_
watcher - Filesystem watcher for auto-scanning new/changed audio files, DAW projects, presets, plugins, PDFs, and MIDI.
- history
- key_
detect - Musical key detection via chromagram analysis.
- kvr
- KVR Audio scraper and plugin version checker.
- lufs
- LUFS (Loudness Units Full Scale) measurement per ITU-R BS.1770.
- midi
- MIDI file parser — extracts metadata from Standard MIDI Files (.mid/.midi).
- midi_
scanner - MIDI file scanner — dedicated walker independent of the preset scanner.
- native_
menu - Native application menu bar — labels from SQLite
app_i18n(seeappFmtkeysmenu.*). - open_
with_ 🔒app - Cross-platform open file with named application for context menus and the command palette.
- path_
norm - Filesystem path strings as stored in SQLite: shorter keys on macOS.
- pdf_
meta - PDF metadata extraction (page count).
- pdf_
scanner - PDF file scanner.
- preset_
scanner - Plugin preset file scanner.
- scanner
- Plugin filesystem scanner for VST2, VST3, Audio Unit, and CLAP plugins.
- scanner_
skip_ dirs - Directory names skipped during recursive filesystem scans.
- similarity
- Audio similarity search via spectral fingerprinting.
- tray_
menu - System tray / menu bar icon: playback controls, dynamic title + tooltip, popup menu, and (non-Linux) a WebView popover styled like macOS Now Playing (no artwork).
- tray_
popover_ 🔒escape_ macos - Tray popover: Escape closes the window.
- unified_
walker - Unified filesystem walker — traverses a union of roots once and classifies files into audio/daw/preset/pdf buckets by extension.
- xref
- Cross-reference engine: extract plugin references from DAW project files.
Structs§
- Audio
Scan 🔒State - Build
Info - Package + git metadata baked in at compile time (
build.rs→AUDIO_HAXOR_GIT_*env vars). - DawScan
State 🔒 - Export
Payload - Export
Plugin - Midi
Scan 🔒State - Palette
Preview Result - Single IPC round-trip for Cmd+K inventory preview (same limits as six separate
db_query_*calls). - PdfScan
State 🔒 - Preset
Scan 🔒State - Scan
State 🔒 - Slow
Stats 🔒Snapshot - Disk + DB file sizes +
table_countsare expensive; the UI polls ~1 Hz. - Update
State 🔒 - Updated
Plugin 🔒 - Walker
Status 🔒 - Tracks active directory paths being walked by each scanner for live status display.
Constants§
- DIRECTORY_
SCAN_ INCREMENTAL_ DOMAIN - Domain string for SQLite
directory_scan_state— shared by unified and standalone walkers. - SLOW_
STATS_ 🔒TTL
Statics§
- APP_
START 🔒 - LOG_
VERBOSITY_ 🔒LEVEL - Cached
app.logverbosity:0= quiet (suppress selected normal-level chatter),1= normal,2= verbose (extra scan/KVR diagnostics). - PDF_
META_ 🔒EXTRACT_ ABORT - Set by
pdf_metadata_extract_abort; checked between PDF page-count extraction chunks so the UI can stop CPU-heavy work when the PDF tab is hidden or the window is idle. - SLOW_
STATS_ 🔒CACHE
Functions§
- app_
log_ verbose - Extra diagnostics when
logVerbosityisverbose.fruns only if verbose (noformat!cost otherwise). - append_
log 🔒 - audio_
engine_ 🔒eof_ watchdog_ start - audio_
engine_ 🔒eof_ watchdog_ stop - audio_
engine_ 🔒invoke - audio_
engine_ 🔒restart - audio_
history_ 🔒clear - audio_
history_ 🔒delete - audio_
history_ 🔒diff - audio_
history_ 🔒get_ detail - audio_
history_ 🔒get_ scans - audio_
history_ 🔒latest - audio_
history_ 🔒save - batch_
analyze 🔒 - Batch analyze: BPM + Key + LUFS for multiple files in parallel, save to SQLite. Analyzes files in parallel (rayon), batch-writes to DB, returns results directly so the frontend can update visible rows without extra IPC.
- blocking 🔒
- blocking_
res 🔒 - build_
audio_ 🔒engine_ process_ stats - build_
fingerprint_ 🔒cache - build_
process_ 🔒stats - cached_
slow_ 🔒stats - check_
updates 🔒 - clear_
log 🔒 - collect_
audio_ 🔒engine_ process_ metrics - compute_
fingerprint 🔒 - compute_
slow_ 🔒stats - daw_
history_ 🔒clear - daw_
history_ 🔒delete - daw_
history_ 🔒diff - daw_
history_ 🔒get_ detail - daw_
history_ 🔒get_ scans - daw_
history_ 🔒latest - daw_
history_ 🔒save - db_
audio_ 🔒filter_ stats - db_
audio_ 🔒library_ paths - db_
audio_ 🔒stats - db_
backfill_ 🔒audio_ meta - db_
cache_ 🔒stats - db_
clear_ 🔒cache_ table - db_
clear_ 🔒caches - db_
daw_ 🔒filter_ stats - db_
daw_ 🔒stats - db_
get_ 🔒analysis - db_
list_ 🔒scans - db_
midi_ 🔒filter_ stats - db_
migrate_ 🔒json - db_
pdf_ 🔒filter_ stats - db_
pdf_ 🔒stats - db_
plugin_ 🔒filter_ stats - db_
preset_ 🔒filter_ stats - db_
preset_ 🔒stats - db_
query_ 🔒audio - db_
query_ 🔒daw - db_
query_ 🔒midi - db_
query_ 🔒palette_ preview - db_
query_ 🔒pdfs - db_
query_ 🔒plugins - db_
query_ 🔒presets - db_
unanalyzed_ 🔒paths - db_
update_ 🔒analysis - Persist BPM, key, and LUFS together (same transaction and
bpm_exhaustedrules as batch analysis). - db_
update_ 🔒bpm - db_
update_ 🔒key - db_
update_ 🔒lufs - delete_
data_ 🔒file - delete_
file 🔒 - detect_
audio_ 🔒key - detect_
separator 🔒 - dotted_
extensions_ 🔒to_ upper_ tags - dsv_
escape 🔒 - estimate_
bpm 🔒 - export_
audio_ 🔒dsv - export_
audio_ 🔒json - export_
daw_ 🔒dsv - export_
daw_ 🔒json - export_
pdf 🔒 - export_
pdf_ 🔒impl - export_
pdfs_ 🔒dsv - export_
pdfs_ 🔒json - export_
plugins_ 🔒csv - export_
plugins_ 🔒json - export_
presets_ 🔒dsv - export_
presets_ 🔒json - export_
toml 🔒 - extract_
project_ 🔒plugins - find_
content_ 🔒duplicates - Byte-identical files across the scanned library (SHA-256 after grouping by stored size).
- find_
similar_ 🔒samples - foreign_
process_ 🔒cpu_ times_ us - Per-PID user+system CPU time in microseconds (same units as
libc::rusagetv_sec/tv_usec combined). Used so AudioEngine CPU% matches the header formula:(Δuser + Δsys) / Δwall * 100. - format_
size - Shared utility: format bytes to human-readable string.
- fs_
list_ 🔒dir - get_
active_ 🔒scan_ inventory_ counts - Per-category row counts for the header strip — library scope (one row per
path), not the current in-progressscan_id. Seedb::Database::active_scan_inventory_counts. - get_
app_ 🔒strings - get_
audio_ 🔒engine_ process_ stats - get_
audio_ 🔒metadata - get_
build_ 🔒info - get_
cpu_ 🔒percent - get_
cpu_ 🔒percent_ like_ rusage_ for_ pid - Same formula as
get_cpu_percent(getrusageuser+sys deltas vs wall clock), for another PID. - get_
file_ 🔒watcher_ status - get_
home_ 🔒dir - get_
midi_ 🔒info - get_
open_ 🔒fd_ count - get_
prefs_ 🔒path - get_
process_ 🔒info - get_
process_ 🔒stats - get_
rss_ 🔒bytes - get_
thread_ 🔒count - get_
toast_ 🔒strings - get_
unified_ 🔒scan_ run - get_
uptime_ 🔒secs - get_
version 🔒 - get_
virtual_ 🔒bytes - get_
walker_ 🔒status - gethostname 🔒
- history_
clear 🔒 - history_
delete 🔒 - history_
diff 🔒 - history_
get_ 🔒detail - history_
get_ 🔒scans - history_
latest 🔒 - import_
audio_ 🔒json - import_
daw_ 🔒json - import_
pdfs_ 🔒json - import_
plugins_ 🔒json - import_
presets_ 🔒json - import_
toml 🔒 - incremental_
directory_ 🔒scan_ enabled - kvr_
cache_ 🔒get - kvr_
cache_ 🔒update - list_
data_ 🔒files - load_
incremental_ 🔒dir_ state_ for_ walk - log_
shutdown 🔒 - log_
verbosity_ level - measure_
lufs 🔒 - midi_
history_ 🔒clear - midi_
history_ 🔒delete - midi_
history_ 🔒diff - midi_
history_ 🔒get_ detail - midi_
history_ 🔒get_ scans - midi_
history_ 🔒latest - midi_
history_ 🔒save - normalize_
fingerprint_ 🔒cache_ map - Fingerprint cache keys in SQLite are written with
normalize_path_for_db; align in-memory lookups and inserts socontains_keymatches paths from the UI (allAudioSamples). - open_
audio_ 🔒folder - open_
daw_ 🔒folder - open_
daw_ 🔒project - open_
fd_ 🔒count_ for_ pid - open_
file_ 🔒default - open_
pdf_ 🔒file - open_
plugin_ 🔒folder - open_
prefs_ 🔒file - open_
preset_ 🔒folder - open_
update_ 🔒url - open_
with_ 🔒app - palette_
preview_ 🔒empty - pdf_
history_ 🔒clear - pdf_
history_ 🔒delete - pdf_
history_ 🔒diff - pdf_
history_ 🔒get_ detail - pdf_
history_ 🔒get_ scans - pdf_
history_ 🔒latest - pdf_
history_ 🔒save - pdf_
metadata_ 🔒extract_ abort - pdf_
metadata_ 🔒extract_ batch - pdf_
metadata_ 🔒get - pdf_
metadata_ 🔒unindexed - Paths in the PDF library (
pdf_library) with nopdf_metadatarow yet — used to kick off background page-count extraction for the whole inventory, not only the latest scan. - persist_
incremental_ 🔒dir_ state_ after_ walk - plugins_
to_ 🔒export - prefs_
get_ 🔒all - prefs_
remove 🔒 - prefs_
save_ 🔒all - prefs_
set 🔒 - prepare_
unified_ 🔒scan - Clears unified stop flags before the
scan_unifiedinvoke (after the frontend’s listener-registration delay). Without this,scan_unifiedwould resetstop_scanto false at entry and erase a Stop All that happened during that delay — scans looked like they “could not stop”. - preset_
history_ 🔒clear - preset_
history_ 🔒delete - preset_
history_ 🔒diff - preset_
history_ 🔒get_ detail - preset_
history_ 🔒get_ scans - preset_
history_ 🔒latest - preset_
history_ 🔒save - read_
als_ 🔒xml - read_
als_ 🔒xml_ impl - read_
binary_ 🔒project - Read any binary DAW project file and return a structured JSON tree.
- read_
binary_ 🔒project_ inner - read_
bwproject 🔒 - read_
cache_ 🔒file - read_
log 🔒 - read_
project_ 🔒file - Generic project file reader: returns {type: “xml”|“tree”, content: …} XML formats get raw XML string, binary formats get structured JSON tree.
- read_
text_ 🔒file - read_
zip_ 🔒xml - Read XML from a ZIP archive (Studio One, DAWproject).
- refresh_
log_ 🔒verbosity_ from_ prefs - refresh_
native_ 🔒menu - Rebuild the native menu bar from SQLite
app_i18nfor the current UI locale (after changing language in Settings). - rename_
file 🔒 - resolve_
kvr 🔒 - resolve_
ui_ 🔒locale - run
- scan_
audio_ 🔒samples - scan_
daw_ 🔒projects - scan_
midi_ 🔒files - scan_
pdfs 🔒 - scan_
plugins 🔒 - scan_
presets 🔒 - scan_
unified 🔒 - should_
suppress_ 🔒app_ log_ line - start_
file_ 🔒watcher - stop_
audio_ 🔒scan - stop_
daw_ 🔒scan - stop_
file_ 🔒watcher - stop_
midi_ 🔒scan - stop_
pdf_ 🔒scan - stop_
preset_ 🔒scan - stop_
scan 🔒 - stop_
unified_ 🔒scan - stop_
updates 🔒 - thread_
count_ 🔒for_ pid_ non_ sysinfo - write_
app_ log - Public log-append entry point callable from any module. Writes a
timestamped line to
<data-dir>/app.log, rotating to.log.1at 5MB. Theappend_logTauri command delegates to this. - write_
app_ 🔒log_ line - write_
app_ log_ verbose - Like
app_log_verbosewhen the message is already aString. - write_
cache_ 🔒file - write_
text_ 🔒file