HISE Logo Forum
    • Categories
    • Register
    • Login

    Global velocity modulator issue

    Scheduled Pinned Locked Moved Scripting
    24 Posts 4 Posters 1.3k 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 @ustk
      last edited by

      @ustk hmm I will investigate

      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 @ustk
        last edited by

        @ustk It doesn't seem to work for me, the only difference is the velocity mod is now fixed at 60. What result do you get?

        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

          Ok I just tested this in Kontakt and the behaviour is the same - how did I not know this!

          The standard solution would be to use the change volume function on each note based on the real velocity. But I'm wondering if I can find a solution using a scripted voice start modulator.

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

          ustkU 2 Replies Last reply Reply Quote 0
          • ustkU
            ustk @d.healey
            last edited by

            @d-healey Like this, the velocity is the one you set in the script.
            What if you do that:

            HiseSnippet 1339.3oc6XstaaTDEdW6rPsKA0RKHDHDyO3GNJAq0PZKhnRtZGEQtXEmFPpppZx5w1ix5YVlcrAKDuI7Fvi.h2Aj3EouAv4L6tdW2rw03lfZUY+QTlybN698clyswMUROVXnTYYW5jQALK62wo0Hgt218nbg0d6XYunSnVMnOwqmT01ZqQAzvPVaKa6h6hpXWZAKKKxu86+w5aQ8oBOVrHyyoRtGaedetNUZyM9VtueCZa1I79Yzd0M1ySJ1V5KG.voniqU.06bZW1gTTsBNV1uU81bsT0RS0rPK6E1R1dTqdxeTDo+o7P9Y9LbQMqVvKJRbCoeaDwnTqs6w8a2Lg1gVvKsYpSnXjS3tNGvayGKO0YbKy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rhR4UVoF5jiZohdMd.24tAicglW3G73VPIq9A9r5B79MfDDiuGvpNzA95DoSFXdfTHC5IEburI3GyfZuc6xTYwdtDZSsl5cdpj6twwLeFMawpOai8ghLT0jMauJ8E1y340G5DAWBFSQdk5hIwSW+wwykY5azBu38XZXXvmlL2lQAhQi4b.I7JMICFA0aQglLE7mmBRUDLSUCK6ZSah9uNuoz9+ondCYJp+K9F8odJ4S8hp4iI62vHA3sv7ioVx4.bMolkoaFXmiaUWq9v3AO0yCc2eN3ex2luXNr4KmCaVcNr4dygM2eNr4AygMe0TsAmLayAZY+nTQPPy5QUVrqKvxLlndq+A32ldOA
            

            I'm sure you already know the "how to", so I imagine you have something in mind preventing you from using getVelocity()...

            Can't help pressing F5 in the forum...

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

              @d-healey I don't know how to use the scripted modulators, would be cool...

              Can't help pressing F5 in the forum...

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

                @ustk

                so I imagine you have something in mind preventing you from using getVelocity()...

                Yeah this is the problem. I need to be able to specify the velocity. Have a look at my screenshots above, I have mapped each string, rr, and up/down of the guitar to a different velocity.

                The other solution is to use individual groups but then each articulations (assuming 3 dynamics) will need 24 groups, and if I have 10 articulations that's a lot of groups to manage. And I can do it with 1 group per articulation with the velocity method.

                I'm going to play around with the script modulator and if that doesn't work I'll just use a addVolumeFade command.

                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

                  I think I've done it :)

                  I capture the real velocity in a global variable and then I pick it up in a script modulator to apply the gain change.

                  HiseSnippet 1277.3oc6X80aiSDD2NoF0DnmtiCgPfPrOvCop8BNkxUjpN5eSqhnoWTSuBRmPUas23rpN6ZVuNbQH9Dw67BhuC2Gk6a.L6Z6XmVSuzHt1d.VQQYmcl0+lY142ra5H3NjvPtv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WnJBdf94P+.F.zTLuTVv74ItkJRFqNjRpGBmCP0HtFaYTrKD3iGoLUI4w1KpbNkxwemrFKszDRo8P0RCZeySxk.q6SXdx9KVshRsKGruidDA6+kbDg2n2z6ZP1Upyk92CtOzwYPfOoISc3TPhBuuO3g8vQ9xToSxqzly3A84LpSd94iHPqSOOhHueTnyskThcNOmsadDwmfy2q4y27.nlDKfXF4phK+ixxVXt6irhgKRs+Bcm515Vwv9SRZCna62UQ7M1Mzdvmk1lPq.RqQ1gUW406Ho2042rxSRj85pMT8yVLWxKzjDBBzEmk6FQnu.0Xk0paeQdljkfGbwU35w9dMoqle51ybYxoLON+cXF6DudJp6NLR++U.tctBvMw6X.1QvO0IdulhpadsDvuY5+V1JVsUiQMLzEJfcV10sMF.mB7TGGU39QP7oXaVYFr4KmAaVcFr4qlAad7LXyZyfMe8UZi5.3aEI4ChKEAAcZpq8MMaxvvNY8tdi+BDx2eVL
                  

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

                  ustkU 1 Reply Last reply Reply Quote 2
                  • ustkU
                    ustk @d.healey
                    last edited by

                    @d-healey Glad you found a solution mate ;)
                    So if I understand well this function returns the Gain (0-1 based) because the Voice Start Mod is in the Gain modulation...

                    function onVoiceStart(voiceIndex)
                    {
                    	return g_velocity / 127.0;}
                    

                    Can't help pressing F5 in the forum...

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

                      Yup - https://docs.hise.audio/hise-modules/modulators/voice-start-modulators/list/scriptvoicestartmodulator.html

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

                      1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk
                        last edited by

                        Thought there was nothing in the doc yet... Wrong me... 🙃

                        Can't help pressing F5 in the forum...

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

                          I think it's probably better to use a midiList and record the velocity for each individual note, although this might be overkill

                          return g_velocity.getValue(Message.getNoteNumber()) / 127.0;
                          

                          Although this won't work if you're offsetting note positions.

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

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

                          20

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.8k

                          Posts