示例#1
0
void ParameterRamper::init() {
    /*
     Call this from the kernel init.
     Updates the internal value from the UI value.
     */
    setImmediate(data->uiValue);
}
示例#2
0
void ParameterRamper::startRamp(float newGoal, uint32_t duration) {
    if (duration == 0) {
        setImmediate(newGoal);
    }
    else {
        /*
         Set a new ramp.
         Assigning to inverseSlope must come before assigning to goal.
         */
        data->inverseSlope = (get() - newGoal) / float(duration);
        data->samplesRemaining = duration;
        data->goal = data->uiValue = newGoal;
    }
}
	void init() {
		setImmediate(_uiValue);
	}
示例#4
0
ParameterRamper::ParameterRamper(float value) : data(new InternalData) {
    setImmediate(value);
}
	ParameterRamper(float value) {
		setImmediate(value);
	}