V10.8.14: the owner's redesigns: ARRANGE and GENE as a living score (blocks as wide as their bars, 32 at most round the playhead or the row picked, the parts' strip on top, a lane a track in its colour, a part's letter only where a track plays another, a white playhead; GENE's helix gone, one line of state and keys); SCL KEY an octave of keys (the scale lit, ROOT a dot, D MAJ and its notes), CHORD the seven degrees' chords named (D E- F#- ... C#dim) and the one played lit on the keys, PROG a card a bar (its chord, degree, bar; OFF dim with a hint), SCENE a row a track (its colour, role, range); tests

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-23 03:03:55 +00:00
1 parent eb45d76444
commit 66ab146e66
8 files changed
+2355 -2361

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@
#define FELUCCA_ID "FM-1_900" /* package identity (build.py: the .fwsc marker string) */
#endif
#ifndef FELUCCA_VERSION
#define FELUCCA_VERSION "V10.8.13" /* (2026-11-21) V10.7.77: GEN (the owner): DUBSTEP's wobble its rate moving (the wobble bass's LFO RATE automated half a bar each: 1/4 1/8 1/8T 1/16); CUMBIA villera one throw in two (a villera 'teclado': 92 .. 100, minor, the keyboard's lead up front). V10.7.76: DRUM-X MATH a wavetable (the owner: "harsh"): its t whole cycles of the hit's time (one shape evolving), interpolated between its samples; SOUND 3 draws it (four moments, cold to hot); hints trimmed (flash). V10.7.75: DRUM-X MATH (the owner): its RATIO (1/4 .. 16, 24, the inharmonic between) on SOUND 3's KNOB 4, COLOR read MOD AMT; MATH's RESTART the scope (its ramps' picture gone), ten more hints out (flash). V10.7.74: DRUM-X MATH (the owner): a sound's WAVE past BELL a MATH formula F01..F48 as its FM's modulator (COLOR its index; its t the hit's time, a sample in eight), kept with the project ('D' 'F'). V10.7.73: SCL > HARMONY its own tab (KEY CHORD HARMONY SCENE); the defaults once (the owner): LARGE off, CLICK REC, COUNT-IN 1 BAR. V10.7.72: GEN (the owner): MATH WEST STRING more (the archetypes' third options theirs, 25 %; a bass's one time in ten); GLO > GLOBAL the scope, its bars gone. V10.7.71: SCL > HARMONY's picture (the owner): the progression's chords as roman numerals in the key ("-" minor, "o" diminished), each its root's colour, the one playing lit; the obvious knobs' hints out (flash). V10.7.70: FX > PUNCH IN: KNOB 4 M4 (its ERASE PUNCH LANE's only), so OCT+ always the punch-in editor (an ERASE picked took it). V10.7.69: MATH FLOAT MORPH (the owner): ALGO B where CHIP was, MORPH A -> B where BEND was (between the ends B a sample in eight, interpolated: +12.5 % CPU); MATH's formulas (lofi_float, lofi_byte) their 14 divisions by a constant as multiplies (JIANT BYTE 0.16's build pass, tools/build.py const_divs: exact, less CPU a sample); the MACRO layer's dead branches out (flash). V10.7.68: EUCLID MODES > ROLE (MELODY CHORDS BASS ARP, was CHORD) on the harmony the other melodic tracks play, bar by bar (four bars when it changes), else SCL's key; a recorded melody EUCLID takes: its notes as they were; LFO / FX dice leftovers out (flash). V10.7.67: GEN and EUCLID MUTATE fuse two seeds (the owner: never one as it is; the second far from the first), A+B in the name; FX + OCT+ opens the punch-in editor again (as OCT+ on FX > PUNCH IN). V10.7.66: SCL > HARMONY (PROG LENGTH EVOLVE SKIP: every melodic sequence follows a progression); GEN 8 progressions more (neo-soul, jazz, IDM, progressive); EUCLID's melody CONTOUR RANGE MOTIF CHORD; macros FX > PUNCH IN's only (LFO's layer, HOME > ROUTES gone, MACROS in FX), GLO's layer says G4 UNDO; the PUNCH-IN EDITOR redone (the owner): a key WHAT (an effect, or PARAM: M1..M4, CUT PITCH TIMBRE VOLUME PAN DIST CHORUS DELAY REVERB VIBRATO on every track), HOW (an effect HOLD LATCH QUANT; PARAM HOLD RAMP UP RAMP DN SINE STUTTER S&H), AMOUNT (-100..+100 %; an effect its TARGET), TIME (1/16 .. 8 BARS); two slots A B; FX > PUNCH IN its knobs M1..M4 (PUNCH LANE: LEN RES); the layers MAP only (KNOBS STATE gone, ALGORITHM nothing held), the FX cards "M1 CUT"; FX + SELECT the FX pages (its dice gone). GENE while it plays waits for the bar to end (Hollusion); GENE 4: KEY NEW / KEEP (the first melodic track's key and mode kept), ENTRY ALL / BUILD (the new piece in a track a bar, the kit first); the old DIGITAL / NOISE / retired engines' conversions out (flash), the songs 7-8 notice out; voices past V10.6c's budget: tails first, FM6's quarter rate gone. V10.7.65: the PUNCH-IN EDITOR (the owner): OCT+ on FX > PUNCH IN opens it (the FX layer locked open; an ERASE picked on KNOB 4: OCT+ does it), DICE gone; the COMB / COMB- cut-off moved by the LFO and the ENV as the other filters; a key held and KNOB 1..4 its EFFECT (any, MOD a macro moved) TARGET (ALL SYN DRM T1..T6; MOD M1..M4) AMOUNT (MOD 1 BEAT .. 4 BARS) MODE (HOLD LATCH QUANT; MOD RAMP UP / DOWN SINE S&H), the mode said in the header; SELECT a slot (four, in the settings), OCT+ saves and plays it, OCT- leaves. V10.7.64: SCENE's LEADER PRESS (a key's note on every live track at once, each its own sound); SCENE on the live tracks only (it opened on T6, asleep with four: nothing heard, nothing drawn), every role with the key: a kit's DRUM loops its beat while a key is held, stopped too; the engines as the kit (the owner): FILTER TYPE CUT RES IMAGE (DIST the SENDS' only), PLAY POLY GLIDE UNISON VEL (the plain MORE gone, GL MODE off the panel), GAIN 0..+12 dB clean where a DRIVE was (ANALOG's MORE, WHEEL's COLOR; their DRIVE off the panel, kept), saved ('T' 'G'); FUGA's subject and answer on live tracks (the continuo after: with four tracks it began unheard); DUBSTEP's bass the wobble (a resonant low-pass on an LFO on the 1/8s, kept: not slowed to a breath); DRUM-X KIT's SNAP (was ATTACK), SOUND 3's SHORT (a filter's quick noise, was SNAP). V10.7.63: GENE: DUBSTEP SHOEGAZE METALCORE, each genre its FX STYLE (the drive where it belongLine truncated
#define FELUCCA_VERSION "V10.8.14" /* (2026-11-21) V10.7.77: GEN (the owner): DUBSTEP's wobble its rate moving (the wobble bass's LFO RATE automated half a bar each: 1/4 1/8 1/8T 1/16); CUMBIA villera one throw in two (a villera 'teclado': 92 .. 100, minor, the keyboard's lead up front). V10.7.76: DRUM-X MATH a wavetable (the owner: "harsh"): its t whole cycles of the hit's time (one shape evolving), interpolated between its samples; SOUND 3 draws it (four moments, cold to hot); hints trimmed (flash). V10.7.75: DRUM-X MATH (the owner): its RATIO (1/4 .. 16, 24, the inharmonic between) on SOUND 3's KNOB 4, COLOR read MOD AMT; MATH's RESTART the scope (its ramps' picture gone), ten more hints out (flash). V10.7.74: DRUM-X MATH (the owner): a sound's WAVE past BELL a MATH formula F01..F48 as its FM's modulator (COLOR its index; its t the hit's time, a sample in eight), kept with the project ('D' 'F'). V10.7.73: SCL > HARMONY its own tab (KEY CHORD HARMONY SCENE); the defaults once (the owner): LARGE off, CLICK REC, COUNT-IN 1 BAR. V10.7.72: GEN (the owner): MATH WEST STRING more (the archetypes' third options theirs, 25 %; a bass's one time in ten); GLO > GLOBAL the scope, its bars gone. V10.7.71: SCL > HARMONY's picture (the owner): the progression's chords as roman numerals in the key ("-" minor, "o" diminished), each its root's colour, the one playing lit; the obvious knobs' hints out (flash). V10.7.70: FX > PUNCH IN: KNOB 4 M4 (its ERASE PUNCH LANE's only), so OCT+ always the punch-in editor (an ERASE picked took it). V10.7.69: MATH FLOAT MORPH (the owner): ALGO B where CHIP was, MORPH A -> B where BEND was (between the ends B a sample in eight, interpolated: +12.5 % CPU); MATH's formulas (lofi_float, lofi_byte) their 14 divisions by a constant as multiplies (JIANT BYTE 0.16's build pass, tools/build.py const_divs: exact, less CPU a sample); the MACRO layer's dead branches out (flash). V10.7.68: EUCLID MODES > ROLE (MELODY CHORDS BASS ARP, was CHORD) on the harmony the other melodic tracks play, bar by bar (four bars when it changes), else SCL's key; a recorded melody EUCLID takes: its notes as they were; LFO / FX dice leftovers out (flash). V10.7.67: GEN and EUCLID MUTATE fuse two seeds (the owner: never one as it is; the second far from the first), A+B in the name; FX + OCT+ opens the punch-in editor again (as OCT+ on FX > PUNCH IN). V10.7.66: SCL > HARMONY (PROG LENGTH EVOLVE SKIP: every melodic sequence follows a progression); GEN 8 progressions more (neo-soul, jazz, IDM, progressive); EUCLID's melody CONTOUR RANGE MOTIF CHORD; macros FX > PUNCH IN's only (LFO's layer, HOME > ROUTES gone, MACROS in FX), GLO's layer says G4 UNDO; the PUNCH-IN EDITOR redone (the owner): a key WHAT (an effect, or PARAM: M1..M4, CUT PITCH TIMBRE VOLUME PAN DIST CHORUS DELAY REVERB VIBRATO on every track), HOW (an effect HOLD LATCH QUANT; PARAM HOLD RAMP UP RAMP DN SINE STUTTER S&H), AMOUNT (-100..+100 %; an effect its TARGET), TIME (1/16 .. 8 BARS); two slots A B; FX > PUNCH IN its knobs M1..M4 (PUNCH LANE: LEN RES); the layers MAP only (KNOBS STATE gone, ALGORITHM nothing held), the FX cards "M1 CUT"; FX + SELECT the FX pages (its dice gone). GENE while it plays waits for the bar to end (Hollusion); GENE 4: KEY NEW / KEEP (the first melodic track's key and mode kept), ENTRY ALL / BUILD (the new piece in a track a bar, the kit first); the old DIGITAL / NOISE / retired engines' conversions out (flash), the songs 7-8 notice out; voices past V10.6c's budget: tails first, FM6's quarter rate gone. V10.7.65: the PUNCH-IN EDITOR (the owner): OCT+ on FX > PUNCH IN opens it (the FX layer locked open; an ERASE picked on KNOB 4: OCT+ does it), DICE gone; the COMB / COMB- cut-off moved by the LFO and the ENV as the other filters; a key held and KNOB 1..4 its EFFECT (any, MOD a macro moved) TARGET (ALL SYN DRM T1..T6; MOD M1..M4) AMOUNT (MOD 1 BEAT .. 4 BARS) MODE (HOLD LATCH QUANT; MOD RAMP UP / DOWN SINE S&H), the mode said in the header; SELECT a slot (four, in the settings), OCT+ saves and plays it, OCT- leaves. V10.7.64: SCENE's LEADER PRESS (a key's note on every live track at once, each its own sound); SCENE on the live tracks only (it opened on T6, asleep with four: nothing heard, nothing drawn), every role with the key: a kit's DRUM loops its beat while a key is held, stopped too; the engines as the kit (the owner): FILTER TYPE CUT RES IMAGE (DIST the SENDS' only), PLAY POLY GLIDE UNISON VEL (the plain MORE gone, GL MODE off the panel), GAIN 0..+12 dB clean where a DRIVE was (ANALOG's MORE, WHEEL's COLOR; their DRIVE off the panel, kept), saved ('T' 'G'); FUGA's subject and answer on live tracks (the continuo after: with four tracks it began unheard); DUBSTEP's bass the wobble (a resonant low-pass on an LFO on the 1/8s, kept: not slowed to a breath); DRUM-X KIT's SNAP (was ATTACK), SOUND 3's SHORT (a filter's quick noise, was SNAP). V10.7.63: GENE: DUBSTEP SHOEGAZE METALCORE, each genre its FX STYLE (the drive where it belongLine truncated
#endif
#if FELUCCA_OTA && !FELUCCA_FLASH
#error "FELUCCA_OTA needs FELUCCA_FLASH"
+18 -68
View File
@@ -3450,81 +3450,31 @@ static void gen_cards(void)
}
static uint32_t gen_draw_sig(void)
{
return gen_sig() * 31u + gp.page * 7u + str_hash(gp.hot * 977u, gp.last) + ux.gen + anim_fr / 2u * 2246822519u +
return gen_sig() * 31u + gp.page * 7u + str_hash(gp.hot * 977u, gp.last) + ux.gen + song_draft * 3u +
chain_config.count * 7919u + live.mode * 13u + song.playing * 29u +
(chain.running ? (chain.row + 1u) * 104729u + chain.remaining * 1299709u : 0u);
}
BTAPP_FN static void gen_panel_bt(void)
{
uint32_t k;
char v[24];
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. */
graph_proj(2); /* (V10.6i) the lanes leave the helix a band of its own */
cv_rect(0, 124, 240, 16, T_SURF);
if (chain.running) {
v[0] = (char)('A' + (uint32_t)live.cur % 4u); v[1] = ' ';
fmt_int(v + 2, (int32_t)chain.row + 1);
k = str_len(v); v[k++] = '/'; fmt_int(v + k, chain.config.count);
str_cpy(v + str_len(v), " LEFT ", 7);
fmt_int(v + str_len(v), chain.remaining);
} else str_cpy(v, song.playing ? "PLAYING LOOP" : live.mode ? "SONG READY" : "LOOP MODE", sizeof v);
cv_text(4, 128, &AF_X, v, T_TEXT);
cv_text_r(236, 128, &AF_X, song_draft ? "DRAFT / SAVE" : "SAVE: SONG", T_ACCENT, T_SURF);
return;
}
graph_proj(0);
cv_rect(0, 124, 240, 16, T_SURF);
cv_text(4, 128, &AF_X, song_draft ? "DRAFT LOOP" : "SAVED PARTS", T_TEXT);
cv_text_r(236, 128, &AF_X, "SAVE: LOOP/SONG", T_ACCENT, T_SURF);
}
/* (V10.6d) GENE: a double helix turning under the parts, its rungs the SEED's own bases (two bits a rung, four
* 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 == GEN_EXPLORE ? 28u : gp.genre) * 40503u, t = 0, i; /* (V10.7.63:
* EXPLORE's 28 as before) */
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 */
int heat = 1; /* (V10.6q, the owner) the DNA in the thermal palette */
uint16_t f = T_THEME, b = T_ACCENT;
if (n > 16u)
return;
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 (heat) { /* along the strand violet > red > orange > yellow and back,
* drifting; the strand behind dimmer */
uint32_t p = (x * 2u + anim_fr * 3u) % 440u;
f = heat_col(24 + (int32_t)(p < 220u ? p : 440u - p));
b = heat_col(24 + (int32_t)(p < 220u ? 219u - p : p - 220u));
}
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;
uint16_t c = ux_mix(T_SURF, heat_col(40 + 64 * (int32_t)(s >> (x / 10u % 16u * 2u) & 3u)), 88);
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 ? f : heat ? ux_mix(T_SURF, f, 45) : T_DIM);
cv_rect((int32_t)x, cy - d, 2, 2, z > 0 ? (heat ? ux_mix(T_SURF, b, 45) : T_DIM) : b);
}
}
/* (V10.8.14, the owner's "partitura viva") GEN's panel: its four settings on the cards, the song under them as
* ARRANGE draws it (ui_lzsave.c graph_score; no song yet: the sections), one line of state and what to press */
static void gen_panel(void)
{
if (bt_hw_seg()) { /* (its own words at the foot: not the song's length under them) */
char v[40];
uint32_t k;
if (chain_config.count)
graph_score(1);
else {
proj_nofoot = 1;
gen_panel_bt();
graph_proj(0);
proj_nofoot = 0;
}
cv_rect(0, 124, 240, 16, T_SURF);
if (chain.running) {
v[0] = (char)('A' + (uint32_t)live.cur % 4u); v[1] = ' ';
fmt_int(v + 2, (int32_t)chain.row + 1);
k = str_len(v); v[k++] = '/'; fmt_int(v + k, chain.config.count);
} else
graph_proj(chain_config.count ? 2 : 0);
gen_helix();
str_cpy(v, song_draft ? "DRAFT" : song.playing ? "PLAYING" : chain_config.count ? "SONG READY" : "READY", sizeof v);
str_cpy(v + str_len(v), song_draft ? " \xB7 SAVE KEEPS \xB7 OCT+ NEW" : " \xB7 OCT+ NEW \xB7 OCT- BACK", sizeof v - str_len(v));
cv_text_in(4, 128, 232, &AF_X, v, song_draft ? T_ACCENT : T_TEXT, T_SURF);
}
#include "gen_track.c"
+3 -1
View File
@@ -1387,7 +1387,9 @@ static __attribute__((noinline)) uint32_t graph_signature(void)
if (fx_on() && (song.playing || bg_energy() > 2)) /* .. and with the sound while it sounds: FX live) */
h ^= anim_fr / 2u * 2246822519u;
if (pg->graph == GR_HARM) /* (V10.7.70) the chord playing, the progression */
h ^= (hm_now() + 1u) * 40503u * song.playing + (uint32_t)song.g[G_HPROG] * 977u;
h ^= (hm_now() + 1u) * 40503u * song.playing + (uint32_t)song.g[G_HPROG] * 977u + hm_n * 131u;
if (pg->id[0] == P_CHRD) /* (V10.8.14) CHORD: the last key's degree lit */
h ^= (uint32_t)last_note * 7919u;
if (pg->graph == GR_LFO && ui_hold < 3u) /* (JIANT 0.5) the LFO runs: its phase, its level (0.9.9-beta4: held under load) */
h ^= (t->lfo_ph >> 23) * 2654435761u ^ (uint32_t)(t->lfo_val * t->lfo_fade >> 22);
if (pg->graph == GR_ADSR && ui_hold < 3u) /* the envelope's dot: every voice's stage and level */
+38 -60
View File
@@ -229,62 +229,53 @@ static uint16_t note_col(uint32_t n)
{
return heat_col(40 + (int32_t)(n % 12u) * 200 / 11);
}
/* (V10.8.14, the owner's "teclado y grados") KEY: an octave of keys, the scale's lit in their colours, ROOT a dot; under it
* "D MINOR" and the scale's notes from ROOT */
static __attribute__((noinline)) 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"};
static const uint8_t BLK[12] = {0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0};
uint32_t mask = scale_mask(t), i, rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11), first = 12u, prev = 12u;
int32_t px[12], py[12];
uint32_t mask = scale_mask(t), rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11), lit = 0, i;
const char *u = "";
char b[16];
for (i = 0; i < 12u; i++) {
uint32_t a = (uint32_t)(i * 65536u / 12u) + 0xC000u; /* (C on top, clockwise; a turn 65536, in decimal: the
* build's register lint reads 0x10000 as an SFR) */
px[i] = 62 + (og_cos(a) * 42 >> 15);
py[i] = 58 + (og_sin(a) * 42 >> 15);
}
for (i = 0; i < 12u; i++) { /* the scale joined */
uint32_t n = (rt + i) % 12u;
if (!(mask >> i & 1u))
continue;
if (prev < 12u)
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, note_col(prev));
for (i = 0; i < 12u; i++) {
uint32_t deg = (i + 12u - rt) % 12u, in = mask >> deg & 1u;
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], 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);
(void)pg; /* (QUANT and ALL TR stood at the right: their cards say them) */
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,
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);
}
char b[48];
(void)pg;
for (i = 0; i < 12u; i++)
if (mask >> i & 1u) lit |= 1u << ((rt + i) % 12u);
piano(4, 84, lit, rt, 0);
str_cpy(b, NN12[rt], 4);
str_cpy(b + str_len(b), " ", 2);
param_format(&TP[P_SCALE], t->p[P_SCALE], b + str_len(b), &u);
cv_text(8, 94, &AF_M, b, T_TEXT);
b[0] = 0;
for (i = 0; i < 12u; i++)
if (mask >> i & 1u && str_len(b) < 40u) {
str_cpy(b + str_len(b), NN12[(rt + i) % 12u], 4);
str_cpy(b + str_len(b), " ", 2);
}
cv_text(8, 116, &AF_X, b, T_MID);
}
/* CHORD: a card a degree of the key, the chord it plays (its name, its degree), the one of the last key played lit
* (else I); that chord's notes lit on the keys under them (chord_peek: as the keys play it now) */
static __attribute__((noinline)) void graph_chord(const track_t *t)
{
static const char *const RN[7] = {"I", "II", "III", "IV", "V", "VI", "VII"};
uint32_t mask = scale_mask(t), deg[12], c = 0, i, d, rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11);
uint32_t mask = scale_mask(t), c = 0, i, d, sel = 0, n, lit = 0, rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11);
uint8_t pc[12], nt[8];
const char *u = "";
char b[32], v[12];
for (i = 0; i < 12u; i++)
if (mask >> i & 1u && c < 7u)
deg[c++] = i;
pc[c++] = (uint8_t)i;
for (d = 0; d < c; d++)
if (pc[d] == ((uint32_t)last_note + 12u - rt) % 12u) sel = d;
for (d = 0; d < c; d++) {
int32_t x = 6 + (int32_t)d * 33;
uint16_t f = d == sel ? T_ACCENT : T_RAISE;
if (c == 7u) chord_nm(v, pc, d, rt); else str_cpy(v, NN12[(rt + pc[d]) % 12u], 4);
cv_rect(x, 2, 30, 36, f);
cv_text_in(x, 6, 30, text_w(&AF_M, v) <= 28 ? &AF_M : &AF_X, v, d == sel ? T_INK : T_TEXT, f);
cv_text_in(x, 26, 30, &AF_X, RN7[d], d == sel ? T_INK : T_DIM, f);
}
n = c ? chord_peek(t, 48u + rt + pc[sel], nt) : 0u;
for (i = 0; i < n && i < 8u; i++) lit |= 1u << (nt[i] % 12u);
piano(44, 70, lit, (rt + (c ? pc[sel] : 0u)) % 12u, T_ACCENT);
if (t->p[P_CHRD]) {
param_format(&CHORD_DESC[0], t->p[P_CHRD], b, &u);
str_cpy(b + str_len(b), " \xB7 ", 32 - str_len(b));
@@ -292,20 +283,7 @@ static __attribute__((noinline)) void graph_chord(const track_t *t)
str_cpy(b + str_len(b), v, 32 - str_len(b));
} else
str_cpy(b, "CHORD OFF \xB7 ONE NOTE A KEY", 32);
ed_cap(10, 6, b, T_TEXT);
for (d = 0; d < c; d++) {
uint8_t nt[8];
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++) {
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);
}
cv_text(8, 120, &AF_X, b, T_MID);
}
static void graph_arp(const track_t *t)
{
+82 -48
View File
@@ -349,58 +349,92 @@ static __attribute__((noinline)) void graph_tl(void)
}
cv_text(4, 128, &AF_X, "KEYS: F3-D4 MUTE \xB7 F4-B4 FROM", T_MID);
}
/* PROJECT: the sections, the arrangement's chips, the song's strip (ar: ARRANGE, its rows picked; 2: GENE's lanes) */
/* (V10.8.14, the owner's "partitura viva") ARRANGE and GENE: the song as blocks as wide as their bars (32 bars at most
* on the screen, round the playhead or the row picked), the parts' strip on top (the row picked, GENE the row playing,
* its part's colour, the others dim; its bars when not 4), a lane a track in its colour, a part's letter only where the
* track plays another part than its row's (a VAR MUTE: an empty frame); the playhead a white line */
static void graph_score(int gen)
{
uint32_t n = chain_config.count, t = 0, i, k, acc, play = 0, f = 0, W, w0 = 0;
uint32_t sel = gen ? (chain.running ? chain.row : 255u) : ui.song_row;
char b[8];
for (i = 0; i < n; i++) {
if (i < sel) f += chain_config.row[i].bars;
if (chain.running && i < chain.row) play += chain_config.row[i].bars;
t += chain_config.row[i].bars;
}
if (chain.running && chain.row < n) play += chain_config.row[chain.row].bars - chain.remaining;
if (chain.running) f = play;
W = t < 32u ? t : 32u;
if (t > W) w0 = f > 8u ? f - 8u : 0u;
if (w0 + W > t) w0 = t - W;
for (k = 0; k < NTRK; k++) {
b[0] = 'T'; b[1] = (char)('1' + k); b[2] = 0;
cv_text(4, 21 + (int32_t)k * 16, &AF_X, b, trk_col(k));
}
for (i = 0, acc = 0; i < n && W; acc += chain_config.row[i].bars, i++) {
const chain_row_t *r = &chain_config.row[i];
uint32_t s = r->slot & 3u, a = acc > w0 ? acc : w0, e = acc + r->bars < w0 + W ? acc + r->bars : w0 + W;
int32_t x, w;
uint16_t c = sec_col(s), cf;
if (acc + r->bars <= w0 || acc >= w0 + W)
continue;
x = 24 + (int32_t)((a - w0) * 212u / W);
w = 24 + (int32_t)((e - w0) * 212u / W) - x - 1;
if (w < 1) w = 1;
cf = i == sel ? c : ux_mix(T_SURF, c, 40);
cv_rect(x, 2, w, 14, cf);
if (w >= 9) {
b[0] = (char)('A' + s); b[1] = 0;
if (r->bars != 4u && w >= 18) fmt_int(b + 1, r->bars);
cv_text_in(x, 2 + CAP_IN(X, 14), w, &AF_X, b, i == sel ? T_INK : T_TEXT, cf);
}
if (song_idx.scene[song_cur][i].on) cv_rect(x + w - 3, 4, 2, 2, T_TEXT); /* a scene: a dot */
for (k = 0; k < NTRK; k++) {
int32_t y = 19 + (int32_t)k * 16;
uint32_t src = row_src(i, k, s);
uint16_t tc = trk_col(k);
if (row_var(i, k) == RV_MUTE) {
cv_frame(x, y, w, 12, ux_mix(T_SURF, tc, 30));
continue;
}
cv_rect(x, y, w, 12, ux_mix(T_SURF, tc, i == sel ? 60 : 24));
if (src != s && w >= 9) { /* another part: its letter in a pill of its colour */
b[0] = (char)('A' + src); b[1] = 0;
cv_rect(x + w / 2 - 5, y, 11, 12, sec_col(src));
cv_text_in(x + w / 2 - 5, y + CAP_IN(X, 12), 11, &AF_X, b, T_INK, sec_col(src));
}
}
}
if (chain.running && play >= w0 && play <= w0 + W && W)
cv_rect(24 + (int32_t)((play - w0) * 212u / W), 0, 1, 114, T_TEXT);
if (gen)
return;
if (!n) {
cv_text_in(4, 128, 232, &AF_X, "NO ROWS: OCT+ ADDS ONE", T_MID, T_SURF);
return;
}
if (ui.song_row < n) { /* the row picked: ROW n/N . its part and bars */
char v[24] = "ROW ";
fmt_int(v + 4, (int32_t)ui.song_row + 1);
k = str_len(v); v[k++] = '/'; fmt_int(v + k, (int32_t)n);
k = str_len(v); v[k++] = ' '; v[k++] = '\xB7'; v[k++] = ' '; v[k++] = (char)('A' + (chain_config.row[ui.song_row].slot & 3u));
fmt_int(v + k, chain_config.row[ui.song_row].bars);
cv_text(4, 128, &AF_X, v, T_TEXT);
} else
cv_text(4, 128, &AF_X, "END", T_THEME);
{
char v[24];
song_len_txt(v, t);
cv_text_r(236, 128, &AF_X, v, T_MID, T_SURF);
}
}
/* PROJECT: the sections, the arrangement's chips, the song's strip (ar: ARRANGE, its rows picked) */
static uint8_t proj_nofoot; /* (gen.c: GENE draws its own words where the song's length stands) */
static void graph_proj(int ar)
{
uint32_t i, total = 0, sel = (uint32_t)song.g[G_SLOT] - 1u, n = chain_config.count;
char b[24];
if (ar == 2) { /* (beta5) GENE's lanes (TIMELINE's until V10.6o): the song left to
* right, its bars the width; a lane for the rows (PRT, the parts; was SEC) and one a track:
* its own section calm (half), another bright with its letter, MUTE an
* empty frame, a VAR its short name. (V10.6o: no scan lines) */
static const char *const LN[NTRK + 1] = {"PRT", "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 = song_bars(4u), acc = 0, played = 0, j;
int32_t ls = 15, lh = ls - 2; /* (V10.6i) lanes 2 px shorter, the helix a band of its own */
for (j = 0; j <= NTRK; j++)
cv_text(5, 4 + (int32_t)j * ls + (j ? 3 : 2), &AF_X, LN[j], T_DIM);
for (i = 0; i < n && t; i++) {
const chain_row_t *r = &chain_config.row[i];
uint32_t s = r->slot & 3u;
int32_t x = 24 + (int32_t)(acc * 212u / t), w = 24 + (int32_t)((acc + r->bars) * 212u / t) - x;
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 * 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 {
cv_rect(x, y, w, h, c);
if (j < NTRK) cv_rect(x, y + h, w, 2, ux_mix(T_BG, c, 45));
if (i) cv_rect(x, y, 1, j < NTRK ? h + 2 : h, ux_mix(T_BG, c, 15));
if (w >= 12 && (!j || !own)) {
b[0] = (char)('A' + src); b[1] = 0;
if (!j && w >= 22) fmt_int(b + 1, r->bars);
cv_text_on(x + 3, y + 2 + (h - 15) / 2, &AF_X, b, T_INK, c);
}
if (v && v < RV_N && w >= 24) cv_text_r(x + w - 2, y + 2 + (h - 15) / 2, &AF_X, RV_SH[v], T_INK, c);
}
}
if (chain.running && i < chain.row) played += r->bars;
acc += r->bars;
}
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 * ls, T_TEXT);
}
song_len_txt(b, t);
cv_text_r(236, 128, &AF_X, n ? b : "NO ROWS: OCT+ ADDS ONE", T_MID, T_SURF);
return;
} else
for (i = 0; i < 4u; i++) {
int32_t x = LZ_TX(i);
int used = graph_project_used(i), pick = !ar && i == (sel & 3u);
@@ -578,7 +612,7 @@ static void graph_save_lz(const page_t *pg)
else if (SONG_TRK(pg)) graph_tl();
else if (SONG_PARTS(pg)) graph_parts();
else if (SONG_CLIPS(pg) || SONG_TAKE(pg)) graph_clips();
else if (pg->graph == GR_SONG) graph_proj(1);
else if (pg->graph == GR_SONG) graph_score(0); /* (V10.8.14: ARRANGE's partitura viva) */
else if (pg->graph == GR_SLOTS) { if (lv == SV_PROJ) graph_proj(0); else graph_lib(); }
else if (pg->graph == GR_USER) graph_sound();
else graph_lz_presets();
+78 -57
View File
@@ -129,81 +129,102 @@ static __attribute__((noinline)) void sc_put(uint32_t k, int32_t v)
}
ui.force = 1;
}
/* (V10.7.70, the owner) SCL > HARMONY's picture: the progression's chords as roman numerals in the key ("-" minor,
* "o" diminished), each its root's colour (SCL's keys'), its name under it; the one playing lit */
/* (V10.8.14, the owner's "teclado y grados") SCL's pictures share a key's names, a chord's name and an octave of keys */
static const char NN12[12][3] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"};
static const char RN7[7][4] = {"I", "II", "III", "IV", "V", "VI", "VII"};
/* the triad on degree d of the seven notes pc (semitones from ROOT rt) as b (4): its root's name, "-" minor, the degree
* sign diminished, "+" augmented (the faces have no lowercase) */
static void chord_nm(char *b, const uint8_t *pc, uint32_t d, uint32_t rt)
{
uint32_t r = pc[d % 7u], th = (pc[(d + 2u) % 7u] + 12u - r) % 12u, fi = (pc[(d + 4u) % 7u] + 12u - r) % 12u;
str_cpy(b, NN12[(r + rt) % 12u], 4);
str_cpy(b + str_len(b), fi == 6u ? "\xB0" : fi == 8u ? "+" : th == 3u ? "-" : "", 2);
}
/* an octave of keys from C at y, h high, in x 8..232 as the device's: the notes lit (bit n: note n) in their colour (col
* 0) or col, their names on the white keys (the black ones' when lit), the root a dot */
static void piano(int32_t y, int32_t h, uint32_t lit, uint32_t rt, uint16_t col)
{
static const uint8_t WH[7] = {0, 2, 4, 5, 7, 9, 11}, BK[5] = {1, 3, 6, 8, 10}, BX[5] = {1, 2, 4, 5, 6};
uint32_t i;
int32_t bh = h * 58 / 100;
for (i = 0; i < 12u; i++) {
uint32_t blk = i >= 7u, n = blk ? BK[i - 7u] : WH[i], on = lit >> n & 1u;
int32_t x = blk ? 2 + (int32_t)BX[i - 7u] * 32 - 10 : 8 + (int32_t)i * 32, w = blk ? 19 : 30, kh = blk ? bh : h;
uint16_t c = on ? (col ? col : note_col(n)) : blk ? 0x10A2u : 0xCE59u;
cv_rect(x, y, w, kh, c);
if (!blk || on)
cv_text_in(x, y + kh - (blk ? 12 : 22), w, &AF_X, NN12[n], on || !blk ? T_INK : T_DIM, c);
if (n == rt)
cv_rect(x + w / 2 - 2, y + kh - (blk ? 4 : 8), 4, 4, blk && !on ? 0xFFFFu : 0x0000u);
}
}
/* (V10.7.70; V10.8.14) SCL > PROG: a card a chord of the progression, its name, its degree and its bar, the one playing
* lit, under them where the progression is; OFF: the cards dim and what turns it on */
static __attribute__((noinline)) void graph_harm(void)
{
static const char RN[7][4] = {"I", "II", "III", "IV", "V", "VI", "VII"};
const track_t *t = trk;
uint32_t i, m, np = 0, now = song.playing ? hm_now() : 9u;
uint32_t i, m, np = 0, off = !song.g[G_HPROG] || !hm_n, n = off ? 4u : hm_n, now = song.playing && !off ? hm_now() : 9u;
int32_t w = 224 / (int32_t)n;
uint8_t pc[12];
char b[8];
while (t < trk + trk_live - 1 && drum_track(t)) t++;
m = scale_mask(t);
if (__builtin_popcount(m & 0xFFFu) != 7) m = 0xAB5u; /* (no mode of seven: major's, as seq.c's chords) */
for (i = 0; i < 12u; i++) if ((m >> i) & 1u) pc[np++] = (uint8_t)i;
if (!song.g[G_HPROG]) { cv_text_in(8, graph_ht / 2 - 8, 224, &AF_M, "PROG: A PROGRESSION", T_DIM, T_SURF); return; }
for (i = 0; i < hm_n; i++) {
uint32_t d = (uint32_t)hm_dg[i] % 7u, r = pc[d], th = pc[(d + 2u) % 7u] + 12u - r, fi = pc[(d + 4u) % 7u] + 12u - r;
uint16_t c = note_col(r + (uint32_t)t->p[P_ROOT]);
char b[6], *q = b;
const char *s = RN[d];
while (*s) *q++ = *s++;
if (fi % 12u == 6u) *q++ = 'o'; /* (the font's capitals: "-" minor, "o" diminished) */
else if (th % 12u == 3u) *q++ = '-';
*q = 0;
cv_rect(8 + (int32_t)i * 56, 2, 50, graph_ht - 4, i == now ? c : ux_mix(c, T_SURF, 70));
cv_text_in(8 + (int32_t)i * 56, graph_ht / 2 - 14, 50, &AF_L, b, i == now ? T_BG : T_TEXT, T_SURF);
for (i = 0; i < n; i++) {
int32_t x = 8 + (int32_t)i * w;
uint32_t d = off ? i : (uint32_t)hm_dg[i] % 7u;
uint16_t c = i == now ? T_ACCENT : T_RAISE, ink = i == now ? T_INK : off ? T_DIM : T_TEXT;
cv_rect(x, 2, w - 6, 72, c);
if (off) str_cpy(b, "-", 2); else chord_nm(b, pc, d, (uint32_t)t->p[P_ROOT]);
cv_text_in(x, 12, w - 6, text_w(&AF_L, b) <= w - 8 && large_face_has(b) ? &AF_L : &AF_M, b, ink, c);
if (!off) cv_text_in(x, 44, w - 6, &AF_X, RN7[d], ink, c);
str_cpy(b, "BAR ", 8); fmt_int(b + 4, (int32_t)i + 1);
cv_text_in(x, 58, w - 6, &AF_X, b, ink, c);
}
cv_rect(8, 82, 218, 3, T_RAISE);
if (now < n) cv_rect(8, 82, 218 * (int32_t)(now + 1u) / (int32_t)n, 3, T_ACCENT);
if (off) cv_text(8, 94, &AF_X, "PROG OFF \xB7 KNOB 1 PICKS ONE", T_DIM);
}
/* (V10.8.14) SCL > SCENE: a row a track, its colour's pill, its role, the notes it plays (their range: names and a bar
* over C2 .. C7), the one picked its role lit; one line: what that role does */
static void graph_scene(void)
{
uint32_t i, j, n, h = graph_h();
int32_t cw = 38, x0 = 6, y0 = 30, yh = (int32_t)h - y0 - 27; /* (V10.7.63: two lines under it) */
static const char *const RD[SC_N] = {"PLAYS ITS OWN SEQUENCE", "HOLDS EACH NOTE'S CHORD", "ARPEGGIATES EACH NOTE'S CHORD",
"A BASS LINE UNDER THE NOTES", "A LINE ABOVE THE NOTES", "A NEW BEAT EACH KEY, WHILE HELD"};
uint32_t i, j, n;
uint8_t o[KB_CH + 1];
char b[48];
for (i = 0; i < NTRK; i++) {
track_t *t = &trk[i];
int32_t x = x0 + (int32_t)i * cw;
uint32_t r = drum_track(t) && scn_role[i] != SC_DRUM ? SC_KEEP : scn_role[i];
uint16_t c = r == SC_KEEP ? T_DIM : r == SC_CHORD ? T_THEME : r == SC_ARP ? T_MID : r == SC_BASS ? T_ACCENT : T_TEXT;
char b[3] = {'T', (char)('1' + i), 0};
cv_text_in(x, 2, cw - 4, &AF_X, b, i == sc_trk ? T_TEXT : T_DIM, T_SURF);
cv_text_in(x - 2, 14, cw, &AF_X, scn_on == 8u ? "PRESS" : scn_on >= 2u && i == scn_on - 2u ? "LEADS" : drum_track(t) && r == SC_KEEP ? "KIT" : SC_ROLE[r],
scn_on >= 2u && i == scn_on - 2u ? T_ACCENT : c, T_SURF);
if (i == sc_trk) cv_frame(x - 3, 0, cw - 1, 25, T_ACCENT);
if (i >= trk_live) continue;
if ((r == SC_KEEP || r == SC_DRUM) && scn_on != 8u) { /* its own sequence: the steps, dim; DRUM: the beat's lanes lit */
for (j = 0; j < 16u; j++) {
uint32_t h = t->step[j].hit;
int32_t y = y0 + (int32_t)j * yh / 16;
if (r == SC_DRUM) {
if (h & 1u) cv_rect(x + 1, y, 9, 2, heat_col(60));
if (h & 6u) cv_rect(x + 12, y, 9, 2, heat_col(150));
if (h & 24u) cv_rect(x + 23, y, 7, 2, heat_col(235));
} else if (t->step[j].time == ST_NOTE) cv_rect(x + 2, y, cw - 10, 2, T_DIM);
}
int32_t y = 2 + (int32_t)i * 19;
uint32_t r = drum_track(t) && scn_role[i] != SC_DRUM ? SC_KEEP : scn_role[i], lo = 127, hi = 0;
const char *rn = scn_on == 8u ? "PRESS" : scn_on >= 2u && i == scn_on - 2u ? "LEADS" : drum_track(t) && r == SC_KEEP ? "KIT" : SC_ROLE[r];
b[0] = 'T'; b[1] = (char)('1' + i); b[2] = 0;
cv_rect(4, y, 26, 16, i < trk_live ? trk_col(i) : T_RAISE);
cv_text_in(4, y + CAP_IN(X, 16), 26, &AF_X, b, i < trk_live ? trk_ink(i) : T_DIM, i < trk_live ? trk_col(i) : T_RAISE);
cv_text(36, y + 1, &AF_M, rn, i == sc_trk ? T_ACCENT : r == SC_KEEP ? T_DIM : T_TEXT);
cv_rect(150, y + 6, 84, 5, T_RAISE);
if (i >= trk_live || r == SC_KEEP || r == SC_DRUM || scn_on == 8u) {
cv_text(98, y + 4, &AF_X, i >= trk_live ? "ASLEEP" : r == SC_DRUM ? "BEAT" : "OWN SEQ", T_DIM);
continue;
}
n = scn_on == 8u ? (o[0] = (uint8_t)last_note, 1u) : scn_notes(t, r, scn_on >= 2u ? scn_fnote : last_note, o, 1); /* the last key's (or leading note's) notes on it */
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, note_col(o[j]));
}
}
{ /* (V10.7.63, the owner: "confusing") what the picked track's role does, in words; then the keys */
static const char *const RD[SC_N] = {"PLAYS ITS OWN SEQUENCE", "HOLDS EACH NOTE'S CHORD", "ARPEGGIATES EACH NOTE'S CHORD",
"A BASS LINE UNDER THE NOTES", "A LINE ABOVE THE NOTES", "A NEW BEAT EACH KEY, WHILE HELD"};
uint32_t r = scn_role[sc_trk % NTRK] % SC_N;
char b[48] = "T1 ";
b[1] = (char)('1' + sc_trk % NTRK);
if (scn_on == 8u)
str_cpy(b, "PRESS: EVERY TRACK PLAYS THE KEYS", 48);
else if (scn_on >= 2u && sc_trk % NTRK == scn_on - 2u)
str_cpy(b + 3, "LEADS: ITS NOTES PLAY THE OTHERS", 45);
else
str_cpy(b + 3, RD[r], 45);
cv_text_in(4, (int32_t)h - 22, 232, &AF_X, scn_on ? b : "SCENE OFF: KNOB 1 KEYS OR A TRACK LEADS", scn_on ? T_TEXT : T_DIM, T_SURF);
cv_text_in(4, (int32_t)h - 11, 232, &AF_X, "OCT+ DICE OCT- ALL KEEP", scn_on ? T_ACCENT : T_DIM, T_SURF);
n = scn_notes(t, r, scn_on >= 2u ? scn_fnote : last_note, o, 1);
for (j = 0; j < n; j++) { if (o[j] < lo) lo = o[j]; if (o[j] > hi) hi = o[j]; }
if (!n) continue;
str_cpy(b, NN12[lo % 12u], 4); fmt_int(b + str_len(b), (int32_t)lo / 12 - 1);
str_cpy(b + str_len(b), "-", 2);
str_cpy(b + str_len(b), NN12[hi % 12u], 4); fmt_int(b + str_len(b), (int32_t)hi / 12 - 1);
cv_text(98, y + 4, &AF_X, b, T_MID);
lo = (uint32_t)clamp((int32_t)lo, 36, 96); hi = (uint32_t)clamp((int32_t)hi, 36, 96);
cv_rect(150 + (int32_t)(lo - 36u) * 84 / 60, y + 6, (int32_t)(hi - lo) * 84 / 60 + 2, 5, trk_col(i));
}
str_cpy(b, "T1 ", 48);
b[1] = (char)('1' + sc_trk % NTRK);
if (scn_on == 8u) str_cpy(b, "PRESS: EVERY TRACK PLAYS THE KEYS", 48);
else if (scn_on >= 2u && sc_trk % NTRK == scn_on - 2u) str_cpy(b + 3, "LEADS: ITS NOTES PLAY THE OTHERS", 45);
else str_cpy(b + 3, RD[scn_role[sc_trk % NTRK] % SC_N], 45);
cv_text_in(4, 120, 232, &AF_X, scn_on ? b : "SCENE OFF: KNOB 1 KEYS OR A TRACK LEADS", scn_on ? T_TEXT : T_DIM, T_SURF);
}
/* (V10.6j) SCENE's DRUM: key k's beat into the kit, 16 steps (main loop: ui_input.c's poll; the key in the audio side
+7
View File
@@ -174,6 +174,13 @@ int main(void)
go_title("GLOBAL"); frames(2); ok &= !head_trk();
bad += check("track bar: TRACK N / ENGINE on T1..T6's colours (header and the number's box); none on HOME, GLO, JAM", ok);
}
{ /* (V10.8.14) SCL > CHORD's names: the triads of D major, "-" minor, the degree sign diminished */
static const uint8_t PC[7] = {0, 2, 4, 5, 7, 9, 11};
static const char *const W[7] = {"D", "E-", "F#-", "G", "A", "B-", "C#\xB0"};
char nm[4];
for (ok = 1, i = 0; i < 7u; i++) { chord_nm(nm, PC, i, 2); ok &= str_eq(nm, W[i]) && text_w(&AF_M, nm) <= 28; }
bad += check("SCL chords: D major's seven named (D E- F#- G A B- C#dim), each fits its card", ok);
}
if (bad) printf("stepfx: %d failed\n", bad);
else printf("stepfx: all passed\n");
return bad != 0;
+2128 -2126
View File
File diff suppressed because it is too large. Load diff