HISE Logo Forum
    • Categories
    • Register
    • Login

    [SOLVED] "Learn MIDI CC" via script?

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 514 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 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

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

        @d-healey :)

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

        1 Reply Last reply Reply Quote 0
        • ustkU
          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)

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

          d.healeyD ulrikU 2 Replies Last reply Reply Quote 0
          • d.healeyD
            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
            • ustkU
              ustk
              last edited by

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

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

              1 Reply Last reply Reply Quote 0
              • ulrikU
                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 15.3.1, Xcode 16.2
                http://musikboden.se

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  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

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

                    @d-healey yes, that is better of course :)

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

                    1 Reply Last reply Reply Quote 0
                    • ustkU
                      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 :)

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

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

                        @ustk 👍

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

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

                        18

                        Online

                        1.7k

                        Users

                        11.9k

                        Topics

                        103.3k

                        Posts