mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-07-04 19:32:01 +00:00
Documentation for creating new droplets
This commit is contained in:
20
src/droplets/template_droplet.cpp
Normal file
20
src/droplets/template_droplet.cpp
Normal 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() {}
|
50
src/droplets/template_droplet.h
Normal file
50
src/droplets/template_droplet.h
Normal 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_
|
Reference in New Issue
Block a user