25 lines
604 B
C++
25 lines
604 B
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include "../Resources.h"
|
|
#include "../Params.h"
|
|
|
|
namespace serum
|
|
{
|
|
|
|
// ===========================================================================
|
|
// ADSR curve preview.
|
|
// ===========================================================================
|
|
class EnvelopeDisplay : public juce::Component
|
|
{
|
|
public:
|
|
void setParams (float attack, float decay, float sustain, float release, float curve);
|
|
|
|
void paint (juce::Graphics& g) override;
|
|
|
|
private:
|
|
float attack = 0.05f, decay = 0.25f, sustain = 0.7f, release = 0.3f, curve = 0.5f;
|
|
};
|
|
|
|
} // namespace serum
|