placing preset list/output meter. samplemap and compressor?'s
-
im still stuck on this. i cant imagine everyone if anyone at all is using the standard layout and placement of the preset area as is...obviously people are doing this easily i just havent actually gotten an answer on how to do it. i am more of a sound designer, im creating a rompler essentially. i have figured out every part of it aside from the preset aspect. traditional displat current preset, next and prev load save
-
This code snippet should help you out:
Content.makeFrontInterface(600, 500); inline function createPresetButton(name, x, y, up) { local widget = Content.addPanel(name, x, y); Content.setPropertiesFromJSON(name, { "width": 20, "height": 20, "saveInPreset": false, "allowCallbacks": "Clicks & Hover" }); widget.data.up = up; widget.setPaintRoutine(function(g) { g.setColour(this.data.hover ? 0xFFFFFFFF : 0x88FFFFFF); g.fillTriangle([0, 0, this.getWidth(), this.getHeight()], this.data.up ? Math.PI/2 : 1.5 * Math.PI); }); widget.setMouseCallback(function(event) { this.data.hover = event.hover; if(event.clicked) { if(this.data.up) Engine.loadNextUserPreset(true); else Engine.loadPreviousUserPreset(true); } this.repaint(); }); return widget; }; inline function createPresetDisplay(name, x, y) { local widget = Content.addPanel(name, x, y); Content.setPropertiesFromJSON(name, { "width": 143, "height": 25, "allowCallbacks": "Clicks & Hover" }); widget.setPaintRoutine(function(g) { g.fillAll(this.data.hover ? 0xFF333333 : 0xFF222222); g.setColour(0x44FFFFFF); g.drawRect([0, 0, this.getWidth(), this.getHeight()], 1); g.setFont("Oxygen Bold", 15.0); g.setColour(Colours.white); g.drawAlignedText(Engine.getCurrentUserPresetName(), [0, 0, this.getWidth(), this.getHeight()], "centred"); }); widget.setTimerCallback(function() { this.repaint(); }); widget.startTimer(300); widget.setPopupData({"Type": "PresetBrowser"}, [ widget.getWidth()/2, widget.getHeight(), 600, 400]); widget.setMouseCallback(function(event) { this.data.hover = event.hover; this.repaint(); }); return widget; }; const var presetDecButton = createPresetButton("presetDecButton", 52, 7, false); const var presetIncButton = createPresetButton("presetIncButton", 222, 7, true); const var presetDisplayPanel = createPresetDisplay("presetDisplayPanel", 76, 4);
You can of course customise the appearance as much as you want by hacking around in the paint routines of the widgets.
You obviously need the latest HISE version for this (it won't work with HISE 1.0.0).
-
awesome. but i checked the version i just downloaded off the site last week and its still 1.0.0. where are other versions? i click check for updates and it says its up to date soo....but thanks man i just gotta find the latest version :/
-
i have 1.0.0 build 649
-
If you're downloading HISE from the download page, you don't have the latest version, you need to build it yourself from GitHub. The version number will still be 1.0.0, because I don't find the time right now to wrap things up and do a proper 1.1.0 build (which will be the next version number).
-
aaannnnddd how do you do that lol. i have vs2015 installed and the latest hise downloaded from your github
-
The instructions how to build HISE can be found at the GitHub readme or (even better) the first video here:
-
alright i compiled my own new version from the github
-
how would put a browse button that launches the preset browser i liked from before
-
Click on the label in the middle and it will open a popup.
However this won't work if you preview your interface using the home icon (because it would create a popup within a popup).
Use Tools->Open Interface Preview to get a new window which behaves exactly as the actual plugin.
-
am i tripping i dont see the that in the tools> menu?
-
Ooops, silly me. It's in the View menu and it's called "Add Interface Preview" :)
-
yes i found it and with the preset code you gave me clicking the middle nothing happens. no preset explorer popup thanks in advance
-
nvrmnd i had two make interface codes duh thanks
-
how would i make a "browse presets" button or label that triggered the preset browser? thats about it i think im ready to get goin
-
Just duplicate the PresetDisplay box code and change the line
g.drawAlignedText(Engine.getCurrentUserPresetName(), [0, 0, this.getWidth(), this.getHeight()], "centred");
to
g.drawAlignedText("Browse Presets", [0, 0, this.getWidth(), this.getHeight()], "centred"); // or whatever
And you can then remove these lines:
widget.setTimerCallback(function() { this.repaint(); }); widget.startTimer(300);
BTW, if you want to dive into working with ScriptPanels, there is an extensive documentation here:
-
looks like im ready to go. i was wondering though is there a common practice everyone uses that saves and recalls the samplemap or the HVLAC monlith file used in the sampler per preset. anything different than the code i was given in the first reply because that is giving alot of errors
-
The code from @Dark-Boubou seems to be OK - what's the problem there?
The basic procedure is pretty straightforward:
- use one .hip preset per project
- create a SampleMap for each sample set (double check that there is a .xml file for each SampleMap in the
SampleMaps
directory. - Use
Sampler.getSampleMapList()
in conjunction with a combobox (or any other component) andSampler.loadSampleMap()
to load the different sets.
-
the code and snippet @Dark-Boubou gave me doesnt work. any standalone i export with it it never launches and it just keeps increasing ram usage in task manager until i end the process. same goes with vst in vsthost. it never launches any plugin that uses the samplemap method as described it simply sucks ram and cpu until it crashes a computer. i really wish there was more documentation so i could troubleshoot things myself. but i have about 6 issues right now and it takes about 3 days to get a vague response about each. circling back to the simple matter of sample recall (which seems silly that it doesnt do in the first place and needs special code) as is the way you gave to me does not work. i literally based my project on the snippet with the combo box samplemap recall...anytime i render standalone or vst without that code everything works fine...well aside from it actually recalling samples...its a big circle of frustration and i wish there was someone to actually help i will literally pay at this point im 100 hours strait in to this and about to lose my mind lol
-
now i got it so it doesnt freeze everything but i get "sample directory is not existing" i have tried so many different things but what is the correct practice to have all user presets and accompanying sample maps recalled