Random Presets
-
@Natan
is lovingly compiled from various snippets of the programming jedis lingering here :-) -
@MikeB Haha, I Just Finished My Project :) And Started To Packaging.
And After Finding Out This Feature,
Deleted Everything, And Added the Random Button To The UI And Started The Compiling Again :)
That Was The Last Time Gift For My Project :)This Week I'll Release It
-
@Natan That sounds good - I'm looking forward to your work. I hope you will present it here.
-
@MikeB Sure Will Send Copies To Our Top Hise Users.
Also @Christoph-Hart Said That, There will Be A MADE BY HISE Page In Future, That He Will Mention About Top Plugins That Made By Hise, So Everyone Can See The Power Of Hise And The Result At One Glance
-
@Natan Great thanks.
I also wanted to suggest this page because it makes sense to see what you can do with HISE. -
@MikeB Error coming !!
Interface:! Line 58, column 37: API call with undefined parameter 0 {SW50ZXJmYWNlfHwxNjk4fDU4fDM3}
As soon as I click on Random Button.
-
@DabDab Does your project have presets? Also I think there is a bug with this,
.preset
will probably need to be added to the end of the name. -
@d-healey I don't know, Prev & next button is working only random button not working.
const var Random = Content.getComponent("Random"); inline function onRandomControl(component, value) { if(value) { local myRandName = myPresetList[Math.randInt(0,myPresetList.length)]; Engine.loadUserPreset(myRandName); } }; Content.getComponent("Random").setControlCallback(onRandomControl);
-
@DabDab The error is telling you that
myRandName
is undefined. You need to find out why that is. On my system it works. -
@d-healey Seemingly working for me, although it’s trying to load old presets that I’ve deleted and showing an error.
Doesn’t seem to be a refresh or clear function…
Do you know which file I might be able to delete to clear the preset list?
I’ve tried cleaning the build directory
-
@cassettedeath Scratch that
Incase anyone encounters the same issue I did, I used
var myPresetList = Engine.getUserPresetList(); const var RandomPreset = Content.getComponent("RandomPreset"); inline function onRandomPresetControl(component, value) { if(value) { // Get the current list of presets from disk local presets = Engine.getUserPresetList(); if(presets.length > 0) { // Pick a random index local index = Math.floor(Math.random() * presets.length); // Load it by name with the .preset extension Engine.loadUserPreset(presets[index] + ".preset"); } else { Console.print("No user presets available."); } } } RandomPreset.setControlCallback(onRandomPresetControl);