I just released Sonilo Audio Generator, an editor extension that generates AI music and sound effects without leaving Defold, powered by the Sonilo API.
Music: build a structured prompt from dropdowns (Game Type, Scenario, Mood, Dynamic Behavior), set a duration in minutes/seconds, hit Generate. The plugin submits an async task, shows live progress in the dialog, and downloads the result as a .wav into sonilo/generated_audio/ automatically.
Sound effects: just describe what you need (“heavy rain on a tin roof with distant thunder”), optionally refine with the same categories.
Preview in place: Play/Stop with a live progress bar and clickable seek points — or one click opens a browser preview with a natively draggable timeline (served through the editor’s built-in HTTP server).
Export in one click: create a ready-to-use audio prefab (.go with an embedded sound component + a runtime script handling sonilo_play / sonilo_stop / volume / fade messages), or right-click a .go in the Assets pane to add the generated sound directly onto it.
No login — click Add API Key, paste a key from platform.sonilo.com, done. The key is stored in editor preferences (masked), never inside your project.
Try it offline: without an API key the plugin generates placeholder sine-wave audio, so you can walk the whole flow (generate → preview → prefab) before signing up for anything.
Installation
Add the library to your game.project dependencies:
Then Project ▸ Fetch Libraries and open View ▸ Sonilo Audio Generator.
Requirements & honest notes
Defold 1.9.3+ (uses the editor.ui dialog API, technical preview; 1.9.8+ recommended for masked API-key prefs).
curl on PATH (preinstalled on macOS/Linux/Windows 10+).
The UI is a modal dialog (that’s what editor.ui currently supports), and there’s no slider component — the in-dialog timeline uses clickable time stops, with the browser preview covering real dragging.
In-editor playback shells out to the OS (afplay/aplay); on Windows it opens your default player.
The whole plugin is plain Lua editor scripting — no native extensions — so it might also be useful as a reference for editor.ui dialogs, async polling from suspending callbacks, and get_http_server_routes().
Feedback, bug reports and feature requests are very welcome — here or on the issue tracker.
Thanks a lot for taking the time to review this, really appreciate the detailed feedback! I’ve pushed fixes for the main points:
Folder shadowing — good catch, that was a real footgun. Generated files now go to sonilo_generated/ (outside the library’s sonilo include dir), so a consumer project can no longer shadow the extension folder.
http.request() — done. API calls and downloads now use the editor’s http.request on Defold 1.9.8+; curl is only kept as a fallback for 1.9.3–1.9.7.
Modal dialog — I’ve added forward-compatible support for the 1.13.1 change: the dialog now passes modal = false and falls back to modal on older versions. Looking forward to that release!
ogg/opus — the API currently only outputs wav, there’s no ogg support on the API side right now. Since Defold’s sound component handles wav fine (and the in-editor seek/timeline actually relies on slicing PCM wav bytes), wav covers the Defold use case well — but if ogg output lands on the API roadmap I’ll add a format option in the dialog.
And yes, #8373 would be great — once editor scripts can play audio I can drop the whole afplay/aplay shelling.