Loading / saving a .fxp preset via LUA?

I would like to know if it is possible to load and save a .fxp preset in Renoise using LUA? To a custom path? Since Renoise already is capable of loading/saving FXP for a VSTi and also importing/exporting a FXP for a VST, is it possible to remotely trigger those functionality using LUA?

I have this same question, so I’m bumping this. Does this need to be a API FR??

While you can’t load FXB or FXP formats directly, you are still able to iterate through all parameters and save / load them using an own format in XML for example. For most VSTs this will work fine, with a few exceptions where some plugins like to use parameters outside the VST specification. Considering Renoise own formats there might be some ways even to use a kind of hacky method. Since LUA can call external programs you could call a small commandline program written in C or whatever, which invokes the ShellExecuteEx() function from Windows, which kind of behaves in a similar way than double clicking something in Explorer. Other ideas could be letting a commandline program generate Renoise clipboard XML formats and sending that to Renoise. Of course easier if direct support would be included, but there could be some ways around it, depending on if you specifically need FXP or FXB support for other hosts for example or not. :slight_smile:

Unfortunately my two main instruments, Kontakt and Reaktor cannot restore from parameters… Can Guitar rig? I doubt it, as the parameter list changes with every preset, depending on what is in the chain.

The only time you would need to restore from parameters would be if your vsts didn’t even maintain a preset list, right? (I think I remember encountering one of those about 15 years ago, and did some parameter workaround in bidule or usine, but it’s been a while.)

But to be more specific:

I need to load an FXB into Reaktor via command. Once this is done, patches could be restored from parameters, but I just use the preset list that is loaded with the instrument, which renoise can discover just fine. Guitar Rig is similar to Reaktor. It only exposes the first 128 presets to host control, so it’s necessary to use fxbs to get more sounds available.

In Kontakt, I need to load an FXP for every item in the preset list. I have 500+ kontakt fxps already saved and organized into folders, (for use with my abandoned Max port) and I’d like to be able to use those, and not have to redo them in some new hack format.

Is it difficult to implement load/save of fxbs and fxps?? Reaper can do it from its own menu, they just haven’t put it in the API, and I don’t see any indication of interest in doing it…

thanks!

-e

I don’t think it’s difficult to expose those functions, since they are already there in Renoise, just missing from the API. Your request is fully valid, not trying to argue against it.

Out of curiosity i did gave it a try here and checked more in depth. Instruments loading would work fine using the ShellExecuteEx() variant. You would need to resave your instruments into XRNI format, which also works fine with VST instruments, the XML includes a tag which is in fact just the FXP data encoded. Double clicking a XRNI will send it to the currently selected instrument slot. So from your Renoise tool you would have to select the slot to send the instrument into, then call your little helper command line program with a path to the XRNI to load, the program invokes ShellExecuteEx() on it and the XRNI is loaded where you wanted it.

For effects this would be a little more fiddly, Your tool would have to generate Renoise XRNT files, which is just XML containing all the devices on a track including FXP data for each. A device/plugin is saved under a tag, which would be your presets (part of the XML) you’d have to store in an own format for each plugin. When you then change a plugin, you will have to generate that XRNT completely new (have to keep track of what is loaded into each), select a track from LUA you want the chain to go into, then pass a path to that XRNT to the commandline helper using ShellExecuteEx() again and your full chain with new presets is loaded.

Not ideal as said, since you would have to redo all your presets, but it’s not impossible and can work. :slight_smile:

wow, it does sound a bit complicated. I’ll read up on XRNI–is that a renoise-specific format? With Hollyhock, I was able to semi-automate the process of converting from fxp’s. That sped things up somewhat. I imagine I could do something like that here…

I am assuming that renoise does have real-time low-latency midi input capability? It occurred to me that as a tracker, it actually might not… although I did use step-sequencers back in the 80’s, I’ve never actually worked with a tracker, since I’m schooled as a pianist, and prefer to just play things in.

Out of curiosity i did gave it a try here and checked more in depth. Instruments loading would work fine using the ShellExecuteEx() variant.

Since 3.1, you can in fact load instruments via the API, and a bunch of other stuff. Should give some more control over the process:
https://github.com/renoise/xrnx/blob/master/Documentation/Renoise.Application.API.lua#L124

And yes, no direct ability to load fxp/fxb, but loading a pre-configured instrument seems like a nice workaround

I’ll read up on XRNI–is that a renoise-specific format?

Yes, it’s basically a zipped XML file containing everything that makes up a Renoise instrument - including samples, plugin data and MIDI settings.

And yes, the Renoise API does MIDI just fine - as long as the script is responding to live input, timing should be fine.
However for MIDI output, your best choice is to sequence the data (through a pattern). A scripts is evaluated only 10-20 times per second, not enough when timing is critical.

A scripts is evaluated only 10-20 times per second, not enough when timing is critical.<<

So if I write a script that does some manipulation of midi data, (say note or velocity remapping) a note played in is subject to a 50-100 ms variable lag before being sent to the vst?

I don’t need my button presses in the interface to be instantaneous–(I won’t be trying to control a drum machine from my touchscreen), but I do need realtime transposition (with stuck note protection) channel and note remapping and velocity scaling in real time.

I suppose I could use a midi-manipulation vst to do that, and then control its parameters from a script? I think blue cat makes a scriptable midi vst.

Since 3.1, you can in fact load instruments via the API, and a bunch of other stuff. Should give some more control over the process:
https://github.com/renoise/xrnx/blob/master/Documentation/Renoise.Application.API.lua#L124

Good to know, wasn’t aware of it being added in now. This would make loading and saving a lot easier.

I suppose I could use a midi-manipulation vst to do that, and then control its parameters from a script? I think blue cat makes a scriptable midi vst.

LUA scripts / tools run in the Renoise GUI thread separated from the realtime audio things, so your LUA script in this case would still only be able to control the parameters at the same rate as mentioned above. If you plan your manipulations a little ahead of time it’s usually not that big of a problem. It highly depends on the usage case and how time critical it is.