HISE Logo Forum
    • Categories
    • Register
    • Login

    Storing extra properties within ModulatorSamplerSound

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

      Hi there! Quick question.

      What would be the best approach to store extra properties (using a child ValueTree) within ModulatorSamplerSound? I tried using the data ValueTree (via ModulatorSamplerSound::getData()) and appending a new child ValueTree to store my own properties, but upon reloading it's getting interpreted has multi-mic data.

      The alternative would be to store my properties outside but I thought I'd ask first, as there might be a way to do this already.

      Thank you in advance!
      E.

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

        yes if a sample value tree has a child it means it's multimic. You could add properties using ValueTree::setProperty() but if you have complex data you might have to serialize (or Base64 encode) it.

        E 1 Reply Last reply Reply Quote 1
        • E
          eggnog @Christoph Hart
          last edited by

          @Christoph-Hart Hi! Thanks for the quick reply. Yeah, that's what I came down to, I'll base64 encode my properties to avoid adding a child ValueTree. That'll work even though it's not really optimal.

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

          16

          Online

          1.7k

          Users

          11.8k

          Topics

          103.0k

          Posts