<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Saving MIDI CC assignments in user presets?]]></title><description><![CDATA[<p dir="auto">HISE saves MIDI CC assignments in the <code>.preset</code> when a user saves.</p>
<p dir="auto">This seems contrary to a lot of other synths I've used.</p>
<p dir="auto">Feels like normally, I would set up some MIDI CCs on various knobs, then browse through presets and those CC assignments would stick across preset loads.</p>
<p dir="auto">This allows me to [1] set up a consistent 'performance' system, like mod wheel to filter cutoff, knob1 to filter res, etc, for all presets and [2] play through presets and have any existing CC automation produce predictable results.</p>
<p dir="auto">HISE saving MIDI CC assignments to the preset data means that, after setting up a bunch of CC assignments for one preset, when I load a new preset they will either [1] all disappear if the new preset has no saved assignments, or [2] change to different assignments.</p>
<p dir="auto">If anything, I'd prefer to have MIDI CC assignments saved globally, separate from the preset data, so they persist across not only presets but instances of the plugin.</p>
<p dir="auto">What do you all do about this?</p>
]]></description><link>https://forum.hise.audio/topic/14914/saving-midi-cc-assignments-in-user-presets</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 12:10:15 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14914.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Jul 2026 08:52:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 12:03:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Lol</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/449">@ustk</a> said in <a href="/post/121883">Saving MIDI CC assignments in user presets?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Can't the CC mapping simply be removed from the preset using the handler? Isn't the custom preset intended for this purpose in the first place? Never tried myself that being said...</p>
</blockquote>
<p dir="auto">Just checked and the answer is no, you can't manage what is written... But Claude came with a neat solution:</p>
<pre><code>// (processBeforeLoading, unpackComplexData)
uph.setEnableUserPresetPreprocessing(true, false);

