Preset Browser Tags....?
-
@Lindon I've built a few preset browsers already. Can you advise on how to deal with preset tags?
-
@Chazrox so what I did was hold the tags in a meta data file(json) in the app data folder where each preset has an entry with an array of tags associated with it.
I read the json file at init, retain a list of unique tags, and display these in the custom preset browser. In the browser when the user selects a set of tags I display all matching presets.
I allow the user to add and delete presets,, add and remove tags to a preset and create new tags...
There is a json file for the factory sounds and another for each expansion.
-
@Lindon I see. So to make sure, you create a 'factory' list of preset tags to choose from, create your presets with associated tags, and you can populate lists by associated preset tags, and adding/deleting tags is just rewriting the data object? Makes sense.
-
@Chazrox more or less yes, heres a look inside the Factory_presets.json file:
{ "ExpansionName": "Factory", "Key": "Not Set", "PresetCollection": [ { "PresetName": "ActionArp", "PresetLocation": "{PROJECT_FOLDER}/User Presets", "PresetTags": [ "Factory", "Arps" ], "DataFile": "Factory_presets.json" }, { "PresetName": "ArcadeVibe", "PresetLocation": "{PROJECT_FOLDER}/User Presets", "PresetTags": [ "Factory", "Arps", "Distorted" ], "DataFile": "Factory_presets.json" }, { "PresetName": "Arp Chorder", "PresetLocation": "{PROJECT_FOLDER}/User Presets", "PresetTags": [ "Factory", "Arps" ], "DataFile": "Factory_presets.json" }, { "PresetName": "Atmos Arp", "PresetLocation": "{PROJECT_FOLDER}/User Presets", "PresetTags": [ "Factory", "Arps", "Eerie" ], "DataFile": "Factory_presets.json" },
-
@Lindon nice. Ok I see whats happening. Thanks! This helps me understand. I think I can def do this on the next one
-
@Chazrox heres what the browser looks like:
-
@Lindon Nice, I need to do something similar. So are all the presets in one folder? So the user searches by tag essentially? How do you deal with Expansions?
-
@Lindon Nice! Thanks!
-
C Chazrox has marked this topic as solved
-
@DanH said in Preset Browser Tags....?:
@Lindon Nice, I need to do something similar. So are all the presets in one folder? So the user searches by tag essentially? How do you deal with Expansions?
yes the Presets all live in AppData/User Presets, expansions ship with their own meta data file called (unsurprisingly) MyExpansionName_presets.json.
Note:I dont "do" expansions like anyone else here I think (thank god) so the only attribute of expansions I use is the {EXP::somename} for the sound loading capability, and AppData/Expansions as the place where the samplemaps live. So my plugin downloads and installs expansion components into the "standard" folders - so all expansion presets live in AppData/User Presets too...
-
@Lindon thanks! makes sense. Actually since I'll be using a c++ sampler this might free me from some of the other constraints of the current expansion system too.