equal

Equal temperament 12-tone tuning. This is the standard tuning.
Author: Johannes Taelman
License: BSD
Github: jt/tuning/equal.axo

Inlets

frac32 detune

Outlets

None

Parameters

frac32.s.map.pitch reference C tuning

Declaration
static const uint32_t LENGTHPOW = 4;
static const uint32_t LENGTH = 1 << LENGTHPOW;
static const uint32_t LENGTHMASK = (1 << LENGTHPOW) - 1;
static const uint32_t BITS = 32;
static const uint32_t GAIN = 0;
int32_t array[LENGTH];
Init
int i;
for (i = 0; i < LENGTH; i++) {
  array[i] = 0;
}
Control Rate
uint32_t ref_c = mtof48k_ext_q31(param_C + inlet_detune);
array[0] = ref_c;
ref_c *= 2;
array[1] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.0594630943f)) >> 32;
array[2] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.1224620483f)) >> 32;
array[3] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.1892071150f)) >> 32;
array[4] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.2599210498f)) >> 32;
array[5] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.3348398541f)) >> 32;
array[6] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.4142135623f)) >> 32;
array[7] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.4983070768f)) >> 32;
array[8] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.5874010519f)) >> 32;
array[9] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.6817928305f)) >> 32;
array[10] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.7817974362f)) >> 32;
array[11] = ((uint64_t)ref_c * (uint32_t)((1u << 31) * 1.8877486253f)) >> 32;

Privacy

© 2024 Zrna Research