A couple of expansion questions
-
I am once again revisiting the world of expansions. I have implemented them in a couple of releases successfully now (massive shoutout and thanks to @d-healey for the huge help on helping me figure them out) but I now have a different use case/requirement and not sure about the best way to tackle it.
-
Instead of the standard preset browser additional column, an expansions 'page' is required. Presumably I can use the file system or get expansions call to find the installed expansions, but is it possible to have them arranged as tiles in a grid formation on this page rather than just a list going down?
-
Previously I haven't had to change the UI upon expansion change, only the samplemaps and presets. My UI is mostly paint routines with a png background. I will need at least 3 variations of the paint routines to colour the knobs & sliders depending on whether the background is light, medium or dark.
Do I need to build all variations into the plugin itself and then have them change depending on which expansion is loaded or can I build a background & paint routine into each expansion so it just loads when selected? That options sounds best but I don't know how much can be stored inside an expansion?
Thanks in advance
-
-
@rzrsharpeprod said in A couple of expansion questions:
but is it possible to have them arranged as tiles in a grid formation on this page rather than just a list going down?
Yep, I do this for Rhapsody using child panels
@rzrsharpeprod said in A couple of expansion questions:
Do I need to build all variations into the plugin itself
This. There is no method to contain this in the expansions.
-
@d-healey said in A couple of expansion questions:
Yep, I do this for Rhapsody using child panels
Ah ok so at least it is possible, that saves a difficult conversation. I just need to figure out how to make it work now.
@d-healey said in A couple of expansion questions:
This. There is no method to contain this in the expansions.
Ok so I would just build all the known variations at the time of build including all of the different backgrounds etc and a way to switch between the UI colour schemes and then if further expansions are created that aren't in the original build then you just build an updated plugin with those newer variations/backgrounds included?
-
@rzrsharpeprod Yes that sounds about right. I would have a hidden knob on the UI, and the value of the knob determines the UI/background to show. Then you can have it save the knob's value in the preset, so each time you save a preset for the expansion it will save the knob value.
-
@d-healey I like this trick.
Im gonna use this for some general theme changes! Cool tip!
-
@d-healey said in A couple of expansion questions:
@rzrsharpeprod Yes that sounds about right. I would have a hidden knob on the UI, and the value of the knob determines the UI/background to show. Then you can have it save the knob's value in the preset, so each time you save a preset for the expansion it will save the knob value.
Yes that's exactly what I was thinking to do as it can be recalled easily with each preset and I've done something similar a few times before and it worked well, thankyou
-
@d-healey said in A couple of expansion questions:
Yep, I do this for Rhapsody using child panels
@d-healey how do you get the child panels to dynamically load in a grid inside a larger panel?
I am struggling with child panels in general tbh.Presumably you can also use images for the expansion load like you can with the preset browser? Is that using the same method with the icon.png inside each expansion?
-
I've never done expansions but I was thinking any it. I thought that the most robust way would be to create a modular system in the first place that uses JSON to build parts of the UI?
Do expansions allow you to include things like json files? Or can you only expand with audio files and presets
-
@rzrsharpeprod said in A couple of expansion questions:
how do you get the child panels to dynamically load in a grid inside a larger panel?
I have a loop that goes over all of the installed expansions. For each one it create a child panel within the parent panel. Once all the children are created I have another function that arranges them into a grid.
The parent panel is within a viewport, and I adjust the height of the parent based on the number of expansions so it can display them all.
All the code for Rhapsody is on Codeberg if you want to see it.
@griffinboy said in A couple of expansion questions:
Do expansions allow you to include things like json files?
Yes you can include them in the expansions AdditionalSourceCode folder.
-
@d-healey Thankyou I will have a look at Codeberg and see if I can figure it out.
I have another question regarding expansions. I have found several topics on it here but can't seem to find a definitive answer.
Can you/how can you load a preset from an expansion via code?
Whenever I have used expansions before it is using at least 2 columns so you can choose the expansion either via the name or image in column 1 and then the corresponding preset from column 2.
In this project it is required that only 1 column showing the presets is used as the expansion is selected on a different page (hence my grid related questions) and it is proving difficult. It would be so much easier if I could just choose the expansion(s) from column 1...but I can't.The main issue is I need to load a preset from the selected expansion in order to force the controls, BG etc to load correctly as each expansion has it's own colour scheme and BG. These are all controlled by if elses & buttons that are saved in each preset to allow the correct things to show.
So back to my question - Can you/how can you load a preset from an expansion via code? This will just allow me to have a 'default' preset when you load each expansions which I think is fine.
Or is there a better way to achieve this? -
@rzrsharpeprod said in A couple of expansion questions:
Can you/how can you load a preset from an expansion via code?
Engine.loadUserPreset()
should do it.You could also load the expansion when the user selects it in the grid, this will automatically populate the preset browser, then they can select a preset.
-
@d-healey I don't think it finds it because it is in the expansions rather than the standard presets folder.
I have used load preset before for none expansion projects and it works fine but I didn't think it worked with expansions.
When I tried it before and just now to double check I get error
"...UserPresets\BASS Dean.preset doesn't exist"I agree that it shoule work with the grid but I genuinely have no idea where to start with the grid, the child panels or making them the expansions.
-
@rzrsharpeprod said in A couple of expansion questions:
I don't think it finds it because it is in the expansions rather than the standard presets folder.
If I remember correctly you need to place the expansion wildcard before the file path. I think there might be a function to provide the wildcard too - check the API browser.
-
@d-healey thankyou I'll have a look when I get home later. The ironic thing is this was meant to be a quick fix placeholder so I could test some things before biting the bullet and actually doing it correctly via the grid.
Regarding the grid, am I best to look at your tile.js in rhapsody and pull it apart to try and reverse engineer it would you say?
-
@rzrsharpeprod said in A couple of expansion questions:
Regarding the grid, am I best to look at your tile.js in rhapsody and pull it apart to try and reverse engineer it would you say?
There's probably some stuff in there you can reverse engineer, but it's more for the overall concept. I'm not using the same expansion system as you and I'm using a full preset browser, so trying to just copy what I've got will probably lead you down a dead end.
Break the problem down into pieces.
Make a new project and figure out how to make a grid with child panels. Once you've got that down you can start to incorporate it into your real project.
-
@d-healey That's fair and good advice. I'll give it a go and will invariably come back with questions...
Just going back to the load expansion preset wildcard, is that the {EXP:: wildcard or another one?
-
@d-healey said in A couple of expansion questions:
@rzrsharpeprod said in A couple of expansion questions:
Can you/how can you load a preset from an expansion via code?
Engine.loadUserPreset()
should do it.You could also load the expansion when the user selects it in the grid, this will automatically populate the preset browser, then they can select a preset.
@d-healey am I misunderstanding or is this the same problem here
Engine.loadUserPreset for expansions?
Does Engine.loadUserPreset work with expansions? When I use a relative path, it adds "User Presets" at the beginning. If I use an object from full path, it c...
Forum (forum.hise.audio)
there appears to be no resolution to it if so?
Honestly I am at my wits end with all of this, I have been trying on and off for days and I am no further forward but a lot more frustrated. My project has ground to a halt and I don't know how to get it moving again. I know you said break it down into pieces but I don't know where to start so I can't.
I genuinely have no clue where to start building the grid as child panels seem like a mystery and I can't see much documentation on them. I can't even figure out how to build the grid, nevermind how to make the child panels do anything and look a particular way etc.
At this point I can't even make a regular button load a preset from an expansion. I can get it to load an expansion so the presets are showing in the preset browser but I can't get it to load a preset from that expansion. This means it just looks like the previous preset until you click a new one which is wrong as it has the background and controls from whatever expansion was last selected until a use clicks the new preset.
I just want it to change the paint routine and background when you load the expansion. The only way I can see (or know) to do this is loading a preset but I can't get one to load without it being clicked on it from the preset browser.
There must be a way? It's easy with regular presets using 'Engine.loadUserPreset()' but expansions just seem to be overly complicated or don't have the same functions as 'regular' presets so I can't get it to load one.It's so frustrating as it seems like a relatively simple thing but I am completely unable to find a way to do it.
-
@rzrsharpeprod said in A couple of expansion questions:
there appears to be no resolution to it if so?
Ah yeah, I forgot about that. See if there is a bug report on github, if not, make one and link to that thread.
@rzrsharpeprod said in A couple of expansion questions:
I know you said break it down into pieces but I don't know where to start so I can't.
Make a new project. Add a panel. Add a function that loops from 0 to 20 and adds child panels to the panel. When you've done that post the snippet here.
-
@d-healey said in A couple of expansion questions:
Make a new project. Add a panel. Add a function that loops from 0 to 20 and adds child panels to the panel. When you've done that post the snippet here.
I'm not entirely sure if this is what you meant as it only creates the 1 child as far as I can tell - where do child panels show up, in the scriptwatch table?
The child auto creates so you will need to delete the panel and add it back in as Panel1
HiseSnippet 920.3ocsVE0aaaCDlxNpnVaEXEXOtGH7SxHoNxcscCvaXtwIdvnKoBycc6sBVJZahHQJPQ2Fit7ea+j1+f1ijxRxs1ECFq7ACy669nu638czwJIkUTHUHuNuXcNC4809yVKzKGujvEnomi79N+XhfkhyIJlPiIhDLcIOMA+mSiQmsNmTTvRPdds+UCCuNGgrq+8WNijRDTVsID5kRNk8a7Ltt1Z7nmwSSmPRXufm0v6GMZJUJFKSkqfnqseDJmPulrfcEw3VKej2ctHgqkpYZhlUf7N5LYx5YKkuU37+k7B9qSYlMCPyfCxYdhLMwDwFqnwlTIdSUn.AmRbcMosql7s9WxS3U1qqMeiE.WynY8vq01gW6sBuAMCunFg2NBIuFgzQtP599ynJdttFwDOek+TglolSfxdyPw4Kp0cZ6OVBdHz8yHWylnfMULBeRTzIX3idCCBfRegF+FhBau8Gf+Y7FlKX5wxrbo.1D10A20v4zScMF4FSAbQJWvvyWInZtTfoJFTGbImwghvdAuKnyomlqj4LklyJBvvJURIo3ahkEvu4iGhsqFHq2Kxa4I5k.zCiFtMvRFewRcMhEZtTgC4fQvFG+SNP9wG2yh9t.b4xcD1bxz4AD5VmDcwGi4C+HeoUvfyt5SeRRRMqPS0ZCmZu6WvfBpMK5dhKa5Mbu94RJvQ2W1+QFCcq5eWtRCWGgatNBWzqx85b0rVzeNnGeZZZXzMSfUTjoinBtx2aKisaCtEZW9zK2gAUW8RwURM64B2MN3O9iglOemXlVNkLMko1IrYfg5yQLTrJ60L0IPib5JVkifJZaoo+9klMmbPcJfFNJESEb8yyYh8MOAUJafu8GSOmnIF8bos3pNev14r2.CGcp6N9myJtVKys9Vp0f4cZK581n8MUZDGT320Mid.5l54myFstZynYirsSUF9m+djqsoxBVMB8oiYfAbxjUoD81S8Li5KAf58ViZLiSDEb85lOE7+1nv+qg388i4Z5xcGis1QLB2JeIhwxGPtm+Eymyn55.7H+I+0WlWKPNo9hKIZEG5G7uZU1L3MTJHOIBi1Dr40xzY51GY1a6XXhD6l2CqRvAl8dkfC1.hxHTk7UTmJy7D0csVfXRXecti+kl83AHqxC34G0OBkAuV9JJ0j9O.DK6lyCO.Ne+Av4QG.mGe.bdxAv4GN.N+3mki4Op7zUZYlSN.FhuvNNxy6BAA5rrcgnOHnAytA
-
@d-healey alternatively this is probably more what you were meaning
HiseSnippet 1195.3ocsV08aaaCDmJIpnRaEXEXOtGHxSxHNIxoYcaHqXMe1YrjTi3r1DTTTvHQaQDYRCJ5ZKTj21ev6+fsijxVxNJcEFq9Aae286Nd738UGoHhlkIjHGuKyGRQNeqa2btJ4vDBiiZeDx4Gb6P3zT7PhjxUXBOFGkvRiwuscGzA4CIYYzXjiypuRqgi2ZHym+92NfjR3QzRVHzaDrH5orALUI2Nu7OXoomPhoWxFTA8turcjfenHULB7tUcCQCIQ2R5SOmngshKx4QGGyTBYWEQQyPNqcfHNuahXL2h+MrL1MoTMQKTWvPV1mHRi0drlK5P8UoyznPFBrRmxXxp1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3efOEBaoocJD1ZpPz.RjT7gHa0kdCtGa3.9D2r7pm6YZZbKjohCzyMbqPz.XYxODEou9aBEI0qyNKgNOaIzY2kPmebIz44KgN+zRnyO+Y0QuG+9iThA1xAfQmiMsgbbNlSfLKSVH5eA7MxxhA
I don't really understand child panels. Ultimately will these be 'clickable' and be able to load the expansions as well as have their own individual images?