wave creator 32

wavetable creator.hit 'saw' 'sine' or 'square' to fill with an initial function. tables are accesible from the 'outside',if you reference the object's name with table/read and such.
Author: Robert Schirmer
License: BSD
Github: rbrt/data/wave creator 32.axo

Inlets

None

Outlets

None

Parameters

bool32.mom saw

bool32.mom sine

bool32.mom square

frac32.s.mapvsl b0

frac32.s.mapvsl b1

frac32.s.mapvsl b2

frac32.s.mapvsl b3

frac32.s.mapvsl b4

frac32.s.mapvsl b5

frac32.s.mapvsl b6

frac32.s.mapvsl b7

frac32.s.mapvsl b8

frac32.s.mapvsl b9

frac32.s.mapvsl b10

frac32.s.mapvsl b11

frac32.s.mapvsl b12

frac32.s.mapvsl b13

frac32.s.mapvsl b14

frac32.s.mapvsl b15

frac32.s.mapvsl b16

frac32.s.mapvsl b17

frac32.s.mapvsl b18

frac32.s.mapvsl b19

frac32.s.mapvsl b20

frac32.s.mapvsl b21

frac32.s.mapvsl b22

frac32.s.mapvsl b23

frac32.s.mapvsl b24

frac32.s.mapvsl b25

frac32.s.mapvsl b26

frac32.s.mapvsl b27

frac32.s.mapvsl b28

frac32.s.mapvsl b29

frac32.s.mapvsl b30

frac32.s.mapvsl b31

Declaration
static const uint32_t LENGTHPOW = 5;
static const uint32_t LENGTH = 1 << 5;
static const uint32_t LENGTHMASK = (1 << 5) - 1;
static const uint32_t BITS = 32;
static const uint32_t GAIN = 0;
int32_t array[LENGTH];

bool trig;
Control Rate
array[0] = param_b0;
array[1] = param_b1;
array[2] = param_b2;
array[3] = param_b3;
array[4] = param_b4;
array[5] = param_b5;
array[6] = param_b6;
array[7] = param_b7;
array[8] = param_b8;
array[9] = param_b9;
array[10] = param_b10;
array[11] = param_b11;
array[12] = param_b12;
array[13] = param_b13;
array[14] = param_b14;
array[15] = param_b15;
array[16] = param_b16;
array[17] = param_b17;
array[18] = param_b18;
array[19] = param_b19;
array[20] = param_b20;
array[21] = param_b21;
array[22] = param_b22;
array[23] = param_b23;
array[24] = param_b24;
array[25] = param_b25;
array[26] = param_b26;
array[27] = param_b27;
array[28] = param_b28;
array[29] = param_b29;
array[30] = param_b30;
array[31] = param_b31;

if (param_saw && (!trig)) {
  trig = 1;
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b0],
                     -134217728.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b1],
                     -125558520.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b2],
                     -116899312.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b3],
                     -108240104.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b4],
                     -99580896.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b5],
                     -90921688.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b6],
                     -82262480.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b7],
                     -73603272.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b8],
                     -64944060.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b9],
                     -56284852.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b10],
                     -47625644.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b11],
                     -38966436.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b12],
                     -30307228.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b13],
                     -21648020.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b14],
                     -12988812.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b15],
                     -4329604.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b16],
                     4329604.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b17],
                     12988812.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b18],
                     21648020.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b19],
                     30307228.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b20],
                     38966436.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b21],
                     47625644.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b22],
                     56284852.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b23],
                     64944060.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b24],
                     73603272.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b25],
                     82262480.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b26],
                     90921688.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b27],
                     99580896.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b28],
                     108240104.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b29],
                     116899312.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b30],
                     125558520.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b31],
                     134217728.000, 0xFFFD);
}

if (param_sine && (!trig)) {
  trig = 1;
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b0], 0.000,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b1],
                     26183818.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b2],
                     51361464.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b3],
                     74565432.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b4],
                     94904064.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b5],
                     111595800.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b6],
                     123999224.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b7],
                     131637712.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b8],
                     134217728.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b9],
                     131640136.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b10],
                     124003984.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b11],
                     111602712.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b12],
                     94912864.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b13],
                     74575776.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b14],
                     51372956.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b15],
                     26196014.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b16], 12436.267,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b17],
                     -26171620.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b18],
                     -51349976.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b19],
                     -74555096.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b20],
                     -94895272.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b21],
                     -111588896.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b22],
                     -123994464.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b23],
                     -131635280.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b24],
                     -134217728.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b25],
                     -131642560.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b26],
                     -124008744.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b27],
                     -111609624.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b28],
                     -94921656.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b29],
                     -74586112.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b30],
                     -51384444.000, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b31],
                     -26208212.000, 0xFFFD);
}

if (param_square && (!trig)) {
  trig = 1;
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b0], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b1], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b2], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b3], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b4], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b5], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b6], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b7], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b8], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b9], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b10], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b11], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b12], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b13], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b14], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b15], 134217728,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b16],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b17],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b18],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b19],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b20],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b21],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b22],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b23],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b24],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b25],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b26],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b27],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b28],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b29],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b30],
                     -134217728, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_b31],
                     -134217728, 0xFFFD);
}

if (!param_sine && !param_saw && !param_square)
  trig = 0;

Privacy

© 2024 Zrna Research