fix: HUD-Klicks (Dialogebene schluckte sie); Musik durch CC0-Titel ersetzt

This commit is contained in:
torsten 2026-11-17 19:52:05 +01:00
parent a622c7c238
commit e213a7477a
109 changed files with 274 additions and 441 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -214,3 +214,7 @@ datum,endpoint_id,request_id,prompt,seed,lizenz
2026-11-17,fal-ai/flux-2/klein/9b,01a1ea04-d927-7080-8b18-87b559d42f91,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky dwarf cleric in a long robe over chainmail, holding a mace and a small holy symbol, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane",10106,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder"
2026-11-17,fal-ai/flux-2/klein/9b,01a1ea04-ef8d-7d92-a60a-662d7a008ca2,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky halfling mage in a deep blue hooded robe, holding a wooden staff, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane",10107,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder"
2026-11-17,fal-ai/flux-2/klein/9b,01a1ea05-08cd-7311-927e-120b3ba63e33,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky halfling rogue in a dark leather jerkin and a hood, holding a dagger, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane",10108,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder"
2026-11-17,opengameart/sunset-walk-ambient-quiet-sweet-loop,-,Sunset Walk / Ambient / Quiet / Sweet / Loop,KiluaBoy,"CC0 1.0 (OpenGameArt, https://opengameart.org/content/sunset-walk-ambient-quiet-sweet-loop); Datei SunsetWalk.ogg"
2026-11-17,opengameart/ambient-relaxing-loop,-,Ambient Relaxing Loop,isaiah658,"CC0 1.0 (OpenGameArt, https://opengameart.org/content/ambient-relaxing-loop); Datei Ambient-Loop-isaiah658_0.ogg"
2026-11-17,opengameart/dark-cavern-ambient,-,Dark Cavern Ambient,Paul Wortmann,"CC0 1.0 (OpenGameArt, https://opengameart.org/content/dark-cavern-ambient); Datei dark_cavern_ambient_001.ogg"
2026-11-17,opengameart/determined-pursuit-epic-orchestra-loop,-,Determined Pursuit (epic orchestra loop),Emma_MA,"CC0 1.0 (OpenGameArt, https://opengameart.org/content/determined-pursuit-epic-orchestra-loop); Datei determined_pursuit_loop.wav, nach Ogg Vorbis konvertiert"

