HISE Logo Forum
    • Categories
    • Register
    • Login

    CC to velocity

    Scheduled Pinned Locked Moved Scripting
    controllervelocity
    9 Posts 3 Posters 610 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
      last edited by

      Has anybody got a good method to convert a CC to velocity?

      My current thinking is to measure the time interval between the CC being below a threshold, let's say 10, and the CC being moved up to above the threshold. And using the result to calculate a velocity value.

      I've tried implementing this but it doesn't seem to work properly. Sometimes values are skipped (due to my mod-wheel's resolution probably) and other times it just seems to produce weird results.

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

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

        @d-healey I’m afraid I don’t understand the issue. Is it not possible just to use the CC as-is and set the velocity from its value?

        Unfortunately I won’t be in font of my computer before Sunday...

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

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

          Is it not possible just to use the CC as-is and set the velocity from its value?

          Yes, but not for what I'm doing.

          I want to use a breath controller to trigger note ons. So the user presses a key and nothing happens until they blow into the breath controller, at that point it will play a note. The velocity of this note could come from the original key press, but the user can also stop blowing into the controller and the note will stop, but the key is still held. They then blow into the controller again but this time with a harder attack, so I need the velocity to adapt to how hard they blow.

          I already have the note triggering/stopping working, I just need to convert the breath pressure into velocity.

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

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

            @d-healey I see. Do you have multiple velocity layers? I imagine yes, but if not, you could use a CC modulator to control the gain
            Or a time variant with the onController section

            I might have wrong but isn’t a velocity attached to a noteOn message and so is definitive?

            Just throwing things as they come to my mind...

            Another idea would be to use velocity layers as RRGroups instead and use XFade modulation

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

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

              @ustk Notes are created using Synth.playNote() when the breath CC is above a threshold. I need to pass a velocity value to playNote based on how hard the user blows.

              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

                Delay the note on until you have received a few Cc messages then average them for the velocity information, otherwise it will be very inconsistent and you might as well use a random value...

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

                  @Christoph-Hart Not sure how that would work.

                  User presses key, no sound
                  User blows into controller, value is initially zero, no sound
                  Value hits threshold, let's say 10, note plays. Not much room for averaging.

                  I wonder how wind controllers do it...

                  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

                    Oh I think I get what you mean now! I was just reading about how the WARBL handles velocity and it uses a delay - https://warbl.xyz/phpbb/viewtopic.php?f=6&t=25&hilit=velocity

                    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

                      Yep the delay technique works, thanks! Now I just need to fine tune it.

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

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

                      55

                      Online

                      1.7k

                      Users

                      11.7k

                      Topics

                      101.8k

                      Posts