kopia lustrzana https://github.com/jameshball/osci-render
Some tuning
rodzic
f478277d7e
commit
800952ba0b
|
@ -68,7 +68,7 @@ public:
|
|||
"Frequency",
|
||||
"Controls how many times per second the image is drawn, thereby controlling the pitch of the sound. Lower frequencies result in more-accurately drawn images, but more flickering, and vice versa.",
|
||||
"frequency",
|
||||
VERSION_HINT, 220.0, 0.0, 12000.0, 0.1
|
||||
VERSION_HINT, 220.0, 0.0, 4200.0
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
"Trace Length",
|
||||
"Defines how much of the frame is drawn per cycle. This has the effect of 'tracing' out the image from a single dot when animated. By default, we draw the whole frame, corresponding to a value of 1.0.",
|
||||
"traceLength",
|
||||
VERSION_HINT, 1.0, 0.0, 1.0, 0.01f, 0.005
|
||||
VERSION_HINT, 1.0, 0.0, 1.0, 0.001, 0.001
|
||||
)
|
||||
);
|
||||
std::shared_ptr<Effect> traceStart = std::make_shared<Effect>(
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
"Trace Start",
|
||||
"Defines how far into the frame the drawing is started at. This has the effect of 'tracing' out the image from a single dot when animated. By default, we start drawing from the beginning of the frame, so this value is 0.0.",
|
||||
"traceStart",
|
||||
VERSION_HINT, 0.0, 0.0, 1.0, 0.01f, 0.005
|
||||
VERSION_HINT, 0.0, 0.0, 1.0, 0.001, 0.001
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ void Effect::animateValues(double volume) {
|
|||
actualValues[i] = ((float)rand() / RAND_MAX) * (maxValue - minValue) + minValue;
|
||||
break;
|
||||
default:
|
||||
double weight = (parameter->smoothValueChange > 1.0 || parameter->smoothValueChange < SMOOTHING_SPEED_MIN) ? (1.0) : (parameter->smoothValueChange.load());
|
||||
double weight = (parameter->smoothValueChange > 1.0 || parameter->smoothValueChange < SMOOTHING_SPEED_MIN) ? (1.0) : (parameter->smoothValueChange.load()) * 192000 / sampleRate;
|
||||
double newValue;
|
||||
if (parameter->sidechain != nullptr && parameter->sidechain->getBoolValue()) {
|
||||
newValue = volume * (maxValue - minValue) + minValue;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <JuceHeader.h>
|
||||
#include "BooleanParameter.h"
|
||||
|
||||
#define SMOOTHING_SPEED_CONSTANT 0.0005
|
||||
#define SMOOTHING_SPEED_CONSTANT 0.0003
|
||||
#define SMOOTHING_SPEED_MIN 0.0001
|
||||
|
||||
class FloatParameter : public juce::AudioProcessorParameterWithID {
|
||||
|
@ -26,7 +26,8 @@ public:
|
|||
return label;
|
||||
}
|
||||
|
||||
// returns value in range [0, 1]
|
||||
// returns value in
|
||||
// [0, 1]
|
||||
float getNormalisedValue(float value) const {
|
||||
// clip value to valid range
|
||||
auto min = this->min.load();
|
||||
|
@ -402,5 +403,5 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
EffectParameter(juce::String name, juce::String description, juce::String id, int versionHint, float value, float min, float max, float step = 0.01, double smoothValueChange = SMOOTHING_SPEED_CONSTANT) : FloatParameter(name, id, versionHint, value, min, max, step), smoothValueChange(smoothValueChange), description(description) {}
|
||||
EffectParameter(juce::String name, juce::String description, juce::String id, int versionHint, float value, float min, float max, float step = 0.001, double smoothValueChange = SMOOTHING_SPEED_CONSTANT) : FloatParameter(name, id, versionHint, value, min, max, step), smoothValueChange(smoothValueChange), description(description) {}
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue