V10.6j (WIP): KEY CHORD ARP SCENE notes in their own heat (C coldest .. B hottest); GENE's helix a band of its own under the timeline, its rungs the sections'; sections A..D cold to hot, a track's own section in scan lines

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-11-06 18:39:25 +00:00
1 parent 59d1d3d0b9
commit ea96d71cd5
7 files changed
+1469 -1425

No files matched your search

+20 -9
View File
@@ -2764,7 +2764,9 @@ BTAPP_FN static void gen_panel_bt(void)
if (chain_config.count) {
/* Reuse the actual arrangement, not FORM's illustrative BCADCA chips.
* Progress refreshes per bar; no new high-rate animation or DSP work. */
proj_gene = 1; /* (V10.6i) the lanes leave the helix a band of its own */
graph_proj(2);
proj_gene = 0;
cv_rect(0, 124, 240, 16, T_SURF);
if (chain.running) {
v[0] = (char)('A' + (uint32_t)live.cur % 4u); v[1] = ' ';
@@ -2788,24 +2790,33 @@ BTAPP_FN static void gen_panel_bt(void)
* colours: each seed its DNA); under ARRANGE's first row when a song is arranged, none past it */
static void gen_helix(void)
{
uint32_t n = chain_config.count, x, s = gp.seed * 2654435761u + gp.genre * 40503u;
int32_t cy = n ? 106 : 94, a = n ? 8 : 16;
if (n > 8u)
uint32_t n = chain_config.count, x, s = gp.seed * 2654435761u + gp.genre * 40503u, t = 0, i;
int32_t cy = n ? 116 : 94, a = n ? 5 : 16, x0 = n ? 24 : 6; /* (V10.6i) arranged: a band of its own under the lanes */
uint16_t f = settings.palette == UI_JIANT_INDEX ? heat_col(110) : T_THEME, b = settings.palette == UI_JIANT_INDEX ? heat_col(210) : T_ACCENT;
if (n > 16u)
return;
for (x = 6; x < 234u; x += 2u) {
for (i = 0; i < n; i++) t += chain_config.row[i].bars;
for (x = (uint32_t)x0; x < 234u; x += 2u) {
uint32_t ang = (x * 6u + anim_fr * 4u) << 23;
int32_t d = osc_sine(ang) * a >> 15, z = osc_sine(ang + 0x40000000u);
if (x % 10u == 0u) { /* a rung: a base pair, the seed's */
if (x % 10u == 0u) { /* a rung: a base pair, the seed's; arranged, the section's above it */
int32_t h = d < 0 ? -d : d;
cv_rect((int32_t)x, cy - h, 1, 2 * h + 1, ux_mix(T_SURF, heat_col(40 + 64 * (int32_t)(s >> (x / 10u % 16u * 2u) & 3u)), 70));
uint16_t c = ux_mix(T_SURF, heat_col(40 + 64 * (int32_t)(s >> (x / 10u % 16u * 2u) & 3u)), 70);
if (n && t) {
uint32_t acc = 0, k;
for (k = 0; k < n && 24u + (acc + chain_config.row[k].bars) * 212u / t <= x; k++)
acc += chain_config.row[k].bars;
c = sec_col(chain_config.row[k < n ? k : n - 1u].slot & 3u);
}
cv_rect((int32_t)x, cy - h, 1, 2 * h + 1, c);
}
cv_rect((int32_t)x, cy + d, 2, 2, z > 0 ? T_THEME : T_DIM);
cv_rect((int32_t)x, cy - d, 2, 2, z > 0 ? T_DIM : T_ACCENT);
cv_rect((int32_t)x, cy + d, 2, 2, z > 0 ? f : T_DIM);
cv_rect((int32_t)x, cy - d, 2, 2, z > 0 ? T_DIM : b);
}
}
static void gen_panel(void)
{
if (bt_hw_seg()) gen_panel_bt(); else graph_proj(chain_config.count ? 2 : 0);
if (bt_hw_seg()) gen_panel_bt(); else { proj_gene = 1; graph_proj(chain_config.count ? 2 : 0); proj_gene = 0; }
gen_helix();
}
#include "gen_track.c"
+3 -1
View File
@@ -63,6 +63,7 @@ static void lz_uline(int32_t x, int32_t y, const aafont_t *f, const char *s, uin
static int32_t graph_ht = 100;
#include "ui_organic.c" /* JIANT FM's organic line art (drawn by code) */
static uint16_t heat_col(int32_t v);
static uint16_t note_col(uint32_t n); /* (V10.6i) ui_lzpage.c: a note's own colour */
#include "ui_scene.c" /* (V10.25) SCL > SCENE: the multitimbral page */
#include "ui_euclid.c" /* (V10.6) SEQ > EUCLID / MODES: the generator, its graph */
#include "ui_fm6op.c" /* (0.6.10, from Felucca 1.5) EDIT > OPERATOR, OP ENV, OPERATOR 2 */
@@ -2021,7 +2022,8 @@ static void graph_mseq(const track_t *t, uint16_t c)
* the bars in all. KNOB 1 the row, 2 its section (on END: STOP / x2 .. / LOOP), 3 its bars, 4 its scene */
static uint16_t sec_col(uint32_t s)
{
static const uint8_t HJ[4] = {0, 85, 171, 213}, HO[4] = {120, 160, 200, 240}; /* (0.8.5: JIANT the mock-up's cyan
static const uint8_t HJ[4] = {40, 92, 140, 196}, HO[4] = {120, 160, 200, 240}; /* (V10.6i) A..D cold to hot: violet red
* orange amber (was indigo red amber cream) */ /* (0.8.5: JIANT the mock-up's cyan
* violet orange yellow; was 60 115 175 230) */
return heat_col(settings.palette == UI_JIANT_INDEX ? HJ[s & 3u] : HO[s & 3u]);
}
+22 -8
View File
@@ -238,6 +238,12 @@ static void key_val(int32_t x, int32_t y, const page_t *pg, uint32_t k) /* a k
ed_cap(x, y, d->label, T_DIM);
cv_text(x, y + 10 - AF_M_CAP_Y, &AF_M, b, T_TEXT);
}
/* (V10.6i) a note's colour: each of the twelve its own heat, C coldest .. B hottest (the user's pick B: the same note
* the same colour on KEY, CHORD, ARP, SCENE); other palettes their theme */
static uint16_t note_col(uint32_t n)
{
return settings.palette == UI_JIANT_INDEX ? heat_col(40 + (int32_t)(n % 12u) * 200 / 11) : T_THEME;
}
static void graph_key(const track_t *t, const page_t *pg)
{
static const char *const NN[12] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
@@ -257,21 +263,23 @@ static void graph_key(const track_t *t, const page_t *pg)
if (!(mask >> i & 1u))
continue;
if (prev < 12u)
og_line(px[prev] * 16, py[prev] * 16, px[n] * 16, py[n] * 16, T_THEME);
og_line(px[prev] * 16, py[prev] * 16, px[n] * 16, py[n] * 16, note_col(prev));
else
first = n;
prev = n;
}
if (first < 12u && prev != first)
og_line(px[prev] * 16, py[prev] * 16, px[first] * 16, py[first] * 16, T_THEME);
og_line(px[prev] * 16, py[prev] * 16, px[first] * 16, py[first] * 16, note_col(prev));
for (i = 0; i < 12u; i++) {
uint32_t deg = (i + 12u - rt) % 12u, in = mask >> deg & 1u;
uint16_t c = deg == 0u ? T_ACCENT : in ? T_THEME : T_RAISE;
uint16_t c = in ? note_col(i) : T_RAISE;
if (deg == 0u) /* the ROOT: its colour in a ring of text */
og_node(px[i] * 16, py[i] * 16, 9, T_TEXT);
og_node(px[i] * 16, py[i] * 16, in ? 7 : 4, c);
if (in)
cv_text_in(px[i] - 7, py[i] - 3 - AF_X_CAP_Y, 14, &AF_X, NN[i], T_INK, c);
}
cv_text_in(42, 48 - AF_M_CAP_Y, 40, &AF_M, NN[rt], T_TEXT, T_SURF);
cv_text_in(42, 48 - AF_M_CAP_Y, 40, &AF_M, NN[rt], note_col(rt), T_SURF);
param_format(&TP[P_SCALE], t->p[P_SCALE], b, &u);
cv_text_in(32, 66 - AF_X_CAP_Y, 60, &AF_X, b, T_MID, T_SURF);
key_val(130, 10, pg, 2);
@@ -279,7 +287,9 @@ static void graph_key(const track_t *t, const page_t *pg)
for (i = 0; i < 24u; i++) { /* two octaves from C */
uint32_t deg = (i + 24u - rt) % 12u;
cv_rect(8 + (int32_t)i * 9, BLK[i % 12u] ? 112 : 122, 8, BLK[i % 12u] ? 10 : 12,
deg == 0u ? T_ACCENT : mask >> deg & 1u ? T_THEME : BLK[i % 12u] ? T_LINE : T_RAISE);
mask >> deg & 1u ? note_col(i) : BLK[i % 12u] ? T_LINE : T_RAISE);
if (deg == 0u)
cv_rect(8 + (int32_t)i * 9, BLK[i % 12u] ? 110 : 120, 8, 1, T_TEXT);
}
}
static void graph_chord(const track_t *t)
@@ -304,8 +314,12 @@ static void graph_chord(const track_t *t)
int32_t x = 14 + (int32_t)d * 31;
uint32_t n = chord_peek(t, 48u + rt + deg[d], nt), k;
cv_rect(x - 2, 18, 27, 100, d == 0u ? T_TINT : T_SURF);
for (k = 0; k < n && k < 8u; k++)
cv_rect(x, 112 - clamp((int32_t)nt[k] - 48, 0, 31) * 3, 23, 3, k == 0u ? T_ACCENT : T_THEME);
for (k = 0; k < n && k < 8u; k++) {
int32_t y = 112 - clamp((int32_t)nt[k] - 48, 0, 31) * 3;
cv_rect(x + 2, y, 21, 3, note_col(nt[k]));
if (k == 0u) /* the chord's root: a tick of text */
cv_rect(x - 1, y, 2, 3, T_TEXT);
}
cv_text_in(x - 2, 125 - AF_X_CAP_Y, 27, &AF_X, RN[d], d == 0u ? T_THEME : T_DIM, T_SURF);
}
}
@@ -336,7 +350,7 @@ static void graph_arp(const track_t *t)
int32_t semi = TRI[k % 3u] + 12 * (int32_t)(k / 3u), x = 10 + (int32_t)i * 14 + (i & 1u ? t->p[P_ASWING] * 6 / 127 : 0);
int32_t w = 2 + t->p[P_AGATE] * 10 / 127, y = 118 - semi * 2;
uint32_t on = (i * 40503u >> 8) % 100u < (uint32_t)t->p[P_APROB] * 100u / 127u;
cv_rect(x, y, w, 4, on ? (settings.palette == UI_JIANT_INDEX ? heat_col(80 + semi * 4) : T_THEME) : T_RAISE);
cv_rect(x, y, w, 4, on ? note_col((uint32_t)(clamp(t->p[P_ROOT], 0, 11) + semi)) : T_RAISE);
}
cv_rect(10, 124, 220, 1, T_RAISE);
}
+14 -4
View File
@@ -97,6 +97,7 @@ static void graph_lz_tools(void)
cv_text_in(4, (int32_t)h - 11, 232, &AF_X, ui.act ? "HOLD OCT+ TO DO IT" : "TURN A KNOB TO PICK", T_DIM, T_SURF);
}
/* PROJECT: the sections, the arrangement's chips, the song's strip (ar: ARRANGE, its rows picked) */
static uint8_t proj_gene; /* (V10.6i) GENE draws the TIMELINE: its helix under it */
static void graph_proj(int ar)
{
uint32_t i, total = 0, played = 0, sel = (uint32_t)song.g[G_SLOT] - 1u, n = chain_config.count, end;
@@ -107,9 +108,10 @@ static void graph_proj(int ar)
static const char *const LN[NTRK + 1] = {"SEC", "T1", "T2", "T3", "T4", "T5", "T6"};
static const char *const RV_SH[RV_N] = {"", "", "TH", "FL", "HF", "RV", "SH", "+8", "-8", "V1", "V2", "V3", "V4"};
uint32_t t = 0, acc = 0, played = 0, j;
int32_t ls = proj_gene ? 15 : 17, lh = ls - 2; /* (V10.6i) GENE: lanes 2 px shorter, the helix a band of its own */
for (i = 0; i < n; i++) t += chain_config.row[i].bars;
for (j = 0; j <= NTRK; j++)
cv_text(5, 4 + (int32_t)j * 17 + (j ? 4 : 3), &AF_X, LN[j], j == ui.song_tk ? T_THEME : T_DIM);
cv_text(5, 4 + (int32_t)j * ls + (j ? 4 : 3) - (17 - ls) / 2, &AF_X, LN[j], j == ui.song_tk ? T_THEME : T_DIM);
for (i = 0; i < n && t; i++) {
const chain_row_t *r = &chain_config.row[i];
uint32_t s = r->slot & 3u;
@@ -117,12 +119,20 @@ static void graph_proj(int ar)
if (w < 2) w = 2;
for (j = 0; j <= NTRK; j++) { /* (V10.3) the columns lead: a row's edge a 1 px line of its colour
* well darker; between lanes 2 px of it only a little darker */
int32_t y = 4 + (int32_t)j * 17, h = 15;
int32_t y = 4 + (int32_t)j * ls, h = lh;
uint32_t src = j ? row_src(i, j - 1u, s) : s, v = j ? row_var(i, j - 1u) : 0u, own = !j || src == s;
uint16_t c = j && own ? lz_sec(src, 1, 1) : sec_col(src);
if (v == RV_MUTE) {
cv_rect(x, y, w, h, T_BG);
cv_frame(x + 1, y + 1, w - 1, h - 2, T_DIM);
} else if (j && own && settings.palette == UI_JIANT_INDEX) { /* (V10.6i) its own section: the colour in
* scan lines, as a thermal camera's (was mixed with black: browns) */
int32_t k;
c = sec_col(src);
cv_rect(x, y, w, h, T_BG);
for (k = 0; k < h; k += 2)
cv_rect(x, y + k, w, 1, c);
if (i) cv_rect(x, y, 1, h, T_BG);
} else {
cv_rect(x, y, w, h, c);
if (j < NTRK) cv_rect(x, y + h, w, 2, ux_mix(T_BG, c, 45));
@@ -136,7 +146,7 @@ static void graph_proj(int ar)
}
}
if (i == ui.song_row % (n ? n : 1u)) {
int32_t fy = 4 + (int32_t)ui.song_tk * 17, fh = 15;
int32_t fy = 4 + (int32_t)ui.song_tk * ls, fh = lh;
cv_frame(x, fy, w, fh, T_TEXT);
cv_frame(x + 1, fy + 1, w - 2, fh - 2, T_TEXT);
}
@@ -145,7 +155,7 @@ static void graph_proj(int ar)
}
if (chain.running && chain.row < n && t) { /* the playhead */
played += chain_config.row[chain.row].bars - chain.remaining;
cv_rect(24 + (int32_t)(played * 212u / t), 2, 1, 4 + 7 * 17, T_TEXT);
cv_rect(24 + (int32_t)(played * 212u / t), 2, 1, 4 + 7 * ls, T_TEXT);
}
end = SONG_END(&chain_config);
fmt_int(b, (int32_t)t);
+1 -1
View File
@@ -100,7 +100,7 @@ static void graph_scene(void)
n = scn_notes(t, r, last_note, o, 1); /* the last key's notes on it, by pitch */
for (j = 0; j < n; j++) {
int32_t y = y0 + yh - 4 - (clamp(o[j], 36, 96) - 36) * (yh - 6) / 60;
cv_rect(x + 2 + (r == SC_ARP ? (int32_t)j * 7 : 0), y, r == SC_ARP ? 6 : cw - 10, 3, c);
cv_rect(x + 2 + (r == SC_ARP ? (int32_t)j * 7 : 0), y, r == SC_ARP ? 6 : cw - 10, 3, note_col(o[j]));
}
}
cv_text_in(4, (int32_t)h - 11, 232, &AF_X, scn_on ? "OCT+ DICE OCT- ALL KEEP" : "SCENE OFF: KNOB 1 TURNS IT ON",
+8 -2
View File
@@ -655,7 +655,7 @@ enum { S_HOME, S_HOME_IDLE, S_MESSAGE, S_MESSAGE_KEY, S_MESSAGE_NOFILE, S_PRESET
S_HOME_MACROS, S_HOME_BEING, S_HOME_ROUTES, S_GEN_LEAD,
S_ED_FILTER, S_ED_FILTER_BP, S_ED_VOICE2, S_ED_FOCUS, S_ED_FOCUS_MOD, S_ED_OPERATOR,
S_ENV_TRACKS, S_ENV_TRACKS_DEST, S_ENV_STAGE, S_ENV_STAGE_SUS, S_MSEQ2, S_KEY_CHORD, S_KEY_CHORD_OFF, S_KEY_ARP, S_KEY_ARP2, S_GLO_SENDS, S_MENU_ROW, S_MENU_ROW_LEDS, S_LY_FX_KNOBS, S_LY_FX_STATE, S_LY_GLO_STATE, S_DLG_DICE_SOUND, S_DLG_DICE_SEQ, S_DLG_DICE_FX, S_DLG_MUT_BACK,
S_DRUM_X4, S_DRUM_GHOST, S_DRUM_OCT_UP, S_DRUM_OCT_DN, S_COMP_TOUCH, S_COMP_EVEN, S_GEN_EXPLORE,
S_DRUM_X4, S_DRUM_GHOST, S_DRUM_OCT_UP, S_DRUM_OCT_DN, S_COMP_TOUCH, S_COMP_EVEN, S_GEN_EXPLORE, S_GEN_SONG,
S_VX_HEAD_A, S_VX_HEAD_I, S_VX_HEAD_U, S_VX_HEAD_S, S_VX_HEAD_M, S_VX_HEAD_K, S_VX_HEAD_T, S_VX_HEAD_F, S_VX_HEAD_VOWEL,
S_VX_HEAD_HOME, S_VX_HEAD_QUIET, S_VX_BIRD, S_VX_CMOS, S_VX_INSECT, S_VX_WING, S_VX_MAMMAL, S_VX_MORPH_IB, S_VX_MORPH_BM,
S_VX_ANIMAL_HOME, S_VX_KIT, S_VX_KIT_HITS, S_VX_KIT_GHOST, S_VX_KIT_HOME, S_VX_KIT_MUTED,
@@ -693,7 +693,7 @@ static const char *const S_NAME[S_COUNT] = {"home", "home_idle", "message", "mes
"home_macros", "home_being", "home_routes", "gen_lead",
"ed_filter", "ed_filter_bp", "ed_voice2", "ed_focus", "ed_focus_mod", "ed_operator",
"env_tracks", "env_tracks_dest", "env_stage", "env_stage_sus", "mseq2", "key_chord", "key_chord_off", "key_arp", "key_arp2", "glo_sends", "menu_row", "menu_row_leds", "ly_fx_knobs", "ly_fx_state", "ly_glo_state", "dlg_dice_sound", "dlg_dice_seq", "dlg_dice_fx", "euclid_modes",
"drum_hit_x4", "drum_hit_ghost", "drum_oct_x8", "drum_oct_flam", "comp_touch", "comp_echo_even", "gen_explore",
"drum_hit_x4", "drum_hit_ghost", "drum_oct_x8", "drum_oct_flam", "comp_touch", "comp_echo_even", "gen_explore", "gen_song",
"vx_head_a", "vx_head_i", "vx_head_u", "vx_head_s", "vx_head_m", "vx_head_k", "vx_head_t", "vx_head_f", "vx_head_vowel",
"vx_head_home", "vx_head_quiet", "vx_bird", "vx_cmos", "vx_insect", "vx_wing", "vx_mammal", "vx_morph_insect_bird", "vx_morph_bird_mammal",
"vx_animal_home", "vx_kit", "vx_kit_hits", "vx_kit_ghost", "vx_kit_home", "vx_kit_muted",
@@ -1376,6 +1376,12 @@ static void setup(int s)
case S_CONFIRM_PAT: ui.confirm = CF_LOAD_PAT; ui.confirm_trk = 0; ui.ppick = 4; break;
case S_CONFIRM_MOTION: ui.confirm = CF_CLEAR_MOTION; ui.confirm_trk = 3; break;
case S_CONFIRM_ERASE: song.playing = 0; up_store(6, "A VERY LONG SOUND NAME"); ui.confirm = CF_ERASE_USER; ui.confirm_trk = 6; break;
case S_GEN_SONG: /* (V10.6i) GENE over an arranged song: the lanes, the helix below */
chain_config.count = 6;
chain_config.row[0] = (chain_row_t){1, 16}; chain_config.row[1] = (chain_row_t){2, 16}; chain_config.row[2] = (chain_row_t){0, 32};
chain_config.row[3] = (chain_row_t){3, 16}; chain_config.row[4] = (chain_row_t){2, 16}; chain_config.row[5] = (chain_row_t){0, 32};
ui.confirm = CF_DICE_ALL; gp.page = 0; gp.hot = 0;
break;
case S_GEN: ui.confirm = CF_DICE_ALL; gp.page = 0; gp.hot = 0; gp.genre = 1; gp.seed = 421; str_cpy(gp.last, "HOUSE 0421", sizeof gp.last); break; /* (0.6.91) GEN */
case S_GEN_PARTS: ui.confirm = CF_DICE_ALL; gp.page = 1; gp.hot = 2; gp.amt[GP_CHORDS] = 70; gp.amt[GP_ARP] = 0; break;
case S_MENU: ui.menu = 1; ui.menu_sel = 0; song.rec = 1; break;
+1401 -1400
View File
File diff suppressed because it is too large. Load diff