HISE Logo Forum
    • Categories
    • Register
    • Login

    What is a sensible number of samplers in a single plugin?

    Scheduled Pinned Locked Moved General Questions
    33 Posts 6 Posters 1.7k 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.
    • OrvillainO
      Orvillain @Christoph Hart
      last edited by

      @Christoph-Hart

      The way I'm thinking is I somehow need to travese down this tree:
      container.chain.softbypass_switch9.sb_container.sb1.file_player

      And that would allow me to do something like:

      abs_path = FileSystem.fromAbsolutePath(file_obj.fileName);
      parsed = [this_sampler.parseSampleFile(abs_path)];
      file_player.loadSampleMapFromJSON(parsed);
      

      Or whatever the call is to load a file into the file_player.
      Sort of pseudo code, similar to what I've been doing with the SAMPLER, but hope it makes sense.

      If I do this:

      const var ScriptnodeSynthesiser1 = Synth.getChildSynth("Scriptnode Synthesiser1");
      const attr_count = ScriptnodeSynthesiser1.getNumAttributes();
      
      
      for (i = 0; i < attr_count; i++)
      {
      	var attr = ScriptnodeSynthesiser1.getAttributeId(i);
      	Console.print(attr);
      }
      

      Then I just get these printed in the Console:
      Interface: Gain
      Interface: Balance
      Interface: VoiceLimit
      Interface: KillFadeTime
      Interface: Sample Select

      Sample Select is a custom meta parameter. So I'd already figured that bit out. Really what I'm looking to get is an object reference to the internal nodes within the ScriptNode.

      8296692d-1be7-44a1-a253-eb3650b5b99e-image.png

      This is where I'm currently at. You can see Sample Select at the top. You can also see that my file_player nodes are all set to an external audio file slot.

      If you could help me get the object reference I'm looking for, I'm pretty sure I can figure the rest out from there. Does it have anything to do with ScriptnodeSynthesiser1.ScriptParameters; ?

      Musician - Instrument Designer - Sonic Architect - Creative Product Owner
      Crafting sound at every level. From strings to signal paths, samples to systems.

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

        Are you using the clone container? That might reduce some of the complexity

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

        OrvillainO 1 Reply Last reply Reply Quote 0
        • OrvillainO
          Orvillain @d.healey
          last edited by Orvillain

          @d-healey Not yet. It isn't really what I'm after right now. I'm just trying to make sure I understand how to iterate through the node tree, get and set data within it, and then I'll look at optimization and stuff later.

          I'm just trying to sus out how to achieve this before I invest too much time in it really.

          PS: Been rinsing your HISE videos on Youtube. I'm half way through the paint routines one, and have learnt a lot! Thanks very much!

          Musician - Instrument Designer - Sonic Architect - Creative Product Owner
          Crafting sound at every level. From strings to signal paths, samples to systems.

          OrvillainO 1 Reply Last reply Reply Quote 1
          • OrvillainO
            Orvillain @Orvillain
            last edited by Orvillain

            @Orvillain

            Ahhhh.. I imagine I need to use Engine.getDspNetworkReference(String processorId, String id)
            in order to access the actual node network? I'll try that tomorrow.

            And obviousy then, I finally check the docs 🐶

            Link Preview Image
            HISE | Scripting | DspNetwork

            An object that will perform a DSP algorithm based on a network of nodes.

            favicon

            (docs.hise.audio)

            I'll give this a thorough read tomorrow too. Looks like this is what I want.

            Musician - Instrument Designer - Sonic Architect - Creative Product Owner
            Crafting sound at every level. From strings to signal paths, samples to systems.

            OrvillainO 1 Reply Last reply Reply Quote 0
            • OrvillainO
              Orvillain @Orvillain
              last edited by Orvillain

              @Christoph-Hart
              Could you let me know what I'm doing wrong here?

              var samplepath = "D:\Samples\Drums\Hits\Reverb Drum Machines\MXR Drum Computer\Reverb MXR Drum Computer Sample Pack_Audio Files\Reverb MXR Drum Computer Sample Pack_CHH.wav";
              
              const var s = Synth.getAudioSampleProcessor("Scriptnode Synthesiser1");
              const slot = s.getAudioFile(0);
              slot.loadFile("{XYZ::SingleSample}" + samplepath);
              

              I do actually see a change:
              1997ebb2-d818-4d39-9412-2c84db0465f7-image.png

              But it hasn't actually loaded it. Just applied a label.

              If I do this:

              var samplepath = "D:\Samples\Drums\Hits\Reverb Drum Machines\MXR Drum Computer\Reverb MXR Drum Computer Sample Pack_Audio Files\Reverb MXR Drum Computer Sample Pack_CHH.wav";
              
              const var s = Synth.getAudioSampleProcessor("Scriptnode Synthesiser1");
              const slot = s.getAudioFile(0);
              slot.loadFile(samplepath);
              

              Then HISE just crashes.

              And if I do this:

              const var samplepath = "D:\Samples\Drums\Hits\Reverb Drum Machines\MXR Drum Computer\Reverb MXR Drum Computer Sample Pack_Audio Files\Reverb MXR Drum Computer Sample Pack_CHH.wav";
              var abs_path = FileSystem.fromAbsolutePath(samplepath);
              
              var s = Synth.getAudioSampleProcessor("Scriptnode Synthesiser1");
              const slot = s.getAudioFile(0);
              slot.loadFile(abs_path);
              ;
              

              Then I get this:
              2f8dddfe-5019-43bf-98eb-f458d59224e4-image.png

              Again, it doesn't load the file... but does put an object reference in the filename box.

              Musician - Instrument Designer - Sonic Architect - Creative Product Owner
              Crafting sound at every level. From strings to signal paths, samples to systems.

              OrvillainO 1 Reply Last reply Reply Quote 0
              • OrvillainO
                Orvillain @Orvillain
                last edited by

                Bah! Figured it out:
                c39aab47-627f-4854-8fdf-a4c927dda560-image.png

                You can see.. the filepath needed the backslashes escaping. I have to do this when using Python all the time, and it just occurred to me to try it in HISE too.

                Works fine. Sample loads. I've got enough to go on now!

                Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                Crafting sound at every level. From strings to signal paths, samples to systems.

                OrvillainO 1 Reply Last reply Reply Quote 0
                • OrvillainO
                  Orvillain @Orvillain
                  last edited by

                  Actually @Christoph-Hart if you do see this, how can I disable looping on the file_player object?

                  Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                  Crafting sound at every level. From strings to signal paths, samples to systems.

                  OrvillainO 1 Reply Last reply Reply Quote 0
                  • OrvillainO
                    Orvillain @Orvillain
                    last edited by

                    @Orvillain Just a note to self, looking through the source code I suspect there might be a setUseLoop bool on the sample itself. I'll look for that tomorrow. It could also be LoopEnabled, as that is listed under special parameters for the AudioLooper class.

                    I'm sorta hoping those follow through to the file_player.

                    Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                    Crafting sound at every level. From strings to signal paths, samples to systems.

                    OrvillainO 1 Reply Last reply Reply Quote 0
                    • OrvillainO
                      Orvillain @Orvillain
                      last edited by

                      @Orvillain said in What is a sensible number of samplers in a single plugin?:

                      @Orvillain Just a note to self, looking through the source code I suspect there might be a setUseLoop bool on the sample itself. I'll look for that tomorrow. It could also be LoopEnabled, as that is listed under special parameters for the AudioLooper class.

                      I'm sorta hoping those follow through to the file_player.

                      @Christoph-Hart

                      So I tried these in a small demo project, but it doesn't seem to work.

                      Here's the snippet - would love it if someone could help me disable loop for the file_player node. Do I have to get the node itself perhaps???

                      HiseSnippet 3131.3oc6ZusaaibGGGmz1zw1Ma1CMnmtRHnW3.j0PRVVxdKJZb7gFiM1QvJMnWX.AZpQ1DlhTKIkOzh9N1K6iQeCZmgjRhTQ1xV0ITK52r.aBOM7OImeCoH+T22yRDD34qou7GtoqPS+oFMtwM77cN2z1U6fc0zetQfkuc2PWuVhuOvrSWGgu1atoqYPfnklt97+Y0Zpu7BZQ+4e+mdioioqkX3rzz9nmsk3c1crCGN25u9Gscb12rk3C1cRs1Ud8AVdt63430SVUyaTTqqo0ElmINxTsZyYnou3dsrC87aDZFJBzzW3Mdstow4dW4Fu9ezNv9TGgZhRZMjMT7r22yokphUyUamyscZUu+Qefl73r9vyEyGet34FGZ2xdv7GdN4ahVPggaQ5yG5yks7lOS4UJc4ULU4MlRROUIYDWReqQinqFCWhpd9EFG3FJ7aaJOsmtTNpWms60x1aeaGUkXnqKOAG2.Zys1bF63I2L2v05XdgXee4DCZlUqVr3qJH+eu7OrRgUjWPBBKbooegFC5KD0MQDXGH7KU3OVHZx0NSDFcXDM0puX3ZWH8p+BYilpMi6T00L7bY67hc+gSNoQzbBN4jc860Q9Wu0NLYhBGZZctsq3jSdiWPPgcO96qVsnbQQ+8OZacQ40W6JyKegbGnZZySCZlzvpyAMtIHTzYs19dc19z.Omdgh5xkt5vJ3kIaXP5Conygw0zfy62mCt.GuPY6DLnMT0vppSopkrlimYqn4jd22tmqUnsmaAO2i7BEu2c0Wtx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eg3KjTB9BwWHoDRI3KDegjRvWH9BIkfuP7ERJAeg3K7yluvuDVN5XZ460L4i8G8g5hlirGgqYjnPiCUSWnj1kwGLCkF0wtkcSKqrM0mrgkm1Mb8ocCqLsa3FS6FVcZ2vZS6Ft4j2PkQxjDtputl1g02KpSnt9dtlm5DyQR6+5xVsVK
                      

                      Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                      Crafting sound at every level. From strings to signal paths, samples to systems.

                      OrvillainO 1 Reply Last reply Reply Quote 0
                      • OrvillainO
                        Orvillain @Orvillain
                        last edited by

                        Content.makeFrontInterface(600, 600);
                         
                        const var ScriptnodeSynthesiser1 = Synth.getChildSynth("Scriptnode Synthesiser1");
                        
                        const var samplepath = "D:\\Samples\\Drums\\Hits\\Drum Machine\\Boss DR-660\\DR-660Kick23.wav";
                        
                        var abs_path = FileSystem.fromAbsolutePath(samplepath);
                        
                        var s = Synth.getAudioSampleProcessor("Scriptnode Synthesiser1");
                        
                        const slot = s.getAudioFile(0);
                        slot.loadFile(samplepath);
                        
                        var the_network = Engine.getDspNetworkReference("Scriptnode Synthesiser1", "_8_Layer_Sampler");
                        
                        var fileplayer = the_network.get("file_player");
                        
                        fileplayer.LoopEnabled(false);
                        

                        This doesn't work either - getting the node directly.

                        Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                        Crafting sound at every level. From strings to signal paths, samples to systems.

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

                        25

                        Online

                        1.8k

                        Users

                        12.1k

                        Topics

                        105.8k

                        Posts