Supprimer les parametres d'éxample
This commit is contained in:
parent
ca10986e54
commit
2a2202c1fd
|
@ -20,20 +20,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum Parameters {
|
enum Parameters {
|
||||||
kParameterBufferSize = 0,
|
kParameterTabletX = 0,
|
||||||
kParameterCanRequestParameterValueChanges,
|
|
||||||
kParameterTimePlaying,
|
|
||||||
kParameterTimeFrame,
|
|
||||||
kParameterTimeValidBBT,
|
|
||||||
kParameterTimeBar,
|
|
||||||
kParameterTimeBeat,
|
|
||||||
kParameterTimeTick,
|
|
||||||
kParameterTimeBarStartTick,
|
|
||||||
kParameterTimeBeatsPerBar,
|
|
||||||
kParameterTimeBeatType,
|
|
||||||
kParameterTimeTicksPerBeat,
|
|
||||||
kParameterTimeBeatsPerMinute,
|
|
||||||
kParameterTabletX,
|
|
||||||
kParameterTabletY,
|
kParameterTabletY,
|
||||||
kParameterTabletZ,
|
kParameterTabletZ,
|
||||||
kParameterTabletPressure,
|
kParameterTabletPressure,
|
||||||
|
|
|
@ -11,9 +11,10 @@ public:
|
||||||
// clear all parameters
|
// clear all parameters
|
||||||
std::memset(fParameters, 0, sizeof(float) * kParameterCount);
|
std::memset(fParameters, 0, sizeof(float) * kParameterCount);
|
||||||
|
|
||||||
// we can know some things right at the start
|
/* we can know some things right at the start
|
||||||
fParameters[kParameterBufferSize] = getBufferSize();
|
fParameters[kParameterBufferSize] = getBufferSize();
|
||||||
fParameters[kParameterCanRequestParameterValueChanges] = canRequestParameterValueChanges();
|
fParameters[kParameterCanRequestParameterValueChanges] = canRequestParameterValueChanges();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -94,7 +95,7 @@ protected:
|
||||||
parameter.ranges.max = 16777216.0f;
|
parameter.ranges.max = 16777216.0f;
|
||||||
|
|
||||||
switch (index)
|
switch (index)
|
||||||
{
|
{/*
|
||||||
case kParameterBufferSize:
|
case kParameterBufferSize:
|
||||||
parameter.name = "BufferSize";
|
parameter.name = "BufferSize";
|
||||||
parameter.symbol = "buffer_size";
|
parameter.symbol = "buffer_size";
|
||||||
|
@ -152,28 +153,28 @@ protected:
|
||||||
case kParameterTimeBeatsPerMinute:
|
case kParameterTimeBeatsPerMinute:
|
||||||
parameter.name = "TimeBeatsPerMinute";
|
parameter.name = "TimeBeatsPerMinute";
|
||||||
parameter.symbol = "time_beatsperminute";
|
parameter.symbol = "time_beatsperminute";
|
||||||
break;
|
break;*/
|
||||||
case kParameterTabletX:
|
case kParameterTabletX:
|
||||||
parameter.name = "TabletX";
|
parameter.name = "x";
|
||||||
parameter.symbol = "tablet_x";
|
parameter.symbol = "x";
|
||||||
parameter.ranges.min = 0;
|
parameter.ranges.min = 0;
|
||||||
parameter.ranges.max = 1024;
|
parameter.ranges.max = 1024;
|
||||||
break;
|
break;
|
||||||
case kParameterTabletY:
|
case kParameterTabletY:
|
||||||
parameter.name = "TabletY";
|
parameter.name = "y";
|
||||||
parameter.symbol = "tablet_y";
|
parameter.symbol = "y";
|
||||||
parameter.ranges.min = 0;
|
parameter.ranges.min = 0;
|
||||||
parameter.ranges.max = 1024;
|
parameter.ranges.max = 1024;
|
||||||
break;
|
break;
|
||||||
case kParameterTabletZ:
|
case kParameterTabletZ:
|
||||||
parameter.name = "TabletZ";
|
parameter.name = "z";
|
||||||
parameter.symbol = "tablet_z";
|
parameter.symbol = "z";
|
||||||
parameter.ranges.min = 0;
|
parameter.ranges.min = 0;
|
||||||
parameter.ranges.max = 1024;
|
parameter.ranges.max = 1024;
|
||||||
break;
|
break;
|
||||||
case kParameterTabletPressure:
|
case kParameterTabletPressure:
|
||||||
parameter.name = "TabletPressure";
|
parameter.name = "p";
|
||||||
parameter.symbol = "tablet_p";
|
parameter.symbol = "p";
|
||||||
parameter.ranges.min = 0;
|
parameter.ranges.min = 0;
|
||||||
parameter.ranges.max = 1024;
|
parameter.ranges.max = 1024;
|
||||||
break;
|
break;
|
||||||
|
@ -228,6 +229,7 @@ protected:
|
||||||
const TimePosition& timePos(getTimePosition());
|
const TimePosition& timePos(getTimePosition());
|
||||||
|
|
||||||
// set basic values
|
// set basic values
|
||||||
|
/*
|
||||||
fParameters[kParameterTimePlaying] = timePos.playing ? 1.0f : 0.0f;
|
fParameters[kParameterTimePlaying] = timePos.playing ? 1.0f : 0.0f;
|
||||||
fParameters[kParameterTimeFrame] = timePos.frame;
|
fParameters[kParameterTimeFrame] = timePos.frame;
|
||||||
fParameters[kParameterTimeValidBBT] = timePos.bbt.valid ? 1.0f : 0.0f;
|
fParameters[kParameterTimeValidBBT] = timePos.bbt.valid ? 1.0f : 0.0f;
|
||||||
|
@ -255,9 +257,10 @@ protected:
|
||||||
fParameters[kParameterTimeTicksPerBeat] = 0.0f;
|
fParameters[kParameterTimeTicksPerBeat] = 0.0f;
|
||||||
fParameters[kParameterTimeBeatsPerMinute] = 0.0f;
|
fParameters[kParameterTimeBeatsPerMinute] = 0.0f;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//il faut seulment changer un des parametres pour mettre à jour les donnés de la tablet
|
|
||||||
fParameters[kParameterTabletPressure] = 0;
|
fParameters[kParameterTabletPressure] = timePos.bbt.tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------------------
|
||||||
|
@ -271,7 +274,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
void bufferSizeChanged(uint32_t newBufferSize) override
|
void bufferSizeChanged(uint32_t newBufferSize) override
|
||||||
{
|
{
|
||||||
fParameters[kParameterBufferSize] = newBufferSize;
|
//fParameters[kParameterBufferSize] = newBufferSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -41,17 +41,17 @@ protected:
|
||||||
{
|
{
|
||||||
// some hosts send parameter change events for output parameters even when nothing changed
|
// some hosts send parameter change events for output parameters even when nothing changed
|
||||||
// we catch that here in order to prevent excessive repaints
|
// we catch that here in order to prevent excessive repaints
|
||||||
if (d_isEqual(fParameters[index], value))
|
//if (d_isEqual(fParameters[index], value))
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
fParameters[index] = value;
|
fParameters[index] = value;
|
||||||
|
|
||||||
//Lire donnés de la tablet
|
//Lire donnés de la tablet
|
||||||
tab.NewPacket();
|
tab.NewPacket();
|
||||||
fParameters[kParameterTabletX] = tab.pkt.pkX;
|
fParameters[kParameterTabletX] = static_cast<float>(tab.pkt.pkX);
|
||||||
fParameters[kParameterTabletY] = tab.pkt.pkY;
|
fParameters[kParameterTabletY] = static_cast<float>(tab.pkt.pkY);
|
||||||
fParameters[kParameterTabletZ] = tab.pkt.pkZ;
|
fParameters[kParameterTabletZ] = static_cast<float>(tab.pkt.pkZ);
|
||||||
fParameters[kParameterTabletPressure] = tab.pkt.pkNormalPressure;
|
fParameters[kParameterTabletPressure] = static_cast<float>(tab.pkt.pkNormalPressure);
|
||||||
|
|
||||||
|
|
||||||
repaint();
|
repaint();
|
||||||
|
@ -84,7 +84,7 @@ protected:
|
||||||
|
|
||||||
float x = 0.0f * fScale;
|
float x = 0.0f * fScale;
|
||||||
float y = 15.0f * fScale;
|
float y = 15.0f * fScale;
|
||||||
|
/*
|
||||||
// buffer size
|
// buffer size
|
||||||
drawLeft(x, y, "Buffer Size:");
|
drawLeft(x, y, "Buffer Size:");
|
||||||
drawRight(x, y, getTextBufInt(fParameters[kParameterBufferSize]));
|
drawRight(x, y, getTextBufInt(fParameters[kParameterBufferSize]));
|
||||||
|
@ -172,10 +172,22 @@ protected:
|
||||||
drawLeft(x, y, "BPM:");
|
drawLeft(x, y, "BPM:");
|
||||||
drawRight(x, y, getTextBufFloat(fParameters[kParameterTimeBeatsPerMinute]));
|
drawRight(x, y, getTextBufFloat(fParameters[kParameterTimeBeatsPerMinute]));
|
||||||
y += lineHeight;
|
y += lineHeight;
|
||||||
|
*/
|
||||||
drawLeft(x, y, "x:");
|
drawLeft(x, y, "x:");
|
||||||
drawRight(x, y, getTextBufFloat(fParameters[kParameterTabletX]));
|
drawRight(x, y, getTextBufFloat(fParameters[kParameterTabletX]));
|
||||||
y += lineHeight;
|
y += lineHeight;
|
||||||
|
|
||||||
|
drawLeft(x, y, "y:");
|
||||||
|
drawRight(x, y, getTextBufFloat(fParameters[kParameterTabletY]));
|
||||||
|
y += lineHeight;
|
||||||
|
|
||||||
|
drawLeft(x, y, "z:");
|
||||||
|
drawRight(x, y, getTextBufFloat(fParameters[kParameterTabletZ]));
|
||||||
|
y += lineHeight;
|
||||||
|
|
||||||
|
drawLeft(x, y, "p:");
|
||||||
|
drawRight(x, y, getTextBufFloat(fParameters[kParameterTabletPressure]));
|
||||||
|
y += lineHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void onResize(const ResizeEvent& ev) override
|
void onResize(const ResizeEvent& ev) override
|
||||||
|
|
Loading…
Reference in New Issue