Newer
Older
music / app / src / main / cpp / Instrument.h
@lukas lukas on 8 Aug 2022 412 bytes add basic sequencing
#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();
};

#endif