Newer
Older
music / app / src / main / cpp / Envelope.h
@lukas lukas on 6 Aug 2022 331 bytes add envelope modulation
#ifndef MUSIC_ENVELOPE_H
#define MUSIC_ENVELOPE_H

#include <cstdint>

class Envelope;

class Envelope {
private:
    uint32_t bufferSize = 0;
    float *buffer;
public:
    float attack, delay, sustain, release;
    float value = 1;

    void startNote();

    void endNote();

    float *render(uint32_t sampleCount);
};


#endif