Forum

    • Register
    • Login
    • Search
    • Categories

    [SOLVED] "Learn MIDI CC" via script?

    General Questions
    3
    11
    126
    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.
    • ustk
      ustk last edited by ustk

      Is there a way to Learn MIDI CC via script?

      Tired to press F5 in the forum...
      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

        @ustk I don't understand, if it's via script it's not learning... ?

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

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

          @d-healey 🙂

          Hise Develop branch
          MacOs 12.3.1, Xcode 13.0
          http://musikboden.se

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

            @d-healey Sorry, it wasn't clear 🙂
            Actually, I want to trigger the Learn MIDI CC via something else than a right-click (in fact via left-click on a panel, or a simple button callback)

            Tired to press F5 in the forum...
            Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

              @ustk I don't think it's possible, you'd need to play with C++ or implement your own MIDI learn functionality that is separate from the HISE MIDI Lean system.

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

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

                @d-healey Yeah that confirms my thoughts... Will find another way then thanks 😉

                Tired to press F5 in the forum...
                Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

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

                  @ustk if you make a global variabel for each component you want to be controlled by CC

                  var c01 = 0;
                  

                  and get the users controller

                  c01 = Message.getControllerNumber();
                  

                  you can assign c01 to, for instance a knob

                  function onController()
                  {
                      if(Btn.getValue() == 1) // button on or something?
                      {
                          c01 = Message.getControllerNumber();
                      }
                      // and then when Btn.getValue == 0
                      if(Message.getControllerNumber() == c01)
                      {
                          Knb.setValue(Message.getControllerValue() / 128);
                      }
                  };
                  

                  Hise Develop branch
                  MacOs 12.3.1, Xcode 13.0
                  http://musikboden.se

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

                    @ulrik Rather than a variable for each component, I'd use an array (or an object) with each element representing a control.

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

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

                      @d-healey yes, that is better of course 🙂

                      Hise Develop branch
                      MacOs 12.3.1, Xcode 13.0
                      http://musikboden.se

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

                        @ulrik @d-healey Thanks a lot guys! Instead of a variable, I store the CC along with all the values I already have in my panel so it is restored with presets 🙂

                        Tired to press F5 in the forum...
                        Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

                        ulrik 1 Reply Last reply Reply Quote 1
                        • ulrik
                          ulrik @ustk last edited by

                          @ustk 👍

                          Hise Develop branch
                          MacOs 12.3.1, Xcode 13.0
                          http://musikboden.se

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

                          9
                          Online

                          733
                          Users

                          5.4k
                          Topics

                          50.2k
                          Posts