bool32 i1
bool32 i2
bool32 i3
bool32 i4
bool32 i5
bool32 i6
bool32 i7
bool32 i8
bool32.pulse trg
int32 repeat
int trg[8];
int cnt, i, repeat;
for (i = 0; i < 8; i++) {
trg[i] = 0;
}
int in[8];
outlet_trg = 0;
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;
int sum = 0;
for (i = 0; i < 8; i++) {
if (in[i] > 0) {
trg[i] = 1;
}
sum += trg[i];
}
if (sum > 7) {
repeat += 1;
if (repeat == param_repeat) {
repeat = 0;
for (i = 0; i < 8; i++) {
trg[i] = 0;
}
outlet_trg = 1;
}
}