MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / SynthController

Class SynthController

NeuralNote/Source/SynthController.h:15–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13class NeuralNoteAudioProcessor;
14
15class SynthController
16{
17public:
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
34private:
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected