V10.8.16: ENV's TRACKS (the six envelopes together) gone (the owner), its room for JIANT BYTE's ENV layers and LFO satellite and MIXER's CHANNELS HUD (BYTE's code, GPL, as it has it); FX > DIST's drive drawn once on its own page; SENDS' percents above their lines; 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 04:36:49 +00:00
1 parent 6132c9f379
commit 2be88459c9
8 files changed
+2253 -2256

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.15" /* (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.16" /* (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"
+2
View File
@@ -17,6 +17,8 @@ static const engine_t *trk_engp(const track_t *t) { return ENGINES[trk_eng(t)];
static const uint16_t TRK_COL[6] = {0xFE87u, 0xFC45u, 0xF9C7u, 0xF9D6u, 0xA2FFu, 0x3C7Fu};
#define trk_col(k) TRK_COL[(k) % 6u]
#define trk_ink(k) ((k) % 6u >= 4u ? 0xFFFFu : 0x0000u)
#define HUD_YE 0xEF8Bu /* (V10.8.15, JIANT BYTE's HUD: the cursor yellow, the tags' blue) */
#define HUD_BL 0x29FFu
static int project_save(uint32_t slot);
static int song_save_as(uint32_t target, const char *name);
static int song_draft_begin(void);
+109 -78
View File
@@ -70,38 +70,53 @@ static uint16_t heat_y(int32_t y, int32_t y0, int32_t y1, uint16_t c)
/* Matches voice.c: attack is linear, decay and release are exponential
* (env += (target - env) * k each tick, ~99 % after the set time). Time
* axis is the parameter value (the times themselves are exponential). */
/* (V10.8.16, JIANT BYTE's ENV "layers" (GPL, as BYTE has it), the owner's pick) */
static uint8_t adsr_h[10], adsr_ps[NVOICE], adsr_tr = 0xFF;
static void graph_adsr(const track_t *t, uint16_t c)
{
const page_t *pg = cur_page();
int32_t a = 4 + t->p[pg->id[0]] * 50 / 127, d = 6 + t->p[pg->id[1]] * 50 / 127, r = 6 + t->p[pg->id[3]] * 60 / 127;
int32_t top = 6 * graph_ht / 100, bot = 88 * graph_ht / 100, sus = t->p[pg->id[2]] * 1000 / 127; /* 0..1000 */
int32_t x0 = 12, x1 = x0 + a, x3 = 226 - r, i, px, py;
int32_t e = 32768; /* exp(-4.6 u), Q15 */
#define EGY(lvl) (bot - (lvl) * (bot - top) / 1000)
cv_rect(PANEL_X0, bot + 2, PANEL_W, 1, T_RAISE);
cv_line_t(x0, bot, x1, top, heat_y((bot + top) / 2, top, bot, c), 2); /* attack: linear */
px = x1;
py = top;
for (i = 1; i <= d; i++) { /* decay: exponential to SUS */
int32_t lvl;
e = (e * (32768 - 150733 / d)) >> 15; /* k^d = exp(-4.6) */
lvl = sus + ((1000 - sus) * e >> 15);
cv_line_t(px, py, x1 + i, EGY(lvl), heat_y(py, top, bot, c), 2);
px = x1 + i;
py = EGY(lvl);
int32_t a = 4 + t->p[pg->id[0]] * 34 / 127, d = 6 + t->p[pg->id[1]] * 34 / 127, r = 6 + t->p[pg->id[3]] * 40 / 127;
int32_t sus = t->p[pg->id[2]] * 1000 / 127, sl = 150 - a - d - r, x0 = 12, bot = 94 * graph_ht / 100, H = 52 * graph_ht / 100;
int16_t lv[160];
int32_t n = 0, i, k, e = 32768;
uint32_t tr = (uint32_t)(t - trk) % NTRK;
uint16_t tc = TRK_COL[tr % 6u];
(void)c;
if (sl < 8) sl = 8;
if (adsr_tr != tr) { memset(adsr_h, 0, sizeof adsr_h); memset(adsr_ps, 0, sizeof adsr_ps); adsr_tr = (uint8_t)tr; }
for (i = 0; i < NVOICE; i++) { /* a note begun: a layer */
if (t->v[i].stage == 1u && adsr_ps[i] != 1u) {
for (k = 9; k > 0; k--) adsr_h[k] = adsr_h[k - 1]; /* (no memmove on the device) */
adsr_h[0] = (uint8_t)clamp(t->v[i].vel ? t->v[i].vel : 100, 20, 127);
}
adsr_ps[i] = t->v[i].stage;
}
cv_line_t(px, py, x3, EGY(sus), heat_y(py, top, bot, c), 2); /* sustain */
px = x3;
py = EGY(sus);
e = 32768;
for (i = 1; i <= r; i++) { /* release: exponential to 0 */
e = (e * (32768 - 150733 / r)) >> 15;
cv_line_t(px, py, x3 + i, EGY(sus * e >> 15), heat_y(py, top, bot, c), 2);
px = x3 + i;
py = EGY(sus * e >> 15);
for (i = 0; i <= a && n < 160; i++) lv[n++] = (int16_t)(i * 1000 / (a ? a : 1)); /* the shape, a level a column */
for (i = 1; i <= d && n < 160; i++) { e = (e * (32768 - 150733 / d)) >> 15; lv[n++] = (int16_t)(sus + ((1000 - sus) * e >> 15)); }
for (i = 0; i < sl && n < 160; i++) lv[n++] = (int16_t)sus;
for (i = 1, e = 32768; i <= r && n < 160; i++) { e = (e * (32768 - 150733 / r)) >> 15; lv[n++] = (int16_t)(sus * e >> 15); }
for (k = 9; k >= 0; k--) { /* the layers, the far first */
int32_t ox = x0 + k * 7, oy = bot - k * 5, g = k ? adsr_h[k] : 127, py = 0;
uint16_t lc = k ? ux_mix(T_BG, HUD_BL, 85 - k * 7) : tc;
if (k && !adsr_h[k]) continue;
for (i = 0; i < n; i++) {
int32_t y = oy - lv[i] * H / 1000 * g / 127;
if (i) cv_line_t(ox + i - 1, py, ox + i, y, lc, k ? 1 : 2);
py = y;
}
}
if (pg->id[0] == P_ATK) { /* (JIANT 0.5) the track's envelope now: the loudest voice's */
const voice_t *bv = 0; /* level as a dot on the curve, a line down to the axis */
for (i = 0; i < 160; i += 3) cv_pset(x0 + i, bot + 2, T_LINE);
{ /* A D S R: tags at the front shape's corners */
static const char *const L4[4] = {"A", "D", "S", "R"};
int32_t cx[4] = {a, a + d, a + d + sl / 2, n - 1}, q;
for (q = 0; q < 4; q++) {
int32_t x = x0 + cx[q], y = bot - lv[cx[q] < n ? cx[q] : n - 1] * H / 1000 - 14;
cv_rect(x - 3, y, 9, 11, T_TEXT);
cv_text_on(x - 1, y + 1 - AF_X_CAP_Y, &AF_X, L4[q], 0x0000u, T_TEXT);
}
}
if (pg->id[0] == P_ATK) { /* the track's envelope now: the loudest voice's, a yellow node */
const voice_t *bv = 0;
int32_t lvl, x;
for (i = 0; i < NVOICE; i++)
if (t->v[i].stage && t->v[i].stage < 4u && (!bv || t->v[i].env > bv->env))
@@ -109,38 +124,47 @@ static void graph_adsr(const track_t *t, uint16_t c)
if (bv) {
lvl = (int32_t)(((int64_t)bv->env * 1000) >> 24);
if (bv->stage == 1u)
x = x0 + a * lvl / 1000;
x = a * lvl / 1000;
else if (bv->stage == 2u)
x = x1 + (sus < 1000 ? clamp((1000 - lvl) * d / (1000 - sus), 0, d) : 0);
x = a + (sus < 1000 ? clamp((1000 - lvl) * d / (1000 - sus), 0, d) : 0);
else
x = x3 + (sus > 0 ? clamp((sus - lvl) * r / sus, 0, r) : r);
cv_rect(x, EGY(lvl), 1, bot + 2 - EGY(lvl), T_MID);
cv_rrect(x - 3, EGY(lvl) - 3, 7, 7, 3, T_TEXT, T_SURF);
x = a + d + sl + (sus > 0 ? clamp((sus - lvl) * r / sus, 0, r) : r);
cv_rect(x0 + x, bot - H - 4, 1, H + 6, HUD_YE);
cv_rect(x0 + x - 2, bot - lvl * H / 1000 - 2, 5, 5, HUD_YE);
}
}
#undef EGY
}
/* LFO: the wave as it runs (JIANT 0.5): the phase now at the playhead (a quarter in), two cycles across, scrolling
* at the LFO's own rate; behind the playhead dimmer (what it played), the level now a dot, its depth after FADE */
/* (V10.8.16, JIANT BYTE's LFO "satellite" (GPL, as BYTE has it), the owner's pick) */
static void graph_lfo(const track_t *t, uint16_t c)
{
int32_t x, cy = graph_ht / 2, a = 38 * graph_ht / 100, py = cy, xp = PANEL_W / 4;
uint32_t span = 0xFFFFFFFFu / (PANEL_W / 2u), ph = t->lfo_ph - (uint32_t)xp * span;
int32_t now = cy - mulq15(t->lfo_val, t->lfo_fade) * a / 32768;
cv_rect(PANEL_X0, cy, PANEL_W, 1, T_RAISE);
for (x = 0; x < PANEL_W; x++) { /* (lfo_wave only reads the track) */
uint32_t px = ph + (uint32_t)x * span;
int32_t y = cy - lfo_wave((track_t *)t, px) * a / 32768;
if (t->p[P_LWAVE] == 4) /* S&H: a value per cycle part, held */
y = cy - ((int32_t)((((px >> 29) + 1u) * 2654435761u) >> 16) - 32768) * a / 32768;
if (x)
cv_line_t(PANEL_X0 + x - 1, py, PANEL_X0 + x, y,
x < xp ? ux_mix(T_SURF, heat_y(y, cy - a, cy + a, c), 45) : heat_y(y, cy - a, cy + a, c), 2);
int32_t cy = graph_ht / 2, a = 38 * graph_ht / 100, ox = PANEL_X0 + a + 6, x0 = ox + a + 12, x, py = cy, i;
int32_t val = mulq15(t->lfo_val, t->lfo_fade), sx = ox + (og_cos(t->lfo_ph >> 16) * a >> 15), sy = cy - val * a / 32768;
uint32_t span = 0xFFFFFFFFu / (uint32_t)(PANEL_W - (x0 - PANEL_X0)) * 3u / 2u;
uint16_t tc = TRK_COL[(uint32_t)(t - trk) % 6u];
char b[16];
(void)c;
for (i = 0; i < 64; i += 2) /* its orbit, dotted; the axis */
cv_pset(ox + (a * og_cos((uint32_t)i * 1024u) >> 15), cy + (a * og_sin((uint32_t)i * 1024u) >> 15), T_DIM);
for (x = PANEL_X0; x < PANEL_X0 + PANEL_W; x += 3) cv_pset(x, cy, T_LINE);
for (x = 0; x < PANEL_X0 + PANEL_W - x0; x++) { /* the wave it wrote, the newest nearest */
uint32_t ph = t->lfo_ph - (uint32_t)x * span;
int32_t y = cy - lfo_wave((track_t *)t, ph) * a / 32768;
if (t->p[P_LWAVE] == 4)
y = cy - ((int32_t)((((ph >> 29) + 1u) * 2654435761u) >> 16) - 32768) * a / 32768;
if (!x) y = sy; /* (it starts where the satellite is) */
if (x) cv_line_t(x0 + x - 1, py, x0 + x, y, tc, 2);
py = y;
}
cv_rect(PANEL_X0 + xp, cy - a - 4, 1, 2 * a + 8, T_MID); /* the playhead */
cv_rrect(PANEL_X0 + xp - 3, now - 3, 7, 7, 3, T_TEXT, T_SURF);
cv_line(ox, cy, sx, sy, HUD_YE); /* the satellite, its height carried over */
for (x = sx; x < x0; x += 2) cv_pset(x, sy, T_MID);
cv_rect(sx - 2, sy - 2, 5, 5, HUD_YE);
str_cpy(b, "PHASE ", sizeof b); fmt_int(b + 6, (int32_t)((t->lfo_ph >> 16) * 360u >> 16));
cv_text_on(PANEL_X0 + 2, graph_ht - 8 - AF_X_CAP_Y, &AF_X, b, HUD_YE, cv_bg);
str_cpy(b, "VALUE ", sizeof b); fmt_int(b + 6, val * 100 / 32768);
cv_text_on(x0, graph_ht - 8 - AF_X_CAP_Y, &AF_X, b, T_TEXT, cv_bg);
}
@@ -1775,22 +1799,35 @@ static void track_strip(uint32_t c, uint32_t sel, uint32_t st, uint32_t mute, ui
* beside it, PAN (from the middle) and the REV send as the two bars under it */
#define T6_W 38
#define T6_X(c) (3 + 39 * (int32_t)(c))
/* a track's number in its colour: the selected one full, the others half into the card, a muted one dim */
static uint16_t trk_num_col(uint32_t c, uint32_t sel)
{
return trk[c].p[P_MUTE] ? T_DIM : sel ? TRK_COL[c % 6u] : ux_mix(T_SURF, TRK_COL[c % 6u], 55);
}
/* (V10.8.16, JIANT BYTE's CHANNELS HUD (GPL, as BYTE has it), the owner's pick) */
static __attribute__((noinline)) void track_col6(uint32_t c, uint32_t sel, uint32_t st, uint32_t mute, uint32_t hot, uint32_t lvl, int32_t pan,
int32_t rv, const char *b)
{
char v[8];
int32_t k, lv = (int32_t)lvl * 14 / 127, mt = ts.meter[c] * 14 / TS_MH, pw = T6_W - 8;
uint16_t lc = hot == 1u ? T_ACCENT : lvl ? (mute ? T_DIM : T_TEXT) : T_DIM;
cv_begin(T6_W, H_GRAPH, T_BG);
cv_rrect(0, 0, T6_W, H_GRAPH, 5, T_SURF, T_BG);
cv_trk(4, 5, 16, c, mute ? T_DIM : sel ? trk_col(c) : ux_mix(T_SURF, trk_col(c), 55), T_SURF); /* (V10.8.10) */
cv_rect(0, 0, T6_W, H_GRAPH, T_SURF); /* (CHANNELS HUD) its number a tag in its colour */
{
uint16_t nb = mute == 2u ? T_LINE : trk_num_col(c, sel);
char nn[2] = {(char)('1' + c), 0};
cv_rect(3, 4, 13, 14, nb);
cv_text_on(6, 5 + (14 - AF_S_CAP_H) / 2 - AF_S_CAP_Y, &AF_S, nn, c % 6u >= 4u && mute != 2u ? 0xFFFFu : 0x0000u, nb);
}
if (sel) { /* (the one chosen: yellow corners) */
cv_rect(0, 0, 3, 1, HUD_YE); cv_rect(0, 0, 1, 3, HUD_YE); cv_rect(T6_W - 3, 0, 3, 1, HUD_YE); cv_rect(T6_W - 1, 0, 1, 3, HUD_YE);
cv_rect(0, H_GRAPH - 1, 3, 1, HUD_YE); cv_rect(0, H_GRAPH - 3, 1, 3, HUD_YE);
cv_rect(T6_W - 3, H_GRAPH - 1, 3, 1, HUD_YE); cv_rect(T6_W - 1, H_GRAPH - 3, 1, 3, HUD_YE);
}
if (st == 1u || st == 2u) /* armed: a dot (recording: red) */
cv_rrect(T6_W - 11, 10, 6, 6, 3, st == 1u ? T_REC : T_ACCENT, T_SURF);
if (mute == 2u) /* asleep (TRACKS 4) */
if (mute == 2u)
cv_text_in(2, 22, T6_W - 4, &AF_S, "OFF", T_DIM, T_SURF);
else { /* (0.6.24) the sound's name cut to the column (its first word, as
* many letters as fit, no "..."); muted: in MUTE's colour, still
* there (it said MUTE instead: which sound, gone) */
else {
char sn[13];
uint32_t n;
for (n = 0; b[n] && b[n] != ' ' && n < 12u; n++)
@@ -1798,46 +1835,40 @@ static __attribute__((noinline)) void track_col6(uint32_t c, uint32_t sel, uint3
sn[n] = 0;
while (n > 1u && text_w(&AF_S, sn) > T6_W - 7)
sn[--n] = 0;
cv_text_on(4, 22, &AF_S, sn, mute ? T_ACCENT : sel ? T_TEXT : T_MID, T_SURF);
cv_text_on(4, 22, &AF_S, sn, mute ? T_ACCENT : T_TEXT, T_SURF);
}
if (cur_page()->id[0] == P_CHOR) { /* (0.8.5) GLO > MIX > SENDS: CHORUS DLY REV as bars (codex/coherence:
* the sends only, DIST on FX's own page) */
if (cur_page()->id[0] == P_CHOR) { /* GLO > MIX > SENDS: CHORUS DLY REV as cells */
static const char *const SN[3] = {"C", "D", "R"};
for (k = 0; k < 3; k++) {
int32_t v = trk[c].p[P_CHOR + (uint32_t)k] * 60 / 127; /* (P_CHOR P_DLY P_REV: in a row) */
cv_rect(4 + k * 10, 38, 8, 62, T_RAISE);
if (v)
cv_rect(4 + k * 10, 100 - v, 8, v, mute ? T_DIM : sel && hot == (uint32_t)k + 1u ? T_ACCENT :
heat_col(60 + v * 3));
cv_text(5 + k * 10, 106 - AF_X_CAP_Y, &AF_X, SN[k], T_DIM);
int32_t v2 = trk[c].p[P_CHOR + (uint32_t)k] * 60 / 127, q;
for (q = 0; q < 12; q++)
cv_rect(4 + k * 10, 95 - q * 5, 8, 4, q * 5 < v2 ? (mute ? T_DIM : sel && hot == (uint32_t)k + 1u ? HUD_YE : heat_col(40 + q * 18)) : T_LINE);
cv_text(5 + k * 10, 106 - AF_X_CAP_Y, &AF_X, SN[k], T_TEXT);
}
cv_blit((uint32_t)T6_X(c), lz_on() ? graph_y() + 9u : Y_GRAPH);
return;
}
for (k = 0; k < 14; k++) { /* LEVEL: cold at the bottom, hot at the top */
for (k = 0; k < 14; k++) { /* LEVEL: the meter a matrix, cold at the bottom, hot at the top */
int32_t sy = 95 - k * 4;
uint16_t sc = heat_col(20 + k * 220 / 13);
sc = mute ? (k < lv ? T_DIM : T_RAISE) : k < mt ? sc : k < lv ? ux_mix(T_SURF, sc, 42) : T_RAISE;
sc = mute ? (k < mt ? T_DIM : T_LINE) : k < mt ? sc : T_LINE;
cv_rect(4, sy, 12, 3, sc);
}
if (lvl) /* the fader: a yellow line */
cv_rect(2, 98 - lv * 4, 16, 1, mute ? T_DIM : HUD_YE);
if (lvl) {
int32_t d = LEVEL_DB_X10_AT(lvl);
fmt_int(v, (d + (d < 0 ? -5 : 5)) / 10);
} else {
} else
str_cpy(v, "OFF", sizeof v);
}
cv_text_in(17, 44, T6_W - 18, &AF_S, v, lc, T_SURF);
cv_text_in(17, 44, T6_W - 18, &AF_S, v, hot == 1u ? HUD_YE : lvl && !mute ? HUD_YE : T_DIM, T_SURF);
cv_text_in(17, 58, T6_W - 18, &AF_S, "dB", T_DIM, T_SURF);
cv_rect(4, 104, pw, 3, T_RAISE); /* PAN, from the middle */
cv_rect(4 + pw / 2, 102, 1, 7, hot == 2u ? T_ACCENT : T_MID);
if (pan)
cv_rect(pan > 0 ? 4 + pw / 2 + 1 : 4 + pw / 2 + pan * (pw / 2) / 64, 104, (pan > 0 ? pan : -pan) * (pw / 2) / 64 + 1,
3, mute ? T_DIM : hot == 2u ? T_ACCENT : heat_col(70 + (pan > 0 ? pan : -pan) * 2));
cv_rect(4, 113, pw, 3, T_RAISE); /* the REV send */
if (rv)
cv_rect(4, 113, rv * pw / 127 + 1, 3, mute ? T_DIM : heat_col(40 + rv * 3 / 2)); /* (codex/coherence: on SENDS'
* knobs, MIXER's KNOB 3 MUTE) */
cv_blit((uint32_t)T6_X(c), lz_on() ? graph_y() + 9u : Y_GRAPH); /* (0.8.5: GLO's lens, the panel under the cards) */
for (k = 0; k < pw; k += 3) cv_pset(4 + k, 105, T_LINE); /* PAN: a dotted line, a dot in its colour */
cv_rect(4 + pw / 2, 103, 1, 5, T_MID);
cv_rect(4 + pw / 2 + pan * (pw / 2) / 64 - 1, 102, 3, 7, mute ? T_DIM : hot == 2u ? HUD_YE : TRK_COL[c % 6u]);
for (k = 0; k < pw / 4; k++) /* the REV send: cells */
cv_rect(4 + k * 4, 113, 3, 3, k * 4 < rv * pw / 127 ? (mute ? T_DIM : heat_col(40 + k * 12)) : T_LINE);
cv_blit((uint32_t)T6_X(c), lz_on() ? graph_y() + 9u : Y_GRAPH);
}
static __attribute__((noinline)) void draw_tracks(void)
{
+3 -3
View File
@@ -104,11 +104,11 @@ static const nv_t CE_GLO[] = {NV("MIXER", 0, 0, 0), NV("SENDS", 0, 0, 0), /* (
* (ui_live.c) */
static const ng_t CG_GLO[] = {{"MIXER", "MIX"}, {"GLOBAL COMP", "G.COMP"}, {"SETUP", 0}}; /* (codex/coherence: SETUP, the
* settings in one group: GLOBAL, SYSTEM, SYSTEM 2, KEY SPLIT) */ /* (five tabs of 44 px in the labels' face) */
static const nv_t CE_ENV[] = {NV("ENV", 0, 0, 1), NV("ENV DEST", 0, 0, 1), NV("ENV 2", 0, 0, 1), NV("STAGE", 0, 1, 2),
NV("ENV", "TRACKS", 2, 0)}; /* (V10.22: ENV 2) (codex/coherence) the track's pages first;
static const nv_t CE_ENV[] = {NV("ENV", 0, 0, 1), NV("ENV DEST", 0, 0, 1), NV("ENV 2", 0, 0, 1), NV("STAGE", 0, 1, 2)}; /* (V10.8.16, the owner: TRACKS, the six
* envelopes together, gone for ENV's layers' room) */ /* (V10.22: ENV 2) (codex/coherence) the track's pages first;
* TRACKS, the six tracks' envelopes at a glance (ENV's knobs), last
* (TRACKS DEST, ENV DEST's twin, gone) */
static const ng_t CG_ENV[] = {{"ENV", 0}, {"STAGE", 0}, {"TRACKS", 0}};
static const ng_t CG_ENV[] = {{"ENV", 0}, {"STAGE", 0}};
static const nv_t CE_LFO[] = {NV("MOD", 0, 0, 0), NV("LFO", 0, 1, 1), NV("LFO 2", 0, 1, 1), NV("LFO DEST", 0, 1, 1),
NV("MSEQ", "MOD SEQ", 2, 2), NV("MSEQ 2", "MOD SEQ 2", 2, 2)}; /* (0.9.18: LFO 2, PHASE) */
static const ng_t CG_LFO[] = {{"MODULATION", "MOD"}, {"LFO", 0}, {"MOD SEQUENCE", "MOD SEQ"}}; /* (V10.7.59: MOD SEQ) */
+2 -4
View File
@@ -20,8 +20,6 @@
* while it sounds: graph_signature); nothing of the audio path */
#define FXG_H(v) heat_col((int32_t)(v)) /* (0..256) */
#define FXG_TC TRK_COL[song.sel % 6u] /* (BYTE, the HUD: the track's colour) */
#define HUD_YE 0xEF8Bu /* (V10.8.15, JIANT BYTE's HUD: the cursor yellow) */
#define HUD_BL 0x29FFu
static void hud_tag(int32_t x, int32_t y, const char *s, uint16_t fg, uint16_t bg) /* a tag: s on bg */
{
cv_rect(x, y, text_w(&AF_X, s) + 4, 11, bg);
@@ -297,7 +295,7 @@ static void fxg_sends(const track_t *t, int32_t x, int32_t y, int32_t w, int32_t
cv_rect(bx - 2, ly, cw + 4, 1, HUD_YE);
fmt_int(b, v * 100 / 127);
str_cpy(b + str_len(b), "%", 2);
cv_text_on(bx + cw / 2 - 8, ly - 9 - AF_X_CAP_Y + 1, &AF_X, b, HUD_YE, cv_bg);
cv_text_on(bx + cw / 2 - 8, (ly - 12 > y + 12 ? ly - 12 : y + 12) - AF_X_CAP_Y, &AF_X, b, HUD_YE, cv_bg); /* (above its line) */
}
}
static void fxg_dist(const track_t *t, int32_t x, int32_t y, int32_t w, int32_t h)
@@ -385,7 +383,7 @@ static __attribute__((noinline)) void graph_fx_lz(const track_t *t, const page_t
if (k == 0) fxg_sends(t, 8, 12, 224, 70);
else if (k == 1) fxg_dist(t, 8, 12, 224, 70);
else fxg_pan(t, 8, 12, 224, 70);
fxg_dist(t, 8, 92, 224, 40);
if (k != 1) fxg_dist(t, 8, 92, 224, 40); /* (the drive small under the others; DIST's own page: once) */
} else if (lv == FXL_BUSES) {
uint32_t m;
for (m = 0; m < FX_NMOD; m++) {
-28
View File
@@ -36,32 +36,6 @@ static int32_t env_now(const track_t *t) /* the loudest voice's l
lv = clamp((int32_t)(((int64_t)t->v[i].env * 1000) >> 24), lv, 1000);
return lv;
}
static void graph_env_tracks(int dest)
{
uint32_t c, k;
for (c = 0; c < NTRK; c++) {
const track_t *t = &trk[c];
int32_t x = 4 + (int32_t)(c % 3u) * 78, y = 2 + (int32_t)(c / 3u) * 68, sel = c == song.sel, lv;
uint16_t bg = sel ? T_TINT : T_RAISE, ink = c >= trk_live ? T_DIM : sel ? T_THEME : T_MID;
char n[3] = {'T', (char)('1' + c), 0};
cv_rect(x, y, 76, 66, bg);
if (sel) {
cv_rect(x, y, 76, 1, T_THEME); cv_rect(x, y + 65, 76, 1, T_THEME);
cv_rect(x, y, 1, 66, T_THEME); cv_rect(x + 75, y, 1, 66, T_THEME);
}
cv_text(x + 4, y + 4 - AF_X_CAP_Y, &AF_X, n, ink);
cv_clip_text(x + 22, y + 4 - AF_X_CAP_Y, &AF_X, trk_engp(t)->name, T_DIM, bg, 50);
env_mini(t, x + 5, y + 16, 66, dest ? 34 : 44, c >= trk_live ? T_DIM : heat_col(150), sel ? 2 : 1);
if (!dest && (lv = env_now(t)) >= 0)
og_node((x + 70) * 16, (y + 60 - lv * 44 / 1000) * 16, 2, T_TEXT);
for (k = 0; dest && k < 3u; k++) { /* FILTER PITCH SHAPE: a bar each from the middle */
int32_t v = t->p[P_ED_FLT + k], w = v * 34 / 128;
cv_rect(x + 5, y + 54 + (int32_t)k * 4, 66, 1, T_LINE);
cv_rect(w < 0 ? x + 38 + w : x + 38, y + 53 + (int32_t)k * 4, w < 0 ? -w : w ? w : 1, 3,
k == 0u ? T_THEME : k == 1u ? T_ACCENT : T_MID);
}
}
}
static void graph_stage(const track_t *t)
{
static const char *const SN[4] = {"ATTACK", "DECAY", "SUSTAIN", "RELEASE"};
@@ -96,8 +70,6 @@ static int graph_env_lz(const track_t *t, const page_t *pg)
{
if (pg->graph == GR_STAGE)
graph_stage(t);
else if (pd_level() == 0u)
graph_env_tracks(pg->id[0] != P_ATK);
else
return 0;
return 1;
+21 -25
View File
@@ -5970,6 +5970,15 @@ static int test_piano_roll(void)
}
/* bug fixes, second round (UI) */
static uint32_t hudye_in(int32_t x0, int32_t y0, int32_t x1, int32_t y1) /* (V10.8.16) the HUD's yellow there */
{
uint32_t n = 0;
int32_t x, y;
for (y = y0; y < y1; y++)
for (x = x0; x < x1; x++)
n += host_screen[y * 240 + x] == (uint16_t)((HUD_YE >> 8) | (HUD_YE << 8));
return n;
}
static uint32_t accent_in(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
{
uint32_t n = 0;
@@ -6015,8 +6024,8 @@ static int test_bughunt_ui2(void)
Y = lz_on() ? (int32_t)graph_y() + 9 : Y_GRAPH; /* (0.8.5: GLO's lens, under its cards) */
turn(EN_K1 + k, 1); /* (K4 right: the DJ FILTER, a high-pass) */
ui.force = 1; frame();
a[k][0] = accent_in(X + 17, Y + 44, X + 37, Y + 57); /* LEVEL's dB */
a[k][1] = accent_in(X + 4, Y + 100, X + 37, Y + 110); /* PAN */
a[k][0] = 0; /* (V10.8.16, BYTE's CHANNELS HUD: LEVEL's dB always yellow) */
a[k][1] = hudye_in(X + 4, Y + 100, X + 37, Y + 110); /* PAN: its dot yellow while turned */
a[k][2] = accent_in(X + 4, Y + 112, X + 37, Y + 117); /* REV (codex/coherence: no knob of MIXER's) */
a[k][3] = accent_in(X + 4, Y + 22, X + 37, Y + 37); /* the name (in the accent: muted) */
if (k == 3u)
@@ -6024,8 +6033,8 @@ static int test_bughunt_ui2(void)
}
for (k = 0; k < 4u; k++) {
uint32_t j;
for (j = 0; j < 4u; j++)
ok &= (k < 2u ? j == k : k == 2u && j == 3u) ? a[k][j] > 0u : a[k][j] == 0u;
for (j = 1; j < 4u; j++)
ok &= (k == 1u ? j == 1u : k == 2u && j == 3u) ? a[k][j] > 0u : a[k][j] == 0u;
}
bad += check("MIXER (six columns, any COLOR): K1 K2 light LEVEL / PAN, K3 MUTE the name (codex/coherence: was REV), K4 (V10.37: BPM) none of them", ok);
}
@@ -12298,33 +12307,20 @@ static int test_lz_env(void)
ui_power_on(); frame();
press(B_ENV); frame();
ok = pd_on() && lz_fam() == LZ_ENV && pd_level() == 1u && str_eq(cur_page()->title, "ENV") && lz_tab_lit(0) &&
lz_crumb_is("ENV \xB7 ENV \xB7 ENV") && lz_count_is("1/5");
lz_crumb_is("ENV \xB7 ENV \xB7 ENV") && lz_count_is("1/4");
turn(EN_SELECT, 1); frame();
ok &= str_eq(cur_page()->title, "ENV DEST") && lz_crumb_is("ENV \xB7 ENV \xB7 ENV DEST") && lz_count_is("2/5");
ok &= str_eq(cur_page()->title, "ENV DEST") && lz_crumb_is("ENV \xB7 ENV \xB7 ENV DEST") && lz_count_is("2/4");
turn(EN_SELECT, 1); frame();
ok &= str_eq(cur_page()->title, "ENV 2") && lz_crumb_is("ENV \xB7 ENV \xB7 ENV 2") && lz_count_is("3/5"); /* (V10.22) */
ok &= str_eq(cur_page()->title, "ENV 2") && lz_crumb_is("ENV \xB7 ENV \xB7 ENV 2") && lz_count_is("3/4"); /* (V10.22) */
turn(EN_SELECT, 1); frame();
ok &= pd_level() == 2u && str_eq(cur_page()->title, "STAGE") && lz_tab_lit(1) && lz_count_is("4/5");
turn(EN_SELECT, 1); frame();
ok &= pd_level() == 0u && lz_tab_lit(2) && str_eq(cur_page()->title, "ENV") && lz_crumb_is("ENV \xB7 TRACKS \xB7 TRACKS") &&
lz_count_is("5/5");
turn(EN_SELECT, 1); frame(); /* (the end: TRACKS DEST gone, ENV DEST's twin) */
ok &= pd_level() == 0u && str_eq(cur_page()->title, "ENV") && lz_count_is("5/5");
ok &= pd_level() == 2u && str_eq(cur_page()->title, "STAGE") && lz_tab_lit(1) && lz_count_is("4/4");
turn(EN_SELECT, 1); frame(); /* (the end: V10.8.16, TRACKS gone) */
ok &= pd_level() == 2u && str_eq(cur_page()->title, "STAGE") && lz_count_is("4/4");
frames(320); press(B_ENV); frame();
ok &= pd_level() == 1u && str_eq(cur_page()->title, "ENV"); /* (round) */
frames(320); press(B_ENV); frame();
ok &= pd_level() == 2u && str_eq(cur_page()->title, "STAGE") && lz_tab_lit(1);
frames(320); press(B_ENV); frame();
ok &= pd_level() == 0u && lz_crumb_is("ENV \xB7 TRACKS \xB7 TRACKS");
bad += check("0.9.2 ENV: opens on ENV; ENV (ENV, ENV DEST, ENV 2) . STAGE . TRACKS (codex/coherence: the six last, no TRACKS DEST), SELECT and the taps", ok);
pr = TSEL->preset; /* TRACKS: ALGORITHM the track, PRESETS the sound */
turn(EN_ALGO, 1); frame();
ok = song.sel == 1u && pd_level() == 0u && pd_on();
turn(EN_ALGO, -1); frame();
pr = TSEL->preset;
turn(EN_PRESET, 1); frame();
ok &= song.sel == 0u && pd_level() == 0u && (TSEL->preset != pr || TSEL->eng_req != trk_def_engine(0));
bad += check("0.9.2 ENV > TRACKS: ALGORITHM picks the track (the tiles), PRESETS the sound (was the track); the page stays", ok);
bad += check("0.9.2 ENV: opens on ENV; ENV (ENV, ENV DEST, ENV 2) . STAGE (V10.8.16: TRACKS gone), SELECT and the taps", ok);
go_title("STAGE"); frame();
ui.stage = 0;
turn(EN_K1, 1); frame();
@@ -12983,7 +12979,7 @@ static const old_lv_t OLD_LV[] = {
{FAM_EDIT, 2, 1, {"OPERATOR", "OP ENV", "OPERATOR 2"}},
{FAM_EDIT, 0, 2, {"EDIT 1", "EDIT 2"}}, {FAM_EDIT, 1, 2, {"X-MOD", "FILTER"}}, /* (V10.7.63: STEREO LEVELS BUS PLAY gone) */
{FAM_EDIT, 2, 2, {"SOUND", "SOUND 2", "SOUND 3", "SOUND 4"}},
{FAM_ENV, 0, 9, {"ENV"}}, /* (codex/coherence: TRACKS DEST gone) */ {FAM_ENV, 1, 9, {"ENV", "ENV DEST"}}, {FAM_ENV, 2, 9, {"STAGE"}},
/* (V10.8.16: ENV's TRACKS, level 0, gone) */ {FAM_ENV, 1, 9, {"ENV", "ENV DEST"}}, {FAM_ENV, 2, 9, {"STAGE"}},
{FAM_LFO, 0, 9, {"MOD"}}, {FAM_LFO, 1, 9, {"LFO", "LFO 2", "LFO DEST"}}, {FAM_LFO, 2, 9, {"MSEQ", "MSEQ 2"}},
{FAM_SCL, 0, 9, {"SCL"}}, {FAM_SCL, 1, 9, {"CHORD"}}, {FAM_ARP, 2, 9, {"ARP", "ARP 2"}},
{FAM_GLO, 0, 9, {"MIXER", "SENDS"}}, {FAM_GLO, 1, 9, {"GLOBAL"}}, {FAM_GLO, 2, 9, {"SYSTEM", "SYSTEM 2"}},
+2115 -2117
View File
File diff suppressed because it is too large. Load diff