HISE Logo Forum
    • Categories
    • Register
    • Login

    playNoteWithStartOffset

    Scheduled Pinned Locked Moved General Questions
    20 Posts 3 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.
    • d.healeyD
      d.healey @Lindon
      last edited by

      @Lindon

      -- for every sample? That's a nightmare of repetitive work....grief. Is there some programmatic way to do this - like in Kontakt

      Go into the Sampler workspace. Select all of the samples in the mapping editor. Right click the sampleStartMod value edit box. Drag the slider all the way to the right.

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

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

        @d-healey oh ok that bits fine then, how do I assign as tart sample of (lets say) 623458 using this modulator approach?

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon said in playNoteWithStartOffset:

          @d-healey oh ok that bits fine then, how do I assign as tart sample of (lets say) 623458 using this modulator approach?

          No idea, which is why I didn't answer that bit :p I've only used unspecific offsets in my projects so far.

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

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

            You can of course set sample properties programatically. There's a blog post called "Fun with Regex" that explains this.

            If you use the modulator approach, the 0...1 value is converted to the samplestart mod range available in the sample that's about to start.

            If you set them all to 623458, then just return 1.0 :)

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

              @Christoph-Hart fine but setting something to a fixed sample position is not really much use to me, let me explain:

              My instrument has a wav file its 4 bars at a tempo (lets say) 120 bpm. OK its a loop and I want to divide this down into "steps" - 32 of them.

              The user presses play and now I need to play this loop - but I want to do so by playing slices of the wav file - so I can reorder the slices, and change tempos during the song.

              Lets assume for the minute the selected pattern is the following: 1,2,3,4,5,6,7...32 - so just sequential

              So first slice is easy thats at 0 offset
              so playNote with a zero offset..
              --- Now I have to calculate a point to send a NoteOff but thats another story...

              Next slice is at (file_length in samples/32) *1

              So playNote with offset (file_length in samples/32) *1

              next note:

              playNote with Offset (file_length in samples/32) *2

              next note:

              playNote with Offset (file_length in samples/32) *3

              etc.

              This is all pretty easy to do in Kontakt... Kontakt will tell me the file_length in samples when I want it,
              Kontakt will let me:

              play_note(60,100,((file_length in samples/32) * pattern_number),(a user-specified duration))

              ..and I'm done. No note off to worry about no offset to worry about

              SO how would I do this in HISE?

              HISE Development for hire.
              www.channelrobot.com

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

                oh and the blog is:

                ERR_CONNECTION_TIMED_OUT

                So I cant read you Regex post.

                HISE Development for hire.
                www.channelrobot.com

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

                  @Lindon Yup the blog link has been broken for some time, but all of the blog entries were moved to the forum under the blog category

                  Link Preview Image
                  Fun with Regex

                  This is an advanced feature that I just implemented (and you need at least version 0.984 for this). You can now change the properties of individual sample so...

                  favicon

                  Forum (forum.hise.audio)

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

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

                    @Lindon said in playNoteWithStartOffset:

                    This is all pretty easy to do in Kontakt... Kontakt will tell me the file_length in samples when I want it,

                    HISE has AudioSampleProcessor.getSampleLength() which might be useful here.

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

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

                      @d-healey Thanks dave. I will give this a try.. so one bit sorted now how to offset dynamically..

                      OK looking at it I have accss to :

                      Sample Start
                      Sample End

                      and I have SetSampleRange - what does this do?

                      can I use this call dynamically ? So..

                      myAudioSampleProcessor.setSampleRange( (file_length_in_samples/32) *2, (file_length_in_samples/32) *3);
                      myNoteID = playNote(60,100);
                      

                      HISE Development for hire.
                      www.channelrobot.com

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

                        bump - still looking for answers about this last question...

                        HISE Development for hire.
                        www.channelrobot.com

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

                          No, changing the sample start like this would affect all ringing voices so it's a rather nasty hack.

                          I need to supply you with a proper workaround for the looper module. Given the fact that it's the only module that benefits from a sample start > 65536, it's a sensible addition.

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

                          23

                          Online

                          1.8k

                          Users

                          12.1k

                          Topics

                          105.1k

                          Posts