continuousCC16

Sends out a continuous stream of midi messages for 16 CC numbers starting from the "cc" attribute (0-15, 1-16, etc) Useful in combination with the "ctrlRec16" module and the doepfer MTV16 to create a 16-channel knob recorder for your modular!
Author: Remco van der Most
License: BSD
Github: sss/midi/out/continuousCC16.axo

Inlets

frac32 i1

frac32 i2

frac32 i3

frac32 i4

frac32 i5

frac32 i6

frac32 i7

frac32 i8

frac32 i9

frac32 i10

frac32 i11

frac32 i12

frac32 i13

frac32 i14

frac32 i15

frac32 i16

Outlets

None

Parameters

frac32.s.map rate

Attributes

spinner channel

spinner cc

combo device

Declaration
int ntrig;
int32_t phase;
int32_t chnl;
int32_t in[16];
Init
chnl = 0;
Control Rate
int32_t rate;
MTOFEXTENDED(param_rate, rate)
rate = rate;
// phase+=rate;

in[0] = inlet_i1;
in[1] = inlet_i2;
in[2] = inlet_i3;
in[3] = inlet_i4;
in[4] = inlet_i5;
in[5] = inlet_i6;
in[6] = inlet_i7;
in[7] = inlet_i8;
in[8] = inlet_i9;
in[9] = inlet_i10;
in[10] = inlet_i11;
in[11] = inlet_i12;
in[12] = inlet_i13;
in[13] = inlet_i14;
in[14] = inlet_i15;
in[15] = inlet_i16;
/*
if ((phase>0) && !ntrig)
{
        chnl=(chnl+1)&15;
        MidiSend3((midi_device_t) attr_device, MIDI_CONTROL_CHANGE +
(attr_channel-1),chnl,__USAT(in[chnl]>>20,7));  ntrig=1;
}
if (phase<0) {ntrig=0;}
*/
phase = (phase + 1) & 3;
if (phase == 0) {
  chnl = (chnl + 1) & 15;
  MidiSend3((midi_device_t)attr_device,
            MIDI_CONTROL_CHANGE + (attr_channel - 1), chnl,
            __USAT(in[chnl] >> 20, 7));
}

Privacy

© 2024 Zrna Research