scan_audio_folder
Scan an audio folder for loops and extract BPM, key, and role from filenames. Returns parsed metadata and a distribution summary to help select loops for a REAPER session.
Instructions
Walk a folder for audio loops and parse metadata from filenames.
Returns every audio file (.wav, .mp3, .flac, .aif, .aiff, .ogg, .m4a)
with BPM, musical key, and role (kick / bass / pad / lead / fx / …)
extracted from the filename. Plus a summary of distributions so
the AI can quickly decide on a target BPM / key before picking loops.
Args:
path: Absolute folder path (e.g., D:/Music Production/Chillstep Express).
recursive: Walk subfolders too. Default True.
max_files: Stop after this many files. Default 500; max 5000.
Returns a structure with:
folder: resolved absolute path
total_files: how many matched
truncated: True if max_files hit before end
summary: BPM / key / role distributions + parse-failure counts
loops: list of { path, filename, duration_sec, size_mb, parsed: { bpm, key, role } }
hint: a one-line suggestion for the AI's next call
Files without parseable metadata are still listed; their fields
are null. Pair with transport_set_bpm + load_loops to turn the
selection into a working REAPER session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| recursive | No | ||
| max_files | No |