Saving Renoise instrument from script

Is there an API call to save an Instrumentobject into a .xrni file?

I’ve searchedthroughthe online documentation but to no avail…

Thank you!

No, currently there is no such thing. Closest thing would be sample_buffer:save_as(), but that only saves the sample data and not the instrument.

Would be a nice feature to have…

Thanks. It would be nice indeed…

+1

EDIT: load_from() would be nice too …

@taktik is this a feature that you and the team could please take a look at adding?

I’m trying to write a Renoise tool to automate creating a library of XRNI instrument files from selected instruments in a song, but I can’t do it without this functionality.

My use case is that I’ve rigged up an external application to quickly jump between instruments in Renoise via a Launchpad S MIDI device.

It’s a bit of a bummer for me that I can’t save instruments via the API because I’ve written a bunch of code to load XRNIs via Lua, and it works like a charm. This is the last piece of functionality I need to be able to quickly manage my instrument library without using the “Save Instrument As” modal in the GUI.

FYI, to load instruments you can just use
renoise.app():load_instrument(“filename.xrni”)

Are these not it then?

That’s it, thank you! Didn’t realize the functionality was in the app instead of the song.