biscuitage_r

For 8 bits signal, reverse selected bits
Author: GaoTamanrasset
License: BSD
Github: gao/dist/biscuitage_r.axo

Inlets

frac32buffer Signal in

Outlets

frac32buffer Signal out

Parameters

bin12 p1

frac32.u.map noisegate

Declaration
int32_t reversebits;
int32_t tmp;
int32_t hp_freq;
int32_t val;
int32_t noisegate;
Init
reversebits = 0;
tmp = 0;
hp_freq = 0x000B29A4; // MTOF(8,176Hz)
val = 0;
Control Rate
noisegate = param_noisegate;
reversebits = param_p1 & 0xFFF;
Audio Rate
tmp = (inlet_a >> 1) + 0x04000000;     // Bipolar to unipolar signal
tmp = tmp + (noisegate >> 7);          // Noise gate
tmp = tmp ^ (reversebits << 15);       // Bitwise operation
tmp = tmp + ((reversebits / 2) << 15); // Suppress DC offset partially
tmp = (tmp - 0x04000000) << 1;         // Unipolar to bipolar

// HP filter to suppress entirely  DC offset
val = ___SMMLA((tmp - val) << 1, hp_freq, val);
outlet_b = tmp - val;

Privacy

© 2024 Zrna Research