Newer
Older
music / app / src / main / cpp / Instrument.h
@lukas lukas on 6 Aug 2022 427 bytes add envelope modulation
#ifndef MUSIC_INSTRUMENT_H
#define MUSIC_INSTRUMENT_H

class Instrument;

#include "SineWave.h"
#include "AudioHost.h"
#include "Envelope.h"

class Instrument {
public:
    Instrument(AudioHost *host);

    Envelope *const envelope = new Envelope();
    SineWave *const wave = new SineWave();

    void render(float *buffer, uint32_t count);

    void startNote(float frequency);

    void endNote(float frequency);
};

#endif