crossDelay

crossover mixing delay line -the incoming audio is divided in three frequency bands using the freq1 (lp/bp) and freq2 (bp/hp) knobs for crossover cutoff and then spread across the taps. -each tap can be positioned anywhere in the buffer, both writing tap as well as reading tap -one writing tap can be selected as "overwriting" tap, overwriting the buffer with the respective filtered input. -the other two writing taps mix the incoming band with the buffer. -the reading taps read out different parts of the buffer, which, depending from their position, read out recorded bands (as long as they're not being overwritten by the overwriting tap). This can cause different types of delays, depending on writing and reading positions of the buffers, sometimes completely ignoring a frequency band while feeding back lots of energy from another band. Time-modulating is not (nicely) possible with this module as there is no interpolation. Though interesting rhythmic variations can be made by host-syncing the module (clock2timing module, don't forget to connect the pow-out pin to the clock2timing samplelength input)
Author: Remco van der Most
License: BSD
Github: sss/delay/crossDelay.axo

Inlets

frac32buffer in

frac32 pitch1

frac32 pitch2

frac32 time1

frac32 time2

frac32 time3

frac32 read1

frac32 read2

frac32 read3

frac32 readFeed

int32 overwrite

Outlets

frac32buffer out

int32 pow

Parameters

int32.hradio overwrite

frac32.u.map time1

frac32.u.map read1

frac32.u.map time2

frac32.u.map read2

frac32.u.map time3

frac32.u.map read3

frac32.u.map readFeed

frac32.s.map feed

frac32.s.map.pitch freq1

frac32.s.map.pitch freq2

Attributes

combo size

Declaration
static const uint32_t LENGTHPOW = (attr_size);
static const uint32_t LENGTH = (1 << attr_size);
static const uint32_t LENGTHMASK = ((1 << attr_size) - 1);
int32_t *array;
uint32_t writepos;
int32_t out;
int32_t oit;
int32_t val1;
int32_t val2;
int32_t mix;
int32_t time1;
int32_t time2;
int32_t time3;
int32_t read1;
int32_t read2;
int32_t read3;
int32_t readFeed;
Init
static int32_t _array[attr_poly][1 << attr_size]
    __attribute__((section(".sdram")));
array = &_array[parent->polyIndex][0];
int i;
writepos = 0;
for (i = 0; i < LENGTH; i++)
  array[i] = 0;
Control Rate
int32_t f1;
MTOF(param_freq1 + inlet_pitch1, f1);
int32_t f2;
MTOF(param_freq2 + inlet_pitch2, f2);
outlet_pow = attr_size;
time1 = param_time1 + inlet_time1;
time2 = param_time2 + inlet_time2;
time3 = param_time3 + inlet_time3;
read1 = param_read1 + inlet_read1;
read2 = param_read2 + inlet_read2;
read3 = param_read3 + inlet_read3;
readFeed = param_readFeed + inlet_readFeed;
int overwrite = param_overwrite + inlet_overwrite;
overwrite = overwrite - (overwrite / 3) * 3;
Audio Rate
val1 = ___SMMLA((inlet_in + ___SMMUL(param_feed << 3, out << 2) - val1) << 1,
                f1, val1);
mix = val1 - inlet_in - ___SMMUL(param_feed << 3, out << 2);
val2 = ___SMMLA((mix - val2) << 1, f2, val2);
mix = val2 - mix;

writepos = (writepos + 1) & LENGTHMASK;
if (overwrite == 0) {
  array[(writepos - (time1 >> (27 - attr_size))) & LENGTHMASK] = val1;
} else {
  array[(writepos - (time1 >> (27 - attr_size))) & LENGTHMASK] += val1 >> 1;
}
if (overwrite == 1) {
  array[(writepos - (time2 >> (27 - attr_size))) & LENGTHMASK] = val2;
} else {
  array[(writepos - (time2 >> (27 - attr_size))) & LENGTHMASK] += val2 >> 1;
}
if (overwrite == 2) {
  array[(writepos - (time3 >> (27 - attr_size))) & LENGTHMASK] = mix;
} else {
  array[(writepos - (time3 >> (27 - attr_size))) & LENGTHMASK] += mix >> 1;
}

int32_t oot =
    (array[(writepos - (read1 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += (array[(writepos - (read2 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += (array[(writepos - (read3 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += ((inlet_in) >> 1);
int32_t oat =
    (array[(writepos - ((readFeed) >> (27 - attr_size))) & LENGTHMASK] >> 1);
out = out + ((oat - out) >> 1);
oit = oit + ((oot - oit) >> 1);
outlet_out = oit;

Privacy

© 2024 Zrna Research