1 datum endpoint_id request_id prompt seed lizenz
214 2026-11-17 fal-ai/flux-2/klein/9b 01a1ea04-d927-7080-8b18-87b559d42f91 illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky dwarf cleric in a long robe over chainmail, holding a mace and a small holy symbol, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane 10106 FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder
215 2026-11-17 fal-ai/flux-2/klein/9b 01a1ea04-ef8d-7d92-a60a-662d7a008ca2 illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky halfling mage in a deep blue hooded robe, holding a wooden staff, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane 10107 FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder
216 2026-11-17 fal-ai/flux-2/klein/9b 01a1ea05-08cd-7311-927e-120b3ba63e33 illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a short stocky halfling rogue in a dark leather jerkin and a hood, holding a dagger, side-on three-quarter view, centered, isolated on a flat solid magenta background, complete silhouette with both arms and both legs visible, no cast shadow, no ground plane 10108 FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 768x768, 0.5898 MP, x-fal-billable-units 2.25 = 0.01 USD, 4 Bilder
217 2026-11-17 opengameart/sunset-walk-ambient-quiet-sweet-loop - Sunset Walk / Ambient / Quiet / Sweet / Loop KiluaBoy CC0 1.0 (OpenGameArt, https://opengameart.org/content/sunset-walk-ambient-quiet-sweet-loop); Datei SunsetWalk.ogg
218 2026-11-17 opengameart/ambient-relaxing-loop - Ambient Relaxing Loop isaiah658 CC0 1.0 (OpenGameArt, https://opengameart.org/content/ambient-relaxing-loop); Datei Ambient-Loop-isaiah658_0.ogg
219 2026-11-17 opengameart/dark-cavern-ambient - Dark Cavern Ambient Paul Wortmann CC0 1.0 (OpenGameArt, https://opengameart.org/content/dark-cavern-ambient); Datei dark_cavern_ambient_001.ogg
220 2026-11-17 opengameart/determined-pursuit-epic-orchestra-loop - Determined Pursuit (epic orchestra loop) Emma_MA CC0 1.0 (OpenGameArt, https://opengameart.org/content/determined-pursuit-epic-orchestra-loop); Datei determined_pursuit_loop.wav, nach Ogg Vorbis konvertiert

View file

@ -1,18 +1,42 @@
# Klang — Effekte und Musik, synthetisiert
# Klang — Effekte synthetisiert, Musik CC0
![Einstellungen, 1920×1080](_einstellungen_1920x1080.png)
Es gibt **keine gekauften oder heruntergeladenen Audiodateien**. Alles kommt aus
zwei Skripten:
Zwei Herkünfte, bewusst getrennt:
| Skript | Ergebnis | Format |
| Teil | Quelle | Format |
| --- | --- | --- |
| [`art/tools/klaenge.py`](../../tools/klaenge.py) | 12 Effekte in `art/final/Audio/sfx/` | 44,1 kHz mono WAV |
| [`art/tools/musik.py`](../../tools/musik.py) | 4 Schleifen in `art/final/Audio/musik/` | 22,05 kHz mono WAV |
| 12 Effekte | **eigene Synthese** über [`art/tools/klaenge.py`](../../tools/klaenge.py) | 44,1 kHz mono WAV |
| 4 Musikschleifen | **CC0** von OpenGameArt | Ogg Vorbis, 44,1 kHz stereo |
Damit ist die Lizenzfrage erledigt: eigene Synthese, keine Namensnennung, keine
Fremdaufnahme. `engine_assets.py` kopiert `art/final/Audio/` 1:1 nach
`game/assets/audio/`.
`engine_assets.py` kopiert `art/final/Audio/` nach `game/assets/audio/` und
räumt dort auf, was in `art/final` nicht mehr existiert.
## Warum die Musik nicht mehr selbst gebaut ist
Der erste Anlauf hat die Musik ebenfalls synthetisiert (`musik.py`, reine
Sinustöne mit Hüllkurven). Für Effekte reicht das — ein Klick, ein Hieb, ein
Münzklirren sind Impulse. Für Musik nicht: es fehlte jede Klangfarbe, jede
Phrasierung, jeder Raum. Das Ergebnis war ein Orgelpunkt mit Tremolo, kein
Stück. **Entscheidung 17.11.2026: Effekte bleiben Synthese, Musik kommt als
CC0.** Der Lizenzlog steht in [`art/license-log.csv`](../../license-log.csv).
## Die vier Titel
| Datei | Stück | Autor | Länge | Wo |
| --- | --- | --- | --- | --- |
| `musik_stadt.ogg` | Sunset Walk (Ambient, Quiet, Sweet, Loop) | KiluaBoy | 1:17 | Garana |
| `musik_land.ogg` | Ambient Relaxing Loop | isaiah658 | 0:25 | Westmark, Titelschirm |
| `musik_krypta.ogg` | Dark Cavern Ambient | Paul Wortmann | 2:00 | Krypta |
| `musik_kampf.ogg` | Determined Pursuit (epic orchestra loop) | Emma_MA | 1:48 | Kampf |
Alle vier: **CC0 1.0** (Public Domain), Quellen-URLs im Lizenzlog. Keine
Namensnennung nötig — sie steht hier trotzdem.
Die Kampfspur lag als 19-MB-WAV vor und wurde mit ffmpeg nach Ogg Vorbis
gebracht (das installierte ffmpeg hat kein libvorbis, der native Encoder
funktioniert). Godot setzt das Loop-Flag zur Laufzeit
(`audio.gd::_schleife`), weil die Importdateien es nicht mitbringen.
## Effekte
@ -28,49 +52,32 @@ Fremdaufnahme. `engine_assets.py` kopiert `art/final/Audio/` 1:1 nach
| `sieg` / `niederlage` | Kampfende |
| `gold`, `tuer` | vorbereitet, noch nicht verdrahtet |
## Musik
| Titel | Wo | Länge |
| --- | --- | --- |
| `musik_stadt` | Garana | 24 s |
| `musik_land` | Westmark, Titelschirm | 29 s |
| `musik_krypta` | Krypta | 29 s |
| `musik_kampf` | Kampf | 29 s |
Die Schleife ist nahtlos: jede Spur wird mit Umlauf geschrieben, Noten am Ende
laufen in den Anfang hinein (`Spur.add` in `musik.py`). Kein Fade, kein Klick.
Godot bekommt das Loop-Flag zur Laufzeit (`audio.gd::_schleife`), weil die
WAV-Importdateien es nicht mitbringen.
## Einstellungen
`game/scenes/settings/einstellungen.tscn` — Musik und Soundeffekte an/aus, dazu
je 0–100 % in Zehnerschritten. Werte liegen in `user://einstellungen.cfg` und
greifen sofort; sie gehören bewusst nicht in den Spielstand.
```bash
# Klänge neu erzeugen
python3 art/tools/klaenge.py
python3 art/tools/musik.py
python3 art/tools/engine_assets.py --write
# Prüfung
python3 art/tools/klaenge.py --check
python3 art/tools/musik.py --check
godot --headless --path game res://tools/probe_audio.tscn -- --check
```
## Wo man es umstellt
![Ton im Gebiet](_ton_im_gebiet_1920x1080.png)
Vom Titelschirm über **EINSTELLUNGEN** und im Gebiet über den **TON**-Knopf
neben dem Inventar. Im Gebiet liegt der Screen als Overlay über der Karte, die
Musik läuft weiter — man hört beim Verstellen, was man verstellt.
## Prüfung
```bash
python3 art/tools/engine_assets.py --write # Audio nach game/assets/audio
python3 art/tools/klaenge.py --check # 12/12 Effekte
godot --headless --path game res://tools/probe_audio.tscn -- --check
```
Die Probe prüft Busse, alle Effektdateien, einen startenden Effekt, den
Musikwechsel, das Loop-Flag der Ogg-Datei und das Speichern/Lesen der
Einstellungen.
## Offen
- `gold` und `tuer` sind gebaut, aber an keiner Stelle ausgelöst.
- Kein eigener Klang für Treppe, Gegner-Tod oder Zauber (kommt mit den Zaubern).
- Die Musik ist ein Loop je Gebiet; kein Wechsel bei Kampfbeginn *im* Gebiet
außer dem Kampf-Screen selbst.
- Ein Titel je Gebiet; kein Zwischenstück bei Begegnungen auf der Karte.

View file

@ -114,7 +114,7 @@ def lauf(schreiben: bool) -> list[str]:
if not quelle.is_dir():
continue
for p in sorted(quelle.rglob("*")):
if not p.is_file() or p.suffix not in (".fnt", ".png", ".wav"):
if not p.is_file() or p.suffix not in (".fnt", ".png", ".wav", ".ogg"):
continue
if p.suffix == ".png" and "_2x" in p.name:
continue
@ -126,6 +126,22 @@ def lauf(schreiben: bool) -> list[str]:
elif not ziel.exists():
fehler.append(f"{ziel}: fehlt (--write ausfuehren)")
# Audio: Leichen entfernen. Nur hier, nicht bei der Schrift — deren
# Engine-Fassung enthält eigene Dateien, die es in art/final nicht gibt.
audio_quelle = FINAL / "Audio"
audio_ziel = PROJEKT / "audio"
if schreiben and audio_quelle.is_dir() and audio_ziel.is_dir():
for alt in sorted(audio_ziel.rglob("*")):
if not alt.is_file() or alt.suffix not in (".wav", ".ogg"):
continue
if not (audio_quelle / alt.relative_to(audio_ziel)).exists():
alt.unlink()
print(f" entfernt: {alt.relative_to(PROJEKT)}")
for alt in sorted(audio_ziel.rglob("*.import")):
stamm = Path(str(alt)[:-7])
if not stamm.exists():
alt.unlink()
stand = "geschrieben" if schreiben else "geprueft"
print(f"{anzahl} Dateien {stand} -> {PROJEKT.relative_to(ART.parent)}/")
for f in fehler:

View file

@ -1,291 +0,0 @@
#!/usr/bin/env python3
"""musik.py - Schleifen fuer Taloria, synthetisiert statt lizenziert.
Vier ruhige bzw. treibende Stuecke, je ein Loop: Stadt, Land, Krypta, Kampf.
Wie bei den Effekten ist das Skript die Quelle — keine Lizenz, keine
Namensnennung, reproduzierbar. 22,05 kHz mono 16-Bit: halbe Groesse, fuer
Flaechen und tiefe Toene ausreichend.
python3 art/tools/musik.py # nach art/final/Audio/musik/ schreiben
python3 art/tools/musik.py --check
Der Loop ist nahtlos: jede Spur wird **mit Umlauf** geschrieben (`Spur.add`),
Noten am Ende laufen also in den Anfang hinein. Kein Fade, kein Klick.
"""
from __future__ import annotations
import argparse
import math
import random
import wave
from pathlib import Path
SR = 22050
ART = Path(__file__).resolve().parent.parent
ZIEL = ART / "final" / "Audio" / "musik"
TON = {"C": 0, "C#": 1, "D": 2, "D#": 3, "E": 4, "F": 5, "F#": 6, "G": 7,
"G#": 8, "A": 9, "A#": 10, "B": 11}
def freq(name: str) -> float:
"""'A3' -> 220.0 Hz."""
grund = name[:-1]
oktave = int(name[-1])
midi = 12 * (oktave + 1) + TON[grund]
return 440.0 * 2.0 ** ((midi - 69) / 12.0)
class Spur:
"""Puffer mit Umlauf: was hinten herausfaellt, kommt vorne wieder an."""
def __init__(self, laenge: int) -> None:
self.laenge = laenge
self.buf = [0.0] * laenge
def add(self, samples: list[float], start: float) -> None:
i0 = int(start * SR) % self.laenge
for i, v in enumerate(samples):
self.buf[(i0 + i) % self.laenge] += v
def huelle(i: int, n: int, attack: float, release: float) -> float:
a = max(1, int(SR * attack))
r = max(1, int(SR * release))
if i < a and i < a:
return i / a
rest = n - i
if rest < r:
return (rest / r) ** 1.4
return 1.0
def tone(name: str, dauer: float, laut: float = 0.2, form: str = "sine",
attack: float = 0.02, release: float = 0.3,
detune: float = 0.0) -> list[float]:
f = freq(name) * (1.0 + detune)
n = max(1, int(SR * dauer))
out = []
for i in range(n):
p = 2.0 * math.pi * f * i / SR
if form == "sine":
v = math.sin(p)
elif form == "tri":
v = 2.0 / math.pi * math.asin(math.sin(p))
elif form == "saw":
v = 2.0 * ((p / (2.0 * math.pi)) % 1.0) - 1.0
else:
v = math.sin(p)
out.append(v * laut * huelle(i, n, attack, release))
return out
def pad(spur: Spur, noten: list[str], start: float, dauer: float,
laut: float = 0.09) -> None:
for n in noten:
spur.add(tone(n, dauer, laut, "sine", 0.6, 1.2, -0.0012), start)
spur.add(tone(n, dauer, laut * 0.7, "sine", 0.7, 1.2, 0.0012), start)
def bass(spur: Spur, name: str, start: float, dauer: float,
laut: float = 0.16) -> None:
spur.add(tone(name, dauer, laut, "sine", 0.02, 0.25), start)
spur.add(tone(name, dauer, laut * 0.25, "tri", 0.02, 0.25), start)
def glocke(spur: Spur, name: str, start: float, laut: float = 0.10) -> None:
spur.add(tone(name, 2.2, laut, "sine", 0.005, 1.9), start)
spur.add(tone(name, 1.4, laut * 0.4, "sine", 0.005, 1.2, 0.0), start)
def trommel(spur: Spur, start: float, laut: float = 0.22) -> None:
rnd = random.Random(int(start * 100))
n = int(SR * 0.16)
y = 0.0
out = []
for i in range(n):
y += 0.25 * (rnd.uniform(-1, 1) - y)
out.append(y * laut * math.exp(-i / (SR * 0.045)))
spur.add(out, start)
spur.add(tone("C2", 0.18, laut * 0.9, "sine", 0.001, 0.15), start)
def rauschflaeche(spur: Spur, dauer: float, start: float,
laut: float = 0.05, saat: int = 1) -> None:
"""Wind / Grundrauschen: sehr leise, langsam atmend."""
rnd = random.Random(saat)
n = int(SR * dauer)
y = 0.0
out = []
for i in range(n):
y += 0.02 * (rnd.uniform(-1, 1) - y)
t = i / n
out.append(y * laut * (0.6 + 0.4 * math.sin(2 * math.pi * t)))
spur.add(out, start)
def schreibe(spuren: list[Spur], pfad: Path, spitze: float = 0.80) -> None:
n = spuren[0].laenge
roh = [0.0] * n
for i in range(n):
v = 0.0
for s in spuren:
v += s.buf[i]
roh[i] = v
# Auf eine feste Spitze normieren: die Mischung ist von Stueck zu Stueck
# verschieden laut, der Regler in den Einstellungen soll dasselbe bedeuten.
m = max(1e-9, max(abs(v) for v in roh))
faktor = spitze / m
daten = bytearray()
for i in range(n):
v = max(-1.0, min(1.0, roh[i] * faktor))
daten += int(v * 32767).to_bytes(2, "little", signed=True)
with wave.open(str(pfad), "wb") as w:
w.setnchannels(1)
w.setsampwidth(2)
w.setframerate(SR)
w.writeframes(bytes(daten))
# ------------------------------------------------------------------- Stuecke --
def stadt() -> list[Spur]:
"""Garana: warm, ruhig, 4/4 bei 80 bpm, acht Takte = 24 s."""
takte, bpm = 8, 80
takt = 60.0 / bpm * 4
n = int(SR * takt * takte)
spuren = [Spur(n), Spur(n), Spur(n)]
rauschflaeche(spuren[2], takt * takte, 0.0, 0.03, 11)
akkorde = [
(["C4", "E4", "G4"], "C3"),
(["C4", "E4", "G4"], "C3"),
(["A3", "C4", "E4"], "A2"),
(["A3", "C4", "E4"], "A2"),
(["F3", "A3", "C4"], "F2"),
(["F3", "A3", "C4"], "F2"),
(["G3", "B3", "D4"], "G2"),
(["G3", "B3", "D4"], "G2"),
]
melodie = ["E4", "G4", "A4", "G4", "E4", "D4", "C4", "D4"]
for i, (klang, grund) in enumerate(akkorde):
start = i * takt
pad(spuren[0], klang, start, takt * 0.98, 0.065)
bass(spuren[1], grund, start, takt * 0.5, 0.14)
bass(spuren[1], grund, start + takt * 0.5, takt * 0.45, 0.10)
if i % 2 == 0:
spuren[2].add(tone(melodie[i // 2], 1.6, 0.035, "tri", 0.05, 1.2),
start + takt * 0.25)
return spuren
def land() -> list[Spur]:
"""Westmark: offen, weit, dorisch auf D, acht Takte bei 66 bpm = 29 s."""
takte, bpm = 8, 66
takt = 60.0 / bpm * 4
n = int(SR * takt * takte)
spuren = [Spur(n), Spur(n), Spur(n)]
rauschflaeche(spuren[2], takt * takte, 0.0, 0.045, 23)
akkorde = [
(["D3", "A3", "E4"], "D2"),
(["D3", "A3", "E4"], "D2"),
(["C3", "G3", "D4"], "C2"),
(["C3", "G3", "D4"], "C2"),
(["D3", "A3", "E4"], "D2"),
(["F3", "C4", "G4"], "F2"),
(["G3", "D4", "A4"], "G2"),
(["D3", "A3", "E4"], "D2"),
]
for i, (klang, grund) in enumerate(akkorde):
start = i * takt
pad(spuren[0], klang, start, takt, 0.075)
bass(spuren[1], grund, start, takt * 0.9, 0.12)
# weite Toene wie ein Horn ueber zwei Takte
glocke(spuren[2], "A4", takt * 1.5, 0.05)
glocke(spuren[2], "D5", takt * 4.0, 0.045)
glocke(spuren[2], "C5", takt * 6.2, 0.04)
return spuren
def krypta() -> list[Spur]:
"""Krypta: Drone in d-Moll, kein Puls, sechs Takte bei 50 bpm = 28,8 s."""
takte, bpm = 6, 50
takt = 60.0 / bpm * 4
n = int(SR * takt * takte)
spuren = [Spur(n), Spur(n), Spur(n)]
gesamt = takt * takte
# Grunddrone mit langsamer Schwebung
for det in (-0.0015, 0.0015):
spuren[0].add(tone("D2", gesamt, 0.14, "sine", 1.5, 2.0, det), 0.0)
for det in (-0.001, 0.001):
spuren[0].add(tone("A2", gesamt, 0.07, "sine", 1.8, 2.0, det), 0.0)
rauschflaeche(spuren[2], gesamt, 0.0, 0.05, 31)
# kleine Sekunde als Reibung, sehr leise
spuren[1].add(tone("D#3", gesamt, 0.022, "sine", 2.5, 2.5), 0.0)
for i, name in enumerate(["D4", "F4", "A3", "E4", "D4", "A3"]):
glocke(spuren[1], name, i * takt + takt * 0.3, 0.05)
return spuren
def kampf() -> list[Spur]:
"""Kampf: a-Moll, 132 bpm, sechzehn Takte = 29 s, Bass in Achteln."""
takte, bpm = 16, 132
takt = 60.0 / bpm * 4
schlag = takt / 4
n = int(SR * takt * takte)
spuren = [Spur(n), Spur(n), Spur(n), Spur(n)]
akkorde = [
(["A3", "C4", "E4"], "A2"), (["A3", "C4", "E4"], "A2"),
(["F3", "A3", "C4"], "F2"), (["F3", "A3", "C4"], "F2"),
(["G3", "B3", "D4"], "G2"), (["G3", "B3", "D4"], "G2"),
(["E3", "G3", "B3"], "E2"), (["E3", "G3", "B3"], "E2"),
(["A3", "C4", "E4"], "A2"), (["A3", "C4", "E4"], "A2"),
(["F3", "A3", "C4"], "F2"), (["F3", "A3", "C4"], "F2"),
(["D3", "F3", "A3"], "D2"), (["D3", "F3", "A3"], "D2"),
(["E3", "G#3", "B3"], "E2"), (["E3", "G#3", "B3"], "E2"),
]
for i, (klang, grund) in enumerate(akkorde):
start = i * takt
pad(spuren[0], klang, start, takt, 0.05)
for k in range(8):
bass(spuren[1], grund, start + k * schlag * 0.5, schlag * 0.45, 0.11)
for i in range(takte * 4):
start = i * schlag
if i % 4 in (0, 2):
trommel(spuren[2], start, 0.20)
if i % 4 == 3:
trommel(spuren[2], start, 0.12)
# kurze Melodiephrase alle vier Takte
motif = ["E4", "G4", "A4", "B4"]
for i in range(takte // 4):
for k, name in enumerate(motif):
spuren[3].add(tone(name, 0.5, 0.045, "saw", 0.01, 0.45),
i * takt * 4 + takt * 2 + k * schlag)
return spuren
STUECKE = {"stadt": stadt, "land": land, "krypta": krypta, "kampf": kampf}
def main(argv: list[str] | None = None) -> int:
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
ap.add_argument("--check", action="store_true", help="nur pruefen")
a = ap.parse_args(argv)
ZIEL.mkdir(parents=True, exist_ok=True)
fehlt = 0
for name, bauer in STUECKE.items():
ziel = ZIEL / f"musik_{name}.wav"
if a.check:
if not ziel.exists():
print(f" fehlt: {ziel.relative_to(ART.parent)}")
fehlt += 1
continue
schreibe(bauer(), ziel)
print(f" musik_{name}.wav {ziel.stat().st_size // 1024} KiB")
if a.check:
print(f"{len(STUECKE) - fehlt}/{len(STUECKE)} Stuecke vorhanden")
return 1 if fehlt else 0
print(f"{len(STUECKE)} Stuecke -> {ZIEL.relative_to(ART.parent)}/")
return 0
if __name__ == "__main__":
raise SystemExit(main())

View file

@ -577,9 +577,14 @@ Struktur, Datenmodell und Effekt-Vokabel stehen in [`engine.md`](engine.md).
`waende`, `kanten`, Fackellicht als Datenfeld, Übergang mit
Ankunftsposition (`to`/`tx`/`ty`). Beleg: `prep/krypta/`.
Offen: Türen/Schlüssel, Editor-UI.
- [x] **HUD-Klicks** (17.11.2026): Die Dialogebene lag mit einem
bildschirmgroßen `Control` (Standard-Filter STOP) über dem HUD und schluckte
jeden Klick — Inventar und Ton waren tot. Der Wrapper steht jetzt auf
IGNORE; `tools/probe_klick.tscn` hält es fest.
- [x] **Klang** (17.11.2026): zwölf Effekte und vier Musikschleifen,
**synthetisiert** (`art/tools/klaenge.py`, `art/tools/musik.py`) — keine
Lizenzfrage. Autoload `Audio` mit Überblendung, Effektvorrat und zwei Bussen;
**synthetisiert** (`art/tools/klaenge.py`); die Musik ist **CC0** von
OpenGameArt (Sunset Walk, Ambient Relaxing Loop, Dark Cavern Ambient,
Determined Pursuit) — der erste Synthese-Versuch klang nicht tragbar. Autoload `Audio` mit Überblendung, Effektvorrat und zwei Bussen;
Schritte, Aufnehmen, Truhe, Treffer/Fehlschlag, Sieg/Niederlage, Begegnung
und Schaltflächen sind verdrahtet. Einstellungen (Musik/SFX an/aus und
Lautstärke) vom Titelschirm und als `TON`-Overlay im Gebiet, gespeichert in

View file

@ -35,6 +35,8 @@ bespielbar (Ortsbild → Gebiet → zurück).
| `godot --path game res://tools/probe_wechsel.tscn` | Blende: Ortsbild → Stadt → Ortsbild (ohne `--headless`) |
| `godot --path game res://tools/probe_lauf.tscn` | Bewegung, Kollision, Dialog |
| `godot --headless --path game res://tools/probe_gebiet.tscn -- --check` | Gebiets-Loader: Raster, Begehbarkeit, Ausgang, Trigger, Zufallsbegegnung |
| `godot --headless --path game res://tools/probe_audio.tscn -- --check` | Busse, Effekte, Musikschleife, Einstellungen |
| `godot --path game res://tools/probe_klick.tscn -- --ohne-erstellung` | HUD-Knöpfe (Inventar, Ton) nehmen echte Klicks an, in Stadt und Land |
## Die Entscheidungen dieser Session
@ -58,7 +60,7 @@ bespielbar (Ortsbild → Gebiet → zurück).
|---|---|
| `game/` | Godot-Projekt (1920×1080, `stretch/mode=viewport`, `scale_mode=integer`) |
| `game/scenes/world/ortsbild.*` | gemalter Stadtplan + Hotspots (Register „Betrachten") |
| `art/tools/klaenge.py`, `art/tools/musik.py` | Klang und Musik, synthetisiert (keine Lizenzfrage) |
| `art/tools/klaenge.py` | 12 Effekte, synthetisiert; Musik ist CC0 von OpenGameArt (Lizenzlog) |
| `game/scripts/systems/audio.gd` | Autoload `Audio`: Musikblende, Effektvorrat, Einstellungen in `user://einstellungen.cfg` |
| `game/scenes/settings/einstellungen.*` | Musik/SFX an/aus und Lautstärke (vom Titelschirm) |
| `game/scenes/world/gebiet.*` | **ein** Gebiets-Loader für alle Karten: Boden, Requisiten, NSC, Truhen, Dialog, Ausgänge, Trigger, Begegnungen (Register „Handeln") |

View file

@ -217,8 +217,10 @@ Erfolg = Untoter flieht 3 Runden oder erstarrt (SL entscheidet je nach Situation
## 9b. Klang und Einstellungen
- **Alles synthetisiert**, kein Fremdmaterial: Effekte 44,1 kHz, Musik
22,05 kHz, je mono WAV. Quellen: `art/tools/klaenge.py`, `musik.py`.
- **Effekte synthetisiert** (44,1 kHz mono WAV, `art/tools/klaenge.py`),
**Musik CC0** von OpenGameArt (Ogg Vorbis, 44,1 kHz stereo). Quellen und
Autoren: [Lizenzlog](../art/license-log.csv), Beleg
[`art/prep/audio/`](../art/prep/audio/README.md).
- **Zwei Busse** `Musik` und `SFX`; der Autoload `Audio` blendet zwischen
Titeln über (0,9 s) und hält acht Effektstimmen bereit.
- **Musik je Gebiet** aus den Kartendaten (`musik` oder `kind`), Kampf hat

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ddi6d1xkv0l4k"
path="res://.godot/imported/musik_kampf.ogg-662f0754fefdcd83ae4f03638b8002c6.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_kampf.ogg"
dest_files=["res://.godot/imported/musik_kampf.ogg-662f0754fefdcd83ae4f03638b8002c6.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cjsq6tduve40g"
path="res://.godot/imported/musik_kampf.wav-ab481ac0856e989d3e966bca35987c07.sample"
[deps]
source_file="res://assets/audio/musik/musik_kampf.wav"
dest_files=["res://.godot/imported/musik_kampf.wav-ab481ac0856e989d3e966bca35987c07.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://c0ihc4ovg6rnm"
path="res://.godot/imported/musik_krypta.ogg-0329a89e70d1c32ff9c4fdca005feeec.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_krypta.ogg"
dest_files=["res://.godot/imported/musik_krypta.ogg-0329a89e70d1c32ff9c4fdca005feeec.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d0iyq6an7faxc"
path="res://.godot/imported/musik_krypta.wav-98278fc00add013f65fca259ee2d1814.sample"
[deps]
source_file="res://assets/audio/musik/musik_krypta.wav"
dest_files=["res://.godot/imported/musik_krypta.wav-98278fc00add013f65fca259ee2d1814.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cex4srv6kdxr5"
path="res://.godot/imported/musik_land.ogg-9620ed28e300b4d2742d86200f40baa5.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_land.ogg"
dest_files=["res://.godot/imported/musik_land.ogg-9620ed28e300b4d2742d86200f40baa5.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cv6xqfnomf08h"
path="res://.godot/imported/musik_land.wav-8c5303f75d52dbfe181e8d693fa9441b.sample"
[deps]
source_file="res://assets/audio/musik/musik_land.wav"
dest_files=["res://.godot/imported/musik_land.wav-8c5303f75d52dbfe181e8d693fa9441b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dwbrqucmflk5m"
path="res://.godot/imported/musik_stadt.ogg-c8da8dc186e3fd741a77f10a93d6958c.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_stadt.ogg"
dest_files=["res://.godot/imported/musik_stadt.ogg-c8da8dc186e3fd741a77f10a93d6958c.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bdmambyl2770b"
path="res://.godot/imported/musik_stadt.wav-2448a512acdf2ec5793a765250610a5b.sample"
[deps]
source_file="res://assets/audio/musik/musik_stadt.wav"
dest_files=["res://.godot/imported/musik_stadt.wav-2448a512acdf2ec5793a765250610a5b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1,004 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 569 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 579 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 556 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 605 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 431 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 397 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 416 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,003 B

After

Width:  |  Height:  |  Size: 942 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 979 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 565 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 718 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 558 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 697 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 522 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 688 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 526 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 B

After

Width:  |  Height:  |  Size: 684 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 546 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 693 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 508 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

After

Width:  |  Height:  |  Size: 708 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 602 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 776 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 586 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 753 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 593 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

After

Width:  |  Height:  |  Size: 760 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 590 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 755 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 603 B

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more