Codebox Operators kink

kink

Distort a sawtooth waveform or event rate linear ramp values.

kink(x, slope): out1

Arguments:

Arguments

NameTypeDefaultDescription
xnumber

The input to kink should be a linear ramp of values that repeatedly goes from 0 to 1.

slopenumber

The multiplier that affects the slope of the output between an output (Y) value of 0 and 0.5.

After the output reaches 0.5, the output ramp will increase to 1 so that the entire output moves from 0 to 1 in the same period of time as the input. A slope multiplier of 1 produces no distortion. Slope multipliers below 1 have a slower rise to 0.5 than the input, and slope multipliers above 1 have a faster rise to 0.5 than the input.

Returns

NameTypeDescription
out1number

If the kink objects slope is less than 0.5, that value is output. Otherwise, a complementary slope is used which is equal to 0.5 at the same input value but equal to 1 when the input is 1. This creates a 'kink' in the linear ramp when the slope is not equal to 1.