Preset (.hip) opens empty
-
I had for a couple of times same issue, luckily I use make a cloned copy inside two other hard disks... it could be quite annoying (without speaking of the moment of panic for having lost the job done).
-
@Christoph-Hart said in Preset (.hip) opens empty:
I think i need to make a Hip2XML tool so you can see whats wrong.
I hit this problem again with another project. Can't we just get rid of the .hip format altogether?
I made a recovery XML but when I tried to load it I got a message about invalid xml. I fixed the invalid tag and tried to load the file into HISE again but it just opens up an empty project as does the .hip.
-
@d-healey I'm facing rhe opposite. Saved a huge xml (3.5mb) and it does not open. .hip does.
-
@hisefilo said in Preset (.hip) opens empty:
@d-healey I'm facing rhe opposite. Saved a huge xml (3.5mb) and it does not open. .hip does.
Did you try validating the xml? - https://xmlvalidation.com/
-
@d-healey nope! Nice one. Will try it tomorrow
-
@d-healey to be honest this is the only thing I don't feel comfortable with Hise. Never figured out what's the best format to properly save my work.
-
Yes I'm a bit lost too with the formats, and the menu is not clear to me neither
-
I've seen somewhere in the forum the xml is safer to use compared to the hip
In fact I don't know why the hip is made for. I use it in my sand box project so it's easy to test some code whitout loading a new project or xml every time, then when I am ready, I import the code in my main project...I had too many issues with both xml and hip not loading, so I think this way is the safest I found for me at least... but maybe some of you have a safer way to work?
Also, everyday or after a big change in the code, I duplicate the entire project and keep 10 days of backups... paranoia…
-
Or just use Git.
It‘s weird with all projects I did I never had any issues with loading the files so if you find something reproducible let me know.
-
The XML recovery isn't working.
Here is the
.hip
file. I had to change the extension to mp3 so it would upload (maybe .hip should be an allowed upload format).irishWhistles.mp3
irishwhistles.hip (done ;) )Here is the recovered (invalid) XML. This is missing lots of things.
<?xml version="1.0" encoding="UTF-8"?> <Processor Type="SynthChain" ID="irishWhistles" Bypassed="0" Gain="1" Balance="0" VoiceLimit="64" KillFadeTime="20" IconColour="0" packageName="" BuildVersion="650"> <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="ScriptProcessor" ID="Interface" Bypassed="0" Script="/* Copyright 2019 David Healey This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with This file. If not, see <http://www.gnu.org/licenses/>. */ Content.makeFrontInterface(800, 580); include("manifest.js"); include("settings.js"); Synth.deferCallbacks(true); Engine.loadFontAs("{PROJECT_FOLDER}fonts/BLKCHCRY.TTF", "blackCherry"); reg i; reg lastArticulation = 0; //Dynamics\breath control const var dynamicsCC = Synth.getModulator("dynamicsCC"); const var legato = Synth.getMidiProcessor("legato"); const var knbDynamics = Content.getComponent("knbDynamics"); knbDynamics.setControlCallback(onknbDynamicsControl); //Dynamics knobs inline function onknbDynamicsControl(control, value) { dynamicsCC.setAttribute(dynamicsCC.DefaultValue, value); legato.setAttribute(legato.knbBreath, value); } //Settings button inline function onbtnSettingsControl(component, value) { Content.getComponent("pnlInstrument").set("enabled", value); 	Content.getComponent("fltPreset").showControl(0); 	Content.getComponent("pnlAbout").showControl(0); 	Content.getComponent("btnAbout").setValue(0); 	Content.getComponent("btnPreset0").setValue(0); 	Content.getComponent("pnlSettings").showControl(1-value); }; Content.getComponent("btnSettings").setControlCallback(onbtnSettingsControl); //Curve editors const var btnCC = []; const var tblCC = []; for (i = 0; i < 4; i++) { btnCC[i] = Content.getComponent("btnCC"+(i+1)); btnCC[i].setControlCallback(onbtnCCControl); tblCC[i] = Content.getComponent("tblCC"+(i+1)); } inline function onbtnCCControl(control, value) { local idx = btnCC.indexOf(control); local params = ["Expression", "Dynamics", "Vibrato Intensity", "Vibrato Rate"]; for (i = 0; i < tblCC.length; i++) { tblCC[i].showControl(false); btnCC[i].setValue(false); } tblCC[idx].showControl(value); btnCC[idx].setValue(value); //Show velocity table if value is false Content.getComponent("tblCC0").showControl(1-value); //Set parameter label if (value == 1) Content.getComponent("lblParam").set("text", params[idx]); else Content.getComponent("lblParam").set("text", "Velocity"); //Show velocity dynamics button if dynamics is selected Content.getComponent("btnVelDynamics").showControl(idx == 1 && value == 1); Content.getComponent("lblVelocityControl").showControl(idx == 1 && value == 1); } //About screen inline function onbtnAboutControl(component, value) { Content.getComponent("pnlInstrument").set("enabled", 1-value); 	Content.getComponent("fltPreset").showControl(0); 	Content.getComponent("pnlAbout").showControl(value); 	Content.getComponent("pnlSettings").showControl(0); 	Content.getComponent("btnSettings").setValue(1); }; Content.getComponent("btnAbout").setControlCallback(onbtnAboutControl); //Preset handling //Get samplers const var samplerIds = Synth.getIdList("Sampler"); const var childSynths = {}; for (s in samplerIds) { childSynths[s] = Synth.getChildSynth(s); } //Preset buttons inline function onbtnPreset0Control(component, value) { Content.getComponent("pnlInstrument").set("enabled", 1-value); 	Content.getComponent("fltPreset").showControl(value); 	Content.getComponent("pnlAbout").showControl(0); 	Content.getComponent("btnAbout").setValue(0); 	Content.getComponent("pnlSettings").showControl(0); 	Content.getComponent("btnSettings").setValue(1); }; Content.getComponent("btnPreset0").setControlCallback(onbtnPreset0Control); inline function loadAdjacentPreset(control, value) { if (value == 1) { local idx = btnPreset.indexOf(control); idx == 0 ? Engine.loadPreviousUserPreset(false) : Engine.loadNextUserPreset(false); Content.getComponent("lblPreset").set("text", Engine.getCurrentUserPresetName()); } } const var btnPreset = []; btnPreset[0] = Content.getComponent("btnPreset1").setControlCallback(loadAdjacentPreset); btnPreset[1] = Content.getComponent("btnPreset2").setControlCallback(loadAdjacentPreset); //Patch selection and loading drop down const var cmbPatches = Content.getComponent("cmbPatches"); cmbPatches.setControlCallback(oncmbPatchesControl); inline function oncmbPatchesControl(control, value) { local patch = control.getItemText(); colourKeys(patch); loadSampleMaps(patch); if(Engine.getCurrentUserPresetName() == "") Content.getComponent("lblPreset").set("text", "Default"); else Content.getComponent("lblPreset").set("text", Engine.getCurrentUserPresetName()); } //Populate patch selection drop down const var patches = []; for (k in Manifest.patches) { patches.push(k); } cmbPatches.set("items", patches.join("\n")); inline function colourKeys(patch) { local range = Manifest.patches[patch].range; for (i = 0; i < 127; i++) { if (i >= range[0] && i <= range[1]) { Engine.setKeyColour(i, Colours.withAlpha(Colours.white, 0.0)); //Light key colour } else { Engine.setKeyColour(i, Colours.withAlpha(Colours.black, 0.5)); //Dark key colour } } } inline function loadSampleMaps(patch) { local sampleMaps = Sampler.getSampleMapList(); for (id in samplerIds) //Each sampler { //A sample map for this patch was found or sampler is transition sampler if (sampleMaps.contains(patch + "_" + id) || id == "transitions") { childSynths[id].setBypassed(false); //Enable sampler if (id == "transitions") { childSynths[id].asSampler().loadSampleMap(patch + "_staccato"); //Load staccato sample map } else { childSynths[id].asSampler().loadSampleMap(patch + "_" + id); //Load the sample map } } else { childSynths[id].setBypassed(true); //Bypass sampler childSynths[id].asSampler().loadSampleMap("empty"); //Load empty sample map for this sampler } } }function onNoteOn() { 	 } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	 } "> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="1"/> <ChildProcessors/> <Content> <Control type="ScriptSlider" id="knbRel" value="250"/> <Control type="ScriptSlider" id="knbStacc" value="-2.9999986"/> <Control type="ScriptButton" id="btnBreath" value="0"/> <Control type="ScriptButton" id="btnRR" value="0"/> <Control type="ScriptLabel" id="lblVelocityControl" value="Velocity Control"/> <Control type="ScriptButton" id="btnVelDynamics" value="0"/> <Control type="ScriptSlider" id="knbExpression" value="127"/> <Control type="ScriptSlider" id="knbDynamics" value="127"/> <Control type="ScriptSlider" id="knbVibIntensity" value="16"/> <Control type="ScriptSlider" id="knbVibratoRate" value="90"/> <Control type="ScriptButton" id="btnCC1" value="0"/> <Control type="ScriptButton" id="btnCC2" value="0"/> <Control type="ScriptButton" id="btnCC3" value="0"/> <Control type="ScriptButton" id="btnCC4" value="0"/> <Control type="ScriptLabel" id="lblParam" value="Velocity"/> <Control type="ScriptTable" id="tblCC0" value="127" data="24...............vO...f+....9C...vO"/> <Control type="ScriptTable" id="tblCC1" value="23" data="24...............vO...f+....9C..3rO"/> <Control type="ScriptTable" id="tblCC2" value="0" data="36...............vO....+PMvd6C..3rO...f+....9C..jwO"/> <Control type="ScriptTable" id="tblCC3" value="0" data="24...............vO...f+....9C..jwO"/> <Control type="ScriptTable" id="tblCC4" value="0" data="24...............vO...f+....9C..nqO"/> <Control type="ScriptSlider" id="knbGain" value="1.4901161e-06"/> <Control type="ScriptSlider" id="knbPan" value="0"/> <Control type="ScriptSlider" id="knbCoarse" value="0"/> <Control type="ScriptSlider" id="knbFine" value="0"/> <Control type="ScriptLabel" id="lblPreset" value="Default"/> <Control type="ScriptComboBox" id="cmbPatches" value="1"/> <Control type="ScriptSlider" id="knbTransition" value="-11.999999"/> </Content> <UIData> <ContentProperties DeviceType="Desktop"> <Component type="ScriptImage" id="imgBgEmpty" x="0" y="0" width="800" height="600" fileName="{PROJECT_FOLDER}Background_empty.png" scale=".5" text="imgBlankBg"/> <Component type="ScriptPanel" id="pnlInstrument" x="0" y="0" width="800" height="580" itemColour="0" itemColour2="0" bgColour="0" textColour="0" borderSize="0"> </> </Component> </ContentProperties> </UIData> </Processor> </ChildProcessors> </Processor> </ChildProcessors> </Processor>
The recovery file is written to the presets folder but when you use
File >> Open XML
it defaults to the XmlPresetBackups folder, so maybe that would be a better location to place the recovery xml.