Sequencer outline

This commit is contained in:
2022-02-01 20:03:56 -05:00
parent 0db942e9c4
commit d5f2a5521b
6 changed files with 102 additions and 5 deletions

View File

@ -0,0 +1,25 @@
#include "sequencer_droplet.h"
SequencerDroplet::SequencerDroplet(DaisyPatch* m_patch,
DropletState m_state,
float sample_rate) :
Droplet(m_patch,
m_state) {
}
SequencerDroplet::~SequencerDroplet() {}
void SequencerDroplet::Control() {}
void SequencerDroplet::Process(AudioHandle::InputBuffer in,
AudioHandle::OutputBuffer out,
size_t size) {
}
void SequencerDroplet::Draw() {
DrawName("Sequencer");
}
void SequencerDroplet::UpdateStateCallback() {}
void SequencerDroplet::SetControls() {}

View File

@ -0,0 +1,66 @@
#pragma once
#ifndef DROPLETS_SEQUENCER_DROPLET_H_
#define DROPLETS_SEQUENCER_DROPLET_H_
#include "daisysp.h"
#include "daisy_patch.h"
#include "droplet.h"
#include "../util.h"
class SequencerDroplet: public Droplet {
private:
int sequence_length = 32;
int step = 0;
float swquence[32] = { 0.0f };
public:
/*
* Constructor for a droplet.
*
* @param m_patch pointer to patch
* @param m_state droplet position
* @param sample_rate audio sample rate
*/
SequencerDroplet(DaisyPatch* m_patch,
DropletState m_state,
float sample_rate);
/*
* Destructor for sequencer droplet.
*/
~SequencerDroplet();
/*
* Processes user controls and inputs.
*/
void Control();
/*
* Processes audio input and outputs.
*
* @param in the audio inputs for the patch
* @param out the audio outputs for the patch
* @param size the number of inputs and outputs
*/
void Process(AudioHandle::InputBuffer in,
AudioHandle::OutputBuffer out,
size_t size);
/*
* Processes information to be shown on the display.
*/
void Draw();
/*
* Runs when droplet state is updated.
*/
void UpdateStateCallback();
/*
* Set up the controls for the droplet.
*/
void SetControls();
};
#endif // DROPLETS_SEQUENCER_DROPLET_H_