Sonic Terrain — local download (with Demucs)
============================================

Stem separation runs on YOUR computer — not on cyrillstruebi.ch.

Mac blocked “unverified developer”?  →  Open OPEN-FIRST.html in this folder first.


Requirements
------------
• Node.js 18+     https://nodejs.org
• Python 3        https://www.python.org/downloads/
• Demucs (Python) — installed once via setup below


EASIEST: Terminal (works on every Mac)
--------------------------------------
1. Unzip this folder.
2. Open Terminal (Programme → Dienstprogramme → Terminal)
3. Drag the sonic-terrain-local folder into Terminal, then add:

   cd 
   (space after cd — then drop folder — then press Enter)

4. Paste these lines one at a time:

   xattr -dr com.apple.quarantine .
   chmod +x setup-demucs.sh start.sh
   ./setup-demucs.sh
   ./start.sh

5. Browser opens http://127.0.0.1:4173/


Alternative: .command files (double-click)
------------------------------------------
If macOS shows “nicht verifiziert / unverified developer”:

   • Right-click (Rechtsklick) the file → Open (Öffnen) → Open again
   • NOT a normal double-click on the first try

Order:
   1. Setup Demucs.command   (once)
   2. Start Sonic Terrain.command


Phone on same Wi‑Fi
-------------------
Use “Start Sonic Terrain (LAN).command” (same Open steps as above)
On phone: http://YOUR-MAC-IP:4173/


Troubleshooting
---------------
• Gatekeeper / nicht verifiziert → use Terminal steps above
• Demucs not installed → run ./setup-demucs.sh again
• Port busy → PORT=4174 ./start.sh
• Stems fail → python3 -m demucs.separate --help
