Spaces:
Running
Running
ui: Aufbau wie vor v2 (Modell oben · Einstellungen | Prompt | Verlauf · Generieren · Ergebnis), Dropdown-Fix für alle Listen, None-Felder abgesichert
Browse files- studio/ui.py +188 -170
- studio/web/studio.css +28 -4
- studio/web/studio.js +2 -1
studio/ui.py
CHANGED
|
@@ -231,7 +231,8 @@ def _chat_messages(session: StudioSession, agent_role: str) -> list[dict[str, st
|
|
| 231 |
return messages
|
| 232 |
|
| 233 |
|
| 234 |
-
def _append_keyword(current_value: str, keyword: str) -> str:
|
|
|
|
| 235 |
current = current_value.strip()
|
| 236 |
if keyword.casefold() in current.casefold():
|
| 237 |
return current_value
|
|
@@ -257,6 +258,7 @@ def _instrumental_update(enabled: bool, current_lyrics: str) -> tuple[Any, str]:
|
|
| 257 |
gr.Textbox(value="[Instrumental]", interactive=False),
|
| 258 |
"Instrumental aktiv · Lyrics sind deaktiviert.",
|
| 259 |
)
|
|
|
|
| 260 |
lyrics = "" if current_lyrics.strip().casefold() == "[instrumental]" else current_lyrics
|
| 261 |
return (
|
| 262 |
gr.Textbox(value=lyrics, interactive=True),
|
|
@@ -299,6 +301,9 @@ def _proposal_html(proposal: FieldProposal) -> str:
|
|
| 299 |
"""
|
| 300 |
|
| 301 |
|
|
|
|
|
|
|
|
|
|
| 302 |
def _show_loading() -> tuple[str, Any]:
|
| 303 |
return "Job eingereiht · Worker wird vorbereitet …", gr.HTML(value=LOADER_HTML, visible=True)
|
| 304 |
|
|
@@ -333,6 +338,12 @@ def _generate(
|
|
| 333 |
) -> tuple[Any, ...]:
|
| 334 |
current = _ensure_session(session)
|
| 335 |
registry.get(model_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
effective_lyrics = "[Instrumental]" if instrumental else lyrics
|
| 337 |
current.create.model_id = model_id
|
| 338 |
current.create.genre_style_instruments = genre
|
|
@@ -391,6 +402,10 @@ def _generate(
|
|
| 391 |
f"✓ {mode} als {render_mode} mit {model_label} · {track.duration_s:.1f} s · "
|
| 392 |
f"{route_id} · {seed_note}"
|
| 393 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
download_update = gr.DownloadButton(value=track.path, interactive=True)
|
| 395 |
return (
|
| 396 |
track.path,
|
|
@@ -653,7 +668,7 @@ def _producer_reply(
|
|
| 653 |
agent: ProducerAgent,
|
| 654 |
) -> tuple[str, list[dict[str, str]], dict[str, Any] | None, Any, Any, Any, StudioSession]:
|
| 655 |
current = _ensure_session(session)
|
| 656 |
-
clean_message = message.strip()
|
| 657 |
if not clean_message:
|
| 658 |
return (
|
| 659 |
"",
|
|
@@ -786,7 +801,7 @@ def _master_reply(
|
|
| 786 |
message: str, session: StudioSession | None
|
| 787 |
) -> tuple[str, list[dict[str, str]], dict[str, Any] | None, Any, Any, StudioSession]:
|
| 788 |
current = _ensure_session(session)
|
| 789 |
-
clean_message = message.strip()
|
| 790 |
if not clean_message:
|
| 791 |
return (
|
| 792 |
"",
|
|
@@ -1090,12 +1105,12 @@ TOPBAR_HTML = """
|
|
| 1090 |
<h1 data-room-title>Generate</h1>
|
| 1091 |
</div>
|
| 1092 |
<nav class="tb-flow" aria-label="Arbeitsschritte">
|
| 1093 |
-
<a href="#tb-step-
|
| 1094 |
-
<a href="#tb-step-
|
| 1095 |
-
<a href="#tb-step-
|
| 1096 |
<a href="#tb-generate-bar"><b>04</b>Generieren</a>
|
| 1097 |
-
<a href="#tb-
|
| 1098 |
-
<a href="#tb-
|
| 1099 |
</nav>
|
| 1100 |
</header>
|
| 1101 |
"""
|
|
@@ -1268,176 +1283,152 @@ def build_app() -> gr.Blocks:
|
|
| 1268 |
model_chips = gr.HTML(model_chips_html(registry, "minimax-music3"), padding=False, elem_id="tb-mchips")
|
| 1269 |
refresh_chips = gr.Button("↻ Status", size="sm", elem_id="tb-refresh-chips", scale=0, min_width=90)
|
| 1270 |
|
| 1271 |
-
with gr.Column(elem_classes="player-stage", elem_id="tb-player"):
|
| 1272 |
-
audio = gr.Audio(
|
| 1273 |
-
label="Aktueller Track",
|
| 1274 |
-
type="filepath",
|
| 1275 |
-
interactive=False,
|
| 1276 |
-
elem_classes="wave-audio",
|
| 1277 |
-
waveform_options=wave_opts,
|
| 1278 |
-
)
|
| 1279 |
-
with gr.Row(elem_classes="transport"):
|
| 1280 |
-
download = gr.DownloadButton("⬇ Export", interactive=False, scale=0, min_width=110, elem_id="tb-download")
|
| 1281 |
-
stop = gr.Button("■ Stopp", scale=0, min_width=100, elem_id="tb-stop", variant="stop")
|
| 1282 |
-
status = gr.Markdown(
|
| 1283 |
-
"Bereit · Vorlage wählen, Prompt schreiben oder den KI-Producer fragen.",
|
| 1284 |
-
elem_classes="status-strip",
|
| 1285 |
-
elem_id="tb-status",
|
| 1286 |
-
)
|
| 1287 |
-
master_arrow = gr.Button("Master →", scale=0, min_width=130, elem_classes="master-arrow", elem_id="tb-master-arrow")
|
| 1288 |
-
loading = gr.HTML(value=LOADER_HTML, visible=False, elem_id="tb-loading")
|
| 1289 |
-
|
| 1290 |
# ============================================================ Raum GENERATE
|
|
|
|
| 1291 |
with gr.Column(visible=True, elem_id="tb-create-panel") as create_panel:
|
| 1292 |
-
|
| 1293 |
-
|
| 1294 |
-
|
| 1295 |
-
|
| 1296 |
-
|
| 1297 |
-
|
| 1298 |
-
|
| 1299 |
-
|
| 1300 |
-
|
| 1301 |
-
|
| 1302 |
-
|
| 1303 |
-
|
| 1304 |
-
|
| 1305 |
-
|
| 1306 |
-
|
| 1307 |
-
|
| 1308 |
-
|
| 1309 |
-
|
| 1310 |
-
|
| 1311 |
-
|
| 1312 |
-
|
| 1313 |
-
|
| 1314 |
-
|
| 1315 |
-
|
| 1316 |
-
|
| 1317 |
-
|
| 1318 |
-
|
| 1319 |
-
|
| 1320 |
-
|
| 1321 |
-
|
| 1322 |
-
|
| 1323 |
-
|
| 1324 |
-
|
| 1325 |
-
|
| 1326 |
-
|
| 1327 |
-
tpl_extra = gr.Textbox(label="Zusatz", placeholder="z. B. vinyl warmth, female choir", lines=1)
|
| 1328 |
-
with gr.Column(scale=6, min_width=280):
|
| 1329 |
-
tpl_detail = gr.HTML(
|
| 1330 |
-
template_detail_html(None, [], "minimax-music3", template_vars(120, "beliebig", "Neutral", "", 30, False, "Weiblich", "Deutsch", "", ""), registry, []),
|
| 1331 |
-
padding=False, elem_id="tb-tpl-detail",
|
| 1332 |
-
)
|
| 1333 |
-
with gr.Row(elem_classes="tb-tpl-actions"):
|
| 1334 |
-
tpl_insert = gr.Button("⤵ In Prompt einsetzen", variant="primary", interactive=False, elem_id="tb-tpl-insert")
|
| 1335 |
-
tpl_append = gr.Button("+ Nur Sound anhängen", interactive=False)
|
| 1336 |
-
tpl_fav = gr.Button("☆ Merken", interactive=False, elem_id="tb-tpl-fav")
|
| 1337 |
-
tpl_delete = gr.Button("Eigene löschen", visible=False, variant="stop", size="sm")
|
| 1338 |
-
with gr.Row(elem_classes="tb-tpl-save"):
|
| 1339 |
-
tpl_save_name = gr.Textbox(placeholder="Name für eigene Vorlage …", show_label=False, container=False, scale=3)
|
| 1340 |
-
tpl_save = gr.Button("✦ Aktuelle Felder als Vorlage speichern", scale=2)
|
| 1341 |
-
|
| 1342 |
-
with gr.Row(elem_classes="tb-prompts", equal_height=False):
|
| 1343 |
-
with gr.Column(elem_classes=["prompt-card", "tb-field", "tb-field--sound"], scale=5, min_width=260):
|
| 1344 |
-
genre = gr.Textbox(
|
| 1345 |
-
label="Sound · Genre, Style & Instrumente",
|
| 1346 |
-
placeholder="z. B. dark riddim, 140 BPM, analog bass …",
|
| 1347 |
-
lines=6, elem_classes="prompt-box", elem_id="tb-genre",
|
| 1348 |
-
)
|
| 1349 |
-
with gr.Row(elem_classes="tb-field__foot"):
|
| 1350 |
-
gr.HTML('<span class="tb-hint">Klangbild, Tempo, Arrangement</span>', padding=False)
|
| 1351 |
-
clear_genre = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1352 |
-
with gr.Column(elem_classes=["prompt-card", "tb-field"], scale=4, min_width=220):
|
| 1353 |
-
lyrics = gr.Textbox(
|
| 1354 |
-
label="Lyrics · Text & Struktur",
|
| 1355 |
-
placeholder="[Verse]\n…\n[Chorus]\n…",
|
| 1356 |
-
lines=6, elem_classes="prompt-box", elem_id="tb-lyrics",
|
| 1357 |
-
)
|
| 1358 |
-
with gr.Row(elem_classes="tb-field__foot"):
|
| 1359 |
-
gr.HTML('<span class="tb-hint">[Verse] [Chorus] [Bridge]</span>', padding=False)
|
| 1360 |
-
clear_lyrics = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1361 |
-
with gr.Column(elem_classes=["prompt-card", "tb-field", "tb-field--avoid"], scale=3, min_width=200):
|
| 1362 |
-
negative = gr.Textbox(
|
| 1363 |
-
label="Vermeiden · Negativ-Prompt",
|
| 1364 |
-
placeholder="muddy low end, clipping …",
|
| 1365 |
-
lines=6, elem_classes="prompt-box", elem_id="tb-negative",
|
| 1366 |
-
)
|
| 1367 |
-
with gr.Row(elem_classes="tb-field__foot"):
|
| 1368 |
-
gr.HTML('<span class="tb-hint">Artefakte & Ausschlüsse</span>', padding=False)
|
| 1369 |
-
clear_negative = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1370 |
-
|
| 1371 |
-
with gr.Accordion("Bausteine & Schnellrezepte", open=False, elem_classes="tb-acc tb-acc--chips"):
|
| 1372 |
-
with gr.Row(elem_classes="recipe-grid"):
|
| 1373 |
-
for recipe_name in PROMPT_RECIPES:
|
| 1374 |
-
recipe_button = gr.Button(recipe_name, size="sm", elem_classes="recipe-button")
|
| 1375 |
-
recipe_bindings.append((recipe_button, recipe_name))
|
| 1376 |
-
for category, (target, keywords) in KEYWORD_LEXICON.items():
|
| 1377 |
-
with gr.Row(elem_classes="chip-row"):
|
| 1378 |
-
gr.HTML(f'<span class="tb-chip-cat">{escape(category)}</span>', padding=False)
|
| 1379 |
-
for keyword in keywords:
|
| 1380 |
-
chip = gr.Button(keyword, size="sm", elem_classes="tag-chip")
|
| 1381 |
-
lexicon_bindings.append((chip, target, keyword))
|
| 1382 |
-
|
| 1383 |
-
with gr.Accordion("KI-Producer · Prompt-Spezialist", open=False, elem_classes=["tb-acc", "agent-card"], elem_id="tb-agent"):
|
| 1384 |
-
producer_chat = gr.Chatbot(value=[], height=230, show_label=False, elem_id="tb-producer-chat")
|
| 1385 |
-
with gr.Row(elem_classes="agent-composer"):
|
| 1386 |
-
producer_input = gr.Textbox(
|
| 1387 |
-
placeholder="Beschreibe deinen Song in Alltagssprache …",
|
| 1388 |
-
show_label=False, scale=5, container=False,
|
| 1389 |
-
)
|
| 1390 |
-
producer_send = gr.Button("Senden →", variant="primary", scale=0, min_width=110)
|
| 1391 |
-
producer_preview = gr.HTML(value="", visible=False, elem_classes="agent-preview")
|
| 1392 |
-
with gr.Row(elem_classes="proposal-actions"):
|
| 1393 |
-
discard_proposal = gr.Button("Verwerfen", size="sm", visible=False)
|
| 1394 |
-
apply_proposal = gr.Button("Vorschlag übernehmen", variant="primary", interactive=False)
|
| 1395 |
-
|
| 1396 |
-
# ---------------------------------------------- 02 Modell
|
| 1397 |
-
with gr.Column(elem_classes=["tb-sec", "tb-sec--model"]):
|
| 1398 |
-
gr.HTML(_section_head("02", "Modell", "Ein Dropdown für alle Engines – Status live geprüft.", "tb-step-model"), padding=False)
|
| 1399 |
-
with gr.Row(elem_classes="model-controls", equal_height=False):
|
| 1400 |
-
model = gr.Dropdown(
|
| 1401 |
-
choices=model_choices,
|
| 1402 |
-
value="minimax-music3",
|
| 1403 |
-
label="Modellauswahl",
|
| 1404 |
-
info="Jedes Modell läuft über einen eigenen ZeroGPU-Worker",
|
| 1405 |
-
scale=3,
|
| 1406 |
-
elem_id="tb-model",
|
| 1407 |
-
)
|
| 1408 |
-
instrumental = gr.Checkbox(
|
| 1409 |
-
label="Instrumental",
|
| 1410 |
-
value=False,
|
| 1411 |
-
info="Gesang und Lyrics aus",
|
| 1412 |
-
elem_classes="instrumental-switch",
|
| 1413 |
-
scale=1,
|
| 1414 |
-
)
|
| 1415 |
-
model_status = gr.HTML(value=_model_status_html("minimax-music3", registry), elem_classes="model-wrap")
|
| 1416 |
-
|
| 1417 |
-
# ---------------------------------------------- 03 Parameter
|
| 1418 |
-
with gr.Column(elem_classes=["tb-sec", "tb-sec--params"]):
|
| 1419 |
-
gr.HTML(_section_head("03", "Parameter", "Dauer, Seed und modellspezifische Feineinstellungen.", "tb-step-params"), padding=False)
|
| 1420 |
-
with gr.Row(equal_height=False):
|
| 1421 |
-
duration = gr.Slider(5, 180, value=12, step=1, label="Dauer · Sekunden", scale=3)
|
| 1422 |
-
with gr.Row(elem_classes="seed-row", scale=2):
|
| 1423 |
-
seed = gr.Number(
|
| 1424 |
-
value=0, precision=0, label="Seed",
|
| 1425 |
-
info="0 = Zufall · gleiche Zahl = identisches Ergebnis", scale=3,
|
| 1426 |
-
)
|
| 1427 |
-
random_seed = gr.Button("🎲", size="sm", min_width=44, elem_classes="seed-dice", scale=0)
|
| 1428 |
-
with gr.Row(equal_height=False):
|
| 1429 |
-
steps = gr.Slider(1, 64, value=24, step=1, label="Schritte (Steps)", visible=True)
|
| 1430 |
-
guidance = gr.Slider(1.0, 4.0, value=1.7, step=0.1, label="Guidance", visible=True)
|
| 1431 |
with gr.Accordion("MiniMax · Structured Caption", open=False, elem_classes="tb-acc", visible=True) as studio_acc:
|
| 1432 |
gr.HTML('<p class="tb-hint">Wird von Vorlagen automatisch gefüllt. Leer = sinnvolle Standardwerte aus dem Sound-Feld.</p>', padding=False)
|
| 1433 |
studio_global = gr.Textbox(label="Global Metadata", lines=2)
|
| 1434 |
studio_vocal = gr.Textbox(label="Vocal Details", lines=2)
|
| 1435 |
studio_arrangement = gr.Textbox(label="Arrangement", lines=2)
|
| 1436 |
|
| 1437 |
-
|
| 1438 |
-
|
| 1439 |
-
|
| 1440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1441 |
|
| 1442 |
# -------------------------------------------------- Seitenleiste: Verlauf
|
| 1443 |
with gr.Column(elem_id="tb-side", scale=1, min_width=300):
|
|
@@ -1469,6 +1460,11 @@ def build_app() -> gr.Blocks:
|
|
| 1469 |
elem_classes="library-upload", height=120,
|
| 1470 |
)
|
| 1471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1472 |
# ============================================================ Raum MASTER
|
| 1473 |
with gr.Column(visible=False, elem_id="tb-master-panel") as master_panel:
|
| 1474 |
with gr.Row(elem_classes="tb-room-grid", equal_height=False):
|
|
@@ -1599,6 +1595,28 @@ def build_app() -> gr.Blocks:
|
|
| 1599 |
elem_classes="tb-hint",
|
| 1600 |
)
|
| 1601 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1602 |
# ===================================================================
|
| 1603 |
# Ereignisse – bestehende Verdrahtung (unverändert in Logik)
|
| 1604 |
# ===================================================================
|
|
|
|
| 231 |
return messages
|
| 232 |
|
| 233 |
|
| 234 |
+
def _append_keyword(current_value: str | None, keyword: str) -> str:
|
| 235 |
+
current_value = current_value or ""
|
| 236 |
current = current_value.strip()
|
| 237 |
if keyword.casefold() in current.casefold():
|
| 238 |
return current_value
|
|
|
|
| 258 |
gr.Textbox(value="[Instrumental]", interactive=False),
|
| 259 |
"Instrumental aktiv · Lyrics sind deaktiviert.",
|
| 260 |
)
|
| 261 |
+
current_lyrics = current_lyrics or ""
|
| 262 |
lyrics = "" if current_lyrics.strip().casefold() == "[instrumental]" else current_lyrics
|
| 263 |
return (
|
| 264 |
gr.Textbox(value=lyrics, interactive=True),
|
|
|
|
| 301 |
"""
|
| 302 |
|
| 303 |
|
| 304 |
+
DEFAULT_SOUND_PROMPT = "warm lo-fi hip hop, 85 BPM, dusty drums, rhodes chords, soft vinyl texture"
|
| 305 |
+
|
| 306 |
+
|
| 307 |
def _show_loading() -> tuple[str, Any]:
|
| 308 |
return "Job eingereiht · Worker wird vorbereitet …", gr.HTML(value=LOADER_HTML, visible=True)
|
| 309 |
|
|
|
|
| 338 |
) -> tuple[Any, ...]:
|
| 339 |
current = _ensure_session(session)
|
| 340 |
registry.get(model_id)
|
| 341 |
+
# Felder in eingeklappten Akkordeons kommen als None – nie an Pydantic weiterreichen.
|
| 342 |
+
genre, lyrics, negative = (genre or "").strip(), (lyrics or "").strip(), (negative or "").strip()
|
| 343 |
+
instrumental = bool(instrumental)
|
| 344 |
+
used_default_prompt = not genre
|
| 345 |
+
if used_default_prompt:
|
| 346 |
+
genre = DEFAULT_SOUND_PROMPT
|
| 347 |
effective_lyrics = "[Instrumental]" if instrumental else lyrics
|
| 348 |
current.create.model_id = model_id
|
| 349 |
current.create.genre_style_instruments = genre
|
|
|
|
| 402 |
f"✓ {mode} als {render_mode} mit {model_label} · {track.duration_s:.1f} s · "
|
| 403 |
f"{route_id} · {seed_note}"
|
| 404 |
)
|
| 405 |
+
if used_default_prompt:
|
| 406 |
+
status += f" · Kein Sound-Prompt angegeben → Beispiel verwendet: „{DEFAULT_SOUND_PROMPT}“"
|
| 407 |
+
status += " · Weiter: anhören, ⬇ Export oder Master →"
|
| 408 |
+
|
| 409 |
download_update = gr.DownloadButton(value=track.path, interactive=True)
|
| 410 |
return (
|
| 411 |
track.path,
|
|
|
|
| 668 |
agent: ProducerAgent,
|
| 669 |
) -> tuple[str, list[dict[str, str]], dict[str, Any] | None, Any, Any, Any, StudioSession]:
|
| 670 |
current = _ensure_session(session)
|
| 671 |
+
clean_message = (message or "").strip()
|
| 672 |
if not clean_message:
|
| 673 |
return (
|
| 674 |
"",
|
|
|
|
| 801 |
message: str, session: StudioSession | None
|
| 802 |
) -> tuple[str, list[dict[str, str]], dict[str, Any] | None, Any, Any, StudioSession]:
|
| 803 |
current = _ensure_session(session)
|
| 804 |
+
clean_message = (message or "").strip()
|
| 805 |
if not clean_message:
|
| 806 |
return (
|
| 807 |
"",
|
|
|
|
| 1105 |
<h1 data-room-title>Generate</h1>
|
| 1106 |
</div>
|
| 1107 |
<nav class="tb-flow" aria-label="Arbeitsschritte">
|
| 1108 |
+
<a href="#tb-step-model"><b>01</b>Modell</a>
|
| 1109 |
+
<a href="#tb-step-params"><b>02</b>Einstellungen</a>
|
| 1110 |
+
<a href="#tb-step-prompt"><b>03</b>Prompt</a>
|
| 1111 |
<a href="#tb-generate-bar"><b>04</b>Generieren</a>
|
| 1112 |
+
<a href="#tb-player"><b>05</b>Ergebnis</a>
|
| 1113 |
+
<a href="#tb-side"><b>⟲</b>Verlauf</a>
|
| 1114 |
</nav>
|
| 1115 |
</header>
|
| 1116 |
"""
|
|
|
|
| 1283 |
model_chips = gr.HTML(model_chips_html(registry, "minimax-music3"), padding=False, elem_id="tb-mchips")
|
| 1284 |
refresh_chips = gr.Button("↻ Status", size="sm", elem_id="tb-refresh-chips", scale=0, min_width=90)
|
| 1285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1286 |
# ============================================================ Raum GENERATE
|
| 1287 |
+
# Aufbau wie vor v2 (6181121a): Modell oben, darunter Einstellungen | Prompt | Bibliothek.
|
| 1288 |
with gr.Column(visible=True, elem_id="tb-create-panel") as create_panel:
|
| 1289 |
+
# ---------------------------------------------- 01 Modell
|
| 1290 |
+
with gr.Column(elem_classes=["tb-sec", "tb-sec--model"], elem_id="tb-work"):
|
| 1291 |
+
gr.HTML(_section_head("01", "Modell", "Wähle die Engine. Der Status zeigt, ob sie sofort bereit ist.", "tb-step-model"), padding=False)
|
| 1292 |
+
with gr.Row(elem_classes="model-controls", equal_height=False):
|
| 1293 |
+
model = gr.Dropdown(
|
| 1294 |
+
choices=model_choices,
|
| 1295 |
+
value="minimax-music3",
|
| 1296 |
+
label="Modellauswahl",
|
| 1297 |
+
info="Live = sofort bereit · Schläft = wird beim Start geweckt · Pausiert = nicht verfügbar",
|
| 1298 |
+
scale=3,
|
| 1299 |
+
elem_id="tb-model",
|
| 1300 |
+
)
|
| 1301 |
+
instrumental = gr.Checkbox(
|
| 1302 |
+
label="Instrumental",
|
| 1303 |
+
value=False,
|
| 1304 |
+
info="Ohne Gesang und Lyrics",
|
| 1305 |
+
elem_classes="instrumental-switch",
|
| 1306 |
+
scale=1,
|
| 1307 |
+
)
|
| 1308 |
+
model_status = gr.HTML(value=_model_status_html("minimax-music3", registry), elem_classes="model-wrap")
|
| 1309 |
+
|
| 1310 |
+
with gr.Row(elem_classes="tb-gen-grid", equal_height=False):
|
| 1311 |
+
# ------------------------------------------ 02 Einstellungen (links, wie vorher)
|
| 1312 |
+
with gr.Column(elem_classes=["tb-sec", "tb-sec--params"], elem_id="tb-params-col", scale=1, min_width=260):
|
| 1313 |
+
gr.HTML(_section_head("02", "Einstellungen", "Länge und Seed. Profi-Regler stecken unter „Erweitert“.", "tb-step-params"), padding=False)
|
| 1314 |
+
duration = gr.Slider(5, 180, value=12, step=1, label="Dauer · Sekunden", info="Wird aufs Maximum des Modells begrenzt")
|
| 1315 |
+
with gr.Row(elem_classes="seed-row"):
|
| 1316 |
+
seed = gr.Number(
|
| 1317 |
+
value=0, precision=0, label="Seed",
|
| 1318 |
+
info="0 = jedes Mal neu · gleiche Zahl = gleiches Ergebnis", scale=3,
|
| 1319 |
+
)
|
| 1320 |
+
random_seed = gr.Button("🎲", size="sm", min_width=44, elem_classes="seed-dice", scale=0)
|
| 1321 |
+
with gr.Accordion("Erweitert", open=False, elem_classes="tb-acc", elem_id="tb-advanced"):
|
| 1322 |
+
steps = gr.Slider(1, 64, value=24, step=1, label="Schritte (Steps)", info="Mehr = detaillierter, aber langsamer", visible=True)
|
| 1323 |
+
guidance = gr.Slider(1.0, 4.0, value=1.7, step=0.1, label="Guidance", info="Wie streng das Modell dem Prompt folgt", visible=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1324 |
with gr.Accordion("MiniMax · Structured Caption", open=False, elem_classes="tb-acc", visible=True) as studio_acc:
|
| 1325 |
gr.HTML('<p class="tb-hint">Wird von Vorlagen automatisch gefüllt. Leer = sinnvolle Standardwerte aus dem Sound-Feld.</p>', padding=False)
|
| 1326 |
studio_global = gr.Textbox(label="Global Metadata", lines=2)
|
| 1327 |
studio_vocal = gr.Textbox(label="Vocal Details", lines=2)
|
| 1328 |
studio_arrangement = gr.Textbox(label="Arrangement", lines=2)
|
| 1329 |
|
| 1330 |
+
# ------------------------------------------ 03 Prompt (Mitte, wie vorher)
|
| 1331 |
+
with gr.Column(elem_classes=["tb-sec", "tb-sec--prompt"], elem_id="tb-prompt-col", scale=2, min_width=320):
|
| 1332 |
+
gr.HTML(_section_head("03", "Prompt", "Beschreibe den Sound. Lyrics und Ausschlüsse sind optional.", "tb-step-prompt"), padding=False)
|
| 1333 |
+
with gr.Column(elem_classes="prompt-stack"):
|
| 1334 |
+
with gr.Accordion("Sound · Genre, Stil & Instrumente", open=True, elem_classes=["prompt-card", "tb-field", "tb-field--sound"]):
|
| 1335 |
+
genre = gr.Textbox(
|
| 1336 |
+
label="Sound · Genre, Stil & Instrumente", show_label=False,
|
| 1337 |
+
placeholder="z. B. dark riddim, 140 BPM, analog bass …",
|
| 1338 |
+
lines=5, elem_classes="prompt-box", elem_id="tb-genre",
|
| 1339 |
+
)
|
| 1340 |
+
with gr.Row(elem_classes="tb-field__foot"):
|
| 1341 |
+
gr.HTML('<span class="tb-hint">Klangbild, Tempo, Arrangement</span>', padding=False)
|
| 1342 |
+
clear_genre = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1343 |
+
with gr.Accordion("Lyrics · Text & Songstruktur (optional)", open=False, elem_classes=["prompt-card", "tb-field"], elem_id="tb-lyrics-acc"):
|
| 1344 |
+
lyrics = gr.Textbox(
|
| 1345 |
+
label="Lyrics · Text & Songstruktur", show_label=False,
|
| 1346 |
+
placeholder="[Verse]\n…\n[Chorus]\n…",
|
| 1347 |
+
lines=6, elem_classes="prompt-box", elem_id="tb-lyrics",
|
| 1348 |
+
)
|
| 1349 |
+
with gr.Row(elem_classes="tb-field__foot"):
|
| 1350 |
+
gr.HTML('<span class="tb-hint">[Verse] [Chorus] [Bridge] – leer = Modell improvisiert</span>', padding=False)
|
| 1351 |
+
clear_lyrics = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1352 |
+
with gr.Accordion("Vermeiden · Negativ-Prompt (optional)", open=False, elem_classes=["prompt-card", "tb-field", "tb-field--avoid"]):
|
| 1353 |
+
negative = gr.Textbox(
|
| 1354 |
+
label="Vermeiden · Negativ-Prompt", show_label=False,
|
| 1355 |
+
placeholder="muddy low end, clipping …",
|
| 1356 |
+
lines=3, elem_classes="prompt-box", elem_id="tb-negative",
|
| 1357 |
+
)
|
| 1358 |
+
with gr.Row(elem_classes="tb-field__foot"):
|
| 1359 |
+
gr.HTML('<span class="tb-hint">Artefakte & Ausschlüsse</span>', padding=False)
|
| 1360 |
+
clear_negative = gr.Button("Leeren", size="sm", min_width=70, elem_classes="tb-clear")
|
| 1361 |
+
|
| 1362 |
+
gr.HTML('<div class="tb-help-label">Hilfen für den Prompt</div>', padding=False)
|
| 1363 |
+
with gr.Accordion("Vorlagen-Bibliothek · 30 Vorlagen", open=False, elem_id="tb-templates", elem_classes="tb-acc"):
|
| 1364 |
+
tpl_category = gr.Radio(
|
| 1365 |
+
choices=CATEGORIES, value="all", show_label=False,
|
| 1366 |
+
elem_classes="tb-seg", container=False,
|
| 1367 |
+
)
|
| 1368 |
+
with gr.Row(elem_classes="tb-tpl-bar"):
|
| 1369 |
+
tpl_search = gr.Textbox(
|
| 1370 |
+
placeholder="Suchen: Trailer, Lo-Fi, 808, Podcast …", show_label=False,
|
| 1371 |
+
container=False, scale=4, elem_id="tb-tpl-search",
|
| 1372 |
+
)
|
| 1373 |
+
tpl_count = gr.HTML(_tpl_count_html("all", "", [], []), padding=False, elem_classes="tb-tpl-countbox")
|
| 1374 |
+
tpl_pick = gr.Radio(
|
| 1375 |
+
choices=filter_choices("all", "", [], []), value=None, show_label=False,
|
| 1376 |
+
label="Vorlage", elem_classes="tb-tpl-grid", container=False,
|
| 1377 |
+
)
|
| 1378 |
+
with gr.Row(elem_classes="tb-tpl-body", equal_height=False):
|
| 1379 |
+
with gr.Column(scale=5, min_width=280, elem_classes="tb-tpl-vars"):
|
| 1380 |
+
with gr.Row():
|
| 1381 |
+
tpl_bpm = gr.Slider(0, 200, value=120, step=1, label="BPM", info="0 = ohne Tempo")
|
| 1382 |
+
tpl_duration = gr.Slider(3, 300, value=30, step=1, label="Dauer (s)", info="wird aufs Modell-Maximum begrenzt")
|
| 1383 |
+
with gr.Row():
|
| 1384 |
+
tpl_key = gr.Dropdown(KEYS, value="beliebig", label="Tonart")
|
| 1385 |
+
tpl_mood = gr.Dropdown(list(MOODS), value="Neutral", label="Stimmung", allow_custom_value=True)
|
| 1386 |
+
tpl_instruments = gr.Textbox(label="Instrumente", lines=1, placeholder="z. B. 808 bass, rhodes, taiko")
|
| 1387 |
+
tpl_vocals = gr.Checkbox(label="Mit Gesang (Lyrics-Gerüst in Sprache & Stimmung)", value=False, elem_classes="tb-check-tile")
|
| 1388 |
+
with gr.Row():
|
| 1389 |
+
tpl_voice = gr.Dropdown(list(VOICES), value="Weiblich", label="Stimme", scale=3, min_width=120)
|
| 1390 |
+
tpl_language = gr.Dropdown(list(LANGUAGES), value="Deutsch", label="Sprache", scale=3, min_width=120)
|
| 1391 |
+
with gr.Row():
|
| 1392 |
+
tpl_title = gr.Textbox(label="Titel / Marke", placeholder="wird im Hook gesungen", lines=1)
|
| 1393 |
+
tpl_extra = gr.Textbox(label="Zusatz", placeholder="z. B. vinyl warmth, female choir", lines=1)
|
| 1394 |
+
with gr.Column(scale=6, min_width=280):
|
| 1395 |
+
tpl_detail = gr.HTML(
|
| 1396 |
+
template_detail_html(None, [], "minimax-music3", template_vars(120, "beliebig", "Neutral", "", 30, False, "Weiblich", "Deutsch", "", ""), registry, []),
|
| 1397 |
+
padding=False, elem_id="tb-tpl-detail",
|
| 1398 |
+
)
|
| 1399 |
+
with gr.Row(elem_classes="tb-tpl-actions"):
|
| 1400 |
+
tpl_insert = gr.Button("⤵ In Prompt einsetzen", variant="primary", interactive=False, elem_id="tb-tpl-insert")
|
| 1401 |
+
tpl_append = gr.Button("+ Nur Sound anhängen", interactive=False)
|
| 1402 |
+
tpl_fav = gr.Button("☆ Merken", interactive=False, elem_id="tb-tpl-fav")
|
| 1403 |
+
tpl_delete = gr.Button("Eigene löschen", visible=False, variant="stop", size="sm")
|
| 1404 |
+
with gr.Row(elem_classes="tb-tpl-save"):
|
| 1405 |
+
tpl_save_name = gr.Textbox(placeholder="Name für eigene Vorlage …", show_label=False, container=False, scale=3)
|
| 1406 |
+
tpl_save = gr.Button("✦ Aktuelle Felder als Vorlage speichern", scale=2)
|
| 1407 |
+
|
| 1408 |
+
with gr.Accordion("Bausteine & Schnellrezepte", open=False, elem_classes="tb-acc tb-acc--chips"):
|
| 1409 |
+
with gr.Row(elem_classes="recipe-grid"):
|
| 1410 |
+
for recipe_name in PROMPT_RECIPES:
|
| 1411 |
+
recipe_button = gr.Button(recipe_name, size="sm", elem_classes="recipe-button")
|
| 1412 |
+
recipe_bindings.append((recipe_button, recipe_name))
|
| 1413 |
+
for category, (target, keywords) in KEYWORD_LEXICON.items():
|
| 1414 |
+
with gr.Row(elem_classes="chip-row"):
|
| 1415 |
+
gr.HTML(f'<span class="tb-chip-cat">{escape(category)}</span>', padding=False)
|
| 1416 |
+
for keyword in keywords:
|
| 1417 |
+
chip = gr.Button(keyword, size="sm", elem_classes="tag-chip")
|
| 1418 |
+
lexicon_bindings.append((chip, target, keyword))
|
| 1419 |
+
|
| 1420 |
+
with gr.Accordion("KI-Producer · Song in Alltagssprache beschreiben", open=False, elem_classes=["tb-acc", "agent-card"], elem_id="tb-agent"):
|
| 1421 |
+
producer_chat = gr.Chatbot(value=[], height=230, show_label=False, elem_id="tb-producer-chat")
|
| 1422 |
+
with gr.Row(elem_classes="agent-composer"):
|
| 1423 |
+
producer_input = gr.Textbox(
|
| 1424 |
+
placeholder="Beschreibe deinen Song in Alltagssprache …",
|
| 1425 |
+
show_label=False, scale=5, container=False,
|
| 1426 |
+
)
|
| 1427 |
+
producer_send = gr.Button("Senden →", variant="primary", scale=0, min_width=110)
|
| 1428 |
+
producer_preview = gr.HTML(value="", visible=False, elem_classes="agent-preview")
|
| 1429 |
+
with gr.Row(elem_classes="proposal-actions"):
|
| 1430 |
+
discard_proposal = gr.Button("Verwerfen", size="sm", visible=False)
|
| 1431 |
+
apply_proposal = gr.Button("Vorschlag übernehmen", variant="primary", interactive=False)
|
| 1432 |
|
| 1433 |
# -------------------------------------------------- Seitenleiste: Verlauf
|
| 1434 |
with gr.Column(elem_id="tb-side", scale=1, min_width=300):
|
|
|
|
| 1460 |
elem_classes="library-upload", height=120,
|
| 1461 |
)
|
| 1462 |
|
| 1463 |
+
# ---------------------------------------------- 04 Generieren
|
| 1464 |
+
with gr.Row(elem_id="tb-generate-bar", equal_height=True):
|
| 1465 |
+
gen_summary = gr.HTML(_gen_summary("minimax-music3", 12, False, 0, registry), padding=False, elem_id="tb-gensum")
|
| 1466 |
+
generate = gr.Button("▶ Generieren", variant="primary", scale=0, min_width=220, elem_id="tb-generate")
|
| 1467 |
+
|
| 1468 |
# ============================================================ Raum MASTER
|
| 1469 |
with gr.Column(visible=False, elem_id="tb-master-panel") as master_panel:
|
| 1470 |
with gr.Row(elem_classes="tb-room-grid", equal_height=False):
|
|
|
|
| 1595 |
elem_classes="tb-hint",
|
| 1596 |
)
|
| 1597 |
|
| 1598 |
+
# ============================================================ 05 Ergebnis (alle Räume)
|
| 1599 |
+
with gr.Column(elem_classes="player-stage", elem_id="tb-player"):
|
| 1600 |
+
gr.HTML(_section_head("05", "Ergebnis", "Anhören, exportieren oder direkt ins Mastering schicken.", "tb-step-result"), padding=False, elem_id="tb-result-head")
|
| 1601 |
+
audio = gr.Audio(
|
| 1602 |
+
label="Aktueller Track",
|
| 1603 |
+
type="filepath",
|
| 1604 |
+
interactive=False,
|
| 1605 |
+
elem_classes="wave-audio",
|
| 1606 |
+
waveform_options=wave_opts,
|
| 1607 |
+
)
|
| 1608 |
+
with gr.Row(elem_classes="transport"):
|
| 1609 |
+
download = gr.DownloadButton("⬇ Export", interactive=False, scale=0, min_width=110, elem_id="tb-download")
|
| 1610 |
+
stop = gr.Button("■ Stopp", scale=0, min_width=100, elem_id="tb-stop", variant="stop")
|
| 1611 |
+
status = gr.Markdown(
|
| 1612 |
+
"Bereit · Vorlage wählen, Prompt schreiben oder den KI-Producer fragen.",
|
| 1613 |
+
elem_classes="status-strip",
|
| 1614 |
+
elem_id="tb-status",
|
| 1615 |
+
)
|
| 1616 |
+
master_arrow = gr.Button("Master →", scale=0, min_width=130, elem_classes="master-arrow", elem_id="tb-master-arrow")
|
| 1617 |
+
loading = gr.HTML(value=LOADER_HTML, visible=False, elem_id="tb-loading")
|
| 1618 |
+
|
| 1619 |
+
|
| 1620 |
# ===================================================================
|
| 1621 |
# Ereignisse – bestehende Verdrahtung (unverändert in Logik)
|
| 1622 |
# ===================================================================
|
studio/web/studio.css
CHANGED
|
@@ -135,11 +135,11 @@ body[data-room="master"] .tb-flow { display: none !important; }
|
|
| 135 |
.player-stage, .tb-sec, .tb-side__card, #tb-side > .tb-history-wrap, #tb-master-side > .tb-history-wrap {
|
| 136 |
position: relative; background: var(--tb-panel) !important; border: 1px solid var(--tb-line) !important; border-radius: 14px !important; box-shadow: var(--tb-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
|
| 137 |
.tb-sec { padding: 16px 18px 18px !important; gap: 12px !important; }
|
| 138 |
-
/*
|
| 139 |
position:fixed-Options-Popup von Gradio (Liste landet versetzt/verdeckt). Blur daher auf ein
|
| 140 |
-
::before-Layer verlagern – gleiche Optik,
|
| 141 |
-
.tb-sec--
|
| 142 |
-
.tb-sec--
|
| 143 |
.tb-sec::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(198, 255, 0, .45), transparent); border-radius: 14px 14px 0 0; pointer-events: none; }
|
| 144 |
.tb-sec__head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; scroll-margin-top: 16px; }
|
| 145 |
.tb-sec__num { grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; font: 700 15px/1 var(--tb-mono); color: var(--tb-on-acid); background: var(--tb-acid); clip-path: var(--tb-oct); box-shadow: 0 0 20px rgba(198, 255, 0, .4); }
|
|
@@ -501,3 +501,27 @@ body[data-room="studio"] #room-master {
|
|
| 501 |
.st-sel { font: 600 12px/1.2 var(--tb-mono); color: var(--tb-muted); }
|
| 502 |
.st-side__card { padding: 12px; border: 1px solid var(--tb-line); background: var(--tb-panel); clip-path: var(--tb-cut-sm); }
|
| 503 |
#st-bridge, #st-bridge-btn { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
.player-stage, .tb-sec, .tb-side__card, #tb-side > .tb-history-wrap, #tb-master-side > .tb-history-wrap {
|
| 136 |
position: relative; background: var(--tb-panel) !important; border: 1px solid var(--tb-line) !important; border-radius: 14px !important; box-shadow: var(--tb-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
|
| 137 |
.tb-sec { padding: 16px 18px 18px !important; gap: 12px !important; }
|
| 138 |
+
/* Dropdowns: backdrop-filter auf einem Vorfahren macht ihn zum Containing Block für das
|
| 139 |
position:fixed-Options-Popup von Gradio (Liste landet versetzt/verdeckt). Blur daher auf ein
|
| 140 |
+
::before-Layer verlagern – gleiche Optik, alle Listen bleiben am Pfeil verankert. */
|
| 141 |
+
.tb-sec, .tb-side__card, #tb-side > .tb-history-wrap, #tb-master-side > .tb-history-wrap { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
|
| 142 |
+
.tb-sec::before, .tb-side__card::before, #tb-side > .tb-history-wrap::before, #tb-master-side > .tb-history-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
|
| 143 |
.tb-sec::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(198, 255, 0, .45), transparent); border-radius: 14px 14px 0 0; pointer-events: none; }
|
| 144 |
.tb-sec__head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; scroll-margin-top: 16px; }
|
| 145 |
.tb-sec__num { grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; font: 700 15px/1 var(--tb-mono); color: var(--tb-on-acid); background: var(--tb-acid); clip-path: var(--tb-oct); box-shadow: 0 0 20px rgba(198, 255, 0, .4); }
|
|
|
|
| 501 |
.st-sel { font: 600 12px/1.2 var(--tb-mono); color: var(--tb-muted); }
|
| 502 |
.st-side__card { padding: 12px; border: 1px solid var(--tb-line); background: var(--tb-panel); clip-path: var(--tb-cut-sm); }
|
| 503 |
#st-bridge, #st-bridge-btn { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; }
|
| 504 |
+
|
| 505 |
+
/* =====================================================================
|
| 506 |
+
Generate-Raum · Aufbau wie vorher (Modell oben · Einstellungen | Prompt | Bibliothek)
|
| 507 |
+
===================================================================== */
|
| 508 |
+
#tb-create-panel { gap: 16px !important; }
|
| 509 |
+
.tb-gen-grid { display: grid !important; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(280px, 340px); gap: 16px !important; align-items: start !important; }
|
| 510 |
+
.tb-gen-grid > * { min-width: 0 !important; width: auto !important; }
|
| 511 |
+
#tb-params-col, #tb-prompt-col { gap: 12px !important; }
|
| 512 |
+
.prompt-stack { gap: 10px !important; }
|
| 513 |
+
.prompt-card.tb-acc, .tb-field.tb-acc { background: rgba(7, 9, 5, .5) !important; border: 1px solid var(--tb-line) !important; border-radius: 12px !important; padding: 0 !important; }
|
| 514 |
+
.tb-field--sound.tb-acc { border-color: rgba(198, 255, 0, .4) !important; }
|
| 515 |
+
.prompt-card .tb-field__foot { padding: 0 2px; }
|
| 516 |
+
.tb-help-label { margin: 6px 0 -4px; font: 700 10.5px/1 var(--tb-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--tb-dim); }
|
| 517 |
+
#tb-generate-bar { margin-top: 0; }
|
| 518 |
+
#tb-result-head { margin-bottom: 2px; }
|
| 519 |
+
#tb-player .tb-sec__head { grid-template-columns: auto 1fr; }
|
| 520 |
+
body[data-room="master"] #tb-result-head, body[data-room="studio"] #tb-result-head { display: none !important; }
|
| 521 |
+
@media (max-width: 1180px) {
|
| 522 |
+
.tb-gen-grid { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
|
| 523 |
+
.tb-gen-grid > #tb-side { grid-column: 1 / -1; }
|
| 524 |
+
}
|
| 525 |
+
@media (max-width: 760px) {
|
| 526 |
+
.tb-gen-grid { grid-template-columns: minmax(0, 1fr); }
|
| 527 |
+
}
|
studio/web/studio.js
CHANGED
|
@@ -128,7 +128,8 @@
|
|
| 128 |
jobStart = 0; clearInterval(jobTimer); pendingCard(false);
|
| 129 |
// Fertig: Player in Sicht holen, damit der neue Take sofort hörbar ist
|
| 130 |
const player = $("#tb-player");
|
| 131 |
-
|
|
|
|
| 132 |
player.scrollIntoView({ behavior: reduce.matches ? "auto" : "smooth", block: "start" });
|
| 133 |
}
|
| 134 |
}
|
|
|
|
| 128 |
jobStart = 0; clearInterval(jobTimer); pendingCard(false);
|
| 129 |
// Fertig: Player in Sicht holen, damit der neue Take sofort hörbar ist
|
| 130 |
const player = $("#tb-player");
|
| 131 |
+
const pr = player && player.getBoundingClientRect();
|
| 132 |
+
if (pr && (pr.bottom < 0 || pr.top > innerHeight - 80)) {
|
| 133 |
player.scrollIntoView({ behavior: reduce.matches ? "auto" : "smooth", block: "start" });
|
| 134 |
}
|
| 135 |
}
|