dis lphp1

Dissymetric 1st order filter type = 0: rate switched on output sign (à la Salino) type = 1: rate switched on rising/decaying (à la Ralond) Used with a square wave input it models waveshapers found in early string machines.
Author: Smashed Transistors
License: LGPL
Github: tiar/filter/dis lphp1.axo

Inlets

frac32 cutoff

frac32 cutoff

frac32buffer input

Outlets

frac32buffer low pass

frac32buffer high pass

Parameters

frac32.s.map bias

frac32.u.map freqUp

frac32.u.map freqDown

frac32.u.map type

Declaration
int32_t y, ratef, ratef2;
Init
y = ratef = ratef2 = 0;
Control Rate
int32_t rateUp, rateDown;
MTOF(param_freqUp + inlet_freqUp, rateUp);
MTOF(param_freqDown + inlet_freqDown, rateDown);
int32_t bias = param_bias >> 6;
Audio Rate
int32_t ref = ___SMMLA(inlet_in, param_type, bias) << 5;
outlet_lp = y =
    ___SMMLA((inlet_in - y) << 2, ((y < ref) ? rateUp : rateDown), y);
outlet_hp = (inlet_in - y) >> 1;

Privacy

© 2024 Zrna Research