Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
|
the_plugin_processor [2017/08/30 17:45] shane [setCurrentProgram()] |
the_plugin_processor [2017/08/30 17:47] (current) shane |
sendChangeMessage(); | sendChangeMessage(); |
} | } |
</cpp> | </code> |
| |
The present VanillaJuce GUI does not display program names, but I've included a call to //sendChangeMessage()// to notify the GUI anyway, so I won't forget it. If and when I do add a program-name display to the GUI, it will get updated whenever the name is changed through the plugin host. | The present VanillaJuce GUI does not display program names, but I've included a call to //sendChangeMessage()// to notify the GUI anyway, so I won't forget it. If and when I do add a program-name display to the GUI, it will get updated whenever the name is changed through the plugin host. |
===== The preset-handling functions ===== | ===== The preset-handling functions ===== |
| |
The plugin host can call //getCurrentProgramStateInformation()// to get the current preset as a "blob" of binary data (which it can e.g. save to a ''.fxp'' file), or call //setCurrentProgramStateInformation()// to do the reverse operation. In an early version of VanillaJuce, I simply did a binary copy of the //SynthParameters// ''struct'', but I realized that would cause problems as I changed the structure over time, so the new code uses JUCE's XML capabilities to save and restore the data in XML format: | The plugin host can call //getCurrentProgramStateInformation()// to get the current preset as a "blob" of binary data (which it can e.g. save to a ''.fxp'' file), or call //setCurrentProgramStateInformation()// to do the reverse operation. In an early version of VanillaJuce, I simply did a binary copy of the //SynthParameters// ''struct'', but I realized that would cause problems as I changed the structure over time, so the new code uses JUCE's XML capabilities to save and restore the data in XML format. (I based my code on that in [[https://github.com/2DaT/Obxd|Obxd]].) |
<code cpp> | <code cpp> |
void VanillaJuceAudioProcessor::getCurrentProgramStateInformation(MemoryBlock& destData) | void VanillaJuceAudioProcessor::getCurrentProgramStateInformation(MemoryBlock& destData) |