Storing data in widgets
-
@d-healey
You mean each HISE preset? to clearify: in the end, i want to store different sets of start and end points of a Sample Loop an recall these on demand, in order to get different ranges of the loop to rearrange it. Finally i'd like to export a plugin.edit: regarding the fact, that HISE' native file format is called "preset", my choice of words might be a bit confusing. maybe i should call it "snapshots" or whatever.
-
all right, i know now, what i've done wrong. in the custom onControl callback for the knob, i did overwrite the values in the panel with the initial values of the array. i made a workaround, using a "Snapshot" button to store all values in the panel.
HiseSnippet 1257.3ocsW0saaaCElJIbM1cdnEnWMrKH5U1.owRNw4GXDTu3jL30kDu4thBzEXvHQGSDIRCI5jXTzK2a1dA1ywtYuAaGRIYI6ZGGDfnfXYd9SeeGd3QG2IT5xhhjgHqBue7PFx5awcGKTCZMfxEn1Ggr9dbWkLj0qSHKho50VzqCUv76Y6fNb7PZTDyCYYs5Oos2pvZHy0+91Co9TgKKSDB8AI2k8K7.tJSZmlui66eB0i8ddPNq2tYaWonkzWNBv1pXazPp60zqXmQ0lsBFY8MG6wAj0UQUrHj0ZGJ8F2cf7VQr8efGwuzmoW3f5BAJV7IReOMh0RQsFv885jlChPPT5jkQVMNi7J7obO9D4YYlWXTPx7He9vZk6CdN4gm8CGdV4f2Zwv6k3ttg7gpLMZr8bbaghE1mBaA4gUrsnU9q0vsjfEB0lAzqYmDBKl3Q4Z0s2f3XaWoQohv1PjhbCMjzRFbo7P4cNjCHoNeESAhGJEvhxudhEudZOemPd4h8xncFOL0XK1kX0y3SWAcXz.oZgdkZfwOsGzvP5Xv7OYuY8Ml4+KZPpV0i0mNxWGd+QrnRE0+UsJwc.UbEKwciNBUQtheCSP3BO1cjRE4BetfQ5OR3p3RAQJL7TirPoeY2TXsQb.pTp3mKUj.WZfEGjCxR4Zl7AsckqPdCwAveAyS+SFKu.L0DEP9WZnA48lo2LRK0fiVTe+KgSVkmFdUZLgqfsjqAUDkLkpttxPOt3JsnbjddbdBAtedWHOoiIV7yB35EZxZ.mF2wIAioUVBayUMNeFOK3xyZcOOBXZxVO.NxPcQ27HYZc0R3HuOobLqN3.hSkjZ7LRY38xHUVM774zLXQGtbH8LohctnbkhetXgheoHYVU86OWcIAymENW05V24zTsZHyMWpqenLN2AlBIVZnZzvoPUZdSLJ3RVXZRSGtzCnIoprCAMzOHnG3zMYwKtIa92A3FmYyYnTzVvUmOjIVTqWTx1g9cDI3ELUYZA+cIsf65y8XgHNzo8YXSEKxPkjWqQ9y+4ueKZVmKk1+VSQiuqiioapy+A9m6d9YPOJ6csiups+d101pVsMH1atWrHGm8qYues80hpUW+4t6ru9ZOP5N0c1ZWilYr9BzWgmWjfmzCGFH8b7jyJSQI35UMQKJeb3HkRJLAnHNsvbV+gqeu8QTEU+5sjjLj3GxBUb8dp0Qraf4FheYWA7QrnqUxglcgjCEv2W59vcYOvcaNNaAQi9Iw4YKcKIWbVOeb9glQzaXsEwSIAndE3.f71zClQ5f1xmCeibtveL5lzJSqUmC.V5dPFLZ5lGFNMCnfNrEFVvUr.3AWAG2zwoX78ZI22J491I2qitk6oFjE4ecpbC9gr2lK8zHOtNqIO5TY.DHZ3Xc1A80Cx.iSI8F4SUSOikdvxDEP2hoFlQOvhHhqFmevymjAudnv8k3Nbk6f4i2UlCdgh9mZ7lLFaI7w86ybUYfcM7Ie7oelUzuIGofgENkpB45ZyyFEzElp2kAHQ.Gpz8sgBBsql01505LSWlvyr3+fqDkN50VIJcRUhBntgxdtw8gzCJutQBfIg42KT.epdMYR2KLFZmhBf42645pSEuAv978o1ivmsdD9r8ivm5OBe14Q3ytOBe16d8Q+Sm9wQJYP7wDPPmiMuEvx5XAEpxLUjn+GPaAUA5�
-
Yes unfortunately the HISE project file (.hip) is also called a preset which is confusing. I'm referring to the user presets and the preset browser. This is where every widget, including panels, have their data stored. So if you are just wanting to store the values of knobs I'd use the preset system. Add a preset browser floating tile to your interface and you're pretty much done.
-
@d-healey
ah, okay - i must confess, i didn't think about that possibility and i didn't deal with the preset browser yet.
could i assign single keys from the keyboard to single presets, so i could for example hit
C4 on my keybord to play range from sample 0-40000 of the loop,
C#4 on my keybord to play range from sample 50000-60000 of the loop and so on?
would the performance of loading the presets be good enough for realtime tasks like that?
thank you for your reply, this was helpful either way! :-) -
@toxonic Preset just store and recall the values of widgets. For key switches you will need to script. If you want different key switches for different presets then you can use a combination of scripting and widgets.
-
@d-healey said in Storing data in widgets:
If you want different key switches for different presets then you can use a combination of scripting and widgets.
does "preset" in this case mean: preset via the presetbrowser? so you can control the selection of presets via keystrokes, (...but i need to script that (which i didn't find a method for yet))?
or am i back to the idea of storing widget values in panels? -
does "preset" in this case mean: preset via the presetbrowser?
Yes, whenever I talk about presets this is what I mean, unless I specifically say otherwise. :)
so you can control the selection of presets via keystrokes
No. User selects the preset from the preset browser. Do you want different keyswitches for different presets?
-
Yes, whenever I talk about presets this is what I mean, unless I specifically say otherwise.
okay, do not mind me, i wasn't sure! ;-) and if i'm honest, i don't really know what you mean with that sentence
If you want different key switches for different presets then you can use a combination of scripting and widgets.
since this somehow contradicts with
No. User selects the preset from the preset browser.
or did i misunderstand that?
but yes, i want to different presets with different keyswitches on my midi keyboard. ;-) -
The user selects a preset from the preset browser with the mouse - not the keyboard.
i want to different presets with different keyswitches on my midi keyboard
I don't quite understand what you want. You said this previously:
C4 on my keybord to play range from sample 0-40000 of the loop,
C#4 on my keybord to play range from sample 50000-60000 of the loop and so on?Will those keyswitches, C4 and C#4, be used for all presets or do you need each preset to have totally different keyswitches?
-
@d-healey
uhh, i really seem to express myself very awkward, i'm sorry for that. :-/
i want to store different loopranges (AudioWaveForm) to different presets. by pressing a key on my midi keyboard i want to select a specific preset and play the looprange saved within that preset.
C4 -> looprange a (saved in preset 1)
C#4 -> looprange b (saved in preset 2)
D4 -> looprange c (saved in preset 3)
....and so on
got me now? thanks for your patience with me, my english is quite poor and my HISE knowledge as well.... :-/ -
What do you want the combobox to do?
Will you need to change the loopranges from the interface?
-
@d-healey
okay, my first problem was storing data (start and endpoints and maybe other values) persistenly and recalling it. the combo box was just to select the.... how should i call it..... snapshots? it was only for experimenting purposes, it seemed quite handy to me for that task. -
@d-healey said in Storing data in widgets:
What do you want the combobox to do?
Will you need to change the loopranges from the interface?
later i wanted change this to control via midi keyboard
-
We're going around in circles. But we'll get there! :)
Why do you need to store data at all? Why can't you just hardcode the values?
-
hardcode the values? you mean, they are not changeable anymore? this instrument should become something like a loop-slicer, where you can load sampleloops in, and then rearrange them in a DAW. When the values are hardcoded, the enduser would only be able to use the one sampleloop, the hardcoded ranges fit to.
-
How many loops will be loaded at one time?