Hi, what would be the easiest way to perform a global “find and replace” in a preset?
I need to replace a part of a Sysex string in hundreds of controls to another string in order to make the preset compatible with another model of the some (Korg) brand.
I thought to download the preset as a preset (.epr format) or as a project (.eproj) and then perform a “replace all” via Notepad for instance and upload the result again, but I’m unfamiliar with these formats, let alone know if I could bring this operation to a good end.
My solution was to open the LUA code, Ctrl-A, Ctrl-C, and paste it into Notepad/Wordpad/TextEdit, do the changes there, then cut and paste the whole thing back into the Electra environment.
Bonus points for saving the original before making the changes
EDIT - if it’s all in the JSON, you can pull down the EPR, pretty print it, then do the substitution in an editor, then unminify it and send it back up. Not exactly sure what happens on the re-upload; whether the Electra environment considers that a new preset or not.
Not sure that would work. The Sysex string I want to replace is defined within each SysEx control, not in the LUA. So unless there is a way to export all the jsons from within each control into LUA, that wouldn’t do the trick.
I’m not afraid to uae notepad or the likes to change strings. But what format should I use .epr? .eproj? In other words what’s the best format to import back into Electra? And is this importing as a new Preset or importing into an existing preset? Moreover, does it change the ID’s of controls?
it is better to edit the project file (.eproj). It is a file that the editor works with and the preset is generated out of that project. If you edit and import the preset file, editor will internally convert that to a project anyways.
I would suggest to make the edits and import as a new project. Check if everything is ok. If it is, you can import the same file as a new project revision later.
When using the project file, the IDs will stay unchanged.