uph.setPreCallback(function(presetData)
{
    // presetData is a JS object; MidiAutomation is a top-level property.
    // Emptying it means applyJSON rebuilds an empty &lt;MidiAutomation&gt; node,
    // so the incoming preset never overwrites the current CC assignments.
    presetData.MidiAutomation = {}; // or just rewrite what you already saved
});
</code></pre>
]]></description><link>https://forum.hise.audio/post/121887</link><guid isPermaLink="true">https://forum.hise.audio/post/121887</guid><dc:creator><![CDATA[ustk]]></dc:creator><pubDate>Fri, 10 Jul 2026 12:03:11 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:50:03 GMT]]></title><description><![CDATA[<p dir="auto">I think this is what the custom user preset model is for: <a href="https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html#setusecustomuserpresetmodel" rel="nofollow ugc">https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html#setusecustomuserpresetmodel</a></p>
<p dir="auto">Haven't tried it myself.</p>
]]></description><link>https://forum.hise.audio/post/121886</link><guid isPermaLink="true">https://forum.hise.audio/post/121886</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:50:03 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:47:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/449">@ustk</a> Not sure. To be honest, I just want all the 'CC data in presets' code out of my fork.</p>
<p dir="auto">Might just drop the preprocessor and remove it all directly.</p>
<p dir="auto">I can't see a situation where I would ever <strong>want</strong> CC data in the presets. So a preprocessor is only useful for backwards compatibility, which I don't have any of <img src="https://forum.hise.audio/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61c.png?v=fba14f4754a" class="not-responsive emoji emoji-android emoji--stuck_out_tongue_winking_eye" style="height:23px;width:auto;vertical-align:middle" title=":stuck_out_tongue_winking_eye:" alt="😜" /></p>
]]></description><link>https://forum.hise.audio/post/121885</link><guid isPermaLink="true">https://forum.hise.audio/post/121885</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:47:45 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:45:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Apparently not.</p>
<p dir="auto">There are 3 HISE restore points that run after <code>onInit</code>, so it still needs handling.</p>
<p dir="auto">From Claude:</p>
<blockquote>
<p dir="auto"><strong>Fresh instance in a DAW</strong>: <code>FrontendProcessor::restorePlugin</code> runs <code>compileAllScripts()</code> (your onInit applies the file) and then restores the<br />
MidiAutomation node from the embedded project state (<code>FrontEndProcessor.cpp:458</code>). The export always writes that node — even when empty, <code>exportAsValueTree</code> adds it unconditionally — so a fresh instance immediately clears the mappings you just loaded. Your file-load is defeated before the user ever touches the plugin.</p>
<p dir="auto"><strong>Reopening a session</strong>: the host calls <code>setStateInformation</code> at some point after instantiation (host-dependent timing), and <code>FrontEndProcessor.cpp:576</code> restores the session's stale mapping copy over whatever onInit applied.</p>
<p dir="auto"><strong>In the editor</strong>: every project load stashes the project XML's <code>&lt;MidiAutomation/&gt;</code> and applies it after script compilation (<code>MainController.cpp:562/577</code>)<br />
— same wipe while you're developing.</p>
</blockquote>
]]></description><link>https://forum.hise.audio/post/121884</link><guid isPermaLink="true">https://forum.hise.audio/post/121884</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:45:35 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:45:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Can't the CC mapping simply be removed from the preset using the handler? Isn't the custom preset intended for this purpose in the first place? Never tried myself that being said...</p>
]]></description><link>https://forum.hise.audio/post/121883</link><guid isPermaLink="true">https://forum.hise.audio/post/121883</guid><dc:creator><![CDATA[ustk]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:35:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Maybe, yes.</p>
]]></description><link>https://forum.hise.audio/post/121882</link><guid isPermaLink="true">https://forum.hise.audio/post/121882</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:35:35 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:33:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> said in <a href="/post/121877">Saving MIDI CC assignments in user presets?</a>:</p>
<blockquote>
<p dir="auto">Launch the plugin - load the CC mappings from separate file</p>
</blockquote>
<p dir="auto">Handled here, no?</p>
]]></description><link>https://forum.hise.audio/post/121881</link><guid isPermaLink="true">https://forum.hise.audio/post/121881</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:30:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Claude also found another case to consider - plugin launch.</p>
<p dir="auto">Looking at it now.</p>
]]></description><link>https://forum.hise.audio/post/121880</link><guid isPermaLink="true">https://forum.hise.audio/post/121880</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:29:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> said in <a href="/post/121878">Saving MIDI CC assignments in user presets?</a>:</p>
<blockquote>
<p dir="auto">Save the preset - the CC mappings save with the preset, so maybe do a post save callback to remove the data</p>
<p dir="auto">You don't need to do anything here because you're already loading the CCs from the file.</p>
</blockquote>
<p dir="auto">That's true, but if you leave the CC mappings in the preset file then it becomes lies on disk.</p>
<p dir="auto">Likely to be confusing to someone looking at the preset XML.</p>
<p dir="auto">Agree on the AppConfig.h, Claude forced it into the commit, I'll remove it.</p>
]]></description><link>https://forum.hise.audio/post/121879</link><guid isPermaLink="true">https://forum.hise.audio/post/121879</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:29:22 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 11:08:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> said in <a href="/post/121877">Saving MIDI CC assignments in user presets?</a>:</p>
<blockquote>
<p dir="auto">Save the preset - the CC mappings save with the preset, so maybe do a post save callback to remove the data</p>
</blockquote>
<p dir="auto">You don't need to do anything here because you're already loading the CCs from the file.</p>
<p dir="auto">So your preprocessor removes step 2 the rest is the same.</p>
<p dir="auto">I think AppConfig.h is autogenerated when you save the juicer file so probably shouldn't be tracked by git - I could be wrong.</p>
]]></description><link>https://forum.hise.audio/post/121878</link><guid isPermaLink="true">https://forum.hise.audio/post/121878</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Fri, 10 Jul 2026 11:08:53 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 10:58:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Unless you prevent saving/loading the CC data to presets, you're always doing more than you should have to.</p>
<p dir="auto">Without the preprocessor:</p>
<ol>
<li>Launch the plugin - load the CC mappings from separate file</li>
<li>Load a preset - <strong>in post load callback you need to reassign CC mappings because they're overwritten by the load</strong></li>
<li>Assign some CC mappings - automatically save the new mappings to separate file here</li>
<li>Save the preset - <strong>the CC mappings save with the preset, so maybe do a post save callback to remove the data</strong></li>
<li>Load the next preset, etc.</li>
</ol>
<p dir="auto">With the preprocessor:</p>
<ol>
<li>Launch the plugin - load the CC mappings from separate file</li>
<li>Load a preset - <strong>nothing to do</strong></li>
<li>Assign some CC mappings - automatically save the new mappings to separate file here</li>
<li>Save the preset - <strong>nothing to do</strong></li>
<li>Load the next preset, etc.</li>
</ol>
]]></description><link>https://forum.hise.audio/post/121877</link><guid isPermaLink="true">https://forum.hise.audio/post/121877</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 10:58:51 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 10:51:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> load them in the post load callback</p>
]]></description><link>https://forum.hise.audio/post/121876</link><guid isPermaLink="true">https://forum.hise.audio/post/121876</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Fri, 10 Jul 2026 10:51:57 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 10:45:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> Scripting the saving and loading of MIDI CC assignments to a separate file is one step, but you also have to fight the saving and loading of the data in the presets.</p>
<p dir="auto">Claude came up with a (hacky) way to script around it but in the end I felt like a PR with a new preprocessor was better.</p>
<p dir="auto"><a href="https://github.com/christophhart/HISE/pull/995" rel="nofollow ugc">https://github.com/christophhart/HISE/pull/995</a></p>
<p dir="auto">(I know there are already too many preprocessors, but this is mainly just for me, only upstreaming in case anyone else wants it.)</p>
<p dir="auto">So now I just turn this off (<code>HISE_MIDI_AUTOMATION_IN_USER_PRESETS=0</code>) and then I don't have to fight anything in script.</p>
]]></description><link>https://forum.hise.audio/post/121875</link><guid isPermaLink="true">https://forum.hise.audio/post/121875</guid><dc:creator><![CDATA[dannytaurus]]></dc:creator><pubDate>Fri, 10 Jul 2026 10:45:21 GMT</pubDate></item><item><title><![CDATA[Reply to Saving MIDI CC assignments in user presets? on Fri, 10 Jul 2026 09:40:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/357">@dannytaurus</a> This is a very good point and something I'm going to start adding to my instruments, don't know why I didn't think about it before.</p>
<p dir="auto">I'm pretty sure if can be achieved using the MidiAutomationHandler and storing the automation settings to a file which you load back in on init.</p>
<p dir="auto"><a href="https://docs.hise.audio/scripting/scripting-api/midiautomationhandler/index.html" rel="nofollow ugc">https://docs.hise.audio/scripting/scripting-api/midiautomationhandler/index.html</a></p>
]]></description><link>https://forum.hise.audio/post/121874</link><guid isPermaLink="true">https://forum.hise.audio/post/121874</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Fri, 10 Jul 2026 09:40:24 GMT</pubDate></item></channel></rss>