HISE Logo Forum
    • Categories
    • Register
    • Login

    FrontEndMacro: Display Parameter Text Instead of Parameter ID

    Scheduled Pinned Locked Moved General Questions
    21 Posts 3 Posters 306 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 @bendurso
      last edited by

      @bendurso Sorry I was confusing it with the MIDI learn panel.

      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

        Looking in the source I find this

        6ae5196a-b4e5-4464-8ab2-bb7a36a5f1a4-image.png

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

        bendursoB 2 Replies Last reply Reply Quote 0
        • bendursoB
          bendurso @d.healey
          last edited by

          @d-healey

          Looking in the source I find this

          So it should appear the pluginParameterName?

          In the MIDI Panel it displays the pluginParameterName, and technically the style is the same of the FrontEndMacroPanel.

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

            @bendurso It's saying it will use the component name because processor parameters don't have a name of their own.

            Can you change it using LAF?

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

            bendursoB LindonL 2 Replies Last reply Reply Quote 0
            • bendursoB
              bendurso @d.healey
              last edited by

              @d-healey Mm but I'm using sliders, not processors. They do have names.

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

                @bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                They do have names.

                I'm not sure, I haven't used macros much.

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

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

                  @d-healey Oh, I ended up here because the MPE of the global modulator wasn’t working, but the MPE of the macro was. Along the way, I realized that macros are far more customizable than global modulators.

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

                    @d-healey said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                    @bendurso It's saying it will use the component name because processor parameters don't have a name of their own.

                    Can you change it using LAF?

                    To be honest this would be very nice to have - i.e. the frontend Macro panel using the pluginParameterName as its display value for Parameter - sure I could (I think) build some sort of LAF for this, but all I'm looking for is the name to be something end-user readadble - and isn't that really the whole point of the pluginParameterName???

                    HISE Development for hire.
                    www.channelrobot.com

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

                      @d-healey I found that the display parameter is set by this function on line 1473 of FrontendPanelTypes.cpp

                      juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const
                      {
                      	hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock);
                      
                      	if (auto data = connectionList[rowNumber].get())
                      	{
                      		if (columnId == ColumnId::ParameterName)
                      			return data->getParameterName();
                      		else if (columnId == ColumnId::CCNumber)
                      			return getData(data)->getMacroName();
                      	}
                      
                      	return {};
                      }
                      

                      I asked to Claude to change it to Automated parameter name (I also provided it the code of midi learn panel, because is the working example of what I want), and it gave me a working code:

                      juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const
                      {
                          hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock);
                      
                          if (auto data = connectionList[rowNumber].get())
                          {
                              if (columnId == ColumnId::ParameterName)
                              {
                                  auto* processor = data->getProcessor();
                                  int parameterIndex = data->getParameter();
                                  
                                  return hise::ProcessorHelpers::getPrettyNameForAutomatedParameter(processor, parameterIndex);
                              }
                              else if (columnId == ColumnId::CCNumber)
                                  return getData(data)->getMacroName();
                          }
                      
                          return {};
                      }
                      

                      Now it displays the automated parameter name of the knobs on the FrontendMacroPanel :)

                      Can someone check if the syntax is correct? I mean, it compiled without issues, but maybe could crash in the future if something is wong hehe.
                      Maybe it can be added/modified to the Hise code on github.

                      d.healeyD LindonL 2 Replies Last reply Reply Quote 1
                      • d.healeyD
                        d.healey @bendurso
                        last edited by

                        @bendurso The else isn't necessary because of the return in the clause above. Just use the if. I'd also go for an early return after the first if to avoid the nesting, but that's just me.

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

                        1 Reply Last reply Reply Quote 1
                        • LindonL
                          Lindon @bendurso
                          last edited by

                          @bendurso hmm, is this handling the case where I dont set a pluginParameterName name? In that case it should fall back to the param name....

                          HISE Development for hire.
                          www.channelrobot.com

                          bendursoB 2 Replies Last reply Reply Quote 0
                          • bendursoB
                            bendurso @Lindon
                            last edited by

                            @Lindon Mm, no. My idea was to replicate the same behavior as the MIDI Learn Panel since it uses pluginParameterName, which works for me. Possibly, it could be modified to use the text from the slider instead.

                            1 Reply Last reply Reply Quote 0
                            • bendursoB
                              bendurso @Lindon
                              last edited by

                              @Lindon Or you could disable isPluginParameter checkbox, and insert a name for pluginParameterName anyway

                              LindonL 1 Reply Last reply Reply Quote 0
                              • LindonL
                                Lindon @bendurso
                                last edited by

                                @bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                                @Lindon Or you could disable isPluginParameter checkbox, and insert a name for pluginParameterName anyway

                                I think you are missing the point, this is about QoL is it not?

                                HISE Development for hire.
                                www.channelrobot.com

                                bendursoB 1 Reply Last reply Reply Quote 0
                                • bendursoB
                                  bendurso @Lindon
                                  last edited by

                                  @Lindon said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                                  I think you are missing the point, this is about QoL is it not?

                                  It makes sense hehe.

                                  @d-healey said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                                  The else isn't necessary because of the return in the clause above. Just use the if. I'd also go for an early return after the first if to avoid the nesting, but that's just me.

                                  Oh yeah, there is something wrong because Hise was exported successfully, but I can't export a plugin with this updated code.

                                  This are your suggestions? I tried it and it works, but still can't export a plugin with this.

                                  juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const
                                  {
                                      hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock);
                                  
                                      auto data = connectionList[rowNumber].get();
                                      if (!data)
                                          return {};
                                  
                                      if (columnId == ColumnId::ParameterName)
                                      {
                                          auto* processor = data->getProcessor();
                                          int parameterIndex = data->getParameter();
                                          return hise::ProcessorHelpers::getPrettyNameForAutomatedParameter(processor, parameterIndex);
                                      }
                                  
                                      if (columnId == ColumnId::CCNumber)
                                          return getData(data)->getMacroName();
                                  
                                      return {};
                                  }
                                  
                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @bendurso
                                    last edited by

                                    @bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:

                                    This are your suggestions? I tried it and it works, but still can't export a plugin with this.

                                    Yep my suggestions won't fix such issues.

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

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

                                      @d-healey Oh, the code was fine. The export error was due to me forgetting to enable Faust in the new build of HISE 🙂

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

                                      10

                                      Online

                                      1.7k

                                      Users

                                      11.8k

                                      Topics

                                      103.2k

                                      Posts