HISE Logo Forum
    • Categories
    • Register
    • Login

    SAMPLER LOOP MODE ON/OFF

    Scheduled Pinned Locked Moved General Questions
    9 Posts 5 Posters 470 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.
    • DanHD
      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

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        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

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

          @d-healey Can I script it?

          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
          https://dhplugins.com/ | https://dcbreaks.com/
          London, UK

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            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));
            

            Can't help pressing F5 in the forum...

            DanHD 1 Reply Last reply Reply Quote 1
            • DanHD
              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

              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
              https://dhplugins.com/ | https://dcbreaks.com/
              London, UK

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                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);
                
                

                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                https://dhplugins.com/ | https://dcbreaks.com/
                London, UK

                DabDabD 1 Reply Last reply Reply Quote 2
                • DabDabD
                  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 !!!!

                  Bollywood Music Producer and Trance Producer.

                  ulrikU 1 Reply Last reply Reply Quote 0
                  • ulrikU
                    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 15.3.1, Xcode 16.2
                    http://musikboden.se

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

                      @ulrik Thank you Sir... now it is working ... :)

                      Bollywood Music Producer and Trance Producer.

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

                      36

                      Online

                      1.8k

                      Users

                      12.0k

                      Topics

                      104.2k

                      Posts