feat: sequence editor undo/redo, collapsible browser, playhead easing

Sequence editor: undo and redo, a collapsible browser with chips, search
over sequences too, name in the header row, Beats/Seconds dropdown, Delete
beside Save. Playhead eases between poll results. Lanes keep their phase
when a step ends late, so they no longer drift. The rig's default room is
two columns of bars facing each other, and the simulator has a read-only
debug hook for the playback checks.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-17 00:28:59 +13:00
1 parent a1c8ce853b
commit 02440be55d
7 files changed
+252 -109

No files matched your search

+7 -6
View File
@@ -413,7 +413,7 @@ static cJSON *validate_room(const cJSON *raw, const char *name, char *err, size_
return room;
}
// The original rig: 16 bars of 119 LEDs in 2 columns x 8 rows, pixel 0 at the centre line
// The original rig: 16 bars of 119 LEDs in 2 columns x 8 rows, pixel 0 at the centre line (see the loop below)
static cJSON *default_room(void)
{
const int rows = 8, cols = 2, leds = 119;
@@ -430,9 +430,10 @@ static cJSON *default_room(void)
cJSON_AddNumberToObject(def, "pitch_m", pitch);
cJSON *fx = cJSON_AddObjectToObject(raw, "fixtures");
for (int i = 0; i < rows * cols; i++) {
int row = i / cols, col = i % cols;
bool reversed = col < cols / 2; // left of the centre line: runs leftwards from its right end
double left = -span / 2 + col * (length + gap);
// Bars 1-8 are the left column, top to bottom; 9-16 the right column. Pixel 0 sits at the centre line
// and the bar runs outwards from it: the left column leftwards, the right column rightwards.
int row = i % rows, col = i / rows;
bool left_col = col == 0;
char label[16], mac[18];
snprintf(label, sizeof(label), "sim-%02d", i + 1);
snprintf(mac, sizeof(mac), MAC_PREFIX ":00:00:%02x", i + 1);
@@ -440,9 +441,9 @@ static cJSON *default_room(void)
cJSON_AddStringToObject(f, "label", label);
cJSON_AddStringToObject(f, "def", "bar-119");
cJSON_AddStringToObject(f, "mac", mac);
cJSON_AddNumberToObject(f, "x", reversed ? left + length : left);
cJSON_AddNumberToObject(f, "x", left_col ? -gap / 2 : gap / 2);
cJSON_AddNumberToObject(f, "y", depth - 0.3 - (row + 0.5) * row_h);
cJSON_AddNumberToObject(f, "direction", reversed ? -90 : 90);
cJSON_AddNumberToObject(f, "direction", left_col ? -90 : 90);
}
char err[160];
cJSON *room = validate_room(raw, "default", err, sizeof(err));