============================================================================== */
| 68 | /** |
| 69 | */ |
| 70 | class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public MidiInputCallback, public clap_juce_extensions::clap_properties |
| 71 | { |
| 72 | static const int MAX_ACTIVE_NOTES = 16; |
| 73 | ProcessorVoice voices[MAX_ACTIVE_NOTES]; |
| 74 | int currentNote; |
| 75 | |
| 76 | // The original DX7 had one single LFO. Later units had an LFO per note. |
| 77 | Lfo lfo; |
| 78 | |
| 79 | bool sustain; |
| 80 | bool monoMode; |
| 81 | |
| 82 | // Extra buffering for when GetSamples wants a buffer not a multiple of N |
| 83 | float extra_buf[N]; |
| 84 | int extra_buf_size; |
| 85 | |
| 86 | int currentProgram; |
| 87 | |
| 88 | /** |
| 89 | * The last time the state was save, to be able to bypass a VST host bug. |
| 90 | */ |
| 91 | long lastStateSave; |
| 92 | |
| 93 | /** |
| 94 | * Plugin fx (the filter) |
| 95 | */ |
| 96 | PluginFx fx; |
| 97 | |
| 98 | /** |
| 99 | * This flag is used in the audio thread to know if the voice has changed |
| 100 | * and needs to be updated. |
| 101 | */ |
| 102 | bool refreshVoice; |
| 103 | bool normalizeDxVelocity; |
| 104 | bool sendSysexChange; |
| 105 | |
| 106 | void processMidiMessage(const MidiMessage *msg); |
| 107 | void keydown(uint8_t chan, uint8_t pitch, uint8_t velo); |
| 108 | void keyup(uint8_t, uint8_t pitch, uint8_t velo); |
| 109 | |
| 110 | /** |
| 111 | * this is called from the Audio thread to tell |
| 112 | * to update the UI / hostdata |
| 113 | */ |
| 114 | void handleAsyncUpdate() override; |
| 115 | void initCtrl(); |
| 116 | |
| 117 | MidiMessage* nextMidi,*midiMsg; |
| 118 | bool hasMidiMessage; |
| 119 | int midiEventPos; |
| 120 | bool getNextEvent(MidiBuffer::Iterator* iter,const int samplePos); |
| 121 | |
| 122 | void handleIncomingMidiMessage(MidiInput* source, const MidiMessage& message) override; |
| 123 | uint32_t engineType; |
| 124 | |
| 125 | FmCore engineMsfa; |
| 126 | EngineMkI engineMkI; |
| 127 | EngineOpl engineOpl; |
nothing calls this directly
no outgoing calls
no test coverage detected