HISE Logo Forum
    • Categories
    • Register
    • Login

    midi learn for panel

    Scheduled Pinned Locked Moved Scripting
    13 Posts 4 Posters 419 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.
    • ulrikU
      ulrik
      last edited by ulrik

      I could really need some help to understand how to set up midi learn in a panel with several parameter areas

      If someone could make a minimal snippet how to do that, I would be most grateful :)

      This is a small example, a panel with 2 areas controlling 2 different values.
      How do I setup the different parameters to be controlled via midi cc?
      There is no components, only effect modules involved, is it possible?
      If yes, can someone please show me?

      midilearn.gif

      HiseSnippet 1281.3ocsVstaaaCEVJIpq1aEaEXO.D9WxMNNxItsCMKnNwIYKXMoF0YsEHHqfVhVhKxjdRT9BVy61dT1ivdB11gj5la8xRMP8erNW9N7iGdHOmdQbWRbLOxvrxEyGSLL+Jq9yYhftAXJy3ziLLumkfDKLNb9XbbLwyvzb8ePZyrxFFpe+0yODGhYtjBUFFulScIufNhJJz1qyOQCCOA6QtfNpj2s6bpKm0kGxS.drtkiwXr60Xex4XoaqYAj3XOpfG0WfAxXXtwgbu48C3SYZ+eMMlNHjHEZYzGBjV8I7POIikZM5FPC85kseiMfnzqX2utd2+sVmQ8n45KxBeix.p.Q47g4Z2F8Z8+SOmkQOyRzaCM8dnUe2H5XQgEI29RqSYBRzPLbDTlVZeMV6usr5xAOXhlivWSNIBDxQX+DGmFnG63TeupvoPr.MAGg5gYjPz9nLb9DQW9nwbFHXWSYsF.nZDwGwG7qDWAZ+p+d0J0lfCSHw0dF5xqZ.hinL42vJ3nkwyjx6.J1w4pp2.gPErlwDwqkPs0QqdYC8fCAwq3IBJiXOLg4Jnblsec4BJI6Tfnh.Zrjkug5IBrA3JKAkr7iDpefH2zjRlzqrzBXqodKzLjv7EP.1G4fdNJSMfRuaPOCUqlFADs3PtPZam8JjAwons0lTN52bHT+ePXncMmYsaeh5Ws54AgBeMjGgro.Tm8PTz2mh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Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        You'd have to roll your own MIDI learn solution, the inbuilt MIDI learn will apply to the entire panel.

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

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

          @d-healey do you have a minimal example, or a hint on how think?

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

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

            @d-healey said in midi learn for panel:

            You'd have to roll your own MIDI learn solution, the inbuilt MIDI learn will apply to the entire panel.

            you mean set up midi controller modules for each area?

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

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

              You need to decide how you want to start the MIDI learn, does the user click a button or do they right click a section of the panel, for example.

              Once they've started MIDI learn, you need to set a flag to indicate you are in MIDI learn mode for the selected section of the panel.

              Then when the user moves a MIDI controller you save the CC number somewhere and turn off your MIDI learn mode flag.

              Then in your on controller callback you can check if the CC number matches the one assigned to the section of the panel and if it does you update the panel and perform whatever action is required.

              Why don't you just use sliders?

              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
                sliders? this is my way of learning the interesting parts, learning from the masters :)
                thank you David 🙏

                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

                  interesting parts, learning from the masters

                  Panels were interesting last year. This year we use sliders + LAF :p

                  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 Haha 😂

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

                    1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      @d-healey Sliders+ LAF were interesting last year. This year we use custom OpenGL shaders.

                      ulrikU 2 Replies Last reply Reply Quote 5
                      • ulrikU
                        ulrik @Christoph Hart
                        last edited by

                        @Christoph-Hart uhh, I'm 2 years behind ðŸĪŠ

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

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

                          @Christoph-Hart @d-healey
                          I'm catching up, after 20 hours I'm only one year behind :)

                          @d-healey I've implemented a custom midi learn system, and yes it works fine but I have to get rid of some stupid loops inside the on controller callback, I think they interrupt processing in the plugin, at least that how it sounds ðŸ˜Đ

                          Thank you David for the tips on how to do it, much appreciated 👍

                          effect slot.gif

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

                          ? 1 Reply Last reply Reply Quote 2
                          • ?
                            A Former User @ulrik
                            last edited by A Former User

                            @ulrik Hey Ulrik. I am facing a similar problem. A bit simpler probably. I want to assign my panel value to CC1 for example. How can I do that? My guess was in the panel timer callback to listen for isController() or something!? Do you have a hint for me? thx, u

                            Edit: Never mind... I put this in the onController callback. It is working for now.

                            function onController()
                            {
                            	if (Message.getControllerNumber() == 1)
                            	    {
                            	        pnlPosition.setValue(Message.getControllerValue()/127);
                            	        pnlPosition.repaint();
                            	    }
                            }
                             
                            
                            ulrikU 1 Reply Last reply Reply Quote 0
                            • ulrikU
                              ulrik @A Former User
                              last edited by

                              @UrsBollhalder try in "on controller" callback

                              if (Engine.getControllerNumber() == 1)
                                 {
                                      Panel.setValue(Engine.getControllerValue());
                                      Panel.changed();
                                  }
                              

                              then in the Panels CB you deal with the values the way you need

                              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.9k

                              Posts