mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-04-29 17:35:33 +00:00
Sequencer outline
This commit is contained in:
parent
0db942e9c4
commit
d5f2a5521b
25
src/droplets/sequencer_droplet.cpp
Normal file
25
src/droplets/sequencer_droplet.cpp
Normal 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() {}
|
66
src/droplets/sequencer_droplet.h
Normal file
66
src/droplets/sequencer_droplet.h
Normal 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_
|
10
src/main.cpp
10
src/main.cpp
@ -145,6 +145,13 @@ Droplet* GetDroplet(DropletState state,
|
||||
case MenuState::kMixer:
|
||||
return new MixerDroplet(&patch,
|
||||
state);
|
||||
case MenuState::kNoise:
|
||||
return new NoiseDroplet(&patch,
|
||||
state);
|
||||
case MenuState::kSequencer:
|
||||
return new SequencerDroplet(&patch,
|
||||
state,
|
||||
sample_rate);
|
||||
case MenuState::kVCA:
|
||||
return new VCADroplet(&patch,
|
||||
state);
|
||||
@ -152,8 +159,5 @@ Droplet* GetDroplet(DropletState state,
|
||||
return new VCODroplet(&patch,
|
||||
state,
|
||||
sample_rate);
|
||||
case MenuState::kNoise:
|
||||
return new NoiseDroplet(&patch,
|
||||
state);
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "droplets/lfo_droplet.h"
|
||||
#include "droplets/mixer_droplet.h"
|
||||
#include "droplets/noise_droplet.h"
|
||||
#include "droplets/sequencer_droplet.h"
|
||||
#include "droplets/vca_droplet.h"
|
||||
#include "droplets/vco_droplet.h"
|
||||
|
||||
|
@ -14,6 +14,7 @@ Menu::Menu(DaisyPatch* m_patch,
|
||||
head->AddItemEnd(new MenuItem(MenuState::kLFO, "LFO"));
|
||||
head->AddItemEnd(new MenuItem(MenuState::kMixer, "Mixer"));
|
||||
head->AddItemEnd(new MenuItem(MenuState::kNoise, "Noise"));
|
||||
head->AddItemEnd(new MenuItem(MenuState::kSequencer, "Sequencer"));
|
||||
head->AddItemEnd(new MenuItem(MenuState::kVCA, "VCA"));
|
||||
head->AddItemEnd(new MenuItem(MenuState::kVCO, "VCO"));
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <string>
|
||||
|
||||
enum class MenuState {kSplit, kChange, kAD, kLadderFilter,
|
||||
kLFO, kMixer, kNoise, kVCA, kVCO};
|
||||
kLFO, kMixer, kNoise, kSequencer, kVCA, kVCO};
|
||||
|
||||
class MenuItem {
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user