[refactor]: trigger-process-release therms

This commit is contained in:
2023-09-07 16:39:45 +04:00
parent c50a8335d7
commit f9ad4d844b
6 changed files with 37 additions and 37 deletions

View File

@@ -41,17 +41,17 @@ void Synth::apply_effects() {
void Synth::trigger_note_on_effects() {
for (Effect* effect : m_effects) {
effect->OnSetNote();
effect->Trigger();
}
}
void Synth::untrigger_note_on_effects() {
for (Effect* effect : m_effects) {
effect->OnUnsetNote();
effect->Release();
}
}
void Synth::TriggerNote(Note input) {
void Synth::Trigger(Note input) {
int semitone_shift = KeyBoard::GetSemitoneShift(input.name);
float hz = KeyBoard::GetHzBySemitone(semitone_shift);
@@ -63,13 +63,13 @@ void Synth::TriggerNote(Note input) {
trigger_note_on_effects();
}
void Synth::ProduceSound() {
void Synth::Process() {
get_note();
apply_effects();
}
// todo: rename to something like untrigger note
void Synth::StopSound() {
void Synth::Release() {
zero_signal();
is_note_triggered = false;
untrigger_note_on_effects();