superTable

"super" wavetable oscillator like a supersaw, but then using tables loads wavetables created with the "TheCreator" module (32bit!). Asks quite a bit of cpu, but I think the sonic possibilities and the extra editable settings of the wavetables make up for that. Stackable up to 32 voices, though cpu use will reach 50%!! With 7 voices, it asks about 12% (5% more then the 7-voice supersaw).
Author: Remco van der Most
License: BSD
Github: sss/osc/superTable.axo

Inlets

frac32 detuneStack

frac32 detuneWave

frac32.bipolar pitch

frac32buffer frequency

int32 waveform

int32 waves

int32 wavestep

int32 harmonics

int32 harmstep

Outlets

frac32buffer.bipolar sine wave

Parameters

frac32.s.map.pitch root

int32 stack

int32 waveform

int32 waves

int32 wavestep

int32 harmonics

int32 harmstep

int32 maxharm

frac32.s.map detuneStack

frac32.s.map detuneWave

Attributes

objref table

Declaration
uint32_t Phase[32];
int32_t read1[32];
int32_t freq[32];
int16_t preset[32];
int i;
int32_t smooth;
int32_t Freq;
int16_t mpreset;
Control Rate
int waves = (param_waves + inlet_waves) & 31;
waves = waves > 0 ? waves : 1;
int32_t wavestep = (param_wavestep + inlet_wavestep) & 1023;
int harmstep = (param_harmstep + inlet_harmstep) & 31;
int harmonics = (param_harmonics + inlet_harmonics) & 31;
harmonics = harmonics > 0 ? harmonics : 1;
int k;
int M;

int32_t detuneStack =
    (param_detuneStack + inlet_detuneStack) / (param_stack / waves);
int32_t detuneWave = (param_detuneWave + inlet_detuneWave) / waves;

for (i = 0; i < param_stack; i++) {
  M = i * waves / param_stack;
  k = i - M * param_stack / waves;
  MTOFEXTENDED(param_root + inlet_pitch + (detuneStack >> 8) * k +
                   (detuneWave >> 8) * M,
               freq[i]);
  int HARM = ((i * harmonics / param_stack) * harmstep);
  HARM = HARM - (HARM / (param_maxharm)) * (param_maxharm);
  freq[i] = freq[i] * (1 + HARM);
  mpreset = (param_waveform + inlet_waveform) & 1023;
  preset[i] = (mpreset + (i * waves / param_stack) * wavestep) << 10;
}
int32_t volume = (1 << 31) / (1 + param_stack);
Audio Rate
int32_t sum = 0;
for (i = 0; i < param_stack; i++) {
  Freq = freq[i] + ___SMMUL(inlet_linFM << 3, freq[i] << 3);
  Phase[i] += freq[i];
  sum += attr_table.array[(((Phase[i] >> 22) & 1023) + preset[i]) &
                          attr_table.LENGTHMASK] >>
         3;
}
outlet_wave = ___SMMUL(sum << 3, volume);

Privacy

© 2024 Zrna Research