6HrmShape

Harmonic sine morph shaper. Asks lots of cpu, but very nice for drones.
Author: Remco van der Most
License: BSD
Github: sss/osc/6HrmShape.axo

Inlets

int32 harmonic morph Stepsize 1

int32 harmonic morph Stepsize 2

int32 harmonic morph Stepsize 3

int32 harmonic morph Stepsize 4

int32 harmonic morph Stepsize 5

int32 harmonic morph Stepsize 6

int32 harmonic max Range 1

int32 harmonic max Range 2

int32 harmonic max Range 3

int32 harmonic max Range 4

int32 harmonic max Range 5

int32 harmonic max Range 6

int32 harmonic minimum (root=1)

frac32buffer oscillator phasor input

frac32 Harmonic position 1

frac32 Harmonic position 2

frac32 Harmonic position 3

frac32 Harmonic position 4

frac32 Harmonic position 5

frac32 Harmonic position 6

Outlets

frac32buffer o1

Declaration
int32_t a1;
int32_t b1;
int32_t c1;
int32_t d1;
int32_t r11;
int32_t r21;
int32_t s11;
int32_t s21;

int32_t a2;
int32_t b2;
int32_t c2;
int32_t d2;
int32_t r12;
int32_t r22;
int32_t s12;
int32_t s22;

int32_t a3;
int32_t b3;
int32_t c3;
int32_t d3;
int32_t r13;
int32_t r23;
int32_t s13;
int32_t s23;

int32_t a4;
int32_t b4;
int32_t c4;
int32_t d4;
int32_t r14;
int32_t r24;
int32_t s14;
int32_t s24;

int32_t a5;
int32_t b5;
int32_t c5;
int32_t d5;
int32_t r15;
int32_t r25;
int32_t s15;
int32_t s25;

int32_t a6;
int32_t b6;
int32_t c6;
int32_t d6;
int32_t r16;
int32_t r26;
int32_t s16;
int32_t s26;

int32_t x1;
int32_t x2;
int32_t x3;
int32_t x4;
int32_t x5;
int32_t x6;
Control Rate
c1 = (inlet_h1 - ((inlet_h1 >> 21) << 21));
d1 = ((1 << 21) - c1);
s11 = (inlet_Min + ((inlet_h1 >> 21) * inlet_s1 & ((inlet_r1)-1)));
s21 = (inlet_Min + (((inlet_h1 >> 21) + 1) * inlet_s1 & ((inlet_r1)-1)));

c2 = (inlet_h2 - ((inlet_h2 >> 21) << 21));
d2 = ((1 << 21) - c2);
s12 = (inlet_Min + ((inlet_h2 >> 21) * inlet_s2 & ((inlet_r2)-1)));
s22 = (inlet_Min + (((inlet_h2 >> 21) + 1) * inlet_s2 & ((inlet_r2)-1)));

c3 = (inlet_h3 - ((inlet_h3 >> 21) << 21));
d3 = ((1 << 21) - c3);
s13 = (inlet_Min + ((inlet_h3 >> 21) * inlet_s3 & ((inlet_r3)-1)));
s23 = (inlet_Min + (((inlet_h3 >> 21) + 1) * inlet_s3 & ((inlet_r3)-1)));

c4 = (inlet_h4 - ((inlet_h4 >> 21) << 21));
d4 = ((1 << 21) - c4);
s14 = (inlet_Min + ((inlet_h4 >> 21) * inlet_s4 & ((inlet_r4)-1)));
s24 = (inlet_Min + (((inlet_h4 >> 21) + 1) * inlet_s4 & ((inlet_r4)-1)));

c5 = (inlet_h5 - ((inlet_h5 >> 21) << 21));
d5 = ((1 << 21) - c5);
s11 = (inlet_Min + ((inlet_h1 >> 21) * inlet_s1 & ((inlet_r1)-1)));
s21 = (inlet_Min + (((inlet_h1 >> 21) + 1) * inlet_s1 & ((inlet_r1)-1)));

c6 = (inlet_h6 - ((inlet_h6 >> 21) << 21));
d6 = ((1 << 21) - c6);
s11 = (inlet_Min + ((inlet_h1 >> 21) * inlet_s1 & ((inlet_r1)-1)));
s21 = (inlet_Min + (((inlet_h1 >> 21) + 1) * inlet_s1 & ((inlet_r1)-1)));
Audio Rate
a1 = inlet_phase * s11;
b1 = inlet_phase * s21;
SINE2TINTERP(a1 << 5, r11)
SINE2TINTERP(b1 << 5, r21)
x1 = (___SMMUL((r11), (d1 << 7) / ((s11 - 1) / 2 + 1)) +
      ___SMMUL((r21), (c1 << 7)) / ((s21 - 1) / 2 + 1)) >>
     2;

a2 = inlet_phase * s12;
b2 = inlet_phase * s22;
SINE2TINTERP(a2 << 5, r12)
SINE2TINTERP(b2 << 5, r22)
x2 = (___SMMUL((r12), (d2 << 7) / ((s12 - 1) / 2 + 1)) +
      ___SMMUL((r22), (c2 << 7)) / ((s22 - 1) / 2 + 1)) >>
     2;

a3 = inlet_phase * s13;
b3 = inlet_phase * s23;
SINE2TINTERP(a3 << 5, r13)
SINE2TINTERP(b3 << 5, r23)
x3 = (___SMMUL((r13), (d3 << 7) / ((s13 - 1) / 2 + 1)) +
      ___SMMUL((r23), (c3 << 7)) / ((s23 - 1) / 2 + 1)) >>
     2;

a4 = inlet_phase * s14;
b4 = inlet_phase * s24;
SINE2TINTERP(a4 << 5, r14)
SINE2TINTERP(b4 << 5, r24)
x4 = (___SMMUL((r14), (d4 << 7) / ((s14 - 1) / 2 + 1)) +
      ___SMMUL((r24), (c4 << 7)) / ((s24 - 1) / 2 + 1)) >>
     2;

a5 = inlet_phase * s15;
b5 = inlet_phase * s25;
SINE2TINTERP(a5 << 5, r15)
SINE2TINTERP(b5 << 5, r25)
x5 = (___SMMUL((r15), (d5 << 7) / ((s15 - 1) / 2 + 1)) +
      ___SMMUL((r25), (c5 << 7)) / ((s25 - 1) / 2 + 1)) >>
     2;

a6 = inlet_phase * s16;
b6 = inlet_phase * s26;
SINE2TINTERP(a6 << 5, r16)
SINE2TINTERP(b6 << 5, r26)
x6 = (___SMMUL((r16), (d6 << 7) / ((s16 - 1) / 2 + 1)) +
      ___SMMUL((r26), (c6 << 7)) / ((s26 - 1) / 2 + 1)) >>
     2;

outlet_o1 = x1 + x2 + x3 + x4 + x5 + x6;

Privacy

© 2024 Zrna Research