Plugin Examples

Working examples for UI actions, score edits, and a full translation plugin.

This section shows common patterns you can reuse.

Example: add a menu action and insert a note

import roneat_api.ui
import roneat_api.score

def start_my_plugin():
    roneat_api.ui.show_toast("Plugin started successfully!", "success")
    roneat_api.ui.add_menu_item("TEST_TOOLS", "Insert Magic Note", do_magic)

def do_magic():
    roneat_api.score.insert_at_cursor("\nB1 0.00 1.00")

def cleanup_my_plugin():
    pass

Example: build a language translation plugin

Roneat Studio ships in English by default.

A language plugin can inject a translation dictionary at startup and switch the UI immediately.

import roneat_api.ui
import core.i18n

def on_app_start():
    core.i18n.translations["fr"] = {
        "Score Editor": "Éditeur de Partition",
        "Audio AI": "IA Audio",
        "Settings": "Paramètres",
        "Plugins": "Extensions",
        "Save Project": "Sauvegarder",
        "Load Project": "Charger",
        "Ready": "Prêt",
        "Plugin Manager": "Gestionnaire de Plugins"
    }

    roneat_api.ui.set_language("fr")

def on_unload():
    pass

Example: play a test tone

Use this pattern for quick audio validation.

Example: change the accent color

Use this pattern for theme plugins and visual experiments.

Why this works

  • the translation dictionary is injected into core.i18n.translations

  • the plugin switches language with set_language("fr")

  • when the plugin is disabled, UI state reversion restores the default language context

Example ideas

Once the basics work, you can explore:

  • score analyzers

  • MIDI or serial hardware bridges

  • themed utility panels

  • automated tempo or note transformations

  • plugin-specific mini tools in the plugin tab

circle-info

Start with a plugin that changes one visible thing. That gives you a fast feedback loop.

Last updated

Was this helpful?