HISE Logo Forum
    • Categories
    • Register
    • Login

    Sample Start

    Scheduled Pinned Locked Moved Solved Scripting
    19 Posts 3 Posters 588 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.
    • LindonL
      Lindon @Casmat
      last edited by

      @Casmat said in Sample Start:

      Hey!

      How's my favorite forum doing?? I'm trying to add a control on my ui that changes the sample start times in a samplemap. Basically when the knob is turned, the samplestart value in the sampler changes all the samples in the samplemap. Currently I have this:

      for(i in sampler0.asSampler().createSelectionFromIndexes(-1))
      {
      	//what goes here?
      };
      

      I found that samples have a .set function, but i tried a couple properties, nothing came up right, any idea how to do this?

      Note: Also planning to do the same thing but pitchwise, so what do you think the parameter for that would be? I tried "pitch" and "Pitch", but I have no clue if the cent value is required...

      Edit: Tried i.get("pitch"); in the for loop to get the value format, but i just got the midi note numbers

      Thanks!

      OK if you look at the sampler theres a modulation target called Sample Start - open that and add a constant modulator to it... now target that to change the smaple start position(offset)

      HISE Development for hire.
      www.channelrobot.com

      CasmatC 2 Replies Last reply Reply Quote 1
      • CasmatC
        Casmat @Lindon
        last edited by

        @Lindon feels like it was put there just for me! Thanks!

        i make music

        1 Reply Last reply Reply Quote 0
        • CasmatC Casmat has marked this topic as solved on
        • CasmatC Casmat has marked this topic as unsolved on
        • CasmatC
          Casmat @Lindon
          last edited by

          @Lindon oops, still need help, how do I control the constant modulator. For example I have a knob on my ui, and i've went into the parameters and set the processer id and set the parameter id to intensity, but moving the knob doesnt change the sample start times of the samples. Any ideas?

          i make music

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

            @Casmat said in Sample Start:

            @Lindon oops, still need help, how do I control the constant modulator. For example I have a knob on my ui, and i've went into the parameters and set the processer id and set the parameter id to intensity, but moving the knob doesnt change the sample start times of the samples. Any ideas?

            you must set the range of sample start in each sample itself... like you set loop points - its the SampleStartMod setting in each zone

            HISE Development for hire.
            www.channelrobot.com

            CasmatC 1 Reply Last reply Reply Quote 0
            • CasmatC
              Casmat @Lindon
              last edited by

              @Lindon hmmm found the samplestartmod setting, is there no way i can select them all and set them all at once? And i set them, but moving the knob doesnt do anything still. The knob is set to linear with min as 0 and max as 5000. I've set the samplestartmod to go till 5000 and nothing happens with the knob...

              Thanks!

              i make music

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

                @Casmat yes just drag across and highlight all the zones, then go to SampleStartMod and type in the value you want, then press enter.

                HISE Development for hire.
                www.channelrobot.com

                CasmatC 1 Reply Last reply Reply Quote 0
                • CasmatC
                  Casmat @Lindon
                  last edited by

                  @Lindon that’s odd, I dragged and selected but only one zone/rrgroup got modified

                  i make music

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

                    @Casmat Works here. Did you have all groups visible for editing?

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

                    CasmatC 1 Reply Last reply Reply Quote 0
                    • CasmatC
                      Casmat @d.healey
                      last edited by Casmat

                      @d-healey @Lindon Got it working after re-enabling the enable button! I'm starting to rethink this sample start thing, how would I make it so I have a knob on my ui, which controls the sample start, but based on percentages of the sample time?

                      For example:
                      SCENARIO 1:
                      knob value: 0%
                      sample 1 length after mod: 1 second length
                      sample 2 length after mod: 2 seconds length

                      SCENARIO 2:
                      knob value: 50%
                      sample 1 length after mod: 0.5 Second
                      sample 2 length after mod: 1 second

                      i make music

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

                        @Casmat said in Sample Start:

                        @d-healey @Lindon Got it working after re-enabling the enable button! I'm starting to rethink this sample start thing, how would I make it so I have a knob on my ui, which controls the sample start, but based on percentages of the sample time?

                        For example:
                        SCENARIO 1:
                        knob value: 0%
                        sample 1 length after mod: 1 second length
                        sample 2 length after mod: 2 seconds length

                        SCENARIO 2:
                        knob value: 50%
                        sample 1 length after mod: 0.5 Second
                        sample 2 length after mod: 1 second

                        Connect your UI knob to your Offset constant modulator

                        HISE Development for hire.
                        www.channelrobot.com

                        CasmatC 1 Reply Last reply Reply Quote 0
                        • CasmatC
                          Casmat @Lindon
                          last edited by

                          @Lindon connected with processer id, put parameter as intensity, and mode as linear. have put my min as 0 and max as 50000 with middle as 25000. However, when the knob is at 0, the samples don't play at the start, i feel like turning the knob does something as the sound slightly changes, but it doesn't feel right. just to reinforce and make sure, by percentage and what I hope to happen is that when the knob is at zero, I want it to be at the very start of the sample, the normal playback, and when the knob is turned all the way up to the max, the start is at the very end of the sample. The middle on the knob represents the middle sample start point of all samples regardless of their sample length, hence the percentages.

                          i make music

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

                            @Casmat look at the modulator you are using for sample start - it's values are 0 to 1. this is a percentage of the length of the sample - so attach this to a percentage knob in your UI and it should set the start point accordingly, where 1 = start and 0 = end of your offset range

                            HISE Development for hire.
                            www.channelrobot.com

                            CasmatC 1 Reply Last reply Reply Quote 0
                            • CasmatC
                              Casmat @Lindon
                              last edited by

                              @Lindon ahh, yup, makes sense, the values seem flipped such that 100% is 0% and reverse, way to flip without code in parameter settings?

                              i make music

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

                                @Casmat said in Sample Start:

                                @Lindon ahh, yup, makes sense, the values seem flipped such that 100% is 0% and reverse, way to flip without code in parameter settings?

                                -write the code

                                HISE Development for hire.
                                www.channelrobot.com

                                CasmatC 1 Reply Last reply Reply Quote 0
                                • CasmatC
                                  Casmat @Lindon
                                  last edited by Casmat

                                  @Lindon darn! Thanks!

                                  i make music

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

                                    @Casmat really..?

                                    theSamplerOffsetModulator.setIntensity(1-value);
                                    

                                    HISE Development for hire.
                                    www.channelrobot.com

                                    CasmatC 1 Reply Last reply Reply Quote 0
                                    • CasmatC
                                      Casmat @Lindon
                                      last edited by

                                      @Lindon as a way to prove my thanks, here's a hise doubloon:
                                      Your HISE Doubloon!

                                      i make music

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

                                        I feel another t-shirt coming on...

                                        HISE Development for hire.
                                        www.channelrobot.com

                                        1 Reply Last reply Reply Quote 2
                                        • CasmatC Casmat has marked this topic as solved on
                                        • CasmatC Casmat has marked this topic as unsolved on
                                        • CasmatC Casmat has marked this topic as solved on
                                        • First post
                                          Last post

                                        45

                                        Online

                                        1.7k

                                        Users

                                        11.7k

                                        Topics

                                        102.2k

                                        Posts