From 432265a0102c4d9a2364ffc05dd2a3fd2cae591a Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 8 Mar 2025 21:39:33 +0100 Subject: [PATCH] add macro control struct --- synth/tx_macro.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 synth/tx_macro.h diff --git a/synth/tx_macro.h b/synth/tx_macro.h new file mode 100644 index 0000000..f3936f0 --- /dev/null +++ b/synth/tx_macro.h @@ -0,0 +1,22 @@ +#include + +const size_t NUM_PARAMS = 128; + +// Define the bitmask flags for different controls +enum ControlFlags { + OP1_ENVELOPE_ATTACK1 = 0, + + NUM_FLAGS = 128 +}; + +namespace trnr { + struct tx_macro { + float range_min; + float range_max; + float exponent; + std::bitset control_flags; // bitset flags indicating which parameters this control affects + + tx_macro(float _range_min, float _range_max, float _exponent, const std::bitset& _flags) + : range_min(_range_min), range_max(_range_max), exponent(_exponent), control_flags(_flags) {} + } +} \ No newline at end of file