Udio Prompt Saver

Enhanced preset management for Udio, with an integrated collapsible UI, prompt generator, and UI persistence, loading data from external JSON. Features 4-row preset display, search, inter-page drag-n-drop, and position editing.

These are versions of this script where the code was updated. Show all versions.

  • v2.1 2025-05-28

    Changelong v2.1

    This version brings significant enhancements to both the standalone preset manager windows and the integrated UI, focusing on better organization, usability, and new management features.

    ✨ New Features

    • Standalone Preset Manager Window (Manage Presets):
      • Fixed 4-Row Layout: Preset items are now displayed in a fixed 4-row grid (typically 20 items per page, 5 columns), providing a consistent and predictable view.
      • Edit Preset Position: You can now directly edit the numerical position of a preset within the "Edit Preset" mode.
      • Drag-and-Drop Across Pages: When dragging a preset in the manager window, hovering over the "Next" or "Previous" page buttons for a short duration will automatically navigate to that page, allowing seamless reordering across multiple pages.
      • Load Default Presets: Added a "Load Defaults" button in the manager footer to import a curated list of presets from an external source (for both Prompt and Style Reduction managers).
      • Delete All Presets: Added a "Delete All" button (with confirmation) in the manager footer for quickly clearing all presets for a specific manager.
    • Integrated UI (Main Collapsible Section on Udio Page):
      • Search Presets: Each preset section (Prompt & Style Reduction) now includes a search bar to quickly filter displayed presets by name.
      • Increased Items Per Page: Integrated preset lists now show 20 items per page (typically 4 rows of 5 items), up from 10-15.

    💄 Improvements & UI Changes

    • Standalone Preset Manager Window:
      • Redesigned preset items for better text display and cleaner look. Edit/Delete controls now appear on hover.
      • Window resizing is now horizontal-only; height is fixed based on the 4-row content area.
      • Improved pagination controls.
      • New icons for "Load Defaults" (library_add) and "Delete All" (delete_forever).
    • Integrated UI:
      • Updated expand/collapse icon (now chevron_right / expand_less).
      • Preset names in the integrated list can now wrap to two lines for better readability.
      • Style Reduction section header now dynamically updates to indicate if "Advanced Controls" need to be opened.
    • Prompt Generator:
      • Minor internal updates to ensure genreCategorySelect is populated correctly if UI is re-rendered.
    • General:
      • CSS variables refined for better consistency between standalone manager and integrated UI themes.
      • Updated various icons for clarity and consistency.

    🛠️ Technical & Bug Fixes

    • Preset Application: Continued refinement of the applyReactControlledInputPreset function for robust interaction with Udio's input fields, especially the Style Reduction CMDK input.
    • Configuration: Introduced MANAGER_CONFIGS_STANDALONE to better separate configurations for the standalone manager windows (e.g., default preset URLs).
    • Data Handling: Minor robustness improvements in loadPromptGenData fallback.
    • CSS: Numerous CSS adjustments to support the new layouts, search functionality, and UI polish. Specifically, fixed height for the manager list container and adjustments for horizontal-only resizing.
    • Corrected an issue where the Style Reduction input target selector might not always find the input if "Advanced Controls" were not explicitly open, leading to the integrated SR section being unnecessarily disabled. The logic is now more robust.
    • Ensured pagination correctly resets or adjusts when presets are deleted or search terms change.

    Note for users of v2.0: Due to the UI changes in the standalone manager (fixed 4-row layout), the window height is no longer resizable. The width is still resizable. Your previously saved window height will be ignored, and the window will adapt to the new fixed content height.

  • v2.0 2025-05-26

    [2.0.0]

    ✨ Major Redesign & New Features

    • Completely Redesigned Integrated UI:
      • Introduced a new collapsible main interface directly on the Udio "Create" page for a more streamlined workflow. This section houses quick-access presets and the integrated prompt generator.
      • Quick-Apply Preset Lists: Access and apply your top Prompt and Style Reduction presets directly from this integrated UI.
        • Includes pagination for browsing through extensive preset lists within the integrated view.
      • The main integrated UI's open/closed state is remembered.
    • Integrated Advanced Prompt Generator:
      • The Advanced Prompt Generator is now embedded within the main collapsible UI, making it more accessible.
      • External & Expanded Data Source: Prompt generation data (genres, instruments, eras, etc.) is now loaded from an external JSON file (udio_prompt_data.json) via lyricism.neocities.org. This allows for a vastly richer, more nuanced, and more easily updatable dataset without script updates.
      • Significantly More Sophisticated Generation Logic:
        • Enhanced "Coherent" mode with intelligent matching of genres, instruments, vocal styles, and nations to musical eras and specific periods (e.g., 1950s, Baroque Era).
        • Improved instrument and vocal style selection based on historical period/era compatibility.
        • Contextual nation/region selection based on genre and era, with probabilities for major music nations.
      • Generator UI now includes a genre category filter (e.g., "Electronic", "Rock", "Classical Music") for more targeted "Coherent" generation.
      • Accordion state for the integrated generator is remembered.
    • Enhanced Preset Manager Pop-ups:
      • Drag & Drop Reordering: Presets within the manager pop-up windows can now be reordered by dragging and dropping.
      • Sort Presets: Added a button to sort presets alphabetically by name in the manager window.
      • Retains individual pop-up windows for detailed preset management (Add, Edit, Delete, Import/Export JSON).
      • Pop-up window positions and sizes are still remembered.

    🛠️ Improvements & Fixes

    • Reliable Style Reduction Preset Application:
      • Significantly improved the method for applying presets to Udio's Style Reduction field. The script now more intelligently interacts with this CMDK-based input, ensuring presets apply more reliably and previous values are cleared correctly.
      • The Style Reduction quick-apply section and its "Manage Presets" button in the integrated UI are now dynamically enabled/disabled based on the visibility of Udio's "Advanced Controls" section.
    • Robust UI Injection & Updates:
      • The script now uses a MutationObserver to more reliably detect Udio page changes (including tab switches within the create page and dynamic content loading) and inject/update its UI elements, ensuring better compatibility.
    • Code Refactoring & Structure:
      • Major internal code restructuring using classes (PresetManager, UdioIntegration, UdioPromptGeneratorIntegrated) for better organization, maintainability, and clarity.
      • Centralized configuration for preset managers (MANAGER_CONFIGS).
      • Improved logging for debugging.
    • Data Handling:
      • Asynchronous loading of prompt generator data with fallbacks in case of network issues.
    • Visual Polish:
      • Updated icons and styling for a cleaner, more modern feel that aligns with the integrated UI.
      • Shared confirmation dialog for delete operations.

    Refer to the script's main description for detailed usage of new and existing features.

  • v1.01 2025-05-26

    1.01 - Random Prompt Generator updated to fix consistency issues

  • v1.0 2025-05-23