Never mind. I figured it out.

Posts
-
RE: Parse getUserPresetList() output into 2d array
-
RE: Parse getUserPresetList() output into 2d array
Is there something other than getCurrentUserPresetName() that will return the full path of the current preset not just the name? If there is then I can compare it against the output of getUserPresetList() to get an index for the current preset and then select that index in the combo box.
-
RE: Parse getUserPresetList() output into 2d array
@Matt_SF said in Parse getUserPresetList() output into 2d array:
This has been fixed in the develop branch.
Yep. That was it. Thanks. All good now with current build.
Anyone have any suggestions on how to have the menu select the currently loaded preset from it's items?
-
RE: Parse getUserPresetList() output into 2d array
@d-healey the code you wrote is super helpful but I've run into an issue when the user saves a preset.
My thought was to call your populatePresetsMenu(); function again after the save dialog. This does reload the file structure and properly gets the new preset file. But for some reason the formatting gets lost. It all comes in as a single list with items displaying :: in their name after folder names.
I don't really follow why it would do that since the first thing that function does is wipe out the items and repopulate the same as it does onInit. Not sure why it would come back borked up a second time when the same function is fine the first time around.
The next thing I would like to do is have the newly saved preset selected in the combobox.
These two seem like they should be straight forward building off your script but I'm not having much luck.
-
RE: Parse getUserPresetList() output into 2d array
@d-healey this looks great. thank you.
One thing I can't seem to find. Does Hise have the ability to open a system window to a location? So I can let the user open to their presets folder.
FileSystem.browse seems to only be able to spawn a system save or open dialog, I'm looking to open the system finder / windows explorer.
-
RE: Parse getUserPresetList() output into 2d array
@d-healey The current preset browser UX only makes sense for large instruments. For FX it's completely wrong. As evidenced by the fact that pretty much every FX plugin out there uses a simple folder structure drill down expanding list.
A lot of them use a system menu (Fabfilter plugins are a good example of this done well). Which despite being skinned by the OS, honestly works great. Hise doesn't seem able to do such a thing. Which is fine. But my request would be a function that reads the folder structure and makes an expanding folder tree list like these.
Functions like delete, rename, overwrite don't need to be handled in the plugin. You can simply hand the user off to the OS filesystem with an "Open Preset Folder" button or menu item and let them organize as desired. All that's needed is a list of the contents from the User Presets folder and a "Save Preset" button.
-
RE: Parse getUserPresetList() output into 2d array
@d-healey I find the built in one to be very undesirable from a UX point of view and it seems to be very inflexible so that I can't customize it to fix what bothers me.
-
RE: Parse getUserPresetList() output into 2d array
@Lindon yep, brain is mush. you're obviously correct. So then unfortunately I'm still stuck trying to parse that into a JSON block. I know there is the .parseAsJSON() function for strings.
-
Parse getUserPresetList() output into 2d array
I am venturing down the seemingly much attempted and even more abandoned road of trying to roll your own custom preset browser in Hise.
I have the beginning of something but I'm stuck at the seemingly easier task of taking the output from Engine.getUserPresetList() and parsing it into a 2d array.
Engine.getUserPresetList() outputs an array that looks like this:
[ "Folder/presetname1", "Folder/presetname2", "Folder/presetname3", "Second Folder/presetname1", "Second Folder/presetname2", "Second Folder/blahblahblah", "XYZ/abc", "XYZ/abc2" ]
And I need to parse it into a 2d array like this:
"Folder": [ "presetname1", "presetname2", "presetname3" ], "Second Folder": [ "presetname1", "presetname2", "blahblahblah" ], "XYZ": [ "abc", "abc2" ]
I know that Hise does have a string split function but I'm falling down trying to build the 2d array.
Any resources anyone has that would help me on this path is greatly appreciated!
-
RE: multi line drawAlignedText?
@d-healey thank you!
yep drawMultiLineText works.
-
multi line drawAlignedText?
I'm trying to draw multiple lines of text onto a panel. Is there a way I can define an area and then have it automatically wrap like a label with multiline enabled?
My reason for doing this is labels seem to have a bug/feature where it changes the text size and letter spacing in an attempt to smush the text to fit in the label size. It's very strange and looks really ugly. Drawing text on a panel avoids this but I can't figure out how to make it do multi line text in a defined area.
-
RE: Faust compiler options
@sletz said in Faust compiler options:
Note that using double internally in the Faust generated code also requires the "architecture" wrapping code to be adapted, see for instance https://faustdoc.grame.fr/manual/architectures/#external-and-internal-audio-sample-formats.
I tried replacing the CPP file in the source folder for the faust node with one that was compiled through the normal faust compiler with the same options that Hise uses except double instead of single and Hise doesn't have a problem. It packaged my plugin fine and the audio path is clearly using double precision now for that DSP.
Are you saying this is wrong and shouldn't work?
This method seems to work fine but it's a little jank because if I use the standard compile DSP networks function in Hise it overwrites my custom CPP with one that has the single flag again.
Does anyone know if it's possible to change that compile option?
I'm guessing the "proper" way to do this would be to compile my DSP to cpp with faust and then use the third party cpp node function in hise? That's kind of a pain because then I have to deal with writing a header file with linked parameters while my faust node already has that handled for me.
-
Faust compiler options
Where can I change the compile options that Hise uses when compiling faust nodes?
I can open the .cpp file generated by Hise for my faust dsp and it has the compile options Hise used commented out at the top, but I don't know where in Hise I can edit those.
As an example I would like to use double precision floats. Hise is currently set to use single.
-
RE: Can a lottie be used inside a LAF?
Same. That sucks.
It seems like they also need a manual frame advancing external timer. It works but it's rather clunky.
It would open up huge possibilities for dynamic graphics if a lottie could be drawn like an SVG is inside a LAF and include a parameter to loop or single shot and a float for frame rate.
-
Can a lottie be used inside a LAF?
Can a lottie be drawn as a part of a LAF? Could I use a lottie as part of what my LAF is drawing on a button?
It seems like they can only be loaded into a panel and be the only thing shown on that panel. But I'm not sure if I'm missing something.
-
RE: Mask does not scale properly on HiDPI or Retina display
Is there an update to this in 2024?
It seems to still be an issue. I'm using a mask and even just zooming the view in and out inside hise, the mask keeps it's absolute pixel dimensions, completely moving around within my interface relative to everything else. This bug makes using masks completely pointless.
-
Redraw knob text after timer
I am attempting to use my knob text to display the value and then have it switch back to the normal knob text after it's been moved.
This version mostly works but the knob text doesn't update back to the proper label unless it gets a new event like hover. The console prints correctly on time but the UI doesn't update. I know there are redraw commands but I haven't been able to figure them out properly. I also was trying putting the text label draw into a LAF and then calling that but didn't have success.
Also I'm sure there has to be a cleaner way to do this instead of declaring a variable to count outside of the function. Eventually I plan on doing this for multiple knobs and would prefer to write a version that is nicely reusable.
const var MixKnob = Content.getComponent("MixKnob"); var MixInt = 0; const var MixTimer = Engine.createTimerObject(); inline function onMixControl(component, value) { MixKnob.set("text", Engine.doubleToString(value, 0)+" dB"); MixTimer.startTimer(500); }; MixTimer.setTimerCallback(function() { if (MixInt > 1) { MixKnob.set("text", "INPUT"); Console.print("hit"); this.stopTimer(); } MixInt++; }); MixKnob.setControlCallback(onMixControl);