[feat]: Oscillator fine-tune (#22)

closes #19

Reviewed-on: #22
This commit is contained in:
2023-09-17 02:26:44 +03:00
parent bb3ccc296a
commit 2b4e3cb573
16 changed files with 209 additions and 132 deletions

View File

@@ -1,9 +1,9 @@
#pragma once
#include "Effect.h"
#include "IEffect.h"
#include "Ramp.h"
#include <cstddef>
class ADSR : public Effect {
class ADSR : public IEffect {
enum ADSRState { sOff, sAttack, sDecay, sSustain, sRelease };
private:
@@ -14,11 +14,11 @@ class ADSR : public Effect {
ADSRState m_state;
Ramp* m_ramp;
void process_sample(float* sample);
bool is_attack_elapsed();
bool is_decay_elapsed();
bool is_release_elapsed();
void recheck_state();
void ProcessSample(float* sample);
bool IsAttackElapsed();
bool IsDecayElapsed();
bool IsReleaseElapsed();
void RecheckState();
public:
ADSR(/* args */);