add macro control struct

This commit is contained in:
2025-03-08 21:39:33 +01:00
parent 1220c8dba5
commit 432265a010

22
synth/tx_macro.h Normal file
View File

@@ -0,0 +1,22 @@
#include <bitset>
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<NUM_PARAMS> control_flags; // bitset flags indicating which parameters this control affects
tx_macro(float _range_min, float _range_max, float _exponent, const std::bitset<NUM_PARAMS>& _flags)
: range_min(_range_min), range_max(_range_max), exponent(_exponent), control_flags(_flags) {}
}
}