remap16

Re-map 16 note values to 16 other note values. Great for drumpad controllers. Based on Simon Iten's (lokki) c-thru axis 49 remapper.
Author: David Bax
License: BSD
Github: fretnz/math/remap16.axo

Inlets

frac32 input

Outlets

frac32 output

Parameters

int32 in1

int32 out1

int32 in2

int32 out2

int32 in3

int32 out3

int32 in4

int32 out4

int32 in5

int32 out5

int32 in6

int32 out6

int32 in7

int32 out7

int32 in8

int32 out8

int32 in9

int32 out9

int32 in10

int32 out10

int32 in11

int32 out11

int32 in12

int32 out12

int32 in13

int32 out13

int32 in14

int32 out14

int32 in15

int32 out15

int32 in16

int32 out16

Control Rate
int32_t note = (inlet_in >> 21) + 64;
int32_t read = (inlet_in >> 21) + 64;

if (read == param_in1)
  note = param_out1;
if (read == param_in2)
  note = param_out2;
if (read == param_in3)
  note = param_out3;
if (read == param_in4)
  note = param_out4;
if (read == param_in5)
  note = param_out5;
if (read == param_in6)
  note = param_out6;
if (read == param_in7)
  note = param_out7;
if (read == param_in8)
  note = param_out8;
if (read == param_in9)
  note = param_out9;
if (read == param_in10)
  note = param_out10;
if (read == param_in11)
  note = param_out11;
if (read == param_in12)
  note = param_out12;
if (read == param_in13)
  note = param_out13;
if (read == param_in14)
  note = param_out14;
if (read == param_in15)
  note = param_out15;
if (read == param_in16)
  note = param_out16;

outlet_out = (note - 64) << 21;

Privacy

© 2024 Zrna Research