DetHzLH

Note dependent detune in Hz fro smooth doubling. low notes: MIDI 32 G#1 mid notes: MIDI 64 E4 high notes: MIDI 96 C7 2 -> ~4seconds 4 -> 2s 8 -> 1Hz 64 -> ~8Hz
Author: Smashed Transistors
License: LGPL
Github: tiar/tuning/DetHzLH.axo

Inlets

frac32 pitch input

Outlets

frac32 pitch

Parameters

frac32.s.map HzHigh

frac32.s.map HzMid

frac32.s.map HzLow

Control Rate
int32_t coef;
MTOFEXTENDED(-inlet_pitch, coef);
// low:  32
// mid:  64
// high: 96

int32_t a = __USAT(inlet_pitch + (32 << 21),
                   27); //-32..96 q21 clipped to 0 64 q21 ie 0,1 q27
int32_t f;
if (a < (32 << 21))
  f = ___SMMLA(param_HzMid - param_HzLow, a << 1, param_HzLow >> 5) << 5;
else
  f = ___SMMLA(param_HzHigh - param_HzMid, (a - (32 << 21)) << 1,
               param_HzMid >> 5)
      << 5;
outlet_pitch = ___SMMLA(coef, f, inlet_pitch);

Privacy

© 2024 Zrna Research