![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/public_html/ |
# Metadata Extraction & Default Settings ## How Metadata is Extracted The system uses a **3-tier priority system** to determine track metadata: 1. **API Response** (Highest Priority) - If the music generation API returns metadata, it's used first 2. **Prompt Parsing** (Second Priority) - If API doesn't provide, the system parses your prompt text 3. **Default Values** (Lowest Priority) - If neither API nor prompt contains the info, defaults are used ## Default Settings When metadata is not provided by the API or found in your prompt, these defaults are applied: | Field | Default Value | Notes | |-------|--------------|-------| | **Genre** | `Electronic` | Most common genre | | **BPM** | `Random(80-160)` | Randomly selected between 80-160 BPM | | **Key** | `C major` | Most common musical key | | **Mood** | `neutral` | Neutral/balanced mood | | **Time Signature** | `4/4` | Standard time signature | | **Energy** | `medium` | Medium energy level | | **Instruments** | `['synthesizer']` | Default instrument array | ## Prompt Parsing Formats Supported The system can extract metadata from your prompt in these formats: ### BPM/Tempo - `BPM: 150` - `150 BPM` - `tempo: 150` - `Tempo 150` ### Genre/Style - `Style: Psytrance / Psy Chill` - `Genre: Electronic` - Keywords: `psytrance`, `psy chill`, `electronic`, `house`, `techno`, `pop`, `rock`, `jazz`, etc. ### Key - `Key: 6B – D Major` - `Key: D Major` - `D Major` (standalone) - Supports: C, D, E, F, G, A, B (with #/b) + major/minor ### Mood/Theme - `Theme: Love as Frequency` - `Mood: energetic` - Keywords: `love` → Romantic, `unity` → Peaceful, `frequency` → Energetic - Also: happy, sad, energetic, chill, relaxing, aggressive, uplifting, dark, etc. ## Example **Your Prompt:** ``` Key: 6B – D Major BPM: 150 Style: Psytrance / Psy Chill Theme: Love as Frequency — Unity as V... ``` **What Gets Extracted:** - ✅ **BPM**: `150` (from "BPM: 150") - ✅ **Genre**: `Psytrance` (from "Style: Psytrance / Psy Chill") - ✅ **Key**: `D Major` (from "Key: 6B – D Major") - ✅ **Mood**: `Romantic` (from "Theme: Love as Frequency") **If API doesn't provide these, the parsed values will be used instead of defaults!** ## Logging All metadata extraction is logged to `callback_log.txt` showing: - What the API returned - What was parsed from your prompt - What defaults were used - Final values applied Check the log file to see exactly what happened for each track.