27class NonAudioInstrument :
public MelodicInstrument,
public ModControllable {
29 NonAudioInstrument(OutputType newType) : MelodicInstrument(newType) {
30 cachedBendRanges[BEND_RANGE_MAIN] = FlashStorage::defaultBendRange[BEND_RANGE_MAIN];
31 cachedBendRanges[BEND_RANGE_FINGER_LEVEL] = FlashStorage::defaultBendRange[BEND_RANGE_FINGER_LEVEL];
34 void renderOutput(
ModelStack* modelStack, std::span<StereoSample> buffer, int32_t* reverbBuffer,
35 int32_t reverbAmountAdjust, int32_t sideChainHitPending,
bool shouldLimitDelayFeedback,
36 bool isClipActive)
override;
38 int32_t fromMIDIChannel = 16, uint8_t velocity = 64, uint32_t sampleSyncLength = 0,
39 int32_t ticksLate = 0, uint32_t samplesLate = 0)
override;
40 int32_t doTickForwardForArp(
ModelStack* modelStack, int32_t currentPos)
final;
43 void polyphonicExpressionEventOnChannelOrNote(int32_t newValue, int32_t expressionDimension, int32_t channelOrNote,
44 MIDICharacteristic whichCharacteristic)
final;
46 void beenEdited(
bool shouldMoveToEmptySlot)
override {}
48 char const* getSlotXMLTag()
override {
return "channel"; }
49 char const* getSubSlotXMLTag()
override {
return NULL; }
51 virtual void noteOnPostArp(int32_t noteCodePostArp,
ArpNote* arpNote, int32_t noteIndex) = 0;
52 virtual void noteOffPostArp(int32_t noteCodePostArp, int32_t oldMIDIChannel, int32_t velocity,
53 int32_t noteIndex) = 0;
55 bool readTagFromFile(
Deserializer& reader,
char const* tagName)
override;
57 ModControllable* toModControllable()
override {
return this; }
58 virtual void setChannel(
int newChannel) { channel = newChannel; }
59 inline int32_t getChannel()
const {
return channel; }
61 uint8_t cachedBendRanges[2];
62 bool needsEarlyPlayback()
const override;
65 virtual void polyphonicExpressionEventPostArpeggiator(int32_t newValue, int32_t noteCodeAfterArpeggiation,
66 int32_t expressionDimension,
ArpNote* arpNote,
67 int32_t noteIndex) = 0;
69 int32_t lastMonoExpression[3]{0};
70 int32_t lastCombinedPolyExpression[3]{0};
72 int16_t lastOutputMonoExpression[3]{0};
Definition model_stack.h:231