HISE Logo Forum
    • Categories
    • Register
    • Login

    Offset vs. Delay in HISE

    Scheduled Pinned Locked Moved Scripting
    13 Posts 4 Posters 520 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.
    • A
      aaronventure
      last edited by

      Just to verify:

      Synth.playNoteWithStartOffset() takes in sample offset that is set in the sample editor and is not affected at all by the processing sample rate? It can take a value up to whatever I set under SampleStartMod, correct?

      While Message.delayEvent() works on processing sample rate level, and any input I make needs to take into account the current sampling rate via Engine.getSampleRate()?

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @aaronventure
        last edited by

        @aaronventure yes. each method works on the domain that makes sense - usually you know the samplerate of your samples and can pinpoint it exactly to the time value and the delayEvent function is agnostic to the sampler and works with any kind of sound generator.

        gorangroovesG 1 Reply Last reply Reply Quote 2
        • gorangroovesG
          gorangrooves @Christoph Hart
          last edited by

          @Christoph-Hart How do we use Synth.playNoteWithStartOffset()?

          It is not making much sense to me. I have this in the MIDI Script Processor:

          const var OffsetKnob = Content.getComponent("OffsetKnob");
          
          function onNoteOn()
          {
          	local channel = Message.getChannel();
          	local velocity = Message.getVelocity();
          	local number = Message.getNoteNumber();
          	local offset = OffsetKnob.getValue();
          
          	Synth.playNoteWithStartOffset(channel, number, velocity, offset);
          	
          	Console.print("Ch: "+ channel + " Vel: " + velocity + " Num: " + number + " Off: " + offset);
          
          }
           
          

          I would expect this to offset all notes in this sampler by the amount set by the knob, but it is not affecting anything. What's procedure for using this, please?

          Goran Rista
          https://gorangrooves.com

          Handy Drums and Handy Grooves
          https://library.gorangrooves.com

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

            @gorangrooves You need to have set some start offset value for them in the sampler.

            14e247bc-9ab9-40c4-bb49-8ffcc1922951-image.png

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

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

              @d-healey Thanks, Dave. I'll play around with it a bit more. It is kind of weird: setting an offset value to set an offset value?!

              Goran Rista
              https://gorangrooves.com

              Handy Drums and Handy Grooves
              https://library.gorangrooves.com

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @gorangrooves
                last edited by

                @gorangrooves thats because it needs to increase the preload buffer to be able to skip to the position so it needs to know the max offset you want to use in advance.

                gorangroovesG 1 Reply Last reply Reply Quote 0
                • gorangroovesG
                  gorangrooves @Christoph Hart
                  last edited by

                  @Christoph-Hart Thanks, Christoph. Your explanation makes perfect sense, but the naming for that parameter not so much. I don't think it is intuitive. What do you think about renaming it to something like "OffsetBuffer"?

                  Goran Rista
                  https://gorangrooves.com

                  Handy Drums and Handy Grooves
                  https://library.gorangrooves.com

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

                    @gorangrooves StartOffset is kind of standard since Kontakt uses the same name.

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

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

                      @d-healey I am referring to the "SampleStartMod".
                      "StartOffset" is self-explanatory.
                      "SampleStartMod" is not.

                      Goran Rista
                      https://gorangrooves.com

                      Handy Drums and Handy Grooves
                      https://library.gorangrooves.com

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

                        @gorangrooves Yeah it's the same in Kontakt. In fact I think it's shortened to S. Mod in Kontakt. It's short for Sample Start Modulation Range. But of course for someone who isn't familiar with that it does seem like a strange choice.

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

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

                          @d-healey "range" is the keyword here. "Buffer" or "range" would make it more self-explanatory and less confusing.

                          Goran Rista
                          https://gorangrooves.com

                          Handy Drums and Handy Grooves
                          https://library.gorangrooves.com

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @gorangrooves
                            last edited by

                            @gorangrooves The problem is that this name is hardcoded as ID into samplemaps so unless I'll make an ugly branch like this to the codebase

                            if(user == "goran" && id == "SampleStartMod")
                            {
                                id = "StartOffset"; 
                            }
                            

                            I don't see a way of changing this without breaking every single HISE project :)

                            gorangroovesG 1 Reply Last reply Reply Quote 1
                            • gorangroovesG
                              gorangrooves @Christoph Hart
                              last edited by

                              @Christoph-Hart 😂😂
                              Nevermind.

                              Goran Rista
                              https://gorangrooves.com

                              Handy Drums and Handy Grooves
                              https://library.gorangrooves.com

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

                              56

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts