HISE Logo Forum
    • Categories
    • Register
    • Login

    Broken Preset Browser on VCSL example (C++ API)

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 2 Posters 188 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.
    • hisefiloH
      hisefilo
      last edited by

      Hi guys, anyone has a working example of the ValueTree implementation on HISE C++ API??

      The one included in https://github.com/christophhart/vcsl_hise/tree/master/AdditionalSourceCode is not working.

      Screen Shot 2021-02-24 at 5.28.22 PM.png

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Remove the if statement altogether and replace the loop in line 92 with this:

        static const Array<Identifier> hiseIds = { Identifier("MPEData"), Identifier("MidiAutomation") }; // add any other "hardcoded" child element of the preset XML's root here...
        
        int index = 0;
        
        for(auto c: v)
        {
            if(hiseIds.contains(c.getType())
                continue;
            
             storedData[index++]->restoreFromValueTree(c);
        }
        

        Disclaimer: Just typed this out of my head directly in the forum so it might contain typos :)

        hisefiloH 1 Reply Last reply Reply Quote 3
        • hisefiloH
          hisefilo @Christoph Hart
          last edited by hisefilo

          @Christoph-Hart that worked!!!!!!! Do u have all of your codebase in your head??? Man u are a genius

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

          32

          Online

          1.7k

          Users

          11.7k

          Topics

          102.0k

          Posts