private void Padsys_Load(object sender, EventArgs e) { generateButtons(); // presuming we have already connected... for (int i = 0; i < num_colourRows; i++) { ColourExecRow.writeLowlightToRow(lInt, ColourExecRow.colours, i); } }
private void keyPressedEvent(object sender, LaunchpadKeyEventArgs e) { if (e.GetY() < num_colourRows && e.GetY() >= 0) { if (e.GetX() < 8) { // this is a coloured exec row, assuming row -1 and column 8 are not part of the selection ColourExecRow.writeLowlightToRow(lInt, ColourExecRow.colours, e.GetY()); // write low_light to entire row } else { // end group selection button } lInt.setLED(e.GetX(), e.GetY(), ColourExecRow.colours[e.GetX()].highlight); } else { lInt.setLED(e.GetX(), e.GetY(), ColourExecRow.colours[0].highlight); // white for non-colour rows } if (e.GetX() == 8) { osc.Send(new OscMessage($"/rpc", "3H")); } int oscX = e.GetX() + 2; if (oscX == 10) { oscX = 1; // shift the end circle buttons to the front } else { oscX++; // otherwise shift +1 to ignore the soft pallete } int oscY = e.GetY() + 1; osc.Send(new OscMessage($"/exec/{textBox_execPage.Text}/{oscX + oscY * 10}", 1)); // updated to increments of 10 }