HISE Logo Forum
    • Categories
    • Register
    • Login

    saveCurrentSampleMap creates blank XML

    Scheduled Pinned Locked Moved General Questions
    9 Posts 3 Posters 474 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.
    • modularsamplesM
      modularsamples
      last edited by

      When using saveCurrentSampleMap in HISE it works as you'd expect, a standard, fully populated XML sample map is saved. However when triggered from a compiled plugin the file produced is blank.

      I suspect this is by design, but maybe I'm doing something wrong? Here's code I'm using:

      const var Save = Content.getComponent("Save");
      const var SampleName = Content.getComponent("SampleName");
      const var Sampler1 = Synth.getSampler("Sampler1");
      
      
      inline function onSaveControl(component, value)
      {
      Sampler1.saveCurrentSampleMap("~/Desktop/" + SampleName.getValue());
      };
      
      Content.getComponent("Save").setControlCallback(onSaveControl);
      
      
      HiseSnippet 1274.3oc0W0saZbDEdVviqglD0DkK5EsRqrZkvpo1PhiSkppBFrcDpFajw0p2EMdY.FwtyrZ1YcMsJU4QoOB8QHOJ8QHuAomY1cgYwDjC0NskKPb9aNeyYN+QGoviFEIjHmRmNNjhbtCt6XtZXygDFG0ZOjyZ3NRZDUgZLNjDEQ6gbbJ9BsTmRqfLed6yaP7IbO5TVHzYBlG8PV.SMkam5+Hy2+.RO5or.Ks2tdKOAuovWDCHoHtJJj3MhLfdDQqVALxY086wTBYWEQQiPNqzPzab2ghegmn+YrH149TMQMTW3fRXefvumFwZtnlCY985jciiPHGbmo2+hI2+Ghay5wlveZb3yLBbmZgc7voPd3ULG7pYCupVvaNPxwBRqj.o6i65IYgpoRz34Sws3JprOAB61PIQWTgun.to.zfq1LfLhdfDHlXQkcpV8QtvWa78kKCg9Hk6EDoaWxET2evMytATUSQPnfCDUVWKbcPea0CB8MuQKvnLUlmoxZfgl7MsYo7xLRVSaR4xLtOiSc6Gy8TLA2Uv0HQ6NovuhWludDbt9wzMJ+akyreyHshwRIHNgWaRXk0+8s1iFMRIB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D17rkvluag1nWSX2XkHHoIIvny9IIVN6OIwpH5uAreXMTD
      

      Any ideas ?

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

        yeah, saving sample maps is a HISE feature and shouldn't be used in a compiled plugin (think of sample maps as read-only assets).

        modularsamplesM 1 Reply Last reply Reply Quote 1
        • modularsamplesM
          modularsamples @Christoph Hart
          last edited by

          @Christoph-Hart Thanks for clearing that up.

          I doubt this would be a popular feature request for most, but having a generic, user accessible sample format would be awesome for me personally.

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

            @modularsamples said in saveCurrentSampleMap creates blank XML:

            @Christoph-Hart Thanks for clearing that up.

            I doubt this would be a popular feature request for most, but having a generic, user accessible sample format would be awesome for me personally.

            The SFZ loader is the solution, no?

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

            modularsamplesM 1 Reply Last reply Reply Quote 0
            • modularsamplesM
              modularsamples @d.healey
              last edited by

              @d-healey It's definitely looking that way. But I reckon most end users wouldn't want to edit an SFZ file

              What I'd hoped to do was adapt the custom sample import project in the tutorials to allow users to save a samplemap (as opposed to in presets). This would have been a nice, user friendly solution that would work with my project. The preset method is fine when you have a a single sound source, but with several it seems a little inelegant.

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

                @modularsamples Couldn't you create an SFZ file internally in HISE?

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

                modularsamplesM 1 Reply Last reply Reply Quote 0
                • modularsamplesM
                  modularsamples @d.healey
                  last edited by

                  @d-healey It might be possible, but I'm not seeing a way to save a generic file.. According the API we can save only midi, preset and samplemap files.

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

                    @modularsamples You can use the file system API to create files (I have videos on YouTube).

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

                    modularsamplesM 1 Reply Last reply Reply Quote 0
                    • modularsamplesM
                      modularsamples @d.healey
                      last edited by

                      @d-healey Thanks David, I'll check em out.

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

                      49

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      101.8k

                      Posts