sfizz icon indicating copy to clipboard operation
sfizz copied to clipboard

[Feature Request] Set the maximum number of CC via CMake option

Open mathieugarcia opened this issue 1 year ago • 1 comments

Hi!

For my project, I extensively rely on CCs to manipulate values from my GUI.

Having possibly 128+ regions, with each region having 4 CCs, adding to that the global filters / envelopes, I reach the default 512 limit set in Config.h:

constexpr uint16_t numCCs { 512 };

Setting the maximum number of CCs via a CMake option would be a good way to change this limit without having to edit the Config.h and CMakeLists.tx manually. There's already a SFIZZ_NUM_CC variable set in CMake but it is used in a static assert to ensure the CMake variable and sfz::config::numCCs value are identical.

Thank you !

Mathieu.

mathieugarcia avatar Sep 06 '22 07:09 mathieugarcia

As @redtide mentionned on the Discord server, generating a header file with various CMake options would be a good approach.

Mathieu.

mathieugarcia avatar Sep 07 '22 12:09 mathieugarcia

There should be now the possibility to do this. I've renamed SFIZZ_NUM_CC to MIDI_CC_MAX and tested if it works only in code, not in a real use case. Let me know if this works for you, though this might be managed in some way in plugins as some custom feature.

redtide avatar May 08 '23 14:05 redtide

Thanks @redtide, I'll check this out a.s.a.p. and report back.

mathieugarcia avatar May 10 '23 17:05 mathieugarcia

implemented in 0a8f4e0 (and fixed in 395d4ca)

redtide avatar May 20 '23 18:05 redtide