AD Droplet documentation

This commit is contained in:
Christian Colglazier 2022-01-18 21:02:02 -05:00
parent df827b5054
commit b15720944c
2 changed files with 69 additions and 3 deletions

View File

@ -114,7 +114,10 @@ ADDroplet::ADDroplet(DaisyPatch* m_patch,
sample_rate,
&m_state);
}
CreateTitleGraph();
}
void ADDroplet::CreateTitleGraph() {
title_graph = new Graph(GetScreenMax()-GetScreenMin(),
GetTitleHeight());
}
@ -212,6 +215,5 @@ void ADDroplet::UpdateStateCallback() {
State());
}
delete title_graph;
title_graph = new Graph(GetScreenMax()-GetScreenMin(),
GetTitleHeight());
CreateTitleGraph();
}

View File

@ -28,19 +28,77 @@ private:
DropletState* state;
public:
/*
* Contructor for attach decay envelope.
*
* @param m_patch pointer to patch
* @param sample_rate audio sample rate
* @param state droplet position
*/
void Init(DaisyPatch* m_patch,
float sample_rate,
DropletState* state);
void Process(DacHandle::Channel chn, DaisyPatch::GateInput gate);
/*
* Precesses input from the trigger gate
* and sends envelope data to a given CV output.
*
* @param chn
* @param gate
*/
void Process(DacHandle::Channel chn,
DaisyPatch::GateInput gate);
/*
* Returns the envelope signal level.
*
* @return envelope signal level
*/
float GetSignal();
/*
* Returns the envelope attack time.
*
* @return envelope attack time
*/
float GetAttack();
/*
* Returns the envelope decay time.
*
* @return envelope decay time
*/
float GetDecay();
/*
* Returns the envelope slope shape.
*
* @return envelope slope shape
*/
float GetCurve();
/*
* Returns the envelope amp level.
*
* @return envelope amp level
*/
float GetAmp();
/*
* Returns the envelope menu state.
*
* @return envelope menu state
*/
bool GetMenu();
/*
* Toggles envelope menu state.
*/
void ToggleCurve();
/*
* Binds envelope to menu hardware controls.
*/
void SetControls();
};
@ -50,12 +108,18 @@ private:
float sample_rate;
Graph* title_graph;
/*
* Create a new graph for the title bar.
*/
void CreateTitleGraph();
public:
/*
* Constructor for a AD droplet.
*
* @param m_patch pointer to patch
* @param m_state droplet position
* @param sample_rate audio sample rate
*/
ADDroplet(DaisyPatch* m_patch,
DropletState m_state,