Stem splitting feature has been implemented and tested standalone. Ready for AceForge build integration.
cdmf_stem_splitting.py- Core stem splitting logic using Demucscdmf_stem_splitting_bp.py- Flask blueprint for stem splitting routesstatic/scripts/cdmf_stem_splitting_ui.js- Frontend UI logictest_stem_splitting_simple.sh- Integration test scripttest_stem_splitting_standalone.py- Standalone Demucs testaudiotest.mp3- Test audio file (460KB).github/workflows/test-stem-splitting.yml- CI workflow
cdmf_template.py- Added Stem Splitting tab and formmusic_forge_ui.py- Registered stem splitting blueprintcdmf_state.py- Added STEM_SPLIT_STATUScdmf_models.py- Added/models/stem_split/statusand/ensureroutescdmf_presets_ui.js- Added "copy settings" support for stem split tracksrequirements_ace_macos.txt- Addeddemucs==4.0.1CDMF.spec- Added Demucs to hiddenimports and data collectionbuild_local.sh- Added Demucs installation step
- ✓ Demucs imports successfully
- ✓ Device selection works (MPS/CPU)
- ✓ Model check works
- ✓ 2-stem separation successful (vocals/instrumental)
- ✓ Files created with proper naming:
audiotest_stems_vocals.wav,audiotest_stems_instrumental.wav - ✓ Files saved to DEFAULT_OUT_DIR:
~/Library/Application Support/AceForge/generated/ - ✓ Metadata saved correctly
- ✓ Files appear in Music Player
-
Build the app:
./build_local.sh
-
Verify Demucs is included: The build script will install Demucs and verify it imports correctly.
-
Test the built app:
./test_stem_splitting_simple.sh audiotest.mp3
- Launch AceForge.app
- Navigate to Stem Splitting tab
- Check model status:
- Should show "Demucs model is not downloaded yet" notice
- "Download Demucs models" button should be visible
- Download models:
- Click "Download Demucs models"
- Wait for download to complete (progress bar should show)
- Notice should disappear, "Split Stems" button should be enabled
- Test stem splitting:
- Upload
audiotest.mp3(or any audio file) - Select 2-stem mode
- Click "Split Stems"
- Wait for processing (progress bar should update)
- Verify files appear in Music Player:
audiotest_stems_vocals.wavaudiotest_stems_instrumental.wav
- Upload
- Verify file locations:
- Files should be in:
~/Library/Application Support/AceForge/generated/ - Not in subdirectories (directly in generated/)
- Files should be in:
- Test "Copy Settings" button:
- Click ⧉ button on a stem track in Music Player
- Should switch to Stem Splitting tab
- Form should be populated with settings
- First use: User sees "Download Demucs models" notice and button
- After download: Notice disappears, "Split Stems" enabled
- During split: Progress bar shows real-time progress
- After split: Files appear in Music Player with
_stems_naming - File location: All stems in DEFAULT_OUT_DIR (not subdirectories)
- Naming:
{input_basename}_stems_{stem_name}.wav
- Demucs models download on first use (~80MB for htdemucs)
- Processing time depends on file length and device (MPS faster than CPU)
- Temporary Demucs structure is cleaned up automatically
- Model check may show "absent" until first successful download