HISE Logo Forum
    • Categories
    • Register
    • Login

    Customize Midi Learn and Macro Panel

    Scheduled Pinned Locked Moved General Questions
    12 Posts 5 Posters 450 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.
    • DabDabD
      DabDab @d.healey
      last edited by DabDab

      @d-healey OH.. No prob. :) Tweaking C++ is easier to me than writing Javascript. I am very bad in Javascripting :beaming_face_with_smiling_eyes:

      Bollywood Music Producer and Trance Producer.

      ? 1 Reply Last reply Reply Quote 0
      • ?
        A Former User @DabDab
        last edited by

        @dabdab

        The strings for the right click menu popup are "drawPopupMenuBackground" and "drawPopupMenuItem"

        eg:

        laf.registerFunction("drawPopupMenuBackground", function(g, obj)
        {
            g.setColour(0xFF222222);
            g.fillRoundedRectangle([0, 0, obj.width, obj.height], 4.0);
            
            g.setColour(Colours.lightgrey);
            g.drawRoundedRectangle([0, 0, obj.width, obj.height], 4.0, 1);
        });
        
        DabDabD 1 Reply Last reply Reply Quote 0
        • DabDabD
          DabDab @A Former User
          last edited by

          @iamlamprey said in Customize Midi Learn and Macro Panel:

          laf.registerFunction("drawPopupMenuBackground", function(g, obj)
          {
          g.setColour(0xFF222222);
          g.fillRoundedRectangle([0, 0, obj.width, obj.height], 4.0);

          g.setColour(Colours.lightgrey);
          g.drawRoundedRectangle([0, 0, obj.width, obj.height], 4.0, 1);
          

          });

          Yup I know. But I want to change Min Max Slider Type, and Menu names (Source,parameters etc) & Button.

          Bollywood Music Producer and Trance Producer.

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @DabDab
            last edited by

            @dabdab Ah sorry I misunderstood, I think David's right there

            DabDabD 1 Reply Last reply Reply Quote 1
            • DabDabD
              DabDab @A Former User
              last edited by

              @iamlamprey said in Customize Midi Learn and Macro Panel:

              @dabdab Ah sorry I misunderstood, I think @d-healey right there

              Thank you @Tania-Ghosh for helping me to modify the C++

              Mod.gif

              Bollywood Music Producer and Trance Producer.

              Oli UllmannO 1 Reply Last reply Reply Quote 3
              • Oli UllmannO
                Oli Ullmann @DabDab
                last edited by

                @DabDab That looks great! :-)

                Could you show which code has to be changed and how, to get influence on the “source”?

                I would like to change the name from the real button name to one I have defined.

                If I am not mistaken, I would have to change the code in the file “FrontendPanelTypes.cpp”, correct?

                Thank you very much
                Oli

                DabDabD 1 Reply Last reply Reply Quote 0
                • DabDabD
                  DabDab @Oli Ullmann
                  last edited by DabDab

                  @Oli-Ullmann said in Customize Midi Learn and Macro Panel:

                  @DabDab That looks great! :-)

                  If I am not mistaken, I would have to change the code in the file “FrontendPanelTypes.cpp”, correct?

                  You can do so, however you can achieve using LAF

                  const var laf = Content.createLocalLookAndFeel();
                  const var FloatingTile1 = Content.getComponent("FloatingTile1");
                  laf.registerFunction("drawTableHeaderColumn", function(g, obj)
                  {
                    g.setColour(Colours.darkgrey);
                    g.fillRect(obj.area);
                    g.setColour(Colours.orange);
                    g.setFont("Arial", "15");
                  	if(obj.text== "Source")
                  	{
                  	   g.drawAlignedText("Hart", obj.area, "left");	
                  	}
                     if(obj.text== "Parameter")
                     {
                      g.drawAlignedText("David", obj.area, "left");	
                     }
                     if(obj.text== "Inverted")
                     {
                      g.drawAlignedText("Ustk", obj.area, "left");	
                     }
                     if(obj.text== "Min")
                     {
                      g.drawAlignedText("Ulrik", obj.area, "left");	
                     }
                     if(obj.text== "Max")
                      {
                       g.drawAlignedText("Lindon", obj.area, "left");	
                      }
                  
                  });
                  
                  FloatingTile1.setLocalLookAndFeel(laf);
                  

                  This is an old school script however you can shorten the script by operators. Other people might help on that. I am not good at it.

                  a68edbd6-aaf7-40e2-a7aa-48f70a02e191-image.png

                  Bollywood Music Producer and Trance Producer.

                  Oli UllmannO 1 Reply Last reply Reply Quote 1
                  • Oli UllmannO
                    Oli Ullmann @DabDab
                    last edited by

                    @DabDab said in Customize Midi Learn and Macro Panel:

                    “FrontendPanelTypes.cpp”,

                    Thank you for your example!

                    Unfortunately, I did not express myself correctly. I don't want to change the heading but the actual parameter name.

                    I think I have to edit the C++ code to do this, don't I? Do you know how and where?

                    I have attached a picture for clarification. I have framed the parameter that I would like to change in red.

                    Something along these lines:
                    if(obj.text==“Button1”)
                    {
                    g.drawAlignedText(“Cutoff”, obj.area, “left”);
                    }

                    Only in C++ at the correct place in the correct C++ file

                    Thank you
                    Oli

                    Picture:
                    Beispiel.png

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

                      @Oli-Ullmann why don‘t you just change the text property of the button?

                      Oli UllmannO 1 Reply Last reply Reply Quote 2
                      • Oli UllmannO
                        Oli Ullmann @Christoph Hart
                        last edited by

                        @Christoph-Hart Because I already use the text property elsewhere in the code. For example in the LAF object. I would have to change a lot in the entire code. But thanks for the hint! Next time I'll keep that in mind from the start! :-)

                        Can you tell me where I have to change what in the C++ code?

                        Thank you very much! :-)

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

                        41

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts