HISE Logo Forum
    • Categories
    • Register
    • Login

    Tagging Presets?

    Scheduled Pinned Locked Moved General Questions
    17 Posts 4 Posters 737 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CasmatC
      Casmat
      last edited by

      Hey!

      I’m trying to figure out how to tag my presets and am stumped.. basically, my custom preset browser is based off of a filesystem structure in the userpresets folder. There’s two levels of folders and then the actual .preset files. I was wondering how I could attract tags to these preset files. Ultimately, I’d want the tags in these oval like bubbles in the browser that when clicked on, they will show all presets with that tag, any ideas?

      Thanks!

      i make music

      LindonL L 2 Replies Last reply Reply Quote 0
      • LindonL
        Lindon @Casmat
        last edited by Lindon

        @Casmat Write your own tag database in a json file you read at start up...and maintain in your custom preset browser...

        presetTags = [
        {
              PresetName : "MyFavourite",
             PresetTags: ["Red", "Bassey", "Favourite", "Whatever"]
        },
        {
              PresetName : "MyLead",
             PresetTags: ["Red", "Lead", "Green", "Whatever"]
        },
        
        ];
        

        HISE Development for hire.
        www.channelrobot.com

        CasmatC 1 Reply Last reply Reply Quote 0
        • CasmatC
          Casmat @Lindon
          last edited by Casmat

          @Lindon good idea! But wouldn’t this mean that I have to put in code that runs in every situation a user can import/save a preset? Is there a method where the tags themselves are stored within the preset file?

          i make music

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Casmat
            last edited by

            @Casmat

            But wouldn’t this mean that I have to put in code that runs in every situation a user can import/save a preset? Is there a method where the tags themselves are stored within the preset file?

            Yes, there is a built in tagging system in the preset browser, but the UI for it needs some love @Christoph-Hart any chance of opening this up more within the scripting API? Also an expansion tagging API would be nice. :)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            CasmatC 1 Reply Last reply Reply Quote 1
            • CasmatC
              Casmat @d.healey
              last edited by

              @d-healey @Christoph-Hart definitely need this, in my case, I can see myself just using a addTag/deleteTag for preset files and be able to take those tags and store them in a collective database kind of like how @Lindon mentioned

              i make music

              1 Reply Last reply Reply Quote 0
              • L
                Lumi283 @Casmat
                last edited by Lumi283

                to do this, I have included my tags in the preset name. Then, I coded a loop in the UI to display only the presets that match the selected tags. You can modify the preset name using the following code:

                string.replace("someTag", " ");
                

                This will allow you to display only the preset name. To rename a preset, you can use "file.rename."
                Example :
                "Godin cinematic orchestral violin.preset"

                1 Reply Last reply Reply Quote 1
                • d.healeyD
                  d.healey
                  last edited by

                  Now that I think about it, the file API and some string manipulation could probably allow you to hack your way to tagging the presets. I'll have to try this.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  LindonL CasmatC 2 Replies Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by

                    @d-healey said in Tagging Presets?:

                    Now that I think about it, the file API and some string manipulation could probably allow you to hack your way to tagging the presets. I'll have to try this.

                    sure - but why? Isnt it easier to "just" build a database of tags/presets in some json table?

                    HISE Development for hire.
                    www.channelrobot.com

                    d.healeyD CasmatC 2 Replies Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Lindon
                      last edited by

                      @Lindon Well I have two reasons, I like everything to be self contained if possible. I'm using the stock preset browser which already supports the built in preset system.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      1 Reply Last reply Reply Quote 1
                      • CasmatC
                        Casmat @Lindon
                        last edited by

                        @Lindon hold on, with your method, are the preset files w/ tags locked into place? If a user saves a preset and chooses their tags, then its saved into that json file, if they decide to share the preset with others, the other party wouldnt be able to view the tags, right?

                        i make music

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @Casmat
                          last edited by

                          @Casmat unless you send the tags too

                          HISE Development for hire.
                          www.channelrobot.com

                          CasmatC 1 Reply Last reply Reply Quote 0
                          • CasmatC
                            Casmat @Lindon
                            last edited by

                            @Lindon ok!

                            i make music

                            1 Reply Last reply Reply Quote 0
                            • CasmatC
                              Casmat @d.healey
                              last edited by

                              @d-healey can the xml be directly modified using the write/load as xml and adding some tags that way? Thought about this but was wondering if hise would complain with the modified format

                              Thanks!

                              i make music

                              d.healeyD 1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @Casmat
                                last edited by

                                @Casmat The xml editing functionality of HISE is very limited. I'd just use regular string manipulation functions to get the tags, change them, and rewrite them back into the file.

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public HISE tutorials

                                CasmatC 1 Reply Last reply Reply Quote 0
                                • CasmatC
                                  Casmat @d.healey
                                  last edited by

                                  @d-healey what do you mean by rewriting it back into the file?

                                  i make music

                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @Casmat
                                    last edited by

                                    @Casmat Open it as a string, edit the string, write the file.

                                    Load

                                    53891c7b-623b-44b5-be9b-5121e20c6345-image.png

                                    Edit

                                    54373a8b-5e9b-4a58-8f9a-556521295ed8-image.png

                                    Write

                                    0b17a5d9-9aea-474e-85dd-eb4dce4141db-image.png

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

                                    CasmatC 1 Reply Last reply Reply Quote 0
                                    • CasmatC
                                      Casmat @d.healey
                                      last edited by

                                      @d-healey :astonished_face: :astonished_face: :astonished_face: Never thought of using that with xml files!! Thanks Daviddddd!!!! I thought I'd have to put them in the file name haha!

                                      i make music

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      23

                                      Online

                                      1.7k

                                      Users

                                      11.8k

                                      Topics

                                      102.5k

                                      Posts