pixel_indices = {
let pis = [];
let [center_column, center_row] = [Math.floor(img.width/2), Math.floor(img.height/2)];
let beat_counter = beat % Math.floor(img.height/2);
console.log([center_column, center_row]);
const pix_ind = (row, column) => row*img.width+column;
for (let i=0; i<4; i++) {
let r = center_row + ((Math.floor(i/2)-0.5)*2)*beat_counter;
let c = center_column + (((i%2)-0.5)*2)*beat_counter;
pis.push(pix_ind(r, c));
}
return pis;
}