Hi, I am newbie and want to make euclidean sequencer based on this article http://archive.bridgesmathart.org/2005/bridges2005-47.pdf. I thought all day, but can not find how to sort an array like this: Dropbox - Error .
Now I have only unsorted array
void setup() {
Serial.begin(9600);
}
void loop() {
int t; //total
int g; //gate
int r; //remainder
int i;
t=13;
g=5;
unsigned int unsorted[t];
for (i=0;i<t;i++){
if (i<g){
unsorted[i] = 1;
}
else {
unsorted[i] = 0;
}
}
for (i = 0; i < t; i = i + 1) {
Serial.println(unsorted[i]);
}
delay(5000);
}