Plugin API Reference
Reference for UI, score, audio, and project APIs exposed to plugins.
The roneat_api object is injected automatically.
Import the modules you need inside your plugin code.
No external installation is required for these built-in modules.
import roneat_api.ui
import roneat_api.score
import roneat_api.audio
import roneat_api.project
UI APIs control windows, notifications, theming, and language.
get_main_window() returns the underlying MainWindow CustomTkinter object
show_toast(message: str, level: str = "info", duration: int = 3000) shows a floating notification
show_dialog(title: str, message: str, dialog_type: str = "info") shows a blocking dialog
add_menu_item(menu_name: str, label: str, command: Callable) adds a utility action inside the plugin area
create_window(title: str, width: int = 400, height: int = 300) creates a themed CTkToplevel window that matches the current light or dark app theme
get_theme_colors() returns the current theme dictionary, such as {\"accent\": \"#HEX\", \"bg\": \"#HEX\"}
set_theme_color(key: str, hex_color: str) overrides a theme color and repaints the UI
set_language(lang_code: str) changes the UI language at runtime
Use UI APIs for
plugin actions and controls
roneat_api.score
Score APIs work on the active musical score document.
get_raw_text() -> str returns the full editor text
replace_text(text: str) replaces the entire score
insert_at_cursor(text: str) inserts text at the current caret position
add_note(bar_index: int, time: float, duration: float) appends a formatted note
set_tempo(bpm: int) updates the BPM value
get_all_notes() -> list[dict] parses notes into actionable dictionaries
Use score APIs for
score transformation tools
roneat_api.audio
Audio APIs interact with the SoundDevice playback engine.
play_note(bar_index: int, duration: float) plays a Roneat block through the active synth
play_frequency(hz: float, duration: float) synthesizes a raw frequency asynchronously without freezing the GUI
stop_all() stops all playback buffers
is_playing() -> bool returns the global playback state
Use audio APIs for
roneat_api.project
Project APIs read and manipulate user sessions.
get_data() -> dict returns internal project metadata
save() opens the save flow or overwrites the current file
load(filepath: str) loads a .roneat file from disk and replaces the current session
Use project APIs for
Practical usage pattern
Start from the smallest possible integration:
write a small score mutation
That sequence makes debugging much easier.