1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/blumia-PineappleSynth

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
ADSRVisualizationControl.h 1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Gary Wang Отправлено 22.08.2016 18:46 46f773b
#pragma once
#include <vector>
#include "IControl.h"
class IPoint {
public:
double x;
double y;
bool operator < (const IPoint& point) const { return (this->x < point.x); };
bool operator >(const IPoint& point) const { return (this->x > point.x); };
};
class ADSRVisualizationControl : public IControl {
private:
IColor lineColor;
void initPoints();
float attack, sustain, decay, release;
IPoint startPoint, attackPoint, retainPoint, endPoint; //names should be changed.
void updatePointPosition();
protected:
double convertToGraphicX(double value);
double convertToPercentX(double value);
double convertToGraphicY(double value);
double convertToPercentY(double value);
public:
ADSRVisualizationControl(IPlugBase *pPlug, IRECT pR) : IControl(pPlug, pR),
lineColor(100, 0, 255, 0) {
initPoints();
};
~ADSRVisualizationControl() {};
void setColor(IColor color) { lineColor = color; };
void setADSR(float att, float dec, float sus, float rel);
//bool IsDirty() { return true; }; // Don't need this.
bool Draw(IGraphics *pGraphics);
};

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/blumia-PineappleSynth.git
git@api.gitlife.ru:oschina-mirror/blumia-PineappleSynth.git
oschina-mirror
blumia-PineappleSynth
blumia-PineappleSynth
master