Forum

    • Register
    • Login
    • Search
    • Categories

    SAMPLER LOOP MODE ON/OFF

    General Questions
    5
    9
    166
    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.
    • DanH
      DanH last edited by

      Does anyone know if there's a way to toggle the sampler's loop mode on and off?

      Screenshot 2021-09-14 at 17.29.13.png

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

        That's not the sampler's loop mode, that's the sample's loop button.

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

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

          @d-healey Can I script it?

          ustk 1 Reply Last reply Reply Quote 0
          • ustk
            ustk @DanH last edited by ustk

            @DanH if you run this, you'll get the attributes you can access:

            for(i=0;i<Sampler1.getNumAttributes();i++)
            	Console.print(Sampler1.getAttributeId(i));
            

            I cannot help pressing F5 in the forum...
            Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

            DanH 1 Reply Last reply Reply Quote 2
            • DanH
              DanH @ustk last edited by

              @ustk Thanks, it's not in there so was wondering if anyone knew if there was a way - sometimes the APIs aren't listed but are there

              DanH 1 Reply Last reply Reply Quote 0
              • DanH
                DanH @DanH last edited by

                @DanH Figured it out:

                inline function onSAMPLERLOOPControl(component, value)
                {
                	for(s in Sampler1.createSelection(".*"))
                    {
                        s.set(Sampler.LoopEnabled, value);
                    }
                };
                
                Content.getComponent("SAMPLERLOOP").setControlCallback(onSAMPLERLOOPControl);
                
                
                DabDab 1 Reply Last reply Reply Quote 2
                • DabDab
                  DabDab @DanH last edited by

                  @DanH Thank you ... I am trying your Code but ending up with error...

                  Here is the Code

                  Content.makeFrontInterface(500, 400);
                  const var SAMPLERLOOP = Content.getComponent("SAMPLERLOOP");
                  const var Sampler1 = Synth.getChildSynth("Sampler1");
                  
                  inline function onSAMPLERLOOPControl(component, value)
                  {
                  	for(s in Sampler1.createSelection(".*"))
                      {
                          s.set(Sampler.LoopEnabled, value);
                      }
                  };
                  
                  Content.getComponent("SAMPLERLOOP").setControlCallback(onSAMPLERLOOPControl);
                  

                  What am I missing ?

                  Interface:! Line 7, column 35: function not found {SW50ZXJmYWNlfHwyNTF8N3wzNQ==}
                  Interface: Compiled OK
                  Interface:! Line 7, column 35: function not found {SW50ZXJmYWNlfHwyNTF8N3wzNQ==}
                  Interface: Compiled OK
                  Interface:! Line 7, column 41: no iterable type {SW50ZXJmYWNlfHwyNTd8N3w0MQ==}
                  Interface:! Line 7, column 41: no iterable type {SW50ZXJmYWNlfHwyNTd8N3w0MQ==}
                  
                  

                  ERROR !!!!

                  Trance Producer and Presets Designer.

                  ulrik 1 Reply Last reply Reply Quote 0
                  • ulrik
                    ulrik @DabDab last edited by

                    @DabDab I think you have to create a typed Sampler script reference to the sampler

                    const var Sampler1 = Synth.getSampler("Sampler1");
                    

                    Skärmavbild 2021-09-30 kl. 06.58.30.png

                    Hise Develop branch
                    MacOs 13, Xcode 14.0.1
                    http://musikboden.se

                    DabDab 1 Reply Last reply Reply Quote 1
                    • DabDab
                      DabDab @ulrik last edited by

                      @ulrik Thank you Sir... now it is working ... 🙂

                      Trance Producer and Presets Designer.

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

                      9
                      Online

                      983
                      Users

                      6.6k
                      Topics

                      60.8k
                      Posts