V10.17: SAVE > SECTIONS KNOB 2 ERASE

KNOB 2 on SECTIONS (was the section's name, shown; the card still shows it) is
the ERASE action: right picks it, OCT+ asks ERASE SECT B? (its name, or THE
SLOT GOES EMPTY), OCT+ again empties the section: project.c project_erase
(RAM slot zeroed, live.dirty and live.cur dropped, both flash copies' sectors
erased, so the LIBRARY's chip goes dark too). The music playing stays. Stopped
only (STOP TO ERASE); an empty section: no dialog. ARRANGE / TIMELINE rows
that play it keep the music as it is (section_load refuses an empty slot).

Tests: ui_test (the dialog, OCT- cancels, EMPTY after, the music kept,
refused while playing; SECTIONS' KNOB 2 picks / drops ERASE).

App 567,836 B of 584,336 (16,500 B free).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
Claude committed 2026-10-31 21:50:24 +00:00
1 parent 3ed85a96d7
commit 34b0b9dc26
7 files changed
+1306 -1241

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@
#define FELUCCA_ID "FM-1_900" /* package identity (build.py: the .fwsc marker string) */
#endif
#ifndef FELUCCA_VERSION
#define FELUCCA_VERSION "V10.16" /* (2026-10-31) V10.16: SEQ > EUCLID's VARY in four turns (A A' A'' B, each moved anew, the motif answered); SEQ > MUTATE (EVERY 1..16 bars, AMOUNT, MODE ORBIT / DRIFT / PULSE, WHAT GROOVE / RHYTHM / FEEL / ALL; OCT+ a mutation now, OCT- back to the anchor). (2026-10-31) V10.15: VOICE's English dictionary in the Bluetooth segment (without it: the letter rules). (2026-10-31) V10.14: PROX, a modulation source from the Bluetooth signal (a hand near the antenna), calibrated on MENU > SYSTEM > BLUETOOTH ON + OCT+ (OCT- FAR, OCT+ NEAR). (2026-10-31) V10.13: BLE-MIDI in and out (what a central sends plays as USB-MIDI, MIDI OUT goes to it too); ABOUT's credits in the Bluetooth segment (the app slot had 128 B free). (2026-10-31) V10.12: MENU > SYSTEM > BLUETOOTH OFF / ON: a BLE-MIDI peripheral "JIANT FM-1" (advertising, connectable; MIDI not routed yet), Optimist's stack in the Bluetooth segment at 0xEA000 (written by the update loader from the package's bt.bin), live RF calibration, a boot guard. (2026-10-31) V10.11: the supplies set up as stock V15 does (the DC-DC on, hal/fm1_power.h from Melodee), the radio's prerequisite; 0xEA000..0xFBFFF reserved for the Bluetooth segment. (2026-10-31) V10.10: the radio's calibration kept: the update loader keeps the stock VM sector (0xE8000: RF trims, BT address) but its record's 256 B; VM_READ (editor 80) reads that area for web/btcheck. (2026-10-31) V10.9: MENU > LARGE shows the animations (HOME: the six tracks' creatures in the strip; EDIT: the engine's). (2026-10-31) V10.8: testers' fixes: GEN parts set OFF stay off; GEN keeps its GENRE between visits; SEQ > STEP KNOB 4 VEL (1..127, then ACC SLD A+S); delay 1/4D 1/8D 1/16D; less pitch wobble from the generators (no macro on PITCH, pitched delay seldom, octaves); STOP TO EDIT says SONG PLAYS. (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) */
#define FELUCCA_VERSION "V10.17" /* (2026-10-31) V10.17: SAVE > SECTIONS KNOB 2 ERASE (the section empty again, RAM and flash; the music stays). (2026-10-31) V10.16: SEQ > EUCLID's VARY in four turns (A A' A'' B, each moved anew, the motif answered); SEQ > MUTATE (EVERY 1..16 bars, AMOUNT, MODE ORBIT / DRIFT / PULSE, WHAT GROOVE / RHYTHM / FEEL / ALL; OCT+ a mutation now, OCT- back to the anchor). (2026-10-31) V10.15: VOICE's English dictionary in the Bluetooth segment (without it: the letter rules). (2026-10-31) V10.14: PROX, a modulation source from the Bluetooth signal (a hand near the antenna), calibrated on MENU > SYSTEM > BLUETOOTH ON + OCT+ (OCT- FAR, OCT+ NEAR). (2026-10-31) V10.13: BLE-MIDI in and out (what a central sends plays as USB-MIDI, MIDI OUT goes to it too); ABOUT's credits in the Bluetooth segment (the app slot had 128 B free). (2026-10-31) V10.12: MENU > SYSTEM > BLUETOOTH OFF / ON: a BLE-MIDI peripheral "JIANT FM-1" (advertising, connectable; MIDI not routed yet), Optimist's stack in the Bluetooth segment at 0xEA000 (written by the update loader from the package's bt.bin), live RF calibration, a boot guard. (2026-10-31) V10.11: the supplies set up as stock V15 does (the DC-DC on, hal/fm1_power.h from Melodee), the radio's prerequisite; 0xEA000..0xFBFFF reserved for the Bluetooth segment. (2026-10-31) V10.10: the radio's calibration kept: the update loader keeps the stock VM sector (0xE8000: RF trims, BT address) but its record's 256 B; VM_READ (editor 80) reads that area for web/btcheck. (2026-10-31) V10.9: MENU > LARGE shows the animations (HOME: the six tracks' creatures in the strip; EDIT: the engine's). (2026-10-31) V10.8: testers' fixes: GEN parts set OFF stay off; GEN keeps its GENRE between visits; SEQ > STEP KNOB 4 VEL (1..127, then ACC SLD A+S); delay 1/4D 1/8D 1/16D; less pitch wobble from the generators (no macro on PITCH, pitched delay seldom, octaves); STOP TO EDIT says SONG PLAYS. (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"
+24
View File
@@ -2090,6 +2090,30 @@ static void persist_boot(void) /* before settings_init / pane
static int project_used(uint32_t slot) { return proj_import(&proj_scratch, &proj_slot[slot & 3u], sizeof(project_store_t)); }
/* (V10.17) SAVE > SECTIONS > ERASE: section slot of the open project (song) empty again, in RAM and in flash (both
* copies' sectors erased: EMPTY, and the LIBRARY's chip dark); the music playing stays as it is. Stopped only (a flash
* erase). 0 done */
static int project_erase(uint32_t slot)
{
char b[8] = "SECT A";
slot &= 3u;
b[5] = (char)('A' + slot);
if (transport_busy()) { ui_message("STOP TO ERASE"); return 1; }
memset(&proj_slot[slot], 0, sizeof proj_slot[slot]);
live.dirty &= (uint8_t)~(1u << slot); /* (nothing left to write) */
if (live.cur == (int8_t)slot) live.cur = -1;
proj_wire_gen++; /* (the LIBRARY's picture again) */
#if FELUCCA_FLASH
if (flash_ok && (st_erase(st_sector(proj_obj(slot), 0)) || st_erase(st_sector(proj_obj(slot), 1)))) {
ui_message("ERASE ERROR");
return 2;
}
#endif
ui_say("ERASED ", b);
ui.force = 1;
return 0;
}
/* (0.8.5) SAVE > LIBRARY: project n's sections stored (a bit each) and its section A's name (b, PROJ_NAME_LEN + 1),
* from the flash: the newer valid header of each section's two copies, and the name's 12 bytes of section A's
* payload (today's 3840-byte store; an older one: no name). No payload read, no CRC: a picture, not a load (reads of a
+8 -1
View File
@@ -21,6 +21,7 @@ static void system_init(void); /* (0.6.40) project.c: INIT SYST
static int undo_do(void); /* .. back (and again: forward) */
static uint8_t undo_ok;
static int project_used(uint32_t slot);
static int project_erase(uint32_t slot); /* (V10.17) SAVE > SECTIONS > ERASE */
static uint32_t lib_scan(uint32_t n, char *b); /* (0.8.5) project.c: SAVE > LIBRARY's tiles */
static uint32_t lib_gen(void);
static int project_recall_sound(uint32_t slot, uint32_t k);
@@ -345,7 +346,7 @@ static uint16_t val_col(uint32_t c) { return c == ui.hot_col && ui.hot_t ? T_ACC
enum { CF_NONE, CF_CLEAR_SEQ, CF_CLEAR_TRK, CF_OVR_PROJ, CF_OVR_USER, CF_LOAD_PAT,
CF_DEL_ROW, CF_CLEAR_SONG, CF_INIT_SOUND, CF_CLEAR_MOTION, CF_ERASE_USER, CF_CLEAR_PFX,
CF_RECALL_SOUND, CF_CLEAR_ALL, CF_DICE_ALL, CF_INIT_SYS, CF_DICE_SOUND, CF_DICE_SEQ, CF_DICE_LFO,
CF_DICE_FX, CF_CPU_TEST, CF_MUT_BACK, CF_LIVE_COMMIT }; /* ui.confirm: TOOLS' clears; (0.6.21) HOME + SELECT:
CF_DICE_FX, CF_CPU_TEST, CF_MUT_BACK, CF_LIVE_COMMIT, CF_ERASE_SECT }; /* ui.confirm: TOOLS' clears; (0.6.21) HOME + SELECT:
* everything diced; (0.6.65) EDIT + SELECT: keep the diced sound?; (0.6.67) SEQ / LFO / FX + SELECT:
* keep the diced sequence / LFO / effects?;
* SAVE over a used slot; a pattern over the user's steps;
@@ -1922,6 +1923,8 @@ static uint32_t act_cols(void) /* the columns that are actions
return 2u; /* LOAD */
if (pg->graph == GR_USER)
return 14u; /* LOAD ERASE SAVE */
if (pg->graph == GR_SLOTS && save_on() && save_level() == SV_PROJ)
return 14u; /* (V10.17) SECTIONS: ERASE LOAD SAVE */
if (pg->scope == SC_GLOBAL)
for (c = 0; c < 4u; c++)
if (go_id(pg->id[c]))
@@ -1962,6 +1965,8 @@ static const char *act_name(uint32_t c) /* column c's action (the foote
return "LOAD";
if (cur_page()->graph == GR_USER)
return UP_GO[(c + 2u) % 3u];
if (cur_page()->graph == GR_SLOTS && (c & 3u) == 1u) /* (V10.17) SECTIONS' KNOB 2 */
return "ERASE";
return id == G_CLRSEQ ? "CLEAR" : id == G_INITSND ? "INIT" : id == G_LOAD ? "LOAD" : "SAVE";
}
@@ -1984,6 +1989,8 @@ static int act_ready(void)
return pat_last[s] != pat_pick() + 1u || steps_sig(TSEL) != pat_sig[s];
if (cur_page()->graph == GR_USER)
return c == 3u ? !song.playing : up_used(ui.uslot) && (c == 1u || !song.playing);
if (cur_page()->graph == GR_SLOTS && c == 1u) /* (V10.17) SECTIONS: ERASE a stored section, stopped */
return project_used((uint32_t)song.g[G_SLOT] - 1u) && !transport_busy();
id = cur_page()->id[c & 3u];
if (id == G_LOAD)
return project_used((uint32_t)song.g[G_SLOT] - 1u);
+7 -4
View File
@@ -1623,12 +1623,9 @@ static void draw_columns(void)
uint32_t k = (uint32_t)song.g[G_SLOT] - 1u;
int used = graph_project_used(k);
if (save_level() == SV_PROJ) { /* (0.8.5) SAVE > PROJECT's SECTIONS: SECT, its NAME */
const char *nm;
val[0] = (char)('A' + (k & 3u)); val[1] = 0;
hot_gauge_column(0, "SECT", val, (int32_t)(k & 3u) * 1000 / 3);
nm = used ? graph_project_name(k) : "";
card_free_next = 1;
text_column(1, "NAME", !used ? "--" : nm[0] ? nm : "USED", used ? T_THEME : T_DIM);
draw_act_column(1, "ERASE", used ? T_THEME : T_DIM, ICON_AUTO); /* (V10.17; the name: the card) */
} else {
fmt_int(val, (int32_t)song_cur + 1);
hot_gauge_column(0, "PROJECT", val, (int32_t)song_cur * 1000 / (int32_t)(NSONG - 1u));
@@ -2161,6 +2158,12 @@ static void confirm_text(char *a, char *b)
str_cpy(a + str_len(a), "?", 2);
up_name(k, b); /* the sound stored there */
break;
case CF_ERASE_SECT: /* (V10.17) SAVE > SECTIONS > ERASE */
str_cpy(a, "ERASE SECT A?", 24);
a[11] = (char)('A' + (k & 3u));
str_cpy(b, graph_project_used(k & 3u) && graph_project_name(k & 3u)[0] ? graph_project_name(k & 3u) :
"THE SLOT GOES EMPTY", 24);
break;
case CF_ERASE_USER:
str_cpy(a, "ERASE ", 24);
up_slot_label(a + str_len(a), k);
+18 -4
View File
@@ -1356,16 +1356,21 @@ static void edit_param(uint32_t slot, int32_t steps)
}
if (pg->graph == GR_SLOTS && save_on() && save_level() == SV_PROJ) { /* (0.8.5) SAVE > PROJECT's SECTIONS: KNOB 1
* the section, KNOB 2 its name (shown; EDIT renames it) */
if (slot == 1u)
if (slot == 1u) { /* (V10.17) KNOB 2 ERASE: right picks it, left drops it */
ui.act = steps > 0 ? 2u : ui.act == 2u ? 0u : ui.act;
return;
if (slot == 0u)
slot = 1u;
}
if (slot == 0u) {
slot = 1u; /* (KNOB 1 the section: SECT's slot, not an action) */
goto sect;
}
}
if ((act_cols() >> slot) & 1u) { /* an action's knob picks it (right) or drops it (left); */
if (pg->graph != GR_PATS) /* OCT+ does it (act_do) */
ui.act = steps > 0 ? (uint8_t)(slot + 1u) : ui.act == slot + 1u ? 0u : ui.act;
return;
}
sect:
if (pg->graph == GR_SLOTS && slot == 0u) { /* (0.6.12) KNOB 1 the project: its sections, the music kept */
int32_t n = clamp((int32_t)song_cur + (steps > 0 ? 1 : -1), 0, (int32_t)NSONG - 1);
if ((uint32_t)n != song_cur) (void)song_open((uint32_t)n);
@@ -1506,6 +1511,13 @@ static void act_do(void)
name_open(NK_USER_SAVE, ui.uslot);
return;
}
if (cur_page()->graph == GR_SLOTS && c == 1u) { /* (V10.17) SECTIONS: ERASE, the dialog first */
ui.act = 0;
if (transport_busy()) ui_message("STOP TO ERASE");
else if (!project_used(k)) ui_message("EMPTY SECTION");
else confirm_open(CF_ERASE_SECT, k);
return;
}
id = cur_page()->id[c & 3u];
if (id != G_LOAD)
ui.act = 0;
@@ -2409,7 +2421,7 @@ static void ui_input_frame(void)
uint32_t kind = ui.confirm;
ui.confirm = 0;
ui.force = 1;
if (kind != CF_OVR_PROJ && kind != CF_OVR_USER && kind != CF_ERASE_USER && kind != CF_DICE_ALL &&
if (kind != CF_OVR_PROJ && kind != CF_OVR_USER && kind != CF_ERASE_USER && kind != CF_ERASE_SECT && kind != CF_DICE_ALL &&
!dice_kind(kind) && kind != CF_DEL_ROW && kind != CF_CLEAR_SONG && !chain_busy())
undo_mark(); /* (0.6.21) the music before a clear, INIT, RECALL, pattern */
if (kind == CF_OVR_PROJ) { /* overwrite: the NAME screen writes it */
@@ -2418,6 +2430,8 @@ static void ui_input_frame(void)
name_open(NK_USER_SAVE, ui.confirm_trk);
} else if (kind == CF_ERASE_USER) {
up_ui(1u, ui.confirm_trk);
} else if (kind == CF_ERASE_SECT) {
project_erase(ui.confirm_trk & 3u);
} else if (dice_kind(kind)) { /* (0.6.65) OK: the diced part stays */
ui_message(dk.msg);
} else if (kind == CF_LOAD_PAT) {
+20 -3
View File
@@ -8506,15 +8506,32 @@ static int test_project_page(void)
ok &= song.g[G_SLOT] == 3;
turn(EN_K1, 1); frame();
ok &= song.g[G_SLOT] == 4 && song_cur == 1;
turn(EN_K2, 1); frame(); /* (KNOB 2: the section's name, shown) */
ok &= song.g[G_SLOT] == 4 && song_cur == 1;
turn(EN_K2, 1); frame(); /* (V10.17 KNOB 2: ERASE picked, nothing else) */
ok &= song.g[G_SLOT] == 4 && song_cur == 1 && ui.act == 2u;
turn(EN_K2, -1); frame();
ok &= ui.act == 0u;
turn(EN_K1, -1); frame();
ok &= song.g[G_SLOT] == 3;
bad += check(" LIBRARY's KNOB 2, SECTIONS' KNOB 1: the section (C); SECTIONS' KNOB 2 nothing (0.9.2: PRESETS a sound)", ok);
bad += check(" LIBRARY's KNOB 2, SECTIONS' KNOB 1: the section (C); SECTIONS' KNOB 2 ERASE (V10.17)", ok);
turn(EN_K4, 1); press(B_OCTUP); frame(); /* SAVE into project 2's C: the NAME screen, then OK */
for (k = 0; k < 8u && name_on(); k++) { press(B_OCTUP); frame(); }
ok = project_used(2) && live.cur == 2;
bad += check(" SAVE: the music into project 2's section C (the music's section: NOW)", ok);
transport_req = 1; frame(); /* (V10.17) ERASE: playing, refused */
turn(EN_K2, 1); press(B_OCTUP); frame();
ok = !ui.confirm && project_used(2) && msg_is("STOP TO ERASE");
transport_req = 2; frame();
turn(EN_K2, 1); press(B_OCTUP); frame(); /* stopped: the dialog, OCT- cancels */
ok &= ui.confirm == CF_ERASE_SECT;
press(B_OCTDN); frame();
ok &= !ui.confirm && project_used(2);
turn(EN_K2, 1); press(B_OCTUP); frame(); press(B_OCTUP); frame(); /* .. OCT+ erases it */
ok &= !ui.confirm && !project_used(2) && live.cur < 0 && msg_is("ERASED SECT C") && trk[0].step[0].note[0] == 80;
turn(EN_K2, 1); press(B_OCTUP); frame(); /* (empty now: no dialog) */
ok &= !ui.confirm;
bad += check("V10.17 SECTIONS KNOB 2 ERASE: the dialog (ERASE SECT C?), then EMPTY; the music stays; not playing", ok);
turn(EN_K4, 1); press(B_OCTUP); frame(); /* (stored again for what follows) */
for (k = 0; k < 8u && name_on(); k++) { press(B_OCTUP); frame(); }
turn(EN_SELECT, 1); frame(); /* (V10.1: back to PROJECTS, the next page: KNOB 1 the project) */
turn(EN_K1, -1); frame();
ok = song_cur == 0 && (!FELUCCA_FLASH || project_used(0)) && !project_used(2) && chain_config.count == 2 &&
+1228 -1228
View File
File diff suppressed because it is too large. Load diff