sfizz
sfizz copied to clipboard
[Feature Request] Set the maximum number of CC via CMake option
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.
As @redtide mentionned on the Discord server, generating a header file with various CMake options would be a good approach.
Mathieu.
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.
Thanks @redtide, I'll check this out a.s.a.p. and report back.
implemented in 0a8f4e0 (and fixed in 395d4ca)