Skip to content

Conversation

@krskajo1
Copy link

@krskajo1 krskajo1 commented Jan 18, 2026

Hello,
this PR adds support for the missing Mustang I V2 effects (Ranger Boost, Greenbox, Orangebox, Blackbox, Big fuzz) and modulations (Wah, Touch Wah, Diatonic Pitch Shifter). The support includes default effect and effect windows.
Main change of this commit is in the ID of individual effects. It seems that they are in fact 16-bit wide, instead of current 8-bit width. This mainly influenced the function lookupEffectById, where I added second parameter uint8_t idmsb with implicit value of 0.

The newly added effects are currently appended to the bottom of the combobox list in the effect window, as their position must correspond with their value in the effects enum.

Additionally I've noticed there is a lot of duplicate code, especially in default effects and effects windows regarding knob labels. I know there might be a good reason for it, such as proper shortcut function, however, I think that by doing this line-efficiently would benefit legibility of the code and make editing it easier.
One solution I come up with and implemented for the new effects utilizes maps to store knob description for given knob like so

mapLbls["Brightness"] = UIText{
  tr("&Brightness"),
  tr("Effect's %1 \"Brightness\" dial").arg(slot.id() + 1),
  tr("Allows you to set \"Brightness\" parameter of this effect"),
  tr("Effect's %1 \"Brightness\" box").arg(slot.id() + 1),
  tr("Allows you to precisely set \"Brightness\" parameter of this effect")};

and sets for an effect

case effects::RANGER_BOOST:
  setTexts(ui.get(),
  mapLbls["Level"],
  mapLbls["Gain"],
  mapLbls["Low"],
  mapLbls["Brightness"],
  mapLbls["Disabled"],
  mapLbls["Disabled"]);
break;

Alternatively, creating a class for each effect (deriving from effect base class), which would define its labels, is also an option.

Please, let me know if you do or don't agree with the map approach and or anything in this PR and what should be changed. I will gladly make the necessary edits.
Best regards
Joe



constexpr effects lookupEffectById(std::uint8_t id)
constexpr effects lookupEffectById(std::uint8_t id, std::uint8_t idmsb=0)

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 101 lines.
@krskajo1
Copy link
Author

I realized I forgot to implement and run tests. I will implement them and update the PR.

@krskajo1 krskajo1 marked this pull request as draft January 18, 2026 14:30
@krskajo1 krskajo1 marked this pull request as ready for review January 18, 2026 14:53
@krskajo1
Copy link
Author

krskajo1 commented Jan 18, 2026

Tests and formatting corrected. This PR is now ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant