Forum
    • Categories
    • Register
    • Login

    Enable "SampleStartMod" via scripting?

    Scheduled Pinned Locked Moved Scripting
    15 Posts 4 Posters 82 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.
    • David HealeyD
      David Healey @ulrik
      last edited by

      @ulrik That's just an edit button, turning it on/off doesn't affect the sample offset value of the individual samples.

      Which would be here
      4684aaa4-15c3-44fc-b75a-6a8fd3d67b4d-image.png

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      ulrikU 1 Reply Last reply Reply Quote 1
      • ulrikU
        ulrik @David Healey
        last edited by

        @David-Healey said in Enable "SampleStartMod" via scripting?:

        @ulrik That's just an edit button, turning it on/off doesn't affect the sample offset value of the individual samples.

        Which would be here
        4684aaa4-15c3-44fc-b75a-6a8fd3d67b4d-image.png

        Aha, so I don't need to set it to enable then, if I want to change the SampleStartMod?

        Hise Develop branch
        MacOs 15.6.1, Xcode 16.2
        http://musikboden.se

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @ulrik
          last edited by

          @ulrik It's just for editing with the mouse on the waveform, but you can change the value directly in the edit box or through scripting.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          ulrikU 1 Reply Last reply Reply Quote 0
          • ulrikU
            ulrik @David Healey
            last edited by ulrik

            @David-Healey said in Enable "SampleStartMod" via scripting?:

            @ulrik It's just for editing with the mouse on the waveform, but you can change the value directly in the edit box or through scripting.

            Yes thank you David!

            Hise Develop branch
            MacOs 15.6.1, Xcode 16.2
            http://musikboden.se

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

              @ulrik If I am following this correctly, I made this mistake recently. Just add a constant modulator to the sampler and enable/disable that. Make sure you do have the SampleStartMod enabled in the sampler though since that information is stored in the samplemap. I had to go back and fix my samplemaps after overlooking this. Luckily a little powershell script saved me here...

              Screenshot 2026-01-27 at 2.17.17 PM.png

              Sonic Architect && Software Mercenary

              ulrikU 1 Reply Last reply Reply Quote 1
              • ulrikU
                ulrik @HISEnberg
                last edited by

                @HISEnberg Thank you, that information about the sample maps are a bit worrying though, the client has a lot of sample maps to be resaved, or fixed with a script as you say.

                Hise Develop branch
                MacOs 15.6.1, Xcode 16.2
                http://musikboden.se

                David HealeyD LindonL 2 Replies Last reply Reply Quote 0
                • David HealeyD
                  David Healey @ulrik
                  last edited by

                  @ulrik said in Enable "SampleStartMod" via scripting?:

                  the client has a lot of sample maps to be resaved, or fixed with a script as you say.

                  What needs to be changed in the sample maps?

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  HISEnbergH 1 Reply Last reply Reply Quote 0
                  • HISEnbergH
                    HISEnberg @David Healey
                    last edited by

                    @David-Healey Screenshot 2026-01-27 at 2.46.33 PM.png

                    I believe this information is not saved into the xml unless the SampleStartMod edit button is activated. I'll have to double check to confirm this though.

                    @ulrik I can give you the script if you want to use it. Admittedly it's like 60% AI though.

                    Sonic Architect && Software Mercenary

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

                      @ulrik

                      I do this on sample load....

                      reg loadCallbackZones = yourSamplerHere.createSelection(".*");
                      for(s = 0; s <loadCallbackZones.length; s++)
                      {
                             loadCallbackSampleEnd = loadCallbackZones[s].get(yourSamplerHere.SampleEnd);
                             loadCallbackZones[s].set(yourSamplerHere.SampleStartMod, loadCallbackSampleEnd);
                      };
                      

                      HISE Development for hire.
                      www.channelrobot.com

                      ulrikU 1 Reply Last reply Reply Quote 1
                      • ulrikU
                        ulrik @Lindon
                        last edited by ulrik

                        @Lindon Haha, allmost exactly as I do it

                        //	============= SET SAMPLE START MOD LENGTH ===================
                        inline function onSampleLengthControl(component, value)
                        {
                        	//	Select all samples
                        	local selected = Sampler.createSelection("");
                        	
                        	for (s in selected)
                        		s.set(Sampler.SampleStartMod, s.get(Sampler.SampleEnd) * value);
                        }
                        
                        SampleLength.setControlCallback(onSampleLengthControl);
                        

                        Hise Develop branch
                        MacOs 15.6.1, Xcode 16.2
                        http://musikboden.se

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

                        25

                        Online

                        2.2k

                        Users

                        13.3k

                        Topics

                        115.6k

                        Posts