polyphony checkpoint
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
|
||||
#include "Voice.hpp"
|
||||
|
||||
Voice::Voice(ConfigService* config, LoggerService* logger) :
|
||||
config_(config), logger_(logger) {
|
||||
|
||||
instrument_ = Instrument(config_, logger_);
|
||||
|
||||
}
|
||||
|
||||
void Voice::noteOn(uint8_t midiNote, float velocity) {
|
||||
|
||||
note_ = midiNote;
|
||||
instrument_.noteOn(noteToFrequency(midiNote), velocity);
|
||||
|
||||
}
|
||||
|
||||
void Voice::noteOff() {
|
||||
|
||||
instrument_.noteOff();
|
||||
|
||||
}
|
||||
|
||||
bool Voice::isActive() {
|
||||
|
||||
return instrument_.isActive();
|
||||
|
||||
}
|
||||
|
||||
float Voice::process(bool& scopeTrigger) {
|
||||
|
||||
return instrument_.process(scopeTrigger);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user