Skip to content

Move to JUCE 8 and bump dependencies#27

Open
sudara wants to merge 5 commits intoCrushedPixel:mainfrom
sudara:juce8
Open

Move to JUCE 8 and bump dependencies#27
sudara wants to merge 5 commits intoCrushedPixel:mainfrom
sudara:juce8

Conversation

@sudara
Copy link
Copy Markdown

@sudara sudara commented Dec 11, 2025

I'm considering using listParameters for documentation / CI so got things up and running again on JUCE 8.

A couple compatibility changes were needed.

Comment thread Source/ListParametersCommand.cpp
std::cout << indent << "Values: ";

if (auto valueStrings = param->getAllValueStrings(); !valueStrings.isEmpty()) {
auto valueStrings = param->getNumSteps() < 50 ? param->getAllValueStrings() : juce::StringArray();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JUCE now has an assertion in getAllValueStrings which fires if you call it on a float parameter... This is a mildly awkward workaround to determine whether it's "worth" printing out all values (if there are 50 or more, then it won't).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that explains this? I always like to have non-obvious code like this explained because I'm sure people will wonder this in the future when going through the code!

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, if you add a comment explaining this to the source code I can merge :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there. I came across the same thing. JUCE actually has a couple of functions for this. Instead of setting the limit to 50, you can use if (param->isDiscrete()) and since VST3 doesn't give anything for getAllValueStrings(), you can steal and adapt getDiscreteValueStrings() from the AU wrapper in the JUCE codebase.
What would be the best way to submit a PR to show you this solution? Not sure if I can PR into Sudara's PR!

@AdamVenn
Copy link
Copy Markdown
Collaborator

I think this PR has been resolved by merging my fork. @sudara may I close?

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.

3 participants