1 #ifndef __AMUSE_SOUNDMACROSTATE_HPP__ 2 #define __AMUSE_SOUNDMACROSTATE_HPP__ 29 enum class Op : uint8_t
119 std::vector<std::pair<const unsigned char*, int>> m_pc;
121 double m_ticksPerSec;
133 bool m_inWait =
false;
134 bool m_indefiniteWait =
false;
135 bool m_keyoffWait =
false;
136 bool m_sampleEndWait =
false;
137 double m_waitCountdown;
139 int m_loopCountdown = -1;
140 int m_lastPlayMacroVid = -1;
142 bool m_useAdsrControllers;
143 uint8_t m_midiAttack;
145 uint8_t m_midiSustain;
146 uint8_t m_midiRelease;
148 uint8_t m_portamentoMode;
149 uint8_t m_portamentoType;
150 float m_portamentoTime;
155 enum class Combine : uint8_t
161 enum class VarType : uint8_t
175 Component(uint8_t midiCtrl,
float scale, Combine combine, VarType varType)
176 : m_midiCtrl(midiCtrl), m_scale(scale), m_combine(combine), m_varType(varType) {}
178 std::vector<Component> m_comps;
181 void addComponent(uint8_t midiCtrl,
float scale,
182 Combine combine, VarType varType);
188 operator bool()
const {
return m_comps.size() != 0;}
191 Evaluator m_volumeSel;
193 Evaluator m_pitchWheelSel;
194 Evaluator m_modWheelSel;
195 Evaluator m_pedalSel;
196 Evaluator m_portamentoSel;
197 Evaluator m_reverbSel;
198 Evaluator m_preAuxASel;
199 Evaluator m_preAuxBSel;
200 Evaluator m_auxAFxSel;
201 Evaluator m_auxBFxSel;
202 Evaluator m_postAuxB;
204 Evaluator m_dopplerSel;
205 Evaluator m_tremoloSel;
207 int32_t m_variables[256];
212 ObjectId macroId = 0xffff;
218 void initialize(
const unsigned char* ptr,
int step);
219 void initialize(
const unsigned char* ptr,
int step,
double ticksPerSec,
220 uint8_t midiKey, uint8_t midiVel, uint8_t midiMod);
236 #endif // __AMUSE_SOUNDMACROSTATE_HPP__
void initialize(const unsigned char *ptr, int step)
void sampleEndNotify(Voice &vox)
bool advance(Voice &vox, double dt)
void keyoffNotify(Voice &vox)