| 13 | class NeuralNoteAudioProcessor; |
| 14 | |
| 15 | class SynthController |
| 16 | { |
| 17 | public: |
| 18 | SynthController(NeuralNoteAudioProcessor* inProcessor, MPESynthesiser* inMPESynth); |
| 19 | |
| 20 | void setSampleRate(double inSampleRate); |
| 21 | |
| 22 | static std::vector<MidiMessage> buildMidiEventsVector(const std::vector<Notes::Event>& inNoteEvents); |
| 23 | |
| 24 | void setNewMidiEventsVectorToUse(std::vector<MidiMessage>& inEvents); |
| 25 | |
| 26 | const MidiBuffer& generateNextMidiBuffer(int inNumSamples); |
| 27 | |
| 28 | void reset(); |
| 29 | |
| 30 | void setNewTimeSeconds(double inNewTime); |
| 31 | |
| 32 | double getCurrentTimeSeconds() const; |
| 33 | |
| 34 | private: |
| 35 | void _sanitizeVoices(); |
| 36 | |
| 37 | void _updateCurrentEventIndex(); |
| 38 | |
| 39 | bool _isNextOnOffEventNoteOff(int inMidiNote); |
| 40 | |
| 41 | NeuralNoteAudioProcessor* mProcessor; |
| 42 | MPESynthesiser* mSynth; |
| 43 | |
| 44 | MidiBuffer mMidiBuffer; |
| 45 | |
| 46 | std::vector<MidiMessage> mEvents; |
| 47 | size_t mCurrentEventIndex = 0; |
| 48 | |
| 49 | unsigned long long mCurrentSampleIndex = 0; |
| 50 | std::atomic<double> mCurrentTime = 0.0; |
| 51 | double mSampleRate = 44100; |
| 52 | }; |
| 53 | |
| 54 | #endif // SynthController_h |
nothing calls this directly
no outgoing calls
no test coverage detected