How to save current expansion in a DAW project
-
I'm not being able to save the current expansion in DAW projects.
-
@bendurso How are you setting the current expansion?
-
@d-healey Using Engine.setCurrentExpansion()
-
@bendurso which daws have you tested?
-
@d-healey FL Studio, Ableton and Reaper. All the parameters with saveInPreset are restored. But the expansion is not.. there is no saveInPreset parameter with the expansion.
-
@bendurso said in How to save current expansion in a DAW project:
Engine.setCurrentExpansion()
Is this triggered in a control callback?
-
@d-healey Is triggered inside a setMouseCallback of a child panel. I tried setting saveInPreset for the parent panel but it didn't work.
O wait, maybe I should set saveInPreset for the child panel right?I think not, because I tried this and didn't work:
local p = panel.addChildPanel(); p.set("saveInPreset", true);
I have child panels that show the image of the expansion, and when you click it, it loads the expansion.
-
@d-healey I checked and you're make something similar in Rhapsody. But you're using expHandler.setCurrentExpansion instead of Engine.setCurrentExpansion. Maybe that's why?
O and you're sending it to an inline function. You are not calling it inside the mouse callback for some reason?
-
@bendurso child panels cannot be saved in a preset
-
@bendurso said in How to save current expansion in a DAW project:
You are not calling it inside the mouse callback for some reason?
Just to keep things organised and modular. Setting the current expansion goes in the Expansions namespace, while the UI/UX goes in a different namespace.
It's still triggered from the mouse callback though.
-
@d-healey Nice thanks. I tried using expHandler instead of Engine and it's the same.
The image and presets of the expansion are restored, but the expansion samples are not restored (the samplemap combobox is empty).
-
@bendurso Send me the project with an expansion and I'll take a look
-
@bendurso said in How to save current expansion in a DAW project:
the expansion samples are not restored (the samplemap combobox is empty).
Is the expansion itself still loaded? The fact the image is restored indicates it is.
So the real issue is your sample maps aren't being restored.
Instead of loading the sample maps when the panel is clicked, you could try doing it from within the Expansion Callback - or even the post preset load callback.
-
@d-healey Oh, that was it—thank you so much!
I thought that since I was calling loadSampleMaps on init, it would be sufficient. But it only worked after I called it in the expansion callback, once the expansion was loaded.
-
@bendurso Nice :)
-
B bendurso marked this topic as a question
-
B bendurso has marked this topic as solved