Documentation for creating new droplets

This commit is contained in:
2022-01-23 19:11:31 -05:00
parent 618ada7a3c
commit f00479c725
5 changed files with 158 additions and 1 deletions

View File

@ -0,0 +1,20 @@
#include "template_droplet.h"
TemplateDroplet::TemplateDroplet(DaisyPatch* m_patch,
DropletState m_state) :
Droplet(m_patch,
m_state) {
}
void TemplateDroplet::Control() {}
void TemplateDroplet::Process(AudioHandle::InputBuffer in,
AudioHandle::OutputBuffer out,
size_t size) {
}
void TemplateDroplet::Draw() {
DrawName("Template");
}
void TemplateDroplet::UpdateStateCallback() {}

View File

@ -0,0 +1,50 @@
#pragma once
#ifndef DROPLETS_TEMPLATE_DROPLET_H_
#define DROPLETS_TEMPLATE_DROPLET_H_
#include "daisysp.h"
#include "daisy_patch.h"
#include "droplet.h"
#include "../util.h"
class TemplateDroplet: public Droplet {
private:
public:
/*
* Constructor for a droplet.
*
* @param m_patch pointer to patch
* @param m_state droplet position
*/
TemplateDroplet(DaisyPatch*, DropletState);
/*
* 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();
};
#endif // DROPLETS_TEMPLATE_DROPLET_H_