Multiple instruments, single project or multiple projects?
-
Oh that looks like a better way to do it. Does this work script processors?
-
Yes. It does the same thing as copying a module with Ctrl+C.
-
This is excellent news, I'm glad I checked in with you before I went any further :D
-
The functions only seem to be available for Modulators and Effects, I get a function not found error when attempting export state on a Midi Processor.
const var script = Synth.getMidiProcessor("Script Processor"); script.exportState();
-
I've put together a script using the export and restore state functions that will save all modulators and effects with the preset, the global userPresetData and the panel should be in whichever script is going to have the front interface of course but I've included them all in one script for the purpose of this demo. If we can have these export and restore functions working for scripts too then it will be really easy to use the preset system without having to hard code the saving and loading for each control of each script.
<?xml version="1.0" encoding="UTF-8"?> <Processor Type="SynthChain" ID="state test" Bypassed="0" Gain="1" Balance="0" VoiceLimit="64" KillFadeTime="20" IconColour="0" packageName="" views="32.rk1bzA.....C.........LDZg4lakwVL.....PA...." currentView="-1"> <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="0" InterfaceShown="0"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="ScriptProcessor" ID="Script Processor" Bypassed="0" Script="//INCLUDES //INIT Content.setHeight(50); // Create a storage panel, hide it, and save it in the preset const var storagePanel = Content.addPanel("storagePanel", 0, 0); storagePanel.set("visible", false); storagePanel.set("saveInPreset", true); // Create a global object that will hold the values for the other scripts. global userPresetData = {}; // Set the global storage as widget value for the hidden panel. // Important: this will not clone the object, but share a reference! storagePanel.setValue(userPresetData); const var btnLoad = Content.addButton("Load Preset", 150, 10); const var btnSave = Content.addButton("Save Preset", 0, 10); const var modulatorIds = []; const var effectIds = []; const var modulators = {}; const var effects = {}; //MODULATORS //Voice Start mergeArrays(modulatorIds, Synth.getIdList("Constant")); mergeArrays(modulatorIds, Synth.getIdList("Velocity Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Notenumber Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Random Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Global Voice Start Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Array Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Script Voice Start Modulator")); //Time Variant mergeArrays(modulatorIds, Synth.getIdList("LFO Modulator")); mergeArrays(modulatorIds, Synth.getIdList("CC Controller")); mergeArrays(modulatorIds, Synth.getIdList("Pitch Wheel Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Macro Control Modulator")); mergeArrays(modulatorIds, Synth.getIdList("Audio File Envelope")); mergeArrays(modulatorIds, Synth.getIdList("Global Time Variant Modulator")); mergeArrays(modulatorIds, Synth.getIdList("CC Ducker")); mergeArrays(modulatorIds, Synth.getIdList("Script Time Variant Modulator")); //Envelopes mergeArrays(modulatorIds, Synth.getIdList("Simple Envelope")); mergeArrays(modulatorIds, Synth.getIdList("AHDSR Envelope")); mergeArrays(modulatorIds, Synth.getIdList("Table Envelope")); mergeArrays(modulatorIds, Synth.getIdList("Midi CC Attack Envelope")); mergeArrays(modulatorIds, Synth.getIdList("Script Envelope Modulator")); for (id in modulatorIds) { 	modulators[id] = Synth.getModulator(id); } //EFFECTS mergeArrays(effectIds, Synth.getIdList("Monophonic Filter")); mergeArrays(effectIds, Synth.getIdList("Polyphonic Filter")); mergeArrays(effectIds, Synth.getIdList("Harmonic Filter")); mergeArrays(effectIds, Synth.getIdList("Harmonic Filter Monophonic")); mergeArrays(effectIds, Synth.getIdList("Parametric EQ")); mergeArrays(effectIds, Synth.getIdList("Stereo FX")); mergeArrays(effectIds, Synth.getIdList("Simple Reverb")); mergeArrays(effectIds, Synth.getIdList("Simple Gain")); mergeArrays(effectIds, Synth.getIdList("Convolution Reverb")); mergeArrays(effectIds, Synth.getIdList("Delay")); mergeArrays(effectIds, Synth.getIdList("Limiter")); mergeArrays(effectIds, Synth.getIdList("Chorus")); mergeArrays(effectIds, Synth.getIdList("Phase FX")); mergeArrays(effectIds, Synth.getIdList("Gain Collector")); mergeArrays(effectIds, Synth.getIdList("Routing Matrix")); mergeArrays(effectIds, Synth.getIdList("Saturator")); mergeArrays(effectIds, Synth.getIdList("Plugin Wrapper")); mergeArrays(effectIds, Synth.getIdList("Script FX")); for (id in effectIds) { 	effects[id] = Synth.getEffect(id); } //FUNCTIONS inline function mergeArrays(a, b) { 	for (i = 0; i < b.length; i++) a.push(b[i]); } inline function savePresetData() { 	for (id in modulators) 	{ 		userPresetData[id] = modulators[id].exportState(); 	} 	for (id in effects) 	{ 		userPresetData[id] = effects[id].exportState(); 	} } inline function loadPresetData() { 	for (id in modulators) 	{ 		modulators[id].restoreState(userPresetData[id]); 	} 	for (id in effects) 	{ 		effects[id].restoreState(userPresetData[id]); 	} } //CALLBACKS function onNoteOn() { 	 } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	if (number == storagePanel) 	{ 		// Replace the global object with the one from the user preset 		userPresetData = value;	 	} 	if (number == btnLoad) 	{ 		loadPresetData(); 		number.setValue(0); 	} 	if (number == btnSave) 	{ 		savePresetData(); 		number.setValue(0); 	} }"> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="1" onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="0"/> <ChildProcessors/> <Content> <Control type="ScriptPanel" id="storagePanel" value="JSON{"DefaultEnvelope": "231.3ocgOtjSBDDDFtZYlXXmtykbDvSf7zDRvjIND22RWjoBEcMYpFLyMfiE2AuHdDrGPFIZL1qp9O0iuurJYIppTAlqWTWhf4lzbZSIiS86PVhIyl.laSmfqra4Pa5n5RqpnCLlNy7AzqTnFLcSfiuOdXXHXWttM4fL3YjQqhsQ6eevbxi1pmDGd4nlql5nfTkGrATASmQhqNuPdyGqSuGdgT5UFO8IWXoopO.iKH1kc1HEhrk8seIm8KdtsrMt+wEVxezu6ROgauEzFr2WMPh++07mrl72r1+BVeTXWyVaZ42bCeBet01m", "Simple Envelope": "", "AHDSR Envelope": "307.3oc0SFqSCCCDF9LIVHPkR2XsOBkQFPMsIE0JQkhZpX2DaoXgItJ1onr0Wi91vHi7HvVW4Qfj3DR.DRcCpmN+6y286Oc1OQFxTJYBf5rLaECPGiGM0KXALyCP8Lw8mDulIj4mNNaEQoXT.grlEqYwJtNCPmXCkq2GNRqIgO3llrlUIu45S2MziERxZq1J4ZkMyewwnbKKucMIBvTof949WScJKWSBW4DjpzDdbkzaa2dwyKXBFQ8k9gNZBkqkIAZhlo.j0XIMKHR9T9EsvWB2wU76ELyl.oPVDM..2Htf5WSJE.HreC2rMbqGdtjlJH402MpvKE.7Lr4E0eI+w8fde2f1+tAGzxf2jimhpVjxOMKrmdsasWM3++sY6fKmAND3543poyCBv1EW8w4OEse.2rEMXA", "Table Envelope": "", "Midi CC Attack Envelope": "", "Simple Gain": "306.3oc0RFjRDCCEF98l1fHnvnmf4HLEW3RKcpJyhQJFQWJwlfMPljRSJZck2Iu.dj7FnMcZmwAQvkNYU9+eIu78mjrJStvZMU.t2MMkB.OfPkKKUhKYRMLOEvC6Mlz4jzTxrVAGPLny.2OD.H9j2N88Tgh0r1H3k36jbWQuA.udebBSwz4hMVowXv4boyTQcLmvBXPhg2PKLO015.RDbqzJePIVInFkwOaJ.yJjJd1.9V.vvrMgIbUXFSVX30JVa+mULDniHdvmzWQZ1NTy0Ng1JcMqgD93Lbz1PF96PN8aPdgQw8c0ujeBL7G48XR2E6tDvcO76N.Oljw9O7g3ZSsSpebAyUIeFPxU0Kol5pbQKpZsP0dPDbD32ZmdpW6AhJz7Nwmsi9hQdM1WLZnH7EfHC.gs"}"/> <Control type="ScriptButton" id="Load Preset" value="0"/> <Control type="ScriptButton" id="Save Preset" value="0"/> </Content> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="1" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="StreamingSampler" ID="Sampler" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="1.0470319e+09" RRGroupAmount="1" PitchTracking="1" OneShot="0" CrossfadeGroups="0" Purged="0" NumChannels="1" SampleMap=""> <EditorStates BodyShown="0" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="SimpleEnvelope" ID="DefaultEnvelope" Bypassed="0" Intensity="1" Attack="254" Release="20000" LinearMode="1"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Attack Time Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> <Processor Type="AHDSR" ID="AHDSR Envelope" Bypassed="0" Intensity="1" AttackCurve="0.72000003" DecayCurve="1" Attack="12443" AttackLevel="0" Hold="349" Decay="25" Sustain="-5.900001" Release="1"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Attack Time" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Attack Level" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Decay Time" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Sustain Level" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Release Time" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="SimpleGain" ID="Simple Gain" Bypassed="0" Gain="-23.700001" Delay="416.20001" Width="126" Balance="41"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Gain Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Delay Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Width Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Pan Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="0" RRGroupAmount="1" MicPositions=";"/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <macro_controls> <macro name="Macro 1" value="0" midi_cc="-1"/> <macro name="Macro 2" value="0" midi_cc="-1"/> <macro name="Macro 3" value="0" midi_cc="-1"/> <macro name="Macro 4" value="0" midi_cc="-1"/> <macro name="Macro 5" value="0" midi_cc="-1"/> <macro name="Macro 6" value="0" midi_cc="-1"/> <macro name="Macro 7" value="0" midi_cc="-1"/> <macro name="Macro 8" value="0" midi_cc="-1"/> </macro_controls> <MidiAutomation/> </Processor>
-
Alright I added the missing functions (along with the functions for restoring synths as a whole).
I also spent another tool that creates such a Base64 String from the currently selected module (Edit -> Create Base64 string).
This solution is not yet 100% clean because it recompiles the scripts which is actually not something you want when restoring presets. I'll have to change it so that the string only contains the content values.
It's commited so feel free to check it out.
-
Awesome, thanks Christoph!
-
Alright, I just commited the improvement for the script processors - it just restores the content values without recompiling the script - the onControl Callbacks get executed of course.
Check out the example that switches the table values of another script processor:
HiseSnippet 1271.3ocsW82aZaDF9bRr1h6XpcZ+4jlk+KhRpKNgzjrpoU9QngTf.AhCjtnNi8Y3B19PmOHPp5mj8kbeC1tyFGLAHML0ZIv9d+wcO988dd3nJAaB88wDfvyZLtODH7Ch0G6Q6lqqAxCTLOP3GEKa3SgD4PSYG22v2GZADDV+cbCBatAH35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mb9SDeANIH5jZoRwkitmo0m.6aPfMvUcLFmz2vsuC7bVmZG4vm8qBIYcvl8lii1OrCD3LY6A11PxxTF95pYrLogf3lif+rm19sGRmmotD27zW5uRb+4n5yq07DI+aDR9SDQD3aBBX9emX3yOf1C.VFTCfvwhoOTc1qgm071KqczckFSNHWv3d2bSosa5zxY+vwrur2lG5QgiAOUIjWHVEQM6tXMj0V.wi8N9z0PRsPMjEVBm+.kIDOlsM1jNEraHVn4+2SOtBP4b7.JxqSYCJAMhonUYfac1wyMgLj34Ac74mmdMdaObbJ9XdkoNzyJUzgsm3TiOVXhSsHm.WCSB9ilgaV3ZneefEFl7BN3+lr+ABarrVz1DNtcYmi9ill7BwKYHewYr6JmwdqbFoW4L1eky30qbFGrxYb3ijA+OsjY.E6FRK.f+CjAFVbL
-
Thanks, going to build this now :D
-
"(along with the functions for restoring synths as a whole)."
Could you tell me a bit more about this?Also I noticed an issue with the script I'd made, if you add a modulator to an envelope and then click the save button, then you remove the modulator and then hit load the saved modulator won't reappear until you add another modulator to the envelope. Playing around with this and changing the values in the modulator etc can also cause HISE to crash and close.
-
Just use
Synth.getChildSynth()
and call the export / restore methods on this object to restore whole sound generators (and even samplers with sample maps).Adding modulators programmatically is a bit difficult because it sometimes doesn't update the interface (if it's of any help, the compiled versions won't have this problem...)
I'll need to check this a bit more thoroughly. Can you reproduce a crash with certain steps or is it just random?
-
I made a quick video to demonstrate how to cause the crash using the script I posted yesterday. Also how do you post code here so it's on one line like you do? I use the ``` but it's always placed in a large box.
-
Thanks, I'll investigate.
You are posting XML snippets. If you post HiseSnippets (the ones you get using File -> Export -> Export as Web Snippet), you'll get a String without line breaks which fits nicely in one line...
-
Cool, I found another way to crash HISE :) this time I'm using restore and export on childSynths, basically whenever I make a change and hit save and load it crashes. Try adding a container and a sampler to the container and it crashes instantly without having to press any buttons even!
HiseSnippet 1184.3ocsV8+SabCE2GvM0KaTsNs+.73mBprzj1xV0XnUR.1xJDh5QQUpppy4NGN2dwNxmu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Npc2d4HvdPqjgBdWNScxX5r0VBYtjlnYDwxhJHfkkZHdUXVgna9bEJ6vO7v0pYlCeoLOasd9yVZhHhEpmSoL2DY3PHmG3969mz6pqsAqbDdXVDrWqXBw5tktZJOBdeQ9rL2sPT55oJBwMe.FFCPDlFSTyOafd1pLEvIz4d8sqtpjvTSKO60RLvPyJGXnUUcf6HbejaelJHpZ7tRE3EZo+ei2rwuV28fgCgahJ.6ZtG9166rVKATdsHUw3meLQIYWBScBu83CC1FPAjvAFZhdRzUzrJ65l505JiOkG1LeL0LkszqcxT1JWIZDIPJ9PfkVpGv6AFI.l3lQl8fY2g03V4LQMtGASc9gf.cg36AjWsGOco83YKsGOeo8X6k1ieXo83GWZOdws3gdD+8RUhQ1iEHz+B3sqkq.
-
Alright, thanks. BTW, do you know how to run HISE in debug mode from within Visual Studio?
Just change the configuration to Debug in VS2015, compile and it should open a debug instance. If you get a crash there, it stops in the debugger and points to the line of code which causes the crash.
This information will vastly improve the efficiency of tracking down those bugs - not that there are any left :)
-
That's a good idea, I shall do it :)
-
Just tried building the debug 64bit and I got this fatal error:
"1>D:\HISE Development Builds\HISE-master\projects\standalone\JuceLibraryCode\hi_native_jit.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj"The regular standalone 64bit build worked fine though.
-
Ah yes, that one. Go to Project -> Properties (Alt+F7) -> C++ -> Command Line and add
/bigobj
in the
Additional Options box (which should be empty).This happens because the Debug version creates a bigger intermediate object file before linking it to the executable and your computer is maxed out on RAM for these steps.
-
With the code I posted a few days ago and the crash I described with the container and sampler the debugger breaks here:
Using the same code, adding a sampler, making changes, saving and restoring them using my scripted buttons crashes HISE at this point
I'm really not sure what I need to be looking for in VS it's been many years since I did any work in it and nothing on the scale of HISE so hopefully these images are of some use!
-
That's what I suspected, thanks for checking this. BTW, if you click on "Break" in the last picture, it should point you to the line (that would be interesting, because the second error is a bit more critical because it wants to read from an object that was already deleted (and even then, it should say
0x0000000005
and not0xFFFFFFFFF...
. :)