HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing the start point of the samples on reverse playback mode by code

    Scheduled Pinned Locked Moved General Questions
    35 Posts 7 Posters 1.2k 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.
    • Gabriel StroziG
      Gabriel Strozi
      last edited by

      I tried a bit to use this SampleStart feature, but when the playback is set to reverse, this parameter works in a strage way.

      I will explore more.

      Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

        @Gabriel-Strozi maybe it's better to make new samples of the reverse drums. This way you have more control. When the user clicks 'reverse' the sampler could change sample map, or perhaps have two samplers and switch between them

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

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

          @DanH or add different amounts of silence to the shorter samples to make all samples the same length

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 0
          • Gabriel StroziG
            Gabriel Strozi
            last edited by

            I got. The problem is that I already have a User Preset working like Mr. Healey techs, using combobox to change sample maps. To make another samplemap exchange system, would be really hard to me to understand how! I need to think about it and about how big the change on the code would be.

            Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

            1 Reply Last reply Reply Quote 0
            • Gabriel StroziG
              Gabriel Strozi
              last edited by Gabriel Strozi

              Actually, I'm struggling right now to simple change between Normal, One Shot, Reversed and Reverse One Shot. It seems to miss an attribute for that. It's possible to change between this settings by code?

              Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

                Use a different sampler and sample map for the reverse mode, then you can cut the samples exactly how you need them.

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

                Gabriel StroziG 1 Reply Last reply Reply Quote 1
                • Gabriel StroziG
                  Gabriel Strozi @d.healey
                  last edited by

                  Use a different sampler and sample map for the reverse mode, then you can cut the samples exactly how you need them.

                  I'll try it! And how can I switch between Normal and One Shot playback? I'm trying to use

                  Sampler1.setAttribute("OneShot", value);
                  

                  But don't work. Any suggestions?

                  Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

                    @Gabriel-Strozi Try Sampler1.setAttribute(Sampler1.OneShot, value)

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

                    1 Reply Last reply Reply Quote 0
                    • Gabriel StroziG
                      Gabriel Strozi
                      last edited by

                      @d-healey said in Changing the start point of the samples on reverse playback mode by code:

                      @Gabriel-Strozi Try Sampler1.setAttribute(Sampler1.OneShot, value)

                      Also didn't work. Nothing changes

                      Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

                        @Gabriel-Strozi You need to get the sampler as a child synth.

                        HiseSnippet 1175.3ocyW0saaaCElJNJH1qKXsnWraFfPvtvAnKvtMMc.EC0wNNEFqIwvJqX2UvHQaSDIRARJu5MzGnc2dD1yvdR5av1gTR1TtFdNdsY0WXvyeje77KUeAOfHkbAxo5USSHHm645OkoF2YLlxP8NE4rm64XohH7xX0dZBVJIgHGmJuTyvo51Hyu2+h13HLKfLmEB8ZNMf7JZLUMma+V+HMJ5LbH4JZrk1G0pW.m0gGwSA7TwsAJAGbCdD4BrVssbQN6zMjp3BeEVQjfNs4gS8Gy+EVl9ulJoWGQzDMQ9vFkwF0YLMJrewcUhPNt8meyqjcyen64zP5L9y8.ekQf2bKr8ANasJH07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zQ1ozR3QGZHAS7tSPYLNPveSP1Wjnw5tFN.JYlOvtJ7k9.sWSj4qT.6babXCTLLq5MAA5BguC7vK2lGuA17jMvli1.ad5FXywafMOaCr46WoM5mIbRphGm0jDXzuaVhkS2YIVUP+Cn97DG.
                        

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

                        1 Reply Last reply Reply Quote 0
                        • Gabriel StroziG
                          Gabriel Strozi
                          last edited by

                          It worked! Now I just have to cut the samples and create new SampleMaps for the reverse Sampler.

                          Thank you so much!

                          Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

                            @Gabriel-Strozi Don't cut the samples. Just duplicate your sample map and rename it, then shift the start and end times inside HISE. That way you won't have to use extra disk space or RAM as it will share the same samples.

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

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

                              @d-healey How do I use both Sample Start End Knob and OneShot/Normal button?
                              If I use const var Sampler1 = Synth.getChildSynth("Sampler1");

                              Start End Sample and Samplemap CB Not working..

                              If I use const var Sampler1 = Synth.getSampler("Sampler1");

                              Normal/Oneshot not working.... How to compensate both scenarios?

                              Bollywood Music Producer and Trance Producer.

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

                                @DabDab name them with other names

                                const var SSynth = Synth.getChildSynth("Sampler1");
                                
                                const var SSampler = Synth.getSampler("Sampler1");
                                

                                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 Ok.. got the logic.. :) (y) Thank you.

                                  Bollywood Music Producer and Trance Producer.

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

                                    @DabDab or use the asSampler function

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

                                    1 Reply Last reply Reply Quote 1
                                    • Gabriel StroziG
                                      Gabriel Strozi
                                      last edited by

                                      Getting the sampler with the Synth.getSampler("Sampler1") you can change between Normal/Oneshot using the parameter ID from Module Browser instead of using the parameter name:

                                      Sampler1.setAttribute(10, value);
                                      

                                      The Sampler parameters are:
                                      e2992980-ba47-4f92-a0ee-e041c9c7dfc3-image.png

                                      It worked for me as well.

                                      Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

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

                                        @Gabriel-Strozi said in Changing the start point of the samples on reverse playback mode by code:

                                        parameter ID from Module Browser

                                        The reason you shouldn't do this is in case the numbers are changed in the future.

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

                                        Gabriel StroziG 1 Reply Last reply Reply Quote 1
                                        • Gabriel StroziG
                                          Gabriel Strozi @d.healey
                                          last edited by

                                          The reason you shouldn't do this is in case the numbers are changed in the future.

                                          Makes much sense! It's a relevant reason!
                                          Let's rewrite some code hahah

                                          Brazilian composer, music producer and mechanical engineer. Working in a steel idiophonic instruments sampler.

                                          1 Reply Last reply Reply Quote 0
                                          • DabDabD
                                            DabDab
                                            last edited by DabDab

                                            I am having an issue. I am little weak in Sampler stuff. My Two questions are how can I switch between Noram, OneShot and Reverse mode via ComboBox.

                                            const var A = Synth.getChildSynth("Sampler1");
                                            const var B = Synth.getSampler("Sampler1");
                                            const var ComboBox1 = Content.getComponent("ComboBox1");
                                            
                                            
                                            
                                            inline function onComboBox1Control(component, value)
                                            {
                                            	switch (value)
                                                {
                                                      case 1:
                                                      B.setAttribute(10,value);
                                                      case 2:
                                                      B.setAttribute(13,value);
                                                      case 3:
                                                      B.setAttribute("Normal",value);
                                                };
                                            	
                                            };
                                            
                                            Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
                                            
                                            

                                            Compiled OK. But Once it's changed nothing happened via ComboBox.

                                            how to fix it? What have I done wrong?

                                            And what is the value for Normal mode?

                                            Bollywood Music Producer and Trance Producer.

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

                                            35

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.3k

                                            Posts