Module daw_scanner

Module daw_scanner 

Source
Expand description

DAW project file scanner supporting 14+ DAW formats.

Discovers Ableton, Logic, FL Studio, REAPER, Cubase, Pro Tools, Bitwig, Studio One, Reason, Audacity, GarageBand, Ardour, and DAWproject files. Handles macOS package directories (.logicx, .band) and validates GarageBand bundles by internal structure.

.ptx/.ptf are validated by the Pro Tools session BOF signature (PRONOM fmt/1727 / fmt/1951; Library of Congress FDD fdd000639) so unrelated files that reuse .ptx (e.g. NVIDIA CUDA assembly) are not listed as DAW projects.

readdir(3) reports symlinks as neither file nor directory; the walker stats symlink targets and classifies them (broken symlinks are skipped).

ConstantsΒ§

BACKUP_DIRS πŸ”’
Additional directories to skip when not including Ableton backups/crashes. Ableton stores auto-saved backup Live Sets in a β€œBackup” folder and crash recovery sets in a β€œCrash” folder inside each project directory.
DAW_EXTENSIONS πŸ”’
File extensions for DAW project files. Includes both single-file formats and macOS bundle/package formats.
PACKAGE_EXTENSIONS πŸ”’
Extensions that are macOS packages (directories with these extensions should be treated as files, not recursed into).
PLUGIN_BUNDLE_EXTENSIONS πŸ”’
Plugin bundle extensions β€” directories with these extensions should never be recursed into by the DAW scanner. They contain plugin code and presets, not DAW projects.
PRO_TOOLS_SESSION_MAGIC πŸ”’
BOF bytes shared by Pro Tools .ptx (v10+) and .ptf/.pts session files. See UK National Archives PRONOM fmt/1727 / fmt/1951; LOC FDD fdd000639.

FunctionsΒ§

daw_name_for_format
ext_matches
format_size
get_daw_roots
get_directory_size πŸ”’
get_directory_size_depth πŸ”’
is_daw_extension_lowercase πŸ”’
Path::extension() lowercased, no dot β€” used by the file watcher to match DAW_EXTENSIONS.
is_package_ext
is_valid_band_package πŸ”’
Validate that a .band directory is actually a GarageBand project. Checks for projectData binary plist (must start with β€œbplist”) AND requires at least one other GarageBand-specific marker to eliminate false positives from other macOS bundles that happen to use .band extension.
is_valid_pro_tools_session_file
Returns true if path is a regular file whose first bytes match the Pro Tools session format (same check for .ptx and .ptf).
normalize_macos_path πŸ”’
walk_dir_parallel πŸ”’
walk_for_daw