diff --git a/firmware/src/felucca.c b/firmware/src/felucca.c index 1951b01a..9d9522e5 100644 --- a/firmware/src/felucca.c +++ b/firmware/src/felucca.c @@ -38,7 +38,7 @@ #define FELUCCA_ID "FM-1_900" /* package identity (build.py: the .fwsc marker string) */ #endif #ifndef FELUCCA_VERSION -#define FELUCCA_VERSION "V10.7" /* (2026-10-31) V10.7: SEQ > EUCLID on a kit: LANE ALL first (DENSITY: a whole usable kit), a lane picked writes that lane alone; EDIT + PRESETS jumps between engines; the kit's SEQ dice plays in every genre. (2026-10-31) V10.6: SEQ > EUCLID and MODES (a euclidean pattern generator, melodies in the key) in MUTATE's place; MUTATE and SEQ TOOLS' RANDOM COOK BEAT gone. (2026-10-31) V10.5: automation thinned (a recording at the stop, the 64 when full) into holds and RAMPs. (2026-10-31) V10.4: ARRANGE / TIMELINE: OCT- deletes the row picked (DELETE ROW?). (2026-10-31) V10.3: TIMELINE: the lines between lanes soft (the block's colour, darker), the rows' edges stronger. (2026-10-31) V10.2: TIMELINE keeps the black line between lanes (only the rows touch); SAVE composes first: TIMELINE SECTIONS PROJECTS ARRANGE TOOLS USER PRESETS. (2026-10-30) V10.1: TIMELINE blocks fill the lanes (no black gaps between rows or tracks). (2026-10-30) JIANT FM V10: add15-beta6 as the new base (TIMELINE, VAR, ADD, official V16 both ways); the version history before it: the git log of the add15 line (codex/add15-private) */ +#define FELUCCA_VERSION "V10.7" /* (2026-10-31) V10.7: SEQ > EUCLID on a kit: LANE ALL first (DENSITY: a whole usable kit), a lane picked writes that lane alone; EDIT + PRESETS jumps between engines; the kit's SEQ dice plays in every genre; EUCLID's HITS exact (VARY moved them only); REC held alone and let go: UNDO (again: REDO). (2026-10-31) V10.6: SEQ > EUCLID and MODES (a euclidean pattern generator, melodies in the key) in MUTATE's place; MUTATE and SEQ TOOLS' RANDOM COOK BEAT gone. (2026-10-31) V10.5: automation thinned (a recording at the stop, the 64 when full) into holds and RAMPs. (2026-10-31) V10.4: ARRANGE / TIMELINE: OCT- deletes the row picked (DELETE ROW?). (2026-10-31) V10.3: TIMELINE: the lines between lanes soft (the block's colour, darker), the rows' edges stronger. (2026-10-31) V10.2: TIMELINE keeps the black line between lanes (only the rows touch); SAVE composes first: TIMELINE SECTIONS PROJECTS ARRANGE TOOLS USER PRESETS. (2026-10-30) V10.1: TIMELINE blocks fill the lanes (no black gaps between rows or tracks). (2026-10-30) JIANT FM V10: add15-beta6 as the new base (TIMELINE, VAR, ADD, official V16 both ways); the version history before it: the git log of the add15 line (codex/add15-private) */ #endif #if FELUCCA_OTA && !FELUCCA_FLASH #error "FELUCCA_OTA needs FELUCCA_FLASH" diff --git a/firmware/src/gen.c b/firmware/src/gen.c index e77fdc1e..a0fbfbc5 100644 --- a/firmware/src/gen.c +++ b/firmware/src/gen.c @@ -2592,11 +2592,12 @@ static const char *dice_seq(track_t *t) } gs.ba = gs.g->bass[rng() % 3u]; if (gmut.lead == LD_NONE) gmut.lead = LD_HOOK; /* (asked for: a lead) */ - lead0 = gmut.lead; arp0 = gmut.arp[0]; arp1 = gmut.arp[1]; pads0 = gmut.pads; drum0 = gmut.drum; if (r == RL_DRUM && (gmut.drum >= DM_NONE || gmut.drum == DM_SPARSE)) /* (V10.7) a genre without drums * (NEO CLASSIC) or AMBIENT's three hits: the kit's dice seemed - * to do nothing; a map that plays */ + * to do nothing; a map that plays (before drum0: + * the retries' other maps are its neighbours) */ gmut.drum = (uint8_t)(rng() % DM_SPARSE); + lead0 = gmut.lead; arp0 = gmut.arp[0]; arp1 = gmut.arp[1]; pads0 = gmut.pads; drum0 = gmut.drum; for (i = 0; i < GP_N; i++) if (!gs.amt[i]) gs.amt[i] = 60; gs.role[k] = (uint8_t)r; gs.act[r] = 1; gs.trk_of[r] = (uint8_t)k; len = (uint32_t)t->p[P_SLEN]; @@ -2606,12 +2607,18 @@ static const char *dice_seq(track_t *t) latch_drop_req |= (uint8_t)(1u << k); gs.vary = 1; for (cnt = 0; cnt < 12u; cnt++) { /* (eleven more tries at most) */ - uint32_t j, same = 0; + uint32_t j, same = 0, hits = 0; for (i = 0; i < NSTEP; i++) step_clear(&t->step[i]); gen_role(t, k, len); h = dsq_shape(t, now, len); for (i = 0; i < len && plen == len; i++) same += now[i] == was[i]; + for (i = 0; i < len; i++) hits += t->step[i].time == ST_NOTE && t->step[i].hit; for (j = 0; j < 4u && dsq_last[k][j] != h; j++) {} + if (r == RL_DRUM && hits < len / 8u + 2u && cnt < 11u) { /* (V10.7) a kit's dice with a beat in it: AMBIENT's + * energy left three hits; another map */ + gmut.drum = (uint8_t)(rng() % DM_SPARSE); + continue; + } if (j == 4u && same * 10u < len * 9u && (cnt == 11u || !dsq_near(k, now, len))) break; gp.seed = (uint16_t)(rng() % 10000u); gs.ba = gs.g->bass[rng() % 3u]; diff --git a/firmware/src/ui_euclid.c b/firmware/src/ui_euclid.c index 8d3e9b7a..bce8c39e 100644 --- a/firmware/src/ui_euclid.c +++ b/firmware/src/ui_euclid.c @@ -55,7 +55,8 @@ static eu_t *eu_of(uint32_t k) return e; } -/* VARY on hits on[] of n steps (v 0..100); len[] (0: none) the steps each note holds */ +/* VARY on hits on[] of n steps (v 0..100): hits moved a step, never added or dropped (V10.7: HITS is what + * sounds); len[] (0: none) the steps each note holds */ static void eu_vary(uint8_t *on, uint8_t *len, uint32_t n, uint32_t v) { uint32_t i, g; @@ -64,9 +65,8 @@ static void eu_vary(uint8_t *on, uint8_t *len, uint32_t n, uint32_t v) if (eu_ch(v * (i >= n / 2u ? 7u : 4u) / 10u)) { /* a step on (to the offbeat mostly) or back */ uint32_t j = (i & 1u) ? (eu_ch(50) ? i + 1u : i - 1u) : (eu_ch(60) ? i + 1u : i - 1u); if (j > 0u && j < n && !on[j]) { on[i] = 0; on[j] = 2; } - } else if ((i & 3u) && eu_ch(v * 18u / 100u)) on[i] = 0; + } } - for (i = 3; i < n; i += 4u) if (!on[i] && eu_ch(v * 22u / 100u)) on[i] = 1; /* a pickup */ for (i = 0; len && i < n; i++) { len[i] = 1; if (!on[i]) continue; diff --git a/firmware/src/ui_layer.c b/firmware/src/ui_layer.c index 614aeb99..64ae031b 100644 --- a/firmware/src/ui_layer.c +++ b/firmware/src/ui_layer.c @@ -152,6 +152,8 @@ static void layer_masks(void) static void layer_arm(uint32_t pressed, uint32_t now) { uint32_t l; + if (ui.ly == LAYER_REC && (pressed & ~ly_bit(LAYER_REC))) + lys.used = 1; /* (V10.7) REC held and another button: no UNDO at its let go */ if (ui.ly) return; if (fx_lock && (pressed & ly_bit(LAYER_FX))) { /* (0.6.44) FX pressed again: the lock off, nothing else */ @@ -322,6 +324,7 @@ static void mom_poll(void) /* every pass */ } } +static void undo_ui(void); /* the armed layer lets go (its button up): FX's macros snap back (FX LATCH: they stay); one that * opened, or a combo: KNOB 1..4 quiet for a while (#39: the knob still turning is not the page's) */ static void layer_let_go(uint32_t quiet) @@ -343,6 +346,11 @@ static void layer_let_go(uint32_t quiet) quiet = 0; ui.force = 1; } + if (ui.ly == LAYER_REC && (ui.ly_t0 & LY_OPEN) && !(ui.ly_t0 & (LY_DEAD | LY_COMBO)) && !lys.used && + layer_allowed()) { /* (V10.7) REC held alone and let go: UNDO (again: REDO) */ + undo_ui(); + quiet = 0; + } if (ui.ly == LAYER_MACRO && (ui.ly_t0 & LY_OPEN) && !(ui.ly_t0 & LY_DEAD)) { /* (JIANT 0.4) MACRO opened, let go: */ mac_latch = 1; /* latched (its knobs at once: no quiet time) */ quiet = 0; diff --git a/tests/ui_test.c b/tests/ui_test.c index 9b4cf45e..39956f00 100644 --- a/tests/ui_test.c +++ b/tests/ui_test.c @@ -724,6 +724,13 @@ static int test_mutate(void) } ok &= eu[0].l[DV_KICK].h == 6u && n == 6u && c == 0u; bad += check("V10.7 a LANE picked (nothing written): its HITS write that lane alone, the others as they were", ok); + for (c = 1, ok = 1; c <= 9u; c++) { /* (V10.7) HITS is what sounds: VARY moves, adds none */ + eu_put(EK_HITS, (int32_t)c); frame(); + for (i = n = 0; i < 16u; i++) n += (step_lanes(&d->step[i]) >> DV_KICK) & 1u; + ok &= n == c; + } + eu_put(EK_HITS, 6); frame(); + bad += check("V10.7 HITS 1..9 on a lane: that many hits exactly (VARY added a pickup: 3 sounded 4)", ok); } turn(EN_K4, 3); frame(); /* LANE: CH */ ok = eu[0].lane == 1u + DV_HATC; @@ -750,6 +757,17 @@ static int test_mutate(void) c += (SCALE_MASK[2] >> (m->step[i].note[0] % 12u)) & 1u; } ok = n >= 4u && n <= 8u && c == n && eu[1].src == 0u && m->p[P_SLEN] == 16; + { + uint32_t h, ok2 = 1; + for (h = 1; h <= 9u; h++) { + uint32_t q; + eu_put(EK_HITS, (int32_t)h); frame(); + for (i = q = 0; i < 16u; i++) q += m->step[i].time == ST_NOTE && m->step[i].n; + ok2 &= q == h; + } + eu_put(EK_HITS, 6); frame(); + bad += check("V10.7 HITS 1..9 on a melodic track: that many notes exactly", ok2); + } bad += check("V10.6 EUCLID on a melodic track: about HITS notes, all in the track's SCL (C MIN), SCL the source", ok); m->p[P_SCALE] = 0; /* no SCL: the key from the other tracks' notes */ for (i = 0; i < 16u; i++) { @@ -1465,6 +1483,7 @@ static int test_rec(void) press(B_REC); bad += check("REC again disarms (the transport runs on)", song.rec == 0u && transport_req == 0u); frames(400); + undo_ok = 0; /* (V10.7: REC held alone UNDOes; nothing to undo here) */ hold(B_REC); /* 1.1.5: held, the REC layer (ui_layer.c); the arming stays */ bad += check("REC held: its layer, closed when let go; no dialog, the arming as it was", ui.confirm == CF_NONE && song.rec == 0u && !ui.layer && !transport_req); @@ -4180,10 +4199,30 @@ static int test_quick_layers(void) e2 = TSEL->eng_req; ok = e2 != e1 && msg_is(trk_engp(TSEL)->name); preset_pos(&tot); - turn(EN_PRESET, -1); frame(); btn_up(B_EDIT); frames(4); + turn(EN_PRESET, -1); frame(); btn_up(B_EDIT); frames(64); ok &= TSEL->eng_req == e1 && !ui.layer; bad += check("V10.7 EDIT held + PRESETS: the next engine's first sound, its name said; back: the one before", ok); } + { /* (V10.7) REC held alone and let go: UNDO; again: REDO; REC held + a knob (the REC layer used): nothing */ +#define ON0 (TSEL->step[0].time == ST_NOTE && TSEL->step[0].note[0] == 40u) + go_home(); frames(64); + my_steps(TSEL); + undo_mark(); + step_clear(&TSEL->step[0]); + ok = !ON0; + btn_down(B_REC); frames(600); btn_up(B_REC); frames(64); + ok &= ON0 && msg_is("UNDONE (AGAIN: REDO)") && !song.rec; + btn_down(B_REC); frames(600); btn_up(B_REC); frames(64); + ok &= !ON0; + btn_down(B_REC); frames(600); turn(EN_K2, 1); frame(); btn_up(B_REC); frames(64); + ok &= !ON0; + press(B_REC); frames(64); + ok &= !ON0; /* (a tap: arms, as always) */ + if (song.rec) press(B_REC); + frames(64); +#undef ON0 + bad += check("V10.7 REC held alone, let go: UNDO; held again: REDO; with a knob or tapped: no UNDO", ok); + } { /* (0.6.67) a button held + SELECT: ENV (no dice of its own) its pages, the turn's last detents after letting * go swallowed; SEQ, LFO, FX their dice under KEEP? (CANCEL: what was; OK: kept); GLO + SELECT the tempo */ uint32_t j, sig, okk; @@ -8273,6 +8312,7 @@ static int test_rec_layer(void) frame(); memcpy(before, trk[1].step, sizeof before); n = ui.page; + undo_ok = 0; /* (V10.7: REC held alone UNDOes; nothing to undo here) */ rec_down(); frames(512); ok &= ui.layer == LAYER_REC && ui.ly == LAYER_REC && !ui.confirm && song.rec == 0u && !transport_req && !str_eq(ui.msg, "HOLD: CLEAR");