This document explains how the Melodics app stores songs like "Self Esteem" on macOS.
~/Library/Application Support/Melodics/Melodics/42VGQ2OQOL01/
├── data/drums/songs/
│ ├── lessons.json # Index of all drum songs with metadata
│ └── lesson/
│ └── DJ3LZP3NV45N.json # Individual lesson file for each difficulty
├── data/drums/instrument/
│ ├── selfesteem_dr_t.json # Backing track instrument config
│ └── samples/
│ └── selfesteem_dr_t_sample.json # Sample mappings
├── midi/ # 837 .mpk files (encrypted MIDI packages)
└── samples/ # 733 .spk files (encrypted sample packages)
Contains an index of all songs with metadata:
- Song title, artist ("Self Esteem" by The Offspring)
- Difficulty levels (Beginner, Intermediate)
- Grade, genres, tags
- Preview URLs, album art
- UIDs for each lesson version
Each lesson file (e.g., DJ3LZP3NV45N.json) contains:
Musical data:
- BPM (105)
- Time signature (4/4)
- Key signature
Download links:
- URLs for MIDI (.mpk) files
- URLs for sample (.spk) files
Song structure:
- Array of "steps" (Intro, Verse, Chorus, Bridge, etc.)
- Each step includes:
- Number of bars
- Description
- User progress/scores
MIDI references for each section:
backing_midi: Background track (e.g., "B1.mid")user_midi_left: Left-hand part (e.g., "LH1.mid")user_midi_right: Right-hand part (e.g., "RH1.mid")
Instrument configurations:
- References to JSON files for drum kits and backing tracks
Sample mappings:
- MIDI note numbers → audio file paths
Download secret:
- Field
download_secret(e.g., "8sa78sa786jk352") - possibly for decryption
- Melodics Package files containing MIDI data
- Encrypted with proprietary encryption scheme
- Stored with MD5-like hash names for caching/security
- File size: ~10-20KB for typical song
- Sample Package files containing audio samples
- Encrypted with proprietary encryption scheme
- Stored with MD5-like hash names
For "Self Esteem - Beginner" level:
- Metadata in
lessons.jsonpoints to lesson UIDDJ3LZP3NV45N - Lesson file
DJ3LZP3NV45N.jsondefines the song structure with 7 steps (sections) - Each step references MIDI files:
- B1-B7 for backing tracks
- LH1-LH7/RH1-RH7 for user parts (left/right hand)
- Sample configs map MIDI notes to audio files (drums, backing track stems)
- The .mpk and .spk files are downloaded and cached with hash names
The system cleverly separates:
- What to play (JSON configuration)
- How it sounds (sample mappings)
- The actual data (encrypted .mpk/.spk files)
This allows Melodics to:
- Update songs without redistributing large files
- Share samples across multiple lessons
- Protect content while keeping it locally cached for performance
- Organize lessons by difficulty while reusing the same backing tracks
The following methods were tested to extract MIDI from .mpk files:
- Simple XOR with
download_secret - XOR with hashed secret (MD5, SHA256 of secret)
- AES Encryption:
- AES-128/256 ECB mode
- AES-128 CBC mode (with IV from file header)
- Keys derived from MD5/SHA256 of secret
- Combined keys:
- secret + file hash
- secret + lesson UID
- Compression:
- zlib decompression
- gzip decompression
The .mpk and .spk files use a proprietary encryption/obfuscation scheme that:
- Is not standard XOR, AES, or simple compression
- Likely serves as DRM to protect licensed content
- Would require reverse engineering the Melodics binary to decrypt
File structure observations:
- No standard magic bytes (not MIDI "MThd", not ZIP "PK")
- File starts with:
384321e7...(varies by file) - Appears to be encrypted or heavily obfuscated
- The
download_secretfield may be part of the encryption scheme but not in a straightforward way
Use disassemblers to analyze the Melodics binary:
- Tools: Hopper, Ghidra, IDA Pro
- Target:
/Applications/Melodics.app/Contents/MacOS/Melodics - Goal: Find the decryption routine in the C++ code
Intercept decrypted data at runtime:
- Tool: Frida or similar dynamic instrumentation
- Method: Hook the process and capture MIDI data after decryption
- Advantage: Don't need to understand the encryption
- Search for existing tools: "melodics mpk decrypt"
- Check GitHub for reverse engineering projects
- Look for community forums discussing Melodics data extraction
- Check if Melodics offers MIDI export feature
- Contact Melodics support about exporting practice data
- May be available as a paid feature or for educational use
{
"uid": "DJ3LZP3NV45N",
"song_title": "Self Esteem",
"artist": "The Offspring",
"title": "Beginner",
"grade": 5,
"bpm": 105,
"beatsperbar": 4,
"genres": ["Rock"],
"tags": ["1/8 notes"],
"download_secret": "8sa78sa786jk352",
"download_midi_link": "https://api-cdn.melodics.com/assets/lessons-download/4161bb4287d84d0cf3cad8605f1ebfa3.mpk",
"steps": [
{
"title": "Intro",
"bars": 7,
"backing_midi": "B1.mid",
"user_midi_left": "LH1.mid",
"user_midi_right": "RH1.mid"
}
]
}- Application:
/Applications/Melodics.app - User data:
~/Library/Application Support/Melodics/Melodics/ - User ID directory:
42VGQ2OQOL01(varies by user/session) - Cached MIDI files:
~/Library/Application Support/Melodics/Melodics/42VGQ2OQOL01/midi/*.mpk - Cached samples:
~/Library/Application Support/Melodics/Melodics/42VGQ2OQOL01/samples/*.spk
While the song metadata and structure are stored in easily readable JSON format, the actual MIDI and audio data are protected by proprietary encryption. Extracting this data would require either reverse engineering the application or using runtime interception techniques. For legitimate use cases, contacting Melodics for official export options is recommended.