HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing NoteNumber Modulator parameters via script

    Scheduled Pinned Locked Moved General Questions
    19 Posts 3 Posters 780 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 @ulrik
      last edited by d.healey

      @ulrik But not for each note - one note can trigger multiple samples and some samples can be used by multiple notes.

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

      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @d.healey
        last edited by

        @d-healey but you can set the pan for each sample, so if you have a structure and add all samples connected to C4 you would be able to set the pan for those samples, or is it not scriptable?

        Skärmavbild 2021-06-24 kl. 20.00.29.png

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

        ulrikU Evan SplashE 2 Replies Last reply Reply Quote 0
        • ulrikU
          ulrik @ulrik
          last edited by

          @ulrik I mean if you use an individual sample for each note

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

          1 Reply Last reply Reply Quote 0
          • Evan SplashE
            Evan Splash @ulrik
            last edited by Evan Splash

            @ulrik Unfortunately Array Modulator doesn't work for me either. When you change a note, the previous one immediately takes on the value of the new played one.
            But anyway, thanks for the advice!

            1 Reply Last reply Reply Quote 0
            • Evan SplashE
              Evan Splash @ulrik
              last edited by

              @ulrik Accessing the sample's pan value is what I need if there is no way to change the pan of a single note. Perhaps you can tell me how I can access the panorama of a sample through a script?
              Sorry if this is a stupid question, I'm just new to HISE and before that I wrote scripts only for KONTAKT.

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

                It's not possible but it should be, I'll add a feature request.

                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

                  Actually if you look in this thread Christoph offers a solution - https://forum.hise.audio/topic/2315/change-specific-samples-pan/9?_=1624631954795

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

                  Evan SplashE 1 Reply Last reply Reply Quote 0
                  • Evan SplashE
                    Evan Splash @d.healey
                    last edited by

                    @d-healey Thank You, I will definitely try this!

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

                      @Evan-Splash with this script you're able to set pan per sample, if you have the sample mapped on several notes, all will be affected

                      HiseSnippet 1335.3oc4X80aSbDD+t3bHrKFUP7PeoRqh5CNRTvFBPqppvDmDjUIfUt.s7Ri1b2b1q3tcOs2dI3h3qR+LzOB4iDeCZmcu67s1XBoQMTTadxyL6Lyuclc9ykQRQ.jkIjNtM2eZJ33dEO+ob0jASnLtyvsP9dJHSkR4NaNMklkAgNttMdrVrayUcL+8tGtIMlxCfZVNNuPvBfmvRXpZti5+Sr33cngv9rDqSuQ+gAB9.QrHGgRCutNozfWQGCOkpO1JdNtWZ6PlRH8UTDONtqtoHbp+Dww7hy+BVF6vXPSzywGMTA6cDwgZDq45LXBKNbT0UNyww0aTc.nQQ.3Fd6xBYy3WGH9Ri.RsF1wC2UNM30yFdcO6vy0BdqV.uq44GHYopZIZr8EdC4JPFQwTfMrJNqyJ+9JdCD3I3pakPeEriDIloQm60s6MIazs65+P6Vsac6aSHJzWgjLZRZLHIYFqPjPDHALK2tElrxTjinRhewY5Q9Qh4gysFCpRdcVqR3Z0VdXDYpHmbLkqHJAAOMQMAH36q1sz1C+g1TkJZrlHmqCKofTMsyLIin7aRrfrODCAEFq.2y4mfIT9XfLR6lYlHynhw9YcVKkFmbvg.O7.a75i.jCGav0Qz3bPaMiSLJOKJ0tEiGy3.IJmGnXBNQvQuoi5RQbm.QRpfiw+aVXk0a25Msa0zBJKbOwLx2WcVDLu0.npbHFUFTYvNqgtYs00VnzYCnwwGhkOcrQf1HVP6oBE7Ldm0a8lVMa81VjEEEEsTYkFSmbWlXcQs7zTrCOO4PPVcwpNH95d9xGuOb4ic0cPQ7v5fB9PNS8rTf+gJpbJCh5xqRTgGUYJttZYwkeLKDjNLrFxyCigNF3NqcU+mehyyGtEUQqLBZuxLGSCe2sfivleEUrM81BxdkRjZNaYVCaz9Qb4qs6kN0l3XVnZRMies+DfMdhUW1g8SDgPkgRr6T+xSRnVV9k8yTPpO62.6l4Y4QQrWqCfOA0NLLFFIxX5LoMLbd+lSXKRQXdLUMeeS8vhRAZaX2fR2Dhi1dps+uPZldVg607FwTASVNdWYI3EeCbQi2xQSs81NJBa5TC1U814Wt3mCYCkut.JW2yWIAJ91ZbYOLCdZ4U0Q6ehsEROyaKLRBwBZ37OjOo+l3CYPNO2+nuwUOJAa2NmuJQ9dPJPU6ZJfpDd496s2ikh7zE05cOz7XYeI1tECE1BdFGv3tx9NNPJxxhvqiwVY1hFkKGqiU0b1CNBjYyy6o4IXtmygXcORWWj0yy.ctlErKUIYy0zv3kt6SM4abEJCcuEnuyBz2cA5MVf9dKPe+EnePMcQ.cWZZ8ZjIzz2qW+kOa85Q6fcyfXqStIa7LeTvo9cb25nsAQVqJ9yzifHgLwxRKY2qK8Y8pge5Z913rA2Ox1qMqvnOSmv1leDVvhbzX753.xHZdrph67MO1UvEoSDbVv7kG3y8wiAoM1W5E5QJEVcVy4F82CWcilYUe+M8eBt5FUNeU+eqXQuydr3zxWekWAbI5Ndj+aLzrw+6GZdZgtqVNxjfdWp9LOOeEOSSdhdl7+VPcOQtBm0VMuyCGJhe5jL.rGMthdbaAcWMsFP9321YH9S7uRg8plipE1qRnSPkov6V4uMq661.35oIlcAiwIzw1Ooq1aFm88IAkIz.o3ffhOhQi0Ka3fnja92lzzaWMMoW02u3408Vc0qzyNHHPWH7sXDd45bmygN28bnyFmCct24Pm6eNz4AmCc9tSUG8ZBOJWIRJZRhLFscwCK2sm8vpgyego9dS+
                      

                      project

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

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

                        @Christoph-Hart is this a good/bad way to change the sample properties?
                        I know you shouldn't use it in the NoteOn callback but else, is it ok?

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

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

                          @Evan-Splash I use this setup for controlling pan values
                          It's 15 panknbs and 15 notes
                          To find the samples to change I use the

                          Sampler1.getSoundProperty(3, i);
                          

                          to get the "Root" of the sample and then it's simple to iterate over all samples selected

                          In this instrument there is 4 round robin groups

                          //  Pan --------------------------------------
                          //  Selects all samples
                          Sampler1.selectSounds("");
                          
                          //  get number of samples selected
                          var NUMSelected = Sampler1.createListFromScriptSelection().length;
                          
                          // lookup array (note numbers)
                          var indexList = ["48", "50", "52", "53", "55", "57", "59",
                          "60", "62", "64", "65", "67", "69", "71", "72"];
                          
                          inline function onPanKnbsControl(component, value)
                          {
                              local index = PanKnbs.indexOf(component);
                              {
                                  if (value)
                                  {
                                      for (i = 0; i < NUMSelected; i++)
                                      {
                                          //  property 3 = sample "Root"
                                          local root = Sampler1.getSoundProperty(3, i);
                                          
                                          if (root == indexList[index])
                                          {
                                              Sampler1.setSoundProperty(i, 9, value);
                                          }
                                      }
                                  }
                              }
                          }
                          
                          for (p in PanKnbs)
                          {
                              p.setControlCallback(onPanKnbsControl);
                          }
                          
                          

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

                          Evan SplashE 1 Reply Last reply Reply Quote 0
                          • Evan SplashE
                            Evan Splash @ulrik
                            last edited by

                            @ulrik This is what I need! Thank you so much!

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

                              @Evan-Splash and instead of using "magic" numbers for the attributes

                              //  Pan --------------------------------------
                              inline function onPanKnbsControl(component, value)
                              {
                                  //  Selects all samples
                                  Sampler1.selectSounds("");
                              
                                  //  get number of samples selected
                                  var NUMSelected = Sampler1.getNumSelectedSounds();
                              
                                  // lookup array (note numbers)
                                  var indexList = ["48", "50", "52", "53", "55", "57", "59",
                                  "60", "62", "64", "65", "67", "69", "71", "72"];
                                  
                                  for (i = 0; i < NUMSelected; i++)
                                  {
                                      local index = PanKnbs.indexOf(component);
                                      local root = Sampler1.getSoundProperty(Sampler1.Root, i);
                                              
                                      if (root == indexList[index])
                                      {
                                          Sampler1.setSoundProperty(i, Sampler1.Pan, PanKnbs[index].getValue());
                                      }
                                  }
                              }
                              
                              for (p in PanKnbs)
                              {
                                  p.setControlCallback(onPanKnbsControl);
                              }
                              

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

                              Evan SplashE 2 Replies Last reply Reply Quote 1
                              • Evan SplashE
                                Evan Splash @ulrik
                                last edited by

                                @ulrik Thank you so much, I will try it tomorrow!

                                1 Reply Last reply Reply Quote 0
                                • Evan SplashE
                                  Evan Splash @ulrik
                                  last edited by

                                  @ulrik This works great, this is what I was looking for! Thanks again for the help

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

                                    @Evan-Splash I'm glad it worked for your case! 😊

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

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

                                    45

                                    Online

                                    1.7k

                                    Users

                                    11.7k

                                    Topics

                                    101.8k

                                    Posts